{"version":3,"file":"static/chunks/4344-775bb2996e3f4d8a.js","mappings":"+EAAA,WAMA,gJACA,6JAmbA,UAnXA,YACA,aAWA,OACA,UACA,iBACA,oBACA,mBACA,oBACA,yBACA,EAGA,YAYA,GAXA,eACA,cAEA,sBACA,qBAEA,mBACA,4CACA,kBACA,0CAEA,8BACA,GACA,+BACA,gCACA,iCAEA,6CAEA,YACA,mGAA6G,oBAA0B,GAKvI,2BACA,GACA,yBACA,0BACA,2BAEA,iCAEA,YACA,6FAAuG,cAAoB,GAI3H,CAEA,MACA,EAWA,EAyJA,EAnKA,GACA,QACA,UACA,QACA,OACA,OACA,OACA,OACA,KACA,CAAK,CAEL,cAGA,MACA,mBACA,UACA,KACA,MACA,CACA,CAAK,CACL,cAYA,OATA,UACA,yCAMA,cACA,KACA,CACA,CAAK,CACL,aAGA,MACA,KAMA,IAJA,UACA,MACA,QAEA,gBACA,KACA,IAEA,WAEA,IADA,OACA,qBACA,KAGA,oBAOA,IANA,KACA,IACA,qBACA,KACA,KAEA,gBACA,KACA,IAIA,YADA,YAOA,CAHA,YAA2C,EAAQ,MAAc,EAGjE,SAHkD,IAIlD,gBACA,EACA,kBACA,UACA,SAEA,mBAEA,kBACA,UACA,SAHA,EAbA,eAkBA,CAAK,CACL,aAGA,MACA,EAEA,EADA,KAKA,WAEA,IADA,QACA,MACA,WAGA,OAFA,+BACA,IACA,EAEA,aAGA,GAFA,+BACA,IACA,SAEA,QADA,IAGA,EAF0B,GAE1B,SADA,oBADiC,KAKjC,SAEA,yBACA,EAAc,6BACd,aAEA,MAEA,GACA,CACA,CAEA,eACA,CAAK,CACL,aAGA,gBACA,GAEA,CAAK,CACL,aAGA,UACA,QAKA,OAJA,OACA,OACA,OACA,OACA,EACA,SAMA,OALA,OACA,OACA,OACA,OACA,OACA,EACA,SAKA,OAJA,OACA,OACA,OACA,OACA,IACA,CACA,uBACA,CAAK,CAEL,aAGA,SAEA,YAGA,GAFA,OACA,IACA,QAEA,OADA,OACA,EAEA,SAGA,GAFA,YACA,IACA,QAEA,OADA,OACA,EAEA,OACA,GACA,CACA,CACA,cACA,CAAK,CACL,aAGA,MACA,sBAEA,KAAmB,IAAnB,EAAmB,CAGnB,GAFA,IAAe,GACf,IACA,EAAqB,IAArB,EAEA,OADA,IAAiB,GACjB,EAEA,MAFyB,EAEzB,CAgCA,GA/BA,MACA,IACA,OAEA,eACA,iCAEA,2BAGA,eACA,wBACA,kDACc,yBACd,IAEA,SAEY,eACZ,8BACA,oDACc,+BACd,IAEA,SAGA,SAGA,IACA,EAAuB,IAAvB,EAEA,OADA,IAAmB,GACnB,EAEA,OACA,GACA,CACA,CACA,eACA,EAwBA,OAtBA,aAKA,OADA,IACA,GACA,MAAa,EACb,UACA,SACA,UACA,SACA,UACA,SACA,UACA,SACA,6BACA,CACA,EAKA,cACA,MAiBA,OAfA,OACA,IACA,MACA,MACA,IACA,GACA,kBASA,qBACA,gBACA,IACA,EACA,OAWA,OAVA,uBACA,mCAEA,SADA,WAEA,OAEA,YAEa,EAEb,aACA,CAAS,EAAI,KAAY,KACzB,CACA,CACA,oBCxbA,YACA,aAQA,IAozEA,EApzEA,cACA,6BACA,aAAwB,WAAiB,cACzC,QACA,EAGA,aAAyC,wBAEzC,qBACA,qBAA6B,OAE7B,UACA,SACA,eACA,mGACA,iGACA,sGACA,uGACA,kGAEA,oBACA,eACA,iBACA,gBACA,aACA,iBACA,iBACA,gBACA,YACA,CAEA,sBACA,UACA,QAAc,IAAO,qBACrB,mBACA,CAEA,oBACA,oBACA,CAEA,oBACA,oBACA,CA4UA,qBACA,SA3UA,SAsBA,QAFA,EAnBA,uDACA,uDACA,uDACA,yDACA,2DACA,uDACA,uDACA,uDACA,yDACA,2DACA,yDACA,2DACA,2DACA,2DACA,2DACA,2DAEA,gCACA,4BACA,IAEA,IAAkB,KAAQ,KAE1B,IADA,UACA,SAEA,GADA,WACA,SAEA,IADA,UACA,UAEA,GADA,WACA,UAGA,IADA,UACA,SAEA,GADA,WACA,SAEA,GADA,WACA,UAEA,IADA,UACA,UAGA,IADA,UACA,SAEA,GADA,WACA,SAEA,IADA,UACA,UAEA,GADA,WACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,IADA,UACA,UAEA,GADA,WACA,UAGA,IADA,UACA,SAEA,GADA,WACA,SAEA,IADA,UACA,UAEA,GADA,WACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,GADA,WACA,UAEA,IADA,UACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,GADA,WACA,UAEA,IADA,UACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,IADA,UACA,UAEA,GADA,WACA,UAEA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QAEA,eACA,eACA,gBACA,gBAEA,eACA,eACA,gBACA,gBAEA,eACA,eACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,gBACA,EA4IA,QACA,CAEA,qBACA,SA9IA,SAsBA,QAFA,EAnBA,uDACA,uDACA,uDACA,yDACA,2DACA,uDACA,uDACA,uDACA,yDACA,2DACA,yDACA,2DACA,2DACA,2DACA,2DACA,2DAEA,gCACA,4BACA,IAEA,IAAkB,KAAQ,KAE1B,GADA,WACA,SAEA,GADA,WACA,SAEA,GADA,WACA,UAEA,IADA,UACA,UAGA,GADA,WACA,SAEA,GADA,WACA,SAEA,IADA,UACA,UAEA,IADA,UACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,IADA,UACA,UAEA,IADA,UACA,UAGA,GADA,WACA,SAEA,GADA,WACA,SAEA,GADA,WACA,UAEA,IADA,UACA,UAGA,IADA,UACA,SAEA,IADA,UACA,SAEA,GADA,WACA,UAEA,GADA,WACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,IADA,UACA,UAEA,GADA,WACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,IADA,UACA,UAEA,IADA,UACA,UAGA,GADA,WACA,SAEA,IADA,UACA,SAEA,IADA,UACA,UAEA,GADA,WACA,SAGA,gBACA,eACA,gBACA,gBAEA,eACA,eACA,gBACA,gBAEA,eACA,eACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,iBAEA,gBACA,gBACA,iBACA,gBACA,EAOA,QACA,CAEA,iFAGA,0BACA,IACA,IADA,0CAEA,QAAc,KAAQ,WACtB,QAAc,IAAO,cACrB,aAEA,IADA,WACA,IAAgB,KAAQ,uBAExB,QADA,IACgB,KAAQ,IACxB,iBACA,WACA,OAEA,MACA,MACA,KACA,CACA,OAEA,IADA,WACA,IAAgB,IAAO,uBAEvB,QACA,CAEA,sBACA,IACA,IADA,0CAEA,QAAc,KAAQ,WACtB,QAAc,IAAO,cACrB,aAEA,IADA,WACA,IAAgB,KAAQ,gBAExB,QADA,IACgB,KAAQ,IACxB,iBACA,WACA,OAEA,MACA,KACA,CACA,OAEA,IADA,WACA,IAAgB,IAAO,gBAEvB,QACA,CAEA,sBACA,yBACA,WAEA,QADA,oBACA,IAAkB,IAAO,iBACzB,mBACA,CAEA,0BACA,yBACA,WAEA,QADA,oBACA,IAAkB,IAAO,iBACzB,uBACA,CAOA,sBAQA,eAPA,gCACA,2BACA,2BACA,4BACA,gBACA,WAIA,yBAA+C,iBAC/C,yBAA+C,6BAC/C,yBAA+C,6BAC/C,yBAA+C,4BAC/C,yBAA+C,4BAC/C,qBACA,2BAA+C,6BAC/C,2BAA+C,6BAC/C,2BAA+C,4BAC/C,oBAEA,qCACA,qCACA,qCACA,qCACA,qCACA,qCACA,qCACA,oCACA,EAmUA,wBACA,eAGA,OAFA,gBACA,cACA,CACA,CAEA,wBACA,yBAEA,OADA,eACA,UACA,CAEA,sBACA,MACA,kBAGA,IAFA,iBACA,oBACA,IAAc,KAAQ,WACtB,QACA,CAEA,sBAEA,IADA,EACA,qBACA,UACA,cACA,yBAFA,UAIA,IADA,iBACA,IAAc,KAAQ,WACtB,QACA,CAEA,gBACA,MACA,QAAc,KAAQ,gBAGtB,cACA,YACA,QAAc,KAAQ,IAEtB,aADA,iBACA,OACA,cAEA,mBACA,CAEA,kBAEA,QADA,WACA,IAAkB,KAAQ,IAC1B,gBACA,QACA,OAEA,CAEA,gBAEA,IADA,MACA,YACA,QAAc,KAAQ,cAItB,IAHA,KACA,KACA,KACA,IAAc,IAAO,KAErB,QADA,gBACgB,KAAQ,IACxB,+BACA,aAEA,iCACA,cACA,aACA,UACA,CACA,QAAc,KAAQ,IACtB,gBACA,gBAEA,CAEA,gBACA,8CAGA,OAFA,OACA,OACA,UACA,CAEA,cACA,yBAEA,OADA,OACA,OAGA,gBACA,MACA,QAAc,KAAQ,6BACtB,aACA,CAEA,kBACA,YAAkB,KAAQ,mBAG1B,kBACA,YAAkB,KAAQ,mBAG1B,kBACA,QACA,gCACA,gCACA,gCACA,4BACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QACA,QACA,QACA,QACA,QACA,QAGA,GADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,QACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,QACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,QACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,GADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,GADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,QACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,QACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,QACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,GADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,GADA,UACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,GADA,UACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IADA,SACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,GADA,UACA,EACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QAKuB,aAAvB,KADA,MACA,OAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA2B,YAC3B,cAAvB,aAAuB,OAA2B,YAC3B,cAAvB,aAAuB,OAA2B,YAC3B,cAAvB,aAAuB,OAA2B,YAC3B,cAAvB,aAAuB,OAA2B,YAC3B,cAAvB,aAAuB,OAA2B,YAClD,gBAIuB,cAAvB,IADA,MACA,OAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,aAAvB,cAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA4B,YAC5B,cAAvB,aAAuB,OAA2B,YAC3B,aAAvB,cAAuB,OAA2B,YAC3B,aAAvB,cAAuB,OAA2B,YAC3B,aAAvB,cAAuB,OAA2B,YAC3B,aAAvB,cAAuB,OAA2B,YAC3B,cAAvB,aAAuB,OAA2B,YAClD,gBAEA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QACA,QACA,QACA,QACA,QACA,OACA,CAEA,gBACA,QACA,CAEA,gBACA,IACA,EADA,MAEA,QAAc,KAAQ,cACtB,UAAgB,KAAQ,IACxB,OACA,uBAEA,QAAc,KAAQ,cAGtB,gBACA,IACA,EADA,MAEA,QAAc,KAAQ,cACtB,UAAgB,KAAQ,IACxB,OACA,gBAEA,QAAc,KAAQ,cAGtB,kBACA,IACA,IADA,qBACA,uBACA,kBACA,kBACA,QAAc,KAAQ,cAItB,IAHA,mBACA,UACA,OACA,IAAc,KAAQ,IACtB,UACA,iBAGA,UADA,YACc,KAAM,IAEpB,MADA,sBAEA,SACA,SACA,SACA,SACA,SACA,OACA,OACA,SACA,SACA,SACA,SACA,OACA,SACA,SACA,SACA,SACA,SACA,SACA,OACA,SACA,SAEA,QAAc,KAAQ,IACtB,aACA,aACA,aACA,aAEA,qBACA,iBAIA,OAHA,OACA,SACA,OACA,CACA,CAEA,gBACA,eACA,CAEA,gBAEA,OADA,QACA,MACA,CAEA,kBACA,yBAEA,OADA,SACA,UACA,CA53BA,mCA2BA,IA1BA,IACA,kBACA,oBAFA,iBAIA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YAEA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YAEA,OACuD,QAAvD,+BACuD,YAAvD,+BAAuD,QACA,YAAvD,+BAAuD,QACA,UAAvD,gCAAuD,QACA,WAAvD,+BAAuD,SACvD,cACuD,YAAvD,iCAAuD,QACA,YAAvD,iCAAuD,QACA,UAAvD,kCAAuD,QACvD,WAUA,EADA,GAPA,MAGA,IACA,MACA,MACA,MACA,SACA,GAAqB,QACrB,SACA,SACA,SACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,MACA,MACA,SACA,GAAqB,QACrB,SACA,SACA,SACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,MACA,SACA,GAAqB,QACrB,SACA,SACA,SACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,IACA,SACA,GAAqB,QACrB,SACA,SACA,SACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,IACA,OACA,GAAqB,QACrB,SACA,SACA,SACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,IACA,OACA,GAAqB,QACrB,OACA,SACA,SACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,IACA,OACA,GAAqB,QACrB,OACA,OACA,SACA,SACA,SACA,UAAsB,QAQtB,GADA,EALA,EACA,IACA,IACA,IACA,IACA,OACA,GAAqB,QACrB,OACA,OACA,OACA,SACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,IACA,OACA,GAAqB,QACrB,OACA,OACA,OACA,OACA,SACA,UAAsB,QAQtB,EADA,GALA,EACA,IACA,IACA,IACA,IACA,OACA,GAAqB,QACrB,OACA,OACA,OACA,OACA,OACA,UAAsB,QAItB,OADA,GADA,eACA,KAEA,QACA,KAEA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAEA,MACA,KAEA,aACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,EAEA,iCACA,IACA,QADA,sBAGA,kBAGA,IAFA,gBACA,mBACW,KAAQ,oBACnB,YACA,6BACA,CAIA,IAFA,iBACA,gBACA,IAAc,KAAQ,IACtB,aACA,iBACA,gBAaA,IAXA,eACA,iBACA,gBACA,aACA,iBACA,gBACA,aAEA,iBACA,YACA,WACA,IAAc,KAAQ,IACtB,iBACA,YACA,WAKA,IAHA,WAEA,UACA,IAAc,KAAQ,YAEtB,QADA,KACc,KAAQ,+BAatB,QAXA,0CACA,8CACA,6CACA,6CACA,4DACA,8CACA,6CACA,6CAEA,wBACA,kBACc,IAAO,IACrB,uCACA,iBAGA,0BACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,0BACA,0BACA,0BACA,0BACA,0BACA,yBACA,EAEA,mCACA,QAEA,kBAIA,IAHA,qBACA,GACA,MACA,IAAgB,IAAU,IAC1B,oCAIA,GAHA,KACA,KACA,iBACA,iBACA,OACA,8BACA,eACA,CASA,GAPA,QACA,SACA,mBACA,KACA,MAGA,GACA,QAAgB,IAAW,IAC3B,oCACA,gBACA,CACA,EA8kBA,OACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,0CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,0CACA,4CACA,4CACA,4CACA,4CACA,4CACA,CAEA,oBAyBA,IAxBA,IACA,gBACA,gBACA,oBAHA,0CAKA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,IACA,SACA,QAAgB,KAAQ,IACxB,QACA,4CACA,4CAEA,QAAgB,KAAQ,IA+HxB,GA9HA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAEA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAGA,IAGA,QAFA,MAEsB,SACtB,UAAsB,SAGtB,8CAGA,SAFA,gDAEuB,UACvB,WAAuB,UAGvB,WAGA,SAFA,aAEuB,UACvB,WAAuB,UAGvB,SAGA,SAFA,aAEuB,UACvB,WAAuB,UAGvB,UAGA,SAFA,YAEuB,UACvB,WAAuB,UAEvB,UACA,UACA,UAEA,gBACA,gBAGA,IAGA,QAFA,MAEsB,SACtB,UAAsB,SAGtB,4CAGA,SAFA,8CAEuB,UACvB,WAAuB,UAGvB,cAGA,SAFA,gBAEuB,UACvB,WAAuB,UAEvB,UACA,UACA,UAEA,gBACA,gBAGA,IAGA,QAFA,MAEsB,SACtB,UAAsB,SAEtB,IAGA,SAFA,MAEuB,UACvB,WAAuB,UAEvB,UACA,UACA,UAEA,gBACA,gBAEA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAEA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAEA,SACA,QAAoB,KAAQ,IAE5B,OAGA,QAFA,SAE0B,SAC1B,UAA0B,SAE1B,cAGA,SAFA,gBAE2B,UAC3B,WAA2B,UAK3B,GAFA,kBAEA,GADA,gBACA,wBAGA,SAFA,8CAE2B,UAC3B,WAA2B,UAK3B,GAFA,mBAEA,IADA,iBACA,wBAGA,SAFA,+CAE2B,UAC3B,WAA2B,UAE3B,UACA,UACA,UAEA,mBACA,mBAMA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,IAGA,QAFA,MAEoB,SACpB,UAAoB,SAEpB,OAGA,SAFA,SAEqB,UACrB,WAAqB,UAErB,UACA,UACA,UAEA,qBACA,qBAEA,OACA,MACA,CAEA,QACA,CAEA,kBACA,IAGA,EAHA,oBACA,oBACA,sBACA,IAuBA,IArBA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBAEA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBAEA,WACA,OAEA,IAAc,IAAO,kBAQrB,IAPA,SAGA,EADA,qBACA,KACA,6BACA,WAEA,IAAc,IAAO,uBAErB,QACA,CAEA,gBACA,sBACA,kBACA,kBAEA,eACA,eACA,SACA,eACA,eACA,SACA,eACA,SACA,eACA,SACA,SACA,SACA,SACA,SAEA,YACA,YACA,YACA,WACA,CAEA,kBACA,MACA,QAAc,IAAO,IACrB,cAEA,CAEA,gBACA,sBACA,UACA,YACA,YACA,OACA,cACA,CAEA,mBACA,QAKA,IAJA,UACA,UACA,UACA,UACA,MAAgB,KAAQ,IAExB,MADA,qBAEA,OACA,OACA,QAEA,CAEA,iBACA,wBACA,UACA,UACA,UACA,YACA,SACA,CAEA,mBACA,IAEA,EAFA,qBACA,oBAYA,IATA,WACA,UACA,UACA,WACA,UAEA,QACA,OAEA,IAAc,KAAQ,iBACtB,QACA,CAEA,sHAEA,iBACA,YACA,SAAe,MAAS,KAExB,IADA,IACA,cAAiC,IAAO,IACxC,6BACA,6BACA,WAEA,SACA,MACA,CAEA,QADA,IACc,KAAQ,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AqB,IAAM,2BAC3B,eACA,mBACA,oBACA,GAAoB,IAAM,kBAC1B,eACA,qBACA,yBACA,2BACA,uBACA,sBACA,6BAiCA,OA9BA,eACA,cACA,aACA,YACA,OACA,aACA,MACA,YACA,OACA,aACA,gBACA,aACA,uBACA,SAA4B,IAAM,+BAElC,uBACA,eAEA,UACA,gBACA,WACA,iBACA,WACA,iBACA,WACA,iBACA,WACA,iBACA,UACA,gBACA,CACA,CACA,uBAEA,OACA,aACA,mBACA,kBACA,KAAsB,IAAM,iBAC5B,IAAqB,IAAM,2BAC3B,eACA,mBACA,oBACA,GAAoB,IAAM,kBAC1B,eACA,qBACA,MACA,kBACA,2BACA,qBACA,CAAiB,EA2EjB,OAzEA,4BACA,UAA6B,IAAM,oCACnC,4BACA,UAA6B,IAAM,oCACnC,2BACA,UAA6B,IAAM,mCACnC,6BACA,UAA6B,IAAM,qCACnC,yBACA,2BACA,6BACA,+BACA,wBACA,0BACA,iCACA,WAA8B,IAAM,+BAEpC,eACA,cACA,aACA,YACA,OACA,aACA,OACA,aACA,MACA,YACA,OACA,aACA,uBACA,SAA4B,IAAM,+BAElC,QACA,cACA,UACA,WACA,WACA,WACA,UACA,UACA,UACA,UACA,WACA,WACA,WAIA,UACA,gBACA,WACA,iBACA,WACA,iBACA,WACA,iBACA,WACA,iBACA,UACA,gBACA,UACA,gBACA,UACA,gBACA,UACA,gBACA,WACA,iBACA,WACA,kBAxBA,cA0BA,gBACA,aACA,CACA,CACA,wBAEA,OACA,iBACA,aACA,mBACA,kBACA,KAAsB,IAAM,iBAC5B,IAAqB,IAAM,2BAC3B,KAAsB,IAAM,yBAC5B,eACA,mBACA,oBACA,GAAoB,IAAM,kBAC1B,eACA,sBAgCA,OA9BA,gCACA,UAA6B,IAAM,wCACnC,qCACA,QAA2B,IAAM,6CAEjC,eACA,cACA,aACA,YACA,QACA,cACA,OACA,aACA,OACA,aACA,MACA,YACA,OACA,aACA,gBACA,aACA,UACA,gBACA,QACA,cACA,SACA,eACA,uBACA,SAA4B,IAAM,+BAElC,CACA,CACA,uBAEA,OACA,aACA,mBACA,kBACA,KAAsB,IAAM,iBAC5B,IAAqB,IAAM,2BAC3B,eACA,mBACA,oBACA,GAAoB,IAAM,kBAC1B,eACA,qBACA,uBAwBA,OAtBA,6BACA,QAA2B,IAAM,qCAEjC,eACA,cACA,aACA,YACA,OACA,aACA,OACA,aACA,MACA,YACA,OACA,aACA,QACA,cACA,gBACA,aACA,uBACA,SAA4B,IAAM,+BAElC,CACA,CACA,2BF3jBO,ME6jBP,OACA,aACA,mBACA,kBACA,KAAsB,IAAM,iBAC5B,IAAqB,IAAM,2BAC3B,eACA,mBACA,oBACA,GAAoB,IAAM,kBAC1B,eACA,mBACA,wBACA,MACA,sBACA,4BACiB,CACjB,MACA,uBACA,6BACiB,CACjB,yBACA,2BACA,qBACA,MFrlBO,EEqlBqC,WFrlBrC,EEqlBqC,oBFrlBrC,EEqlBqC,cFplB5C,QACA,GACA,UA1BA,gBACA,iBACA,SACA,eACA,IAQA,GAPA,SAEA,mBAKA,UAGA,kCAA8C,GAAa,sBAE3D,OAAa,QACb,GAQA,QEmlBA,EAuDA,aAtDA,uBACA,SAA4B,IAAM,+BAElC,kCACA,QAA2B,IAAM,gCAEjC,+BACA,QAA2B,IAAM,6BAEjC,uBACA,4BAAqD,IAAM,WAE3D,2BACA,gCAAoE,IAAM,qBAG1E,eACA,cACA,aACA,YACA,OACA,aACA,OACA,aACA,MACA,YACA,OACA,aACA,QACA,cACA,YACA,kBACA,YACA,kBACA,wBACA,cACA,YACA,kBACA,YACA,kBACA,uBACA,cACA,wBACA,cACA,QACA,cACA,QACA,cACA,QACA,cACA,uBACA,cACA,uBACA,cACA,QACA,KACA,WACA,iBACA,WAUA,OARA,uBACA,cACA,uBACA,cACA,QACA,cACA,gBACA,aACA,CACA,CACA,uBAEA,OACA,aACA,mBACA,kBACA,KAAsB,IAAM,iBAC5B,IAAqB,IAAM,2BAC3B,eACA,mBACA,oBACA,GAAoB,IAAM,kBAC1B,2BACA,MAAuB,IAAM,8BAC7B,GAAoB,IAAM,sBAC1B,EAoCA,OAlCA,UACA,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ACA,CAMA,mBAAsD,SACtD,OACA,kCACA,UAEA,IACA,sDACA,iDACA,CACA,SACA,gCACA,CACA,CAMA,qBAAwD,OACxD,OACA,kCACA,UAEA,yDACA,iDACA,CACA,CC9Ke,SACf,wBAA0G,EAC1G,GAPA,yBASA,WAAyB,GAAU,QAKnC,MAEA,EADA,mBAxBA,iBACA,eACA,QAGA,SAFA,CAIA,EAkBA,KAGA,EAEA,WAAyB,GAAU,QACnC,CACA,iBAA2B,EAAW,QAQtC,OARsC,QAQtC,GACA,kBACA,CAIA,iBACA,wBAEA,CCfe,SAQf,2BAEA,SACA,8CACA,4BACA,eACA,OACA,MACA,uBA9CA,OAEA,MACA,2BACA,MAAyC,IAAM,iCAE/C,6CACA,iCAEA,oBAEA,aADA,KACA,GACA,oBAGA,uBACA,SACA,4BACA,eAEA,GACA,KACA,IA1BA,SA0BA,GAzBA,MAyBA,GAxBA,iBAwBA,GAxBA,mBAwBA,EACA,SAGA,kCAA8C,UAAY,EAC1D,CACA,QACA,EAiBA,KAEA,CACA,QACA,CACA,CCnDO,iBAAsB,GAyD7B,MAzDsC,MAyDtC,SAAkB,oZAAkY,EACpZ,QACA,eACA,cACA,mCACA,kBACA,sBACA,eACA,aACA,cACA,wBACA,0BACA,wBACA,0BACA,sBACA,2BACA,uBACA,cACA,gBACA,mBACA,qBACA,yBACA,qBACA,oBACA,qBACA,kBACA,eACA,qBACA,kBACA,oBACA,kBACA,gBACA,6DACA,yBACA,iCACA,kBACA,cACA,gBACA,uCACA,2CACA,sCACA,0CACA,kCACA,6CACA,oCACA,gBACA,qBACA,2BACA,+BACA,uCACA,+BACA,6BACA,8BACA,yBACA,mBACA,gCACA,wBACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,qBACA,4DAA4E,EAAK,GACjF,gDACA,oFAAoG,EAAK,GACzG,6BACA,iEAAiF,EAAK,GACtF,iCACA,qEAAqF,EAAK,GAC1F,sBACA,6DAA6E,EAAK,GAClF,oBACA,2DAA2E,EAAK,GAChF,qBACA,4DAA4E,EAAK,GACjF,qCACA,yEAAyF,EAAK,GAC9F,uCACA,2EAA2F,EAAK,GAChG,oCACA,wEAAwF,EAAK,GAC7F,sCACA,0EAA0F,EAAK,GAC/F,eACA,kBACA,gBACA,gEACA,4BACA,oCACA,kBACA,cACA,gBACA,0CACA,8CACA,yCACA,6CACA,8CACA,oDACA,OACA,gDACA,gDACA,iDACA,OACA,yBACA,uCACA,OACA,wBACA,uCACA,gDACA,OACA,2CACA,kDACA,OACA,0CACA,kCACA,gCACA,uCACA,0CACA,OACA,4BACA,sBACA,mCACA,4BACS,CAET,CACA,CAOO,iBAAyC,GAUhD,MAVyD,MAUzD,OAAkB,+BAAmC,EACrD,QACA,aACA,qBACA,kBACA,oBACA,cACA,gCACA,wBACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,eACA,cACA,4CACA,+CACA,OACA,qCACA,2CACA,MACA,CAAS,CAET,CACA,CAKO,iBAAkC,GAQzC,MARkD,MAQlD,cAAkB,gBAA4B,EAC9C,QACA,oBACA,mBACA,oBACA,6BACA,0BACA,CACA,CAEA,gCAEA,+BACA,mEAAmF,EAAK,GACxF,eACA,0DACA,uCACA,4CACA,MACA,CAAS,CAET,CACA,CAMO,iBAAmC,GAS1C,MATmD,MASnD,OAAkB,gCAAoC,EACtD,QACA,aACA,oBACA,oBACA,oBACA,cACA,6BACA,4BACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,eACA,cACA,yCACA,6CACA,OACA,yCACA,6CACA,MACA,CAAS,CAET,CACA,CAIO,iBAA+C,GAQtD,MAR+D,MAQ/D,OAAkB,8BAAkC,EACpD,QACA,aACA,qBACA,iBACA,oBACA,cACA,+BACA,sBACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,eACA,cACA,2CACA,kDACA,OACA,yBACA,CAAS,CAET,CACA,CAKO,iBAAmC,GAW1C,MAXmD,MAWnD,2BAAkB,4FAAiH,EACnI,QACA,+BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,sBACA,uBACA,qBACA,0BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,mBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,wDACA,kCACA,oCACA,gCACA,8CACA,+BACA,CACA,CAEA,gCAEA,6CACA,iFAAiG,EAAK,GACtG,kCACA,sEAAsF,EAAK,GAC3F,mCACA,uEAAuF,EAAK,GAC5F,iCACA,qEAAqF,EAAK,GAC1F,wCACA,4EAA4F,EAAK,GACjG,eACA,2DACA,qCACA,uCACA,mCACA,iDACA,mCACS,CAET,CACA,CAIO,iBAAgC,GAMvC,MANgD,MAMhD,SAAkB,UAAiB,EACnC,QACA,eACA,aACA,oBACA,kBACA,aACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,2BACA,iEAAiF,EAAK,GACtF,eACA,kBACA,2CACA,CAAS,CAET,CACA,CAKO,iBAA0B,GAOjC,MAP0C,MAO1C,kBAAkB,gBAA+B,EACjD,QACA,wBACA,YACA,YACA,oBACA,qCACA,YACA,WACA,CACA,CAEA,gCAEA,mCACA,uEAAuF,EAAK,GAC5F,0BACA,gEAAgF,EAAK,GACrF,mBACA,0DAA0E,EAAK,GAC/E,eACA,wCACA,YACA,YACS,CAET,CACA,CAIO,iBAA0B,GAMjC,MAN0C,MAM1C,IAAkB,WAAa,EAC/B,QACA,UACA,cACA,oBACA,QACA,eACA,CACA,CAEA,gCAEA,iBACA,wDAAwE,EAAK,GAC7E,qBACA,4DAA4E,EAAK,GACjF,eACA,QACA,yCACA,CAAS,CAET,CACA,CAKO,iBAAuC,GAQ9C,MARuD,MAQvD,IAAkB,sCAAsC,EACxD,QACA,UACA,gBACA,kBACA,iBACA,oBACA,QACA,qBACA,yBACA,sBACA,CACA,CAEA,gCAEA,iBACA,wDAAwE,EAAK,GAC7E,eACA,QACA,iCACA,yCACA,OACA,qCACA,2CACA,OACA,mCACA,8CACA,MACA,CAAS,CAET,CACA,CAIO,iBAAmC,GAM1C,MANmD,MAMnD,KAAkB,YAAc,EAChC,QACA,WACA,eACA,oBACA,UACA,iBACA,CACA,CAEA,gCAEA,yBACA,+DAA+E,EAAK,GACpF,eACA,wCACA,kBACS,CAET,CACA,CAIO,iBAAwC,GAM/C,MANwD,MAMxD,SAAkB,QAAc,EAChC,QACA,eACA,WACA,oBACA,kBACA,SACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,kBACA,yDAAyE,EAAK,GAC9E,eACA,kBACA,UACS,CAET,CACA,CAIO,iBAAoC,GAO3C,MAPoD,MAOpD,IAAkB,sBAAuB,EACzC,QACA,UACA,cACA,gBACA,oBACA,QACA,gBACA,oBACA,CACA,CAEA,gCAEA,iBACA,wDAAwE,EAAK,GAC7E,qBACA,4DAA4E,EAAK,GACjF,eACA,QACA,0CACA,iCACA,6CACA,MACA,CAAS,CAET,CACA,CAIO,iBAAgC,GAYvC,MAZgD,MAYhD,iBAAkB,yGAAmH,EACrI,QACA,qBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,uBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,eACA,yBACA,mBACA,yBACA,wBACA,oBACA,mCACA,wCACA,kBACA,wCACA,2BACA,wCACA,qCACA,CACA,CAEA,gCAEA,kCACA,sEAAsF,EAAK,GAC3F,qCACA,yEAAyF,EAAK,GAC9F,sBACA,6DAA6E,EAAK,GAClF,eACA,sCACA,2CACA,kBACA,2CACA,uCACA,gDACA,OACA,oDACA,mDACA,OACA,kDACA,kDACA,MACA,CAAS,CAET,CACA,CAIO,iBAAwC,GAW/C,MAXwD,MAWxD,cAAkB,yCAAkD,EACpE,QACA,oBACA,SACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,eACA,gBACA,oBACA,8BACA,UACA,sBACA,kBACA,oBACA,CACA,CAEA,gCAEA,gCACA,oEAAoF,EAAK,GACzF,kBACA,yDAAyE,EAAK,GAC9E,wBACA,+DAA+E,EAAK,GACpF,eACA,iCACA,UACA,sBACA,kBACA,iCACA,yCACA,MACA,CAAS,CAET,CACA,CAIO,iBAAqC,GAM5C,MANqD,MAMrD,SAAkB,iBAAwB,EAC1C,QACA,eACA,oBACA,oBACA,mBACA,6BACA,CACA,CAEA,gCAEA,0BACA,8DAA8E,EAAK,GACnF,gCACA,oEAAoF,EAAK,GACzF,eACA,sBACA,iCACS,CAET,CACA,CAIO,iBAAoB,GAS3B,MAToC,MASpC,OAAkB,WAAgB,EAClC,QACA,aACA,cACA,oBACA,cACA,eACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,qBACA,4DAA4E,EAAK,GACjF,eACA,cACA,yCACA,CAAS,CAET,CACA,CAMO,iBAA2B,GAOlC,MAP2C,MAO3C,QAAkB,uBAA4B,EAC9C,QACA,cACA,eACA,gBACA,oBACA,gBACA,mBACA,oBACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,0BACA,8DAA8E,EAAK,GACnF,2BACA,+DAA+E,EAAK,GACpF,eACA,gBACA,sBACA,wBACS,CAET,CACA,CAIO,iBAAoC,GAM3C,MANoD,MAMpD,SAAkB,UAAgB,EAClC,QACA,eACA,aACA,oBACA,kBACA,aACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,oBACA,2DAA2E,EAAK,GAChF,eACA,kBACA,cACS,CAET,CACA,CAOO,iBAA0B,GA8BjC,MA9B0C,MA8B1C,SAAkB,qJAA+I,EACjK,QACA,eACA,gBACA,aACA,gBACA,qBACA,cACA,eACA,kBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,YACA,aACA,mBACA,eAAiC,IAAM,mBACvC,EACA,eACA,gBACA,iBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,WACA,YACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,kBACA,oBACA,cACA,oBACA,+BACA,gBACA,kBACA,6BACA,YACA,mBACA,kBACA,qBACA,4BACA,UACA,gBACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,uBACA,8DAA8E,EAAK,GACnF,oBACA,2DAA2E,EAAK,GAChF,eACA,kBACA,oBACA,cACA,oBACA,kCACA,gBACA,kBACA,gCACA,YACA,sBACA,kBACA,wBACA,+BACA,UACA,oBACS,CAET,CACA,CAIO,iBAA0B,GAMjC,MAN0C,MAM1C,KAAkB,UAAY,EAC9B,QACA,SACA,mBACA,eAAiC,IAAM,mBACvC,EACA,aACA,oBACA,UACA,aACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,oBACA,2DAA2E,EAAK,GAChF,eACA,UACA,uCACA,CAAS,CAET,CACA,CAIO,iBAAuB,GAO9B,MAPuC,MAOvC,MAAkB,iBAAoB,EACtC,QACA,YACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,YACA,oBACA,YACA,cACA,WACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,eACA,YACA,cACA,YACS,CAET,CACA,CAIO,iBAAgC,GAKvC,MALgD,MAKhD,CAAkB,YAAW,EAC7B,QACA,iBACA,oBACA,qBACA,CACA,CAEA,gCAEA,wBACA,+DAA+E,EAAK,GACpF,eACA,sBACS,CAET,CACA,CAUO,iBAAgC,GAKvC,MALgD,MAKhD,MAAkB,EAAM,EACxB,QACA,YACA,oBACA,WACA,CACA,CAEA,gCAEA,0BACA,gEAAgF,EAAK,GACrF,eACA,yCACA,CAAS,CAET,CACA,CAIO,iBAA4B,GAOnC,MAP4C,MAO5C,OAAkB,SAAc,EAChC,QACA,aACA,YACA,oBACA,cACA,WACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,eACA,cACA,YACS,CAET,CACA,CAIO,iBAAiC,GAKxC,MALiD,MAKjD,CAAkB,aAAY,EAC9B,QACA,kBACA,oBACA,uBACA,CACA,CAEA,gCAEA,gCACA,sEAAsF,EAAK,GAC3F,eACA,wBACS,CAET,CACA,CAIO,iBAAkB,GAOzB,MAPkC,MAOlC,MAAkB,kBAAqB,EACvC,QACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,aACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,YACA,cACA,aACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,oBACA,2DAA2E,EAAK,GAChF,oBACA,2DAA2E,EAAK,GAChF,eACA,YACA,cACA,cACS,CAET,CACA,CAIO,iBAA4B,GAKnC,MAL4C,MAK5C,MAAkB,EAAM,EACxB,QACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,WACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,eACA,YACS,CAET,CACA,CAIO,iBAA2B,GAMlC,MAN2C,MAM3C,KAAkB,SAAY,EAC9B,QACA,WACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,UACA,WACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,mBACA,0DAA0E,EAAK,GAC/E,eACA,UACA,YACS,CAET,CACA,CAIO,iBAA4B,GAKnC,MAL4C,MAK5C,OAAkB,EAAO,EACzB,QACA,aACA,oBACA,aACA,CACA,CAEA,gCAEA,2BACA,iEAAiF,EAAK,GACtF,eACA,2CACA,CAAS,CAET,CACA,CACO,iBAA2B,GAUlC,MAV2C,MAU3C,CAAkB,8DAAyD,EAC3E,QACA,cACA,mBACA,eACA,kBACA,aACA,aACA,oBACA,gBACA,2BACA,kBACA,yBACA,cACA,aACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,2BACA,kEAAkF,EAAK,GACvF,sBACA,6DAA6E,EAAK,GAClF,0BACA,iEAAiF,EAAK,GACtF,oBACA,2DAA2E,EAAK,GAChF,oBACA,2DAA2E,EAAK,GAChF,eACA,gBACA,2BACA,kBACA,yBACA,cACA,aACA,CAAS,CAET,CACA,CAIO,iBAA8B,GAOrC,MAP8C,MAO9C,MAAkB,uBAA0B,EAC5C,QACA,YACA,cACA,iBACA,oBACA,YACA,gBACA,qBACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,qBACA,4DAA4E,EAAK,GACjF,eACA,YACA,gBACA,sBACS,CAET,CACA,CAIO,iBAAkC,GAKzC,MALkD,MAKlD,QAAkB,EAAQ,EAC1B,QACA,cACA,oBACA,eACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,eACA,gBACS,CAET,CACA,CAKO,iBAA4B,GAcnC,MAd4C,MAc5C,UAAkB,sEAAyE,EAC3F,QACA,gBACA,YACA,uBACA,uBACA,aACA,eACA,YACA,oBACA,oBACA,YACA,mCACA,mCACA,cACA,kBACA,WACA,CACA,CAEA,gCAEA,8BACA,oEAAoF,EAAK,GACzF,0BACA,gEAAgF,EAAK,GACrF,kCACA,sEAAsF,EAAK,GAC3F,kCACA,sEAAsF,EAAK,GAC3F,oBACA,2DAA2E,EAAK,GAChF,6BACA,mEAAmF,EAAK,GACxF,0BACA,gEAAgF,EAAK,GACrF,eACA,kDACA,0CACA,sCACA,sCACA,cACA,gDACA,YACS,CAET,CACA,CAIO,iBAA6B,GAOpC,MAP6C,MAO7C,OAAkB,2BAA+B,EACjD,QACA,aACA,uBACA,YACA,oBACA,cACA,mCACA,WACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,kCACA,sEAAsF,EAAK,GAC3F,0BACA,gEAAgF,EAAK,GACrF,eACA,cACA,sCACA,yCACA,CAAS,CAET,CACA,CAKO,iBAA2B,GAUlC,MAV2C,MAU3C,CAAkB,2CAAwC,EAC1D,QACA,iBACA,cACA,gBACA,gBACA,oBACA,uBACA,gBACA,qBACA,oBACA,CACA,CAEA,gCAEA,4BACA,gEAAgF,EAAK,GACrF,qBACA,4DAA4E,EAAK,GACjF,2BACA,+DAA+E,EAAK,GACpF,2BACA,+DAA+E,EAAK,GACpF,eACA,0BACA,gBACA,wBACA,wBACS,CAET,CACA,CAIO,iBAA0B,GASjC,MAT0C,MAS1C,MAAkB,iCAAkC,EACpD,QACA,YACA,UACA,aACA,aACA,eACA,oBACA,YACA,QACA,cACA,cACA,iBACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,iBACA,wDAAwE,EAAK,GAC7E,2BACA,iEAAiF,EAAK,GACtF,eACA,YACA,QACA,4CACA,cACA,2BACA,wCACA,MACA,CAAS,CAET,CACA,CAKO,iBAA8B,GAerC,MAf8C,MAe9C,aAAkB,8JAAgK,EAClL,QACA,mBACA,uBACA,oBACA,mBACA,sBACA,mBACA,mBACA,2BACA,wBACA,qBACA,YACA,oBACA,0BACA,oCACA,8BACA,2BACA,iCACA,2BACA,2BACA,4CACA,sCACA,gCACA,WACA,CACA,CAEA,gCAEA,iCACA,uEAAuF,EAAK,GAC5F,eACA,0BACA,uCACA,0CACA,kDACA,OACA,8BACA,oCACA,uCACA,gDACA,OACA,uCACA,gDACA,OACA,+CACA,yCACA,4CACA,mDACA,OACA,YACS,CAET,CACA,CAIO,iBAA4B,GAMnC,MAN4C,MAM5C,SAAkB,SAAgB,EAClC,QACA,eACA,YACA,oBACA,kBACA,WACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,eACA,kBACA,WACA,CAAS,CAET,CACA,CAIO,iBAAwB,GAO/B,MAPwC,MAOxC,QAAkB,iBAAsB,EACxC,QACA,cACA,aACA,YACA,oBACA,gBACA,cACA,WACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,eACA,gBACA,cACA,YACS,CAET,CACA,CAIO,iBAAgC,GAMvC,MANgD,MAMhD,KAAkB,UAAY,EAC9B,QACA,WACA,aACA,oBACA,UACA,aACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,oBACA,2DAA2E,EAAK,GAChF,eACA,UACA,uCACA,CAAS,CAET,CACA,CAIO,iBAA8C,GAKrD,MAL8D,MAK9D,QAAkB,EAAQ,EAC1B,QACA,cACA,oBACA,eACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,eACA,gBACS,CAET,CACA,CAIO,iBAAmC,GAK1C,MALmD,MAKnD,OAAkB,EAAO,EACzB,QACA,aACA,oBACA,aACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,eACA,cACS,CAET,CACA,CAKO,iBAAsB,GAM7B,MANsC,MAMtC,KAAkB,UAAa,EAC/B,QACA,SACA,mBACA,eAAiC,IAAM,mBACvC,EACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,UACA,aACA,CACA,CAEA,gCAEA,eACA,UACA,cACS,CAET,CACA,CAIO,iBAAkD,GAMzD,MANkE,MAMlE,OAAkB,QAAY,EAC9B,QACA,aACA,WACA,oBACA,cACA,SACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,yBACA,+DAA+E,EAAK,GACpF,eACA,cACA,UACS,CAET,CACA,CAIO,iBAAoC,GAQ3C,MARoD,MAQpD,OAAkB,sBAA0B,EAC5C,QACA,aACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,oBACA,cACA,cACA,qBACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,oBACA,2DAA2E,EAAK,GAChF,wBACA,+DAA+E,EAAK,GACpF,eACA,cACA,cACA,qBACA,CAAS,CAET,CACA,CAIO,iBAAiC,GAsCxC,MAtCiD,MAsCjD,aAAkB,+gBAAkgB,EACphB,QACA,mBACA,iBACA,mBACA,mBACA,wBACA,4BACA,iCACA,0BACA,kBACA,gCACA,mCACA,8BACA,+BACA,6BACA,0BACA,kCACA,6BACA,sBACA,oBACA,qCACA,sBACA,uBACA,yBACA,oBACA,4BACA,uBACA,oBACA,2BACA,uBACA,2BACA,2BACA,sCACA,8CACA,yDACA,2CACA,wBACA,sDACA,4DACA,kDACA,oDACA,gDACA,0CACA,0DACA,gDACA,iCACA,6BACA,kEACA,kCACA,oCACA,wCACA,6BACA,8CACA,mCACA,CACA,CAEA,gCAEA,8BACA,kEAAkF,EAAK,GACvF,4BACA,gEAAgF,EAAK,GACrF,8BACA,kEAAkF,EAAK,GACvF,8BACA,kEAAkF,EAAK,GACvF,oCACA,wEAAwF,EAAK,GAC7F,wCACA,4EAA4F,EAAK,GACjG,8CACA,kFAAkG,EAAK,GACvG,uCACA,2EAA2F,EAAK,GAChG,eACA,8BACA,0BACA,8BACA,8BACA,yCACA,iDACA,4DACA,8CACA,wBACA,yDACA,+DACA,qDACA,uDACA,mDACA,6CACA,6DACA,mDACA,oCACA,gCACA,qEACA,qCACA,uCACA,2CACA,gCACA,iDACA,uCACS,CAET,CACA,CAKO,iBAAyC,GAuBhD,MAvByD,MAuBzD,WAAkB,uMAAoM,EACtN,QACA,iBACA,WACA,wBACA,0BACA,kBACA,oBACA,qBACA,sBACA,wBACA,iBACA,uBACA,YACA,uBACA,qBACA,oBACA,uBACA,UACA,qCACA,0CACA,yBACA,6BACA,+BACA,iCACA,sCACA,uBACA,oCACA,YACA,mCACA,8BACA,CACA,CAEA,gCAEA,4BACA,gEAAgF,EAAK,GACrF,kBACA,yDAAyE,EAAK,GAC9E,eACA,0BACA,UACA,wCACA,6CACA,4BACA,gCACA,kCACA,oCACA,kDACA,sDACA,OACA,mCACA,8CACA,OACA,gDACA,qDACA,OACA,YACA,sCACA,kCACS,CAET,CACA,CAMO,iBAA0C,GAMjD,MAN0D,MAM1D,CAAkB,sCAAqC,EACvD,QACA,uBACA,yBACA,oBACA,mCACA,sCACA,CACA,CAEA,gCAEA,yCACA,4EAA4F,EAAK,GACjG,oCACA,wEAAwF,EAAK,GAC7F,eACA,sCACA,yCACA,CAAS,CAET,CACA,CAIO,iBAAuC,GAK9C,MALuD,MAKvD,MAAkB,EAAM,EACxB,QACA,YACA,oBACA,WACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,eACA,YACS,CAET,CACA,CAIO,iBAA4B,GAMnC,MAN4C,MAM5C,CAAkB,kBAAiB,EACnC,QACA,gBACA,YACA,oBACA,qBACA,WACA,CACA,CAEA,gCAEA,2BACA,+DAA+E,EAAK,GACpF,mBACA,0DAA0E,EAAK,GAC/E,eACA,kDACA,YACS,CAET,CACA,CAIO,iBAAoC,GAM3C,MANoD,MAMpD,kBAAkB,EAAmB,EACrC,QACA,wBACA,oBACA,qCACA,CACA,CAEA,gCAEA,eACA,kDACA,sDACA,MACA,CAAS,CAET,CACA,CAIO,iBAA8B,GAiBrC,MAjB8C,MAiB9C,WAAkB,+HAAkI,EACpJ,QACA,iBACA,4BACA,wBACA,6BACA,uBACA,yBACA,kBACA,aACA,oBACA,uBACA,8CACA,sCACA,gDACA,oCACA,wCACA,yBACA,aACA,CACA,CAEA,gCAEA,mCACA,sEAAsF,EAAK,GAC3F,eACA,wDACA,iDACA,yCACA,mDACA,gDACA,iDACA,OACA,2CACA,4BACA,cACS,CAET,CACA,CAIO,iBAA8C,GAKrD,MAL8D,MAK9D,MAAkB,EAAM,EACxB,QACA,YACA,oBACA,WACA,CACA,CAEA,gCAEA,0BACA,gEAAgF,EAAK,GACrF,eACA,YACS,CAET,CACA,CAIO,iBAA+B,GAatC,MAb+C,MAa/C,WAAkB,0EAA+E,EACjG,QACA,iBACA,iBACA,eACA,qBACA,uBACA,qBACA,oBACA,uBACA,uBACA,kBACA,+BACA,oCACA,8BACA,CACA,CAEA,gCAEA,4BACA,gEAAgF,EAAK,GACrF,mCACA,sEAAsF,EAAK,GAC3F,sBACA,6DAA6E,EAAK,GAClF,eACA,0BACA,wDACA,kBACA,2CACA,8CACA,OACA,gDACA,iDACA,OACA,2CACA,8CACA,MACA,CAAS,CAET,CACA,CAIO,iBAAkC,GAWzC,MAXkD,MAWlD,QAAkB,8CAAkD,EACpE,QACA,cACA,qBACA,mBACA,mBACA,oBACA,gBACA,+BACA,2BACA,0BACA,CACA,CAEA,gCAEA,eACA,gBACA,kCACA,8BACA,6BACA,CAAS,CAET,CACA,CAIO,iBAA6C,GAsBpD,MAtB6D,MAsB7D,YAAkB,8FAAoG,EACtH,QACA,kBACA,sBACA,yBACA,gBACA,sBACA,gCACA,oBACA,yBACA,kCACA,wCACA,qBACA,iCACA,qDACA,CACA,CAEA,gCAEA,oCACA,uEAAuF,EAAK,GAC5F,eACA,0DACA,qCACA,2CACA,wBACA,oCACA,kEACA,0DACA,MACA,CAAS,CAET,CACA,CAIO,iBAAwC,GAsB/C,MAtBwD,MAsBxD,CAAkB,8GAAyG,EAC3H,QACA,iBACA,yBACA,iBACA,mBACA,8BACA,gCACA,oBACA,uBACA,wCACA,uBACA,2BACA,mDACA,qDACA,CACA,CAEA,gCAEA,4BACA,gEAAgF,EAAK,GACrF,eACA,oDACA,2CACA,mCACA,0CACA,OACA,8BACA,sDACA,kEACA,0DACA,MACA,CAAS,CAET,CACA,CAYO,iBAA+C,GAgBtD,MAhB+D,MAgB/D,UAAkB,qEAAwE,EAC1F,QACA,gBACA,iBACA,YACA,qBACA,cACA,aACA,oBACA,oBACA,oBACA,uBACA,YACA,+BACA,gBACA,cACA,6BACA,CACA,CAEA,gCAEA,eACA,oBACA,mCACA,8CACA,OACA,YACA,2CACA,kDACA,OACA,gBACA,uBACA,sCACA,OACA,iCACS,CAET,CACA,CAMO,iBAAsC,GAY7C,MAZsD,MAYtD,sBAAkB,sFAAsG,EACxH,QACA,4BACA,6BACA,yBACA,kBACA,mBACA,kBACA,oBACA,8CACA,gDACA,wCACA,yBACA,4BACA,yBACA,CACA,CAEA,gCAEA,eACA,iDACA,mDACA,2CACA,4BACA,+BACA,6BACS,CAET,CACA,CAIO,iBAAwC,GAU/C,MAVwD,MAUxD,IAAkB,mFAAiF,EACnG,QACA,UACA,sBACA,qBACA,sBACA,qBACA,oBACA,oBACA,QACA,iCACA,+BACA,iCACA,gCACA,4BACA,CACA,CAEA,gCAEA,iBACA,wDAAwE,EAAK,GAC7E,eACA,QACA,6CACA,mDACA,OACA,kCACA,6CACA,mDACA,OACA,mCACA,yCACA,iDACA,MACA,CAAS,CAET,CACA,CAKO,iBAA6C,GAiBpD,MAjB6D,MAiB7D,qBAAkB,qKAAiL,EACnM,QACA,yBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,4BACA,2BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,8BACA,0BACA,+BACA,kBACA,kBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,qBACA,oBACA,4CACA,8CACA,iDACA,mDACA,0CACA,qDACA,yBACA,8BACA,+BACA,CACA,CAEA,gCAEA,eACA,+CACA,0DACA,0DACA,OACA,oDACA,+DACA,6DACA,OACA,6CACA,wDACA,qCACA,+CACA,OACA,iCACA,4CACA,mDACA,MACA,CAAS,CAET,CACA,CAIO,iBAAyB,GAMhC,MANyC,MAMzC,SAAkB,eAAsB,EACxC,QACA,eACA,gBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,kBACA,uBACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,yBACA,gEAAgF,EAAK,GACrF,eACA,4CACA,wBACS,CAET,CACA,CAIO,iBAAgC,GAWvC,MAXgD,MAWhD,wBAAkB,+EAAkG,EACpH,QACA,4BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,0BACA,yBACA,sBACA,sBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,gDACA,wCACA,sCACA,gCACA,mCACA,CACA,CAEA,gCAEA,qCACA,4EAA4F,EAAK,GACjG,iCACA,wEAAwF,EAAK,GAC7F,gCACA,uEAAuF,EAAK,GAC5F,6BACA,oEAAoF,EAAK,GACzF,+BACA,sEAAsF,EAAK,GAC3F,eACA,gDACA,wCACA,sCACA,gCACA,oCACS,CAET,CACA,CAIO,iBAA6B,GAOpC,MAP6C,MAO7C,CAAkB,0CAAwC,EAC1D,QACA,oBACA,mBACA,kBACA,oBACA,6BACA,2BACA,wBACA,CACA,CAEA,gCAEA,4BACA,mEAAmF,EAAK,GACxF,8BACA,kEAAkF,EAAK,GACvF,6BACA,iEAAiF,EAAK,GACtF,eACA,6BACA,8BACA,2BACA,CAAS,CAET,CACA,CAIO,iBAA2B,GAMlC,MAN2C,MAM3C,KAAkB,UAAY,EAC9B,QACA,WACA,aACA,oBACA,UACA,aACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,oBACA,2DAA2E,EAAK,GAChF,eACA,UACA,uCACA,CAAS,CAET,CACA,CAIO,iBAAwB,GAO/B,MAPwC,MAOxC,MAAkB,iBAAoB,EACtC,QACA,YACA,aACA,YACA,oBACA,YACA,cACA,WACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,oBACA,2DAA2E,EAAK,GAChF,mBACA,0DAA0E,EAAK,GAC/E,eACA,YACA,cACA,YACS,CAET,CACA,CAKO,iBAAgE,GAKvE,MALgF,MAKhF,QAAkB,EAAQ,EAC1B,QACA,cACA,oBACA,eACA,CACA,CAEA,gCAEA,4BACA,kEAAkF,EAAK,GACvF,eACA,6CACA,CAAS,CAET,CACA,CAKO,iBAA4C,GAenD,MAf4D,MAe5D,kBAAkB,uDAAmE,EACrF,QACA,wBACA,WACA,iBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,iBACA,cACA,oBACA,qCACA,UACA,2BACA,uBACA,uBACA,gBACA,CACA,CAEA,gCAEA,mCACA,uEAAuF,EAAK,GAC5F,kBACA,yDAAyE,EAAK,GAC9E,8BACA,kEAAkF,EAAK,GACvF,4BACA,gEAAgF,EAAK,GACrF,4BACA,gEAAgF,EAAK,GACrF,yBACA,6DAA6E,EAAK,GAClF,eACA,wCACA,UACA,8BACA,0BACA,0BACA,mBACA,CAAS,CAET,CACA,CAIO,iBAAuC,GAY9C,MAZuD,MAYvD,KAAkB,4CAA4C,EAC9D,QACA,WACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,cACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,gBACA,oBACA,UACA,cACA,oBACA,sBACA,mBACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,oBACA,2DAA2E,EAAK,GAChF,uBACA,8DAA8E,EAAK,GACnF,wBACA,+DAA+E,EAAK,GACpF,eACA,UACA,cACA,oBACA,sBACA,oBACS,CAET,CACA,CAIO,iBAAsB,GAQ7B,MARsC,MAQtC,OAAkB,0CAA6C,EAC/D,QACA,aACA,oBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,gBACA,oBACA,cACA,kCACA,uBACA,mBACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,+BACA,sEAAsF,EAAK,GAC3F,yBACA,gEAAgF,EAAK,GACrF,8BACA,oEAAoF,EAAK,GACzF,eACA,wCACA,kCACA,uBACA,oBACS,CAET,CACA,CC1uGe,SAOf,iBACA,SACA,cACA,oBAA0C,EAAW,QAWrD,OAXqD,CAWrD,GACA,QACA,CAOA,aAAyB,EACzB,QACA,+BACA,iCAEA,mDACA,2BACA,CAOA,gBAA4B,EAE5B,MADA,6CAAyE,MACzE,KAkBA,kBACA,kBACA,YACA,aACA,aACA,gDAAgE,EAAO,GAEvE,OADA,mBACA,KAEA,CChFe,iBAAiC,GAChD,QAD2D,IAC3D,OACA,WACA,eACA,cACA,CACA,OACA,sBAA+B,aAAa,EAgB5C,WAEA,OADA,qBACA,KAEA,CC3Be,iBAAsC,GACrD,QADgE,IAChE,SACA,WACA,eACA,eACA,eACA,cACA,CACA,OACA,sBAA+B,aAAa,UAAU,aAAa,EAEnE,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uBAOA,MADA,+BALA,CACA,sBACA,UACA,iBACA,EACA,EACA,KAOA,kBAKA,MADA,kCAHA,CACA,qBACA,EACA,EACA,KAWA,6BACA,MAAmB,GAA0B,GAC7C,GACA,aAF6C,OAE7C,EACA,kBACA,YAAyB,IAAM,oCAC/B,EACA,qDACA,eACmB,IAAM,0CAEzB,OAYA,oDACA,MAAmB,GAA0B,GAC7C,GACA,aAF6C,OAE7C,EACA,kBACA,YAAyB,IAAM,qCAC/B,WAAwB,IAAM,2BAC9B,EACA,qDACA,eACmB,IAAM,0CAEzB,OAUA,sBAKA,MADA,uCAHA,CACA,qBACA,EACA,EACA,KAYA,8BAQA,MADA,yCANA,CACA,sBACA,mBACA,YACA,KACA,EACA,EACA,KAYA,0BAMA,MADA,yCAJA,CACA,sBACA,SACA,EACA,EACA,IACA,CAaA,yCACA,MAAmB,GAA0B,GAC7C,GACA,aAF6C,OAE7C,EACA,YAAyB,IAAM,qCAC/B,WAAwB,IAAM,4BAC9B,mBACA,iBACA,EAEA,MADA,2CACA,IACA,CASA,4BAOA,MADA,oCALA,CACA,sBACA,UACA,iBACA,EACA,EACA,KAEA,CCnVe,iBAA8B,GAK7C,OACA,CANwD,KAMxD,SACA,CACA,CCpBe,iBAAkC,GAajD,QAb4D,IAa5D,OACA,WACA,aACA,YACA,CAIA,OACA,oBAA6B,WAAW,WAkBxC,SAEA,OADA,mBACA,KAiBA,uBAGA,OADA,iDACA,KAiBA,oBAEA,OADA,mCACA,KAwBA,aAEA,OADA,kBACA,KA0BA,iBAEA,OADA,4BACA,IACA,CACA,CCnIO,qBACP,mBACA,EAEW,IAAM,2BACjB,CACe,iBAAwC,GAavD,QAbkE,IAalE,OACA,WACA,eACA,cACA,CAIA,OACA,sBAA+B,aAAa,eAkB5C,cAEA,OADA,gCACA,KAiBA,UAEA,OADA,wBACA,KAoBA,WAEA,OADA,yBACA,KAkBA,QAEA,OADA,kBACA,KAkBA,SAEA,OADA,mBACA,KAkBA,YAEA,OADA,0BACA,KAkBA,YAEA,OADA,0BACA,KAkBA,WAEA,OADA,yBACA,KAkBA,SAEA,OADA,mBACA,KAkBA,cAEA,OADA,4BACA,KAkBA,aAEA,OADA,2BACA,KA8BA,uBAGA,OADA,iDACA,KA8BA,oBAEA,OADA,mCACA,KAyBA,aAEA,OADA,kBACA,KAiBA,WAEA,OADA,yBACA,KAEA,CC/We,iBAAsC,GAarD,QAbgE,IAahE,OACA,WACA,aACA,YACA,CAIA,OACA,oBAA6B,WAAW,eAkBxC,cAEA,OADA,0BAAoC,GAAkB,GACtD,KAiBA,OAlBsD,CAkBtD,EAEA,OADA,wBACA,KAoBA,WAEA,OADA,yBACA,KAkBA,QAEA,OADA,kBACA,KAkBA,SAEA,OADA,mBACA,KAkBA,YAEA,OADA,0BACA,KAkBA,YAEA,OADA,0BACA,KAkBA,SAEA,OADA,mBACA,KAkBA,cAEA,OADA,4BACA,KAkBA,aAEA,OADA,2BACA,KAkBA,uBAGA,OADA,iDACA,KAkBA,oBAEA,OADA,mCACA,KAoBA,eAEA,OADA,6BACA,IACA,CAiBA,WAEA,OADA,qBACA,KAiBA,kBAEA,OADA,iCACA,KAyBA,aAEA,OADA,kBACA,KAiBA,WAEA,OADA,yBACA,KAEA,CCtXe,iBAA0B,GAczC,QAdoD,IAcpD,OACA,WACA,aACA,YACA,CAIA,OACA,oBAA6B,WAAW,EAMxC,cAEA,OADA,4BACA,KAEA,CCjCe,iBAAoC,GAcnD,QAd8D,IAc9D,OACA,WACA,YACA,WACA,CAIA,OACA,0BAAmC,UAAU,EAE7C,CCzBe,iBAAgC,GAc/C,QAd0D,IAc1D,OACA,WACA,eACA,cACA,CAIA,OACA,sBAA+B,aAAa,EAgB5C,SAEA,OADA,mBACA,KAwBA,iBAEA,OADA,4BACA,KA0BA,WAEA,OADA,qBACA,KAEA,CCjGe,iBAAkC,GAcjD,QAd4D,IAc5D,OACA,WACA,eACA,cACA,CAIA,OACA,sBAA+B,aAAa,SAkB5C,SAEA,OADA,mBACA,KAiBA,SAEA,OADA,mBACA,KAwBA,aAEA,OADA,kBACA,KAgBA,iBAEA,OADA,4BACA,KAiBA,WAEA,OADA,yBACA,KAEA,CC/He,iBAAyC,GAcxD,QAdmE,IAcnE,OACA,WACA,eACA,cACA,CAIA,OACA,sBAA+B,aAAa,iBAkB5C,SAEA,OADA,mBACA,KAiBA,SAEA,OADA,mBACA,KAyBA,aAEA,OADA,kBACA,IACA,CAeA,iBAEA,OADA,4BACA,KAiBA,WAEA,OADA,yBACA,KAEA,CChIe,iBAA0C,GAczD,QAdoE,IAcpE,OACA,WACA,eACA,cACA,CAIA,OACA,sBAA+B,aAAa,kBAC5C,CAiBA,SAEA,OADA,mBACA,IACA,CAgBA,SAEA,OADA,mBACA,KAuBA,aAEA,OADA,kBACA,KAgBA,iBAEA,OADA,4BACA,KAiBA,iBAEA,OADA,+BACA,KAEA,CC9He,iBAA+C,GAc9D,QAdyE,IAczE,OACA,WACA,eACA,cACA,CAIA,OACA,sBAA+B,aAAa,uBAkB5C,SAEA,OADA,mBACA,KAiBA,SAEA,OADA,mBACA,KAwBA,aAEA,OADA,kBACA,IACA,CAeA,iBAEA,OADA,4BACA,KAiBA,iBAEA,OADA,+BACA,KAEA,CC/He,iBAA8B,GAa7C,QAbwD,IAaxD,OACA,WACA,aACA,YACA,CAIA,OACA,oBAA6B,WAAW,EA0BxC,iBAEA,OADA,4BACA,KAEA,CCpDe,iBAAiC,GAchD,QAd2D,IAc3D,OACA,WACA,aACA,YACA,CAIA,OACA,0BAAmC,WAAW,EA0B9C,iBAEA,OADA,4BACA,KAEA,CCrDe,iBAAoC,GAcnD,QAd8D,IAc9D,OACA,WACA,aACA,YACA,CAIA,OACA,0BAAmC,WAAW,OAgB9C,SAEA,OADA,mBACA,KAiBA,YAEA,OADA,0BACA,KAiBA,YAEA,OADA,0BACA,KAwBA,aAEA,OADA,kBACA,IACA,CAgBA,UAEA,OADA,+BACA,KAiBA,QAEA,OADA,kBACA,KAEA,CCvIO,MAAM,WAAgB,EAAT,CA2DpB,MA3DsC,MA2DtC,SAAkB,+bAA0a,EAC5b,QACA,eACA,cACA,mCACA,kBACA,sBACA,eACA,aACA,cACA,wBACA,0BACA,qBACA,kBACA,wBACA,0BACA,sBACA,2BACA,uBACA,cACA,gBACA,qBACA,mBACA,qBACA,sBACA,eACA,yBACA,qBACA,oBACA,qBACA,kBACA,eACA,oBACA,kBACA,gBACA,6DACA,yBACA,iCACA,kBACA,cACA,gBACA,uCACA,2CACA,gCACA,yBACA,sCACA,0CACA,kCACA,6CACA,oCACA,gBACA,qBACA,gCACA,2BACA,+BACA,kCACA,kBACA,uCACA,+BACA,6BACA,8BACA,yBACA,kBACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,qBACA,4DAA4E,EAAK,GACjF,gDACA,oFAAoG,EAAK,GACzG,6BACA,iEAAiF,EAAK,GACtF,iCACA,qEAAqF,EAAK,GAC1F,sBACA,6DAA6E,EAAK,GAClF,oBACA,2DAA2E,EAAK,GAChF,qBACA,4DAA4E,EAAK,GACjF,qCACA,yEAAyF,EAAK,GAC9F,uCACA,2EAA2F,EAAK,GAChG,iCACA,qEAAqF,EAAK,GAC1F,6BACA,iEAAiF,EAAK,GACtF,oCACA,wEAAwF,EAAK,GAC7F,sCACA,0EAA0F,EAAK,GAC/F,WAAmB,GAAO,CAC1B,SAD0B,CAC1B,QACA,gBACA,gEACA,4BACA,oCACA,kBACA,cACA,gBACA,0CACA,8CACA,mCACA,4BACA,yCACA,6CACA,8CACA,0BAA+C,GAAqB,uBACpE,CADoE,IACpE,EACA,gDACA,gDACkB,GAAsB,8CACxC,OACA,yBACA,aAAqC,GAAY,uBACjD,OACA,wBACA,mCACA,uCACA,sBAA2C,GAAW,uBACtD,OACA,2CACA,wBAA6C,GAAK,uBAClD,OACA,qCACA,kBACA,0CACA,kCACA,gCACA,uCACkB,GAAoB,uCACtC,OACA,4BACA,sBACS,CAET,CACA,CAKO,MAAM,WAA6B,GAU1C,MAVmD,MAAlB,2BAUf,4FAAiH,EACnI,QACA,+BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,sBACA,uBACA,qBACA,0BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,mBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,wDACA,kCACA,oCACA,gCACA,8CACA,+BACA,CACA,CAEA,gCAEA,6CACA,iFAAiG,EAAK,GACtG,kCACA,sEAAsF,EAAK,GAC3F,mCACA,uEAAuF,EAAK,GAC5F,iCACA,qEAAqF,EAAK,GAC1F,wCACA,4EAA4F,EAAK,GACjG,WAAmB,GAAoB,CACvC,sBADuC,IACvC,iCACA,qCACA,uCACA,mCACA,iDACA,mCACS,CAET,CACA,CAIO,iBAA8B,GAQrC,MAR8C,MAQ9C,SAAkB,iBAAwB,EAC1C,QACA,eACA,oBACA,oBACA,kBACA,4BACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,+BACA,mEAAmF,EAAK,GACxF,eACA,QAAqB,GAAO,iCAC5B,+BACA,CAAS,CAET,CACA,CAIO,MAAM,WAA0B,GAMvC,MANgD,GAAlB,GAM9B,SAAkB,UAAiB,EACnC,QACA,eACA,aACA,oBACA,kBACA,aACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,2BACA,iEAAiF,EAAK,GACtF,WAAmB,GAAiB,CACpC,kBACA,CAFoC,KAEpC,YAAqC,GAAiB,sBACtD,CAAS,CAET,CACA,CAIO,iBAA+B,GAQtC,MAR+C,MAQ/C,UAAkB,6BAAoC,EACtD,QACA,gBACA,oBACA,iBACA,oBACA,oBACA,6BACA,sBACA,CACA,CAEA,gCAEA,8BACA,oEAAoF,EAAK,GACzF,+BACA,mEAAmF,EAAK,GACxF,eACA,wBAA2C,GAAO,uBAClD,gCACA,0BACS,CAET,CACA,CAIO,MAAM,WAAoB,GASjC,GATwB,GAAkB,MAS1C,IAAkB,uDAAsD,EACxE,QACA,UACA,cACA,sBACA,eACA,sBACA,oBACA,QACA,gBACA,kCACA,kBACA,iCACA,CACA,CAEA,gCAEA,iBACA,wDAAwE,EAAK,GAC7E,qBACA,4DAA4E,EAAK,GACjF,WAAmB,GAAW,CAC9B,QACA,KAF8B,EAEV,GAAiB,gCACrC,qCACA,kBACA,qCACS,CAET,CACA,CAIO,MAAM,WAA8B,GAW3C,MAXoD,MAWpD,CAXkC,GAWhB,oEAAkE,EACpF,QACA,UACA,cACA,wBACA,eACA,gBACA,sBACA,oBACA,QACA,gBACA,uCACA,kBACA,qBACA,kCACA,CACA,CAEA,gCAEA,iBACA,wDAAwE,EAAK,GAC7E,qBACA,4DAA4E,EAAK,GACjF,WAAmB,GAAqB,CACxC,QACA,OAAoB,GAAsB,KAFF,gBAEE,WAC1C,0CACA,kBACA,iCACA,mBAAwC,GAAY,uBACpD,OACA,qCACA,CAAS,CAET,CACA,CAIO,iBAA6C,GAQpD,MAR6D,MAQ7D,iBAAkB,6BAA2C,EAC7D,QACA,uBACA,oBACA,iBACA,oBACA,oCACA,6BACA,sBACA,CACA,CAEA,gCAEA,0CACA,6EAA6F,EAAK,GAClG,+BACA,mEAAmF,EAAK,GACxF,eACA,2CAA2D,GAAqB,uBAChF,CADgF,YAChF,mBACA,0BACS,CAET,CACA,CAIO,iBAAiC,GAMxC,MANiD,MAMjD,MAAkB,SAAY,EAC9B,QACA,YACA,YACA,oBACA,YACA,WACA,CACA,CAEA,gCAEA,0BACA,gEAAgF,EAAK,GACrF,mBACA,0DAA0E,EAAK,GAC/E,eACA,YACA,YACS,CAET,CACA,CAIO,iBAAsC,GAS7C,MATsD,MAStD,eAAkB,uCAAkD,EACpE,QACA,qBACA,oBACA,eACA,iBACA,oBACA,+BACA,6BACA,mBACA,sBACA,CACA,CAEA,gCAEA,gCACA,oEAAoF,EAAK,GACzF,+BACA,mEAAmF,EAAK,GACxF,eACA,kCACA,gCACA,+BACA,4CACA,OACA,0BACS,CAET,CACA,CAIO,MAAM,WAA0B,GAYvC,MAZgD,GAAlB,GAY9B,iBAAkB,yGAAmH,EACrI,QACA,qBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,uBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,eACA,yBACA,mBACA,yBACA,wBACA,oBACA,mCACA,wCACA,kBACA,wCACA,2BACA,wCACA,qCACA,CACA,CAEA,gCAEA,kCACA,sEAAsF,EAAK,GAC3F,qCACA,yEAAyF,EAAK,GAC9F,WAAmB,GAAiB,CACpC,mBADoC,kBACpC,CACA,2CACA,kBACA,2CACA,uCACA,sBAA2C,GAAY,uBACvD,OACA,oDACkB,GAAsB,gDACxC,OACA,kDACkB,GAAsB,+CACxC,MACA,CAAS,CAET,CACA,CAIO,iBAAkC,GAMzC,MANkD,MAMlD,CAAkB,6BAA4B,EAC9C,QACA,oBACA,mBACA,oBACA,6BACA,yBACA,CACA,CAEA,gCAEA,+BACA,mEAAmF,EAAK,GACxF,eACA,gCACA,mCACkB,GAAW,qCAC7B,MACA,CAAS,CAET,CACA,CAIO,MAAM,WAA+B,GAM5C,MANqD,MAMrD,EANmC,YAMjB,YAAwB,EAC1C,QACA,oBACA,eACA,oBACA,8BACA,kBACA,CACA,CAEA,gCAEA,gCACA,oEAAoF,EAAK,GACzF,0BACA,8DAA8E,EAAK,GACnF,WAAmB,GAAsB,CACzC,wBADyC,QACzC,CACA,sBACS,CAET,CACA,CAIO,iBAAmC,GAQ1C,MARmD,MAQnD,cAAkB,6BAAwC,EAC1D,QACA,oBACA,oBACA,iBACA,oBACA,4BACA,6BACA,sBACA,CACA,CAEA,gCAEA,kCACA,wEAAwF,EAAK,GAC7F,+BACA,mEAAmF,EAAK,GACxF,eACA,gCAAmD,GAAW,uBAC9D,gCACA,0BACS,CAET,CACA,CAIO,MAAM,WAAK,GAYlB,MAZoC,MAYpC,OAAkB,yDAA2D,EAC7E,QACA,aACA,cACA,sBACA,eACA,wBACA,oBACA,cACA,gBACA,kCACA,kBACA,qCACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,qBACA,4DAA4E,EAAK,GACjF,WAAmB,GAAK,CACxB,OADwB,CACxB,MACA,OAAoB,GAAW,gCAC/B,qCACA,kBACA,yCACS,CAET,CACA,CAIO,iBAAoC,GAQ3C,MARoD,MAQpD,UAAkB,6BAAoC,EACtD,QACA,gBACA,oBACA,iBACA,oBACA,oBACA,6BACA,sBACA,CACA,CAEA,gCAEA,8BACA,oEAAoF,EAAK,GACzF,+BACA,mEAAmF,EAAK,GACxF,eACA,kDACA,gCACA,0BACS,CAET,CACA,CAMO,MAAM,WAAqB,GAUlC,IAVyB,EAAkB,MAU3C,QAAkB,oEAAsE,EACxF,QACA,cACA,eACA,gBACA,eACA,sBACA,uBACA,oBACA,gBACA,mBACA,qBACA,kBACA,mCACA,oCACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,0BACA,8DAA8E,EAAK,GACnF,2BACA,+DAA+E,EAAK,GACpF,WAAmB,GAAY,CAC/B,cAD+B,CAC/B,CACA,sBACA,wBACA,kBACA,sCACA,uCACA,CAAS,CAET,CACA,CAIO,iBAAoC,GAQ3C,MARoD,MAQpD,QAAkB,6BAAkC,EACpD,QACA,cACA,oBACA,iBACA,oBACA,gBACA,6BACA,sBACA,CACA,CAEA,gCAEA,4BACA,kEAAkF,EAAK,GACvF,+BACA,mEAAmF,EAAK,GACxF,eACA,oBAAuC,GAAY,uBACnD,gCACA,0BACS,CAET,CACA,CAOO,MAAM,WAAoB,GA8BjC,GA9BwB,GAAkB,MA8B1C,SAAkB,qJAA+I,EACjK,QACA,eACA,gBACA,aACA,gBACA,qBACA,cACA,eACA,kBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,YACA,aACA,mBACA,eAAiC,IAAM,mBACvC,EACA,eACA,gBACA,iBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,WACA,YACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,kBACA,oBACA,cACA,oBACA,+BACA,gBACA,kBACA,6BACA,YACA,mBACA,kBACA,qBACA,4BACA,UACA,gBACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,uBACA,8DAA8E,EAAK,GACnF,oBACA,2DAA2E,EAAK,GAChF,WAAmB,GAAW,CAC9B,aAD8B,IAC9B,CACA,oBACA,cACA,oBACA,kCACA,gBACA,kBACA,gCACA,YACA,sBACA,kBACA,wBACA,+BACA,UACA,oBACS,CAET,CACA,CAIO,iBAA4B,GAMnC,MAN4C,MAM5C,CAAkB,uBAAsB,EACxC,QACA,aACA,oBACA,oBACA,cACA,4BACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,+BACA,mEAAmF,EAAK,GACxF,eACA,MAAmB,GAAK,+BACxB,gCACS,CAET,CACA,CAIO,iBAA6B,GAQpC,MAR6C,MAQ7C,QAAkB,6BAAkC,EACpD,QACA,cACA,oBACA,iBACA,oBACA,gBACA,6BACA,sBACA,CACA,CAEA,gCAEA,4BACA,kEAAkF,EAAK,GACvF,+BACA,mEAAmF,EAAK,GACxF,eACA,oBAAuC,GAAK,uBAC5C,gCACA,0BACS,CAET,CACA,CAMO,MAAM,WAAK,GAmClB,MAnCoC,MAmCpC,aAAkB,4QAAsQ,EACxR,QACA,iBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,uBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,aACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,sBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,4BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,aACA,qBACA,4BACA,gBACA,sBACA,eACA,0BACA,oBACA,kBACA,oBACA,mBACA,oBACA,2BACA,uBACA,wCACA,cACA,YACA,sBACA,qCACA,kDACA,cACA,+BACA,6CACA,oBACA,iCACA,kBACA,0CACA,4BACA,yBACA,6BACA,0BACA,CACA,CAEA,gCAEA,8BACA,kEAAkF,EAAK,GACvF,4BACA,gEAAgF,EAAK,GACrF,qCACA,yEAAyF,EAAK,GAC9F,oBACA,2DAA2E,EAAK,GAChF,mBACA,0DAA0E,EAAK,GAC/E,wBACA,+DAA+E,EAAK,GACpF,mCACA,uEAAuF,EAAK,GAC5F,0CACA,8EAA8F,EAAK,GACnG,WAAmB,GAAK,CACxB,OADwB,KACxB,kBACA,0BACA,2CACA,cACA,YACA,sBACA,wCACA,qDACA,cACA,kCACA,yDACA,qDACA,OACA,oBACA,oCACA,2BACA,oCACA,OACA,sDACA,wDACA,OACA,qCACA,mBAA2C,GAAW,uBACtD,OACA,4BACA,yCACA,6CACA,OACA,uCACA,4CACA,MACA,CAAS,CAET,CACA,CAIO,iBAA2B,GAelC,MAf2C,MAe3C,SAAkB,wFAA2F,EAC7G,QACA,eACA,+BACA,oBACA,mBACA,mBACA,sBACA,oBACA,mBACA,oDACA,6BACA,2BACA,2BACA,gCACA,CACA,CAEA,gCAEA,0BACA,8DAA8E,EAAK,GACnF,2CACA,+EAA+F,EAAK,GACpG,+BACA,mEAAmF,EAAK,GACxF,8BACA,kEAAkF,EAAK,GACvF,8BACA,kEAAkF,EAAK,GACvF,iCACA,qEAAqF,EAAK,GAC1F,eACA,sBACA,uDACA,gCACA,8BACA,8BACA,oCACS,CAET,CACA,CAIO,iBAAgC,GAUvC,MAVgD,MAUhD,iBAAkB,yFAAqG,EACvH,QACA,uBACA,oBACA,6BACA,4BACA,8BACA,oBACA,mCACA,6BACA,gDACA,+CACA,kDACA,CACA,CAEA,gCAEA,kCACA,sEAAsF,EAAK,GAC3F,eACA,sCACA,gCACA,mDACA,kDACA,sDACS,CAET,CACA,CAIO,iBAA+B,GAOtC,MAP+C,MAO/C,gBAAkB,kCAA+C,EACjE,QACA,sBACA,oBACA,sBACA,oBACA,iCACA,6BACA,gCACA,CACA,CAEA,gCAEA,eACA,oCACA,gCACA,oCACS,CAET,CACA,CAIO,MAAM,SAAG,EAAS,GAOzB,MAPkC,MAOlC,MAAkB,kBAAqB,EACvC,QACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,aACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,YACA,cACA,aACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,oBACA,2DAA2E,EAAK,GAChF,oBACA,2DAA2E,EAAK,GAChF,WAAmB,GAAG,CACtB,KADsB,EACtB,KACA,cACA,cACS,CAET,CACA,CAIO,MAAM,WAAsB,GAKnC,KAL0B,CAAkB,MAK5C,MAAkB,EAAM,EACxB,QACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,WACA,CACA,CAEA,gCAEA,mBACA,0DAA0E,EAAK,GAC/E,WAAmB,GAAa,CAChC,YACS,CAET,CACA,CAIO,MAAM,WAAsB,GAQnC,KAR0B,CAAkB,MAQ5C,CAAkB,oCAAkC,EACpD,QACA,qBACA,aACA,iBACA,oBACA,+BACA,cACA,sBACA,CACA,CAEA,gCAEA,gCACA,oEAAoF,EAAK,GACzF,2BACA,iEAAiF,EAAK,GACtF,WAAmB,GAAa,CAChC,eADgC,CAChC,kBACA,kBAAqC,GAAa,uBAClD,0BACS,CAET,CACA,CAIO,MAAM,WAAsB,GAMnC,KAN0B,CAAkB,MAM5C,SAAkB,SAAgB,EAClC,QACA,eACA,YACA,oBACA,kBACA,WACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,WAAmB,GAAa,CAChC,eADgC,EAChC,CACA,YACS,CAET,CACA,CAIO,MAAM,WAAkB,GAO/B,CAPsB,KAAkB,MAOxC,QAAkB,iBAAsB,EACxC,QACA,cACA,aACA,YACA,oBACA,gBACA,cACA,WACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,WAAmB,GAAS,CAC5B,WAD4B,IAC5B,CACA,cACA,YACS,CAET,CACA,CAIO,MAAM,WAA0B,GAMvC,MANgD,GAAlB,GAM9B,KAAkB,UAAY,EAC9B,QACA,WACA,aACA,oBACA,UACA,aACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,oBACA,2DAA2E,EAAK,GAChF,WAAmB,GAAiB,CACpC,UACA,MAAmB,GAAS,8BAC5B,CAAS,CAET,CACA,CACO,iBAA0B,GAKjC,MAL0C,MAK1C,UAAkB,EAAU,EAC5B,QACA,gBACA,oBACA,oBACA,CACA,CAEA,gCAEA,eACA,wBACS,CAET,CACA,CAIO,MAAM,WAAoB,GAWjC,GAXwB,GAAkB,MAW1C,aAAkB,4DAAkE,EACpF,QACA,mBACA,mBACA,eACA,aACA,eACA,YACA,cACA,oBACA,2BACA,2BACA,kBACA,cACA,kBACA,YACA,eACA,CACA,CAEA,gCAEA,8BACA,kEAAkF,EAAK,GACvF,8BACA,kEAAkF,EAAK,GACvF,sBACA,6DAA6E,EAAK,GAClF,oBACA,2DAA2E,EAAK,GAChF,sBACA,6DAA6E,EAAK,GAClF,WAAmB,GAAW,CAC9B,aAD8B,CAC9B,gBACA,8BACA,kBACA,cACA,kBACA,YACA,gBACS,CAET,CACA,CACO,iBAAuC,GAS9C,MATuD,MASvD,wBAAkB,iFAAoG,EACtH,QACA,4BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,0BACA,2BACA,sBACA,sBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,kDACA,0CACA,4CACA,kCACA,oCACA,CACA,CAEA,gCAEA,eACA,qDACA,6CACA,+CACA,qCACA,wCACS,CAET,CACA,CACO,iBAA+B,GAOtC,MAP+C,MAO/C,CAAkB,iCAA+B,EACjD,QACA,mBACA,YACA,iBACA,oBACA,2BACA,YACA,sBACA,CACA,CAEA,gCAEA,eACA,uCACA,4CACA,OACA,YACA,0BACS,CAET,CACA,CAIO,iBAA+B,GAUtC,MAV+C,MAU/C,SAAkB,mEAAsE,EACxF,QACA,eACA,cACA,gBACA,eACA,sBACA,uBACA,oBACA,kBACA,gBACA,qBACA,kBACA,mCACA,oCACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,qBACA,4DAA4E,EAAK,GACjF,2BACA,+DAA+E,EAAK,GACpF,eACA,kBACA,gBACA,wBACA,kBACA,sCACA,wCACS,CAET,CACA,CAIO,iBAAmC,GAO1C,MAPmD,MAOnD,6BAAkB,iCAA4D,EAC9E,QACA,mCACA,oCACA,oBACA,4DACA,6DACA,CACA,CAEA,gCAEA,eACA,+DACA,iEACS,CAET,CACA,CAMO,iBAA+B,GAYtC,MAZ+C,MAY/C,YAAkB,qFAA0F,EAC5G,QACA,kBACA,yBACA,eACA,mBACA,eACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,oBACA,oBACA,yBACA,wCACA,kBACA,2BACA,uBACA,uBACA,4BACA,CACA,CAEA,gCAEA,eACA,qCACA,2CACA,OACA,2CACA,2BACA,wCACA,OACA,8BACA,0BACA,mCACA,0CACA,OACA,gCACS,CAET,CACA,CACO,iBAAoC,GAM3C,MANoD,MAMpD,UAAkB,WAAmB,EACrC,QACA,gBACA,cACA,oBACA,oBACA,eACA,CACA,CAEA,gCAEA,eACA,6BACA,qCACA,OACA,gBACS,CAET,CACA,CACO,iBAA+B,GAQtC,MAR+C,MAQ/C,aAAkB,uBAAiC,EACnD,QACA,mBACA,gBACA,eACA,oBACA,0BACA,oBACA,kBACA,CACA,CAEA,gCAEA,eACA,mCACA,wCACA,OACA,oBACA,+BACA,wCACA,MACA,CAAS,CAET,CACA,CACO,iBAAgC,GAMvC,MANgD,MAMhD,gBAAkB,cAA4B,EAC9C,QACA,sBACA,iBACA,oBACA,kCACA,qBACA,CACA,CAEA,gCAEA,eACA,qCACA,+BACA,sCACA,MACA,CAAS,CAET,CACA,CACO,iBAAkC,GAQzC,MARkD,MAQlD,iBAAkB,4CAAyD,EAC3E,QACA,qBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,wBACA,aACA,kBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,mCACA,sCACA,cACA,4BACA,CACA,CAEA,gCAEA,eACA,sCACA,yCACA,uBACA,kCACA,OACA,gCACS,CAET,CACA,CACO,iBAAiC,GAUxC,MAViD,MAUjD,WAAkB,gDAAuD,EACzE,QACA,iBACA,yBACA,YACA,sBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,uBACA,wCACA,YACA,oCACA,CACA,CAEA,gCAEA,eACA,0BACA,2CACA,YACA,wCACS,CAET,CACA,CACO,iBAAiC,GAMxC,MANiD,MAMjD,YAAkB,gBAA0B,EAC5C,QACA,gBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,mBACA,oBACA,wBACA,0BACA,CACA,CAEA,gCAEA,eACA,wBACA,8BACS,CAET,CACA,CAOO,iBAA0B,GAMjC,MAN0C,MAM1C,CAAkB,yBAAwB,EAC1C,QACA,oBACA,eACA,oBACA,8BACA,kBACA,CACA,CAEA,gCAEA,gCACA,oEAAoF,EAAK,GACzF,0BACA,8DAA8E,EAAK,GACnF,eACA,iCACA,sBACS,CAET,CACA,CAIO,MAAM,WAAqB,GAMlC,IANyB,EAAkB,MAM3C,KAAkB,UAAY,EAC9B,QACA,WACA,aACA,oBACA,UACA,aACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,oBACA,2DAA2E,EAAK,GAChF,WAAmB,GAAY,CAC/B,UACA,IAF+B,EAEZ,GAAS,8BAC5B,CAAS,CAET,CACA,CAIO,MAAM,WAAkB,GAO/B,CAPsB,KAAkB,MAOxC,OAAkB,gBAAoB,EACtC,QACA,aACA,YACA,YACA,oBACA,cACA,YACA,WACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,mBACA,0DAA0E,EAAK,GAC/E,mBACA,0DAA0E,EAAK,GAC/E,WAAmB,GAAS,CAC5B,WAD4B,EAC5B,CACA,YACA,YACS,CAET,CACA,CAQO,MAAM,WAAoB,GA6EjC,GA7EwB,GAAkB,MA6E1C,KAAkB,kgBAAqe,EACvf,QACA,WACA,kBACA,iBACA,cACA,8BACA,8BACA,8BACA,gCACA,gBACA,oBACA,qBACA,sBACA,+BACA,yBACA,iBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,iBACA,wBACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,UACA,iBACA,wBACA,yBACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,uBACA,YACA,UACA,mBACA,eAAiC,IAAM,mBACvC,EACA,0BACA,uBACA,eACA,iBACA,qBACA,iBACA,6BACA,cACA,oBACA,UACA,yBACA,uBACA,gBACA,iDACA,kDACA,kDACA,sDACA,qBACA,6BACA,+BACA,iCACA,oDACA,wCACA,2BACA,uBACA,sCACA,cACA,QACA,uBACA,sCACA,uCACA,cACA,oCACA,YACA,YACA,yCACA,mCACA,mBACA,uBACA,+BACA,sBACA,gDACA,gBACA,CACA,CAEA,gCAEA,kBACA,yDAAyE,EAAK,GAC9E,6BACA,iEAAiF,EAAK,GACtF,4BACA,gEAAgF,EAAK,GACrF,qBACA,4DAA4E,EAAK,GACjF,WAAmB,GAAW,CAC9B,UACA,GAF8B,QAE9B,iBACA,0BACA,gBACA,6DACA,uDACA,OACA,8DACA,wDACA,OACA,8DACA,wDACA,OACA,kEACA,0DACA,OACA,wBACA,gCACA,kCACA,oCACA,uDACA,2CACA,8BACA,0BACA,kDACA,4BAAiD,GAAiB,uBAClE,OACA,cACA,QACA,mCACA,oBAAyC,GAAW,uBACpD,OACA,yCACA,mDACA,kDACA,OACA,cACA,gDACA,2BAAgD,GAAiB,uBACjE,OACA,YACA,YACA,qDACA,mDACA,OACA,sCACA,sBACA,0BACA,kCACA,+BACA,sCACA,OACA,4DACA,uDACA,OACA,oBACS,CAET,CACA,CAMO,iBAAqC,GAwC5C,MAxCqD,MAwCrD,eAAkB,6KAAiL,EACnM,QACA,qBACA,gBACA,uBACA,qBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,uBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,yBACA,mBACA,qBACA,yBACA,wBACA,oBACA,oBACA,+BACA,oBACA,mCACA,mCACA,wCACA,wCACA,2BACA,+BACA,wCACA,sCACA,4BACA,CACA,CAEA,gCAEA,gCACA,oEAAoF,EAAK,GACzF,eACA,kCACA,oBACA,sCACA,sCACA,2CACA,2CACA,8BACA,kCACA,oDACA,mDACA,OACA,kDACA,kDACA,OACA,gCACS,CAET,CACA,CAQO,iBAAqC,GAS5C,MATqD,MASrD,SAAkB,WAAkB,EACpC,QACA,eACA,cACA,oBACA,mBACA,eACA,CACA,CAEA,gCAEA,eACA,sBACA,yBACkB,GAAW,gCAC7B,MACA,CAAS,CAET,CACA,CAMO,iBAAqC,GAO5C,MAPqD,MAOrD,SAAkB,8BAAoC,EACtD,QACA,eACA,eACA,uBACA,oBACA,kBACA,mBACA,mCACA,CACA,CAEA,gCAEA,sBACA,6DAA6E,EAAK,GAClF,0BACA,8DAA8E,EAAK,GACnF,mCACA,uEAAuF,EAAK,GAC5F,eACA,kBACA,sBACA,uCACS,CAET,CACA,CAMO,iBAAuC,GAe9C,MAfuD,MAevD,QAAkB,wDAA0D,EAC5E,QACA,cACA,eACA,gBACA,mBACA,eACA,cACA,oBACA,gBACA,mBACA,oBACA,2BACA,mBACA,eACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,0BACA,8DAA8E,EAAK,GACnF,uBACA,8DAA8E,EAAK,GACnF,eACA,gBACA,sBACA,oBACA,8BACA,sBACA,gBACS,CAET,CACA,CAMO,iBAAgC,GAYvC,MAZgD,MAYhD,CAAkB,yIAAmI,EACrJ,QACA,wBACA,+BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,mBACA,mBACA,eAAiC,IAAM,mBACvC,EACA,sBACA,uBACA,qBACA,0BACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,qCACA,wDACA,gCACA,kCACA,oCACA,gCACA,6CACA,CACA,CAEA,gCAEA,eACA,wCACA,2DACA,mCACA,qCACA,uCACA,mCACA,iDACS,CAET,CACA,CAMO,iBAAiC,GAUxC,MAViD,MAUjD,QAAkB,8CAAkD,EACpE,QACA,cACA,gBACA,mBACA,wBACA,oBACA,gBACA,oBACA,2BACA,qCACA,CACA,CAEA,gCAEA,qBACA,4DAA4E,EAAK,GACjF,uBACA,8DAA8E,EAAK,GACnF,eACA,gBACA,oBACA,8BACA,yCACS,CAET,CACA,CAIO,iBAAkC,GAUzC,MAVkD,MAUlD,cAAkB,gBAA4B,EAC9C,QACA,oBACA,mBACA,oBACA,6BACA,yBACA,CACA,CAEA,gCAEA,+BACA,mEAAmF,EAAK,GACxF,0BACA,iEAAiF,EAAK,GACtF,eACA,gCACA,YAAyB,GAAW,oCACpC,CAAS,CAET,CACA,CAKO,iBAAmC,GAW1C,MAXmD,MAWnD,UAAkB,mBAA0B,EAC5C,QACA,gBACA,gBACA,SACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,oBACA,oBACA,SACA,CACA,CAEA,gCAEA,eACA,6BACA,qCACA,OACA,6BACA,qCACA,OACA,UACS,CAET,CACA,CAMO,iBAA2C,GAWlD,MAX2D,MAW3D,OAAkB,yCAA4C,EAC9D,QACA,WACA,mBACA,eAAiC,IAAM,mBACvC,EACA,YACA,yBACA,eACA,mBACA,eAAiC,IAAM,mBACvC,EACA,oBACA,cACA,YACA,uCACA,qBACA,CACA,CAEA,gCAEA,oBACA,2DAA2E,EAAK,GAChF,eACA,cACA,YACA,mDACA,kDACA,OACA,sBACS,CAET,CACA,CAMO,iBAA2C,GAOlD,MAP2D,MAO3D,CAAkB,qCAAmC,EACrD,QACA,oBACA,iBACA,eACA,oBACA,4BACA,sBACA,iBACA,CACA,CAEA,gCAEA,eACA,qCACA,6CACA,OACA,sBACA,kBACS,CAET,CACA,CACO,iBAAuD,GAM9D,MANuE,MAMvE,CAAkB,wBAAuB,EAC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AAmB,GAAkB,0BACrC,CAcA,yBACA,WAAmB,GAAqB,0BACxC,CAYA,iBACA,WAAmB,GAAc,wBACjC,CAYA,wBACA,WAAmB,GAAqB,wBACxC,CAYA,kBACA,WAAmB,GAAe,wBAClC,CAYA,wBACA,WAAmB,GAAqB,wBACxC,CA2BA,6BACA,WAAmB,GAAyB,0BAC5C,CAiBA,qCACA,WAAmB,GAA+B,4BAClD,CACA,CC1XO,yBAGP,4BACA,cACA,yCAEA,wBACA,IAEA,aACA,SACA,IACA,oDACA,wBAEA,SAEA,mBAGA,MADA,KACA,+BAAyD,gBAA0B,EAEnF,CACA,SAIA,KAEA,OAEA,CACA,iCACA,IACA,CAEA,+CAAuD,GAAY,QACnE,CCxCO,iBACP,oBAEA,iBACA,wBAEA,iCACA,gBAA2B,aAAoB,SAC/C,iCAEA,QACA,CAOO,eACP,gBACA,EAAgB,IAAM,SACtB,YAAoB,WAAkB,IACtC,kDAEA,QACA,CC3Be,kB9ECR,E8EAP,M9EWA,GAXO,EAUsB,O8EVA,C9EUQ,gBAT7B,WDkGR,EClGqB,CDkGrB,WAAY,GAAY,iBACxB,6CAIA,KCtGA,sLAEW,eAAgB,M8EF3B,OAAa,KADS,EAAqB,aAC9B,eACb,CCy/DA,OAlgEA,CACA,UACA,OAggEe,GA//Df,IA+/DsB,EAAC,CA9/DvB,QACA,QACA,SACA,SACA,WACA,SACA,QACA,SACA,WACA,UACA,SACA,UACA,OACA,WACA,UACA,SACA,MACA,SACA,QACA,UACA,SACA,QACA,MACA,SACA,UACA,SACA,QACA,QACA,UACA,SACA,UACA,SACA,SACA,SACA,QACA,MACA,QACA,QACA,QACA,MACA,MACA,UACA,QACA,QACA,QACA,UACA,QACA,QACA,MACA,QACA,QACA,SACA,QACA,QACA,UACA,OACA,QACA,SACA,UACA,UACA,QACA,SACA,SACA,UACA,SACA,UACA,QACA,QACA,QACA,SACA,QACA,WACA,SACA,UACA,SACA,UACA,UACA,UACA,MACA,QACA,UACA,SACA,QACA,UACA,QACA,OACA,SACA,OACA,QACA,QACA,MACA,QACA,QACA,OACA,SACA,UACA,SACA,SACA,QACA,MACA,WACA,SACA,UACA,MACA,SACA,UACA,QACA,SACA,SACA,SACA,UACA,OACA,SACA,SACA,WACA,UACA,UACA,QACA,SACA,OACA,SACA,OACA,SACA,UACA,UACA,QACA,QACA,QACA,OACA,UACA,QACA,UACA,OACA,OACA,WACA,QACA,QACA,MACA,UACA,UACA,OACA,SACA,SACA,SACA,MACA,SACA,UACA,SACA,OACA,QACA,SACA,SACA,QACA,OACA,SACA,UACA,SACA,OACA,SACA,QACA,SACA,SACA,UACA,QACA,OACA,QACA,UACA,OACA,SACA,SACA,UACA,SACA,UACA,MACA,OACA,OACA,UACA,OACA,QACA,SACA,QACA,QACA,QACA,UACA,QACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,QACA,QACA,OACA,OACA,OACA,OACA,OACA,QACA,OACA,QACA,SACA,SACA,SACA,OACA,SACA,SACA,MACA,MACA,UACA,QACA,QACA,QACA,QACA,QACA,SACA,QACA,SACA,QACA,SACA,QACA,QACA,WACA,SACA,SACA,QACA,UACA,QACA,QACA,SACA,QACA,SACA,UACA,QACA,OACA,OACA,SACA,SACA,SACA,SACA,SACA,QACA,MACA,WACA,OACA,SACA,QACA,OACA,UACA,QACA,QACA,SACA,OACA,OACA,OACA,OACA,SACA,OACA,MACA,QACA,SACA,QACA,SACA,QACA,SACA,SACA,UACA,UACA,UACA,MACA,SACA,OACA,QACA,SACA,QACA,OACA,OACA,OACA,SACA,SACA,SACA,MACA,UACA,QACA,WACA,SACA,SACA,QACA,UACA,OACA,UACA,SACA,SACA,SACA,UACA,SACA,UACA,QACA,QACA,WACA,SACA,QACA,UACA,SACA,QACA,OACA,QACA,QACA,SACA,OACA,SACA,QACA,UACA,QACA,QACA,UACA,SACA,SACA,UACA,UACA,QACA,QACA,QACA,WACA,SACA,UACA,OACA,QACA,QACA,OACA,UACA,OACA,OACA,QACA,QACA,SACA,QACA,SACA,QACA,QACA,SACA,OACA,QACA,OACA,QACA,QACA,QACA,QACA,OACA,QACA,UACA,SACA,QACA,QACA,UACA,OACA,SACA,OACA,OACA,UACA,QACA,SACA,UACA,OACA,UACA,QACA,SACA,UACA,UACA,UACA,UACA,WACA,UACA,WACA,UACA,WACA,OACA,OACA,SACA,OACA,QACA,OACA,OACA,UACA,OACA,SACA,QACA,UACA,SACA,SACA,SACA,QACA,SACA,QACA,SACA,QACA,OACA,QACA,QACA,SACA,QACA,QACA,QACA,SACA,QACA,OACA,UACA,QACA,QACA,SACA,OACA,QACA,SACA,QACA,UACA,QACA,SACA,UACA,SACA,QACA,MACA,UACA,OACA,UACA,MACA,WACA,UACA,UACA,UACA,QACA,UACA,SACA,OACA,QACA,MACA,SACA,OACA,QACA,SACA,SACA,OACA,WACA,OACA,MACA,OACA,SACA,SACA,SACA,WACA,SACA,UACA,WACA,WACA,OACA,UACA,SACA,OACA,SACA,QACA,UACA,SACA,SACA,SACA,UACA,OACA,SACA,SACA,UACA,QACA,SACA,SACA,WACA,SACA,SACA,OACA,UACA,UACA,SACA,SACA,UACA,SACA,SACA,UACA,OACA,UACA,QACA,OACA,SACA,OACA,SACA,UACA,UACA,UACA,SACA,WACA,SACA,OACA,WACA,WACA,UACA,OACA,UACA,WACA,UACA,WACA,SACA,SACA,UACA,QACA,SACA,WACA,MACA,OACA,UACA,SACA,SACA,SACA,QACA,OACA,OACA,SACA,OACA,QACA,SACA,QACA,UACA,OACA,QACA,QACA,QACA,QACA,QACA,OACA,QACA,OACA,OACA,MACA,OACA,OACA,OACA,SACA,OACA,QACA,OACA,QACA,UACA,QACA,QACA,QACA,OACA,QACA,SACA,OACA,OACA,OACA,UACA,UACA,OACA,OACA,UACA,SACA,MACA,QACA,SACA,QACA,QACA,WACA,UACA,UACA,WACA,WACA,QACA,OACA,SACA,SACA,UACA,SACA,UACA,SACA,UACA,QACA,SACA,QACA,MACA,UACA,UACA,QACA,SACA,UACA,SACA,SACA,UACA,QACA,SACA,SACA,SACA,SACA,SACA,QACA,SACA,QACA,WACA,UACA,QACA,QACA,MACA,QACA,QACA,UACA,QACA,QACA,SACA,QACA,UACA,SACA,UACA,SACA,WACA,OACA,QACA,SACA,QACA,UACA,SACA,WACA,SACA,UACA,SACA,UACA,WACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,SACA,SACA,UACA,SACA,UACA,SACA,QACA,MACA,UACA,SACA,OACA,UACA,OACA,QACA,QACA,OACA,QACA,OACA,SACA,SACA,MACA,QACA,UACA,OACA,UACA,MACA,QACA,SACA,UACA,QACA,WACA,UACA,WACA,UACA,MACA,OACA,OACA,SACA,QACA,WACA,QACA,QACA,MACA,QACA,UACA,QACA,SACA,OACA,OACA,SACA,QACA,OACA,OACA,SACA,SACA,OACA,OACA,QACA,SACA,OACA,MACA,UACA,MACA,OACA,QACA,QACA,OACA,SACA,OACA,SACA,OACA,QACA,QACA,QACA,SACA,QACA,QACA,MACA,OACA,QACA,MACA,OACA,OACA,SACA,OACA,OACA,QACA,SACA,SACA,OACA,UACA,QACA,UACA,SACA,SACA,QACA,MACA,UACA,QACA,WACA,QACA,SACA,SACA,OACA,QACA,QACA,QACA,SACA,QACA,OACA,MACA,QACA,UACA,OACA,SACA,SACA,OACA,SACA,UACA,OACA,MACA,SACA,UACA,SACA,SACA,UACA,MACA,OACA,OACA,SACA,QACA,OACA,UACA,SACA,QACA,SACA,UACA,UACA,QACA,QACA,OACA,SACA,SACA,UACA,OACA,OACA,OACA,SACA,QACA,QACA,QACA,UACA,QACA,QACA,QACA,QACA,OACA,OACA,OACA,UACA,OACA,OACA,QACA,UACA,SACA,SACA,SACA,OACA,OACA,QACA,QACA,QACA,QACA,QACA,UACA,QACA,QACA,OACA,QACA,OACA,UACA,QACA,OACA,QACA,QACA,QACA,QACA,QACA,SACA,MACA,MACA,QACA,OACA,OACA,SACA,UACA,OACA,QACA,SACA,OACA,QACA,UACA,MACA,OACA,OACA,SACA,OACA,SACA,QACA,QACA,WACA,SACA,QACA,SACA,OACA,MACA,OACA,SACA,OACA,OACA,OACA,MACA,OACA,UACA,QACA,SACA,OACA,OACA,UACA,SACA,OACA,QACA,OACA,OACA,OACA,SACA,QACA,WACA,OACA,QACA,OACA,QACA,MACA,OACA,QACA,SACA,QACA,UACA,SACA,OACA,SACA,QACA,OACA,UACA,SACA,MACA,OACA,OACA,WACA,OACA,SACA,MACA,UACA,UACA,QACA,UACA,UACA,SACA,SACA,SACA,UACA,UACA,OACA,UACA,SACA,WACA,QACA,WACA,SACA,WACA,SACA,UACA,SACA,SACA,UACA,UACA,SACA,SACA,SACA,QACA,WACA,QACA,UACA,SACA,SACA,SACA,UACA,UACA,SACA,WACA,OACA,SACA,SACA,UACA,OACA,SACA,UACA,QACA,OACA,QACA,SACA,SACA,MACA,OACA,UACA,QACA,QACA,QACA,MACA,OACA,OACA,UACA,MACA,QACA,QACA,OACA,SACA,SACA,OACA,OACA,WACA,OACA,OACA,UACA,MACA,OACA,MACA,SACA,OACA,UACA,OACA,MACA,UACA,OACA,SACA,OACA,OACA,QACA,QACA,OACA,MACA,QACA,QACA,SACA,OACA,OACA,OACA,WACA,SACA,QACA,QACA,QACA,QACA,UACA,OACA,MACA,OACA,UACA,QACA,OACA,SACA,OACA,QACA,QACA,UACA,OACA,MACA,QACA,SACA,UACA,QACA,OACA,SACA,OACA,UACA,SACA,SACA,QACA,OACA,UACA,UACA,UACA,OACA,OACA,QACA,OACA,OACA,QACA,OACA,OACA,SACA,OACA,SACA,OACA,SACA,OACA,OACA,UACA,QACA,OACA,QACA,SACA,OACA,OACA,UACA,OACA,SACA,OACA,QACA,QACA,UACA,SACA,QACA,QACA,SACA,SACA,UACA,MACA,QACA,SACA,OACA,OACA,OACA,QACA,OACA,SACA,MACA,SACA,UACA,QACA,UACA,SACA,QACA,SACA,QACA,SACA,SACA,SACA,WACA,OACA,OACA,SACA,QACA,WACA,OACA,SACA,SACA,UACA,OACA,SACA,OACA,UACA,OACA,WACA,QACA,QACA,SACA,OACA,SACA,SACA,UACA,OACA,QACA,QACA,QACA,QACA,OACA,UACA,QACA,SACA,SACA,WACA,OACA,UACA,QACA,OACA,UACA,QACA,SACA,UACA,SACA,SACA,OACA,UACA,MACA,QACA,UACA,SACA,QACA,SACA,MACA,SACA,UACA,SACA,UACA,QACA,OACA,QACA,OACA,UACA,WACA,SACA,SACA,QACA,WACA,QACA,OACA,QACA,OACA,SACA,OACA,WACA,SACA,SACA,WACA,QACA,OACA,SACA,SACA,UACA,OACA,QACA,OACA,SACA,SACA,QACA,SACA,SACA,OACA,OACA,OACA,WACA,UACA,UACA,SACA,QACA,OACA,MACA,UACA,UACA,QACA,OACA,OACA,OACA,QACA,QACA,QACA,UACA,SACA,SACA,QACA,OACA,UACA,OACA,UACA,SACA,QACA,MACA,UACA,SACA,QACA,MACA,MACA,OACA,SACA,SACA,UACA,UACA,SACA,UACA,QACA,QACA,UACA,OACA,MACA,QACA,SACA,QACA,MACA,OACA,MACA,QACA,UACA,OACA,OACA,MACA,QACA,SACA,OACA,OACA,QACA,UACA,SACA,SACA,SACA,QACA,UACA,QACA,WACA,QACA,SACA,WACA,SACA,UACA,QACA,UACA,QACA,SACA,UACA,OACA,OACA,OACA,MACA,QACA,SACA,SACA,QACA,OACA,SACA,OACA,OACA,SACA,OACA,QACA,QACA,QACA,UACA,QACA,SACA,SACA,OACA,SACA,QACA,OACA,QACA,OACA,UACA,SACA,UACA,QACA,OACA,UACA,QACA,SACA,OACA,UACA,UACA,MACA,UACA,SACA,SACA,SACA,UACA,SACA,SACA,MACA,QACA,QACA,SACA,WACA,QACA,SACA,UACA,QACA,MACA,SACA,OACA,QACA,OACA,UACA,OACA,SACA,QACA,QACA,QACA,SACA,UACA,QACA,OACA,SACA,SACA,QACA,OACA,SACA,OACA,OACA,QACA,QACA,OACA,SACA,OACA,OACA,OACA,UACA,UACA,WACA,WACA,OACA,SACA,UACA,UACA,SACA,QACA,WACA,SACA,UACA,SACA,UACA,UACA,SACA,UACA,QACA,QACA,UACA,QACA,WACA,SACA,UACA,QACA,UACA,UACA,UACA,SACA,UACA,UACA,UACA,QACA,WACA,UACA,UACA,QACA,UACA,SACA,UACA,OACA,OACA,QACA,UACA,QACA,QACA,QACA,WACA,SACA,UACA,QACA,OACA,MACA,SACA,UACA,UACA,UACA,UACA,WACA,QACA,OACA,OACA,QACA,SACA,UACA,OACA,OACA,QACA,QACA,OACA,OACA,QACA,QACA,OACA,QACA,SACA,QACA,QACA,OACA,OACA,SACA,QACA,MACA,QACA,QACA,OACA,SACA,QACA,UACA,SACA,UACA,SACA,SACA,UACA,SACA,UACA,SACA,SACA,SACA,SACA,UACA,SACA,QACA,UACA,SACA,OACA,SACA,WACA,SACA,SACA,SACA,QACA,OACA,SACA,SACA,SACA,UACA,SACA,UACA,SACA,WACA,SACA,WACA,WACA,SACA,SACA,UACA,SACA,UACA,SACA,SACA,SACA,SACA,MACA,SACA,OACA,OACA,OACA,QACA,QACA,QACA,QACA,OACA,OACA,SACA,OACA,SACA,QACA,QACA,OACA,QACA,QACA,SACA,SACA,UACA,OACA,SACA,OACA,OACA,SACA,QACA,QACA,QACA,QACA,SACA,OACA,MACA,OACA,MACA,SACA,QACA,MACA,SACA,UACA,OACA,OACA,QACA,SACA,QACA,OACA,SACA,OACA,SACA,OACA,UACA,UACA,QACA,UACA,OACA,MACA,QACA,OACA,QACA,UACA,QACA,SACA,SACA,UACA,WACA,WACA,QACA,QACA,SACA,SACA,QACA,MACA,SACA,SACA,OACA,SACA,SACA,UACA,WACA,OACA,OACA,UACA,SACA,OACA,UACA,SACA,QACA,WACA,SACA,UACA,UACA,SACA,QACA,QACA,SACA,QACA,UACA,QACA,OACA,QACA,UACA,SACA,QACA,QACA,OACA,SACA,QACA,OACA,QACA,OACA,QACA,WACA,QACA,SACA,QACA,UACA,MACA,UACA,OACA,OACA,QACA,QACA,OACA,SACA,OACA,QACA,SACA,UACA,SACA,QACA,OACA,QACA,SACA,UACA,MACA,OACA,QACA,SACA,MACA,QACA,OACA,QACA,QACA,OACA,OACA,QACA,UACA,QACA,QACA,SACA,OACA,SACA,OACA,OACA,QACA,QACA,QACA,QACA,QACA,SACA,QACA,QACA,OACA,QACA,OACA,OACA,SACA,SACA,OACA,OACA,OACA,QACA,UACA,QACA,WACA,QACA,UACA,OACA,OACA,QACA,OACA,OACA,QACA,OACA,SACA,QACA,QACA,QACA,UACA,QACA,QACA,UACA,QACA,QACA,QACA,SACA,QACA,SACA,QACA,OACA,SACA,QACA,QACA,UACA,QACA,QACA,OACA,QACA,SACA,SACA,MACA,SACA,UACA,WACA,SACA,UACA,QACA,QACA,SACA,QACA,QACA,QACA,QACA,OACA,QACA,QACA,OACA,OACA,SACA,QACA,QACA,QACA,QACA,UACA,QACA,QACA,QACA,QACA,WACA,SACA,SACA,SACA,WACA,UACA,QACA,UACA,QACA,UACA,SACA,SACA,UACA,OACA,SACA,SACA,QACA,UACA,OACA,SACA,MACA,QACA,SACA,QACA,SACA,UACA,OACA,UACA,QACA,WACA,WACA,SACA,UACA,UACA,UACA,QACA,OACA,QACA,QACA,QACA,QACA,OACA,QACA,SACA,QACA,SACA,UACA,QACA,SACA,QACA,SACA,MACA,OACA,SACA,OACA,OACA,OACA,SACA,OACA,QACA,SACA,OACA,QACA,OACA,OACA,MACA,SACA,SACA,OACA,OACA,OACA,OACA,QACA,OACA,QACA,OACA,SACA,QACA,OACA,QACA,OACA,UACA,QACA,SACA,QACA,QACA,UACA,SACA,OACA,QACA,OACA,SACA,OACA,OACA,MACA,QACA,SACA,QACA,QACA,UACA,QACA,UACA,MACA,WACA,SACA,QACA,SACA,WACA,OACA,SACA,UACA,OACA,QACA,MACA,QACA,SACA,QACA,UACA,WACA,OACA,QACA,UACA,SACA,QACA,OACA,MACA,QACA,QACA,UACA,SACA,QACA,WACA,OACA,QACA,SACA,OACA,QACA,OACA,QACA,QACA,QACA,QACA,UACA,OACA,OACA,SACA,UACA,QACA,OACA,QACA,UACA,QACA,QACA,MACA,OACA,UACA,SACA,OACA,SACA,SACA,OACA,SACA,SACA,SACA,QACA,OACA,QACA,MACA,OACA,UACA,OACA,WACA,SACA,UACA,QACA,UACA,QACA,OACA,SACA,SACA,UACA,UACA,SACA,OACA,WACA,UACA,SACA,QACA,UACA,SACA,SACA,UACA,SACA,OACA,QACA,QACA,QACA,OACA,QACA,MACA,OACA,SACA,UACA,QACA,UACA,SACA,SACA,QACA,QACA,SACA,QACA,MACA,SACA,QACA,UACA,OACA,QACA,UACA,SACA,SACA,UACA,QACA,OACA,SACA,UACA,OACA,SACA,UACA,SACA,UACA,UACA,UACA,QACA,OACA,UACA,UACA,SACA,UACA,QACA,OACA,QACA,SACA,QACA,QACA,QACA,QACA,OACA,UACA,SACA,OACA,SACA,OACA,QACA,OACA,OACA,OACA,SACA,OACA,UACA,OACA,UACA,OACA,OACA,QACA,QACA,OACA,MACA,SACA,SACA,OACA,SACA,UACA,MACA,UACA,UACA,QACA,UACA,OACA,MACA,QACA,OACA,QACA,QACA,OACA,QACA,OACA,UACA,OACA,QACA,OACA,OACA,OACA,MACA,SACA,OACA,OACA,OACA,SACA,SACA,OACA,SACA,OACA,OACA,UACA,OACA,QACA,SACA,OACA,OACA,OACA,OACA,QACA,QACA,QACA,OACA,QACA,UACA,QACA,QACA,QACA,OACA,OACA,SACA,MACA,QACA,QACA,QACA,OACA,OACA,MACA,CC7/DO,+BAGP,eACA,SACA,IACA,IAiBA,OAFA,UAdA,YACA,QACA,QACA,KACA,eACA,OACA,MAEA,GAEA,GACA,UAKA,CACA,CACA,eACA,gBAA2B,EAAO,IAClC,CACA,eAIA,OADA,GADA,GADuB,EAAgB,IAGvC,IAQO,CAXgC,QAWhC,MAEP,iBACA,IADwB,EACxB,eAD8C,mBACM,GAGpD,SADA,KAF0E,CAAC,CAI3E,QACA,SAAc,aAAiB,EAAE,EAAa,EAiCvC,eACP,mBACA,gBAEA,eACA,GAAY,QAAO,WACnB,YAtFO,4DAwFP,oBAGA,EAxCA,YACA,SACA,IACA,IAiBA,OAFA,UAdA,YAGA,IAFA,QACA,MACA,MACA,cACA,MACA,IAEA,GAEA,GACA,UAKA,iBACA,EAiBA,SAA0C,GAAO,aASjD,CATiD,EASjD,eAGA,kBAFA,gBASA,GAFA,GAFA,2BAIA,EACA,QACA,gBACA,CAMO,eAEP,MAAiB,EADjB,OAGA,MAFqC,CAExB,KADS,EAAqB,aAC9B,eACb,CAMO,eAGP,UADA,UhFjGO,CgFiGsB,GAE7B,CAOO,eACP,YACA,CAMO,eACP,YACA,CChJO,SACP,eAGA,GAFA,8BACA,SAAmB,IAAM,YACzB,SARA,GAUA,YADA,GAAgC,qBAA0B,sDAAsD,CAAsC,CAGtJ,qBACA,CAEA,cANsJ,QAMtJ,CAIA,MAHA,CACA,0BAGA,CAEA,gCACA,oCAIA,aAHA,2BACA,MAAkB,IAAM,YACxB,mBACA,UACA,qBAAmC,IAAM,UAEzC,QACA,CACA,SACA,OAAe,EAAe,4BAC9B,CACA,CAMO,eACP,SACA,gBACA,MAAmB,GAAiC,GACpD,gBADoD,GAEpD,CACA,gBACA,aAEA,EAAgB,EADO,IAAM,MAAM,EAAkB,WAErD,OAAW,IAAM,QACjB,CAOO,iBACP,YACA,KACA,gBACA,MAAm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YACA,gBACA,gBACA,CAEA,uBACA,OACA,YACA,EAUA,OATA,WACA,kBAEA,SACA,eAEA,WACA,mBAEA,CACA,CAEA,gCACA,wBAGA,OAFA,YACA,cACA,CACA,CAKA,UACA,uBACA,SAEA,IACA,cACA,CACA,SACA,QACA,CACA,MAA2B,EAAkB,4BAC7C,oBAIA,SACmB,EAAW,cAEf,GAAc,eALV,EADM,EAAgB,GACN,EAMnC,CAKA,GAZyC,MAYzC,CAGA,OAAe,EAAqB,eADf,EADM,EAAkB,OACR,CADQ,eAG7C,CAMA,UACA,WACA,iCAEA,CACA,uBACA,GAAoB,EAAqB,aACzC,CAAa,CACb,YACA,YACA,gBACA,QACA,EACA,6CACA,wBACA,CACA,CAKA,oBACA,sBACA,mCAEA,6CACA,wBACA,CACA,eAGA,OADoB,EADO,EAAkB,qBAChB,EAE7B,CACA,wBACA,SACA,EAAqB,EAAyB,aAC9C,KAD8C,GAC9C,IAAwB,kBAAwB,KAChD,IAAoB,MAAK,YACzB,GAAgB,EAAgB,MAChC,IACA,KACA,CACA,CACA,UACA,kCAGA,OADA,oBACA,GAEA,SACA,OAAe,EAAe,4BAC9B,CACA,mBACA,MAA2B,EAAe,GAC1C,CAD0C,MAC1C,2BACA,CACA,CAIO,SAUP,iBACA,sBACA,kBACA,CAEA,uBACA,OACA,qCACA,EAIA,OAHA,aACA,uBAEA,CACA,CAEA,gCACA,kCAGA,OAFA,wCACA,kBACA,CACA,CAIA,SACA,OAAe,EAAe,4BAC9B,CAKA,mBACA,MAA2B,EAAe,GAC1C,CAD0C,MAC1C,2BACA,CAQA,cACA,uCACA,CAKA,SACA,qBACA,wBAAgC,EAAqB,aACrD,CAUA,UACA,iCACA,2FAEA,kBACA,gBACA,4DAEA,OAAmB,EAAqB,YACxC,QACA,eAMmB,EAAsB,EALzC,CACA,QAIwC,IAJxC,GAImE,EAJnE,QACA,6BACA,sCACA,IAGA,mBACA,CAYA,kBACA,mBACA,CAQA,oBACA,6BACA,CASA,QACA,kBACA,YAAsB,EAAyB,aAE/C,CA0BO,IA5BwC,KA4BxC,QACP,MACA,EA0BA,OAzBA,iBACA,SACA,EAAsB,EAAqB,wBAS3C,EANA,MACA,IAKA,iBAEA,OAM0B,EAL1B,CACA,eAIoD,CAJpD,CACA,qBACA,8BACA,GAI0B,EAAqB,uBAlD/C,gBACA,gBACA,gGAEA,OACA,8BACA,4BACA,EAIA,OAHS,EAAe,qBACxB,QAAyB,IAAM,UAE/B,CACA,yBACA,KAAc,EAAe,EAC7B,CACA,CAF6B,CAwC7B,MACA,CAWO,iBAEP,UADoB,GAAiC,GACrD,EACA,CAKO,eACP,qBACA,CACA,OAAiC,IAAM,kBAOhC,mBACP,MAAkB,EAAmB,EAAqB,QAAtB,GAAsB,KAE1D,OAAW,EADY,IAAM,MAAM,EAAkB,OACjC,EACpB,CAFqD,SAU9C,YACP,MAAkB,EAAmB,EAAqB,QAAtB,GAAsB,KAE1D,OAAW,EADY,IACD,CADO,KAAM,EAAkB,OAC/B,GAD+B,CAErD,CAOO,mBAGP,cAFA,UACA,UAEA,CC3ZA,UAGA,MAEA,oEACA,UACA,sBACA,QACA,OACA,CAAE,CCVK,UACP,aAAkB,uCAAoC,EAKtD,GAJA,eACA,eACA,aACA,gBACA,iBACA,gDAAgE,aAAa,GAC7E,0BACA,4EACA,4BAA6C,WAC7C,MDEO,SAAS,CAAM,EAEtB,OAFsB,CAEtB,CAEA,IACA,IAEA,YAAiB,WAAmB,MACpC,eAEA,cACA,4CAGA,WAKA,GAHA,MACA,QAEA,EACA,SACI,CACJ,UACA,OAEA,EACA,6BAEA,UAIA,KACA,CACA,CAEA,QACA,ECvCsC,GACtC,cACA,YAES,CACT,kBACA,iBACA,QACA,2BAGA,YACA,OAEA,oBACA,sBACA,yBACA,kBAEA,CACA,gBACA,uBACA,CACA,iBACA,wBAEA,CEhCA,eAKA,OAHA,6BAAoC,IAAM,wDAE1C,gCAAuC,IAAM,2DAC7C,CACA,CAUO,0BAA8B,+DAAiE,EACtG,SACA,KACA,KACA,KACA,KACA,eACA,aAA2B,EAAe,OAC1C,MAD0C,CACnB,EAAa,uBACpC,mBACA,mCAA2D,EAAa,eACxE,uBACA,gCACA,sCAAiE,EAAqB,MAEtF,aAFsF,SAEtF,EACA,kCAEA,4CACA,WAAkC,GAAW,CAC7C,GAtCA,IAqC6C,OAE7C,WAAgC,GAAiB,CACjD,QAAiC,EAAa,GADG,EACH,iBAC9C,yCACA,wCACA,qBAA8C,GAAsB,CACpE,kBADoE,QACpE,CACA,qCACA,CAAyB,EACzB,sBAA+C,GAAsB,CACrE,kBADqE,SACrE,CACA,uCACyB,CACzB,CAAqB,CACrB,CAAiB,IAGjB,uBACA,OAA2B,EAAqB,uBAKhD,KACA,4BACA,SACA,gBACA,KACA,SACA,wBACA,CAAS,EAGT,sBAEA,SACA,4BACA,SACA,sBACA,KACA,SACA,YACA,UACA,wBACA,CAAS,EAET,sBACA,SACA,4BACA,SACA,sBACA,KACA,SACA,oBAEA,oDAEA,SACA,CAAS,GAGT,OADA,qBACA,IAAe,GAAa,CAC5B,SAD4B,CAC5B,MAAkC,uCAA2C,EAC7E,WACA,OACA,kBACA,QACA,kBACA,SACA,CAAK,CACL,CACA,SACA,eACA,YACA,cACA,YACA,iBACA,mBACA,iBAEA,kBACA,cACA,KAAwB,IAAM,2CAA4C,EAE1E,oBACA,CACA,CACA,SACA,eACA,cACA,YACA,UACA,gBACA,cACA,uCACA,iBACA,aACA,uBACA,oCACA,CACA,CACA,SACA,eAEA,GADA,cACA,QACA,MACA,+BACA,CACA,CACA,wBACA,gBACA,GAAkB,aAA4B,KAE9C,CACA,CAqCA,SACA,eACA,oBACA,wBACA,oBACA,oBACA,YACA,yBACA,4BACA,aACA,yBACA,0BACA,8BACA,gBACA,oBACA,eACA,eACA,OACA,qBACA,wBACA,OACA,CACA,iDACA,+BACA,4CACA,mCACA,mCACA,iBACA,8CACA,oDACA,iBACA,8CACA,+CACA,CACA,kBACA,sCACA,uCACA,CACA,mBACA,uCACA,wCACA,CACA,oBACA,uBAvOA,GAyOA,6CACA,YAA0B,iBAAwB,KAClD,SAAoB,kCAAkC,WACtD,kBACA,qCACA,qBACA,GACA,oBAAiE,GAAO,IACxE,QACA,2BACA,2BACA,QACA,YA7FA,KACA,gBACA,SACA,WACA,YAAsB,WAA0B,KAChD,eACA,IACA,QACA,CACA,6CACA,KAEA,CACA,WACA,SACA,kBACA,iBACA,GAAkB,GAAe,MAAM,IAAM,wCAAkD,EAE/F,GAAc,GAAe,IAAI,kBAA2B,GA0E5D,QACA,YAzEA,KACA,sBACA,UAAe,EACf,QACA,eACA,OACA,WAA4B,IAAM,wCAA0C,OAC5E,EACA,SAA0B,kBAAmB,UAE7C,QACA,CACA,CAAK,EACL,WAAoB,EACpB,EA2DA,wBACA,CACA,CAEA,uBACA,iCACA,YAA8B,WAAmB,IACjD,KACA,kCAEA,QACA,CAAS,6BACT,SAAkB,EAClB,SACA,iCACA,UACA,QACA,WAAwB;AAAA,EAExB,YACA,iDACA,SACA,QAMA,OALA,YACA,IACA,cA/QA,GAgRA,kBACA,GACA,8CACA,CACA,aACA,gCACA,kCACA,SACA,QAMA,OALA,YACA,IACA,cA3RA,GA4RA,kBACA,GACA,uDACA,CACA,CACO,SACP,eACA,cACA,wBACA,aACA,mBACA,2CACA,kCACA,CACA,CCvRO,2BAWP,WAAe,EAVf,CACA,OACA,CAQqC,EARrC,EACA,SACA,mBACA,OACA,kBACA,KAAc,EAAe,IAC7B,SACA,EAEA,CAEO,eACP,qFACA,CACO,sCACP,OACA,OACA,OACA,UACA,eACA,YACA,WACA,kBACA,kBACA,KAAc,EAAe,OAC7B,MAD6B,EAC7B,EACA,mBACA,eACA,EACA,WAAe,EAAsB,EACrC,CACO,MAF8B,GAE9B,MACP,yJACA,CA6BO,2CACP,OACA,OACA,OACA,kBACA,aACA,gBACA,qBACA,gBACA,YACA,WACA,oBACA,eACA,eACA,cACA,gBACA,KAAc,EAAe,KAC7B,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,qLACA,CAyBO,oCACP,MACA,aACA,YACA,YACA,YACA,wGAEA,OACA,OACA,kBACA,aACA,eACA,eACA,cACA,gBACA,KAAc,EAAe,KAC7B,OACA,CAF6B,OAE7B,CACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,sIACA,CAmBO,uBASP,WAAe,EARf,CACA,OACA,CAMqC,eANrC,EACA,aACA,KAAc,EAAe,KAC7B,OACA,CAF6B,OAE7B,CACA,EAEA,CAEO,eACP,iEACA,CAqBO,2BAWP,WAAe,EAVf,CACA,OACA,CAQqC,IARvB,EAAe,KAC7B,QAD6B,MAC7B,EACA,aACA,cACA,OACA,kBACA,SACA,EAEA,CAEO,eACP,8FACA,CA2BO,+BACP,OACA,KAAc,EAAe,MAC7B,OACA,KACA,SACA,kBACA,aACA,OACA,wBACA,mBACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,qHACA,CA+BO,iDACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,gBACA,eACA,qBACA,gBACA,sBACA,qBACA,kBACA,UACA,cACA,iBACA,mBACA,QACA,OACA,QACA,UACA,YACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,4PACA,CA0BO,uCACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,qBACA,cAAuB,EAAqB,oBAC5C,kBACA,UACA,cACA,iBACA,mBACA,QACA,OACA,QACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,mKACA,CAwBO,mCACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,cAAuB,EAAqB,oBAC5C,UACA,cACA,iBACA,mBACA,QACA,OACA,QACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,kIACA,CAwBO,mCACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,cAAuB,EAAqB,QAC5C,UACA,CAF4C,WAE5C,EACA,iBACA,mBACA,QACA,OACA,QACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,kIACA,CAwBO,mCACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,cAAuB,EAAqB,WAC5C,QAD4C,EAE5C,cACA,iBACA,mBACA,QACA,OACA,QACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,kIACA,CAwBO,mCACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,cAAuB,EAAqB,aAC5C,MAD4C,EAC5C,EACA,cACA,iBACA,mBACA,QACA,OACA,QACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,kIACA,CAwBO,mCACP,OACA,KAAc,EAAe,KAC7B,OACA,CAF6B,eAE7B,EACA,WACA,cAAuB,EAAqB,OAC5C,UACA,EAF4C,UAE5C,EACA,iBACA,mBACA,QACA,OACA,QACA,SACA,EACA,WAAe,EAAsB,EACrC,CAEO,MAH8B,GAG9B,MACP,kIACA,CAKO,eAuBP,WAAe,EAtBf,CACA,KAAc,EAAe,CAqBQ,GArBR,CAC7B,QAD6B,GAC7B,CACA,kCACA,oBACA,2BACA,4BACA,wCACA,8BACA,0CACA,qCACA,+BACA,kBACA,uBACA,6BACA,iCACA,cACA,YACA,cACA,kBACA,yBAGA,CC1nBO,eACP,cACA,SACA,eACA,2BAEA,yBACA,CACA,CAIO,eACP,cACA,SACA,gBACA,IAAoB,QAAO,GAA+B,QAC1D,SACA,CACA,QAH0D,OAG1D,UACA,CACA,CAMO,iBACP,cACA,SACA,gBACA,WACA,KACA,gBACA,SAAwB,GAAS,GAAuB,OACxD,SACA,CACA,GAHwD,KAGxD,GACA,OAA4B,GAAyB,IAGrD,YAEA,CACA,KANqD,EAMrD,kBACA,CACA,CAKO,cAEP,cACA,SACA,eACA,OAA0B,EAAiC,OAE3D,wBAF2D,CAG3D,CACA,CAMO,eACP,0BACA,2BACA,wBACA,4BC1DO,aACA,MACA,KACA,KACA,KACP,yCACA,sCACO,UAEP,eACA,oBAEA,cADA,gCAGA,oBACA,kBAEA,gBACA,8CAAkE,EAAI,GAItE,eADA,KACA,IACA,QACA,0CAA8D,GAAQ,GAItE,cADA,cACA,EACA,CACA,yBAGA,0BACA,IAFA,IAEA,EAFA,oCAGA,sCAA0D,EAAY,GAEtE,qBACA,QACA,sCAA0D,EAAS,GAEnE,gBACA,CACA,cACA,cAEA,2BACA,kBACA,gBACA,sCAA0D,EAAI,GAI9D,cAFA,kBACA,kBAEA,CACA,cACA,cAEA,iBACA,cAEA,gBACA,cAEA,iDACA,kDACA,KACA,YAA4B,WAAyB,KACrD,oBACA,SACA,CACA,gBACA,CACA,uCAAmD,GAAK,gBACxD,CACA,CACO,oBACP,eAEA,GADA,QACA,mBACA,8CAA8D,EAAK,EAEnE,eACA,CACA,WACA,aAAsB,aAAa,EAEnC,UACA,iDAEA,YACA,QACA,CACA,UACA,qBACA,CACA,UACA,0CACA,0CAA0D,aAAa,IAAI,EAAM,GAEjF,2CACA,eAA+B,GAAO,0DAA0D,aAAa,GAE7G,gDACA,eAA+B,GAAO,yDAEtC,OAAe,GAAa,iBAC5B,CACA,UACA,6BACA,oDAAoE,aAAa,GAEjF,OAAe,GAAa,EAC5B,CACA,CACO,MAHqB,WAGrB,GACP,iBAEA,GADA,QACA,mBACA,gDAAgE,EAAK,GAErE,cACA,kDAAkE,EAAY,EAE9E,gBACA,gBACA,CACA,WACA,eAAwB,aAAa,GAAG,eAAe,EAEvD,UACA,wBACA,0BACA,4BACA,CACA,YACA,QACA,CACA,UACA,qBACA,CACA,UACA,0CACA,sCAAsD,gBAAgB,IAAI,EAAM,GAEhF,2CACA,eAA+B,GAAO,sDAAsD,gBAAgB,GAE5G,gDACA,eAA+B,GAAO,yDAEtC,OAAe,GAAa,iBAC5B,CACA,UACA,6BACA,gDAAgE,gBAAgB,GAEhF,OAAe,GAAa,EAC5B,CACA,CACO,MAHqB,WAGrB,GACP,WACA,eACA,CACA,UACA,sBACA,CACA,YACA,QACA,CACA,UACA,SACA,CACA,UACA,kDACA,sCAAsD,gBAAgB,IAAI,EAAM,GAEhF,sBAEA,OADmC,EAAa,GAChD,QADgD,CAChD,CAGA,qBACA,gEAEA,QACA,CACA,UACA,qBACA,gEAEA,OAAe,EAAa,EAC5B,CACA,CACO,OAHqB,UAGrB,GACP,WACA,YACA,CACA,UACA,sBACA,CACA,YACA,QACA,CACA,UACA,SACA,CACA,UACA,uBACA,4CAA4D,EAAM,cAGlE,WADA,EACA,MAEA,IACA,CACA,UACA,oBACA,+CAEA,WACA,WACA,SAEA,SACA,QAEA,iEACA,CACA,CACO,oBACP,WACA,YACA,CACA,UACA,sBACA,CACA,YACA,QACA,CACA,UACA,SACA,CACA,UACA,0CACA,4CAA4D,EAAM,GAMlE,GAJA,oBAEA,cAEA,WACA,eAA+B,GAAO,gCAEtC,0BACA,CACA,UACA,oBACA,+CAEA,YAEA,CACO,oBACP,WACA,cACA,CACA,UACA,sBACA,CACA,YACA,QACA,CACA,UACA,eAA2B,iBAAiB,mBAC5C,CACA,UACA,kDACA,8CAA8D,EAAM,GAEpE,MAA6B,IAAM,SACnC,EAA8B,GAAa,aAC3C,8BAGA,OAFA,SACA,YACA,CACA,CACA,UACA,eACA,wEAAwF,SAAkB,0BAA0B,GAAwB,GAG5J,QADoB,EAAM,SAC1B,iBACA,uBACA,gBACA,sFAAsG,EAAW,QAAQ,SAAiB,GAE1I,OAAe,IAAM,0BACrB,CACA,CACO,oBACP,iBAEA,GADA,QACA,IACA,6DAA6E,EAAY,EAEzF,kBACA,mBACA,CACA,WACA,SAAkB,0BAA0B,GAAG,kBAAkB,GAEjE,UACA,wBACA,oCACA,kCACA,CACA,YACA,iCACA,CACA,iBACA,gCACA,+BAEA,0CACA,CACA,UACA,iDACA,sCAAsD,gBAAgB,IAAI,EAAM,GAEhF,gCACA,wEAAwF,kBAAkB,QAAQ,SAAa,GAG/H,OADA,sBACA,SACA,CACA,UAEA,OADA,sBACA,SACA,CACA,iBACA,4DACA,CACA,CACO,oBACP,eACA,QACA,gBACA,CACA,WACA,SAAkB,0BAA0B,IAE5C,UACA,wBACA,kCACA,CACA,YACA,QACA,CACA,UACA,eAA2B,iBAAiB,mBAC5C,CACA,UACA,iDACA,sCAAsD,gBAAgB,IAAI,EAAM,GAEhF,oCACA,cAGA,OAD4B,EADE,GAAa,OACH,GADG,cACH,EAExC,CACA,UAEA,MADoB,IAAM,SAC1B,iBAEA,OADA,uBACA,4BACA,CACA,kBACA,4CACA,CACA,CACO,oBACP,eAEA,GADA,QACA,aACA,4EAEA,kBACA,CACA,WACA,SACA,YAAwB,yBAA4B,IACpD,mCAEA,UAAmB,YAAsB,GAEzC,UACA,wBACA,8CACA,uDACA,CACA,YAEA,4BADA,iBAEA,CACA,UACA,QACA,YAAwB,yBAA4B,IACpD,wCACA,8BACA,MACA,KACA,sBACA,MAGA,GADA,6BAIA,QACA,CACA,UACA,iDACA,sCAAsD,gBAAgB,IAAI,EAAM,GAEhF,oBACA,eACA,gEAEA,sBACA,KACA,KACA,UACA,IACA,kBACA,WACA,iBAEA,mBACA,8BACA,2BAEA,CACA,uBACA,iBACA,YAEA,UACA,8EAEA,gBACA,eA0KA,GACA,QACA,cACA,uEAEA,YAAoB,WAAsB,KAC1C,WACA,uBACA,mEAEA,GACA,WAEA,CACA,QACA,EAzLA,kBACA,OAA+B,GAAa,MAC5C,IAD4C,KAG5C,CACA,qBACA,SACA,CACA,YACA,sBACA,CACA,IACA,CAEA,QACA,eACA,YAGA,QACA,YAAwB,WAAkB,KAC1C,aACA,UACA,QACA,8BAAsD,GAAW,4BAEjE,MAA2B,GAAa,KACxC,CACA,IAFwC,CAExC,UAEA,OAAe,KAAY,OAC3B,CACA,UACA,sBACA,KACA,KACA,IACA,IACA,EAAoB,IAAM,SAC1B,kBACA,WACA,kBACA,8BACA,GACA,gEAEA,yBACA,gBACA,sBAEA,sBACA,sFAIA,OACA,OACA,QACA,EACA,UACA,aACA,KACA,MAGA,uBACA,+BACA,0BACA,UACA,uDAEA,gBAEA,YAA4C,KAAoB,KAChE,YACA,YACA,8BAGA,2BAEA,CACA,KACA,IACA,KACA,CACA,kBACA,uBACA,IACA,CAEA,+BACA,+CAEA,IACA,CAKA,GAJA,aACA,6BACA,YAEA,WACA,6CAIA,YAAwB,WAA4B,KACpD,WACA,kBACA,yEAEA,mBACA,sBACA,oDAEA,CAEA,QACA,YAAwB,WAAuB,IAC/C,mBACA,mCACA,MAIA,SACA,YAAwB,WAAuB,KAC/C,wBACA,SACA,CACA,QACA,CACA,4BACA,gBACA,SAEA,sCACA,wDAEA,oBACA,+DAEA,SACA,IACA,KACA,eACA,KACA,QACA,KAEA,QACA,KAEA,SAEA,QACA,8BACA,MAOA,GAHA,cACA,UAEA,MACA,uDAEA,QACA,CACA,CAoBA,mBACA,QACA,QACA,YACA,0BACA,yBACA,UAEA,eACA,UAGA,UAGA,CACA,KACA,KACA,CACA,CACA,QACA,CCxoBO,eACP,kBACA,WACA,cACA,YACA,aACA,YACA,WAEO,wBACP,WAGA,wCACA,CC9BO,eACP,sBACA,mBACA,WACA,EDlBA,YAIA,YAIA,YAIA,kBAIA,cAIA,gBAIA,cAIA,aACA,CAAC,SAAgD,GC7BjD,YAIA,oBAIA,4BAIA,eACA,CAAC,UAA4C,CCuBtC,UACP,eACA,4BACA,4BACA,uBACA,2CAEA,kBACA,wBACA,uBAAuC,qBAAkB,GACzD,GAAoC,IAAU,GAAkB,GAChE,CACA,MAFoC,CAGpC,IAHgE,CAGhE,EACA,aACA,EAEA,CACA,KAAsB,GAAO,QAC7B,OACA,aACA,GAEA,cACA,6BACA,eACkB,GAAO,qBACzB,0BACA,EACA,qBACA,yBAEA,eACA,oDACA,+BACA,SAAkB,UAAU,GAAG,EAAK,GAAG,EAAQ,CAC/C,CACA,cAEA,sBADqB,EAAW,qBAChC,WACA,CACA,WACA,QACA,uBACA,yBAAgD,GAAoB,SACpE,OAGA,CAJoE,MAIpE,CACA,CACA,SACA,OACA,eACA,sBACA,0BAAmC,uBAAyB,KAC5D,kBACA,OACA,MACA,EAAa,EACb,SACA,kCACA,8BACa,CACb,mBACA,uBAEA,CACA,wBACA,SAAgB,oBArGhB,YACA,qBACA,UACA,yCAAqD,EAAU,GAE/D,SACA,IACA,YAA4B,WAAsB,KAClD,WACA,WACA,UAEA,YACA,SAEA,MAGA,MADA,OACA,CACA,IACA,KACA,CACA,CACA,CACA,UACA,yCAAqD,EAAU,GAE/D,OACA,kBACA,KAAc,GAAY,kCAC1B,oBACA,CACA,EAqEsC,GACtC,eACA,OACA,gBAAuC,QAAW,EAClD,SAAuB,OAAe,CAC7B,CACT,CACA,CACO,iBACP,aACA,mBACA,6BACA,qEACA,8BACA,cACA,qBAAiC,UAAwB,6BAA6B,EACtF,yBACA,UAAuB,GACvB,gBACA,6CAAyD,EAAK,GAC9D,YC5HO,SACP,eACA,4BACA,2BACA,wCACA,6CAEA,kBACA,wBACA,0BAA4C,eAAqB,GACjE,kCAA0D,GAAS,IACnE,EADmE,EACnE,iBAEA,SACA,OACA,eACA,sBACA,uBACA,wCACA,mBAEA,CACA,mBACA,OAAe,GAAe,eAC9B,CACA,CCzBO,SACP,eACA,sDACA,8CAEA,kBACA,wBACA,kCAA0D,GAAS,GACnE,CACA,EAFmE,MAEnE,CACA,OACA,eACA,sBACA,uCACA,CACA,CACA,mBACA,OAAe,GAAe,eAC9B,CACA,CETA,OAAsB,IAAM,uBA6B5B,mBACA,kBACA,SAEA,iBACA,YAAoB,WAAkB,IACtC,YACA,WAIA,OADA,UACA,YACA,EArCA,YAEA,2BAEA,qBAEA,uBAEA,6BAEA,4BACA,CAAC,WA4BM,UACP,cACA,uBACA,qBACA,yBACA,mBACA,cAKA,YACA,mBAKA,QACA,gCAMA,QACA,aAWA,OAVA,2CAAyD,WAAa,KAEtE,IAAiB,EAAW,uBAC5B,4BAEA,UACA,CAAa,EACb,QACA,EAAS,EACT,wCACA,CACA,CAOA,kBACA,4BACA,4EAEA,gDACA,yFAAyG,kBAAyC,GAElJ,2CACA,8DAEA,yBACA,CAQA,qBAAoB,oRAAsQ,EAC1R,4BACA,4EAEA,yCACA,kBACA,uFAAuG,kBAAyC,GAEhJ,SACA,aACA,SACA,SACA,SACA,SACA,QACA,gMACA,MAEA,OAAgC,EAAqB,qBACrD,oBACA,gJAEA,YACA,SACA,SACA,SACA,QACA,qLAEA,MACA,YACA,SACA,SACA,SACA,SACA,SACA,QACA,qNAMA,GAJA,SAEA,OAEA,yBACA,8DAA8E,cAAmB,QAAQ,SAAkB,GAE3H,SACA,KACA,KACA,KACA,KACA,UAGA,YAAwB,WAAuB,KAC/C,qBACA,OACA,GAAgB,GAAoB,IACpC,IAAqB,GAAuB,IAC5C,CAAqB,CAFe,EAEQ,SAC5C,GAF4C,GAE5C,KAD4C,CAC5C,YAAgD,GAAS,8CAA8C,EAAE,GAEzG,2CACA,8DAEA,UACA,QACA,CACA,GAAgB,GAAuB,GACvC,iBADuC,iDACvC,EAAwF,EAAE,GAS1F,GAPgB,GAAkB,KAClC,UADkC,IAClC,WACA,UACA,UAEA,MAA8B,GAAW,IAEzC,IAFyC,MAEzC,SACA,iCAAqD,EAAQ,GAE7D,UACA,SACA,CACA,SACA,uBACA,uBACA,uBACA,YAAwB,WAAwB,KAChD,WACA,OACA,IACA,UACA,KAAqB,EAAgB,SACrC,KADqC,CACrC,IAA4C,GAE5C,KADA,MAD0D,EAC1D,cACA,KACA,KACA,CACA,KAAqB,EAAgB,aACrC,CADqC,GACrC,MAA2C,GAAW,IACtD,IADsD,MACtD,cACA,6BACA,gEAA4F,EAAS,GAErG,oBACA,KACA,CACA,KAAqB,EAAgB,OACrC,OADqC,GACM,GAAW,IACtD,wBACA,6BACA,0DAAsF,EAAW,GAEjG,kBACA,KACA,CACA,QACA,uCAA+D,EAAQ,EACvE,CACA,SACA,CACA,YAAwB,WAA+B,IAEvD,EADA,SACA,MAEA,gBACA,kBACA,cACA,gBACA,gBACA,WAAmC,GAAY,IAC/C,KAD+C,CAC/C,GACA,CACA,wBACA,YAAwB,WAA0B,IAClD,0BAEA,OACA,IAAiB,GAAgC,CACjD,OACA,WACA,UAHiD,SAIjD,EACA,cACA,gBACA,MA7FA,MA8FA,mBAAiD,EAAqB,SACtE,UADsE,MACtE,EACA,eACA,gBACA,sBACA,eACA,qBACA,aACA,QACA,OACA,UACA,iBACA,CAAa,EACb,QACA,EACA,+BACA,kDACA,CAMA,aACA,6BACA,gCACA,uDAEA,6BACgB,GAAa,iCAE7B,mBACA,CACA,yBAYA,yBACA,yBACA,uBAGA,wBACA,kBACA,UACA,YAAwB,WAA4B,KACpD,WAAoB,GAAS,KAC7B,UACA,YAEA,gBACA,CACA,oBACA,4CACA,kBACA,YAAkC,WAAqC,KACvE,cACA,OACA,YAA4B,WAAoB,IAChD,aAGA,wBACA,uCAAuD,EAAW,GAElE,oBACA,IACA,OAAuB,GAAuB,aAC9C,CACA,SACA,yDAA6E,EAAM,IAAI,EAAI,EAC3F,CACA,CAAS,EAIT,OAHA,kBACA,aACA,qBACA,CACA,CAcA,gBACA,2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A,MACA,EACA,EACA,EAEA,EADA,IAEA,OACA,8CAkBA,OAdA,uBACA,6BACA,gBAMA,sBACA,kBAKA,UACA,aACA,KACA,SAEA,WAGA,cAIA,mCAEA,eACA,WACA,aAMA,gBAKA,cAKA,MACA,aAUA,GALA,KACA,KAIA,uDAMA,QADA,WAC4B,IAAY,KACxC,oBAYA,OANA,eACA,KACA,EACA,mCACA,oBACA,IACA,CACA,CAIA,yBAEA,QADA,WAC4B,IAAY,KACxC,uBAEA,KADA,OACA,KAEA,iCAQA,mCACA,aACA,GACA,2BAEA,CAAiB,EAYjB,OANA,eACA,GAAqB,EACrB,EACA,EAAoB,+BAAwD,EAC5E,EAAoB,gBAA0B,EAC9C,IACA,CACA,CACA,EA4CA,IAA4B,KAAU,CACtC,EAEA,CAAC,wBC/XD,cASA,WACA,aAEA,8BAEA,0BACA,aACA,wBACA,OAEA,+BACA,2CAAqD,GAAwB,EAAO,EAAxB,GAAwB,KAAa,EAAO,cAExG,EAAW,GAAM,CACb,GACJ,SAEA,iCAA+D,EAAb,OAAa,GACnB,IAAhC,EAA0C,CACtD,EADwC,CACxC,6DACA,+BACA,kCACA,cACA,GACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,0CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,0CACA,4CACA,4CACA,4CACA,4CACA,4CACA,CAEA,yCAEA,KAEA,0CACA,2BACA,0DACA,GAGA,+DACA,gCACA,sEACA,GAGA,oBACA,mBACA,iCACA,CACA,EAEA,cACA,gBACA,qBACA,eACA,EACA,qBACA,2BACA,EACA,YAAoB,WAAyB,KAC7C,UACA,YACA,CACA,QACA,EAEA,gBACA,qBACA,mCACA,CACA,EAEA,cACA,gBACA,sBACA,iBACA,EACA,uBACA,4BACA,EACA,YAAoB,WAAyB,KAC7C,WACA,WACA,CACA,QACA,EAEA,gBACA,GACA,yBACA,oBACA,uBACA,wBACA,wBACA,wBACA,wBACA,0BACA,eAEA,kFAGA,QACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,qBACM,QACN,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,mBACA,qBACM,QACN,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,mBACA,oBACA,oBACA,mBACA,oBACA,oBACA,oBACA,sBAEA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,qBAEA,YAEA,+CACA,6BACA,CAqlBA,kBACA,iBACA,iBACA,iBACA,YACA,eACU,kCACV,yBACU,sBACV,6BACA,cAGA,EAAQ,IACR,eAEA,IACA,CACA,eACA,OAEA,QADA,sBACA,IAAsB,IAAY,IAClC,oBACA,IACA,UACU,OACV,iBAEU,kBACV,kBAIA,8CACA,iBACA,qBACA,oBACA,iBAGA,GACA,CAEA,cACA,kCAIA,QADA,UACA,IAAoB,MAAS,KAC7B,aACA,WACA,SACA,CAEA,iBAEA,eACA,eACA,cACA,mBACA,CA/oBA,+BACA,kBACA,YApNA,2BAsNA,iBACA,iBACA,iBACA,YACA,eACU,kCACV,yBACU,sBACV,6BACA,cAGA,EAAQ,IACR,eAEA,IACA,CAGA,IAFA,qCAEA,MAcA,GAbA,cACA,eACA,gBACA,oBACA,oBACA,uBACA,wBACA,wBACA,wBACA,wBACA,2BAGA,EACA,iBAA6B,WAA2B,IACxD,6BAGA,iBAA6B,WAA2B,IAExD,CADA,mBACA,IACA,sBACY,OACZ,+BAEY,kBACZ,gCAIA,8CACA,+BACA,mCACA,kCACA,8BAKA,sBACA,yBACA,QACA,iBACA,iBACA,YACA,gBAEA,YAEA,CAKA,OAJA,wBACA,uCACA,mCAEA,MAGA,gCACA,oBAGA,kBACA,uCACA,iBACA,gBACA,iBACA,SACA,aACA,YAEA,gBACA,oBACA,oBACA,uBACA,wBACA,wBACA,wBACA,wBACA,2BAEA,qCACA,oBACA,YACA,EAEA,4BACA,IAIA,kBACA,gBACA,gBANA,4CACA,4CACA,4CACA,4CACA,cAIA,SAAiB,MAAS,KAG1B,GAFA,cAEA,EADA,aACA,wBACA,4CAIA,GAFA,aAEA,GADA,YACA,wBACA,6CAEA,UACA,UACA,UAGA,SAFA,WAEA,gCAEA,2CADA,mDACA,IACA,+CAEA,mBACA,qBAGA,yEAGA,QAFA,MACA,MACgB,MAAS,KACzB,4CACA,4CAEA,8CACA,8CAEA,MACA,MACA,UACA,UAEA,YACA,aAEA,OACA,SACA,OAGA,SAFA,UAEA,2CAEA,uDADA,4DACA,IAGA,EAFA,4DAEA,WACA,gBAEA,sBAEA,uBADA,iCACA,IAGA,EAFA,gCAEA,WACA,gBAEA,sBAEA,wBADA,gCACA,IAGA,IAFA,+BAEA,WACA,iBAEA,sBAEA,uBADA,iCACA,IAMA,GAHA,GAFA,gCAEA,cAGA,GAFA,mBAEA,+BACA,4CAEA,oDACA,oDAEA,MACA,MACA,UACA,UAEA,aACA,cAEA,SACA,SACA,SAGA,SAFA,UAEA,2CAEA,sDADA,6DACA,IAGA,GAFA,2DAEA,WACA,gBAEA,sBAEA,wBADA,gCACA,IAGA,GAFA,+BAEA,WACA,gBAEA,sBAEA,uBADA,iCACA,IAGA,GAFA,gCAEA,WACA,iBAEA,sBAEA,uBADA,iCACA,IAMA,GAHA,GAFA,gCAEA,cAGA,IAFA,kBAEA,+BACA,4CAEA,oDACA,oDAEA,MACA,MACA,UACA,UAEA,cACA,cAEA,SACA,SACA,SAGA,SAFA,UAEA,2CAEA,sDADA,4DACA,IAGA,EAFA,2DAEA,WACA,gBAEA,sBAEA,uBADA,iCACA,IAGA,EAFA,gCAEA,WACA,gBAEA,sBAEA,uBADA,iCACA,IAGA,GAFA,+BAEA,WACA,iBAEA,sBAEA,wBADA,gCACA,IAMA,IAHA,GAFA,+BAEA,cAGA,GAFA,mBAEA,+BACA,4CAEA,iDACA,iDAEA,MACA,MACA,UACA,UAEA,aACA,eAEA,SACA,SACA,SAGA,SAFA,UAEA,0CAEA,qDADA,4DACA,IAGA,GAFA,0DAEA,WACA,gBAEA,sBAEA,uBADA,iCACA,IAGA,EAFA,gCAEA,WACA,gBAEA,sBAEA,wBADA,gCACA,IAGA,EAFA,gCAEA,WACA,gBAEA,sBAEA,uBADA,iCACA,IAGA,GAFA,+BAEA,WACA,gBAGA,sBAEA,wBADA,gCACA,IACA,6BAEA,uBACA,uBAEA,sBAEA,uBADA,iCACA,IACA,6BAEA,uBACA,uBAEA,sBAEA,uBADA,iCACA,IACA,6BAEA,uBACA,uBAEA,sBAEA,uBADA,iCACA,IACA,6BAEA,uBACA,uBAEA,sBAEA,wBADA,gCACA,IACA,6BAEA,uBACA,uBAEA,uBAEA,uBADA,kCACA,IACA,6BAEA,uBACA,uBAEA,uBAEA,wBADA,kCACA,IACA,8BAEA,uBACA,uBAEA,uBAEA,wBADA,kCACA,IACA,8BAEA,uBACA,sBACA,EAEA,2BACA,gBAEA,gDACA,4CACA,4CACA,4CACA,YAEA,0BACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBA2CA,OA1CA,QACA,4BACA,wBACA,uBACA,oBAEA,QACA,4BACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,oBAEA,QACA,4BACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,mBACA,wBACA,wBACA,uBACA,oBAEA,CACA,EAEA,qCAEA,8BACA,gBAEA,gDACA,4CACA,4CACA,4CACA,YAEA,GACA,mCACA,mCACA,mCACA,mCACA,mCACA,mCACA,mCACA,CAqBA,OAnBA,QACA,2CAEA,QACA,OACA,mCACA,mCACA,mCACA,oCAGA,QACA,OACA,mCACA,mCACA,mCACA,oCAGA,CACA,EAEA,qCAEA,mCACA,gBAEA,gBACA,uBACA,kBAwBA,OAvBA,wBACA,wBACA,wBACA,yBACA,yBACA,yBACA,yBAEA,QACA,yBAEA,SACA,yBACA,yBACA,yBACA,0BAEA,SACA,yBACA,yBACA,yBACA,0BAEA,CACA,EAEA,6BACA,0BAEA,OADA,eACA,CACA,EAEA,+BACA,WACA,gGACA,8DACA,CACA,QAAgB,WAAkB,IAClC,mBAEA,QAAgB,qBAAwB,IACxC,4BAiEA,kBAEA,gCAEA,GADA,gCACA,YACA,cACA,mBACA,yCACA,0BACA,eACA,+BACA,CACA,EAEA,6BACA,6BACA,eACA,mBACA,YAAoB,sBAAyB,IAC7C,6BAEA,QACA,EAEA,YACA,YACA,gBACA,oBACA,oBACA,qBACA,qBACA,yBACA,yBAEA,EACA,aAEA,kBACA,kBACA,0BACA,0BACA,GAGO,SAFD,IAAO,WACb,QACA,EAAO,+BAGP,CAHQ,0BC35BR,OAAC,YACD,aAkDA,MACA,+CACA,YACA,aAEA,uBACA,6DAMA,6DA2pFA,cACA,UACA,uBACA,CAIA,cAMA,IALA,QACA,IACA,WACA,UAEW,IAAM,EAGjB,IADA,MADA,aACA,OACa,IAAK,SAClB,IACA,CAGA,eAAuB,GAAyB,EAAzB,oBAEvB,wBACA,CAIA,gBACA,QACA,MACA,MACA,MACA,MACA,MACA,MAGA,sBAMA,GAJA,WACA,WAGA,uBAGA,iBAMA,GAJA,MACA,OAGA,4BAGA,wBAKA,QAHA,gCAGgB,IAAO,0CAGvB,wBACA,CAMA,oBACA,sBACA,YACA,sCACA,+CACA,uCAEA,CAIA,cACA,mBACA,aAlvFA,KAkvFA,cACA,CAGA,gBACA,gDACA,gBACA,CAGA,kBACA,QAGA,QAGA,YAAyB,IAAK,MAC9B,KAGA,EAAM,IAIN,GAHA,WAGA,OACA,aAA+B,IAAK,MACpC,IACA,EAAQ,SACR,gCAIA,QACA,CAOA,CADA,EA3wFA,cACA,IAklBA,EAoqBA,EACA,EACA,EACA,EACA,EA1vCA,MACA,eAAkC,yCAAuD,CACzF,WAUA,KAaA,IAMA,KAIA,KAMA,OAKA,MAGA,KAkBA,I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gCACA,MAEA,GADA,YACA,KACA,0BACA,QACA,CAAQ,eACR,OACA,KACQ,QACR,OACA,KACQ,QACR,MACA,KAEA,OAGA,YAAsB,IAAoB,IAE1C,CADA,WACA,aACA,OAEA,MACA,QAEA,oBACA,OAEA,WACA,OAGA,SACA,2BAEA,SACA,sCACA,uCAEA,CACA,QACA,EAEA,cACA,UACA,SACM,2BACN,yCAEA,qBAIA,QAHA,oCAGA,cAA8C,KAC9C,GADwD,CACxD,eACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,wBACA,6BACA,wBACA,6BACA,oBAhBA,IAoBA,MAkCA,OAjCA,OACA,mBACA,mBACA,yBACM,OACN,mBACA,mBACA,mBACA,mBACA,wBACA,8BACM,OACN,mBACA,mBACA,mBACA,mBACA,mBACA,wBACA,6BACA,yBACM,QACN,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,wBACA,6BACA,wBACA,8BAEA,CACA,EAEA,cAEA,QADA,0BACA,sBAAsD,KACtD,GADgE,CAChE,gBACA,oBACA,oBACA,oBACA,oBACA,YACA,mBACA,YACA,mBACA,mBACA,YACA,mBACA,QAdA,IAkBA,MAsCA,OArCA,MAEA,KADA,sBACA,GACA,WACA,SACM,OACN,oBACA,kBACA,YACA,mBACA,YACA,WACA,QACM,OACN,oBACA,oBACA,kBACA,YACA,mBACA,YACA,mBACA,WACA,OACM,QACN,oBACA,oBACA,oBACA,kBACA,YACA,mBACA,YACA,mBACA,mBACA,YACA,WACA,KAEA,CACA,EAEA,cACA,gBACA,EADA,UACA,mBACA,UACA,SAEA,GAIA,IAHA,UACA,UACA,UACA,IAAsB,SAAyB,IAC/C,oBACA,IACA,UACU,OACV,iBAEU,kBACV,kBAIA,8CACA,iBACA,qBACA,oBACA,iBAIA,MACA,OACA,IAEA,UACA,OAEA,OACA,KACA,OACA,OACA,OACA,OACA,YACA,mBACA,YACA,mBACA,mBACA,YACA,mBACA,SACQ,MACR,YACA,WACA,SACQ,OACR,OACA,YACA,mBACA,YACA,WACA,QACQ,OACR,OACA,OACA,YACA,mBACA,YACA,mBACA,WACA,QAEA,OACA,OACA,OACA,YACA,mBACA,YACA,mBACA,mBACA,YACA,WACA,IAEA,EAAM,SACN,QACA,EAEA,cAEA,QADA,0BACA,sBAAsD,KACtD,SACA,SACA,SACA,SACA,SACA,YACA,mBACA,YACA,mBACA,mBACA,YACA,mBACA,QAdA,IAkBA,MAsCA,OArCA,MAEA,KADA,WACA,GACA,WACA,SACM,OACN,SACA,OACA,YACA,mBACA,YACA,WACA,QACM,OACN,SACA,SACA,OACA,YACA,mBACA,YACA,mBACA,WACA,OACM,QACN,SACA,SACA,SACA,OACA,YACA,mBACA,YACA,mBACA,mBACA,YACA,WACA,KAEA,CACA,EAgBA,gBACA,MACA,eAEA,UACA,SACM,2BACN,yCAEA,yCACA,SACA,aAIA,sBAA8C,KAC9C,GADwD,CACxD,eACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,yCACA,2CACA,sCACA,2CACA,kCAIA,UAkCA,OAjCA,MAGA,wBAFA,sBAEA,EADA,uBACA,QACM,OACN,mBACA,mBACA,mBACA,mBACA,yCACA,4CACM,OACN,mBACA,mBACA,mBACA,mBACA,mBACA,yCACA,2CACA,uCACM,QACN,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,yCACA,2CACA,sCACA,4CAEA,CACA,EAEA,GACA,OApFA,cACA,+BAIA,CAHA,gCACA,sBAEA,GACA,KACM,EACN,KAEA,IAEA,EAyEA,QACA,CACA,aAEA,EACA,aAEA,WACA,GAGO,SAFD,IAAO,WACb,QACA,EAAO,+BAGP,CAHQ,AAGP","sources":["webpack://_N_E/./node_modules/json-bigint/lib/parse.js","webpack://_N_E/./node_modules/tweetnacl/nacl-fast.js","webpack://_N_E/./node_modules/algosdk/dist/esm/types/intDecoding.js","webpack://_N_E/./node_modules/algosdk/dist/esm/utils/utils.js","webpack://_N_E/./node_modules/algosdk/dist/esm/nacl/naclWrappers.js","webpack://_N_E/./node_modules/algosdk/dist/esm/encoding/uint64.js","webpack://_N_E/./node_modules/algosdk/dist/esm/encoding/address.js","webpack://_N_E/./node_modules/algosdk/dist/esm/encoding/encoding.js","webpack://_N_E/./node_modules/algosdk/dist/esm/boxStorage.js","webpack://_N_E/./node_modules/algosdk/dist/esm/types/transactions/base.js","webpack://_N_E/./node_modules/algosdk/dist/esm/transaction.js","webpack://_N_E/./node_modules/algosdk/dist/esm/bid.js","webpack://_N_E/./node_modules/algosdk/dist/esm/convert.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/urlTokenBaseHTTPClient.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/client.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/serviceClient.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/basemodel.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/models/types.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/jsonrequest.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/accountInformation.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/accountAssetInformation.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/accountApplicationInformation.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/block.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/compile.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/dryrun.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/genesis.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getAssetByID.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getApplicationByID.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getBlockHash.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getBlockTxids.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getApplicationBoxByName.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getApplicationBoxes.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/healthCheck.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/pendingTransactionInformation.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/pendingTransactions.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/pendingTransactionsByAddress.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getTransactionProof.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/sendRawTransaction.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/status.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/statusAfterBlock.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/suggestedParams.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/supply.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/versions.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/lightBlockHeaderProof.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/stateproof.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/setSyncRound.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getSyncRound.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/setBlockOffsetTimestamp.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getBlockOffsetTimestamp.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/disassemble.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/simulateTransaction.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/ready.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/unsetSyncRound.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getLedgerStateDeltaForTransactionGroup.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getLedgerStateDelta.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/getTransactionGroupLedgerStateDeltasForRound.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/algod/algod.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/kmd.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/makeHealthCheck.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAssetBalances.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAccountTransactions.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAssetTransactions.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupBlock.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupTransactionByID.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAccountByID.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAccountAssets.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAccountCreatedAssets.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAccountAppLocalStates.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAccountCreatedApplications.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupAssetByID.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupApplications.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupApplicationLogs.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/models/types.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/searchAccounts.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/searchForTransactions.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/searchForAssets.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/searchForApplications.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/searchForApplicationBoxes.js","webpack://_N_E/./node_modules/algosdk/dist/esm/client/v2/indexer/indexer.js","webpack://_N_E/./node_modules/algosdk/dist/esm/wait.js","webpack://_N_E/./node_modules/algosdk/dist/esm/encoding/bigint.js","webpack://_N_E/./node_modules/algosdk/dist/esm/account.js","webpack://_N_E/./node_modules/algosdk/dist/esm/mnemonic/wordlists/english.js","webpack://_N_E/./node_modules/algosdk/dist/esm/mnemonic/mnemonic.js","webpack://_N_E/./node_modules/algosdk/dist/esm/group.js","webpack://_N_E/./node_modules/algosdk/dist/esm/multisig.js","webpack://_N_E/./node_modules/algosdk/dist/esm/logicsig.js","webpack://_N_E/./node_modules/vlq/src/index.js","webpack://_N_E/./node_modules/algosdk/dist/esm/logic/sourcemap.js","webpack://_N_E/./node_modules/algosdk/dist/esm/types/transactions/index.js","webpack://_N_E/./node_modules/algosdk/dist/esm/dryrun.js","webpack://_N_E/./node_modules/algosdk/dist/esm/makeTxn.js","webpack://_N_E/./node_modules/algosdk/dist/esm/signer.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/abi_type.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/transaction.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/reference.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/method.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/contract.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/interface.js","webpack://_N_E/./node_modules/algosdk/dist/esm/abi/index.js","webpack://_N_E/./node_modules/algosdk/dist/esm/composer.js","webpack://_N_E/./node_modules/algosdk/dist/esm/types/index.js","webpack://_N_E/./node_modules/algosdk/dist/esm/main.js","webpack://_N_E/./node_modules/algosdk/dist/esm/index.js","webpack://_N_E/./node_modules/algo-msgpack-with-bigint/dist.es5/msgpack.min.js","webpack://_N_E/./node_modules/json-bigint/index.js","webpack://_N_E/./node_modules/json-bigint/lib/stringify.js","webpack://_N_E/./node_modules/js-sha512/src/sha512.js","webpack://_N_E/./node_modules/bignumber.js/bignumber.js","webpack://_N_E/./node_modules/hi-base32/src/base32.js"],"sourcesContent":["var BigNumber = null;\n\n// regexpxs extracted from\n// (c) BSD-3-Clause\n// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors\n\nconst suspectProtoRx = /(?:_|\\\\u005[Ff])(?:_|\\\\u005[Ff])(?:p|\\\\u0070)(?:r|\\\\u0072)(?:o|\\\\u006[Ff])(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:_|\\\\u005[Ff])(?:_|\\\\u005[Ff])/;\nconst suspectConstructorRx = /(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)/;\n\n/*\n json_parse.js\n 2012-06-20\n\n Public Domain.\n\n NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n\n This file creates a json_parse function.\n During create you can (optionally) specify some behavioural switches\n\n require('json-bigint')(options)\n\n The optional options parameter holds switches that drive certain\n aspects of the parsing process:\n * options.strict = true will warn about duplicate-key usage in the json.\n The default (strict = false) will silently ignore those and overwrite\n values for keys that are in duplicate use.\n\n The resulting function follows this signature:\n json_parse(text, reviver)\n This method parses a JSON text to produce an object or array.\n It can throw a SyntaxError exception.\n\n The optional reviver parameter is a function that can filter and\n transform the results. It receives each of the keys and values,\n and its return value is used instead of the original value.\n If it returns what it received, then the structure is not modified.\n If it returns undefined then the member is deleted.\n\n Example:\n\n // Parse the text. Values that look like ISO date strings will\n // be converted to Date objects.\n\n myData = json_parse(text, function (key, value) {\n var a;\n if (typeof value === 'string') {\n a =\n/^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n if (a) {\n return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n +a[5], +a[6]));\n }\n }\n return value;\n });\n\n This is a reference implementation. You are free to copy, modify, or\n redistribute.\n\n This code should be minified before deployment.\n See http://javascript.crockford.com/jsmin.html\n\n USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n NOT CONTROL.\n*/\n\n/*members \"\", \"\\\"\", \"\\/\", \"\\\\\", at, b, call, charAt, f, fromCharCode,\n hasOwnProperty, message, n, name, prototype, push, r, t, text\n*/\n\nvar json_parse = function (options) {\n 'use strict';\n\n // This is a function that can parse a JSON text, producing a JavaScript\n // data structure. It is a simple, recursive descent parser. It does not use\n // eval or regular expressions, so it can be used as a model for implementing\n // a JSON parser in other languages.\n\n // We are defining the function inside of another function to avoid creating\n // global variables.\n\n // Default options one can override by passing options to the parse()\n var _options = {\n strict: false, // not being strict means do not generate syntax errors for \"duplicate key\"\n storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string\n alwaysParseAsBig: false, // toggles whether all numbers should be Big\n useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js\n protoAction: 'error',\n constructorAction: 'error',\n };\n\n // If there are options, then use them to override the default _options\n if (options !== undefined && options !== null) {\n if (options.strict === true) {\n _options.strict = true;\n }\n if (options.storeAsString === true) {\n _options.storeAsString = true;\n }\n _options.alwaysParseAsBig =\n options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false;\n _options.useNativeBigInt =\n options.useNativeBigInt === true ? options.useNativeBigInt : false;\n\n if (typeof options.constructorAction !== 'undefined') {\n if (\n options.constructorAction === 'error' ||\n options.constructorAction === 'ignore' ||\n options.constructorAction === 'preserve'\n ) {\n _options.constructorAction = options.constructorAction;\n } else {\n throw new Error(\n `Incorrect value for constructorAction option, must be \"error\", \"ignore\" or undefined but passed ${options.constructorAction}`\n );\n }\n }\n\n if (typeof options.protoAction !== 'undefined') {\n if (\n options.protoAction === 'error' ||\n options.protoAction === 'ignore' ||\n options.protoAction === 'preserve'\n ) {\n _options.protoAction = options.protoAction;\n } else {\n throw new Error(\n `Incorrect value for protoAction option, must be \"error\", \"ignore\" or undefined but passed ${options.protoAction}`\n );\n }\n }\n }\n\n var at, // The index of the current character\n ch, // The current character\n escapee = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t',\n },\n text,\n error = function (m) {\n // Call error when something is wrong.\n\n throw {\n name: 'SyntaxError',\n message: m,\n at: at,\n text: text,\n };\n },\n next = function (c) {\n // If a c parameter is provided, verify that it matches the current character.\n\n if (c && c !== ch) {\n error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\n }\n\n // Get the next character. When there are no more characters,\n // return the empty string.\n\n ch = text.charAt(at);\n at += 1;\n return ch;\n },\n number = function () {\n // Parse a number value.\n\n var number,\n string = '';\n\n if (ch === '-') {\n string = '-';\n next('-');\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n if (ch === '.') {\n string += '.';\n while (next() && ch >= '0' && ch <= '9') {\n string += ch;\n }\n }\n if (ch === 'e' || ch === 'E') {\n string += ch;\n next();\n if (ch === '-' || ch === '+') {\n string += ch;\n next();\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n }\n number = +string;\n if (!isFinite(number)) {\n error('Bad number');\n } else {\n if (BigNumber == null) BigNumber = require('bignumber.js');\n //if (number > 9007199254740992 || number < -9007199254740992)\n // Bignumber has stricter check: everything with length > 15 digits disallowed\n if (string.length > 15)\n return _options.storeAsString\n ? string\n : _options.useNativeBigInt\n ? BigInt(string)\n : new BigNumber(string);\n else\n return !_options.alwaysParseAsBig\n ? number\n : _options.useNativeBigInt\n ? BigInt(number)\n : new BigNumber(number);\n }\n },\n string = function () {\n // Parse a string value.\n\n var hex,\n i,\n string = '',\n uffff;\n\n // When parsing for string values, we must look for \" and \\ characters.\n\n if (ch === '\"') {\n var startAt = at;\n while (next()) {\n if (ch === '\"') {\n if (at - 1 > startAt) string += text.substring(startAt, at - 1);\n next();\n return string;\n }\n if (ch === '\\\\') {\n if (at - 1 > startAt) string += text.substring(startAt, at - 1);\n next();\n if (ch === 'u') {\n uffff = 0;\n for (i = 0; i < 4; i += 1) {\n hex = parseInt(next(), 16);\n if (!isFinite(hex)) {\n break;\n }\n uffff = uffff * 16 + hex;\n }\n string += String.fromCharCode(uffff);\n } else if (typeof escapee[ch] === 'string') {\n string += escapee[ch];\n } else {\n break;\n }\n startAt = at;\n }\n }\n }\n error('Bad string');\n },\n white = function () {\n // Skip whitespace.\n\n while (ch && ch <= ' ') {\n next();\n }\n },\n word = function () {\n // true, false, or null.\n\n switch (ch) {\n case 't':\n next('t');\n next('r');\n next('u');\n next('e');\n return true;\n case 'f':\n next('f');\n next('a');\n next('l');\n next('s');\n next('e');\n return false;\n case 'n':\n next('n');\n next('u');\n next('l');\n next('l');\n return null;\n }\n error(\"Unexpected '\" + ch + \"'\");\n },\n value, // Place holder for the value function.\n array = function () {\n // Parse an array value.\n\n var array = [];\n\n if (ch === '[') {\n next('[');\n white();\n if (ch === ']') {\n next(']');\n return array; // empty array\n }\n while (ch) {\n array.push(value());\n white();\n if (ch === ']') {\n next(']');\n return array;\n }\n next(',');\n white();\n }\n }\n error('Bad array');\n },\n object = function () {\n // Parse an object value.\n\n var key,\n object = Object.create(null);\n\n if (ch === '{') {\n next('{');\n white();\n if (ch === '}') {\n next('}');\n return object; // empty object\n }\n while (ch) {\n key = string();\n white();\n next(':');\n if (\n _options.strict === true &&\n Object.hasOwnProperty.call(object, key)\n ) {\n error('Duplicate key \"' + key + '\"');\n }\n\n if (suspectProtoRx.test(key) === true) {\n if (_options.protoAction === 'error') {\n error('Object contains forbidden prototype property');\n } else if (_options.protoAction === 'ignore') {\n value();\n } else {\n object[key] = value();\n }\n } else if (suspectConstructorRx.test(key) === true) {\n if (_options.constructorAction === 'error') {\n error('Object contains forbidden constructor property');\n } else if (_options.constructorAction === 'ignore') {\n value();\n } else {\n object[key] = value();\n }\n } else {\n object[key] = value();\n }\n\n white();\n if (ch === '}') {\n next('}');\n return object;\n }\n next(',');\n white();\n }\n }\n error('Bad object');\n };\n\n value = function () {\n // Parse a JSON value. It could be an object, an array, a string, a number,\n // or a word.\n\n white();\n switch (ch) {\n case '{':\n return object();\n case '[':\n return array();\n case '\"':\n return string();\n case '-':\n return number();\n default:\n return ch >= '0' && ch <= '9' ? number() : word();\n }\n };\n\n // Return the json_parse function. It will have access to all of the above\n // functions and variables.\n\n return function (source, reviver) {\n var result;\n\n text = source + '';\n at = 0;\n ch = ' ';\n result = value();\n white();\n if (ch) {\n error('Syntax error');\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the result\n // in an empty key. If there is not a reviver function, we simply return the\n // result.\n\n return typeof reviver === 'function'\n ? (function walk(holder, key) {\n var k,\n v,\n value = holder[key];\n if (value && typeof value === 'object') {\n Object.keys(value).forEach(function (k) {\n v = walk(value, k);\n if (v !== undefined) {\n value[k] = v;\n } else {\n delete value[k];\n }\n });\n }\n return reviver.call(holder, key, value);\n })({ '': result }, '')\n : result;\n };\n};\n\nmodule.exports = json_parse;\n","(function(nacl) {\n'use strict';\n\n// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri.\n// Public domain.\n//\n// Implementation derived from TweetNaCl version 20140427.\n// See for details: http://tweetnacl.cr.yp.to/\n\nvar gf = function(init) {\n var i, r = new Float64Array(16);\n if (init) for (i = 0; i < init.length; i++) r[i] = init[i];\n return r;\n};\n\n// Pluggable, initialized in high-level API below.\nvar randombytes = function(/* x, n */) { throw new Error('no PRNG'); };\n\nvar _0 = new Uint8Array(16);\nvar _9 = new Uint8Array(32); _9[0] = 9;\n\nvar gf0 = gf(),\n gf1 = gf([1]),\n _121665 = gf([0xdb41, 1]),\n D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]),\n D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]),\n X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]),\n Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]),\n I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]);\n\nfunction ts64(x, i, h, l) {\n x[i] = (h >> 24) & 0xff;\n x[i+1] = (h >> 16) & 0xff;\n x[i+2] = (h >> 8) & 0xff;\n x[i+3] = h & 0xff;\n x[i+4] = (l >> 24) & 0xff;\n x[i+5] = (l >> 16) & 0xff;\n x[i+6] = (l >> 8) & 0xff;\n x[i+7] = l & 0xff;\n}\n\nfunction vn(x, xi, y, yi, n) {\n var i,d = 0;\n for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i];\n return (1 & ((d - 1) >>> 8)) - 1;\n}\n\nfunction crypto_verify_16(x, xi, y, yi) {\n return vn(x,xi,y,yi,16);\n}\n\nfunction crypto_verify_32(x, xi, y, yi) {\n return vn(x,xi,y,yi,32);\n}\n\nfunction core_salsa20(o, p, k, c) {\n var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,\n j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,\n j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,\n j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,\n j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,\n j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,\n j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,\n j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,\n j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,\n j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,\n j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,\n j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,\n j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,\n j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,\n j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,\n j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;\n\n var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,\n x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,\n x15 = j15, u;\n\n for (var i = 0; i < 20; i += 2) {\n u = x0 + x12 | 0;\n x4 ^= u<<7 | u>>>(32-7);\n u = x4 + x0 | 0;\n x8 ^= u<<9 | u>>>(32-9);\n u = x8 + x4 | 0;\n x12 ^= u<<13 | u>>>(32-13);\n u = x12 + x8 | 0;\n x0 ^= u<<18 | u>>>(32-18);\n\n u = x5 + x1 | 0;\n x9 ^= u<<7 | u>>>(32-7);\n u = x9 + x5 | 0;\n x13 ^= u<<9 | u>>>(32-9);\n u = x13 + x9 | 0;\n x1 ^= u<<13 | u>>>(32-13);\n u = x1 + x13 | 0;\n x5 ^= u<<18 | u>>>(32-18);\n\n u = x10 + x6 | 0;\n x14 ^= u<<7 | u>>>(32-7);\n u = x14 + x10 | 0;\n x2 ^= u<<9 | u>>>(32-9);\n u = x2 + x14 | 0;\n x6 ^= u<<13 | u>>>(32-13);\n u = x6 + x2 | 0;\n x10 ^= u<<18 | u>>>(32-18);\n\n u = x15 + x11 | 0;\n x3 ^= u<<7 | u>>>(32-7);\n u = x3 + x15 | 0;\n x7 ^= u<<9 | u>>>(32-9);\n u = x7 + x3 | 0;\n x11 ^= u<<13 | u>>>(32-13);\n u = x11 + x7 | 0;\n x15 ^= u<<18 | u>>>(32-18);\n\n u = x0 + x3 | 0;\n x1 ^= u<<7 | u>>>(32-7);\n u = x1 + x0 | 0;\n x2 ^= u<<9 | u>>>(32-9);\n u = x2 + x1 | 0;\n x3 ^= u<<13 | u>>>(32-13);\n u = x3 + x2 | 0;\n x0 ^= u<<18 | u>>>(32-18);\n\n u = x5 + x4 | 0;\n x6 ^= u<<7 | u>>>(32-7);\n u = x6 + x5 | 0;\n x7 ^= u<<9 | u>>>(32-9);\n u = x7 + x6 | 0;\n x4 ^= u<<13 | u>>>(32-13);\n u = x4 + x7 | 0;\n x5 ^= u<<18 | u>>>(32-18);\n\n u = x10 + x9 | 0;\n x11 ^= u<<7 | u>>>(32-7);\n u = x11 + x10 | 0;\n x8 ^= u<<9 | u>>>(32-9);\n u = x8 + x11 | 0;\n x9 ^= u<<13 | u>>>(32-13);\n u = x9 + x8 | 0;\n x10 ^= u<<18 | u>>>(32-18);\n\n u = x15 + x14 | 0;\n x12 ^= u<<7 | u>>>(32-7);\n u = x12 + x15 | 0;\n x13 ^= u<<9 | u>>>(32-9);\n u = x13 + x12 | 0;\n x14 ^= u<<13 | u>>>(32-13);\n u = x14 + x13 | 0;\n x15 ^= u<<18 | u>>>(32-18);\n }\n x0 = x0 + j0 | 0;\n x1 = x1 + j1 | 0;\n x2 = x2 + j2 | 0;\n x3 = x3 + j3 | 0;\n x4 = x4 + j4 | 0;\n x5 = x5 + j5 | 0;\n x6 = x6 + j6 | 0;\n x7 = x7 + j7 | 0;\n x8 = x8 + j8 | 0;\n x9 = x9 + j9 | 0;\n x10 = x10 + j10 | 0;\n x11 = x11 + j11 | 0;\n x12 = x12 + j12 | 0;\n x13 = x13 + j13 | 0;\n x14 = x14 + j14 | 0;\n x15 = x15 + j15 | 0;\n\n o[ 0] = x0 >>> 0 & 0xff;\n o[ 1] = x0 >>> 8 & 0xff;\n o[ 2] = x0 >>> 16 & 0xff;\n o[ 3] = x0 >>> 24 & 0xff;\n\n o[ 4] = x1 >>> 0 & 0xff;\n o[ 5] = x1 >>> 8 & 0xff;\n o[ 6] = x1 >>> 16 & 0xff;\n o[ 7] = x1 >>> 24 & 0xff;\n\n o[ 8] = x2 >>> 0 & 0xff;\n o[ 9] = x2 >>> 8 & 0xff;\n o[10] = x2 >>> 16 & 0xff;\n o[11] = x2 >>> 24 & 0xff;\n\n o[12] = x3 >>> 0 & 0xff;\n o[13] = x3 >>> 8 & 0xff;\n o[14] = x3 >>> 16 & 0xff;\n o[15] = x3 >>> 24 & 0xff;\n\n o[16] = x4 >>> 0 & 0xff;\n o[17] = x4 >>> 8 & 0xff;\n o[18] = x4 >>> 16 & 0xff;\n o[19] = x4 >>> 24 & 0xff;\n\n o[20] = x5 >>> 0 & 0xff;\n o[21] = x5 >>> 8 & 0xff;\n o[22] = x5 >>> 16 & 0xff;\n o[23] = x5 >>> 24 & 0xff;\n\n o[24] = x6 >>> 0 & 0xff;\n o[25] = x6 >>> 8 & 0xff;\n o[26] = x6 >>> 16 & 0xff;\n o[27] = x6 >>> 24 & 0xff;\n\n o[28] = x7 >>> 0 & 0xff;\n o[29] = x7 >>> 8 & 0xff;\n o[30] = x7 >>> 16 & 0xff;\n o[31] = x7 >>> 24 & 0xff;\n\n o[32] = x8 >>> 0 & 0xff;\n o[33] = x8 >>> 8 & 0xff;\n o[34] = x8 >>> 16 & 0xff;\n o[35] = x8 >>> 24 & 0xff;\n\n o[36] = x9 >>> 0 & 0xff;\n o[37] = x9 >>> 8 & 0xff;\n o[38] = x9 >>> 16 & 0xff;\n o[39] = x9 >>> 24 & 0xff;\n\n o[40] = x10 >>> 0 & 0xff;\n o[41] = x10 >>> 8 & 0xff;\n o[42] = x10 >>> 16 & 0xff;\n o[43] = x10 >>> 24 & 0xff;\n\n o[44] = x11 >>> 0 & 0xff;\n o[45] = x11 >>> 8 & 0xff;\n o[46] = x11 >>> 16 & 0xff;\n o[47] = x11 >>> 24 & 0xff;\n\n o[48] = x12 >>> 0 & 0xff;\n o[49] = x12 >>> 8 & 0xff;\n o[50] = x12 >>> 16 & 0xff;\n o[51] = x12 >>> 24 & 0xff;\n\n o[52] = x13 >>> 0 & 0xff;\n o[53] = x13 >>> 8 & 0xff;\n o[54] = x13 >>> 16 & 0xff;\n o[55] = x13 >>> 24 & 0xff;\n\n o[56] = x14 >>> 0 & 0xff;\n o[57] = x14 >>> 8 & 0xff;\n o[58] = x14 >>> 16 & 0xff;\n o[59] = x14 >>> 24 & 0xff;\n\n o[60] = x15 >>> 0 & 0xff;\n o[61] = x15 >>> 8 & 0xff;\n o[62] = x15 >>> 16 & 0xff;\n o[63] = x15 >>> 24 & 0xff;\n}\n\nfunction core_hsalsa20(o,p,k,c) {\n var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24,\n j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24,\n j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24,\n j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24,\n j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24,\n j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24,\n j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24,\n j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24,\n j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24,\n j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24,\n j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24,\n j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24,\n j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24,\n j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24,\n j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24,\n j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24;\n\n var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7,\n x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14,\n x15 = j15, u;\n\n for (var i = 0; i < 20; i += 2) {\n u = x0 + x12 | 0;\n x4 ^= u<<7 | u>>>(32-7);\n u = x4 + x0 | 0;\n x8 ^= u<<9 | u>>>(32-9);\n u = x8 + x4 | 0;\n x12 ^= u<<13 | u>>>(32-13);\n u = x12 + x8 | 0;\n x0 ^= u<<18 | u>>>(32-18);\n\n u = x5 + x1 | 0;\n x9 ^= u<<7 | u>>>(32-7);\n u = x9 + x5 | 0;\n x13 ^= u<<9 | u>>>(32-9);\n u = x13 + x9 | 0;\n x1 ^= u<<13 | u>>>(32-13);\n u = x1 + x13 | 0;\n x5 ^= u<<18 | u>>>(32-18);\n\n u = x10 + x6 | 0;\n x14 ^= u<<7 | u>>>(32-7);\n u = x14 + x10 | 0;\n x2 ^= u<<9 | u>>>(32-9);\n u = x2 + x14 | 0;\n x6 ^= u<<13 | u>>>(32-13);\n u = x6 + x2 | 0;\n x10 ^= u<<18 | u>>>(32-18);\n\n u = x15 + x11 | 0;\n x3 ^= u<<7 | u>>>(32-7);\n u = x3 + x15 | 0;\n x7 ^= u<<9 | u>>>(32-9);\n u = x7 + x3 | 0;\n x11 ^= u<<13 | u>>>(32-13);\n u = x11 + x7 | 0;\n x15 ^= u<<18 | u>>>(32-18);\n\n u = x0 + x3 | 0;\n x1 ^= u<<7 | u>>>(32-7);\n u = x1 + x0 | 0;\n x2 ^= u<<9 | u>>>(32-9);\n u = x2 + x1 | 0;\n x3 ^= u<<13 | u>>>(32-13);\n u = x3 + x2 | 0;\n x0 ^= u<<18 | u>>>(32-18);\n\n u = x5 + x4 | 0;\n x6 ^= u<<7 | u>>>(32-7);\n u = x6 + x5 | 0;\n x7 ^= u<<9 | u>>>(32-9);\n u = x7 + x6 | 0;\n x4 ^= u<<13 | u>>>(32-13);\n u = x4 + x7 | 0;\n x5 ^= u<<18 | u>>>(32-18);\n\n u = x10 + x9 | 0;\n x11 ^= u<<7 | u>>>(32-7);\n u = x11 + x10 | 0;\n x8 ^= u<<9 | u>>>(32-9);\n u = x8 + x11 | 0;\n x9 ^= u<<13 | u>>>(32-13);\n u = x9 + x8 | 0;\n x10 ^= u<<18 | u>>>(32-18);\n\n u = x15 + x14 | 0;\n x12 ^= u<<7 | u>>>(32-7);\n u = x12 + x15 | 0;\n x13 ^= u<<9 | u>>>(32-9);\n u = x13 + x12 | 0;\n x14 ^= u<<13 | u>>>(32-13);\n u = x14 + x13 | 0;\n x15 ^= u<<18 | u>>>(32-18);\n }\n\n o[ 0] = x0 >>> 0 & 0xff;\n o[ 1] = x0 >>> 8 & 0xff;\n o[ 2] = x0 >>> 16 & 0xff;\n o[ 3] = x0 >>> 24 & 0xff;\n\n o[ 4] = x5 >>> 0 & 0xff;\n o[ 5] = x5 >>> 8 & 0xff;\n o[ 6] = x5 >>> 16 & 0xff;\n o[ 7] = x5 >>> 24 & 0xff;\n\n o[ 8] = x10 >>> 0 & 0xff;\n o[ 9] = x10 >>> 8 & 0xff;\n o[10] = x10 >>> 16 & 0xff;\n o[11] = x10 >>> 24 & 0xff;\n\n o[12] = x15 >>> 0 & 0xff;\n o[13] = x15 >>> 8 & 0xff;\n o[14] = x15 >>> 16 & 0xff;\n o[15] = x15 >>> 24 & 0xff;\n\n o[16] = x6 >>> 0 & 0xff;\n o[17] = x6 >>> 8 & 0xff;\n o[18] = x6 >>> 16 & 0xff;\n o[19] = x6 >>> 24 & 0xff;\n\n o[20] = x7 >>> 0 & 0xff;\n o[21] = x7 >>> 8 & 0xff;\n o[22] = x7 >>> 16 & 0xff;\n o[23] = x7 >>> 24 & 0xff;\n\n o[24] = x8 >>> 0 & 0xff;\n o[25] = x8 >>> 8 & 0xff;\n o[26] = x8 >>> 16 & 0xff;\n o[27] = x8 >>> 24 & 0xff;\n\n o[28] = x9 >>> 0 & 0xff;\n o[29] = x9 >>> 8 & 0xff;\n o[30] = x9 >>> 16 & 0xff;\n o[31] = x9 >>> 24 & 0xff;\n}\n\nfunction crypto_core_salsa20(out,inp,k,c) {\n core_salsa20(out,inp,k,c);\n}\n\nfunction crypto_core_hsalsa20(out,inp,k,c) {\n core_hsalsa20(out,inp,k,c);\n}\n\nvar sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);\n // \"expand 32-byte k\"\n\nfunction crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {\n var z = new Uint8Array(16), x = new Uint8Array(64);\n var u, i;\n for (i = 0; i < 16; i++) z[i] = 0;\n for (i = 0; i < 8; i++) z[i] = n[i];\n while (b >= 64) {\n crypto_core_salsa20(x,z,k,sigma);\n for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i];\n u = 1;\n for (i = 8; i < 16; i++) {\n u = u + (z[i] & 0xff) | 0;\n z[i] = u & 0xff;\n u >>>= 8;\n }\n b -= 64;\n cpos += 64;\n mpos += 64;\n }\n if (b > 0) {\n crypto_core_salsa20(x,z,k,sigma);\n for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i];\n }\n return 0;\n}\n\nfunction crypto_stream_salsa20(c,cpos,b,n,k) {\n var z = new Uint8Array(16), x = new Uint8Array(64);\n var u, i;\n for (i = 0; i < 16; i++) z[i] = 0;\n for (i = 0; i < 8; i++) z[i] = n[i];\n while (b >= 64) {\n crypto_core_salsa20(x,z,k,sigma);\n for (i = 0; i < 64; i++) c[cpos+i] = x[i];\n u = 1;\n for (i = 8; i < 16; i++) {\n u = u + (z[i] & 0xff) | 0;\n z[i] = u & 0xff;\n u >>>= 8;\n }\n b -= 64;\n cpos += 64;\n }\n if (b > 0) {\n crypto_core_salsa20(x,z,k,sigma);\n for (i = 0; i < b; i++) c[cpos+i] = x[i];\n }\n return 0;\n}\n\nfunction crypto_stream(c,cpos,d,n,k) {\n var s = new Uint8Array(32);\n crypto_core_hsalsa20(s,n,k,sigma);\n var sn = new Uint8Array(8);\n for (var i = 0; i < 8; i++) sn[i] = n[i+16];\n return crypto_stream_salsa20(c,cpos,d,sn,s);\n}\n\nfunction crypto_stream_xor(c,cpos,m,mpos,d,n,k) {\n var s = new Uint8Array(32);\n crypto_core_hsalsa20(s,n,k,sigma);\n var sn = new Uint8Array(8);\n for (var i = 0; i < 8; i++) sn[i] = n[i+16];\n return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s);\n}\n\n/*\n* Port of Andrew Moon's Poly1305-donna-16. Public domain.\n* https://github.com/floodyberry/poly1305-donna\n*/\n\nvar poly1305 = function(key) {\n this.buffer = new Uint8Array(16);\n this.r = new Uint16Array(10);\n this.h = new Uint16Array(10);\n this.pad = new Uint16Array(8);\n this.leftover = 0;\n this.fin = 0;\n\n var t0, t1, t2, t3, t4, t5, t6, t7;\n\n t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff;\n t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;\n t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;\n this.r[5] = ((t4 >>> 1)) & 0x1ffe;\n t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;\n t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n this.r[9] = ((t7 >>> 5)) & 0x007f;\n\n this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8;\n this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8;\n this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8;\n this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8;\n this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8;\n this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8;\n this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8;\n this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8;\n};\n\npoly1305.prototype.blocks = function(m, mpos, bytes) {\n var hibit = this.fin ? 0 : (1 << 11);\n var t0, t1, t2, t3, t4, t5, t6, t7, c;\n var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9;\n\n var h0 = this.h[0],\n h1 = this.h[1],\n h2 = this.h[2],\n h3 = this.h[3],\n h4 = this.h[4],\n h5 = this.h[5],\n h6 = this.h[6],\n h7 = this.h[7],\n h8 = this.h[8],\n h9 = this.h[9];\n\n var r0 = this.r[0],\n r1 = this.r[1],\n r2 = this.r[2],\n r3 = this.r[3],\n r4 = this.r[4],\n r5 = this.r[5],\n r6 = this.r[6],\n r7 = this.r[7],\n r8 = this.r[8],\n r9 = this.r[9];\n\n while (bytes >= 16) {\n t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff;\n t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;\n t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;\n h5 += ((t4 >>> 1)) & 0x1fff;\n t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;\n t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n h9 += ((t7 >>> 5)) | hibit;\n\n c = 0;\n\n d0 = c;\n d0 += h0 * r0;\n d0 += h1 * (5 * r9);\n d0 += h2 * (5 * r8);\n d0 += h3 * (5 * r7);\n d0 += h4 * (5 * r6);\n c = (d0 >>> 13); d0 &= 0x1fff;\n d0 += h5 * (5 * r5);\n d0 += h6 * (5 * r4);\n d0 += h7 * (5 * r3);\n d0 += h8 * (5 * r2);\n d0 += h9 * (5 * r1);\n c += (d0 >>> 13); d0 &= 0x1fff;\n\n d1 = c;\n d1 += h0 * r1;\n d1 += h1 * r0;\n d1 += h2 * (5 * r9);\n d1 += h3 * (5 * r8);\n d1 += h4 * (5 * r7);\n c = (d1 >>> 13); d1 &= 0x1fff;\n d1 += h5 * (5 * r6);\n d1 += h6 * (5 * r5);\n d1 += h7 * (5 * r4);\n d1 += h8 * (5 * r3);\n d1 += h9 * (5 * r2);\n c += (d1 >>> 13); d1 &= 0x1fff;\n\n d2 = c;\n d2 += h0 * r2;\n d2 += h1 * r1;\n d2 += h2 * r0;\n d2 += h3 * (5 * r9);\n d2 += h4 * (5 * r8);\n c = (d2 >>> 13); d2 &= 0x1fff;\n d2 += h5 * (5 * r7);\n d2 += h6 * (5 * r6);\n d2 += h7 * (5 * r5);\n d2 += h8 * (5 * r4);\n d2 += h9 * (5 * r3);\n c += (d2 >>> 13); d2 &= 0x1fff;\n\n d3 = c;\n d3 += h0 * r3;\n d3 += h1 * r2;\n d3 += h2 * r1;\n d3 += h3 * r0;\n d3 += h4 * (5 * r9);\n c = (d3 >>> 13); d3 &= 0x1fff;\n d3 += h5 * (5 * r8);\n d3 += h6 * (5 * r7);\n d3 += h7 * (5 * r6);\n d3 += h8 * (5 * r5);\n d3 += h9 * (5 * r4);\n c += (d3 >>> 13); d3 &= 0x1fff;\n\n d4 = c;\n d4 += h0 * r4;\n d4 += h1 * r3;\n d4 += h2 * r2;\n d4 += h3 * r1;\n d4 += h4 * r0;\n c = (d4 >>> 13); d4 &= 0x1fff;\n d4 += h5 * (5 * r9);\n d4 += h6 * (5 * r8);\n d4 += h7 * (5 * r7);\n d4 += h8 * (5 * r6);\n d4 += h9 * (5 * r5);\n c += (d4 >>> 13); d4 &= 0x1fff;\n\n d5 = c;\n d5 += h0 * r5;\n d5 += h1 * r4;\n d5 += h2 * r3;\n d5 += h3 * r2;\n d5 += h4 * r1;\n c = (d5 >>> 13); d5 &= 0x1fff;\n d5 += h5 * r0;\n d5 += h6 * (5 * r9);\n d5 += h7 * (5 * r8);\n d5 += h8 * (5 * r7);\n d5 += h9 * (5 * r6);\n c += (d5 >>> 13); d5 &= 0x1fff;\n\n d6 = c;\n d6 += h0 * r6;\n d6 += h1 * r5;\n d6 += h2 * r4;\n d6 += h3 * r3;\n d6 += h4 * r2;\n c = (d6 >>> 13); d6 &= 0x1fff;\n d6 += h5 * r1;\n d6 += h6 * r0;\n d6 += h7 * (5 * r9);\n d6 += h8 * (5 * r8);\n d6 += h9 * (5 * r7);\n c += (d6 >>> 13); d6 &= 0x1fff;\n\n d7 = c;\n d7 += h0 * r7;\n d7 += h1 * r6;\n d7 += h2 * r5;\n d7 += h3 * r4;\n d7 += h4 * r3;\n c = (d7 >>> 13); d7 &= 0x1fff;\n d7 += h5 * r2;\n d7 += h6 * r1;\n d7 += h7 * r0;\n d7 += h8 * (5 * r9);\n d7 += h9 * (5 * r8);\n c += (d7 >>> 13); d7 &= 0x1fff;\n\n d8 = c;\n d8 += h0 * r8;\n d8 += h1 * r7;\n d8 += h2 * r6;\n d8 += h3 * r5;\n d8 += h4 * r4;\n c = (d8 >>> 13); d8 &= 0x1fff;\n d8 += h5 * r3;\n d8 += h6 * r2;\n d8 += h7 * r1;\n d8 += h8 * r0;\n d8 += h9 * (5 * r9);\n c += (d8 >>> 13); d8 &= 0x1fff;\n\n d9 = c;\n d9 += h0 * r9;\n d9 += h1 * r8;\n d9 += h2 * r7;\n d9 += h3 * r6;\n d9 += h4 * r5;\n c = (d9 >>> 13); d9 &= 0x1fff;\n d9 += h5 * r4;\n d9 += h6 * r3;\n d9 += h7 * r2;\n d9 += h8 * r1;\n d9 += h9 * r0;\n c += (d9 >>> 13); d9 &= 0x1fff;\n\n c = (((c << 2) + c)) | 0;\n c = (c + d0) | 0;\n d0 = c & 0x1fff;\n c = (c >>> 13);\n d1 += c;\n\n h0 = d0;\n h1 = d1;\n h2 = d2;\n h3 = d3;\n h4 = d4;\n h5 = d5;\n h6 = d6;\n h7 = d7;\n h8 = d8;\n h9 = d9;\n\n mpos += 16;\n bytes -= 16;\n }\n this.h[0] = h0;\n this.h[1] = h1;\n this.h[2] = h2;\n this.h[3] = h3;\n this.h[4] = h4;\n this.h[5] = h5;\n this.h[6] = h6;\n this.h[7] = h7;\n this.h[8] = h8;\n this.h[9] = h9;\n};\n\npoly1305.prototype.finish = function(mac, macpos) {\n var g = new Uint16Array(10);\n var c, mask, f, i;\n\n if (this.leftover) {\n i = this.leftover;\n this.buffer[i++] = 1;\n for (; i < 16; i++) this.buffer[i] = 0;\n this.fin = 1;\n this.blocks(this.buffer, 0, 16);\n }\n\n c = this.h[1] >>> 13;\n this.h[1] &= 0x1fff;\n for (i = 2; i < 10; i++) {\n this.h[i] += c;\n c = this.h[i] >>> 13;\n this.h[i] &= 0x1fff;\n }\n this.h[0] += (c * 5);\n c = this.h[0] >>> 13;\n this.h[0] &= 0x1fff;\n this.h[1] += c;\n c = this.h[1] >>> 13;\n this.h[1] &= 0x1fff;\n this.h[2] += c;\n\n g[0] = this.h[0] + 5;\n c = g[0] >>> 13;\n g[0] &= 0x1fff;\n for (i = 1; i < 10; i++) {\n g[i] = this.h[i] + c;\n c = g[i] >>> 13;\n g[i] &= 0x1fff;\n }\n g[9] -= (1 << 13);\n\n mask = (c ^ 1) - 1;\n for (i = 0; i < 10; i++) g[i] &= mask;\n mask = ~mask;\n for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i];\n\n this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff;\n this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff;\n this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff;\n this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff;\n this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff;\n this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff;\n this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff;\n this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff;\n\n f = this.h[0] + this.pad[0];\n this.h[0] = f & 0xffff;\n for (i = 1; i < 8; i++) {\n f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0;\n this.h[i] = f & 0xffff;\n }\n\n mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff;\n mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff;\n mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff;\n mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff;\n mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff;\n mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff;\n mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff;\n mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff;\n mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff;\n mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff;\n mac[macpos+10] = (this.h[5] >>> 0) & 0xff;\n mac[macpos+11] = (this.h[5] >>> 8) & 0xff;\n mac[macpos+12] = (this.h[6] >>> 0) & 0xff;\n mac[macpos+13] = (this.h[6] >>> 8) & 0xff;\n mac[macpos+14] = (this.h[7] >>> 0) & 0xff;\n mac[macpos+15] = (this.h[7] >>> 8) & 0xff;\n};\n\npoly1305.prototype.update = function(m, mpos, bytes) {\n var i, want;\n\n if (this.leftover) {\n want = (16 - this.leftover);\n if (want > bytes)\n want = bytes;\n for (i = 0; i < want; i++)\n this.buffer[this.leftover + i] = m[mpos+i];\n bytes -= want;\n mpos += want;\n this.leftover += want;\n if (this.leftover < 16)\n return;\n this.blocks(this.buffer, 0, 16);\n this.leftover = 0;\n }\n\n if (bytes >= 16) {\n want = bytes - (bytes % 16);\n this.blocks(m, mpos, want);\n mpos += want;\n bytes -= want;\n }\n\n if (bytes) {\n for (i = 0; i < bytes; i++)\n this.buffer[this.leftover + i] = m[mpos+i];\n this.leftover += bytes;\n }\n};\n\nfunction crypto_onetimeauth(out, outpos, m, mpos, n, k) {\n var s = new poly1305(k);\n s.update(m, mpos, n);\n s.finish(out, outpos);\n return 0;\n}\n\nfunction crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) {\n var x = new Uint8Array(16);\n crypto_onetimeauth(x,0,m,mpos,n,k);\n return crypto_verify_16(h,hpos,x,0);\n}\n\nfunction crypto_secretbox(c,m,d,n,k) {\n var i;\n if (d < 32) return -1;\n crypto_stream_xor(c,0,m,0,d,n,k);\n crypto_onetimeauth(c, 16, c, 32, d - 32, c);\n for (i = 0; i < 16; i++) c[i] = 0;\n return 0;\n}\n\nfunction crypto_secretbox_open(m,c,d,n,k) {\n var i;\n var x = new Uint8Array(32);\n if (d < 32) return -1;\n crypto_stream(x,0,32,n,k);\n if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1;\n crypto_stream_xor(m,0,c,0,d,n,k);\n for (i = 0; i < 32; i++) m[i] = 0;\n return 0;\n}\n\nfunction set25519(r, a) {\n var i;\n for (i = 0; i < 16; i++) r[i] = a[i]|0;\n}\n\nfunction car25519(o) {\n var i, v, c = 1;\n for (i = 0; i < 16; i++) {\n v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c-1 + 37 * (c-1);\n}\n\nfunction sel25519(p, q, b) {\n var t, c = ~(b-1);\n for (var i = 0; i < 16; i++) {\n t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\n\nfunction pack25519(o, n) {\n var i, j, b;\n var m = gf(), t = gf();\n for (i = 0; i < 16; i++) t[i] = n[i];\n car25519(t);\n car25519(t);\n car25519(t);\n for (j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1);\n m[i-1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1);\n b = (m[15]>>16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1-b);\n }\n for (i = 0; i < 16; i++) {\n o[2*i] = t[i] & 0xff;\n o[2*i+1] = t[i]>>8;\n }\n}\n\nfunction neq25519(a, b) {\n var c = new Uint8Array(32), d = new Uint8Array(32);\n pack25519(c, a);\n pack25519(d, b);\n return crypto_verify_32(c, 0, d, 0);\n}\n\nfunction par25519(a) {\n var d = new Uint8Array(32);\n pack25519(d, a);\n return d[0] & 1;\n}\n\nfunction unpack25519(o, n) {\n var i;\n for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8);\n o[15] &= 0x7fff;\n}\n\nfunction A(o, a, b) {\n for (var i = 0; i < 16; i++) o[i] = a[i] + b[i];\n}\n\nfunction Z(o, a, b) {\n for (var i = 0; i < 16; i++) o[i] = a[i] - b[i];\n}\n\nfunction M(o, a, b) {\n var v, c,\n t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0,\n t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0,\n t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0,\n t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0,\n b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11],\n b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n\n // first car\n c = 1;\n v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;\n v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;\n v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;\n v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;\n v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;\n v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;\n v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;\n v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;\n v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;\n v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;\n v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;\n v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;\n v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;\n v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;\n v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;\n v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;\n t0 += c-1 + 37 * (c-1);\n\n // second car\n c = 1;\n v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536;\n v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536;\n v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536;\n v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536;\n v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536;\n v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536;\n v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536;\n v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536;\n v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536;\n v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536;\n v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536;\n v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536;\n v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536;\n v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536;\n v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536;\n v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536;\n t0 += c-1 + 37 * (c-1);\n\n o[ 0] = t0;\n o[ 1] = t1;\n o[ 2] = t2;\n o[ 3] = t3;\n o[ 4] = t4;\n o[ 5] = t5;\n o[ 6] = t6;\n o[ 7] = t7;\n o[ 8] = t8;\n o[ 9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\n\nfunction S(o, a) {\n M(o, a, a);\n}\n\nfunction inv25519(o, i) {\n var c = gf();\n var a;\n for (a = 0; a < 16; a++) c[a] = i[a];\n for (a = 253; a >= 0; a--) {\n S(c, c);\n if(a !== 2 && a !== 4) M(c, c, i);\n }\n for (a = 0; a < 16; a++) o[a] = c[a];\n}\n\nfunction pow2523(o, i) {\n var c = gf();\n var a;\n for (a = 0; a < 16; a++) c[a] = i[a];\n for (a = 250; a >= 0; a--) {\n S(c, c);\n if(a !== 1) M(c, c, i);\n }\n for (a = 0; a < 16; a++) o[a] = c[a];\n}\n\nfunction crypto_scalarmult(q, n, p) {\n var z = new Uint8Array(32);\n var x = new Float64Array(80), r, i;\n var a = gf(), b = gf(), c = gf(),\n d = gf(), e = gf(), f = gf();\n for (i = 0; i < 31; i++) z[i] = n[i];\n z[31]=(n[31]&127)|64;\n z[0]&=248;\n unpack25519(x,p);\n for (i = 0; i < 16; i++) {\n b[i]=x[i];\n d[i]=a[i]=c[i]=0;\n }\n a[0]=d[0]=1;\n for (i=254; i>=0; --i) {\n r=(z[i>>>3]>>>(i&7))&1;\n sel25519(a,b,r);\n sel25519(c,d,r);\n A(e,a,c);\n Z(a,a,c);\n A(c,b,d);\n Z(b,b,d);\n S(d,e);\n S(f,a);\n M(a,c,a);\n M(c,b,e);\n A(e,a,c);\n Z(a,a,c);\n S(b,a);\n Z(c,d,f);\n M(a,c,_121665);\n A(a,a,d);\n M(c,c,a);\n M(a,d,f);\n M(d,b,x);\n S(b,e);\n sel25519(a,b,r);\n sel25519(c,d,r);\n }\n for (i = 0; i < 16; i++) {\n x[i+16]=a[i];\n x[i+32]=c[i];\n x[i+48]=b[i];\n x[i+64]=d[i];\n }\n var x32 = x.subarray(32);\n var x16 = x.subarray(16);\n inv25519(x32,x32);\n M(x16,x16,x32);\n pack25519(q,x16);\n return 0;\n}\n\nfunction crypto_scalarmult_base(q, n) {\n return crypto_scalarmult(q, n, _9);\n}\n\nfunction crypto_box_keypair(y, x) {\n randombytes(x, 32);\n return crypto_scalarmult_base(y, x);\n}\n\nfunction crypto_box_beforenm(k, y, x) {\n var s = new Uint8Array(32);\n crypto_scalarmult(s, x, y);\n return crypto_core_hsalsa20(k, _0, s, sigma);\n}\n\nvar crypto_box_afternm = crypto_secretbox;\nvar crypto_box_open_afternm = crypto_secretbox_open;\n\nfunction crypto_box(c, m, d, n, y, x) {\n var k = new Uint8Array(32);\n crypto_box_beforenm(k, y, x);\n return crypto_box_afternm(c, m, d, n, k);\n}\n\nfunction crypto_box_open(m, c, d, n, y, x) {\n var k = new Uint8Array(32);\n crypto_box_beforenm(k, y, x);\n return crypto_box_open_afternm(m, c, d, n, k);\n}\n\nvar K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction crypto_hashblocks_hl(hh, hl, m, n) {\n var wh = new Int32Array(16), wl = new Int32Array(16),\n bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7,\n bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7,\n th, tl, i, j, h, l, a, b, c, d;\n\n var ah0 = hh[0],\n ah1 = hh[1],\n ah2 = hh[2],\n ah3 = hh[3],\n ah4 = hh[4],\n ah5 = hh[5],\n ah6 = hh[6],\n ah7 = hh[7],\n\n al0 = hl[0],\n al1 = hl[1],\n al2 = hl[2],\n al3 = hl[3],\n al4 = hl[4],\n al5 = hl[5],\n al6 = hl[6],\n al7 = hl[7];\n\n var pos = 0;\n while (n >= 128) {\n for (i = 0; i < 16; i++) {\n j = 8 * i + pos;\n wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3];\n wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7];\n }\n for (i = 0; i < 80; i++) {\n bh0 = ah0;\n bh1 = ah1;\n bh2 = ah2;\n bh3 = ah3;\n bh4 = ah4;\n bh5 = ah5;\n bh6 = ah6;\n bh7 = ah7;\n\n bl0 = al0;\n bl1 = al1;\n bl2 = al2;\n bl3 = al3;\n bl4 = al4;\n bl5 = al5;\n bl6 = al6;\n bl7 = al7;\n\n // add\n h = ah7;\n l = al7;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n // Sigma1\n h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32))));\n l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32))));\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n // Ch\n h = (ah4 & ah5) ^ (~ah4 & ah6);\n l = (al4 & al5) ^ (~al4 & al6);\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n // K\n h = K[i*2];\n l = K[i*2+1];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n // w\n h = wh[i%16];\n l = wl[i%16];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n th = c & 0xffff | d << 16;\n tl = a & 0xffff | b << 16;\n\n // add\n h = th;\n l = tl;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n // Sigma0\n h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32))));\n l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32))));\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n // Maj\n h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);\n l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n bh7 = (c & 0xffff) | (d << 16);\n bl7 = (a & 0xffff) | (b << 16);\n\n // add\n h = bh3;\n l = bl3;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = th;\n l = tl;\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n bh3 = (c & 0xffff) | (d << 16);\n bl3 = (a & 0xffff) | (b << 16);\n\n ah1 = bh0;\n ah2 = bh1;\n ah3 = bh2;\n ah4 = bh3;\n ah5 = bh4;\n ah6 = bh5;\n ah7 = bh6;\n ah0 = bh7;\n\n al1 = bl0;\n al2 = bl1;\n al3 = bl2;\n al4 = bl3;\n al5 = bl4;\n al6 = bl5;\n al7 = bl6;\n al0 = bl7;\n\n if (i%16 === 15) {\n for (j = 0; j < 16; j++) {\n // add\n h = wh[j];\n l = wl[j];\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = wh[(j+9)%16];\n l = wl[(j+9)%16];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n // sigma0\n th = wh[(j+1)%16];\n tl = wl[(j+1)%16];\n h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7);\n l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7)));\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n // sigma1\n th = wh[(j+14)%16];\n tl = wl[(j+14)%16];\n h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6);\n l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6)));\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n wh[j] = (c & 0xffff) | (d << 16);\n wl[j] = (a & 0xffff) | (b << 16);\n }\n }\n }\n\n // add\n h = ah0;\n l = al0;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[0];\n l = hl[0];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[0] = ah0 = (c & 0xffff) | (d << 16);\n hl[0] = al0 = (a & 0xffff) | (b << 16);\n\n h = ah1;\n l = al1;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[1];\n l = hl[1];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[1] = ah1 = (c & 0xffff) | (d << 16);\n hl[1] = al1 = (a & 0xffff) | (b << 16);\n\n h = ah2;\n l = al2;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[2];\n l = hl[2];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[2] = ah2 = (c & 0xffff) | (d << 16);\n hl[2] = al2 = (a & 0xffff) | (b << 16);\n\n h = ah3;\n l = al3;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[3];\n l = hl[3];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[3] = ah3 = (c & 0xffff) | (d << 16);\n hl[3] = al3 = (a & 0xffff) | (b << 16);\n\n h = ah4;\n l = al4;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[4];\n l = hl[4];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[4] = ah4 = (c & 0xffff) | (d << 16);\n hl[4] = al4 = (a & 0xffff) | (b << 16);\n\n h = ah5;\n l = al5;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[5];\n l = hl[5];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[5] = ah5 = (c & 0xffff) | (d << 16);\n hl[5] = al5 = (a & 0xffff) | (b << 16);\n\n h = ah6;\n l = al6;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[6];\n l = hl[6];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[6] = ah6 = (c & 0xffff) | (d << 16);\n hl[6] = al6 = (a & 0xffff) | (b << 16);\n\n h = ah7;\n l = al7;\n\n a = l & 0xffff; b = l >>> 16;\n c = h & 0xffff; d = h >>> 16;\n\n h = hh[7];\n l = hl[7];\n\n a += l & 0xffff; b += l >>> 16;\n c += h & 0xffff; d += h >>> 16;\n\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n\n hh[7] = ah7 = (c & 0xffff) | (d << 16);\n hl[7] = al7 = (a & 0xffff) | (b << 16);\n\n pos += 128;\n n -= 128;\n }\n\n return n;\n}\n\nfunction crypto_hash(out, m, n) {\n var hh = new Int32Array(8),\n hl = new Int32Array(8),\n x = new Uint8Array(256),\n i, b = n;\n\n hh[0] = 0x6a09e667;\n hh[1] = 0xbb67ae85;\n hh[2] = 0x3c6ef372;\n hh[3] = 0xa54ff53a;\n hh[4] = 0x510e527f;\n hh[5] = 0x9b05688c;\n hh[6] = 0x1f83d9ab;\n hh[7] = 0x5be0cd19;\n\n hl[0] = 0xf3bcc908;\n hl[1] = 0x84caa73b;\n hl[2] = 0xfe94f82b;\n hl[3] = 0x5f1d36f1;\n hl[4] = 0xade682d1;\n hl[5] = 0x2b3e6c1f;\n hl[6] = 0xfb41bd6b;\n hl[7] = 0x137e2179;\n\n crypto_hashblocks_hl(hh, hl, m, n);\n n %= 128;\n\n for (i = 0; i < n; i++) x[i] = m[b-n+i];\n x[n] = 128;\n\n n = 256-128*(n<112?1:0);\n x[n-9] = 0;\n ts64(x, n-8, (b / 0x20000000) | 0, b << 3);\n crypto_hashblocks_hl(hh, hl, x, n);\n\n for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]);\n\n return 0;\n}\n\nfunction add(p, q) {\n var a = gf(), b = gf(), c = gf(),\n d = gf(), e = gf(), f = gf(),\n g = gf(), h = gf(), t = gf();\n\n Z(a, p[1], p[0]);\n Z(t, q[1], q[0]);\n M(a, a, t);\n A(b, p[0], p[1]);\n A(t, q[0], q[1]);\n M(b, b, t);\n M(c, p[3], q[3]);\n M(c, c, D2);\n M(d, p[2], q[2]);\n A(d, d, d);\n Z(e, b, a);\n Z(f, d, c);\n A(g, d, c);\n A(h, b, a);\n\n M(p[0], e, f);\n M(p[1], h, g);\n M(p[2], g, f);\n M(p[3], e, h);\n}\n\nfunction cswap(p, q, b) {\n var i;\n for (i = 0; i < 4; i++) {\n sel25519(p[i], q[i], b);\n }\n}\n\nfunction pack(r, p) {\n var tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n M(tx, p[0], zi);\n M(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\n\nfunction scalarmult(p, q, s) {\n var b, i;\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for (i = 255; i >= 0; --i) {\n b = (s[(i/8)|0] >> (i&7)) & 1;\n cswap(p, q, b);\n add(q, p);\n add(p, p);\n cswap(p, q, b);\n }\n}\n\nfunction scalarbase(p, s) {\n var q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n M(q[3], X, Y);\n scalarmult(p, q, s);\n}\n\nfunction crypto_sign_keypair(pk, sk, seeded) {\n var d = new Uint8Array(64);\n var p = [gf(), gf(), gf(), gf()];\n var i;\n\n if (!seeded) randombytes(sk, 32);\n crypto_hash(d, sk, 32);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n\n scalarbase(p, d);\n pack(pk, p);\n\n for (i = 0; i < 32; i++) sk[i+32] = pk[i];\n return 0;\n}\n\nvar L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]);\n\nfunction modL(r, x) {\n var carry, i, j, k;\n for (i = 63; i >= 32; --i) {\n carry = 0;\n for (j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = Math.floor((x[j] + 128) / 256);\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for (j = 0; j < 32; j++) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for (j = 0; j < 32; j++) x[j] -= carry * L[j];\n for (i = 0; i < 32; i++) {\n x[i+1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\n\nfunction reduce(r) {\n var x = new Float64Array(64), i;\n for (i = 0; i < 64; i++) x[i] = r[i];\n for (i = 0; i < 64; i++) r[i] = 0;\n modL(r, x);\n}\n\n// Note: difference from C - smlen returned, not passed as argument.\nfunction crypto_sign(sm, m, n, sk) {\n var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64);\n var i, j, x = new Float64Array(64);\n var p = [gf(), gf(), gf(), gf()];\n\n crypto_hash(d, sk, 32);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n\n var smlen = n + 64;\n for (i = 0; i < n; i++) sm[64 + i] = m[i];\n for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i];\n\n crypto_hash(r, sm.subarray(32), n+32);\n reduce(r);\n scalarbase(p, r);\n pack(sm, p);\n\n for (i = 32; i < 64; i++) sm[i] = sk[i];\n crypto_hash(h, sm, n + 64);\n reduce(h);\n\n for (i = 0; i < 64; i++) x[i] = 0;\n for (i = 0; i < 32; i++) x[i] = r[i];\n for (i = 0; i < 32; i++) {\n for (j = 0; j < 32; j++) {\n x[i+j] += h[i] * d[j];\n }\n }\n\n modL(sm.subarray(32), x);\n return smlen;\n}\n\nfunction unpackneg(r, p) {\n var t = gf(), chk = gf(), num = gf(),\n den = gf(), den2 = gf(), den4 = gf(),\n den6 = gf();\n\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n S(num, r[1]);\n M(den, num, D);\n Z(num, num, r[2]);\n A(den, r[2], den);\n\n S(den2, den);\n S(den4, den2);\n M(den6, den4, den2);\n M(t, den6, num);\n M(t, t, den);\n\n pow2523(t, t);\n M(t, t, num);\n M(t, t, den);\n M(t, t, den);\n M(r[0], t, den);\n\n S(chk, r[0]);\n M(chk, chk, den);\n if (neq25519(chk, num)) M(r[0], r[0], I);\n\n S(chk, r[0]);\n M(chk, chk, den);\n if (neq25519(chk, num)) return -1;\n\n if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]);\n\n M(r[3], r[0], r[1]);\n return 0;\n}\n\nfunction crypto_sign_open(m, sm, n, pk) {\n var i;\n var t = new Uint8Array(32), h = new Uint8Array(64);\n var p = [gf(), gf(), gf(), gf()],\n q = [gf(), gf(), gf(), gf()];\n\n if (n < 64) return -1;\n\n if (unpackneg(q, pk)) return -1;\n\n for (i = 0; i < n; i++) m[i] = sm[i];\n for (i = 0; i < 32; i++) m[i+32] = pk[i];\n crypto_hash(h, m, n);\n reduce(h);\n scalarmult(p, q, h);\n\n scalarbase(q, sm.subarray(32));\n add(p, q);\n pack(t, p);\n\n n -= 64;\n if (crypto_verify_32(sm, 0, t, 0)) {\n for (i = 0; i < n; i++) m[i] = 0;\n return -1;\n }\n\n for (i = 0; i < n; i++) m[i] = sm[i + 64];\n return n;\n}\n\nvar crypto_secretbox_KEYBYTES = 32,\n crypto_secretbox_NONCEBYTES = 24,\n crypto_secretbox_ZEROBYTES = 32,\n crypto_secretbox_BOXZEROBYTES = 16,\n crypto_scalarmult_BYTES = 32,\n crypto_scalarmult_SCALARBYTES = 32,\n crypto_box_PUBLICKEYBYTES = 32,\n crypto_box_SECRETKEYBYTES = 32,\n crypto_box_BEFORENMBYTES = 32,\n crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES,\n crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES,\n crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES,\n crypto_sign_BYTES = 64,\n crypto_sign_PUBLICKEYBYTES = 32,\n crypto_sign_SECRETKEYBYTES = 64,\n crypto_sign_SEEDBYTES = 32,\n crypto_hash_BYTES = 64;\n\nnacl.lowlevel = {\n crypto_core_hsalsa20: crypto_core_hsalsa20,\n crypto_stream_xor: crypto_stream_xor,\n crypto_stream: crypto_stream,\n crypto_stream_salsa20_xor: crypto_stream_salsa20_xor,\n crypto_stream_salsa20: crypto_stream_salsa20,\n crypto_onetimeauth: crypto_onetimeauth,\n crypto_onetimeauth_verify: crypto_onetimeauth_verify,\n crypto_verify_16: crypto_verify_16,\n crypto_verify_32: crypto_verify_32,\n crypto_secretbox: crypto_secretbox,\n crypto_secretbox_open: crypto_secretbox_open,\n crypto_scalarmult: crypto_scalarmult,\n crypto_scalarmult_base: crypto_scalarmult_base,\n crypto_box_beforenm: crypto_box_beforenm,\n crypto_box_afternm: crypto_box_afternm,\n crypto_box: crypto_box,\n crypto_box_open: crypto_box_open,\n crypto_box_keypair: crypto_box_keypair,\n crypto_hash: crypto_hash,\n crypto_sign: crypto_sign,\n crypto_sign_keypair: crypto_sign_keypair,\n crypto_sign_open: crypto_sign_open,\n\n crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES,\n crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES,\n crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES,\n crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES,\n crypto_scalarmult_BYTES: crypto_scalarmult_BYTES,\n crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES,\n crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES,\n crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES,\n crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES,\n crypto_box_NONCEBYTES: crypto_box_NONCEBYTES,\n crypto_box_ZEROBYTES: crypto_box_ZEROBYTES,\n crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES,\n crypto_sign_BYTES: crypto_sign_BYTES,\n crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES,\n crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES,\n crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES,\n crypto_hash_BYTES: crypto_hash_BYTES,\n\n gf: gf,\n D: D,\n L: L,\n pack25519: pack25519,\n unpack25519: unpack25519,\n M: M,\n A: A,\n S: S,\n Z: Z,\n pow2523: pow2523,\n add: add,\n set25519: set25519,\n modL: modL,\n scalarmult: scalarmult,\n scalarbase: scalarbase,\n};\n\n/* High-level API */\n\nfunction checkLengths(k, n) {\n if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size');\n if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size');\n}\n\nfunction checkBoxLengths(pk, sk) {\n if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size');\n if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size');\n}\n\nfunction checkArrayTypes() {\n for (var i = 0; i < arguments.length; i++) {\n if (!(arguments[i] instanceof Uint8Array))\n throw new TypeError('unexpected type, use Uint8Array');\n }\n}\n\nfunction cleanup(arr) {\n for (var i = 0; i < arr.length; i++) arr[i] = 0;\n}\n\nnacl.randomBytes = function(n) {\n var b = new Uint8Array(n);\n randombytes(b, n);\n return b;\n};\n\nnacl.secretbox = function(msg, nonce, key) {\n checkArrayTypes(msg, nonce, key);\n checkLengths(key, nonce);\n var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length);\n var c = new Uint8Array(m.length);\n for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i];\n crypto_secretbox(c, m, m.length, nonce, key);\n return c.subarray(crypto_secretbox_BOXZEROBYTES);\n};\n\nnacl.secretbox.open = function(box, nonce, key) {\n checkArrayTypes(box, nonce, key);\n checkLengths(key, nonce);\n var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length);\n var m = new Uint8Array(c.length);\n for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i];\n if (c.length < 32) return null;\n if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return null;\n return m.subarray(crypto_secretbox_ZEROBYTES);\n};\n\nnacl.secretbox.keyLength = crypto_secretbox_KEYBYTES;\nnacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES;\nnacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES;\n\nnacl.scalarMult = function(n, p) {\n checkArrayTypes(n, p);\n if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');\n if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size');\n var q = new Uint8Array(crypto_scalarmult_BYTES);\n crypto_scalarmult(q, n, p);\n return q;\n};\n\nnacl.scalarMult.base = function(n) {\n checkArrayTypes(n);\n if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size');\n var q = new Uint8Array(crypto_scalarmult_BYTES);\n crypto_scalarmult_base(q, n);\n return q;\n};\n\nnacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES;\nnacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES;\n\nnacl.box = function(msg, nonce, publicKey, secretKey) {\n var k = nacl.box.before(publicKey, secretKey);\n return nacl.secretbox(msg, nonce, k);\n};\n\nnacl.box.before = function(publicKey, secretKey) {\n checkArrayTypes(publicKey, secretKey);\n checkBoxLengths(publicKey, secretKey);\n var k = new Uint8Array(crypto_box_BEFORENMBYTES);\n crypto_box_beforenm(k, publicKey, secretKey);\n return k;\n};\n\nnacl.box.after = nacl.secretbox;\n\nnacl.box.open = function(msg, nonce, publicKey, secretKey) {\n var k = nacl.box.before(publicKey, secretKey);\n return nacl.secretbox.open(msg, nonce, k);\n};\n\nnacl.box.open.after = nacl.secretbox.open;\n\nnacl.box.keyPair = function() {\n var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);\n var sk = new Uint8Array(crypto_box_SECRETKEYBYTES);\n crypto_box_keypair(pk, sk);\n return {publicKey: pk, secretKey: sk};\n};\n\nnacl.box.keyPair.fromSecretKey = function(secretKey) {\n checkArrayTypes(secretKey);\n if (secretKey.length !== crypto_box_SECRETKEYBYTES)\n throw new Error('bad secret key size');\n var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES);\n crypto_scalarmult_base(pk, secretKey);\n return {publicKey: pk, secretKey: new Uint8Array(secretKey)};\n};\n\nnacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES;\nnacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES;\nnacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES;\nnacl.box.nonceLength = crypto_box_NONCEBYTES;\nnacl.box.overheadLength = nacl.secretbox.overheadLength;\n\nnacl.sign = function(msg, secretKey) {\n checkArrayTypes(msg, secretKey);\n if (secretKey.length !== crypto_sign_SECRETKEYBYTES)\n throw new Error('bad secret key size');\n var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length);\n crypto_sign(signedMsg, msg, msg.length, secretKey);\n return signedMsg;\n};\n\nnacl.sign.open = function(signedMsg, publicKey) {\n checkArrayTypes(signedMsg, publicKey);\n if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)\n throw new Error('bad public key size');\n var tmp = new Uint8Array(signedMsg.length);\n var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey);\n if (mlen < 0) return null;\n var m = new Uint8Array(mlen);\n for (var i = 0; i < m.length; i++) m[i] = tmp[i];\n return m;\n};\n\nnacl.sign.detached = function(msg, secretKey) {\n var signedMsg = nacl.sign(msg, secretKey);\n var sig = new Uint8Array(crypto_sign_BYTES);\n for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i];\n return sig;\n};\n\nnacl.sign.detached.verify = function(msg, sig, publicKey) {\n checkArrayTypes(msg, sig, publicKey);\n if (sig.length !== crypto_sign_BYTES)\n throw new Error('bad signature size');\n if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)\n throw new Error('bad public key size');\n var sm = new Uint8Array(crypto_sign_BYTES + msg.length);\n var m = new Uint8Array(crypto_sign_BYTES + msg.length);\n var i;\n for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i];\n for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i];\n return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0);\n};\n\nnacl.sign.keyPair = function() {\n var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);\n var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);\n crypto_sign_keypair(pk, sk);\n return {publicKey: pk, secretKey: sk};\n};\n\nnacl.sign.keyPair.fromSecretKey = function(secretKey) {\n checkArrayTypes(secretKey);\n if (secretKey.length !== crypto_sign_SECRETKEYBYTES)\n throw new Error('bad secret key size');\n var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);\n for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i];\n return {publicKey: pk, secretKey: new Uint8Array(secretKey)};\n};\n\nnacl.sign.keyPair.fromSeed = function(seed) {\n checkArrayTypes(seed);\n if (seed.length !== crypto_sign_SEEDBYTES)\n throw new Error('bad seed size');\n var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES);\n var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES);\n for (var i = 0; i < 32; i++) sk[i] = seed[i];\n crypto_sign_keypair(pk, sk, true);\n return {publicKey: pk, secretKey: sk};\n};\n\nnacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES;\nnacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES;\nnacl.sign.seedLength = crypto_sign_SEEDBYTES;\nnacl.sign.signatureLength = crypto_sign_BYTES;\n\nnacl.hash = function(msg) {\n checkArrayTypes(msg);\n var h = new Uint8Array(crypto_hash_BYTES);\n crypto_hash(h, msg, msg.length);\n return h;\n};\n\nnacl.hash.hashLength = crypto_hash_BYTES;\n\nnacl.verify = function(x, y) {\n checkArrayTypes(x, y);\n // Zero length arguments are considered not equal.\n if (x.length === 0 || y.length === 0) return false;\n if (x.length !== y.length) return false;\n return (vn(x, 0, y, 0, x.length) === 0) ? true : false;\n};\n\nnacl.setPRNG = function(fn) {\n randombytes = fn;\n};\n\n(function() {\n // Initialize PRNG if environment provides CSPRNG.\n // If not, methods calling randombytes will throw.\n var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;\n if (crypto && crypto.getRandomValues) {\n // Browsers.\n var QUOTA = 65536;\n nacl.setPRNG(function(x, n) {\n var i, v = new Uint8Array(n);\n for (i = 0; i < n; i += QUOTA) {\n crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));\n }\n for (i = 0; i < n; i++) x[i] = v[i];\n cleanup(v);\n });\n } else if (typeof require !== 'undefined') {\n // Node.js.\n crypto = require('crypto');\n if (crypto && crypto.randomBytes) {\n nacl.setPRNG(function(x, n) {\n var i, v = crypto.randomBytes(n);\n for (i = 0; i < n; i++) x[i] = v[i];\n cleanup(v);\n });\n }\n }\n})();\n\n})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));\n","/**\n * Configure how integers in JSON response will be decoded.\n */\nvar IntDecoding;\n(function (IntDecoding) {\n /**\n * All integers will be decoded as Numbers, meaning any values greater than\n * Number.MAX_SAFE_INTEGER will lose precision.\n */\n IntDecoding[\"DEFAULT\"] = \"default\";\n /**\n * All integers will be decoded as Numbers, but if any values are greater than\n * Number.MAX_SAFE_INTEGER an error will be thrown.\n */\n IntDecoding[\"SAFE\"] = \"safe\";\n /**\n * Integers will be decoded as Numbers if they are less than or equal to\n * Number.MAX_SAFE_INTEGER, otherwise they will be decoded as BigInts.\n */\n IntDecoding[\"MIXED\"] = \"mixed\";\n /**\n * All integers will be decoded as BigInts.\n */\n IntDecoding[\"BIGINT\"] = \"bigint\";\n})(IntDecoding || (IntDecoding = {}));\nexport default IntDecoding;\n//# sourceMappingURL=intDecoding.js.map","import JSONbigWithoutConfig from 'json-bigint';\nimport IntDecoding from '../types/intDecoding';\nconst JSONbig = JSONbigWithoutConfig({ useNativeBigInt: true, strict: true });\n/**\n * Parse JSON with additional options.\n * @param str - The JSON string to parse.\n * @param options - Options object to configure how integers in\n * this request's JSON response will be decoded. Use the `intDecoding`\n * property with one of the following options:\n *\n * * \"default\": All integers will be decoded as Numbers, meaning any values greater than\n * Number.MAX_SAFE_INTEGER will lose precision.\n * * \"safe\": All integers will be decoded as Numbers, but if any values are greater than\n * Number.MAX_SAFE_INTEGER an error will be thrown.\n * * \"mixed\": Integers will be decoded as Numbers if they are less than or equal to\n * Number.MAX_SAFE_INTEGER, otherwise they will be decoded as BigInts.\n * * \"bigint\": All integers will be decoded as BigInts.\n *\n * Defaults to \"default\" if not included.\n */\nexport function parseJSON(str, options) {\n const intDecoding = options && options.intDecoding ? options.intDecoding : IntDecoding.DEFAULT;\n return JSONbig.parse(str, (_, value) => {\n if (value != null &&\n typeof value === 'object' &&\n Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n // let us remedy that\n Object.setPrototypeOf(value, Object.prototype);\n }\n if (typeof value === 'bigint') {\n if (intDecoding === 'safe' && value > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Integer exceeds maximum safe integer: ${value.toString()}. Try parsing with a different intDecoding option.`);\n }\n if (intDecoding === 'bigint' ||\n (intDecoding === 'mixed' && value > Number.MAX_SAFE_INTEGER)) {\n return value;\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value);\n }\n if (typeof value === 'number') {\n if (intDecoding === 'bigint' && Number.isInteger(value)) {\n return BigInt(value);\n }\n }\n return value;\n });\n}\n/**\n * ArrayEqual takes two arrays and return true if equal, false otherwise\n */\nexport function arrayEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n return Array.from(a).every((val, i) => val === b[i]);\n}\n/**\n * ConcatArrays takes n number arrays and returns a joint Uint8Array\n * @param arrs - An arbitrary number of n array-like number list arguments\n * @returns [a,b]\n */\nexport function concatArrays(...arrs) {\n const size = arrs.reduce((sum, arr) => sum + arr.length, 0);\n const c = new Uint8Array(size);\n let offset = 0;\n for (let i = 0; i < arrs.length; i++) {\n c.set(arrs[i], offset);\n offset += arrs[i].length;\n }\n return c;\n}\n/**\n * Remove undefined properties from an object\n * @param obj - An object, preferably one with some undefined properties\n * @returns A copy of the object with undefined properties removed\n */\nexport function removeUndefinedProperties(obj) {\n const mutableCopy = { ...obj };\n Object.keys(mutableCopy).forEach((key) => {\n if (typeof mutableCopy[key] === 'undefined')\n delete mutableCopy[key];\n });\n return mutableCopy;\n}\n/**\n * Check whether the environment is Node.js (as opposed to the browser)\n * @returns True if Node.js environment, false otherwise\n */\nexport function isNode() {\n return (\n // @ts-ignore\n typeof process === 'object' &&\n // @ts-ignore\n typeof process.versions === 'object' &&\n // @ts-ignore\n typeof process.versions.node !== 'undefined');\n}\n/**\n * Check whether the environment is ReactNative\n * @returns True if ReactNative, false otherwise\n */\nexport function isReactNative() {\n const { navigator } = globalThis;\n if (typeof navigator === 'object' && navigator.product === 'ReactNative') {\n return true;\n }\n return false;\n}\n//# sourceMappingURL=utils.js.map","import nacl from 'tweetnacl';\nimport sha512 from 'js-sha512';\nimport { isReactNative } from '../utils/utils';\nexport function genericHash(arr) {\n return sha512.sha512_256.array(arr);\n}\nexport function randomBytes(length) {\n if (isReactNative()) {\n console.warn(`It looks like you're running in react-native. In order to perform common crypto operations you will need to polyfill common operations such as crypto.getRandomValues`);\n }\n return nacl.randomBytes(length);\n}\nexport function keyPairFromSeed(seed) {\n return nacl.sign.keyPair.fromSeed(seed);\n}\nexport function keyPair() {\n const seed = randomBytes(nacl.box.secretKeyLength);\n return keyPairFromSeed(seed);\n}\nexport function isValidSignatureLength(len) {\n return len === nacl.sign.signatureLength;\n}\nexport function keyPairFromSecretKey(sk) {\n return nacl.sign.keyPair.fromSecretKey(sk);\n}\nexport function sign(msg, secretKey) {\n return nacl.sign.detached(msg, secretKey);\n}\nexport function bytesEqual(a, b) {\n return nacl.verify(a, b);\n}\nexport function verify(message, signature, verifyKey) {\n return nacl.sign.detached.verify(message, signature, verifyKey);\n}\n// constants\nexport const PUBLIC_KEY_LENGTH = nacl.sign.publicKeyLength;\nexport const SECRET_KEY_LENGTH = nacl.sign.secretKeyLength;\nexport const HASH_BYTES_LENGTH = 32;\nexport const SEED_BTYES_LENGTH = 32;\n//# sourceMappingURL=naclWrappers.js.map","import { concatArrays } from '../utils/utils';\n// NOTE: at the moment we specifically do not use Buffer.writeBigUInt64BE and\n// Buffer.readBigUInt64BE. This is because projects using webpack v4\n// automatically include an old version of the npm `buffer` package (v4.9.2 at\n// the time of writing), and this old version does not have these methods.\n/**\n * encodeUint64 converts an integer to its binary representation.\n * @param num - The number to convert. This must be an unsigned integer less than\n * 2^64.\n * @returns An 8-byte typed array containing the big-endian encoding of the input\n * integer.\n */\nexport function encodeUint64(num) {\n const isInteger = typeof num === 'bigint' || Number.isInteger(num);\n if (!isInteger || num < 0 || num > BigInt('0xffffffffffffffff')) {\n throw new Error('Input is not a 64-bit unsigned integer');\n }\n const encoding = new Uint8Array(8);\n const view = new DataView(encoding.buffer);\n view.setBigUint64(0, BigInt(num));\n return encoding;\n}\nexport function decodeUint64(data, decodingMode = 'safe') {\n if (decodingMode !== 'safe' &&\n decodingMode !== 'mixed' &&\n decodingMode !== 'bigint') {\n throw new Error(`Unknown decodingMode option: ${decodingMode}`);\n }\n if (data.byteLength === 0 || data.byteLength > 8) {\n throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${data.byteLength}`);\n }\n // insert 0s at the beginning if data is smaller than 8 bytes\n const padding = new Uint8Array(8 - data.byteLength);\n const encoding = concatArrays(padding, data);\n const view = new DataView(encoding.buffer);\n const num = view.getBigUint64(0);\n const isBig = num > BigInt(Number.MAX_SAFE_INTEGER);\n if (decodingMode === 'safe') {\n if (isBig) {\n throw new Error(`Integer exceeds maximum safe integer: ${num.toString()}. Try decoding with \"mixed\" or \"safe\" decodingMode.`);\n }\n return Number(num);\n }\n if (decodingMode === 'mixed' && !isBig) {\n return Number(num);\n }\n return num;\n}\n//# sourceMappingURL=uint64.js.map","import { Buffer } from 'buffer';\nimport base32 from 'hi-base32';\nimport * as nacl from '../nacl/naclWrappers';\nimport * as utils from '../utils/utils';\nimport { encodeUint64 } from './uint64';\nconst ALGORAND_ADDRESS_BYTE_LENGTH = 36;\nconst ALGORAND_CHECKSUM_BYTE_LENGTH = 4;\nconst ALGORAND_ADDRESS_LENGTH = 58;\nexport const ALGORAND_ZERO_ADDRESS_STRING = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ';\n// Convert \"MultisigAddr\" UTF-8 to byte array\nconst MULTISIG_PREIMG2ADDR_PREFIX = new Uint8Array([\n 77,\n 117,\n 108,\n 116,\n 105,\n 115,\n 105,\n 103,\n 65,\n 100,\n 100,\n 114,\n]);\nconst APP_ID_PREFIX = Buffer.from('appID');\nexport const MALFORMED_ADDRESS_ERROR_MSG = 'address seems to be malformed';\nexport const CHECKSUM_ADDRESS_ERROR_MSG = 'wrong checksum for address';\nexport const INVALID_MSIG_VERSION_ERROR_MSG = 'invalid multisig version';\nexport const INVALID_MSIG_THRESHOLD_ERROR_MSG = 'bad multisig threshold';\nexport const INVALID_MSIG_PK_ERROR_MSG = 'bad multisig public key - wrong length';\nexport const UNEXPECTED_PK_LEN_ERROR_MSG = 'nacl public key length is not 32 bytes';\n/**\n * decodeAddress takes an Algorand address in string form and decodes it into a Uint8Array.\n * @param address - an Algorand address with checksum.\n * @returns the decoded form of the address's public key and checksum\n */\nexport function decodeAddress(address) {\n if (typeof address !== 'string' || address.length !== ALGORAND_ADDRESS_LENGTH)\n throw new Error(MALFORMED_ADDRESS_ERROR_MSG);\n // try to decode\n const decoded = base32.decode.asBytes(address.toString());\n // Sanity check\n if (decoded.length !== ALGORAND_ADDRESS_BYTE_LENGTH)\n throw new Error(MALFORMED_ADDRESS_ERROR_MSG);\n // Find publickey and checksum\n const pk = new Uint8Array(decoded.slice(0, ALGORAND_ADDRESS_BYTE_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH));\n const cs = new Uint8Array(decoded.slice(nacl.PUBLIC_KEY_LENGTH, ALGORAND_ADDRESS_BYTE_LENGTH));\n // Compute checksum\n const checksum = nacl\n .genericHash(pk)\n .slice(nacl.HASH_BYTES_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH, nacl.HASH_BYTES_LENGTH);\n // Check if the checksum and the address are equal\n if (!utils.arrayEqual(checksum, cs))\n throw new Error(CHECKSUM_ADDRESS_ERROR_MSG);\n return { publicKey: pk, checksum: cs };\n}\n/**\n * isValidAddress checks if a string is a valid Algorand address.\n * @param address - an Algorand address with checksum.\n * @returns true if valid, false otherwise\n */\nexport function isValidAddress(address) {\n // Try to decode\n try {\n decodeAddress(address);\n }\n catch (e) {\n return false;\n }\n return true;\n}\n/**\n * encodeAddress takes an Algorand address as a Uint8Array and encodes it into a string with checksum.\n * @param address - a raw Algorand address\n * @returns the address and checksum encoded as a string.\n */\nexport function encodeAddress(address) {\n // compute checksum\n const checksum = nacl\n .genericHash(address)\n .slice(nacl.PUBLIC_KEY_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH, nacl.PUBLIC_KEY_LENGTH);\n const addr = base32.encode(utils.concatArrays(address, checksum));\n return addr.toString().slice(0, ALGORAND_ADDRESS_LENGTH); // removing the extra '===='\n}\n/**\n * fromMultisigPreImg takes multisig parameters and returns a 32 byte typed array public key,\n * representing an address that identifies the \"exact group, version, and public keys\" that are required for signing.\n * Hash(\"MultisigAddr\" || version uint8 || threshold uint8 || PK1 || PK2 || ...)\n * Encoding this output yields a human readable address.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param pks - array of typed array public keys\n */\nexport function fromMultisigPreImg({ version, threshold, pks, }) {\n if (version !== 1 || version > 255 || version < 0) {\n // ^ a tad redundant, but in case in the future version != 1, still check for uint8\n throw new Error(INVALID_MSIG_VERSION_ERROR_MSG);\n }\n if (threshold === 0 ||\n pks.length === 0 ||\n threshold > pks.length ||\n threshold > 255) {\n throw new Error(INVALID_MSIG_THRESHOLD_ERROR_MSG);\n }\n const pkLen = ALGORAND_ADDRESS_BYTE_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH;\n if (pkLen !== nacl.PUBLIC_KEY_LENGTH) {\n throw new Error(UNEXPECTED_PK_LEN_ERROR_MSG);\n }\n const merged = new Uint8Array(MULTISIG_PREIMG2ADDR_PREFIX.length + 2 + pkLen * pks.length);\n merged.set(MULTISIG_PREIMG2ADDR_PREFIX, 0);\n merged.set([version], MULTISIG_PREIMG2ADDR_PREFIX.length);\n merged.set([threshold], MULTISIG_PREIMG2ADDR_PREFIX.length + 1);\n for (let i = 0; i < pks.length; i++) {\n if (pks[i].length !== pkLen) {\n throw new Error(INVALID_MSIG_PK_ERROR_MSG);\n }\n merged.set(pks[i], MULTISIG_PREIMG2ADDR_PREFIX.length + 2 + i * pkLen);\n }\n return new Uint8Array(nacl.genericHash(merged));\n}\n/**\n * fromMultisigPreImgAddrs takes multisig parameters and returns a human readable Algorand address.\n * This is equivalent to fromMultisigPreImg, but interfaces with encoded addresses.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param addrs - array of encoded addresses\n */\nexport function fromMultisigPreImgAddrs({ version, threshold, addrs, }) {\n const pks = addrs.map((addr) => decodeAddress(addr).publicKey);\n return encodeAddress(fromMultisigPreImg({ version, threshold, pks }));\n}\n/**\n * Get the escrow address of an application.\n * @param appID - The ID of the application.\n * @returns The address corresponding to that application's escrow account.\n */\nexport function getApplicationAddress(appID) {\n const toBeSigned = utils.concatArrays(APP_ID_PREFIX, encodeUint64(appID));\n const hash = nacl.genericHash(toBeSigned);\n return encodeAddress(new Uint8Array(hash));\n}\n//# sourceMappingURL=address.js.map","/**\n * This file is a wrapper of msgpack.js.\n * The wrapper was written in order to ensure correct encoding of Algorand Transaction and other formats.\n * In particular, it matches go-algorand blockchain client, written in go (https://www.github.com/algorand/go-algorand.\n * Algorand's msgpack encoding follows to following rules -\n * 1. Every integer must be encoded to the smallest type possible (0-255-\\>8bit, 256-65535-\\>16bit, etx)\n * 2. All fields names must be sorted\n * 3. All empty and 0 fields should be omitted\n * 4. Every positive number must be encoded as uint\n * 5. Binary blob should be used for binary data and string for strings\n * */\nimport * as msgpack from 'algo-msgpack-with-bigint';\n// Errors\nexport const ERROR_CONTAINS_EMPTY_STRING = 'The object contains empty or 0 values. First empty or 0 value encountered during encoding: ';\n/**\n * containsEmpty returns true if any of the object's values are empty, false otherwise.\n * Empty arrays considered empty\n * @param obj - The object to check\n * @returns \\{true, empty key\\} if contains empty, \\{false, undefined\\} otherwise\n */\nfunction containsEmpty(obj) {\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n if (!obj[key] || obj[key].length === 0) {\n return { containsEmpty: true, firstEmptyKey: key };\n }\n }\n }\n return { containsEmpty: false, firstEmptyKey: undefined };\n}\n/**\n * rawEncode encodes objects using msgpack, regardless of whether there are\n * empty or 0 value fields.\n * @param obj - a dictionary to be encoded. May or may not contain empty or 0 values.\n * @returns msgpack representation of the object\n */\nexport function rawEncode(obj) {\n // enable the canonical option\n const options = { sortKeys: true };\n return msgpack.encode(obj, options);\n}\n/**\n * encode encodes objects using msgpack\n * @param obj - a dictionary to be encoded. Must not contain empty or 0 values.\n * @returns msgpack representation of the object\n * @throws Error containing ERROR_CONTAINS_EMPTY_STRING if the object contains empty or zero values\n */\nexport function encode(obj) {\n // Check for empty values\n const emptyCheck = containsEmpty(obj);\n if (emptyCheck.containsEmpty) {\n throw new Error(ERROR_CONTAINS_EMPTY_STRING + emptyCheck.firstEmptyKey);\n }\n // enable the canonical option\n return rawEncode(obj);\n}\nexport function decode(buffer) {\n return msgpack.decode(buffer);\n}\n//# sourceMappingURL=encoding.js.map","function translateBoxReference(reference, foreignApps, appIndex) {\n const referenceId = reference.appIndex;\n const referenceName = reference.name;\n const isOwnReference = referenceId === 0 || referenceId === appIndex;\n let index = 0;\n if (foreignApps != null) {\n // Foreign apps start from index 1; index 0 is its own app ID.\n index = foreignApps.indexOf(referenceId) + 1;\n }\n // Check if the app referenced is itself after checking the foreign apps array.\n // If index is zero, then the app ID was not found in the foreign apps array\n // or the foreign apps array was null.\n if (index === 0 && !isOwnReference) {\n // Error if the app is trying to reference a foreign app that was not in\n // its own foreign apps array.\n throw new Error(`Box ref with appId ${referenceId} not in foreign-apps`);\n }\n return { i: index, n: referenceName };\n}\n/**\n * translateBoxReferences translates an array of BoxReferences with app IDs\n * into an array of EncodedBoxReferences with foreign indices.\n */\nexport function translateBoxReferences(references, foreignApps, appIndex) {\n if (references == null)\n return [];\n return references.map((bx) => translateBoxReference(bx, foreignApps, appIndex));\n}\n//# sourceMappingURL=boxStorage.js.map","/**\n * Enum for application transaction types.\n *\n * The full list is available at https://developer.algorand.org/docs/reference/transactions/\n */\nexport var TransactionType;\n(function (TransactionType) {\n /**\n * Payment transaction\n */\n TransactionType[\"pay\"] = \"pay\";\n /**\n * Key registration transaction\n */\n TransactionType[\"keyreg\"] = \"keyreg\";\n /**\n * Asset configuration transaction\n */\n TransactionType[\"acfg\"] = \"acfg\";\n /**\n * Asset transfer transaction\n */\n TransactionType[\"axfer\"] = \"axfer\";\n /**\n * Asset freeze transaction\n */\n TransactionType[\"afrz\"] = \"afrz\";\n /**\n * Application transaction\n */\n TransactionType[\"appl\"] = \"appl\";\n /**\n * State proof transaction\n */\n TransactionType[\"stpf\"] = \"stpf\";\n})(TransactionType || (TransactionType = {}));\nexport function isTransactionType(s) {\n return (s === TransactionType.pay ||\n s === TransactionType.keyreg ||\n s === TransactionType.acfg ||\n s === TransactionType.axfer ||\n s === TransactionType.afrz ||\n s === TransactionType.appl ||\n s === TransactionType.stpf);\n}\n/**\n * Enums for application transactions on-transaction-complete behavior\n */\nexport var OnApplicationComplete;\n(function (OnApplicationComplete) {\n /**\n * NoOpOC indicates that an application transaction will simply call its\n * ApprovalProgram\n */\n OnApplicationComplete[OnApplicationComplete[\"NoOpOC\"] = 0] = \"NoOpOC\";\n /**\n * OptInOC indicates that an application transaction will allocate some\n * LocalState for the application in the sender's account\n */\n OnApplicationComplete[OnApplicationComplete[\"OptInOC\"] = 1] = \"OptInOC\";\n /**\n * CloseOutOC indicates that an application transaction will deallocate\n * some LocalState for the application from the user's account\n */\n OnApplicationComplete[OnApplicationComplete[\"CloseOutOC\"] = 2] = \"CloseOutOC\";\n /**\n * ClearStateOC is similar to CloseOutOC, but may never fail. This\n * allows users to reclaim their minimum balance from an application\n * they no longer wish to opt in to.\n */\n OnApplicationComplete[OnApplicationComplete[\"ClearStateOC\"] = 3] = \"ClearStateOC\";\n /**\n * UpdateApplicationOC indicates that an application transaction will\n * update the ApprovalProgram and ClearStateProgram for the application\n */\n OnApplicationComplete[OnApplicationComplete[\"UpdateApplicationOC\"] = 4] = \"UpdateApplicationOC\";\n /**\n * DeleteApplicationOC indicates that an application transaction will\n * delete the AppParams for the application from the creator's balance\n * record\n */\n OnApplicationComplete[OnApplicationComplete[\"DeleteApplicationOC\"] = 5] = \"DeleteApplicationOC\";\n})(OnApplicationComplete || (OnApplicationComplete = {}));\n//# sourceMappingURL=base.js.map","import { Buffer } from 'buffer';\nimport base32 from 'hi-base32';\nimport * as address from './encoding/address';\nimport * as encoding from './encoding/encoding';\nimport * as nacl from './nacl/naclWrappers';\nimport * as utils from './utils/utils';\nimport { translateBoxReferences } from './boxStorage';\nimport { TransactionType, isTransactionType, } from './types/transactions/base';\nconst ALGORAND_TRANSACTION_LENGTH = 52;\nexport const ALGORAND_MIN_TX_FEE = 1000; // version v5\nconst ALGORAND_TRANSACTION_LEASE_LENGTH = 32;\nconst ALGORAND_MAX_ASSET_DECIMALS = 19;\nconst NUM_ADDL_BYTES_AFTER_SIGNING = 75; // NUM_ADDL_BYTES_AFTER_SIGNING is the number of bytes added to a txn after signing it\nconst ALGORAND_TRANSACTION_LEASE_LABEL_LENGTH = 5;\nconst ALGORAND_TRANSACTION_ADDRESS_LENGTH = 32;\nconst ALGORAND_TRANSACTION_REKEY_LABEL_LENGTH = 5;\nconst ASSET_METADATA_HASH_LENGTH = 32;\nconst KEYREG_VOTE_KEY_LENGTH = 32;\nconst KEYREG_SELECTION_KEY_LENGTH = 32;\nconst KEYREG_STATE_PROOF_KEY_LENGTH = 64;\nfunction getKeyregKey(input, inputName, length) {\n if (input == null) {\n return undefined;\n }\n let inputAsBuffer;\n if (typeof input === 'string') {\n inputAsBuffer = Buffer.from(input, 'base64');\n }\n else if (input.constructor === Uint8Array) {\n inputAsBuffer = Buffer.from(input);\n }\n else if (Buffer.isBuffer(input)) {\n inputAsBuffer = input;\n }\n if (inputAsBuffer == null || inputAsBuffer.byteLength !== length) {\n throw Error(`${inputName} must be a ${length} byte Uint8Array or Buffer or base64 string.`);\n }\n return inputAsBuffer;\n}\n/**\n * Transaction enables construction of Algorand transactions\n * */\nexport class Transaction {\n constructor({ ...transaction }) {\n this.name = 'Transaction';\n this.tag = Buffer.from('TX');\n // Populate defaults\n /* eslint-disable no-param-reassign */\n const defaults = {\n type: TransactionType.pay,\n flatFee: false,\n nonParticipation: false,\n };\n // Default type\n if (typeof transaction.type === 'undefined') {\n transaction.type = defaults.type;\n }\n // Default flatFee\n if (typeof transaction.flatFee ===\n 'undefined') {\n transaction.flatFee =\n defaults.flatFee;\n }\n // Default nonParticipation\n if (transaction.type === TransactionType.keyreg &&\n typeof transaction.voteKey !== 'undefined' &&\n typeof transaction.nonParticipation === 'undefined') {\n transaction.nonParticipation = defaults.nonParticipation;\n }\n /* eslint-enable no-param-reassign */\n // Move suggested parameters from its object to inline\n if (transaction.suggestedParams !== undefined) {\n // Create a temporary reference to the transaction object that has params inline and also as a suggested params object\n // - Helpful for moving params from named object to inline\n const reference = transaction;\n reference.genesisHash = reference.suggestedParams.genesisHash;\n reference.fee = reference.suggestedParams.fee;\n if (reference.suggestedParams.flatFee !== undefined)\n reference.flatFee = reference.suggestedParams.flatFee;\n reference.firstRound = reference.suggestedParams.firstRound;\n reference.lastRound = reference.suggestedParams.lastRound;\n reference.genesisID = reference.suggestedParams.genesisID;\n }\n // At this point all suggestedParams have been moved to be inline, so we can reassign the transaction object type\n // to one which is more useful as we prepare properties for storing\n const txn = transaction;\n txn.from = address.decodeAddress(txn.from);\n if (txn.to !== undefined)\n txn.to = address.decodeAddress(txn.to);\n if (txn.closeRemainderTo !== undefined)\n txn.closeRemainderTo = address.decodeAddress(txn.closeRemainderTo);\n if (txn.assetManager !== undefined)\n txn.assetManager = address.decodeAddress(txn.assetManager);\n if (txn.assetReserve !== undefined)\n txn.assetReserve = address.decodeAddress(txn.assetReserve);\n if (txn.assetFreeze !== undefined)\n txn.assetFreeze = address.decodeAddress(txn.assetFreeze);\n if (txn.assetClawback !== undefined)\n txn.assetClawback = address.decodeAddress(txn.assetClawback);\n if (txn.assetRevocationTarget !== undefined)\n txn.assetRevocationTarget = address.decodeAddress(txn.assetRevocationTarget);\n if (txn.freezeAccount !== undefined)\n txn.freezeAccount = address.decodeAddress(txn.freezeAccount);\n if (txn.reKeyTo !== undefined)\n txn.reKeyTo = address.decodeAddress(txn.reKeyTo);\n if (txn.genesisHash === undefined)\n throw Error('genesis hash must be specified and in a base64 string.');\n txn.genesisHash = Buffer.from(txn.genesisHash, 'base64');\n if (txn.amount !== undefined &&\n (!(Number.isSafeInteger(txn.amount) ||\n (typeof txn.amount === 'bigint' &&\n txn.amount <= BigInt('0xffffffffffffffff'))) ||\n txn.amount < 0))\n throw Error('Amount must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.');\n if (!Number.isSafeInteger(txn.fee) || txn.fee < 0)\n throw Error('fee must be a positive number and smaller than 2^53-1');\n if (!Number.isSafeInteger(txn.firstRound) || txn.firstRound < 0)\n throw Error('firstRound must be a positive number');\n if (!Number.isSafeInteger(txn.lastRound) || txn.lastRound < 0)\n throw Error('lastRound must be a positive number');\n if (txn.extraPages !== undefined &&\n (!Number.isInteger(txn.extraPages) ||\n txn.extraPages < 0 ||\n txn.extraPages > 3))\n throw Error('extraPages must be an Integer between and including 0 to 3');\n if (txn.assetTotal !== undefined &&\n (!(Number.isSafeInteger(txn.assetTotal) ||\n (typeof txn.assetTotal === 'bigint' &&\n txn.assetTotal <= BigInt('0xffffffffffffffff'))) ||\n txn.assetTotal < 0))\n throw Error('Total asset issuance must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.');\n if (txn.assetDecimals !== undefined &&\n (!Number.isSafeInteger(txn.assetDecimals) ||\n txn.assetDecimals < 0 ||\n txn.assetDecimals > ALGORAND_MAX_ASSET_DECIMALS))\n throw Error(`assetDecimals must be a positive number and smaller than ${ALGORAND_MAX_ASSET_DECIMALS.toString()}`);\n if (txn.assetIndex !== undefined &&\n (!Number.isSafeInteger(txn.assetIndex) || txn.assetIndex < 0))\n throw Error('Asset index must be a positive number and smaller than 2^53-1');\n if (txn.appIndex !== undefined &&\n (!Number.isSafeInteger(txn.appIndex) || txn.appIndex < 0))\n throw Error('Application index must be a positive number and smaller than 2^53-1');\n if (txn.appLocalInts !== undefined &&\n (!Number.isSafeInteger(txn.appLocalInts) || txn.appLocalInts < 0))\n throw Error('Application local ints count must be a positive number and smaller than 2^53-1');\n if (txn.appLocalByteSlices !== undefined &&\n (!Number.isSafeInteger(txn.appLocalByteSlices) ||\n txn.appLocalByteSlices < 0))\n throw Error('Application local byte slices count must be a positive number and smaller than 2^53-1');\n if (txn.appGlobalInts !== undefined &&\n (!Number.isSafeInteger(txn.appGlobalInts) || txn.appGlobalInts < 0))\n throw Error('Application global ints count must be a positive number and smaller than 2^53-1');\n if (txn.appGlobalByteSlices !== undefined &&\n (!Number.isSafeInteger(txn.appGlobalByteSlices) ||\n txn.appGlobalByteSlices < 0))\n throw Error('Application global byte slices count must be a positive number and smaller than 2^53-1');\n if (txn.appApprovalProgram !== undefined) {\n if (txn.appApprovalProgram.constructor !== Uint8Array)\n throw Error('appApprovalProgram must be a Uint8Array.');\n }\n if (txn.appClearProgram !== undefined) {\n if (txn.appClearProgram.constructor !== Uint8Array)\n throw Error('appClearProgram must be a Uint8Array.');\n }\n if (txn.appArgs !== undefined) {\n if (!Array.isArray(txn.appArgs))\n throw Error('appArgs must be an Array of Uint8Array.');\n txn.appArgs = txn.appArgs.slice();\n txn.appArgs.forEach((arg) => {\n if (arg.constructor !== Uint8Array)\n throw Error('each element of AppArgs must be a Uint8Array.');\n });\n }\n else {\n txn.appArgs = [];\n }\n if (txn.appAccounts !== undefined) {\n if (!Array.isArray(txn.appAccounts))\n throw Error('appAccounts must be an Array of addresses.');\n txn.appAccounts = txn.appAccounts.map((addressAsString) => address.decodeAddress(addressAsString));\n }\n if (txn.appForeignApps !== undefined) {\n if (!Array.isArray(txn.appForeignApps))\n throw Error('appForeignApps must be an Array of integers.');\n txn.appForeignApps = txn.appForeignApps.slice();\n txn.appForeignApps.forEach((foreignAppIndex) => {\n if (!Number.isSafeInteger(foreignAppIndex) || foreignAppIndex < 0)\n throw Error('each foreign application index must be a positive number and smaller than 2^53-1');\n });\n }\n if (txn.appForeignAssets !== undefined) {\n if (!Array.isArray(txn.appForeignAssets))\n throw Error('appForeignAssets must be an Array of integers.');\n txn.appForeignAssets = txn.appForeignAssets.slice();\n txn.appForeignAssets.forEach((foreignAssetIndex) => {\n if (!Number.isSafeInteger(foreignAssetIndex) || foreignAssetIndex < 0)\n throw Error('each foreign asset index must be a positive number and smaller than 2^53-1');\n });\n }\n if (txn.boxes !== undefined) {\n if (!Array.isArray(txn.boxes))\n throw Error('boxes must be an Array of BoxReference.');\n txn.boxes = txn.boxes.slice();\n txn.boxes.forEach((box) => {\n if (!Number.isSafeInteger(box.appIndex) ||\n box.name.constructor !== Uint8Array)\n throw Error('box app index must be a number and name must be an Uint8Array.');\n });\n }\n if (txn.assetMetadataHash !== undefined &&\n txn.assetMetadataHash.length !== 0) {\n if (typeof txn.assetMetadataHash === 'string') {\n txn.assetMetadataHash = new Uint8Array(Buffer.from(txn.assetMetadataHash));\n }\n if (txn.assetMetadataHash.constructor !== Uint8Array ||\n txn.assetMetadataHash.byteLength !== ASSET_METADATA_HASH_LENGTH) {\n throw Error(`assetMetadataHash must be a ${ASSET_METADATA_HASH_LENGTH} byte Uint8Array or string.`);\n }\n if (txn.assetMetadataHash.every((value) => value === 0)) {\n // if hash contains all 0s, omit it\n txn.assetMetadataHash = undefined;\n }\n }\n else {\n txn.assetMetadataHash = undefined;\n }\n if (txn.note !== undefined) {\n if (txn.note.constructor !== Uint8Array)\n throw Error('note must be a Uint8Array.');\n }\n else {\n txn.note = new Uint8Array(0);\n }\n if (txn.lease !== undefined) {\n if (txn.lease.constructor !== Uint8Array)\n throw Error('lease must be a Uint8Array.');\n if (txn.lease.length !== ALGORAND_TRANSACTION_LEASE_LENGTH)\n throw Error(`lease must be of length ${ALGORAND_TRANSACTION_LEASE_LENGTH.toString()}.`);\n if (txn.lease.every((value) => value === 0)) {\n // if lease contains all 0s, omit it\n txn.lease = new Uint8Array(0);\n }\n }\n else {\n txn.lease = new Uint8Array(0);\n }\n txn.voteKey = getKeyregKey(txn.voteKey, 'voteKey', KEYREG_VOTE_KEY_LENGTH);\n txn.selectionKey = getKeyregKey(txn.selectionKey, 'selectionKey', KEYREG_SELECTION_KEY_LENGTH);\n txn.stateProofKey = getKeyregKey(txn.stateProofKey, 'stateProofKey', KEYREG_STATE_PROOF_KEY_LENGTH);\n // Checking non-participation key registration\n if (txn.nonParticipation &&\n (txn.voteKey ||\n txn.selectionKey ||\n txn.voteFirst ||\n txn.stateProofKey ||\n txn.voteLast ||\n txn.voteKeyDilution)) {\n throw new Error('nonParticipation is true but participation params are present.');\n }\n // Checking online key registration\n if (!txn.nonParticipation &&\n (txn.voteKey ||\n txn.selectionKey ||\n txn.stateProofKey ||\n txn.voteFirst ||\n txn.voteLast ||\n txn.voteKeyDilution) &&\n !(txn.voteKey &&\n txn.selectionKey &&\n txn.voteFirst &&\n txn.voteLast &&\n txn.voteKeyDilution)\n // stateProofKey not included here for backwards compatibility\n ) {\n throw new Error('online key registration missing at least one of the following fields: ' +\n 'voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution');\n }\n // The last option is an offline key registration where all the fields\n // nonParticipation, voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution\n // are all undefined/false\n // Remove unwanted properties and store transaction on instance\n delete txn.suggestedParams;\n Object.assign(this, utils.removeUndefinedProperties(txn));\n // Modify Fee\n if (!txn.flatFee) {\n this.fee *= this.estimateSize();\n // If suggested fee too small and will be rejected, set to min tx fee\n if (this.fee < ALGORAND_MIN_TX_FEE) {\n this.fee = ALGORAND_MIN_TX_FEE;\n }\n }\n // say we are aware of groups\n this.group = undefined;\n // stpf fields\n if (txn.stateProofType !== undefined &&\n (!Number.isSafeInteger(txn.stateProofType) || txn.stateProofType < 0))\n throw Error('State Proof type must be a positive number and smaller than 2^53-1');\n if (txn.stateProofMessage !== undefined) {\n if (txn.stateProofMessage.constructor !== Uint8Array)\n throw Error('stateProofMessage must be a Uint8Array.');\n }\n else {\n txn.stateProofMessage = new Uint8Array(0);\n }\n if (txn.stateProof !== undefined) {\n if (txn.stateProof.constructor !== Uint8Array)\n throw Error('stateProof must be a Uint8Array.');\n }\n else {\n txn.stateProof = new Uint8Array(0);\n }\n }\n // eslint-disable-next-line camelcase\n get_obj_for_encoding() {\n if (this.type === 'pay') {\n const txn = {\n amt: this.amount,\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n type: 'pay',\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n grp: this.group,\n };\n // parse close address\n if (this.closeRemainderTo !== undefined &&\n address.encodeAddress(this.closeRemainderTo.publicKey) !==\n address.ALGORAND_ZERO_ADDRESS_STRING) {\n txn.close = Buffer.from(this.closeRemainderTo.publicKey);\n }\n if (this.reKeyTo !== undefined) {\n txn.rekey = Buffer.from(this.reKeyTo.publicKey);\n }\n // allowed zero values\n if (this.to !== undefined)\n txn.rcv = Buffer.from(this.to.publicKey);\n if (!txn.note.length)\n delete txn.note;\n if (!txn.amt)\n delete txn.amt;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (txn.grp === undefined)\n delete txn.grp;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.rekey)\n delete txn.rekey;\n return txn;\n }\n if (this.type === 'keyreg') {\n const txn = {\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n type: this.type,\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n grp: this.group,\n votekey: this.voteKey,\n selkey: this.selectionKey,\n sprfkey: this.stateProofKey,\n votefst: this.voteFirst,\n votelst: this.voteLast,\n votekd: this.voteKeyDilution,\n };\n // allowed zero values\n if (!txn.note.length)\n delete txn.note;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (txn.grp === undefined)\n delete txn.grp;\n if (this.reKeyTo !== undefined) {\n txn.rekey = Buffer.from(this.reKeyTo.publicKey);\n }\n if (this.nonParticipation) {\n txn.nonpart = true;\n }\n if (!txn.selkey)\n delete txn.selkey;\n if (!txn.votekey)\n delete txn.votekey;\n if (!txn.sprfkey)\n delete txn.sprfkey;\n if (!txn.votefst)\n delete txn.votefst;\n if (!txn.votelst)\n delete txn.votelst;\n if (!txn.votekd)\n delete txn.votekd;\n return txn;\n }\n if (this.type === 'acfg') {\n // asset creation, or asset reconfigure, or asset destruction\n const txn = {\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n type: this.type,\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n grp: this.group,\n caid: this.assetIndex,\n apar: {\n t: this.assetTotal,\n df: this.assetDefaultFrozen,\n dc: this.assetDecimals,\n },\n };\n if (this.assetManager !== undefined)\n txn.apar.m = Buffer.from(this.assetManager.publicKey);\n if (this.assetReserve !== undefined)\n txn.apar.r = Buffer.from(this.assetReserve.publicKey);\n if (this.assetFreeze !== undefined)\n txn.apar.f = Buffer.from(this.assetFreeze.publicKey);\n if (this.assetClawback !== undefined)\n txn.apar.c = Buffer.from(this.assetClawback.publicKey);\n if (this.assetName !== undefined)\n txn.apar.an = this.assetName;\n if (this.assetUnitName !== undefined)\n txn.apar.un = this.assetUnitName;\n if (this.assetURL !== undefined)\n txn.apar.au = this.assetURL;\n if (this.assetMetadataHash !== undefined)\n txn.apar.am = Buffer.from(this.assetMetadataHash);\n // allowed zero values\n if (!txn.note.length)\n delete txn.note;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.amt)\n delete txn.amt;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (this.reKeyTo !== undefined) {\n txn.rekey = Buffer.from(this.reKeyTo.publicKey);\n }\n if (!txn.caid)\n delete txn.caid;\n if (!txn.apar.t &&\n !txn.apar.un &&\n !txn.apar.an &&\n !txn.apar.df &&\n !txn.apar.m &&\n !txn.apar.r &&\n !txn.apar.f &&\n !txn.apar.c &&\n !txn.apar.au &&\n !txn.apar.am &&\n !txn.apar.dc) {\n delete txn.apar;\n }\n else {\n if (!txn.apar.t)\n delete txn.apar.t;\n if (!txn.apar.dc)\n delete txn.apar.dc;\n if (!txn.apar.un)\n delete txn.apar.un;\n if (!txn.apar.an)\n delete txn.apar.an;\n if (!txn.apar.df)\n delete txn.apar.df;\n if (!txn.apar.m)\n delete txn.apar.m;\n if (!txn.apar.r)\n delete txn.apar.r;\n if (!txn.apar.f)\n delete txn.apar.f;\n if (!txn.apar.c)\n delete txn.apar.c;\n if (!txn.apar.au)\n delete txn.apar.au;\n if (!txn.apar.am)\n delete txn.apar.am;\n }\n if (txn.grp === undefined)\n delete txn.grp;\n return txn;\n }\n if (this.type === 'axfer') {\n // asset transfer, acceptance, revocation, mint, or burn\n const txn = {\n aamt: this.amount,\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n arcv: Buffer.from(this.to.publicKey),\n type: this.type,\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n grp: this.group,\n xaid: this.assetIndex,\n };\n if (this.closeRemainderTo !== undefined)\n txn.aclose = Buffer.from(this.closeRemainderTo.publicKey);\n if (this.assetRevocationTarget !== undefined)\n txn.asnd = Buffer.from(this.assetRevocationTarget.publicKey);\n // allowed zero values\n if (!txn.note.length)\n delete txn.note;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.aamt)\n delete txn.aamt;\n if (!txn.amt)\n delete txn.amt;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (txn.grp === undefined)\n delete txn.grp;\n if (!txn.aclose)\n delete txn.aclose;\n if (!txn.asnd)\n delete txn.asnd;\n if (!txn.rekey)\n delete txn.rekey;\n if (this.reKeyTo !== undefined) {\n txn.rekey = Buffer.from(this.reKeyTo.publicKey);\n }\n return txn;\n }\n if (this.type === 'afrz') {\n // asset freeze or unfreeze\n const txn = {\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n type: this.type,\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n grp: this.group,\n faid: this.assetIndex,\n afrz: this.freezeState,\n };\n if (this.freezeAccount !== undefined)\n txn.fadd = Buffer.from(this.freezeAccount.publicKey);\n // allowed zero values\n if (!txn.note.length)\n delete txn.note;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.amt)\n delete txn.amt;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (!txn.afrz)\n delete txn.afrz;\n if (txn.grp === undefined)\n delete txn.grp;\n if (this.reKeyTo !== undefined) {\n txn.rekey = Buffer.from(this.reKeyTo.publicKey);\n }\n return txn;\n }\n if (this.type === 'appl') {\n // application call of some kind\n const txn = {\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n type: this.type,\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n grp: this.group,\n apid: this.appIndex,\n apan: this.appOnComplete,\n apls: {\n nui: this.appLocalInts,\n nbs: this.appLocalByteSlices,\n },\n apgs: {\n nui: this.appGlobalInts,\n nbs: this.appGlobalByteSlices,\n },\n apfa: this.appForeignApps,\n apas: this.appForeignAssets,\n apep: this.extraPages,\n apbx: translateBoxReferences(this.boxes, this.appForeignApps, this.appIndex),\n };\n if (this.reKeyTo !== undefined) {\n txn.rekey = Buffer.from(this.reKeyTo.publicKey);\n }\n if (this.appApprovalProgram !== undefined) {\n txn.apap = Buffer.from(this.appApprovalProgram);\n }\n if (this.appClearProgram !== undefined) {\n txn.apsu = Buffer.from(this.appClearProgram);\n }\n if (this.appArgs !== undefined) {\n txn.apaa = this.appArgs.map((arg) => Buffer.from(arg));\n }\n if (this.appAccounts !== undefined) {\n txn.apat = this.appAccounts.map((decodedAddress) => Buffer.from(decodedAddress.publicKey));\n }\n // allowed zero values\n if (!txn.note.length)\n delete txn.note;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.amt)\n delete txn.amt;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (!txn.apid)\n delete txn.apid;\n if (!txn.apls.nui)\n delete txn.apls.nui;\n if (!txn.apls.nbs)\n delete txn.apls.nbs;\n if (!txn.apls.nui && !txn.apls.nbs)\n delete txn.apls;\n if (!txn.apgs.nui)\n delete txn.apgs.nui;\n if (!txn.apgs.nbs)\n delete txn.apgs.nbs;\n if (!txn.apaa || !txn.apaa.length)\n delete txn.apaa;\n if (!txn.apgs.nui && !txn.apgs.nbs)\n delete txn.apgs;\n if (!txn.apap)\n delete txn.apap;\n if (!txn.apsu)\n delete txn.apsu;\n if (!txn.apan)\n delete txn.apan;\n if (!txn.apfa || !txn.apfa.length)\n delete txn.apfa;\n if (!txn.apas || !txn.apas.length)\n delete txn.apas;\n for (const box of txn.apbx) {\n if (!box.i)\n delete box.i;\n if (!box.n || !box.n.length)\n delete box.n;\n }\n if (!txn.apbx || !txn.apbx.length)\n delete txn.apbx;\n if (!txn.apat || !txn.apat.length)\n delete txn.apat;\n if (!txn.apep)\n delete txn.apep;\n if (txn.grp === undefined)\n delete txn.grp;\n return txn;\n }\n if (this.type === 'stpf') {\n // state proof txn\n const txn = {\n fee: this.fee,\n fv: this.firstRound,\n lv: this.lastRound,\n note: Buffer.from(this.note),\n snd: Buffer.from(this.from.publicKey),\n type: this.type,\n gen: this.genesisID,\n gh: this.genesisHash,\n lx: Buffer.from(this.lease),\n sptype: this.stateProofType,\n spmsg: Buffer.from(this.stateProofMessage),\n sp: Buffer.from(this.stateProof),\n };\n // allowed zero values\n if (!txn.sptype)\n delete txn.sptype;\n if (!txn.note.length)\n delete txn.note;\n if (!txn.lx.length)\n delete txn.lx;\n if (!txn.amt)\n delete txn.amt;\n if (!txn.fee)\n delete txn.fee;\n if (!txn.fv)\n delete txn.fv;\n if (!txn.gen)\n delete txn.gen;\n if (!txn.apid)\n delete txn.apid;\n if (!txn.apaa || !txn.apaa.length)\n delete txn.apaa;\n if (!txn.apap)\n delete txn.apap;\n if (!txn.apsu)\n delete txn.apsu;\n if (!txn.apan)\n delete txn.apan;\n if (!txn.apfa || !txn.apfa.length)\n delete txn.apfa;\n if (!txn.apas || !txn.apas.length)\n delete txn.apas;\n if (!txn.apat || !txn.apat.length)\n delete txn.apat;\n if (!txn.apep)\n delete txn.apep;\n if (txn.grp === undefined)\n delete txn.grp;\n return txn;\n }\n return undefined;\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(txnForEnc) {\n const txn = Object.create(this.prototype);\n txn.name = 'Transaction';\n txn.tag = Buffer.from('TX');\n txn.genesisID = txnForEnc.gen;\n txn.genesisHash = Buffer.from(txnForEnc.gh);\n if (!isTransactionType(txnForEnc.type)) {\n throw new Error(`Unrecognized transaction type: ${txnForEnc.type}`);\n }\n txn.type = txnForEnc.type;\n txn.fee = txnForEnc.fee;\n txn.firstRound = txnForEnc.fv;\n txn.lastRound = txnForEnc.lv;\n txn.note = new Uint8Array(txnForEnc.note);\n txn.lease = new Uint8Array(txnForEnc.lx);\n txn.from = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.snd)));\n if (txnForEnc.grp !== undefined)\n txn.group = Buffer.from(txnForEnc.grp);\n if (txnForEnc.rekey !== undefined)\n txn.reKeyTo = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.rekey)));\n if (txnForEnc.type === 'pay') {\n txn.amount = txnForEnc.amt;\n txn.to = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.rcv)));\n if (txnForEnc.close !== undefined)\n txn.closeRemainderTo = address.decodeAddress(address.encodeAddress(txnForEnc.close));\n }\n else if (txnForEnc.type === 'keyreg') {\n if (txnForEnc.votekey !== undefined) {\n txn.voteKey = Buffer.from(txnForEnc.votekey);\n }\n if (txnForEnc.selkey !== undefined) {\n txn.selectionKey = Buffer.from(txnForEnc.selkey);\n }\n if (txnForEnc.sprfkey !== undefined) {\n txn.stateProofKey = Buffer.from(txnForEnc.sprfkey);\n }\n if (txnForEnc.votekd !== undefined) {\n txn.voteKeyDilution = txnForEnc.votekd;\n }\n if (txnForEnc.votefst !== undefined) {\n txn.voteFirst = txnForEnc.votefst;\n }\n if (txnForEnc.votelst !== undefined) {\n txn.voteLast = txnForEnc.votelst;\n }\n if (txnForEnc.nonpart !== undefined) {\n txn.nonParticipation = txnForEnc.nonpart;\n }\n }\n else if (txnForEnc.type === 'acfg') {\n // asset creation, or asset reconfigure, or asset destruction\n if (txnForEnc.caid !== undefined) {\n txn.assetIndex = txnForEnc.caid;\n }\n if (txnForEnc.apar !== undefined) {\n txn.assetTotal = txnForEnc.apar.t;\n txn.assetDefaultFrozen = txnForEnc.apar.df;\n if (txnForEnc.apar.dc !== undefined)\n txn.assetDecimals = txnForEnc.apar.dc;\n if (txnForEnc.apar.m !== undefined)\n txn.assetManager = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.apar.m)));\n if (txnForEnc.apar.r !== undefined)\n txn.assetReserve = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.apar.r)));\n if (txnForEnc.apar.f !== undefined)\n txn.assetFreeze = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.apar.f)));\n if (txnForEnc.apar.c !== undefined)\n txn.assetClawback = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.apar.c)));\n if (txnForEnc.apar.un !== undefined)\n txn.assetUnitName = txnForEnc.apar.un;\n if (txnForEnc.apar.an !== undefined)\n txn.assetName = txnForEnc.apar.an;\n if (txnForEnc.apar.au !== undefined)\n txn.assetURL = txnForEnc.apar.au;\n if (txnForEnc.apar.am !== undefined)\n txn.assetMetadataHash = txnForEnc.apar.am;\n }\n }\n else if (txnForEnc.type === 'axfer') {\n // asset transfer, acceptance, revocation, mint, or burn\n if (txnForEnc.xaid !== undefined) {\n txn.assetIndex = txnForEnc.xaid;\n }\n if (txnForEnc.aamt !== undefined)\n txn.amount = txnForEnc.aamt;\n if (txnForEnc.aclose !== undefined) {\n txn.closeRemainderTo = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.aclose)));\n }\n if (txnForEnc.asnd !== undefined) {\n txn.assetRevocationTarget = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.asnd)));\n }\n txn.to = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.arcv)));\n }\n else if (txnForEnc.type === 'afrz') {\n if (txnForEnc.afrz !== undefined) {\n txn.freezeState = txnForEnc.afrz;\n }\n if (txnForEnc.faid !== undefined) {\n txn.assetIndex = txnForEnc.faid;\n }\n txn.freezeAccount = address.decodeAddress(address.encodeAddress(new Uint8Array(txnForEnc.fadd)));\n }\n else if (txnForEnc.type === 'appl') {\n if (txnForEnc.apid !== undefined) {\n txn.appIndex = txnForEnc.apid;\n }\n if (txnForEnc.apan !== undefined) {\n txn.appOnComplete = txnForEnc.apan;\n }\n if (txnForEnc.apls !== undefined) {\n if (txnForEnc.apls.nui !== undefined)\n txn.appLocalInts = txnForEnc.apls.nui;\n if (txnForEnc.apls.nbs !== undefined)\n txn.appLocalByteSlices = txnForEnc.apls.nbs;\n }\n if (txnForEnc.apgs !== undefined) {\n if (txnForEnc.apgs.nui !== undefined)\n txn.appGlobalInts = txnForEnc.apgs.nui;\n if (txnForEnc.apgs.nbs !== undefined)\n txn.appGlobalByteSlices = txnForEnc.apgs.nbs;\n }\n if (txnForEnc.apep !== undefined) {\n txn.extraPages = txnForEnc.apep;\n }\n if (txnForEnc.apap !== undefined) {\n txn.appApprovalProgram = new Uint8Array(txnForEnc.apap);\n }\n if (txnForEnc.apsu !== undefined) {\n txn.appClearProgram = new Uint8Array(txnForEnc.apsu);\n }\n if (txnForEnc.apaa !== undefined) {\n txn.appArgs = txnForEnc.apaa.map((arg) => new Uint8Array(arg));\n }\n if (txnForEnc.apat !== undefined) {\n txn.appAccounts = txnForEnc.apat.map((addressBytes) => address.decodeAddress(address.encodeAddress(new Uint8Array(addressBytes))));\n }\n if (txnForEnc.apfa !== undefined) {\n txn.appForeignApps = txnForEnc.apfa;\n }\n if (txnForEnc.apas !== undefined) {\n txn.appForeignAssets = txnForEnc.apas;\n }\n if (txnForEnc.apbx !== undefined) {\n txn.boxes = txnForEnc.apbx.map((box) => ({\n // We return 0 for the app ID so that it's guaranteed translateBoxReferences will\n // translate the app index back to 0. If we instead returned the called app ID,\n // translateBoxReferences would translate the app index to a nonzero value if the called\n // app is also in the foreign app array.\n appIndex: box.i ? txn.appForeignApps[box.i - 1] : 0,\n name: box.n,\n }));\n }\n }\n else if (txnForEnc.type === 'stpf') {\n if (txnForEnc.sptype !== undefined) {\n txn.stateProofType = txnForEnc.sptype;\n }\n if (txnForEnc.sp !== undefined) {\n txn.stateProof = txnForEnc.sp;\n }\n if (txnForEnc.spmsg !== undefined) {\n txn.stateProofMessage = txnForEnc.spmsg;\n }\n }\n return txn;\n }\n estimateSize() {\n return this.toByte().length + NUM_ADDL_BYTES_AFTER_SIGNING;\n }\n bytesToSign() {\n const encodedMsg = this.toByte();\n return Buffer.from(utils.concatArrays(this.tag, encodedMsg));\n }\n toByte() {\n return encoding.encode(this.get_obj_for_encoding());\n }\n // returns the raw signature\n rawSignTxn(sk) {\n const toBeSigned = this.bytesToSign();\n const sig = nacl.sign(toBeSigned, sk);\n return Buffer.from(sig);\n }\n signTxn(sk) {\n // construct signed message\n const sTxn = {\n sig: this.rawSignTxn(sk),\n txn: this.get_obj_for_encoding(),\n };\n // add AuthAddr if signing with a different key than From indicates\n const keypair = nacl.keyPairFromSecretKey(sk);\n const pubKeyFromSk = keypair.publicKey;\n if (address.encodeAddress(pubKeyFromSk) !==\n address.encodeAddress(this.from.publicKey)) {\n sTxn.sgnr = Buffer.from(pubKeyFromSk);\n }\n return new Uint8Array(encoding.encode(sTxn));\n }\n attachSignature(signerAddr, signature) {\n if (!nacl.isValidSignatureLength(signature.length)) {\n throw new Error('Invalid signature length');\n }\n const sTxn = {\n sig: Buffer.from(signature),\n txn: this.get_obj_for_encoding(),\n };\n // add AuthAddr if signing with a different key than From indicates\n if (signerAddr !== address.encodeAddress(this.from.publicKey)) {\n const signerPublicKey = address.decodeAddress(signerAddr).publicKey;\n sTxn.sgnr = Buffer.from(signerPublicKey);\n }\n return new Uint8Array(encoding.encode(sTxn));\n }\n rawTxID() {\n const enMsg = this.toByte();\n const gh = Buffer.from(utils.concatArrays(this.tag, enMsg));\n return Buffer.from(nacl.genericHash(gh));\n }\n txID() {\n const hash = this.rawTxID();\n return base32.encode(hash).slice(0, ALGORAND_TRANSACTION_LENGTH);\n }\n // add a lease to a transaction not yet having\n // supply feePerByte to increment fee accordingly\n addLease(lease, feePerByte = 0) {\n let mutableLease;\n if (lease !== undefined) {\n if (lease.constructor !== Uint8Array)\n throw Error('lease must be a Uint8Array.');\n if (lease.length !== ALGORAND_TRANSACTION_LEASE_LENGTH)\n throw Error(`lease must be of length ${ALGORAND_TRANSACTION_LEASE_LENGTH.toString()}.`);\n mutableLease = new Uint8Array(lease);\n }\n else {\n mutableLease = new Uint8Array(0);\n }\n this.lease = mutableLease;\n if (feePerByte !== 0) {\n this.fee +=\n (ALGORAND_TRANSACTION_LEASE_LABEL_LENGTH +\n ALGORAND_TRANSACTION_LEASE_LENGTH) *\n feePerByte;\n }\n }\n // add the rekey-to field to a transaction not yet having it\n // supply feePerByte to increment fee accordingly\n addRekey(reKeyTo, feePerByte = 0) {\n if (reKeyTo !== undefined) {\n this.reKeyTo = address.decodeAddress(reKeyTo);\n }\n if (feePerByte !== 0) {\n this.fee +=\n (ALGORAND_TRANSACTION_REKEY_LABEL_LENGTH +\n ALGORAND_TRANSACTION_ADDRESS_LENGTH) *\n feePerByte;\n }\n }\n // build display dict for prettyPrint and toString\n // eslint-disable-next-line no-underscore-dangle\n _getDictForDisplay() {\n const forPrinting = {\n ...this,\n };\n forPrinting.tag = forPrinting.tag.toString();\n forPrinting.from = address.encodeAddress(forPrinting.from.publicKey);\n if (forPrinting.to !== undefined)\n forPrinting.to = address.encodeAddress(forPrinting.to.publicKey);\n // things that need fixing:\n if (forPrinting.freezeAccount !== undefined)\n forPrinting.freezeAccount = address.encodeAddress(forPrinting.freezeAccount.publicKey);\n if (forPrinting.closeRemainderTo !== undefined)\n forPrinting.closeRemainderTo = address.encodeAddress(forPrinting.closeRemainderTo.publicKey);\n if (forPrinting.assetManager !== undefined)\n forPrinting.assetManager = address.encodeAddress(forPrinting.assetManager.publicKey);\n if (forPrinting.assetReserve !== undefined)\n forPrinting.assetReserve = address.encodeAddress(forPrinting.assetReserve.publicKey);\n if (forPrinting.assetFreeze !== undefined)\n forPrinting.assetFreeze = address.encodeAddress(forPrinting.assetFreeze.publicKey);\n if (forPrinting.assetClawback !== undefined)\n forPrinting.assetClawback = address.encodeAddress(forPrinting.assetClawback.publicKey);\n if (forPrinting.assetRevocationTarget !== undefined)\n forPrinting.assetRevocationTarget = address.encodeAddress(forPrinting.assetRevocationTarget.publicKey);\n if (forPrinting.reKeyTo !== undefined)\n forPrinting.reKeyTo = address.encodeAddress(forPrinting.reKeyTo.publicKey);\n forPrinting.genesisHash = forPrinting.genesisHash.toString('base64');\n return forPrinting;\n }\n // pretty print the transaction to console\n prettyPrint() {\n // eslint-disable-next-line no-underscore-dangle,no-console\n console.log(this._getDictForDisplay());\n }\n // get string representation\n toString() {\n // eslint-disable-next-line no-underscore-dangle\n return JSON.stringify(this._getDictForDisplay());\n }\n}\n/**\n * encodeUnsignedSimulateTransaction takes a txnBuilder.Transaction object,\n * converts it into a SignedTransaction-like object, and converts it to a Buffer.\n *\n * Note: this function should only be used to simulate unsigned transactions.\n *\n * @param transactionObject - Transaction object to simulate.\n */\nexport function encodeUnsignedSimulateTransaction(transactionObject) {\n const objToEncode = {\n txn: transactionObject.get_obj_for_encoding(),\n };\n return encoding.encode(objToEncode);\n}\n/**\n * encodeUnsignedTransaction takes a completed txnBuilder.Transaction object, such as from the makeFoo\n * family of transactions, and converts it to a Buffer\n * @param transactionObject - the completed Transaction object\n */\nexport function encodeUnsignedTransaction(transactionObject) {\n const objToEncode = transactionObject.get_obj_for_encoding();\n return encoding.encode(objToEncode);\n}\n/**\n * decodeUnsignedTransaction takes a Buffer (as if from encodeUnsignedTransaction) and converts it to a txnBuilder.Transaction object\n * @param transactionBuffer - the Uint8Array containing a transaction\n */\nexport function decodeUnsignedTransaction(transactionBuffer) {\n const partlyDecodedObject = encoding.decode(transactionBuffer);\n return Transaction.from_obj_for_encoding(partlyDecodedObject);\n}\n/**\n * decodeSignedTransaction takes a Buffer (from transaction.signTxn) and converts it to an object\n * containing the Transaction (txn), the signature (sig), and the auth-addr field if applicable (sgnr)\n * @param transactionBuffer - the Uint8Array containing a transaction\n * @returns containing a Transaction, the signature, and possibly an auth-addr field\n */\nexport function decodeSignedTransaction(transactionBuffer) {\n const stxnDecoded = encoding.decode(transactionBuffer);\n const stxn = {\n ...stxnDecoded,\n txn: Transaction.from_obj_for_encoding(stxnDecoded.txn),\n };\n return stxn;\n}\nexport function instantiateTxnIfNeeded(transactionLike) {\n return transactionLike instanceof Transaction\n ? transactionLike\n : new Transaction(transactionLike);\n}\nexport default Transaction;\n//# sourceMappingURL=transaction.js.map","import { Buffer } from 'buffer';\nimport * as address from './encoding/address';\nimport * as encoding from './encoding/encoding';\nimport * as nacl from './nacl/naclWrappers';\nimport * as utils from './utils/utils';\n/**\n * Bid enables construction of Algorand Auctions Bids\n * */\nexport default class Bid {\n constructor({ bidderKey, bidAmount, bidID, auctionKey, auctionID, maxPrice, }) {\n this.name = 'Bid';\n this.tag = Buffer.from([97, 66]); // \"aB\"\n const decodedBidderKey = address.decodeAddress(bidderKey);\n const decodedAuctionKey = address.decodeAddress(auctionKey);\n if (!Number.isSafeInteger(bidAmount) || bidAmount < 0)\n throw Error('Bid amount must be positive and 2^53-1');\n if (!Number.isSafeInteger(bidID) || bidID < 0)\n throw Error('BidID must be positive and 2^53-1');\n if (!Number.isSafeInteger(auctionID) || auctionID < 0)\n throw Error('auctionID must be positive');\n Object.assign(this, {\n bidderKey: decodedBidderKey,\n bidAmount,\n bidID,\n auctionKey: decodedAuctionKey,\n auctionID,\n maxPrice,\n });\n }\n // eslint-disable-next-line camelcase\n get_obj_for_encoding() {\n return {\n bidder: Buffer.from(this.bidderKey.publicKey),\n cur: this.bidAmount,\n price: this.maxPrice,\n id: this.bidID,\n auc: Buffer.from(this.auctionKey.publicKey),\n aid: this.auctionID,\n };\n }\n signBid(sk) {\n const encodedMsg = encoding.encode(this.get_obj_for_encoding());\n const toBeSigned = Buffer.from(utils.concatArrays(this.tag, encodedMsg));\n const sig = nacl.sign(toBeSigned, sk);\n // construct signed message\n const sBid = {\n sig: Buffer.from(sig),\n bid: this.get_obj_for_encoding(),\n };\n const note = {\n t: 'b',\n b: sBid,\n };\n return new Uint8Array(encoding.encode(note));\n }\n}\n//# sourceMappingURL=bid.js.map","const MICROALGOS_TO_ALGOS_RATIO = 1e6;\nexport const INVALID_MICROALGOS_ERROR_MSG = 'Microalgos should be positive and less than 2^53 - 1.';\n/**\n * microalgosToAlgos converts microalgos to algos\n * @param microalgos - number\n * @returns number\n */\nexport function microalgosToAlgos(microalgos) {\n if (microalgos < 0 || !Number.isSafeInteger(microalgos)) {\n throw new Error(INVALID_MICROALGOS_ERROR_MSG);\n }\n return microalgos / MICROALGOS_TO_ALGOS_RATIO;\n}\n/**\n * algosToMicroalgos converts algos to microalgos\n * @param algos - number\n * @returns number\n */\nexport function algosToMicroalgos(algos) {\n const microalgos = algos * MICROALGOS_TO_ALGOS_RATIO;\n return Math.round(microalgos);\n}\n//# sourceMappingURL=convert.js.map","import { Buffer } from 'buffer';\nclass URLTokenBaseHTTPError extends Error {\n constructor(message, response) {\n super(message);\n this.response = response;\n this.name = 'URLTokenBaseHTTPError';\n this.response = response;\n }\n}\n/**\n * Implementation of BaseHTTPClient that uses a URL and a token\n * and make the REST queries using fetch.\n * This is the default implementation of BaseHTTPClient.\n */\nexport class URLTokenBaseHTTPClient {\n constructor(tokenHeader, baseServer, port, defaultHeaders = {}) {\n this.defaultHeaders = defaultHeaders;\n // Append a trailing slash so we can use relative paths. Without the trailing\n // slash, the last path segment will be replaced by the relative path. See\n // usage in `addressWithPath`.\n const fixedBaseServer = baseServer.endsWith('/')\n ? baseServer\n : `${baseServer}/`;\n const baseServerURL = new URL(fixedBaseServer);\n if (typeof port !== 'undefined') {\n baseServerURL.port = port.toString();\n }\n if (baseServerURL.protocol.length === 0) {\n throw new Error('Invalid base server URL, protocol must be defined.');\n }\n this.baseURL = baseServerURL;\n this.tokenHeader = tokenHeader;\n }\n /**\n * Compute the URL for a path relative to the instance's address\n * @param relativePath - A path string\n * @param query - An optional key-value object of query parameters to add to the URL. If the\n * relativePath already has query parameters on it, the additional parameters defined here will\n * be added to the URL without modifying those (unless a key collision occurs).\n * @returns A URL string\n */\n getURL(relativePath, query) {\n let fixedRelativePath;\n if (relativePath.startsWith('./')) {\n fixedRelativePath = relativePath;\n }\n else if (relativePath.startsWith('/')) {\n fixedRelativePath = `.${relativePath}`;\n }\n else {\n fixedRelativePath = `./${relativePath}`;\n }\n const address = new URL(fixedRelativePath, this.baseURL);\n if (query) {\n for (const [key, value] of Object.entries(query)) {\n address.searchParams.set(key, value);\n }\n }\n return address.toString();\n }\n static formatFetchResponseHeaders(headers) {\n const headersObj = {};\n headers.forEach((key, value) => {\n headersObj[key] = value;\n });\n return headersObj;\n }\n static async checkHttpError(res) {\n if (res.ok) {\n return;\n }\n let body = null;\n let bodyErrorMessage = null;\n try {\n body = new Uint8Array(await res.arrayBuffer());\n const decoded = JSON.parse(Buffer.from(body).toString());\n if (decoded.message) {\n bodyErrorMessage = decoded.message;\n }\n }\n catch (_) {\n // ignore any error that happened while we are parsing the error response\n }\n let message = `Network request error. Received status ${res.status} (${res.statusText})`;\n if (bodyErrorMessage) {\n message += `: ${bodyErrorMessage}`;\n }\n throw new URLTokenBaseHTTPError(message, {\n body,\n status: res.status,\n headers: URLTokenBaseHTTPClient.formatFetchResponseHeaders(res.headers),\n });\n }\n static async formatFetchResponse(res) {\n await this.checkHttpError(res);\n return {\n body: new Uint8Array(await res.arrayBuffer()),\n status: res.status,\n headers: URLTokenBaseHTTPClient.formatFetchResponseHeaders(res.headers),\n };\n }\n async get(relativePath, query, requestHeaders = {}) {\n // Expand headers for use in fetch\n const headers = {\n ...this.tokenHeader,\n ...this.defaultHeaders,\n ...requestHeaders,\n };\n const res = await fetch(this.getURL(relativePath, query), {\n headers,\n });\n return URLTokenBaseHTTPClient.formatFetchResponse(res);\n }\n async post(relativePath, data, query, requestHeaders = {}) {\n // Expand headers for use in fetch\n const headers = {\n ...this.tokenHeader,\n ...this.defaultHeaders,\n ...requestHeaders,\n };\n const res = await fetch(this.getURL(relativePath, query), {\n method: 'POST',\n body: data,\n headers,\n });\n return URLTokenBaseHTTPClient.formatFetchResponse(res);\n }\n async delete(relativePath, data, query, requestHeaders = {}) {\n // Expand headers for use in fetch\n const headers = {\n ...this.tokenHeader,\n ...this.defaultHeaders,\n ...requestHeaders,\n };\n const res = await fetch(this.getURL(relativePath, query), {\n method: 'DELETE',\n body: data,\n headers,\n });\n return URLTokenBaseHTTPClient.formatFetchResponse(res);\n }\n}\n//# sourceMappingURL=urlTokenBaseHTTPClient.js.map","import { Buffer } from 'buffer';\nimport * as utils from '../utils/utils';\nimport { URLTokenBaseHTTPClient } from './urlTokenBaseHTTPClient';\n/**\n * Remove falsy values or values with a length of 0 from an object.\n */\nfunction removeFalsyOrEmpty(obj) {\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n // eslint-disable-next-line no-param-reassign\n if (!obj[key] || obj[key].length === 0)\n delete obj[key];\n }\n }\n return obj;\n}\n/**\n * Create a new object with lower-case keys\n * See https://codereview.stackexchange.com/a/162418\n * Used to ensure all headers are lower-case and to work more easily with them\n */\nfunction tolowerCaseKeys(o) {\n /* eslint-disable no-param-reassign,no-return-assign,no-sequences */\n return Object.keys(o).reduce((c, k) => ((c[k.toLowerCase()] = o[k]), c), {});\n /* eslint-enable no-param-reassign,no-return-assign,no-sequences */\n}\n/**\n * getAcceptFormat returns the correct Accept header depending on the\n * requested format.\n */\nfunction getAcceptFormat(query) {\n if (query !== undefined &&\n Object.prototype.hasOwnProperty.call(query, 'format')) {\n switch (query.format) {\n case 'msgpack':\n return 'application/msgpack';\n case 'json':\n default:\n return 'application/json';\n }\n }\n else\n return 'application/json';\n}\n/**\n * HTTPClient is a wrapper around a BaseHTTPClient\n * It takes care of setting the proper \"Accept\" header and of\n * decoding the JSON outputs.\n */\nexport default class HTTPClient {\n constructor(bcOrTokenHeader, baseServer, port, defaultHeaders = {}) {\n if (baseServer !== undefined) {\n this.bc = new URLTokenBaseHTTPClient(bcOrTokenHeader, baseServer, port, defaultHeaders);\n }\n else {\n this.bc = bcOrTokenHeader;\n }\n }\n /**\n * Parse JSON using either the built-in JSON.parse or utils.parseJSON\n * depending on whether jsonOptions are provided or not\n *\n * @param text - JSON data\n * @param status - Status of the response (used in case parseJSON fails)\n * @param jsonOptions - Options object to use to decode JSON responses. See\n * utils.parseJSON for the options available.\n */\n static parseJSON(text, status, jsonOptions = {}) {\n try {\n if (Object.keys(jsonOptions).length === 0) {\n return text && JSON.parse(text);\n }\n return text && utils.parseJSON(text, jsonOptions);\n }\n catch (err_) {\n const err = err_;\n // return the raw response if the response parsing fails\n err.rawResponse = text || null;\n // return the http status code if the response parsing fails\n err.statusCode = status;\n throw err;\n }\n }\n /**\n * Serialize the data according to the requestHeaders\n * Assumes that requestHeaders contain a key \"content-type\"\n * If the content-type is \"application/json\", data is JSON serialized\n * Otherwise, data needs to be either an UTF-8 string that is converted to an Uint8Array\n * or an Uint8Array\n * @private\n */\n static serializeData(data, requestHeaders) {\n if (!data) {\n return new Uint8Array(0); // empty Uint8Array\n }\n if (requestHeaders['content-type'] === 'application/json') {\n return new Uint8Array(Buffer.from(JSON.stringify(data)));\n }\n if (typeof data === 'string') {\n return new Uint8Array(Buffer.from(data));\n }\n if (data instanceof Uint8Array) {\n return data;\n }\n throw new Error('provided data is neither a string nor a Uint8Array and content-type is not application/json');\n }\n /**\n * Convert a BaseHTTPClientResponse into a full HTTPClientResponse\n * Parse the body in\n * Modifies in place res and return the result\n */\n static prepareResponse(res, format, parseBody, jsonOptions = {}) {\n let { body } = res;\n let text;\n if (format !== 'application/msgpack') {\n text = (body && Buffer.from(body).toString()) || '';\n }\n if (parseBody && format === 'application/json') {\n body = HTTPClient.parseJSON(text, res.status, jsonOptions);\n }\n return {\n ...res,\n body,\n text,\n ok: Math.trunc(res.status / 100) === 2,\n };\n }\n /**\n * Prepare an error with a response\n * (the type of errors BaseHTTPClient are supposed to throw)\n * by adding the status and preparing the internal response\n * @private\n */\n static prepareResponseError(err) {\n if (err.response) {\n // eslint-disable-next-line no-param-reassign\n err.response = HTTPClient.prepareResponse(err.response, 'application/json', true);\n // eslint-disable-next-line no-param-reassign\n err.status = err.response.status;\n }\n return err;\n }\n /**\n * Send a GET request.\n * @param relativePath - The path of the request.\n * @param query - An object containing the query parameters of the request.\n * @param requestHeaders - An object containing additional request headers to use.\n * @param jsonOptions - Options object to use to decode JSON responses. See\n * utils.parseJSON for the options available.\n * @param parseBody - An optional boolean indicating whether the response body should be parsed\n * or not.\n * @returns Response object.\n */\n async get(relativePath, query, requestHeaders = {}, jsonOptions = {}, parseBody = true) {\n const format = getAcceptFormat(query);\n const fullHeaders = { ...requestHeaders, accept: format };\n try {\n const res = await this.bc.get(relativePath, removeFalsyOrEmpty(query), fullHeaders);\n return HTTPClient.prepareResponse(res, format, parseBody, jsonOptions);\n }\n catch (err) {\n throw HTTPClient.prepareResponseError(err);\n }\n }\n /**\n * Send a POST request.\n * If no content-type present, adds the header \"content-type: application/json\"\n * and data is serialized in JSON (if not empty)\n */\n async post(relativePath, data, requestHeaders = {}, query, parseBody = true) {\n const fullHeaders = {\n 'content-type': 'application/json',\n ...tolowerCaseKeys(requestHeaders),\n };\n try {\n const res = await this.bc.post(relativePath, HTTPClient.serializeData(data, fullHeaders), query, fullHeaders);\n return HTTPClient.prepareResponse(res, 'application/json', parseBody);\n }\n catch (err) {\n throw HTTPClient.prepareResponseError(err);\n }\n }\n /**\n * Send a DELETE request.\n * If no content-type present, adds the header \"content-type: application/json\"\n * and data is serialized in JSON (if not empty)\n */\n async delete(relativePath, data, requestHeaders = {}, parseBody = true) {\n const fullHeaders = {\n 'content-type': 'application/json',\n ...tolowerCaseKeys(requestHeaders),\n };\n const res = await this.bc.delete(relativePath, HTTPClient.serializeData(data, fullHeaders), undefined, fullHeaders);\n return HTTPClient.prepareResponse(res, 'application/json', parseBody);\n }\n}\n//# sourceMappingURL=client.js.map","import HTTPClient from '../client';\nimport IntDecoding from '../../types/intDecoding';\n/**\n * Convert a token string to a token header\n * @param token - The token string\n * @param headerIdentifier - An identifier for the token header\n */\nfunction convertTokenStringToTokenHeader(token = '', headerIdentifier) {\n const tokenHeader = {};\n if (token === '') {\n return tokenHeader;\n }\n tokenHeader[headerIdentifier] = token;\n return tokenHeader;\n}\nfunction isBaseHTTPClient(tbc) {\n return typeof tbc.get === 'function';\n}\n/**\n * Abstract service client to encapsulate shared AlgodClient and IndexerClient logic\n */\nexport default class ServiceClient {\n constructor(tokenHeaderIdentifier, tokenHeaderOrStrOrBaseClient, baseServer, port, defaultHeaders = {}) {\n if (isBaseHTTPClient(tokenHeaderOrStrOrBaseClient)) {\n // we are using a base client\n this.c = new HTTPClient(tokenHeaderOrStrOrBaseClient);\n }\n else {\n // Accept token header as string or object\n // - workaround to allow backwards compatibility for multiple headers\n let tokenHeader;\n if (typeof tokenHeaderOrStrOrBaseClient === 'string') {\n tokenHeader = convertTokenStringToTokenHeader(tokenHeaderOrStrOrBaseClient, tokenHeaderIdentifier);\n }\n else {\n tokenHeader = tokenHeaderOrStrOrBaseClient;\n }\n this.c = new HTTPClient(tokenHeader, baseServer, port, defaultHeaders);\n }\n this.intDecoding = IntDecoding.DEFAULT;\n }\n /**\n * Set the default int decoding method for all JSON requests this client creates.\n * @param method - \\{\"default\" | \"safe\" | \"mixed\" | \"bigint\"\\} method The method to use when parsing the\n * response for request. Must be one of \"default\", \"safe\", \"mixed\", or \"bigint\". See\n * JSONRequest.setIntDecoding for more details about what each method does.\n */\n setIntEncoding(method) {\n this.intDecoding = method;\n }\n /**\n * Get the default int decoding method for all JSON requests this client creates.\n */\n getIntEncoding() {\n return this.intDecoding;\n }\n}\n//# sourceMappingURL=serviceClient.js.map","import { Buffer } from 'buffer';\n/**\n * Base class for models\n */\n/* eslint-disable no-underscore-dangle,camelcase */\nfunction _is_primitive(val) {\n /* eslint-enable no-underscore-dangle,camelcase */\n return (val === undefined ||\n val == null ||\n (typeof val !== 'object' && typeof val !== 'function'));\n}\nfunction _get_obj_for_encoding(val, binary) {\n /* eslint-enable no-underscore-dangle,camelcase,no-redeclare,no-unused-vars */\n let targetPropValue;\n if (val instanceof Uint8Array) {\n targetPropValue = binary ? val : Buffer.from(val).toString('base64');\n }\n else if (typeof val.get_obj_for_encoding === 'function') {\n targetPropValue = val.get_obj_for_encoding(binary);\n }\n else if (Array.isArray(val)) {\n targetPropValue = [];\n for (const elem of val) {\n targetPropValue.push(_get_obj_for_encoding(elem, binary));\n }\n }\n else if (typeof val === 'object') {\n const obj = {};\n for (const prop of Object.keys(val)) {\n obj[prop] = _get_obj_for_encoding(val[prop], binary);\n }\n targetPropValue = obj;\n }\n else if (_is_primitive(val)) {\n targetPropValue = val;\n }\n else {\n throw new Error(`Unsupported value: ${String(val)}`);\n }\n return targetPropValue;\n}\nexport default class BaseModel {\n /**\n * Get an object ready for encoding to either JSON or msgpack.\n * @param binary - Use true to indicate that the encoding can handle raw binary objects\n * (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64\n * strings. True should be used for objects that will be encoded with msgpack, and false should\n * be used for objects that will be encoded with JSON.\n */\n get_obj_for_encoding(binary = false) {\n /* eslint-enable no-underscore-dangle,camelcase */\n const obj = {};\n for (const prop of Object.keys(this.attribute_map)) {\n const name = this.attribute_map[prop];\n const value = this[prop];\n if (typeof value !== 'undefined') {\n obj[name] =\n value === null ? null : _get_obj_for_encoding(value, binary);\n }\n }\n return obj;\n }\n}\n//# sourceMappingURL=basemodel.js.map","/**\n * NOTICE: This file was generated. Editing this file manually is not recommended.\n */\n/* eslint-disable no-use-before-define */\nimport { Buffer } from 'buffer';\nimport BaseModel from '../../basemodel';\n/**\n * Account information at a given round.\n * Definition:\n * data/basics/userBalance.go : AccountData\n */\nexport class Account extends BaseModel {\n /**\n * Creates a new `Account` object.\n * @param address - the account public key\n * @param amount - (algo) total number of MicroAlgos in the account\n * @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.\n * @param minBalance - MicroAlgo balance required by the account.\n * The requirement grows based on asset and application usage.\n * @param pendingRewards - amount of MicroAlgos of pending rewards in this account.\n * @param rewards - (ern) total rewards of MicroAlgos the account has received, including pending\n * rewards.\n * @param round - The round for which this information is relevant.\n * @param status - (onl) delegation status of the account's MicroAlgos\n * * Offline - indicates that the associated account is delegated.\n * * Online - indicates that the associated account used as part of the delegation\n * pool.\n * * NotParticipating - indicates that the associated account is neither a\n * delegator nor a delegate.\n * @param totalAppsOptedIn - The count of all applications that have been opted in, equivalent to the count\n * of application local data (AppLocalState objects) stored in this account.\n * @param totalAssetsOptedIn - The count of all assets that have been opted in, equivalent to the count of\n * AssetHolding objects held by this account.\n * @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.\n * @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.\n * @param appsLocalState - (appl) applications local data stored in this account.\n * Note the raw object uses `map[int] -> AppLocalState` for this type.\n * @param appsTotalExtraPages - (teap) the sum of all extra application program pages for this account.\n * @param appsTotalSchema - (tsch) stores the sum of all of the local schemas and global schemas in this\n * account.\n * Note: the raw account uses `StateSchema` for this type.\n * @param assets - (asset) assets held by this account.\n * Note the raw object uses `map[int] -> AssetHolding` for this type.\n * @param authAddr - (spend) the address against which signing should be checked. If empty, the\n * address of the current account is used. This field can be updated in any\n * transaction by setting the RekeyTo field.\n * @param createdApps - (appp) parameters of applications created by this account including app global\n * data.\n * Note: the raw account uses `map[int] -> AppParams` for this type.\n * @param createdAssets - (apar) parameters of assets created by this account.\n * Note: the raw account uses `map[int] -> Asset` for this type.\n * @param incentiveEligible - Whether or not the account can receive block incentives if its balance is in\n * range at proposal time.\n * @param lastHeartbeat - The round in which this account last went online, or explicitly renewed their\n * online status.\n * @param lastProposed - The round in which this account last proposed the block.\n * @param participation - AccountParticipation describes the parameters used by this account in consensus\n * protocol.\n * @param rewardBase - (ebase) used as part of the rewards computation. Only applicable to accounts\n * which are participating.\n * @param sigType - Indicates what type of signature is used by this account, must be one of:\n * * sig\n * * msig\n * * lsig\n * @param totalBoxBytes - (tbxb) The total number of bytes used by this account's app's box keys and\n * values.\n * @param totalBoxes - (tbx) The number of existing boxes created by this account's app.\n */\n constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, incentiveEligible, lastHeartbeat, lastProposed, participation, rewardBase, sigType, totalBoxBytes, totalBoxes, }) {\n super();\n this.address = address;\n this.amount = amount;\n this.amountWithoutPendingRewards = amountWithoutPendingRewards;\n this.minBalance = minBalance;\n this.pendingRewards = pendingRewards;\n this.rewards = rewards;\n this.round = round;\n this.status = status;\n this.totalAppsOptedIn = totalAppsOptedIn;\n this.totalAssetsOptedIn = totalAssetsOptedIn;\n this.totalCreatedApps = totalCreatedApps;\n this.totalCreatedAssets = totalCreatedAssets;\n this.appsLocalState = appsLocalState;\n this.appsTotalExtraPages = appsTotalExtraPages;\n this.appsTotalSchema = appsTotalSchema;\n this.assets = assets;\n this.authAddr = authAddr;\n this.createdApps = createdApps;\n this.createdAssets = createdAssets;\n this.incentiveEligible = incentiveEligible;\n this.lastHeartbeat = lastHeartbeat;\n this.lastProposed = lastProposed;\n this.participation = participation;\n this.rewardBase = rewardBase;\n this.sigType = sigType;\n this.totalBoxBytes = totalBoxBytes;\n this.totalBoxes = totalBoxes;\n this.attribute_map = {\n address: 'address',\n amount: 'amount',\n amountWithoutPendingRewards: 'amount-without-pending-rewards',\n minBalance: 'min-balance',\n pendingRewards: 'pending-rewards',\n rewards: 'rewards',\n round: 'round',\n status: 'status',\n totalAppsOptedIn: 'total-apps-opted-in',\n totalAssetsOptedIn: 'total-assets-opted-in',\n totalCreatedApps: 'total-created-apps',\n totalCreatedAssets: 'total-created-assets',\n appsLocalState: 'apps-local-state',\n appsTotalExtraPages: 'apps-total-extra-pages',\n appsTotalSchema: 'apps-total-schema',\n assets: 'assets',\n authAddr: 'auth-addr',\n createdApps: 'created-apps',\n createdAssets: 'created-assets',\n incentiveEligible: 'incentive-eligible',\n lastHeartbeat: 'last-heartbeat',\n lastProposed: 'last-proposed',\n participation: 'participation',\n rewardBase: 'reward-base',\n sigType: 'sig-type',\n totalBoxBytes: 'total-box-bytes',\n totalBoxes: 'total-boxes',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['address'] === 'undefined')\n throw new Error(`Response is missing required field 'address': ${data}`);\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['amount-without-pending-rewards'] === 'undefined')\n throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${data}`);\n if (typeof data['min-balance'] === 'undefined')\n throw new Error(`Response is missing required field 'min-balance': ${data}`);\n if (typeof data['pending-rewards'] === 'undefined')\n throw new Error(`Response is missing required field 'pending-rewards': ${data}`);\n if (typeof data['rewards'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (typeof data['status'] === 'undefined')\n throw new Error(`Response is missing required field 'status': ${data}`);\n if (typeof data['total-apps-opted-in'] === 'undefined')\n throw new Error(`Response is missing required field 'total-apps-opted-in': ${data}`);\n if (typeof data['total-assets-opted-in'] === 'undefined')\n throw new Error(`Response is missing required field 'total-assets-opted-in': ${data}`);\n if (typeof data['total-created-apps'] === 'undefined')\n throw new Error(`Response is missing required field 'total-created-apps': ${data}`);\n if (typeof data['total-created-assets'] === 'undefined')\n throw new Error(`Response is missing required field 'total-created-assets': ${data}`);\n return new Account({\n address: data['address'],\n amount: data['amount'],\n amountWithoutPendingRewards: data['amount-without-pending-rewards'],\n minBalance: data['min-balance'],\n pendingRewards: data['pending-rewards'],\n rewards: data['rewards'],\n round: data['round'],\n status: data['status'],\n totalAppsOptedIn: data['total-apps-opted-in'],\n totalAssetsOptedIn: data['total-assets-opted-in'],\n totalCreatedApps: data['total-created-apps'],\n totalCreatedAssets: data['total-created-assets'],\n appsLocalState: typeof data['apps-local-state'] !== 'undefined'\n ? data['apps-local-state'].map(ApplicationLocalState.from_obj_for_encoding)\n : undefined,\n appsTotalExtraPages: data['apps-total-extra-pages'],\n appsTotalSchema: typeof data['apps-total-schema'] !== 'undefined'\n ? ApplicationStateSchema.from_obj_for_encoding(data['apps-total-schema'])\n : undefined,\n assets: typeof data['assets'] !== 'undefined'\n ? data['assets'].map(AssetHolding.from_obj_for_encoding)\n : undefined,\n authAddr: data['auth-addr'],\n createdApps: typeof data['created-apps'] !== 'undefined'\n ? data['created-apps'].map(Application.from_obj_for_encoding)\n : undefined,\n createdAssets: typeof data['created-assets'] !== 'undefined'\n ? data['created-assets'].map(Asset.from_obj_for_encoding)\n : undefined,\n incentiveEligible: data['incentive-eligible'],\n lastHeartbeat: data['last-heartbeat'],\n lastProposed: data['last-proposed'],\n participation: typeof data['participation'] !== 'undefined'\n ? AccountParticipation.from_obj_for_encoding(data['participation'])\n : undefined,\n rewardBase: data['reward-base'],\n sigType: data['sig-type'],\n totalBoxBytes: data['total-box-bytes'],\n totalBoxes: data['total-boxes'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AccountApplicationResponse describes the account's application local state and\n * global state (AppLocalState and AppParams, if either exists) for a specific\n * application ID. Global state will only be returned if the provided address is\n * the application's creator.\n */\nexport class AccountApplicationResponse extends BaseModel {\n /**\n * Creates a new `AccountApplicationResponse` object.\n * @param round - The round for which this information is relevant.\n * @param appLocalState - (appl) the application local data stored in this account.\n * The raw account uses `AppLocalState` for this type.\n * @param createdApp - (appp) parameters of the application created by this account including app\n * global data.\n * The raw account uses `AppParams` for this type.\n */\n constructor({ round, appLocalState, createdApp, }) {\n super();\n this.round = round;\n this.appLocalState = appLocalState;\n this.createdApp = createdApp;\n this.attribute_map = {\n round: 'round',\n appLocalState: 'app-local-state',\n createdApp: 'created-app',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n return new AccountApplicationResponse({\n round: data['round'],\n appLocalState: typeof data['app-local-state'] !== 'undefined'\n ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])\n : undefined,\n createdApp: typeof data['created-app'] !== 'undefined'\n ? ApplicationParams.from_obj_for_encoding(data['created-app'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AccountAssetHolding describes the account's asset holding and asset parameters\n * (if either exist) for a specific asset ID.\n */\nexport class AccountAssetHolding extends BaseModel {\n /**\n * Creates a new `AccountAssetHolding` object.\n * @param assetHolding - (asset) Details about the asset held by this account.\n * The raw account uses `AssetHolding` for this type.\n * @param assetParams - (apar) parameters of the asset held by this account.\n * The raw account uses `AssetParams` for this type.\n */\n constructor({ assetHolding, assetParams, }) {\n super();\n this.assetHolding = assetHolding;\n this.assetParams = assetParams;\n this.attribute_map = {\n assetHolding: 'asset-holding',\n assetParams: 'asset-params',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['asset-holding'] === 'undefined')\n throw new Error(`Response is missing required field 'asset-holding': ${data}`);\n return new AccountAssetHolding({\n assetHolding: AssetHolding.from_obj_for_encoding(data['asset-holding']),\n assetParams: typeof data['asset-params'] !== 'undefined'\n ? AssetParams.from_obj_for_encoding(data['asset-params'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AccountAssetResponse describes the account's asset holding and asset parameters\n * (if either exist) for a specific asset ID. Asset parameters will only be\n * returned if the provided address is the asset's creator.\n */\nexport class AccountAssetResponse extends BaseModel {\n /**\n * Creates a new `AccountAssetResponse` object.\n * @param round - The round for which this information is relevant.\n * @param assetHolding - (asset) Details about the asset held by this account.\n * The raw account uses `AssetHolding` for this type.\n * @param createdAsset - (apar) parameters of the asset created by this account.\n * The raw account uses `AssetParams` for this type.\n */\n constructor({ round, assetHolding, createdAsset, }) {\n super();\n this.round = round;\n this.assetHolding = assetHolding;\n this.createdAsset = createdAsset;\n this.attribute_map = {\n round: 'round',\n assetHolding: 'asset-holding',\n createdAsset: 'created-asset',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n return new AccountAssetResponse({\n round: data['round'],\n assetHolding: typeof data['asset-holding'] !== 'undefined'\n ? AssetHolding.from_obj_for_encoding(data['asset-holding'])\n : undefined,\n createdAsset: typeof data['created-asset'] !== 'undefined'\n ? AssetParams.from_obj_for_encoding(data['created-asset'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AccountAssetsInformationResponse contains a list of assets held by an account.\n */\nexport class AccountAssetsInformationResponse extends BaseModel {\n /**\n * Creates a new `AccountAssetsInformationResponse` object.\n * @param round - The round for which this information is relevant.\n * @param assetHoldings -\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ round, assetHoldings, nextToken, }) {\n super();\n this.round = round;\n this.assetHoldings = assetHoldings;\n this.nextToken = nextToken;\n this.attribute_map = {\n round: 'round',\n assetHoldings: 'asset-holdings',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n return new AccountAssetsInformationResponse({\n round: data['round'],\n assetHoldings: typeof data['asset-holdings'] !== 'undefined'\n ? data['asset-holdings'].map(AccountAssetHolding.from_obj_for_encoding)\n : undefined,\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AccountParticipation describes the parameters used by this account in consensus\n * protocol.\n */\nexport class AccountParticipation extends BaseModel {\n /**\n * Creates a new `AccountParticipation` object.\n * @param selectionParticipationKey - (sel) Selection public key (if any) currently registered for this round.\n * @param voteFirstValid - (voteFst) First round for which this participation is valid.\n * @param voteKeyDilution - (voteKD) Number of subkeys in each batch of participation keys.\n * @param voteLastValid - (voteLst) Last round for which this participation is valid.\n * @param voteParticipationKey - (vote) root participation public key (if any) currently registered for this\n * round.\n * @param stateProofKey - (stprf) Root of the state proof key (if any)\n */\n constructor({ selectionParticipationKey, voteFirstValid, voteKeyDilution, voteLastValid, voteParticipationKey, stateProofKey, }) {\n super();\n this.selectionParticipationKey =\n typeof selectionParticipationKey === 'string'\n ? new Uint8Array(Buffer.from(selectionParticipationKey, 'base64'))\n : selectionParticipationKey;\n this.voteFirstValid = voteFirstValid;\n this.voteKeyDilution = voteKeyDilution;\n this.voteLastValid = voteLastValid;\n this.voteParticipationKey =\n typeof voteParticipationKey === 'string'\n ? new Uint8Array(Buffer.from(voteParticipationKey, 'base64'))\n : voteParticipationKey;\n this.stateProofKey =\n typeof stateProofKey === 'string'\n ? new Uint8Array(Buffer.from(stateProofKey, 'base64'))\n : stateProofKey;\n this.attribute_map = {\n selectionParticipationKey: 'selection-participation-key',\n voteFirstValid: 'vote-first-valid',\n voteKeyDilution: 'vote-key-dilution',\n voteLastValid: 'vote-last-valid',\n voteParticipationKey: 'vote-participation-key',\n stateProofKey: 'state-proof-key',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['selection-participation-key'] === 'undefined')\n throw new Error(`Response is missing required field 'selection-participation-key': ${data}`);\n if (typeof data['vote-first-valid'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-first-valid': ${data}`);\n if (typeof data['vote-key-dilution'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-key-dilution': ${data}`);\n if (typeof data['vote-last-valid'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-last-valid': ${data}`);\n if (typeof data['vote-participation-key'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-participation-key': ${data}`);\n return new AccountParticipation({\n selectionParticipationKey: data['selection-participation-key'],\n voteFirstValid: data['vote-first-valid'],\n voteKeyDilution: data['vote-key-dilution'],\n voteLastValid: data['vote-last-valid'],\n voteParticipationKey: data['vote-participation-key'],\n stateProofKey: data['state-proof-key'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Application state delta.\n */\nexport class AccountStateDelta extends BaseModel {\n /**\n * Creates a new `AccountStateDelta` object.\n * @param address -\n * @param delta - Application state delta.\n */\n constructor({ address, delta, }) {\n super();\n this.address = address;\n this.delta = delta;\n this.attribute_map = {\n address: 'address',\n delta: 'delta',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['address'] === 'undefined')\n throw new Error(`Response is missing required field 'address': ${data}`);\n if (!Array.isArray(data['delta']))\n throw new Error(`Response is missing required array field 'delta': ${data}`);\n return new AccountStateDelta({\n address: data['address'],\n delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * The logged messages from an app call along with the app ID and outer transaction\n * ID. Logs appear in the same order that they were emitted.\n */\nexport class AppCallLogs extends BaseModel {\n /**\n * Creates a new `AppCallLogs` object.\n * @param applicationIndex - The application from which the logs were generated\n * @param logs - An array of logs\n * @param txid - The transaction ID of the outer app call that lead to these logs\n */\n constructor({ applicationIndex, logs, txid, }) {\n super();\n this.applicationIndex = applicationIndex;\n this.logs = logs;\n this.txid = txid;\n this.attribute_map = {\n applicationIndex: 'application-index',\n logs: 'logs',\n txid: 'txId',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['application-index'] === 'undefined')\n throw new Error(`Response is missing required field 'application-index': ${data}`);\n if (!Array.isArray(data['logs']))\n throw new Error(`Response is missing required array field 'logs': ${data}`);\n if (typeof data['txId'] === 'undefined')\n throw new Error(`Response is missing required field 'txId': ${data}`);\n return new AppCallLogs({\n applicationIndex: data['application-index'],\n logs: data['logs'],\n txid: data['txId'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Application index and its parameters\n */\nexport class Application extends BaseModel {\n /**\n * Creates a new `Application` object.\n * @param id - (appidx) application index.\n * @param params - (appparams) application parameters.\n */\n constructor({ id, params, }) {\n super();\n this.id = id;\n this.params = params;\n this.attribute_map = {\n id: 'id',\n params: 'params',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['id'] === 'undefined')\n throw new Error(`Response is missing required field 'id': ${data}`);\n if (typeof data['params'] === 'undefined')\n throw new Error(`Response is missing required field 'params': ${data}`);\n return new Application({\n id: data['id'],\n params: ApplicationParams.from_obj_for_encoding(data['params']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * An application's initial global/local/box states that were accessed during\n * simulation.\n */\nexport class ApplicationInitialStates extends BaseModel {\n /**\n * Creates a new `ApplicationInitialStates` object.\n * @param id - Application index.\n * @param appBoxes - An application's global/local/box state.\n * @param appGlobals - An application's global/local/box state.\n * @param appLocals - An application's initial local states tied to different accounts.\n */\n constructor({ id, appBoxes, appGlobals, appLocals, }) {\n super();\n this.id = id;\n this.appBoxes = appBoxes;\n this.appGlobals = appGlobals;\n this.appLocals = appLocals;\n this.attribute_map = {\n id: 'id',\n appBoxes: 'app-boxes',\n appGlobals: 'app-globals',\n appLocals: 'app-locals',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['id'] === 'undefined')\n throw new Error(`Response is missing required field 'id': ${data}`);\n return new ApplicationInitialStates({\n id: data['id'],\n appBoxes: typeof data['app-boxes'] !== 'undefined'\n ? ApplicationKVStorage.from_obj_for_encoding(data['app-boxes'])\n : undefined,\n appGlobals: typeof data['app-globals'] !== 'undefined'\n ? ApplicationKVStorage.from_obj_for_encoding(data['app-globals'])\n : undefined,\n appLocals: typeof data['app-locals'] !== 'undefined'\n ? data['app-locals'].map(ApplicationKVStorage.from_obj_for_encoding)\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * An application's global/local/box state.\n */\nexport class ApplicationKVStorage extends BaseModel {\n /**\n * Creates a new `ApplicationKVStorage` object.\n * @param kvs - Key-Value pairs representing application states.\n * @param account - The address of the account associated with the local state.\n */\n constructor({ kvs, account }) {\n super();\n this.kvs = kvs;\n this.account = account;\n this.attribute_map = {\n kvs: 'kvs',\n account: 'account',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['kvs']))\n throw new Error(`Response is missing required array field 'kvs': ${data}`);\n return new ApplicationKVStorage({\n kvs: data['kvs'].map(AvmKeyValue.from_obj_for_encoding),\n account: data['account'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * References an account's local state for an application.\n */\nexport class ApplicationLocalReference extends BaseModel {\n /**\n * Creates a new `ApplicationLocalReference` object.\n * @param account - Address of the account with the local state.\n * @param app - Application ID of the local state application.\n */\n constructor({ account, app }) {\n super();\n this.account = account;\n this.app = app;\n this.attribute_map = {\n account: 'account',\n app: 'app',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['account'] === 'undefined')\n throw new Error(`Response is missing required field 'account': ${data}`);\n if (typeof data['app'] === 'undefined')\n throw new Error(`Response is missing required field 'app': ${data}`);\n return new ApplicationLocalReference({\n account: data['account'],\n app: data['app'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Stores local state associated with an application.\n */\nexport class ApplicationLocalState extends BaseModel {\n /**\n * Creates a new `ApplicationLocalState` object.\n * @param id - The application which this local state is for.\n * @param schema - (hsch) schema.\n * @param keyValue - (tkv) storage.\n */\n constructor({ id, schema, keyValue, }) {\n super();\n this.id = id;\n this.schema = schema;\n this.keyValue = keyValue;\n this.attribute_map = {\n id: 'id',\n schema: 'schema',\n keyValue: 'key-value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['id'] === 'undefined')\n throw new Error(`Response is missing required field 'id': ${data}`);\n if (typeof data['schema'] === 'undefined')\n throw new Error(`Response is missing required field 'schema': ${data}`);\n return new ApplicationLocalState({\n id: data['id'],\n schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),\n keyValue: typeof data['key-value'] !== 'undefined'\n ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Stores the global information associated with an application.\n */\nexport class ApplicationParams extends BaseModel {\n /**\n * Creates a new `ApplicationParams` object.\n * @param approvalProgram - (approv) approval program.\n * @param clearStateProgram - (clearp) approval program.\n * @param creator - The address that created this application. This is the address where the\n * parameters and global state for this application can be found.\n * @param extraProgramPages - (epp) the amount of extra program pages available to this app.\n * @param globalState - (gs) global state\n * @param globalStateSchema - (gsch) global schema\n * @param localStateSchema - (lsch) local schema\n */\n constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {\n super();\n this.approvalProgram =\n typeof approvalProgram === 'string'\n ? new Uint8Array(Buffer.from(approvalProgram, 'base64'))\n : approvalProgram;\n this.clearStateProgram =\n typeof clearStateProgram === 'string'\n ? new Uint8Array(Buffer.from(clearStateProgram, 'base64'))\n : clearStateProgram;\n this.creator = creator;\n this.extraProgramPages = extraProgramPages;\n this.globalState = globalState;\n this.globalStateSchema = globalStateSchema;\n this.localStateSchema = localStateSchema;\n this.attribute_map = {\n approvalProgram: 'approval-program',\n clearStateProgram: 'clear-state-program',\n creator: 'creator',\n extraProgramPages: 'extra-program-pages',\n globalState: 'global-state',\n globalStateSchema: 'global-state-schema',\n localStateSchema: 'local-state-schema',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['approval-program'] === 'undefined')\n throw new Error(`Response is missing required field 'approval-program': ${data}`);\n if (typeof data['clear-state-program'] === 'undefined')\n throw new Error(`Response is missing required field 'clear-state-program': ${data}`);\n if (typeof data['creator'] === 'undefined')\n throw new Error(`Response is missing required field 'creator': ${data}`);\n return new ApplicationParams({\n approvalProgram: data['approval-program'],\n clearStateProgram: data['clear-state-program'],\n creator: data['creator'],\n extraProgramPages: data['extra-program-pages'],\n globalState: typeof data['global-state'] !== 'undefined'\n ? data['global-state'].map(TealKeyValue.from_obj_for_encoding)\n : undefined,\n globalStateSchema: typeof data['global-state-schema'] !== 'undefined'\n ? ApplicationStateSchema.from_obj_for_encoding(data['global-state-schema'])\n : undefined,\n localStateSchema: typeof data['local-state-schema'] !== 'undefined'\n ? ApplicationStateSchema.from_obj_for_encoding(data['local-state-schema'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * An operation against an application's global/local/box state.\n */\nexport class ApplicationStateOperation extends BaseModel {\n /**\n * Creates a new `ApplicationStateOperation` object.\n * @param appStateType - Type of application state. Value `g` is **global state**, `l` is **local\n * state**, `b` is **boxes**.\n * @param key - The key (name) of the global/local/box state.\n * @param operation - Operation type. Value `w` is **write**, `d` is **delete**.\n * @param account - For local state changes, the address of the account associated with the local\n * state.\n * @param newValue - Represents an AVM value.\n */\n constructor({ appStateType, key, operation, account, newValue, }) {\n super();\n this.appStateType = appStateType;\n this.key =\n typeof key === 'string'\n ? new Uint8Array(Buffer.from(key, 'base64'))\n : key;\n this.operation = operation;\n this.account = account;\n this.newValue = newValue;\n this.attribute_map = {\n appStateType: 'app-state-type',\n key: 'key',\n operation: 'operation',\n account: 'account',\n newValue: 'new-value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['app-state-type'] === 'undefined')\n throw new Error(`Response is missing required field 'app-state-type': ${data}`);\n if (typeof data['key'] === 'undefined')\n throw new Error(`Response is missing required field 'key': ${data}`);\n if (typeof data['operation'] === 'undefined')\n throw new Error(`Response is missing required field 'operation': ${data}`);\n return new ApplicationStateOperation({\n appStateType: data['app-state-type'],\n key: data['key'],\n operation: data['operation'],\n account: data['account'],\n newValue: typeof data['new-value'] !== 'undefined'\n ? AvmValue.from_obj_for_encoding(data['new-value'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Specifies maximums on the number of each type that may be stored.\n */\nexport class ApplicationStateSchema extends BaseModel {\n /**\n * Creates a new `ApplicationStateSchema` object.\n * @param numUint - (nui) num of uints.\n * @param numByteSlice - (nbs) num of byte slices.\n */\n constructor({ numUint, numByteSlice, }) {\n super();\n this.numUint = numUint;\n this.numByteSlice = numByteSlice;\n this.attribute_map = {\n numUint: 'num-uint',\n numByteSlice: 'num-byte-slice',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['num-uint'] === 'undefined')\n throw new Error(`Response is missing required field 'num-uint': ${data}`);\n if (typeof data['num-byte-slice'] === 'undefined')\n throw new Error(`Response is missing required field 'num-byte-slice': ${data}`);\n return new ApplicationStateSchema({\n numUint: data['num-uint'],\n numByteSlice: data['num-byte-slice'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Specifies both the unique identifier and the parameters for an asset\n */\nexport class Asset extends BaseModel {\n /**\n * Creates a new `Asset` object.\n * @param index - unique asset identifier\n * @param params - AssetParams specifies the parameters for an asset.\n * (apar) when part of an AssetConfig transaction.\n * Definition:\n * data/transactions/asset.go : AssetParams\n */\n constructor({ index, params, }) {\n super();\n this.index = index;\n this.params = params;\n this.attribute_map = {\n index: 'index',\n params: 'params',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['index'] === 'undefined')\n throw new Error(`Response is missing required field 'index': ${data}`);\n if (typeof data['params'] === 'undefined')\n throw new Error(`Response is missing required field 'params': ${data}`);\n return new Asset({\n index: data['index'],\n params: AssetParams.from_obj_for_encoding(data['params']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Describes an asset held by an account.\n * Definition:\n * data/basics/userBalance.go : AssetHolding\n */\nexport class AssetHolding extends BaseModel {\n /**\n * Creates a new `AssetHolding` object.\n * @param amount - (a) number of units held.\n * @param assetId - Asset ID of the holding.\n * @param isFrozen - (f) whether or not the holding is frozen.\n */\n constructor({ amount, assetId, isFrozen, }) {\n super();\n this.amount = amount;\n this.assetId = assetId;\n this.isFrozen = isFrozen;\n this.attribute_map = {\n amount: 'amount',\n assetId: 'asset-id',\n isFrozen: 'is-frozen',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['asset-id'] === 'undefined')\n throw new Error(`Response is missing required field 'asset-id': ${data}`);\n if (typeof data['is-frozen'] === 'undefined')\n throw new Error(`Response is missing required field 'is-frozen': ${data}`);\n return new AssetHolding({\n amount: data['amount'],\n assetId: data['asset-id'],\n isFrozen: data['is-frozen'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * References an asset held by an account.\n */\nexport class AssetHoldingReference extends BaseModel {\n /**\n * Creates a new `AssetHoldingReference` object.\n * @param account - Address of the account holding the asset.\n * @param asset - Asset ID of the holding.\n */\n constructor({ account, asset }) {\n super();\n this.account = account;\n this.asset = asset;\n this.attribute_map = {\n account: 'account',\n asset: 'asset',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['account'] === 'undefined')\n throw new Error(`Response is missing required field 'account': ${data}`);\n if (typeof data['asset'] === 'undefined')\n throw new Error(`Response is missing required field 'asset': ${data}`);\n return new AssetHoldingReference({\n account: data['account'],\n asset: data['asset'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AssetParams specifies the parameters for an asset.\n * (apar) when part of an AssetConfig transaction.\n * Definition:\n * data/transactions/asset.go : AssetParams\n */\nexport class AssetParams extends BaseModel {\n /**\n * Creates a new `AssetParams` object.\n * @param creator - The address that created this asset. This is the address where the parameters\n * for this asset can be found, and also the address where unwanted asset units can\n * be sent in the worst case.\n * @param decimals - (dc) The number of digits to use after the decimal point when displaying this\n * asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in\n * tenths. If 2, the base unit of the asset is in hundredths, and so on. This value\n * must be between 0 and 19 (inclusive).\n * @param total - (t) The total number of units of this asset.\n * @param clawback - (c) Address of account used to clawback holdings of this asset. If empty,\n * clawback is not permitted.\n * @param defaultFrozen - (df) Whether holdings of this asset are frozen by default.\n * @param freeze - (f) Address of account used to freeze holdings of this asset. If empty, freezing\n * is not permitted.\n * @param manager - (m) Address of account used to manage the keys of this asset and to destroy it.\n * @param metadataHash - (am) A commitment to some unspecified asset metadata. The format of this\n * metadata is up to the application.\n * @param name - (an) Name of this asset, as supplied by the creator. Included only when the\n * asset name is composed of printable utf-8 characters.\n * @param nameB64 - Base64 encoded name of this asset, as supplied by the creator.\n * @param reserve - (r) Address of account holding reserve (non-minted) units of this asset.\n * @param unitName - (un) Name of a unit of this asset, as supplied by the creator. Included only\n * when the name of a unit of this asset is composed of printable utf-8 characters.\n * @param unitNameB64 - Base64 encoded name of a unit of this asset, as supplied by the creator.\n * @param url - (au) URL where more information about the asset can be retrieved. Included only\n * when the URL is composed of printable utf-8 characters.\n * @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.\n */\n constructor({ creator, decimals, total, clawback, defaultFrozen, freeze, manager, metadataHash, name, nameB64, reserve, unitName, unitNameB64, url, urlB64, }) {\n super();\n this.creator = creator;\n this.decimals = decimals;\n this.total = total;\n this.clawback = clawback;\n this.defaultFrozen = defaultFrozen;\n this.freeze = freeze;\n this.manager = manager;\n this.metadataHash =\n typeof metadataHash === 'string'\n ? new Uint8Array(Buffer.from(metadataHash, 'base64'))\n : metadataHash;\n this.name = name;\n this.nameB64 =\n typeof nameB64 === 'string'\n ? new Uint8Array(Buffer.from(nameB64, 'base64'))\n : nameB64;\n this.reserve = reserve;\n this.unitName = unitName;\n this.unitNameB64 =\n typeof unitNameB64 === 'string'\n ? new Uint8Array(Buffer.from(unitNameB64, 'base64'))\n : unitNameB64;\n this.url = url;\n this.urlB64 =\n typeof urlB64 === 'string'\n ? new Uint8Array(Buffer.from(urlB64, 'base64'))\n : urlB64;\n this.attribute_map = {\n creator: 'creator',\n decimals: 'decimals',\n total: 'total',\n clawback: 'clawback',\n defaultFrozen: 'default-frozen',\n freeze: 'freeze',\n manager: 'manager',\n metadataHash: 'metadata-hash',\n name: 'name',\n nameB64: 'name-b64',\n reserve: 'reserve',\n unitName: 'unit-name',\n unitNameB64: 'unit-name-b64',\n url: 'url',\n urlB64: 'url-b64',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['creator'] === 'undefined')\n throw new Error(`Response is missing required field 'creator': ${data}`);\n if (typeof data['decimals'] === 'undefined')\n throw new Error(`Response is missing required field 'decimals': ${data}`);\n if (typeof data['total'] === 'undefined')\n throw new Error(`Response is missing required field 'total': ${data}`);\n return new AssetParams({\n creator: data['creator'],\n decimals: data['decimals'],\n total: data['total'],\n clawback: data['clawback'],\n defaultFrozen: data['default-frozen'],\n freeze: data['freeze'],\n manager: data['manager'],\n metadataHash: data['metadata-hash'],\n name: data['name'],\n nameB64: data['name-b64'],\n reserve: data['reserve'],\n unitName: data['unit-name'],\n unitNameB64: data['unit-name-b64'],\n url: data['url'],\n urlB64: data['url-b64'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents an AVM key-value pair in an application store.\n */\nexport class AvmKeyValue extends BaseModel {\n /**\n * Creates a new `AvmKeyValue` object.\n * @param key -\n * @param value - Represents an AVM value.\n */\n constructor({ key, value }) {\n super();\n this.key =\n typeof key === 'string'\n ? new Uint8Array(Buffer.from(key, 'base64'))\n : key;\n this.value = value;\n this.attribute_map = {\n key: 'key',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['key'] === 'undefined')\n throw new Error(`Response is missing required field 'key': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new AvmKeyValue({\n key: data['key'],\n value: AvmValue.from_obj_for_encoding(data['value']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents an AVM value.\n */\nexport class AvmValue extends BaseModel {\n /**\n * Creates a new `AvmValue` object.\n * @param type - value type. Value `1` refers to **bytes**, value `2` refers to **uint64**\n * @param bytes - bytes value.\n * @param uint - uint value.\n */\n constructor({ type, bytes, uint, }) {\n super();\n this.type = type;\n this.bytes =\n typeof bytes === 'string'\n ? new Uint8Array(Buffer.from(bytes, 'base64'))\n : bytes;\n this.uint = uint;\n this.attribute_map = {\n type: 'type',\n bytes: 'bytes',\n uint: 'uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['type'] === 'undefined')\n throw new Error(`Response is missing required field 'type': ${data}`);\n return new AvmValue({\n type: data['type'],\n bytes: data['bytes'],\n uint: data['uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Hash of a block header.\n */\nexport class BlockHashResponse extends BaseModel {\n /**\n * Creates a new `BlockHashResponse` object.\n * @param blockhash - Block header hash.\n */\n constructor({ blockhash }) {\n super();\n this.blockhash = blockhash;\n this.attribute_map = {\n blockhash: 'blockHash',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['blockHash'] === 'undefined')\n throw new Error(`Response is missing required field 'blockHash': ${data}`);\n return new BlockHashResponse({\n blockhash: data['blockHash'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * All logs emitted in the given round. Each app call, whether top-level or inner,\n * that contains logs results in a separate AppCallLogs object. Therefore there may\n * be multiple AppCallLogs with the same application ID and outer transaction ID in\n * the event of multiple inner app calls to the same app. App calls with no logs\n * are not included in the response. AppCallLogs are returned in the same order\n * that their corresponding app call appeared in the block (pre-order traversal of\n * inner app calls)\n */\nexport class BlockLogsResponse extends BaseModel {\n /**\n * Creates a new `BlockLogsResponse` object.\n * @param logs -\n */\n constructor({ logs }) {\n super();\n this.logs = logs;\n this.attribute_map = {\n logs: 'logs',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['logs']))\n throw new Error(`Response is missing required array field 'logs': ${data}`);\n return new BlockLogsResponse({\n logs: data['logs'].map(AppCallLogs.from_obj_for_encoding),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Encoded block object.\n */\nexport class BlockResponse extends BaseModel {\n /**\n * Creates a new `BlockResponse` object.\n * @param block - Block header data.\n * @param cert - Optional certificate object. This is only included when the format is set to\n * message pack.\n */\n constructor({ block, cert, }) {\n super();\n this.block = block;\n this.cert = cert;\n this.attribute_map = {\n block: 'block',\n cert: 'cert',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['block'] === 'undefined')\n throw new Error(`Response is missing required field 'block': ${data}`);\n return new BlockResponse({\n block: data['block'],\n cert: data['cert'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Top level transaction IDs in a block.\n */\nexport class BlockTxidsResponse extends BaseModel {\n /**\n * Creates a new `BlockTxidsResponse` object.\n * @param blocktxids - Block transaction IDs.\n */\n constructor({ blocktxids }) {\n super();\n this.blocktxids = blocktxids;\n this.attribute_map = {\n blocktxids: 'blockTxids',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['blockTxids']))\n throw new Error(`Response is missing required array field 'blockTxids': ${data}`);\n return new BlockTxidsResponse({\n blocktxids: data['blockTxids'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Box name and its content.\n */\nexport class Box extends BaseModel {\n /**\n * Creates a new `Box` object.\n * @param name - (name) box name, base64 encoded\n * @param round - The round for which this information is relevant\n * @param value - (value) box value, base64 encoded.\n */\n constructor({ name, round, value, }) {\n super();\n this.name =\n typeof name === 'string'\n ? new Uint8Array(Buffer.from(name, 'base64'))\n : name;\n this.round = round;\n this.value =\n typeof value === 'string'\n ? new Uint8Array(Buffer.from(value, 'base64'))\n : value;\n this.attribute_map = {\n name: 'name',\n round: 'round',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['name'] === 'undefined')\n throw new Error(`Response is missing required field 'name': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new Box({\n name: data['name'],\n round: data['round'],\n value: data['value'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Box descriptor describes a Box.\n */\nexport class BoxDescriptor extends BaseModel {\n /**\n * Creates a new `BoxDescriptor` object.\n * @param name - Base64 encoded box name\n */\n constructor({ name }) {\n super();\n this.name =\n typeof name === 'string'\n ? new Uint8Array(Buffer.from(name, 'base64'))\n : name;\n this.attribute_map = {\n name: 'name',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['name'] === 'undefined')\n throw new Error(`Response is missing required field 'name': ${data}`);\n return new BoxDescriptor({\n name: data['name'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * References a box of an application.\n */\nexport class BoxReference extends BaseModel {\n /**\n * Creates a new `BoxReference` object.\n * @param app - Application ID which this box belongs to\n * @param name - Base64 encoded box name\n */\n constructor({ app, name, }) {\n super();\n this.app = app;\n this.name =\n typeof name === 'string'\n ? new Uint8Array(Buffer.from(name, 'base64'))\n : name;\n this.attribute_map = {\n app: 'app',\n name: 'name',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['app'] === 'undefined')\n throw new Error(`Response is missing required field 'app': ${data}`);\n if (typeof data['name'] === 'undefined')\n throw new Error(`Response is missing required field 'name': ${data}`);\n return new BoxReference({\n app: data['app'],\n name: data['name'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Box names of an application\n */\nexport class BoxesResponse extends BaseModel {\n /**\n * Creates a new `BoxesResponse` object.\n * @param boxes -\n */\n constructor({ boxes }) {\n super();\n this.boxes = boxes;\n this.attribute_map = {\n boxes: 'boxes',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['boxes']))\n throw new Error(`Response is missing required array field 'boxes': ${data}`);\n return new BoxesResponse({\n boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class BuildVersion extends BaseModel {\n /**\n * Creates a new `BuildVersion` object.\n * @param branch -\n * @param buildNumber -\n * @param channel -\n * @param commitHash -\n * @param major -\n * @param minor -\n */\n constructor({ branch, buildNumber, channel, commitHash, major, minor, }) {\n super();\n this.branch = branch;\n this.buildNumber = buildNumber;\n this.channel = channel;\n this.commitHash = commitHash;\n this.major = major;\n this.minor = minor;\n this.attribute_map = {\n branch: 'branch',\n buildNumber: 'build_number',\n channel: 'channel',\n commitHash: 'commit_hash',\n major: 'major',\n minor: 'minor',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['branch'] === 'undefined')\n throw new Error(`Response is missing required field 'branch': ${data}`);\n if (typeof data['build_number'] === 'undefined')\n throw new Error(`Response is missing required field 'build_number': ${data}`);\n if (typeof data['channel'] === 'undefined')\n throw new Error(`Response is missing required field 'channel': ${data}`);\n if (typeof data['commit_hash'] === 'undefined')\n throw new Error(`Response is missing required field 'commit_hash': ${data}`);\n if (typeof data['major'] === 'undefined')\n throw new Error(`Response is missing required field 'major': ${data}`);\n if (typeof data['minor'] === 'undefined')\n throw new Error(`Response is missing required field 'minor': ${data}`);\n return new BuildVersion({\n branch: data['branch'],\n buildNumber: data['build_number'],\n channel: data['channel'],\n commitHash: data['commit_hash'],\n major: data['major'],\n minor: data['minor'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Teal compile Result\n */\nexport class CompileResponse extends BaseModel {\n /**\n * Creates a new `CompileResponse` object.\n * @param hash - base32 SHA512_256 of program bytes (Address style)\n * @param result - base64 encoded program bytes\n * @param sourcemap - JSON of the source map\n */\n constructor({ hash, result, sourcemap, }) {\n super();\n this.hash = hash;\n this.result = result;\n this.sourcemap = sourcemap;\n this.attribute_map = {\n hash: 'hash',\n result: 'result',\n sourcemap: 'sourcemap',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['hash'] === 'undefined')\n throw new Error(`Response is missing required field 'hash': ${data}`);\n if (typeof data['result'] === 'undefined')\n throw new Error(`Response is missing required field 'result': ${data}`);\n return new CompileResponse({\n hash: data['hash'],\n result: data['result'],\n sourcemap: data['sourcemap'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Teal disassembly Result\n */\nexport class DisassembleResponse extends BaseModel {\n /**\n * Creates a new `DisassembleResponse` object.\n * @param result - disassembled Teal code\n */\n constructor({ result }) {\n super();\n this.result = result;\n this.attribute_map = {\n result: 'result',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['result'] === 'undefined')\n throw new Error(`Response is missing required field 'result': ${data}`);\n return new DisassembleResponse({\n result: data['result'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Request data type for dryrun endpoint. Given the Transactions and simulated\n * ledger state upload, run TEAL scripts and return debugging information.\n */\nexport class DryrunRequest extends BaseModel {\n /**\n * Creates a new `DryrunRequest` object.\n * @param accounts -\n * @param apps -\n * @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest\n * confirmed timestamp this algod is attached to.\n * @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise\n * whatever the current protocol of the network this algod is running in.\n * @param round - Round is available to some TEAL scripts. Defaults to the current round on the\n * network this algod is attached to.\n * @param sources -\n * @param txns -\n */\n constructor({ accounts, apps, latestTimestamp, protocolVersion, round, sources, txns, }) {\n super();\n this.accounts = accounts;\n this.apps = apps;\n this.latestTimestamp = latestTimestamp;\n this.protocolVersion = protocolVersion;\n this.round = round;\n this.sources = sources;\n this.txns = txns;\n this.attribute_map = {\n accounts: 'accounts',\n apps: 'apps',\n latestTimestamp: 'latest-timestamp',\n protocolVersion: 'protocol-version',\n round: 'round',\n sources: 'sources',\n txns: 'txns',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['accounts']))\n throw new Error(`Response is missing required array field 'accounts': ${data}`);\n if (!Array.isArray(data['apps']))\n throw new Error(`Response is missing required array field 'apps': ${data}`);\n if (typeof data['latest-timestamp'] === 'undefined')\n throw new Error(`Response is missing required field 'latest-timestamp': ${data}`);\n if (typeof data['protocol-version'] === 'undefined')\n throw new Error(`Response is missing required field 'protocol-version': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (!Array.isArray(data['sources']))\n throw new Error(`Response is missing required array field 'sources': ${data}`);\n if (!Array.isArray(data['txns']))\n throw new Error(`Response is missing required array field 'txns': ${data}`);\n return new DryrunRequest({\n accounts: data['accounts'].map(Account.from_obj_for_encoding),\n apps: data['apps'].map(Application.from_obj_for_encoding),\n latestTimestamp: data['latest-timestamp'],\n protocolVersion: data['protocol-version'],\n round: data['round'],\n sources: data['sources'].map(DryrunSource.from_obj_for_encoding),\n txns: data['txns'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * DryrunResponse contains per-txn debug information from a dryrun.\n */\nexport class DryrunResponse extends BaseModel {\n /**\n * Creates a new `DryrunResponse` object.\n * @param error -\n * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.\n * @param txns -\n */\n constructor({ error, protocolVersion, txns, }) {\n super();\n this.error = error;\n this.protocolVersion = protocolVersion;\n this.txns = txns;\n this.attribute_map = {\n error: 'error',\n protocolVersion: 'protocol-version',\n txns: 'txns',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['error'] === 'undefined')\n throw new Error(`Response is missing required field 'error': ${data}`);\n if (typeof data['protocol-version'] === 'undefined')\n throw new Error(`Response is missing required field 'protocol-version': ${data}`);\n if (!Array.isArray(data['txns']))\n throw new Error(`Response is missing required array field 'txns': ${data}`);\n return new DryrunResponse({\n error: data['error'],\n protocolVersion: data['protocol-version'],\n txns: data['txns'].map(DryrunTxnResult.from_obj_for_encoding),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into\n * transactions or application state.\n */\nexport class DryrunSource extends BaseModel {\n /**\n * Creates a new `DryrunSource` object.\n * @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the\n * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the\n * Approval Program or Clear State Program of application[this.AppIndex].\n * @param source -\n * @param txnIndex -\n * @param appIndex -\n */\n constructor({ fieldName, source, txnIndex, appIndex, }) {\n super();\n this.fieldName = fieldName;\n this.source = source;\n this.txnIndex = txnIndex;\n this.appIndex = appIndex;\n this.attribute_map = {\n fieldName: 'field-name',\n source: 'source',\n txnIndex: 'txn-index',\n appIndex: 'app-index',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['field-name'] === 'undefined')\n throw new Error(`Response is missing required field 'field-name': ${data}`);\n if (typeof data['source'] === 'undefined')\n throw new Error(`Response is missing required field 'source': ${data}`);\n if (typeof data['txn-index'] === 'undefined')\n throw new Error(`Response is missing required field 'txn-index': ${data}`);\n if (typeof data['app-index'] === 'undefined')\n throw new Error(`Response is missing required field 'app-index': ${data}`);\n return new DryrunSource({\n fieldName: data['field-name'],\n source: data['source'],\n txnIndex: data['txn-index'],\n appIndex: data['app-index'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Stores the TEAL eval step data\n */\nexport class DryrunState extends BaseModel {\n /**\n * Creates a new `DryrunState` object.\n * @param line - Line number\n * @param pc - Program counter\n * @param stack -\n * @param error - Evaluation error if any\n * @param scratch -\n */\n constructor({ line, pc, stack, error, scratch, }) {\n super();\n this.line = line;\n this.pc = pc;\n this.stack = stack;\n this.error = error;\n this.scratch = scratch;\n this.attribute_map = {\n line: 'line',\n pc: 'pc',\n stack: 'stack',\n error: 'error',\n scratch: 'scratch',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['line'] === 'undefined')\n throw new Error(`Response is missing required field 'line': ${data}`);\n if (typeof data['pc'] === 'undefined')\n throw new Error(`Response is missing required field 'pc': ${data}`);\n if (!Array.isArray(data['stack']))\n throw new Error(`Response is missing required array field 'stack': ${data}`);\n return new DryrunState({\n line: data['line'],\n pc: data['pc'],\n stack: data['stack'].map(TealValue.from_obj_for_encoding),\n error: data['error'],\n scratch: typeof data['scratch'] !== 'undefined'\n ? data['scratch'].map(TealValue.from_obj_for_encoding)\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * DryrunTxnResult contains any LogicSig or ApplicationCall program debug\n * information and state updates from a dryrun.\n */\nexport class DryrunTxnResult extends BaseModel {\n /**\n * Creates a new `DryrunTxnResult` object.\n * @param disassembly - Disassembled program line by line.\n * @param appCallMessages -\n * @param appCallTrace -\n * @param budgetAdded - Budget added during execution of app call transaction.\n * @param budgetConsumed - Budget consumed during execution of app call transaction.\n * @param globalDelta - Application state delta.\n * @param localDeltas -\n * @param logicSigDisassembly - Disassembled lsig program line by line.\n * @param logicSigMessages -\n * @param logicSigTrace -\n * @param logs -\n */\n constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {\n super();\n this.disassembly = disassembly;\n this.appCallMessages = appCallMessages;\n this.appCallTrace = appCallTrace;\n this.budgetAdded = budgetAdded;\n this.budgetConsumed = budgetConsumed;\n this.globalDelta = globalDelta;\n this.localDeltas = localDeltas;\n this.logicSigDisassembly = logicSigDisassembly;\n this.logicSigMessages = logicSigMessages;\n this.logicSigTrace = logicSigTrace;\n this.logs = logs;\n this.attribute_map = {\n disassembly: 'disassembly',\n appCallMessages: 'app-call-messages',\n appCallTrace: 'app-call-trace',\n budgetAdded: 'budget-added',\n budgetConsumed: 'budget-consumed',\n globalDelta: 'global-delta',\n localDeltas: 'local-deltas',\n logicSigDisassembly: 'logic-sig-disassembly',\n logicSigMessages: 'logic-sig-messages',\n logicSigTrace: 'logic-sig-trace',\n logs: 'logs',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['disassembly']))\n throw new Error(`Response is missing required array field 'disassembly': ${data}`);\n return new DryrunTxnResult({\n disassembly: data['disassembly'],\n appCallMessages: data['app-call-messages'],\n appCallTrace: typeof data['app-call-trace'] !== 'undefined'\n ? data['app-call-trace'].map(DryrunState.from_obj_for_encoding)\n : undefined,\n budgetAdded: data['budget-added'],\n budgetConsumed: data['budget-consumed'],\n globalDelta: typeof data['global-delta'] !== 'undefined'\n ? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)\n : undefined,\n localDeltas: typeof data['local-deltas'] !== 'undefined'\n ? data['local-deltas'].map(AccountStateDelta.from_obj_for_encoding)\n : undefined,\n logicSigDisassembly: data['logic-sig-disassembly'],\n logicSigMessages: data['logic-sig-messages'],\n logicSigTrace: typeof data['logic-sig-trace'] !== 'undefined'\n ? data['logic-sig-trace'].map(DryrunState.from_obj_for_encoding)\n : undefined,\n logs: data['logs'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * An error response with optional data field.\n */\nexport class ErrorResponse extends BaseModel {\n /**\n * Creates a new `ErrorResponse` object.\n * @param message -\n * @param data -\n */\n constructor({ message, data, }) {\n super();\n this.message = message;\n this.data = data;\n this.attribute_map = {\n message: 'message',\n data: 'data',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['message'] === 'undefined')\n throw new Error(`Response is missing required field 'message': ${data}`);\n return new ErrorResponse({\n message: data['message'],\n data: data['data'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a TEAL value delta.\n */\nexport class EvalDelta extends BaseModel {\n /**\n * Creates a new `EvalDelta` object.\n * @param action - (at) delta action.\n * @param bytes - (bs) bytes value.\n * @param uint - (ui) uint value.\n */\n constructor({ action, bytes, uint, }) {\n super();\n this.action = action;\n this.bytes = bytes;\n this.uint = uint;\n this.attribute_map = {\n action: 'action',\n bytes: 'bytes',\n uint: 'uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['action'] === 'undefined')\n throw new Error(`Response is missing required field 'action': ${data}`);\n return new EvalDelta({\n action: data['action'],\n bytes: data['bytes'],\n uint: data['uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Key-value pairs for StateDelta.\n */\nexport class EvalDeltaKeyValue extends BaseModel {\n /**\n * Creates a new `EvalDeltaKeyValue` object.\n * @param key -\n * @param value - Represents a TEAL value delta.\n */\n constructor({ key, value }) {\n super();\n this.key = key;\n this.value = value;\n this.attribute_map = {\n key: 'key',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['key'] === 'undefined')\n throw new Error(`Response is missing required field 'key': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new EvalDeltaKeyValue({\n key: data['key'],\n value: EvalDelta.from_obj_for_encoding(data['value']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Response containing the timestamp offset in seconds\n */\nexport class GetBlockTimeStampOffsetResponse extends BaseModel {\n /**\n * Creates a new `GetBlockTimeStampOffsetResponse` object.\n * @param offset - Timestamp offset in seconds.\n */\n constructor({ offset }) {\n super();\n this.offset = offset;\n this.attribute_map = {\n offset: 'offset',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['offset'] === 'undefined')\n throw new Error(`Response is missing required field 'offset': ${data}`);\n return new GetBlockTimeStampOffsetResponse({\n offset: data['offset'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Response containing the ledger's minimum sync round\n */\nexport class GetSyncRoundResponse extends BaseModel {\n /**\n * Creates a new `GetSyncRoundResponse` object.\n * @param round - The minimum sync round for the ledger.\n */\n constructor({ round }) {\n super();\n this.round = round;\n this.attribute_map = {\n round: 'round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n return new GetSyncRoundResponse({\n round: data['round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * A single Delta containing the key, the previous value and the current value for\n * a single round.\n */\nexport class KvDelta extends BaseModel {\n /**\n * Creates a new `KvDelta` object.\n * @param key - The key, base64 encoded.\n * @param value - The new value of the KV store entry, base64 encoded.\n */\n constructor({ key, value, }) {\n super();\n this.key =\n typeof key === 'string'\n ? new Uint8Array(Buffer.from(key, 'base64'))\n : key;\n this.value =\n typeof value === 'string'\n ? new Uint8Array(Buffer.from(value, 'base64'))\n : value;\n this.attribute_map = {\n key: 'key',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new KvDelta({\n key: data['key'],\n value: data['value'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Contains a ledger delta for a single transaction group\n */\nexport class LedgerStateDeltaForTransactionGroup extends BaseModel {\n /**\n * Creates a new `LedgerStateDeltaForTransactionGroup` object.\n * @param delta - Ledger StateDelta object\n * @param ids -\n */\n constructor({ delta, ids }) {\n super();\n this.delta = delta;\n this.ids = ids;\n this.attribute_map = {\n delta: 'Delta',\n ids: 'Ids',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['Delta'] === 'undefined')\n throw new Error(`Response is missing required field 'Delta': ${data}`);\n if (!Array.isArray(data['Ids']))\n throw new Error(`Response is missing required array field 'Ids': ${data}`);\n return new LedgerStateDeltaForTransactionGroup({\n delta: data['Delta'],\n ids: data['Ids'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Proof of membership and position of a light block header.\n */\nexport class LightBlockHeaderProof extends BaseModel {\n /**\n * Creates a new `LightBlockHeaderProof` object.\n * @param index - The index of the light block header in the vector commitment tree\n * @param proof - The encoded proof.\n * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges\n * from a leaf to the root.\n */\n constructor({ index, proof, treedepth, }) {\n super();\n this.index = index;\n this.proof =\n typeof proof === 'string'\n ? new Uint8Array(Buffer.from(proof, 'base64'))\n : proof;\n this.treedepth = treedepth;\n this.attribute_map = {\n index: 'index',\n proof: 'proof',\n treedepth: 'treedepth',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['index'] === 'undefined')\n throw new Error(`Response is missing required field 'index': ${data}`);\n if (typeof data['proof'] === 'undefined')\n throw new Error(`Response is missing required field 'proof': ${data}`);\n if (typeof data['treedepth'] === 'undefined')\n throw new Error(`Response is missing required field 'treedepth': ${data}`);\n return new LightBlockHeaderProof({\n index: data['index'],\n proof: data['proof'],\n treedepth: data['treedepth'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class NodeStatusResponse extends BaseModel {\n /**\n * Creates a new `NodeStatusResponse` object.\n * @param catchupTime - CatchupTime in nanoseconds\n * @param lastRound - LastRound indicates the last round seen\n * @param lastVersion - LastVersion indicates the last consensus version supported\n * @param nextVersion - NextVersion of consensus protocol to use\n * @param nextVersionRound - NextVersionRound is the round at which the next consensus version will apply\n * @param nextVersionSupported - NextVersionSupported indicates whether the next consensus version is supported\n * by this node\n * @param stoppedAtUnsupportedRound - StoppedAtUnsupportedRound indicates that the node does not support the new\n * rounds and has stopped making progress\n * @param timeSinceLastRound - TimeSinceLastRound in nanoseconds\n * @param catchpoint - The current catchpoint that is being caught up to\n * @param catchpointAcquiredBlocks - The number of blocks that have already been obtained by the node as part of the\n * catchup\n * @param catchpointProcessedAccounts - The number of accounts from the current catchpoint that have been processed so\n * far as part of the catchup\n * @param catchpointProcessedKvs - The number of key-values (KVs) from the current catchpoint that have been\n * processed so far as part of the catchup\n * @param catchpointTotalAccounts - The total number of accounts included in the current catchpoint\n * @param catchpointTotalBlocks - The total number of blocks that are required to complete the current catchpoint\n * catchup\n * @param catchpointTotalKvs - The total number of key-values (KVs) included in the current catchpoint\n * @param catchpointVerifiedAccounts - The number of accounts from the current catchpoint that have been verified so\n * far as part of the catchup\n * @param catchpointVerifiedKvs - The number of key-values (KVs) from the current catchpoint that have been\n * verified so far as part of the catchup\n * @param lastCatchpoint - The last catchpoint seen by the node\n * @param upgradeDelay - Upgrade delay\n * @param upgradeNextProtocolVoteBefore - Next protocol round\n * @param upgradeNoVotes - No votes cast for consensus upgrade\n * @param upgradeNodeVote - This node's upgrade vote\n * @param upgradeVoteRounds - Total voting rounds for current upgrade\n * @param upgradeVotes - Total votes cast for consensus upgrade\n * @param upgradeVotesRequired - Yes votes required for consensus upgrade\n * @param upgradeYesVotes - Yes votes cast for consensus upgrade\n */\n constructor({ catchupTime, lastRound, lastVersion, nextVersion, nextVersionRound, nextVersionSupported, stoppedAtUnsupportedRound, timeSinceLastRound, catchpoint, catchpointAcquiredBlocks, catchpointProcessedAccounts, catchpointProcessedKvs, catchpointTotalAccounts, catchpointTotalBlocks, catchpointTotalKvs, catchpointVerifiedAccounts, catchpointVerifiedKvs, lastCatchpoint, upgradeDelay, upgradeNextProtocolVoteBefore, upgradeNoVotes, upgradeNodeVote, upgradeVoteRounds, upgradeVotes, upgradeVotesRequired, upgradeYesVotes, }) {\n super();\n this.catchupTime = catchupTime;\n this.lastRound = lastRound;\n this.lastVersion = lastVersion;\n this.nextVersion = nextVersion;\n this.nextVersionRound = nextVersionRound;\n this.nextVersionSupported = nextVersionSupported;\n this.stoppedAtUnsupportedRound = stoppedAtUnsupportedRound;\n this.timeSinceLastRound = timeSinceLastRound;\n this.catchpoint = catchpoint;\n this.catchpointAcquiredBlocks = catchpointAcquiredBlocks;\n this.catchpointProcessedAccounts = catchpointProcessedAccounts;\n this.catchpointProcessedKvs = catchpointProcessedKvs;\n this.catchpointTotalAccounts = catchpointTotalAccounts;\n this.catchpointTotalBlocks = catchpointTotalBlocks;\n this.catchpointTotalKvs = catchpointTotalKvs;\n this.catchpointVerifiedAccounts = catchpointVerifiedAccounts;\n this.catchpointVerifiedKvs = catchpointVerifiedKvs;\n this.lastCatchpoint = lastCatchpoint;\n this.upgradeDelay = upgradeDelay;\n this.upgradeNextProtocolVoteBefore = upgradeNextProtocolVoteBefore;\n this.upgradeNoVotes = upgradeNoVotes;\n this.upgradeNodeVote = upgradeNodeVote;\n this.upgradeVoteRounds = upgradeVoteRounds;\n this.upgradeVotes = upgradeVotes;\n this.upgradeVotesRequired = upgradeVotesRequired;\n this.upgradeYesVotes = upgradeYesVotes;\n this.attribute_map = {\n catchupTime: 'catchup-time',\n lastRound: 'last-round',\n lastVersion: 'last-version',\n nextVersion: 'next-version',\n nextVersionRound: 'next-version-round',\n nextVersionSupported: 'next-version-supported',\n stoppedAtUnsupportedRound: 'stopped-at-unsupported-round',\n timeSinceLastRound: 'time-since-last-round',\n catchpoint: 'catchpoint',\n catchpointAcquiredBlocks: 'catchpoint-acquired-blocks',\n catchpointProcessedAccounts: 'catchpoint-processed-accounts',\n catchpointProcessedKvs: 'catchpoint-processed-kvs',\n catchpointTotalAccounts: 'catchpoint-total-accounts',\n catchpointTotalBlocks: 'catchpoint-total-blocks',\n catchpointTotalKvs: 'catchpoint-total-kvs',\n catchpointVerifiedAccounts: 'catchpoint-verified-accounts',\n catchpointVerifiedKvs: 'catchpoint-verified-kvs',\n lastCatchpoint: 'last-catchpoint',\n upgradeDelay: 'upgrade-delay',\n upgradeNextProtocolVoteBefore: 'upgrade-next-protocol-vote-before',\n upgradeNoVotes: 'upgrade-no-votes',\n upgradeNodeVote: 'upgrade-node-vote',\n upgradeVoteRounds: 'upgrade-vote-rounds',\n upgradeVotes: 'upgrade-votes',\n upgradeVotesRequired: 'upgrade-votes-required',\n upgradeYesVotes: 'upgrade-yes-votes',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['catchup-time'] === 'undefined')\n throw new Error(`Response is missing required field 'catchup-time': ${data}`);\n if (typeof data['last-round'] === 'undefined')\n throw new Error(`Response is missing required field 'last-round': ${data}`);\n if (typeof data['last-version'] === 'undefined')\n throw new Error(`Response is missing required field 'last-version': ${data}`);\n if (typeof data['next-version'] === 'undefined')\n throw new Error(`Response is missing required field 'next-version': ${data}`);\n if (typeof data['next-version-round'] === 'undefined')\n throw new Error(`Response is missing required field 'next-version-round': ${data}`);\n if (typeof data['next-version-supported'] === 'undefined')\n throw new Error(`Response is missing required field 'next-version-supported': ${data}`);\n if (typeof data['stopped-at-unsupported-round'] === 'undefined')\n throw new Error(`Response is missing required field 'stopped-at-unsupported-round': ${data}`);\n if (typeof data['time-since-last-round'] === 'undefined')\n throw new Error(`Response is missing required field 'time-since-last-round': ${data}`);\n return new NodeStatusResponse({\n catchupTime: data['catchup-time'],\n lastRound: data['last-round'],\n lastVersion: data['last-version'],\n nextVersion: data['next-version'],\n nextVersionRound: data['next-version-round'],\n nextVersionSupported: data['next-version-supported'],\n stoppedAtUnsupportedRound: data['stopped-at-unsupported-round'],\n timeSinceLastRound: data['time-since-last-round'],\n catchpoint: data['catchpoint'],\n catchpointAcquiredBlocks: data['catchpoint-acquired-blocks'],\n catchpointProcessedAccounts: data['catchpoint-processed-accounts'],\n catchpointProcessedKvs: data['catchpoint-processed-kvs'],\n catchpointTotalAccounts: data['catchpoint-total-accounts'],\n catchpointTotalBlocks: data['catchpoint-total-blocks'],\n catchpointTotalKvs: data['catchpoint-total-kvs'],\n catchpointVerifiedAccounts: data['catchpoint-verified-accounts'],\n catchpointVerifiedKvs: data['catchpoint-verified-kvs'],\n lastCatchpoint: data['last-catchpoint'],\n upgradeDelay: data['upgrade-delay'],\n upgradeNextProtocolVoteBefore: data['upgrade-next-protocol-vote-before'],\n upgradeNoVotes: data['upgrade-no-votes'],\n upgradeNodeVote: data['upgrade-node-vote'],\n upgradeVoteRounds: data['upgrade-vote-rounds'],\n upgradeVotes: data['upgrade-votes'],\n upgradeVotesRequired: data['upgrade-votes-required'],\n upgradeYesVotes: data['upgrade-yes-votes'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Details about a pending transaction. If the transaction was recently confirmed,\n * includes confirmation details like the round and reward details.\n */\nexport class PendingTransactionResponse extends BaseModel {\n /**\n * Creates a new `PendingTransactionResponse` object.\n * @param poolError - Indicates that the transaction was kicked out of this node's transaction pool\n * (and specifies why that happened). An empty string indicates the transaction\n * wasn't kicked out of this node's txpool due to an error.\n * @param txn - The raw signed transaction.\n * @param applicationIndex - The application index if the transaction was found and it created an\n * application.\n * @param assetClosingAmount - The number of the asset's unit that were transferred to the close-to address.\n * @param assetIndex - The asset index if the transaction was found and it created an asset.\n * @param closeRewards - Rewards in microalgos applied to the close remainder to account.\n * @param closingAmount - Closing amount for the transaction.\n * @param confirmedRound - The round where this transaction was confirmed, if present.\n * @param globalStateDelta - Global state key/value changes for the application being executed by this\n * transaction.\n * @param innerTxns - Inner transactions produced by application execution.\n * @param localStateDelta - Local state key/value changes for the application being executed by this\n * transaction.\n * @param logs - Logs for the application being executed by this transaction.\n * @param receiverRewards - Rewards in microalgos applied to the receiver account.\n * @param senderRewards - Rewards in microalgos applied to the sender account.\n */\n constructor({ poolError, txn, applicationIndex, assetClosingAmount, assetIndex, closeRewards, closingAmount, confirmedRound, globalStateDelta, innerTxns, localStateDelta, logs, receiverRewards, senderRewards, }) {\n super();\n this.poolError = poolError;\n this.txn = txn;\n this.applicationIndex = applicationIndex;\n this.assetClosingAmount = assetClosingAmount;\n this.assetIndex = assetIndex;\n this.closeRewards = closeRewards;\n this.closingAmount = closingAmount;\n this.confirmedRound = confirmedRound;\n this.globalStateDelta = globalStateDelta;\n this.innerTxns = innerTxns;\n this.localStateDelta = localStateDelta;\n this.logs = logs;\n this.receiverRewards = receiverRewards;\n this.senderRewards = senderRewards;\n this.attribute_map = {\n poolError: 'pool-error',\n txn: 'txn',\n applicationIndex: 'application-index',\n assetClosingAmount: 'asset-closing-amount',\n assetIndex: 'asset-index',\n closeRewards: 'close-rewards',\n closingAmount: 'closing-amount',\n confirmedRound: 'confirmed-round',\n globalStateDelta: 'global-state-delta',\n innerTxns: 'inner-txns',\n localStateDelta: 'local-state-delta',\n logs: 'logs',\n receiverRewards: 'receiver-rewards',\n senderRewards: 'sender-rewards',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['pool-error'] === 'undefined')\n throw new Error(`Response is missing required field 'pool-error': ${data}`);\n if (typeof data['txn'] === 'undefined')\n throw new Error(`Response is missing required field 'txn': ${data}`);\n return new PendingTransactionResponse({\n poolError: data['pool-error'],\n txn: data['txn'],\n applicationIndex: data['application-index'],\n assetClosingAmount: data['asset-closing-amount'],\n assetIndex: data['asset-index'],\n closeRewards: data['close-rewards'],\n closingAmount: data['closing-amount'],\n confirmedRound: data['confirmed-round'],\n globalStateDelta: typeof data['global-state-delta'] !== 'undefined'\n ? data['global-state-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)\n : undefined,\n innerTxns: typeof data['inner-txns'] !== 'undefined'\n ? data['inner-txns'].map(PendingTransactionResponse.from_obj_for_encoding)\n : undefined,\n localStateDelta: typeof data['local-state-delta'] !== 'undefined'\n ? data['local-state-delta'].map(AccountStateDelta.from_obj_for_encoding)\n : undefined,\n logs: data['logs'],\n receiverRewards: data['receiver-rewards'],\n senderRewards: data['sender-rewards'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * A potentially truncated list of transactions currently in the node's transaction\n * pool. You can compute whether or not the list is truncated if the number of\n * elements in the **top-transactions** array is fewer than **total-transactions**.\n */\nexport class PendingTransactionsResponse extends BaseModel {\n /**\n * Creates a new `PendingTransactionsResponse` object.\n * @param topTransactions - An array of signed transaction objects.\n * @param totalTransactions - Total number of transactions in the pool.\n */\n constructor({ topTransactions, totalTransactions, }) {\n super();\n this.topTransactions = topTransactions;\n this.totalTransactions = totalTransactions;\n this.attribute_map = {\n topTransactions: 'top-transactions',\n totalTransactions: 'total-transactions',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['top-transactions']))\n throw new Error(`Response is missing required array field 'top-transactions': ${data}`);\n if (typeof data['total-transactions'] === 'undefined')\n throw new Error(`Response is missing required field 'total-transactions': ${data}`);\n return new PendingTransactionsResponse({\n topTransactions: data['top-transactions'],\n totalTransactions: data['total-transactions'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Transaction ID of the submission.\n */\nexport class PostTransactionsResponse extends BaseModel {\n /**\n * Creates a new `PostTransactionsResponse` object.\n * @param txid - encoding of the transaction hash.\n */\n constructor({ txid }) {\n super();\n this.txid = txid;\n this.attribute_map = {\n txid: 'txId',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['txId'] === 'undefined')\n throw new Error(`Response is missing required field 'txId': ${data}`);\n return new PostTransactionsResponse({\n txid: data['txId'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * A write operation into a scratch slot.\n */\nexport class ScratchChange extends BaseModel {\n /**\n * Creates a new `ScratchChange` object.\n * @param newValue - Represents an AVM value.\n * @param slot - The scratch slot written.\n */\n constructor({ newValue, slot, }) {\n super();\n this.newValue = newValue;\n this.slot = slot;\n this.attribute_map = {\n newValue: 'new-value',\n slot: 'slot',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['new-value'] === 'undefined')\n throw new Error(`Response is missing required field 'new-value': ${data}`);\n if (typeof data['slot'] === 'undefined')\n throw new Error(`Response is missing required field 'slot': ${data}`);\n return new ScratchChange({\n newValue: AvmValue.from_obj_for_encoding(data['new-value']),\n slot: data['slot'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Initial states of resources that were accessed during simulation.\n */\nexport class SimulateInitialStates extends BaseModel {\n /**\n * Creates a new `SimulateInitialStates` object.\n * @param appInitialStates - The initial states of accessed application before simulation. The order of this\n * array is arbitrary.\n */\n constructor({ appInitialStates, }) {\n super();\n this.appInitialStates = appInitialStates;\n this.attribute_map = {\n appInitialStates: 'app-initial-states',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new SimulateInitialStates({\n appInitialStates: typeof data['app-initial-states'] !== 'undefined'\n ? data['app-initial-states'].map(ApplicationInitialStates.from_obj_for_encoding)\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Request type for simulation endpoint.\n */\nexport class SimulateRequest extends BaseModel {\n /**\n * Creates a new `SimulateRequest` object.\n * @param txnGroups - The transaction groups to simulate.\n * @param allowEmptySignatures - Allows transactions without signatures to be simulated as if they had correct\n * signatures.\n * @param allowMoreLogging - Lifts limits on log opcode usage during simulation.\n * @param allowUnnamedResources - Allows access to unnamed resources during simulation.\n * @param execTraceConfig - An object that configures simulation execution trace.\n * @param extraOpcodeBudget - Applies extra opcode budget during simulation for each transaction group.\n * @param fixSigners - If true, signers for transactions that are missing signatures will be fixed\n * during evaluation.\n * @param round - If provided, specifies the round preceding the simulation. State changes through\n * this round will be used to run this simulation. Usually only the 4 most recent\n * rounds will be available (controlled by the node config value MaxAcctLookback).\n * If not specified, defaults to the latest available round.\n */\n constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, allowUnnamedResources, execTraceConfig, extraOpcodeBudget, fixSigners, round, }) {\n super();\n this.txnGroups = txnGroups;\n this.allowEmptySignatures = allowEmptySignatures;\n this.allowMoreLogging = allowMoreLogging;\n this.allowUnnamedResources = allowUnnamedResources;\n this.execTraceConfig = execTraceConfig;\n this.extraOpcodeBudget = extraOpcodeBudget;\n this.fixSigners = fixSigners;\n this.round = round;\n this.attribute_map = {\n txnGroups: 'txn-groups',\n allowEmptySignatures: 'allow-empty-signatures',\n allowMoreLogging: 'allow-more-logging',\n allowUnnamedResources: 'allow-unnamed-resources',\n execTraceConfig: 'exec-trace-config',\n extraOpcodeBudget: 'extra-opcode-budget',\n fixSigners: 'fix-signers',\n round: 'round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['txn-groups']))\n throw new Error(`Response is missing required array field 'txn-groups': ${data}`);\n return new SimulateRequest({\n txnGroups: data['txn-groups'].map(SimulateRequestTransactionGroup.from_obj_for_encoding),\n allowEmptySignatures: data['allow-empty-signatures'],\n allowMoreLogging: data['allow-more-logging'],\n allowUnnamedResources: data['allow-unnamed-resources'],\n execTraceConfig: typeof data['exec-trace-config'] !== 'undefined'\n ? SimulateTraceConfig.from_obj_for_encoding(data['exec-trace-config'])\n : undefined,\n extraOpcodeBudget: data['extra-opcode-budget'],\n fixSigners: data['fix-signers'],\n round: data['round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * A transaction group to simulate.\n */\nexport class SimulateRequestTransactionGroup extends BaseModel {\n /**\n * Creates a new `SimulateRequestTransactionGroup` object.\n * @param txns - An atomic transaction group.\n */\n constructor({ txns }) {\n super();\n this.txns = txns;\n this.attribute_map = {\n txns: 'txns',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['txns']))\n throw new Error(`Response is missing required array field 'txns': ${data}`);\n return new SimulateRequestTransactionGroup({\n txns: data['txns'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Result of a transaction group simulation.\n */\nexport class SimulateResponse extends BaseModel {\n /**\n * Creates a new `SimulateResponse` object.\n * @param lastRound - The round immediately preceding this simulation. State changes through this\n * round were used to run this simulation.\n * @param txnGroups - A result object for each transaction group that was simulated.\n * @param version - The version of this response object.\n * @param evalOverrides - The set of parameters and limits override during simulation. If this set of\n * parameters is present, then evaluation parameters may differ from standard\n * evaluation in certain ways.\n * @param execTraceConfig - An object that configures simulation execution trace.\n * @param initialStates - Initial states of resources that were accessed during simulation.\n */\n constructor({ lastRound, txnGroups, version, evalOverrides, execTraceConfig, initialStates, }) {\n super();\n this.lastRound = lastRound;\n this.txnGroups = txnGroups;\n this.version = version;\n this.evalOverrides = evalOverrides;\n this.execTraceConfig = execTraceConfig;\n this.initialStates = initialStates;\n this.attribute_map = {\n lastRound: 'last-round',\n txnGroups: 'txn-groups',\n version: 'version',\n evalOverrides: 'eval-overrides',\n execTraceConfig: 'exec-trace-config',\n initialStates: 'initial-states',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['last-round'] === 'undefined')\n throw new Error(`Response is missing required field 'last-round': ${data}`);\n if (!Array.isArray(data['txn-groups']))\n throw new Error(`Response is missing required array field 'txn-groups': ${data}`);\n if (typeof data['version'] === 'undefined')\n throw new Error(`Response is missing required field 'version': ${data}`);\n return new SimulateResponse({\n lastRound: data['last-round'],\n txnGroups: data['txn-groups'].map(SimulateTransactionGroupResult.from_obj_for_encoding),\n version: data['version'],\n evalOverrides: typeof data['eval-overrides'] !== 'undefined'\n ? SimulationEvalOverrides.from_obj_for_encoding(data['eval-overrides'])\n : undefined,\n execTraceConfig: typeof data['exec-trace-config'] !== 'undefined'\n ? SimulateTraceConfig.from_obj_for_encoding(data['exec-trace-config'])\n : undefined,\n initialStates: typeof data['initial-states'] !== 'undefined'\n ? SimulateInitialStates.from_obj_for_encoding(data['initial-states'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * An object that configures simulation execution trace.\n */\nexport class SimulateTraceConfig extends BaseModel {\n /**\n * Creates a new `SimulateTraceConfig` object.\n * @param enable - A boolean option for opting in execution trace features simulation endpoint.\n * @param scratchChange - A boolean option enabling returning scratch slot changes together with execution\n * trace during simulation.\n * @param stackChange - A boolean option enabling returning stack changes together with execution trace\n * during simulation.\n * @param stateChange - A boolean option enabling returning application state changes (global, local,\n * and box changes) with the execution trace during simulation.\n */\n constructor({ enable, scratchChange, stackChange, stateChange, }) {\n super();\n this.enable = enable;\n this.scratchChange = scratchChange;\n this.stackChange = stackChange;\n this.stateChange = stateChange;\n this.attribute_map = {\n enable: 'enable',\n scratchChange: 'scratch-change',\n stackChange: 'stack-change',\n stateChange: 'state-change',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new SimulateTraceConfig({\n enable: data['enable'],\n scratchChange: data['scratch-change'],\n stackChange: data['stack-change'],\n stateChange: data['state-change'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Simulation result for an atomic transaction group\n */\nexport class SimulateTransactionGroupResult extends BaseModel {\n /**\n * Creates a new `SimulateTransactionGroupResult` object.\n * @param txnResults - Simulation result for individual transactions\n * @param appBudgetAdded - Total budget added during execution of app calls in the transaction group.\n * @param appBudgetConsumed - Total budget consumed during execution of app calls in the transaction group.\n * @param failedAt - If present, indicates which transaction in this group caused the failure. This\n * array represents the path to the failing transaction. Indexes are zero based,\n * the first element indicates the top-level transaction, and successive elements\n * indicate deeper inner transactions.\n * @param failureMessage - If present, indicates that the transaction group failed and specifies why that\n * happened\n * @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have\n * caused failure, but were allowed in simulation. Depending on where this object\n * is in the response, the unnamed resources it contains may or may not qualify for\n * group resource sharing. If this is a field in SimulateTransactionGroupResult,\n * the resources do qualify, but if this is a field in SimulateTransactionResult,\n * they do not qualify. In order to make this group valid for actual submission,\n * resources that qualify for group sharing can be made available by any\n * transaction of the group; otherwise, resources must be placed in the same\n * transaction which accessed them.\n */\n constructor({ txnResults, appBudgetAdded, appBudgetConsumed, failedAt, failureMessage, unnamedResourcesAccessed, }) {\n super();\n this.txnResults = txnResults;\n this.appBudgetAdded = appBudgetAdded;\n this.appBudgetConsumed = appBudgetConsumed;\n this.failedAt = failedAt;\n this.failureMessage = failureMessage;\n this.unnamedResourcesAccessed = unnamedResourcesAccessed;\n this.attribute_map = {\n txnResults: 'txn-results',\n appBudgetAdded: 'app-budget-added',\n appBudgetConsumed: 'app-budget-consumed',\n failedAt: 'failed-at',\n failureMessage: 'failure-message',\n unnamedResourcesAccessed: 'unnamed-resources-accessed',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['txn-results']))\n throw new Error(`Response is missing required array field 'txn-results': ${data}`);\n return new SimulateTransactionGroupResult({\n txnResults: data['txn-results'].map(SimulateTransactionResult.from_obj_for_encoding),\n appBudgetAdded: data['app-budget-added'],\n appBudgetConsumed: data['app-budget-consumed'],\n failedAt: data['failed-at'],\n failureMessage: data['failure-message'],\n unnamedResourcesAccessed: typeof data['unnamed-resources-accessed'] !== 'undefined'\n ? SimulateUnnamedResourcesAccessed.from_obj_for_encoding(data['unnamed-resources-accessed'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Simulation result for an individual transaction\n */\nexport class SimulateTransactionResult extends BaseModel {\n /**\n * Creates a new `SimulateTransactionResult` object.\n * @param txnResult - Details about a pending transaction. If the transaction was recently confirmed,\n * includes confirmation details like the round and reward details.\n * @param appBudgetConsumed - Budget used during execution of an app call transaction. This value includes\n * budged used by inner app calls spawned by this transaction.\n * @param execTrace - The execution trace of calling an app or a logic sig, containing the inner app\n * call trace in a recursive way.\n * @param fixedSigner - The account that needed to sign this transaction when no signature was provided\n * and the provided signer was incorrect.\n * @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.\n * @param unnamedResourcesAccessed - These are resources that were accessed by this group that would normally have\n * caused failure, but were allowed in simulation. Depending on where this object\n * is in the response, the unnamed resources it contains may or may not qualify for\n * group resource sharing. If this is a field in SimulateTransactionGroupResult,\n * the resources do qualify, but if this is a field in SimulateTransactionResult,\n * they do not qualify. In order to make this group valid for actual submission,\n * resources that qualify for group sharing can be made available by any\n * transaction of the group; otherwise, resources must be placed in the same\n * transaction which accessed them.\n */\n constructor({ txnResult, appBudgetConsumed, execTrace, fixedSigner, logicSigBudgetConsumed, unnamedResourcesAccessed, }) {\n super();\n this.txnResult = txnResult;\n this.appBudgetConsumed = appBudgetConsumed;\n this.execTrace = execTrace;\n this.fixedSigner = fixedSigner;\n this.logicSigBudgetConsumed = logicSigBudgetConsumed;\n this.unnamedResourcesAccessed = unnamedResourcesAccessed;\n this.attribute_map = {\n txnResult: 'txn-result',\n appBudgetConsumed: 'app-budget-consumed',\n execTrace: 'exec-trace',\n fixedSigner: 'fixed-signer',\n logicSigBudgetConsumed: 'logic-sig-budget-consumed',\n unnamedResourcesAccessed: 'unnamed-resources-accessed',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['txn-result'] === 'undefined')\n throw new Error(`Response is missing required field 'txn-result': ${data}`);\n return new SimulateTransactionResult({\n txnResult: PendingTransactionResponse.from_obj_for_encoding(data['txn-result']),\n appBudgetConsumed: data['app-budget-consumed'],\n execTrace: typeof data['exec-trace'] !== 'undefined'\n ? SimulationTransactionExecTrace.from_obj_for_encoding(data['exec-trace'])\n : undefined,\n fixedSigner: data['fixed-signer'],\n logicSigBudgetConsumed: data['logic-sig-budget-consumed'],\n unnamedResourcesAccessed: typeof data['unnamed-resources-accessed'] !== 'undefined'\n ? SimulateUnnamedResourcesAccessed.from_obj_for_encoding(data['unnamed-resources-accessed'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * These are resources that were accessed by this group that would normally have\n * caused failure, but were allowed in simulation. Depending on where this object\n * is in the response, the unnamed resources it contains may or may not qualify for\n * group resource sharing. If this is a field in SimulateTransactionGroupResult,\n * the resources do qualify, but if this is a field in SimulateTransactionResult,\n * they do not qualify. In order to make this group valid for actual submission,\n * resources that qualify for group sharing can be made available by any\n * transaction of the group; otherwise, resources must be placed in the same\n * transaction which accessed them.\n */\nexport class SimulateUnnamedResourcesAccessed extends BaseModel {\n /**\n * Creates a new `SimulateUnnamedResourcesAccessed` object.\n * @param accounts - The unnamed accounts that were referenced. The order of this array is arbitrary.\n * @param appLocals - The unnamed application local states that were referenced. The order of this\n * array is arbitrary.\n * @param apps - The unnamed applications that were referenced. The order of this array is\n * arbitrary.\n * @param assetHoldings - The unnamed asset holdings that were referenced. The order of this array is\n * arbitrary.\n * @param assets - The unnamed assets that were referenced. The order of this array is arbitrary.\n * @param boxes - The unnamed boxes that were referenced. The order of this array is arbitrary.\n * @param extraBoxRefs - The number of extra box references used to increase the IO budget. This is in\n * addition to the references defined in the input transaction group and any\n * referenced to unnamed boxes.\n */\n constructor({ accounts, appLocals, apps, assetHoldings, assets, boxes, extraBoxRefs, }) {\n super();\n this.accounts = accounts;\n this.appLocals = appLocals;\n this.apps = apps;\n this.assetHoldings = assetHoldings;\n this.assets = assets;\n this.boxes = boxes;\n this.extraBoxRefs = extraBoxRefs;\n this.attribute_map = {\n accounts: 'accounts',\n appLocals: 'app-locals',\n apps: 'apps',\n assetHoldings: 'asset-holdings',\n assets: 'assets',\n boxes: 'boxes',\n extraBoxRefs: 'extra-box-refs',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new SimulateUnnamedResourcesAccessed({\n accounts: data['accounts'],\n appLocals: typeof data['app-locals'] !== 'undefined'\n ? data['app-locals'].map(ApplicationLocalReference.from_obj_for_encoding)\n : undefined,\n apps: data['apps'],\n assetHoldings: typeof data['asset-holdings'] !== 'undefined'\n ? data['asset-holdings'].map(AssetHoldingReference.from_obj_for_encoding)\n : undefined,\n assets: data['assets'],\n boxes: typeof data['boxes'] !== 'undefined'\n ? data['boxes'].map(BoxReference.from_obj_for_encoding)\n : undefined,\n extraBoxRefs: data['extra-box-refs'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * The set of parameters and limits override during simulation. If this set of\n * parameters is present, then evaluation parameters may differ from standard\n * evaluation in certain ways.\n */\nexport class SimulationEvalOverrides extends BaseModel {\n /**\n * Creates a new `SimulationEvalOverrides` object.\n * @param allowEmptySignatures - If true, transactions without signatures are allowed and simulated as if they\n * were properly signed.\n * @param allowUnnamedResources - If true, allows access to unnamed resources during simulation.\n * @param extraOpcodeBudget - The extra opcode budget added to each transaction group during simulation\n * @param fixSigners - If true, signers for transactions that are missing signatures will be fixed\n * during evaluation.\n * @param maxLogCalls - The maximum log calls one can make during simulation\n * @param maxLogSize - The maximum byte number to log during simulation\n */\n constructor({ allowEmptySignatures, allowUnnamedResources, extraOpcodeBudget, fixSigners, maxLogCalls, maxLogSize, }) {\n super();\n this.allowEmptySignatures = allowEmptySignatures;\n this.allowUnnamedResources = allowUnnamedResources;\n this.extraOpcodeBudget = extraOpcodeBudget;\n this.fixSigners = fixSigners;\n this.maxLogCalls = maxLogCalls;\n this.maxLogSize = maxLogSize;\n this.attribute_map = {\n allowEmptySignatures: 'allow-empty-signatures',\n allowUnnamedResources: 'allow-unnamed-resources',\n extraOpcodeBudget: 'extra-opcode-budget',\n fixSigners: 'fix-signers',\n maxLogCalls: 'max-log-calls',\n maxLogSize: 'max-log-size',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new SimulationEvalOverrides({\n allowEmptySignatures: data['allow-empty-signatures'],\n allowUnnamedResources: data['allow-unnamed-resources'],\n extraOpcodeBudget: data['extra-opcode-budget'],\n fixSigners: data['fix-signers'],\n maxLogCalls: data['max-log-calls'],\n maxLogSize: data['max-log-size'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * The set of trace information and effect from evaluating a single opcode.\n */\nexport class SimulationOpcodeTraceUnit extends BaseModel {\n /**\n * Creates a new `SimulationOpcodeTraceUnit` object.\n * @param pc - The program counter of the current opcode being evaluated.\n * @param scratchChanges - The writes into scratch slots.\n * @param spawnedInners - The indexes of the traces for inner transactions spawned by this opcode, if any.\n * @param stackAdditions - The values added by this opcode to the stack.\n * @param stackPopCount - The number of deleted stack values by this opcode.\n * @param stateChanges - The operations against the current application's states.\n */\n constructor({ pc, scratchChanges, spawnedInners, stackAdditions, stackPopCount, stateChanges, }) {\n super();\n this.pc = pc;\n this.scratchChanges = scratchChanges;\n this.spawnedInners = spawnedInners;\n this.stackAdditions = stackAdditions;\n this.stackPopCount = stackPopCount;\n this.stateChanges = stateChanges;\n this.attribute_map = {\n pc: 'pc',\n scratchChanges: 'scratch-changes',\n spawnedInners: 'spawned-inners',\n stackAdditions: 'stack-additions',\n stackPopCount: 'stack-pop-count',\n stateChanges: 'state-changes',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['pc'] === 'undefined')\n throw new Error(`Response is missing required field 'pc': ${data}`);\n return new SimulationOpcodeTraceUnit({\n pc: data['pc'],\n scratchChanges: typeof data['scratch-changes'] !== 'undefined'\n ? data['scratch-changes'].map(ScratchChange.from_obj_for_encoding)\n : undefined,\n spawnedInners: data['spawned-inners'],\n stackAdditions: typeof data['stack-additions'] !== 'undefined'\n ? data['stack-additions'].map(AvmValue.from_obj_for_encoding)\n : undefined,\n stackPopCount: data['stack-pop-count'],\n stateChanges: typeof data['state-changes'] !== 'undefined'\n ? data['state-changes'].map(ApplicationStateOperation.from_obj_for_encoding)\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * The execution trace of calling an app or a logic sig, containing the inner app\n * call trace in a recursive way.\n */\nexport class SimulationTransactionExecTrace extends BaseModel {\n /**\n * Creates a new `SimulationTransactionExecTrace` object.\n * @param approvalProgramHash - SHA512_256 hash digest of the approval program executed in transaction.\n * @param approvalProgramTrace - Program trace that contains a trace of opcode effects in an approval program.\n * @param clearStateProgramHash - SHA512_256 hash digest of the clear state program executed in transaction.\n * @param clearStateProgramTrace - Program trace that contains a trace of opcode effects in a clear state program.\n * @param clearStateRollback - If true, indicates that the clear state program failed and any persistent state\n * changes it produced should be reverted once the program exits.\n * @param clearStateRollbackError - The error message explaining why the clear state program failed. This field will\n * only be populated if clear-state-rollback is true and the failure was due to an\n * execution error.\n * @param innerTrace - An array of SimulationTransactionExecTrace representing the execution trace of\n * any inner transactions executed.\n * @param logicSigHash - SHA512_256 hash digest of the logic sig executed in transaction.\n * @param logicSigTrace - Program trace that contains a trace of opcode effects in a logic sig.\n */\n constructor({ approvalProgramHash, approvalProgramTrace, clearStateProgramHash, clearStateProgramTrace, clearStateRollback, clearStateRollbackError, innerTrace, logicSigHash, logicSigTrace, }) {\n super();\n this.approvalProgramHash =\n typeof approvalProgramHash === 'string'\n ? new Uint8Array(Buffer.from(approvalProgramHash, 'base64'))\n : approvalProgramHash;\n this.approvalProgramTrace = approvalProgramTrace;\n this.clearStateProgramHash =\n typeof clearStateProgramHash === 'string'\n ? new Uint8Array(Buffer.from(clearStateProgramHash, 'base64'))\n : clearStateProgramHash;\n this.clearStateProgramTrace = clearStateProgramTrace;\n this.clearStateRollback = clearStateRollback;\n this.clearStateRollbackError = clearStateRollbackError;\n this.innerTrace = innerTrace;\n this.logicSigHash =\n typeof logicSigHash === 'string'\n ? new Uint8Array(Buffer.from(logicSigHash, 'base64'))\n : logicSigHash;\n this.logicSigTrace = logicSigTrace;\n this.attribute_map = {\n approvalProgramHash: 'approval-program-hash',\n approvalProgramTrace: 'approval-program-trace',\n clearStateProgramHash: 'clear-state-program-hash',\n clearStateProgramTrace: 'clear-state-program-trace',\n clearStateRollback: 'clear-state-rollback',\n clearStateRollbackError: 'clear-state-rollback-error',\n innerTrace: 'inner-trace',\n logicSigHash: 'logic-sig-hash',\n logicSigTrace: 'logic-sig-trace',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new SimulationTransactionExecTrace({\n approvalProgramHash: data['approval-program-hash'],\n approvalProgramTrace: typeof data['approval-program-trace'] !== 'undefined'\n ? data['approval-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)\n : undefined,\n clearStateProgramHash: data['clear-state-program-hash'],\n clearStateProgramTrace: typeof data['clear-state-program-trace'] !== 'undefined'\n ? data['clear-state-program-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)\n : undefined,\n clearStateRollback: data['clear-state-rollback'],\n clearStateRollbackError: data['clear-state-rollback-error'],\n innerTrace: typeof data['inner-trace'] !== 'undefined'\n ? data['inner-trace'].map(SimulationTransactionExecTrace.from_obj_for_encoding)\n : undefined,\n logicSigHash: data['logic-sig-hash'],\n logicSigTrace: typeof data['logic-sig-trace'] !== 'undefined'\n ? data['logic-sig-trace'].map(SimulationOpcodeTraceUnit.from_obj_for_encoding)\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a state proof and its corresponding message\n */\nexport class StateProof extends BaseModel {\n /**\n * Creates a new `StateProof` object.\n * @param message - Represents the message that the state proofs are attesting to.\n * @param stateproof - The encoded StateProof for the message.\n */\n constructor({ message, stateproof, }) {\n super();\n this.message = message;\n this.stateproof =\n typeof stateproof === 'string'\n ? new Uint8Array(Buffer.from(stateproof, 'base64'))\n : stateproof;\n this.attribute_map = {\n message: 'Message',\n stateproof: 'StateProof',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['Message'] === 'undefined')\n throw new Error(`Response is missing required field 'Message': ${data}`);\n if (typeof data['StateProof'] === 'undefined')\n throw new Error(`Response is missing required field 'StateProof': ${data}`);\n return new StateProof({\n message: StateProofMessage.from_obj_for_encoding(data['Message']),\n stateproof: data['StateProof'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents the message that the state proofs are attesting to.\n */\nexport class StateProofMessage extends BaseModel {\n /**\n * Creates a new `StateProofMessage` object.\n * @param blockheaderscommitment - The vector commitment root on all light block headers within a state proof\n * interval.\n * @param firstattestedround - The first round the message attests to.\n * @param lastattestedround - The last round the message attests to.\n * @param lnprovenweight - An integer value representing the natural log of the proven weight with 16 bits\n * of precision. This value would be used to verify the next state proof.\n * @param voterscommitment - The vector commitment root of the top N accounts to sign the next StateProof.\n */\n constructor({ blockheaderscommitment, firstattestedround, lastattestedround, lnprovenweight, voterscommitment, }) {\n super();\n this.blockheaderscommitment =\n typeof blockheaderscommitment === 'string'\n ? new Uint8Array(Buffer.from(blockheaderscommitment, 'base64'))\n : blockheaderscommitment;\n this.firstattestedround = firstattestedround;\n this.lastattestedround = lastattestedround;\n this.lnprovenweight = lnprovenweight;\n this.voterscommitment =\n typeof voterscommitment === 'string'\n ? new Uint8Array(Buffer.from(voterscommitment, 'base64'))\n : voterscommitment;\n this.attribute_map = {\n blockheaderscommitment: 'BlockHeadersCommitment',\n firstattestedround: 'FirstAttestedRound',\n lastattestedround: 'LastAttestedRound',\n lnprovenweight: 'LnProvenWeight',\n voterscommitment: 'VotersCommitment',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['BlockHeadersCommitment'] === 'undefined')\n throw new Error(`Response is missing required field 'BlockHeadersCommitment': ${data}`);\n if (typeof data['FirstAttestedRound'] === 'undefined')\n throw new Error(`Response is missing required field 'FirstAttestedRound': ${data}`);\n if (typeof data['LastAttestedRound'] === 'undefined')\n throw new Error(`Response is missing required field 'LastAttestedRound': ${data}`);\n if (typeof data['LnProvenWeight'] === 'undefined')\n throw new Error(`Response is missing required field 'LnProvenWeight': ${data}`);\n if (typeof data['VotersCommitment'] === 'undefined')\n throw new Error(`Response is missing required field 'VotersCommitment': ${data}`);\n return new StateProofMessage({\n blockheaderscommitment: data['BlockHeadersCommitment'],\n firstattestedround: data['FirstAttestedRound'],\n lastattestedround: data['LastAttestedRound'],\n lnprovenweight: data['LnProvenWeight'],\n voterscommitment: data['VotersCommitment'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Supply represents the current supply of MicroAlgos in the system.\n */\nexport class SupplyResponse extends BaseModel {\n /**\n * Creates a new `SupplyResponse` object.\n * @param currentRound - Round\n * @param onlineMoney - OnlineMoney\n * @param totalMoney - TotalMoney\n */\n constructor({ currentRound, onlineMoney, totalMoney, }) {\n super();\n this.currentRound = currentRound;\n this.onlineMoney = onlineMoney;\n this.totalMoney = totalMoney;\n this.attribute_map = {\n currentRound: 'current_round',\n onlineMoney: 'online-money',\n totalMoney: 'total-money',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['current_round'] === 'undefined')\n throw new Error(`Response is missing required field 'current_round': ${data}`);\n if (typeof data['online-money'] === 'undefined')\n throw new Error(`Response is missing required field 'online-money': ${data}`);\n if (typeof data['total-money'] === 'undefined')\n throw new Error(`Response is missing required field 'total-money': ${data}`);\n return new SupplyResponse({\n currentRound: data['current_round'],\n onlineMoney: data['online-money'],\n totalMoney: data['total-money'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a key-value pair in an application store.\n */\nexport class TealKeyValue extends BaseModel {\n /**\n * Creates a new `TealKeyValue` object.\n * @param key -\n * @param value - Represents a TEAL value.\n */\n constructor({ key, value }) {\n super();\n this.key = key;\n this.value = value;\n this.attribute_map = {\n key: 'key',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['key'] === 'undefined')\n throw new Error(`Response is missing required field 'key': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new TealKeyValue({\n key: data['key'],\n value: TealValue.from_obj_for_encoding(data['value']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a TEAL value.\n */\nexport class TealValue extends BaseModel {\n /**\n * Creates a new `TealValue` object.\n * @param type - (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**\n * @param bytes - (tb) bytes value.\n * @param uint - (ui) uint value.\n */\n constructor({ type, bytes, uint, }) {\n super();\n this.type = type;\n this.bytes = bytes;\n this.uint = uint;\n this.attribute_map = {\n type: 'type',\n bytes: 'bytes',\n uint: 'uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['type'] === 'undefined')\n throw new Error(`Response is missing required field 'type': ${data}`);\n if (typeof data['bytes'] === 'undefined')\n throw new Error(`Response is missing required field 'bytes': ${data}`);\n if (typeof data['uint'] === 'undefined')\n throw new Error(`Response is missing required field 'uint': ${data}`);\n return new TealValue({\n type: data['type'],\n bytes: data['bytes'],\n uint: data['uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Response containing all ledger state deltas for transaction groups, with their\n * associated Ids, in a single round.\n */\nexport class TransactionGroupLedgerStateDeltasForRoundResponse extends BaseModel {\n /**\n * Creates a new `TransactionGroupLedgerStateDeltasForRoundResponse` object.\n * @param deltas -\n */\n constructor({ deltas }) {\n super();\n this.deltas = deltas;\n this.attribute_map = {\n deltas: 'Deltas',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['Deltas']))\n throw new Error(`Response is missing required array field 'Deltas': ${data}`);\n return new TransactionGroupLedgerStateDeltasForRoundResponse({\n deltas: data['Deltas'].map(LedgerStateDeltaForTransactionGroup.from_obj_for_encoding),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * TransactionParams contains the parameters that help a client construct a new\n * transaction.\n */\nexport class TransactionParametersResponse extends BaseModel {\n /**\n * Creates a new `TransactionParametersResponse` object.\n * @param consensusVersion - ConsensusVersion indicates the consensus protocol version\n * as of LastRound.\n * @param fee - Fee is the suggested transaction fee\n * Fee is in units of micro-Algos per byte.\n * Fee may fall to zero but transactions must still have a fee of\n * at least MinTxnFee for the current network protocol.\n * @param genesisHash - GenesisHash is the hash of the genesis block.\n * @param genesisId - GenesisID is an ID listed in the genesis block.\n * @param lastRound - LastRound indicates the last round seen\n * @param minFee - The minimum transaction fee (not per byte) required for the\n * txn to validate for the current network protocol.\n */\n constructor({ consensusVersion, fee, genesisHash, genesisId, lastRound, minFee, }) {\n super();\n this.consensusVersion = consensusVersion;\n this.fee = fee;\n this.genesisHash =\n typeof genesisHash === 'string'\n ? new Uint8Array(Buffer.from(genesisHash, 'base64'))\n : genesisHash;\n this.genesisId = genesisId;\n this.lastRound = lastRound;\n this.minFee = minFee;\n this.attribute_map = {\n consensusVersion: 'consensus-version',\n fee: 'fee',\n genesisHash: 'genesis-hash',\n genesisId: 'genesis-id',\n lastRound: 'last-round',\n minFee: 'min-fee',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['consensus-version'] === 'undefined')\n throw new Error(`Response is missing required field 'consensus-version': ${data}`);\n if (typeof data['fee'] === 'undefined')\n throw new Error(`Response is missing required field 'fee': ${data}`);\n if (typeof data['genesis-hash'] === 'undefined')\n throw new Error(`Response is missing required field 'genesis-hash': ${data}`);\n if (typeof data['genesis-id'] === 'undefined')\n throw new Error(`Response is missing required field 'genesis-id': ${data}`);\n if (typeof data['last-round'] === 'undefined')\n throw new Error(`Response is missing required field 'last-round': ${data}`);\n if (typeof data['min-fee'] === 'undefined')\n throw new Error(`Response is missing required field 'min-fee': ${data}`);\n return new TransactionParametersResponse({\n consensusVersion: data['consensus-version'],\n fee: data['fee'],\n genesisHash: data['genesis-hash'],\n genesisId: data['genesis-id'],\n lastRound: data['last-round'],\n minFee: data['min-fee'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Proof of transaction in a block.\n */\nexport class TransactionProofResponse extends BaseModel {\n /**\n * Creates a new `TransactionProofResponse` object.\n * @param idx - Index of the transaction in the block's payset.\n * @param proof - Proof of transaction membership.\n * @param stibhash - Hash of SignedTxnInBlock for verifying proof.\n * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges\n * from a leaf to the root.\n * @param hashtype - The type of hash function used to create the proof, must be one of:\n * * sha512_256\n * * sha256\n */\n constructor({ idx, proof, stibhash, treedepth, hashtype, }) {\n super();\n this.idx = idx;\n this.proof =\n typeof proof === 'string'\n ? new Uint8Array(Buffer.from(proof, 'base64'))\n : proof;\n this.stibhash =\n typeof stibhash === 'string'\n ? new Uint8Array(Buffer.from(stibhash, 'base64'))\n : stibhash;\n this.treedepth = treedepth;\n this.hashtype = hashtype;\n this.attribute_map = {\n idx: 'idx',\n proof: 'proof',\n stibhash: 'stibhash',\n treedepth: 'treedepth',\n hashtype: 'hashtype',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['idx'] === 'undefined')\n throw new Error(`Response is missing required field 'idx': ${data}`);\n if (typeof data['proof'] === 'undefined')\n throw new Error(`Response is missing required field 'proof': ${data}`);\n if (typeof data['stibhash'] === 'undefined')\n throw new Error(`Response is missing required field 'stibhash': ${data}`);\n if (typeof data['treedepth'] === 'undefined')\n throw new Error(`Response is missing required field 'treedepth': ${data}`);\n return new TransactionProofResponse({\n idx: data['idx'],\n proof: data['proof'],\n stibhash: data['stibhash'],\n treedepth: data['treedepth'],\n hashtype: data['hashtype'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * algod version information.\n */\nexport class Version extends BaseModel {\n /**\n * Creates a new `Version` object.\n * @param build -\n * @param genesisHashB64 -\n * @param genesisId -\n * @param versions -\n */\n constructor({ build, genesisHashB64, genesisId, versions, }) {\n super();\n this.build = build;\n this.genesisHashB64 =\n typeof genesisHashB64 === 'string'\n ? new Uint8Array(Buffer.from(genesisHashB64, 'base64'))\n : genesisHashB64;\n this.genesisId = genesisId;\n this.versions = versions;\n this.attribute_map = {\n build: 'build',\n genesisHashB64: 'genesis_hash_b64',\n genesisId: 'genesis_id',\n versions: 'versions',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['build'] === 'undefined')\n throw new Error(`Response is missing required field 'build': ${data}`);\n if (typeof data['genesis_hash_b64'] === 'undefined')\n throw new Error(`Response is missing required field 'genesis_hash_b64': ${data}`);\n if (typeof data['genesis_id'] === 'undefined')\n throw new Error(`Response is missing required field 'genesis_id': ${data}`);\n if (!Array.isArray(data['versions']))\n throw new Error(`Response is missing required array field 'versions': ${data}`);\n return new Version({\n build: BuildVersion.from_obj_for_encoding(data['build']),\n genesisHashB64: data['genesis_hash_b64'],\n genesisId: data['genesis_id'],\n versions: data['versions'],\n });\n /* eslint-enable dot-notation */\n }\n}\n//# sourceMappingURL=types.js.map","import IntDecoding from '../../types/intDecoding';\n/**\n * Base abstract class for JSON requests.\n *\n * Data: The type returned from the `do()` method\n *\n * Body: The structure of the response's body\n */\nexport default class JSONRequest {\n /**\n * @param client - HTTPClient object.\n * @param intDecoding - The method to use\n * for decoding integers from this request's response. See the setIntDecoding method for more\n * details.\n */\n constructor(client, intDecoding) {\n this.c = client;\n this.query = {};\n this.intDecoding = intDecoding || IntDecoding.DEFAULT;\n }\n /**\n * Prepare a JSON response before returning it.\n *\n * Use this method to change and restructure response\n * data as needed after receiving it from the `do()` method.\n * @param body - Response body received\n * @category JSONRequest\n */\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return body;\n }\n /**\n * Execute the request.\n * @param headers - Additional headers to send in the request. Optional.\n * @returns A promise which resolves to the parsed response data.\n * @category JSONRequest\n */\n async do(headers = {}) {\n const jsonOptions = {};\n if (this.intDecoding !== 'default') {\n jsonOptions.intDecoding = this.intDecoding;\n }\n const res = await this.c.get(this.path(), this.query, headers, jsonOptions);\n return this.prepare(res.body);\n }\n /**\n * Execute the request, but do not process the response data in any way.\n * @param headers - Additional headers to send in the request. Optional.\n * @returns A promise which resolves to the raw response data, exactly as returned by the server.\n * @category JSONRequest\n */\n async doRaw(headers = {}) {\n const res = await this.c.get(this.path(), this.query, headers, {}, false);\n return res.body;\n }\n /**\n * Configure how integers in this request's JSON response will be decoded.\n *\n * The options are:\n * * \"default\": Integers will be decoded according to JSON.parse, meaning they will all be\n * Numbers and any values greater than Number.MAX_SAFE_INTEGER will lose precision.\n * * \"safe\": All integers will be decoded as Numbers, but if any values are greater than\n * Number.MAX_SAFE_INTEGER an error will be thrown.\n * * \"mixed\": Integers will be decoded as Numbers if they are less than or equal to\n * Number.MAX_SAFE_INTEGER, otherwise they will be decoded as BigInts.\n * * \"bigint\": All integers will be decoded as BigInts.\n *\n * @param method - The method to use when parsing the\n * response for this request. Must be one of \"default\", \"safe\", \"mixed\", or \"bigint\".\n * @category JSONRequest\n */\n setIntDecoding(method) {\n if (method !== 'default' &&\n method !== 'safe' &&\n method !== 'mixed' &&\n method !== 'bigint')\n throw new Error(`Invalid method for int decoding: ${method}`);\n this.intDecoding = method;\n return this;\n }\n}\n//# sourceMappingURL=jsonrequest.js.map","import JSONRequest from '../jsonrequest';\nexport default class AccountInformation extends JSONRequest {\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n path() {\n return `/v2/accounts/${this.account}`;\n }\n /**\n * Exclude assets and application data from results\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await algodClient.accountInformation(address)\n * .exclude('all')\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n exclude(exclude) {\n this.query.exclude = exclude;\n return this;\n }\n}\n//# sourceMappingURL=accountInformation.js.map","import JSONRequest from '../jsonrequest';\nexport default class AccountAssetInformation extends JSONRequest {\n constructor(c, intDecoding, account, assetID) {\n super(c, intDecoding);\n this.account = account;\n this.assetID = assetID;\n this.account = account;\n this.assetID = assetID;\n }\n path() {\n return `/v2/accounts/${this.account}/assets/${this.assetID}`;\n }\n}\n//# sourceMappingURL=accountAssetInformation.js.map","import JSONRequest from '../jsonrequest';\nexport default class AccountApplicationInformation extends JSONRequest {\n constructor(c, intDecoding, account, applicationID) {\n super(c, intDecoding);\n this.account = account;\n this.applicationID = applicationID;\n this.account = account;\n this.applicationID = applicationID;\n }\n path() {\n return `/v2/accounts/${this.account}/applications/${this.applicationID}`;\n }\n}\n//# sourceMappingURL=accountApplicationInformation.js.map","import * as encoding from '../../../encoding/encoding';\nimport JSONRequest from '../jsonrequest';\n/**\n * block gets the block info for the given round. this call may block\n */\nexport default class Block extends JSONRequest {\n constructor(c, roundNumber) {\n super(c);\n if (!Number.isInteger(roundNumber))\n throw Error('roundNumber should be an integer');\n this.round = roundNumber;\n this.query = { format: 'msgpack' };\n }\n path() {\n return `/v2/blocks/${this.round}`;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n if (body && body.byteLength > 0) {\n return encoding.decode(body);\n }\n return undefined;\n }\n}\n//# sourceMappingURL=block.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\n/**\n * Sets the default header (if not previously set)\n * @param headers - A headers object\n */\nexport function setHeaders(headers = {}) {\n let hdrs = headers;\n if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) {\n hdrs = { ...headers };\n hdrs['Content-Type'] = 'text/plain';\n }\n return hdrs;\n}\n/**\n * Executes compile\n */\nexport default class Compile extends JSONRequest {\n constructor(c, source) {\n super(c);\n this.source = source;\n this.source = source;\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/teal/compile`;\n }\n sourcemap(map = true) {\n this.query.sourcemap = map;\n return this;\n }\n /**\n * Executes compile\n * @param headers - A headers object\n */\n async do(headers = {}) {\n const txHeaders = setHeaders(headers);\n const res = await this.c.post(this.path(), Buffer.from(this.source), txHeaders, this.query);\n return res.body;\n }\n}\n//# sourceMappingURL=compile.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\nimport * as encoding from '../../../encoding/encoding';\nimport { setHeaders } from './compile';\nexport default class Dryrun extends JSONRequest {\n constructor(c, dr) {\n super(c);\n this.blob = encoding.encode(dr.get_obj_for_encoding(true));\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/teal/dryrun';\n }\n /**\n * Executes dryrun\n * @param headers - A headers object\n */\n async do(headers = {}) {\n const txHeaders = setHeaders(headers);\n const res = await this.c.post(this.path(), Buffer.from(this.blob), txHeaders);\n return res.body;\n }\n}\n//# sourceMappingURL=dryrun.js.map","import JSONRequest from '../jsonrequest';\nexport default class Genesis extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/genesis';\n }\n}\n//# sourceMappingURL=genesis.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetAssetByID extends JSONRequest {\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n path() {\n return `/v2/assets/${this.index}`;\n }\n}\n//# sourceMappingURL=getAssetByID.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetApplicationByID extends JSONRequest {\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n path() {\n return `/v2/applications/${this.index}`;\n }\n}\n//# sourceMappingURL=getApplicationByID.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetBlockHash extends JSONRequest {\n constructor(c, intDecoding, roundNumber) {\n super(c, intDecoding);\n if (!Number.isInteger(roundNumber))\n throw Error('roundNumber should be an integer');\n this.round = roundNumber;\n }\n path() {\n return `/v2/blocks/${this.round}/hash`;\n }\n}\n//# sourceMappingURL=getBlockHash.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetBlockTxids extends JSONRequest {\n constructor(c, intDecoding, roundNumber) {\n super(c, intDecoding);\n if (!Number.isInteger(roundNumber))\n throw Error('roundNumber should be an integer');\n this.round = roundNumber;\n }\n path() {\n return `/v2/blocks/${this.round}/txids`;\n }\n}\n//# sourceMappingURL=getBlockTxids.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\nimport { Box } from './models/types';\n/**\n * Given an application ID and the box name (key), return the value stored in the box.\n *\n * #### Example\n * ```typescript\n * const index = 60553466;\n * const boxName = Buffer.from(\"foo\");\n * const boxResponse = await algodClient.getApplicationBoxByName(index, boxName).do();\n * const boxValue = boxResponse.value;\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idbox)\n * @param index - The application ID to look up.\n * @category GET\n */\nexport default class GetApplicationBoxByName extends JSONRequest {\n constructor(c, intDecoding, index, name) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n // Encode name in base64 format and append the encoding prefix.\n const encodedName = Buffer.from(name).toString('base64');\n this.query.name = encodeURI(`b64:${encodedName}`);\n }\n /**\n * @returns `/v2/applications/${index}/box`\n */\n path() {\n return `/v2/applications/${this.index}/box`;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return Box.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=getApplicationBoxByName.js.map","import JSONRequest from '../jsonrequest';\nimport { BoxesResponse } from './models/types';\n/**\n * Given an application ID, return all the box names associated with the app.\n *\n * #### Example\n * ```typescript\n * const index = 60553466;\n * const boxesResponse = await algodClient.getApplicationBoxes(index).max(3).do();\n * const boxNames = boxesResponse.boxes.map(box => box.name);\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idboxes)\n * @param index - The application ID to look up.\n * @category GET\n */\nexport default class GetApplicationBoxes extends JSONRequest {\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n this.query.max = 0;\n }\n /**\n * @returns `/v2/applications/${index}/boxes`\n */\n path() {\n return `/v2/applications/${this.index}/boxes`;\n }\n /**\n * Limit results for pagination.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const boxesResult = await algodClient\n * .GetApplicationBoxes(1234)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n max(max) {\n this.query.max = max;\n return this;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return BoxesResponse.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=getApplicationBoxes.js.map","import JSONRequest from '../jsonrequest';\n/**\n * healthCheck returns an empty object iff the node is running\n */\nexport default class HealthCheck extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/health';\n }\n async do(headers = {}) {\n const res = await this.c.get(this.path(), {}, headers);\n if (!res.ok) {\n throw new Error(`Health response: ${res.status}`);\n }\n return {};\n }\n}\n//# sourceMappingURL=healthCheck.js.map","import JSONRequest from '../jsonrequest';\nimport * as encoding from '../../../encoding/encoding';\n/**\n * returns the transaction information for a specific txid of a pending transaction\n */\nexport default class PendingTransactionInformation extends JSONRequest {\n constructor(c, txid) {\n super(c);\n this.txid = txid;\n this.txid = txid;\n this.query.format = 'msgpack';\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n if (body && body.byteLength > 0) {\n return encoding.decode(body);\n }\n return undefined;\n }\n path() {\n return `/v2/transactions/pending/${this.txid}`;\n }\n // max sets the maximum number of txs to return\n max(max) {\n this.query.max = max;\n return this;\n }\n}\n//# sourceMappingURL=pendingTransactionInformation.js.map","import JSONRequest from '../jsonrequest';\nimport * as encoding from '../../../encoding/encoding';\n/**\n * pendingTransactionsInformation returns transactions that are pending in the pool\n */\nexport default class PendingTransactions extends JSONRequest {\n constructor(c) {\n super(c);\n this.query.format = 'msgpack';\n }\n /* eslint-disable class-methods-use-this */\n path() {\n return '/v2/transactions/pending';\n }\n prepare(body) {\n if (body && body.byteLength > 0) {\n return encoding.decode(body);\n }\n return undefined;\n }\n /* eslint-enable class-methods-use-this */\n // max sets the maximum number of txs to return\n max(max) {\n this.query.max = max;\n return this;\n }\n}\n//# sourceMappingURL=pendingTransactions.js.map","import JSONRequest from '../jsonrequest';\nimport * as encoding from '../../../encoding/encoding';\n/**\n * returns all transactions for a PK [addr] in the [first, last] rounds range.\n */\nexport default class PendingTransactionsByAddress extends JSONRequest {\n constructor(c, address) {\n super(c);\n this.address = address;\n this.address = address;\n this.query.format = 'msgpack';\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n if (body && body.byteLength > 0) {\n return encoding.decode(body);\n }\n return undefined;\n }\n path() {\n return `/v2/accounts/${this.address}/transactions/pending`;\n }\n // max sets the maximum number of txs to return\n max(max) {\n this.query.max = max;\n return this;\n }\n}\n//# sourceMappingURL=pendingTransactionsByAddress.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetTransactionProof extends JSONRequest {\n constructor(c, intDecoding, round, txID) {\n super(c, intDecoding);\n this.round = round;\n this.txID = txID;\n this.round = round;\n this.txID = txID;\n }\n path() {\n return `/v2/blocks/${this.round}/transactions/${this.txID}/proof`;\n }\n /**\n * Exclude assets and application data from results\n * The type of hash function used to create the proof, must be one of: \"sha512_256\", \"sha256\"\n *\n * #### Example\n * ```typescript\n * const hashType = \"sha256\";\n * const round = 123456;\n * const txId = \"abc123;\n * const txProof = await algodClient.getTransactionProof(round, txId)\n * .hashType(hashType)\n * .do();\n * ```\n *\n * @param hashType\n * @category query\n */\n hashType(hashType) {\n this.query.hashtype = hashType;\n return this;\n }\n}\n//# sourceMappingURL=getTransactionProof.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\nimport { concatArrays } from '../../../utils/utils';\n/**\n * Sets the default header (if not previously set) for sending a raw\n * transaction.\n * @param headers - A headers object\n */\nexport function setSendTransactionHeaders(headers = {}) {\n let hdrs = headers;\n if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) {\n hdrs = { ...headers };\n hdrs['Content-Type'] = 'application/x-binary';\n }\n return hdrs;\n}\nfunction isByteArray(array) {\n return array && array.byteLength !== undefined;\n}\n/**\n * broadcasts the passed signed txns to the network\n */\nexport default class SendRawTransaction extends JSONRequest {\n constructor(c, stxOrStxs) {\n super(c);\n let forPosting = stxOrStxs;\n if (Array.isArray(stxOrStxs)) {\n if (!stxOrStxs.every(isByteArray)) {\n throw new TypeError('Array elements must be byte arrays');\n }\n // Flatten into a single Uint8Array\n forPosting = concatArrays(...stxOrStxs);\n }\n else if (!isByteArray(forPosting)) {\n throw new TypeError('Argument must be byte array');\n }\n this.txnBytesToPost = forPosting;\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/transactions';\n }\n async do(headers = {}) {\n const txHeaders = setSendTransactionHeaders(headers);\n const res = await this.c.post(this.path(), Buffer.from(this.txnBytesToPost), txHeaders);\n return res.body;\n }\n}\n//# sourceMappingURL=sendRawTransaction.js.map","import JSONRequest from '../jsonrequest';\nexport default class Status extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/status';\n }\n}\n//# sourceMappingURL=status.js.map","import JSONRequest from '../jsonrequest';\nexport default class StatusAfterBlock extends JSONRequest {\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n if (!Number.isInteger(round))\n throw Error('round should be an integer');\n this.round = round;\n }\n path() {\n return `/v2/status/wait-for-block-after/${this.round}`;\n }\n}\n//# sourceMappingURL=statusAfterBlock.js.map","import JSONRequest from '../jsonrequest';\n/**\n * Returns the common needed parameters for a new transaction, in a format the transaction builder expects\n */\nexport default class SuggestedParamsRequest extends JSONRequest {\n /* eslint-disable class-methods-use-this */\n path() {\n return '/v2/transactions/params';\n }\n prepare(body) {\n return {\n flatFee: false,\n fee: body.fee,\n firstRound: body['last-round'],\n lastRound: body['last-round'] + 1000,\n genesisID: body['genesis-id'],\n genesisHash: body['genesis-hash'],\n minFee: body['min-fee'],\n };\n }\n}\n//# sourceMappingURL=suggestedParams.js.map","import JSONRequest from '../jsonrequest';\nexport default class Supply extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/ledger/supply';\n }\n}\n//# sourceMappingURL=supply.js.map","import JSONRequest from '../jsonrequest';\n/**\n * retrieves the VersionResponse from the running node\n */\nexport default class Versions extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/versions';\n }\n}\n//# sourceMappingURL=versions.js.map","import JSONRequest from '../jsonrequest';\nexport default class LightBlockHeaderProof extends JSONRequest {\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n this.round = round;\n }\n path() {\n return `/v2/blocks/${this.round}/lightheader/proof`;\n }\n}\n//# sourceMappingURL=lightBlockHeaderProof.js.map","import JSONRequest from '../jsonrequest';\nexport default class StateProof extends JSONRequest {\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n this.round = round;\n }\n path() {\n return `/v2/stateproofs/${this.round}`;\n }\n}\n//# sourceMappingURL=stateproof.js.map","import JSONRequest from '../jsonrequest';\nexport default class SetSyncRound extends JSONRequest {\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n this.round = round;\n }\n path() {\n return `/v2/ledger/sync/${this.round}`;\n }\n async do(headers = {}) {\n const res = await this.c.post(this.path(), headers);\n return res.body;\n }\n}\n//# sourceMappingURL=setSyncRound.js.map","import JSONRequest from '../jsonrequest';\nimport { GetSyncRoundResponse } from './models/types';\nexport default class GetSyncRound extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/ledger/sync`;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return GetSyncRoundResponse.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=getSyncRound.js.map","import JSONRequest from '../jsonrequest';\nexport default class SetBlockOffsetTimestamp extends JSONRequest {\n constructor(c, intDecoding, offset) {\n super(c, intDecoding);\n this.offset = offset;\n this.offset = offset;\n }\n path() {\n return `/v2/devmode/blocks/offset/${this.offset}`;\n }\n async do(headers = {}) {\n const res = await this.c.post(this.path(), headers);\n return res.body;\n }\n}\n//# sourceMappingURL=setBlockOffsetTimestamp.js.map","import JSONRequest from '../jsonrequest';\nimport { GetBlockTimeStampOffsetResponse } from './models/types';\nexport default class GetBlockOffsetTimestamp extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/devmode/blocks/offset`;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return GetBlockTimeStampOffsetResponse.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=getBlockOffsetTimestamp.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\n/**\n * Sets the default header (if not previously set)\n * @param headers - A headers object\n */\nexport function setHeaders(headers = {}) {\n let hdrs = headers;\n if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) {\n hdrs = { ...headers };\n hdrs['Content-Type'] = 'text/plain';\n }\n return hdrs;\n}\n/**\n * Executes disassemble\n */\nexport default class Disassemble extends JSONRequest {\n constructor(c, source) {\n super(c);\n this.source = source;\n this.source = source;\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/teal/disassemble`;\n }\n /**\n * Executes disassemble\n * @param headers - A headers object\n */\n async do(headers = {}) {\n const txHeaders = setHeaders(headers);\n const res = await this.c.post(this.path(), Buffer.from(this.source), txHeaders, this.query);\n return res.body;\n }\n}\n//# sourceMappingURL=disassemble.js.map","import { Buffer } from 'buffer';\nimport * as encoding from '../../../encoding/encoding';\nimport JSONRequest from '../jsonrequest';\nimport { SimulateResponse } from './models/types';\n/**\n * Sets the default header (if not previously set) for simulating a raw\n * transaction.\n * @param headers - A headers object\n */\nexport function setSimulateTransactionsHeaders(headers = {}) {\n let hdrs = headers;\n if (Object.keys(hdrs).every((key) => key.toLowerCase() !== 'content-type')) {\n hdrs = { ...headers };\n hdrs['Content-Type'] = 'application/msgpack';\n }\n return hdrs;\n}\n/**\n * Simulates signed txns.\n */\nexport default class SimulateRawTransactions extends JSONRequest {\n constructor(c, request) {\n super(c);\n this.query.format = 'msgpack';\n this.requestBytes = encoding.rawEncode(request.get_obj_for_encoding(true));\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/transactions/simulate';\n }\n async do(headers = {}) {\n const txHeaders = setSimulateTransactionsHeaders(headers);\n const res = await this.c.post(this.path(), Buffer.from(this.requestBytes), txHeaders, this.query, false);\n return this.prepare(res.body);\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n const decoded = encoding.decode(body);\n return SimulateResponse.from_obj_for_encoding(decoded);\n }\n}\n//# sourceMappingURL=simulateTransaction.js.map","import JSONRequest from '../jsonrequest';\nexport default class Ready extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/ready`;\n }\n}\n//# sourceMappingURL=ready.js.map","import JSONRequest from '../jsonrequest';\nexport default class UnsetSyncRound extends JSONRequest {\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/ledger/sync`;\n }\n async do(headers = {}) {\n const res = await this.c.delete(this.path(), headers);\n return res.body;\n }\n}\n//# sourceMappingURL=unsetSyncRound.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetLedgerStateDeltaForTransactionGroup extends JSONRequest {\n constructor(c, intDecoding, id) {\n super(c, intDecoding);\n this.id = id;\n this.id = id;\n this.query = { format: 'json' };\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/deltas/txn/group/${this.id}`;\n }\n}\n//# sourceMappingURL=getLedgerStateDeltaForTransactionGroup.js.map","import JSONRequest from '../jsonrequest';\nexport default class GetLedgerStateDelta extends JSONRequest {\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n this.round = round;\n this.query = { format: 'json' };\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/deltas/${this.round}`;\n }\n}\n//# sourceMappingURL=getLedgerStateDelta.js.map","import JSONRequest from '../jsonrequest';\nimport { TransactionGroupLedgerStateDeltasForRoundResponse } from './models/types';\nexport default class GetTransactionGroupLedgerStateDeltasForRound extends JSONRequest {\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n this.round = round;\n this.query = { format: 'json' };\n }\n // eslint-disable-next-line class-methods-use-this\n path() {\n return `/v2/deltas/${this.round}/txn/group`;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return TransactionGroupLedgerStateDeltasForRoundResponse.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=getTransactionGroupLedgerStateDeltasForRound.js.map","import ServiceClient from '../serviceClient';\nimport * as modelsv2 from './models/types';\nimport AccountInformation from './accountInformation';\nimport AccountAssetInformation from './accountAssetInformation';\nimport AccountApplicationInformation from './accountApplicationInformation';\nimport Block from './block';\nimport Compile from './compile';\nimport Dryrun from './dryrun';\nimport Genesis from './genesis';\nimport GetAssetByID from './getAssetByID';\nimport GetApplicationByID from './getApplicationByID';\nimport GetBlockHash from './getBlockHash';\nimport GetBlockTxids from './getBlockTxids';\nimport GetApplicationBoxByName from './getApplicationBoxByName';\nimport GetApplicationBoxes from './getApplicationBoxes';\nimport HealthCheck from './healthCheck';\nimport PendingTransactionInformation from './pendingTransactionInformation';\nimport PendingTransactions from './pendingTransactions';\nimport PendingTransactionsByAddress from './pendingTransactionsByAddress';\nimport GetTransactionProof from './getTransactionProof';\nimport SendRawTransaction from './sendRawTransaction';\nimport Status from './status';\nimport StatusAfterBlock from './statusAfterBlock';\nimport SuggestedParams from './suggestedParams';\nimport Supply from './supply';\nimport Versions from './versions';\nimport LightBlockHeaderProof from './lightBlockHeaderProof';\nimport StateProof from './stateproof';\nimport SetSyncRound from './setSyncRound';\nimport GetSyncRound from './getSyncRound';\nimport SetBlockOffsetTimestamp from './setBlockOffsetTimestamp';\nimport GetBlockOffsetTimestamp from './getBlockOffsetTimestamp';\nimport Disassemble from './disassemble';\nimport SimulateRawTransactions from './simulateTransaction';\nimport * as encoding from '../../../encoding/encoding';\nimport Ready from './ready';\nimport UnsetSyncRound from './unsetSyncRound';\nimport GetLedgerStateDeltaForTransactionGroup from './getLedgerStateDeltaForTransactionGroup';\nimport GetLedgerStateDelta from './getLedgerStateDelta';\nimport GetTransactionGroupLedgerStateDeltasForRound from './getTransactionGroupLedgerStateDeltasForRound';\n/**\n * Algod client connects an application to the Algorand blockchain. The algod client requires a valid algod REST endpoint IP address and algod token from an Algorand node that is connected to the network you plan to interact with.\n *\n * Algod is the main Algorand process for handling the blockchain. Messages between nodes are processed, the protocol steps are executed, and the blocks are written to disk. The algod process also exposes a REST API server that developers can use to communicate with the node and the network. Algod uses the data directory for storage and configuration information.\n *\n * #### Relevant Information\n * [How do I obtain an algod address and token?](https://developer.algorand.org/docs/archive/build-apps/setup/?from_query=algod#how-do-i-obtain-an-algod-address-and-token)\n *\n * [Run Algod in Postman OAS3](https://developer.algorand.org/docs/rest-apis/restendpoints/?from_query=algod#algod-indexer-and-kmd-rest-endpoints)\n */\nexport default class AlgodClient extends ServiceClient {\n /**\n * Create an AlgodClient from\n * * either a token, baseServer, port, and optional headers\n * * or a base client server for interoperability with external dApp wallets\n *\n * #### Example\n * ```typescript\n * const token = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\";\n * const server = \"http://localhost\";\n * const port = 4001;\n * const algodClient = new algosdk.Algodv2(token, server, port);\n * ```\n * @remarks\n * The above configuration is for a sandbox private network.\n * For applications on production, you are encouraged to run your own node, or use an Algorand REST API provider with a dedicated API key.\n *\n * @param tokenOrBaseClient - The algod token from the Algorand node you are interacting with\n * @param baseServer - REST endpoint\n * @param port - Port number if specifically configured by the server\n * @param headers - Optional headers\n */\n constructor(tokenOrBaseClient, baseServer, port, headers = {}) {\n super('X-Algo-API-Token', tokenOrBaseClient, baseServer, port, headers);\n }\n /**\n * Returns OK if healthy.\n *\n * #### Example\n * ```typescript\n * const health = await algodClient.healthCheck().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-health)\n * @category GET\n */\n healthCheck() {\n return new HealthCheck(this.c);\n }\n /**\n * Retrieves the supported API versions, binary build versions, and genesis information.\n *\n * #### Example\n * ```typescript\n * const versionsDetails = await algodClient.versionsCheck().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-versions)\n * @category GET\n */\n versionsCheck() {\n return new Versions(this.c);\n }\n /**\n * Broadcasts a raw transaction to the network.\n *\n * #### Example\n * ```typescript\n * const { txId } = await algodClient.sendRawTransaction(signedTxns).do();\n * const result = await waitForConfirmation(algodClient, txid, 3);\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactions)\n *\n * @remarks\n * Often used with {@linkcode waitForConfirmation}\n * @param stxOrStxs - Signed transactions\n * @category POST\n */\n sendRawTransaction(stxOrStxs) {\n return new SendRawTransaction(this.c, stxOrStxs);\n }\n /**\n * Returns the given account's status, balance and spendable amounts.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await algodClient.accountInformation(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)\n * @param account - The address of the account to look up.\n * @category GET\n */\n accountInformation(account) {\n return new AccountInformation(this.c, this.intDecoding, account);\n }\n /**\n * Returns the given account's asset information for a specific asset.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const index = 60553466;\n * const accountAssetInfo = await algodClient.accountAssetInformation(address, index).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)\n * @param account - The address of the account to look up.\n * @param index - The asset ID to look up.\n * @category GET\n */\n accountAssetInformation(account, index) {\n return new AccountAssetInformation(this.c, this.intDecoding, account, index);\n }\n /**\n * Returns the given account's application information for a specific application.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const index = 60553466;\n * const accountInfo = await algodClient.accountApplicationInformation(address, index).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddress)\n * @param account - The address of the account to look up.\n * @param index - The application ID to look up.\n * @category GET\n */\n accountApplicationInformation(account, index) {\n return new AccountApplicationInformation(this.c, this.intDecoding, account, index);\n }\n /**\n * Gets the block info for the given round.\n *\n * #### Example\n * ```typescript\n * const roundNumber = 18038133;\n * const block = await algodClient.block(roundNumber).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksround)\n * @param roundNumber - The round number of the block to get.\n * @category GET\n */\n block(roundNumber) {\n return new Block(this.c, roundNumber);\n }\n /**\n * Get the block hash for the block on the given round.\n *\n * #### Example\n * ```typescript\n * const roundNumber = 18038133;\n * const block = await algodClient.getBlockHash(roundNumber).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundhash)\n * @param roundNumber - The round number of the block to get.\n * @category GET\n */\n getBlockHash(roundNumber) {\n return new GetBlockHash(this.c, this.intDecoding, roundNumber);\n }\n /**\n * Get the top level transaction IDs for the block on the given round.\n *\n * #### Example\n * ```typescript\n * const roundNumber = 18038133;\n * const block = await algodClient.getBlockTxids(roundNumber).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundtxids)\n * @param roundNumber - The round number of the block to get.\n * @category GET\n */\n getBlockTxids(roundNumber) {\n return new GetBlockTxids(this.c, this.intDecoding, roundNumber);\n }\n /**\n * Returns the transaction information for a specific pending transaction.\n *\n * #### Example\n * ```typescript\n * const txId = \"DRJS6R745A7GFVMXEXWP4TGVDGKW7VILFTA7HC2BR2GRLHNY5CTA\";\n * const pending = await algodClient.pendingTransactionInformation(txId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionspendingtxid)\n *\n * @remarks\n *

\n * There are several cases when this might succeed:\n * - transaction committed (committed round > 0)\n * - transaction still in the pool (committed round = 0, pool error = \"\")\n * - transaction removed from pool due to error (committed round = 0, pool error != \"\")\n *\n * Or the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.\n *\n * @param txid - The TxID string of the pending transaction to look up.\n * @category GET\n */\n pendingTransactionInformation(txid) {\n return new PendingTransactionInformation(this.c, txid);\n }\n /**\n * Returns the list of pending transactions in the pool, sorted by priority, in decreasing order, truncated at the end at MAX.\n * If MAX = 0, returns all pending transactions.\n *\n * #### Example 1\n * ```typescript\n * const pendingTxns = await algodClient.pendingTransactionsInformation().do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const maxTxns = 5;\n * const pendingTxns = await algodClient\n * .pendingTransactionsInformation()\n * .max(maxTxns)\n * .do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionspending)\n * @category GET\n */\n pendingTransactionsInformation() {\n return new PendingTransactions(this.c);\n }\n /**\n * Returns the list of pending transactions sent by the address, sorted by priority, in decreasing order, truncated at the end at MAX.\n * If MAX = 0, returns all pending transactions.\n *\n * #### Example 1\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const pendingTxnsByAddr = await algodClient.pendingTransactionByAddress(address).do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const maxTxns = 5;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const pendingTxns = await algodClient\n * .pendingTransactionByAddress(address)\n * .max(maxTxns)\n * .do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2accountsaddresstransactionspending)\n * @param address - The address of the sender.\n * @category GET\n */\n pendingTransactionByAddress(address) {\n return new PendingTransactionsByAddress(this.c, address);\n }\n /**\n * Retrieves the StatusResponse from the running node.\n *\n * #### Example\n * ```typescript\n * const status = await algodClient.status().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2status)\n * @category GET\n */\n status() {\n return new Status(this.c, this.intDecoding);\n }\n /**\n * Waits for a specific round to occur then returns the `StatusResponse` for that round.\n *\n * #### Example\n * ```typescript\n * const round = 18038133;\n * const statusAfterBlock = await algodClient.statusAfterBlock(round).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2statuswait-for-block-afterround)\n * @param round - The number of the round to wait for.\n * @category GET\n */\n statusAfterBlock(round) {\n return new StatusAfterBlock(this.c, this.intDecoding, round);\n }\n /**\n * Returns the common needed parameters for a new transaction.\n *\n * #### Example\n * ```typescript\n * const suggestedParams = await algodClient.getTransactionParams().do();\n * const amountInMicroAlgos = algosdk.algosToMicroalgos(2); // 2 Algos\n * const unsignedTxn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({\n * from: senderAddress,\n * to: receiverAddress,\n * amount: amountInMicroAlgos,\n * suggestedParams: suggestedParams,\n * });\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2transactionsparams)\n *\n * @remarks\n * Often used with\n * {@linkcode makePaymentTxnWithSuggestedParamsFromObject}, {@linkcode algosToMicroalgos}\n * @category GET\n */\n getTransactionParams() {\n return new SuggestedParams(this.c);\n }\n /**\n * Returns the supply details for the specified node's ledger.\n *\n * #### Example\n * ```typescript\n * const supplyDetails = await algodClient.supply().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2ledgersupply)\n * @category GET\n */\n supply() {\n return new Supply(this.c, this.intDecoding);\n }\n /**\n * Compiles TEAL source code to binary, returns base64 encoded program bytes and base32 SHA512_256 hash of program bytes (Address style).\n *\n * #### Example\n * ```typescript\n * const source = \"TEAL SOURCE CODE\";\n * const compiledSmartContract = await algodClient.compile(source).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealcompile)\n * @remarks\n * This endpoint is only enabled when a node's configuration file sets `EnableDeveloperAPI` to true.\n * @param source\n * @category POST\n */\n compile(source) {\n return new Compile(this.c, source);\n }\n /**\n * Given the program bytes, return the TEAL source code in plain text.\n *\n * #### Example\n * ```typescript\n * const bytecode = \"TEAL bytecode\";\n * const disassembledSource = await algodClient.disassemble(bytecode).do();\n * ```\n *\n * @remarks This endpoint is only enabled when a node's configuration file sets EnableDeveloperAPI to true.\n * @param source\n */\n disassemble(source) {\n return new Disassemble(this.c, source);\n }\n /**\n * Provides debugging information for a transaction (or group).\n *\n * Executes TEAL program(s) in context and returns debugging information about the execution. This endpoint is only enabled when a node's configureation file sets `EnableDeveloperAPI` to true.\n *\n * #### Example\n * ```typescript\n * const dryRunResult = await algodClient.dryrun(dr).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2tealdryrun)\n * @param dr\n * @category POST\n */\n dryrun(dr) {\n return new Dryrun(this.c, dr);\n }\n /**\n * Given an asset ID, return asset information including creator, name, total supply and\n * special addresses.\n *\n * #### Example\n * ```typescript\n * const asset_id = 163650;\n * const asset = await algodClient.getAssetByID(asset_id).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2assetsasset-id)\n * @param index - The asset ID to look up.\n * @category GET\n */\n getAssetByID(index) {\n return new GetAssetByID(this.c, this.intDecoding, index);\n }\n /**\n * Given an application ID, return the application information including creator, approval\n * and clear programs, global and local schemas, and global state.\n *\n * #### Example\n * ```typescript\n * const index = 60553466;\n * const app = await algodClient.getApplicationByID(index).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-id)\n * @param index - The application ID to look up.\n * @category GET\n */\n getApplicationByID(index) {\n return new GetApplicationByID(this.c, this.intDecoding, index);\n }\n /**\n * Given an application ID and the box name (key), return the value stored in the box.\n *\n * #### Example\n * ```typescript\n * const index = 60553466;\n * const boxName = Buffer.from(\"foo\");\n * const boxResponse = await algodClient.getApplicationBoxByName(index, boxName).do();\n * const boxValue = boxResponse.value;\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idbox)\n * @param index - The application ID to look up.\n * @category GET\n */\n getApplicationBoxByName(index, boxName) {\n return new GetApplicationBoxByName(this.c, this.intDecoding, index, boxName);\n }\n /**\n * Given an application ID, return all the box names associated with the app.\n *\n * #### Example\n * ```typescript\n * const index = 60553466;\n * const boxesResponse = await algodClient.getApplicationBoxes(index).max(3).do();\n * const boxNames = boxesResponse.boxes.map(box => box.name);\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2applicationsapplication-idboxes)\n * @param index - The application ID to look up.\n * @category GET\n */\n getApplicationBoxes(index) {\n return new GetApplicationBoxes(this.c, this.intDecoding, index);\n }\n /**\n * Returns the entire genesis file.\n *\n * #### Example\n * ```typescript\n * const genesis = await algodClient.genesis().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-genesis)\n * @category GET\n */\n genesis() {\n return new Genesis(this.c, this.intDecoding);\n }\n /**\n * Returns a Merkle proof for a given transaction in a block.\n *\n * #### Example\n * ```typescript\n * const round = 18038133;\n * const txId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const proof = await algodClient.getTransactionProof(round, txId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2blocksroundtransactionstxidproof)\n * @param round - The round in which the transaction appears.\n * @param txID - The transaction ID for which to generate a proof.\n * @category GET\n */\n getTransactionProof(round, txID) {\n return new GetTransactionProof(this.c, this.intDecoding, round, txID);\n }\n /**\n * Gets a proof for a given light block header inside a state proof commitment.\n *\n * #### Example\n * ```typescript\n * const round = 11111111;\n * const lightBlockHeaderProof = await algodClient.getLightBlockHeaderProof(round).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2#get-v2blocksroundlightheaderproof)\n * @param round\n */\n getLightBlockHeaderProof(round) {\n return new LightBlockHeaderProof(this.c, this.intDecoding, round);\n }\n /**\n * Gets a state proof that covers a given round.\n *\n * #### Example\n * ```typescript\n * const round = 11111111;\n * const stateProof = await algodClient.getStateProof(round).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2#get-v2stateproofsround)\n * @param round\n */\n getStateProof(round) {\n return new StateProof(this.c, this.intDecoding, round);\n }\n /**\n * Simulate a list of a signed transaction objects being sent to the network.\n *\n * #### Example\n * ```typescript\n * const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn1Params);\n * const txn2 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn2Params);\n * const txgroup = algosdk.assignGroupID([txn1, txn2]);\n *\n * // Actually sign the first transaction\n * const signedTxn1 = txgroup[0].signTxn(senderSk).blob;\n * // Simulate does not require signed transactions -- use this method to encode an unsigned transaction\n * const signedTxn2 = algosdk.encodeUnsignedSimulateTransaction(txgroup[1]);\n *\n * const resp = await client.simulateRawTransactions([signedTxn1, signedTxn2]).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactionssimulate)\n * @param stxOrStxs\n * @category POST\n */\n simulateRawTransactions(stxOrStxs) {\n const txnObjects = [];\n if (Array.isArray(stxOrStxs)) {\n for (const stxn of stxOrStxs) {\n txnObjects.push(encoding.decode(stxn));\n }\n }\n else {\n txnObjects.push(encoding.decode(stxOrStxs));\n }\n const request = new modelsv2.SimulateRequest({\n txnGroups: [\n new modelsv2.SimulateRequestTransactionGroup({\n txns: txnObjects,\n }),\n ],\n });\n return this.simulateTransactions(request);\n }\n /**\n * Simulate transactions being sent to the network.\n *\n * #### Example\n * ```typescript\n * const txn1 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn1Params);\n * const txn2 = algosdk.makePaymentTxnWithSuggestedParamsFromObject(txn2Params);\n * const txgroup = algosdk.assignGroupID([txn1, txn2]);\n *\n * // Actually sign the first transaction\n * const signedTxn1 = txgroup[0].signTxn(senderSk).blob;\n * // Simulate does not require signed transactions -- use this method to encode an unsigned transaction\n * const signedTxn2 = algosdk.encodeUnsignedSimulateTransaction(txgroup[1]);\n *\n * const request = new modelsv2.SimulateRequest({\n * txnGroups: [\n * new modelsv2.SimulateRequestTransactionGroup({\n * // Must decode the signed txn bytes into an object\n * txns: [algosdk.decodeObj(signedTxn1), algosdk.decodeObj(signedTxn2)]\n * }),\n * ],\n * });\n * const resp = await client.simulateRawTransactions(request).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2transactionssimulate)\n * @param request\n * @category POST\n */\n simulateTransactions(request) {\n return new SimulateRawTransactions(this.c, request);\n }\n /**\n * Set the offset (in seconds) applied to the block timestamp when creating new blocks in devmode.\n *\n * #### Example\n * ```typesecript\n * const offset = 60\n * await client.setBlockOffsetTimestamp(offset).do();\n * ```\n *\n [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2devmodeblocksoffsetoffset)\n * @param offset\n * @category POST\n */\n setBlockOffsetTimestamp(offset) {\n return new SetBlockOffsetTimestamp(this.c, this.intDecoding, offset);\n }\n /**\n * Get the offset (in seconds) applied to the block timestamp when creating new blocks in devmode.\n *\n * #### Example\n * ```typesecript\n * const currentOffset = await client.getBlockOffsetTimestamp().do();\n * ```\n *\n [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2devmodeblocksoffset)\n * @category GET\n */\n getBlockOffsetTimestamp() {\n return new GetBlockOffsetTimestamp(this.c, this.intDecoding);\n }\n /**\n * Set the sync round on the ledger (algod must have EnableFollowMode: true), restricting catchup.\n *\n * #### Example\n * ```typesecript\n * const round = 10000\n * await client.setSyncRound(round).do();\n * ```\n *\n [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#post-v2ledgersyncround)\n * @param round\n * @category POST\n */\n setSyncRound(round) {\n return new SetSyncRound(this.c, this.intDecoding, round);\n }\n /**\n * Un-Set the sync round on the ledger (algod must have EnableFollowMode: true), removing the restriction on catchup.\n *\n * #### Example\n * ```typesecript\n * await client.unsetSyncRound().do();\n * ```\n *\n [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#delete-v2ledgersync)\n * @category DELETE\n */\n unsetSyncRound() {\n return new UnsetSyncRound(this.c, this.intDecoding);\n }\n /**\n * Get the current sync round on the ledger (algod must have EnableFollowMode: true).\n *\n * #### Example\n * ```typesecript\n * const currentSyncRound = await client.getSyncRound().do();\n * ```\n *\n [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2ledgersync)\n * @category GET\n */\n getSyncRound() {\n return new GetSyncRound(this.c, this.intDecoding);\n }\n /**\n * Ready check which returns 200 OK if algod is healthy and caught up\n *\n * #### Example\n * ```typesecript\n * await client.ready().do();\n * ```\n *\n [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-ready)\n * @category GET\n */\n ready() {\n return new Ready(this.c, this.intDecoding);\n }\n /**\n * GetLedgerStateDeltaForTransactionGroup returns the ledger delta for the txn group identified by id\n *\n * #### Example\n * ```typescript\n * const id = \"ABC123\";\n * await client.getLedgerStateDeltaForTransactionGroup(id).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltastxngroupid)\n * @param id txn ID or group ID to be searched for\n * @category GET\n */\n getLedgerStateDeltaForTransactionGroup(id) {\n return new GetLedgerStateDeltaForTransactionGroup(this.c, this.intDecoding, id);\n }\n /**\n * GetLedgerStateDelta returns the ledger delta for the entire round\n *\n * #### Example\n * ```typescript\n * const round = 12345;\n * await client.getLedgerStateDelta(round).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasround)\n * @param round the round number to be searched for\n * @category GET\n */\n getLedgerStateDelta(round) {\n return new GetLedgerStateDelta(this.c, this.intDecoding, round);\n }\n /**\n * GetTransactionGroupLedgerStateDeltasForRound returns all ledger deltas for txn groups in the provided round\n *\n * #### Example\n * ```typescript\n * const round = 12345;\n * await client.getTransactionGroupLedgerStateDeltasForRound(round).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasroundtxngroup)\n * @param round the round number to be searched for\n * @category GET\n */\n getTransactionGroupLedgerStateDeltasForRound(round) {\n return new GetTransactionGroupLedgerStateDeltasForRound(this.c, this.intDecoding, round);\n }\n}\n//# sourceMappingURL=algod.js.map","import { Buffer } from 'buffer';\nimport ServiceClient from './v2/serviceClient';\nimport * as txn from '../transaction';\nexport default class Kmd extends ServiceClient {\n constructor(token, baseServer = 'http://127.0.0.1', port = 7833, headers = {}) {\n super('X-KMD-API-Token', token, baseServer, port, headers);\n }\n /**\n * version returns a VersionResponse containing a list of kmd API versions supported by this running kmd instance.\n */\n async versions() {\n const res = await this.c.get('/versions');\n return res.body;\n }\n /**\n * listWallets returns a ListWalletsResponse containing the list of wallets known to kmd. Using a wallet ID\n * returned from this endpoint, you can initialize a wallet handle with client.InitWalletHandle\n */\n async listWallets() {\n const res = await this.c.get('/v1/wallets');\n return res.body;\n }\n /**\n * createWallet creates a wallet with the specified name, password, driver,\n * and master derivation key. If the master derivation key is blank, one is\n * generated internally to kmd. CreateWallet returns a CreateWalletResponse\n * containing information about the new wallet.\n * @param walletName\n * @param walletPassword\n * @param walletDriverName\n * @param walletMDK\n */\n async createWallet(walletName, walletPassword, walletMDK = new Uint8Array(), walletDriverName = 'sqlite') {\n const req = {\n wallet_name: walletName,\n wallet_driver_name: walletDriverName,\n wallet_password: walletPassword,\n master_derivation_key: Buffer.from(walletMDK).toString('base64'),\n };\n const res = await this.c.post('/v1/wallet', req);\n return res.body;\n }\n /**\n * initWalletHandle accepts a wallet ID and a wallet password, and returns an\n * initWalletHandleResponse containing a wallet handle token. This wallet\n * handle token can be used for subsequent operations on this wallet, like key\n * generation, transaction signing, etc.. WalletHandleTokens expire after a\n * configurable number of seconds, and must be renewed periodically with\n * RenewWalletHandle. It is good practice to call ReleaseWalletHandle when\n * you're done interacting with this wallet.\n * @param walletID\n * @param walletPassword\n */\n async initWalletHandle(walletID, walletPassword) {\n const req = {\n wallet_id: walletID,\n wallet_password: walletPassword,\n };\n const res = await this.c.post('/v1/wallet/init', req);\n return res.body;\n }\n /**\n * releaseWalletHandle invalidates the passed wallet handle token, making\n * it unusuable for subsequent wallet operations.\n * @param walletHandle\n */\n async releaseWalletHandle(walletHandle) {\n const req = {\n wallet_handle_token: walletHandle,\n };\n const res = await this.c.post('/v1/wallet/release', req);\n return res.body;\n }\n /**\n * renewWalletHandle accepts a wallet handle and attempts to renew it, moving\n * the expiration time to some number of seconds in the future. It returns a\n * RenewWalletHandleResponse containing the walletHandle and the number of\n * seconds until expiration\n * @param walletHandle\n */\n async renewWalletHandle(walletHandle) {\n const req = {\n wallet_handle_token: walletHandle,\n };\n const res = await this.c.post('/v1/wallet/renew', req);\n return res.body;\n }\n /**\n * renameWallet accepts a wallet ID, wallet password, and a new wallet name,\n * and renames the underlying wallet.\n * @param walletID\n * @param walletPassword\n * @param newWalletName\n */\n async renameWallet(walletID, walletPassword, newWalletName) {\n const req = {\n wallet_id: walletID,\n wallet_password: walletPassword,\n wallet_name: newWalletName,\n };\n const res = await this.c.post('/v1/wallet/rename', req);\n return res.body;\n }\n /**\n * getWallet accepts a wallet handle and returns high level information about\n * this wallet in a GetWalletResponse.\n * @param walletHandle\n */\n async getWallet(walletHandle) {\n const req = {\n wallet_handle_token: walletHandle,\n };\n const res = await this.c.post('/v1/wallet/info', req);\n return res.body;\n }\n /**\n * exportMasterDerivationKey accepts a wallet handle and a wallet password, and\n * returns an ExportMasterDerivationKeyResponse containing the master\n * derivation key. This key can be used as an argument to CreateWallet in\n * order to recover the keys generated by this wallet. The master derivation\n * key can be encoded as a sequence of words using the mnemonic library, and\n * @param walletHandle\n * @param walletPassword\n */\n async exportMasterDerivationKey(walletHandle, walletPassword) {\n const req = {\n wallet_handle_token: walletHandle,\n wallet_password: walletPassword,\n };\n const res = await this.c.post('/v1/master-key/export', req);\n return {\n master_derivation_key: Buffer.from(res.body.master_derivation_key, 'base64'),\n };\n }\n /**\n * importKey accepts a wallet handle and an ed25519 private key, and imports\n * the key into the wallet. It returns an ImportKeyResponse containing the\n * address corresponding to this private key.\n * @param walletHandle\n * @param secretKey\n */\n async importKey(walletHandle, secretKey) {\n const req = {\n wallet_handle_token: walletHandle,\n private_key: Buffer.from(secretKey).toString('base64'),\n };\n const res = await this.c.post('/v1/key/import', req);\n return res.body;\n }\n /**\n * exportKey accepts a wallet handle, wallet password, and address, and returns\n * an ExportKeyResponse containing the ed25519 private key corresponding to the\n * address stored in the wallet.\n * @param walletHandle\n * @param walletPassword\n * @param addr\n */\n async exportKey(walletHandle, walletPassword, addr) {\n const req = {\n wallet_handle_token: walletHandle,\n address: addr,\n wallet_password: walletPassword,\n };\n const res = await this.c.post('/v1/key/export', req);\n return { private_key: Buffer.from(res.body.private_key, 'base64') };\n }\n /**\n * generateKey accepts a wallet handle, and then generates the next key in the\n * wallet using its internal master derivation key. Two wallets with the same\n * master derivation key will generate the same sequence of keys.\n * @param walletHandle\n */\n async generateKey(walletHandle) {\n const req = {\n wallet_handle_token: walletHandle,\n display_mnemonic: false,\n };\n const res = await this.c.post('/v1/key', req);\n return res.body;\n }\n /**\n * deleteKey accepts a wallet handle, wallet password, and address, and deletes\n * the information about this address from the wallet (including address and\n * secret key). If DeleteKey is called on a key generated using GenerateKey,\n * the same key will not be generated again. However, if a wallet is recovered\n * using the master derivation key, a key generated in this way can be\n * recovered.\n * @param walletHandle\n * @param walletPassword\n * @param addr\n */\n async deleteKey(walletHandle, walletPassword, addr) {\n const req = {\n wallet_handle_token: walletHandle,\n address: addr,\n wallet_password: walletPassword,\n };\n const res = await this.c.delete('/v1/key', req);\n return res.body;\n }\n /**\n * ListKeys accepts a wallet handle and returns a ListKeysResponse containing\n * all of the addresses for which this wallet contains secret keys.\n * @param walletHandle\n */\n async listKeys(walletHandle) {\n const req = {\n wallet_handle_token: walletHandle,\n };\n const res = await this.c.post('/v1/key/list', req);\n return res.body;\n }\n /**\n * signTransaction accepts a wallet handle, wallet password, and a transaction,\n * and returns and SignTransactionResponse containing an encoded, signed\n * transaction. The transaction is signed using the key corresponding to the\n * Sender field.\n * @param walletHandle\n * @param walletPassword\n * @param transaction\n */\n async signTransaction(walletHandle, walletPassword, transaction) {\n const tx = txn.instantiateTxnIfNeeded(transaction);\n const req = {\n wallet_handle_token: walletHandle,\n wallet_password: walletPassword,\n transaction: Buffer.from(tx.toByte()).toString('base64'),\n };\n const res = await this.c.post('/v1/transaction/sign', req);\n if (res.status === 200) {\n return Buffer.from(res.body.signed_transaction, 'base64');\n }\n return res.body;\n }\n /**\n * signTransactionWithSpecificPublicKey accepts a wallet handle, wallet password, a transaction, and a public key,\n * and returns and SignTransactionResponse containing an encoded, signed\n * transaction. The transaction is signed using the key corresponding to the\n * publicKey arg.\n * @param walletHandle\n * @param walletPassword\n * @param transaction\n * @param publicKey - sign the txn with the key corresponding to publicKey (used for working with a rekeyed addr)\n */\n async signTransactionWithSpecificPublicKey(walletHandle, walletPassword, transaction, publicKey) {\n const tx = txn.instantiateTxnIfNeeded(transaction);\n const req = {\n wallet_handle_token: walletHandle,\n wallet_password: walletPassword,\n transaction: Buffer.from(tx.toByte()).toString('base64'),\n public_key: Buffer.from(publicKey).toString('base64'),\n };\n const res = await this.c.post('/v1/transaction/sign', req);\n if (res.status === 200) {\n return Buffer.from(res.body.signed_transaction, 'base64');\n }\n return res.body;\n }\n /**\n * listMultisig accepts a wallet handle and returns a ListMultisigResponse\n * containing the multisig addresses whose preimages are stored in this wallet.\n * A preimage is the information needed to reconstruct this multisig address,\n * including multisig version information, threshold information, and a list\n * of public keys.\n * @param walletHandle\n */\n async listMultisig(walletHandle) {\n const req = {\n wallet_handle_token: walletHandle,\n };\n const res = await this.c.post('/v1/multisig/list', req);\n return res.body;\n }\n /**\n * importMultisig accepts a wallet handle and the information required to\n * generate a multisig address. It derives this address, and stores all of the\n * information within the wallet. It returns a ImportMultisigResponse with the\n * derived address.\n * @param walletHandle\n * @param version\n * @param threshold\n * @param pks\n */\n async importMultisig(walletHandle, version, threshold, pks) {\n const req = {\n wallet_handle_token: walletHandle,\n multisig_version: version,\n threshold,\n pks,\n };\n const res = await this.c.post('/v1/multisig/import', req);\n return res.body;\n }\n /**\n * exportMultisig accepts a wallet handle, wallet password, and multisig\n * address, and returns an ExportMultisigResponse containing the stored\n * multisig preimage. The preimage contains all of the information necessary\n * to derive the multisig address, including version, threshold, and a list of\n * public keys.\n * @param walletHandle\n * @param walletPassword\n * @param addr\n */\n async exportMultisig(walletHandle, addr) {\n const req = {\n wallet_handle_token: walletHandle,\n address: addr,\n };\n const res = await this.c.post('/v1/multisig/export', req);\n return res.body;\n }\n /**\n * signMultisigTransaction accepts a wallet handle, wallet password,\n * transaction, public key (*not* an address), and an optional partial\n * MultisigSig. It looks up the secret key corresponding to the public key, and\n * returns a SignMultisigTransactionResponse containing a MultisigSig with a\n * signature by the secret key included.\n * @param walletHandle\n * @param pw\n * @param tx\n * @param pk\n * @param partial\n */\n async signMultisigTransaction(walletHandle, pw, transaction, pk, partial) {\n const tx = txn.instantiateTxnIfNeeded(transaction);\n const req = {\n wallet_handle_token: walletHandle,\n transaction: Buffer.from(tx.toByte()).toString('base64'),\n public_key: Buffer.from(pk).toString('base64'),\n partial_multisig: partial,\n wallet_password: pw,\n };\n const res = await this.c.post('/v1/multisig/sign', req);\n return res.body;\n }\n /**\n * deleteMultisig accepts a wallet handle, wallet password, and multisig\n * address, and deletes the information about this multisig address from the\n * wallet (including address and secret key).\n * @param walletHandle\n * @param walletPassword\n * @param addr\n */\n async deleteMultisig(walletHandle, walletPassword, addr) {\n const req = {\n wallet_handle_token: walletHandle,\n address: addr,\n wallet_password: walletPassword,\n };\n const res = await this.c.delete('/v1/multisig', req);\n return res.body;\n }\n}\n//# sourceMappingURL=kmd.js.map","import JSONRequest from '../jsonrequest';\n/**\n * Returns the health object for the service.\n * Returns 200 if healthy.\n *\n * #### Example\n * ```typescript\n * const health = await indexerClient.makeHealthCheck().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-health)\n * @category GET\n */\nexport default class MakeHealthCheck extends JSONRequest {\n /**\n * @returns `/health`\n */\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/health';\n }\n}\n//# sourceMappingURL=makeHealthCheck.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAssetBalances extends JSONRequest {\n /**\n * Returns the list of accounts which hold the given asset and their balance.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetBalances = await indexerClient.lookupAssetBalances(assetId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idbalances)\n * @param index - The asset ID to look up.\n */\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n /**\n * @returns `/v2/assets/${index}/balances`\n */\n path() {\n return `/v2/assets/${this.index}/balances`;\n }\n /**\n * Limit results for pagination.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const maxResults = 20;\n * const assetBalances = await indexerClient\n * .lookupAssetBalances(assetId)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Filtered results should have an asset balance greater than this value.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const minBalance = 1000000;\n * const assetBalances = await indexerClient\n * .lookupAssetBalances(assetId)\n * .currencyGreaterThan(minBalance)\n * .do();\n * ```\n * @param greater\n * @category query\n */\n currencyGreaterThan(greater) {\n // We convert the following to a string for now to correctly include zero values in request parameters.\n this.query['currency-greater-than'] = greater.toString();\n return this;\n }\n /**\n * Filtered results should have an asset balance less than this value.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const maxBalance = 2000000;\n * const assetBalances = await indexerClient\n * .lookupAssetBalances(assetId)\n * .currencyLessThan(maxBalance)\n * .do();\n * ```\n * @param lesser\n * @category query\n */\n currencyLessThan(lesser) {\n this.query['currency-less-than'] = lesser;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const maxResults = 20;\n *\n * const assetBalancesPage1 = await indexerClient\n * .lookupAssetBalances(assetId)\n * .limit(maxResults)\n * .do();\n *\n * const assetBalancesPage2 = await indexerClient\n * .lookupAssetBalances(assetId)\n * .limit(maxResults)\n * .nextToken(assetBalancesPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.\n *\n * #### Example 1\n * ```typescript\n * const assetId = 163650;\n * const assetBalances = await indexerClient\n * .lookupAssetBalances(assetId)\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetId = 163650;\n * const assetBalances = await indexerClient\n * .lookupAssetBalances(assetId)\n * .includeAll()\n * .do();\n * ```\n *\n * @param value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n}\n//# sourceMappingURL=lookupAssetBalances.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\n/**\n * Accept base64 string or Uint8Array and output base64 string\n * @param data - Base64 string or Uint8Array\n * @returns The inputted base64 string, or a base64 string representation of the Uint8Array\n */\nexport function base64StringFunnel(data) {\n if (typeof data === 'string') {\n return data;\n }\n return Buffer.from(data).toString('base64');\n}\nexport default class LookupAccountTransactions extends JSONRequest {\n /**\n * Returns transactions relating to the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient.lookupAccountTransactions(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idtransactions)\n * @param account - The address of the account.\n */\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n /**\n * @returns `/v2/accounts/${account}/transactions`\n */\n path() {\n return `/v2/accounts/${this.account}/transactions`;\n }\n /**\n * Specifies a prefix which must be contained in the note field.\n *\n * #### Example\n * ```typescript\n * const notePrefixBase64Encoded = \"Y3JlYXRl\";\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .notePrefix(notePrefixBase64Encoded)\n * .do();\n * ```\n *\n * @param prefix - base64 string or uint8array\n * @category query\n */\n notePrefix(prefix) {\n this.query['note-prefix'] = base64StringFunnel(prefix);\n return this;\n }\n /**\n * Type of transaction to filter with.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .txType(\"appl\")\n * .do();\n * ```\n *\n * @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`, `stpf`\n * @category query\n */\n txType(type) {\n this.query['tx-type'] = type;\n return this;\n }\n /**\n * Type of signature to filter with.\n * - sig: Standard\n * - msig: MultiSig\n * - lsig: LogicSig\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .sigType(\"msig\")\n * .do();\n * ```\n *\n * @param type - one of `sig`, `msig`, `lsig`\n * @category query\n */\n sigType(type) {\n this.query['sig-type'] = type;\n return this;\n }\n /**\n * Lookup the specific transaction by ID.\n *\n * #### Example\n * ```typescript\n * const txId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .txid(txId)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupTransactionByID(txnId).do()`\n * @param txid\n * @category query\n */\n txid(txid) {\n this.query.txid = txid;\n return this;\n }\n /**\n * Include results for the specified round.\n *\n * #### Example\n * ```typescript\n * const targetBlock = 18309917;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .round(targetBlock)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Include results at or after the specified min-round.\n *\n * #### Example\n * ```typescript\n * const minRound = 18309917;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .minRound(minRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n minRound(round) {\n this.query['min-round'] = round;\n return this;\n }\n /**\n * Include results at or before the specified max-round.\n *\n * #### Example\n * ```typescript\n * const maxRound = 18309917;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .maxRound(maxRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n maxRound(round) {\n this.query['max-round'] = round;\n return this;\n }\n /**\n * Asset ID to filter with.\n *\n * #### Example\n * ```typescript\n * const assetID = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .assetID(assetID)\n * .do();\n * ```\n *\n * @param id\n * @category query\n */\n assetID(id) {\n this.query['asset-id'] = id;\n return this;\n }\n /**\n * Maximum number of results to return.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Include results before the given time.\n *\n * #### Example\n * ```typescript\n * const beforeTime = \"2022-02-02T20:20:22.02Z\";\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .beforeTime(beforeTime)\n * .do();\n * ```\n *\n * @param before - rfc3339 string\n * @category query\n */\n beforeTime(before) {\n this.query['before-time'] = before;\n return this;\n }\n /**\n * Include results after the given time.\n *\n * #### Example\n * ```typescript\n * const afterTime = \"2022-10-21T00:00:11.55Z\";\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .afterTime(afterTime)\n * .do();\n * ```\n *\n * @param after - rfc3339 string\n * @category query\n */\n afterTime(after) {\n this.query['after-time'] = after;\n return this;\n }\n /**\n * Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.\n *\n * #### Example 1\n * ```typescript\n * const minBalance = 300000;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetID = 163650;\n * const minBalance = 300000;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .assetID(assetID)\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n *\n * @param greater\n * @category query\n */\n currencyGreaterThan(greater) {\n // We convert the following to a string for now to correctly include zero values in request parameters.\n this.query['currency-greater-than'] = greater.toString();\n return this;\n }\n /**\n * Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.\n *\n * #### Example 1\n * ```typescript\n * const maxBalance = 500000;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetID = 163650;\n * const maxBalance = 500000;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .assetID(assetID)\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * @param lesser\n * @category query\n */\n currencyLessThan(lesser) {\n this.query['currency-less-than'] = lesser;\n return this;\n }\n /**\n * The next page of results. Use the next token provided by the previous results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n *\n * const accountTxnsPage1 = await indexerClient\n * .lookupAccountTransactions(address)\n * .limit(maxResults)\n * .do();\n *\n * const accountTxnsPage2 = await indexerClient\n * .lookupAccountTransactions(address)\n * .limit(maxResults)\n * .nextToken(accountTxnsPage1[\"next-token\"])\n * .do();\n * ```\n *\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Whether or not to include rekeying transactions.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient\n * .lookupAccountTransactions(address)\n * .rekeyTo(false)\n * .do();\n * ```\n *\n * @param rekeyTo\n * @category query\n */\n rekeyTo(rekeyTo) {\n this.query['rekey-to'] = rekeyTo;\n return this;\n }\n}\n//# sourceMappingURL=lookupAccountTransactions.js.map","import JSONRequest from '../jsonrequest';\nimport { base64StringFunnel } from './lookupAccountTransactions';\nexport default class LookupAssetTransactions extends JSONRequest {\n /**\n * Returns transactions relating to the given asset.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetTxns = await indexerClient.lookupAssetTransactions(assetId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idtransactions)\n * @param index - The asset ID to look up.\n */\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n /**\n * @returns `/v2/assets/${index}/transactions`\n */\n path() {\n return `/v2/assets/${this.index}/transactions`;\n }\n /**\n * Specifies a prefix which must be contained in the note field.\n *\n * #### Example\n * ```typescript\n * const notePrefixBase64Encoded = \"Y3JlYXRl\";\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .notePrefix(notePrefixBase64Encoded)\n * .do();\n * ```\n *\n * @param prefix - base64 string or uint8array\n * @category query\n */\n notePrefix(prefix) {\n this.query['note-prefix'] = base64StringFunnel(prefix);\n return this;\n }\n /**\n * Type of transaction to filter with.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .txType(\"axfer\")\n * .do();\n * ```\n *\n * @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`\n * @category query\n */\n txType(type) {\n this.query['tx-type'] = type;\n return this;\n }\n /**\n * Type of signature to filter with.\n * - sig: Standard\n * - msig: MultiSig\n * - lsig: LogicSig\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .sigType(\"lsig\")\n * .do();\n * ```\n *\n * @param type - one of `sig`, `msig`, `lsig`\n * @category query\n */\n sigType(type) {\n this.query['sig-type'] = type;\n return this;\n }\n /**\n * Lookup the specific transaction by ID.\n *\n * #### Example\n * ```typescript\n * const txId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .txid(txId)\n * .do();\n * ```\n *\n * @param txid\n * @category query\n */\n txid(txid) {\n this.query.txid = txid;\n return this;\n }\n /**\n * Include results for the specified round.\n *\n * #### Example\n * ```typescript\n * const targetBlock = 18309917;\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .round(targetBlock)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Include results at or after the specified min-round.\n *\n * #### Example\n * ```typescript\n * const minRound = 18309917;\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .minRound(minRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n minRound(round) {\n this.query['min-round'] = round;\n return this;\n }\n /**\n * Include results at or before the specified max-round.\n *\n * #### Example\n * ```typescript\n * const maxRound = 18309917;\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .maxRound(maxRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n maxRound(round) {\n this.query['max-round'] = round;\n return this;\n }\n /**\n * Maximum number of results to return.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Include results before the given time.\n *\n * #### Example\n * ```typescript\n * const beforeTime = \"2022-02-02T20:20:22.02Z\";\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .beforeTime(beforeTime)\n * .do();\n * ```\n *\n * @param before - rfc3339 string\n * @category query\n */\n beforeTime(before) {\n this.query['before-time'] = before;\n return this;\n }\n /**\n * Include results after the given time.\n *\n * #### Example\n * ```typescript\n * const afterTime = \"2022-10-21T00:00:11.55Z\";\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .afterTime(afterTime)\n * .do();\n * ```\n *\n * @param after - rfc3339 string\n * @category query\n */\n afterTime(after) {\n this.query['after-time'] = after;\n return this;\n }\n /**\n * Filtered results should have an amount greater than this value, as int, representing asset units.\n *\n * #### Example\n * ```typescript\n * const minBalance = 300000;\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n *\n * @param greater\n * @category query\n */\n currencyGreaterThan(greater) {\n // We convert the following to a string for now to correctly include zero values in request parameters.\n this.query['currency-greater-than'] = greater.toString();\n return this;\n }\n /**\n * Filtered results should have an amount less than this value, as int, representing asset units.\n *\n * #### Example\n * ```typescript\n * const maxBalance = 500000;\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * @param lesser\n * @category query\n */\n currencyLessThan(lesser) {\n this.query['currency-less-than'] = lesser;\n return this;\n }\n /**\n * Combined with address, defines what address to filter on, as string.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const role = \"sender\";\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .address(address)\n * .addressRole(role)\n * .do();\n * ```\n *\n * @param role - one of `sender`, `receiver`, `freeze-target`\n * @category query\n */\n addressRole(role) {\n this.query['address-role'] = role;\n return this;\n }\n /**\n * Only include transactions with this address in one of the transaction fields.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .address(address)\n * .do();\n * ```\n *\n * @param address\n * @category query\n */\n address(address) {\n this.query.address = address;\n return this;\n }\n /**\n * Whether or not to consider the `close-to` field as a receiver when filtering transactions, as bool. Set to `true` to ignore `close-to`.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .excludeCloseTo(true)\n * .do();\n * ```\n *\n * @param exclude\n * @category query\n */\n excludeCloseTo(exclude) {\n this.query['exclude-close-to'] = exclude;\n return this;\n }\n /**\n * The next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n * const assetId = 163650;\n *\n * const assetTxnsPage1 = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .limit(maxResults)\n * .do();\n *\n * const assetTxnsPage2 = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .limit(maxResults)\n * .nextToken(assetTxnsPage1[\"next-token\"])\n * .do();\n * ```\n *\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Whether or not to include rekeying transactions.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetTxns = await indexerClient\n * .lookupAssetTransactions(assetId)\n * .rekeyTo(false)\n * .do();\n * ```\n *\n * @param rekeyTo\n * @category query\n */\n rekeyTo(rekeyTo) {\n this.query['rekey-to'] = rekeyTo;\n return this;\n }\n}\n//# sourceMappingURL=lookupAssetTransactions.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupBlock extends JSONRequest {\n /**\n * Returns the block for the passed round.\n *\n * #### Example\n * ```typescript\n * const targetBlock = 18309917;\n * const blockInfo = await indexerClient.lookupBlock(targetBlock).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2blocksround-number)\n * @param round - The number of the round to look up.\n * @category GET\n */\n constructor(c, intDecoding, round) {\n super(c, intDecoding);\n this.round = round;\n this.round = round;\n }\n /**\n * @returns `/v2/blocks/${round}`\n */\n path() {\n return `/v2/blocks/${this.round}`;\n }\n /**\n * Header only flag. When this is set to true, returned block does not contain the\n * transactions.\n */\n headerOnly(headerOnly) {\n this.query['header-only'] = headerOnly;\n return this;\n }\n}\n//# sourceMappingURL=lookupBlock.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupTransactionByID extends JSONRequest {\n /**\n * Returns information about the given transaction.\n *\n * #### Example\n * ```typescript\n * const txnId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const txnInfo = await indexerClient.lookupTransactionByID(txnId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactionstxid)\n * @param txID - The ID of the transaction to look up.\n * @category GET\n */\n constructor(c, intDecoding, txID) {\n super(c, intDecoding);\n this.txID = txID;\n this.txID = txID;\n }\n /**\n * @returns `/v2/transactions/${txID}`\n */\n path() {\n return `/v2/transactions/${this.txID}`;\n }\n}\n//# sourceMappingURL=lookupTransactionByID.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAccountByID extends JSONRequest {\n /**\n * Returns information about the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await indexerClient.lookupAccountByID(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)\n * @param account - The address of the account to look up.\n * @category GET\n */\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n /**\n * @returns `/v2/accounts/${account}`\n */\n path() {\n return `/v2/accounts/${this.account}`;\n }\n /**\n * Specify round to filter with.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const targetBlock = 18309917;\n * const accountInfo = await indexerClient\n * .lookupAccountByID(address)\n * .round(targetBlock)\n * .do();\n * ```\n * @param round\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.\n *\n * #### Example 1\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await indexerClient\n * .lookupAccountByID(address)\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await indexerClient\n * .lookupAccountByID(address)\n * .includeAll()\n * .do();\n * ```\n * @param value\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n /**\n * Exclude additional items such as asset holdings, application local data stored for this account, asset parameters created by this account, and application parameters created by this account.\n *\n * #### Example 1\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await indexerClient\n * .lookupAccountByID(address)\n * .exclude(\"all\")\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await indexerClient\n * .lookupAccountByID(address)\n * .exclude(\"assets,created-assets\")\n * .do();\n * ```\n * @remarks By default, it behaves as exclude=none\n * @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none`\n * @category query\n */\n exclude(exclude) {\n this.query.exclude = exclude;\n return this;\n }\n}\n//# sourceMappingURL=lookupAccountByID.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAccountAssets extends JSONRequest {\n /**\n * Returns asset about the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAssets = await indexerClient.lookupAccountAssets(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idassets)\n * @param account - The address of the account to look up.\n * @category GET\n */\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n /**\n * @returns `/v2/accounts/${account}/assets`\n */\n path() {\n return `/v2/accounts/${this.account}/assets`;\n }\n /**\n * Add a limit for filter.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n * const accountAssets = await indexerClient\n * .lookupAccountAssets(address)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Specify round to filter with.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const targetBlock = 18309917;\n * const accountAssets = await indexerClient\n * .lookupAccountAssets(address)\n * .round(targetBlock)\n * .do();\n * ```\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n *\n * const accountAssetsPage1 = await indexerClient\n * .lookupAccountAssets(address)\n * .limit(maxResults)\n * .do();\n *\n * const accountAssetsPage2 = await indexerClient\n * .lookupAccountAssets(address)\n * .limit(maxResults)\n * .next(accountAssetsPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAssets = await indexerClient\n * .lookupAccountAssets(address)\n * .includeAll(false)\n * .do();\n * ```\n * @param value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n /**\n * Specify an assetID to search for.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const assetAssets = await indexerClient\n * .lookupAccountAssets(address)\n * .assetId(assetId)\n * .do();\n * ```\n * @param index - the assetID\n * @category query\n */\n assetId(index) {\n this.query['asset-id'] = index;\n return this;\n }\n}\n//# sourceMappingURL=lookupAccountAssets.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAccountCreatedAssets extends JSONRequest {\n /**\n * Returns asset information created by the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountCreatedAssets = await indexerClient.lookupAccountCreatedAssets(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-assets)\n * @param account - The address of the account to look up.\n * @category GET\n */\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n /**\n * @returns `/v2/accounts/${account}/created-assets`\n */\n path() {\n return `/v2/accounts/${this.account}/created-assets`;\n }\n /**\n * Add a limit for filter.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n * const accountAssets = await indexerClient\n * .lookupAccountCreatedAssets(address)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Specify round to filter with.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const targetBlock = 18309917;\n * const accountAssets = await indexerClient\n * .lookupAccountCreatedAssets(address)\n * .round(targetBlock)\n * .do();\n * ```\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n *\n * const accountAssetsPage1 = await indexerClient\n * .lookupAccountCreatedAssets(address)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * const accountAssetsPage2 = await indexerClient\n * .lookupAccountCreatedAssets(address)\n * .limit(maxResults)\n * .next(accountAssetsPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAssets = await indexerClient\n * .lookupAccountCreatedAssets(address)\n * .includeAll(false)\n * .do();\n * ```\n * @param value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n /**\n * Specify an assetID to search for.\n *\n * #### Example\n * ```typescript\n * const assetID = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const assetAssets = await indexerClient\n * .lookupAccountCreatedAssets(address)\n * .assetID(assetID)\n * .do();\n * ```\n * @param index - the assetID\n * @category query\n */\n assetID(index) {\n this.query['asset-id'] = index;\n return this;\n }\n}\n//# sourceMappingURL=lookupAccountCreatedAssets.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAccountAppLocalStates extends JSONRequest {\n /**\n * Returns application local state about the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAppLocalStates = await indexerClient.lookupAccountAppLocalStates(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idapps-local-state)\n * @param account - The address of the account to look up.\n * @category GET\n */\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n /**\n * @returns `/v2/accounts/${account}/apps-local-state`\n */\n path() {\n return `/v2/accounts/${this.account}/apps-local-state`;\n }\n /**\n * Add a limit for filter.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n * const accountAssets = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Specify round to filter with.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const targetBlock = 18309917;\n * const accountAssets = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .round(targetBlock)\n * .do();\n * ```\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n *\n * const accountAssetsPage1 = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .limit(maxResults)\n * .do();\n *\n * const accountAssetsPage2 = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .limit(maxResults)\n * .next(accountAssetsPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAssets = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .includeAll(false)\n * .do();\n * ```\n * @param value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n /**\n * Specify an applicationID to search for.\n *\n * #### Example\n * ```typescript\n * const applicationID = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountApplications = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .applicationID(applicationID)\n * .do();\n * ```\n * @param index - the applicationID\n * @category query\n */\n applicationID(index) {\n this.query['application-id'] = index;\n return this;\n }\n}\n//# sourceMappingURL=lookupAccountAppLocalStates.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAccountCreatedApplications extends JSONRequest {\n /**\n * Returns application information created by the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountCreatedApps = await indexerClient.lookupAccountCreatedApplications(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-applications)\n * @param account - The address of the account to look up.\n * @category GET\n */\n constructor(c, intDecoding, account) {\n super(c, intDecoding);\n this.account = account;\n this.account = account;\n }\n /**\n * @returns `/v2/accounts/${account}/created-applications`\n */\n path() {\n return `/v2/accounts/${this.account}/created-applications`;\n }\n /**\n * Add a limit for filter.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n * const accountAssets = await indexerClient\n * .lookupAccountCreatedApplications(address)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Specify round to filter with.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const targetBlock = 18309917;\n * const accountAssets = await indexerClient\n * .lookupAccountCreatedApplications(address)\n * .round(targetBlock)\n * .do();\n * ```\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const maxResults = 20;\n *\n * const accountAssetsPage1 = await indexerClient\n * .lookupAccountCreatedApplications(address)\n * .limit(maxResults)\n * .do();\n *\n * const accountAssetsPage2 = await indexerClient\n * .lookupAccountCreatedApplications(address)\n * .limit(maxResults)\n * .next(accountAssetsPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAssets = await indexerClient\n * .lookupAccountCreatedApplications(address)\n * .includeAll(false)\n * .do();\n * ```\n * @param value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n /**\n * Specify an applicationID to search for.\n *\n * #### Example\n * ```typescript\n * const applicationID = 163650;\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountApplications = await indexerClient\n * .lookupAccountAppLocalStates(address)\n * .applicationID(applicationID)\n * .do();\n * ```\n * @param index - the applicationID\n * @category query\n */\n applicationID(index) {\n this.query['application-id'] = index;\n return this;\n }\n}\n//# sourceMappingURL=lookupAccountCreatedApplications.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupAssetByID extends JSONRequest {\n /**\n * Returns asset information of the queried asset.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetInfo = await indexerClient.lookupAssetByID(assetId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id)\n * @param index - The asset ID to look up.\n */\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n /**\n * @returns `/v2/assets/${index}`\n */\n path() {\n return `/v2/assets/${this.index}`;\n }\n /**\n * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example 1\n * ```typescript\n * const assetId = 163650;\n * const assetInfo = await indexerClient\n * .lookupAssetByID(assetId)\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetId = 163650;\n * const assetInfo = await indexerClient\n * .lookupAssetByID(assetId)\n * .includeAll()\n * .do();\n * ```\n *\n * @param value - default true when called without passing a value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n}\n//# sourceMappingURL=lookupAssetByID.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupApplications extends JSONRequest {\n /**\n * Returns information about the passed application.\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const appInfo = await indexerClient.lookupApplications(appId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-id)\n * @param index - The ID of the application to look up.\n * @category GET\n */\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n /**\n * @returns `/v2/applications/${index}`\n */\n path() {\n return `/v2/applications/${this.index}`;\n }\n /**\n * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example 1\n * ```typescript\n * const appId = 60553466;\n * const appInfo = await indexerClient\n * .lookupApplications(appId)\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const appId = 60553466;\n * const appInfo = await indexerClient\n * .lookupApplications(appId)\n * .includeAll()\n * .do();\n * ```\n *\n * @param value - default true when called without passing a value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n}\n//# sourceMappingURL=lookupApplications.js.map","import JSONRequest from '../jsonrequest';\nexport default class LookupApplicationLogs extends JSONRequest {\n /**\n * Returns log messages generated by the passed in application.\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const appLogs = await indexerClient.lookupApplicationLogs(appId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idlogs)\n * @param appID - The ID of the application which generated the logs.\n * @category GET\n */\n constructor(c, intDecoding, appID) {\n super(c, intDecoding);\n this.appID = appID;\n this.appID = appID;\n }\n /**\n * @returns `/v2/applications/${appID}/logs`\n */\n path() {\n return `/v2/applications/${this.appID}/logs`;\n }\n /**\n * Limit results for pagination.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const appLogs = await indexerClient\n * .lookupApplicationLogs(appId)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Include results at or after the specified min-round.\n *\n * #### Example\n * ```typescript\n * const minRound = 18309917;\n * const appLogs = await indexerClient\n * .lookupApplicationLogs(appId)\n * .minRound(minRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n minRound(round) {\n this.query['min-round'] = round;\n return this;\n }\n /**\n * Include results at or before the specified max-round.\n *\n * #### Example\n * ```typescript\n * const maxRound = 18309917;\n * const appLogs = await indexerClient\n * .lookupApplicationLogs(appId)\n * .maxRound(maxRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n maxRound(round) {\n this.query['max-round'] = round;\n return this;\n }\n /**\n * The next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n *\n * const appLogsPage1 = await indexerClient\n * .lookupApplicationLogs(appId)\n * .limit(maxResults)\n * .do();\n *\n * const appLogsPage2 = await indexerClient\n * .lookupApplicationLogs(appId)\n * .limit(maxResults)\n * .nextToken(appLogsPage1[\"next-token\"])\n * .do();\n * ```\n *\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Only include transactions with this sender address.\n *\n * #### Example\n * ```typescript\n * const sender = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const appLogs = await indexerClient\n * .lookupApplicationLogs(appId)\n * .sender(sender)\n * .do();\n * ```\n *\n * @param senderAddress\n * @category query\n */\n sender(senderAddress) {\n this.query['sender-address'] = senderAddress;\n return this;\n }\n /**\n * Lookup the specific transaction by ID.\n *\n * #### Example\n * ```typescript\n * const txId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const appLogs = await indexerClient\n * .lookupApplicationLogs(appId)\n * .txid(txId)\n * .do();\n * ```\n *\n * @param txid\n * @category query\n */\n txid(txid) {\n this.query.txid = txid;\n return this;\n }\n}\n//# sourceMappingURL=lookupApplicationLogs.js.map","/**\n * NOTICE: This file was generated. Editing this file manually is not recommended.\n */\n/* eslint-disable no-use-before-define */\nimport { Buffer } from 'buffer';\nimport BaseModel from '../../basemodel';\n/**\n * Account information at a given round.\n * Definition:\n * data/basics/userBalance.go : AccountData\n */\nexport class Account extends BaseModel {\n /**\n * Creates a new `Account` object.\n * @param address - the account public key\n * @param amount - total number of MicroAlgos in the account\n * @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.\n * @param minBalance - MicroAlgo balance required by the account.\n * The requirement grows based on asset and application usage.\n * @param pendingRewards - amount of MicroAlgos of pending rewards in this account.\n * @param rewards - total rewards of MicroAlgos the account has received, including pending rewards.\n * @param round - The round for which this information is relevant.\n * @param status - voting status of the account's MicroAlgos\n * * Offline - indicates that the associated account is delegated.\n * * Online - indicates that the associated account used as part of the delegation\n * pool.\n * * NotParticipating - indicates that the associated account is neither a\n * delegator nor a delegate.\n * @param totalAppsOptedIn - The count of all applications that have been opted in, equivalent to the count\n * of application local data (AppLocalState objects) stored in this account.\n * @param totalAssetsOptedIn - The count of all assets that have been opted in, equivalent to the count of\n * AssetHolding objects held by this account.\n * @param totalBoxBytes - For app-accounts only. The total number of bytes allocated for the keys and\n * values of boxes which belong to the associated application.\n * @param totalBoxes - For app-accounts only. The total number of boxes which belong to the associated\n * application.\n * @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.\n * @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.\n * @param appsLocalState - application local data stored in this account.\n * Note the raw object uses `map[int] -> AppLocalState` for this type.\n * @param appsTotalExtraPages - the sum of all extra application program pages for this account.\n * @param appsTotalSchema - the sum of all of the local schemas and global schemas in this account.\n * Note: the raw account uses `StateSchema` for this type.\n * @param assets - assets held by this account.\n * Note the raw object uses `map[int] -> AssetHolding` for this type.\n * @param authAddr - The address against which signing should be checked. If empty, the address of\n * the current account is used. This field can be updated in any transaction by\n * setting the RekeyTo field.\n * @param closedAtRound - Round during which this account was most recently closed.\n * @param createdApps - parameters of applications created by this account including app global data.\n * Note: the raw account uses `map[int] -> AppParams` for this type.\n * @param createdAssets - parameters of assets created by this account.\n * Note: the raw account uses `map[int] -> Asset` for this type.\n * @param createdAtRound - Round during which this account first appeared in a transaction.\n * @param deleted - Whether or not this account is currently closed.\n * @param incentiveEligible - can the account receive block incentives if its balance is in range at proposal\n * time.\n * @param lastHeartbeat - The round in which this account last went online, or explicitly renewed their\n * online status.\n * @param lastProposed - The round in which this account last proposed the block.\n * @param participation - AccountParticipation describes the parameters used by this account in consensus\n * protocol.\n * @param rewardBase - used as part of the rewards computation. Only applicable to accounts which are\n * participating.\n * @param sigType - the type of signature used by this account, must be one of:\n * * sig\n * * msig\n * * lsig\n * * or null if unknown\n */\n constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalBoxBytes, totalBoxes, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, closedAtRound, createdApps, createdAssets, createdAtRound, deleted, incentiveEligible, lastHeartbeat, lastProposed, participation, rewardBase, sigType, }) {\n super();\n this.address = address;\n this.amount = amount;\n this.amountWithoutPendingRewards = amountWithoutPendingRewards;\n this.minBalance = minBalance;\n this.pendingRewards = pendingRewards;\n this.rewards = rewards;\n this.round = round;\n this.status = status;\n this.totalAppsOptedIn = totalAppsOptedIn;\n this.totalAssetsOptedIn = totalAssetsOptedIn;\n this.totalBoxBytes = totalBoxBytes;\n this.totalBoxes = totalBoxes;\n this.totalCreatedApps = totalCreatedApps;\n this.totalCreatedAssets = totalCreatedAssets;\n this.appsLocalState = appsLocalState;\n this.appsTotalExtraPages = appsTotalExtraPages;\n this.appsTotalSchema = appsTotalSchema;\n this.assets = assets;\n this.authAddr = authAddr;\n this.closedAtRound = closedAtRound;\n this.createdApps = createdApps;\n this.createdAssets = createdAssets;\n this.createdAtRound = createdAtRound;\n this.deleted = deleted;\n this.incentiveEligible = incentiveEligible;\n this.lastHeartbeat = lastHeartbeat;\n this.lastProposed = lastProposed;\n this.participation = participation;\n this.rewardBase = rewardBase;\n this.sigType = sigType;\n this.attribute_map = {\n address: 'address',\n amount: 'amount',\n amountWithoutPendingRewards: 'amount-without-pending-rewards',\n minBalance: 'min-balance',\n pendingRewards: 'pending-rewards',\n rewards: 'rewards',\n round: 'round',\n status: 'status',\n totalAppsOptedIn: 'total-apps-opted-in',\n totalAssetsOptedIn: 'total-assets-opted-in',\n totalBoxBytes: 'total-box-bytes',\n totalBoxes: 'total-boxes',\n totalCreatedApps: 'total-created-apps',\n totalCreatedAssets: 'total-created-assets',\n appsLocalState: 'apps-local-state',\n appsTotalExtraPages: 'apps-total-extra-pages',\n appsTotalSchema: 'apps-total-schema',\n assets: 'assets',\n authAddr: 'auth-addr',\n closedAtRound: 'closed-at-round',\n createdApps: 'created-apps',\n createdAssets: 'created-assets',\n createdAtRound: 'created-at-round',\n deleted: 'deleted',\n incentiveEligible: 'incentive-eligible',\n lastHeartbeat: 'last-heartbeat',\n lastProposed: 'last-proposed',\n participation: 'participation',\n rewardBase: 'reward-base',\n sigType: 'sig-type',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['address'] === 'undefined')\n throw new Error(`Response is missing required field 'address': ${data}`);\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['amount-without-pending-rewards'] === 'undefined')\n throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${data}`);\n if (typeof data['min-balance'] === 'undefined')\n throw new Error(`Response is missing required field 'min-balance': ${data}`);\n if (typeof data['pending-rewards'] === 'undefined')\n throw new Error(`Response is missing required field 'pending-rewards': ${data}`);\n if (typeof data['rewards'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (typeof data['status'] === 'undefined')\n throw new Error(`Response is missing required field 'status': ${data}`);\n if (typeof data['total-apps-opted-in'] === 'undefined')\n throw new Error(`Response is missing required field 'total-apps-opted-in': ${data}`);\n if (typeof data['total-assets-opted-in'] === 'undefined')\n throw new Error(`Response is missing required field 'total-assets-opted-in': ${data}`);\n if (typeof data['total-box-bytes'] === 'undefined')\n throw new Error(`Response is missing required field 'total-box-bytes': ${data}`);\n if (typeof data['total-boxes'] === 'undefined')\n throw new Error(`Response is missing required field 'total-boxes': ${data}`);\n if (typeof data['total-created-apps'] === 'undefined')\n throw new Error(`Response is missing required field 'total-created-apps': ${data}`);\n if (typeof data['total-created-assets'] === 'undefined')\n throw new Error(`Response is missing required field 'total-created-assets': ${data}`);\n return new Account({\n address: data['address'],\n amount: data['amount'],\n amountWithoutPendingRewards: data['amount-without-pending-rewards'],\n minBalance: data['min-balance'],\n pendingRewards: data['pending-rewards'],\n rewards: data['rewards'],\n round: data['round'],\n status: data['status'],\n totalAppsOptedIn: data['total-apps-opted-in'],\n totalAssetsOptedIn: data['total-assets-opted-in'],\n totalBoxBytes: data['total-box-bytes'],\n totalBoxes: data['total-boxes'],\n totalCreatedApps: data['total-created-apps'],\n totalCreatedAssets: data['total-created-assets'],\n appsLocalState: typeof data['apps-local-state'] !== 'undefined'\n ? data['apps-local-state'].map(ApplicationLocalState.from_obj_for_encoding)\n : undefined,\n appsTotalExtraPages: data['apps-total-extra-pages'],\n appsTotalSchema: typeof data['apps-total-schema'] !== 'undefined'\n ? ApplicationStateSchema.from_obj_for_encoding(data['apps-total-schema'])\n : undefined,\n assets: typeof data['assets'] !== 'undefined'\n ? data['assets'].map(AssetHolding.from_obj_for_encoding)\n : undefined,\n authAddr: data['auth-addr'],\n closedAtRound: data['closed-at-round'],\n createdApps: typeof data['created-apps'] !== 'undefined'\n ? data['created-apps'].map(Application.from_obj_for_encoding)\n : undefined,\n createdAssets: typeof data['created-assets'] !== 'undefined'\n ? data['created-assets'].map(Asset.from_obj_for_encoding)\n : undefined,\n createdAtRound: data['created-at-round'],\n deleted: data['deleted'],\n incentiveEligible: data['incentive-eligible'],\n lastHeartbeat: data['last-heartbeat'],\n lastProposed: data['last-proposed'],\n participation: typeof data['participation'] !== 'undefined'\n ? AccountParticipation.from_obj_for_encoding(data['participation'])\n : undefined,\n rewardBase: data['reward-base'],\n sigType: data['sig-type'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AccountParticipation describes the parameters used by this account in consensus\n * protocol.\n */\nexport class AccountParticipation extends BaseModel {\n /**\n * Creates a new `AccountParticipation` object.\n * @param selectionParticipationKey - Selection public key (if any) currently registered for this round.\n * @param voteFirstValid - First round for which this participation is valid.\n * @param voteKeyDilution - Number of subkeys in each batch of participation keys.\n * @param voteLastValid - Last round for which this participation is valid.\n * @param voteParticipationKey - root participation public key (if any) currently registered for this round.\n * @param stateProofKey - Root of the state proof key (if any)\n */\n constructor({ selectionParticipationKey, voteFirstValid, voteKeyDilution, voteLastValid, voteParticipationKey, stateProofKey, }) {\n super();\n this.selectionParticipationKey =\n typeof selectionParticipationKey === 'string'\n ? new Uint8Array(Buffer.from(selectionParticipationKey, 'base64'))\n : selectionParticipationKey;\n this.voteFirstValid = voteFirstValid;\n this.voteKeyDilution = voteKeyDilution;\n this.voteLastValid = voteLastValid;\n this.voteParticipationKey =\n typeof voteParticipationKey === 'string'\n ? new Uint8Array(Buffer.from(voteParticipationKey, 'base64'))\n : voteParticipationKey;\n this.stateProofKey =\n typeof stateProofKey === 'string'\n ? new Uint8Array(Buffer.from(stateProofKey, 'base64'))\n : stateProofKey;\n this.attribute_map = {\n selectionParticipationKey: 'selection-participation-key',\n voteFirstValid: 'vote-first-valid',\n voteKeyDilution: 'vote-key-dilution',\n voteLastValid: 'vote-last-valid',\n voteParticipationKey: 'vote-participation-key',\n stateProofKey: 'state-proof-key',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['selection-participation-key'] === 'undefined')\n throw new Error(`Response is missing required field 'selection-participation-key': ${data}`);\n if (typeof data['vote-first-valid'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-first-valid': ${data}`);\n if (typeof data['vote-key-dilution'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-key-dilution': ${data}`);\n if (typeof data['vote-last-valid'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-last-valid': ${data}`);\n if (typeof data['vote-participation-key'] === 'undefined')\n throw new Error(`Response is missing required field 'vote-participation-key': ${data}`);\n return new AccountParticipation({\n selectionParticipationKey: data['selection-participation-key'],\n voteFirstValid: data['vote-first-valid'],\n voteKeyDilution: data['vote-key-dilution'],\n voteLastValid: data['vote-last-valid'],\n voteParticipationKey: data['vote-participation-key'],\n stateProofKey: data['state-proof-key'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class AccountResponse extends BaseModel {\n /**\n * Creates a new `AccountResponse` object.\n * @param account - Account information at a given round.\n * Definition:\n * data/basics/userBalance.go : AccountData\n * @param currentRound - Round at which the results were computed.\n */\n constructor({ account, currentRound, }) {\n super();\n this.account = account;\n this.currentRound = currentRound;\n this.attribute_map = {\n account: 'account',\n currentRound: 'current-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['account'] === 'undefined')\n throw new Error(`Response is missing required field 'account': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new AccountResponse({\n account: Account.from_obj_for_encoding(data['account']),\n currentRound: data['current-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Application state delta.\n */\nexport class AccountStateDelta extends BaseModel {\n /**\n * Creates a new `AccountStateDelta` object.\n * @param address -\n * @param delta - Application state delta.\n */\n constructor({ address, delta, }) {\n super();\n this.address = address;\n this.delta = delta;\n this.attribute_map = {\n address: 'address',\n delta: 'delta',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['address'] === 'undefined')\n throw new Error(`Response is missing required field 'address': ${data}`);\n if (!Array.isArray(data['delta']))\n throw new Error(`Response is missing required array field 'delta': ${data}`);\n return new AccountStateDelta({\n address: data['address'],\n delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class AccountsResponse extends BaseModel {\n /**\n * Creates a new `AccountsResponse` object.\n * @param accounts -\n * @param currentRound - Round at which the results were computed.\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ accounts, currentRound, nextToken, }) {\n super();\n this.accounts = accounts;\n this.currentRound = currentRound;\n this.nextToken = nextToken;\n this.attribute_map = {\n accounts: 'accounts',\n currentRound: 'current-round',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['accounts']))\n throw new Error(`Response is missing required array field 'accounts': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new AccountsResponse({\n accounts: data['accounts'].map(Account.from_obj_for_encoding),\n currentRound: data['current-round'],\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Application index and its parameters\n */\nexport class Application extends BaseModel {\n /**\n * Creates a new `Application` object.\n * @param id - application index.\n * @param params - application parameters.\n * @param createdAtRound - Round when this application was created.\n * @param deleted - Whether or not this application is currently deleted.\n * @param deletedAtRound - Round when this application was deleted.\n */\n constructor({ id, params, createdAtRound, deleted, deletedAtRound, }) {\n super();\n this.id = id;\n this.params = params;\n this.createdAtRound = createdAtRound;\n this.deleted = deleted;\n this.deletedAtRound = deletedAtRound;\n this.attribute_map = {\n id: 'id',\n params: 'params',\n createdAtRound: 'created-at-round',\n deleted: 'deleted',\n deletedAtRound: 'deleted-at-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['id'] === 'undefined')\n throw new Error(`Response is missing required field 'id': ${data}`);\n if (typeof data['params'] === 'undefined')\n throw new Error(`Response is missing required field 'params': ${data}`);\n return new Application({\n id: data['id'],\n params: ApplicationParams.from_obj_for_encoding(data['params']),\n createdAtRound: data['created-at-round'],\n deleted: data['deleted'],\n deletedAtRound: data['deleted-at-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Stores local state associated with an application.\n */\nexport class ApplicationLocalState extends BaseModel {\n /**\n * Creates a new `ApplicationLocalState` object.\n * @param id - The application which this local state is for.\n * @param schema - schema.\n * @param closedOutAtRound - Round when account closed out of the application.\n * @param deleted - Whether or not the application local state is currently deleted from its\n * account.\n * @param keyValue - storage.\n * @param optedInAtRound - Round when the account opted into the application.\n */\n constructor({ id, schema, closedOutAtRound, deleted, keyValue, optedInAtRound, }) {\n super();\n this.id = id;\n this.schema = schema;\n this.closedOutAtRound = closedOutAtRound;\n this.deleted = deleted;\n this.keyValue = keyValue;\n this.optedInAtRound = optedInAtRound;\n this.attribute_map = {\n id: 'id',\n schema: 'schema',\n closedOutAtRound: 'closed-out-at-round',\n deleted: 'deleted',\n keyValue: 'key-value',\n optedInAtRound: 'opted-in-at-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['id'] === 'undefined')\n throw new Error(`Response is missing required field 'id': ${data}`);\n if (typeof data['schema'] === 'undefined')\n throw new Error(`Response is missing required field 'schema': ${data}`);\n return new ApplicationLocalState({\n id: data['id'],\n schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),\n closedOutAtRound: data['closed-out-at-round'],\n deleted: data['deleted'],\n keyValue: typeof data['key-value'] !== 'undefined'\n ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)\n : undefined,\n optedInAtRound: data['opted-in-at-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class ApplicationLocalStatesResponse extends BaseModel {\n /**\n * Creates a new `ApplicationLocalStatesResponse` object.\n * @param appsLocalStates -\n * @param currentRound - Round at which the results were computed.\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ appsLocalStates, currentRound, nextToken, }) {\n super();\n this.appsLocalStates = appsLocalStates;\n this.currentRound = currentRound;\n this.nextToken = nextToken;\n this.attribute_map = {\n appsLocalStates: 'apps-local-states',\n currentRound: 'current-round',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['apps-local-states']))\n throw new Error(`Response is missing required array field 'apps-local-states': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new ApplicationLocalStatesResponse({\n appsLocalStates: data['apps-local-states'].map(ApplicationLocalState.from_obj_for_encoding),\n currentRound: data['current-round'],\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Stores the global information associated with an application.\n */\nexport class ApplicationLogData extends BaseModel {\n /**\n * Creates a new `ApplicationLogData` object.\n * @param logs - Logs for the application being executed by the transaction.\n * @param txid - Transaction ID\n */\n constructor({ logs, txid }) {\n super();\n this.logs = logs;\n this.txid = txid;\n this.attribute_map = {\n logs: 'logs',\n txid: 'txid',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['logs']))\n throw new Error(`Response is missing required array field 'logs': ${data}`);\n if (typeof data['txid'] === 'undefined')\n throw new Error(`Response is missing required field 'txid': ${data}`);\n return new ApplicationLogData({\n logs: data['logs'],\n txid: data['txid'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class ApplicationLogsResponse extends BaseModel {\n /**\n * Creates a new `ApplicationLogsResponse` object.\n * @param applicationId - (appidx) application index.\n * @param currentRound - Round at which the results were computed.\n * @param logData -\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ applicationId, currentRound, logData, nextToken, }) {\n super();\n this.applicationId = applicationId;\n this.currentRound = currentRound;\n this.logData = logData;\n this.nextToken = nextToken;\n this.attribute_map = {\n applicationId: 'application-id',\n currentRound: 'current-round',\n logData: 'log-data',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['application-id'] === 'undefined')\n throw new Error(`Response is missing required field 'application-id': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new ApplicationLogsResponse({\n applicationId: data['application-id'],\n currentRound: data['current-round'],\n logData: typeof data['log-data'] !== 'undefined'\n ? data['log-data'].map(ApplicationLogData.from_obj_for_encoding)\n : undefined,\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Stores the global information associated with an application.\n */\nexport class ApplicationParams extends BaseModel {\n /**\n * Creates a new `ApplicationParams` object.\n * @param approvalProgram - approval program.\n * @param clearStateProgram - clear state program.\n * @param creator - The address that created this application. This is the address where the\n * parameters and global state for this application can be found.\n * @param extraProgramPages - the number of extra program pages available to this app.\n * @param globalState - global state\n * @param globalStateSchema - global schema\n * @param localStateSchema - local schema\n */\n constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {\n super();\n this.approvalProgram =\n typeof approvalProgram === 'string'\n ? new Uint8Array(Buffer.from(approvalProgram, 'base64'))\n : approvalProgram;\n this.clearStateProgram =\n typeof clearStateProgram === 'string'\n ? new Uint8Array(Buffer.from(clearStateProgram, 'base64'))\n : clearStateProgram;\n this.creator = creator;\n this.extraProgramPages = extraProgramPages;\n this.globalState = globalState;\n this.globalStateSchema = globalStateSchema;\n this.localStateSchema = localStateSchema;\n this.attribute_map = {\n approvalProgram: 'approval-program',\n clearStateProgram: 'clear-state-program',\n creator: 'creator',\n extraProgramPages: 'extra-program-pages',\n globalState: 'global-state',\n globalStateSchema: 'global-state-schema',\n localStateSchema: 'local-state-schema',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['approval-program'] === 'undefined')\n throw new Error(`Response is missing required field 'approval-program': ${data}`);\n if (typeof data['clear-state-program'] === 'undefined')\n throw new Error(`Response is missing required field 'clear-state-program': ${data}`);\n return new ApplicationParams({\n approvalProgram: data['approval-program'],\n clearStateProgram: data['clear-state-program'],\n creator: data['creator'],\n extraProgramPages: data['extra-program-pages'],\n globalState: typeof data['global-state'] !== 'undefined'\n ? data['global-state'].map(TealKeyValue.from_obj_for_encoding)\n : undefined,\n globalStateSchema: typeof data['global-state-schema'] !== 'undefined'\n ? ApplicationStateSchema.from_obj_for_encoding(data['global-state-schema'])\n : undefined,\n localStateSchema: typeof data['local-state-schema'] !== 'undefined'\n ? ApplicationStateSchema.from_obj_for_encoding(data['local-state-schema'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class ApplicationResponse extends BaseModel {\n /**\n * Creates a new `ApplicationResponse` object.\n * @param currentRound - Round at which the results were computed.\n * @param application - Application index and its parameters\n */\n constructor({ currentRound, application, }) {\n super();\n this.currentRound = currentRound;\n this.application = application;\n this.attribute_map = {\n currentRound: 'current-round',\n application: 'application',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new ApplicationResponse({\n currentRound: data['current-round'],\n application: typeof data['application'] !== 'undefined'\n ? Application.from_obj_for_encoding(data['application'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Specifies maximums on the number of each type that may be stored.\n */\nexport class ApplicationStateSchema extends BaseModel {\n /**\n * Creates a new `ApplicationStateSchema` object.\n * @param numByteSlice - number of byte slices.\n * @param numUint - number of uints.\n */\n constructor({ numByteSlice, numUint, }) {\n super();\n this.numByteSlice = numByteSlice;\n this.numUint = numUint;\n this.attribute_map = {\n numByteSlice: 'num-byte-slice',\n numUint: 'num-uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['num-byte-slice'] === 'undefined')\n throw new Error(`Response is missing required field 'num-byte-slice': ${data}`);\n if (typeof data['num-uint'] === 'undefined')\n throw new Error(`Response is missing required field 'num-uint': ${data}`);\n return new ApplicationStateSchema({\n numByteSlice: data['num-byte-slice'],\n numUint: data['num-uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class ApplicationsResponse extends BaseModel {\n /**\n * Creates a new `ApplicationsResponse` object.\n * @param applications -\n * @param currentRound - Round at which the results were computed.\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ applications, currentRound, nextToken, }) {\n super();\n this.applications = applications;\n this.currentRound = currentRound;\n this.nextToken = nextToken;\n this.attribute_map = {\n applications: 'applications',\n currentRound: 'current-round',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['applications']))\n throw new Error(`Response is missing required array field 'applications': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new ApplicationsResponse({\n applications: data['applications'].map(Application.from_obj_for_encoding),\n currentRound: data['current-round'],\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Specifies both the unique identifier and the parameters for an asset\n */\nexport class Asset extends BaseModel {\n /**\n * Creates a new `Asset` object.\n * @param index - unique asset identifier\n * @param params - AssetParams specifies the parameters for an asset.\n * (apar) when part of an AssetConfig transaction.\n * Definition:\n * data/transactions/asset.go : AssetParams\n * @param createdAtRound - Round during which this asset was created.\n * @param deleted - Whether or not this asset is currently deleted.\n * @param destroyedAtRound - Round during which this asset was destroyed.\n */\n constructor({ index, params, createdAtRound, deleted, destroyedAtRound, }) {\n super();\n this.index = index;\n this.params = params;\n this.createdAtRound = createdAtRound;\n this.deleted = deleted;\n this.destroyedAtRound = destroyedAtRound;\n this.attribute_map = {\n index: 'index',\n params: 'params',\n createdAtRound: 'created-at-round',\n deleted: 'deleted',\n destroyedAtRound: 'destroyed-at-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['index'] === 'undefined')\n throw new Error(`Response is missing required field 'index': ${data}`);\n if (typeof data['params'] === 'undefined')\n throw new Error(`Response is missing required field 'params': ${data}`);\n return new Asset({\n index: data['index'],\n params: AssetParams.from_obj_for_encoding(data['params']),\n createdAtRound: data['created-at-round'],\n deleted: data['deleted'],\n destroyedAtRound: data['destroyed-at-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class AssetBalancesResponse extends BaseModel {\n /**\n * Creates a new `AssetBalancesResponse` object.\n * @param balances -\n * @param currentRound - Round at which the results were computed.\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ balances, currentRound, nextToken, }) {\n super();\n this.balances = balances;\n this.currentRound = currentRound;\n this.nextToken = nextToken;\n this.attribute_map = {\n balances: 'balances',\n currentRound: 'current-round',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['balances']))\n throw new Error(`Response is missing required array field 'balances': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new AssetBalancesResponse({\n balances: data['balances'].map(MiniAssetHolding.from_obj_for_encoding),\n currentRound: data['current-round'],\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Describes an asset held by an account.\n * Definition:\n * data/basics/userBalance.go : AssetHolding\n */\nexport class AssetHolding extends BaseModel {\n /**\n * Creates a new `AssetHolding` object.\n * @param amount - number of units held.\n * @param assetId - Asset ID of the holding.\n * @param isFrozen - whether or not the holding is frozen.\n * @param deleted - Whether or not the asset holding is currently deleted from its account.\n * @param optedInAtRound - Round during which the account opted into this asset holding.\n * @param optedOutAtRound - Round during which the account opted out of this asset holding.\n */\n constructor({ amount, assetId, isFrozen, deleted, optedInAtRound, optedOutAtRound, }) {\n super();\n this.amount = amount;\n this.assetId = assetId;\n this.isFrozen = isFrozen;\n this.deleted = deleted;\n this.optedInAtRound = optedInAtRound;\n this.optedOutAtRound = optedOutAtRound;\n this.attribute_map = {\n amount: 'amount',\n assetId: 'asset-id',\n isFrozen: 'is-frozen',\n deleted: 'deleted',\n optedInAtRound: 'opted-in-at-round',\n optedOutAtRound: 'opted-out-at-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['asset-id'] === 'undefined')\n throw new Error(`Response is missing required field 'asset-id': ${data}`);\n if (typeof data['is-frozen'] === 'undefined')\n throw new Error(`Response is missing required field 'is-frozen': ${data}`);\n return new AssetHolding({\n amount: data['amount'],\n assetId: data['asset-id'],\n isFrozen: data['is-frozen'],\n deleted: data['deleted'],\n optedInAtRound: data['opted-in-at-round'],\n optedOutAtRound: data['opted-out-at-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class AssetHoldingsResponse extends BaseModel {\n /**\n * Creates a new `AssetHoldingsResponse` object.\n * @param assets -\n * @param currentRound - Round at which the results were computed.\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ assets, currentRound, nextToken, }) {\n super();\n this.assets = assets;\n this.currentRound = currentRound;\n this.nextToken = nextToken;\n this.attribute_map = {\n assets: 'assets',\n currentRound: 'current-round',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['assets']))\n throw new Error(`Response is missing required array field 'assets': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new AssetHoldingsResponse({\n assets: data['assets'].map(AssetHolding.from_obj_for_encoding),\n currentRound: data['current-round'],\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * AssetParams specifies the parameters for an asset.\n * (apar) when part of an AssetConfig transaction.\n * Definition:\n * data/transactions/asset.go : AssetParams\n */\nexport class AssetParams extends BaseModel {\n /**\n * Creates a new `AssetParams` object.\n * @param creator - The address that created this asset. This is the address where the parameters\n * for this asset can be found, and also the address where unwanted asset units can\n * be sent in the worst case.\n * @param decimals - The number of digits to use after the decimal point when displaying this asset.\n * If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths.\n * If 2, the base unit of the asset is in hundredths, and so on. This value must be\n * between 0 and 19 (inclusive).\n * @param total - The total number of units of this asset.\n * @param clawback - Address of account used to clawback holdings of this asset. If empty, clawback\n * is not permitted.\n * @param defaultFrozen - Whether holdings of this asset are frozen by default.\n * @param freeze - Address of account used to freeze holdings of this asset. If empty, freezing is\n * not permitted.\n * @param manager - Address of account used to manage the keys of this asset and to destroy it.\n * @param metadataHash - A commitment to some unspecified asset metadata. The format of this metadata is\n * up to the application.\n * @param name - Name of this asset, as supplied by the creator. Included only when the asset\n * name is composed of printable utf-8 characters.\n * @param nameB64 - Base64 encoded name of this asset, as supplied by the creator.\n * @param reserve - Address of account holding reserve (non-minted) units of this asset.\n * @param unitName - Name of a unit of this asset, as supplied by the creator. Included only when the\n * name of a unit of this asset is composed of printable utf-8 characters.\n * @param unitNameB64 - Base64 encoded name of a unit of this asset, as supplied by the creator.\n * @param url - URL where more information about the asset can be retrieved. Included only when\n * the URL is composed of printable utf-8 characters.\n * @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.\n */\n constructor({ creator, decimals, total, clawback, defaultFrozen, freeze, manager, metadataHash, name, nameB64, reserve, unitName, unitNameB64, url, urlB64, }) {\n super();\n this.creator = creator;\n this.decimals = decimals;\n this.total = total;\n this.clawback = clawback;\n this.defaultFrozen = defaultFrozen;\n this.freeze = freeze;\n this.manager = manager;\n this.metadataHash =\n typeof metadataHash === 'string'\n ? new Uint8Array(Buffer.from(metadataHash, 'base64'))\n : metadataHash;\n this.name = name;\n this.nameB64 =\n typeof nameB64 === 'string'\n ? new Uint8Array(Buffer.from(nameB64, 'base64'))\n : nameB64;\n this.reserve = reserve;\n this.unitName = unitName;\n this.unitNameB64 =\n typeof unitNameB64 === 'string'\n ? new Uint8Array(Buffer.from(unitNameB64, 'base64'))\n : unitNameB64;\n this.url = url;\n this.urlB64 =\n typeof urlB64 === 'string'\n ? new Uint8Array(Buffer.from(urlB64, 'base64'))\n : urlB64;\n this.attribute_map = {\n creator: 'creator',\n decimals: 'decimals',\n total: 'total',\n clawback: 'clawback',\n defaultFrozen: 'default-frozen',\n freeze: 'freeze',\n manager: 'manager',\n metadataHash: 'metadata-hash',\n name: 'name',\n nameB64: 'name-b64',\n reserve: 'reserve',\n unitName: 'unit-name',\n unitNameB64: 'unit-name-b64',\n url: 'url',\n urlB64: 'url-b64',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['creator'] === 'undefined')\n throw new Error(`Response is missing required field 'creator': ${data}`);\n if (typeof data['decimals'] === 'undefined')\n throw new Error(`Response is missing required field 'decimals': ${data}`);\n if (typeof data['total'] === 'undefined')\n throw new Error(`Response is missing required field 'total': ${data}`);\n return new AssetParams({\n creator: data['creator'],\n decimals: data['decimals'],\n total: data['total'],\n clawback: data['clawback'],\n defaultFrozen: data['default-frozen'],\n freeze: data['freeze'],\n manager: data['manager'],\n metadataHash: data['metadata-hash'],\n name: data['name'],\n nameB64: data['name-b64'],\n reserve: data['reserve'],\n unitName: data['unit-name'],\n unitNameB64: data['unit-name-b64'],\n url: data['url'],\n urlB64: data['url-b64'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class AssetResponse extends BaseModel {\n /**\n * Creates a new `AssetResponse` object.\n * @param asset - Specifies both the unique identifier and the parameters for an asset\n * @param currentRound - Round at which the results were computed.\n */\n constructor({ asset, currentRound, }) {\n super();\n this.asset = asset;\n this.currentRound = currentRound;\n this.attribute_map = {\n asset: 'asset',\n currentRound: 'current-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['asset'] === 'undefined')\n throw new Error(`Response is missing required field 'asset': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new AssetResponse({\n asset: Asset.from_obj_for_encoding(data['asset']),\n currentRound: data['current-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class AssetsResponse extends BaseModel {\n /**\n * Creates a new `AssetsResponse` object.\n * @param assets -\n * @param currentRound - Round at which the results were computed.\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ assets, currentRound, nextToken, }) {\n super();\n this.assets = assets;\n this.currentRound = currentRound;\n this.nextToken = nextToken;\n this.attribute_map = {\n assets: 'assets',\n currentRound: 'current-round',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (!Array.isArray(data['assets']))\n throw new Error(`Response is missing required array field 'assets': ${data}`);\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n return new AssetsResponse({\n assets: data['assets'].map(Asset.from_obj_for_encoding),\n currentRound: data['current-round'],\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Block information.\n * Definition:\n * data/bookkeeping/block.go : Block\n */\nexport class Block extends BaseModel {\n /**\n * Creates a new `Block` object.\n * @param genesisHash - (gh) hash to which this block belongs.\n * @param genesisId - (gen) ID to which this block belongs.\n * @param previousBlockHash - (prev) Previous block hash.\n * @param round - (rnd) Current round on which this block was appended to the chain.\n * @param seed - (seed) Sortition seed.\n * @param timestamp - (ts) Block creation timestamp in seconds since eposh\n * @param transactionsRoot - (txn) TransactionsRoot authenticates the set of transactions appearing in the\n * block. More specifically, it's the root of a merkle tree whose leaves are the\n * block's Txids, in lexicographic order. For the empty block, it's 0. Note that\n * the TxnRoot does not authenticate the signatures on the transactions, only the\n * transactions themselves. Two blocks with the same transactions but in a\n * different order and with different signatures will have the same TxnRoot.\n * @param transactionsRootSha256 - (txn256) TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a\n * vector commitment instead of a merkle tree, and SHA256 hash function instead of\n * the default SHA512_256. This commitment can be used on environments where only\n * the SHA256 function exists.\n * @param bonus - the potential bonus payout for this block.\n * @param feesCollected - the sum of all fees paid by transactions in this block.\n * @param participationUpdates - Participation account data that needs to be checked/acted on by the network.\n * @param proposer - the proposer of this block.\n * @param proposerPayout - the actual amount transferred to the proposer from the fee sink.\n * @param rewards - Fields relating to rewards,\n * @param stateProofTracking - Tracks the status of state proofs.\n * @param transactions - (txns) list of transactions corresponding to a given round.\n * @param txnCounter - (tc) TxnCounter counts the number of transactions committed in the ledger, from\n * the time at which support for this feature was introduced.\n * Specifically, TxnCounter is the number of the next transaction that will be\n * committed after this block. It is 0 when no transactions have ever been\n * committed (since TxnCounter started being supported).\n * @param upgradeState - Fields relating to a protocol upgrade.\n * @param upgradeVote - Fields relating to voting for a protocol upgrade.\n */\n constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, proposer, proposerPayout, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }) {\n super();\n this.genesisHash =\n typeof genesisHash === 'string'\n ? new Uint8Array(Buffer.from(genesisHash, 'base64'))\n : genesisHash;\n this.genesisId = genesisId;\n this.previousBlockHash =\n typeof previousBlockHash === 'string'\n ? new Uint8Array(Buffer.from(previousBlockHash, 'base64'))\n : previousBlockHash;\n this.round = round;\n this.seed =\n typeof seed === 'string'\n ? new Uint8Array(Buffer.from(seed, 'base64'))\n : seed;\n this.timestamp = timestamp;\n this.transactionsRoot =\n typeof transactionsRoot === 'string'\n ? new Uint8Array(Buffer.from(transactionsRoot, 'base64'))\n : transactionsRoot;\n this.transactionsRootSha256 =\n typeof transactionsRootSha256 === 'string'\n ? new Uint8Array(Buffer.from(transactionsRootSha256, 'base64'))\n : transactionsRootSha256;\n this.bonus = bonus;\n this.feesCollected = feesCollected;\n this.participationUpdates = participationUpdates;\n this.proposer = proposer;\n this.proposerPayout = proposerPayout;\n this.rewards = rewards;\n this.stateProofTracking = stateProofTracking;\n this.transactions = transactions;\n this.txnCounter = txnCounter;\n this.upgradeState = upgradeState;\n this.upgradeVote = upgradeVote;\n this.attribute_map = {\n genesisHash: 'genesis-hash',\n genesisId: 'genesis-id',\n previousBlockHash: 'previous-block-hash',\n round: 'round',\n seed: 'seed',\n timestamp: 'timestamp',\n transactionsRoot: 'transactions-root',\n transactionsRootSha256: 'transactions-root-sha256',\n bonus: 'bonus',\n feesCollected: 'fees-collected',\n participationUpdates: 'participation-updates',\n proposer: 'proposer',\n proposerPayout: 'proposer-payout',\n rewards: 'rewards',\n stateProofTracking: 'state-proof-tracking',\n transactions: 'transactions',\n txnCounter: 'txn-counter',\n upgradeState: 'upgrade-state',\n upgradeVote: 'upgrade-vote',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['genesis-hash'] === 'undefined')\n throw new Error(`Response is missing required field 'genesis-hash': ${data}`);\n if (typeof data['genesis-id'] === 'undefined')\n throw new Error(`Response is missing required field 'genesis-id': ${data}`);\n if (typeof data['previous-block-hash'] === 'undefined')\n throw new Error(`Response is missing required field 'previous-block-hash': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (typeof data['seed'] === 'undefined')\n throw new Error(`Response is missing required field 'seed': ${data}`);\n if (typeof data['timestamp'] === 'undefined')\n throw new Error(`Response is missing required field 'timestamp': ${data}`);\n if (typeof data['transactions-root'] === 'undefined')\n throw new Error(`Response is missing required field 'transactions-root': ${data}`);\n if (typeof data['transactions-root-sha256'] === 'undefined')\n throw new Error(`Response is missing required field 'transactions-root-sha256': ${data}`);\n return new Block({\n genesisHash: data['genesis-hash'],\n genesisId: data['genesis-id'],\n previousBlockHash: data['previous-block-hash'],\n round: data['round'],\n seed: data['seed'],\n timestamp: data['timestamp'],\n transactionsRoot: data['transactions-root'],\n transactionsRootSha256: data['transactions-root-sha256'],\n bonus: data['bonus'],\n feesCollected: data['fees-collected'],\n participationUpdates: typeof data['participation-updates'] !== 'undefined'\n ? ParticipationUpdates.from_obj_for_encoding(data['participation-updates'])\n : undefined,\n proposer: data['proposer'],\n proposerPayout: data['proposer-payout'],\n rewards: typeof data['rewards'] !== 'undefined'\n ? BlockRewards.from_obj_for_encoding(data['rewards'])\n : undefined,\n stateProofTracking: typeof data['state-proof-tracking'] !== 'undefined'\n ? data['state-proof-tracking'].map(StateProofTracking.from_obj_for_encoding)\n : undefined,\n transactions: typeof data['transactions'] !== 'undefined'\n ? data['transactions'].map(Transaction.from_obj_for_encoding)\n : undefined,\n txnCounter: data['txn-counter'],\n upgradeState: typeof data['upgrade-state'] !== 'undefined'\n ? BlockUpgradeState.from_obj_for_encoding(data['upgrade-state'])\n : undefined,\n upgradeVote: typeof data['upgrade-vote'] !== 'undefined'\n ? BlockUpgradeVote.from_obj_for_encoding(data['upgrade-vote'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields relating to rewards,\n */\nexport class BlockRewards extends BaseModel {\n /**\n * Creates a new `BlockRewards` object.\n * @param feeSink - (fees) accepts transaction fees, it can only spend to the incentive pool.\n * @param rewardsCalculationRound - (rwcalr) number of leftover MicroAlgos after the distribution of rewards-rate\n * MicroAlgos for every reward unit in the next round.\n * @param rewardsLevel - (earn) How many rewards, in MicroAlgos, have been distributed to each RewardUnit\n * of MicroAlgos since genesis.\n * @param rewardsPool - (rwd) accepts periodic injections from the fee-sink and continually\n * redistributes them as rewards.\n * @param rewardsRate - (rate) Number of new MicroAlgos added to the participation stake from rewards at\n * the next round.\n * @param rewardsResidue - (frac) Number of leftover MicroAlgos after the distribution of\n * RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.\n */\n constructor({ feeSink, rewardsCalculationRound, rewardsLevel, rewardsPool, rewardsRate, rewardsResidue, }) {\n super();\n this.feeSink = feeSink;\n this.rewardsCalculationRound = rewardsCalculationRound;\n this.rewardsLevel = rewardsLevel;\n this.rewardsPool = rewardsPool;\n this.rewardsRate = rewardsRate;\n this.rewardsResidue = rewardsResidue;\n this.attribute_map = {\n feeSink: 'fee-sink',\n rewardsCalculationRound: 'rewards-calculation-round',\n rewardsLevel: 'rewards-level',\n rewardsPool: 'rewards-pool',\n rewardsRate: 'rewards-rate',\n rewardsResidue: 'rewards-residue',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['fee-sink'] === 'undefined')\n throw new Error(`Response is missing required field 'fee-sink': ${data}`);\n if (typeof data['rewards-calculation-round'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards-calculation-round': ${data}`);\n if (typeof data['rewards-level'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards-level': ${data}`);\n if (typeof data['rewards-pool'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards-pool': ${data}`);\n if (typeof data['rewards-rate'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards-rate': ${data}`);\n if (typeof data['rewards-residue'] === 'undefined')\n throw new Error(`Response is missing required field 'rewards-residue': ${data}`);\n return new BlockRewards({\n feeSink: data['fee-sink'],\n rewardsCalculationRound: data['rewards-calculation-round'],\n rewardsLevel: data['rewards-level'],\n rewardsPool: data['rewards-pool'],\n rewardsRate: data['rewards-rate'],\n rewardsResidue: data['rewards-residue'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields relating to a protocol upgrade.\n */\nexport class BlockUpgradeState extends BaseModel {\n /**\n * Creates a new `BlockUpgradeState` object.\n * @param currentProtocol - (proto) The current protocol version.\n * @param nextProtocol - (nextproto) The next proposed protocol version.\n * @param nextProtocolApprovals - (nextyes) Number of blocks which approved the protocol upgrade.\n * @param nextProtocolSwitchOn - (nextswitch) Round on which the protocol upgrade will take effect.\n * @param nextProtocolVoteBefore - (nextbefore) Deadline round for this protocol upgrade (No votes will be consider\n * after this round).\n */\n constructor({ currentProtocol, nextProtocol, nextProtocolApprovals, nextProtocolSwitchOn, nextProtocolVoteBefore, }) {\n super();\n this.currentProtocol = currentProtocol;\n this.nextProtocol = nextProtocol;\n this.nextProtocolApprovals = nextProtocolApprovals;\n this.nextProtocolSwitchOn = nextProtocolSwitchOn;\n this.nextProtocolVoteBefore = nextProtocolVoteBefore;\n this.attribute_map = {\n currentProtocol: 'current-protocol',\n nextProtocol: 'next-protocol',\n nextProtocolApprovals: 'next-protocol-approvals',\n nextProtocolSwitchOn: 'next-protocol-switch-on',\n nextProtocolVoteBefore: 'next-protocol-vote-before',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['current-protocol'] === 'undefined')\n throw new Error(`Response is missing required field 'current-protocol': ${data}`);\n return new BlockUpgradeState({\n currentProtocol: data['current-protocol'],\n nextProtocol: data['next-protocol'],\n nextProtocolApprovals: data['next-protocol-approvals'],\n nextProtocolSwitchOn: data['next-protocol-switch-on'],\n nextProtocolVoteBefore: data['next-protocol-vote-before'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields relating to voting for a protocol upgrade.\n */\nexport class BlockUpgradeVote extends BaseModel {\n /**\n * Creates a new `BlockUpgradeVote` object.\n * @param upgradeApprove - (upgradeyes) Indicates a yes vote for the current proposal.\n * @param upgradeDelay - (upgradedelay) Indicates the time between acceptance and execution.\n * @param upgradePropose - (upgradeprop) Indicates a proposed upgrade.\n */\n constructor({ upgradeApprove, upgradeDelay, upgradePropose, }) {\n super();\n this.upgradeApprove = upgradeApprove;\n this.upgradeDelay = upgradeDelay;\n this.upgradePropose = upgradePropose;\n this.attribute_map = {\n upgradeApprove: 'upgrade-approve',\n upgradeDelay: 'upgrade-delay',\n upgradePropose: 'upgrade-propose',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new BlockUpgradeVote({\n upgradeApprove: data['upgrade-approve'],\n upgradeDelay: data['upgrade-delay'],\n upgradePropose: data['upgrade-propose'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Box name and its content.\n */\nexport class Box extends BaseModel {\n /**\n * Creates a new `Box` object.\n * @param name - (name) box name, base64 encoded\n * @param round - The round for which this information is relevant\n * @param value - (value) box value, base64 encoded.\n */\n constructor({ name, round, value, }) {\n super();\n this.name =\n typeof name === 'string'\n ? new Uint8Array(Buffer.from(name, 'base64'))\n : name;\n this.round = round;\n this.value =\n typeof value === 'string'\n ? new Uint8Array(Buffer.from(value, 'base64'))\n : value;\n this.attribute_map = {\n name: 'name',\n round: 'round',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['name'] === 'undefined')\n throw new Error(`Response is missing required field 'name': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new Box({\n name: data['name'],\n round: data['round'],\n value: data['value'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Box descriptor describes an app box without a value.\n */\nexport class BoxDescriptor extends BaseModel {\n /**\n * Creates a new `BoxDescriptor` object.\n * @param name - Base64 encoded box name\n */\n constructor({ name }) {\n super();\n this.name =\n typeof name === 'string'\n ? new Uint8Array(Buffer.from(name, 'base64'))\n : name;\n this.attribute_map = {\n name: 'name',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['name'] === 'undefined')\n throw new Error(`Response is missing required field 'name': ${data}`);\n return new BoxDescriptor({\n name: data['name'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Box names of an application\n */\nexport class BoxesResponse extends BaseModel {\n /**\n * Creates a new `BoxesResponse` object.\n * @param applicationId - (appidx) application index.\n * @param boxes -\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ applicationId, boxes, nextToken, }) {\n super();\n this.applicationId = applicationId;\n this.boxes = boxes;\n this.nextToken = nextToken;\n this.attribute_map = {\n applicationId: 'application-id',\n boxes: 'boxes',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['application-id'] === 'undefined')\n throw new Error(`Response is missing required field 'application-id': ${data}`);\n if (!Array.isArray(data['boxes']))\n throw new Error(`Response is missing required array field 'boxes': ${data}`);\n return new BoxesResponse({\n applicationId: data['application-id'],\n boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Response for errors\n */\nexport class ErrorResponse extends BaseModel {\n /**\n * Creates a new `ErrorResponse` object.\n * @param message -\n * @param data -\n */\n constructor({ message, data, }) {\n super();\n this.message = message;\n this.data = data;\n this.attribute_map = {\n message: 'message',\n data: 'data',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['message'] === 'undefined')\n throw new Error(`Response is missing required field 'message': ${data}`);\n return new ErrorResponse({\n message: data['message'],\n data: data['data'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a TEAL value delta.\n */\nexport class EvalDelta extends BaseModel {\n /**\n * Creates a new `EvalDelta` object.\n * @param action - (at) delta action.\n * @param bytes - (bs) bytes value.\n * @param uint - (ui) uint value.\n */\n constructor({ action, bytes, uint, }) {\n super();\n this.action = action;\n this.bytes = bytes;\n this.uint = uint;\n this.attribute_map = {\n action: 'action',\n bytes: 'bytes',\n uint: 'uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['action'] === 'undefined')\n throw new Error(`Response is missing required field 'action': ${data}`);\n return new EvalDelta({\n action: data['action'],\n bytes: data['bytes'],\n uint: data['uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Key-value pairs for StateDelta.\n */\nexport class EvalDeltaKeyValue extends BaseModel {\n /**\n * Creates a new `EvalDeltaKeyValue` object.\n * @param key -\n * @param value - Represents a TEAL value delta.\n */\n constructor({ key, value }) {\n super();\n this.key = key;\n this.value = value;\n this.attribute_map = {\n key: 'key',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['key'] === 'undefined')\n throw new Error(`Response is missing required field 'key': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new EvalDeltaKeyValue({\n key: data['key'],\n value: EvalDelta.from_obj_for_encoding(data['value']),\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class HashFactory extends BaseModel {\n /**\n * Creates a new `HashFactory` object.\n * @param hashType - (t)\n */\n constructor({ hashType }) {\n super();\n this.hashType = hashType;\n this.attribute_map = {\n hashType: 'hash-type',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new HashFactory({\n hashType: data['hash-type'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * A health check response.\n */\nexport class HealthCheck extends BaseModel {\n /**\n * Creates a new `HealthCheck` object.\n * @param dbAvailable -\n * @param isMigrating -\n * @param message -\n * @param round -\n * @param version - Current version.\n * @param data -\n * @param errors -\n */\n constructor({ dbAvailable, isMigrating, message, round, version, data, errors, }) {\n super();\n this.dbAvailable = dbAvailable;\n this.isMigrating = isMigrating;\n this.message = message;\n this.round = round;\n this.version = version;\n this.data = data;\n this.errors = errors;\n this.attribute_map = {\n dbAvailable: 'db-available',\n isMigrating: 'is-migrating',\n message: 'message',\n round: 'round',\n version: 'version',\n data: 'data',\n errors: 'errors',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['db-available'] === 'undefined')\n throw new Error(`Response is missing required field 'db-available': ${data}`);\n if (typeof data['is-migrating'] === 'undefined')\n throw new Error(`Response is missing required field 'is-migrating': ${data}`);\n if (typeof data['message'] === 'undefined')\n throw new Error(`Response is missing required field 'message': ${data}`);\n if (typeof data['round'] === 'undefined')\n throw new Error(`Response is missing required field 'round': ${data}`);\n if (typeof data['version'] === 'undefined')\n throw new Error(`Response is missing required field 'version': ${data}`);\n return new HealthCheck({\n dbAvailable: data['db-available'],\n isMigrating: data['is-migrating'],\n message: data['message'],\n round: data['round'],\n version: data['version'],\n data: data['data'],\n errors: data['errors'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class IndexerStateProofMessage extends BaseModel {\n /**\n * Creates a new `IndexerStateProofMessage` object.\n * @param blockHeadersCommitment - (b)\n * @param firstAttestedRound - (f)\n * @param latestAttestedRound - (l)\n * @param lnProvenWeight - (P)\n * @param votersCommitment - (v)\n */\n constructor({ blockHeadersCommitment, firstAttestedRound, latestAttestedRound, lnProvenWeight, votersCommitment, }) {\n super();\n this.blockHeadersCommitment =\n typeof blockHeadersCommitment === 'string'\n ? new Uint8Array(Buffer.from(blockHeadersCommitment, 'base64'))\n : blockHeadersCommitment;\n this.firstAttestedRound = firstAttestedRound;\n this.latestAttestedRound = latestAttestedRound;\n this.lnProvenWeight = lnProvenWeight;\n this.votersCommitment =\n typeof votersCommitment === 'string'\n ? new Uint8Array(Buffer.from(votersCommitment, 'base64'))\n : votersCommitment;\n this.attribute_map = {\n blockHeadersCommitment: 'block-headers-commitment',\n firstAttestedRound: 'first-attested-round',\n latestAttestedRound: 'latest-attested-round',\n lnProvenWeight: 'ln-proven-weight',\n votersCommitment: 'voters-commitment',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new IndexerStateProofMessage({\n blockHeadersCommitment: data['block-headers-commitment'],\n firstAttestedRound: data['first-attested-round'],\n latestAttestedRound: data['latest-attested-round'],\n lnProvenWeight: data['ln-proven-weight'],\n votersCommitment: data['voters-commitment'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class MerkleArrayProof extends BaseModel {\n /**\n * Creates a new `MerkleArrayProof` object.\n * @param hashFactory -\n * @param path - (pth)\n * @param treeDepth - (td)\n */\n constructor({ hashFactory, path, treeDepth, }) {\n super();\n this.hashFactory = hashFactory;\n this.path = path;\n this.treeDepth = treeDepth;\n this.attribute_map = {\n hashFactory: 'hash-factory',\n path: 'path',\n treeDepth: 'tree-depth',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new MerkleArrayProof({\n hashFactory: typeof data['hash-factory'] !== 'undefined'\n ? HashFactory.from_obj_for_encoding(data['hash-factory'])\n : undefined,\n path: data['path'],\n treeDepth: data['tree-depth'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * A simplified version of AssetHolding\n */\nexport class MiniAssetHolding extends BaseModel {\n /**\n * Creates a new `MiniAssetHolding` object.\n * @param address -\n * @param amount -\n * @param isFrozen -\n * @param deleted - Whether or not this asset holding is currently deleted from its account.\n * @param optedInAtRound - Round during which the account opted into the asset.\n * @param optedOutAtRound - Round during which the account opted out of the asset.\n */\n constructor({ address, amount, isFrozen, deleted, optedInAtRound, optedOutAtRound, }) {\n super();\n this.address = address;\n this.amount = amount;\n this.isFrozen = isFrozen;\n this.deleted = deleted;\n this.optedInAtRound = optedInAtRound;\n this.optedOutAtRound = optedOutAtRound;\n this.attribute_map = {\n address: 'address',\n amount: 'amount',\n isFrozen: 'is-frozen',\n deleted: 'deleted',\n optedInAtRound: 'opted-in-at-round',\n optedOutAtRound: 'opted-out-at-round',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['address'] === 'undefined')\n throw new Error(`Response is missing required field 'address': ${data}`);\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['is-frozen'] === 'undefined')\n throw new Error(`Response is missing required field 'is-frozen': ${data}`);\n return new MiniAssetHolding({\n address: data['address'],\n amount: data['amount'],\n isFrozen: data['is-frozen'],\n deleted: data['deleted'],\n optedInAtRound: data['opted-in-at-round'],\n optedOutAtRound: data['opted-out-at-round'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Participation account data that needs to be checked/acted on by the network.\n */\nexport class ParticipationUpdates extends BaseModel {\n /**\n * Creates a new `ParticipationUpdates` object.\n * @param absentParticipationAccounts - (partupabs) a list of online accounts that need to be suspended.\n * @param expiredParticipationAccounts - (partupdrmv) a list of online accounts that needs to be converted to offline\n * since their participation key expired.\n */\n constructor({ absentParticipationAccounts, expiredParticipationAccounts, }) {\n super();\n this.absentParticipationAccounts = absentParticipationAccounts;\n this.expiredParticipationAccounts = expiredParticipationAccounts;\n this.attribute_map = {\n absentParticipationAccounts: 'absent-participation-accounts',\n expiredParticipationAccounts: 'expired-participation-accounts',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new ParticipationUpdates({\n absentParticipationAccounts: data['absent-participation-accounts'],\n expiredParticipationAccounts: data['expired-participation-accounts'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * (sp) represents a state proof.\n * Definition:\n * crypto/stateproof/structs.go : StateProof\n */\nexport class StateProofFields extends BaseModel {\n /**\n * Creates a new `StateProofFields` object.\n * @param partProofs - (P)\n * @param positionsToReveal - (pr) Sequence of reveal positions.\n * @param reveals - (r) Note that this is actually stored as a map[uint64] - Reveal in the actual\n * msgp\n * @param saltVersion - (v) Salt version of the merkle signature.\n * @param sigCommit - (c)\n * @param sigProofs - (S)\n * @param signedWeight - (w)\n */\n constructor({ partProofs, positionsToReveal, reveals, saltVersion, sigCommit, sigProofs, signedWeight, }) {\n super();\n this.partProofs = partProofs;\n this.positionsToReveal = positionsToReveal;\n this.reveals = reveals;\n this.saltVersion = saltVersion;\n this.sigCommit =\n typeof sigCommit === 'string'\n ? new Uint8Array(Buffer.from(sigCommit, 'base64'))\n : sigCommit;\n this.sigProofs = sigProofs;\n this.signedWeight = signedWeight;\n this.attribute_map = {\n partProofs: 'part-proofs',\n positionsToReveal: 'positions-to-reveal',\n reveals: 'reveals',\n saltVersion: 'salt-version',\n sigCommit: 'sig-commit',\n sigProofs: 'sig-proofs',\n signedWeight: 'signed-weight',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofFields({\n partProofs: typeof data['part-proofs'] !== 'undefined'\n ? MerkleArrayProof.from_obj_for_encoding(data['part-proofs'])\n : undefined,\n positionsToReveal: data['positions-to-reveal'],\n reveals: typeof data['reveals'] !== 'undefined'\n ? data['reveals'].map(StateProofReveal.from_obj_for_encoding)\n : undefined,\n saltVersion: data['salt-version'],\n sigCommit: data['sig-commit'],\n sigProofs: typeof data['sig-proofs'] !== 'undefined'\n ? MerkleArrayProof.from_obj_for_encoding(data['sig-proofs'])\n : undefined,\n signedWeight: data['signed-weight'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class StateProofParticipant extends BaseModel {\n /**\n * Creates a new `StateProofParticipant` object.\n * @param verifier - (p)\n * @param weight - (w)\n */\n constructor({ verifier, weight, }) {\n super();\n this.verifier = verifier;\n this.weight = weight;\n this.attribute_map = {\n verifier: 'verifier',\n weight: 'weight',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofParticipant({\n verifier: typeof data['verifier'] !== 'undefined'\n ? StateProofVerifier.from_obj_for_encoding(data['verifier'])\n : undefined,\n weight: data['weight'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class StateProofReveal extends BaseModel {\n /**\n * Creates a new `StateProofReveal` object.\n * @param participant - (p)\n * @param position - The position in the signature and participants arrays corresponding to this\n * entry.\n * @param sigSlot - (s)\n */\n constructor({ participant, position, sigSlot, }) {\n super();\n this.participant = participant;\n this.position = position;\n this.sigSlot = sigSlot;\n this.attribute_map = {\n participant: 'participant',\n position: 'position',\n sigSlot: 'sig-slot',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofReveal({\n participant: typeof data['participant'] !== 'undefined'\n ? StateProofParticipant.from_obj_for_encoding(data['participant'])\n : undefined,\n position: data['position'],\n sigSlot: typeof data['sig-slot'] !== 'undefined'\n ? StateProofSigSlot.from_obj_for_encoding(data['sig-slot'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class StateProofSigSlot extends BaseModel {\n /**\n * Creates a new `StateProofSigSlot` object.\n * @param lowerSigWeight - (l) The total weight of signatures in the lower-numbered slots.\n * @param signature -\n */\n constructor({ lowerSigWeight, signature, }) {\n super();\n this.lowerSigWeight = lowerSigWeight;\n this.signature = signature;\n this.attribute_map = {\n lowerSigWeight: 'lower-sig-weight',\n signature: 'signature',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofSigSlot({\n lowerSigWeight: data['lower-sig-weight'],\n signature: typeof data['signature'] !== 'undefined'\n ? StateProofSignature.from_obj_for_encoding(data['signature'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class StateProofSignature extends BaseModel {\n /**\n * Creates a new `StateProofSignature` object.\n * @param falconSignature -\n * @param merkleArrayIndex -\n * @param proof -\n * @param verifyingKey - (vkey)\n */\n constructor({ falconSignature, merkleArrayIndex, proof, verifyingKey, }) {\n super();\n this.falconSignature =\n typeof falconSignature === 'string'\n ? new Uint8Array(Buffer.from(falconSignature, 'base64'))\n : falconSignature;\n this.merkleArrayIndex = merkleArrayIndex;\n this.proof = proof;\n this.verifyingKey =\n typeof verifyingKey === 'string'\n ? new Uint8Array(Buffer.from(verifyingKey, 'base64'))\n : verifyingKey;\n this.attribute_map = {\n falconSignature: 'falcon-signature',\n merkleArrayIndex: 'merkle-array-index',\n proof: 'proof',\n verifyingKey: 'verifying-key',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofSignature({\n falconSignature: data['falcon-signature'],\n merkleArrayIndex: data['merkle-array-index'],\n proof: typeof data['proof'] !== 'undefined'\n ? MerkleArrayProof.from_obj_for_encoding(data['proof'])\n : undefined,\n verifyingKey: data['verifying-key'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class StateProofTracking extends BaseModel {\n /**\n * Creates a new `StateProofTracking` object.\n * @param nextRound - (n) Next round for which we will accept a state proof transaction.\n * @param onlineTotalWeight - (t) The total number of microalgos held by the online accounts during the\n * StateProof round.\n * @param type - State Proof Type. Note the raw object uses map with this as key.\n * @param votersCommitment - (v) Root of a vector commitment containing online accounts that will help sign\n * the proof.\n */\n constructor({ nextRound, onlineTotalWeight, type, votersCommitment, }) {\n super();\n this.nextRound = nextRound;\n this.onlineTotalWeight = onlineTotalWeight;\n this.type = type;\n this.votersCommitment =\n typeof votersCommitment === 'string'\n ? new Uint8Array(Buffer.from(votersCommitment, 'base64'))\n : votersCommitment;\n this.attribute_map = {\n nextRound: 'next-round',\n onlineTotalWeight: 'online-total-weight',\n type: 'type',\n votersCommitment: 'voters-commitment',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofTracking({\n nextRound: data['next-round'],\n onlineTotalWeight: data['online-total-weight'],\n type: data['type'],\n votersCommitment: data['voters-commitment'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class StateProofVerifier extends BaseModel {\n /**\n * Creates a new `StateProofVerifier` object.\n * @param commitment - (cmt) Represents the root of the vector commitment tree.\n * @param keyLifetime - (lf) Key lifetime.\n */\n constructor({ commitment, keyLifetime, }) {\n super();\n this.commitment =\n typeof commitment === 'string'\n ? new Uint8Array(Buffer.from(commitment, 'base64'))\n : commitment;\n this.keyLifetime = keyLifetime;\n this.attribute_map = {\n commitment: 'commitment',\n keyLifetime: 'key-lifetime',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new StateProofVerifier({\n commitment: data['commitment'],\n keyLifetime: data['key-lifetime'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a (apls) local-state or (apgs) global-state schema. These schemas\n * determine how much storage may be used in a local-state or global-state for an\n * application. The more space used, the larger minimum balance must be maintained\n * in the account holding the data.\n */\nexport class StateSchema extends BaseModel {\n /**\n * Creates a new `StateSchema` object.\n * @param numByteSlice - Maximum number of TEAL byte slices that may be stored in the key/value store.\n * @param numUint - Maximum number of TEAL uints that may be stored in the key/value store.\n */\n constructor({ numByteSlice, numUint, }) {\n super();\n this.numByteSlice = numByteSlice;\n this.numUint = numUint;\n this.attribute_map = {\n numByteSlice: 'num-byte-slice',\n numUint: 'num-uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['num-byte-slice'] === 'undefined')\n throw new Error(`Response is missing required field 'num-byte-slice': ${data}`);\n if (typeof data['num-uint'] === 'undefined')\n throw new Error(`Response is missing required field 'num-uint': ${data}`);\n return new StateSchema({\n numByteSlice: data['num-byte-slice'],\n numUint: data['num-uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a key-value pair in an application store.\n */\nexport class TealKeyValue extends BaseModel {\n /**\n * Creates a new `TealKeyValue` object.\n * @param key -\n * @param value - Represents a TEAL value.\n */\n constructor({ key, value }) {\n super();\n this.key = key;\n this.value = value;\n this.attribute_map = {\n key: 'key',\n value: 'value',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['key'] === 'undefined')\n throw new Error(`Response is missing required field 'key': ${data}`);\n if (typeof data['value'] === 'undefined')\n throw new Error(`Response is missing required field 'value': ${data}`);\n return new TealKeyValue({\n key: data['key'],\n value: TealValue.from_obj_for_encoding(data['value']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Represents a TEAL value.\n */\nexport class TealValue extends BaseModel {\n /**\n * Creates a new `TealValue` object.\n * @param bytes - bytes value.\n * @param type - type of the value. Value `1` refers to **bytes**, value `2` refers to **uint**\n * @param uint - uint value.\n */\n constructor({ bytes, type, uint, }) {\n super();\n this.bytes = bytes;\n this.type = type;\n this.uint = uint;\n this.attribute_map = {\n bytes: 'bytes',\n type: 'type',\n uint: 'uint',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['bytes'] === 'undefined')\n throw new Error(`Response is missing required field 'bytes': ${data}`);\n if (typeof data['type'] === 'undefined')\n throw new Error(`Response is missing required field 'type': ${data}`);\n if (typeof data['uint'] === 'undefined')\n throw new Error(`Response is missing required field 'uint': ${data}`);\n return new TealValue({\n bytes: data['bytes'],\n type: data['type'],\n uint: data['uint'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Contains all fields common to all transactions and serves as an envelope to all\n * transactions type. Represents both regular and inner transactions.\n * Definition:\n * data/transactions/signedtxn.go : SignedTxn\n * data/transactions/transaction.go : Transaction\n */\nexport class Transaction extends BaseModel {\n /**\n * Creates a new `Transaction` object.\n * @param fee - (fee) Transaction fee.\n * @param firstValid - (fv) First valid round for this transaction.\n * @param lastValid - (lv) Last valid round for this transaction.\n * @param sender - (snd) Sender's address.\n * @param applicationTransaction - Fields for application transactions.\n * Definition:\n * data/transactions/application.go : ApplicationCallTxnFields\n * @param assetConfigTransaction - Fields for asset allocation, re-configuration, and destruction.\n * A zero value for asset-id indicates asset creation.\n * A zero value for the params indicates asset destruction.\n * Definition:\n * data/transactions/asset.go : AssetConfigTxnFields\n * @param assetFreezeTransaction - Fields for an asset freeze transaction.\n * Definition:\n * data/transactions/asset.go : AssetFreezeTxnFields\n * @param assetTransferTransaction - Fields for an asset transfer transaction.\n * Definition:\n * data/transactions/asset.go : AssetTransferTxnFields\n * @param authAddr - (sgnr) this is included with signed transactions when the signing address does\n * not equal the sender. The backend can use this to ensure that auth addr is equal\n * to the accounts auth addr.\n * @param closeRewards - (rc) rewards applied to close-remainder-to account.\n * @param closingAmount - (ca) closing amount for transaction.\n * @param confirmedRound - Round when the transaction was confirmed.\n * @param createdApplicationIndex - Specifies an application index (ID) if an application was created with this\n * transaction.\n * @param createdAssetIndex - Specifies an asset index (ID) if an asset was created with this transaction.\n * @param genesisHash - (gh) Hash of genesis block.\n * @param genesisId - (gen) genesis block ID.\n * @param globalStateDelta - (gd) Global state key/value changes for the application being executed by this\n * transaction.\n * @param group - (grp) Base64 encoded byte array of a sha512/256 digest. When present indicates\n * that this transaction is part of a transaction group and the value is the\n * sha512/256 hash of the transactions in that group.\n * @param id - Transaction ID\n * @param innerTxns - Inner transactions produced by application execution.\n * @param intraRoundOffset - Offset into the round where this transaction was confirmed.\n * @param keyregTransaction - Fields for a keyreg transaction.\n * Definition:\n * data/transactions/keyreg.go : KeyregTxnFields\n * @param lease - (lx) Base64 encoded 32-byte array. Lease enforces mutual exclusion of\n * transactions. If this field is nonzero, then once the transaction is confirmed,\n * it acquires the lease identified by the (Sender, Lease) pair of the transaction\n * until the LastValid round passes. While this transaction possesses the lease, no\n * other transaction specifying this lease can be confirmed.\n * @param localStateDelta - (ld) Local state key/value changes for the application being executed by this\n * transaction.\n * @param logs - (lg) Logs for the application being executed by this transaction.\n * @param note - (note) Free form data.\n * @param paymentTransaction - Fields for a payment transaction.\n * Definition:\n * data/transactions/payment.go : PaymentTxnFields\n * @param receiverRewards - (rr) rewards applied to receiver account.\n * @param rekeyTo - (rekey) when included in a valid transaction, the accounts auth addr will be\n * updated with this value and future signatures must be signed with the key\n * represented by this address.\n * @param roundTime - Time when the block this transaction is in was confirmed.\n * @param senderRewards - (rs) rewards applied to sender account.\n * @param signature - Validation signature associated with some data. Only one of the signatures\n * should be provided.\n * @param stateProofTransaction - Fields for a state proof transaction.\n * Definition:\n * data/transactions/stateproof.go : StateProofTxnFields\n * @param txType - (type) Indicates what type of transaction this is. Different types have\n * different fields.\n * Valid types, and where their fields are stored:\n * * (pay) payment-transaction\n * * (keyreg) keyreg-transaction\n * * (acfg) asset-config-transaction\n * * (axfer) asset-transfer-transaction\n * * (afrz) asset-freeze-transaction\n * * (appl) application-transaction\n * * (stpf) state-proof-transaction\n */\n constructor({ fee, firstValid, lastValid, sender, applicationTransaction, assetConfigTransaction, assetFreezeTransaction, assetTransferTransaction, authAddr, closeRewards, closingAmount, confirmedRound, createdApplicationIndex, createdAssetIndex, genesisHash, genesisId, globalStateDelta, group, id, innerTxns, intraRoundOffset, keyregTransaction, lease, localStateDelta, logs, note, paymentTransaction, receiverRewards, rekeyTo, roundTime, senderRewards, signature, stateProofTransaction, txType, }) {\n super();\n this.fee = fee;\n this.firstValid = firstValid;\n this.lastValid = lastValid;\n this.sender = sender;\n this.applicationTransaction = applicationTransaction;\n this.assetConfigTransaction = assetConfigTransaction;\n this.assetFreezeTransaction = assetFreezeTransaction;\n this.assetTransferTransaction = assetTransferTransaction;\n this.authAddr = authAddr;\n this.closeRewards = closeRewards;\n this.closingAmount = closingAmount;\n this.confirmedRound = confirmedRound;\n this.createdApplicationIndex = createdApplicationIndex;\n this.createdAssetIndex = createdAssetIndex;\n this.genesisHash =\n typeof genesisHash === 'string'\n ? new Uint8Array(Buffer.from(genesisHash, 'base64'))\n : genesisHash;\n this.genesisId = genesisId;\n this.globalStateDelta = globalStateDelta;\n this.group =\n typeof group === 'string'\n ? new Uint8Array(Buffer.from(group, 'base64'))\n : group;\n this.id = id;\n this.innerTxns = innerTxns;\n this.intraRoundOffset = intraRoundOffset;\n this.keyregTransaction = keyregTransaction;\n this.lease =\n typeof lease === 'string'\n ? new Uint8Array(Buffer.from(lease, 'base64'))\n : lease;\n this.localStateDelta = localStateDelta;\n this.logs = logs;\n this.note =\n typeof note === 'string'\n ? new Uint8Array(Buffer.from(note, 'base64'))\n : note;\n this.paymentTransaction = paymentTransaction;\n this.receiverRewards = receiverRewards;\n this.rekeyTo = rekeyTo;\n this.roundTime = roundTime;\n this.senderRewards = senderRewards;\n this.signature = signature;\n this.stateProofTransaction = stateProofTransaction;\n this.txType = txType;\n this.attribute_map = {\n fee: 'fee',\n firstValid: 'first-valid',\n lastValid: 'last-valid',\n sender: 'sender',\n applicationTransaction: 'application-transaction',\n assetConfigTransaction: 'asset-config-transaction',\n assetFreezeTransaction: 'asset-freeze-transaction',\n assetTransferTransaction: 'asset-transfer-transaction',\n authAddr: 'auth-addr',\n closeRewards: 'close-rewards',\n closingAmount: 'closing-amount',\n confirmedRound: 'confirmed-round',\n createdApplicationIndex: 'created-application-index',\n createdAssetIndex: 'created-asset-index',\n genesisHash: 'genesis-hash',\n genesisId: 'genesis-id',\n globalStateDelta: 'global-state-delta',\n group: 'group',\n id: 'id',\n innerTxns: 'inner-txns',\n intraRoundOffset: 'intra-round-offset',\n keyregTransaction: 'keyreg-transaction',\n lease: 'lease',\n localStateDelta: 'local-state-delta',\n logs: 'logs',\n note: 'note',\n paymentTransaction: 'payment-transaction',\n receiverRewards: 'receiver-rewards',\n rekeyTo: 'rekey-to',\n roundTime: 'round-time',\n senderRewards: 'sender-rewards',\n signature: 'signature',\n stateProofTransaction: 'state-proof-transaction',\n txType: 'tx-type',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['fee'] === 'undefined')\n throw new Error(`Response is missing required field 'fee': ${data}`);\n if (typeof data['first-valid'] === 'undefined')\n throw new Error(`Response is missing required field 'first-valid': ${data}`);\n if (typeof data['last-valid'] === 'undefined')\n throw new Error(`Response is missing required field 'last-valid': ${data}`);\n if (typeof data['sender'] === 'undefined')\n throw new Error(`Response is missing required field 'sender': ${data}`);\n return new Transaction({\n fee: data['fee'],\n firstValid: data['first-valid'],\n lastValid: data['last-valid'],\n sender: data['sender'],\n applicationTransaction: typeof data['application-transaction'] !== 'undefined'\n ? TransactionApplication.from_obj_for_encoding(data['application-transaction'])\n : undefined,\n assetConfigTransaction: typeof data['asset-config-transaction'] !== 'undefined'\n ? TransactionAssetConfig.from_obj_for_encoding(data['asset-config-transaction'])\n : undefined,\n assetFreezeTransaction: typeof data['asset-freeze-transaction'] !== 'undefined'\n ? TransactionAssetFreeze.from_obj_for_encoding(data['asset-freeze-transaction'])\n : undefined,\n assetTransferTransaction: typeof data['asset-transfer-transaction'] !== 'undefined'\n ? TransactionAssetTransfer.from_obj_for_encoding(data['asset-transfer-transaction'])\n : undefined,\n authAddr: data['auth-addr'],\n closeRewards: data['close-rewards'],\n closingAmount: data['closing-amount'],\n confirmedRound: data['confirmed-round'],\n createdApplicationIndex: data['created-application-index'],\n createdAssetIndex: data['created-asset-index'],\n genesisHash: data['genesis-hash'],\n genesisId: data['genesis-id'],\n globalStateDelta: typeof data['global-state-delta'] !== 'undefined'\n ? data['global-state-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)\n : undefined,\n group: data['group'],\n id: data['id'],\n innerTxns: typeof data['inner-txns'] !== 'undefined'\n ? data['inner-txns'].map(Transaction.from_obj_for_encoding)\n : undefined,\n intraRoundOffset: data['intra-round-offset'],\n keyregTransaction: typeof data['keyreg-transaction'] !== 'undefined'\n ? TransactionKeyreg.from_obj_for_encoding(data['keyreg-transaction'])\n : undefined,\n lease: data['lease'],\n localStateDelta: typeof data['local-state-delta'] !== 'undefined'\n ? data['local-state-delta'].map(AccountStateDelta.from_obj_for_encoding)\n : undefined,\n logs: data['logs'],\n note: data['note'],\n paymentTransaction: typeof data['payment-transaction'] !== 'undefined'\n ? TransactionPayment.from_obj_for_encoding(data['payment-transaction'])\n : undefined,\n receiverRewards: data['receiver-rewards'],\n rekeyTo: data['rekey-to'],\n roundTime: data['round-time'],\n senderRewards: data['sender-rewards'],\n signature: typeof data['signature'] !== 'undefined'\n ? TransactionSignature.from_obj_for_encoding(data['signature'])\n : undefined,\n stateProofTransaction: typeof data['state-proof-transaction'] !== 'undefined'\n ? TransactionStateProof.from_obj_for_encoding(data['state-proof-transaction'])\n : undefined,\n txType: data['tx-type'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for application transactions.\n * Definition:\n * data/transactions/application.go : ApplicationCallTxnFields\n */\nexport class TransactionApplication extends BaseModel {\n /**\n * Creates a new `TransactionApplication` object.\n * @param applicationId - (apid) ID of the application being configured or empty if creating.\n * @param accounts - (apat) List of accounts in addition to the sender that may be accessed from the\n * application's approval-program and clear-state-program.\n * @param applicationArgs - (apaa) transaction specific arguments accessed from the application's\n * approval-program and clear-state-program.\n * @param approvalProgram - (apap) Logic executed for every application transaction, except when\n * on-completion is set to \"clear\". It can read and write global state for the\n * application, as well as account-specific local state. Approval programs may\n * reject the transaction.\n * @param clearStateProgram - (apsu) Logic executed for application transactions with on-completion set to\n * \"clear\". It can read and write global state for the application, as well as\n * account-specific local state. Clear state programs cannot reject the\n * transaction.\n * @param extraProgramPages - (epp) specifies the additional app program len requested in pages.\n * @param foreignApps - (apfa) Lists the applications in addition to the application-id whose global\n * states may be accessed by this application's approval-program and\n * clear-state-program. The access is read-only.\n * @param foreignAssets - (apas) lists the assets whose parameters may be accessed by this application's\n * ApprovalProgram and ClearStateProgram. The access is read-only.\n * @param globalStateSchema - Represents a (apls) local-state or (apgs) global-state schema. These schemas\n * determine how much storage may be used in a local-state or global-state for an\n * application. The more space used, the larger minimum balance must be maintained\n * in the account holding the data.\n * @param localStateSchema - Represents a (apls) local-state or (apgs) global-state schema. These schemas\n * determine how much storage may be used in a local-state or global-state for an\n * application. The more space used, the larger minimum balance must be maintained\n * in the account holding the data.\n * @param onCompletion - (apan) defines the what additional actions occur with the transaction.\n * Valid types:\n * * noop\n * * optin\n * * closeout\n * * clear\n * * update\n * * update\n * * delete\n */\n constructor({ applicationId, accounts, applicationArgs, approvalProgram, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, }) {\n super();\n this.applicationId = applicationId;\n this.accounts = accounts;\n this.applicationArgs = applicationArgs;\n this.approvalProgram =\n typeof approvalProgram === 'string'\n ? new Uint8Array(Buffer.from(approvalProgram, 'base64'))\n : approvalProgram;\n this.clearStateProgram =\n typeof clearStateProgram === 'string'\n ? new Uint8Array(Buffer.from(clearStateProgram, 'base64'))\n : clearStateProgram;\n this.extraProgramPages = extraProgramPages;\n this.foreignApps = foreignApps;\n this.foreignAssets = foreignAssets;\n this.globalStateSchema = globalStateSchema;\n this.localStateSchema = localStateSchema;\n this.onCompletion = onCompletion;\n this.attribute_map = {\n applicationId: 'application-id',\n accounts: 'accounts',\n applicationArgs: 'application-args',\n approvalProgram: 'approval-program',\n clearStateProgram: 'clear-state-program',\n extraProgramPages: 'extra-program-pages',\n foreignApps: 'foreign-apps',\n foreignAssets: 'foreign-assets',\n globalStateSchema: 'global-state-schema',\n localStateSchema: 'local-state-schema',\n onCompletion: 'on-completion',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['application-id'] === 'undefined')\n throw new Error(`Response is missing required field 'application-id': ${data}`);\n return new TransactionApplication({\n applicationId: data['application-id'],\n accounts: data['accounts'],\n applicationArgs: data['application-args'],\n approvalProgram: data['approval-program'],\n clearStateProgram: data['clear-state-program'],\n extraProgramPages: data['extra-program-pages'],\n foreignApps: data['foreign-apps'],\n foreignAssets: data['foreign-assets'],\n globalStateSchema: typeof data['global-state-schema'] !== 'undefined'\n ? StateSchema.from_obj_for_encoding(data['global-state-schema'])\n : undefined,\n localStateSchema: typeof data['local-state-schema'] !== 'undefined'\n ? StateSchema.from_obj_for_encoding(data['local-state-schema'])\n : undefined,\n onCompletion: data['on-completion'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for asset allocation, re-configuration, and destruction.\n * A zero value for asset-id indicates asset creation.\n * A zero value for the params indicates asset destruction.\n * Definition:\n * data/transactions/asset.go : AssetConfigTxnFields\n */\nexport class TransactionAssetConfig extends BaseModel {\n /**\n * Creates a new `TransactionAssetConfig` object.\n * @param assetId - (xaid) ID of the asset being configured or empty if creating.\n * @param params - AssetParams specifies the parameters for an asset.\n * (apar) when part of an AssetConfig transaction.\n * Definition:\n * data/transactions/asset.go : AssetParams\n */\n constructor({ assetId, params, }) {\n super();\n this.assetId = assetId;\n this.params = params;\n this.attribute_map = {\n assetId: 'asset-id',\n params: 'params',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new TransactionAssetConfig({\n assetId: data['asset-id'],\n params: typeof data['params'] !== 'undefined'\n ? AssetParams.from_obj_for_encoding(data['params'])\n : undefined,\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for an asset freeze transaction.\n * Definition:\n * data/transactions/asset.go : AssetFreezeTxnFields\n */\nexport class TransactionAssetFreeze extends BaseModel {\n /**\n * Creates a new `TransactionAssetFreeze` object.\n * @param address - (fadd) Address of the account whose asset is being frozen or thawed.\n * @param assetId - (faid) ID of the asset being frozen or thawed.\n * @param newFreezeStatus - (afrz) The new freeze status.\n */\n constructor({ address, assetId, newFreezeStatus, }) {\n super();\n this.address = address;\n this.assetId = assetId;\n this.newFreezeStatus = newFreezeStatus;\n this.attribute_map = {\n address: 'address',\n assetId: 'asset-id',\n newFreezeStatus: 'new-freeze-status',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['address'] === 'undefined')\n throw new Error(`Response is missing required field 'address': ${data}`);\n if (typeof data['asset-id'] === 'undefined')\n throw new Error(`Response is missing required field 'asset-id': ${data}`);\n if (typeof data['new-freeze-status'] === 'undefined')\n throw new Error(`Response is missing required field 'new-freeze-status': ${data}`);\n return new TransactionAssetFreeze({\n address: data['address'],\n assetId: data['asset-id'],\n newFreezeStatus: data['new-freeze-status'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for an asset transfer transaction.\n * Definition:\n * data/transactions/asset.go : AssetTransferTxnFields\n */\nexport class TransactionAssetTransfer extends BaseModel {\n /**\n * Creates a new `TransactionAssetTransfer` object.\n * @param amount - (aamt) Amount of asset to transfer. A zero amount transferred to self allocates\n * that asset in the account's Assets map.\n * @param assetId - (xaid) ID of the asset being transferred.\n * @param receiver - (arcv) Recipient address of the transfer.\n * @param closeAmount - Number of assets transferred to the close-to account as part of the transaction.\n * @param closeTo - (aclose) Indicates that the asset should be removed from the account's Assets\n * map, and specifies where the remaining asset holdings should be transferred.\n * It's always valid to transfer remaining asset holdings to the creator account.\n * @param sender - (asnd) The effective sender during a clawback transactions. If this is not a\n * zero value, the real transaction sender must be the Clawback address from the\n * AssetParams.\n */\n constructor({ amount, assetId, receiver, closeAmount, closeTo, sender, }) {\n super();\n this.amount = amount;\n this.assetId = assetId;\n this.receiver = receiver;\n this.closeAmount = closeAmount;\n this.closeTo = closeTo;\n this.sender = sender;\n this.attribute_map = {\n amount: 'amount',\n assetId: 'asset-id',\n receiver: 'receiver',\n closeAmount: 'close-amount',\n closeTo: 'close-to',\n sender: 'sender',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['asset-id'] === 'undefined')\n throw new Error(`Response is missing required field 'asset-id': ${data}`);\n if (typeof data['receiver'] === 'undefined')\n throw new Error(`Response is missing required field 'receiver': ${data}`);\n return new TransactionAssetTransfer({\n amount: data['amount'],\n assetId: data['asset-id'],\n receiver: data['receiver'],\n closeAmount: data['close-amount'],\n closeTo: data['close-to'],\n sender: data['sender'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for a keyreg transaction.\n * Definition:\n * data/transactions/keyreg.go : KeyregTxnFields\n */\nexport class TransactionKeyreg extends BaseModel {\n /**\n * Creates a new `TransactionKeyreg` object.\n * @param nonParticipation - (nonpart) Mark the account as participating or non-participating.\n * @param selectionParticipationKey - (selkey) Public key used with the Verified Random Function (VRF) result during\n * committee selection.\n * @param stateProofKey - (sprfkey) State proof key used in key registration transactions.\n * @param voteFirstValid - (votefst) First round this participation key is valid.\n * @param voteKeyDilution - (votekd) Number of subkeys in each batch of participation keys.\n * @param voteLastValid - (votelst) Last round this participation key is valid.\n * @param voteParticipationKey - (votekey) Participation public key used in key registration transactions.\n */\n constructor({ nonParticipation, selectionParticipationKey, stateProofKey, voteFirstValid, voteKeyDilution, voteLastValid, voteParticipationKey, }) {\n super();\n this.nonParticipation = nonParticipation;\n this.selectionParticipationKey =\n typeof selectionParticipationKey === 'string'\n ? new Uint8Array(Buffer.from(selectionParticipationKey, 'base64'))\n : selectionParticipationKey;\n this.stateProofKey =\n typeof stateProofKey === 'string'\n ? new Uint8Array(Buffer.from(stateProofKey, 'base64'))\n : stateProofKey;\n this.voteFirstValid = voteFirstValid;\n this.voteKeyDilution = voteKeyDilution;\n this.voteLastValid = voteLastValid;\n this.voteParticipationKey =\n typeof voteParticipationKey === 'string'\n ? new Uint8Array(Buffer.from(voteParticipationKey, 'base64'))\n : voteParticipationKey;\n this.attribute_map = {\n nonParticipation: 'non-participation',\n selectionParticipationKey: 'selection-participation-key',\n stateProofKey: 'state-proof-key',\n voteFirstValid: 'vote-first-valid',\n voteKeyDilution: 'vote-key-dilution',\n voteLastValid: 'vote-last-valid',\n voteParticipationKey: 'vote-participation-key',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new TransactionKeyreg({\n nonParticipation: data['non-participation'],\n selectionParticipationKey: data['selection-participation-key'],\n stateProofKey: data['state-proof-key'],\n voteFirstValid: data['vote-first-valid'],\n voteKeyDilution: data['vote-key-dilution'],\n voteLastValid: data['vote-last-valid'],\n voteParticipationKey: data['vote-participation-key'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for a payment transaction.\n * Definition:\n * data/transactions/payment.go : PaymentTxnFields\n */\nexport class TransactionPayment extends BaseModel {\n /**\n * Creates a new `TransactionPayment` object.\n * @param amount - (amt) number of MicroAlgos intended to be transferred.\n * @param receiver - (rcv) receiver's address.\n * @param closeAmount - Number of MicroAlgos that were sent to the close-remainder-to address when\n * closing the sender account.\n * @param closeRemainderTo - (close) when set, indicates that the sending account should be closed and all\n * remaining funds be transferred to this address.\n */\n constructor({ amount, receiver, closeAmount, closeRemainderTo, }) {\n super();\n this.amount = amount;\n this.receiver = receiver;\n this.closeAmount = closeAmount;\n this.closeRemainderTo = closeRemainderTo;\n this.attribute_map = {\n amount: 'amount',\n receiver: 'receiver',\n closeAmount: 'close-amount',\n closeRemainderTo: 'close-remainder-to',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['amount'] === 'undefined')\n throw new Error(`Response is missing required field 'amount': ${data}`);\n if (typeof data['receiver'] === 'undefined')\n throw new Error(`Response is missing required field 'receiver': ${data}`);\n return new TransactionPayment({\n amount: data['amount'],\n receiver: data['receiver'],\n closeAmount: data['close-amount'],\n closeRemainderTo: data['close-remainder-to'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class TransactionResponse extends BaseModel {\n /**\n * Creates a new `TransactionResponse` object.\n * @param currentRound - Round at which the results were computed.\n * @param transaction - Contains all fields common to all transactions and serves as an envelope to all\n * transactions type. Represents both regular and inner transactions.\n * Definition:\n * data/transactions/signedtxn.go : SignedTxn\n * data/transactions/transaction.go : Transaction\n */\n constructor({ currentRound, transaction, }) {\n super();\n this.currentRound = currentRound;\n this.transaction = transaction;\n this.attribute_map = {\n currentRound: 'current-round',\n transaction: 'transaction',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n if (typeof data['transaction'] === 'undefined')\n throw new Error(`Response is missing required field 'transaction': ${data}`);\n return new TransactionResponse({\n currentRound: data['current-round'],\n transaction: Transaction.from_obj_for_encoding(data['transaction']),\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Validation signature associated with some data. Only one of the signatures\n * should be provided.\n */\nexport class TransactionSignature extends BaseModel {\n /**\n * Creates a new `TransactionSignature` object.\n * @param logicsig - (lsig) Programatic transaction signature.\n * Definition:\n * data/transactions/logicsig.go\n * @param multisig - (msig) structure holding multiple subsignatures.\n * Definition:\n * crypto/multisig.go : MultisigSig\n * @param sig - (sig) Standard ed25519 signature.\n */\n constructor({ logicsig, multisig, sig, }) {\n super();\n this.logicsig = logicsig;\n this.multisig = multisig;\n this.sig =\n typeof sig === 'string'\n ? new Uint8Array(Buffer.from(sig, 'base64'))\n : sig;\n this.attribute_map = {\n logicsig: 'logicsig',\n multisig: 'multisig',\n sig: 'sig',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new TransactionSignature({\n logicsig: typeof data['logicsig'] !== 'undefined'\n ? TransactionSignatureLogicsig.from_obj_for_encoding(data['logicsig'])\n : undefined,\n multisig: typeof data['multisig'] !== 'undefined'\n ? TransactionSignatureMultisig.from_obj_for_encoding(data['multisig'])\n : undefined,\n sig: data['sig'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * (lsig) Programatic transaction signature.\n * Definition:\n * data/transactions/logicsig.go\n */\nexport class TransactionSignatureLogicsig extends BaseModel {\n /**\n * Creates a new `TransactionSignatureLogicsig` object.\n * @param logic - (l) Program signed by a signature or multi signature, or hashed to be the\n * address of ana ccount. Base64 encoded TEAL program.\n * @param args - (arg) Logic arguments, base64 encoded.\n * @param multisigSignature - (msig) structure holding multiple subsignatures.\n * Definition:\n * crypto/multisig.go : MultisigSig\n * @param signature - (sig) ed25519 signature.\n */\n constructor({ logic, args, multisigSignature, signature, }) {\n super();\n this.logic =\n typeof logic === 'string'\n ? new Uint8Array(Buffer.from(logic, 'base64'))\n : logic;\n this.args = args;\n this.multisigSignature = multisigSignature;\n this.signature =\n typeof signature === 'string'\n ? new Uint8Array(Buffer.from(signature, 'base64'))\n : signature;\n this.attribute_map = {\n logic: 'logic',\n args: 'args',\n multisigSignature: 'multisig-signature',\n signature: 'signature',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['logic'] === 'undefined')\n throw new Error(`Response is missing required field 'logic': ${data}`);\n return new TransactionSignatureLogicsig({\n logic: data['logic'],\n args: data['args'],\n multisigSignature: typeof data['multisig-signature'] !== 'undefined'\n ? TransactionSignatureMultisig.from_obj_for_encoding(data['multisig-signature'])\n : undefined,\n signature: data['signature'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * (msig) structure holding multiple subsignatures.\n * Definition:\n * crypto/multisig.go : MultisigSig\n */\nexport class TransactionSignatureMultisig extends BaseModel {\n /**\n * Creates a new `TransactionSignatureMultisig` object.\n * @param subsignature - (subsig) holds pairs of public key and signatures.\n * @param threshold - (thr)\n * @param version - (v)\n */\n constructor({ subsignature, threshold, version, }) {\n super();\n this.subsignature = subsignature;\n this.threshold = threshold;\n this.version = version;\n this.attribute_map = {\n subsignature: 'subsignature',\n threshold: 'threshold',\n version: 'version',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new TransactionSignatureMultisig({\n subsignature: typeof data['subsignature'] !== 'undefined'\n ? data['subsignature'].map(TransactionSignatureMultisigSubsignature.from_obj_for_encoding)\n : undefined,\n threshold: data['threshold'],\n version: data['version'],\n });\n /* eslint-enable dot-notation */\n }\n}\nexport class TransactionSignatureMultisigSubsignature extends BaseModel {\n /**\n * Creates a new `TransactionSignatureMultisigSubsignature` object.\n * @param publicKey - (pk)\n * @param signature - (s)\n */\n constructor({ publicKey, signature, }) {\n super();\n this.publicKey =\n typeof publicKey === 'string'\n ? new Uint8Array(Buffer.from(publicKey, 'base64'))\n : publicKey;\n this.signature =\n typeof signature === 'string'\n ? new Uint8Array(Buffer.from(signature, 'base64'))\n : signature;\n this.attribute_map = {\n publicKey: 'public-key',\n signature: 'signature',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new TransactionSignatureMultisigSubsignature({\n publicKey: data['public-key'],\n signature: data['signature'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n * Fields for a state proof transaction.\n * Definition:\n * data/transactions/stateproof.go : StateProofTxnFields\n */\nexport class TransactionStateProof extends BaseModel {\n /**\n * Creates a new `TransactionStateProof` object.\n * @param message - (spmsg)\n * @param stateProof - (sp) represents a state proof.\n * Definition:\n * crypto/stateproof/structs.go : StateProof\n * @param stateProofType - (sptype) Type of the state proof. Integer representing an entry defined in\n * protocol/stateproof.go\n */\n constructor({ message, stateProof, stateProofType, }) {\n super();\n this.message = message;\n this.stateProof = stateProof;\n this.stateProofType = stateProofType;\n this.attribute_map = {\n message: 'message',\n stateProof: 'state-proof',\n stateProofType: 'state-proof-type',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n return new TransactionStateProof({\n message: typeof data['message'] !== 'undefined'\n ? IndexerStateProofMessage.from_obj_for_encoding(data['message'])\n : undefined,\n stateProof: typeof data['state-proof'] !== 'undefined'\n ? StateProofFields.from_obj_for_encoding(data['state-proof'])\n : undefined,\n stateProofType: data['state-proof-type'],\n });\n /* eslint-enable dot-notation */\n }\n}\n/**\n *\n */\nexport class TransactionsResponse extends BaseModel {\n /**\n * Creates a new `TransactionsResponse` object.\n * @param currentRound - Round at which the results were computed.\n * @param transactions -\n * @param nextToken - Used for pagination, when making another request provide this token with the\n * next parameter.\n */\n constructor({ currentRound, transactions, nextToken, }) {\n super();\n this.currentRound = currentRound;\n this.transactions = transactions;\n this.nextToken = nextToken;\n this.attribute_map = {\n currentRound: 'current-round',\n transactions: 'transactions',\n nextToken: 'next-token',\n };\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(data) {\n /* eslint-disable dot-notation */\n if (typeof data['current-round'] === 'undefined')\n throw new Error(`Response is missing required field 'current-round': ${data}`);\n if (!Array.isArray(data['transactions']))\n throw new Error(`Response is missing required array field 'transactions': ${data}`);\n return new TransactionsResponse({\n currentRound: data['current-round'],\n transactions: data['transactions'].map(Transaction.from_obj_for_encoding),\n nextToken: data['next-token'],\n });\n /* eslint-enable dot-notation */\n }\n}\n//# sourceMappingURL=types.js.map","import { Buffer } from 'buffer';\nimport JSONRequest from '../jsonrequest';\nimport { Box } from './models/types';\nexport default class LookupApplicationBoxByIDandName extends JSONRequest {\n /**\n * Returns information about indexed application boxes.\n *\n * #### Example\n * ```typescript\n * const boxName = Buffer.from(\"foo\");\n * const boxResponse = await indexerClient\n * .LookupApplicationBoxByIDandName(1234, boxName)\n * .do();\n * const boxValue = boxResponse.value;\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idbox)\n * @oaram index - application index.\n * @category GET\n */\n constructor(c, intDecoding, index, boxName) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n // Encode query in base64 format and append the encoding prefix.\n const encodedName = Buffer.from(boxName).toString('base64');\n this.query.name = encodeURI(`b64:${encodedName}`);\n }\n /**\n * @returns `/v2/applications/${index}/box`\n */\n path() {\n return `/v2/applications/${this.index}/box`;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return Box.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=lookupApplicationBoxByIDandName.js.map","import JSONRequest from '../jsonrequest';\n/**\n * Returns information about indexed accounts.\n *\n * #### Example\n * ```typescript\n * const accounts = await indexerClient.searchAccounts().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accounts)\n * @category GET\n */\nexport default class SearchAccounts extends JSONRequest {\n /**\n * @returns `/v2/accounts`\n */\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/accounts';\n }\n /**\n * Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.\n *\n * #### Example 1\n * ```typescript\n * const minBalance = 300000;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetID = 163650;\n * const minBalance = 300000;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .assetID(assetID)\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n * @remarks\n * If you are looking for accounts with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude accounts with a 0 amount.\n *\n * @param greater\n * @category query\n */\n currencyGreaterThan(greater) {\n // We convert the following to a string for now to correctly include zero values in request parameters.\n this.query['currency-greater-than'] = greater.toString();\n return this;\n }\n /**\n * Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.\n *\n * #### Example 1\n * ```typescript\n * const maxBalance = 500000;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetID = 163650;\n * const maxBalance = 500000;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .assetID(assetID)\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * @param lesser\n * @category query\n */\n currencyLessThan(lesser) {\n this.query['currency-less-than'] = lesser;\n return this;\n }\n /**\n * Maximum number of results to return.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Asset ID to filter with.\n *\n * #### Example\n * ```typescript\n * const assetID = 163650;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .assetID(assetID)\n * .do();\n * ```\n *\n * @param id\n * @category query\n */\n assetID(id) {\n this.query['asset-id'] = id;\n return this;\n }\n /**\n * The next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n *\n * const accountsPage1 = await indexerClient\n * .searchAccounts()\n * .limit(maxResults)\n * .do();\n *\n * const accountsPage2 = await indexerClient\n * .searchAccounts()\n * .limit(maxResults)\n * .nextToken(accountsPage1[\"next-token\"])\n * .do();\n * ```\n *\n * @param nextToken - provided by the previous results\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Include results for the specified round.\n *\n * #### Example\n * ```typescript\n * const targetBlock = 18309917;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .round(targetBlock)\n * .do();\n * ```\n * @remarks For performance reasons, this parameter may be disabled on some configurations.\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Include accounts that use this spending key.\n *\n * #### Example\n * ```typescript\n * const authAddr = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accounts = await indexerClient\n * .searchAccounts()\n * .authAddr(authAddr)\n * .do();\n * ```\n *\n * @param authAddr\n */\n authAddr(authAddr) {\n this.query['auth-addr'] = authAddr;\n return this;\n }\n /**\n * Filter for this application.\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .applicationID(appId)\n * .do();\n * ```\n *\n * @param applicationID\n * @category query\n */\n applicationID(applicationID) {\n this.query['application-id'] = applicationID;\n return this;\n }\n /**\n * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example 1\n * ```typescript\n * const assetId = 163650;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetId = 163650;\n * const accounts = await indexerClient\n * .searchAccounts()\n * .includeAll()\n * .do();\n * ```\n *\n * @param value - default true when called without passing a value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n /**\n * Exclude additional items such as asset holdings, application local data stored for this account, asset parameters created by this account, and application parameters created by this account.\n *\n * #### Example 1\n * ```typescript\n * const accounts = await indexerClient\n * .searchAccounts()\n * .exclude(\"all\")\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const accounts = await indexerClient\n * .searchAccounts()\n * .exclude(\"assets,created-assets\")\n * .do();\n * ```\n * @remarks By default, it behaves as exclude=none\n * @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none`\n * @category query\n */\n exclude(exclude) {\n this.query.exclude = exclude;\n return this;\n }\n}\n//# sourceMappingURL=searchAccounts.js.map","import JSONRequest from '../jsonrequest';\nimport { base64StringFunnel } from './lookupAccountTransactions';\n/**\n * Returns information about indexed transactions.\n *\n * #### Example\n * ```typescript\n * const txns = await indexerClient.searchForTransactions().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactions)\n * @category GET\n */\nexport default class SearchForTransactions extends JSONRequest {\n /**\n * @returns `/v2/transactions`\n */\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/transactions';\n }\n /**\n * Specifies a prefix which must be contained in the note field.\n *\n * #### Example\n * ```typescript\n * const notePrefixBase64Encoded = \"Y3JlYXRl\";\n * const txns = await indexerClient\n * .searchForTransactions()\n * .notePrefix(notePrefixBase64Encoded)\n * .do();\n * ```\n *\n * @param prefix - base64 string or uint8array\n * @category query\n */\n notePrefix(prefix) {\n this.query['note-prefix'] = base64StringFunnel(prefix);\n return this;\n }\n /**\n * Type of transaction to filter with.\n *\n * #### Example\n * ```typescript\n * const txns = await indexerClient\n * .searchForTransactions()\n * .txType(\"keyreg\")\n * .do();\n * ```\n *\n * @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`, `stpf`\n * @category query\n */\n txType(type) {\n this.query['tx-type'] = type;\n return this;\n }\n /**\n * Type of signature to filter with.\n * - sig: Standard\n * - msig: MultiSig\n * - lsig: LogicSig\n *\n * #### Example\n * ```typescript\n * const txns = await indexerClient\n * .searchForTransactions()\n * .sigType(\"sig\")\n * .do();\n * ```\n *\n * @param type - one of `sig`, `msig`, `lsig`\n * @category query\n */\n sigType(type) {\n this.query['sig-type'] = type;\n return this;\n }\n /**\n * Lookup the specific transaction by ID.\n *\n * #### Example\n * ```typescript\n * const txId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const txns = await indexerClient\n * .searchForTransactions()\n * .txid(txId)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupTransactionByID(txnId).do()`\n * @param txid\n * @category query\n */\n txid(txid) {\n this.query.txid = txid;\n return this;\n }\n /**\n * Include results for the specified round.\n *\n * #### Example\n * ```typescript\n * const targetBlock = 18309917;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .round(targetBlock)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupBlock(targetBlock).do()`\n * @param round\n * @category query\n */\n round(round) {\n this.query.round = round;\n return this;\n }\n /**\n * Include results at or after the specified min-round.\n *\n * #### Example\n * ```typescript\n * const minRound = 18309917;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .minRound(minRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n minRound(round) {\n this.query['min-round'] = round;\n return this;\n }\n /**\n * Include results at or before the specified max-round.\n *\n * #### Example\n * ```typescript\n * const maxRound = 18309917;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .maxRound(maxRound)\n * .do();\n * ```\n *\n * @param round\n * @category query\n */\n maxRound(round) {\n this.query['max-round'] = round;\n return this;\n }\n /**\n * Asset ID to filter with.\n *\n * #### Example\n * ```typescript\n * const assetID = 163650;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .assetID(assetID)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupAssetTransactions(assetId).do()`\n * @param id\n * @category query\n */\n assetID(id) {\n this.query['asset-id'] = id;\n return this;\n }\n /**\n * Maximum number of results to return.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Include results before the given time.\n *\n * #### Example\n * ```typescript\n * const beforeTime = \"2022-02-02T20:20:22.02Z\";\n * const txns = await indexerClient\n * .searchForTransactions()\n * .beforeTime(beforeTime)\n * .do();\n * ```\n *\n * @param before - rfc3339 string\n * @category query\n */\n beforeTime(before) {\n this.query['before-time'] = before;\n return this;\n }\n /**\n * Include results after the given time.\n *\n * #### Example\n * ```typescript\n * const afterTime = \"2022-10-21T00:00:11.55Z\";\n * const txns = await indexerClient\n * .searchForTransactions()\n * .afterTime(afterTime)\n * .do();\n * ```\n *\n * @param after - rfc3339 string\n * @category query\n */\n afterTime(after) {\n this.query['after-time'] = after;\n return this;\n }\n /**\n * Combined with address, defines what address to filter on, as string.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const role = \"freeze-target\";\n * const txns = await indexerClient\n * .searchForTransactions()\n * .address(address)\n * .addressRole(role)\n * .do();\n * ```\n *\n * @param role - one of `sender`, `receiver`, `freeze-target`\n * @category query\n */\n addressRole(role) {\n this.query['address-role'] = role;\n return this;\n }\n /**\n * Only include transactions with this address in one of the transaction fields.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const txns = await indexerClient\n * .searchForTransactions()\n * .address(address)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupAccountTransactions(address).do()`\n * @param address\n * @category query\n */\n address(address) {\n this.query.address = address;\n return this;\n }\n /**\n * Whether or not to consider the `close-to` field as a receiver when filtering transactions, as bool. Set to `true` to ignore `close-to`.\n *\n * #### Example\n * ```typescript\n * const txns = await indexerClient\n * .searchForTransactions()\n * .excludeCloseTo(true)\n * .do();\n * ```\n *\n * @param exclude\n * @category query\n */\n excludeCloseTo(exclude) {\n this.query['exclude-close-to'] = exclude;\n return this;\n }\n /**\n * The next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 25;\n *\n * const txnsPage1 = await indexerClient\n * .searchForTransactions()\n * .limit(maxResults)\n * .do();\n *\n * const txnsPage2 = await indexerClient\n * .searchForTransactions()\n * .limit(maxResults)\n * .nextToken(txnsPage1[\"next-token\"])\n * .do();\n * ```\n *\n * @param nextToken - provided by the previous results\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Whether or not to include rekeying transactions.\n *\n * #### Example\n * ```typescript\n * const txns = await indexerClient\n * .searchForTransactions()\n * .rekeyTo(false)\n * .do();\n * ```\n *\n * @param rekeyTo\n * @category query\n */\n rekeyTo(rekeyTo) {\n this.query['rekey-to'] = rekeyTo;\n return this;\n }\n /**\n * Filter for this application.\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .applicationID(appId)\n * .do();\n * ```\n *\n * @param applicationID\n * @category query\n */\n applicationID(applicationID) {\n this.query['application-id'] = applicationID;\n return this;\n }\n /**\n * Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.\n *\n * #### Example 1\n * ```typescript\n * const minBalance = 300000;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetID = 163650;\n * const minBalance = 300000;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .assetID(assetID)\n * .currencyGreaterThan(minBalance - 1)\n * .do();\n * ```\n *\n * @param greater\n * @category query\n */\n currencyGreaterThan(greater) {\n // We convert the following to a string for now to correctly include zero values in request parameters.\n this.query['currency-greater-than'] = greater.toString();\n return this;\n }\n /**\n * Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.\n *\n * #### Example 1\n * ```typescript\n * const maxBalance = 500000;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assetID = 163650;\n * const maxBalance = 500000;\n * const txns = await indexerClient\n * .searchForTransactions()\n * .assetID(assetID)\n * .currencyLessThan(maxBalance + 1)\n * .do();\n * ```\n *\n * @param lesser\n * @category query\n */\n currencyLessThan(lesser) {\n this.query['currency-less-than'] = lesser;\n return this;\n }\n}\n//# sourceMappingURL=searchForTransactions.js.map","import JSONRequest from '../jsonrequest';\n/**\n * Returns information about indexed assets.\n *\n * #### Example\n * ```typescript\n * const assets = await indexerClient.searchForAssets().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assets)\n * @category GET\n */\nexport default class SearchForAssets extends JSONRequest {\n /**\n * @returns `/v2/assets`\n */\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/assets';\n }\n /**\n * Limit results for pagination.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const assets = await indexerClient\n * .searchForAssets()\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Filter just assets with the given creator address.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const assets = await indexerClient\n * .searchForAssets()\n * .creator(address)\n * .do();\n * ```\n *\n * @param creator\n * @category query\n */\n creator(creator) {\n this.query.creator = creator;\n return this;\n }\n /**\n * Filter just assets with the given name.\n *\n * #### Example\n * ```typescript\n * const name = \"Test Token\";\n * const assets = await indexerClient\n * .searchForAssets()\n * .name(name)\n * .do();\n * ```\n *\n * @param name\n * @category query\n */\n name(name) {\n this.query.name = name;\n return this;\n }\n /**\n * Filter just assets with the given unit.\n *\n * #### Example\n * ```typescript\n * const unit = \"test\";\n * const assets = await indexerClient\n * .searchForAssets()\n * .unit(unit)\n * .do();\n * ```\n *\n * @param unit\n * @category query\n */\n unit(unit) {\n this.query.unit = unit;\n return this;\n }\n /**\n * Asset ID for filter, as int.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assets = await indexerClient\n * .searchForAssets()\n * .index(assetId)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupAssetByID(assetId).do();`\n * @param index\n * @category query\n */\n index(index) {\n this.query['asset-id'] = index;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n *\n * const assetsPage1 = await indexerClient\n * .searchForAssets()\n * .limit(maxResults)\n * .do();\n *\n * const assetsPage2 = await indexerClient\n * .searchForAssets()\n * .limit(maxResults)\n * .nextToken(assetsPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(nextToken) {\n this.query.next = nextToken;\n return this;\n }\n /**\n * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example 1\n * ```typescript\n * const assets = await indexerClient\n * .searchForAssets()\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const assets = await indexerClient\n * .searchForAssets()\n * .includeAll()\n * .do();\n * ```\n *\n * @param value - default true when called without passing a value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n}\n//# sourceMappingURL=searchForAssets.js.map","import JSONRequest from '../jsonrequest';\n/**\n * Returns information about indexed applications.\n *\n * #### Example\n * ```typescript\n * const apps = await indexerClient.searchForApplications().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applications)\n * @category GET\n */\nexport default class SearchForApplications extends JSONRequest {\n /**\n * @returns `/v2/applications`\n */\n // eslint-disable-next-line class-methods-use-this\n path() {\n return '/v2/applications';\n }\n /**\n * Application ID for filter, as int\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const apps = await indexerClient\n * .searchForApplications()\n * .index(appId)\n * .do();\n * ```\n * @remarks Alternatively, use `indexerClient.lookupApplications(appId).do()`\n * @param index\n * @category query\n */\n index(index) {\n this.query['application-id'] = index;\n return this;\n }\n /**\n * Creator for filter, as string\n *\n * #### Example\n * ```typescript\n * const creator = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const apps = await indexerClient\n * .searchForApplications()\n * .creator(creator)\n * .do();\n * ```\n * @param creator\n * @category query\n */\n creator(creator) {\n this.query.creator = creator;\n return this;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n *\n * const appsPage1 = await indexerClient\n * .searchForApplications()\n * .limit(maxResults)\n * .do();\n *\n * const appsPage2 = await indexerClient\n * .searchForApplications()\n * .limit(maxResults)\n * .nextToken(appsPage1[\"next-token\"])\n * .do();\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(next) {\n this.query.next = next;\n return this;\n }\n /**\n * Limit results for pagination.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const apps = await indexerClient\n * .searchForApplications()\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n /**\n * Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates\n *\n * #### Example 1\n * ```typescript\n * const apps = await indexerClient\n * .searchForApplications()\n * .includeAll(false)\n * .do();\n * ```\n *\n * #### Example 2\n * ```typescript\n * const apps = await indexerClient\n * .searchForApplications()\n * .includeAll()\n * .do();\n * ```\n *\n * @param value - default true when called without passing a value\n * @category query\n */\n includeAll(value = true) {\n this.query['include-all'] = value;\n return this;\n }\n}\n//# sourceMappingURL=searchForApplications.js.map","import JSONRequest from '../jsonrequest';\nimport { BoxesResponse } from './models/types';\nexport default class SearchForApplicationBoxes extends JSONRequest {\n /**\n * Returns information about indexed application boxes.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const appID = 1234;\n *\n * const responsePage1 = await indexerClient\n * .searchForApplicationBoxes(appID)\n * .limit(maxResults)\n * .do();\n * const boxNamesPage1 = responsePage1.boxes.map(box => box.name);\n *\n * const responsePage2 = await indexerClient\n * .searchForApplicationBoxes(appID)\n * .limit(maxResults)\n * .nextToken(responsePage1.nextToken)\n * .do();\n * const boxNamesPage2 = responsePage2.boxes.map(box => box.name);\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idboxes)\n * @oaram index - application index.\n * @category GET\n */\n constructor(c, intDecoding, index) {\n super(c, intDecoding);\n this.index = index;\n this.index = index;\n }\n /**\n * @returns `/v2/applications/${index}/boxes`\n */\n path() {\n return `/v2/applications/${this.index}/boxes`;\n }\n /**\n * Specify the next page of results.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const appID = 1234;\n *\n * const responsePage1 = await indexerClient\n * .searchForApplicationBoxes(appID)\n * .limit(maxResults)\n * .do();\n * const boxNamesPage1 = responsePage1.boxes.map(box => box.name);\n *\n * const responsePage2 = await indexerClient\n * .searchForApplicationBoxes(appID)\n * .limit(maxResults)\n * .nextToken(responsePage1.nextToken)\n * .do();\n * const boxNamesPage2 = responsePage2.boxes.map(box => box.name);\n * ```\n * @param nextToken - provided by the previous results.\n * @category query\n */\n nextToken(next) {\n this.query.next = next;\n return this;\n }\n /**\n * Limit results for pagination.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const boxesResponse = await indexerClient\n * .searchForApplicationBoxes(1234)\n * .limit(maxResults)\n * .do();\n * ```\n *\n * @param limit - maximum number of results to return.\n * @category query\n */\n limit(limit) {\n this.query.limit = limit;\n return this;\n }\n // eslint-disable-next-line class-methods-use-this\n prepare(body) {\n return BoxesResponse.from_obj_for_encoding(body);\n }\n}\n//# sourceMappingURL=searchForApplicationBoxes.js.map","import ServiceClient from '../serviceClient';\nimport MakeHealthCheck from './makeHealthCheck';\nimport LookupAssetBalances from './lookupAssetBalances';\nimport LookupAssetTransactions from './lookupAssetTransactions';\nimport LookupAccountTransactions from './lookupAccountTransactions';\nimport LookupBlock from './lookupBlock';\nimport LookupTransactionByID from './lookupTransactionByID';\nimport LookupAccountByID from './lookupAccountByID';\nimport LookupAccountAssets from './lookupAccountAssets';\nimport LookupAccountCreatedAssets from './lookupAccountCreatedAssets';\nimport LookupAccountAppLocalStates from './lookupAccountAppLocalStates';\nimport LookupAccountCreatedApplications from './lookupAccountCreatedApplications';\nimport LookupAssetByID from './lookupAssetByID';\nimport LookupApplications from './lookupApplications';\nimport LookupApplicationLogs from './lookupApplicationLogs';\nimport LookupApplicationBoxByIDandName from './lookupApplicationBoxByIDandName';\nimport SearchAccounts from './searchAccounts';\nimport SearchForTransactions from './searchForTransactions';\nimport SearchForAssets from './searchForAssets';\nimport SearchForApplications from './searchForApplications';\nimport SearchForApplicationBoxes from './searchForApplicationBoxes';\n/**\n * The Indexer provides a REST API interface of API calls to support searching the Algorand Blockchain.\n *\n * The Indexer REST APIs retrieve the blockchain data from a PostgreSQL compatible database that must be populated.\n *\n * This database is populated using the same indexer instance or a separate instance of the indexer which must connect to the algod process of a running Algorand node to read block data.\n *\n * This node must also be an Archival node to make searching the entire blockchain possible.\n *\n * #### Relevant Information\n * [Learn more about Indexer](https://developer.algorand.org/docs/get-details/indexer/)\n *\n * [Run Indexer in Postman OAS3](https://developer.algorand.org/docs/rest-apis/restendpoints/#algod-indexer-and-kmd-rest-endpoints)\n */\nexport default class IndexerClient extends ServiceClient {\n /**\n * Create an IndexerClient from\n * * either a token, baseServer, port, and optional headers\n * * or a base client server for interoperability with external dApp wallets\n *\n * #### Example\n * ```typescript\n * const token = \"\";\n * const server = \"http://localhost\";\n * const port = 8980;\n * const indexerClient = new algosdk.Indexer(token, server, port);\n * ```\n * @remarks\n * The above configuration is for a sandbox private network.\n * For applications on production, you are encouraged to run your own node with indexer, or use an Algorand REST API provider with a dedicated API key.\n *\n * @param tokenOrBaseClient - The API token for the Indexer API\n * @param baseServer - REST endpoint\n * @param port - Port number if specifically configured by the server\n * @param headers - Optional headers\n */\n constructor(tokenOrBaseClient, baseServer = 'http://127.0.0.1', port = 8080, headers = {}) {\n super('X-Indexer-API-Token', tokenOrBaseClient, baseServer, port, headers);\n }\n /**\n * Returns the health object for the service.\n * Returns 200 if healthy.\n *\n * #### Example\n * ```typescript\n * const health = await indexerClient.makeHealthCheck().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-health)\n * @category GET\n */\n makeHealthCheck() {\n return new MakeHealthCheck(this.c, this.intDecoding);\n }\n /**\n * Returns the list of accounts who hold the given asset and their balance.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetBalances = await indexerClient.lookupAssetBalances(assetId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idbalances)\n * @param index - The asset ID to look up.\n * @category GET\n */\n lookupAssetBalances(index) {\n return new LookupAssetBalances(this.c, this.intDecoding, index);\n }\n /**\n * Returns transactions relating to the given asset.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetTxns = await indexerClient.lookupAssetTransactions(assetId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idtransactions)\n * @param index - The asset ID to look up.\n * @category GET\n */\n lookupAssetTransactions(index) {\n return new LookupAssetTransactions(this.c, this.intDecoding, index);\n }\n /**\n * Returns transactions relating to the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountTxns = await indexerClient.lookupAccountTransactions(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idtransactions)\n * @param account - The address of the account.\n * @category GET\n */\n lookupAccountTransactions(account) {\n return new LookupAccountTransactions(this.c, this.intDecoding, account);\n }\n /**\n * Returns the block for the passed round.\n *\n * #### Example\n * ```typescript\n * const targetBlock = 18309917;\n * const blockInfo = await indexerClient.lookupBlock(targetBlock).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2blocksround-number)\n * @param round - The number of the round to look up.\n * @category GET\n */\n lookupBlock(round) {\n return new LookupBlock(this.c, this.intDecoding, round);\n }\n /**\n * Returns information about the given transaction.\n *\n * #### Example\n * ```typescript\n * const txnId = \"MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA\";\n * const txnInfo = await indexerClient.lookupTransactionByID(txnId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactionstxid)\n * @param txID - The ID of the transaction to look up.\n * @category GET\n */\n lookupTransactionByID(txID) {\n return new LookupTransactionByID(this.c, this.intDecoding, txID);\n }\n /**\n * Returns information about the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountInfo = await indexerClient.lookupAccountByID(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)\n * @param account - The address of the account to look up.\n * @category GET\n */\n lookupAccountByID(account) {\n return new LookupAccountByID(this.c, this.intDecoding, account);\n }\n /**\n * Returns asset about the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAssets = await indexerClient.lookupAccountAssets(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idassets)\n * @param account - The address of the account to look up.\n * @category GET\n */\n lookupAccountAssets(account) {\n return new LookupAccountAssets(this.c, this.intDecoding, account);\n }\n /**\n * Returns asset information created by the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountCreatedAssets = await indexerClient.lookupAccountCreatedAssets(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-assets)\n * @param account - The address of the account to look up.\n * @category GET\n */\n lookupAccountCreatedAssets(account) {\n return new LookupAccountCreatedAssets(this.c, this.intDecoding, account);\n }\n /**\n * Returns application local state about the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountAppLocalStates = await indexerClient.lookupAccountAppLocalStates(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idapps-local-state)\n * @param account - The address of the account to look up.\n * @category GET\n */\n lookupAccountAppLocalStates(account) {\n return new LookupAccountAppLocalStates(this.c, this.intDecoding, account);\n }\n /**\n * Returns application information created by the given account.\n *\n * #### Example\n * ```typescript\n * const address = \"XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA\";\n * const accountCreatedApps = await indexerClient.lookupAccountCreatedApplications(address).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-applications)\n * @param account - The address of the account to look up.\n * @category GET\n */\n lookupAccountCreatedApplications(account) {\n return new LookupAccountCreatedApplications(this.c, this.intDecoding, account);\n }\n /**\n * Returns information about the passed asset.\n *\n * #### Example\n * ```typescript\n * const assetId = 163650;\n * const assetInfo = await indexerClient.lookupAssetByID(assetId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-id)\n * @param index - The ID of the asset ot look up.\n * @category GET\n */\n lookupAssetByID(index) {\n return new LookupAssetByID(this.c, this.intDecoding, index);\n }\n /**\n * Returns information about the passed application.\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const appInfo = await indexerClient.lookupApplications(appId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-id)\n * @param index - The ID of the application to look up.\n * @category GET\n */\n lookupApplications(index) {\n return new LookupApplications(this.c, this.intDecoding, index);\n }\n /**\n * Returns log messages generated by the passed in application.\n *\n * #### Example\n * ```typescript\n * const appId = 60553466;\n * const appLogs = await indexerClient.lookupApplicationLogs(appId).do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idlogs)\n * @param appID - The ID of the application which generated the logs.\n * @category GET\n */\n lookupApplicationLogs(appID) {\n return new LookupApplicationLogs(this.c, this.intDecoding, appID);\n }\n /**\n * Returns information about indexed accounts.\n *\n * #### Example\n * ```typescript\n * const accounts = await indexerClient.searchAccounts().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accounts)\n * @category GET\n */\n searchAccounts() {\n return new SearchAccounts(this.c, this.intDecoding);\n }\n /**\n * Returns information about indexed transactions.\n *\n * #### Example\n * ```typescript\n * const txns = await indexerClient.searchForTransactions().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactions)\n * @category GET\n */\n searchForTransactions() {\n return new SearchForTransactions(this.c, this.intDecoding);\n }\n /**\n * Returns information about indexed assets.\n *\n * #### Example\n * ```typescript\n * const assets = await indexerClient.searchForAssets().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assets)\n * @category GET\n */\n searchForAssets() {\n return new SearchForAssets(this.c, this.intDecoding);\n }\n /**\n * Returns information about indexed applications.\n *\n * #### Example\n * ```typescript\n * const apps = await indexerClient.searchForApplications().do();\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applications)\n * @category GET\n */\n searchForApplications() {\n return new SearchForApplications(this.c, this.intDecoding);\n }\n /**\n * Returns information about indexed application boxes.\n *\n * #### Example\n * ```typescript\n * const maxResults = 20;\n * const appID = 1234;\n *\n * const responsePage1 = await indexerClient\n * .searchForApplicationBoxes(appID)\n * .limit(maxResults)\n * .do();\n * const boxNamesPage1 = responsePage1.boxes.map(box => box.name);\n *\n * const responsePage2 = await indexerClient\n * .searchForApplicationBoxes(appID)\n * .limit(maxResults)\n * .nextToken(responsePage1.nextToken)\n * .do();\n * const boxNamesPage2 = responsePage2.boxes.map(box => box.name);\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idboxes)\n * @param appID - The ID of the application with boxes.\n * @category GET\n */\n searchForApplicationBoxes(appID) {\n return new SearchForApplicationBoxes(this.c, this.intDecoding, appID);\n }\n /**\n * Returns information about the application box given its name.\n *\n * #### Example\n * ```typescript\n * const boxName = Buffer.from(\"foo\");\n * const boxResponse = await indexerClient\n * .LookupApplicationBoxByIDandName(1234, boxName)\n * .do();\n * const boxValue = boxResponse.value;\n * ```\n *\n * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idbox)\n * @param appID - The ID of the application with boxes.\n * @category GET\n */\n lookupApplicationBoxByIDandName(appID, boxName) {\n return new LookupApplicationBoxByIDandName(this.c, this.intDecoding, appID, boxName);\n }\n}\n//# sourceMappingURL=indexer.js.map","/**\n * Wait until a transaction has been confirmed or rejected by the network, or\n * until 'waitRounds' number of rounds have passed.\n * @param client - An Algodv2 client\n * @param txid - The ID of the transaction to wait for.\n * @param waitRounds - The maximum number of rounds to wait for.\n * @returns A promise that, upon success, will resolve to the output of the\n * `pendingTransactionInformation` call for the confirmed transaction.\n */\nexport async function waitForConfirmation(client, txid, waitRounds) {\n // Wait until the transaction is confirmed or rejected, or until 'waitRounds'\n // number of rounds have passed.\n const status = await client.status().do();\n if (typeof status === 'undefined') {\n throw new Error('Unable to get node status');\n }\n const startRound = status['last-round'] + 1;\n let currentRound = startRound;\n /* eslint-disable no-await-in-loop */\n while (currentRound < startRound + waitRounds) {\n let poolError = false;\n try {\n const pendingInfo = await client.pendingTransactionInformation(txid).do();\n if (pendingInfo['confirmed-round']) {\n // Got the completed Transaction\n return pendingInfo;\n }\n if (pendingInfo['pool-error']) {\n // If there was a pool error, then the transaction has been rejected\n poolError = true;\n throw new Error(`Transaction Rejected: ${pendingInfo['pool-error']}`);\n }\n }\n catch (err) {\n // Ignore errors from PendingTransactionInformation, since it may return 404 if the algod\n // instance is behind a load balancer and the request goes to a different algod than the\n // one we submitted the transaction to\n if (poolError) {\n // Rethrow error only if it's because the transaction was rejected\n throw err;\n }\n }\n await client.statusAfterBlock(currentRound).do();\n currentRound += 1;\n }\n /* eslint-enable no-await-in-loop */\n throw new Error(`Transaction not confirmed after ${waitRounds} rounds`);\n}\n//# sourceMappingURL=wait.js.map","import { Buffer } from 'buffer';\n/**\n * bigIntToBytes converts a BigInt to a big-endian Uint8Array for encoding.\n * @param bi - The bigint to convert.\n * @param size - The size of the resulting byte array.\n * @returns A byte array containing the big-endian encoding of the input bigint\n */\nexport function bigIntToBytes(bi, size) {\n let hex = bi.toString(16);\n // Pad the hex with zeros so it matches the size in bytes\n if (hex.length !== size * 2) {\n hex = hex.padStart(size * 2, '0');\n }\n const byteArray = new Uint8Array(hex.length / 2);\n for (let i = 0, j = 0; i < hex.length / 2; i++, j += 2) {\n byteArray[i] = parseInt(hex.slice(j, j + 2), 16);\n }\n return byteArray;\n}\n/**\n * bytesToBigInt produces a bigint from a binary representation.\n *\n * @param bytes - The Uint8Array to convert.\n * @returns The bigint that was encoded in the input data.\n */\nexport function bytesToBigInt(bytes) {\n let res = BigInt(0);\n const buf = Buffer.from(bytes);\n for (let i = 0; i < bytes.length; i++) {\n res = BigInt(Number(buf.readUIntBE(i, 1))) + res * BigInt(256);\n }\n return res;\n}\n//# sourceMappingURL=bigint.js.map","import * as nacl from './nacl/naclWrappers';\nimport * as address from './encoding/address';\n/**\n * generateAccount returns a new Algorand address and its corresponding secret key\n */\nexport default function generateAccount() {\n const keys = nacl.keyPair();\n const encodedPk = address.encodeAddress(keys.publicKey);\n return { addr: encodedPk, sk: keys.secretKey };\n}\n//# sourceMappingURL=account.js.map","const english = [\n 'abandon',\n 'ability',\n 'able',\n 'about',\n 'above',\n 'absent',\n 'absorb',\n 'abstract',\n 'absurd',\n 'abuse',\n 'access',\n 'accident',\n 'account',\n 'accuse',\n 'achieve',\n 'acid',\n 'acoustic',\n 'acquire',\n 'across',\n 'act',\n 'action',\n 'actor',\n 'actress',\n 'actual',\n 'adapt',\n 'add',\n 'addict',\n 'address',\n 'adjust',\n 'admit',\n 'adult',\n 'advance',\n 'advice',\n 'aerobic',\n 'affair',\n 'afford',\n 'afraid',\n 'again',\n 'age',\n 'agent',\n 'agree',\n 'ahead',\n 'aim',\n 'air',\n 'airport',\n 'aisle',\n 'alarm',\n 'album',\n 'alcohol',\n 'alert',\n 'alien',\n 'all',\n 'alley',\n 'allow',\n 'almost',\n 'alone',\n 'alpha',\n 'already',\n 'also',\n 'alter',\n 'always',\n 'amateur',\n 'amazing',\n 'among',\n 'amount',\n 'amused',\n 'analyst',\n 'anchor',\n 'ancient',\n 'anger',\n 'angle',\n 'angry',\n 'animal',\n 'ankle',\n 'announce',\n 'annual',\n 'another',\n 'answer',\n 'antenna',\n 'antique',\n 'anxiety',\n 'any',\n 'apart',\n 'apology',\n 'appear',\n 'apple',\n 'approve',\n 'april',\n 'arch',\n 'arctic',\n 'area',\n 'arena',\n 'argue',\n 'arm',\n 'armed',\n 'armor',\n 'army',\n 'around',\n 'arrange',\n 'arrest',\n 'arrive',\n 'arrow',\n 'art',\n 'artefact',\n 'artist',\n 'artwork',\n 'ask',\n 'aspect',\n 'assault',\n 'asset',\n 'assist',\n 'assume',\n 'asthma',\n 'athlete',\n 'atom',\n 'attack',\n 'attend',\n 'attitude',\n 'attract',\n 'auction',\n 'audit',\n 'august',\n 'aunt',\n 'author',\n 'auto',\n 'autumn',\n 'average',\n 'avocado',\n 'avoid',\n 'awake',\n 'aware',\n 'away',\n 'awesome',\n 'awful',\n 'awkward',\n 'axis',\n 'baby',\n 'bachelor',\n 'bacon',\n 'badge',\n 'bag',\n 'balance',\n 'balcony',\n 'ball',\n 'bamboo',\n 'banana',\n 'banner',\n 'bar',\n 'barely',\n 'bargain',\n 'barrel',\n 'base',\n 'basic',\n 'basket',\n 'battle',\n 'beach',\n 'bean',\n 'beauty',\n 'because',\n 'become',\n 'beef',\n 'before',\n 'begin',\n 'behave',\n 'behind',\n 'believe',\n 'below',\n 'belt',\n 'bench',\n 'benefit',\n 'best',\n 'betray',\n 'better',\n 'between',\n 'beyond',\n 'bicycle',\n 'bid',\n 'bike',\n 'bind',\n 'biology',\n 'bird',\n 'birth',\n 'bitter',\n 'black',\n 'blade',\n 'blame',\n 'blanket',\n 'blast',\n 'bleak',\n 'bless',\n 'blind',\n 'blood',\n 'blossom',\n 'blouse',\n 'blue',\n 'blur',\n 'blush',\n 'board',\n 'boat',\n 'body',\n 'boil',\n 'bomb',\n 'bone',\n 'bonus',\n 'book',\n 'boost',\n 'border',\n 'boring',\n 'borrow',\n 'boss',\n 'bottom',\n 'bounce',\n 'box',\n 'boy',\n 'bracket',\n 'brain',\n 'brand',\n 'brass',\n 'brave',\n 'bread',\n 'breeze',\n 'brick',\n 'bridge',\n 'brief',\n 'bright',\n 'bring',\n 'brisk',\n 'broccoli',\n 'broken',\n 'bronze',\n 'broom',\n 'brother',\n 'brown',\n 'brush',\n 'bubble',\n 'buddy',\n 'budget',\n 'buffalo',\n 'build',\n 'bulb',\n 'bulk',\n 'bullet',\n 'bundle',\n 'bunker',\n 'burden',\n 'burger',\n 'burst',\n 'bus',\n 'business',\n 'busy',\n 'butter',\n 'buyer',\n 'buzz',\n 'cabbage',\n 'cabin',\n 'cable',\n 'cactus',\n 'cage',\n 'cake',\n 'call',\n 'calm',\n 'camera',\n 'camp',\n 'can',\n 'canal',\n 'cancel',\n 'candy',\n 'cannon',\n 'canoe',\n 'canvas',\n 'canyon',\n 'capable',\n 'capital',\n 'captain',\n 'car',\n 'carbon',\n 'card',\n 'cargo',\n 'carpet',\n 'carry',\n 'cart',\n 'case',\n 'cash',\n 'casino',\n 'castle',\n 'casual',\n 'cat',\n 'catalog',\n 'catch',\n 'category',\n 'cattle',\n 'caught',\n 'cause',\n 'caution',\n 'cave',\n 'ceiling',\n 'celery',\n 'cement',\n 'census',\n 'century',\n 'cereal',\n 'certain',\n 'chair',\n 'chalk',\n 'champion',\n 'change',\n 'chaos',\n 'chapter',\n 'charge',\n 'chase',\n 'chat',\n 'cheap',\n 'check',\n 'cheese',\n 'chef',\n 'cherry',\n 'chest',\n 'chicken',\n 'chief',\n 'child',\n 'chimney',\n 'choice',\n 'choose',\n 'chronic',\n 'chuckle',\n 'chunk',\n 'churn',\n 'cigar',\n 'cinnamon',\n 'circle',\n 'citizen',\n 'city',\n 'civil',\n 'claim',\n 'clap',\n 'clarify',\n 'claw',\n 'clay',\n 'clean',\n 'clerk',\n 'clever',\n 'click',\n 'client',\n 'cliff',\n 'climb',\n 'clinic',\n 'clip',\n 'clock',\n 'clog',\n 'close',\n 'cloth',\n 'cloud',\n 'clown',\n 'club',\n 'clump',\n 'cluster',\n 'clutch',\n 'coach',\n 'coast',\n 'coconut',\n 'code',\n 'coffee',\n 'coil',\n 'coin',\n 'collect',\n 'color',\n 'column',\n 'combine',\n 'come',\n 'comfort',\n 'comic',\n 'common',\n 'company',\n 'concert',\n 'conduct',\n 'confirm',\n 'congress',\n 'connect',\n 'consider',\n 'control',\n 'convince',\n 'cook',\n 'cool',\n 'copper',\n 'copy',\n 'coral',\n 'core',\n 'corn',\n 'correct',\n 'cost',\n 'cotton',\n 'couch',\n 'country',\n 'couple',\n 'course',\n 'cousin',\n 'cover',\n 'coyote',\n 'crack',\n 'cradle',\n 'craft',\n 'cram',\n 'crane',\n 'crash',\n 'crater',\n 'crawl',\n 'crazy',\n 'cream',\n 'credit',\n 'creek',\n 'crew',\n 'cricket',\n 'crime',\n 'crisp',\n 'critic',\n 'crop',\n 'cross',\n 'crouch',\n 'crowd',\n 'crucial',\n 'cruel',\n 'cruise',\n 'crumble',\n 'crunch',\n 'crush',\n 'cry',\n 'crystal',\n 'cube',\n 'culture',\n 'cup',\n 'cupboard',\n 'curious',\n 'current',\n 'curtain',\n 'curve',\n 'cushion',\n 'custom',\n 'cute',\n 'cycle',\n 'dad',\n 'damage',\n 'damp',\n 'dance',\n 'danger',\n 'daring',\n 'dash',\n 'daughter',\n 'dawn',\n 'day',\n 'deal',\n 'debate',\n 'debris',\n 'decade',\n 'december',\n 'decide',\n 'decline',\n 'decorate',\n 'decrease',\n 'deer',\n 'defense',\n 'define',\n 'defy',\n 'degree',\n 'delay',\n 'deliver',\n 'demand',\n 'demise',\n 'denial',\n 'dentist',\n 'deny',\n 'depart',\n 'depend',\n 'deposit',\n 'depth',\n 'deputy',\n 'derive',\n 'describe',\n 'desert',\n 'design',\n 'desk',\n 'despair',\n 'destroy',\n 'detail',\n 'detect',\n 'develop',\n 'device',\n 'devote',\n 'diagram',\n 'dial',\n 'diamond',\n 'diary',\n 'dice',\n 'diesel',\n 'diet',\n 'differ',\n 'digital',\n 'dignity',\n 'dilemma',\n 'dinner',\n 'dinosaur',\n 'direct',\n 'dirt',\n 'disagree',\n 'discover',\n 'disease',\n 'dish',\n 'dismiss',\n 'disorder',\n 'display',\n 'distance',\n 'divert',\n 'divide',\n 'divorce',\n 'dizzy',\n 'doctor',\n 'document',\n 'dog',\n 'doll',\n 'dolphin',\n 'domain',\n 'donate',\n 'donkey',\n 'donor',\n 'door',\n 'dose',\n 'double',\n 'dove',\n 'draft',\n 'dragon',\n 'drama',\n 'drastic',\n 'draw',\n 'dream',\n 'dress',\n 'drift',\n 'drill',\n 'drink',\n 'drip',\n 'drive',\n 'drop',\n 'drum',\n 'dry',\n 'duck',\n 'dumb',\n 'dune',\n 'during',\n 'dust',\n 'dutch',\n 'duty',\n 'dwarf',\n 'dynamic',\n 'eager',\n 'eagle',\n 'early',\n 'earn',\n 'earth',\n 'easily',\n 'east',\n 'easy',\n 'echo',\n 'ecology',\n 'economy',\n 'edge',\n 'edit',\n 'educate',\n 'effort',\n 'egg',\n 'eight',\n 'either',\n 'elbow',\n 'elder',\n 'electric',\n 'elegant',\n 'element',\n 'elephant',\n 'elevator',\n 'elite',\n 'else',\n 'embark',\n 'embody',\n 'embrace',\n 'emerge',\n 'emotion',\n 'employ',\n 'empower',\n 'empty',\n 'enable',\n 'enact',\n 'end',\n 'endless',\n 'endorse',\n 'enemy',\n 'energy',\n 'enforce',\n 'engage',\n 'engine',\n 'enhance',\n 'enjoy',\n 'enlist',\n 'enough',\n 'enrich',\n 'enroll',\n 'ensure',\n 'enter',\n 'entire',\n 'entry',\n 'envelope',\n 'episode',\n 'equal',\n 'equip',\n 'era',\n 'erase',\n 'erode',\n 'erosion',\n 'error',\n 'erupt',\n 'escape',\n 'essay',\n 'essence',\n 'estate',\n 'eternal',\n 'ethics',\n 'evidence',\n 'evil',\n 'evoke',\n 'evolve',\n 'exact',\n 'example',\n 'excess',\n 'exchange',\n 'excite',\n 'exclude',\n 'excuse',\n 'execute',\n 'exercise',\n 'exhaust',\n 'exhibit',\n 'exile',\n 'exist',\n 'exit',\n 'exotic',\n 'expand',\n 'expect',\n 'expire',\n 'explain',\n 'expose',\n 'express',\n 'extend',\n 'extra',\n 'eye',\n 'eyebrow',\n 'fabric',\n 'face',\n 'faculty',\n 'fade',\n 'faint',\n 'faith',\n 'fall',\n 'false',\n 'fame',\n 'family',\n 'famous',\n 'fan',\n 'fancy',\n 'fantasy',\n 'farm',\n 'fashion',\n 'fat',\n 'fatal',\n 'father',\n 'fatigue',\n 'fault',\n 'favorite',\n 'feature',\n 'february',\n 'federal',\n 'fee',\n 'feed',\n 'feel',\n 'female',\n 'fence',\n 'festival',\n 'fetch',\n 'fever',\n 'few',\n 'fiber',\n 'fiction',\n 'field',\n 'figure',\n 'file',\n 'film',\n 'filter',\n 'final',\n 'find',\n 'fine',\n 'finger',\n 'finish',\n 'fire',\n 'firm',\n 'first',\n 'fiscal',\n 'fish',\n 'fit',\n 'fitness',\n 'fix',\n 'flag',\n 'flame',\n 'flash',\n 'flat',\n 'flavor',\n 'flee',\n 'flight',\n 'flip',\n 'float',\n 'flock',\n 'floor',\n 'flower',\n 'fluid',\n 'flush',\n 'fly',\n 'foam',\n 'focus',\n 'fog',\n 'foil',\n 'fold',\n 'follow',\n 'food',\n 'foot',\n 'force',\n 'forest',\n 'forget',\n 'fork',\n 'fortune',\n 'forum',\n 'forward',\n 'fossil',\n 'foster',\n 'found',\n 'fox',\n 'fragile',\n 'frame',\n 'frequent',\n 'fresh',\n 'friend',\n 'fringe',\n 'frog',\n 'front',\n 'frost',\n 'frown',\n 'frozen',\n 'fruit',\n 'fuel',\n 'fun',\n 'funny',\n 'furnace',\n 'fury',\n 'future',\n 'gadget',\n 'gain',\n 'galaxy',\n 'gallery',\n 'game',\n 'gap',\n 'garage',\n 'garbage',\n 'garden',\n 'garlic',\n 'garment',\n 'gas',\n 'gasp',\n 'gate',\n 'gather',\n 'gauge',\n 'gaze',\n 'general',\n 'genius',\n 'genre',\n 'gentle',\n 'genuine',\n 'gesture',\n 'ghost',\n 'giant',\n 'gift',\n 'giggle',\n 'ginger',\n 'giraffe',\n 'girl',\n 'give',\n 'glad',\n 'glance',\n 'glare',\n 'glass',\n 'glide',\n 'glimpse',\n 'globe',\n 'gloom',\n 'glory',\n 'glove',\n 'glow',\n 'glue',\n 'goat',\n 'goddess',\n 'gold',\n 'good',\n 'goose',\n 'gorilla',\n 'gospel',\n 'gossip',\n 'govern',\n 'gown',\n 'grab',\n 'grace',\n 'grain',\n 'grant',\n 'grape',\n 'grass',\n 'gravity',\n 'great',\n 'green',\n 'grid',\n 'grief',\n 'grit',\n 'grocery',\n 'group',\n 'grow',\n 'grunt',\n 'guard',\n 'guess',\n 'guide',\n 'guilt',\n 'guitar',\n 'gun',\n 'gym',\n 'habit',\n 'hair',\n 'half',\n 'hammer',\n 'hamster',\n 'hand',\n 'happy',\n 'harbor',\n 'hard',\n 'harsh',\n 'harvest',\n 'hat',\n 'have',\n 'hawk',\n 'hazard',\n 'head',\n 'health',\n 'heart',\n 'heavy',\n 'hedgehog',\n 'height',\n 'hello',\n 'helmet',\n 'help',\n 'hen',\n 'hero',\n 'hidden',\n 'high',\n 'hill',\n 'hint',\n 'hip',\n 'hire',\n 'history',\n 'hobby',\n 'hockey',\n 'hold',\n 'hole',\n 'holiday',\n 'hollow',\n 'home',\n 'honey',\n 'hood',\n 'hope',\n 'horn',\n 'horror',\n 'horse',\n 'hospital',\n 'host',\n 'hotel',\n 'hour',\n 'hover',\n 'hub',\n 'huge',\n 'human',\n 'humble',\n 'humor',\n 'hundred',\n 'hungry',\n 'hunt',\n 'hurdle',\n 'hurry',\n 'hurt',\n 'husband',\n 'hybrid',\n 'ice',\n 'icon',\n 'idea',\n 'identify',\n 'idle',\n 'ignore',\n 'ill',\n 'illegal',\n 'illness',\n 'image',\n 'imitate',\n 'immense',\n 'immune',\n 'impact',\n 'impose',\n 'improve',\n 'impulse',\n 'inch',\n 'include',\n 'income',\n 'increase',\n 'index',\n 'indicate',\n 'indoor',\n 'industry',\n 'infant',\n 'inflict',\n 'inform',\n 'inhale',\n 'inherit',\n 'initial',\n 'inject',\n 'injury',\n 'inmate',\n 'inner',\n 'innocent',\n 'input',\n 'inquiry',\n 'insane',\n 'insect',\n 'inside',\n 'inspire',\n 'install',\n 'intact',\n 'interest',\n 'into',\n 'invest',\n 'invite',\n 'involve',\n 'iron',\n 'island',\n 'isolate',\n 'issue',\n 'item',\n 'ivory',\n 'jacket',\n 'jaguar',\n 'jar',\n 'jazz',\n 'jealous',\n 'jeans',\n 'jelly',\n 'jewel',\n 'job',\n 'join',\n 'joke',\n 'journey',\n 'joy',\n 'judge',\n 'juice',\n 'jump',\n 'jungle',\n 'junior',\n 'junk',\n 'just',\n 'kangaroo',\n 'keen',\n 'keep',\n 'ketchup',\n 'key',\n 'kick',\n 'kid',\n 'kidney',\n 'kind',\n 'kingdom',\n 'kiss',\n 'kit',\n 'kitchen',\n 'kite',\n 'kitten',\n 'kiwi',\n 'knee',\n 'knife',\n 'knock',\n 'know',\n 'lab',\n 'label',\n 'labor',\n 'ladder',\n 'lady',\n 'lake',\n 'lamp',\n 'language',\n 'laptop',\n 'large',\n 'later',\n 'latin',\n 'laugh',\n 'laundry',\n 'lava',\n 'law',\n 'lawn',\n 'lawsuit',\n 'layer',\n 'lazy',\n 'leader',\n 'leaf',\n 'learn',\n 'leave',\n 'lecture',\n 'left',\n 'leg',\n 'legal',\n 'legend',\n 'leisure',\n 'lemon',\n 'lend',\n 'length',\n 'lens',\n 'leopard',\n 'lesson',\n 'letter',\n 'level',\n 'liar',\n 'liberty',\n 'library',\n 'license',\n 'life',\n 'lift',\n 'light',\n 'like',\n 'limb',\n 'limit',\n 'link',\n 'lion',\n 'liquid',\n 'list',\n 'little',\n 'live',\n 'lizard',\n 'load',\n 'loan',\n 'lobster',\n 'local',\n 'lock',\n 'logic',\n 'lonely',\n 'long',\n 'loop',\n 'lottery',\n 'loud',\n 'lounge',\n 'love',\n 'loyal',\n 'lucky',\n 'luggage',\n 'lumber',\n 'lunar',\n 'lunch',\n 'luxury',\n 'lyrics',\n 'machine',\n 'mad',\n 'magic',\n 'magnet',\n 'maid',\n 'mail',\n 'main',\n 'major',\n 'make',\n 'mammal',\n 'man',\n 'manage',\n 'mandate',\n 'mango',\n 'mansion',\n 'manual',\n 'maple',\n 'marble',\n 'march',\n 'margin',\n 'marine',\n 'market',\n 'marriage',\n 'mask',\n 'mass',\n 'master',\n 'match',\n 'material',\n 'math',\n 'matrix',\n 'matter',\n 'maximum',\n 'maze',\n 'meadow',\n 'mean',\n 'measure',\n 'meat',\n 'mechanic',\n 'medal',\n 'media',\n 'melody',\n 'melt',\n 'member',\n 'memory',\n 'mention',\n 'menu',\n 'mercy',\n 'merge',\n 'merit',\n 'merry',\n 'mesh',\n 'message',\n 'metal',\n 'method',\n 'middle',\n 'midnight',\n 'milk',\n 'million',\n 'mimic',\n 'mind',\n 'minimum',\n 'minor',\n 'minute',\n 'miracle',\n 'mirror',\n 'misery',\n 'miss',\n 'mistake',\n 'mix',\n 'mixed',\n 'mixture',\n 'mobile',\n 'model',\n 'modify',\n 'mom',\n 'moment',\n 'monitor',\n 'monkey',\n 'monster',\n 'month',\n 'moon',\n 'moral',\n 'more',\n 'morning',\n 'mosquito',\n 'mother',\n 'motion',\n 'motor',\n 'mountain',\n 'mouse',\n 'move',\n 'movie',\n 'much',\n 'muffin',\n 'mule',\n 'multiply',\n 'muscle',\n 'museum',\n 'mushroom',\n 'music',\n 'must',\n 'mutual',\n 'myself',\n 'mystery',\n 'myth',\n 'naive',\n 'name',\n 'napkin',\n 'narrow',\n 'nasty',\n 'nation',\n 'nature',\n 'near',\n 'neck',\n 'need',\n 'negative',\n 'neglect',\n 'neither',\n 'nephew',\n 'nerve',\n 'nest',\n 'net',\n 'network',\n 'neutral',\n 'never',\n 'news',\n 'next',\n 'nice',\n 'night',\n 'noble',\n 'noise',\n 'nominee',\n 'noodle',\n 'normal',\n 'north',\n 'nose',\n 'notable',\n 'note',\n 'nothing',\n 'notice',\n 'novel',\n 'now',\n 'nuclear',\n 'number',\n 'nurse',\n 'nut',\n 'oak',\n 'obey',\n 'object',\n 'oblige',\n 'obscure',\n 'observe',\n 'obtain',\n 'obvious',\n 'occur',\n 'ocean',\n 'october',\n 'odor',\n 'off',\n 'offer',\n 'office',\n 'often',\n 'oil',\n 'okay',\n 'old',\n 'olive',\n 'olympic',\n 'omit',\n 'once',\n 'one',\n 'onion',\n 'online',\n 'only',\n 'open',\n 'opera',\n 'opinion',\n 'oppose',\n 'option',\n 'orange',\n 'orbit',\n 'orchard',\n 'order',\n 'ordinary',\n 'organ',\n 'orient',\n 'original',\n 'orphan',\n 'ostrich',\n 'other',\n 'outdoor',\n 'outer',\n 'output',\n 'outside',\n 'oval',\n 'oven',\n 'over',\n 'own',\n 'owner',\n 'oxygen',\n 'oyster',\n 'ozone',\n 'pact',\n 'paddle',\n 'page',\n 'pair',\n 'palace',\n 'palm',\n 'panda',\n 'panel',\n 'panic',\n 'panther',\n 'paper',\n 'parade',\n 'parent',\n 'park',\n 'parrot',\n 'party',\n 'pass',\n 'patch',\n 'path',\n 'patient',\n 'patrol',\n 'pattern',\n 'pause',\n 'pave',\n 'payment',\n 'peace',\n 'peanut',\n 'pear',\n 'peasant',\n 'pelican',\n 'pen',\n 'penalty',\n 'pencil',\n 'people',\n 'pepper',\n 'perfect',\n 'permit',\n 'person',\n 'pet',\n 'phone',\n 'photo',\n 'phrase',\n 'physical',\n 'piano',\n 'picnic',\n 'picture',\n 'piece',\n 'pig',\n 'pigeon',\n 'pill',\n 'pilot',\n 'pink',\n 'pioneer',\n 'pipe',\n 'pistol',\n 'pitch',\n 'pizza',\n 'place',\n 'planet',\n 'plastic',\n 'plate',\n 'play',\n 'please',\n 'pledge',\n 'pluck',\n 'plug',\n 'plunge',\n 'poem',\n 'poet',\n 'point',\n 'polar',\n 'pole',\n 'police',\n 'pond',\n 'pony',\n 'pool',\n 'popular',\n 'portion',\n 'position',\n 'possible',\n 'post',\n 'potato',\n 'pottery',\n 'poverty',\n 'powder',\n 'power',\n 'practice',\n 'praise',\n 'predict',\n 'prefer',\n 'prepare',\n 'present',\n 'pretty',\n 'prevent',\n 'price',\n 'pride',\n 'primary',\n 'print',\n 'priority',\n 'prison',\n 'private',\n 'prize',\n 'problem',\n 'process',\n 'produce',\n 'profit',\n 'program',\n 'project',\n 'promote',\n 'proof',\n 'property',\n 'prosper',\n 'protect',\n 'proud',\n 'provide',\n 'public',\n 'pudding',\n 'pull',\n 'pulp',\n 'pulse',\n 'pumpkin',\n 'punch',\n 'pupil',\n 'puppy',\n 'purchase',\n 'purity',\n 'purpose',\n 'purse',\n 'push',\n 'put',\n 'puzzle',\n 'pyramid',\n 'quality',\n 'quantum',\n 'quarter',\n 'question',\n 'quick',\n 'quit',\n 'quiz',\n 'quote',\n 'rabbit',\n 'raccoon',\n 'race',\n 'rack',\n 'radar',\n 'radio',\n 'rail',\n 'rain',\n 'raise',\n 'rally',\n 'ramp',\n 'ranch',\n 'random',\n 'range',\n 'rapid',\n 'rare',\n 'rate',\n 'rather',\n 'raven',\n 'raw',\n 'razor',\n 'ready',\n 'real',\n 'reason',\n 'rebel',\n 'rebuild',\n 'recall',\n 'receive',\n 'recipe',\n 'record',\n 'recycle',\n 'reduce',\n 'reflect',\n 'reform',\n 'refuse',\n 'region',\n 'regret',\n 'regular',\n 'reject',\n 'relax',\n 'release',\n 'relief',\n 'rely',\n 'remain',\n 'remember',\n 'remind',\n 'remove',\n 'render',\n 'renew',\n 'rent',\n 'reopen',\n 'repair',\n 'repeat',\n 'replace',\n 'report',\n 'require',\n 'rescue',\n 'resemble',\n 'resist',\n 'resource',\n 'response',\n 'result',\n 'retire',\n 'retreat',\n 'return',\n 'reunion',\n 'reveal',\n 'review',\n 'reward',\n 'rhythm',\n 'rib',\n 'ribbon',\n 'rice',\n 'rich',\n 'ride',\n 'ridge',\n 'rifle',\n 'right',\n 'rigid',\n 'ring',\n 'riot',\n 'ripple',\n 'risk',\n 'ritual',\n 'rival',\n 'river',\n 'road',\n 'roast',\n 'robot',\n 'robust',\n 'rocket',\n 'romance',\n 'roof',\n 'rookie',\n 'room',\n 'rose',\n 'rotate',\n 'rough',\n 'round',\n 'route',\n 'royal',\n 'rubber',\n 'rude',\n 'rug',\n 'rule',\n 'run',\n 'runway',\n 'rural',\n 'sad',\n 'saddle',\n 'sadness',\n 'safe',\n 'sail',\n 'salad',\n 'salmon',\n 'salon',\n 'salt',\n 'salute',\n 'same',\n 'sample',\n 'sand',\n 'satisfy',\n 'satoshi',\n 'sauce',\n 'sausage',\n 'save',\n 'say',\n 'scale',\n 'scan',\n 'scare',\n 'scatter',\n 'scene',\n 'scheme',\n 'school',\n 'science',\n 'scissors',\n 'scorpion',\n 'scout',\n 'scrap',\n 'screen',\n 'script',\n 'scrub',\n 'sea',\n 'search',\n 'season',\n 'seat',\n 'second',\n 'secret',\n 'section',\n 'security',\n 'seed',\n 'seek',\n 'segment',\n 'select',\n 'sell',\n 'seminar',\n 'senior',\n 'sense',\n 'sentence',\n 'series',\n 'service',\n 'session',\n 'settle',\n 'setup',\n 'seven',\n 'shadow',\n 'shaft',\n 'shallow',\n 'share',\n 'shed',\n 'shell',\n 'sheriff',\n 'shield',\n 'shift',\n 'shine',\n 'ship',\n 'shiver',\n 'shock',\n 'shoe',\n 'shoot',\n 'shop',\n 'short',\n 'shoulder',\n 'shove',\n 'shrimp',\n 'shrug',\n 'shuffle',\n 'shy',\n 'sibling',\n 'sick',\n 'side',\n 'siege',\n 'sight',\n 'sign',\n 'silent',\n 'silk',\n 'silly',\n 'silver',\n 'similar',\n 'simple',\n 'since',\n 'sing',\n 'siren',\n 'sister',\n 'situate',\n 'six',\n 'size',\n 'skate',\n 'sketch',\n 'ski',\n 'skill',\n 'skin',\n 'skirt',\n 'skull',\n 'slab',\n 'slam',\n 'sleep',\n 'slender',\n 'slice',\n 'slide',\n 'slight',\n 'slim',\n 'slogan',\n 'slot',\n 'slow',\n 'slush',\n 'small',\n 'smart',\n 'smile',\n 'smoke',\n 'smooth',\n 'snack',\n 'snake',\n 'snap',\n 'sniff',\n 'snow',\n 'soap',\n 'soccer',\n 'social',\n 'sock',\n 'soda',\n 'soft',\n 'solar',\n 'soldier',\n 'solid',\n 'solution',\n 'solve',\n 'someone',\n 'song',\n 'soon',\n 'sorry',\n 'sort',\n 'soul',\n 'sound',\n 'soup',\n 'source',\n 'south',\n 'space',\n 'spare',\n 'spatial',\n 'spawn',\n 'speak',\n 'special',\n 'speed',\n 'spell',\n 'spend',\n 'sphere',\n 'spice',\n 'spider',\n 'spike',\n 'spin',\n 'spirit',\n 'split',\n 'spoil',\n 'sponsor',\n 'spoon',\n 'sport',\n 'spot',\n 'spray',\n 'spread',\n 'spring',\n 'spy',\n 'square',\n 'squeeze',\n 'squirrel',\n 'stable',\n 'stadium',\n 'staff',\n 'stage',\n 'stairs',\n 'stamp',\n 'stand',\n 'start',\n 'state',\n 'stay',\n 'steak',\n 'steel',\n 'stem',\n 'step',\n 'stereo',\n 'stick',\n 'still',\n 'sting',\n 'stock',\n 'stomach',\n 'stone',\n 'stool',\n 'story',\n 'stove',\n 'strategy',\n 'street',\n 'strike',\n 'strong',\n 'struggle',\n 'student',\n 'stuff',\n 'stumble',\n 'style',\n 'subject',\n 'submit',\n 'subway',\n 'success',\n 'such',\n 'sudden',\n 'suffer',\n 'sugar',\n 'suggest',\n 'suit',\n 'summer',\n 'sun',\n 'sunny',\n 'sunset',\n 'super',\n 'supply',\n 'supreme',\n 'sure',\n 'surface',\n 'surge',\n 'surprise',\n 'surround',\n 'survey',\n 'suspect',\n 'sustain',\n 'swallow',\n 'swamp',\n 'swap',\n 'swarm',\n 'swear',\n 'sweet',\n 'swift',\n 'swim',\n 'swing',\n 'switch',\n 'sword',\n 'symbol',\n 'symptom',\n 'syrup',\n 'system',\n 'table',\n 'tackle',\n 'tag',\n 'tail',\n 'talent',\n 'talk',\n 'tank',\n 'tape',\n 'target',\n 'task',\n 'taste',\n 'tattoo',\n 'taxi',\n 'teach',\n 'team',\n 'tell',\n 'ten',\n 'tenant',\n 'tennis',\n 'tent',\n 'term',\n 'test',\n 'text',\n 'thank',\n 'that',\n 'theme',\n 'then',\n 'theory',\n 'there',\n 'they',\n 'thing',\n 'this',\n 'thought',\n 'three',\n 'thrive',\n 'throw',\n 'thumb',\n 'thunder',\n 'ticket',\n 'tide',\n 'tiger',\n 'tilt',\n 'timber',\n 'time',\n 'tiny',\n 'tip',\n 'tired',\n 'tissue',\n 'title',\n 'toast',\n 'tobacco',\n 'today',\n 'toddler',\n 'toe',\n 'together',\n 'toilet',\n 'token',\n 'tomato',\n 'tomorrow',\n 'tone',\n 'tongue',\n 'tonight',\n 'tool',\n 'tooth',\n 'top',\n 'topic',\n 'topple',\n 'torch',\n 'tornado',\n 'tortoise',\n 'toss',\n 'total',\n 'tourist',\n 'toward',\n 'tower',\n 'town',\n 'toy',\n 'track',\n 'trade',\n 'traffic',\n 'tragic',\n 'train',\n 'transfer',\n 'trap',\n 'trash',\n 'travel',\n 'tray',\n 'treat',\n 'tree',\n 'trend',\n 'trial',\n 'tribe',\n 'trick',\n 'trigger',\n 'trim',\n 'trip',\n 'trophy',\n 'trouble',\n 'truck',\n 'true',\n 'truly',\n 'trumpet',\n 'trust',\n 'truth',\n 'try',\n 'tube',\n 'tuition',\n 'tumble',\n 'tuna',\n 'tunnel',\n 'turkey',\n 'turn',\n 'turtle',\n 'twelve',\n 'twenty',\n 'twice',\n 'twin',\n 'twist',\n 'two',\n 'type',\n 'typical',\n 'ugly',\n 'umbrella',\n 'unable',\n 'unaware',\n 'uncle',\n 'uncover',\n 'under',\n 'undo',\n 'unfair',\n 'unfold',\n 'unhappy',\n 'uniform',\n 'unique',\n 'unit',\n 'universe',\n 'unknown',\n 'unlock',\n 'until',\n 'unusual',\n 'unveil',\n 'update',\n 'upgrade',\n 'uphold',\n 'upon',\n 'upper',\n 'upset',\n 'urban',\n 'urge',\n 'usage',\n 'use',\n 'used',\n 'useful',\n 'useless',\n 'usual',\n 'utility',\n 'vacant',\n 'vacuum',\n 'vague',\n 'valid',\n 'valley',\n 'valve',\n 'van',\n 'vanish',\n 'vapor',\n 'various',\n 'vast',\n 'vault',\n 'vehicle',\n 'velvet',\n 'vendor',\n 'venture',\n 'venue',\n 'verb',\n 'verify',\n 'version',\n 'very',\n 'vessel',\n 'veteran',\n 'viable',\n 'vibrant',\n 'vicious',\n 'victory',\n 'video',\n 'view',\n 'village',\n 'vintage',\n 'violin',\n 'virtual',\n 'virus',\n 'visa',\n 'visit',\n 'visual',\n 'vital',\n 'vivid',\n 'vocal',\n 'voice',\n 'void',\n 'volcano',\n 'volume',\n 'vote',\n 'voyage',\n 'wage',\n 'wagon',\n 'wait',\n 'walk',\n 'wall',\n 'walnut',\n 'want',\n 'warfare',\n 'warm',\n 'warrior',\n 'wash',\n 'wasp',\n 'waste',\n 'water',\n 'wave',\n 'way',\n 'wealth',\n 'weapon',\n 'wear',\n 'weasel',\n 'weather',\n 'web',\n 'wedding',\n 'weekend',\n 'weird',\n 'welcome',\n 'west',\n 'wet',\n 'whale',\n 'what',\n 'wheat',\n 'wheel',\n 'when',\n 'where',\n 'whip',\n 'whisper',\n 'wide',\n 'width',\n 'wife',\n 'wild',\n 'will',\n 'win',\n 'window',\n 'wine',\n 'wing',\n 'wink',\n 'winner',\n 'winter',\n 'wire',\n 'wisdom',\n 'wise',\n 'wish',\n 'witness',\n 'wolf',\n 'woman',\n 'wonder',\n 'wood',\n 'wool',\n 'word',\n 'work',\n 'world',\n 'worry',\n 'worth',\n 'wrap',\n 'wreck',\n 'wrestle',\n 'wrist',\n 'write',\n 'wrong',\n 'yard',\n 'year',\n 'yellow',\n 'you',\n 'young',\n 'youth',\n 'zebra',\n 'zero',\n 'zone',\n 'zoo',\n];\nexport default english;\n//# sourceMappingURL=english.js.map","/* eslint-disable no-bitwise */\nimport english from './wordlists/english';\nimport * as nacl from '../nacl/naclWrappers';\nimport * as address from '../encoding/address';\nexport const FAIL_TO_DECODE_MNEMONIC_ERROR_MSG = 'failed to decode mnemonic';\nexport const NOT_IN_WORDS_LIST_ERROR_MSG = 'the mnemonic contains a word that is not in the wordlist';\n// https://stackoverflow.com/a/51452614\nfunction toUint11Array(buffer8) {\n const buffer11 = [];\n let acc = 0;\n let accBits = 0;\n function add(octet) {\n acc |= octet << accBits;\n accBits += 8;\n if (accBits >= 11) {\n buffer11.push(acc & 0x7ff);\n acc >>= 11;\n accBits -= 11;\n }\n }\n function flush() {\n if (accBits) {\n buffer11.push(acc);\n }\n }\n buffer8.forEach(add);\n flush();\n return buffer11;\n}\nfunction applyWords(nums) {\n return nums.map((n) => english[n]);\n}\nfunction computeChecksum(seed) {\n const hashBuffer = nacl.genericHash(seed);\n const uint11Hash = toUint11Array(hashBuffer);\n const words = applyWords(uint11Hash);\n return words[0];\n}\n/**\n * mnemonicFromSeed converts a 32-byte key into a 25 word mnemonic. The generated mnemonic includes a checksum.\n * Each word in the mnemonic represents 11 bits of data, and the last 11 bits are reserved for the checksum.\n * @param seed - 32 bytes long seed\n * @returns 25 words mnemonic\n */\nexport function mnemonicFromSeed(seed) {\n // Sanity length check\n if (seed.length !== nacl.SEED_BTYES_LENGTH) {\n throw new RangeError(`Seed length must be ${nacl.SEED_BTYES_LENGTH}`);\n }\n const uint11Array = toUint11Array(seed);\n const words = applyWords(uint11Array);\n const checksumWord = computeChecksum(seed);\n return `${words.join(' ')} ${checksumWord}`;\n}\n// from Uint11Array\n// https://stackoverflow.com/a/51452614\nfunction toUint8Array(buffer11) {\n const buffer8 = [];\n let acc = 0;\n let accBits = 0;\n function add(ui11) {\n acc |= ui11 << accBits;\n accBits += 11;\n while (accBits >= 8) {\n buffer8.push(acc & 0xff);\n acc >>= 8;\n accBits -= 8;\n }\n }\n function flush() {\n if (accBits) {\n buffer8.push(acc);\n }\n }\n buffer11.forEach(add);\n flush();\n return new Uint8Array(buffer8);\n}\n/**\n * seedFromMnemonic converts a mnemonic generated using this library into the source key used to create it.\n * It returns an error if the passed mnemonic has an incorrect checksum, if the number of words is unexpected, or if one\n * of the passed words is not found in the words list.\n * @param mnemonic - 25 words mnemonic\n * @returns 32 bytes long seed\n */\nexport function seedFromMnemonic(mnemonic) {\n const words = mnemonic.split(' ');\n const key = words.slice(0, 24);\n // Check that all words are in list\n for (const w of key) {\n if (english.indexOf(w) === -1)\n throw new Error(NOT_IN_WORDS_LIST_ERROR_MSG);\n }\n const checksum = words[words.length - 1];\n const uint11Array = key.map((word) => english.indexOf(word));\n // Convert the key to uint8Array\n let uint8Array = toUint8Array(uint11Array);\n // We need to chop the last byte -\n // the short explanation - Since 256 is not divisible by 11, we have an extra 0x0 byte.\n // The longer explanation - When splitting the 256 bits to chunks of 11, we get 23 words and a left over of 3 bits.\n // This left gets padded with another 8 bits to the create the 24th word.\n // While converting back to byte array, our new 264 bits array is divisible by 8 but the last byte is just the padding.\n // check that we have 33 bytes long array as expected\n if (uint8Array.length !== 33)\n throw new Error(FAIL_TO_DECODE_MNEMONIC_ERROR_MSG);\n // check that the last byte is actually 0x0\n if (uint8Array[uint8Array.length - 1] !== 0x0)\n throw new Error(FAIL_TO_DECODE_MNEMONIC_ERROR_MSG);\n // chop it !\n uint8Array = uint8Array.slice(0, uint8Array.length - 1);\n // compute checksum\n const cs = computeChecksum(uint8Array);\n // success!\n if (cs === checksum)\n return uint8Array;\n throw new Error(FAIL_TO_DECODE_MNEMONIC_ERROR_MSG);\n}\n/**\n * mnemonicToSecretKey takes a mnemonic string and returns the corresponding Algorand address and its secret key.\n * @param mn - 25 words Algorand mnemonic\n * @throws error if fails to decode the mnemonic\n */\nexport function mnemonicToSecretKey(mn) {\n const seed = seedFromMnemonic(mn);\n const keys = nacl.keyPairFromSeed(seed);\n const encodedPk = address.encodeAddress(keys.publicKey);\n return { addr: encodedPk, sk: keys.secretKey };\n}\n/**\n * secretKeyToMnemonic takes an Algorand secret key and returns the corresponding mnemonic.\n * @param sk - Algorand secret key\n * @returns Secret key's associated mnemonic\n */\nexport function secretKeyToMnemonic(sk) {\n // get the seed from the sk\n const seed = sk.slice(0, nacl.SEED_BTYES_LENGTH);\n return mnemonicFromSeed(seed);\n}\n/**\n * mnemonicToMasterDerivationKey takes a mnemonic string and returns the corresponding master derivation key.\n * @param mn - 25 words Algorand mnemonic\n * @returns Uint8Array\n * @throws error if fails to decode the mnemonic\n */\nexport function mnemonicToMasterDerivationKey(mn) {\n return seedFromMnemonic(mn);\n}\n/**\n * masterDerivationKeyToMnemonic takes a master derivation key and returns the corresponding mnemonic.\n * @param mdk - Uint8Array\n * @returns string mnemonic\n */\nexport function masterDerivationKeyToMnemonic(mdk) {\n return mnemonicFromSeed(mdk);\n}\n//# sourceMappingURL=mnemonic.js.map","import { Buffer } from 'buffer';\nimport * as txnBuilder from './transaction';\nimport * as nacl from './nacl/naclWrappers';\nimport * as encoding from './encoding/encoding';\nimport * as address from './encoding/address';\nimport * as utils from './utils/utils';\nconst ALGORAND_MAX_TX_GROUP_SIZE = 16;\n/**\n * Aux class for group id calculation of a group of transactions\n */\nexport class TxGroup {\n constructor(hashes) {\n this.name = 'Transaction group';\n this.tag = Buffer.from('TG');\n if (hashes.length > ALGORAND_MAX_TX_GROUP_SIZE) {\n const errorMsg = `${hashes.length.toString()} transactions grouped together but max group size is ${ALGORAND_MAX_TX_GROUP_SIZE.toString()}`;\n throw Error(errorMsg);\n }\n this.txGroupHashes = hashes;\n }\n // eslint-disable-next-line camelcase\n get_obj_for_encoding() {\n const txgroup = {\n txlist: this.txGroupHashes,\n };\n return txgroup;\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(txgroupForEnc) {\n const txn = Object.create(this.prototype);\n txn.name = 'Transaction group';\n txn.tag = Buffer.from('TG');\n txn.txGroupHashes = [];\n for (const hash of txgroupForEnc.txlist) {\n txn.txGroupHashes.push(Buffer.from(hash));\n }\n return txn;\n }\n toByte() {\n return encoding.encode(this.get_obj_for_encoding());\n }\n}\n/**\n * computeGroupID returns group ID for a group of transactions\n * @param txns - array of transactions (every element is a dict or Transaction)\n * @returns Buffer\n */\nexport function computeGroupID(txns) {\n const hashes = [];\n for (const txn of txns) {\n const tx = txnBuilder.instantiateTxnIfNeeded(txn);\n hashes.push(tx.rawTxID());\n }\n const txgroup = new TxGroup(hashes);\n const bytes = txgroup.toByte();\n const toBeHashed = Buffer.from(utils.concatArrays(txgroup.tag, bytes));\n const gid = nacl.genericHash(toBeHashed);\n return Buffer.from(gid);\n}\n/**\n * assignGroupID assigns group id to a given list of unsigned transactions\n * @param txns - array of transactions (every element is a dict or Transaction)\n * @param from - optional sender address specifying which transaction return\n * @returns possible list of matching transactions\n */\nexport function assignGroupID(txns, from) {\n const gid = computeGroupID(txns);\n const result = [];\n for (const txn of txns) {\n const tx = txnBuilder.instantiateTxnIfNeeded(txn);\n if (!from || address.encodeAddress(tx.from.publicKey) === from) {\n tx.group = gid;\n result.push(tx);\n }\n }\n return result;\n}\nexport default TxGroup;\n//# sourceMappingURL=group.js.map","import { Buffer } from 'buffer';\nimport * as nacl from './nacl/naclWrappers';\nimport * as address from './encoding/address';\nimport * as encoding from './encoding/encoding';\nimport * as txnBuilder from './transaction';\nimport * as utils from './utils/utils';\n/**\n Utilities for manipulating multisig transaction blobs.\n */\nexport const MULTISIG_MERGE_LESSTHANTWO_ERROR_MSG = 'Not enough multisig transactions to merge. Need at least two';\nexport const MULTISIG_MERGE_MISMATCH_ERROR_MSG = 'Cannot merge txs. txIDs differ';\nexport const MULTISIG_MERGE_MISMATCH_AUTH_ADDR_MSG = 'Cannot merge txs. Auth addrs differ';\nexport const MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG = 'Cannot merge txs. Multisig preimages differ';\nexport const MULTISIG_MERGE_SIG_MISMATCH_ERROR_MSG = 'Cannot merge txs. subsigs are mismatched.';\nconst MULTISIG_KEY_NOT_EXIST_ERROR_MSG = 'Key does not exist';\nexport const MULTISIG_NO_MUTATE_ERROR_MSG = 'Cannot mutate a multisig field as it would invalidate all existing signatures.';\nexport const MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG = 'Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.';\nexport const MULTISIG_SIGNATURE_LENGTH_ERROR_MSG = 'Cannot add multisig signature. Signature is not of the correct length.';\n/**\n * createMultisigTransaction creates a raw, unsigned multisig transaction blob.\n * @param txn - the actual transaction.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param pks - ordered list of public keys in this multisig\n * @returns encoded multisig blob\n */\nexport function createMultisigTransaction(txn, { version, threshold, addrs }) {\n // construct the appendable multisigned transaction format\n const pks = addrs.map((addr) => address.decodeAddress(addr).publicKey);\n const subsigs = pks.map((pk) => ({ pk: Buffer.from(pk) }));\n const msig = {\n v: version,\n thr: threshold,\n subsig: subsigs,\n };\n const txnForEncoding = txn.get_obj_for_encoding();\n const signedTxn = {\n msig,\n txn: txnForEncoding,\n };\n // if the address of this multisig is different from the transaction sender,\n // we need to add the auth-addr field\n const msigAddr = address.fromMultisigPreImg({\n version,\n threshold,\n pks,\n });\n if (address.encodeAddress(txnForEncoding.snd) !==\n address.encodeAddress(msigAddr)) {\n signedTxn.sgnr = Buffer.from(msigAddr);\n }\n return new Uint8Array(encoding.encode(signedTxn));\n}\n/**\n * createMultisigTransactionWithSignature creates a multisig transaction blob with an included signature.\n * @param txn - the actual transaction to sign.\n * @param rawSig - a Buffer raw signature of that transaction\n * @param myPk - a public key that corresponds with rawSig\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param pks - ordered list of public keys in this multisig\n * @returns encoded multisig blob\n */\nfunction createMultisigTransactionWithSignature(txn, { rawSig, myPk }, { version, threshold, pks }) {\n // Create an empty encoded multisig transaction\n const encodedMsig = createMultisigTransaction(txn, {\n version,\n threshold,\n addrs: pks.map((pk) => address.encodeAddress(pk)),\n });\n // note: this is not signed yet, but will be shortly\n const signedTxn = encoding.decode(encodedMsig);\n let keyExist = false;\n // append the multisig signature to the corresponding public key in the multisig blob\n signedTxn.msig.subsig.forEach((subsig, i) => {\n if (nacl.bytesEqual(subsig.pk, myPk)) {\n keyExist = true;\n signedTxn.msig.subsig[i].s = rawSig;\n }\n });\n if (keyExist === false) {\n throw new Error(MULTISIG_KEY_NOT_EXIST_ERROR_MSG);\n }\n // if the address of this multisig is different from the transaction sender,\n // we need to add the auth-addr field\n const msigAddr = address.fromMultisigPreImg({\n version,\n threshold,\n pks,\n });\n if (address.encodeAddress(signedTxn.txn.snd) !== address.encodeAddress(msigAddr)) {\n signedTxn.sgnr = Buffer.from(msigAddr);\n }\n return new Uint8Array(encoding.encode(signedTxn));\n}\n/**\n * MultisigTransaction is a Transaction that also supports creating partially-signed multisig transactions.\n */\nexport class MultisigTransaction extends txnBuilder.Transaction {\n /* eslint-disable class-methods-use-this,@typescript-eslint/no-unused-vars,no-dupe-class-members */\n /**\n * Override inherited method to throw an error, as mutating transactions are prohibited in this context\n */\n addLease() {\n throw new Error(MULTISIG_NO_MUTATE_ERROR_MSG);\n }\n /**\n * Override inherited method to throw an error, as mutating transactions are prohibited in this context\n */\n addRekey() {\n throw new Error(MULTISIG_NO_MUTATE_ERROR_MSG);\n }\n signTxn(sk) {\n throw new Error(MULTISIG_USE_PARTIAL_SIGN_ERROR_MSG);\n }\n /* eslint-enable class-methods-use-this,@typescript-eslint/no-unused-vars,no-dupe-class-members */\n /**\n * partialSignTxn partially signs this transaction and returns a partially-signed multisig transaction,\n * encoded with msgpack as a typed array.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param pks - multisig public key list, order is important.\n * @param sk - an Algorand secret key to sign with.\n * @returns an encoded, partially signed multisig transaction.\n */\n partialSignTxn({ version, threshold, pks }, sk) {\n // get signature verifier\n const myPk = nacl.keyPairFromSecretKey(sk).publicKey;\n return createMultisigTransactionWithSignature(this, { rawSig: this.rawSignTxn(sk), myPk }, { version, threshold, pks });\n }\n /**\n * partialSignWithMultisigSignature partially signs this transaction with an external raw multisig signature and returns\n * a partially-signed multisig transaction, encoded with msgpack as a typed array.\n * @param metadata - multisig metadata\n * @param signerAddr - address of the signer\n * @param signature - raw multisig signature\n * @returns an encoded, partially signed multisig transaction.\n */\n partialSignWithMultisigSignature(metadata, signerAddr, signature) {\n if (!nacl.isValidSignatureLength(signature.length)) {\n throw new Error(MULTISIG_SIGNATURE_LENGTH_ERROR_MSG);\n }\n return createMultisigTransactionWithSignature(this, {\n rawSig: signature,\n myPk: address.decodeAddress(signerAddr).publicKey,\n }, metadata);\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(txnForEnc) {\n return super.from_obj_for_encoding(txnForEnc);\n }\n}\n/**\n * mergeMultisigTransactions takes a list of multisig transaction blobs, and merges them.\n * @param multisigTxnBlobs - a list of blobs representing encoded multisig txns\n * @returns typed array msg-pack encoded multisig txn\n */\nexport function mergeMultisigTransactions(multisigTxnBlobs) {\n if (multisigTxnBlobs.length < 2) {\n throw new Error(MULTISIG_MERGE_LESSTHANTWO_ERROR_MSG);\n }\n const refSigTx = encoding.decode(multisigTxnBlobs[0]);\n const refTxID = MultisigTransaction.from_obj_for_encoding(refSigTx.txn).txID();\n const refAuthAddr = refSigTx.sgnr\n ? address.encodeAddress(refSigTx.sgnr)\n : undefined;\n const refPreImage = {\n version: refSigTx.msig.v,\n threshold: refSigTx.msig.thr,\n pks: refSigTx.msig.subsig.map((subsig) => subsig.pk),\n };\n const refMsigAddr = address.encodeAddress(address.fromMultisigPreImg(refPreImage));\n const newSubsigs = refSigTx.msig.subsig.map((sig) => ({ ...sig }));\n for (let i = 1; i < multisigTxnBlobs.length; i++) {\n const unisig = encoding.decode(multisigTxnBlobs[i]);\n const unisigAlgoTxn = MultisigTransaction.from_obj_for_encoding(unisig.txn);\n if (unisigAlgoTxn.txID() !== refTxID) {\n throw new Error(MULTISIG_MERGE_MISMATCH_ERROR_MSG);\n }\n const authAddr = unisig.sgnr\n ? address.encodeAddress(unisig.sgnr)\n : undefined;\n if (refAuthAddr !== authAddr) {\n throw new Error(MULTISIG_MERGE_MISMATCH_AUTH_ADDR_MSG);\n }\n // check multisig has same preimage as reference\n if (unisig.msig.subsig.length !== refSigTx.msig.subsig.length) {\n throw new Error(MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG);\n }\n const preimg = {\n version: unisig.msig.v,\n threshold: unisig.msig.thr,\n pks: unisig.msig.subsig.map((subsig) => subsig.pk),\n };\n const msgigAddr = address.encodeAddress(address.fromMultisigPreImg(preimg));\n if (refMsigAddr !== msgigAddr) {\n throw new Error(MULTISIG_MERGE_WRONG_PREIMAGE_ERROR_MSG);\n }\n // now, we can merge\n unisig.msig.subsig.forEach((uniSubsig, index) => {\n if (!uniSubsig.s)\n return;\n const current = newSubsigs[index];\n // we convert the Uint8Arrays uniSubsig.s and current.s to Buffers here because (as\n // of Dec 2020) React overrides the buffer package with an older version that does\n // not support Uint8Arrays in the comparison function. See this thread for more\n // info: https://github.com/algorand/js-algorand-sdk/issues/252\n if (current.s &&\n Buffer.compare(Buffer.from(uniSubsig.s), Buffer.from(current.s)) !== 0) {\n // mismatch\n throw new Error(MULTISIG_MERGE_SIG_MISMATCH_ERROR_MSG);\n }\n current.s = uniSubsig.s;\n });\n }\n const msig = {\n v: refSigTx.msig.v,\n thr: refSigTx.msig.thr,\n subsig: newSubsigs,\n };\n const signedTxn = {\n msig,\n txn: refSigTx.txn,\n };\n if (typeof refAuthAddr !== 'undefined') {\n signedTxn.sgnr = Buffer.from(address.decodeAddress(refAuthAddr).publicKey);\n }\n return new Uint8Array(encoding.encode(signedTxn));\n}\nexport function verifyMultisig(toBeVerified, msig, publicKey) {\n const version = msig.v;\n const threshold = msig.thr;\n const subsigs = msig.subsig;\n const pks = subsigs.map((subsig) => subsig.pk);\n if (msig.subsig.length < threshold) {\n return false;\n }\n let pk;\n try {\n pk = address.fromMultisigPreImg({ version, threshold, pks });\n }\n catch (e) {\n return false;\n }\n if (!utils.arrayEqual(pk, publicKey)) {\n return false;\n }\n let counter = 0;\n for (const subsig of subsigs) {\n if (subsig.s !== undefined) {\n counter += 1;\n }\n }\n if (counter < threshold) {\n return false;\n }\n let verifiedCounter = 0;\n for (const subsig of subsigs) {\n if (subsig.s !== undefined) {\n if (nacl.verify(toBeVerified, subsig.s, subsig.pk)) {\n verifiedCounter += 1;\n }\n }\n }\n if (verifiedCounter < threshold) {\n return false;\n }\n return true;\n}\n/**\n * signMultisigTransaction takes a raw transaction (see signTransaction), a multisig preimage, a secret key, and returns\n * a multisig transaction, which is a blob representing a transaction and multisignature account preimage. The returned\n * multisig txn can accumulate additional signatures through mergeMultisigTransactions or appendSignMultisigTransaction.\n * @param txn - object with either payment or key registration fields\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.\n * @param sk - Algorand secret key. The corresponding pk should be in the pre image.\n * @returns object containing txID, and blob of partially signed multisig transaction (with multisig preimage information)\n * If the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.\n */\nexport function signMultisigTransaction(txn, { version, threshold, addrs }, sk) {\n // check that the from field matches the mSigPreImage. If from field is not populated, fill it in.\n const expectedFromRaw = address.fromMultisigPreImgAddrs({\n version,\n threshold,\n addrs,\n });\n if (!Object.prototype.hasOwnProperty.call(txn, 'from')) {\n // eslint-disable-next-line no-param-reassign\n txn.from = expectedFromRaw;\n }\n // build pks for partialSign\n const pks = addrs.map((addr) => address.decodeAddress(addr).publicKey);\n // `txn` needs to be handled differently if it's a constructed `Transaction` vs a dict of constructor args\n const txnAlreadyBuilt = txn instanceof txnBuilder.Transaction;\n let algoTxn;\n let blob;\n if (txnAlreadyBuilt) {\n algoTxn = txn;\n blob = MultisigTransaction.prototype.partialSignTxn.call(algoTxn, { version, threshold, pks }, sk);\n }\n else {\n algoTxn = new MultisigTransaction(txn);\n blob = algoTxn.partialSignTxn({ version, threshold, pks }, sk);\n }\n return {\n txID: algoTxn.txID().toString(),\n blob,\n };\n}\n/**\n * appendSignMultisigTransaction takes a multisig transaction blob, and appends our signature to it.\n * While we could derive public key preimagery from the partially-signed multisig transaction,\n * we ask the caller to pass it back in, to ensure they know what they are signing.\n * @param multisigTxnBlob - an encoded multisig txn. Supports non-payment txn types.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.\n * @param sk - Algorand secret key\n * @returns object containing txID, and blob representing encoded multisig txn\n */\nexport function appendSignMultisigTransaction(multisigTxnBlob, { version, threshold, addrs }, sk) {\n const pks = addrs.map((addr) => address.decodeAddress(addr).publicKey);\n // obtain underlying txn, sign it, and merge it\n const multisigTxObj = encoding.decode(multisigTxnBlob);\n const msigTxn = MultisigTransaction.from_obj_for_encoding(multisigTxObj.txn);\n const partialSignedBlob = msigTxn.partialSignTxn({ version, threshold, pks }, sk);\n return {\n txID: msigTxn.txID().toString(),\n blob: mergeMultisigTransactions([multisigTxnBlob, partialSignedBlob]),\n };\n}\n/**\n * appendMultisigTransactionSignature takes a multisig transaction blob, and appends a given raw signature to it.\n * This makes it possible to compile a multisig signature using only raw signatures from external methods.\n * @param multisigTxnBlob - an encoded multisig txn. Supports non-payment txn types.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param addrs - a list of Algorand addresses representing possible signers for this multisig. Order is important.\n * @param signerAddr - address of the signer\n * @param signature - raw multisig signature\n * @returns object containing txID, and blob representing encoded multisig txn\n */\nexport function appendSignRawMultisigSignature(multisigTxnBlob, { version, threshold, addrs }, signerAddr, signature) {\n const pks = addrs.map((addr) => address.decodeAddress(addr).publicKey);\n // obtain underlying txn, sign it, and merge it\n const multisigTxObj = encoding.decode(multisigTxnBlob);\n const msigTxn = MultisigTransaction.from_obj_for_encoding(multisigTxObj.txn);\n const partialSignedBlob = msigTxn.partialSignWithMultisigSignature({ version, threshold, pks }, signerAddr, signature);\n return {\n txID: msigTxn.txID().toString(),\n blob: mergeMultisigTransactions([multisigTxnBlob, partialSignedBlob]),\n };\n}\n/**\n * multisigAddress takes multisig metadata (preimage) and returns the corresponding human readable Algorand address.\n * @param version - multisig version\n * @param threshold - multisig threshold\n * @param addrs - list of Algorand addresses\n */\nexport function multisigAddress({ version, threshold, addrs, }) {\n return address.fromMultisigPreImgAddrs({ version, threshold, addrs });\n}\n//# sourceMappingURL=multisig.js.map","import { Buffer } from 'buffer';\nimport * as nacl from './nacl/naclWrappers';\nimport * as address from './encoding/address';\nimport * as encoding from './encoding/encoding';\nimport { verifyMultisig } from './multisig';\nimport * as utils from './utils/utils';\nimport * as txnBuilder from './transaction';\nimport { isValidAddress } from './encoding/address';\n/** sanityCheckProgram performs heuristic program validation:\n * check if passed in bytes are Algorand address or is B64 encoded, rather than Teal bytes\n *\n * @param program - Program bytes to check\n */\nexport function sanityCheckProgram(program) {\n if (!program || program.length === 0)\n throw new Error('empty program');\n const lineBreakOrd = '\\n'.charCodeAt(0);\n const blankSpaceOrd = ' '.charCodeAt(0);\n const tildeOrd = '~'.charCodeAt(0);\n const isPrintable = (x) => blankSpaceOrd <= x && x <= tildeOrd;\n const isAsciiPrintable = program.every((x) => x === lineBreakOrd || isPrintable(x));\n if (isAsciiPrintable) {\n const programStr = Buffer.from(program).toString();\n if (isValidAddress(programStr))\n throw new Error('requesting program bytes, get Algorand address');\n if (Buffer.from(programStr, 'base64').toString('base64') === programStr)\n throw new Error('program should not be b64 encoded');\n throw new Error('program bytes are all ASCII printable characters, not looking like Teal byte code');\n }\n}\n/**\n LogicSig implementation\n\n LogicSig cannot sign transactions in all cases. Instead, use LogicSigAccount as a safe, general purpose signing mechanism. Since LogicSig does not track the provided signature's public key, LogicSig cannot sign transactions when delegated to a non-multisig account _and_ the sender is not the delegating account.\n */\nexport class LogicSig {\n constructor(program, programArgs) {\n this.tag = Buffer.from('Program');\n if (programArgs &&\n (!Array.isArray(programArgs) ||\n !programArgs.every((arg) => arg.constructor === Uint8Array || Buffer.isBuffer(arg)))) {\n throw new TypeError('Invalid arguments');\n }\n let args;\n if (programArgs != null)\n args = programArgs.map((arg) => new Uint8Array(arg));\n sanityCheckProgram(program);\n this.logic = program;\n this.args = args;\n this.sig = undefined;\n this.msig = undefined;\n }\n // eslint-disable-next-line camelcase\n get_obj_for_encoding() {\n const obj = {\n l: this.logic,\n };\n if (this.args) {\n obj.arg = this.args;\n }\n if (this.sig) {\n obj.sig = this.sig;\n }\n else if (this.msig) {\n obj.msig = this.msig;\n }\n return obj;\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(encoded) {\n const lsig = new LogicSig(encoded.l, encoded.arg);\n lsig.sig = encoded.sig;\n lsig.msig = encoded.msig;\n return lsig;\n }\n /**\n * Performs signature verification\n * @param publicKey - Verification key (derived from sender address or escrow address)\n */\n verify(publicKey) {\n if (this.sig && this.msig) {\n return false;\n }\n try {\n sanityCheckProgram(this.logic);\n }\n catch (e) {\n return false;\n }\n const toBeSigned = utils.concatArrays(this.tag, this.logic);\n if (!this.sig && !this.msig) {\n const hash = nacl.genericHash(toBeSigned);\n return utils.arrayEqual(hash, publicKey);\n }\n if (this.sig) {\n return nacl.verify(toBeSigned, this.sig, publicKey);\n }\n return verifyMultisig(toBeSigned, this.msig, publicKey);\n }\n /**\n * Compute hash of the logic sig program (that is the same as escrow account address) as string address\n * @returns String representation of the address\n */\n address() {\n const toBeSigned = utils.concatArrays(this.tag, this.logic);\n const hash = nacl.genericHash(toBeSigned);\n return address.encodeAddress(new Uint8Array(hash));\n }\n /**\n * Creates signature (if no msig provided) or multi signature otherwise\n * @param secretKey - Secret key to sign with\n * @param msig - Multisig account as \\{version, threshold, addrs\\}\n */\n sign(secretKey, msig) {\n if (msig == null) {\n this.sig = this.signProgram(secretKey);\n }\n else {\n const subsigs = msig.addrs.map((addr) => ({\n pk: address.decodeAddress(addr).publicKey,\n }));\n this.msig = {\n v: msig.version,\n thr: msig.threshold,\n subsig: subsigs,\n };\n const [sig, index] = this.singleSignMultisig(secretKey, this.msig);\n this.msig.subsig[index].s = sig;\n }\n }\n /**\n * Appends a signature to multi signature\n * @param secretKey - Secret key to sign with\n */\n appendToMultisig(secretKey) {\n if (this.msig === undefined) {\n throw new Error('no multisig present');\n }\n const [sig, index] = this.singleSignMultisig(secretKey, this.msig);\n this.msig.subsig[index].s = sig;\n }\n signProgram(secretKey) {\n const toBeSigned = utils.concatArrays(this.tag, this.logic);\n const sig = nacl.sign(toBeSigned, secretKey);\n return sig;\n }\n singleSignMultisig(secretKey, msig) {\n let index = -1;\n const myPk = nacl.keyPairFromSecretKey(secretKey).publicKey;\n for (let i = 0; i < msig.subsig.length; i++) {\n const { pk } = msig.subsig[i];\n if (utils.arrayEqual(pk, myPk)) {\n index = i;\n break;\n }\n }\n if (index === -1) {\n throw new Error('invalid secret key');\n }\n const sig = this.signProgram(secretKey);\n return [sig, index];\n }\n toByte() {\n return encoding.encode(this.get_obj_for_encoding());\n }\n static fromByte(encoded) {\n const decodedObj = encoding.decode(encoded);\n return LogicSig.from_obj_for_encoding(decodedObj);\n }\n}\n/**\n * Represents an account that can sign with a LogicSig program.\n */\nexport class LogicSigAccount {\n /**\n * Create a new LogicSigAccount. By default this will create an escrow\n * LogicSig account. Call `sign` or `signMultisig` on the newly created\n * LogicSigAccount to make it a delegated account.\n *\n * @param program - The compiled TEAL program which contains the logic for\n * this LogicSig.\n * @param args - An optional array of arguments for the program.\n */\n constructor(program, args) {\n this.lsig = new LogicSig(program, args);\n this.sigkey = undefined;\n }\n // eslint-disable-next-line camelcase\n get_obj_for_encoding() {\n const obj = {\n lsig: this.lsig.get_obj_for_encoding(),\n };\n if (this.sigkey) {\n obj.sigkey = this.sigkey;\n }\n return obj;\n }\n // eslint-disable-next-line camelcase\n static from_obj_for_encoding(encoded) {\n const lsigAccount = new LogicSigAccount(encoded.lsig.l, encoded.lsig.arg);\n lsigAccount.lsig = LogicSig.from_obj_for_encoding(encoded.lsig);\n lsigAccount.sigkey = encoded.sigkey;\n return lsigAccount;\n }\n /**\n * Encode this object into msgpack.\n */\n toByte() {\n return encoding.encode(this.get_obj_for_encoding());\n }\n /**\n * Decode a msgpack object into a LogicSigAccount.\n * @param encoded - The encoded LogicSigAccount.\n */\n static fromByte(encoded) {\n const decodedObj = encoding.decode(encoded);\n return LogicSigAccount.from_obj_for_encoding(decodedObj);\n }\n /**\n * Check if this LogicSigAccount has been delegated to another account with a\n * signature.\n *\n * Note this function only checks for the presence of a delegation signature.\n * To verify the delegation signature, use `verify`.\n */\n isDelegated() {\n return !!(this.lsig.sig || this.lsig.msig);\n }\n /**\n * Verifies this LogicSig's program and signatures.\n * @returns true if and only if the LogicSig program and signatures are valid.\n */\n verify() {\n const addr = this.address();\n return this.lsig.verify(address.decodeAddress(addr).publicKey);\n }\n /**\n * Get the address of this LogicSigAccount.\n *\n * If the LogicSig is delegated to another account, this will return the\n * address of that account.\n *\n * If the LogicSig is not delegated to another account, this will return an\n * escrow address that is the hash of the LogicSig's program code.\n */\n address() {\n if (this.lsig.sig && this.lsig.msig) {\n throw new Error('LogicSig has too many signatures. At most one of sig or msig may be present');\n }\n if (this.lsig.sig) {\n if (!this.sigkey) {\n throw new Error('Signing key for delegated account is missing');\n }\n return address.encodeAddress(this.sigkey);\n }\n if (this.lsig.msig) {\n const msigMetadata = {\n version: this.lsig.msig.v,\n threshold: this.lsig.msig.thr,\n pks: this.lsig.msig.subsig.map((subsig) => subsig.pk),\n };\n return address.encodeAddress(address.fromMultisigPreImg(msigMetadata));\n }\n return this.lsig.address();\n }\n /**\n * Turns this LogicSigAccount into a delegated LogicSig. This type of LogicSig\n * has the authority to sign transactions on behalf of another account, called\n * the delegating account. Use this function if the delegating account is a\n * multisig account.\n *\n * @param msig - The multisig delegating account\n * @param secretKey - The secret key of one of the members of the delegating\n * multisig account. Use `appendToMultisig` to add additional signatures\n * from other members.\n */\n signMultisig(msig, secretKey) {\n this.lsig.sign(secretKey, msig);\n }\n /**\n * Adds an additional signature from a member of the delegating multisig\n * account.\n *\n * @param secretKey - The secret key of one of the members of the delegating\n * multisig account.\n */\n appendToMultisig(secretKey) {\n this.lsig.appendToMultisig(secretKey);\n }\n /**\n * Turns this LogicSigAccount into a delegated LogicSig. This type of LogicSig\n * has the authority to sign transactions on behalf of another account, called\n * the delegating account. If the delegating account is a multisig account,\n * use `signMultisig` instead.\n *\n * @param secretKey - The secret key of the delegating account.\n */\n sign(secretKey) {\n this.lsig.sign(secretKey);\n this.sigkey = nacl.keyPairFromSecretKey(secretKey).publicKey;\n }\n}\nfunction signLogicSigTransactionWithAddress(txn, lsig, lsigAddress) {\n if (!lsig.verify(lsigAddress)) {\n throw new Error('Logic signature verification failed. Ensure the program and signature are valid.');\n }\n const signedTxn = {\n lsig: lsig.get_obj_for_encoding(),\n txn: txn.get_obj_for_encoding(),\n };\n if (!nacl.bytesEqual(lsigAddress, txn.from.publicKey)) {\n signedTxn.sgnr = Buffer.from(lsigAddress);\n }\n return {\n txID: txn.txID().toString(),\n blob: encoding.encode(signedTxn),\n };\n}\n/**\n * signLogicSigTransactionObject takes a transaction and a LogicSig object and\n * returns a signed transaction.\n *\n * @param txn - The transaction to sign.\n * @param lsigObject - The LogicSig object that will sign the transaction.\n *\n * @returns Object containing txID and blob representing signed transaction.\n */\nexport function signLogicSigTransactionObject(txn, lsigObject) {\n let lsig;\n let lsigAddress;\n if (lsigObject instanceof LogicSigAccount) {\n lsig = lsigObject.lsig;\n lsigAddress = address.decodeAddress(lsigObject.address()).publicKey;\n }\n else {\n lsig = lsigObject;\n if (lsig.sig) {\n // For a LogicSig with a non-multisig delegating account, we cannot derive\n // the address of that account from only its signature, so assume the\n // delegating account is the sender. If that's not the case, the signing\n // will fail.\n lsigAddress = txn.from.publicKey;\n }\n else if (lsig.msig) {\n const msigMetadata = {\n version: lsig.msig.v,\n threshold: lsig.msig.thr,\n pks: lsig.msig.subsig.map((subsig) => subsig.pk),\n };\n lsigAddress = address.fromMultisigPreImg(msigMetadata);\n }\n else {\n lsigAddress = address.decodeAddress(lsig.address()).publicKey;\n }\n }\n return signLogicSigTransactionWithAddress(txn, lsig, lsigAddress);\n}\n/**\n * signLogicSigTransaction takes a transaction and a LogicSig object and returns\n * a signed transaction.\n *\n * @param txn - The transaction to sign.\n * @param lsigObject - The LogicSig object that will sign the transaction.\n *\n * @returns Object containing txID and blob representing signed transaction.\n * @throws error on failure\n */\nexport function signLogicSigTransaction(txn, lsigObject) {\n const algoTxn = txnBuilder.instantiateTxnIfNeeded(txn);\n return signLogicSigTransactionObject(algoTxn, lsigObject);\n}\n/**\n * logicSigFromByte accepts encoded logic sig bytes and attempts to call logicsig.fromByte on it,\n * returning the result\n */\nexport function logicSigFromByte(encoded) {\n return LogicSig.fromByte(encoded);\n}\nconst SIGN_PROGRAM_DATA_PREFIX = Buffer.from('ProgData');\n/**\n * tealSign creates a signature compatible with ed25519verify opcode from program hash\n * @param sk - uint8array with secret key\n * @param data - buffer with data to sign\n * @param programHash - string representation of teal program hash (= contract address for LogicSigs)\n */\nexport function tealSign(sk, data, programHash) {\n const parts = utils.concatArrays(address.decodeAddress(programHash).publicKey, data);\n const toBeSigned = Buffer.from(utils.concatArrays(SIGN_PROGRAM_DATA_PREFIX, parts));\n return nacl.sign(toBeSigned, sk);\n}\n/**\n * verifyTealSign verifies a signature as would the ed25519verify opcode\n * @param data - buffer with original signed data\n * @param programHash - string representation of teal program hash (= contract address for LogicSigs)\n * @param sig - uint8array with the signature to verify (produced by tealSign/tealSignFromProgram)\n * @param pk - uint8array with public key to verify against\n */\nexport function verifyTealSign(data, programHash, sig, pk) {\n const parts = utils.concatArrays(address.decodeAddress(programHash).publicKey, data);\n const toBeSigned = Buffer.from(utils.concatArrays(SIGN_PROGRAM_DATA_PREFIX, parts));\n return nacl.verify(toBeSigned, sig, pk);\n}\n/**\n * tealSignFromProgram creates a signature compatible with ed25519verify opcode from raw program bytes\n * @param sk - uint8array with secret key\n * @param data - buffer with data to sign\n * @param program - buffer with teal program\n */\nexport function tealSignFromProgram(sk, data, program) {\n const lsig = new LogicSig(program);\n const contractAddress = lsig.address();\n return tealSign(sk, data, contractAddress);\n}\n//# sourceMappingURL=logicsig.js.map","/** @type {Record} */\nlet char_to_integer = {};\n\n/** @type {Record} */\nlet integer_to_char = {};\n\n'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t.split('')\n\t.forEach(function (char, i) {\n\t\tchar_to_integer[char] = i;\n\t\tinteger_to_char[i] = char;\n\t});\n\n/** @param {string} string */\nexport function decode(string) {\n\t/** @type {number[]} */\n\tlet result = [];\n\n\tlet shift = 0;\n\tlet value = 0;\n\n\tfor (let i = 0; i < string.length; i += 1) {\n\t\tlet integer = char_to_integer[string[i]];\n\n\t\tif (integer === undefined) {\n\t\t\tthrow new Error('Invalid character (' + string[i] + ')');\n\t\t}\n\n\t\tconst has_continuation_bit = integer & 32;\n\n\t\tinteger &= 31;\n\t\tvalue += integer << shift;\n\n\t\tif (has_continuation_bit) {\n\t\t\tshift += 5;\n\t\t} else {\n\t\t\tconst should_negate = value & 1;\n\t\t\tvalue >>>= 1;\n\n\t\t\tif (should_negate) {\n\t\t\t\tresult.push(value === 0 ? -0x80000000 : -value);\n\t\t\t} else {\n\t\t\t\tresult.push(value);\n\t\t\t}\n\n\t\t\t// reset\n\t\t\tvalue = shift = 0;\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/** @param {number | number[]} value */\nexport function encode(value) {\n\tif (typeof value === 'number') {\n\t\treturn encode_integer(value);\n\t}\n\n\tlet result = '';\n\tfor (let i = 0; i < value.length; i += 1) {\n\t\tresult += encode_integer(value[i]);\n\t}\n\n\treturn result;\n}\n\n/** @param {number} num */\nfunction encode_integer(num) {\n\tlet result = '';\n\n\tif (num < 0) {\n\t\tnum = (-num << 1) | 1;\n\t} else {\n\t\tnum <<= 1;\n\t}\n\n\tdo {\n\t\tlet clamped = num & 31;\n\t\tnum >>>= 5;\n\n\t\tif (num > 0) {\n\t\t\tclamped |= 32;\n\t\t}\n\n\t\tresult += integer_to_char[clamped];\n\t} while (num > 0);\n\n\treturn result;\n}\n","import * as vlq from 'vlq';\nexport class SourceMap {\n constructor({ version, sources, names, mappings, }) {\n this.version = version;\n this.sources = sources;\n this.names = names;\n this.mappings = mappings;\n if (this.version !== 3)\n throw new Error(`Only version 3 is supported, got ${this.version}`);\n if (this.mappings === undefined)\n throw new Error('mapping undefined, cannot build source map without `mapping`');\n const pcList = this.mappings.split(';').map((m) => {\n const decoded = vlq.decode(m);\n if (decoded.length > 2)\n return decoded[2];\n return undefined;\n });\n this.pcToLine = {};\n this.lineToPc = {};\n let lastLine = 0;\n for (const [pc, lineDelta] of pcList.entries()) {\n // If the delta is not undefined, the lastLine should be updated with\n // lastLine + the delta\n if (lineDelta !== undefined) {\n lastLine += lineDelta;\n }\n if (!(lastLine in this.lineToPc))\n this.lineToPc[lastLine] = [];\n this.lineToPc[lastLine].push(pc);\n this.pcToLine[pc] = lastLine;\n }\n }\n getLineForPc(pc) {\n return this.pcToLine[pc];\n }\n getPcsForLine(line) {\n return this.lineToPc[line];\n }\n}\n//# sourceMappingURL=sourcemap.js.map","// Utilities\nexport { TransactionType, } from './base';\nexport * from './encoded';\n//# sourceMappingURL=index.js.map","import { Buffer } from 'buffer';\nimport { Application, ApplicationParams, ApplicationStateSchema, DryrunRequest, } from './client/v2/algod/models/types';\nimport { TransactionType } from './types/transactions';\nimport { encodeAddress, getApplicationAddress } from './encoding/address';\nconst defaultAppId = 1380011588;\nconst defaultMaxWidth = 30;\nfunction decodePrograms(ap) {\n // eslint-disable-next-line no-param-reassign\n ap.params['approval-program'] = Buffer.from(ap.params['approval-program'].toString(), 'base64');\n // eslint-disable-next-line no-param-reassign\n ap.params['clear-state-program'] = Buffer.from(ap.params['clear-state-program'].toString(), 'base64');\n return ap;\n}\n/**\n * createDryrun takes an Algod Client (from algod.AlgodV2Client) and an array of Signed Transactions\n * from (transaction.SignedTransaction) and creates a DryrunRequest object with relevant balances\n * @param client - the AlgodClient to make requests against\n * @param txns - the array of SignedTransaction to use for generating the DryrunRequest object\n * @param protocolVersion - the string representing the protocol version to use\n * @param latestTimestamp - the timestamp\n * @returns the DryrunRequest object constructed from the SignedTransactions passed\n */\nexport async function createDryrun({ client, txns, protocolVersion, latestTimestamp, round, sources, }) {\n const appInfos = [];\n const acctInfos = [];\n const apps = [];\n const assets = [];\n const accts = [];\n for (const t of txns) {\n if (t.txn.type === TransactionType.appl) {\n accts.push(encodeAddress(t.txn.from.publicKey));\n if (t.txn.appAccounts)\n accts.push(...t.txn.appAccounts.map((a) => encodeAddress(a.publicKey)));\n if (t.txn.appForeignApps) {\n apps.push(...t.txn.appForeignApps);\n accts.push(...t.txn.appForeignApps.map((aidx) => getApplicationAddress(aidx)));\n }\n if (t.txn.appForeignAssets)\n assets.push(...t.txn.appForeignAssets);\n // Create application,\n if (t.txn.appIndex === undefined || t.txn.appIndex === 0) {\n appInfos.push(new Application({\n id: defaultAppId,\n params: new ApplicationParams({\n creator: encodeAddress(t.txn.from.publicKey),\n approvalProgram: t.txn.appApprovalProgram,\n clearStateProgram: t.txn.appClearProgram,\n localStateSchema: new ApplicationStateSchema({\n numUint: t.txn.appLocalInts,\n numByteSlice: t.txn.appLocalByteSlices,\n }),\n globalStateSchema: new ApplicationStateSchema({\n numUint: t.txn.appGlobalInts,\n numByteSlice: t.txn.appGlobalByteSlices,\n }),\n }),\n }));\n }\n else {\n apps.push(t.txn.appIndex);\n accts.push(getApplicationAddress(t.txn.appIndex));\n }\n }\n }\n // Dedupe and add creator to accts array\n const assetPromises = [];\n for (const assetId of [...new Set(assets)]) {\n assetPromises.push(client\n .getAssetByID(assetId)\n .do()\n .then((assetInfo) => {\n accts.push(assetInfo.params.creator);\n }));\n }\n // Wait for assets to finish since we append to accts array\n await Promise.all(assetPromises);\n // Dedupe and get app info for all apps\n const appPromises = [];\n for (const appId of [...new Set(apps)]) {\n appPromises.push(client\n .getApplicationByID(appId)\n .do()\n .then((appInfo) => {\n const ai = decodePrograms(appInfo);\n appInfos.push(ai);\n accts.push(ai.params.creator);\n }));\n }\n await Promise.all(appPromises);\n const acctPromises = [];\n for (const acct of [...new Set(accts)]) {\n acctPromises.push(client\n .accountInformation(acct)\n .do()\n .then((acctInfo) => {\n if ('created-apps' in acctInfo) {\n // eslint-disable-next-line no-param-reassign\n acctInfo['created-apps'] = acctInfo['created-apps'].map((app) => decodePrograms(app));\n }\n acctInfos.push(acctInfo);\n }));\n }\n await Promise.all(acctPromises);\n return new DryrunRequest({\n txns: txns.map((st) => ({ ...st, txn: st.txn.get_obj_for_encoding() })),\n accounts: acctInfos,\n apps: appInfos,\n latestTimestamp,\n round,\n protocolVersion,\n sources,\n });\n}\nclass DryrunStackValue {\n constructor(sv) {\n this.type = 0;\n this.bytes = '';\n this.uint = 0;\n this.type = sv.type;\n this.bytes = sv.bytes;\n this.uint = sv.uint;\n }\n toString() {\n if (this.type === 1) {\n return `0x${Buffer.from(this.bytes, 'base64').toString('hex')}`;\n }\n return this.uint.toString();\n }\n}\nclass DryrunTraceLine {\n constructor(line) {\n this.error = '';\n this.line = 0;\n this.pc = 0;\n this.scratch = [];\n this.stack = [];\n this.error = line.error === undefined ? '' : line.error;\n this.line = line.line;\n this.pc = line.pc;\n this.scratch = line.scratch;\n this.stack = line.stack.map((sv) => new DryrunStackValue(sv));\n }\n}\nclass DryrunTrace {\n constructor(t) {\n this.trace = [];\n if (t == null)\n return;\n this.trace = t.map((line) => new DryrunTraceLine(line));\n }\n}\nfunction truncate(str, maxValueWidth) {\n if (str.length > maxValueWidth && maxValueWidth > 0) {\n return `${str.slice(0, maxValueWidth)}...`;\n }\n return str;\n}\nfunction scratchToString(prevScratch, currScratch) {\n if (currScratch.length === 0)\n return '';\n let newScratchIdx = null;\n for (let idx = 0; idx < currScratch.length; idx++) {\n if (idx > prevScratch.length) {\n newScratchIdx = idx;\n continue;\n }\n if (JSON.stringify(prevScratch[idx]) !== JSON.stringify(currScratch[idx])) {\n newScratchIdx = idx;\n }\n }\n if (newScratchIdx == null)\n return '';\n const newScratch = currScratch[newScratchIdx];\n if (newScratch.bytes.length > 0) {\n return `${newScratchIdx} = 0x${Buffer.from(newScratch.bytes, 'base64').toString('hex')}`;\n }\n return `${newScratchIdx} = ${newScratch.uint.toString()}`;\n}\nfunction stackToString(stack, reverse) {\n const svs = reverse ? stack.reverse() : stack;\n return `[${svs\n .map((sv) => {\n switch (sv.type) {\n case 1:\n return `0x${Buffer.from(sv.bytes, 'base64').toString('hex')}`;\n case 2:\n return `${sv.uint.toString()}`;\n default:\n return '';\n }\n })\n .join(', ')}]`;\n}\nclass DryrunTransactionResult {\n constructor(dtr) {\n this.disassembly = [];\n this.appCallMessages = [];\n this.localDeltas = [];\n this.globalDelta = [];\n this.cost = 0;\n this.logicSigMessages = [];\n this.logicSigDisassembly = [];\n this.logs = [];\n this.appCallTrace = undefined;\n this.logicSigTrace = undefined;\n this.required = ['disassembly'];\n this.optionals = [\n 'app-call-messages',\n 'local-deltas',\n 'global-delta',\n 'cost',\n 'logic-sig-messages',\n 'logic-sig-disassembly',\n 'logs',\n ];\n this.traces = ['app-call-trace', 'logic-sig-trace'];\n this.disassembly = dtr.disassembly;\n this.appCallMessages = dtr['app-call-messages'];\n this.localDeltas = dtr['local-deltas'];\n this.globalDelta = dtr['global-delta'];\n this.cost = dtr.cost;\n this.logicSigMessages = dtr['logic-sig-messages'];\n this.logicSigDisassembly = dtr['logic-sig-disassembly'];\n this.logs = dtr.logs;\n this.appCallTrace = new DryrunTrace(dtr['app-call-trace']);\n this.logicSigTrace = new DryrunTrace(dtr['logic-sig-trace']);\n }\n appCallRejected() {\n return (this.appCallMessages !== undefined &&\n this.appCallMessages.includes('REJECT'));\n }\n logicSigRejected() {\n return (this.logicSigMessages !== undefined &&\n this.logicSigMessages.includes('REJECT'));\n }\n static trace(drt, disassembly, spc) {\n const maxWidth = spc.maxValueWidth || defaultMaxWidth;\n // Create the array of arrays, each sub array contains N columns\n const lines = [['pc#', 'ln#', 'source', 'scratch', 'stack']];\n for (let idx = 0; idx < drt.trace.length; idx++) {\n const { line, error, pc, scratch, stack } = drt.trace[idx];\n const currScratch = scratch !== undefined ? scratch : [];\n const prevScratch = idx > 0 && drt.trace[idx - 1].scratch !== undefined\n ? drt.trace[idx - 1].scratch\n : [];\n const src = error === '' ? disassembly[line] : `!! ${error} !!`;\n lines.push([\n pc.toString().padEnd(3, ' '),\n line.toString().padEnd(3, ' '),\n truncate(src, maxWidth),\n truncate(scratchToString(prevScratch, currScratch), maxWidth),\n truncate(stackToString(stack, spc.topOfStackFirst), maxWidth),\n ]);\n }\n // Get the max length for each column\n const maxLengths = lines.reduce((prev, curr) => {\n const newVal = new Array(lines[0].length).fill(0);\n for (let idx = 0; idx < prev.length; idx++) {\n newVal[idx] =\n curr[idx].length > prev[idx] ? curr[idx].length : prev[idx];\n }\n return newVal;\n }, new Array(lines[0].length).fill(0));\n return `${lines\n .map((line) => line\n .map((v, idx) => v.padEnd(maxLengths[idx] + 1, ' '))\n .join('|')\n .trim())\n .join('\\n')}\\n`;\n }\n appTrace(spc) {\n if (this.appCallTrace === undefined || !this.disassembly)\n return '';\n let conf = spc;\n if (spc === undefined)\n conf = {\n maxValueWidth: defaultMaxWidth,\n topOfStackFirst: false,\n };\n return DryrunTransactionResult.trace(this.appCallTrace, this.disassembly, conf);\n }\n lsigTrace(spc) {\n if (this.logicSigTrace === undefined ||\n this.logicSigDisassembly === undefined)\n return '';\n let conf = spc;\n if (spc === undefined)\n conf = {\n maxValueWidth: defaultMaxWidth,\n topOfStackFirst: true,\n };\n return DryrunTransactionResult.trace(this.logicSigTrace, this.logicSigDisassembly, conf);\n }\n}\nexport class DryrunResult {\n constructor(drrResp) {\n this.error = '';\n this.protocolVersion = '';\n this.txns = [];\n this.error = drrResp.error;\n this.protocolVersion = drrResp['protocol-version'];\n this.txns = drrResp.txns.map((txn) => new DryrunTransactionResult(txn));\n }\n}\n//# sourceMappingURL=dryrun.js.map","import * as txnBuilder from './transaction';\nimport { OnApplicationComplete } from './types/transactions/base';\nimport { \n// Utilities\nTransactionType, } from './types/transactions';\n/**\n * makePaymentTxnWithSuggestedParams takes payment arguments and returns a Transaction object\n * @param from - string representation of Algorand address of sender\n * @param to - string representation of Algorand address of recipient\n * @param amount - integer amount to send, in microAlgos\n * @param closeRemainderTo - optionally close out remaining account balance to this account, represented as string rep of Algorand address\n * @param note - uint8array of arbitrary data for sender to store\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param rekeyTo - rekeyTo address, optional\n *\n * @deprecated This function will be removed in v3 in favor of {@link makePaymentTxnWithSuggestedParamsFromObject}\n */\nexport function makePaymentTxnWithSuggestedParams(from, to, amount, closeRemainderTo, note, suggestedParams, rekeyTo) {\n const o = {\n from,\n to,\n amount,\n closeRemainderTo,\n note,\n suggestedParams,\n type: TransactionType.pay,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makePaymentTxnWithSuggestedParams, instead accepting an arguments object\nexport function makePaymentTxnWithSuggestedParamsFromObject(o) {\n return makePaymentTxnWithSuggestedParams(o.from, o.to, o.amount, o.closeRemainderTo, o.note, o.suggestedParams, o.rekeyTo);\n}\nexport function makeKeyRegistrationTxnWithSuggestedParams(from, note, voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution, suggestedParams, rekeyTo, nonParticipation = false, stateProofKey = undefined) {\n const o = {\n from,\n note,\n voteKey,\n selectionKey,\n voteFirst,\n voteLast,\n voteKeyDilution,\n suggestedParams,\n type: TransactionType.keyreg,\n reKeyTo: rekeyTo,\n nonParticipation,\n stateProofKey,\n };\n return new txnBuilder.Transaction(o);\n}\nexport function makeKeyRegistrationTxnWithSuggestedParamsFromObject(o) {\n return makeKeyRegistrationTxnWithSuggestedParams(o.from, o.note, o.voteKey, o.selectionKey, o.voteFirst, o.voteLast, o.voteKeyDilution, o.suggestedParams, o.rekeyTo, o.nonParticipation, o.stateProofKey);\n}\n/** makeAssetCreateTxnWithSuggestedParams takes asset creation arguments and returns a Transaction object\n * for creating that asset\n *\n * @param from - string representation of Algorand address of sender\n * @param note - uint8array of arbitrary data for sender to store\n * @param total - integer total supply of the asset\n * @param decimals - integer number of decimals for asset unit calculation\n * @param defaultFrozen - boolean whether asset accounts should default to being frozen\n * @param manager - string representation of Algorand address in charge of reserve, freeze, clawback, destruction, etc\n * @param reserve - string representation of Algorand address representing asset reserve\n * @param freeze - string representation of Algorand address with power to freeze/unfreeze asset holdings\n * @param clawback - string representation of Algorand address with power to revoke asset holdings\n * @param unitName - string units name for this asset\n * @param assetName - string name for this asset\n * @param assetURL - string URL relating to this asset\n * @param assetMetadataHash - Uint8Array or UTF-8 string representation of a hash commitment with respect to the asset. Must be exactly 32 bytes long.\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param rekeyTo - rekeyTo address, optional\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeAssetCreateTxnWithSuggestedParamsFromObject}\n */\nexport function makeAssetCreateTxnWithSuggestedParams(from, note, total, decimals, defaultFrozen, manager, reserve, freeze, clawback, unitName, assetName, assetURL, assetMetadataHash, suggestedParams, rekeyTo) {\n const o = {\n from,\n note,\n suggestedParams,\n assetTotal: total,\n assetDecimals: decimals,\n assetDefaultFrozen: defaultFrozen,\n assetUnitName: unitName,\n assetName,\n assetURL,\n assetMetadataHash,\n assetManager: manager,\n assetReserve: reserve,\n assetFreeze: freeze,\n assetClawback: clawback,\n type: TransactionType.acfg,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeAssetCreateTxnWithSuggestedParams, instead accepting an arguments object\nexport function makeAssetCreateTxnWithSuggestedParamsFromObject(o) {\n return makeAssetCreateTxnWithSuggestedParams(o.from, o.note, o.total, o.decimals, o.defaultFrozen, o.manager, o.reserve, o.freeze, o.clawback, o.unitName, o.assetName, o.assetURL, o.assetMetadataHash, o.suggestedParams, o.rekeyTo);\n}\n/** makeAssetConfigTxnWithSuggestedParams can be issued by the asset manager to change the manager, reserve, freeze, or clawback\n * you must respecify existing addresses to keep them the same; leaving a field blank is the same as turning\n * that feature off for this asset\n *\n * @param from - string representation of Algorand address of sender\n * @param note - uint8array of arbitrary data for sender to store\n * @param assetIndex - int asset index uniquely specifying the asset\n * @param manager - string representation of new asset manager Algorand address\n * @param reserve - string representation of new reserve Algorand address\n * @param freeze - string representation of new freeze manager Algorand address\n * @param clawback - string representation of new revocation manager Algorand address\n * @param strictEmptyAddressChecking - boolean - throw an error if any of manager, reserve, freeze, or clawback are undefined. optional, defaults to true.\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param rekeyTo - rekeyTo address, optional\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeAssetConfigTxnWithSuggestedParamsFromObject}\n */\nexport function makeAssetConfigTxnWithSuggestedParams(from, note, assetIndex, manager, reserve, freeze, clawback, suggestedParams, strictEmptyAddressChecking = true, rekeyTo) {\n if (strictEmptyAddressChecking &&\n (manager === undefined ||\n reserve === undefined ||\n freeze === undefined ||\n clawback === undefined)) {\n throw Error('strict empty address checking was turned on, but at least one empty address was provided');\n }\n const o = {\n from,\n suggestedParams,\n assetIndex,\n assetManager: manager,\n assetReserve: reserve,\n assetFreeze: freeze,\n assetClawback: clawback,\n type: TransactionType.acfg,\n note,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeAssetConfigTxnWithSuggestedParams, instead accepting an arguments object\nexport function makeAssetConfigTxnWithSuggestedParamsFromObject(o) {\n return makeAssetConfigTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.manager, o.reserve, o.freeze, o.clawback, o.suggestedParams, o.strictEmptyAddressChecking, o.rekeyTo);\n}\n/** makeAssetDestroyTxnWithSuggestedParams will allow the asset's manager to remove this asset from the ledger, so long\n * as all outstanding assets are held by the creator.\n *\n * @param from - string representation of Algorand address of sender\n * @param note - uint8array of arbitrary data for sender to store\n * @param assetIndex - int asset index uniquely specifying the asset\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param rekeyTo - rekeyTo address, optional\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeAssetDestroyTxnWithSuggestedParamsFromObject}\n */\nexport function makeAssetDestroyTxnWithSuggestedParams(from, note, assetIndex, suggestedParams, rekeyTo) {\n const o = {\n from,\n suggestedParams,\n assetIndex,\n type: TransactionType.acfg,\n note,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeAssetDestroyTxnWithSuggestedParams, instead accepting an arguments object\nexport function makeAssetDestroyTxnWithSuggestedParamsFromObject(o) {\n return makeAssetDestroyTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.suggestedParams, o.rekeyTo);\n}\n/** makeAssetFreezeTxnWithSuggestedParams will allow the asset's freeze manager to freeze or un-freeze an account,\n * blocking or allowing asset transfers to and from the targeted account.\n *\n * @param from - string representation of Algorand address of sender\n * @param note - uint8array of arbitrary data for sender to store\n * @param assetIndex - int asset index uniquely specifying the asset\n * @param freezeTarget - string representation of Algorand address being frozen or unfrozen\n * @param freezeState - true if freezeTarget should be frozen, false if freezeTarget should be allowed to transact\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param rekeyTo - rekeyTo address, optional\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeAssetFreezeTxnWithSuggestedParamsFromObject}\n */\nexport function makeAssetFreezeTxnWithSuggestedParams(from, note, assetIndex, freezeTarget, freezeState, suggestedParams, rekeyTo) {\n const o = {\n from,\n type: TransactionType.afrz,\n freezeAccount: freezeTarget,\n assetIndex,\n freezeState,\n note,\n suggestedParams,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeAssetFreezeTxnWithSuggestedParams, instead accepting an arguments object\nexport function makeAssetFreezeTxnWithSuggestedParamsFromObject(o) {\n return makeAssetFreezeTxnWithSuggestedParams(o.from, o.note, o.assetIndex, o.freezeTarget, o.freezeState, o.suggestedParams, o.rekeyTo);\n}\n/** makeAssetTransferTxnWithSuggestedParams allows for the creation of an asset transfer transaction.\n * Special case: to begin accepting assets, set amount=0 and from=to.\n *\n * @param from - string representation of Algorand address of sender\n * @param to - string representation of Algorand address of asset recipient\n * @param closeRemainderTo - optional - string representation of Algorand address - if provided,\n * send all remaining assets after transfer to the \"closeRemainderTo\" address and close \"from\"'s asset holdings\n * @param revocationTarget - optional - string representation of Algorand address - if provided,\n * and if \"from\" is the asset's revocation manager, then deduct from \"revocationTarget\" rather than \"from\"\n * @param amount - integer amount of assets to send\n * @param note - uint8array of arbitrary data for sender to store\n * @param assetIndex - int asset index uniquely specifying the asset\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param rekeyTo - rekeyTo address, optional\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeAssetTransferTxnWithSuggestedParamsFromObject}\n */\nexport function makeAssetTransferTxnWithSuggestedParams(from, to, closeRemainderTo, revocationTarget, amount, note, assetIndex, suggestedParams, rekeyTo) {\n const o = {\n type: TransactionType.axfer,\n from,\n to,\n amount,\n suggestedParams,\n assetIndex,\n note,\n assetRevocationTarget: revocationTarget,\n closeRemainderTo,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeAssetTransferTxnWithSuggestedParams, instead accepting an arguments object\nexport function makeAssetTransferTxnWithSuggestedParamsFromObject(o) {\n return makeAssetTransferTxnWithSuggestedParams(o.from, o.to, o.closeRemainderTo, o.revocationTarget, o.amount, o.note, o.assetIndex, o.suggestedParams, o.rekeyTo);\n}\n/**\n * Make a transaction that will create an application.\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param onComplete - algosdk.OnApplicationComplete, what application should do once the program is done being run\n * @param approvalProgram - Uint8Array, the compiled TEAL that approves a transaction\n * @param clearProgram - Uint8Array, the compiled TEAL that runs when clearing state\n * @param numLocalInts - restricts number of ints in per-user local state\n * @param numLocalByteSlices - restricts number of byte slices in per-user local state\n * @param numGlobalInts - restricts number of ints in global state\n * @param numGlobalByteSlices - restricts number of byte slices in global state\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param extraPages - integer extra pages of memory to rent on creation of application\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationCreateTxnFromObject}\n */\nexport function makeApplicationCreateTxn(from, suggestedParams, onComplete, approvalProgram, clearProgram, numLocalInts, numLocalByteSlices, numGlobalInts, numGlobalByteSlices, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, extraPages, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex: 0,\n appOnComplete: onComplete,\n appLocalInts: numLocalInts,\n appLocalByteSlices: numLocalByteSlices,\n appGlobalInts: numGlobalInts,\n appGlobalByteSlices: numGlobalByteSlices,\n appApprovalProgram: approvalProgram,\n appClearProgram: clearProgram,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n extraPages,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationCreateTxn, instead accepting an arguments object\nexport function makeApplicationCreateTxnFromObject(o) {\n return makeApplicationCreateTxn(o.from, o.suggestedParams, o.onComplete, o.approvalProgram, o.clearProgram, o.numLocalInts, o.numLocalByteSlices, o.numGlobalInts, o.numGlobalByteSlices, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.extraPages, o.boxes);\n}\n/**\n * Make a transaction that changes an application's approval and clear programs\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param appIndex - the ID of the app to be updated\n * @param approvalProgram - Uint8Array, the compiled TEAL that approves a transaction\n * @param clearProgram - Uint8Array, the compiled TEAL that runs when clearing state\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationUpdateTxnFromObject}\n */\nexport function makeApplicationUpdateTxn(from, suggestedParams, appIndex, approvalProgram, clearProgram, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex,\n appApprovalProgram: approvalProgram,\n appOnComplete: OnApplicationComplete.UpdateApplicationOC,\n appClearProgram: clearProgram,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationUpdateTxn, instead accepting an arguments object\nexport function makeApplicationUpdateTxnFromObject(o) {\n return makeApplicationUpdateTxn(o.from, o.suggestedParams, o.appIndex, o.approvalProgram, o.clearProgram, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);\n}\n/**\n * Make a transaction that deletes an application\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param appIndex - the ID of the app to be deleted\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationDeleteTxnFromObject}\n */\nexport function makeApplicationDeleteTxn(from, suggestedParams, appIndex, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex,\n appOnComplete: OnApplicationComplete.DeleteApplicationOC,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationDeleteTxn, instead accepting an arguments object\nexport function makeApplicationDeleteTxnFromObject(o) {\n return makeApplicationDeleteTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);\n}\n/**\n * Make a transaction that opts in to use an application\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param appIndex - the ID of the app to join\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationOptInTxnFromObject}\n */\nexport function makeApplicationOptInTxn(from, suggestedParams, appIndex, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex,\n appOnComplete: OnApplicationComplete.OptInOC,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationOptInTxn, instead accepting an argument object\nexport function makeApplicationOptInTxnFromObject(o) {\n return makeApplicationOptInTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);\n}\n/**\n * Make a transaction that closes out a user's state in an application\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param appIndex - the ID of the app to use\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationCloseOutTxnFromObject}\n */\nexport function makeApplicationCloseOutTxn(from, suggestedParams, appIndex, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex,\n appOnComplete: OnApplicationComplete.CloseOutOC,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationCloseOutTxn, instead accepting an argument object\nexport function makeApplicationCloseOutTxnFromObject(o) {\n return makeApplicationCloseOutTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);\n}\n/**\n * Make a transaction that clears a user's state in an application\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param appIndex - the ID of the app to use\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationClearStateTxnFromObject}\n */\nexport function makeApplicationClearStateTxn(from, suggestedParams, appIndex, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex,\n appOnComplete: OnApplicationComplete.ClearStateOC,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationClearStateTxn, instead accepting an argument object\nexport function makeApplicationClearStateTxnFromObject(o) {\n return makeApplicationClearStateTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);\n}\n/**\n * Make a transaction that just calls an application, doing nothing on completion\n * @param from - address of sender\n * @param suggestedParams - a dict holding common-to-all-txns args:\n * fee - integer fee per byte, in microAlgos. for a flat fee, set flatFee to true\n * flatFee - bool optionally set this to true to specify fee as microalgos-per-txn\n * If true, txn fee may fall below the ALGORAND_MIN_TX_FEE\n * firstRound - integer first protocol round on which this txn is valid\n * lastRound - integer last protocol round on which this txn is valid\n * genesisHash - string specifies hash genesis block of network in use\n * genesisID - string specifies genesis ID of network in use\n * @param appIndex - the ID of the app to use\n * @param appArgs - Array of Uint8Array, any additional arguments to the application\n * @param accounts - Array of Address strings, any additional accounts to supply to the application\n * @param foreignApps - Array of int, any other apps used by the application, identified by index\n * @param foreignAssets - Array of int, any assets used by the application, identified by index\n * @param note - Arbitrary data for sender to store\n * @param lease - Lease a transaction\n * @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions\n * @param boxes - Array of BoxReference, app ID and name of box to be accessed\n *\n * @deprecated This function will be removed in v3 in favor of {@link makeApplicationNoOpTxnFromObject}\n */\nexport function makeApplicationNoOpTxn(from, suggestedParams, appIndex, appArgs, accounts, foreignApps, foreignAssets, note, lease, rekeyTo, boxes) {\n const o = {\n type: TransactionType.appl,\n from,\n suggestedParams,\n appIndex,\n appOnComplete: OnApplicationComplete.NoOpOC,\n appArgs,\n appAccounts: accounts,\n appForeignApps: foreignApps,\n appForeignAssets: foreignAssets,\n boxes,\n note,\n lease,\n reKeyTo: rekeyTo,\n };\n return new txnBuilder.Transaction(o);\n}\n// helper for above makeApplicationNoOpTxn, instead accepting an argument object\nexport function makeApplicationNoOpTxnFromObject(o) {\n return makeApplicationNoOpTxn(o.from, o.suggestedParams, o.appIndex, o.appArgs, o.accounts, o.foreignApps, o.foreignAssets, o.note, o.lease, o.rekeyTo, o.boxes);\n}\nexport { OnApplicationComplete } from './types/transactions/base';\n/**\n * Generic function for creating any application call transaction.\n */\nexport function makeApplicationCallTxnFromObject(options) {\n const o = {\n type: TransactionType.appl,\n from: options.from,\n suggestedParams: options.suggestedParams,\n appIndex: options.appIndex,\n appOnComplete: options.onComplete,\n appLocalInts: options.numLocalInts,\n appLocalByteSlices: options.numLocalByteSlices,\n appGlobalInts: options.numGlobalInts,\n appGlobalByteSlices: options.numGlobalByteSlices,\n appApprovalProgram: options.approvalProgram,\n appClearProgram: options.clearProgram,\n appArgs: options.appArgs,\n appAccounts: options.accounts,\n appForeignApps: options.foreignApps,\n appForeignAssets: options.foreignAssets,\n boxes: options.boxes,\n note: options.note,\n lease: options.lease,\n reKeyTo: options.rekeyTo,\n extraPages: options.extraPages,\n };\n return new txnBuilder.Transaction(o);\n}\n//# sourceMappingURL=makeTxn.js.map","import { encodeUnsignedSimulateTransaction } from './transaction';\nimport { signLogicSigTransactionObject } from './logicsig';\nimport { signMultisigTransaction, mergeMultisigTransactions } from './multisig';\n/**\n * Create a TransactionSigner that can sign transactions for the provided basic Account.\n */\nexport function makeBasicAccountTransactionSigner(account) {\n return (txnGroup, indexesToSign) => {\n const signed = [];\n for (const index of indexesToSign) {\n signed.push(txnGroup[index].signTxn(account.sk));\n }\n return Promise.resolve(signed);\n };\n}\n/**\n * Create a TransactionSigner that can sign transactions for the provided LogicSigAccount.\n */\nexport function makeLogicSigAccountTransactionSigner(account) {\n return (txnGroup, indexesToSign) => {\n const signed = [];\n for (const index of indexesToSign) {\n const { blob } = signLogicSigTransactionObject(txnGroup[index], account);\n signed.push(blob);\n }\n return Promise.resolve(signed);\n };\n}\n/**\n * Create a TransactionSigner that can sign transactions for the provided Multisig account.\n * @param msig - The Multisig account metadata\n * @param sks - An array of private keys belonging to the msig which should sign the transactions.\n */\nexport function makeMultiSigAccountTransactionSigner(msig, sks) {\n return (txnGroup, indexesToSign) => {\n const signed = [];\n for (const index of indexesToSign) {\n const txn = txnGroup[index];\n const partialSigs = [];\n for (const sk of sks) {\n const { blob } = signMultisigTransaction(txn, msig, sk);\n partialSigs.push(blob);\n }\n if (partialSigs.length > 1) {\n signed.push(mergeMultisigTransactions(partialSigs));\n }\n else {\n signed.push(partialSigs[0]);\n }\n }\n return Promise.resolve(signed);\n };\n}\n/**\n * Create a makeEmptyTransactionSigner that does not specify any signer or\n * signing capabilities. This should only be used to simulate transactions.\n */\nexport function makeEmptyTransactionSigner() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n return (txnGroup, indexesToSign) => {\n const unsigned = [];\n for (const index of indexesToSign) {\n unsigned.push(encodeUnsignedSimulateTransaction(txnGroup[index]));\n }\n return Promise.resolve(unsigned);\n };\n}\n/**\n * Check if a value conforms to the TransactionWithSigner structure.\n * @param value - The value to check.\n * @returns True if an only if the value has the structure of a TransactionWithSigner.\n */\nexport function isTransactionWithSigner(value) {\n return (typeof value === 'object' &&\n Object.keys(value).length === 2 &&\n typeof value.txn === 'object' &&\n typeof value.signer === 'function');\n}\n//# sourceMappingURL=signer.js.map","/* eslint-disable no-bitwise */\n/* eslint-disable no-use-before-define */\n/* eslint-disable class-methods-use-this */\n/**\n //ABI-Types: uint: An N-bit unsigned integer (8 <= N <= 512 and N % 8 = 0).\n // | byte (alias for uint8)\n // | ufixed x (8 <= N <= 512, N % 8 = 0, and 0 < M <= 160)\n // | bool\n // | address (alias for byte[32])\n // | []\n // | []\n // | string\n // | (T1, ..., Tn)\n*/\nimport { Buffer } from 'buffer';\nimport { encodeAddress, decodeAddress } from '../encoding/address';\nimport { bigIntToBytes, bytesToBigInt } from '../encoding/bigint';\nimport { concatArrays } from '../utils/utils';\nexport const MAX_LEN = 2 ** 16 - 1;\nexport const ADDR_BYTE_SIZE = 32;\nexport const SINGLE_BYTE_SIZE = 1;\nexport const SINGLE_BOOL_SIZE = 1;\nexport const LENGTH_ENCODE_BYTE_SIZE = 2;\nconst staticArrayRegexp = /^([a-z\\d[\\](),]+)\\[(0|[1-9][\\d]*)]$/;\nconst ufixedRegexp = /^ufixed([1-9][\\d]*)x([1-9][\\d]*)$/;\nexport class ABIType {\n // De-serializes the ABI type from a string using the ABI specs\n static from(str) {\n if (str.endsWith('[]')) {\n const arrayArgType = ABIType.from(str.slice(0, str.length - 2));\n return new ABIArrayDynamicType(arrayArgType);\n }\n if (str.endsWith(']')) {\n const stringMatches = str.match(staticArrayRegexp);\n // Match the string itself, array element type, then array length\n if (stringMatches.length !== 3) {\n throw new Error(`malformed static array string: ${str}`);\n }\n // Parse static array using regex\n const arrayLengthStr = stringMatches[2];\n const arrayLength = parseInt(arrayLengthStr, 10);\n if (arrayLength > MAX_LEN) {\n throw new Error(`array length exceeds limit ${MAX_LEN}`);\n }\n // Parse the array element type\n const arrayType = ABIType.from(stringMatches[1]);\n return new ABIArrayStaticType(arrayType, arrayLength);\n }\n if (str.startsWith('uint')) {\n // Checks if the parsed number contains only digits, no whitespaces\n const digitsOnly = (string) => [...string].every((c) => '0123456789'.includes(c));\n const typeSizeStr = str.slice(4, str.length);\n if (!digitsOnly(typeSizeStr)) {\n throw new Error(`malformed uint string: ${typeSizeStr}`);\n }\n const typeSize = parseInt(typeSizeStr, 10);\n if (typeSize > MAX_LEN) {\n throw new Error(`malformed uint string: ${typeSize}`);\n }\n return new ABIUintType(typeSize);\n }\n if (str === 'byte') {\n return new ABIByteType();\n }\n if (str.startsWith('ufixed')) {\n const stringMatches = str.match(ufixedRegexp);\n if (stringMatches.length !== 3) {\n throw new Error(`malformed ufixed type: ${str}`);\n }\n const ufixedSize = parseInt(stringMatches[1], 10);\n const ufixedPrecision = parseInt(stringMatches[2], 10);\n return new ABIUfixedType(ufixedSize, ufixedPrecision);\n }\n if (str === 'bool') {\n return new ABIBoolType();\n }\n if (str === 'address') {\n return new ABIAddressType();\n }\n if (str === 'string') {\n return new ABIStringType();\n }\n if (str.length >= 2 && str[0] === '(' && str[str.length - 1] === ')') {\n const tupleContent = ABITupleType.parseTupleContent(str.slice(1, str.length - 1));\n const tupleTypes = [];\n for (let i = 0; i < tupleContent.length; i++) {\n const ti = ABIType.from(tupleContent[i]);\n tupleTypes.push(ti);\n }\n return new ABITupleType(tupleTypes);\n }\n throw new Error(`cannot convert a string ${str} to an ABI type`);\n }\n}\nexport class ABIUintType extends ABIType {\n constructor(size) {\n super();\n if (size % 8 !== 0 || size < 8 || size > 512) {\n throw new Error(`unsupported uint type bitSize: ${size}`);\n }\n this.bitSize = size;\n }\n toString() {\n return `uint${this.bitSize}`;\n }\n equals(other) {\n return other instanceof ABIUintType && this.bitSize === other.bitSize;\n }\n isDynamic() {\n return false;\n }\n byteLen() {\n return this.bitSize / 8;\n }\n encode(value) {\n if (typeof value !== 'bigint' && typeof value !== 'number') {\n throw new Error(`Cannot encode value as uint${this.bitSize}: ${value}`);\n }\n if (value >= BigInt(2 ** this.bitSize) || value < BigInt(0)) {\n throw new Error(`${value} is not a non-negative int or too big to fit in size uint${this.bitSize}`);\n }\n if (typeof value === 'number' && !Number.isSafeInteger(value)) {\n throw new Error(`${value} should be converted into a BigInt before it is encoded`);\n }\n return bigIntToBytes(value, this.bitSize / 8);\n }\n decode(byteString) {\n if (byteString.length !== this.bitSize / 8) {\n throw new Error(`byte string must correspond to a uint${this.bitSize}`);\n }\n return bytesToBigInt(byteString);\n }\n}\nexport class ABIUfixedType extends ABIType {\n constructor(size, denominator) {\n super();\n if (size % 8 !== 0 || size < 8 || size > 512) {\n throw new Error(`unsupported ufixed type bitSize: ${size}`);\n }\n if (denominator > 160 || denominator < 1) {\n throw new Error(`unsupported ufixed type precision: ${denominator}`);\n }\n this.bitSize = size;\n this.precision = denominator;\n }\n toString() {\n return `ufixed${this.bitSize}x${this.precision}`;\n }\n equals(other) {\n return (other instanceof ABIUfixedType &&\n this.bitSize === other.bitSize &&\n this.precision === other.precision);\n }\n isDynamic() {\n return false;\n }\n byteLen() {\n return this.bitSize / 8;\n }\n encode(value) {\n if (typeof value !== 'bigint' && typeof value !== 'number') {\n throw new Error(`Cannot encode value as ${this.toString()}: ${value}`);\n }\n if (value >= BigInt(2 ** this.bitSize) || value < BigInt(0)) {\n throw new Error(`${value} is not a non-negative int or too big to fit in size ${this.toString()}`);\n }\n if (typeof value === 'number' && !Number.isSafeInteger(value)) {\n throw new Error(`${value} should be converted into a BigInt before it is encoded`);\n }\n return bigIntToBytes(value, this.bitSize / 8);\n }\n decode(byteString) {\n if (byteString.length !== this.bitSize / 8) {\n throw new Error(`byte string must correspond to a ${this.toString()}`);\n }\n return bytesToBigInt(byteString);\n }\n}\nexport class ABIAddressType extends ABIType {\n toString() {\n return 'address';\n }\n equals(other) {\n return other instanceof ABIAddressType;\n }\n isDynamic() {\n return false;\n }\n byteLen() {\n return ADDR_BYTE_SIZE;\n }\n encode(value) {\n if (typeof value !== 'string' && !(value instanceof Uint8Array)) {\n throw new Error(`Cannot encode value as ${this.toString()}: ${value}`);\n }\n if (typeof value === 'string') {\n const decodedAddress = decodeAddress(value);\n return decodedAddress.publicKey;\n }\n // Return the address if it is already in bytes\n if (value.byteLength !== 32) {\n throw new Error(`byte string must be 32 bytes long for an address`);\n }\n return value;\n }\n decode(byteString) {\n if (byteString.byteLength !== 32) {\n throw new Error(`byte string must be 32 bytes long for an address`);\n }\n return encodeAddress(byteString);\n }\n}\nexport class ABIBoolType extends ABIType {\n toString() {\n return 'bool';\n }\n equals(other) {\n return other instanceof ABIBoolType;\n }\n isDynamic() {\n return false;\n }\n byteLen() {\n return SINGLE_BOOL_SIZE;\n }\n encode(value) {\n if (typeof value !== 'boolean') {\n throw new Error(`Cannot encode value as bool: ${value}`);\n }\n if (value) {\n return new Uint8Array([128]);\n }\n return new Uint8Array([0]);\n }\n decode(byteString) {\n if (byteString.byteLength !== 1) {\n throw new Error(`bool string must be 1 byte long`);\n }\n const value = byteString[0];\n if (value === 128) {\n return true;\n }\n if (value === 0) {\n return false;\n }\n throw new Error(`boolean could not be decoded from the byte string`);\n }\n}\nexport class ABIByteType extends ABIType {\n toString() {\n return 'byte';\n }\n equals(other) {\n return other instanceof ABIByteType;\n }\n isDynamic() {\n return false;\n }\n byteLen() {\n return SINGLE_BYTE_SIZE;\n }\n encode(value) {\n if (typeof value !== 'number' && typeof value !== 'bigint') {\n throw new Error(`Cannot encode value as byte: ${value}`);\n }\n if (typeof value === 'bigint') {\n // eslint-disable-next-line no-param-reassign\n value = Number(value);\n }\n if (value < 0 || value > 255) {\n throw new Error(`${value} cannot be encoded into a byte`);\n }\n return new Uint8Array([value]);\n }\n decode(byteString) {\n if (byteString.byteLength !== 1) {\n throw new Error(`byte string must be 1 byte long`);\n }\n return byteString[0];\n }\n}\nexport class ABIStringType extends ABIType {\n toString() {\n return 'string';\n }\n equals(other) {\n return other instanceof ABIStringType;\n }\n isDynamic() {\n return true;\n }\n byteLen() {\n throw new Error(`${this.toString()} is a dynamic type`);\n }\n encode(value) {\n if (typeof value !== 'string' && !(value instanceof Uint8Array)) {\n throw new Error(`Cannot encode value as string: ${value}`);\n }\n const encodedBytes = Buffer.from(value);\n const encodedLength = bigIntToBytes(encodedBytes.length, LENGTH_ENCODE_BYTE_SIZE);\n const mergedBytes = new Uint8Array(encodedBytes.length + LENGTH_ENCODE_BYTE_SIZE);\n mergedBytes.set(encodedLength);\n mergedBytes.set(encodedBytes, LENGTH_ENCODE_BYTE_SIZE);\n return mergedBytes;\n }\n decode(byteString) {\n if (byteString.length < LENGTH_ENCODE_BYTE_SIZE) {\n throw new Error(`byte string is too short to be decoded. Actual length is ${byteString.length}, but expected at least ${LENGTH_ENCODE_BYTE_SIZE}`);\n }\n const buf = Buffer.from(byteString);\n const byteLength = buf.readUIntBE(0, LENGTH_ENCODE_BYTE_SIZE);\n const byteValue = byteString.slice(LENGTH_ENCODE_BYTE_SIZE, byteString.length);\n if (byteLength !== byteValue.length) {\n throw new Error(`string length bytes do not match the actual length of string. Expected ${byteLength}, got ${byteValue.length}`);\n }\n return Buffer.from(byteValue).toString('utf-8');\n }\n}\nexport class ABIArrayStaticType extends ABIType {\n constructor(argType, arrayLength) {\n super();\n if (arrayLength < 0) {\n throw new Error(`static array must have a non negative length: ${arrayLength}`);\n }\n this.childType = argType;\n this.staticLength = arrayLength;\n }\n toString() {\n return `${this.childType.toString()}[${this.staticLength}]`;\n }\n equals(other) {\n return (other instanceof ABIArrayStaticType &&\n this.staticLength === other.staticLength &&\n this.childType.equals(other.childType));\n }\n isDynamic() {\n return this.childType.isDynamic();\n }\n byteLen() {\n if (this.childType.constructor === ABIBoolType) {\n return Math.ceil(this.staticLength / 8);\n }\n return this.staticLength * this.childType.byteLen();\n }\n encode(value) {\n if (!Array.isArray(value) && !(value instanceof Uint8Array)) {\n throw new Error(`Cannot encode value as ${this.toString()}: ${value}`);\n }\n if (value.length !== this.staticLength) {\n throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${value.length}`);\n }\n const convertedTuple = this.toABITupleType();\n return convertedTuple.encode(value);\n }\n decode(byteString) {\n const convertedTuple = this.toABITupleType();\n return convertedTuple.decode(byteString);\n }\n toABITupleType() {\n return new ABITupleType(Array(this.staticLength).fill(this.childType));\n }\n}\nexport class ABIArrayDynamicType extends ABIType {\n constructor(argType) {\n super();\n this.childType = argType;\n }\n toString() {\n return `${this.childType.toString()}[]`;\n }\n equals(other) {\n return (other instanceof ABIArrayDynamicType &&\n this.childType.equals(other.childType));\n }\n isDynamic() {\n return true;\n }\n byteLen() {\n throw new Error(`${this.toString()} is a dynamic type`);\n }\n encode(value) {\n if (!Array.isArray(value) && !(value instanceof Uint8Array)) {\n throw new Error(`Cannot encode value as ${this.toString()}: ${value}`);\n }\n const convertedTuple = this.toABITupleType(value.length);\n const encodedTuple = convertedTuple.encode(value);\n const encodedLength = bigIntToBytes(convertedTuple.childTypes.length, LENGTH_ENCODE_BYTE_SIZE);\n const mergedBytes = concatArrays(encodedLength, encodedTuple);\n return mergedBytes;\n }\n decode(byteString) {\n const buf = Buffer.from(byteString);\n const byteLength = buf.readUIntBE(0, LENGTH_ENCODE_BYTE_SIZE);\n const convertedTuple = this.toABITupleType(byteLength);\n return convertedTuple.decode(byteString.slice(LENGTH_ENCODE_BYTE_SIZE, byteString.length));\n }\n toABITupleType(length) {\n return new ABITupleType(Array(length).fill(this.childType));\n }\n}\nexport class ABITupleType extends ABIType {\n constructor(argTypes) {\n super();\n if (argTypes.length >= MAX_LEN) {\n throw new Error('tuple type child type number larger than maximum uint16 error');\n }\n this.childTypes = argTypes;\n }\n toString() {\n const typeStrings = [];\n for (let i = 0; i < this.childTypes.length; i++) {\n typeStrings[i] = this.childTypes[i].toString();\n }\n return `(${typeStrings.join(',')})`;\n }\n equals(other) {\n return (other instanceof ABITupleType &&\n this.childTypes.length === other.childTypes.length &&\n this.childTypes.every((child, index) => child.equals(other.childTypes[index])));\n }\n isDynamic() {\n const isDynamic = (child) => child.isDynamic();\n return this.childTypes.some(isDynamic);\n }\n byteLen() {\n let size = 0;\n for (let i = 0; i < this.childTypes.length; i++) {\n if (this.childTypes[i].constructor === ABIBoolType) {\n const after = findBoolLR(this.childTypes, i, 1);\n const boolNum = after + 1;\n i += after;\n size += Math.trunc((boolNum + 7) / 8);\n }\n else {\n const childByteSize = this.childTypes[i].byteLen();\n size += childByteSize;\n }\n }\n return size;\n }\n encode(value) {\n if (!Array.isArray(value) && !(value instanceof Uint8Array)) {\n throw new Error(`Cannot encode value as ${this.toString()}: ${value}`);\n }\n const values = Array.from(value);\n if (value.length > MAX_LEN) {\n throw new Error('length of tuple array should not exceed a uint16');\n }\n const tupleTypes = this.childTypes;\n const heads = [];\n const tails = [];\n const isDynamicIndex = new Map();\n let i = 0;\n while (i < tupleTypes.length) {\n const tupleType = tupleTypes[i];\n if (tupleType.isDynamic()) {\n // Head is not pre-determined for dynamic types; store a placeholder for now\n isDynamicIndex.set(heads.length, true);\n heads.push(new Uint8Array([0, 0]));\n tails.push(tupleType.encode(values[i]));\n }\n else {\n if (tupleType.constructor === ABIBoolType) {\n const before = findBoolLR(tupleTypes, i, -1);\n let after = findBoolLR(tupleTypes, i, 1);\n // Pack bytes to heads and tails\n if (before % 8 !== 0) {\n throw new Error('expected before index should have number of bool mod 8 equal 0');\n }\n after = Math.min(7, after);\n const compressedInt = compressMultipleBool(values.slice(i, i + after + 1));\n heads.push(bigIntToBytes(compressedInt, 1));\n i += after;\n }\n else {\n const encodedTupleValue = tupleType.encode(values[i]);\n heads.push(encodedTupleValue);\n }\n isDynamicIndex.set(i, false);\n tails.push(new Uint8Array());\n }\n i += 1;\n }\n // Adjust head lengths for dynamic types\n let headLength = 0;\n for (const headElement of heads) {\n headLength += headElement.length;\n }\n // encode any placeholders for dynamic types\n let tailLength = 0;\n for (let j = 0; j < heads.length; j++) {\n if (isDynamicIndex.get(j)) {\n const headValue = headLength + tailLength;\n if (headValue > MAX_LEN) {\n throw new Error(`byte length of ${headValue} should not exceed a uint16`);\n }\n heads[j] = bigIntToBytes(headValue, LENGTH_ENCODE_BYTE_SIZE);\n }\n tailLength += tails[j].length;\n }\n return concatArrays(...heads, ...tails);\n }\n decode(byteString) {\n const tupleTypes = this.childTypes;\n const dynamicSegments = [];\n const valuePartition = [];\n let i = 0;\n let iterIndex = 0;\n const buf = Buffer.from(byteString);\n while (i < tupleTypes.length) {\n const tupleType = tupleTypes[i];\n if (tupleType.isDynamic()) {\n if (byteString.slice(iterIndex, byteString.length).length <\n LENGTH_ENCODE_BYTE_SIZE) {\n throw new Error('dynamic type in tuple is too short to be decoded');\n }\n const dynamicIndex = buf.readUIntBE(iterIndex, LENGTH_ENCODE_BYTE_SIZE);\n if (dynamicSegments.length > 0) {\n dynamicSegments[dynamicSegments.length - 1].right = dynamicIndex;\n // Check that right side of segment is greater than the left side\n if (dynamicIndex < dynamicSegments[dynamicSegments.length - 1].left) {\n throw new Error('dynamic index segment miscalculation: left is greater than right index');\n }\n }\n // Since we do not know where the current dynamic element ends, put a placeholder and update later\n const seg = {\n left: dynamicIndex,\n right: -1,\n };\n dynamicSegments.push(seg);\n valuePartition.push(null);\n iterIndex += LENGTH_ENCODE_BYTE_SIZE;\n }\n else {\n // eslint-disable-next-line no-lonely-if\n if (tupleType.constructor === ABIBoolType) {\n const before = findBoolLR(this.childTypes, i, -1);\n let after = findBoolLR(this.childTypes, i, 1);\n if (before % 8 !== 0) {\n throw new Error('expected before bool number mod 8 === 0');\n }\n after = Math.min(7, after);\n // Parse bool in a byte to multiple byte strings\n for (let boolIndex = 0; boolIndex <= after; boolIndex++) {\n const boolMask = 0x80 >> boolIndex;\n if ((byteString[iterIndex] & boolMask) > 0) {\n valuePartition.push(new Uint8Array([128]));\n }\n else {\n valuePartition.push(new Uint8Array([0]));\n }\n }\n i += after;\n iterIndex += 1;\n }\n else {\n const currLen = tupleType.byteLen();\n valuePartition.push(byteString.slice(iterIndex, iterIndex + currLen));\n iterIndex += currLen;\n }\n }\n if (i !== tupleTypes.length - 1 && iterIndex >= byteString.length) {\n throw new Error('input byte not enough to decode');\n }\n i += 1;\n }\n if (dynamicSegments.length > 0) {\n dynamicSegments[dynamicSegments.length - 1].right = byteString.length;\n iterIndex = byteString.length;\n }\n if (iterIndex < byteString.length) {\n throw new Error('input byte not fully consumed');\n }\n // Check segment indices are valid\n // If the dynamic segment are not consecutive and well-ordered, we return error\n for (let j = 0; j < dynamicSegments.length; j++) {\n const seg = dynamicSegments[j];\n if (seg.left > seg.right) {\n throw new Error('dynamic segment should display a [l, r] space with l <= r');\n }\n if (j !== dynamicSegments.length - 1 &&\n seg.right !== dynamicSegments[j + 1].left) {\n throw new Error('dynamic segment should be consecutive');\n }\n }\n // Check dynamic element partitions\n let segIndex = 0;\n for (let j = 0; j < tupleTypes.length; j++) {\n if (tupleTypes[j].isDynamic()) {\n valuePartition[j] = byteString.slice(dynamicSegments[segIndex].left, dynamicSegments[segIndex].right);\n segIndex += 1;\n }\n }\n // Decode each tuple element\n const returnValues = [];\n for (let j = 0; j < tupleTypes.length; j++) {\n const valueTi = tupleTypes[j].decode(valuePartition[j]);\n returnValues.push(valueTi);\n }\n return returnValues;\n }\n static parseTupleContent(str) {\n if (str.length === 0) {\n return [];\n }\n if (str.endsWith(',') || str.startsWith(',')) {\n throw new Error('tuple string should not start with comma');\n }\n if (str.includes(',,')) {\n throw new Error('tuple string should not have consecutive commas');\n }\n const tupleStrings = [];\n let depth = 0;\n let word = '';\n for (const char of str) {\n word += char;\n if (char === '(') {\n depth += 1;\n }\n else if (char === ')') {\n depth -= 1;\n }\n else if (char === ',') {\n // If the comma is at depth 0, then append the word as token.\n if (depth === 0) {\n tupleStrings.push(word.slice(0, word.length - 1));\n word = '';\n }\n }\n }\n if (word.length !== 0) {\n tupleStrings.push(word);\n }\n if (depth !== 0) {\n throw new Error('tuple string has mismatched parentheses');\n }\n return tupleStrings;\n }\n}\n// compressMultipleBool compresses consecutive bool values into a byte in ABI tuple / array value.\nfunction compressMultipleBool(valueList) {\n let res = 0;\n if (valueList.length > 8) {\n throw new Error('value list passed in should be no greater than length 8');\n }\n for (let i = 0; i < valueList.length; i++) {\n const boolVal = valueList[i];\n if (typeof boolVal !== 'boolean') {\n throw new Error('non-boolean values cannot be compressed into a byte');\n }\n if (boolVal) {\n res |= 1 << (7 - i);\n }\n }\n return res;\n}\n// Assume that the current index on the list of type is an ABI bool type.\n// It returns the difference between the current index and the index of the furthest consecutive Bool type.\nfunction findBoolLR(typeList, index, delta) {\n let until = 0;\n while (true) {\n const curr = index + delta * until;\n if (typeList[curr].constructor === ABIBoolType) {\n if (curr !== typeList.length - 1 && delta === 1) {\n until += 1;\n }\n else if (curr > 0 && delta === -1) {\n until += 1;\n }\n else {\n break;\n }\n }\n else {\n until -= 1;\n break;\n }\n }\n return until;\n}\n//# sourceMappingURL=abi_type.js.map","export var ABITransactionType;\n(function (ABITransactionType) {\n /**\n * Any transaction type\n */\n ABITransactionType[\"any\"] = \"txn\";\n /**\n * Payment transaction type\n */\n ABITransactionType[\"pay\"] = \"pay\";\n /**\n * Key registration transaction type\n */\n ABITransactionType[\"keyreg\"] = \"keyreg\";\n /**\n * Asset configuration transaction type\n */\n ABITransactionType[\"acfg\"] = \"acfg\";\n /**\n * Asset transfer transaction type\n */\n ABITransactionType[\"axfer\"] = \"axfer\";\n /**\n * Asset freeze transaction type\n */\n ABITransactionType[\"afrz\"] = \"afrz\";\n /**\n * Application transaction type\n */\n ABITransactionType[\"appl\"] = \"appl\";\n})(ABITransactionType || (ABITransactionType = {}));\nexport function abiTypeIsTransaction(type) {\n return (type === ABITransactionType.any ||\n type === ABITransactionType.pay ||\n type === ABITransactionType.keyreg ||\n type === ABITransactionType.acfg ||\n type === ABITransactionType.axfer ||\n type === ABITransactionType.afrz ||\n type === ABITransactionType.appl);\n}\nexport function abiCheckTransactionType(type, txn) {\n if (type === ABITransactionType.any) {\n return true;\n }\n return txn.type && txn.type.toString() === type.toString();\n}\n//# sourceMappingURL=transaction.js.map","export var ABIReferenceType;\n(function (ABIReferenceType) {\n /**\n * Account reference type\n */\n ABIReferenceType[\"account\"] = \"account\";\n /**\n * Application reference type\n */\n ABIReferenceType[\"application\"] = \"application\";\n /**\n * Asset reference type\n */\n ABIReferenceType[\"asset\"] = \"asset\";\n})(ABIReferenceType || (ABIReferenceType = {}));\nexport function abiTypeIsReference(type) {\n return (type === ABIReferenceType.account ||\n type === ABIReferenceType.application ||\n type === ABIReferenceType.asset);\n}\n//# sourceMappingURL=reference.js.map","import { genericHash } from '../nacl/naclWrappers';\nimport { ABIType, ABITupleType } from './abi_type';\nimport { abiTypeIsTransaction } from './transaction';\nimport { abiTypeIsReference } from './reference';\nfunction parseMethodSignature(signature) {\n const argsStart = signature.indexOf('(');\n if (argsStart === -1) {\n throw new Error(`Invalid method signature: ${signature}`);\n }\n let argsEnd = -1;\n let depth = 0;\n for (let i = argsStart; i < signature.length; i++) {\n const char = signature[i];\n if (char === '(') {\n depth += 1;\n }\n else if (char === ')') {\n if (depth === 0) {\n // unpaired parenthesis\n break;\n }\n depth -= 1;\n if (depth === 0) {\n argsEnd = i;\n break;\n }\n }\n }\n if (argsEnd === -1) {\n throw new Error(`Invalid method signature: ${signature}`);\n }\n return {\n name: signature.slice(0, argsStart),\n args: ABITupleType.parseTupleContent(signature.slice(argsStart + 1, argsEnd)),\n returns: signature.slice(argsEnd + 1),\n };\n}\nexport class ABIMethod {\n constructor(params) {\n if (typeof params.name !== 'string' ||\n typeof params.returns !== 'object' ||\n !Array.isArray(params.args)) {\n throw new Error('Invalid ABIMethod parameters');\n }\n this.name = params.name;\n this.description = params.desc;\n this.args = params.args.map(({ type, name, desc }) => {\n if (abiTypeIsTransaction(type) || abiTypeIsReference(type)) {\n return {\n type,\n name,\n description: desc,\n };\n }\n return {\n type: ABIType.from(type),\n name,\n description: desc,\n };\n });\n this.returns = {\n type: params.returns.type === 'void'\n ? params.returns.type\n : ABIType.from(params.returns.type),\n description: params.returns.desc,\n };\n this.events = params.events;\n this.readonly = params.readonly;\n }\n getSignature() {\n const args = this.args.map((arg) => arg.type.toString()).join(',');\n const returns = this.returns.type.toString();\n return `${this.name}(${args})${returns}`;\n }\n getSelector() {\n const hash = genericHash(this.getSignature());\n return new Uint8Array(hash.slice(0, 4));\n }\n txnCount() {\n let count = 1;\n for (const arg of this.args) {\n if (typeof arg.type === 'string' && abiTypeIsTransaction(arg.type)) {\n count += 1;\n }\n }\n return count;\n }\n toJSON() {\n return {\n name: this.name,\n desc: this.description,\n args: this.args.map(({ type, name, description }) => ({\n type: type.toString(),\n name,\n desc: description,\n })),\n returns: {\n type: this.returns.type.toString(),\n desc: this.returns.description,\n },\n events: this.events,\n readonly: this.readonly,\n };\n }\n static fromSignature(signature) {\n const { name, args, returns } = parseMethodSignature(signature);\n return new ABIMethod({\n name,\n args: args.map((arg) => ({ type: arg })),\n returns: { type: returns },\n });\n }\n}\nexport function getMethodByName(methods, name) {\n if (methods === null ||\n !Array.isArray(methods) ||\n !methods.every((item) => item instanceof ABIMethod))\n throw new Error('Methods list provided is null or not the correct type');\n const filteredMethods = methods.filter((m) => m.name === name);\n if (filteredMethods.length > 1)\n throw new Error(`found ${filteredMethods.length} methods with the same name ${filteredMethods\n .map((m) => m.getSignature())\n .join(',')}`);\n if (filteredMethods.length === 0)\n throw new Error(`found 0 methods with the name ${name}`);\n return filteredMethods[0];\n}\n//# sourceMappingURL=method.js.map","import { ABIMethod, getMethodByName } from './method';\nexport class ABIContract {\n constructor(params) {\n if (typeof params.name !== 'string' ||\n !Array.isArray(params.methods) ||\n (params.networks && typeof params.networks !== 'object')) {\n throw new Error('Invalid ABIContract parameters');\n }\n this.name = params.name;\n this.description = params.desc;\n this.networks = params.networks ? { ...params.networks } : {};\n this.methods = params.methods.map((method) => new ABIMethod(method));\n this.events = params.events;\n }\n toJSON() {\n return {\n name: this.name,\n desc: this.description,\n networks: this.networks,\n methods: this.methods.map((method) => method.toJSON()),\n events: this.events,\n };\n }\n getMethodByName(name) {\n return getMethodByName(this.methods, name);\n }\n}\n//# sourceMappingURL=contract.js.map","import { ABIMethod, getMethodByName } from './method';\nexport class ABIInterface {\n constructor(params) {\n if (typeof params.name !== 'string' || !Array.isArray(params.methods)) {\n throw new Error('Invalid ABIInterface parameters');\n }\n this.name = params.name;\n this.description = params.desc;\n this.methods = params.methods.map((method) => new ABIMethod(method));\n }\n toJSON() {\n return {\n name: this.name,\n desc: this.description,\n methods: this.methods.map((method) => method.toJSON()),\n };\n }\n getMethodByName(name) {\n return getMethodByName(this.methods, name);\n }\n}\n//# sourceMappingURL=interface.js.map","export * from './abi_type';\nexport * from './contract';\nexport * from './interface';\nexport * from './method';\nexport * from './transaction';\nexport * from './reference';\n//# sourceMappingURL=index.js.map","import { Buffer } from 'buffer';\nimport { ABIAddressType, abiCheckTransactionType, ABIReferenceType, ABITupleType, abiTypeIsReference, abiTypeIsTransaction, ABIUintType, } from './abi';\nimport { SimulateRequest, SimulateRequestTransactionGroup, } from './client/v2/algod/models/types';\nimport { assignGroupID } from './group';\nimport { makeApplicationCallTxnFromObject } from './makeTxn';\nimport { isTransactionWithSigner, } from './signer';\nimport { decodeSignedTransaction, Transaction } from './transaction';\nimport { OnApplicationComplete, } from './types/transactions/base';\nimport { waitForConfirmation } from './wait';\nimport * as encoding from './encoding/encoding';\n// First 4 bytes of SHA-512/256 hash of \"return\"\nconst RETURN_PREFIX = Buffer.from([21, 31, 124, 117]);\n// The maximum number of arguments for an application call transaction\nconst MAX_APP_ARGS = 16;\nexport var AtomicTransactionComposerStatus;\n(function (AtomicTransactionComposerStatus) {\n /** The atomic group is still under construction. */\n AtomicTransactionComposerStatus[AtomicTransactionComposerStatus[\"BUILDING\"] = 0] = \"BUILDING\";\n /** The atomic group has been finalized, but not yet signed. */\n AtomicTransactionComposerStatus[AtomicTransactionComposerStatus[\"BUILT\"] = 1] = \"BUILT\";\n /** The atomic group has been finalized and signed, but not yet submitted to the network. */\n AtomicTransactionComposerStatus[AtomicTransactionComposerStatus[\"SIGNED\"] = 2] = \"SIGNED\";\n /** The atomic group has been finalized, signed, and submitted to the network. */\n AtomicTransactionComposerStatus[AtomicTransactionComposerStatus[\"SUBMITTED\"] = 3] = \"SUBMITTED\";\n /** The atomic group has been finalized, signed, submitted, and successfully committed to a block. */\n AtomicTransactionComposerStatus[AtomicTransactionComposerStatus[\"COMMITTED\"] = 4] = \"COMMITTED\";\n})(AtomicTransactionComposerStatus || (AtomicTransactionComposerStatus = {}));\n/**\n * Add a value to an application call's foreign array. The addition will be as compact as possible,\n * and this function will return an index that can be used to reference `valueToAdd` in `array`.\n *\n * @param valueToAdd - The value to add to the array. If this value is already present in the array,\n * it will not be added again. Instead, the existing index will be returned.\n * @param array - The existing foreign array. This input may be modified to append `valueToAdd`.\n * @param zeroValue - If provided, this value indicated two things: the 0 value is special for this\n * array, so all indexes into `array` must start at 1; additionally, if `valueToAdd` equals\n * `zeroValue`, then `valueToAdd` will not be added to the array, and instead the 0 indexes will\n * be returned.\n * @returns An index that can be used to reference `valueToAdd` in `array`.\n */\nfunction populateForeignArray(valueToAdd, array, zeroValue) {\n if (zeroValue != null && valueToAdd === zeroValue) {\n return 0;\n }\n const offset = zeroValue == null ? 0 : 1;\n for (let i = 0; i < array.length; i++) {\n if (valueToAdd === array[i]) {\n return i + offset;\n }\n }\n array.push(valueToAdd);\n return array.length - 1 + offset;\n}\n/** A class used to construct and execute atomic transaction groups */\nexport class AtomicTransactionComposer {\n constructor() {\n this.status = AtomicTransactionComposerStatus.BUILDING;\n this.transactions = [];\n this.methodCalls = new Map();\n this.signedTxns = [];\n this.txIDs = [];\n }\n /**\n * Get the status of this composer's transaction group.\n */\n getStatus() {\n return this.status;\n }\n /**\n * Get the number of transactions currently in this atomic group.\n */\n count() {\n return this.transactions.length;\n }\n /**\n * Create a new composer with the same underlying transactions. The new composer's status will be\n * BUILDING, so additional transactions may be added to it.\n */\n clone() {\n const theClone = new AtomicTransactionComposer();\n theClone.transactions = this.transactions.map(({ txn, signer }) => ({\n // not quite a deep copy, but good enough for our purposes (modifying txn.group in buildGroup)\n txn: Transaction.from_obj_for_encoding({\n ...txn.get_obj_for_encoding(),\n // erase the group ID\n grp: undefined,\n }),\n signer,\n }));\n theClone.methodCalls = new Map(this.methodCalls);\n return theClone;\n }\n /**\n * Add a transaction to this atomic group.\n *\n * An error will be thrown if the transaction has a nonzero group ID, the composer's status is\n * not BUILDING, or if adding this transaction causes the current group to exceed MAX_GROUP_SIZE.\n */\n addTransaction(txnAndSigner) {\n if (this.status !== AtomicTransactionComposerStatus.BUILDING) {\n throw new Error('Cannot add transactions when composer status is not BUILDING');\n }\n if (this.transactions.length === AtomicTransactionComposer.MAX_GROUP_SIZE) {\n throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${AtomicTransactionComposer.MAX_GROUP_SIZE}`);\n }\n if (txnAndSigner.txn.group && txnAndSigner.txn.group.some((v) => v !== 0)) {\n throw new Error('Cannot add a transaction with nonzero group ID');\n }\n this.transactions.push(txnAndSigner);\n }\n /**\n * Add a smart contract method call to this atomic group.\n *\n * An error will be thrown if the composer's status is not BUILDING, if adding this transaction\n * causes the current group to exceed MAX_GROUP_SIZE, or if the provided arguments are invalid\n * for the given method.\n */\n addMethodCall({ appID, method, methodArgs, sender, suggestedParams, onComplete, approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages, appAccounts, appForeignApps, appForeignAssets, boxes, note, lease, rekeyTo, signer, }) {\n if (this.status !== AtomicTransactionComposerStatus.BUILDING) {\n throw new Error('Cannot add transactions when composer status is not BUILDING');\n }\n if (this.transactions.length + method.txnCount() >\n AtomicTransactionComposer.MAX_GROUP_SIZE) {\n throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${AtomicTransactionComposer.MAX_GROUP_SIZE}`);\n }\n if (appID === 0) {\n if (approvalProgram == null ||\n clearProgram == null ||\n numGlobalInts == null ||\n numGlobalByteSlices == null ||\n numLocalInts == null ||\n numLocalByteSlices == null) {\n throw new Error('One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices');\n }\n }\n else if (onComplete === OnApplicationComplete.UpdateApplicationOC) {\n if (approvalProgram == null || clearProgram == null) {\n throw new Error('One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram');\n }\n if (numGlobalInts != null ||\n numGlobalByteSlices != null ||\n numLocalInts != null ||\n numLocalByteSlices != null ||\n extraPages != null) {\n throw new Error('One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages');\n }\n }\n else if (approvalProgram != null ||\n clearProgram != null ||\n numGlobalInts != null ||\n numGlobalByteSlices != null ||\n numLocalInts != null ||\n numLocalByteSlices != null ||\n extraPages != null) {\n throw new Error('One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages');\n }\n if (methodArgs == null) {\n // eslint-disable-next-line no-param-reassign\n methodArgs = [];\n }\n if (methodArgs.length !== method.args.length) {\n throw new Error(`Incorrect number of method arguments. Expected ${method.args.length}, got ${methodArgs.length}`);\n }\n let basicArgTypes = [];\n let basicArgValues = [];\n const txnArgs = [];\n const refArgTypes = [];\n const refArgValues = [];\n const refArgIndexToBasicArgIndex = new Map();\n // TODO: Box encoding for ABI\n const boxReferences = !boxes ? [] : boxes;\n for (let i = 0; i < methodArgs.length; i++) {\n let argType = method.args[i].type;\n const argValue = methodArgs[i];\n if (abiTypeIsTransaction(argType)) {\n if (!isTransactionWithSigner(argValue) ||\n !abiCheckTransactionType(argType, argValue.txn)) {\n throw new Error(`Expected ${argType} TransactionWithSigner for argument at index ${i}`);\n }\n if (argValue.txn.group && argValue.txn.group.some((v) => v !== 0)) {\n throw new Error('Cannot add a transaction with nonzero group ID');\n }\n txnArgs.push(argValue);\n continue;\n }\n if (isTransactionWithSigner(argValue)) {\n throw new Error(`Expected non-transaction value for argument at index ${i}`);\n }\n if (abiTypeIsReference(argType)) {\n refArgIndexToBasicArgIndex.set(refArgTypes.length, basicArgTypes.length);\n refArgTypes.push(argType);\n refArgValues.push(argValue);\n // treat the reference as a uint8 for encoding purposes\n argType = new ABIUintType(8);\n }\n if (typeof argType === 'string') {\n throw new Error(`Unknown ABI type: ${argType}`);\n }\n basicArgTypes.push(argType);\n basicArgValues.push(argValue);\n }\n const resolvedRefIndexes = [];\n const foreignAccounts = appAccounts == null ? [] : appAccounts.slice();\n const foreignApps = appForeignApps == null ? [] : appForeignApps.slice();\n const foreignAssets = appForeignAssets == null ? [] : appForeignAssets.slice();\n for (let i = 0; i < refArgTypes.length; i++) {\n const refType = refArgTypes[i];\n const refValue = refArgValues[i];\n let resolved = 0;\n switch (refType) {\n case ABIReferenceType.account: {\n const addressType = new ABIAddressType();\n const address = addressType.decode(addressType.encode(refValue));\n resolved = populateForeignArray(address, foreignAccounts, sender);\n break;\n }\n case ABIReferenceType.application: {\n const uint64Type = new ABIUintType(64);\n const refAppID = uint64Type.decode(uint64Type.encode(refValue));\n if (refAppID > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Expected safe integer for application value, got ${refAppID}`);\n }\n resolved = populateForeignArray(Number(refAppID), foreignApps, appID);\n break;\n }\n case ABIReferenceType.asset: {\n const uint64Type = new ABIUintType(64);\n const refAssetID = uint64Type.decode(uint64Type.encode(refValue));\n if (refAssetID > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Expected safe integer for asset value, got ${refAssetID}`);\n }\n resolved = populateForeignArray(Number(refAssetID), foreignAssets);\n break;\n }\n default:\n throw new Error(`Unknown reference type: ${refType}`);\n }\n resolvedRefIndexes.push(resolved);\n }\n for (let i = 0; i < resolvedRefIndexes.length; i++) {\n const basicArgIndex = refArgIndexToBasicArgIndex.get(i);\n basicArgValues[basicArgIndex] = resolvedRefIndexes[i];\n }\n if (basicArgTypes.length > MAX_APP_ARGS - 1) {\n const lastArgTupleTypes = basicArgTypes.slice(MAX_APP_ARGS - 2);\n const lastArgTupleValues = basicArgValues.slice(MAX_APP_ARGS - 2);\n basicArgTypes = basicArgTypes.slice(0, MAX_APP_ARGS - 2);\n basicArgValues = basicArgValues.slice(0, MAX_APP_ARGS - 2);\n basicArgTypes.push(new ABITupleType(lastArgTupleTypes));\n basicArgValues.push(lastArgTupleValues);\n }\n const appArgsEncoded = [method.getSelector()];\n for (let i = 0; i < basicArgTypes.length; i++) {\n appArgsEncoded.push(basicArgTypes[i].encode(basicArgValues[i]));\n }\n const appCall = {\n txn: makeApplicationCallTxnFromObject({\n from: sender,\n appIndex: appID,\n appArgs: appArgsEncoded,\n accounts: foreignAccounts,\n foreignApps,\n foreignAssets,\n boxes: boxReferences,\n onComplete: onComplete == null ? OnApplicationComplete.NoOpOC : onComplete,\n approvalProgram,\n clearProgram,\n numGlobalInts,\n numGlobalByteSlices,\n numLocalInts,\n numLocalByteSlices,\n extraPages,\n lease,\n note,\n rekeyTo,\n suggestedParams,\n }),\n signer,\n };\n this.transactions.push(...txnArgs, appCall);\n this.methodCalls.set(this.transactions.length - 1, method);\n }\n /**\n * Finalize the transaction group and returned the finalized transactions.\n *\n * The composer's status will be at least BUILT after executing this method.\n */\n buildGroup() {\n if (this.status === AtomicTransactionComposerStatus.BUILDING) {\n if (this.transactions.length === 0) {\n throw new Error('Cannot build a group with 0 transactions');\n }\n if (this.transactions.length > 1) {\n assignGroupID(this.transactions.map((txnWithSigner) => txnWithSigner.txn));\n }\n this.status = AtomicTransactionComposerStatus.BUILT;\n }\n return this.transactions;\n }\n /**\n * Obtain signatures for each transaction in this group. If signatures have already been obtained,\n * this method will return cached versions of the signatures.\n *\n * The composer's status will be at least SIGNED after executing this method.\n *\n * An error will be thrown if signing any of the transactions fails.\n *\n * @returns A promise that resolves to an array of signed transactions.\n */\n async gatherSignatures() {\n if (this.status >= AtomicTransactionComposerStatus.SIGNED) {\n return this.signedTxns;\n }\n // retrieve built transactions and verify status is BUILT\n const txnsWithSigners = this.buildGroup();\n const txnGroup = txnsWithSigners.map((txnWithSigner) => txnWithSigner.txn);\n const indexesPerSigner = new Map();\n for (let i = 0; i < txnsWithSigners.length; i++) {\n const { signer } = txnsWithSigners[i];\n if (!indexesPerSigner.has(signer)) {\n indexesPerSigner.set(signer, []);\n }\n indexesPerSigner.get(signer).push(i);\n }\n const orderedSigners = Array.from(indexesPerSigner);\n const batchedSigs = await Promise.all(orderedSigners.map(([signer, indexes]) => signer(txnGroup, indexes)));\n const signedTxns = txnsWithSigners.map(() => null);\n for (let signerIndex = 0; signerIndex < orderedSigners.length; signerIndex++) {\n const indexes = orderedSigners[signerIndex][1];\n const sigs = batchedSigs[signerIndex];\n for (let i = 0; i < indexes.length; i++) {\n signedTxns[indexes[i]] = sigs[i];\n }\n }\n if (!signedTxns.every((sig) => sig != null)) {\n throw new Error(`Missing signatures. Got ${signedTxns}`);\n }\n const txIDs = signedTxns.map((stxn, index) => {\n try {\n return decodeSignedTransaction(stxn).txn.txID();\n }\n catch (err) {\n throw new Error(`Cannot decode signed transaction at index ${index}. ${err}`);\n }\n });\n this.signedTxns = signedTxns;\n this.txIDs = txIDs;\n this.status = AtomicTransactionComposerStatus.SIGNED;\n return signedTxns;\n }\n /**\n * Send the transaction group to the network, but don't wait for it to be committed to a block. An\n * error will be thrown if submission fails.\n *\n * The composer's status must be SUBMITTED or lower before calling this method. If submission is\n * successful, this composer's status will update to SUBMITTED.\n *\n * Note: a group can only be submitted again if it fails.\n *\n * @param client - An Algodv2 client\n *\n * @returns A promise that, upon success, resolves to a list of TxIDs of the submitted transactions.\n */\n async submit(client) {\n if (this.status > AtomicTransactionComposerStatus.SUBMITTED) {\n throw new Error('Transaction group cannot be resubmitted');\n }\n const stxns = await this.gatherSignatures();\n await client.sendRawTransaction(stxns).do();\n this.status = AtomicTransactionComposerStatus.SUBMITTED;\n return this.txIDs;\n }\n /**\n * Simulates the transaction group in the network.\n *\n * The composer will try to sign any transactions in the group, then simulate\n * the results.\n * Simulating the group will not change the composer's status.\n *\n * @param client - An Algodv2 client\n * @param request - SimulateRequest with options in simulation.\n * If provided, the request's transaction group will be overrwritten by the composer's group,\n * only simulation related options will be used.\n *\n * @returns A promise that, upon success, resolves to an object containing an\n * array of results containing one element for each method call transaction\n * in this group (ABIResult[]) and the SimulateResponse object.\n */\n async simulate(client, request) {\n if (this.status > AtomicTransactionComposerStatus.SUBMITTED) {\n throw new Error('Simulated Transaction group has already been submitted to the network');\n }\n const stxns = await this.gatherSignatures();\n const txnObjects = stxns.map((stxn) => encoding.decode(stxn));\n const currentRequest = request == null ? new SimulateRequest({ txnGroups: [] }) : request;\n currentRequest.txnGroups = [\n new SimulateRequestTransactionGroup({\n txns: txnObjects,\n }),\n ];\n const simulateResponse = await client\n .simulateTransactions(currentRequest)\n .do();\n // Parse method response\n const methodResults = [];\n for (const [txnIndex, method] of this.methodCalls) {\n const txID = this.txIDs[txnIndex];\n const pendingInfo = simulateResponse.txnGroups[0].txnResults[txnIndex].txnResult;\n const methodResult = {\n txID,\n rawReturnValue: new Uint8Array(),\n method,\n };\n methodResults.push(AtomicTransactionComposer.parseMethodResponse(method, methodResult, pendingInfo.get_obj_for_encoding()));\n }\n return { methodResults, simulateResponse };\n }\n /**\n * Send the transaction group to the network and wait until it's committed to a block. An error\n * will be thrown if submission or execution fails.\n *\n * The composer's status must be SUBMITTED or lower before calling this method, since execution is\n * only allowed once. If submission is successful, this composer's status will update to SUBMITTED.\n * If the execution is also successful, this composer's status will update to COMMITTED.\n *\n * Note: a group can only be submitted again if it fails.\n *\n * @param client - An Algodv2 client\n * @param waitRounds - The maximum number of rounds to wait for transaction confirmation\n *\n * @returns A promise that, upon success, resolves to an object containing the confirmed round for\n * this transaction, the txIDs of the submitted transactions, and an array of results containing\n * one element for each method call transaction in this group.\n */\n async execute(client, waitRounds) {\n if (this.status === AtomicTransactionComposerStatus.COMMITTED) {\n throw new Error('Transaction group has already been executed successfully');\n }\n const txIDs = await this.submit(client);\n this.status = AtomicTransactionComposerStatus.SUBMITTED;\n const firstMethodCallIndex = this.transactions.findIndex((_, index) => this.methodCalls.has(index));\n const indexToWaitFor = firstMethodCallIndex === -1 ? 0 : firstMethodCallIndex;\n const confirmedTxnInfo = await waitForConfirmation(client, txIDs[indexToWaitFor], waitRounds);\n this.status = AtomicTransactionComposerStatus.COMMITTED;\n const confirmedRound = confirmedTxnInfo['confirmed-round'];\n const methodResults = [];\n for (const [txnIndex, method] of this.methodCalls) {\n const txID = txIDs[txnIndex];\n let methodResult = {\n txID,\n rawReturnValue: new Uint8Array(),\n method,\n };\n try {\n const pendingInfo = txnIndex === firstMethodCallIndex\n ? confirmedTxnInfo\n : // eslint-disable-next-line no-await-in-loop\n await client.pendingTransactionInformation(txID).do();\n methodResult = AtomicTransactionComposer.parseMethodResponse(method, methodResult, pendingInfo);\n }\n catch (err) {\n methodResult.decodeError = err;\n }\n methodResults.push(methodResult);\n }\n return {\n confirmedRound,\n txIDs,\n methodResults,\n };\n }\n /**\n * Parses a single ABI Method transaction log into a ABI result object.\n *\n * @param method\n * @param methodResult\n * @param pendingInfo\n * @returns An ABIResult object\n */\n static parseMethodResponse(method, methodResult, pendingInfo) {\n const returnedResult = methodResult;\n try {\n returnedResult.txInfo = pendingInfo;\n if (method.returns.type !== 'void') {\n const logs = pendingInfo.logs || [];\n if (logs.length === 0) {\n throw new Error('App call transaction did not log a return value');\n }\n const lastLog = Buffer.from(logs[logs.length - 1], 'base64');\n if (lastLog.byteLength < 4 ||\n !lastLog.slice(0, 4).equals(RETURN_PREFIX)) {\n throw new Error('App call transaction did not log a return value');\n }\n returnedResult.rawReturnValue = new Uint8Array(lastLog.slice(4));\n returnedResult.returnValue = method.returns.type.decode(methodResult.rawReturnValue);\n }\n }\n catch (err) {\n returnedResult.decodeError = err;\n }\n return returnedResult;\n }\n}\n/** The maximum size of an atomic transaction group. */\nAtomicTransactionComposer.MAX_GROUP_SIZE = 16;\n//# sourceMappingURL=composer.js.map","export * from './transactions';\nexport * from './multisig';\nexport * from './address';\n//# sourceMappingURL=index.js.map","import { Buffer } from 'buffer';\nimport * as nacl from './nacl/naclWrappers';\nimport * as address from './encoding/address';\nimport * as encoding from './encoding/encoding';\nimport * as txnBuilder from './transaction';\nimport Bid from './bid';\nimport * as convert from './convert';\nimport * as utils from './utils/utils';\nconst SIGN_BYTES_PREFIX = Buffer.from([77, 88]); // \"MX\"\n// Errors\nexport const MULTISIG_BAD_SENDER_ERROR_MSG = 'The transaction sender address and multisig preimage do not match.';\n/**\n * signTransaction takes an object with either payment or key registration fields and\n * a secret key and returns a signed blob.\n *\n * Payment transaction fields: from, to, amount, fee, firstRound, lastRound, genesisHash,\n * note(optional), GenesisID(optional), closeRemainderTo(optional)\n *\n * Key registration fields: fee, firstRound, lastRound, voteKey, selectionKey, voteFirst,\n * voteLast, voteKeyDilution, genesisHash, note(optional), GenesisID(optional)\n *\n * If flatFee is not set and the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.\n * @param txn - object with either payment or key registration fields\n * @param sk - Algorand Secret Key\n * @returns object contains the binary signed transaction and its txID\n */\nexport function signTransaction(txn, sk) {\n if (typeof txn.from === 'undefined') {\n // Get pk from sk if no sender specified\n const key = nacl.keyPairFromSecretKey(sk);\n // eslint-disable-next-line no-param-reassign\n txn.from = address.encodeAddress(key.publicKey);\n }\n const algoTxn = txnBuilder.instantiateTxnIfNeeded(txn);\n return {\n txID: algoTxn.txID().toString(),\n blob: algoTxn.signTxn(sk),\n };\n}\n/**\n * signBid takes an object with the following fields: bidder key, bid amount, max price, bid ID, auctionKey, auction ID,\n * and a secret key and returns a signed blob to be inserted into a transaction Algorand note field.\n * @param bid - Algorand Bid\n * @param sk - Algorand secret key\n * @returns Uint8Array binary signed bid\n */\nexport function signBid(bid, sk) {\n const signedBid = new Bid(bid);\n return signedBid.signBid(sk);\n}\n/**\n * signBytes takes arbitrary bytes and a secret key, prepends the bytes with \"MX\" for domain separation, signs the bytes\n * with the private key, and returns the signature.\n * @param bytes - Uint8array\n * @param sk - Algorand secret key\n * @returns binary signature\n */\nexport function signBytes(bytes, sk) {\n const toBeSigned = Buffer.from(utils.concatArrays(SIGN_BYTES_PREFIX, bytes));\n const sig = nacl.sign(toBeSigned, sk);\n return sig;\n}\n/**\n * verifyBytes takes array of bytes, an address, and a signature and verifies if the signature is correct for the public\n * key and the bytes (the bytes should have been signed with \"MX\" prepended for domain separation).\n * @param bytes - Uint8Array\n * @param signature - binary signature\n * @param addr - string address\n * @returns bool\n */\nexport function verifyBytes(bytes, signature, addr) {\n const toBeVerified = Buffer.from(utils.concatArrays(SIGN_BYTES_PREFIX, bytes));\n const pk = address.decodeAddress(addr).publicKey;\n return nacl.verify(toBeVerified, signature, pk);\n}\n/**\n * encodeObj takes a javascript object and returns its msgpack encoding\n * Note that the encoding sorts the fields alphabetically\n * @param o - js obj\n * @returns Uint8Array binary representation\n */\nexport function encodeObj(o) {\n return new Uint8Array(encoding.encode(o));\n}\n/**\n * decodeObj takes a Uint8Array and returns its javascript obj\n * @param o - Uint8Array to decode\n * @returns object\n */\nexport function decodeObj(o) {\n return encoding.decode(o);\n}\nexport const ERROR_MULTISIG_BAD_SENDER = new Error(MULTISIG_BAD_SENDER_ERROR_MSG);\nexport const ERROR_INVALID_MICROALGOS = new Error(convert.INVALID_MICROALGOS_ERROR_MSG);\nexport { default as Algodv2 } from './client/v2/algod/algod';\nexport { default as Kmd } from './client/kmd';\nexport { default as IntDecoding } from './types/intDecoding';\nexport { default as Indexer } from './client/v2/indexer/indexer';\nexport { waitForConfirmation } from './wait';\nexport { isValidAddress, encodeAddress, decodeAddress, getApplicationAddress, } from './encoding/address';\nexport { bytesToBigInt, bigIntToBytes } from './encoding/bigint';\nexport { encodeUint64, decodeUint64 } from './encoding/uint64';\nexport { default as generateAccount } from './account';\nimport * as modelsv2_1 from './client/v2/algod/models/types';\nexport { modelsv2_1 as modelsv2 };\nimport * as indexerModels_1 from './client/v2/indexer/models/types';\nexport { indexerModels_1 as indexerModels };\nexport { mnemonicToMasterDerivationKey, masterDerivationKeyToMnemonic, secretKeyToMnemonic, mnemonicToSecretKey, seedFromMnemonic, mnemonicFromSeed, } from './mnemonic/mnemonic';\nexport { microalgosToAlgos, algosToMicroalgos, INVALID_MICROALGOS_ERROR_MSG, } from './convert';\nexport { computeGroupID, assignGroupID } from './group';\nexport { LogicSig, LogicSigAccount, signLogicSigTransaction, signLogicSigTransactionObject, logicSigFromByte, tealSign, tealSignFromProgram, verifyTealSign, } from './logicsig';\nexport { signMultisigTransaction, mergeMultisigTransactions, appendSignMultisigTransaction, createMultisigTransaction, appendSignRawMultisigSignature, verifyMultisig, multisigAddress, } from './multisig';\nexport { SourceMap } from './logic/sourcemap';\nexport * from './dryrun';\nexport * from './makeTxn';\nexport * from './transaction';\nexport * from './signer';\nexport * from './composer';\nexport * from './types';\nexport * from './abi';\n//# sourceMappingURL=main.js.map","import * as algosdk from './main';\nexport * from './main';\nexport default algosdk;\n//# sourceMappingURL=index.js.map","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.MessagePack=e():t.MessagePack=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=0)}([function(t,e,r){\"use strict\";r.r(e),r.d(e,\"encode\",(function(){return T})),r.d(e,\"decode\",(function(){return V})),r.d(e,\"decodeAsync\",(function(){return Y})),r.d(e,\"decodeArrayStream\",(function(){return Z})),r.d(e,\"decodeStream\",(function(){return $})),r.d(e,\"Decoder\",(function(){return O})),r.d(e,\"Encoder\",(function(){return I})),r.d(e,\"ExtensionCodec\",(function(){return S})),r.d(e,\"ExtData\",(function(){return p})),r.d(e,\"EXT_TIMESTAMP\",(function(){return w})),r.d(e,\"encodeDateToTimeSpec\",(function(){return g})),r.d(e,\"encodeTimeSpecToTimestamp\",(function(){return v})),r.d(e,\"decodeTimestampToTimeSpec\",(function(){return U})),r.d(e,\"encodeTimestampExtension\",(function(){return b})),r.d(e,\"decodeTimestampExtension\",(function(){return m}));var n=function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=function(){for(var t=[],e=0;e=55296&&i<=56319&&n65535&&(f-=65536,s.push(f>>>10&1023|55296),f=56320|1023&f),s.push(f)}else s.push(h);s.length>=4096&&(a+=String.fromCharCode.apply(String,i(s)),s.length=0)}return s.length>0&&(a+=String.fromCharCode.apply(String,i(s))),a}var f=o?new TextDecoder:null,l=\"undefined\"!=typeof process?200:0;var p=function(t,e){this.type=t,this.data=e};function d(t,e,r){var n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function y(t,e){var r=t.getInt32(e),n=t.getUint32(e+4),i=rMath.floor(Number.MAX_SAFE_INTEGER/4294967296);return i||o?BigInt(r)*BigInt(4294967296)+BigInt(n):4294967296*r+n}var w=-1;function v(t){var e=t.sec,r=t.nsec;if(e>=0&&r>=0&&e<=17179869183){if(0===r&&e<=4294967295){var n=new Uint8Array(4);return(s=new DataView(n.buffer)).setUint32(0,e),n}var i=e/4294967296,o=4294967295&e;n=new Uint8Array(8);return(s=new DataView(n.buffer)).setUint32(0,r<<2|3&i),s.setUint32(4,o),n}var s;n=new Uint8Array(12);return(s=new DataView(n.buffer)).setUint32(0,r),d(s,4,e),n}function g(t){var e=t.getTime(),r=Math.floor(e/1e3),n=1e6*(e-1e3*r),i=Math.floor(n/1e9);return{sec:r+i,nsec:n-1e9*i}}function b(t){return t instanceof Date?v(g(t)):null}function U(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:var r=e.getUint32(0);return{sec:4294967296*(3&r)+e.getUint32(4),nsec:r>>>2};case 12:return{sec:y(e,4),nsec:e.getUint32(0)};default:throw new Error(\"Unrecognized data size for timestamp: \"+t.length)}}function m(t){var e=U(t);return new Date(1e3*e.sec+e.nsec/1e6)}var x={type:w,encode:b,decode:m},S=function(){function t(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(x)}return t.prototype.register=function(t){var e=t.type,r=t.encode,n=t.decode;if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{var i=1+e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}},t.prototype.tryToEncode=function(t,e){for(var r=0;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")},I=function(){function t(t,e,r,n,i,o,s,a){void 0===t&&(t=S.defaultCodec),void 0===e&&(e=void 0),void 0===r&&(r=100),void 0===n&&(n=2048),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===a&&(a=!1),this.extensionCodec=t,this.context=e,this.maxDepth=r,this.initialBufferSize=n,this.sortKeys=i,this.forceFloat32=o,this.ignoreUndefined=s,this.forceIntegerToFloat=a,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return t.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},t.prototype.reinitializeState=function(){this.pos=0},t.prototype.encode=function(t){return this.reinitializeState(),this.doEncode(t,1),this.getUint8Array()},t.prototype.doEncode=function(t,e){if(e>this.maxDepth)throw new Error(\"Too deep objects in depth \"+e);null==t?this.encodeNil():\"boolean\"==typeof t?this.encodeBoolean(t):\"number\"==typeof t?this.encodeNumber(t):\"string\"==typeof t?this.encodeString(t):\"bigint\"==typeof t?this.encodebigint(t):this.encodeObject(t,e)},t.prototype.ensureBufferSizeToWrite=function(t){var e=this.pos+t;this.view.byteLength=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):(this.writeU8(211),this.writeI64(t)):this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))},t.prototype.encodebigint=function(t){t>=BigInt(0)?t=BigInt(-32)?this.writeU8(224|Number(t)+32):t>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(t))):t>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(t))):t>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(t))):(this.writeU8(211),this.writeBig64(t))},t.prototype.writeStringHeader=function(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else{if(!(t<4294967296))throw new Error(\"Too long string: \"+t+\" bytes in UTF-8\");this.writeU8(219),this.writeU32(t)}},t.prototype.encodeString=function(t){var e=t.length;if(o&&e>h){var r=s(t);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),u(t,this.bytes,this.pos),this.pos+=r}else{r=s(t);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),function(t,e,r){for(var n=t.length,i=r,o=0;o>6&31|192;else{if(s>=55296&&s<=56319&&o>12&15|224,e[i++]=s>>6&63|128):(e[i++]=s>>18&7|240,e[i++]=s>>12&63|128,e[i++]=s>>6&63|128)}e[i++]=63&s|128}else e[i++]=s}}(t,this.bytes,this.pos),this.pos+=r}},t.prototype.encodeObject=function(t,e){var r=this.extensionCodec.tryToEncode(t,this.context);if(null!=r)this.encodeExtension(r);else if(Array.isArray(t))this.encodeArray(t,e);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else{if(\"object\"!=typeof t)throw new Error(\"Unrecognized object: \"+Object.prototype.toString.apply(t));this.encodeMap(t,e)}},t.prototype.encodeBinary=function(t){var e=t.byteLength;if(e<256)this.writeU8(196),this.writeU8(e);else if(e<65536)this.writeU8(197),this.writeU16(e);else{if(!(e<4294967296))throw new Error(\"Too large binary: \"+e);this.writeU8(198),this.writeU32(e)}var r=B(t);this.writeU8a(r)},t.prototype.encodeArray=function(t,e){var r,n,i=t.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else{if(!(i<4294967296))throw new Error(\"Too large array: \"+i);this.writeU8(221),this.writeU32(i)}try{for(var o=E(t),s=o.next();!s.done;s=o.next()){var a=s.value;this.doEncode(a,e+1)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.countWithoutUndefined=function(t,e){var r,n,i=0;try{for(var o=E(e),s=o.next();!s.done;s=o.next()){void 0!==t[s.value]&&i++}}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t.prototype.encodeMap=function(t,e){var r,n,i=Object.keys(t);this.sortKeys&&i.sort();var o=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(o<16)this.writeU8(128+o);else if(o<65536)this.writeU8(222),this.writeU16(o);else{if(!(o<4294967296))throw new Error(\"Too large map object: \"+o);this.writeU8(223),this.writeU32(o)}try{for(var s=E(i),a=s.next();!a.done;a=s.next()){var h=a.value,u=t[h];this.ignoreUndefined&&void 0===u||(this.encodeString(h),this.doEncode(u,e+1))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},t.prototype.encodeExtension=function(t){var e=t.data.length;if(1===e)this.writeU8(212);else if(2===e)this.writeU8(213);else if(4===e)this.writeU8(214);else if(8===e)this.writeU8(215);else if(16===e)this.writeU8(216);else if(e<256)this.writeU8(199),this.writeU8(e);else if(e<65536)this.writeU8(200),this.writeU16(e);else{if(!(e<4294967296))throw new Error(\"Too large extension object: \"+e);this.writeU8(201),this.writeU32(e)}this.writeI8(t.type),this.writeU8a(t.data)},t.prototype.writeU8=function(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++},t.prototype.writeU8a=function(t){var e=t.length;this.ensureBufferSizeToWrite(e),this.bytes.set(t,this.pos),this.pos+=e},t.prototype.writeI8=function(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++},t.prototype.writeU16=function(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2},t.prototype.writeI16=function(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2},t.prototype.writeU32=function(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4},t.prototype.writeI32=function(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4},t.prototype.writeF32=function(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4},t.prototype.writeF64=function(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8},t.prototype.writeU64=function(t){this.ensureBufferSizeToWrite(8),function(t,e,r){var n=r/4294967296,i=r;t.setUint32(e,n),t.setUint32(e+4,i)}(this.view,this.pos,t),this.pos+=8},t.prototype.writeI64=function(t){this.ensureBufferSizeToWrite(8),d(this.view,this.pos,t),this.pos+=8},t.prototype.writeBig64=function(t){this.ensureBufferSizeToWrite(8),function(t,e,r){var n=Number(r/BigInt(4294967296)),i=Number(r%BigInt(4294967296));n<0&&0!==i&&(n-=1),t.setUint32(e,n),t.setUint32(e+4,i)}(this.view,this.pos,t),this.pos+=8},t}(),A={};function T(t,e){return void 0===e&&(e=A),new I(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat).encode(t)}function L(t){return(t<0?\"-\":\"\")+\"0x\"+Math.abs(t).toString(16).padStart(2,\"0\")}var M=function(){function t(t,e){void 0===t&&(t=16),void 0===e&&(e=16),this.maxKeyLength=t,this.maxLengthPerKey=e,this.hit=0,this.miss=0,this.caches=[];for(var r=0;r0&&t<=this.maxKeyLength},t.prototype.get=function(t,e,r){var n=this.caches[r-1],i=n.length;t:for(var o=0;o=this.maxLengthPerKey?r[Math.random()*r.length|0]=n:r.push(n)},t.prototype.decode=function(t,e,r){var n=this.get(t,e,r);if(null!=n)return this.hit++,n;this.miss++;var i=c(t,e,r),o=Uint8Array.prototype.slice.call(t,e,e+r);return this.store(o,i),i},t}(),k=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{h(n.next(t))}catch(t){o(t)}}function a(t){try{h(n.throw(t))}catch(t){o(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}h((n=n.apply(t,e||[])).next())}))},z=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError(\"Generator is already executing.\");for(;s;)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 s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof N?Promise.resolve(r.value.v).then(h,u):c(o[0][2],r)}catch(t){c(o[0][3],t)}var r}function h(t){a(\"next\",t)}function u(t){a(\"throw\",t)}function c(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}},P=new DataView(new ArrayBuffer(0)),F=new Uint8Array(P.buffer),j=function(){try{P.getInt8(0)}catch(t){return t.constructor}throw new Error(\"never reached\")}(),_=new j(\"Insufficient data\"),W=new M,O=function(){function t(t,e,r,n,i,o,s,a){void 0===t&&(t=S.defaultCodec),void 0===e&&(e=void 0),void 0===r&&(r=4294967295),void 0===n&&(n=4294967295),void 0===i&&(i=4294967295),void 0===o&&(o=4294967295),void 0===s&&(s=4294967295),void 0===a&&(a=W),this.extensionCodec=t,this.context=e,this.maxStrLength=r,this.maxBinLength=n,this.maxArrayLength=i,this.maxMapLength=o,this.maxExtLength=s,this.keyDecoder=a,this.totalPos=0,this.pos=0,this.view=P,this.bytes=F,this.headByte=-1,this.stack=[]}return t.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},t.prototype.setBuffer=function(t){this.bytes=B(t),this.view=function(t){if(t instanceof ArrayBuffer)return new DataView(t);var e=B(t);return new DataView(e.buffer,e.byteOffset,e.byteLength)}(this.bytes),this.pos=0},t.prototype.appendBuffer=function(t){if(-1!==this.headByte||this.hasRemaining()){var e=this.bytes.subarray(this.pos),r=B(t),n=new Uint8Array(e.length+r.length);n.set(e),n.set(r,e.length),this.setBuffer(n)}else this.setBuffer(t)},t.prototype.hasRemaining=function(t){return void 0===t&&(t=1),this.view.byteLength-this.pos>=t},t.prototype.createNoExtraBytesError=function(t){var e=this.view,r=this.pos;return new RangeError(\"Extra \"+(e.byteLength-r)+\" of \"+e.byteLength+\" byte(s) found at buffer[\"+t+\"]\")},t.prototype.decode=function(t){return this.reinitializeState(),this.setBuffer(t),this.doDecodeSingleSync()},t.prototype.doDecodeSingleSync=function(){var t=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return t},t.prototype.decodeAsync=function(t){var e,r,n,i;return k(this,void 0,void 0,(function(){var o,s,a,h,u,c,f,l;return z(this,(function(p){switch(p.label){case 0:o=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),e=D(t),p.label=2;case 2:return[4,e.next()];case 3:if((r=p.sent()).done)return[3,5];if(a=r.value,o)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),o=!0}catch(t){if(!(t instanceof j))throw t}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return h=p.sent(),n={error:h},[3,12];case 7:return p.trys.push([7,,10,11]),r&&!r.done&&(i=e.return)?[4,i.call(e)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(n)throw n.error;return[7];case 11:return[7];case 12:if(o){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,s]}throw c=(u=this).headByte,f=u.pos,l=u.totalPos,new RangeError(\"Insufficient data in parcing \"+L(c)+\" at \"+l+\" (\"+f+\" in the current buffer)\")}}))}))},t.prototype.decodeArrayStream=function(t){return this.decodeMultiAsync(t,!0)},t.prototype.decodeStream=function(t){return this.decodeMultiAsync(t,!1)},t.prototype.decodeMultiAsync=function(t,e){return C(this,arguments,(function(){var r,n,i,o,s,a,h,u,c;return z(this,(function(f){switch(f.label){case 0:r=e,n=-1,f.label=1;case 1:f.trys.push([1,13,14,19]),i=D(t),f.label=2;case 2:return[4,N(i.next())];case 3:if((o=f.sent()).done)return[3,12];if(s=o.value,e&&0===n)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(s),r&&(n=this.readArraySize(),r=!1,this.complete()),f.label=4;case 4:f.trys.push([4,9,,10]),f.label=5;case 5:return[4,N(this.doDecodeSync())];case 6:return[4,f.sent()];case 7:return f.sent(),0==--n?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=f.sent())instanceof j))throw a;return[3,10];case 10:this.totalPos+=this.pos,f.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return h=f.sent(),u={error:h},[3,19];case 14:return f.trys.push([14,,17,18]),o&&!o.done&&(c=i.return)?[4,N(c.call(i))]:[3,16];case 15:f.sent(),f.label=16;case 16:return[3,18];case 17:if(u)throw u.error;return[7];case 18:return[7];case 19:return[2]}}))}))},t.prototype.doDecodeSync=function(){t:for(;;){var t=this.readHeadByte(),e=void 0;if(t>=224)e=t-256;else if(t<192)if(t<128)e=t;else if(t<144){if(0!==(n=t-128)){this.pushMapState(n),this.complete();continue t}e={}}else if(t<160){if(0!==(n=t-144)){this.pushArrayState(n),this.complete();continue t}e=[]}else{var r=t-160;e=this.decodeUtf8String(r,0)}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.readU8();else if(205===t)e=this.readU16();else if(206===t)e=this.readU32();else if(207===t)e=this.readU64();else if(208===t)e=this.readI8();else if(209===t)e=this.readI16();else if(210===t)e=this.readI32();else if(211===t)e=this.readI64();else if(217===t){r=this.lookU8();e=this.decodeUtf8String(r,1)}else if(218===t){r=this.lookU16();e=this.decodeUtf8String(r,2)}else if(219===t){r=this.lookU32();e=this.decodeUtf8String(r,4)}else if(220===t){if(0!==(n=this.readU16())){this.pushArrayState(n),this.complete();continue t}e=[]}else if(221===t){if(0!==(n=this.readU32())){this.pushArrayState(n),this.complete();continue t}e=[]}else if(222===t){if(0!==(n=this.readU16())){this.pushMapState(n),this.complete();continue t}e={}}else if(223===t){if(0!==(n=this.readU32())){this.pushMapState(n),this.complete();continue t}e={}}else if(196===t){var n=this.lookU8();e=this.decodeBinary(n,1)}else if(197===t){n=this.lookU16();e=this.decodeBinary(n,2)}else if(198===t){n=this.lookU32();e=this.decodeBinary(n,4)}else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t){n=this.lookU8();e=this.decodeExtension(n,1)}else if(200===t){n=this.lookU16();e=this.decodeExtension(n,2)}else{if(201!==t)throw new Error(\"Unrecognized type byte: \"+L(t));n=this.lookU32();e=this.decodeExtension(n,4)}this.complete();for(var i=this.stack;i.length>0;){var o=i[i.length-1];if(0===o.type){if(o.array[o.position]=e,o.position++,o.position!==o.size)continue t;i.pop(),e=o.array}else{if(1===o.type){if(s=void 0,\"string\"!==(s=typeof e)&&\"number\"!==s)throw new Error(\"The type of key must be string or number but \"+typeof e);o.key=e,o.type=2;continue t}if(o.map[o.key]=e,o.readCount++,o.readCount!==o.size){o.key=null,o.type=1;continue t}i.pop(),e=o.map}}return e}var s},t.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},t.prototype.complete=function(){this.headByte=-1},t.prototype.readArraySize=function(){var t=this.readHeadByte();switch(t){case 220:return this.readU16();case 221:return this.readU32();default:if(t<160)return t-144;throw new Error(\"Unrecognized array type byte: \"+L(t))}},t.prototype.pushMapState=function(t){if(t>this.maxMapLength)throw new Error(\"Max length exceeded: map length (\"+t+\") > maxMapLengthLength (\"+this.maxMapLength+\")\");this.stack.push({type:1,size:t,key:null,readCount:0,map:{}})},t.prototype.pushArrayState=function(t){if(t>this.maxArrayLength)throw new Error(\"Max length exceeded: array length (\"+t+\") > maxArrayLength (\"+this.maxArrayLength+\")\");this.stack.push({type:0,size:t,array:new Array(t),position:0})},t.prototype.decodeUtf8String=function(t,e){var r;if(t>this.maxStrLength)throw new Error(\"Max length exceeded: UTF-8 byte length (\"+t+\") > maxStrLength (\"+this.maxStrLength+\")\");if(this.bytes.byteLengthl?function(t,e,r){var n=t.subarray(e,e+r);return f.decode(n)}(this.bytes,i,t):c(this.bytes,i,t),this.pos+=e+t,n},t.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},t.prototype.decodeBinary=function(t,e){if(t>this.maxBinLength)throw new Error(\"Max length exceeded: bin length (\"+t+\") > maxBinLength (\"+this.maxBinLength+\")\");if(!this.hasRemaining(t+e))throw _;var r=this.pos+e,n=this.bytes.subarray(r,r+t);return this.pos+=e+t,n},t.prototype.decodeExtension=function(t,e){if(t>this.maxExtLength)throw new Error(\"Max length exceeded: ext length (\"+t+\") > maxExtLength (\"+this.maxExtLength+\")\");var r=this.view.getInt8(this.pos+e),n=this.decodeBinary(t,e+1);return this.extensionCodec.decode(n,r,this.context)},t.prototype.lookU8=function(){return this.view.getUint8(this.pos)},t.prototype.lookU16=function(){return this.view.getUint16(this.pos)},t.prototype.lookU32=function(){return this.view.getUint32(this.pos)},t.prototype.readU8=function(){var t=this.view.getUint8(this.pos);return this.pos++,t},t.prototype.readI8=function(){var t=this.view.getInt8(this.pos);return this.pos++,t},t.prototype.readU16=function(){var t=this.view.getUint16(this.pos);return this.pos+=2,t},t.prototype.readI16=function(){var t=this.view.getInt16(this.pos);return this.pos+=2,t},t.prototype.readU32=function(){var t=this.view.getUint32(this.pos);return this.pos+=4,t},t.prototype.readI32=function(){var t=this.view.getInt32(this.pos);return this.pos+=4,t},t.prototype.readU64=function(){var t,e,r,n,i=(t=this.view,e=this.pos,r=t.getUint32(e),n=t.getUint32(e+4),r>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(r)*BigInt(4294967296)+BigInt(n):4294967296*r+n);return this.pos+=8,i},t.prototype.readI64=function(){var t=y(this.view,this.pos);return this.pos+=8,t},t.prototype.readF32=function(){var t=this.view.getFloat32(this.pos);return this.pos+=4,t},t.prototype.readF64=function(){var t=this.view.getFloat64(this.pos);return this.pos+=8,t},t}(),R={};function V(t,e){return void 0===e&&(e=R),new O(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength).decode(t)}var K=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError(\"Generator is already executing.\");for(;s;)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 s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof G?Promise.resolve(r.value.v).then(h,u):c(o[0][2],r)}catch(t){c(o[0][3],t)}var r}function h(t){a(\"next\",t)}function u(t){a(\"throw\",t)}function c(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}};function X(t){if(null==t)throw new Error(\"Assertion Failure: value must not be null nor undefined\")}function q(t){return null!=t[Symbol.asyncIterator]?t:function(t){return H(this,arguments,(function(){var e,r,n,i;return K(this,(function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,G(e.read())];case 3:return r=o.sent(),n=r.done,i=r.value,n?[4,G(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return X(i),[4,G(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}}))}))}(t)}var J=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{h(n.next(t))}catch(t){o(t)}}function a(t){try{h(n.throw(t))}catch(t){o(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}h((n=n.apply(t,e||[])).next())}))},Q=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError(\"Generator is already executing.\");for(;s;)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 s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < 128; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n\n this.lastByteIndex = i;\n this.bytes += i - this.start;\n if (i >= 128) {\n this.block = blocks[32];\n this.start = i - 128;\n this.hash();\n this.hashed = true;\n } else {\n this.start = i;\n }\n }\n if (this.bytes > 4294967295) {\n this.hBytes += this.bytes / 4294967296 << 0;\n this.bytes = this.bytes % 4294967296;\n }\n return this;\n };\n\n Sha512.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex;\n blocks[32] = this.block;\n blocks[i >> 2] |= EXTRA[i & 3];\n this.block = blocks[32];\n if (i >= 112) {\n if (!this.hashed) {\n this.hash();\n }\n blocks[0] = this.block;\n blocks[1] = blocks[2] = blocks[3] = blocks[4] =\n blocks[5] = blocks[6] = blocks[7] = blocks[8] =\n blocks[9] = blocks[10] = blocks[11] = blocks[12] =\n blocks[13] = blocks[14] = blocks[15] = blocks[16] =\n blocks[17] = blocks[18] = blocks[19] = blocks[20] =\n blocks[21] = blocks[22] = blocks[23] = blocks[24] =\n blocks[25] = blocks[26] = blocks[27] = blocks[28] =\n blocks[29] = blocks[30] = blocks[31] = blocks[32] = 0;\n }\n blocks[30] = this.hBytes << 3 | this.bytes >>> 29;\n blocks[31] = this.bytes << 3;\n this.hash();\n };\n\n Sha512.prototype.hash = function () {\n var h0h = this.h0h, h0l = this.h0l, h1h = this.h1h, h1l = this.h1l,\n h2h = this.h2h, h2l = this.h2l, h3h = this.h3h, h3l = this.h3l,\n h4h = this.h4h, h4l = this.h4l, h5h = this.h5h, h5l = this.h5l,\n h6h = this.h6h, h6l = this.h6l, h7h = this.h7h, h7l = this.h7l,\n blocks = this.blocks, j, s0h, s0l, s1h, s1l, c1, c2, c3, c4,\n abh, abl, dah, dal, cdh, cdl, bch, bcl,\n majh, majl, t1h, t1l, t2h, t2l, chh, chl;\n\n for (j = 32; j < 160; j += 2) {\n t1h = blocks[j - 30];\n t1l = blocks[j - 29];\n s0h = ((t1h >>> 1) | (t1l << 31)) ^ ((t1h >>> 8) | (t1l << 24)) ^ (t1h >>> 7);\n s0l = ((t1l >>> 1) | (t1h << 31)) ^ ((t1l >>> 8) | (t1h << 24)) ^ ((t1l >>> 7) | t1h << 25);\n\n t1h = blocks[j - 4];\n t1l = blocks[j - 3];\n s1h = ((t1h >>> 19) | (t1l << 13)) ^ ((t1l >>> 29) | (t1h << 3)) ^ (t1h >>> 6);\n s1l = ((t1l >>> 19) | (t1h << 13)) ^ ((t1h >>> 29) | (t1l << 3)) ^ ((t1l >>> 6) | t1h << 26);\n\n t1h = blocks[j - 32];\n t1l = blocks[j - 31];\n t2h = blocks[j - 14];\n t2l = blocks[j - 13];\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (s0l & 0xFFFF) + (s1l & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (s0l >>> 16) + (s1l >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (s0h & 0xFFFF) + (s1h & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (s0h >>> 16) + (s1h >>> 16) + (c3 >>> 16);\n\n blocks[j] = (c4 << 16) | (c3 & 0xFFFF);\n blocks[j + 1] = (c2 << 16) | (c1 & 0xFFFF);\n }\n\n var ah = h0h, al = h0l, bh = h1h, bl = h1l, ch = h2h, cl = h2l, dh = h3h, dl = h3l, eh = h4h, el = h4l, fh = h5h, fl = h5l, gh = h6h, gl = h6l, hh = h7h, hl = h7l;\n bch = bh & ch;\n bcl = bl & cl;\n for (j = 0; j < 160; j += 8) {\n s0h = ((ah >>> 28) | (al << 4)) ^ ((al >>> 2) | (ah << 30)) ^ ((al >>> 7) | (ah << 25));\n s0l = ((al >>> 28) | (ah << 4)) ^ ((ah >>> 2) | (al << 30)) ^ ((ah >>> 7) | (al << 25));\n\n s1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((el >>> 9) | (eh << 23));\n s1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((eh >>> 9) | (el << 23));\n\n abh = ah & bh;\n abl = al & bl;\n majh = abh ^ (ah & ch) ^ bch;\n majl = abl ^ (al & cl) ^ bcl;\n\n chh = (eh & fh) ^ (~eh & gh);\n chl = (el & fl) ^ (~el & gl);\n\n t1h = blocks[j];\n t1l = blocks[j + 1];\n t2h = K[j];\n t2l = K[j + 1];\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (hl & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (hl >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (hh & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (hh >>> 16) + (c3 >>> 16);\n\n t1h = (c4 << 16) | (c3 & 0xFFFF);\n t1l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (majl & 0xFFFF) + (s0l & 0xFFFF);\n c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16);\n c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16);\n c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16);\n\n t2h = (c4 << 16) | (c3 & 0xFFFF);\n t2l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (dl & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (dl >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (dh & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (dh >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n hh = (c4 << 16) | (c3 & 0xFFFF);\n hl = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n dh = (c4 << 16) | (c3 & 0xFFFF);\n dl = (c2 << 16) | (c1 & 0xFFFF);\n\n s0h = ((dh >>> 28) | (dl << 4)) ^ ((dl >>> 2) | (dh << 30)) ^ ((dl >>> 7) | (dh << 25));\n s0l = ((dl >>> 28) | (dh << 4)) ^ ((dh >>> 2) | (dl << 30)) ^ ((dh >>> 7) | (dl << 25));\n\n s1h = ((hh >>> 14) | (hl << 18)) ^ ((hh >>> 18) | (hl << 14)) ^ ((hl >>> 9) | (hh << 23));\n s1l = ((hl >>> 14) | (hh << 18)) ^ ((hl >>> 18) | (hh << 14)) ^ ((hh >>> 9) | (hl << 23));\n\n dah = dh & ah;\n dal = dl & al;\n majh = dah ^ (dh & bh) ^ abh;\n majl = dal ^ (dl & bl) ^ abl;\n\n chh = (hh & eh) ^ (~hh & fh);\n chl = (hl & el) ^ (~hl & fl);\n\n t1h = blocks[j + 2];\n t1l = blocks[j + 3];\n t2h = K[j + 2];\n t2l = K[j + 3];\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (gl & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (gl >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (gh & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (gh >>> 16) + (c3 >>> 16);\n\n t1h = (c4 << 16) | (c3 & 0xFFFF);\n t1l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (majl & 0xFFFF) + (s0l & 0xFFFF);\n c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16);\n c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16);\n c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16);\n\n t2h = (c4 << 16) | (c3 & 0xFFFF);\n t2l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (cl & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (cl >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (ch & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (ch >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n gh = (c4 << 16) | (c3 & 0xFFFF);\n gl = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n ch = (c4 << 16) | (c3 & 0xFFFF);\n cl = (c2 << 16) | (c1 & 0xFFFF);\n\n s0h = ((ch >>> 28) | (cl << 4)) ^ ((cl >>> 2) | (ch << 30)) ^ ((cl >>> 7) | (ch << 25));\n s0l = ((cl >>> 28) | (ch << 4)) ^ ((ch >>> 2) | (cl << 30)) ^ ((ch >>> 7) | (cl << 25));\n\n s1h = ((gh >>> 14) | (gl << 18)) ^ ((gh >>> 18) | (gl << 14)) ^ ((gl >>> 9) | (gh << 23));\n s1l = ((gl >>> 14) | (gh << 18)) ^ ((gl >>> 18) | (gh << 14)) ^ ((gh >>> 9) | (gl << 23));\n\n cdh = ch & dh;\n cdl = cl & dl;\n majh = cdh ^ (ch & ah) ^ dah;\n majl = cdl ^ (cl & al) ^ dal;\n\n chh = (gh & hh) ^ (~gh & eh);\n chl = (gl & hl) ^ (~gl & el);\n\n t1h = blocks[j + 4];\n t1l = blocks[j + 5];\n t2h = K[j + 4];\n t2l = K[j + 5];\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (fl & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (fl >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (fh & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (fh >>> 16) + (c3 >>> 16);\n\n t1h = (c4 << 16) | (c3 & 0xFFFF);\n t1l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (majl & 0xFFFF) + (s0l & 0xFFFF);\n c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16);\n c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16);\n c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16);\n\n t2h = (c4 << 16) | (c3 & 0xFFFF);\n t2l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (bl & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (bl >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (bh & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (bh >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n fh = (c4 << 16) | (c3 & 0xFFFF);\n fl = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n bh = (c4 << 16) | (c3 & 0xFFFF);\n bl = (c2 << 16) | (c1 & 0xFFFF);\n\n s0h = ((bh >>> 28) | (bl << 4)) ^ ((bl >>> 2) | (bh << 30)) ^ ((bl >>> 7) | (bh << 25));\n s0l = ((bl >>> 28) | (bh << 4)) ^ ((bh >>> 2) | (bl << 30)) ^ ((bh >>> 7) | (bl << 25));\n\n s1h = ((fh >>> 14) | (fl << 18)) ^ ((fh >>> 18) | (fl << 14)) ^ ((fl >>> 9) | (fh << 23));\n s1l = ((fl >>> 14) | (fh << 18)) ^ ((fl >>> 18) | (fh << 14)) ^ ((fh >>> 9) | (fl << 23));\n\n bch = bh & ch;\n bcl = bl & cl;\n majh = bch ^ (bh & dh) ^ cdh;\n majl = bcl ^ (bl & dl) ^ cdl;\n\n chh = (fh & gh) ^ (~fh & hh);\n chl = (fl & gl) ^ (~fl & hl);\n\n t1h = blocks[j + 6];\n t1l = blocks[j + 7];\n t2h = K[j + 6];\n t2l = K[j + 7];\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF) + (chl & 0xFFFF) + (s1l & 0xFFFF) + (el & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (chl >>> 16) + (s1l >>> 16) + (el >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (chh & 0xFFFF) + (s1h & 0xFFFF) + (eh & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (chh >>> 16) + (s1h >>> 16) + (eh >>> 16) + (c3 >>> 16);\n\n t1h = (c4 << 16) | (c3 & 0xFFFF);\n t1l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (majl & 0xFFFF) + (s0l & 0xFFFF);\n c2 = (majl >>> 16) + (s0l >>> 16) + (c1 >>> 16);\n c3 = (majh & 0xFFFF) + (s0h & 0xFFFF) + (c2 >>> 16);\n c4 = (majh >>> 16) + (s0h >>> 16) + (c3 >>> 16);\n\n t2h = (c4 << 16) | (c3 & 0xFFFF);\n t2l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (al & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (al >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (ah & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (ah >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n eh = (c4 << 16) | (c3 & 0xFFFF);\n el = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (t2l & 0xFFFF) + (t1l & 0xFFFF);\n c2 = (t2l >>> 16) + (t1l >>> 16) + (c1 >>> 16);\n c3 = (t2h & 0xFFFF) + (t1h & 0xFFFF) + (c2 >>> 16);\n c4 = (t2h >>> 16) + (t1h >>> 16) + (c3 >>> 16);\n\n ah = (c4 << 16) | (c3 & 0xFFFF);\n al = (c2 << 16) | (c1 & 0xFFFF);\n }\n\n c1 = (h0l & 0xFFFF) + (al & 0xFFFF);\n c2 = (h0l >>> 16) + (al >>> 16) + (c1 >>> 16);\n c3 = (h0h & 0xFFFF) + (ah & 0xFFFF) + (c2 >>> 16);\n c4 = (h0h >>> 16) + (ah >>> 16) + (c3 >>> 16);\n\n this.h0h = (c4 << 16) | (c3 & 0xFFFF);\n this.h0l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h1l & 0xFFFF) + (bl & 0xFFFF);\n c2 = (h1l >>> 16) + (bl >>> 16) + (c1 >>> 16);\n c3 = (h1h & 0xFFFF) + (bh & 0xFFFF) + (c2 >>> 16);\n c4 = (h1h >>> 16) + (bh >>> 16) + (c3 >>> 16);\n\n this.h1h = (c4 << 16) | (c3 & 0xFFFF);\n this.h1l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h2l & 0xFFFF) + (cl & 0xFFFF);\n c2 = (h2l >>> 16) + (cl >>> 16) + (c1 >>> 16);\n c3 = (h2h & 0xFFFF) + (ch & 0xFFFF) + (c2 >>> 16);\n c4 = (h2h >>> 16) + (ch >>> 16) + (c3 >>> 16);\n\n this.h2h = (c4 << 16) | (c3 & 0xFFFF);\n this.h2l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h3l & 0xFFFF) + (dl & 0xFFFF);\n c2 = (h3l >>> 16) + (dl >>> 16) + (c1 >>> 16);\n c3 = (h3h & 0xFFFF) + (dh & 0xFFFF) + (c2 >>> 16);\n c4 = (h3h >>> 16) + (dh >>> 16) + (c3 >>> 16);\n\n this.h3h = (c4 << 16) | (c3 & 0xFFFF);\n this.h3l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h4l & 0xFFFF) + (el & 0xFFFF);\n c2 = (h4l >>> 16) + (el >>> 16) + (c1 >>> 16);\n c3 = (h4h & 0xFFFF) + (eh & 0xFFFF) + (c2 >>> 16);\n c4 = (h4h >>> 16) + (eh >>> 16) + (c3 >>> 16);\n\n this.h4h = (c4 << 16) | (c3 & 0xFFFF);\n this.h4l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h5l & 0xFFFF) + (fl & 0xFFFF);\n c2 = (h5l >>> 16) + (fl >>> 16) + (c1 >>> 16);\n c3 = (h5h & 0xFFFF) + (fh & 0xFFFF) + (c2 >>> 16);\n c4 = (h5h >>> 16) + (fh >>> 16) + (c3 >>> 16);\n\n this.h5h = (c4 << 16) | (c3 & 0xFFFF);\n this.h5l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h6l & 0xFFFF) + (gl & 0xFFFF);\n c2 = (h6l >>> 16) + (gl >>> 16) + (c1 >>> 16);\n c3 = (h6h & 0xFFFF) + (gh & 0xFFFF) + (c2 >>> 16);\n c4 = (h6h >>> 16) + (gh >>> 16) + (c3 >>> 16);\n\n this.h6h = (c4 << 16) | (c3 & 0xFFFF);\n this.h6l = (c2 << 16) | (c1 & 0xFFFF);\n\n c1 = (h7l & 0xFFFF) + (hl & 0xFFFF);\n c2 = (h7l >>> 16) + (hl >>> 16) + (c1 >>> 16);\n c3 = (h7h & 0xFFFF) + (hh & 0xFFFF) + (c2 >>> 16);\n c4 = (h7h >>> 16) + (hh >>> 16) + (c3 >>> 16);\n\n this.h7h = (c4 << 16) | (c3 & 0xFFFF);\n this.h7l = (c2 << 16) | (c1 & 0xFFFF);\n };\n\n Sha512.prototype.hex = function () {\n this.finalize();\n\n var h0h = this.h0h, h0l = this.h0l, h1h = this.h1h, h1l = this.h1l,\n h2h = this.h2h, h2l = this.h2l, h3h = this.h3h, h3l = this.h3l,\n h4h = this.h4h, h4l = this.h4l, h5h = this.h5h, h5l = this.h5l,\n h6h = this.h6h, h6l = this.h6l, h7h = this.h7h, h7l = this.h7l,\n bits = this.bits;\n\n var hex = HEX_CHARS[(h0h >> 28) & 0x0F] + HEX_CHARS[(h0h >> 24) & 0x0F] +\n HEX_CHARS[(h0h >> 20) & 0x0F] + HEX_CHARS[(h0h >> 16) & 0x0F] +\n HEX_CHARS[(h0h >> 12) & 0x0F] + HEX_CHARS[(h0h >> 8) & 0x0F] +\n HEX_CHARS[(h0h >> 4) & 0x0F] + HEX_CHARS[h0h & 0x0F] +\n HEX_CHARS[(h0l >> 28) & 0x0F] + HEX_CHARS[(h0l >> 24) & 0x0F] +\n HEX_CHARS[(h0l >> 20) & 0x0F] + HEX_CHARS[(h0l >> 16) & 0x0F] +\n HEX_CHARS[(h0l >> 12) & 0x0F] + HEX_CHARS[(h0l >> 8) & 0x0F] +\n HEX_CHARS[(h0l >> 4) & 0x0F] + HEX_CHARS[h0l & 0x0F] +\n HEX_CHARS[(h1h >> 28) & 0x0F] + HEX_CHARS[(h1h >> 24) & 0x0F] +\n HEX_CHARS[(h1h >> 20) & 0x0F] + HEX_CHARS[(h1h >> 16) & 0x0F] +\n HEX_CHARS[(h1h >> 12) & 0x0F] + HEX_CHARS[(h1h >> 8) & 0x0F] +\n HEX_CHARS[(h1h >> 4) & 0x0F] + HEX_CHARS[h1h & 0x0F] +\n HEX_CHARS[(h1l >> 28) & 0x0F] + HEX_CHARS[(h1l >> 24) & 0x0F] +\n HEX_CHARS[(h1l >> 20) & 0x0F] + HEX_CHARS[(h1l >> 16) & 0x0F] +\n HEX_CHARS[(h1l >> 12) & 0x0F] + HEX_CHARS[(h1l >> 8) & 0x0F] +\n HEX_CHARS[(h1l >> 4) & 0x0F] + HEX_CHARS[h1l & 0x0F] +\n HEX_CHARS[(h2h >> 28) & 0x0F] + HEX_CHARS[(h2h >> 24) & 0x0F] +\n HEX_CHARS[(h2h >> 20) & 0x0F] + HEX_CHARS[(h2h >> 16) & 0x0F] +\n HEX_CHARS[(h2h >> 12) & 0x0F] + HEX_CHARS[(h2h >> 8) & 0x0F] +\n HEX_CHARS[(h2h >> 4) & 0x0F] + HEX_CHARS[h2h & 0x0F] +\n HEX_CHARS[(h2l >> 28) & 0x0F] + HEX_CHARS[(h2l >> 24) & 0x0F] +\n HEX_CHARS[(h2l >> 20) & 0x0F] + HEX_CHARS[(h2l >> 16) & 0x0F] +\n HEX_CHARS[(h2l >> 12) & 0x0F] + HEX_CHARS[(h2l >> 8) & 0x0F] +\n HEX_CHARS[(h2l >> 4) & 0x0F] + HEX_CHARS[h2l & 0x0F] +\n HEX_CHARS[(h3h >> 28) & 0x0F] + HEX_CHARS[(h3h >> 24) & 0x0F] +\n HEX_CHARS[(h3h >> 20) & 0x0F] + HEX_CHARS[(h3h >> 16) & 0x0F] +\n HEX_CHARS[(h3h >> 12) & 0x0F] + HEX_CHARS[(h3h >> 8) & 0x0F] +\n HEX_CHARS[(h3h >> 4) & 0x0F] + HEX_CHARS[h3h & 0x0F];\n if (bits >= 256) {\n hex += HEX_CHARS[(h3l >> 28) & 0x0F] + HEX_CHARS[(h3l >> 24) & 0x0F] +\n HEX_CHARS[(h3l >> 20) & 0x0F] + HEX_CHARS[(h3l >> 16) & 0x0F] +\n HEX_CHARS[(h3l >> 12) & 0x0F] + HEX_CHARS[(h3l >> 8) & 0x0F] +\n HEX_CHARS[(h3l >> 4) & 0x0F] + HEX_CHARS[h3l & 0x0F];\n }\n if (bits >= 384) {\n hex += HEX_CHARS[(h4h >> 28) & 0x0F] + HEX_CHARS[(h4h >> 24) & 0x0F] +\n HEX_CHARS[(h4h >> 20) & 0x0F] + HEX_CHARS[(h4h >> 16) & 0x0F] +\n HEX_CHARS[(h4h >> 12) & 0x0F] + HEX_CHARS[(h4h >> 8) & 0x0F] +\n HEX_CHARS[(h4h >> 4) & 0x0F] + HEX_CHARS[h4h & 0x0F] +\n HEX_CHARS[(h4l >> 28) & 0x0F] + HEX_CHARS[(h4l >> 24) & 0x0F] +\n HEX_CHARS[(h4l >> 20) & 0x0F] + HEX_CHARS[(h4l >> 16) & 0x0F] +\n HEX_CHARS[(h4l >> 12) & 0x0F] + HEX_CHARS[(h4l >> 8) & 0x0F] +\n HEX_CHARS[(h4l >> 4) & 0x0F] + HEX_CHARS[h4l & 0x0F] +\n HEX_CHARS[(h5h >> 28) & 0x0F] + HEX_CHARS[(h5h >> 24) & 0x0F] +\n HEX_CHARS[(h5h >> 20) & 0x0F] + HEX_CHARS[(h5h >> 16) & 0x0F] +\n HEX_CHARS[(h5h >> 12) & 0x0F] + HEX_CHARS[(h5h >> 8) & 0x0F] +\n HEX_CHARS[(h5h >> 4) & 0x0F] + HEX_CHARS[h5h & 0x0F] +\n HEX_CHARS[(h5l >> 28) & 0x0F] + HEX_CHARS[(h5l >> 24) & 0x0F] +\n HEX_CHARS[(h5l >> 20) & 0x0F] + HEX_CHARS[(h5l >> 16) & 0x0F] +\n HEX_CHARS[(h5l >> 12) & 0x0F] + HEX_CHARS[(h5l >> 8) & 0x0F] +\n HEX_CHARS[(h5l >> 4) & 0x0F] + HEX_CHARS[h5l & 0x0F];\n }\n if (bits == 512) {\n hex += HEX_CHARS[(h6h >> 28) & 0x0F] + HEX_CHARS[(h6h >> 24) & 0x0F] +\n HEX_CHARS[(h6h >> 20) & 0x0F] + HEX_CHARS[(h6h >> 16) & 0x0F] +\n HEX_CHARS[(h6h >> 12) & 0x0F] + HEX_CHARS[(h6h >> 8) & 0x0F] +\n HEX_CHARS[(h6h >> 4) & 0x0F] + HEX_CHARS[h6h & 0x0F] +\n HEX_CHARS[(h6l >> 28) & 0x0F] + HEX_CHARS[(h6l >> 24) & 0x0F] +\n HEX_CHARS[(h6l >> 20) & 0x0F] + HEX_CHARS[(h6l >> 16) & 0x0F] +\n HEX_CHARS[(h6l >> 12) & 0x0F] + HEX_CHARS[(h6l >> 8) & 0x0F] +\n HEX_CHARS[(h6l >> 4) & 0x0F] + HEX_CHARS[h6l & 0x0F] +\n HEX_CHARS[(h7h >> 28) & 0x0F] + HEX_CHARS[(h7h >> 24) & 0x0F] +\n HEX_CHARS[(h7h >> 20) & 0x0F] + HEX_CHARS[(h7h >> 16) & 0x0F] +\n HEX_CHARS[(h7h >> 12) & 0x0F] + HEX_CHARS[(h7h >> 8) & 0x0F] +\n HEX_CHARS[(h7h >> 4) & 0x0F] + HEX_CHARS[h7h & 0x0F] +\n HEX_CHARS[(h7l >> 28) & 0x0F] + HEX_CHARS[(h7l >> 24) & 0x0F] +\n HEX_CHARS[(h7l >> 20) & 0x0F] + HEX_CHARS[(h7l >> 16) & 0x0F] +\n HEX_CHARS[(h7l >> 12) & 0x0F] + HEX_CHARS[(h7l >> 8) & 0x0F] +\n HEX_CHARS[(h7l >> 4) & 0x0F] + HEX_CHARS[h7l & 0x0F];\n }\n return hex;\n };\n\n Sha512.prototype.toString = Sha512.prototype.hex;\n\n Sha512.prototype.digest = function () {\n this.finalize();\n\n var h0h = this.h0h, h0l = this.h0l, h1h = this.h1h, h1l = this.h1l,\n h2h = this.h2h, h2l = this.h2l, h3h = this.h3h, h3l = this.h3l,\n h4h = this.h4h, h4l = this.h4l, h5h = this.h5h, h5l = this.h5l,\n h6h = this.h6h, h6l = this.h6l, h7h = this.h7h, h7l = this.h7l,\n bits = this.bits;\n\n var arr = [\n (h0h >> 24) & 0xFF, (h0h >> 16) & 0xFF, (h0h >> 8) & 0xFF, h0h & 0xFF,\n (h0l >> 24) & 0xFF, (h0l >> 16) & 0xFF, (h0l >> 8) & 0xFF, h0l & 0xFF,\n (h1h >> 24) & 0xFF, (h1h >> 16) & 0xFF, (h1h >> 8) & 0xFF, h1h & 0xFF,\n (h1l >> 24) & 0xFF, (h1l >> 16) & 0xFF, (h1l >> 8) & 0xFF, h1l & 0xFF,\n (h2h >> 24) & 0xFF, (h2h >> 16) & 0xFF, (h2h >> 8) & 0xFF, h2h & 0xFF,\n (h2l >> 24) & 0xFF, (h2l >> 16) & 0xFF, (h2l >> 8) & 0xFF, h2l & 0xFF,\n (h3h >> 24) & 0xFF, (h3h >> 16) & 0xFF, (h3h >> 8) & 0xFF, h3h & 0xFF\n ];\n\n if (bits >= 256) {\n arr.push((h3l >> 24) & 0xFF, (h3l >> 16) & 0xFF, (h3l >> 8) & 0xFF, h3l & 0xFF);\n }\n if (bits >= 384) {\n arr.push(\n (h4h >> 24) & 0xFF, (h4h >> 16) & 0xFF, (h4h >> 8) & 0xFF, h4h & 0xFF,\n (h4l >> 24) & 0xFF, (h4l >> 16) & 0xFF, (h4l >> 8) & 0xFF, h4l & 0xFF,\n (h5h >> 24) & 0xFF, (h5h >> 16) & 0xFF, (h5h >> 8) & 0xFF, h5h & 0xFF,\n (h5l >> 24) & 0xFF, (h5l >> 16) & 0xFF, (h5l >> 8) & 0xFF, h5l & 0xFF\n );\n }\n if (bits == 512) {\n arr.push(\n (h6h >> 24) & 0xFF, (h6h >> 16) & 0xFF, (h6h >> 8) & 0xFF, h6h & 0xFF,\n (h6l >> 24) & 0xFF, (h6l >> 16) & 0xFF, (h6l >> 8) & 0xFF, h6l & 0xFF,\n (h7h >> 24) & 0xFF, (h7h >> 16) & 0xFF, (h7h >> 8) & 0xFF, h7h & 0xFF,\n (h7l >> 24) & 0xFF, (h7l >> 16) & 0xFF, (h7l >> 8) & 0xFF, h7l & 0xFF\n );\n }\n return arr;\n };\n\n Sha512.prototype.array = Sha512.prototype.digest;\n\n Sha512.prototype.arrayBuffer = function () {\n this.finalize();\n\n var bits = this.bits;\n var buffer = new ArrayBuffer(bits / 8);\n var dataView = new DataView(buffer);\n dataView.setUint32(0, this.h0h);\n dataView.setUint32(4, this.h0l);\n dataView.setUint32(8, this.h1h);\n dataView.setUint32(12, this.h1l);\n dataView.setUint32(16, this.h2h);\n dataView.setUint32(20, this.h2l);\n dataView.setUint32(24, this.h3h);\n\n if (bits >= 256) {\n dataView.setUint32(28, this.h3l);\n }\n if (bits >= 384) {\n dataView.setUint32(32, this.h4h);\n dataView.setUint32(36, this.h4l);\n dataView.setUint32(40, this.h5h);\n dataView.setUint32(44, this.h5l);\n }\n if (bits == 512) {\n dataView.setUint32(48, this.h6h);\n dataView.setUint32(52, this.h6l);\n dataView.setUint32(56, this.h7h);\n dataView.setUint32(60, this.h7l);\n }\n return buffer;\n };\n\n Sha512.prototype.clone = function () {\n var hash = new Sha512(this.bits, false);\n this.copyTo(hash);\n return hash;\n };\n\n Sha512.prototype.copyTo = function (hash) {\n var i = 0, attrs = [\n 'h0h', 'h0l', 'h1h', 'h1l', 'h2h', 'h2l', 'h3h', 'h3l', 'h4h', 'h4l', 'h5h', 'h5l', 'h6h', 'h6l', 'h7h', 'h7l',\n 'start', 'bytes', 'hBytes', 'finalized', 'hashed', 'lastByteIndex'\n ];\n for (i = 0; i < attrs.length; ++i) {\n hash[attrs[i]] = this[attrs[i]];\n }\n for (i = 0; i < this.blocks.length; ++i) {\n hash.blocks[i] = this.blocks[i];\n }\n };\n\n function HmacSha512(key, bits, sharedMemory) {\n var notString, type = typeof key;\n if (type !== 'string') {\n if (type === 'object') {\n if (key === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\n key = new Uint8Array(key);\n } else if (!Array.isArray(key)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var length = key.length;\n if (!notString) {\n var bytes = [], length = key.length, index = 0, code;\n for (var i = 0; i < length; ++i) {\n code = key.charCodeAt(i);\n if (code < 0x80) {\n bytes[index++] = code;\n } else if (code < 0x800) {\n bytes[index++] = (0xc0 | (code >> 6));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes[index++] = (0xe0 | (code >> 12));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\n bytes[index++] = (0xf0 | (code >> 18));\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\n bytes[index++] = (0x80 | (code & 0x3f));\n }\n }\n key = bytes;\n }\n\n if (key.length > 128) {\n key = (new Sha512(bits, true)).update(key).array();\n }\n\n var oKeyPad = [], iKeyPad = [];\n for (var i = 0; i < 128; ++i) {\n var b = key[i] || 0;\n oKeyPad[i] = 0x5c ^ b;\n iKeyPad[i] = 0x36 ^ b;\n }\n\n Sha512.call(this, bits, sharedMemory);\n\n this.update(iKeyPad);\n this.oKeyPad = oKeyPad;\n this.inner = true;\n this.sharedMemory = sharedMemory;\n }\n HmacSha512.prototype = new Sha512();\n\n HmacSha512.prototype.finalize = function () {\n Sha512.prototype.finalize.call(this);\n if (this.inner) {\n this.inner = false;\n var innerHash = this.array();\n Sha512.call(this, this.bits, this.sharedMemory);\n this.update(this.oKeyPad);\n this.update(innerHash);\n Sha512.prototype.finalize.call(this);\n }\n };\n\n HmacSha512.prototype.clone = function () {\n var hash = new HmacSha512([], this.bits, false);\n this.copyTo(hash);\n hash.inner = this.inner;\n for (var i = 0; i < this.oKeyPad.length; ++i) {\n hash.oKeyPad[i] = this.oKeyPad[i];\n }\n return hash;\n };\n\n var exports = createMethod(512);\n exports.sha512 = exports;\n exports.sha384 = createMethod(384);\n exports.sha512_256 = createMethod(256);\n exports.sha512_224 = createMethod(224);\n exports.sha512.hmac = createHmacMethod(512);\n exports.sha384.hmac = createHmacMethod(384);\n exports.sha512_256.hmac = createHmacMethod(256);\n exports.sha512_224.hmac = createHmacMethod(224);\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.sha512 = exports.sha512;\n root.sha384 = exports.sha384;\n root.sha512_256 = exports.sha512_256;\n root.sha512_224 = exports.sha512_224;\n if (AMD) {\n define(function () {\n return exports;\n });\n }\n }\n})();\n",";(function (globalObject) {\r\n 'use strict';\r\n\r\n/*\r\n * bignumber.js v9.1.2\r\n * A JavaScript library for arbitrary-precision arithmetic.\r\n * https://github.com/MikeMcl/bignumber.js\r\n * Copyright (c) 2022 Michael Mclaughlin \r\n * MIT Licensed.\r\n *\r\n * BigNumber.prototype methods | BigNumber methods\r\n * |\r\n * absoluteValue abs | clone\r\n * comparedTo | config set\r\n * decimalPlaces dp | DECIMAL_PLACES\r\n * dividedBy div | ROUNDING_MODE\r\n * dividedToIntegerBy idiv | EXPONENTIAL_AT\r\n * exponentiatedBy pow | RANGE\r\n * integerValue | CRYPTO\r\n * isEqualTo eq | MODULO_MODE\r\n * isFinite | POW_PRECISION\r\n * isGreaterThan gt | FORMAT\r\n * isGreaterThanOrEqualTo gte | ALPHABET\r\n * isInteger | isBigNumber\r\n * isLessThan lt | maximum max\r\n * isLessThanOrEqualTo lte | minimum min\r\n * isNaN | random\r\n * isNegative | sum\r\n * isPositive |\r\n * isZero |\r\n * minus |\r\n * modulo mod |\r\n * multipliedBy times |\r\n * negated |\r\n * plus |\r\n * precision sd |\r\n * shiftedBy |\r\n * squareRoot sqrt |\r\n * toExponential |\r\n * toFixed |\r\n * toFormat |\r\n * toFraction |\r\n * toJSON |\r\n * toNumber |\r\n * toPrecision |\r\n * toString |\r\n * valueOf |\r\n *\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n\r\n bignumberError = '[BigNumber Error] ',\r\n tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',\r\n\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n // EDITABLE\r\n // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n // the arguments to toExponential, toFixed, toFormat, and toPrecision.\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function clone(configObject) {\r\n var div, convertBase, parseNumeric,\r\n P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },\r\n ONE = new BigNumber(1),\r\n\r\n\r\n //----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------\r\n\r\n\r\n // The default values below must be integers within the inclusive ranges stated.\r\n // The values can also be changed at run-time using BigNumber.set.\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n // The rounding mode used when rounding to the above decimal places, and when using\r\n // toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n // UP 0 Away from zero.\r\n // DOWN 1 Towards zero.\r\n // CEIL 2 Towards +Infinity.\r\n // FLOOR 3 Towards -Infinity.\r\n // HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend.\r\n // This modulo mode is commonly known as 'truncated division' and is\r\n // equivalent to (a % n) in JavaScript.\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n // The remainder is always positive.\r\n //\r\n // The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n // modes are commonly used for the modulus operation.\r\n // Although the other rounding modes can also be used, they may not give useful results.\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the exponentiatedBy operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n prefix: '',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n groupSeparator: ',',\r\n decimalSeparator: '.',\r\n fractionGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n suffix: ''\r\n },\r\n\r\n // The alphabet used for base conversion. It must be at least 2 characters long, with no '+',\r\n // '-', '.', whitespace, or repeated character.\r\n // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz',\r\n alphabetHasNormalDecimalDigits = true;\r\n\r\n\r\n //------------------------------------------------------------------------------------------\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * v {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.\r\n */\r\n function BigNumber(v, b) {\r\n var alphabet, c, caseChanged, e, i, isNum, len, str,\r\n x = this;\r\n\r\n // Enable constructor call without `new`.\r\n if (!(x instanceof BigNumber)) return new BigNumber(v, b);\r\n\r\n if (b == null) {\r\n\r\n if (v && v._isBigNumber === true) {\r\n x.s = v.s;\r\n\r\n if (!v.c || v.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else if (v.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = v.e;\r\n x.c = v.c.slice();\r\n }\r\n\r\n return;\r\n }\r\n\r\n if ((isNum = typeof v == 'number') && v * 0 == 0) {\r\n\r\n // Use `1 / n` to handle minus zero also.\r\n x.s = 1 / v < 0 ? (v = -v, -1) : 1;\r\n\r\n // Fast path for integers, where n < 2147483648 (2**31).\r\n if (v === ~~v) {\r\n for (e = 0, i = v; i >= 10; i /= 10, e++);\r\n\r\n if (e > MAX_EXP) {\r\n x.c = x.e = null;\r\n } else {\r\n x.e = e;\r\n x.c = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n str = String(v);\r\n } else {\r\n\r\n if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);\r\n\r\n x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n\r\n // Allow exponential notation to be used with base 10 argument, while\r\n // also rounding to DECIMAL_PLACES as with other bases.\r\n if (b == 10 && alphabetHasNormalDecimalDigits) {\r\n x = new BigNumber(v);\r\n return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);\r\n }\r\n\r\n str = String(v);\r\n\r\n if (isNum = typeof v == 'number') {\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n if (v * 0 != 0) return parseNumeric(x, str, isNum, b);\r\n\r\n x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (BigNumber.DEBUG && str.replace(/^0\\.0*|\\./, '').length > 15) {\r\n throw Error\r\n (tooManyDigits + v);\r\n }\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;\r\n }\r\n\r\n alphabet = ALPHABET.slice(0, b);\r\n e = i = 0;\r\n\r\n // Check that str is a valid base b number.\r\n // Don't use RegExp, so alphabet can contain special characters.\r\n for (len = str.length; i < len; i++) {\r\n if (alphabet.indexOf(c = str.charAt(i)) < 0) {\r\n if (c == '.') {\r\n\r\n // If '.' is not the first character and it has not be found before.\r\n if (i > e) {\r\n e = len;\r\n continue;\r\n }\r\n } else if (!caseChanged) {\r\n\r\n // Allow e.g. hexadecimal 'FF' as well as 'ff'.\r\n if (str == str.toUpperCase() && (str = str.toLowerCase()) ||\r\n str == str.toLowerCase() && (str = str.toUpperCase())) {\r\n caseChanged = true;\r\n i = -1;\r\n e = 0;\r\n continue;\r\n }\r\n }\r\n\r\n return parseNumeric(x, String(v), isNum, b);\r\n }\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n isNum = false;\r\n str = convertBase(str, b, 10, x.s);\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n else e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(--len) === 48;);\r\n\r\n if (str = str.slice(i, ++len)) {\r\n len -= i;\r\n\r\n // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'\r\n if (isNum && BigNumber.DEBUG &&\r\n len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {\r\n throw Error\r\n (tooManyDigits + (x.s * v));\r\n }\r\n\r\n // Overflow?\r\n if ((e = e - i - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE; // i < 1\r\n\r\n if (i < len) {\r\n if (i) x.c.push(+str.slice(0, i));\r\n\r\n for (len -= LOG_BASE; i < len;) {\r\n x.c.push(+str.slice(i, i += LOG_BASE));\r\n }\r\n\r\n i = LOG_BASE - (str = str.slice(i)).length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--; str += '0');\r\n x.c.push(+str);\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.clone = clone;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object with the following optional properties (if the value of a property is\r\n * a number, it must be an integer within the inclusive range stated):\r\n *\r\n * DECIMAL_PLACES {number} 0 to MAX\r\n * ROUNDING_MODE {number} 0 to 8\r\n * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]\r\n * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]\r\n * CRYPTO {boolean} true or false\r\n * MODULO_MODE {number} 0 to 9\r\n * POW_PRECISION {number} 0 to MAX\r\n * ALPHABET {string} A string of two or more unique characters which does\r\n * not contain '.'.\r\n * FORMAT {object} An object with some of the following properties:\r\n * prefix {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * groupSeparator {string}\r\n * decimalSeparator {string}\r\n * fractionGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * suffix {string}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined, except for ALPHABET.\r\n *\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function (obj) {\r\n var p, v;\r\n\r\n if (obj != null) {\r\n\r\n if (typeof obj == 'object') {\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n DECIMAL_PLACES = v;\r\n }\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 8, p);\r\n ROUNDING_MODE = v;\r\n }\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or\r\n // [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, 0, p);\r\n intCheck(v[1], 0, MAX, p);\r\n TO_EXP_NEG = v[0];\r\n TO_EXP_POS = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);\r\n }\r\n }\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'\r\n if (obj.hasOwnProperty(p = 'RANGE')) {\r\n v = obj[p];\r\n if (v && v.pop) {\r\n intCheck(v[0], -MAX, -1, p);\r\n intCheck(v[1], 1, MAX, p);\r\n MIN_EXP = v[0];\r\n MAX_EXP = v[1];\r\n } else {\r\n intCheck(v, -MAX, MAX, p);\r\n if (v) {\r\n MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' cannot be zero: ' + v);\r\n }\r\n }\r\n }\r\n\r\n // CRYPTO {boolean} true or false.\r\n // '[BigNumber Error] CRYPTO not true or false: {v}'\r\n // '[BigNumber Error] crypto unavailable'\r\n if (obj.hasOwnProperty(p = 'CRYPTO')) {\r\n v = obj[p];\r\n if (v === !!v) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = v;\r\n } else {\r\n CRYPTO = !v;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n } else {\r\n CRYPTO = v;\r\n }\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' not true or false: ' + v);\r\n }\r\n }\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'MODULO_MODE')) {\r\n v = obj[p];\r\n intCheck(v, 0, 9, p);\r\n MODULO_MODE = v;\r\n }\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'\r\n if (obj.hasOwnProperty(p = 'POW_PRECISION')) {\r\n v = obj[p];\r\n intCheck(v, 0, MAX, p);\r\n POW_PRECISION = v;\r\n }\r\n\r\n // FORMAT {object}\r\n // '[BigNumber Error] FORMAT not an object: {v}'\r\n if (obj.hasOwnProperty(p = 'FORMAT')) {\r\n v = obj[p];\r\n if (typeof v == 'object') FORMAT = v;\r\n else throw Error\r\n (bignumberError + p + ' not an object: ' + v);\r\n }\r\n\r\n // ALPHABET {string}\r\n // '[BigNumber Error] ALPHABET invalid: {v}'\r\n if (obj.hasOwnProperty(p = 'ALPHABET')) {\r\n v = obj[p];\r\n\r\n // Disallow if less than two characters,\r\n // or if it contains '+', '-', '.', whitespace, or a repeated character.\r\n if (typeof v == 'string' && !/^.?$|[+\\-.\\s]|(.).*\\1/.test(v)) {\r\n alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789';\r\n ALPHABET = v;\r\n } else {\r\n throw Error\r\n (bignumberError + p + ' invalid: ' + v);\r\n }\r\n }\r\n\r\n } else {\r\n\r\n // '[BigNumber Error] Object expected: {v}'\r\n throw Error\r\n (bignumberError + 'Object expected: ' + obj);\r\n }\r\n }\r\n\r\n return {\r\n DECIMAL_PLACES: DECIMAL_PLACES,\r\n ROUNDING_MODE: ROUNDING_MODE,\r\n EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],\r\n RANGE: [MIN_EXP, MAX_EXP],\r\n CRYPTO: CRYPTO,\r\n MODULO_MODE: MODULO_MODE,\r\n POW_PRECISION: POW_PRECISION,\r\n FORMAT: FORMAT,\r\n ALPHABET: ALPHABET\r\n };\r\n };\r\n\r\n\r\n /*\r\n * Return true if v is a BigNumber instance, otherwise return false.\r\n *\r\n * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.\r\n *\r\n * v {any}\r\n *\r\n * '[BigNumber Error] Invalid BigNumber: {v}'\r\n */\r\n BigNumber.isBigNumber = function (v) {\r\n if (!v || v._isBigNumber !== true) return false;\r\n if (!BigNumber.DEBUG) return true;\r\n\r\n var i, n,\r\n c = v.c,\r\n e = v.e,\r\n s = v.s;\r\n\r\n out: if ({}.toString.call(c) == '[object Array]') {\r\n\r\n if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {\r\n\r\n // If the first element is zero, the BigNumber value must be zero.\r\n if (c[0] === 0) {\r\n if (e === 0 && c.length === 1) return true;\r\n break out;\r\n }\r\n\r\n // Calculate number of digits that c[0] should have, based on the exponent.\r\n i = (e + 1) % LOG_BASE;\r\n if (i < 1) i += LOG_BASE;\r\n\r\n // Calculate number of digits of c[0].\r\n //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {\r\n if (String(c[0]).length == i) {\r\n\r\n for (i = 0; i < c.length; i++) {\r\n n = c[i];\r\n if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;\r\n }\r\n\r\n // Last element cannot be zero, unless it is the only element.\r\n if (n !== 0) return true;\r\n }\r\n }\r\n\r\n // Infinity/NaN\r\n } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {\r\n return true;\r\n }\r\n\r\n throw Error\r\n (bignumberError + 'Invalid BigNumber: ' + v);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.maximum = BigNumber.max = function () {\r\n return maxOrMin(arguments, -1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.minimum = BigNumber.min = function () {\r\n return maxOrMin(arguments, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'\r\n * '[BigNumber Error] crypto unavailable'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor(Math.random() * pow2_53); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n if (dp == null) dp = DECIMAL_PLACES;\r\n else intCheck(dp, 0, MAX);\r\n\r\n k = mathceil(dp / LOG_BASE);\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues(new Uint32Array(k *= 2));\r\n\r\n for (; i < k;) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if (v >= 9e15) {\r\n b = crypto.getRandomValues(new Uint32Array(2));\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes(k *= 7);\r\n\r\n for (; i < k;) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +\r\n (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +\r\n (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];\r\n\r\n if (v >= 9e15) {\r\n crypto.randomBytes(7).copy(a, i);\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push(v % 1e14);\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n throw Error\r\n (bignumberError + 'crypto unavailable');\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for (; i < k;) {\r\n v = random53bitInt();\r\n if (v < 9e15) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if (k && dp) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor(k / v) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for (; c[i] === 0; c.pop(), i--);\r\n\r\n // Zero?\r\n if (i < 0) {\r\n c = [e = 0];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for (i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if (i < LOG_BASE) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the sum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.sum = function () {\r\n var i = 1,\r\n args = arguments,\r\n sum = new BigNumber(args[0]);\r\n for (; i < args.length;) sum = sum.plus(args[i++]);\r\n return sum;\r\n };\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Called by BigNumber and BigNumber.prototype.toString.\r\n convertBase = (function () {\r\n var decimal = '0123456789';\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. toBaseOut('255', 10, 16) returns [15, 15].\r\n * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut(str, baseIn, baseOut, alphabet) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for (; i < len;) {\r\n for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);\r\n\r\n arr[0] += alphabet.indexOf(str.charAt(i++));\r\n\r\n for (j = 0; j < arr.length; j++) {\r\n\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] == null) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n // If the caller is toString, we are converting from base 10 to baseOut.\r\n // If the caller is BigNumber, we are converting from baseIn to base 10.\r\n return function (str, baseIn, baseOut, sign, callerIsToString) {\r\n var alphabet, d, e, k, r, x, xc, y,\r\n i = str.indexOf('.'),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace('.', '');\r\n y = new BigNumber(baseIn);\r\n x = y.pow(str.length - i);\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n\r\n y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),\r\n 10, baseOut, decimal);\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n\r\n xc = toBaseOut(str, baseIn, baseOut, callerIsToString\r\n ? (alphabet = ALPHABET, decimal)\r\n : (alphabet = decimal, ALPHABET));\r\n\r\n // xc now represents str as an integer and converted to baseOut. e is the exponent.\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xc[--k] == 0; xc.pop());\r\n\r\n // Zero?\r\n if (!xc[0]) return alphabet.charAt(0);\r\n\r\n // Does str represent an integer? If so, no need for the division.\r\n if (i < 0) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // The sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div(x, y, dp, rm, baseOut);\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n // xc now represents str converted to baseOut.\r\n\r\n // THe index of the rounding digit.\r\n d = e + dp + 1;\r\n\r\n // The rounding digit: the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n\r\n // Look at the rounding digits and mode to determine whether to round up.\r\n\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n // If the index of the rounding digit is not greater than zero, or xc represents\r\n // zero, then the result of the base conversion is zero or, if rounding up, a value\r\n // such as 0.00001.\r\n if (d < 1 || !xc[0]) {\r\n\r\n // 1^-dp or 0\r\n str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);\r\n } else {\r\n\r\n // Truncate xc to the required number of decimal places.\r\n xc.length = d;\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (--baseOut; ++xc[--d] > baseOut;) {\r\n xc[d] = 0;\r\n\r\n if (!d) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (k = xc.length; !xc[--k];);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));\r\n\r\n // Add leading zeros, decimal point and trailing zeros as required.\r\n str = toFixedPoint(str, e, alphabet.charAt(0));\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n };\r\n })();\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply(x, k, base) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for (x = x.slice(); i--;) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;\r\n carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, cmp;\r\n\r\n if (aL != bL) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for (i = cmp = 0; i < aL; i++) {\r\n\r\n if (a[i] != b[i]) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1; a.splice(0, 1));\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function (x, y, dp, rm, base) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xc || !xc[0] || !yc || !yc[0]) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if (!base) {\r\n base = BASE;\r\n e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for (i = 0; yc[i] == (xc[i] || 0); i++);\r\n\r\n if (yc[i] > (xc[i] || 0)) e--;\r\n\r\n if (s < 0) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor(base / (yc[0] + 1));\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.\r\n // if (n > 1 || n++ == 1 && yc[0] < base / 2) {\r\n if (n > 1) {\r\n yc = multiply(yc, n, base);\r\n xc = multiply(xc, n, base);\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL; rem[remL++] = 0);\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if (yc[1] >= base / 2) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yc, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor(rem0 / yc0);\r\n\r\n // Algorithm:\r\n // product = divisor multiplied by trial digit (n).\r\n // Compare product and remainder.\r\n // If product is greater than remainder:\r\n // Subtract divisor from product, decrement trial digit.\r\n // Subtract product from remainder.\r\n // If product was less than remainder at the last compare:\r\n // Compare new remainder and divisor.\r\n // If remainder is greater than divisor:\r\n // Subtract divisor from remainder, increment trial digit.\r\n\r\n if (n > 1) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply(yc, n, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder then trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while (compare(prod, rem, prodL, remL) == 1) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yc, prodL, base);\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if (n == 0) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if (prodL < remL) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if (cmp == -1) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while (compare(yc, rem, yL, remL) < 1) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yc, remL, base);\r\n remL = rem.length;\r\n }\r\n }\r\n } else if (cmp === 0) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if (rem[0]) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [xc[xi]];\r\n remL = 1;\r\n }\r\n } while ((xi++ < xL || rem[0] != null) && s--);\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if (!qc[0]) qc.splice(0, 1);\r\n }\r\n\r\n if (base == BASE) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);\r\n\r\n round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n: a BigNumber.\r\n * i: the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm: the rounding mode.\r\n * id: 1 (toExponential) or 2 (toPrecision).\r\n */\r\n function format(n, i, rm, id) {\r\n var c0, e, ne, len, str;\r\n\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n if (!n.c) return n.toString();\r\n\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if (i == null) {\r\n str = coeffToString(n.c);\r\n str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)\r\n ? toExponential(str, ne)\r\n : toFixedPoint(str, ne, '0');\r\n } else {\r\n n = round(new BigNumber(n), i, rm);\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString(n.c);\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {\r\n\r\n // Append zeros?\r\n for (; len < i; str += '0', len++);\r\n str = toExponential(str, e);\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint(str, e, '0');\r\n\r\n // Append zeros?\r\n if (e + 1 > len) {\r\n if (--i > 0) for (str += '.'; i--; str += '0');\r\n } else {\r\n i += e - len;\r\n if (i > 0) {\r\n if (e + 1 == len) str += '.';\r\n for (; i--; str += '0');\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n // If any number is NaN, return NaN.\r\n function maxOrMin(args, n) {\r\n var k, y,\r\n i = 1,\r\n x = new BigNumber(args[0]);\r\n\r\n for (; i < args.length; i++) {\r\n y = new BigNumber(args[i]);\r\n if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise(n, c, e) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for (; !c[--j]; c.pop());\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for (j = c[0]; j >= 10; j /= 10, i++);\r\n\r\n // Overflow?\r\n if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if (e < MIN_EXP) {\r\n\r\n // Zero.\r\n n.c = [n.e = 0];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function (x, str, isNum, b) {\r\n var base,\r\n s = isNum ? str : str.replace(whitespaceOrPlus, '');\r\n\r\n // No exception on ±Infinity or NaN.\r\n if (isInfinityOrNaN.test(s)) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if (!isNum) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace(basePrefix, function (m, p1, p2) {\r\n base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');\r\n }\r\n\r\n if (str != s) return new BigNumber(s, base);\r\n }\r\n\r\n // '[BigNumber Error] Not a number: {n}'\r\n // '[BigNumber Error] Not a base {b} number: {n}'\r\n if (BigNumber.DEBUG) {\r\n throw Error\r\n (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);\r\n }\r\n\r\n // NaN\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n }\r\n })();\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round(x, sd, rm, r) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ni = 0];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = mathfloor(n / pows10[d - j - 1] % 10);\r\n } else {\r\n ni = mathceil((i + 1) / LOG_BASE);\r\n\r\n if (ni >= xc.length) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for (; xc.length <= ni; xc.push(0));\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for (d = 1; k >= 10; k /= 10, d++);\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[d - j - 1] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);\r\n\r\n r = rm < 4\r\n ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xc[0]) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[LOG_BASE - i];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for (; ;) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if (ni == 0) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);\r\n j = xc[0] += k;\r\n for (k = 1; j >= 10; j /= 10, k++);\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xc[0] == BASE) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if (xc[ni] != BASE) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xc.length; xc[--i] === 0; xc.pop());\r\n }\r\n\r\n // Overflow? Infinity.\r\n if (x.e > MAX_EXP) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if (x.e < MIN_EXP) {\r\n x.c = [x.e = 0];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function valueOf(n) {\r\n var str,\r\n e = n.e;\r\n\r\n if (e === null) return n.toString();\r\n\r\n str = coeffToString(n.c);\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(str, e)\r\n : toFixedPoint(str, e, '0');\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if (x.s < 0) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = function (y, b) {\r\n return compare(this, new BigNumber(y, b));\r\n };\r\n\r\n\r\n /*\r\n * If dp is undefined or null or true or false, return the number of decimal places of the\r\n * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n *\r\n * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * [dp] {number} Decimal places: integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.decimalPlaces = P.dp = function (dp, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), dp + x.e + 1, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);\r\n if (n < 0) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function (y, b) {\r\n return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.idiv = function (y, b) {\r\n return div(this, new BigNumber(y, b), 0, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber exponentiated by n.\r\n *\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are integers, otherwise it\r\n * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.\r\n *\r\n * n {number|string|BigNumber} The exponent. An integer.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * '[BigNumber Error] Exponent not an integer: {n}'\r\n */\r\n P.exponentiatedBy = P.pow = function (n, m) {\r\n var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,\r\n x = this;\r\n\r\n n = new BigNumber(n);\r\n\r\n // Allow NaN and ±Infinity, but not other non-integers.\r\n if (n.c && !n.isInteger()) {\r\n throw Error\r\n (bignumberError + 'Exponent not an integer: ' + valueOf(n));\r\n }\r\n\r\n if (m != null) m = new BigNumber(m);\r\n\r\n // Exponent of MAX_SAFE_INTEGER is 15.\r\n nIsBig = n.e > 14;\r\n\r\n // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.\r\n if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {\r\n\r\n // The sign of the result of pow when x is negative depends on the evenness of n.\r\n // If +n overflows to ±Infinity, the evenness of n would be not be known.\r\n y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));\r\n return m ? y.mod(m) : y;\r\n }\r\n\r\n nIsNeg = n.s < 0;\r\n\r\n if (m) {\r\n\r\n // x % m returns NaN if abs(m) is zero, or m is NaN.\r\n if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);\r\n\r\n isModExp = !nIsNeg && x.isInteger() && m.isInteger();\r\n\r\n if (isModExp) x = x.mod(m);\r\n\r\n // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.\r\n // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.\r\n } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0\r\n // [1, 240000000]\r\n ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7\r\n // [80000000000000] [99999750000000]\r\n : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {\r\n\r\n // If x is negative and n is odd, k = -0, else k = 0.\r\n k = x.s < 0 && isOdd(n) ? -0 : 0;\r\n\r\n // If x >= 1, k = ±Infinity.\r\n if (x.e > -1) k = 1 / k;\r\n\r\n // If n is negative return ±0, else return ±Infinity.\r\n return new BigNumber(nIsNeg ? 1 / k : k);\r\n\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n k = mathceil(POW_PRECISION / LOG_BASE + 2);\r\n }\r\n\r\n if (nIsBig) {\r\n half = new BigNumber(0.5);\r\n if (nIsNeg) n.s = 1;\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = Math.abs(+valueOf(n));\r\n nIsOdd = i % 2;\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n // Performs 54 loop iterations for n of 9007199254740991.\r\n for (; ;) {\r\n\r\n if (nIsOdd) {\r\n y = y.times(x);\r\n if (!y.c) break;\r\n\r\n if (k) {\r\n if (y.c.length > k) y.c.length = k;\r\n } else if (isModExp) {\r\n y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (i) {\r\n i = mathfloor(i / 2);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n } else {\r\n n = n.times(half);\r\n round(n, n.e + 1, 1);\r\n\r\n if (n.e > 14) {\r\n nIsOdd = isOdd(n);\r\n } else {\r\n i = +valueOf(n);\r\n if (i === 0) break;\r\n nIsOdd = i % 2;\r\n }\r\n }\r\n\r\n x = x.times(x);\r\n\r\n if (k) {\r\n if (x.c && x.c.length > k) x.c.length = k;\r\n } else if (isModExp) {\r\n x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));\r\n }\r\n }\r\n\r\n if (isModExp) return y;\r\n if (nIsNeg) y = ONE.div(y);\r\n\r\n return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer\r\n * using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'\r\n */\r\n P.integerValue = function (rm) {\r\n var n = new BigNumber(this);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n return round(n, n.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isEqualTo = P.eq = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise return false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isGreaterThan = P.gt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isGreaterThanOrEqualTo = P.gte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = function () {\r\n return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise return false.\r\n */\r\n P.isLessThan = P.lt = function (y, b) {\r\n return compare(this, new BigNumber(y, b)) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise return false.\r\n */\r\n P.isLessThanOrEqualTo = P.lte = function (y, b) {\r\n return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise return false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise return false.\r\n */\r\n P.isNegative = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is positive, otherwise return false.\r\n */\r\n P.isPositive = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise return false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = function (y, b) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);\r\n\r\n // Either zero?\r\n if (!xc[0] || !yc[0]) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0);\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if (a = xe - ye) {\r\n\r\n if (xLTy = a < 0) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for (b = a; b--; t.push(0));\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;\r\n\r\n for (a = b = 0; b < j; b++) {\r\n\r\n if (xc[b] != yc[b]) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) {\r\n t = xc;\r\n xc = yc;\r\n yc = t;\r\n y.s = -y.s;\r\n }\r\n\r\n b = (j = yc.length) - (i = xc.length);\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if (b > 0) for (; b--; xc[i++] = 0);\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for (; j > a;) {\r\n\r\n if (xc[--j] < yc[j]) {\r\n for (i = j; i && !xc[--i]; xc[i] = b);\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xc[0] == 0; xc.splice(0, 1), --ye);\r\n\r\n // Zero?\r\n if (!xc[0]) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [y.e = 0];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function (y, b) {\r\n var q, s,\r\n x = this;\r\n\r\n y = new BigNumber(y, b);\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if (!x.c || !y.s || y.c && !y.c[0]) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if (!y.c || x.c && !x.c[0]) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if (MODULO_MODE == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div(x, y, 0, 3);\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div(x, y, 0, MODULO_MODE);\r\n }\r\n\r\n y = x.minus(q.times(y));\r\n\r\n // To match JavaScript %, ensure sign of zero is sign of dividend.\r\n if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;\r\n\r\n return y;\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value\r\n * of BigNumber(y, b).\r\n */\r\n P.multipliedBy = P.times = function (y, b) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = (y = new BigNumber(y, b)).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if (!xc || !yc || !xc[0] || !yc[0]) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if (!xc || !yc) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if (xcL < ycL) {\r\n zc = xc;\r\n xc = yc;\r\n yc = zc;\r\n i = xcL;\r\n xcL = ycL;\r\n ycL = i;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n for (i = xcL + ycL, zc = []; i--; zc.push(0));\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for (i = ycL; --i >= 0;) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for (k = xcL, j = i + k; j > i;) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;\r\n c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise(y, zc, e);\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = function (y, b) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n y = new BigNumber(y, b);\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if (!a || !b) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if (a != b) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if (!xe || !ye) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if (!xc || !yc) return new BigNumber(a / 0);\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if (a = xe - ye) {\r\n if (a > 0) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for (; a--; t.push(0));\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if (a - b < 0) {\r\n t = yc;\r\n yc = xc;\r\n xc = t;\r\n b = a;\r\n }\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for (a = 0; b;) {\r\n a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise(y, xc, ye);\r\n };\r\n\r\n\r\n /*\r\n * If sd is undefined or null or true or false, return the number of significant digits of\r\n * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.\r\n * If sd is true include integer-part trailing zeros in the count.\r\n *\r\n * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this\r\n * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or\r\n * ROUNDING_MODE if rm is omitted.\r\n *\r\n * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.\r\n * boolean: whether to count integer-part trailing zeros: true or false.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.precision = P.sd = function (sd, rm) {\r\n var c, n, v,\r\n x = this;\r\n\r\n if (sd != null && sd !== !!sd) {\r\n intCheck(sd, 1, MAX);\r\n if (rm == null) rm = ROUNDING_MODE;\r\n else intCheck(rm, 0, 8);\r\n\r\n return round(new BigNumber(x), sd, rm);\r\n }\r\n\r\n if (!(c = x.c)) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if (v = c[v]) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for (; v % 10 == 0; v /= 10, n--);\r\n\r\n // Add the number of digits of the first element.\r\n for (v = c[0]; v >= 10; v /= 10, n++);\r\n }\r\n\r\n if (sd && x.e + 1 > n) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'\r\n */\r\n P.shiftedBy = function (k) {\r\n intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);\r\n return this.times('1e' + k);\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !c || !c[0]) {\r\n return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+valueOf(x));\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = coeffToString(c);\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(+n);\r\n e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber(s + '');\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if (r.c[0]) {\r\n e = r.e;\r\n s = e + dp;\r\n if (s < 3) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for (; ;) {\r\n t = r;\r\n r = half.times(t.plus(div(x, t, dp, 1)));\r\n\r\n if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if (r.e < e) --s;\r\n n = n.slice(s - 3, s + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if (!rep) {\r\n round(t, t.e + DECIMAL_PLACES + 2, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n round(r, r.e + DECIMAL_PLACES + 2, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toExponential = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp++;\r\n }\r\n return format(this, dp, rm, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n */\r\n P.toFixed = function (dp, rm) {\r\n if (dp != null) {\r\n intCheck(dp, 0, MAX);\r\n dp = dp + this.e + 1;\r\n }\r\n return format(this, dp, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the format or FORMAT object (see BigNumber.set).\r\n *\r\n * The formatting object may contain some or all of the properties shown below.\r\n *\r\n * FORMAT = {\r\n * prefix: '',\r\n * groupSize: 3,\r\n * secondaryGroupSize: 0,\r\n * groupSeparator: ',',\r\n * decimalSeparator: '.',\r\n * fractionGroupSize: 0,\r\n * fractionGroupSeparator: '\\xA0', // non-breaking space\r\n * suffix: ''\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n * [format] {object} Formatting options. See FORMAT pbject above.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'\r\n * '[BigNumber Error] Argument not an object: {format}'\r\n */\r\n P.toFormat = function (dp, rm, format) {\r\n var str,\r\n x = this;\r\n\r\n if (format == null) {\r\n if (dp != null && rm && typeof rm == 'object') {\r\n format = rm;\r\n rm = null;\r\n } else if (dp && typeof dp == 'object') {\r\n format = dp;\r\n dp = rm = null;\r\n } else {\r\n format = FORMAT;\r\n }\r\n } else if (typeof format != 'object') {\r\n throw Error\r\n (bignumberError + 'Argument not an object: ' + format);\r\n }\r\n\r\n str = x.toFixed(dp, rm);\r\n\r\n if (x.c) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +format.groupSize,\r\n g2 = +format.secondaryGroupSize,\r\n groupSeparator = format.groupSeparator || '',\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = x.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) {\r\n i = g1;\r\n g1 = g2;\r\n g2 = i;\r\n len -= i;\r\n }\r\n\r\n if (g1 > 0 && len > 0) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr(0, i);\r\n for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);\r\n if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)\r\n ? fractionPart.replace(new RegExp('\\\\d{' + g2 + '}\\\\B', 'g'),\r\n '$&' + (format.fractionGroupSeparator || ''))\r\n : fractionPart)\r\n : intPart;\r\n }\r\n\r\n return (format.prefix || '') + str + (format.suffix || '');\r\n };\r\n\r\n\r\n /*\r\n * Return an array of two BigNumbers representing the value of this BigNumber as a simple\r\n * fraction with an integer numerator and an integer denominator.\r\n * The denominator will be a positive non-zero value less than or equal to the specified\r\n * maximum denominator. If a maximum denominator is not specified, the denominator will be\r\n * the lowest value necessary to represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.\r\n *\r\n * '[BigNumber Error] Argument {not an integer|out of range} : {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,\r\n x = this,\r\n xc = x.c;\r\n\r\n if (md != null) {\r\n n = new BigNumber(md);\r\n\r\n // Throw if md is less than one or is not an integer, unless it is Infinity.\r\n if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {\r\n throw Error\r\n (bignumberError + 'Argument ' +\r\n (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));\r\n }\r\n }\r\n\r\n if (!xc) return new BigNumber(x);\r\n\r\n d = new BigNumber(ONE);\r\n n1 = d0 = new BigNumber(ONE);\r\n d1 = n0 = new BigNumber(ONE);\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];\r\n md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for (; ;) {\r\n q = div(n, d, 0, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.comparedTo(md) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus(q.times(d2 = n1));\r\n n0 = d2;\r\n d = n.minus(q.times(d2 = d));\r\n n = d2;\r\n }\r\n\r\n d2 = div(md.minus(d0), d1, 0, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n e = e * 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(\r\n div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];\r\n\r\n MAX_EXP = exp;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +valueOf(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n if (sd != null) intCheck(sd, 1, MAX);\r\n return format(this, sd, rm, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to ALPHABET.length inclusive.\r\n *\r\n * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if (e === null) {\r\n if (s) {\r\n str = 'Infinity';\r\n if (s < 0) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n if (b == null) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential(coeffToString(n.c), e)\r\n : toFixedPoint(coeffToString(n.c), e, '0');\r\n } else if (b === 10 && alphabetHasNormalDecimalDigits) {\r\n n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);\r\n str = toFixedPoint(coeffToString(n.c), n.e, '0');\r\n } else {\r\n intCheck(b, 2, ALPHABET.length, 'Base');\r\n str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);\r\n }\r\n\r\n if (s < 0 && n.c[0]) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n return valueOf(this);\r\n };\r\n\r\n\r\n P._isBigNumber = true;\r\n\r\n if (configObject != null) BigNumber.set(configObject);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n // These functions don't need access to variables,\r\n // e.g. DECIMAL_PLACES, in the scope of the `clone` function above.\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for (; i < j;) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for (; z--; s = '0' + s);\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (j = r.length; r.charCodeAt(--j) === 48;);\r\n\r\n return r.slice(0, j + 1 || 1);\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare(x, y) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if (!i || !j) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if (a || b) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if (i != j) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if (!b) return k > l ^ a ? 1 : -1;\r\n\r\n j = (k = xc.length) < (l = yc.length) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Check that n is a primitive number, an integer, and in range, otherwise throw.\r\n */\r\n function intCheck(n, min, max, name) {\r\n if (n < min || n > max || n !== mathfloor(n)) {\r\n throw Error\r\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\r\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\r\n : ' not a primitive number: ') + String(n));\r\n }\r\n }\r\n\r\n\r\n // Assumes finite n.\r\n function isOdd(n) {\r\n var k = n.c.length - 1;\r\n return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;\r\n }\r\n\r\n\r\n function toExponential(str, e) {\r\n return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +\r\n (e < 0 ? 'e' : 'e+') + e;\r\n }\r\n\r\n\r\n function toFixedPoint(str, e, z) {\r\n var len, zs;\r\n\r\n // Negative exponent?\r\n if (e < 0) {\r\n\r\n // Prepend zeros.\r\n for (zs = z + '.'; ++e; zs += z);\r\n str = zs + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if (++e > len) {\r\n for (zs = z, e -= len; --e; zs += z);\r\n str += zs;\r\n } else if (e < len) {\r\n str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = clone();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () { return BigNumber; });\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n module.exports = BigNumber;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalObject) {\r\n globalObject = typeof self != 'undefined' && self ? self : window;\r\n }\r\n\r\n globalObject.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n","/*\n * [hi-base32]{@link https://github.com/emn178/hi-base32}\n *\n * @version 0.5.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var root = typeof window === 'object' ? window : {};\n var NODE_JS = !root.HI_BASE32_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n }\n var COMMON_JS = !root.HI_BASE32_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var BASE32_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.split('');\n var BASE32_DECODE_CHAR = {\n 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8,\n 'J': 9, 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16,\n 'R': 17, 'S': 18, 'T': 19, 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24,\n 'Z': 25, '2': 26, '3': 27, '4': 28, '5': 29, '6': 30, '7': 31\n };\n\n var blocks = [0, 0, 0, 0, 0, 0, 0, 0];\n\n var throwInvalidUtf8 = function (position, partial) {\n if (partial.length > 10) {\n partial = '...' + partial.substr(-10);\n }\n var err = new Error('Decoded data is not valid UTF-8.'\n + ' Maybe try base32.decode.asBytes()?'\n + ' Partial data after reading ' + position + ' bytes: ' + partial + ' <-');\n err.position = position;\n throw err;\n };\n\n var toUtf8String = function (bytes) {\n var str = '', length = bytes.length, i = 0, followingChars = 0, b, c;\n while (i < length) {\n b = bytes[i++];\n if (b <= 0x7F) {\n str += String.fromCharCode(b);\n continue;\n } else if (b > 0xBF && b <= 0xDF) {\n c = b & 0x1F;\n followingChars = 1;\n } else if (b <= 0xEF) {\n c = b & 0x0F;\n followingChars = 2;\n } else if (b <= 0xF7) {\n c = b & 0x07;\n followingChars = 3;\n } else {\n throwInvalidUtf8(i, str);\n }\n\n for (var j = 0; j < followingChars; ++j) {\n b = bytes[i++];\n if (b < 0x80 || b > 0xBF) {\n throwInvalidUtf8(i, str);\n }\n c <<= 6;\n c += b & 0x3F;\n }\n if (c >= 0xD800 && c <= 0xDFFF) {\n throwInvalidUtf8(i, str);\n }\n if (c > 0x10FFFF) {\n throwInvalidUtf8(i, str);\n }\n\n if (c <= 0xFFFF) {\n str += String.fromCharCode(c);\n } else {\n c -= 0x10000;\n str += String.fromCharCode((c >> 10) + 0xD800);\n str += String.fromCharCode((c & 0x3FF) + 0xDC00);\n }\n }\n return str;\n };\n\n var decodeAsBytes = function (base32Str) {\n if (base32Str === '') {\n return [];\n } else if (!/^[A-Z2-7=]+$/.test(base32Str)) {\n throw new Error('Invalid base32 characters');\n }\n base32Str = base32Str.replace(/=/g, '');\n var v1, v2, v3, v4, v5, v6, v7, v8, bytes = [], index = 0, length = base32Str.length;\n\n // 4 char to 3 bytes\n for (var i = 0, count = length >> 3 << 3; i < count;) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v8 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2 >>> 2) & 255;\n bytes[index++] = (v2 << 6 | v3 << 1 | v4 >>> 4) & 255;\n bytes[index++] = (v4 << 4 | v5 >>> 1) & 255;\n bytes[index++] = (v5 << 7 | v6 << 2 | v7 >>> 3) & 255;\n bytes[index++] = (v7 << 5 | v8) & 255;\n }\n\n // remain bytes\n var remain = length - count;\n if (remain === 2) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2 >>> 2) & 255;\n } else if (remain === 4) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2 >>> 2) & 255;\n bytes[index++] = (v2 << 6 | v3 << 1 | v4 >>> 4) & 255;\n } else if (remain === 5) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2 >>> 2) & 255;\n bytes[index++] = (v2 << 6 | v3 << 1 | v4 >>> 4) & 255;\n bytes[index++] = (v4 << 4 | v5 >>> 1) & 255;\n } else if (remain === 7) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n bytes[index++] = (v1 << 3 | v2 >>> 2) & 255;\n bytes[index++] = (v2 << 6 | v3 << 1 | v4 >>> 4) & 255;\n bytes[index++] = (v4 << 4 | v5 >>> 1) & 255;\n bytes[index++] = (v5 << 7 | v6 << 2 | v7 >>> 3) & 255;\n }\n return bytes;\n };\n\n var encodeAscii = function (str) {\n var v1, v2, v3, v4, v5, base32Str = '', length = str.length;\n for (var i = 0, count = parseInt(length / 5) * 5; i < count;) {\n v1 = str.charCodeAt(i++);\n v2 = str.charCodeAt(i++);\n v3 = str.charCodeAt(i++);\n v4 = str.charCodeAt(i++);\n v5 = str.charCodeAt(i++);\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1 | v4 >>> 7) & 31] +\n BASE32_ENCODE_CHAR[(v4 >>> 2) & 31] +\n BASE32_ENCODE_CHAR[(v4 << 3 | v5 >>> 5) & 31] +\n BASE32_ENCODE_CHAR[v5 & 31];\n }\n\n // remain char\n var remain = length - count;\n if (remain === 1) {\n v1 = str.charCodeAt(i);\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2) & 31] +\n '======';\n } else if (remain === 2) {\n v1 = str.charCodeAt(i++);\n v2 = str.charCodeAt(i);\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4) & 31] +\n '====';\n } else if (remain === 3) {\n v1 = str.charCodeAt(i++);\n v2 = str.charCodeAt(i++);\n v3 = str.charCodeAt(i);\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1) & 31] +\n '===';\n } else if (remain === 4) {\n v1 = str.charCodeAt(i++);\n v2 = str.charCodeAt(i++);\n v3 = str.charCodeAt(i++);\n v4 = str.charCodeAt(i);\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1 | v4 >>> 7) & 31] +\n BASE32_ENCODE_CHAR[(v4 >>> 2) & 31] +\n BASE32_ENCODE_CHAR[(v4 << 3) & 31] +\n '=';\n }\n return base32Str;\n };\n\n var encodeUtf8 = function (str) {\n var v1, v2, v3, v4, v5, code, end = false, base32Str = '',\n index = 0, i, start = 0, bytes = 0, length = str.length;\n if (str === '') {\n return base32Str;\n }\n do {\n blocks[0] = blocks[5];\n blocks[1] = blocks[6];\n blocks[2] = blocks[7];\n for (i = start; index < length && i < 5; ++index) {\n code = str.charCodeAt(index);\n if (code < 0x80) {\n blocks[i++] = code;\n } else if (code < 0x800) {\n blocks[i++] = 0xc0 | (code >> 6);\n blocks[i++] = 0x80 | (code & 0x3f);\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i++] = 0xe0 | (code >> 12);\n blocks[i++] = 0x80 | ((code >> 6) & 0x3f);\n blocks[i++] = 0x80 | (code & 0x3f);\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++index) & 0x3ff));\n blocks[i++] = 0xf0 | (code >> 18);\n blocks[i++] = 0x80 | ((code >> 12) & 0x3f);\n blocks[i++] = 0x80 | ((code >> 6) & 0x3f);\n blocks[i++] = 0x80 | (code & 0x3f);\n }\n }\n bytes += i - start;\n start = i - 5;\n if (index === length) {\n ++index;\n }\n if (index > length && i < 6) {\n end = true;\n }\n v1 = blocks[0];\n if (i > 4) {\n v2 = blocks[1];\n v3 = blocks[2];\n v4 = blocks[3];\n v5 = blocks[4];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1 | v4 >>> 7) & 31] +\n BASE32_ENCODE_CHAR[(v4 >>> 2) & 31] +\n BASE32_ENCODE_CHAR[(v4 << 3 | v5 >>> 5) & 31] +\n BASE32_ENCODE_CHAR[v5 & 31];\n } else if (i === 1) {\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2) & 31] +\n '======';\n } else if (i === 2) {\n v2 = blocks[1];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4) & 31] +\n '====';\n } else if (i === 3) {\n v2 = blocks[1];\n v3 = blocks[2];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1) & 31] +\n '===';\n } else {\n v2 = blocks[1];\n v3 = blocks[2];\n v4 = blocks[3];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1 | v4 >>> 7) & 31] +\n BASE32_ENCODE_CHAR[(v4 >>> 2) & 31] +\n BASE32_ENCODE_CHAR[(v4 << 3) & 31] +\n '=';\n }\n } while (!end);\n return base32Str;\n };\n\n var encodeBytes = function (bytes) {\n var v1, v2, v3, v4, v5, base32Str = '', length = bytes.length;\n for (var i = 0, count = parseInt(length / 5) * 5; i < count;) {\n v1 = bytes[i++];\n v2 = bytes[i++];\n v3 = bytes[i++];\n v4 = bytes[i++];\n v5 = bytes[i++];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1 | v4 >>> 7) & 31] +\n BASE32_ENCODE_CHAR[(v4 >>> 2) & 31] +\n BASE32_ENCODE_CHAR[(v4 << 3 | v5 >>> 5) & 31] +\n BASE32_ENCODE_CHAR[v5 & 31];\n }\n\n // remain char\n var remain = length - count;\n if (remain === 1) {\n v1 = bytes[i];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2) & 31] +\n '======';\n } else if (remain === 2) {\n v1 = bytes[i++];\n v2 = bytes[i];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4) & 31] +\n '====';\n } else if (remain === 3) {\n v1 = bytes[i++];\n v2 = bytes[i++];\n v3 = bytes[i];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1) & 31] +\n '===';\n } else if (remain === 4) {\n v1 = bytes[i++];\n v2 = bytes[i++];\n v3 = bytes[i++];\n v4 = bytes[i];\n base32Str += BASE32_ENCODE_CHAR[v1 >>> 3] +\n BASE32_ENCODE_CHAR[(v1 << 2 | v2 >>> 6) & 31] +\n BASE32_ENCODE_CHAR[(v2 >>> 1) & 31] +\n BASE32_ENCODE_CHAR[(v2 << 4 | v3 >>> 4) & 31] +\n BASE32_ENCODE_CHAR[(v3 << 1 | v4 >>> 7) & 31] +\n BASE32_ENCODE_CHAR[(v4 >>> 2) & 31] +\n BASE32_ENCODE_CHAR[(v4 << 3) & 31] +\n '=';\n }\n return base32Str;\n };\n\n var encode = function (input, asciiOnly) {\n var notString = typeof(input) !== 'string';\n if (notString && input.constructor === ArrayBuffer) {\n input = new Uint8Array(input);\n }\n if (notString) {\n return encodeBytes(input);\n } else if (asciiOnly) {\n return encodeAscii(input);\n } else {\n return encodeUtf8(input);\n }\n };\n\n var decode = function (base32Str, asciiOnly) {\n if (!asciiOnly) {\n return toUtf8String(decodeAsBytes(base32Str));\n }\n if (base32Str === '') {\n return '';\n } else if (!/^[A-Z2-7=]+$/.test(base32Str)) {\n throw new Error('Invalid base32 characters');\n }\n var v1, v2, v3, v4, v5, v6, v7, v8, str = '', length = base32Str.indexOf('=');\n if (length === -1) {\n length = base32Str.length;\n }\n\n // 8 char to 5 bytes\n for (var i = 0, count = length >> 3 << 3; i < count;) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v8 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n str += String.fromCharCode((v1 << 3 | v2 >>> 2) & 255) +\n String.fromCharCode((v2 << 6 | v3 << 1 | v4 >>> 4) & 255) +\n String.fromCharCode((v4 << 4 | v5 >>> 1) & 255) +\n String.fromCharCode((v5 << 7 | v6 << 2 | v7 >>> 3) & 255) +\n String.fromCharCode((v7 << 5 | v8) & 255);\n }\n\n // remain bytes\n var remain = length - count;\n if (remain === 2) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n str += String.fromCharCode((v1 << 3 | v2 >>> 2) & 255);\n } else if (remain === 4) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n str += String.fromCharCode((v1 << 3 | v2 >>> 2) & 255) +\n String.fromCharCode((v2 << 6 | v3 << 1 | v4 >>> 4) & 255);\n } else if (remain === 5) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n str += String.fromCharCode((v1 << 3 | v2 >>> 2) & 255) +\n String.fromCharCode((v2 << 6 | v3 << 1 | v4 >>> 4) & 255) +\n String.fromCharCode((v4 << 4 | v5 >>> 1) & 255);\n } else if (remain === 7) {\n v1 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v2 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v3 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v4 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v5 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v6 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n v7 = BASE32_DECODE_CHAR[base32Str.charAt(i++)];\n str += String.fromCharCode((v1 << 3 | v2 >>> 2) & 255) +\n String.fromCharCode((v2 << 6 | v3 << 1 | v4 >>> 4) & 255) +\n String.fromCharCode((v4 << 4 | v5 >>> 1) & 255) +\n String.fromCharCode((v5 << 7 | v6 << 2 | v7 >>> 3) & 255);\n }\n return str;\n };\n\n var exports = {\n encode: encode,\n decode: decode\n };\n decode.asBytes = decodeAsBytes;\n\n if (COMMON_JS) {\n module.exports = exports;\n } else {\n root.base32 = exports;\n if (AMD) {\n define(function() {\n return exports;\n });\n }\n }\n})();\n"],"names":[],"sourceRoot":"","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110]}