{"snapId":"npm:@metamask/tron-wallet-snap","manifest":{"version":"3.2.0","description":"Manage Tron using MetaMask","proposedName":"Tron","repository":{"type":"git","url":"https://github.com/MetaMask/internal-snaps.git"},"source":{"shasum":"QnhXo3QTBC3XgD/9FKIEjyoSnVdVtZ3uGansykUe9uc=","location":{"npm":{"filePath":"dist/bundle.js","iconPath":"images/icon.svg","packageName":"@metamask/tron-wallet-snap","registry":"https://registry.npmjs.org/"}},"locales":["locales/en.json"]},"initialConnections":{"https://portfolio.metamask.io":{}},"initialPermissions":{"endowment:keyring":{"allowedOrigins":["https://portfolio.metamask.io"],"capabilities":{"scopes":["tron:728126428"],"privateKey":{"exportFormats":[{"encoding":"hexadecimal"}]},"bip44":{"deriveIndex":true,"deriveIndexRange":true,"discover":true}}},"snap_getBip32Entropy":[{"path":["m","44'","195'"],"curve":"secp256k1"}],"endowment:network-access":{},"snap_manageAccounts":{},"snap_manageState":{},"snap_dialog":{},"snap_getPreferences":{},"endowment:cronjob":{"jobs":[{"duration":"PT60S","request":{"method":"onSynchronizeSelectedAccountsCronjob"}}]},"endowment:assets":{"scopes":["tron:728126428"]},"endowment:messenger":{"actions":["RemoteFeatureFlagController:getState","AssetsController:getAccountAssetByID","AssetsController:getAccountAssetsByIDs","AssetsController:getAccountAssetsByScope"]}},"platformVersion":"11.2.0","manifestVersion":"0.1"},"files":[{"path":"images/icon.svg","value":"<svg width=\"96\" height=\"96\" viewBox=\"0 0 96 96\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"96\" height=\"96\" fill=\"#FF060A\"/><g clip-path=\"url(#clip0_7875_4963)\"><path d=\"M75.7883 36.0541C72.9706 33.4525 69.0729 29.4796 65.8984 26.662L65.7105 26.5305C65.398 26.2795 65.0456 26.0827 64.668 25.9482C57.0134 24.5206 21.3891 17.8616 20.6941 17.9461C20.4993 17.9734 20.3132 18.044 20.1493 18.1527L19.9709 18.2936C19.7512 18.5168 19.5843 18.7864 19.4825 19.0826L19.4355 19.2047V19.8715V19.9748C23.446 31.142 39.2811 67.7243 42.3993 76.3087C42.5871 76.891 42.944 77.9993 43.6109 78.0557H43.7611C44.118 78.0557 45.6396 76.0457 45.6396 76.0457C45.6396 76.0457 72.8391 43.0606 75.591 39.548C75.9472 39.1153 76.2617 38.6499 76.5302 38.1579C76.5988 37.7731 76.5665 37.377 76.4364 37.0083C76.3064 36.6396 76.0831 36.3109 75.7883 36.0541ZM52.6179 39.8955L64.2266 30.2686L71.0358 36.5425L52.6179 39.8955ZM48.1097 39.2662L28.1233 22.8864L60.4603 28.8504L48.1097 39.2662ZM49.913 43.5584L70.369 40.2618L46.9826 68.4381L49.913 43.5584ZM25.4089 24.5206L46.4379 42.3656L43.3948 68.4569L25.4089 24.5206Z\" fill=\"white\"/></g><defs><clipPath id=\"clip0_7875_4963\"><rect width=\"60.1096\" height=\"60.1096\" fill=\"white\" transform=\"translate(17.9453 17.9453)\"/></clipPath></defs></svg>"},{"path":"dist/bundle.js","value":"(()=>{var e={2091(e,t,r){\"use strict\";t.x2=void 0;const n=r(9648),o=r(486),s=r(7004),i=r(2249),a=r(3654),c=r(9450);function u(e){if(\"string\"!=typeof e)throw new TypeError(\"Invalid mnemonic type: \"+typeof e);return e.normalize(\"NFKD\")}function l(e){const t=u(e),r=t.split(\" \");if(![12,15,18,21,24].includes(r.length))throw new Error(\"Invalid mnemonic\");return{nfkd:t,words:r}}function d(e){n.default.bytes(e,16,20,24,28,32)}const f=e=>{const t=8-e.length/4;return new Uint8Array([(0,s.sha256)(e)[0]>>t<<t])};function p(e){if(!Array.isArray(e)||2048!==e.length||\"string\"!=typeof e[0])throw new Error(\"Worlist: expected array of 2048 strings\");return e.forEach(e=>{if(\"string\"!=typeof e)throw new Error(`Wordlist: non-string element: ${e}`)}),c.utils.chain(c.utils.checksum(1,f),c.utils.radix2(11,!0),c.utils.alphabet(e))}function h(e,t){let r;if(\"string\"==typeof e){const{words:n}=l(e);r=p(t).decode(n)}else r=p(t).decode(Array.from(new Uint16Array(e.buffer)).map(e=>t[e]));return d(r),r}function g(e,t){d(e);const r=p(t).encode(e).map(e=>t.indexOf(e));return new Uint8Array(new Uint16Array(r).buffer)}t.x2=h;const y=e=>u(`mnemonic${e}`);function m(e,t){let r;return r=\"string\"==typeof e?(new TextEncoder).encode(l(e).nfkd):(new TextEncoder).encode(Array.from(new Uint16Array(e.buffer)).map(e=>t[e]).join(\" \")),r}},6925(e,t){\"use strict\";t.p=void 0,t.p=\"abandon\\nability\\nable\\nabout\\nabove\\nabsent\\nabsorb\\nabstract\\nabsurd\\nabuse\\naccess\\naccident\\naccount\\naccuse\\nachieve\\nacid\\nacoustic\\nacquire\\nacross\\nact\\naction\\nactor\\nactress\\nactual\\nadapt\\nadd\\naddict\\naddress\\nadjust\\nadmit\\nadult\\nadvance\\nadvice\\naerobic\\naffair\\nafford\\nafraid\\nagain\\nage\\nagent\\nagree\\nahead\\naim\\nair\\nairport\\naisle\\nalarm\\nalbum\\nalcohol\\nalert\\nalien\\nall\\nalley\\nallow\\nalmost\\nalone\\nalpha\\nalready\\nalso\\nalter\\nalways\\namateur\\namazing\\namong\\namount\\namused\\nanalyst\\nanchor\\nancient\\nanger\\nangle\\nangry\\nanimal\\nankle\\nannounce\\nannual\\nanother\\nanswer\\nantenna\\nantique\\nanxiety\\nany\\napart\\napology\\nappear\\napple\\napprove\\napril\\narch\\narctic\\narea\\narena\\nargue\\narm\\narmed\\narmor\\narmy\\naround\\narrange\\narrest\\narrive\\narrow\\nart\\nartefact\\nartist\\nartwork\\nask\\naspect\\nassault\\nasset\\nassist\\nassume\\nasthma\\nathlete\\natom\\nattack\\nattend\\nattitude\\nattract\\nauction\\naudit\\naugust\\naunt\\nauthor\\nauto\\nautumn\\naverage\\navocado\\navoid\\nawake\\naware\\naway\\nawesome\\nawful\\nawkward\\naxis\\nbaby\\nbachelor\\nbacon\\nbadge\\nbag\\nbalance\\nbalcony\\nball\\nbamboo\\nbanana\\nbanner\\nbar\\nbarely\\nbargain\\nbarrel\\nbase\\nbasic\\nbasket\\nbattle\\nbeach\\nbean\\nbeauty\\nbecause\\nbecome\\nbeef\\nbefore\\nbegin\\nbehave\\nbehind\\nbelieve\\nbelow\\nbelt\\nbench\\nbenefit\\nbest\\nbetray\\nbetter\\nbetween\\nbeyond\\nbicycle\\nbid\\nbike\\nbind\\nbiology\\nbird\\nbirth\\nbitter\\nblack\\nblade\\nblame\\nblanket\\nblast\\nbleak\\nbless\\nblind\\nblood\\nblossom\\nblouse\\nblue\\nblur\\nblush\\nboard\\nboat\\nbody\\nboil\\nbomb\\nbone\\nbonus\\nbook\\nboost\\nborder\\nboring\\nborrow\\nboss\\nbottom\\nbounce\\nbox\\nboy\\nbracket\\nbrain\\nbrand\\nbrass\\nbrave\\nbread\\nbreeze\\nbrick\\nbridge\\nbrief\\nbright\\nbring\\nbrisk\\nbroccoli\\nbroken\\nbronze\\nbroom\\nbrother\\nbrown\\nbrush\\nbubble\\nbuddy\\nbudget\\nbuffalo\\nbuild\\nbulb\\nbulk\\nbullet\\nbundle\\nbunker\\nburden\\nburger\\nburst\\nbus\\nbusiness\\nbusy\\nbutter\\nbuyer\\nbuzz\\ncabbage\\ncabin\\ncable\\ncactus\\ncage\\ncake\\ncall\\ncalm\\ncamera\\ncamp\\ncan\\ncanal\\ncancel\\ncandy\\ncannon\\ncanoe\\ncanvas\\ncanyon\\ncapable\\ncapital\\ncaptain\\ncar\\ncarbon\\ncard\\ncargo\\ncarpet\\ncarry\\ncart\\ncase\\ncash\\ncasino\\ncastle\\ncasual\\ncat\\ncatalog\\ncatch\\ncategory\\ncattle\\ncaught\\ncause\\ncaution\\ncave\\nceiling\\ncelery\\ncement\\ncensus\\ncentury\\ncereal\\ncertain\\nchair\\nchalk\\nchampion\\nchange\\nchaos\\nchapter\\ncharge\\nchase\\nchat\\ncheap\\ncheck\\ncheese\\nchef\\ncherry\\nchest\\nchicken\\nchief\\nchild\\nchimney\\nchoice\\nchoose\\nchronic\\nchuckle\\nchunk\\nchurn\\ncigar\\ncinnamon\\ncircle\\ncitizen\\ncity\\ncivil\\nclaim\\nclap\\nclarify\\nclaw\\nclay\\nclean\\nclerk\\nclever\\nclick\\nclient\\ncliff\\nclimb\\nclinic\\nclip\\nclock\\nclog\\nclose\\ncloth\\ncloud\\nclown\\nclub\\nclump\\ncluster\\nclutch\\ncoach\\ncoast\\ncoconut\\ncode\\ncoffee\\ncoil\\ncoin\\ncollect\\ncolor\\ncolumn\\ncombine\\ncome\\ncomfort\\ncomic\\ncommon\\ncompany\\nconcert\\nconduct\\nconfirm\\ncongress\\nconnect\\nconsider\\ncontrol\\nconvince\\ncook\\ncool\\ncopper\\ncopy\\ncoral\\ncore\\ncorn\\ncorrect\\ncost\\ncotton\\ncouch\\ncountry\\ncouple\\ncourse\\ncousin\\ncover\\ncoyote\\ncrack\\ncradle\\ncraft\\ncram\\ncrane\\ncrash\\ncrater\\ncrawl\\ncrazy\\ncream\\ncredit\\ncreek\\ncrew\\ncricket\\ncrime\\ncrisp\\ncritic\\ncrop\\ncross\\ncrouch\\ncrowd\\ncrucial\\ncruel\\ncruise\\ncrumble\\ncrunch\\ncrush\\ncry\\ncrystal\\ncube\\nculture\\ncup\\ncupboard\\ncurious\\ncurrent\\ncurtain\\ncurve\\ncushion\\ncustom\\ncute\\ncycle\\ndad\\ndamage\\ndamp\\ndance\\ndanger\\ndaring\\ndash\\ndaughter\\ndawn\\nday\\ndeal\\ndebate\\ndebris\\ndecade\\ndecember\\ndecide\\ndecline\\ndecorate\\ndecrease\\ndeer\\ndefense\\ndefine\\ndefy\\ndegree\\ndelay\\ndeliver\\ndemand\\ndemise\\ndenial\\ndentist\\ndeny\\ndepart\\ndepend\\ndeposit\\ndepth\\ndeputy\\nderive\\ndescribe\\ndesert\\ndesign\\ndesk\\ndespair\\ndestroy\\ndetail\\ndetect\\ndevelop\\ndevice\\ndevote\\ndiagram\\ndial\\ndiamond\\ndiary\\ndice\\ndiesel\\ndiet\\ndiffer\\ndigital\\ndignity\\ndilemma\\ndinner\\ndinosaur\\ndirect\\ndirt\\ndisagree\\ndiscover\\ndisease\\ndish\\ndismiss\\ndisorder\\ndisplay\\ndistance\\ndivert\\ndivide\\ndivorce\\ndizzy\\ndoctor\\ndocument\\ndog\\ndoll\\ndolphin\\ndomain\\ndonate\\ndonkey\\ndonor\\ndoor\\ndose\\ndouble\\ndove\\ndraft\\ndragon\\ndrama\\ndrastic\\ndraw\\ndream\\ndress\\ndrift\\ndrill\\ndrink\\ndrip\\ndrive\\ndrop\\ndrum\\ndry\\nduck\\ndumb\\ndune\\nduring\\ndust\\ndutch\\nduty\\ndwarf\\ndynamic\\neager\\neagle\\nearly\\nearn\\nearth\\neasily\\neast\\neasy\\necho\\necology\\neconomy\\nedge\\nedit\\neducate\\neffort\\negg\\neight\\neither\\nelbow\\nelder\\nelectric\\nelegant\\nelement\\nelephant\\nelevator\\nelite\\nelse\\nembark\\nembody\\nembrace\\nemerge\\nemotion\\nemploy\\nempower\\nempty\\nenable\\nenact\\nend\\nendless\\nendorse\\nenemy\\nenergy\\nenforce\\nengage\\nengine\\nenhance\\nenjoy\\nenlist\\nenough\\nenrich\\nenroll\\nensure\\nenter\\nentire\\nentry\\nenvelope\\nepisode\\nequal\\nequip\\nera\\nerase\\nerode\\nerosion\\nerror\\nerupt\\nescape\\nessay\\nessence\\nestate\\neternal\\nethics\\nevidence\\nevil\\nevoke\\nevolve\\nexact\\nexample\\nexcess\\nexchange\\nexcite\\nexclude\\nexcuse\\nexecute\\nexercise\\nexhaust\\nexhibit\\nexile\\nexist\\nexit\\nexotic\\nexpand\\nexpect\\nexpire\\nexplain\\nexpose\\nexpress\\nextend\\nextra\\neye\\neyebrow\\nfabric\\nface\\nfaculty\\nfade\\nfaint\\nfaith\\nfall\\nfalse\\nfame\\nfamily\\nfamous\\nfan\\nfancy\\nfantasy\\nfarm\\nfashion\\nfat\\nfatal\\nfather\\nfatigue\\nfault\\nfavorite\\nfeature\\nfebruary\\nfederal\\nfee\\nfeed\\nfeel\\nfemale\\nfence\\nfestival\\nfetch\\nfever\\nfew\\nfiber\\nfiction\\nfield\\nfigure\\nfile\\nfilm\\nfilter\\nfinal\\nfind\\nfine\\nfinger\\nfinish\\nfire\\nfirm\\nfirst\\nfiscal\\nfish\\nfit\\nfitness\\nfix\\nflag\\nflame\\nflash\\nflat\\nflavor\\nflee\\nflight\\nflip\\nfloat\\nflock\\nfloor\\nflower\\nfluid\\nflush\\nfly\\nfoam\\nfocus\\nfog\\nfoil\\nfold\\nfollow\\nfood\\nfoot\\nforce\\nforest\\nforget\\nfork\\nfortune\\nforum\\nforward\\nfossil\\nfoster\\nfound\\nfox\\nfragile\\nframe\\nfrequent\\nfresh\\nfriend\\nfringe\\nfrog\\nfront\\nfrost\\nfrown\\nfrozen\\nfruit\\nfuel\\nfun\\nfunny\\nfurnace\\nfury\\nfuture\\ngadget\\ngain\\ngalaxy\\ngallery\\ngame\\ngap\\ngarage\\ngarbage\\ngarden\\ngarlic\\ngarment\\ngas\\ngasp\\ngate\\ngather\\ngauge\\ngaze\\ngeneral\\ngenius\\ngenre\\ngentle\\ngenuine\\ngesture\\nghost\\ngiant\\ngift\\ngiggle\\nginger\\ngiraffe\\ngirl\\ngive\\nglad\\nglance\\nglare\\nglass\\nglide\\nglimpse\\nglobe\\ngloom\\nglory\\nglove\\nglow\\nglue\\ngoat\\ngoddess\\ngold\\ngood\\ngoose\\ngorilla\\ngospel\\ngossip\\ngovern\\ngown\\ngrab\\ngrace\\ngrain\\ngrant\\ngrape\\ngrass\\ngravity\\ngreat\\ngreen\\ngrid\\ngrief\\ngrit\\ngrocery\\ngroup\\ngrow\\ngrunt\\nguard\\nguess\\nguide\\nguilt\\nguitar\\ngun\\ngym\\nhabit\\nhair\\nhalf\\nhammer\\nhamster\\nhand\\nhappy\\nharbor\\nhard\\nharsh\\nharvest\\nhat\\nhave\\nhawk\\nhazard\\nhead\\nhealth\\nheart\\nheavy\\nhedgehog\\nheight\\nhello\\nhelmet\\nhelp\\nhen\\nhero\\nhidden\\nhigh\\nhill\\nhint\\nhip\\nhire\\nhistory\\nhobby\\nhockey\\nhold\\nhole\\nholiday\\nhollow\\nhome\\nhoney\\nhood\\nhope\\nhorn\\nhorror\\nhorse\\nhospital\\nhost\\nhotel\\nhour\\nhover\\nhub\\nhuge\\nhuman\\nhumble\\nhumor\\nhundred\\nhungry\\nhunt\\nhurdle\\nhurry\\nhurt\\nhusband\\nhybrid\\nice\\nicon\\nidea\\nidentify\\nidle\\nignore\\nill\\nillegal\\nillness\\nimage\\nimitate\\nimmense\\nimmune\\nimpact\\nimpose\\nimprove\\nimpulse\\ninch\\ninclude\\nincome\\nincrease\\nindex\\nindicate\\nindoor\\nindustry\\ninfant\\ninflict\\ninform\\ninhale\\ninherit\\ninitial\\ninject\\ninjury\\ninmate\\ninner\\ninnocent\\ninput\\ninquiry\\ninsane\\ninsect\\ninside\\ninspire\\ninstall\\nintact\\ninterest\\ninto\\ninvest\\ninvite\\ninvolve\\niron\\nisland\\nisolate\\nissue\\nitem\\nivory\\njacket\\njaguar\\njar\\njazz\\njealous\\njeans\\njelly\\njewel\\njob\\njoin\\njoke\\njourney\\njoy\\njudge\\njuice\\njump\\njungle\\njunior\\njunk\\njust\\nkangaroo\\nkeen\\nkeep\\nketchup\\nkey\\nkick\\nkid\\nkidney\\nkind\\nkingdom\\nkiss\\nkit\\nkitchen\\nkite\\nkitten\\nkiwi\\nknee\\nknife\\nknock\\nknow\\nlab\\nlabel\\nlabor\\nladder\\nlady\\nlake\\nlamp\\nlanguage\\nlaptop\\nlarge\\nlater\\nlatin\\nlaugh\\nlaundry\\nlava\\nlaw\\nlawn\\nlawsuit\\nlayer\\nlazy\\nleader\\nleaf\\nlearn\\nleave\\nlecture\\nleft\\nleg\\nlegal\\nlegend\\nleisure\\nlemon\\nlend\\nlength\\nlens\\nleopard\\nlesson\\nletter\\nlevel\\nliar\\nliberty\\nlibrary\\nlicense\\nlife\\nlift\\nlight\\nlike\\nlimb\\nlimit\\nlink\\nlion\\nliquid\\nlist\\nlittle\\nlive\\nlizard\\nload\\nloan\\nlobster\\nlocal\\nlock\\nlogic\\nlonely\\nlong\\nloop\\nlottery\\nloud\\nlounge\\nlove\\nloyal\\nlucky\\nluggage\\nlumber\\nlunar\\nlunch\\nluxury\\nlyrics\\nmachine\\nmad\\nmagic\\nmagnet\\nmaid\\nmail\\nmain\\nmajor\\nmake\\nmammal\\nman\\nmanage\\nmandate\\nmango\\nmansion\\nmanual\\nmaple\\nmarble\\nmarch\\nmargin\\nmarine\\nmarket\\nmarriage\\nmask\\nmass\\nmaster\\nmatch\\nmaterial\\nmath\\nmatrix\\nmatter\\nmaximum\\nmaze\\nmeadow\\nmean\\nmeasure\\nmeat\\nmechanic\\nmedal\\nmedia\\nmelody\\nmelt\\nmember\\nmemory\\nmention\\nmenu\\nmercy\\nmerge\\nmerit\\nmerry\\nmesh\\nmessage\\nmetal\\nmethod\\nmiddle\\nmidnight\\nmilk\\nmillion\\nmimic\\nmind\\nminimum\\nminor\\nminute\\nmiracle\\nmirror\\nmisery\\nmiss\\nmistake\\nmix\\nmixed\\nmixture\\nmobile\\nmodel\\nmodify\\nmom\\nmoment\\nmonitor\\nmonkey\\nmonster\\nmonth\\nmoon\\nmoral\\nmore\\nmorning\\nmosquito\\nmother\\nmotion\\nmotor\\nmountain\\nmouse\\nmove\\nmovie\\nmuch\\nmuffin\\nmule\\nmultiply\\nmuscle\\nmuseum\\nmushroom\\nmusic\\nmust\\nmutual\\nmyself\\nmystery\\nmyth\\nnaive\\nname\\nnapkin\\nnarrow\\nnasty\\nnation\\nnature\\nnear\\nneck\\nneed\\nnegative\\nneglect\\nneither\\nnephew\\nnerve\\nnest\\nnet\\nnetwork\\nneutral\\nnever\\nnews\\nnext\\nnice\\nnight\\nnoble\\nnoise\\nnominee\\nnoodle\\nnormal\\nnorth\\nnose\\nnotable\\nnote\\nnothing\\nnotice\\nnovel\\nnow\\nnuclear\\nnumber\\nnurse\\nnut\\noak\\nobey\\nobject\\noblige\\nobscure\\nobserve\\nobtain\\nobvious\\noccur\\nocean\\noctober\\nodor\\noff\\noffer\\noffice\\noften\\noil\\nokay\\nold\\nolive\\nolympic\\nomit\\nonce\\none\\nonion\\nonline\\nonly\\nopen\\nopera\\nopinion\\noppose\\noption\\norange\\norbit\\norchard\\norder\\nordinary\\norgan\\norient\\noriginal\\norphan\\nostrich\\nother\\noutdoor\\nouter\\noutput\\noutside\\noval\\noven\\nover\\nown\\nowner\\noxygen\\noyster\\nozone\\npact\\npaddle\\npage\\npair\\npalace\\npalm\\npanda\\npanel\\npanic\\npanther\\npaper\\nparade\\nparent\\npark\\nparrot\\nparty\\npass\\npatch\\npath\\npatient\\npatrol\\npattern\\npause\\npave\\npayment\\npeace\\npeanut\\npear\\npeasant\\npelican\\npen\\npenalty\\npencil\\npeople\\npepper\\nperfect\\npermit\\nperson\\npet\\nphone\\nphoto\\nphrase\\nphysical\\npiano\\npicnic\\npicture\\npiece\\npig\\npigeon\\npill\\npilot\\npink\\npioneer\\npipe\\npistol\\npitch\\npizza\\nplace\\nplanet\\nplastic\\nplate\\nplay\\nplease\\npledge\\npluck\\nplug\\nplunge\\npoem\\npoet\\npoint\\npolar\\npole\\npolice\\npond\\npony\\npool\\npopular\\nportion\\nposition\\npossible\\npost\\npotato\\npottery\\npoverty\\npowder\\npower\\npractice\\npraise\\npredict\\nprefer\\nprepare\\npresent\\npretty\\nprevent\\nprice\\npride\\nprimary\\nprint\\npriority\\nprison\\nprivate\\nprize\\nproblem\\nprocess\\nproduce\\nprofit\\nprogram\\nproject\\npromote\\nproof\\nproperty\\nprosper\\nprotect\\nproud\\nprovide\\npublic\\npudding\\npull\\npulp\\npulse\\npumpkin\\npunch\\npupil\\npuppy\\npurchase\\npurity\\npurpose\\npurse\\npush\\nput\\npuzzle\\npyramid\\nquality\\nquantum\\nquarter\\nquestion\\nquick\\nquit\\nquiz\\nquote\\nrabbit\\nraccoon\\nrace\\nrack\\nradar\\nradio\\nrail\\nrain\\nraise\\nrally\\nramp\\nranch\\nrandom\\nrange\\nrapid\\nrare\\nrate\\nrather\\nraven\\nraw\\nrazor\\nready\\nreal\\nreason\\nrebel\\nrebuild\\nrecall\\nreceive\\nrecipe\\nrecord\\nrecycle\\nreduce\\nreflect\\nreform\\nrefuse\\nregion\\nregret\\nregular\\nreject\\nrelax\\nrelease\\nrelief\\nrely\\nremain\\nremember\\nremind\\nremove\\nrender\\nrenew\\nrent\\nreopen\\nrepair\\nrepeat\\nreplace\\nreport\\nrequire\\nrescue\\nresemble\\nresist\\nresource\\nresponse\\nresult\\nretire\\nretreat\\nreturn\\nreunion\\nreveal\\nreview\\nreward\\nrhythm\\nrib\\nribbon\\nrice\\nrich\\nride\\nridge\\nrifle\\nright\\nrigid\\nring\\nriot\\nripple\\nrisk\\nritual\\nrival\\nriver\\nroad\\nroast\\nrobot\\nrobust\\nrocket\\nromance\\nroof\\nrookie\\nroom\\nrose\\nrotate\\nrough\\nround\\nroute\\nroyal\\nrubber\\nrude\\nrug\\nrule\\nrun\\nrunway\\nrural\\nsad\\nsaddle\\nsadness\\nsafe\\nsail\\nsalad\\nsalmon\\nsalon\\nsalt\\nsalute\\nsame\\nsample\\nsand\\nsatisfy\\nsatoshi\\nsauce\\nsausage\\nsave\\nsay\\nscale\\nscan\\nscare\\nscatter\\nscene\\nscheme\\nschool\\nscience\\nscissors\\nscorpion\\nscout\\nscrap\\nscreen\\nscript\\nscrub\\nsea\\nsearch\\nseason\\nseat\\nsecond\\nsecret\\nsection\\nsecurity\\nseed\\nseek\\nsegment\\nselect\\nsell\\nseminar\\nsenior\\nsense\\nsentence\\nseries\\nservice\\nsession\\nsettle\\nsetup\\nseven\\nshadow\\nshaft\\nshallow\\nshare\\nshed\\nshell\\nsheriff\\nshield\\nshift\\nshine\\nship\\nshiver\\nshock\\nshoe\\nshoot\\nshop\\nshort\\nshoulder\\nshove\\nshrimp\\nshrug\\nshuffle\\nshy\\nsibling\\nsick\\nside\\nsiege\\nsight\\nsign\\nsilent\\nsilk\\nsilly\\nsilver\\nsimilar\\nsimple\\nsince\\nsing\\nsiren\\nsister\\nsituate\\nsix\\nsize\\nskate\\nsketch\\nski\\nskill\\nskin\\nskirt\\nskull\\nslab\\nslam\\nsleep\\nslender\\nslice\\nslide\\nslight\\nslim\\nslogan\\nslot\\nslow\\nslush\\nsmall\\nsmart\\nsmile\\nsmoke\\nsmooth\\nsnack\\nsnake\\nsnap\\nsniff\\nsnow\\nsoap\\nsoccer\\nsocial\\nsock\\nsoda\\nsoft\\nsolar\\nsoldier\\nsolid\\nsolution\\nsolve\\nsomeone\\nsong\\nsoon\\nsorry\\nsort\\nsoul\\nsound\\nsoup\\nsource\\nsouth\\nspace\\nspare\\nspatial\\nspawn\\nspeak\\nspecial\\nspeed\\nspell\\nspend\\nsphere\\nspice\\nspider\\nspike\\nspin\\nspirit\\nsplit\\nspoil\\nsponsor\\nspoon\\nsport\\nspot\\nspray\\nspread\\nspring\\nspy\\nsquare\\nsqueeze\\nsquirrel\\nstable\\nstadium\\nstaff\\nstage\\nstairs\\nstamp\\nstand\\nstart\\nstate\\nstay\\nsteak\\nsteel\\nstem\\nstep\\nstereo\\nstick\\nstill\\nsting\\nstock\\nstomach\\nstone\\nstool\\nstory\\nstove\\nstrategy\\nstreet\\nstrike\\nstrong\\nstruggle\\nstudent\\nstuff\\nstumble\\nstyle\\nsubject\\nsubmit\\nsubway\\nsuccess\\nsuch\\nsudden\\nsuffer\\nsugar\\nsuggest\\nsuit\\nsummer\\nsun\\nsunny\\nsunset\\nsuper\\nsupply\\nsupreme\\nsure\\nsurface\\nsurge\\nsurprise\\nsurround\\nsurvey\\nsuspect\\nsustain\\nswallow\\nswamp\\nswap\\nswarm\\nswear\\nsweet\\nswift\\nswim\\nswing\\nswitch\\nsword\\nsymbol\\nsymptom\\nsyrup\\nsystem\\ntable\\ntackle\\ntag\\ntail\\ntalent\\ntalk\\ntank\\ntape\\ntarget\\ntask\\ntaste\\ntattoo\\ntaxi\\nteach\\nteam\\ntell\\nten\\ntenant\\ntennis\\ntent\\nterm\\ntest\\ntext\\nthank\\nthat\\ntheme\\nthen\\ntheory\\nthere\\nthey\\nthing\\nthis\\nthought\\nthree\\nthrive\\nthrow\\nthumb\\nthunder\\nticket\\ntide\\ntiger\\ntilt\\ntimber\\ntime\\ntiny\\ntip\\ntired\\ntissue\\ntitle\\ntoast\\ntobacco\\ntoday\\ntoddler\\ntoe\\ntogether\\ntoilet\\ntoken\\ntomato\\ntomorrow\\ntone\\ntongue\\ntonight\\ntool\\ntooth\\ntop\\ntopic\\ntopple\\ntorch\\ntornado\\ntortoise\\ntoss\\ntotal\\ntourist\\ntoward\\ntower\\ntown\\ntoy\\ntrack\\ntrade\\ntraffic\\ntragic\\ntrain\\ntransfer\\ntrap\\ntrash\\ntravel\\ntray\\ntreat\\ntree\\ntrend\\ntrial\\ntribe\\ntrick\\ntrigger\\ntrim\\ntrip\\ntrophy\\ntrouble\\ntruck\\ntrue\\ntruly\\ntrumpet\\ntrust\\ntruth\\ntry\\ntube\\ntuition\\ntumble\\ntuna\\ntunnel\\nturkey\\nturn\\nturtle\\ntwelve\\ntwenty\\ntwice\\ntwin\\ntwist\\ntwo\\ntype\\ntypical\\nugly\\numbrella\\nunable\\nunaware\\nuncle\\nuncover\\nunder\\nundo\\nunfair\\nunfold\\nunhappy\\nuniform\\nunique\\nunit\\nuniverse\\nunknown\\nunlock\\nuntil\\nunusual\\nunveil\\nupdate\\nupgrade\\nuphold\\nupon\\nupper\\nupset\\nurban\\nurge\\nusage\\nuse\\nused\\nuseful\\nuseless\\nusual\\nutility\\nvacant\\nvacuum\\nvague\\nvalid\\nvalley\\nvalve\\nvan\\nvanish\\nvapor\\nvarious\\nvast\\nvault\\nvehicle\\nvelvet\\nvendor\\nventure\\nvenue\\nverb\\nverify\\nversion\\nvery\\nvessel\\nveteran\\nviable\\nvibrant\\nvicious\\nvictory\\nvideo\\nview\\nvillage\\nvintage\\nviolin\\nvirtual\\nvirus\\nvisa\\nvisit\\nvisual\\nvital\\nvivid\\nvocal\\nvoice\\nvoid\\nvolcano\\nvolume\\nvote\\nvoyage\\nwage\\nwagon\\nwait\\nwalk\\nwall\\nwalnut\\nwant\\nwarfare\\nwarm\\nwarrior\\nwash\\nwasp\\nwaste\\nwater\\nwave\\nway\\nwealth\\nweapon\\nwear\\nweasel\\nweather\\nweb\\nwedding\\nweekend\\nweird\\nwelcome\\nwest\\nwet\\nwhale\\nwhat\\nwheat\\nwheel\\nwhen\\nwhere\\nwhip\\nwhisper\\nwide\\nwidth\\nwife\\nwild\\nwill\\nwin\\nwindow\\nwine\\nwing\\nwink\\nwinner\\nwinter\\nwire\\nwisdom\\nwise\\nwish\\nwitness\\nwolf\\nwoman\\nwonder\\nwood\\nwool\\nword\\nwork\\nworld\\nworry\\nworth\\nwrap\\nwreck\\nwrestle\\nwrist\\nwrite\\nwrong\\nyard\\nyear\\nyellow\\nyou\\nyoung\\nyouth\\nzebra\\nzero\\nzone\\nzoo\".split(\"\\n\")},9648(e,t){\"use strict\";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if(\"boolean\"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Expected Uint8Array\");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function s(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");r(e.outputLen),r(e.blockLen)}function i(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function a(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}t.output=t.exists=t.hash=t.bytes=t.number=void 0,t.number=r,t.bytes=o,t.hash=s,t.exists=i,t.output=a;const c={number:r,bool:n,bytes:o,hash:s,exists:i,output:a};t.default=c},3134(e,t,r){\"use strict\";t.SHA2=void 0;const n=r(9648),o=r(3654);class s extends o.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:s}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const a=Math.min(s-this.pos,i-n);if(a===s){const t=(0,o.createView)(e);for(;s<=i-n;n+=s)this.process(t,n);continue}r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:s,isLE:i}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(r,0),a=0);for(let e=a;e<s;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}(r,s-8,BigInt(8*this.length),i),this.process(r,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const l=u/4,d=this.get();if(l>d.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:i}=this;return e.length=n,e.pos=i,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}t.SHA2=s},3109(e,t){\"use strict\";const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function s(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:i,l:a}=o(e[s],t);[r[s],n[s]]=[i,a]}return[r,n]}const i=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);const a=(e,t,r)=>e>>>r;const c=(e,t,r)=>e<<32-r|t>>>r;const u=(e,t,r)=>e>>>r|t<<32-r;const l=(e,t,r)=>e<<32-r|t>>>r;const d=(e,t,r)=>e<<64-r|t>>>r-32;const f=(e,t,r)=>e>>>r-32|t<<64-r;const p=(e,t)=>t;const h=(e,t)=>e;const g=(e,t,r)=>e<<r|t>>>32-r;const y=(e,t,r)=>t<<r|e>>>32-r;const m=(e,t,r)=>t<<r-32|e>>>64-r;const b=(e,t,r)=>e<<r-32|t>>>64-r;function w(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}const v=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);const T=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;const A=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);const E=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0;const P=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);const B=(e,t,r,n,o,s)=>t+r+n+o+s+(e/2**32|0)|0;const C={fromBig:o,split:s,toBig:i,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:d,rotrBL:f,rotr32H:p,rotr32L:h,rotlSH:g,rotlSL:y,rotlBH:m,rotlBL:b,add:w,add3L:v,add3H:T,add4L:A,add4H:E,add5H:B,add5L:P};t.default=C},4610(e,t){\"use strict\";t.crypto=void 0,t.crypto=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0},4832(e,t,r){\"use strict\";t.hmac=void 0;const n=r(9648),o=r(3654);class s extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,o.toBytes)(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(r.length>s?e.create().update(r).digest():r);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:i}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=i,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.hmac=(e,t,r)=>new s(e,t).update(r).digest(),t.hmac.create=(e,t)=>new s(e,t)},486(e,t,r){\"use strict\";t.pbkdf2Async=t.pbkdf2=void 0;const n=r(9648),o=r(4832),s=r(3654);function i(e,t,r,i){(0,n.hash)(e);const a=(0,s.checkOpts)({dkLen:32,asyncTick:10},i),{c,dkLen:u,asyncTick:l}=a;if((0,n.number)(c),(0,n.number)(u),(0,n.number)(l),c<1)throw new Error(\"PBKDF2: iterations (c) should be >= 1\");const d=(0,s.toBytes)(t),f=(0,s.toBytes)(r),p=new Uint8Array(u),h=o.hmac.create(e,d),g=h._cloneInto().update(f);return{c,dkLen:u,asyncTick:l,DK:p,PRF:h,PRFSalt:g}}function a(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),o.fill(0),r}t.pbkdf2=function(e,t,r,n){const{c:o,dkLen:c,DK:u,PRF:l,PRFSalt:d}=i(e,t,r,n);let f;const p=new Uint8Array(4),h=(0,s.createView)(p),g=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const r=u.subarray(t,t+l.outputLen);h.setInt32(0,e,!1),(f=d._cloneInto(f)).update(p).digestInto(g),r.set(g.subarray(0,r.length));for(let e=1;e<o;e++){l._cloneInto(f).update(g).digestInto(g);for(let e=0;e<r.length;e++)r[e]^=g[e]}}return a(l,d,u,f,g)},t.pbkdf2Async=async function(e,t,r,n){const{c:o,dkLen:c,asyncTick:u,DK:l,PRF:d,PRFSalt:f}=i(e,t,r,n);let p;const h=new Uint8Array(4),g=(0,s.createView)(h),y=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const r=l.subarray(t,t+d.outputLen);g.setInt32(0,e,!1),(p=f._cloneInto(p)).update(h).digestInto(y),r.set(y.subarray(0,r.length)),await(0,s.asyncLoop)(o-1,u,()=>{d._cloneInto(p).update(y).digestInto(y);for(let e=0;e<r.length;e++)r[e]^=y[e]})}return a(d,f,l,p,y)}},7004(e,t,r){\"use strict\";t.sha256=void 0;const n=r(3134),o=r(3654),s=(e,t,r)=>e&t^~e&r,i=(e,t,r)=>e&t^e&r^t&r,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),c=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class l extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3],this.E=0|c[4],this.F=0|c[5],this.G=0|c[6],this.H=0|c[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,s=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;u[e]=s+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:c,D:l,E:d,F:f,G:p,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,o.rotr)(d,6)^(0,o.rotr)(d,11)^(0,o.rotr)(d,25))+s(d,f,p)+a[e]+u[e]|0,g=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+i(r,n,c)|0;h=p,p=f,f=d,d=l+t|0,l=c,c=n,n=r,r=t+g|0}r=r+this.A|0,n=n+this.B|0,c=c+this.C|0,l=l+this.D|0,d=d+this.E|0,f=f+this.F|0,p=p+this.G|0,h=h+this.H|0,this.set(r,n,c,l,d,f,p,h)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class d extends l{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)(()=>new l),(0,o.wrapConstructor)(()=>new d)},2249(e,t,r){\"use strict\";t.sha512=void 0;const n=r(3134),o=r(3109),s=r(3654),[i,a]=o.default.split([\"0x428a2f98d728ae22\",\"0x7137449123ef65cd\",\"0xb5c0fbcfec4d3b2f\",\"0xe9b5dba58189dbbc\",\"0x3956c25bf348b538\",\"0x59f111f1b605d019\",\"0x923f82a4af194f9b\",\"0xab1c5ed5da6d8118\",\"0xd807aa98a3030242\",\"0x12835b0145706fbe\",\"0x243185be4ee4b28c\",\"0x550c7dc3d5ffb4e2\",\"0x72be5d74f27b896f\",\"0x80deb1fe3b1696b1\",\"0x9bdc06a725c71235\",\"0xc19bf174cf692694\",\"0xe49b69c19ef14ad2\",\"0xefbe4786384f25e3\",\"0x0fc19dc68b8cd5b5\",\"0x240ca1cc77ac9c65\",\"0x2de92c6f592b0275\",\"0x4a7484aa6ea6e483\",\"0x5cb0a9dcbd41fbd4\",\"0x76f988da831153b5\",\"0x983e5152ee66dfab\",\"0xa831c66d2db43210\",\"0xb00327c898fb213f\",\"0xbf597fc7beef0ee4\",\"0xc6e00bf33da88fc2\",\"0xd5a79147930aa725\",\"0x06ca6351e003826f\",\"0x142929670a0e6e70\",\"0x27b70a8546d22ffc\",\"0x2e1b21385c26c926\",\"0x4d2c6dfc5ac42aed\",\"0x53380d139d95b3df\",\"0x650a73548baf63de\",\"0x766a0abb3c77b2a8\",\"0x81c2c92e47edaee6\",\"0x92722c851482353b\",\"0xa2bfe8a14cf10364\",\"0xa81a664bbc423001\",\"0xc24b8b70d0f89791\",\"0xc76c51a30654be30\",\"0xd192e819d6ef5218\",\"0xd69906245565a910\",\"0xf40e35855771202a\",\"0x106aa07032bbd1b8\",\"0x19a4c116b8d2d0c8\",\"0x1e376c085141ab53\",\"0x2748774cdf8eeb99\",\"0x34b0bcb5e19b48a8\",\"0x391c0cb3c5c95a63\",\"0x4ed8aa4ae3418acb\",\"0x5b9cca4f7763e373\",\"0x682e6ff3d6b2b8a3\",\"0x748f82ee5defb2fc\",\"0x78a5636f43172f60\",\"0x84c87814a1f0ab72\",\"0x8cc702081a6439ec\",\"0x90befffa23631e28\",\"0xa4506cebde82bde9\",\"0xbef9a3f7b2c67915\",\"0xc67178f2e372532b\",\"0xca273eceea26619c\",\"0xd186b8c721c0c207\",\"0xeada7dd6cde0eb1e\",\"0xf57d4f7fee6ed178\",\"0x06f067aa72176fba\",\"0x0a637dc5a2c898a6\",\"0x113f9804bef90dae\",\"0x1b710b35131c471b\",\"0x28db77f523047d84\",\"0x32caab7b40c72493\",\"0x3c9ebe0a15c9bebc\",\"0x431d67c49c100d4c\",\"0x4cc5d4becb3e42b6\",\"0x597f299cfc657e2a\",\"0x5fcb6fab3ad6faec\",\"0x6c44198c4a475817\"].map(e=>BigInt(e))),c=new Uint32Array(80),u=new Uint32Array(80);class l extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:s,Dh:i,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:h,Hl:g}=this;return[e,t,r,n,o,s,i,a,c,u,l,d,f,p,h,g]}set(e,t,r,n,o,s,i,a,c,u,l,d,f,p,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|i,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t),u[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],r=0|u[e-15],n=o.default.rotrSH(t,r,1)^o.default.rotrSH(t,r,8)^o.default.shrSH(t,r,7),s=o.default.rotrSL(t,r,1)^o.default.rotrSL(t,r,8)^o.default.shrSL(t,r,7),i=0|c[e-2],a=0|u[e-2],l=o.default.rotrSH(i,a,19)^o.default.rotrBH(i,a,61)^o.default.shrSH(i,a,6),d=o.default.rotrSL(i,a,19)^o.default.rotrBL(i,a,61)^o.default.shrSL(i,a,6),f=o.default.add4L(s,d,u[e-7],u[e-16]),p=o.default.add4H(f,n,l,c[e-7],c[e-16]);c[e]=0|p,u[e]=0|f}let{Ah:r,Al:n,Bh:s,Bl:l,Ch:d,Cl:f,Dh:p,Dl:h,Eh:g,El:y,Fh:m,Fl:b,Gh:w,Gl:v,Hh:T,Hl:A}=this;for(let e=0;e<80;e++){const t=o.default.rotrSH(g,y,14)^o.default.rotrSH(g,y,18)^o.default.rotrBH(g,y,41),E=o.default.rotrSL(g,y,14)^o.default.rotrSL(g,y,18)^o.default.rotrBL(g,y,41),P=g&m^~g&w,B=y&b^~y&v,C=o.default.add5L(A,E,B,a[e],u[e]),I=o.default.add5H(C,T,t,P,i[e],c[e]),S=0|C,W=o.default.rotrSH(r,n,28)^o.default.rotrBH(r,n,34)^o.default.rotrBH(r,n,39),x=o.default.rotrSL(r,n,28)^o.default.rotrBL(r,n,34)^o.default.rotrBL(r,n,39),_=r&s^r&d^s&d,R=n&l^n&f^l&f;T=0|w,A=0|v,w=0|m,v=0|b,m=0|g,b=0|y,({h:g,l:y}=o.default.add(0|p,0|h,0|I,0|S)),p=0|d,h=0|f,d=0|s,f=0|l,s=0|r,l=0|n;const k=o.default.add3L(S,x,R);r=o.default.add3H(k,I,W,_),n=0|k}({h:r,l:n}=o.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:s,l}=o.default.add(0|this.Bh,0|this.Bl,0|s,0|l)),({h:d,l:f}=o.default.add(0|this.Ch,0|this.Cl,0|d,0|f)),({h:p,l:h}=o.default.add(0|this.Dh,0|this.Dl,0|p,0|h)),({h:g,l:y}=o.default.add(0|this.Eh,0|this.El,0|g,0|y)),({h:m,l:b}=o.default.add(0|this.Fh,0|this.Fl,0|m,0|b)),({h:w,l:v}=o.default.add(0|this.Gh,0|this.Gl,0|w,0|v)),({h:T,l:A}=o.default.add(0|this.Hh,0|this.Hl,0|T,0|A)),this.set(r,n,s,l,d,f,p,h,g,y,m,b,w,v,T,A)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class f extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class p extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,s.wrapConstructor)(()=>new l),(0,s.wrapConstructor)(()=>new d),(0,s.wrapConstructor)(()=>new f),(0,s.wrapConstructor)(()=>new p)},3654(e,t,r){\"use strict\";t.randomBytes=t.wrapConstructor=t.checkOpts=t.Hash=t.toBytes=t.asyncLoop=t.dY=t.qv=t.rotr=t.createView=void 0;const n=r(4610);function o(e){return e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name}t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.qv=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.qv)throw new Error(\"Non little-endian hardware is not supported\");const s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));const i=48,a=57,c=65,u=70,l=97,d=102;function f(e){return e>=i&&e<=a?e-i:e>=c&&e<=u?e-(c-10):e>=l&&e<=d?e-(l-10):void 0}function p(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function h(e){if(\"string\"==typeof e&&(e=p(e)),!o(e))throw new Error(\"expected Uint8Array, got \"+typeof e);return e}t.dY=async()=>{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let s=0;s<e;s++){n(s);const e=Date.now()-o;e>=0&&e<r||(await(0,t.dY)(),o+=e)}},t.toBytes=h;t.Hash=class{clone(){return this._cloneInto()}};const g={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&\"[object Object]\"!==g.call(t))throw new Error(\"Options should be object or undefined\");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(h(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.randomBytes=function(e=32){if(n.crypto&&\"function\"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}},9450(e,t){\"use strict\";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name}function o(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map(e=>e.encode).reduceRight(r,t),decode:e.map(e=>e.decode).reduce(r,t)}}function s(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&\"number\"!=typeof t[0])throw new Error(\"alphabet.encode input should be an array of numbers\");return t.map(t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]})},decode:t=>{if(!Array.isArray(t)||t.length&&\"string\"!=typeof t[0])throw new Error(\"alphabet.decode input should be array of strings\");return t.map(t=>{if(\"string\"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: \"${t}\". Allowed: ${e}`);return r})}}}function i(e=\"\"){if(\"string\"!=typeof e)throw new Error(\"join separator should be string\");return{encode:t=>{if(!Array.isArray(t)||t.length&&\"string\"!=typeof t[0])throw new Error(\"join.encode input should be array of strings\");for(let e of t)if(\"string\"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if(\"string\"!=typeof t)throw new Error(\"join.decode input should be string\");return t.split(e)}}}function a(e,t=\"=\"){if(r(e),\"string\"!=typeof t)throw new Error(\"padding chr should be string\");return{encode(r){if(!Array.isArray(r)||r.length&&\"string\"!=typeof r[0])throw new Error(\"padding.encode input should be array of strings\");for(let e of r)if(\"string\"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&\"string\"!=typeof r[0])throw new Error(\"padding.encode input should be array of strings\");for(let e of r)if(\"string\"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error(\"Invalid padding: string should have whole number of bytes\");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error(\"Invalid padding: string has too much padding\");return r.slice(0,n)}}}function c(e){if(\"function\"!=typeof e)throw new Error(\"normalize fn should be function\");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error(\"convertRadix: data should be array\");if(!e.length)return[];let o=0;const s=[],i=Array.from(e);for(i.forEach(e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)});;){let e=0,r=!0;for(let s=o;s<i.length;s++){const a=i[s],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!==t*e)throw new Error(\"convertRadix: carry overflow\");e=c%n;const u=Math.floor(c/n);if(i[s]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error(\"convertRadix: carry overflow\");r&&(u?r=!1:o=s)}if(s.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)s.push(0);return s.reverse()}t.Af=t.Ar=t.uh=t.As=t.rg=t.ic=t.tw=t.r0=t.K3=t.RG=t.xn=t.utils=void 0;const l=(e,t)=>t?l(t,e%t):e,d=(e,t)=>e+(t-l(e,t));function f(e,t,n,o){if(!Array.isArray(e))throw new Error(\"convertRadix2: data should be array\");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(d(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${d(t,n)}`);let s=0,i=0;const a=2**n-1,c=[];for(const o of e){if(r(o),o>=2**t)throw new Error(`convertRadix2: invalid data word=${o} from=${t}`);if(s=s<<t|o,i+t>32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=n;i-=n)c.push((s>>i-n&a)>>>0);s&=2**i-1}if(s=s<<n-i&a,!o&&i>=t)throw new Error(\"Excess padding\");if(!o&&s)throw new Error(`Non-zero padding: ${s}`);return o&&i>0&&c.push(s>>>0),c}function p(e){return r(e),{encode:t=>{if(!n(t))throw new Error(\"radix.encode input should be Uint8Array\");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&\"number\"!=typeof t[0])throw new Error(\"radix.decode input should be array of numbers\");return Uint8Array.from(u(t,e,256))}}}function h(e,t=!1){if(r(e),e<=0||e>32)throw new Error(\"radix2: bits should be in (0..32]\");if(d(8,e)>32||d(e,8)>32)throw new Error(\"radix2: carry overflow\");return{encode:r=>{if(!n(r))throw new Error(\"radix2.encode input should be Uint8Array\");return f(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&\"number\"!=typeof r[0])throw new Error(\"radix2.decode input should be array of numbers\");return Uint8Array.from(f(r,e,8,t))}}}function g(e){if(\"function\"!=typeof e)throw new Error(\"unsafeWrapper fn should be function\");return function(...t){try{return e.apply(null,t)}catch(e){}}}function y(e,t){if(r(e),\"function\"!=typeof t)throw new Error(\"checksum fn should be function\");return{encode(r){if(!n(r))throw new Error(\"checksum.encode: input should be Uint8Array\");const o=t(r).slice(0,e),s=new Uint8Array(r.length+e);return s.set(r),s.set(o,r.length),s},decode(r){if(!n(r))throw new Error(\"checksum.decode: input should be Uint8Array\");const o=r.slice(0,-e),s=t(o).slice(0,e),i=r.slice(-e);for(let t=0;t<e;t++)if(s[t]!==i[t])throw new Error(\"Invalid checksum\");return o}}}t.utils={alphabet:s,chain:o,checksum:y,convertRadix:u,convertRadix2:f,radix:p,radix2:h,join:i,padding:a},t.xn=o(h(4),s(\"0123456789ABCDEF\"),i(\"\")),t.RG=o(h(5),s(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),a(5),i(\"\")),o(h(5),s(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),i(\"\")),o(h(5),s(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),a(5),i(\"\")),o(h(5),s(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),i(\"\")),o(h(5),s(\"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"),i(\"\"),c(e=>e.toUpperCase().replace(/O/g,\"0\").replace(/[IL]/g,\"1\"))),t.K3=o(h(6),s(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),a(6),i(\"\")),o(h(6),s(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),i(\"\")),t.r0=o(h(6),s(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),a(6),i(\"\")),o(h(6),s(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),i(\"\"));const m=e=>o(p(58),s(e),i(\"\"));t.tw=m(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"),m(\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"),m(\"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz\");const b=[0,2,3,5,6,7,9,10,11];t.ic={encode(e){let r=\"\";for(let n=0;n<e.length;n+=8){const o=e.subarray(n,n+8);r+=t.tw.encode(o).padStart(b[o.length],\"1\")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const o=e.slice(n,n+11),s=b.indexOf(o.length),i=t.tw.decode(o);for(let e=0;e<i.length-s;e++)if(0!==i[e])throw new Error(\"base58xmr: wrong padding\");r=r.concat(Array.from(i.slice(i.length-s)))}return Uint8Array.from(r)}};t.rg=e=>o(y(4,t=>e(e(t))),t.tw),t.rg;const w=o(s(\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"),i(\"\")),v=[996825010,642813549,513874426,1027748829,705979059];function T(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<v.length;e++)1==(t>>e&1)&&(r^=v[e]);return r}function A(e,t,r=1){const n=e.length;let o=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);o=T(o)^r>>5}o=T(o);for(let t=0;t<n;t++)o=T(o)^31&e.charCodeAt(t);for(let e of t)o=T(o)^e;for(let e=0;e<6;e++)o=T(o);return o^=r,w.encode(f([o%2**30],30,5,!1))}function E(e){const t=\"bech32\"===e?1:734539939,r=h(5),n=r.decode,o=r.encode,s=g(n);function i(e,r,n=90){if(\"string\"!=typeof e)throw new Error(\"bech32.encode prefix should be string, not \"+typeof e);if(r instanceof Uint8Array&&(r=Array.from(r)),!Array.isArray(r)||r.length&&\"number\"!=typeof r[0])throw new Error(\"bech32.encode words should be array of numbers, not \"+typeof r);if(0===e.length)throw new TypeError(`Invalid prefix length ${e.length}`);const o=e.length+7+r.length;if(!1!==n&&o>n)throw new TypeError(`Length ${o} exceeds limit ${n}`);const s=e.toLowerCase(),i=A(s,r,t);return`${s}1${w.encode(r)}${i}`}function a(e,r=90){if(\"string\"!=typeof e)throw new Error(\"bech32.decode input should be string, not \"+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error(\"String must be lowercase or uppercase\");const o=n.lastIndexOf(\"1\");if(0===o||-1===o)throw new Error('Letter \"1\" must be present between prefix and data only');const s=n.slice(0,o),i=n.slice(o+1);if(i.length<6)throw new Error(\"Data must be at least 6 characters long\");const a=w.decode(i).slice(0,-6),c=A(s,a,t);if(!i.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected \"${c}\"`);return{prefix:s,words:a}}return{encode:i,decode:a,encodeFromBytes:function(e,t){return i(e,o(t))},decodeToBytes:function(e){const{prefix:t,words:r}=a(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:g(a),fromWords:n,fromWordsUnsafe:s,toWords:o}}E(\"bech32\"),E(\"bech32m\"),t.As={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.uh=o(h(4),s(\"0123456789abcdef\"),i(\"\"),c(e=>{if(\"string\"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));const P={utf8:t.As,hex:t.uh,base16:t.xn,base32:t.RG,base64:t.K3,base64url:t.r0,base58:t.tw,base58xmr:t.ic},B=\"Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr\";t.Ar=(e,t)=>{if(\"string\"!=typeof e||!P.hasOwnProperty(e))throw new TypeError(B);if(!n(t))throw new TypeError(\"bytesToString() expects Uint8Array\");return P[e].encode(t)},t.Ar;t.Af=(e,t)=>{if(!P.hasOwnProperty(e))throw new TypeError(B);if(\"string\"!=typeof t)throw new TypeError(\"stringToBytes() expects string\");return P[e].decode(t)},t.Af},7991(e,t){\"use strict\";t.toByteArray=function(e){var t,r,s=a(e),i=s[0],c=s[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,i,c)),l=0,d=c>0?i-4:i;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,s=[],i=16383,a=0,c=n-o;a<c;a+=i)s.push(u(e,a,a+i>c?c:a+i));1===o?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+\"==\")):2===o&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+\"=\"));return s.join(\"\")};for(var r=[],n=[],o=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",i=0;i<64;++i)r[i]=s[i],n[s.charCodeAt(i)]=i;function a(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=e.indexOf(\"=\");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function u(e,t,r){for(var n,o=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(c(n));return o.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},1048(e,t,r){\"use strict\";const n=r(7991),o=r(9318),s=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.hp=c,t.IS=50;const i=2147483647;function a(e){if(e>i)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if(\"number\"==typeof e){if(\"string\"==typeof t)throw new TypeError('The \"string\" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if(\"string\"==typeof e)return function(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!c.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|g(e,t);let n=a(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return p(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return p(e,t,r);if(\"number\"==typeof e)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|h(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return\"number\"!=typeof e.length||Y(e.length)?a(0):f(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive](\"string\"),t,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof e)}function l(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be of type number');if(e<0)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}function d(e){return l(e),a(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('\"offset\" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function h(e){if(e>=i)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+i.toString(16)+\" bytes\");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if(\"string\"!=typeof e)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return G(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return K(e).length;default:if(o)return n?-1:G(e).length;t=(\"\"+t).toLowerCase(),o=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(t>>>=0))return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return x(this,t,r);case\"utf8\":case\"utf-8\":return C(this,t,r);case\"ascii\":return S(this,t,r);case\"latin1\":case\"binary\":return W(this,t,r);case\"base64\":return B(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return _(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if(\"string\"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError(\"val must be string, number or Buffer\")}function w(e,t,r,n,o){let s,i=1,a=e.length,c=t.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(e.length<2||t.length<2)return-1;i=2,a/=2,c/=2,r/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){let n=-1;for(s=r;s<a;s++)if(u(e,s)===u(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===c)return n*i}else-1!==n&&(s-=s-n),n=-1}else for(r+c>a&&(r=a-c),s=r;s>=0;s--){let r=!0;for(let n=0;n<c;n++)if(u(e,s+n)!==u(t,n)){r=!1;break}if(r)return s}return-1}function v(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let i;for(n>s/2&&(n=s/2),i=0;i<n;++i){const n=parseInt(t.substr(2*i,2),16);if(Y(n))return i;e[r+i]=n}return i}function T(e,t,r,n){return q(G(t,e.length-r),e,r,n)}function A(e,t,r,n){return q(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return q(K(t),e,r,n)}function P(e,t,r,n){return q(function(e,t){let r,n,o;const s=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function B(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,i=t>239?4:t>223?3:t>191?2:1;if(o+i<=r){let r,n,a,c;switch(i){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(s=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,i=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=i}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(c.prototype,\"parent\",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,\"offset\",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?\"string\"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?\"\":0===arguments.length?C(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e=\"\";const r=t.IS;return e=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(e+=\" ... \"),\"<Buffer \"+e+\">\"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError(\"out of range index\");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0);const a=Math.min(s,i),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<a;++e)if(u[e]!==l[e]){s=u[e],i=l[e];break}return s<i?-1:i<s?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n=\"utf8\",r=this.length,t=0;else if(void 0===r&&\"string\"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let s=!1;for(;;)switch(n){case\"hex\":return v(this,e,t,r);case\"utf8\":case\"utf-8\":return T(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return A(this,e,t,r);case\"base64\":return E(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return P(this,e,t,r);default:if(s)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function S(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function W(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function x(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o=\"\";for(let n=t;n<r;++n)o+=J[e[n]];return o}function _(e,t,r){const n=e.slice(t,r);let o=\"\";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>r)throw new RangeError(\"Trying to access beyond buffer length\")}function k(e,t,r,n,o,s){if(!c.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function O(e,t,r,n,o){z(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,r}function F(e,t,r,n,o){z(t,n,o,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=i,i>>=8,e[r+2]=i,i>>=8,e[r+1]=i,i>>=8,e[r]=i,r+8}function M(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function N(e,t,r,n,s){return t=+t,r>>>=0,s||M(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,s){return t=+t,r>>>=0,s||M(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=X(function(e){j(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){k(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){k(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X(function(e,t=0){return O(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),c.prototype.writeBigUInt64BE=X(function(e,t=0){return F(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);k(this,e,t,r,n-1,-n)}let o=0,s=1,i=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===i&&0!==this[t+o-1]&&(i=1),this[t+o]=(e/s|0)-i&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);k(this,e,t,r,n-1,-n)}let o=r-1,s=1,i=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===i&&0!==this[t+o+1]&&(i=1),this[t+o]=(e/s|0)-i&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X(function(e,t=0){return O(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),c.prototype.writeBigInt64BE=X(function(e,t=0){return F(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))}),c.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(r<0||r>=this.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"sourceEnd out of bounds\");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if(\"string\"==typeof e){if(\"string\"==typeof t?(n=t,t=0,r=this.length):\"string\"==typeof r&&(n=r,r=this.length),void 0!==n&&\"string\"!=typeof n)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof n&&!c.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===e.length){const t=e.charCodeAt(0);(\"utf8\"===n&&t<128||\"latin1\"===n)&&(e=t)}}else\"number\"==typeof e?e&=255:\"boolean\"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError(\"Out of range index\");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=c.isBuffer(e)?e:c.from(e,n),i=s.length;if(0===i)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(o=0;o<r-t;++o)this[o+t]=s[o%i]}return this};const D={};function L(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t=\"\",r=e.length;const n=\"-\"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,o,s){if(e>r||e<t){const n=\"bigint\"==typeof t?\"n\":\"\";let o;throw o=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE(\"value\",o,e)}!function(e,t,r){j(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,o,s)}function j(e,t){if(\"number\"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function V(e,t,r){if(Math.floor(e)!==e)throw j(e,r),new D.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}L(\"ERR_BUFFER_OUT_OF_BOUNDS\",function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"},RangeError),L(\"ERR_INVALID_ARG_TYPE\",function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`},TypeError),L(\"ERR_OUT_OF_RANGE\",function(e,t,r){let n=`The value of \"${e}\" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=$(String(r)):\"bigint\"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=$(o)),o+=\"n\"),n+=` It must be ${t}. Received ${o}`,n},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let i=0;i<n;++i){if(r=e.charCodeAt(i),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(e){return n.toByteArray(function(e){if((e=(e=e.split(\"=\")[0]).trim().replace(H,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function q(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const J=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return\"undefined\"==typeof BigInt?Q:e}function Q(){throw new Error(\"BigInt not supported\")}},8985(e){\"use strict\";var t=Object.prototype.hasOwnProperty,r=\"~\";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,i){if(\"function\"!=typeof n)throw new TypeError(\"The listener must be a function\");var a=new o(n,s||e,i),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function i(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,s=n.length,i=new Array(s);o<s;o++)i[o]=n[o].fn;return i},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,s,i){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,s),!0;case 6:return l.fn.call(l.context,t,n,o,s,i),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return i(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||i(this,s);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[s]=1===u.length?u[0]:u:i(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},282(e){e.exports=i,i.default=i,i.stable=l,i.stableStringify=l;var t=\"[...]\",r=\"[Circular]\",n=[],o=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(e,t,r,i){var a;void 0===i&&(i=s()),c(e,\"\",0,[],void 0,0,i);try{a=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,f(t),r)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(e,t,r,s){var i=Object.getOwnPropertyDescriptor(s,r);void 0!==i.get?i.configurable?(Object.defineProperty(s,r,{value:e}),n.push([s,r,t,i])):o.push([t,r,e]):(s[r]=e,n.push([s,r,t]))}function c(e,n,o,s,i,u,l){var d;if(u+=1,\"object\"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void a(r,e,n,i);if(void 0!==l.depthLimit&&u>l.depthLimit)return void a(t,e,n,i);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(t,e,n,i);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)c(e[d],d,d,s,e,u,l);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var p=f[d];c(e[p],p,d,s,e,u,l)}}s.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,i){void 0===i&&(i=s());var a,c=d(e,\"\",0,[],void 0,0,i)||e;try{a=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,f(t),r)}catch(e){return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function d(e,o,s,i,c,l,f){var p;if(l+=1,\"object\"==typeof e&&null!==e){for(p=0;p<i.length;p++)if(i[p]===e)return void a(r,e,o,c);try{if(\"function\"==typeof e.toJSON)return}catch(e){return}if(void 0!==f.depthLimit&&l>f.depthLimit)return void a(t,e,o,c);if(void 0!==f.edgesLimit&&s+1>f.edgesLimit)return void a(t,e,o,c);if(i.push(e),Array.isArray(e))for(p=0;p<e.length;p++)d(e[p],p,p,i,e,l,f);else{var h={},g=Object.keys(e).sort(u);for(p=0;p<g.length;p++){var y=g[p];d(e[y],y,p,i,e,l,f),h[y]=e[y]}if(void 0===c)return h;n.push([c,o,e]),c[o]=h}i.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var s=o[n];if(s[1]===t&&s[0]===r){r=s[2],o.splice(n,1);break}}return e.call(this,t,r)}}},7186(e,t){var r=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},n=\"undefined\"!=typeof window&&window===this?this:\"undefined\"!=typeof globalThis&&null!=globalThis?globalThis:this;function o(){o=function(){},n.Symbol||(n.Symbol=a)}function s(e,t){this.a=e,r(this,\"description\",{configurable:!0,writable:!0,value:t})}s.prototype.toString=function(){return this.a};var i,a=(i=0,function e(t){if(this instanceof e)throw new TypeError(\"Symbol is not a constructor\");return new s(\"jscomp_symbol_\"+(t||\"\")+\"_\"+i++,t)});function c(){o();var e=n.Symbol.iterator;e||(e=n.Symbol.iterator=n.Symbol(\"Symbol.iterator\")),\"function\"!=typeof Array.prototype[e]&&r(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return function(e){return c(),e={next:e},e[n.Symbol.iterator]=function(){return this},e}(function(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}(this))}}),c=function(){}}!function(e,t){if(t){var o=n;e=e.split(\".\");for(var s=0;s<e.length-1;s++){var i=e[s];i in o||(o[i]={}),o=o[i]}(t=t(s=o[e=e[e.length-1]]))!=s&&null!=t&&r(o,e,{configurable:!0,writable:!0,value:t})}}(\"Array.prototype.entries\",function(e){return e||function(){return function(e,t){c(),e instanceof String&&(e+=\"\");var r=0,n={next:function(){if(r<e.length){var o=r++;return{value:t(o,e[o]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n}(this,function(e,t){return[e,t]})}});var u=this||self;function l(e,t,r){e=e.split(\".\"),r=r||u,e[0]in r||void 0===r.execScript||r.execScript(\"var \"+e[0]);for(var n;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function d(e){var t=typeof e;if(\"object\"==t){if(!e)return\"null\";if(e instanceof Array)return\"array\";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if(\"[object Window]\"==r)return\"object\";if(\"[object Array]\"==r||\"number\"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==r||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable(\"call\"))return\"function\"}else if(\"function\"==t&&void 0===e.call)return\"object\";return t}function f(e){var t=typeof e;return\"object\"==t&&null!=e||\"function\"==t}var p=\"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf\".split(\" \");var h=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t,void 0)}:function(e,t){for(var r=e.length,n=\"string\"==typeof e?e.split(\"\"):e,o=0;o<r;o++)o in n&&t.call(void 0,n[o],o,e)},g=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var r=e.length,n=Array(r),o=\"string\"==typeof e?e.split(\"\"):e,s=0;s<r;s++)s in o&&(n[s]=t.call(void 0,o[s],s,e));return n};function y(e,t,r){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)}function m(e,t,r,n){var o=\"Assertion failed\";if(r){o+=\": \"+r;var s=n}else e&&(o+=\": \"+e,s=t);throw Error(o,s||[])}function b(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];return e||m(\"\",null,t,n),e}function w(e,t){for(var r=[],n=1;n<arguments.length;++n)r[n-1]=arguments[n];throw Error(\"Failure\"+(e?\": \"+e:\"\"),r)}function v(e,t,r,n){for(var o=[],s=3;s<arguments.length;++s)o[s-3]=arguments[s];e instanceof t||m(\"Expected instanceof %s but got %s.\",[T(t),T(e)],r,o)}function T(e){return e instanceof Function?e.displayName||e.name||\"unknown type name\":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):null===e?\"null\":typeof e}function A(e,t){if(this.c=e,this.b=t,this.a={},this.arrClean=!0,0<this.c.length){for(e=0;e<this.c.length;e++){var r=(t=this.c[e])[0];this.a[r.toString()]=new C(r,t[1])}this.arrClean=!0}}function E(e){this.a=0,this.b=e}function P(e,t){return e.b?(t.a||(t.a=new e.b(t.value)),t.a):t.value}function B(e){e=e.a;var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}function C(e,t){this.key=e,this.value=t,this.a=void 0}function I(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t=\"\",r=0;r<e.length;r+=8192)t+=String.fromCharCode.apply(null,y(e,r,r+8192));return t}l(\"jspb.Map\",A,void 0),A.prototype.g=function(){if(this.arrClean){if(this.b){var e,t=this.a;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].a;r&&r.g()}}}else{for(this.c.length=0,(t=B(this)).sort(),e=0;e<t.length;e++){var n=this.a[t[e]];(r=n.a)&&r.g(),this.c.push([n.key,n.value])}this.arrClean=!0}return this.c},A.prototype.toArray=A.prototype.g,A.prototype.Mc=function(e,t){for(var r=this.g(),n=[],o=0;o<r.length;o++){var s=this.a[r[o][0].toString()];P(this,s);var i=s.a;i?(b(t),n.push([s.key,t(e,i)])):n.push([s.key,s.value])}return n},A.prototype.toObject=A.prototype.Mc,A.fromObject=function(e,t,r){t=new A([],t);for(var n=0;n<e.length;n++){var o=e[n][0],s=r(e[n][1]);t.set(o,s)}return t},E.prototype.next=function(){return this.a<this.b.length?{done:!1,value:this.b[this.a++]}:{done:!0,value:void 0}},\"undefined\"!=typeof Symbol&&(E.prototype[Symbol.iterator]=function(){return this}),A.prototype.Jb=function(){return B(this).length},A.prototype.getLength=A.prototype.Jb,A.prototype.clear=function(){this.a={},this.arrClean=!1},A.prototype.clear=A.prototype.clear,A.prototype.Cb=function(e){e=e.toString();var t=this.a.hasOwnProperty(e);return delete this.a[e],this.arrClean=!1,t},A.prototype.del=A.prototype.Cb,A.prototype.Eb=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++){var n=this.a[t[r]];e.push([n.key,n.value])}return e},A.prototype.getEntryList=A.prototype.Eb,A.prototype.entries=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++){var n=this.a[t[r]];e.push([n.key,P(this,n)])}return new E(e)},A.prototype.entries=A.prototype.entries,A.prototype.keys=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++)e.push(this.a[t[r]].key);return new E(e)},A.prototype.keys=A.prototype.keys,A.prototype.values=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++)e.push(P(this,this.a[t[r]]));return new E(e)},A.prototype.values=A.prototype.values,A.prototype.forEach=function(e,t){var r=B(this);r.sort();for(var n=0;n<r.length;n++){var o=this.a[r[n]];e.call(t,P(this,o),o.key,this)}},A.prototype.forEach=A.prototype.forEach,A.prototype.set=function(e,t){var r=new C(e);return this.b?(r.a=t,r.value=t.g()):r.value=t,this.a[e.toString()]=r,this.arrClean=!1,this},A.prototype.set=A.prototype.set,A.prototype.get=function(e){if(e=this.a[e.toString()])return P(this,e)},A.prototype.get=A.prototype.get,A.prototype.has=function(e){return e.toString()in this.a},A.prototype.has=A.prototype.has,A.prototype.Jc=function(e,t,r,n,o){var s=B(this);s.sort();for(var i=0;i<s.length;i++){var a=this.a[s[i]];t.Va(e),r.call(t,1,a.key),this.b?n.call(t,2,P(this,a),o):n.call(t,2,a.value),t.Ya()}},A.prototype.serializeBinary=A.prototype.Jc,A.deserializeBinary=function(e,t,r,n,o,s,i){for(;t.oa()&&!t.bb();){var a=t.c;1==a?s=r.call(t):2==a&&(e.b?(b(o),i||(i=new e.b),n.call(t,i,o)):i=n.call(t))}b(null!=s),b(null!=i),e.set(s,i)};var S={\"\\0\":\"\\\\0\",\"\\b\":\"\\\\b\",\"\\f\":\"\\\\f\",\"\\n\":\"\\\\n\",\"\\r\":\"\\\\r\",\"\\t\":\"\\\\t\",\"\\v\":\"\\\\x0B\",'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\",\"<\":\"\\\\u003C\"},W={\"'\":\"\\\\'\"},x={},_=null;function R(e,t){void 0===t&&(t=0),O(),t=x[t];for(var r=[],n=0;n<e.length;n+=3){var o=e[n],s=n+1<e.length,i=s?e[n+1]:0,a=n+2<e.length,c=a?e[n+2]:0,u=o>>2;o=(3&o)<<4|i>>4,i=(15&i)<<2|c>>6,c&=63,a||(c=64,s||(i=64)),r.push(t[u],t[o],t[i]||\"\",t[c]||\"\")}return r.join(\"\")}function k(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):-1!=\"=.\".indexOf(e[t-1])&&(r=-1!=\"=.\".indexOf(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),o=_[r];if(null!=o)return o;if(!/^[\\s\\xa0]*$/.test(r))throw Error(\"Unknown base64 encoding at char: \"+r)}return t}O();for(var n=0;;){var o=r(-1),s=r(0),i=r(64),a=r(64);if(64===a&&-1===o)break;t(o<<2|s>>4),64!=i&&(t(s<<4&240|i>>2),64!=a&&t(i<<6&192|a))}}(e,function(e){n[o++]=e}),n.subarray(0,o)}function O(){if(!_){_={};for(var e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\".split(\"\"),t=[\"+/=\",\"+/\",\"-_=\",\"-_.\",\"-_\"],r=0;5>r;r++){var n=e.concat(t[r].split(\"\"));x[r]=n;for(var o=0;o<n.length;o++){var s=n[o];void 0===_[s]&&(_[s]=o)}}}}l(\"jspb.ConstBinaryMessage\",function(){},void 0),l(\"jspb.BinaryMessage\",function(){},void 0),l(\"jspb.BinaryConstants.FieldType\",{yb:-1,ee:1,FLOAT:2,ke:3,te:4,je:5,xb:6,wb:7,BOOL:8,re:9,ie:10,le:11,ce:12,se:13,ge:14,me:15,ne:16,oe:17,pe:18,he:30,ve:31},void 0),l(\"jspb.BinaryConstants.WireType\",{yb:-1,ue:0,xb:1,de:2,qe:3,fe:4,wb:5},void 0),l(\"jspb.BinaryConstants.FieldTypeToWireType\",function(e){switch(e){case 5:case 3:case 13:case 4:case 17:case 18:case 8:case 14:case 31:return 0;case 1:case 6:case 16:case 30:return 1;case 9:case 11:case 12:return 2;case 2:case 7:case 15:return 5;default:return-1}},void 0),l(\"jspb.BinaryConstants.INVALID_FIELD_NUMBER\",-1,void 0),l(\"jspb.BinaryConstants.FLOAT32_EPS\",1401298464324817e-60,void 0),l(\"jspb.BinaryConstants.FLOAT32_MIN\",11754943508222875e-54,void 0),l(\"jspb.BinaryConstants.FLOAT32_MAX\",34028234663852886e22,void 0),l(\"jspb.BinaryConstants.FLOAT64_EPS\",5e-324,void 0),l(\"jspb.BinaryConstants.FLOAT64_MIN\",22250738585072014e-324,void 0),l(\"jspb.BinaryConstants.FLOAT64_MAX\",17976931348623157e292,void 0),l(\"jspb.BinaryConstants.TWO_TO_20\",1048576,void 0),l(\"jspb.BinaryConstants.TWO_TO_23\",8388608,void 0),l(\"jspb.BinaryConstants.TWO_TO_31\",2147483648,void 0),l(\"jspb.BinaryConstants.TWO_TO_32\",4294967296,void 0),l(\"jspb.BinaryConstants.TWO_TO_52\",4503599627370496,void 0),l(\"jspb.BinaryConstants.TWO_TO_63\",0x8000000000000000,void 0),l(\"jspb.BinaryConstants.TWO_TO_64\",0x10000000000000000,void 0),l(\"jspb.BinaryConstants.ZERO_HASH\",\"\\0\\0\\0\\0\\0\\0\\0\\0\",void 0);var F=0,M=0;function N(e){var t=e>>>0;e=Math.floor((e-t)/4294967296)>>>0,F=t,M=e}function U(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/4294967296),e>>>=0,t&&(e=~e>>>0,4294967295<(r=(~r>>>0)+1)&&(r=0,4294967295<++e&&(e=0))),F=r,M=e}function D(e){var t=0>e;N(e=2*Math.abs(e)),e=F;var r=M;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),F=e,M=r}function L(e){var t=0>e?1:0;if(0===(e=t?-e:e))0<1/e?F=M=0:(M=0,F=2147483648);else if(isNaN(e))M=0,F=2147483647;else if(34028234663852886e22<e)M=0,F=(t<<31|2139095040)>>>0;else if(11754943508222875e-54>e)e=Math.round(e/Math.pow(2,-149)),M=0,F=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),16777216<=(e=Math.round(8388608*e))&&++r,M=0,F=(t<<31|r+127<<23|8388607&e)>>>0}}function $(e){var t=0>e?1:0;if(0===(e=t?-e:e))M=0<1/e?0:2147483648,F=0;else if(isNaN(e))M=2147483647,F=4294967295;else if(17976931348623157e292<e)M=(t<<31|2146435072)>>>0,F=0;else if(22250738585072014e-324>e)e/=Math.pow(2,-1074),M=(t<<31|e/4294967296)>>>0,F=e>>>0;else{var r=e,n=0;if(2<=r)for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e*=Math.pow(2,-n),M=(t<<31|n+1023<<20|1048576*e&1048575)>>>0,F=4503599627370496*e>>>0}}function z(e){var t=e.charCodeAt(4),r=e.charCodeAt(5),n=e.charCodeAt(6),o=e.charCodeAt(7);F=e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)>>>0,M=t+(r<<8)+(n<<16)+(o<<24)>>>0}function j(e,t){return 4294967296*t+(e>>>0)}function V(e,t){var r=2147483648&t;return r&&(t=~t>>>0,0==(e=1+~e>>>0)&&(t=t+1>>>0)),e=j(e,t),r?-e:e}function H(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)}function G(e,t){return K(e,t,V)}function K(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)}function q(e){var t=2*(e>>31)+1,r=e>>>23&255;return e&=8388607,255==r?e?NaN:1/0*t:0==r?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))}function Z(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=4294967296*(1048575&t)+e,2047==n?e?NaN:1/0*r:0==n?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+4503599627370496)}function Y(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)}function J(e,t){function r(e,t){return e=e?String(e):\"\",t?\"0000000\".slice(e.length)+e:e}if(2097151>=t)return\"\"+j(e,t);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)}function X(e,t){var r=2147483648&t;return r&&(t=~t+(0==(e=1+~e>>>0)?1:0)>>>0),e=J(e,t),r?\"-\"+e:e}function Q(e,t){z(e),e=F;var r=M;return t?X(e,r):J(e,r)}function ee(e){function t(e,t){for(var r=0;8>r&&(1!==e||0<t);r++)t=e*n[r]+t,n[r]=255&t,t>>>=8}b(0<e.length);var r=!1;\"-\"===e[0]&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-48);return r&&(function(){for(var e=0;8>e;e++)n[e]=255&~n[e]}(),t(1,1)),I(n)}function te(e){return String.fromCharCode(10>e?48+e:87+e)}function re(e){return 97<=e?e-97+10:e-48}function ne(e,t,r,n,o){var s=0;if(128>n)for(;t<r&&e[t++]==n;)s++,t+=o;else for(;t<r;){for(var i=n;128<i;){if(e[t++]!=(127&i|128))return s;i>>=7}if(e[t++]!=i)break;s++,t+=o}return s}function oe(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?k(e):e instanceof Uint8Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(w(\"Type not convertible to Uint8Array.\"),new Uint8Array(0))}function se(e,t,r){this.b=null,this.a=this.c=this.h=0,this.v=!1,e&&this.H(e,t,r)}l(\"jspb.utils.getSplit64Low\",function(){return F},void 0),l(\"jspb.utils.getSplit64High\",function(){return M},void 0),l(\"jspb.utils.splitUint64\",N,void 0),l(\"jspb.utils.splitInt64\",U,void 0),l(\"jspb.utils.splitZigzag64\",D,void 0),l(\"jspb.utils.splitFloat32\",L,void 0),l(\"jspb.utils.splitFloat64\",$,void 0),l(\"jspb.utils.splitHash64\",z,void 0),l(\"jspb.utils.joinUint64\",j,void 0),l(\"jspb.utils.joinInt64\",V,void 0),l(\"jspb.utils.toZigzag64\",H,void 0),l(\"jspb.utils.joinZigzag64\",G,void 0),l(\"jspb.utils.fromZigzag64\",K,void 0),l(\"jspb.utils.joinFloat32\",q,void 0),l(\"jspb.utils.joinFloat64\",Z,void 0),l(\"jspb.utils.joinHash64\",Y,void 0),l(\"jspb.utils.DIGITS\",\"0123456789abcdef\".split(\"\"),void 0),l(\"jspb.utils.joinUnsignedDecimalString\",J,void 0),l(\"jspb.utils.joinSignedDecimalString\",X,void 0),l(\"jspb.utils.hash64ToDecimalString\",Q,void 0),l(\"jspb.utils.hash64ArrayToDecimalStrings\",function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=Q(e[n],t);return r},void 0),l(\"jspb.utils.decimalStringToHash64\",ee,void 0),l(\"jspb.utils.splitDecimalString\",function(e){z(ee(e))},void 0),l(\"jspb.utils.hash64ToHexString\",function(e){var t=Array(18);t[0]=\"0\",t[1]=\"x\";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=te(n>>4),t[2*r+3]=te(15&n)}return t.join(\"\")},void 0),l(\"jspb.utils.hexStringToHash64\",function(e){b(18==(e=e.toLowerCase()).length),b(\"0\"==e[0]),b(\"x\"==e[1]);for(var t=\"\",r=0;8>r;r++)t=String.fromCharCode(16*re(e.charCodeAt(2*r+2))+re(e.charCodeAt(2*r+3)))+t;return t},void 0),l(\"jspb.utils.hash64ToNumber\",function(e,t){z(e),e=F;var r=M;return t?V(e,r):j(e,r)},void 0),l(\"jspb.utils.numberToHash64\",function(e){return U(e),Y(F,M)},void 0),l(\"jspb.utils.countVarints\",function(e,t,r){for(var n=0,o=t;o<r;o++)n+=e[o]>>7;return r-t-n},void 0),l(\"jspb.utils.countVarintFields\",function(e,t,r,n){var o=0;if(128>(n*=8))for(;t<r&&e[t++]==n;)for(o++;;){var s=e[t++];if(!(128&s))break}else for(;t<r;){for(s=n;128<s;){if(e[t]!=(127&s|128))return o;t++,s>>=7}if(e[t++]!=s)break;for(o++;128&(s=e[t++]););}return o},void 0),l(\"jspb.utils.countFixed32Fields\",function(e,t,r,n){return ne(e,t,r,8*n+5,4)},void 0),l(\"jspb.utils.countFixed64Fields\",function(e,t,r,n){return ne(e,t,r,8*n+1,8)},void 0),l(\"jspb.utils.countDelimitedFields\",function(e,t,r,n){var o=0;for(n=8*n+2;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return o;s>>=7}if(e[t++]!=s)break;o++;for(var i=0,a=1;i+=(127&(s=e[t++]))*a,a*=128,128&s;);t+=i}return o},void 0),l(\"jspb.utils.debugBytesToTextFormat\",function(e){var t='\"';if(e){e=oe(e);for(var r=0;r<e.length;r++)t+=\"\\\\x\",16>e[r]&&(t+=\"0\"),t+=e[r].toString(16)}return t+'\"'},void 0),l(\"jspb.utils.debugScalarToTextFormat\",function(e){if(\"string\"==typeof e){e=String(e);for(var t=['\"'],r=0;r<e.length;r++){var n,o=e.charAt(r),s=o.charCodeAt(0),i=r+1;(n=S[o])||(31<s&&127>s||((s=o)in W?o=W[s]:s in S?o=W[s]=S[s]:(31<(n=s.charCodeAt(0))&&127>n?o=s:(256>n?(o=\"\\\\x\",(16>n||256<n)&&(o+=\"0\")):(o=\"\\\\u\",4096>n&&(o+=\"0\")),o+=n.toString(16).toUpperCase()),o=W[s]=o)),n=o),t[i]=n}t.push('\"'),e=t.join(\"\")}else e=e.toString();return e},void 0),l(\"jspb.utils.stringToByteArray\",function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error(\"Conversion error: string contains codepoint outside of byte range\");t[r]=n}return t},void 0),l(\"jspb.utils.byteSourceToUint8Array\",oe,void 0),l(\"jspb.BinaryDecoder\",se,void 0);var ie=[];function ae(e,t,r){if(ie.length){var n=ie.pop();return e&&n.H(e,t,r),n}return new se(e,t,r)}function ce(e,t,r){this.a=ae(e,t,r),this.O=this.a.B(),this.b=this.c=-1,this.h=!1,this.v=null}se.getInstanceCacheLength=function(){return ie.length},se.alloc=ae,se.prototype.Ca=function(){this.clear(),100>ie.length&&ie.push(this)},se.prototype.free=se.prototype.Ca,se.prototype.clone=function(){return ae(this.b,this.h,this.c-this.h)},se.prototype.clone=se.prototype.clone,se.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1},se.prototype.clear=se.prototype.clear,se.prototype.Y=function(){return this.b},se.prototype.getBuffer=se.prototype.Y,se.prototype.H=function(e,t,r){this.b=oe(e),this.h=void 0!==t?t:0,this.c=void 0!==r?this.h+r:this.b.length,this.a=this.h},se.prototype.setBlock=se.prototype.H,se.prototype.Db=function(){return this.c},se.prototype.getEnd=se.prototype.Db,se.prototype.setEnd=function(e){this.c=e},se.prototype.setEnd=se.prototype.setEnd,se.prototype.reset=function(){this.a=this.h},se.prototype.reset=se.prototype.reset,se.prototype.B=function(){return this.a},se.prototype.getCursor=se.prototype.B,se.prototype.Ma=function(e){this.a=e},se.prototype.setCursor=se.prototype.Ma,se.prototype.advance=function(e){this.a+=e,b(this.a<=this.c)},se.prototype.advance=se.prototype.advance,se.prototype.ya=function(){return this.a==this.c},se.prototype.atEnd=se.prototype.ya,se.prototype.Qb=function(){return this.a>this.c},se.prototype.pastEnd=se.prototype.Qb,se.prototype.getError=function(){return this.v||0>this.a||this.a>this.c},se.prototype.getError=se.prototype.getError,se.prototype.w=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.b[this.a++]))<<7*o;if(128<=t&&(r|=(127&(t=this.b[this.a++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.b[this.a++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);w(\"Failed to read varint, encoding is invalid.\"),this.v=!0},se.prototype.readSplitVarint64=se.prototype.w,se.prototype.ea=function(e){return this.w(function(t,r){return K(t,r,e)})},se.prototype.readSplitZigzagVarint64=se.prototype.ea,se.prototype.ta=function(e){var t=this.b,r=this.a;this.a+=8;for(var n=0,o=0,s=r+7;s>=r;s--)n=n<<8|t[s],o=o<<8|t[s+4];return e(n,o)},se.prototype.readSplitFixed64=se.prototype.ta,se.prototype.kb=function(){for(;128&this.b[this.a];)this.a++;this.a++},se.prototype.skipVarint=se.prototype.kb,se.prototype.mb=function(e){for(;128<e;)this.a--,e>>>=7;this.a--},se.prototype.unskipVarint=se.prototype.mb,se.prototype.o=function(){var e=this.b,t=e[this.a],r=127&t;return 128>t?(this.a+=1,b(this.a<=this.c),r):(r|=(127&(t=e[this.a+1]))<<7,128>t?(this.a+=2,b(this.a<=this.c),r):(r|=(127&(t=e[this.a+2]))<<14,128>t?(this.a+=3,b(this.a<=this.c),r):(r|=(127&(t=e[this.a+3]))<<21,128>t?(this.a+=4,b(this.a<=this.c),r):(r|=(15&(t=e[this.a+4]))<<28,128>t?(this.a+=5,b(this.a<=this.c),r>>>0):(this.a+=5,128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&b(!1),b(this.a<=this.c),r)))))},se.prototype.readUnsignedVarint32=se.prototype.o,se.prototype.da=function(){return~~this.o()},se.prototype.readSignedVarint32=se.prototype.da,se.prototype.O=function(){return this.o().toString()},se.prototype.Ea=function(){return this.da().toString()},se.prototype.readSignedVarint32String=se.prototype.Ea,se.prototype.Ia=function(){var e=this.o();return e>>>1^-(1&e)},se.prototype.readZigzagVarint32=se.prototype.Ia,se.prototype.Ga=function(){return this.w(j)},se.prototype.readUnsignedVarint64=se.prototype.Ga,se.prototype.Ha=function(){return this.w(J)},se.prototype.readUnsignedVarint64String=se.prototype.Ha,se.prototype.sa=function(){return this.w(V)},se.prototype.readSignedVarint64=se.prototype.sa,se.prototype.Fa=function(){return this.w(X)},se.prototype.readSignedVarint64String=se.prototype.Fa,se.prototype.Ja=function(){return this.w(G)},se.prototype.readZigzagVarint64=se.prototype.Ja,se.prototype.fb=function(){return this.ea(Y)},se.prototype.readZigzagVarintHash64=se.prototype.fb,se.prototype.Ka=function(){return this.ea(X)},se.prototype.readZigzagVarint64String=se.prototype.Ka,se.prototype.Gc=function(){var e=this.b[this.a];return this.a+=1,b(this.a<=this.c),e},se.prototype.readUint8=se.prototype.Gc,se.prototype.Ec=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,b(this.a<=this.c),e|t<<8},se.prototype.readUint16=se.prototype.Ec,se.prototype.m=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,b(this.a<=this.c),(e|t<<8|r<<16|n<<24)>>>0},se.prototype.readUint32=se.prototype.m,se.prototype.ga=function(){return j(this.m(),this.m())},se.prototype.readUint64=se.prototype.ga,se.prototype.ha=function(){return J(this.m(),this.m())},se.prototype.readUint64String=se.prototype.ha,se.prototype.Xb=function(){var e=this.b[this.a];return this.a+=1,b(this.a<=this.c),e<<24>>24},se.prototype.readInt8=se.prototype.Xb,se.prototype.Vb=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,b(this.a<=this.c),(e|t<<8)<<16>>16},se.prototype.readInt16=se.prototype.Vb,se.prototype.P=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,b(this.a<=this.c),e|t<<8|r<<16|n<<24},se.prototype.readInt32=se.prototype.P,se.prototype.ba=function(){return V(this.m(),this.m())},se.prototype.readInt64=se.prototype.ba,se.prototype.ca=function(){return X(this.m(),this.m())},se.prototype.readInt64String=se.prototype.ca,se.prototype.aa=function(){return q(this.m())},se.prototype.readFloat=se.prototype.aa,se.prototype.Z=function(){return Z(this.m(),this.m())},se.prototype.readDouble=se.prototype.Z,se.prototype.pa=function(){return!!this.b[this.a++]},se.prototype.readBool=se.prototype.pa,se.prototype.ra=function(){return this.da()},se.prototype.readEnum=se.prototype.ra,se.prototype.fa=function(e){var t=this.b,r=this.a;e=r+e;for(var n=[],o=\"\";r<e;){var s=t[r++];if(128>s)n.push(s);else{if(192>s)continue;if(224>s){var i=t[r++];n.push((31&s)<<6|63&i)}else if(240>s){i=t[r++];var a=t[r++];n.push((15&s)<<12|(63&i)<<6|63&a)}else if(248>s){s=(7&s)<<18|(63&(i=t[r++]))<<12|(63&(a=t[r++]))<<6|63&t[r++],s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s))}}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=I(n),this.a=r,o},se.prototype.readString=se.prototype.fa,se.prototype.Dc=function(){var e=this.o();return this.fa(e)},se.prototype.readStringWithLength=se.prototype.Dc,se.prototype.qa=function(e){if(0>e||this.a+e>this.b.length)return this.v=!0,w(\"Invalid byte length!\"),new Uint8Array(0);var t=this.b.subarray(this.a,this.a+e);return this.a+=e,b(this.a<=this.c),t},se.prototype.readBytes=se.prototype.qa,se.prototype.ia=function(){return this.w(Y)},se.prototype.readVarintHash64=se.prototype.ia,se.prototype.$=function(){var e=this.b,t=this.a,r=e[t],n=e[t+1],o=e[t+2],s=e[t+3],i=e[t+4],a=e[t+5],c=e[t+6];return e=e[t+7],this.a+=8,String.fromCharCode(r,n,o,s,i,a,c,e)},se.prototype.readFixedHash64=se.prototype.$,l(\"jspb.BinaryReader\",ce,void 0);var ue=[];function le(e,t,r){if(ue.length){var n=ue.pop();return e&&n.a.H(e,t,r),n}return new ce(e,t,r)}function de(e,t){b(2==e.b);var r=e.a.o();r=e.a.B()+r;for(var n=[];e.a.B()<r;)n.push(t.call(e.a));return n}function fe(e,t,r,n,o){this.ma=e,this.Ba=t,this.la=r,this.Na=n,this.na=o}function pe(e,t,r,n,o,s){this.Za=e,this.za=t,this.Aa=r,this.Wa=n,this.Ab=o,this.Nb=s}function he(){}ce.clearInstanceCache=function(){ue=[]},ce.getInstanceCacheLength=function(){return ue.length},ce.alloc=le,ce.prototype.zb=le,ce.prototype.alloc=ce.prototype.zb,ce.prototype.Ca=function(){this.a.clear(),this.b=this.c=-1,this.h=!1,this.v=null,100>ue.length&&ue.push(this)},ce.prototype.free=ce.prototype.Ca,ce.prototype.Fb=function(){return this.O},ce.prototype.getFieldCursor=ce.prototype.Fb,ce.prototype.B=function(){return this.a.B()},ce.prototype.getCursor=ce.prototype.B,ce.prototype.Y=function(){return this.a.Y()},ce.prototype.getBuffer=ce.prototype.Y,ce.prototype.Hb=function(){return this.c},ce.prototype.getFieldNumber=ce.prototype.Hb,ce.prototype.Lb=function(){return this.b},ce.prototype.getWireType=ce.prototype.Lb,ce.prototype.Mb=function(){return 2==this.b},ce.prototype.isDelimited=ce.prototype.Mb,ce.prototype.bb=function(){return 4==this.b},ce.prototype.isEndGroup=ce.prototype.bb,ce.prototype.getError=function(){return this.h||this.a.getError()},ce.prototype.getError=ce.prototype.getError,ce.prototype.H=function(e,t,r){this.a.H(e,t,r),this.b=this.c=-1},ce.prototype.setBlock=ce.prototype.H,ce.prototype.reset=function(){this.a.reset(),this.b=this.c=-1},ce.prototype.reset=ce.prototype.reset,ce.prototype.advance=function(e){this.a.advance(e)},ce.prototype.advance=ce.prototype.advance,ce.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return w(\"Decoder hit an error\"),!1;this.O=this.a.B();var e=this.a.o(),t=e>>>3;return 0!=(e&=7)&&5!=e&&1!=e&&2!=e&&3!=e&&4!=e?(w(\"Invalid wire type: %s (at position %s)\",e,this.O),this.h=!0,!1):(this.c=t,this.b=e,!0)},ce.prototype.nextField=ce.prototype.oa,ce.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)},ce.prototype.unskipHeader=ce.prototype.Oa,ce.prototype.Lc=function(){var e=this.c;for(this.Oa();this.oa()&&this.c==e;)this.C();this.a.ya()||this.Oa()},ce.prototype.skipMatchingFields=ce.prototype.Lc,ce.prototype.lb=function(){0!=this.b?(w(\"Invalid wire type for skipVarintField\"),this.C()):this.a.kb()},ce.prototype.skipVarintField=ce.prototype.lb,ce.prototype.gb=function(){if(2!=this.b)w(\"Invalid wire type for skipDelimitedField\"),this.C();else{var e=this.a.o();this.a.advance(e)}},ce.prototype.skipDelimitedField=ce.prototype.gb,ce.prototype.hb=function(){5!=this.b?(w(\"Invalid wire type for skipFixed32Field\"),this.C()):this.a.advance(4)},ce.prototype.skipFixed32Field=ce.prototype.hb,ce.prototype.ib=function(){1!=this.b?(w(\"Invalid wire type for skipFixed64Field\"),this.C()):this.a.advance(8)},ce.prototype.skipFixed64Field=ce.prototype.ib,ce.prototype.jb=function(){for(var e=this.c;;){if(!this.oa()){w(\"Unmatched start-group tag: stream EOF\"),this.h=!0;break}if(4==this.b){this.c!=e&&(w(\"Unmatched end-group tag\"),this.h=!0);break}this.C()}},ce.prototype.skipGroup=ce.prototype.jb,ce.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:w(\"Invalid wire encoding for field.\")}},ce.prototype.skipField=ce.prototype.C,ce.prototype.Hc=function(e,t){null===this.v&&(this.v={}),b(!this.v[e]),this.v[e]=t},ce.prototype.registerReadCallback=ce.prototype.Hc,ce.prototype.Ic=function(e){return b(null!==this.v),b(e=this.v[e]),e(this)},ce.prototype.runReadCallback=ce.prototype.Ic,ce.prototype.Yb=function(e,t){b(2==this.b);var r=this.a.c,n=this.a.o();n=this.a.B()+n,this.a.setEnd(n),t(e,this),this.a.Ma(n),this.a.setEnd(r)},ce.prototype.readMessage=ce.prototype.Yb,ce.prototype.Ub=function(e,t,r){b(3==this.b),b(this.c==e),r(t,this),this.h||4==this.b||(w(\"Group submessage did not end with an END_GROUP tag\"),this.h=!0)},ce.prototype.readGroup=ce.prototype.Ub,ce.prototype.Gb=function(){b(2==this.b);var e=this.a.o(),t=this.a.B(),r=t+e;return e=ae(this.a.Y(),t,e),this.a.Ma(r),e},ce.prototype.getFieldDecoder=ce.prototype.Gb,ce.prototype.P=function(){return b(0==this.b),this.a.da()},ce.prototype.readInt32=ce.prototype.P,ce.prototype.Wb=function(){return b(0==this.b),this.a.Ea()},ce.prototype.readInt32String=ce.prototype.Wb,ce.prototype.ba=function(){return b(0==this.b),this.a.sa()},ce.prototype.readInt64=ce.prototype.ba,ce.prototype.ca=function(){return b(0==this.b),this.a.Fa()},ce.prototype.readInt64String=ce.prototype.ca,ce.prototype.m=function(){return b(0==this.b),this.a.o()},ce.prototype.readUint32=ce.prototype.m,ce.prototype.Fc=function(){return b(0==this.b),this.a.O()},ce.prototype.readUint32String=ce.prototype.Fc,ce.prototype.ga=function(){return b(0==this.b),this.a.Ga()},ce.prototype.readUint64=ce.prototype.ga,ce.prototype.ha=function(){return b(0==this.b),this.a.Ha()},ce.prototype.readUint64String=ce.prototype.ha,ce.prototype.zc=function(){return b(0==this.b),this.a.Ia()},ce.prototype.readSint32=ce.prototype.zc,ce.prototype.Ac=function(){return b(0==this.b),this.a.Ja()},ce.prototype.readSint64=ce.prototype.Ac,ce.prototype.Bc=function(){return b(0==this.b),this.a.Ka()},ce.prototype.readSint64String=ce.prototype.Bc,ce.prototype.Rb=function(){return b(5==this.b),this.a.m()},ce.prototype.readFixed32=ce.prototype.Rb,ce.prototype.Sb=function(){return b(1==this.b),this.a.ga()},ce.prototype.readFixed64=ce.prototype.Sb,ce.prototype.Tb=function(){return b(1==this.b),this.a.ha()},ce.prototype.readFixed64String=ce.prototype.Tb,ce.prototype.vc=function(){return b(5==this.b),this.a.P()},ce.prototype.readSfixed32=ce.prototype.vc,ce.prototype.wc=function(){return b(5==this.b),this.a.P().toString()},ce.prototype.readSfixed32String=ce.prototype.wc,ce.prototype.xc=function(){return b(1==this.b),this.a.ba()},ce.prototype.readSfixed64=ce.prototype.xc,ce.prototype.yc=function(){return b(1==this.b),this.a.ca()},ce.prototype.readSfixed64String=ce.prototype.yc,ce.prototype.aa=function(){return b(5==this.b),this.a.aa()},ce.prototype.readFloat=ce.prototype.aa,ce.prototype.Z=function(){return b(1==this.b),this.a.Z()},ce.prototype.readDouble=ce.prototype.Z,ce.prototype.pa=function(){return b(0==this.b),!!this.a.o()},ce.prototype.readBool=ce.prototype.pa,ce.prototype.ra=function(){return b(0==this.b),this.a.sa()},ce.prototype.readEnum=ce.prototype.ra,ce.prototype.fa=function(){b(2==this.b);var e=this.a.o();return this.a.fa(e)},ce.prototype.readString=ce.prototype.fa,ce.prototype.qa=function(){b(2==this.b);var e=this.a.o();return this.a.qa(e)},ce.prototype.readBytes=ce.prototype.qa,ce.prototype.ia=function(){return b(0==this.b),this.a.ia()},ce.prototype.readVarintHash64=ce.prototype.ia,ce.prototype.Cc=function(){return b(0==this.b),this.a.fb()},ce.prototype.readSintHash64=ce.prototype.Cc,ce.prototype.w=function(e){return b(0==this.b),this.a.w(e)},ce.prototype.readSplitVarint64=ce.prototype.w,ce.prototype.ea=function(e){return b(0==this.b),this.a.w(function(t,r){return K(t,r,e)})},ce.prototype.readSplitZigzagVarint64=ce.prototype.ea,ce.prototype.$=function(){return b(1==this.b),this.a.$()},ce.prototype.readFixedHash64=ce.prototype.$,ce.prototype.ta=function(e){return b(1==this.b),this.a.ta(e)},ce.prototype.readSplitFixed64=ce.prototype.ta,ce.prototype.gc=function(){return de(this,this.a.da)},ce.prototype.readPackedInt32=ce.prototype.gc,ce.prototype.hc=function(){return de(this,this.a.Ea)},ce.prototype.readPackedInt32String=ce.prototype.hc,ce.prototype.ic=function(){return de(this,this.a.sa)},ce.prototype.readPackedInt64=ce.prototype.ic,ce.prototype.jc=function(){return de(this,this.a.Fa)},ce.prototype.readPackedInt64String=ce.prototype.jc,ce.prototype.qc=function(){return de(this,this.a.o)},ce.prototype.readPackedUint32=ce.prototype.qc,ce.prototype.rc=function(){return de(this,this.a.O)},ce.prototype.readPackedUint32String=ce.prototype.rc,ce.prototype.sc=function(){return de(this,this.a.Ga)},ce.prototype.readPackedUint64=ce.prototype.sc,ce.prototype.tc=function(){return de(this,this.a.Ha)},ce.prototype.readPackedUint64String=ce.prototype.tc,ce.prototype.nc=function(){return de(this,this.a.Ia)},ce.prototype.readPackedSint32=ce.prototype.nc,ce.prototype.oc=function(){return de(this,this.a.Ja)},ce.prototype.readPackedSint64=ce.prototype.oc,ce.prototype.pc=function(){return de(this,this.a.Ka)},ce.prototype.readPackedSint64String=ce.prototype.pc,ce.prototype.bc=function(){return de(this,this.a.m)},ce.prototype.readPackedFixed32=ce.prototype.bc,ce.prototype.cc=function(){return de(this,this.a.ga)},ce.prototype.readPackedFixed64=ce.prototype.cc,ce.prototype.dc=function(){return de(this,this.a.ha)},ce.prototype.readPackedFixed64String=ce.prototype.dc,ce.prototype.kc=function(){return de(this,this.a.P)},ce.prototype.readPackedSfixed32=ce.prototype.kc,ce.prototype.lc=function(){return de(this,this.a.ba)},ce.prototype.readPackedSfixed64=ce.prototype.lc,ce.prototype.mc=function(){return de(this,this.a.ca)},ce.prototype.readPackedSfixed64String=ce.prototype.mc,ce.prototype.fc=function(){return de(this,this.a.aa)},ce.prototype.readPackedFloat=ce.prototype.fc,ce.prototype.$b=function(){return de(this,this.a.Z)},ce.prototype.readPackedDouble=ce.prototype.$b,ce.prototype.Zb=function(){return de(this,this.a.pa)},ce.prototype.readPackedBool=ce.prototype.Zb,ce.prototype.ac=function(){return de(this,this.a.ra)},ce.prototype.readPackedEnum=ce.prototype.ac,ce.prototype.uc=function(){return de(this,this.a.ia)},ce.prototype.readPackedVarintHash64=ce.prototype.uc,ce.prototype.ec=function(){return de(this,this.a.$)},ce.prototype.readPackedFixedHash64=ce.prototype.ec,l(\"jspb.ExtensionFieldInfo\",fe,void 0),l(\"jspb.ExtensionFieldBinaryInfo\",pe,void 0),fe.prototype.F=function(){return!!this.la},fe.prototype.isMessageType=fe.prototype.F,l(\"jspb.Message\",he,void 0),he.GENERATE_TO_OBJECT=!0,he.GENERATE_FROM_OBJECT=!0;var ge=\"function\"==typeof Uint8Array;he.prototype.Ib=function(){return this.b},he.prototype.getJsPbMessageId=he.prototype.Ib,he.initialize=function(e,t,r,n,o,s){if(e.f=null,t||(t=r?[r]:[]),e.b=r?String(r):void 0,e.D=0===r?-1:0,e.u=t,t=-1,!(r=e.u.length)||(t=r-1,null===(r=e.u[t])||\"object\"!=typeof r||Array.isArray(r)||ge&&r instanceof Uint8Array)?-1<n?(e.G=Math.max(n,t+1-e.D),e.i=null):e.G=Number.MAX_VALUE:(e.G=t-e.D,e.i=r),e.a={},o)for(n=0;n<o.length;n++)(t=o[n])<e.G?(t+=e.D,e.u[t]=e.u[t]||ye):(me(e),e.i[t]=e.i[t]||ye);if(s&&s.length)for(n=0;n<s.length;n++)We(e,s[n])};var ye=Object.freeze?Object.freeze([]):[];function me(e){var t=e.G+e.D;e.u[t]||(e.i=e.u[t]={})}function be(e,t,r){for(var n=[],o=0;o<e.length;o++)n[o]=t.call(e[o],r,e[o]);return n}function we(e,t){if(t<e.G){t+=e.D;var r=e.u[t];return r===ye?e.u[t]=[]:r}if(e.i)return(r=e.i[t])===ye?e.i[t]=[]:r}function ve(e,t){return null==(e=we(e,t))?e:+e}function Te(e,t){return null==(e=we(e,t))?e:!!e}function Ae(e){return null==e||\"string\"==typeof e?e:ge&&e instanceof Uint8Array?R(e):(w(\"Cannot coerce to b64 string: \"+d(e)),null)}function Ee(e){return null==e||e instanceof Uint8Array?e:\"string\"==typeof e?k(e):(w(\"Cannot coerce to Uint8Array: \"+d(e)),null)}function Pe(e){if(e&&1<e.length){var t=d(e[0]);h(e,function(e){d(e)!=t&&w(\"Inconsistent type in JSPB repeated field array. Got \"+d(e)+\" expected \"+t)})}}function Be(e,t,r){return(e=we(e,t))??r}function Ce(e,t,r){return v(e,he),t<e.G?e.u[t+e.D]=r:(me(e),e.i[t]=r),e}function Ie(e,t,r,n){return v(e,he),r!==n?Ce(e,t,r):t<e.G?e.u[t+e.D]=null:(me(e),delete e.i[t]),e}function Se(e,t,r,n){return v(e,he),(r=We(e,r))&&r!==t&&void 0!==n&&(e.f&&r in e.f&&(e.f[r]=void 0),Ce(e,r,void 0)),Ce(e,t,n)}function We(e,t){for(var r,n,o=0;o<t.length;o++){var s=t[o],i=we(e,s);null!=i&&(r=s,n=i,Ce(e,s,void 0))}return r?(Ce(e,r,n),r):0}function xe(e,t,r){if(e.f||(e.f={}),!e.f[r]){for(var n=we(e,r),o=[],s=0;s<n.length;s++)o[s]=new t(n[s]);e.f[r]=o}}function _e(e){if(e.f)for(var t in e.f){var r=e.f[t];if(Array.isArray(r))for(var n=0;n<r.length;n++)r[n]&&r[n].g();else r&&r.g()}}function Re(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!ke(e[r],t[r]))return!1;return!0}function ke(e,t){if(e==t)return!0;if(!f(e)||!f(t))return!!(\"number\"==typeof e&&isNaN(e)||\"number\"==typeof t&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(ge&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var n=void 0,o=void 0,s=Math.max(e.length,t.length);for(r=0;r<s;r++){var i=e[r],a=t[r];if(i&&i.constructor==Object&&(b(void 0===n),b(r===e.length-1),n=i,i=void 0),a&&a.constructor==Object&&(b(void 0===o),b(r===t.length-1),o=a,a=void 0),!ke(i,a))return!1}return!n&&!o||Re(n=n||{},o=o||{})}if(e.constructor===Object)return Re(e,t);throw Error(\"Invalid type in JSPB array\")}function Oe(e){return new e.constructor(Fe(e.g()))}function Fe(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];null!=n&&(t[r]=\"object\"==typeof n?Fe(b(n)):n)}return t}if(ge&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)null!=(n=e[r])&&(t[r]=\"object\"==typeof n?Fe(b(n)):n);return t}he.toObjectList=be,he.toObjectExtension=function(e,t,r,n,o){for(var s in r){var i=r[s],a=n.call(e,i);if(null!=a){for(var c in i.Ba)if(i.Ba.hasOwnProperty(c))break;t[c]=i.Na?i.na?be(a,i.Na,o):i.Na(o,a):a}}},he.serializeBinaryExtensions=function(e,t,r,n){for(var o in r){var s=r[o],i=s.Za;if(!s.Aa)throw Error(\"Message extension present that was generated without binary serialization support\");var a=n.call(e,i);if(null!=a)if(i.F()){if(!s.Wa)throw Error(\"Message extension present holding submessage without binary support enabled, and message is being serialized to binary format\");s.Aa.call(t,i.ma,a,s.Wa)}else s.Aa.call(t,i.ma,a)}},he.readBinaryExtension=function(e,t,r,n,o){var s=r[t.c];if(s){if(r=s.Za,!s.za)throw Error(\"Deserializing extension whose generated code does not support binary format\");if(r.F()){var i=new r.la;s.za.call(t,i,s.Ab)}else i=s.za.call(t);r.na&&!s.Nb?(t=n.call(e,r))?t.push(i):o.call(e,r,[i]):o.call(e,r,i)}else t.C()},he.getField=we,he.getRepeatedField=function(e,t){return we(e,t)},he.getOptionalFloatingPointField=ve,he.getBooleanField=Te,he.getRepeatedFloatingPointField=function(e,t){var r=we(e,t);if(e.a||(e.a={}),!e.a[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.a[t]=!0}return r},he.getRepeatedBooleanField=function(e,t){var r=we(e,t);if(e.a||(e.a={}),!e.a[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.a[t]=!0}return r},he.bytesAsB64=Ae,he.bytesAsU8=Ee,he.bytesListAsB64=function(e){return Pe(e),e.length&&\"string\"!=typeof e[0]?g(e,Ae):e},he.bytesListAsU8=function(e){return Pe(e),!e.length||e[0]instanceof Uint8Array?e:g(e,Ee)},he.getFieldWithDefault=Be,he.getBooleanFieldWithDefault=function(e,t,r){return(e=Te(e,t))??r},he.getFloatingPointFieldWithDefault=function(e,t,r){return(e=ve(e,t))??r},he.getFieldProto3=Be,he.getMapField=function(e,t,r,n){if(e.f||(e.f={}),t in e.f)return e.f[t];var o=we(e,t);if(!o){if(r)return;Ce(e,t,o=[])}return e.f[t]=new A(o,n)},he.setField=Ce,he.setProto3IntField=function(e,t,r){return Ie(e,t,r,0)},he.setProto3FloatField=function(e,t,r){return Ie(e,t,r,0)},he.setProto3BooleanField=function(e,t,r){return Ie(e,t,r,!1)},he.setProto3StringField=function(e,t,r){return Ie(e,t,r,\"\")},he.setProto3BytesField=function(e,t,r){return Ie(e,t,r,\"\")},he.setProto3EnumField=function(e,t,r){return Ie(e,t,r,0)},he.setProto3StringIntField=function(e,t,r){return Ie(e,t,r,\"0\")},he.addToRepeatedField=function(e,t,r,n){return v(e,he),t=we(e,t),null!=n?t.splice(n,0,r):t.push(r),e},he.setOneofField=Se,he.computeOneofCase=We,he.getWrapperField=function(e,t,r,n){if(e.f||(e.f={}),!e.f[r]){var o=we(e,r);(n||o)&&(e.f[r]=new t(o))}return e.f[r]},he.getRepeatedWrapperField=function(e,t,r){return xe(e,t,r),(t=e.f[r])==ye&&(t=e.f[r]=[]),t},he.setWrapperField=function(e,t,r){v(e,he),e.f||(e.f={});var n=r?r.g():r;return e.f[t]=r,Ce(e,t,n)},he.setOneofWrapperField=function(e,t,r,n){v(e,he),e.f||(e.f={});var o=n?n.g():n;return e.f[t]=n,Se(e,t,r,o)},he.setRepeatedWrapperField=function(e,t,r){v(e,he),e.f||(e.f={}),r=r||[];for(var n=[],o=0;o<r.length;o++)n[o]=r[o].g();return e.f[t]=r,Ce(e,t,n)},he.addToRepeatedWrapperField=function(e,t,r,n,o){xe(e,n,t);var s=e.f[t];return s||(s=e.f[t]=[]),r=r||new n,e=we(e,t),null!=o?(s.splice(o,0,r),e.splice(o,0,r.g())):(s.push(r),e.push(r.g())),r},he.toMap=function(e,t,r,n){for(var o={},s=0;s<e.length;s++)o[t.call(e[s])]=r?r.call(e[s],n,e[s]):e[s];return o},he.prototype.g=function(){return _e(this),this.u},he.prototype.toArray=he.prototype.g,he.prototype.toString=function(){return _e(this),this.u.toString()},he.prototype.getExtension=function(e){if(this.i){this.f||(this.f={});var t=e.ma;if(e.na){if(e.F())return this.f[t]||(this.f[t]=g(this.i[t]||[],function(t){return new e.la(t)})),this.f[t]}else if(e.F())return!this.f[t]&&this.i[t]&&(this.f[t]=new e.la(this.i[t])),this.f[t];return this.i[t]}},he.prototype.getExtension=he.prototype.getExtension,he.prototype.Kc=function(e,t){this.f||(this.f={}),me(this);var r=e.ma;return e.na?(t=t||[],e.F()?(this.f[r]=t,this.i[r]=g(t,function(e){return e.g()})):this.i[r]=t):e.F()?(this.f[r]=t,this.i[r]=t?t.g():t):this.i[r]=t,this},he.prototype.setExtension=he.prototype.Kc,he.difference=function(e,t){if(!(e instanceof t.constructor))throw Error(\"Messages have different types.\");var r=e.g();t=t.g();var n=[],o=0,s=r.length>t.length?r.length:t.length;for(e.b&&(n[0]=e.b,o=1);o<s;o++)ke(r[o],t[o])||(n[o]=t[o]);return new e.constructor(n)},he.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&ke(e.g(),t.g())},he.compareExtensions=Re,he.compareFields=ke,he.prototype.Bb=function(){return Oe(this)},he.prototype.cloneMessage=he.prototype.Bb,he.prototype.clone=function(){return Oe(this)},he.prototype.clone=he.prototype.clone,he.clone=function(e){return Oe(e)},he.copyInto=function(e,t){v(e,he),v(t,he),b(e.constructor==t.constructor,\"Copy source and target message should have the same type.\"),e=Oe(e);for(var r=t.g(),n=e.g(),o=r.length=0;o<n.length;o++)r[o]=n[o];t.f=e.f,t.i=e.i},he.registerMessageType=function(e,t){t.we=e};var Me={dump:function(e){return v(e,he,\"jspb.Message instance expected\"),b(e.getExtension,\"Only unobfuscated and unoptimized compilation modes supported.\"),Me.X(e)}};function Ne(){this.a=[]}function Ue(e,t){this.lo=e,this.hi=t}function De(e,t){var r=65535&e,n=65535&t,o=t>>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new Ue(t>>>0,r>>>0)}function Le(e){for(var t=new Ue(0,0),r=new Ue(0,0),n=0;n<e.length;n++){if(\"0\">e[n]||\"9\"<e[n])return null;r.lo=parseInt(e[n],10),t=t.eb(10).add(r)}return t}function $e(e,t){this.lo=e,this.hi=t}function ze(e){var t=0<e.length&&\"-\"==e[0];return t&&(e=e.substring(1)),null===(e=Le(e))?null:(t&&(e=new Ue(0,0).sub(e)),new $e(e.lo,e.hi))}function je(){this.c=[],this.b=0,this.a=new Ne,this.h=[]}function Ve(e,t){var r=e.a.end();e.c.push(r),e.c.push(t),e.b+=r.length+t.length}function He(e,t){return Ke(e,t,2),t=e.a.end(),e.c.push(t),e.b+=t.length,t.push(e.b),t}function Ge(e,t){var r=t.pop();for(b(0<=(r=e.b+e.a.length()-r));127<r;)t.push(127&r|128),r>>>=7,e.b++;t.push(r),e.b++}function Ke(e,t,r){b(1<=t&&t==Math.floor(t)),e.a.j(8*t+r)}function qe(e,t,r){null!=r&&(Ke(e,t,0),e.a.j(r))}function Ze(e,t,r){null!=r&&(Ke(e,t,0),e.a.M(r))}l(\"jspb.debug.dump\",Me.dump,void 0),Me.X=function(e){var t=d(e);if(\"number\"==t||\"string\"==t||\"boolean\"==t||\"null\"==t||\"undefined\"==t||\"undefined\"!=typeof Uint8Array&&e instanceof Uint8Array)return e;if(\"array\"==t)return function(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];Array.isArray(e)||m(\"Expected array but got %s: %s.\",[d(e),e],t,n)}(e),g(e,Me.X);if(e instanceof A){for(var r={},n=(e=e.entries()).next();!n.done;n=e.next())r[n.value[0]]=Me.X(n.value[1]);return r}v(e,he,\"Only messages expected: \"+e);var o={$name:(t=e.constructor).name||t.displayName};for(a in t.prototype){var s=/^get([A-Z]\\w*)/.exec(a);if(s&&\"getExtension\"!=a&&\"getJsPbMessageId\"!=a){var i=\"has\"+s[1];e[i]&&!e[i]()||(i=e[a](),o[Me.$a(s[1])]=Me.X(i))}}if(e.extensionObject_)return o.$extensions=\"Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly\",o;for(n in t.extensions)if(/^\\d+$/.test(n)){i=t.extensions[n];var a=e.getExtension(i);s=void 0,i=i.Ba;var c=[],u=0;for(s in i)c[u++]=s;s=c[0],null!=a&&(r||(r=o.$extensions={}),r[Me.$a(s)]=Me.X(a))}return o},Me.$a=function(e){return e.replace(/^[A-Z]/,function(e){return e.toLowerCase()})},l(\"jspb.BinaryEncoder\",Ne,void 0),Ne.prototype.length=function(){return this.a.length},Ne.prototype.length=Ne.prototype.length,Ne.prototype.end=function(){var e=this.a;return this.a=[],e},Ne.prototype.end=Ne.prototype.end,Ne.prototype.l=function(e,t){for(b(e==Math.floor(e)),b(t==Math.floor(t)),b(0<=e&&4294967296>e),b(0<=t&&4294967296>t);0<t||127<e;)this.a.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.a.push(e)},Ne.prototype.writeSplitVarint64=Ne.prototype.l,Ne.prototype.A=function(e,t){b(e==Math.floor(e)),b(t==Math.floor(t)),b(0<=e&&4294967296>e),b(0<=t&&4294967296>t),this.s(e),this.s(t)},Ne.prototype.writeSplitFixed64=Ne.prototype.A,Ne.prototype.j=function(e){for(b(e==Math.floor(e)),b(0<=e&&4294967296>e);127<e;)this.a.push(127&e|128),e>>>=7;this.a.push(e)},Ne.prototype.writeUnsignedVarint32=Ne.prototype.j,Ne.prototype.M=function(e){if(b(e==Math.floor(e)),b(-2147483648<=e&&2147483648>e),0<=e)this.j(e);else{for(var t=0;9>t;t++)this.a.push(127&e|128),e>>=7;this.a.push(1)}},Ne.prototype.writeSignedVarint32=Ne.prototype.M,Ne.prototype.va=function(e){b(e==Math.floor(e)),b(0<=e&&0x10000000000000000>e),U(e),this.l(F,M)},Ne.prototype.writeUnsignedVarint64=Ne.prototype.va,Ne.prototype.ua=function(e){b(e==Math.floor(e)),b(-0x8000000000000000<=e&&0x8000000000000000>e),U(e),this.l(F,M)},Ne.prototype.writeSignedVarint64=Ne.prototype.ua,Ne.prototype.wa=function(e){b(e==Math.floor(e)),b(-2147483648<=e&&2147483648>e),this.j((e<<1^e>>31)>>>0)},Ne.prototype.writeZigzagVarint32=Ne.prototype.wa,Ne.prototype.xa=function(e){b(e==Math.floor(e)),b(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.l(F,M)},Ne.prototype.writeZigzagVarint64=Ne.prototype.xa,Ne.prototype.Ta=function(e){this.W(ee(e))},Ne.prototype.writeZigzagVarint64String=Ne.prototype.Ta,Ne.prototype.W=function(e){var t=this;z(e),H(F,M,function(e,r){t.l(e>>>0,r>>>0)})},Ne.prototype.writeZigzagVarintHash64=Ne.prototype.W,Ne.prototype.be=function(e){b(e==Math.floor(e)),b(0<=e&&256>e),this.a.push(e>>>0&255)},Ne.prototype.writeUint8=Ne.prototype.be,Ne.prototype.ae=function(e){b(e==Math.floor(e)),b(0<=e&&65536>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ne.prototype.writeUint16=Ne.prototype.ae,Ne.prototype.s=function(e){b(e==Math.floor(e)),b(0<=e&&4294967296>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},Ne.prototype.writeUint32=Ne.prototype.s,Ne.prototype.V=function(e){b(e==Math.floor(e)),b(0<=e&&0x10000000000000000>e),N(e),this.s(F),this.s(M)},Ne.prototype.writeUint64=Ne.prototype.V,Ne.prototype.Qc=function(e){b(e==Math.floor(e)),b(-128<=e&&128>e),this.a.push(e>>>0&255)},Ne.prototype.writeInt8=Ne.prototype.Qc,Ne.prototype.Pc=function(e){b(e==Math.floor(e)),b(-32768<=e&&32768>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ne.prototype.writeInt16=Ne.prototype.Pc,Ne.prototype.S=function(e){b(e==Math.floor(e)),b(-2147483648<=e&&2147483648>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},Ne.prototype.writeInt32=Ne.prototype.S,Ne.prototype.T=function(e){b(e==Math.floor(e)),b(-0x8000000000000000<=e&&0x8000000000000000>e),U(e),this.A(F,M)},Ne.prototype.writeInt64=Ne.prototype.T,Ne.prototype.ka=function(e){b(e==Math.floor(e)),b(-0x8000000000000000<=+e&&0x8000000000000000>+e),z(ee(e)),this.A(F,M)},Ne.prototype.writeInt64String=Ne.prototype.ka,Ne.prototype.L=function(e){b(1/0===e||-1/0===e||isNaN(e)||-34028234663852886e22<=e&&34028234663852886e22>=e),L(e),this.s(F)},Ne.prototype.writeFloat=Ne.prototype.L,Ne.prototype.J=function(e){b(1/0===e||-1/0===e||isNaN(e)||-17976931348623157e292<=e&&17976931348623157e292>=e),$(e),this.s(F),this.s(M)},Ne.prototype.writeDouble=Ne.prototype.J,Ne.prototype.I=function(e){b(\"boolean\"==typeof e||\"number\"==typeof e),this.a.push(e?1:0)},Ne.prototype.writeBool=Ne.prototype.I,Ne.prototype.R=function(e){b(e==Math.floor(e)),b(-2147483648<=e&&2147483648>e),this.M(e)},Ne.prototype.writeEnum=Ne.prototype.R,Ne.prototype.ja=function(e){this.a.push.apply(this.a,e)},Ne.prototype.writeBytes=Ne.prototype.ja,Ne.prototype.N=function(e){z(e),this.l(F,M)},Ne.prototype.writeVarintHash64=Ne.prototype.N,Ne.prototype.K=function(e){z(e),this.s(F),this.s(M)},Ne.prototype.writeFixedHash64=Ne.prototype.K,Ne.prototype.U=function(e){var t=this.a.length;!function(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];\"string\"!=typeof e&&m(\"Expected string but got %s: %s.\",[d(e),e],t,n)}(e);for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.a.push(n);else if(2048>n)this.a.push(n>>6|192),this.a.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var o=e.charCodeAt(r+1);56320<=o&&57343>=o&&(n=1024*(n-55296)+o-56320+65536,this.a.push(n>>18|240),this.a.push(n>>12&63|128),this.a.push(n>>6&63|128),this.a.push(63&n|128),r++)}else this.a.push(n>>12|224),this.a.push(n>>6&63|128),this.a.push(63&n|128)}return this.a.length-t},Ne.prototype.writeString=Ne.prototype.U,l(\"jspb.arith.UInt64\",Ue,void 0),Ue.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},Ue.prototype.cmp=Ue.prototype.cmp,Ue.prototype.La=function(){return new Ue((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},Ue.prototype.rightShift=Ue.prototype.La,Ue.prototype.Da=function(){return new Ue(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},Ue.prototype.leftShift=Ue.prototype.Da,Ue.prototype.cb=function(){return!!(2147483648&this.hi)},Ue.prototype.msb=Ue.prototype.cb,Ue.prototype.Ob=function(){return!!(1&this.lo)},Ue.prototype.lsb=Ue.prototype.Ob,Ue.prototype.Ua=function(){return 0==this.lo&&0==this.hi},Ue.prototype.zero=Ue.prototype.Ua,Ue.prototype.add=function(e){return new Ue((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},Ue.prototype.add=Ue.prototype.add,Ue.prototype.sub=function(e){return new Ue((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},Ue.prototype.sub=Ue.prototype.sub,Ue.mul32x32=De,Ue.prototype.eb=function(e){var t=De(this.lo,e);return(e=De(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},Ue.prototype.mul=Ue.prototype.eb,Ue.prototype.Xa=function(e){if(0==e)return[];var t=new Ue(0,0),r=new Ue(this.lo,this.hi);e=new Ue(e,0);for(var n=new Ue(1,0);!e.cb();)e=e.Da(),n=n.Da();for(;!n.Ua();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.La(),n=n.La();return[t,r]},Ue.prototype.div=Ue.prototype.Xa,Ue.prototype.toString=function(){for(var e=\"\",t=this;!t.Ua();){var r=(t=t.Xa(10))[0];e=t[1].lo+e,t=r}return\"\"==e&&(e=\"0\"),e},Ue.prototype.toString=Ue.prototype.toString,Ue.fromString=Le,Ue.prototype.clone=function(){return new Ue(this.lo,this.hi)},Ue.prototype.clone=Ue.prototype.clone,l(\"jspb.arith.Int64\",$e,void 0),$e.prototype.add=function(e){return new $e((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},$e.prototype.add=$e.prototype.add,$e.prototype.sub=function(e){return new $e((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},$e.prototype.sub=$e.prototype.sub,$e.prototype.clone=function(){return new $e(this.lo,this.hi)},$e.prototype.clone=$e.prototype.clone,$e.prototype.toString=function(){var e=!!(2147483648&this.hi),t=new Ue(this.lo,this.hi);return e&&(t=new Ue(0,0).sub(t)),(e?\"-\":\"\")+t.toString()},$e.prototype.toString=$e.prototype.toString,$e.fromString=ze,l(\"jspb.BinaryWriter\",je,void 0),je.prototype.pb=function(e,t,r){Ve(this,e.subarray(t,r))},je.prototype.writeSerializedMessage=je.prototype.pb,je.prototype.Pb=function(e,t,r){null!=e&&null!=t&&null!=r&&this.pb(e,t,r)},je.prototype.maybeWriteSerializedMessage=je.prototype.Pb,je.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]},je.prototype.reset=je.prototype.reset,je.prototype.ab=function(){b(0==this.h.length);for(var e=new Uint8Array(this.b+this.a.length()),t=this.c,r=t.length,n=0,o=0;o<r;o++){var s=t[o];e.set(s,n),n+=s.length}return t=this.a.end(),e.set(t,n),b((n+=t.length)==e.length),this.c=[e],e},je.prototype.getResultBuffer=je.prototype.ab,je.prototype.Kb=function(e){return R(this.ab(),e)},je.prototype.getResultBase64String=je.prototype.Kb,je.prototype.Va=function(e){this.h.push(He(this,e))},je.prototype.beginSubMessage=je.prototype.Va,je.prototype.Ya=function(){b(0<=this.h.length),Ge(this,this.h.pop())},je.prototype.endSubMessage=je.prototype.Ya,je.prototype.Nc=function(e,t,r){switch(e){case 1:this.J(t,r);break;case 2:this.L(t,r);break;case 3:this.T(t,r);break;case 4:this.V(t,r);break;case 5:this.S(t,r);break;case 6:this.Qa(t,r);break;case 7:this.Pa(t,r);break;case 8:this.I(t,r);break;case 9:this.U(t,r);break;case 10:w(\"Group field type not supported in writeAny()\");break;case 11:w(\"Message field type not supported in writeAny()\");break;case 12:this.ja(t,r);break;case 13:this.s(t,r);break;case 14:this.R(t,r);break;case 15:this.Ra(t,r);break;case 16:this.Sa(t,r);break;case 17:this.rb(t,r);break;case 18:this.sb(t,r);break;case 30:this.K(t,r);break;case 31:this.N(t,r);break;default:w(\"Invalid field type in writeAny()\")}},je.prototype.writeAny=je.prototype.Nc,je.prototype.S=function(e,t){null!=t&&(b(-2147483648<=t&&2147483648>t),Ze(this,e,t))},je.prototype.writeInt32=je.prototype.S,je.prototype.ob=function(e,t){null!=t&&(b(-2147483648<=(t=parseInt(t,10))&&2147483648>t),Ze(this,e,t))},je.prototype.writeInt32String=je.prototype.ob,je.prototype.T=function(e,t){null!=t&&(b(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(Ke(this,e,0),this.a.ua(t)))},je.prototype.writeInt64=je.prototype.T,je.prototype.ka=function(e,t){null!=t&&(t=ze(t),Ke(this,e,0),this.a.l(t.lo,t.hi))},je.prototype.writeInt64String=je.prototype.ka,je.prototype.s=function(e,t){null!=t&&(b(0<=t&&4294967296>t),qe(this,e,t))},je.prototype.writeUint32=je.prototype.s,je.prototype.ub=function(e,t){null!=t&&(b(0<=(t=parseInt(t,10))&&4294967296>t),qe(this,e,t))},je.prototype.writeUint32String=je.prototype.ub,je.prototype.V=function(e,t){null!=t&&(b(0<=t&&0x10000000000000000>t),null!=t&&(Ke(this,e,0),this.a.va(t)))},je.prototype.writeUint64=je.prototype.V,je.prototype.vb=function(e,t){null!=t&&(t=Le(t),Ke(this,e,0),this.a.l(t.lo,t.hi))},je.prototype.writeUint64String=je.prototype.vb,je.prototype.rb=function(e,t){null!=t&&(b(-2147483648<=t&&2147483648>t),null!=t&&(Ke(this,e,0),this.a.wa(t)))},je.prototype.writeSint32=je.prototype.rb,je.prototype.sb=function(e,t){null!=t&&(b(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(Ke(this,e,0),this.a.xa(t)))},je.prototype.writeSint64=je.prototype.sb,je.prototype.$d=function(e,t){null!=t&&null!=t&&(Ke(this,e,0),this.a.W(t))},je.prototype.writeSintHash64=je.prototype.$d,je.prototype.Zd=function(e,t){null!=t&&null!=t&&(Ke(this,e,0),this.a.Ta(t))},je.prototype.writeSint64String=je.prototype.Zd,je.prototype.Pa=function(e,t){null!=t&&(b(0<=t&&4294967296>t),Ke(this,e,5),this.a.s(t))},je.prototype.writeFixed32=je.prototype.Pa,je.prototype.Qa=function(e,t){null!=t&&(b(0<=t&&0x10000000000000000>t),Ke(this,e,1),this.a.V(t))},je.prototype.writeFixed64=je.prototype.Qa,je.prototype.nb=function(e,t){null!=t&&(t=Le(t),Ke(this,e,1),this.a.A(t.lo,t.hi))},je.prototype.writeFixed64String=je.prototype.nb,je.prototype.Ra=function(e,t){null!=t&&(b(-2147483648<=t&&2147483648>t),Ke(this,e,5),this.a.S(t))},je.prototype.writeSfixed32=je.prototype.Ra,je.prototype.Sa=function(e,t){null!=t&&(b(-0x8000000000000000<=t&&0x8000000000000000>t),Ke(this,e,1),this.a.T(t))},je.prototype.writeSfixed64=je.prototype.Sa,je.prototype.qb=function(e,t){null!=t&&(t=ze(t),Ke(this,e,1),this.a.A(t.lo,t.hi))},je.prototype.writeSfixed64String=je.prototype.qb,je.prototype.L=function(e,t){null!=t&&(Ke(this,e,5),this.a.L(t))},je.prototype.writeFloat=je.prototype.L,je.prototype.J=function(e,t){null!=t&&(Ke(this,e,1),this.a.J(t))},je.prototype.writeDouble=je.prototype.J,je.prototype.I=function(e,t){null!=t&&(b(\"boolean\"==typeof t||\"number\"==typeof t),Ke(this,e,0),this.a.I(t))},je.prototype.writeBool=je.prototype.I,je.prototype.R=function(e,t){null!=t&&(b(-2147483648<=t&&2147483648>t),Ke(this,e,0),this.a.M(t))},je.prototype.writeEnum=je.prototype.R,je.prototype.U=function(e,t){null!=t&&(e=He(this,e),this.a.U(t),Ge(this,e))},je.prototype.writeString=je.prototype.U,je.prototype.ja=function(e,t){null!=t&&(t=oe(t),Ke(this,e,2),this.a.j(t.length),Ve(this,t))},je.prototype.writeBytes=je.prototype.ja,je.prototype.Rc=function(e,t,r){null!=t&&(e=He(this,e),r(t,this),Ge(this,e))},je.prototype.writeMessage=je.prototype.Rc,je.prototype.Sc=function(e,t,r){null!=t&&(Ke(this,1,3),Ke(this,2,0),this.a.M(e),e=He(this,3),r(t,this),Ge(this,e),Ke(this,1,4))},je.prototype.writeMessageSet=je.prototype.Sc,je.prototype.Oc=function(e,t,r){null!=t&&(Ke(this,e,3),r(t,this),Ke(this,e,4))},je.prototype.writeGroup=je.prototype.Oc,je.prototype.K=function(e,t){null!=t&&(b(8==t.length),Ke(this,e,1),this.a.K(t))},je.prototype.writeFixedHash64=je.prototype.K,je.prototype.N=function(e,t){null!=t&&(b(8==t.length),Ke(this,e,0),this.a.N(t))},je.prototype.writeVarintHash64=je.prototype.N,je.prototype.A=function(e,t,r){Ke(this,e,1),this.a.A(t,r)},je.prototype.writeSplitFixed64=je.prototype.A,je.prototype.l=function(e,t,r){Ke(this,e,0),this.a.l(t,r)},je.prototype.writeSplitVarint64=je.prototype.l,je.prototype.tb=function(e,t,r){Ke(this,e,0);var n=this.a;H(t,r,function(e,t){n.l(e>>>0,t>>>0)})},je.prototype.writeSplitZigzagVarint64=je.prototype.tb,je.prototype.Ed=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)Ze(this,e,t[r])},je.prototype.writeRepeatedInt32=je.prototype.Ed,je.prototype.Fd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ob(e,t[r])},je.prototype.writeRepeatedInt32String=je.prototype.Fd,je.prototype.Gd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ke(this,e,0),this.a.ua(n))}},je.prototype.writeRepeatedInt64=je.prototype.Gd,je.prototype.Qd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.A(e,r(t[o]),n(t[o]))},je.prototype.writeRepeatedSplitFixed64=je.prototype.Qd,je.prototype.Rd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.l(e,r(t[o]),n(t[o]))},je.prototype.writeRepeatedSplitVarint64=je.prototype.Rd,je.prototype.Sd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.tb(e,r(t[o]),n(t[o]))},je.prototype.writeRepeatedSplitZigzagVarint64=je.prototype.Sd,je.prototype.Hd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ka(e,t[r])},je.prototype.writeRepeatedInt64String=je.prototype.Hd,je.prototype.Ud=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)qe(this,e,t[r])},je.prototype.writeRepeatedUint32=je.prototype.Ud,je.prototype.Vd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ub(e,t[r])},je.prototype.writeRepeatedUint32String=je.prototype.Vd,je.prototype.Wd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ke(this,e,0),this.a.va(n))}},je.prototype.writeRepeatedUint64=je.prototype.Wd,je.prototype.Xd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.vb(e,t[r])},je.prototype.writeRepeatedUint64String=je.prototype.Xd,je.prototype.Md=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ke(this,e,0),this.a.wa(n))}},je.prototype.writeRepeatedSint32=je.prototype.Md,je.prototype.Nd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ke(this,e,0),this.a.xa(n))}},je.prototype.writeRepeatedSint64=je.prototype.Nd,je.prototype.Od=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ke(this,e,0),this.a.Ta(n))}},je.prototype.writeRepeatedSint64String=je.prototype.Od,je.prototype.Pd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ke(this,e,0),this.a.W(n))}},je.prototype.writeRepeatedSintHash64=je.prototype.Pd,je.prototype.yd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Pa(e,t[r])},je.prototype.writeRepeatedFixed32=je.prototype.yd,je.prototype.zd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Qa(e,t[r])},je.prototype.writeRepeatedFixed64=je.prototype.zd,je.prototype.Ad=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.nb(e,t[r])},je.prototype.writeRepeatedFixed64String=je.prototype.Ad,je.prototype.Jd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Ra(e,t[r])},je.prototype.writeRepeatedSfixed32=je.prototype.Jd,je.prototype.Kd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Sa(e,t[r])},je.prototype.writeRepeatedSfixed64=je.prototype.Kd,je.prototype.Ld=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.qb(e,t[r])},je.prototype.writeRepeatedSfixed64String=je.prototype.Ld,je.prototype.Cd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.L(e,t[r])},je.prototype.writeRepeatedFloat=je.prototype.Cd,je.prototype.wd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.J(e,t[r])},je.prototype.writeRepeatedDouble=je.prototype.wd,je.prototype.ud=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.I(e,t[r])},je.prototype.writeRepeatedBool=je.prototype.ud,je.prototype.xd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.R(e,t[r])},je.prototype.writeRepeatedEnum=je.prototype.xd,je.prototype.Td=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.U(e,t[r])},je.prototype.writeRepeatedString=je.prototype.Td,je.prototype.vd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ja(e,t[r])},je.prototype.writeRepeatedBytes=je.prototype.vd,je.prototype.Id=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++){var o=He(this,e);r(t[n],this),Ge(this,o)}},je.prototype.writeRepeatedMessage=je.prototype.Id,je.prototype.Dd=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++)Ke(this,e,3),r(t[n],this),Ke(this,e,4)},je.prototype.writeRepeatedGroup=je.prototype.Dd,je.prototype.Bd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.K(e,t[r])},je.prototype.writeRepeatedFixedHash64=je.prototype.Bd,je.prototype.Yd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.N(e,t[r])},je.prototype.writeRepeatedVarintHash64=je.prototype.Yd,je.prototype.ad=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.M(t[r]);Ge(this,e)}},je.prototype.writePackedInt32=je.prototype.ad,je.prototype.bd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.M(parseInt(t[r],10));Ge(this,e)}},je.prototype.writePackedInt32String=je.prototype.bd,je.prototype.cd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.ua(t[r]);Ge(this,e)}},je.prototype.writePackedInt64=je.prototype.cd,je.prototype.md=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=0;o<t.length;o++)this.a.A(r(t[o]),n(t[o]));Ge(this,e)}},je.prototype.writePackedSplitFixed64=je.prototype.md,je.prototype.nd=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=0;o<t.length;o++)this.a.l(r(t[o]),n(t[o]));Ge(this,e)}},je.prototype.writePackedSplitVarint64=je.prototype.nd,je.prototype.od=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=this.a,s=0;s<t.length;s++)H(r(t[s]),n(t[s]),function(e,t){o.l(e>>>0,t>>>0)});Ge(this,e)}},je.prototype.writePackedSplitZigzagVarint64=je.prototype.od,je.prototype.dd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++){var n=ze(t[r]);this.a.l(n.lo,n.hi)}Ge(this,e)}},je.prototype.writePackedInt64String=je.prototype.dd,je.prototype.pd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.j(t[r]);Ge(this,e)}},je.prototype.writePackedUint32=je.prototype.pd,je.prototype.qd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.j(parseInt(t[r],10));Ge(this,e)}},je.prototype.writePackedUint32String=je.prototype.qd,je.prototype.rd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.va(t[r]);Ge(this,e)}},je.prototype.writePackedUint64=je.prototype.rd,je.prototype.sd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++){var n=Le(t[r]);this.a.l(n.lo,n.hi)}Ge(this,e)}},je.prototype.writePackedUint64String=je.prototype.sd,je.prototype.hd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.wa(t[r]);Ge(this,e)}},je.prototype.writePackedSint32=je.prototype.hd,je.prototype.jd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.xa(t[r]);Ge(this,e)}},je.prototype.writePackedSint64=je.prototype.jd,je.prototype.kd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.W(ee(t[r]));Ge(this,e)}},je.prototype.writePackedSint64String=je.prototype.kd,je.prototype.ld=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.W(t[r]);Ge(this,e)}},je.prototype.writePackedSintHash64=je.prototype.ld,je.prototype.Wc=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.s(t[e])},je.prototype.writePackedFixed32=je.prototype.Wc,je.prototype.Xc=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.V(t[e])},je.prototype.writePackedFixed64=je.prototype.Xc,je.prototype.Yc=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++){var r=Le(t[e]);this.a.A(r.lo,r.hi)}},je.prototype.writePackedFixed64String=je.prototype.Yc,je.prototype.ed=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.S(t[e])},je.prototype.writePackedSfixed32=je.prototype.ed,je.prototype.fd=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.T(t[e])},je.prototype.writePackedSfixed64=je.prototype.fd,je.prototype.gd=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.ka(t[e])},je.prototype.writePackedSfixed64String=je.prototype.gd,je.prototype.$c=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.L(t[e])},je.prototype.writePackedFloat=je.prototype.$c,je.prototype.Uc=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.J(t[e])},je.prototype.writePackedDouble=je.prototype.Uc,je.prototype.Tc=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(t.length),e=0;e<t.length;e++)this.a.I(t[e])},je.prototype.writePackedBool=je.prototype.Tc,je.prototype.Vc=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.R(t[r]);Ge(this,e)}},je.prototype.writePackedEnum=je.prototype.Vc,je.prototype.Zc=function(e,t){if(null!=t&&t.length)for(Ke(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.K(t[e])},je.prototype.writePackedFixedHash64=je.prototype.Zc,je.prototype.td=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.N(t[r]);Ge(this,e)}},je.prototype.writePackedVarintHash64=je.prototype.td,t.debug=Me,t.Map=A,t.Message=he,t.BinaryReader=ce,t.BinaryWriter=je,t.ExtensionFieldInfo=fe,t.ExtensionFieldBinaryInfo=pe,t.exportSymbol=function(e,t,r){l(e,t,r)},t.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},t.object={extend:function(e,t){for(var r,n,o=1;o<arguments.length;o++){for(r in n=arguments[o])e[r]=n[r];for(var s=0;s<p.length;s++)r=p[s],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}}},t.typeOf=d},5358(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"proto.google.protobuf.Any\",null,s),proto.google.protobuf.Any=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.Any,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Any.displayName=\"proto.google.protobuf.Any\"),n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Any.prototype.toObject=function(e){return proto.google.protobuf.Any.toObject(e,this)},proto.google.protobuf.Any.toObject=function(e,t){var r={typeUrl:n.Message.getFieldWithDefault(t,1,\"\"),value:t.getValue_asB64()};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.Any.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.Any;return proto.google.protobuf.Any.deserializeBinaryFromReader(r,t)},proto.google.protobuf.Any.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.setTypeUrl(r);break;case 2:r=t.readBytes();e.setValue(r);break;default:t.skipField()}}return e},proto.google.protobuf.Any.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.Any.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.Any.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTypeUrl()).length>0&&t.writeString(1,r),(r=e.getValue_asU8()).length>0&&t.writeBytes(2,r)},proto.google.protobuf.Any.prototype.getTypeUrl=function(){return n.Message.getFieldWithDefault(this,1,\"\")},proto.google.protobuf.Any.prototype.setTypeUrl=function(e){return n.Message.setProto3StringField(this,1,e)},proto.google.protobuf.Any.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,2,\"\")},proto.google.protobuf.Any.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.Any.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.Any.prototype.setValue=function(e){return n.Message.setProto3BytesField(this,2,e)},o.object.extend(t,proto.google.protobuf),proto.google.protobuf.Any.prototype.getTypeName=function(){return this.getTypeUrl().split(\"/\").pop()},proto.google.protobuf.Any.prototype.pack=function(e,t,r){r||(r=\"type.googleapis.com/\"),\"/\"!=r.substr(-1)?this.setTypeUrl(r+\"/\"+t):this.setTypeUrl(r+t),this.setValue(e)},proto.google.protobuf.Any.prototype.unpack=function(e,t){return this.getTypeName()==t?e(this.getValue_asU8()):null}},9318(e,t){t.read=function(e,t,r,n,o){var s,i,a=8*o-n-1,c=(1<<a)-1,u=c>>1,l=-7,d=r?o-1:0,f=r?-1:1,p=e[t+d];for(d+=f,s=p&(1<<-l)-1,p>>=-l,l+=a;l>0;s=256*s+e[t+d],d+=f,l-=8);for(i=s&(1<<-l)-1,s>>=-l,l+=n;l>0;i=256*i+e[t+d],d+=f,l-=8);if(0===s)s=1-u;else{if(s===c)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,n),s-=u}return(p?-1:1)*i*Math.pow(2,s-n)},t.write=function(e,t,r,n,o,s){var i,a,c,u=8*s-o-1,l=(1<<u)-1,d=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,h=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),(t+=i+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(i++,c/=2),i+d>=l?(a=0,i=l):i+d>=1?(a=(t*c-1)*Math.pow(2,o),i+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=255&a,p+=h,a/=256,o-=8);for(i=i<<o|a,u+=o;u>0;e[r+p]=255&i,p+=h,i/=256,u-=8);e[r+p-h]|=128*g}},5250(e,t,r){var n;e=r.nmd(e),function(){var o,s=\"Expected a function\",i=\"__lodash_hash_undefined__\",a=\"__lodash_placeholder__\",c=16,u=32,l=64,d=128,f=256,p=1/0,h=9007199254740991,g=NaN,y=4294967295,m=[[\"ary\",d],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",c],[\"flip\",512],[\"partial\",u],[\"partialRight\",l],[\"rearg\",f]],b=\"[object Arguments]\",w=\"[object Array]\",v=\"[object Boolean]\",T=\"[object Date]\",A=\"[object Error]\",E=\"[object Function]\",P=\"[object GeneratorFunction]\",B=\"[object Map]\",C=\"[object Number]\",I=\"[object Object]\",S=\"[object Promise]\",W=\"[object RegExp]\",x=\"[object Set]\",_=\"[object String]\",R=\"[object Symbol]\",k=\"[object WeakMap]\",O=\"[object ArrayBuffer]\",F=\"[object DataView]\",M=\"[object Float32Array]\",N=\"[object Float64Array]\",U=\"[object Int8Array]\",D=\"[object Int16Array]\",L=\"[object Int32Array]\",$=\"[object Uint8Array]\",z=\"[object Uint8ClampedArray]\",j=\"[object Uint16Array]\",V=\"[object Uint32Array]\",H=/\\b__p \\+= '';/g,G=/\\b(__p \\+=) '' \\+/g,K=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>\"']/g,Y=RegExp(q.source),J=RegExp(Z.source),X=/<%-([\\s\\S]+?)%>/g,Q=/<%([\\s\\S]+?)%>/g,ee=/<%=([\\s\\S]+?)%>/g,te=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,re=/^\\w*$/,ne=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,oe=/[\\\\^$.*+?()[\\]{}|]/g,se=RegExp(oe.source),ie=/^\\s+/,ae=/\\s/,ce=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,ue=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,le=/,? & /,de=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,fe=/[()=,{}\\[\\]\\/\\s]/,pe=/\\\\(\\\\)?/g,he=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,ge=/\\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,be=/^\\[object .+?Constructor\\]$/,we=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\\d*)$/,Te=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ae=/($^)/,Ee=/['\\n\\r\\u2028\\u2029\\\\]/g,Pe=\"\\\\ud800-\\\\udfff\",Be=\"\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\",Ce=\"\\\\u2700-\\\\u27bf\",Ie=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",Se=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",We=\"\\\\ufe0e\\\\ufe0f\",xe=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",_e=\"['’]\",Re=\"[\"+Pe+\"]\",ke=\"[\"+xe+\"]\",Oe=\"[\"+Be+\"]\",Fe=\"\\\\d+\",Me=\"[\"+Ce+\"]\",Ne=\"[\"+Ie+\"]\",Ue=\"[^\"+Pe+xe+Fe+Ce+Ie+Se+\"]\",De=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",Le=\"[^\"+Pe+\"]\",$e=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",ze=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",je=\"[\"+Se+\"]\",Ve=\"\\\\u200d\",He=\"(?:\"+Ne+\"|\"+Ue+\")\",Ge=\"(?:\"+je+\"|\"+Ue+\")\",Ke=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",qe=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",Ze=\"(?:\"+Oe+\"|\"+De+\")\"+\"?\",Ye=\"[\"+We+\"]?\",Je=Ye+Ze+(\"(?:\"+Ve+\"(?:\"+[Le,$e,ze].join(\"|\")+\")\"+Ye+Ze+\")*\"),Xe=\"(?:\"+[Me,$e,ze].join(\"|\")+\")\"+Je,Qe=\"(?:\"+[Le+Oe+\"?\",Oe,$e,ze,Re].join(\"|\")+\")\",et=RegExp(_e,\"g\"),tt=RegExp(Oe,\"g\"),rt=RegExp(De+\"(?=\"+De+\")|\"+Qe+Je,\"g\"),nt=RegExp([je+\"?\"+Ne+\"+\"+Ke+\"(?=\"+[ke,je,\"$\"].join(\"|\")+\")\",Ge+\"+\"+qe+\"(?=\"+[ke,je+He,\"$\"].join(\"|\")+\")\",je+\"?\"+He+\"+\"+Ke,je+\"+\"+qe,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",Fe,Xe].join(\"|\"),\"g\"),ot=RegExp(\"[\"+Ve+Pe+Be+We+\"]\"),st=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],at=-1,ct={};ct[M]=ct[N]=ct[U]=ct[D]=ct[L]=ct[$]=ct[z]=ct[j]=ct[V]=!0,ct[b]=ct[w]=ct[O]=ct[v]=ct[F]=ct[T]=ct[A]=ct[E]=ct[B]=ct[C]=ct[I]=ct[W]=ct[x]=ct[_]=ct[k]=!1;var ut={};ut[b]=ut[w]=ut[O]=ut[F]=ut[v]=ut[T]=ut[M]=ut[N]=ut[U]=ut[D]=ut[L]=ut[B]=ut[C]=ut[I]=ut[W]=ut[x]=ut[_]=ut[R]=ut[$]=ut[z]=ut[j]=ut[V]=!0,ut[A]=ut[E]=ut[k]=!1;var lt={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},dt=parseFloat,ft=parseInt,pt=\"object\"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,ht=\"object\"==typeof self&&self&&self.Object===Object&&self,gt=pt||ht||Function(\"return this\")(),yt=t&&!t.nodeType&&t,mt=yt&&e&&!e.nodeType&&e,bt=mt&&mt.exports===yt,wt=bt&&pt.process,vt=function(){try{var e=mt&&mt.require&&mt.require(\"util\").types;return e||wt&&wt.binding&&wt.binding(\"util\")}catch(e){}}(),Tt=vt&&vt.isArrayBuffer,At=vt&&vt.isDate,Et=vt&&vt.isMap,Pt=vt&&vt.isRegExp,Bt=vt&&vt.isSet,Ct=vt&&vt.isTypedArray;function It(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var o=-1,s=null==e?0:e.length;++o<s;){var i=e[o];t(n,i,r(i),e)}return n}function Wt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function xt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function _t(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Rt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var i=e[r];t(i,r,e)&&(s[o++]=i)}return s}function kt(e,t){return!!(null==e?0:e.length)&&jt(e,t,0)>-1}function Ot(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function Ft(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Mt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Nt(e,t,r,n){var o=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}function Ut(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Dt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Lt=Kt(\"length\");function $t(e,t,r){var n;return r(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}function zt(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1}function jt(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):zt(e,Ht,r)}function Vt(e,t,r,n){for(var o=r-1,s=e.length;++o<s;)if(n(e[o],t))return o;return-1}function Ht(e){return e!=e}function Gt(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:g}function Kt(e){return function(t){return null==t?o:t[e]}}function qt(e){return function(t){return null==e?o:e[t]}}function Zt(e,t,r,n,o){return o(e,function(e,o,s){r=n?(n=!1,e):t(r,e,o,s)}),r}function Yt(e,t){for(var r,n=-1,s=e.length;++n<s;){var i=t(e[n]);i!==o&&(r=r===o?i:r+i)}return r}function Jt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Xt(e){return e?e.slice(0,gr(e)+1).replace(ie,\"\"):e}function Qt(e){return function(t){return e(t)}}function er(e,t){return Ft(t,function(t){return e[t]})}function tr(e,t){return e.has(t)}function rr(e,t){for(var r=-1,n=e.length;++r<n&&jt(t,e[r],0)>-1;);return r}function nr(e,t){for(var r=e.length;r--&&jt(t,e[r],0)>-1;);return r}var or=qt({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",Ĳ:\"IJ\",ĳ:\"ij\",Œ:\"Oe\",œ:\"oe\",ŉ:\"'n\",ſ:\"s\"}),sr=qt({\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\"});function ir(e){return\"\\\\\"+lt[e]}function ar(e){return ot.test(e)}function cr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function ur(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var i=e[r];i!==t&&i!==a||(e[r]=a,s[o++]=r)}return s}function dr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function fr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}function pr(e){return ar(e)?function(e){var t=rt.lastIndex=0;for(;rt.test(e);)++t;return t}(e):Lt(e)}function hr(e){return ar(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split(\"\")}(e)}function gr(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var yr=qt({\"&amp;\":\"&\",\"&lt;\":\"<\",\"&gt;\":\">\",\"&quot;\":'\"',\"&#39;\":\"'\"});var mr=function e(t){var r,n=(t=null==t?gt:mr.defaults(gt.Object(),t,mr.pick(gt,it))).Array,ae=t.Date,Pe=t.Error,Be=t.Function,Ce=t.Math,Ie=t.Object,Se=t.RegExp,We=t.String,xe=t.TypeError,_e=n.prototype,Re=Be.prototype,ke=Ie.prototype,Oe=t[\"__core-js_shared__\"],Fe=Re.toString,Me=ke.hasOwnProperty,Ne=0,Ue=(r=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+r:\"\",De=ke.toString,Le=Fe.call(Ie),$e=gt._,ze=Se(\"^\"+Fe.call(Me).replace(oe,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),je=bt?t.Buffer:o,Ve=t.Symbol,He=t.Uint8Array,Ge=je?je.allocUnsafe:o,Ke=ur(Ie.getPrototypeOf,Ie),qe=Ie.create,Ze=ke.propertyIsEnumerable,Ye=_e.splice,Je=Ve?Ve.isConcatSpreadable:o,Xe=Ve?Ve.iterator:o,Qe=Ve?Ve.toStringTag:o,rt=function(){try{var e=ps(Ie,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}(),ot=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,lt=ae&&ae.now!==gt.Date.now&&ae.now,pt=t.setTimeout!==gt.setTimeout&&t.setTimeout,ht=Ce.ceil,yt=Ce.floor,mt=Ie.getOwnPropertySymbols,wt=je?je.isBuffer:o,vt=t.isFinite,Lt=_e.join,qt=ur(Ie.keys,Ie),br=Ce.max,wr=Ce.min,vr=ae.now,Tr=t.parseInt,Ar=Ce.random,Er=_e.reverse,Pr=ps(t,\"DataView\"),Br=ps(t,\"Map\"),Cr=ps(t,\"Promise\"),Ir=ps(t,\"Set\"),Sr=ps(t,\"WeakMap\"),Wr=ps(Ie,\"create\"),xr=Sr&&new Sr,_r={},Rr=Ds(Pr),kr=Ds(Br),Or=Ds(Cr),Fr=Ds(Ir),Mr=Ds(Sr),Nr=Ve?Ve.prototype:o,Ur=Nr?Nr.valueOf:o,Dr=Nr?Nr.toString:o;function Lr(e){if(ra(e)&&!Hi(e)&&!(e instanceof Vr)){if(e instanceof jr)return e;if(Me.call(e,\"__wrapped__\"))return Ls(e)}return new jr(e)}var $r=function(){function e(){}return function(t){if(!ta(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function zr(){}function jr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Kr;++t<r;)this.add(e[t])}function Zr(e){var t=this.__data__=new Gr(e);this.size=t.size}function Yr(e,t){var r=Hi(e),n=!r&&Vi(e),o=!r&&!n&&Zi(e),s=!r&&!n&&!o&&la(e),i=r||n||o||s,a=i?Jt(e.length,We):[],c=a.length;for(var u in e)!t&&!Me.call(e,u)||i&&(\"length\"==u||o&&(\"offset\"==u||\"parent\"==u)||s&&(\"buffer\"==u||\"byteLength\"==u||\"byteOffset\"==u)||vs(u,c))||a.push(u);return a}function Jr(e){var t=e.length;return t?e[Zn(0,t-1)]:o}function Xr(e,t){return Ms(_o(e),cn(t,0,e.length))}function Qr(e){return Ms(_o(e))}function en(e,t,r){(r!==o&&!$i(e[t],r)||r===o&&!(t in e))&&sn(e,t,r)}function tn(e,t,r){var n=e[t];Me.call(e,t)&&$i(n,r)&&(r!==o||t in e)||sn(e,t,r)}function rn(e,t){for(var r=e.length;r--;)if($i(e[r][0],t))return r;return-1}function nn(e,t,r,n){return pn(e,function(e,o,s){t(n,e,r(e),s)}),n}function on(e,t){return e&&Ro(t,Ra(t),e)}function sn(e,t,r){\"__proto__\"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function an(e,t){for(var r=-1,s=t.length,i=n(s),a=null==e;++r<s;)i[r]=a?o:Ia(e,t[r]);return i}function cn(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function un(e,t,r,n,s,i){var a,c=1&t,u=2&t,l=4&t;if(r&&(a=s?r(e,n,s,i):r(e)),a!==o)return a;if(!ta(e))return e;var d=Hi(e);if(d){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&\"string\"==typeof e[0]&&Me.call(e,\"index\")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return _o(e,a)}else{var f=ys(e),p=f==E||f==P;if(Zi(e))return Bo(e,c);if(f==I||f==b||p&&!s){if(a=u||p?{}:bs(e),!c)return u?function(e,t){return Ro(e,gs(e),t)}(e,function(e,t){return e&&Ro(t,ka(t),e)}(a,e)):function(e,t){return Ro(e,hs(e),t)}(e,on(a,e))}else{if(!ut[f])return s?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case O:return Co(e);case v:case T:return new n(+e);case F:return function(e,t){var r=t?Co(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case N:case U:case D:case L:case $:case z:case j:case V:return Io(e,r);case B:return new n;case C:case _:return new n(e);case W:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case x:return new n;case R:return o=e,Ur?Ie(Ur.call(o)):{}}var o}(e,f,c)}}i||(i=new Zr);var h=i.get(e);if(h)return h;i.set(e,a),aa(e)?e.forEach(function(n){a.add(un(n,t,r,n,e,i))}):na(e)&&e.forEach(function(n,o){a.set(o,un(n,t,r,o,e,i))});var g=d?o:(l?u?is:ss:u?ka:Ra)(e);return Wt(g||e,function(n,o){g&&(n=e[o=n]),tn(a,o,un(n,t,r,o,e,i))}),a}function ln(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ie(e);n--;){var s=r[n],i=t[s],a=e[s];if(a===o&&!(s in e)||!i(a))return!1}return!0}function dn(e,t,r){if(\"function\"!=typeof e)throw new xe(s);return Rs(function(){e.apply(o,r)},t)}function fn(e,t,r,n){var o=-1,s=kt,i=!0,a=e.length,c=[],u=t.length;if(!a)return c;r&&(t=Ft(t,Qt(r))),n?(s=Ot,i=!1):t.length>=200&&(s=tr,i=!1,t=new qr(t));e:for(;++o<a;){var l=e[o],d=null==r?l:r(l);if(l=n||0!==l?l:0,i&&d==d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else s(t,d,n)||c.push(l)}return c}Lr.templateSettings={escape:X,evaluate:Q,interpolate:ee,variable:\"\",imports:{_:Lr}},Lr.prototype=zr.prototype,Lr.prototype.constructor=Lr,jr.prototype=$r(zr.prototype),jr.prototype.constructor=jr,Vr.prototype=$r(zr.prototype),Vr.prototype.constructor=Vr,Hr.prototype.clear=function(){this.__data__=Wr?Wr(null):{},this.size=0},Hr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hr.prototype.get=function(e){var t=this.__data__;if(Wr){var r=t[e];return r===i?o:r}return Me.call(t,e)?t[e]:o},Hr.prototype.has=function(e){var t=this.__data__;return Wr?t[e]!==o:Me.call(t,e)},Hr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wr&&t===o?i:t,this},Gr.prototype.clear=function(){this.__data__=[],this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=rn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ye.call(t,r,1),--this.size,!0)},Gr.prototype.get=function(e){var t=this.__data__,r=rn(t,e);return r<0?o:t[r][1]},Gr.prototype.has=function(e){return rn(this.__data__,e)>-1},Gr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Br||Gr),string:new Hr}},Kr.prototype.delete=function(e){var t=ds(this,e).delete(e);return this.size-=t?1:0,t},Kr.prototype.get=function(e){return ds(this,e).get(e)},Kr.prototype.has=function(e){return ds(this,e).has(e)},Kr.prototype.set=function(e,t){var r=ds(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},qr.prototype.add=qr.prototype.push=function(e){return this.__data__.set(e,i),this},qr.prototype.has=function(e){return this.__data__.has(e)},Zr.prototype.clear=function(){this.__data__=new Gr,this.size=0},Zr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Zr.prototype.get=function(e){return this.__data__.get(e)},Zr.prototype.has=function(e){return this.__data__.has(e)},Zr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Gr){var n=r.__data__;if(!Br||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(e,t),this.size=r.size,this};var pn=Fo(Tn),hn=Fo(An,!0);function gn(e,t){var r=!0;return pn(e,function(e,n,o){return r=!!t(e,n,o)}),r}function yn(e,t,r){for(var n=-1,s=e.length;++n<s;){var i=e[n],a=t(i);if(null!=a&&(c===o?a==a&&!ua(a):r(a,c)))var c=a,u=i}return u}function mn(e,t){var r=[];return pn(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function bn(e,t,r,n,o){var s=-1,i=e.length;for(r||(r=ws),o||(o=[]);++s<i;){var a=e[s];t>0&&r(a)?t>1?bn(a,t-1,r,n,o):Mt(o,a):n||(o[o.length]=a)}return o}var wn=Mo(),vn=Mo(!0);function Tn(e,t){return e&&wn(e,t,Ra)}function An(e,t){return e&&vn(e,t,Ra)}function En(e,t){return Rt(t,function(t){return Xi(e[t])})}function Pn(e,t){for(var r=0,n=(t=To(t,e)).length;null!=e&&r<n;)e=e[Us(t[r++])];return r&&r==n?e:o}function Bn(e,t,r){var n=t(e);return Hi(e)?n:Mt(n,r(e))}function Cn(e){return null==e?e===o?\"[object Undefined]\":\"[object Null]\":Qe&&Qe in Ie(e)?function(e){var t=Me.call(e,Qe),r=e[Qe];try{e[Qe]=o;var n=!0}catch(e){}var s=De.call(e);n&&(t?e[Qe]=r:delete e[Qe]);return s}(e):function(e){return De.call(e)}(e)}function In(e,t){return e>t}function Sn(e,t){return null!=e&&Me.call(e,t)}function Wn(e,t){return null!=e&&t in Ie(e)}function xn(e,t,r){for(var s=r?Ot:kt,i=e[0].length,a=e.length,c=a,u=n(a),l=1/0,d=[];c--;){var f=e[c];c&&t&&(f=Ft(f,Qt(t))),l=wr(f.length,l),u[c]=!r&&(t||i>=120&&f.length>=120)?new qr(c&&f):o}f=e[0];var p=-1,h=u[0];e:for(;++p<i&&d.length<l;){var g=f[p],y=t?t(g):g;if(g=r||0!==g?g:0,!(h?tr(h,y):s(d,y,r))){for(c=a;--c;){var m=u[c];if(!(m?tr(m,y):s(e[c],y,r)))continue e}h&&h.push(y),d.push(g)}}return d}function _n(e,t,r){var n=null==(e=Ws(e,t=To(t,e)))?e:e[Us(Js(t))];return null==n?o:It(n,e,r)}function Rn(e){return ra(e)&&Cn(e)==b}function kn(e,t,r,n,s){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,s,i){var a=Hi(e),c=Hi(t),u=a?w:ys(e),l=c?w:ys(t),d=(u=u==b?I:u)==I,f=(l=l==b?I:l)==I,p=u==l;if(p&&Zi(e)){if(!Zi(t))return!1;a=!0,d=!1}if(p&&!d)return i||(i=new Zr),a||la(e)?ns(e,t,r,n,s,i):function(e,t,r,n,o,s,i){switch(r){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!s(new He(e),new He(t)));case v:case T:case C:return $i(+e,+t);case A:return e.name==t.name&&e.message==t.message;case W:case _:return e==t+\"\";case B:var a=cr;case x:var c=1&n;if(a||(a=dr),e.size!=t.size&&!c)return!1;var u=i.get(e);if(u)return u==t;n|=2,i.set(e,t);var l=ns(a(e),a(t),n,o,s,i);return i.delete(e),l;case R:if(Ur)return Ur.call(e)==Ur.call(t)}return!1}(e,t,u,r,n,s,i);if(!(1&r)){var h=d&&Me.call(e,\"__wrapped__\"),g=f&&Me.call(t,\"__wrapped__\");if(h||g){var y=h?e.value():e,m=g?t.value():t;return i||(i=new Zr),s(y,m,r,n,i)}}if(!p)return!1;return i||(i=new Zr),function(e,t,r,n,s,i){var a=1&r,c=ss(e),u=c.length,l=ss(t),d=l.length;if(u!=d&&!a)return!1;var f=u;for(;f--;){var p=c[f];if(!(a?p in t:Me.call(t,p)))return!1}var h=i.get(e),g=i.get(t);if(h&&g)return h==t&&g==e;var y=!0;i.set(e,t),i.set(t,e);var m=a;for(;++f<u;){var b=e[p=c[f]],w=t[p];if(n)var v=a?n(w,b,p,t,e,i):n(b,w,p,e,t,i);if(!(v===o?b===w||s(b,w,r,n,i):v)){y=!1;break}m||(m=\"constructor\"==p)}if(y&&!m){var T=e.constructor,A=t.constructor;T==A||!(\"constructor\"in e)||!(\"constructor\"in t)||\"function\"==typeof T&&T instanceof T&&\"function\"==typeof A&&A instanceof A||(y=!1)}return i.delete(e),i.delete(t),y}(e,t,r,n,s,i)}(e,t,r,n,kn,s))}function On(e,t,r,n){var s=r.length,i=s,a=!n;if(null==e)return!i;for(e=Ie(e);s--;){var c=r[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<i;){var u=(c=r[s])[0],l=e[u],d=c[1];if(a&&c[2]){if(l===o&&!(u in e))return!1}else{var f=new Zr;if(n)var p=n(l,d,u,e,t,f);if(!(p===o?kn(d,l,3,n,f):p))return!1}}return!0}function Fn(e){return!(!ta(e)||(t=e,Ue&&Ue in t))&&(Xi(e)?ze:be).test(Ds(e));var t}function Mn(e){return\"function\"==typeof e?e:null==e?oc:\"object\"==typeof e?Hi(e)?zn(e[0],e[1]):$n(e):pc(e)}function Nn(e){if(!Bs(e))return qt(e);var t=[];for(var r in Ie(e))Me.call(e,r)&&\"constructor\"!=r&&t.push(r);return t}function Un(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Ie(e))t.push(r);return t}(e);var t=Bs(e),r=[];for(var n in e)(\"constructor\"!=n||!t&&Me.call(e,n))&&r.push(n);return r}function Dn(e,t){return e<t}function Ln(e,t){var r=-1,o=Ki(e)?n(e.length):[];return pn(e,function(e,n,s){o[++r]=t(e,n,s)}),o}function $n(e){var t=fs(e);return 1==t.length&&t[0][2]?Is(t[0][0],t[0][1]):function(r){return r===e||On(r,e,t)}}function zn(e,t){return As(e)&&Cs(t)?Is(Us(e),t):function(r){var n=Ia(r,e);return n===o&&n===t?Sa(r,e):kn(t,n,3)}}function jn(e,t,r,n,s){e!==t&&wn(t,function(i,a){if(s||(s=new Zr),ta(i))!function(e,t,r,n,s,i,a){var c=xs(e,r),u=xs(t,r),l=a.get(u);if(l)return void en(e,r,l);var d=i?i(c,u,r+\"\",e,t,a):o,f=d===o;if(f){var p=Hi(u),h=!p&&Zi(u),g=!p&&!h&&la(u);d=u,p||h||g?Hi(c)?d=c:qi(c)?d=_o(c):h?(f=!1,d=Bo(u,!0)):g?(f=!1,d=Io(u,!0)):d=[]:sa(u)||Vi(u)?(d=c,Vi(c)?d=ba(c):ta(c)&&!Xi(c)||(d=bs(u))):f=!1}f&&(a.set(u,d),s(d,u,n,i,a),a.delete(u));en(e,r,d)}(e,t,a,r,jn,n,s);else{var c=n?n(xs(e,a),i,a+\"\",e,t,s):o;c===o&&(c=i),en(e,a,c)}},ka)}function Vn(e,t){var r=e.length;if(r)return vs(t+=t<0?r:0,r)?e[t]:o}function Hn(e,t,r){t=t.length?Ft(t,function(e){return Hi(e)?function(t){return Pn(t,1===e.length?e[0]:e)}:e}):[oc];var n=-1;t=Ft(t,Qt(ls()));var o=Ln(e,function(e,r,o){var s=Ft(t,function(t){return t(e)});return{criteria:s,index:++n,value:e}});return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,function(e,t){return function(e,t,r){var n=-1,o=e.criteria,s=t.criteria,i=o.length,a=r.length;for(;++n<i;){var c=So(o[n],s[n]);if(c)return n>=a?c:c*(\"desc\"==r[n]?-1:1)}return e.index-t.index}(e,t,r)})}function Gn(e,t,r){for(var n=-1,o=t.length,s={};++n<o;){var i=t[n],a=Pn(e,i);r(a,i)&&eo(s,To(i,e),a)}return s}function Kn(e,t,r,n){var o=n?Vt:jt,s=-1,i=t.length,a=e;for(e===t&&(t=_o(t)),r&&(a=Ft(e,Qt(r)));++s<i;)for(var c=0,u=t[s],l=r?r(u):u;(c=o(a,l,c,n))>-1;)a!==e&&Ye.call(a,c,1),Ye.call(e,c,1);return e}function qn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==s){var s=o;vs(o)?Ye.call(e,o,1):po(e,o)}}return e}function Zn(e,t){return e+yt(Ar()*(t-e+1))}function Yn(e,t){var r=\"\";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=yt(t/2))&&(e+=e)}while(t);return r}function Jn(e,t){return ks(Ss(e,t,oc),e+\"\")}function Xn(e){return Jr($a(e))}function Qn(e,t){var r=$a(e);return Ms(r,cn(t,0,r.length))}function eo(e,t,r,n){if(!ta(e))return e;for(var s=-1,i=(t=To(t,e)).length,a=i-1,c=e;null!=c&&++s<i;){var u=Us(t[s]),l=r;if(\"__proto__\"===u||\"constructor\"===u||\"prototype\"===u)return e;if(s!=a){var d=c[u];(l=n?n(d,u,c):o)===o&&(l=ta(d)?d:vs(t[s+1])?[]:{})}tn(c,u,l),c=c[u]}return e}var to=xr?function(e,t){return xr.set(e,t),e}:oc,ro=rt?function(e,t){return rt(e,\"toString\",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:oc;function no(e){return Ms($a(e))}function oo(e,t,r){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(r=r>s?s:r)<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var i=n(s);++o<s;)i[o]=e[o+t];return i}function so(e,t){var r;return pn(e,function(e,n,o){return!(r=t(e,n,o))}),!!r}function io(e,t,r){var n=0,o=null==e?n:e.length;if(\"number\"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var s=n+o>>>1,i=e[s];null!==i&&!ua(i)&&(r?i<=t:i<t)?n=s+1:o=s}return o}return ao(e,t,oc,r)}function ao(e,t,r,n){var s=0,i=null==e?0:e.length;if(0===i)return 0;for(var a=(t=r(t))!=t,c=null===t,u=ua(t),l=t===o;s<i;){var d=yt((s+i)/2),f=r(e[d]),p=f!==o,h=null===f,g=f==f,y=ua(f);if(a)var m=n||g;else m=l?g&&(n||p):c?g&&p&&(n||!h):u?g&&p&&!h&&(n||!y):!h&&!y&&(n?f<=t:f<t);m?s=d+1:i=d}return wr(i,4294967294)}function co(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var i=e[r],a=t?t(i):i;if(!r||!$i(a,c)){var c=a;s[o++]=0===i?0:i}}return s}function uo(e){return\"number\"==typeof e?e:ua(e)?g:+e}function lo(e){if(\"string\"==typeof e)return e;if(Hi(e))return Ft(e,lo)+\"\";if(ua(e))return Dr?Dr.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}function fo(e,t,r){var n=-1,o=kt,s=e.length,i=!0,a=[],c=a;if(r)i=!1,o=Ot;else if(s>=200){var u=t?null:Jo(e);if(u)return dr(u);i=!1,o=tr,c=new qr}else c=t?[]:a;e:for(;++n<s;){var l=e[n],d=t?t(l):l;if(l=r||0!==l?l:0,i&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),a.push(l)}else o(c,d,r)||(c!==a&&c.push(d),a.push(l))}return a}function po(e,t){var r=-1,n=(t=To(t,e)).length;if(!n)return!0;for(;++r<n;){var o=Us(t[r]);if(\"__proto__\"===o&&!Me.call(e,\"__proto__\"))return!1;if((\"constructor\"===o||\"prototype\"===o)&&r<n-1)return!1}var s=Ws(e,t);return null==s||delete s[Us(Js(t))]}function ho(e,t,r,n){return eo(e,t,r(Pn(e,t)),n)}function go(e,t,r,n){for(var o=e.length,s=n?o:-1;(n?s--:++s<o)&&t(e[s],s,e););return r?oo(e,n?0:s,n?s+1:o):oo(e,n?s+1:0,n?o:s)}function yo(e,t){var r=e;return r instanceof Vr&&(r=r.value()),Nt(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},r)}function mo(e,t,r){var o=e.length;if(o<2)return o?fo(e[0]):[];for(var s=-1,i=n(o);++s<o;)for(var a=e[s],c=-1;++c<o;)c!=s&&(i[s]=fn(i[s]||a,e[c],t,r));return fo(bn(i,1),t,r)}function bo(e,t,r){for(var n=-1,s=e.length,i=t.length,a={};++n<s;){var c=n<i?t[n]:o;r(a,e[n],c)}return a}function wo(e){return qi(e)?e:[]}function vo(e){return\"function\"==typeof e?e:oc}function To(e,t){return Hi(e)?e:As(e,t)?[e]:Ns(wa(e))}var Ao=Jn;function Eo(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:oo(e,t,r)}var Po=ot||function(e){return gt.clearTimeout(e)};function Bo(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function Co(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Io(e,t){var r=t?Co(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function So(e,t){if(e!==t){var r=e!==o,n=null===e,s=e==e,i=ua(e),a=t!==o,c=null===t,u=t==t,l=ua(t);if(!c&&!l&&!i&&e>t||i&&a&&u&&!c&&!l||n&&a&&u||!r&&u||!s)return 1;if(!n&&!i&&!l&&e<t||l&&r&&s&&!n&&!i||c&&r&&s||!a&&s||!u)return-1}return 0}function Wo(e,t,r,o){for(var s=-1,i=e.length,a=r.length,c=-1,u=t.length,l=br(i-a,0),d=n(u+l),f=!o;++c<u;)d[c]=t[c];for(;++s<a;)(f||s<i)&&(d[r[s]]=e[s]);for(;l--;)d[c++]=e[s++];return d}function xo(e,t,r,o){for(var s=-1,i=e.length,a=-1,c=r.length,u=-1,l=t.length,d=br(i-c,0),f=n(d+l),p=!o;++s<d;)f[s]=e[s];for(var h=s;++u<l;)f[h+u]=t[u];for(;++a<c;)(p||s<i)&&(f[h+r[a]]=e[s++]);return f}function _o(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Ro(e,t,r,n){var s=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var c=t[i],u=n?n(r[c],e[c],c,r,e):o;u===o&&(u=e[c]),s?sn(r,c,u):tn(r,c,u)}return r}function ko(e,t){return function(r,n){var o=Hi(r)?St:nn,s=t?t():{};return o(r,e,ls(n,2),s)}}function Oo(e){return Jn(function(t,r){var n=-1,s=r.length,i=s>1?r[s-1]:o,a=s>2?r[2]:o;for(i=e.length>3&&\"function\"==typeof i?(s--,i):o,a&&Ts(r[0],r[1],a)&&(i=s<3?o:i,s=1),t=Ie(t);++n<s;){var c=r[n];c&&e(t,c,n,i)}return t})}function Fo(e,t){return function(r,n){if(null==r)return r;if(!Ki(r))return e(r,n);for(var o=r.length,s=t?o:-1,i=Ie(r);(t?s--:++s<o)&&!1!==n(i[s],s,i););return r}}function Mo(e){return function(t,r,n){for(var o=-1,s=Ie(t),i=n(t),a=i.length;a--;){var c=i[e?a:++o];if(!1===r(s[c],c,s))break}return t}}function No(e){return function(t){var r=ar(t=wa(t))?hr(t):o,n=r?r[0]:t.charAt(0),s=r?Eo(r,1).join(\"\"):t.slice(1);return n[e]()+s}}function Uo(e){return function(t){return Nt(Xa(Va(t).replace(et,\"\")),e,\"\")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=$r(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Lo(e){return function(t,r,n){var s=Ie(t);if(!Ki(t)){var i=ls(r,3);t=Ra(t),r=function(e){return i(s[e],e,s)}}var a=e(t,r,n);return a>-1?s[i?t[a]:a]:o}}function $o(e){return os(function(t){var r=t.length,n=r,i=jr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if(\"function\"!=typeof a)throw new xe(s);if(i&&!c&&\"wrapper\"==cs(a))var c=new jr([],!0)}for(n=c?n:r;++n<r;){var u=cs(a=t[n]),l=\"wrapper\"==u?as(a):o;c=l&&Es(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[cs(l[0])].apply(c,l[3]):1==a.length&&Es(a)?c[u]():c.thru(a)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Hi(n))return c.plant(n).value();for(var o=0,s=r?t[o].apply(this,e):n;++o<r;)s=t[o].call(this,s);return s}})}function zo(e,t,r,s,i,a,c,u,l,f){var p=t&d,h=1&t,g=2&t,y=24&t,m=512&t,b=g?o:Do(e);return function d(){for(var w=arguments.length,v=n(w),T=w;T--;)v[T]=arguments[T];if(y)var A=us(d),E=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,A);if(s&&(v=Wo(v,s,i,y)),a&&(v=xo(v,a,c,y)),w-=E,y&&w<f){var P=lr(v,A);return Zo(e,t,zo,d.placeholder,r,v,P,u,l,f-w)}var B=h?r:this,C=g?B[e]:e;return w=v.length,u?v=function(e,t){var r=e.length,n=wr(t.length,r),s=_o(e);for(;n--;){var i=t[n];e[n]=vs(i,r)?s[i]:o}return e}(v,u):m&&w>1&&v.reverse(),p&&l<w&&(v.length=l),this&&this!==gt&&this instanceof d&&(C=b||Do(C)),C.apply(B,v)}}function jo(e,t){return function(r,n){return function(e,t,r,n){return Tn(e,function(e,o,s){t(n,r(e),o,s)}),n}(r,e,t(n),{})}}function Vo(e,t){return function(r,n){var s;if(r===o&&n===o)return t;if(r!==o&&(s=r),n!==o){if(s===o)return n;\"string\"==typeof r||\"string\"==typeof n?(r=lo(r),n=lo(n)):(r=uo(r),n=uo(n)),s=e(r,n)}return s}}function Ho(e){return os(function(t){return t=Ft(t,Qt(ls())),Jn(function(r){var n=this;return e(t,function(e){return It(e,n,r)})})})}function Go(e,t){var r=(t=t===o?\" \":lo(t)).length;if(r<2)return r?Yn(t,e):t;var n=Yn(t,ht(e/pr(t)));return ar(t)?Eo(hr(n),0,e).join(\"\"):n.slice(0,e)}function Ko(e){return function(t,r,s){return s&&\"number\"!=typeof s&&Ts(t,r,s)&&(r=s=o),t=ha(t),r===o?(r=t,t=0):r=ha(r),function(e,t,r,o){for(var s=-1,i=br(ht((t-e)/(r||1)),0),a=n(i);i--;)a[o?i:++s]=e,e+=r;return a}(t,r,s=s===o?t<r?1:-1:ha(s),e)}}function qo(e){return function(t,r){return\"string\"==typeof t&&\"string\"==typeof r||(t=ma(t),r=ma(r)),e(t,r)}}function Zo(e,t,r,n,s,i,a,c,d,f){var p=8&t;t|=p?u:l,4&(t&=~(p?l:u))||(t&=-4);var h=[e,t,s,p?i:o,p?a:o,p?o:i,p?o:a,c,d,f],g=r.apply(o,h);return Es(e)&&_s(g,h),g.placeholder=n,Os(g,e,t)}function Yo(e){var t=Ce[e];return function(e,r){if(e=ma(e),(r=null==r?0:wr(ga(r),292))&&vt(e)){var n=(wa(e)+\"e\").split(\"e\");return+((n=(wa(t(n[0]+\"e\"+(+n[1]+r)))+\"e\").split(\"e\"))[0]+\"e\"+(+n[1]-r))}return t(e)}}var Jo=Ir&&1/dr(new Ir([,-0]))[1]==p?function(e){return new Ir(e)}:uc;function Xo(e){return function(t){var r=ys(t);return r==B?cr(t):r==x?fr(t):function(e,t){return Ft(t,function(t){return[t,e[t]]})}(t,e(t))}}function Qo(e,t,r,i,p,h,g,y){var m=2&t;if(!m&&\"function\"!=typeof e)throw new xe(s);var b=i?i.length:0;if(b||(t&=-97,i=p=o),g=g===o?g:br(ga(g),0),y=y===o?y:ga(y),b-=p?p.length:0,t&l){var w=i,v=p;i=p=o}var T=m?o:as(e),A=[e,t,r,i,p,w,v,h,g,y];if(T&&function(e,t){var r=e[1],n=t[1],o=r|n,s=o<131,i=n==d&&8==r||n==d&&r==f&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!s&&!i)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Wo(u,c,t[4]):c,e[4]=u?lr(e[3],a):t[4]}(c=t[5])&&(u=e[5],e[5]=u?xo(u,c,t[6]):c,e[6]=u?lr(e[5],a):t[6]);(c=t[7])&&(e[7]=c);n&d&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(A,T),e=A[0],t=A[1],r=A[2],i=A[3],p=A[4],!(y=A[9]=A[9]===o?m?0:e.length:br(A[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==c?function(e,t,r){var s=Do(e);return function i(){for(var a=arguments.length,c=n(a),u=a,l=us(i);u--;)c[u]=arguments[u];var d=a<3&&c[0]!==l&&c[a-1]!==l?[]:lr(c,l);return(a-=d.length)<r?Zo(e,t,zo,i.placeholder,o,c,d,o,o,r-a):It(this&&this!==gt&&this instanceof i?s:e,this,c)}}(e,t,y):t!=u&&33!=t||p.length?zo.apply(o,A):function(e,t,r,o){var s=1&t,i=Do(e);return function t(){for(var a=-1,c=arguments.length,u=-1,l=o.length,d=n(l+c),f=this&&this!==gt&&this instanceof t?i:e;++u<l;)d[u]=o[u];for(;c--;)d[u++]=arguments[++a];return It(f,s?r:this,d)}}(e,t,r,i);else var E=function(e,t,r){var n=1&t,o=Do(e);return function t(){return(this&&this!==gt&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Os((T?to:_s)(E,A),e,t)}function es(e,t,r,n){return e===o||$i(e,ke[r])&&!Me.call(n,r)?t:e}function ts(e,t,r,n,s,i){return ta(e)&&ta(t)&&(i.set(t,e),jn(e,t,o,ts,i),i.delete(t)),e}function rs(e){return sa(e)?o:e}function ns(e,t,r,n,s,i){var a=1&r,c=e.length,u=t.length;if(c!=u&&!(a&&u>c))return!1;var l=i.get(e),d=i.get(t);if(l&&d)return l==t&&d==e;var f=-1,p=!0,h=2&r?new qr:o;for(i.set(e,t),i.set(t,e);++f<c;){var g=e[f],y=t[f];if(n)var m=a?n(y,g,f,t,e,i):n(g,y,f,e,t,i);if(m!==o){if(m)continue;p=!1;break}if(h){if(!Dt(t,function(e,t){if(!tr(h,t)&&(g===e||s(g,e,r,n,i)))return h.push(t)})){p=!1;break}}else if(g!==y&&!s(g,y,r,n,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function os(e){return ks(Ss(e,o,Gs),e+\"\")}function ss(e){return Bn(e,Ra,hs)}function is(e){return Bn(e,ka,gs)}var as=xr?function(e){return xr.get(e)}:uc;function cs(e){for(var t=e.name+\"\",r=_r[t],n=Me.call(_r,t)?r.length:0;n--;){var o=r[n],s=o.func;if(null==s||s==e)return o.name}return t}function us(e){return(Me.call(Lr,\"placeholder\")?Lr:e).placeholder}function ls(){var e=Lr.iteratee||sc;return e=e===sc?Mn:e,arguments.length?e(arguments[0],arguments[1]):e}function ds(e,t){var r,n,o=e.__data__;return(\"string\"==(n=typeof(r=t))||\"number\"==n||\"symbol\"==n||\"boolean\"==n?\"__proto__\"!==r:null===r)?o[\"string\"==typeof t?\"string\":\"hash\"]:o.map}function fs(e){for(var t=Ra(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Cs(o)]}return t}function ps(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return Fn(r)?r:o}var hs=mt?function(e){return null==e?[]:(e=Ie(e),Rt(mt(e),function(t){return Ze.call(e,t)}))}:yc,gs=mt?function(e){for(var t=[];e;)Mt(t,hs(e)),e=Ke(e);return t}:yc,ys=Cn;function ms(e,t,r){for(var n=-1,o=(t=To(t,e)).length,s=!1;++n<o;){var i=Us(t[n]);if(!(s=null!=e&&r(e,i)))break;e=e[i]}return s||++n!=o?s:!!(o=null==e?0:e.length)&&ea(o)&&vs(i,o)&&(Hi(e)||Vi(e))}function bs(e){return\"function\"!=typeof e.constructor||Bs(e)?{}:$r(Ke(e))}function ws(e){return Hi(e)||Vi(e)||!!(Je&&e&&e[Je])}function vs(e,t){var r=typeof e;return!!(t=t??h)&&(\"number\"==r||\"symbol\"!=r&&ve.test(e))&&e>-1&&e%1==0&&e<t}function Ts(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!(\"number\"==n?Ki(r)&&vs(t,r.length):\"string\"==n&&t in r)&&$i(r[t],e)}function As(e,t){if(Hi(e))return!1;var r=typeof e;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=e&&!ua(e))||(re.test(e)||!te.test(e)||null!=t&&e in Ie(t))}function Es(e){var t=cs(e),r=Lr[t];if(\"function\"!=typeof r||!(t in Vr.prototype))return!1;if(e===r)return!0;var n=as(r);return!!n&&e===n[0]}(Pr&&ys(new Pr(new ArrayBuffer(1)))!=F||Br&&ys(new Br)!=B||Cr&&ys(Cr.resolve())!=S||Ir&&ys(new Ir)!=x||Sr&&ys(new Sr)!=k)&&(ys=function(e){var t=Cn(e),r=t==I?e.constructor:o,n=r?Ds(r):\"\";if(n)switch(n){case Rr:return F;case kr:return B;case Or:return S;case Fr:return x;case Mr:return k}return t});var Ps=Oe?Xi:mc;function Bs(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||ke)}function Cs(e){return e==e&&!ta(e)}function Is(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==o||e in Ie(r)))}}function Ss(e,t,r){return t=br(t===o?e.length-1:t,0),function(){for(var o=arguments,s=-1,i=br(o.length-t,0),a=n(i);++s<i;)a[s]=o[t+s];s=-1;for(var c=n(t+1);++s<t;)c[s]=o[s];return c[t]=r(a),It(e,this,c)}}function Ws(e,t){return t.length<2?e:Pn(e,oo(t,0,-1))}function xs(e,t){if((\"constructor\"!==t||\"function\"!=typeof e[t])&&\"__proto__\"!=t)return e[t]}var _s=Fs(to),Rs=pt||function(e,t){return gt.setTimeout(e,t)},ks=Fs(ro);function Os(e,t,r){var n=t+\"\";return ks(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?\"& \":\"\")+t[n],t=t.join(r>2?\", \":\" \"),e.replace(ce,\"{\\n/* [wrapped with \"+t+\"] */\\n\")}(n,function(e,t){return Wt(m,function(r){var n=\"_.\"+r[0];t&r[1]&&!kt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(le):[]}(n),r)))}function Fs(e){var t=0,r=0;return function(){var n=vr(),s=16-(n-r);if(r=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ms(e,t){var r=-1,n=e.length,s=n-1;for(t=t===o?n:t;++r<t;){var i=Zn(r,s),a=e[i];e[i]=e[r],e[r]=a}return e.length=t,e}var Ns=function(e){var t=Fi(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(\"\"),e.replace(ne,function(e,r,n,o){t.push(n?o.replace(pe,\"$1\"):r||e)}),t});function Us(e){if(\"string\"==typeof e||ua(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-1/0?\"-0\":t}function Ds(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}function Ls(e){if(e instanceof Vr)return e.clone();var t=new jr(e.__wrapped__,e.__chain__);return t.__actions__=_o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $s=Jn(function(e,t){return qi(e)?fn(e,bn(t,1,qi,!0)):[]}),zs=Jn(function(e,t){var r=Js(t);return qi(r)&&(r=o),qi(e)?fn(e,bn(t,1,qi,!0),ls(r,2)):[]}),js=Jn(function(e,t){var r=Js(t);return qi(r)&&(r=o),qi(e)?fn(e,bn(t,1,qi,!0),o,r):[]});function Vs(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=br(n+o,0)),zt(e,ls(t,3),o)}function Hs(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n-1;return r!==o&&(s=ga(r),s=r<0?br(n+s,0):wr(s,n-1)),zt(e,ls(t,3),s,!0)}function Gs(e){return(null==e?0:e.length)?bn(e,1):[]}function Ks(e){return e&&e.length?e[0]:o}var qs=Jn(function(e){var t=Ft(e,wo);return t.length&&t[0]===e[0]?xn(t):[]}),Zs=Jn(function(e){var t=Js(e),r=Ft(e,wo);return t===Js(r)?t=o:r.pop(),r.length&&r[0]===e[0]?xn(r,ls(t,2)):[]}),Ys=Jn(function(e){var t=Js(e),r=Ft(e,wo);return(t=\"function\"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?xn(r,o,t):[]});function Js(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Xs=Jn(Qs);function Qs(e,t){return e&&e.length&&t&&t.length?Kn(e,t):e}var ei=os(function(e,t){var r=null==e?0:e.length,n=an(e,t);return qn(e,Ft(t,function(e){return vs(e,r)?+e:e}).sort(So)),n});function ti(e){return null==e?e:Er.call(e)}var ri=Jn(function(e){return fo(bn(e,1,qi,!0))}),ni=Jn(function(e){var t=Js(e);return qi(t)&&(t=o),fo(bn(e,1,qi,!0),ls(t,2))}),oi=Jn(function(e){var t=Js(e);return t=\"function\"==typeof t?t:o,fo(bn(e,1,qi,!0),o,t)});function si(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,function(e){if(qi(e))return t=br(e.length,t),!0}),Jt(t,function(t){return Ft(e,Kt(t))})}function ii(e,t){if(!e||!e.length)return[];var r=si(e);return null==t?r:Ft(r,function(e){return It(t,o,e)})}var ai=Jn(function(e,t){return qi(e)?fn(e,t):[]}),ci=Jn(function(e){return mo(Rt(e,qi))}),ui=Jn(function(e){var t=Js(e);return qi(t)&&(t=o),mo(Rt(e,qi),ls(t,2))}),li=Jn(function(e){var t=Js(e);return t=\"function\"==typeof t?t:o,mo(Rt(e,qi),o,t)}),di=Jn(si);var fi=Jn(function(e){var t=e.length,r=t>1?e[t-1]:o;return r=\"function\"==typeof r?(e.pop(),r):o,ii(e,r)});function pi(e){var t=Lr(e);return t.__chain__=!0,t}function hi(e,t){return t(e)}var gi=os(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,s=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Vr&&vs(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hi,args:[s],thisArg:o}),new jr(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(s)});var yi=ko(function(e,t,r){Me.call(e,r)?++e[r]:sn(e,r,1)});var mi=Lo(Vs),bi=Lo(Hs);function wi(e,t){return(Hi(e)?Wt:pn)(e,ls(t,3))}function vi(e,t){return(Hi(e)?xt:hn)(e,ls(t,3))}var Ti=ko(function(e,t,r){Me.call(e,r)?e[r].push(t):sn(e,r,[t])});var Ai=Jn(function(e,t,r){var o=-1,s=\"function\"==typeof t,i=Ki(e)?n(e.length):[];return pn(e,function(e){i[++o]=s?It(t,e,r):_n(e,t,r)}),i}),Ei=ko(function(e,t,r){sn(e,r,t)});function Pi(e,t){return(Hi(e)?Ft:Ln)(e,ls(t,3))}var Bi=ko(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]});var Ci=Jn(function(e,t){if(null==e)return[];var r=t.length;return r>1&&Ts(e,t[0],t[1])?t=[]:r>2&&Ts(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,bn(t,1),[])}),Ii=lt||function(){return gt.Date.now()};function Si(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Qo(e,d,o,o,o,o,t)}function Wi(e,t){var r;if(\"function\"!=typeof t)throw new xe(s);return e=ga(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var xi=Jn(function(e,t,r){var n=1;if(r.length){var o=lr(r,us(xi));n|=u}return Qo(e,n,t,r,o)}),_i=Jn(function(e,t,r){var n=3;if(r.length){var o=lr(r,us(_i));n|=u}return Qo(t,n,e,r,o)});function Ri(e,t,r){var n,i,a,c,u,l,d=0,f=!1,p=!1,h=!0;if(\"function\"!=typeof e)throw new xe(s);function g(t){var r=n,s=i;return n=i=o,d=t,c=e.apply(s,r)}function y(e){var r=e-l;return l===o||r>=t||r<0||p&&e-d>=a}function m(){var e=Ii();if(y(e))return b(e);u=Rs(m,function(e){var r=t-(e-l);return p?wr(r,a-(e-d)):r}(e))}function b(e){return u=o,h&&n?g(e):(n=i=o,c)}function w(){var e=Ii(),r=y(e);if(n=arguments,i=this,l=e,r){if(u===o)return function(e){return d=e,u=Rs(m,t),f?g(e):c}(l);if(p)return Po(u),u=Rs(m,t),g(l)}return u===o&&(u=Rs(m,t)),c}return t=ma(t)||0,ta(r)&&(f=!!r.leading,a=(p=\"maxWait\"in r)?br(ma(r.maxWait)||0,t):a,h=\"trailing\"in r?!!r.trailing:h),w.cancel=function(){u!==o&&Po(u),d=0,n=l=i=u=o},w.flush=function(){return u===o?c:b(Ii())},w}var ki=Jn(function(e,t){return dn(e,1,t)}),Oi=Jn(function(e,t,r){return dn(e,ma(t)||0,r)});function Fi(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new xe(s);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var i=e.apply(this,n);return r.cache=s.set(o,i)||s,i};return r.cache=new(Fi.Cache||Kr),r}function Mi(e){if(\"function\"!=typeof e)throw new xe(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fi.Cache=Kr;var Ni=Ao(function(e,t){var r=(t=1==t.length&&Hi(t[0])?Ft(t[0],Qt(ls())):Ft(bn(t,1),Qt(ls()))).length;return Jn(function(n){for(var o=-1,s=wr(n.length,r);++o<s;)n[o]=t[o].call(this,n[o]);return It(e,this,n)})}),Ui=Jn(function(e,t){var r=lr(t,us(Ui));return Qo(e,u,o,t,r)}),Di=Jn(function(e,t){var r=lr(t,us(Di));return Qo(e,l,o,t,r)}),Li=os(function(e,t){return Qo(e,f,o,o,o,t)});function $i(e,t){return e===t||e!=e&&t!=t}var zi=qo(In),ji=qo(function(e,t){return e>=t}),Vi=Rn(function(){return arguments}())?Rn:function(e){return ra(e)&&Me.call(e,\"callee\")&&!Ze.call(e,\"callee\")},Hi=n.isArray,Gi=Tt?Qt(Tt):function(e){return ra(e)&&Cn(e)==O};function Ki(e){return null!=e&&ea(e.length)&&!Xi(e)}function qi(e){return ra(e)&&Ki(e)}var Zi=wt||mc,Yi=At?Qt(At):function(e){return ra(e)&&Cn(e)==T};function Ji(e){if(!ra(e))return!1;var t=Cn(e);return t==A||\"[object DOMException]\"==t||\"string\"==typeof e.message&&\"string\"==typeof e.name&&!sa(e)}function Xi(e){if(!ta(e))return!1;var t=Cn(e);return t==E||t==P||\"[object AsyncFunction]\"==t||\"[object Proxy]\"==t}function Qi(e){return\"number\"==typeof e&&e==ga(e)}function ea(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=h}function ta(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}function ra(e){return null!=e&&\"object\"==typeof e}var na=Et?Qt(Et):function(e){return ra(e)&&ys(e)==B};function oa(e){return\"number\"==typeof e||ra(e)&&Cn(e)==C}function sa(e){if(!ra(e)||Cn(e)!=I)return!1;var t=Ke(e);if(null===t)return!0;var r=Me.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof r&&r instanceof r&&Fe.call(r)==Le}var ia=Pt?Qt(Pt):function(e){return ra(e)&&Cn(e)==W};var aa=Bt?Qt(Bt):function(e){return ra(e)&&ys(e)==x};function ca(e){return\"string\"==typeof e||!Hi(e)&&ra(e)&&Cn(e)==_}function ua(e){return\"symbol\"==typeof e||ra(e)&&Cn(e)==R}var la=Ct?Qt(Ct):function(e){return ra(e)&&ea(e.length)&&!!ct[Cn(e)]};var da=qo(Dn),fa=qo(function(e,t){return e<=t});function pa(e){if(!e)return[];if(Ki(e))return ca(e)?hr(e):_o(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=ys(e);return(t==B?cr:t==x?dr:$a)(e)}function ha(e){return e?(e=ma(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ga(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function ya(e){return e?cn(ga(e),0,y):0}function ma(e){if(\"number\"==typeof e)return e;if(ua(e))return g;if(ta(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=Xt(e);var r=me.test(e);return r||we.test(e)?ft(e.slice(2),r?2:8):ye.test(e)?g:+e}function ba(e){return Ro(e,ka(e))}function wa(e){return null==e?\"\":lo(e)}var va=Oo(function(e,t){if(Bs(t)||Ki(t))Ro(t,Ra(t),e);else for(var r in t)Me.call(t,r)&&tn(e,r,t[r])}),Ta=Oo(function(e,t){Ro(t,ka(t),e)}),Aa=Oo(function(e,t,r,n){Ro(t,ka(t),e,n)}),Ea=Oo(function(e,t,r,n){Ro(t,Ra(t),e,n)}),Pa=os(an);var Ba=Jn(function(e,t){e=Ie(e);var r=-1,n=t.length,s=n>2?t[2]:o;for(s&&Ts(t[0],t[1],s)&&(n=1);++r<n;)for(var i=t[r],a=ka(i),c=-1,u=a.length;++c<u;){var l=a[c],d=e[l];(d===o||$i(d,ke[l])&&!Me.call(e,l))&&(e[l]=i[l])}return e}),Ca=Jn(function(e){return e.push(o,ts),It(Fa,o,e)});function Ia(e,t,r){var n=null==e?o:Pn(e,t);return n===o?r:n}function Sa(e,t){return null!=e&&ms(e,t,Wn)}var Wa=jo(function(e,t,r){null!=t&&\"function\"!=typeof t.toString&&(t=De.call(t)),e[t]=r},tc(oc)),xa=jo(function(e,t,r){null!=t&&\"function\"!=typeof t.toString&&(t=De.call(t)),Me.call(e,t)?e[t].push(r):e[t]=[r]},ls),_a=Jn(_n);function Ra(e){return Ki(e)?Yr(e):Nn(e)}function ka(e){return Ki(e)?Yr(e,!0):Un(e)}var Oa=Oo(function(e,t,r){jn(e,t,r)}),Fa=Oo(function(e,t,r,n){jn(e,t,r,n)}),Ma=os(function(e,t){var r={};if(null==e)return r;var n=!1;t=Ft(t,function(t){return t=To(t,e),n||(n=t.length>1),t}),Ro(e,is(e),r),n&&(r=un(r,7,rs));for(var o=t.length;o--;)po(r,t[o]);return r});var Na=os(function(e,t){return null==e?{}:function(e,t){return Gn(e,t,function(t,r){return Sa(e,r)})}(e,t)});function Ua(e,t){if(null==e)return{};var r=Ft(is(e),function(e){return[e]});return t=ls(t),Gn(e,r,function(e,r){return t(e,r[0])})}var Da=Xo(Ra),La=Xo(ka);function $a(e){return null==e?[]:er(e,Ra(e))}var za=Uo(function(e,t,r){return t=t.toLowerCase(),e+(r?ja(t):t)});function ja(e){return Ja(wa(e).toLowerCase())}function Va(e){return(e=wa(e))&&e.replace(Te,or).replace(tt,\"\")}var Ha=Uo(function(e,t,r){return e+(r?\"-\":\"\")+t.toLowerCase()}),Ga=Uo(function(e,t,r){return e+(r?\" \":\"\")+t.toLowerCase()}),Ka=No(\"toLowerCase\");var qa=Uo(function(e,t,r){return e+(r?\"_\":\"\")+t.toLowerCase()});var Za=Uo(function(e,t,r){return e+(r?\" \":\"\")+Ja(t)});var Ya=Uo(function(e,t,r){return e+(r?\" \":\"\")+t.toUpperCase()}),Ja=No(\"toUpperCase\");function Xa(e,t,r){return e=wa(e),(t=r?o:t)===o?function(e){return st.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Qa=Jn(function(e,t){try{return It(e,o,t)}catch(e){return Ji(e)?e:new Pe(e)}}),ec=os(function(e,t){return Wt(t,function(t){t=Us(t),sn(e,t,xi(e[t],e))}),e});function tc(e){return function(){return e}}var rc=$o(),nc=$o(!0);function oc(e){return e}function sc(e){return Mn(\"function\"==typeof e?e:un(e,1))}var ic=Jn(function(e,t){return function(r){return _n(r,e,t)}}),ac=Jn(function(e,t){return function(r){return _n(e,r,t)}});function cc(e,t,r){var n=Ra(t),o=En(t,n);null!=r||ta(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=En(t,Ra(t)));var s=!(ta(r)&&\"chain\"in r&&!r.chain),i=Xi(e);return Wt(o,function(r){var n=t[r];e[r]=n,i&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=_o(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Mt([this.value()],arguments))})}),e}function uc(){}var lc=Ho(Ft),dc=Ho(_t),fc=Ho(Dt);function pc(e){return As(e)?Kt(Us(e)):function(e){return function(t){return Pn(t,e)}}(e)}var hc=Ko(),gc=Ko(!0);function yc(){return[]}function mc(){return!1}var bc=Vo(function(e,t){return e+t},0),wc=Yo(\"ceil\"),vc=Vo(function(e,t){return e/t},1),Tc=Yo(\"floor\");var Ac,Ec=Vo(function(e,t){return e*t},1),Pc=Yo(\"round\"),Bc=Vo(function(e,t){return e-t},0);return Lr.after=function(e,t){if(\"function\"!=typeof t)throw new xe(s);return e=ga(e),function(){if(--e<1)return t.apply(this,arguments)}},Lr.ary=Si,Lr.assign=va,Lr.assignIn=Ta,Lr.assignInWith=Aa,Lr.assignWith=Ea,Lr.at=Pa,Lr.before=Wi,Lr.bind=xi,Lr.bindAll=ec,Lr.bindKey=_i,Lr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hi(e)?e:[e]},Lr.chain=pi,Lr.chunk=function(e,t,r){t=(r?Ts(e,t,r):t===o)?1:br(ga(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var i=0,a=0,c=n(ht(s/t));i<s;)c[a++]=oo(e,i,i+=t);return c},Lr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var s=e[t];s&&(o[n++]=s)}return o},Lr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Mt(Hi(r)?_o(r):[r],bn(t,1))},Lr.cond=function(e){var t=null==e?0:e.length,r=ls();return e=t?Ft(e,function(e){if(\"function\"!=typeof e[1])throw new xe(s);return[r(e[0]),e[1]]}):[],Jn(function(r){for(var n=-1;++n<t;){var o=e[n];if(It(o[0],this,r))return It(o[1],this,r)}})},Lr.conforms=function(e){return function(e){var t=Ra(e);return function(r){return ln(r,e,t)}}(un(e,1))},Lr.constant=tc,Lr.countBy=yi,Lr.create=function(e,t){var r=$r(e);return null==t?r:on(r,t)},Lr.curry=function e(t,r,n){var s=Qo(t,8,o,o,o,o,o,r=n?o:r);return s.placeholder=e.placeholder,s},Lr.curryRight=function e(t,r,n){var s=Qo(t,c,o,o,o,o,o,r=n?o:r);return s.placeholder=e.placeholder,s},Lr.debounce=Ri,Lr.defaults=Ba,Lr.defaultsDeep=Ca,Lr.defer=ki,Lr.delay=Oi,Lr.difference=$s,Lr.differenceBy=zs,Lr.differenceWith=js,Lr.drop=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=r||t===o?1:ga(t))<0?0:t,n):[]},Lr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,0,(t=n-(t=r||t===o?1:ga(t)))<0?0:t):[]},Lr.dropRightWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!0,!0):[]},Lr.dropWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!0):[]},Lr.fill=function(e,t,r,n){var s=null==e?0:e.length;return s?(r&&\"number\"!=typeof r&&Ts(e,t,r)&&(r=0,n=s),function(e,t,r,n){var s=e.length;for((r=ga(r))<0&&(r=-r>s?0:s+r),(n=n===o||n>s?s:ga(n))<0&&(n+=s),n=r>n?0:ya(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Lr.filter=function(e,t){return(Hi(e)?Rt:mn)(e,ls(t,3))},Lr.flatMap=function(e,t){return bn(Pi(e,t),1)},Lr.flatMapDeep=function(e,t){return bn(Pi(e,t),p)},Lr.flatMapDepth=function(e,t,r){return r=r===o?1:ga(r),bn(Pi(e,t),r)},Lr.flatten=Gs,Lr.flattenDeep=function(e){return(null==e?0:e.length)?bn(e,p):[]},Lr.flattenDepth=function(e,t){return(null==e?0:e.length)?bn(e,t=t===o?1:ga(t)):[]},Lr.flip=function(e){return Qo(e,512)},Lr.flow=rc,Lr.flowRight=nc,Lr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];sn(n,o[0],o[1])}return n},Lr.functions=function(e){return null==e?[]:En(e,Ra(e))},Lr.functionsIn=function(e){return null==e?[]:En(e,ka(e))},Lr.groupBy=Ti,Lr.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Lr.intersection=qs,Lr.intersectionBy=Zs,Lr.intersectionWith=Ys,Lr.invert=Wa,Lr.invertBy=xa,Lr.invokeMap=Ai,Lr.iteratee=sc,Lr.keyBy=Ei,Lr.keys=Ra,Lr.keysIn=ka,Lr.map=Pi,Lr.mapKeys=function(e,t){var r={};return t=ls(t,3),Tn(e,function(e,n,o){sn(r,t(e,n,o),e)}),r},Lr.mapValues=function(e,t){var r={};return t=ls(t,3),Tn(e,function(e,n,o){sn(r,n,t(e,n,o))}),r},Lr.matches=function(e){return $n(un(e,1))},Lr.matchesProperty=function(e,t){return zn(e,un(t,1))},Lr.memoize=Fi,Lr.merge=Oa,Lr.mergeWith=Fa,Lr.method=ic,Lr.methodOf=ac,Lr.mixin=cc,Lr.negate=Mi,Lr.nthArg=function(e){return e=ga(e),Jn(function(t){return Vn(t,e)})},Lr.omit=Ma,Lr.omitBy=function(e,t){return Ua(e,Mi(ls(t)))},Lr.once=function(e){return Wi(2,e)},Lr.orderBy=function(e,t,r,n){return null==e?[]:(Hi(t)||(t=null==t?[]:[t]),Hi(r=n?o:r)||(r=null==r?[]:[r]),Hn(e,t,r))},Lr.over=lc,Lr.overArgs=Ni,Lr.overEvery=dc,Lr.overSome=fc,Lr.partial=Ui,Lr.partialRight=Di,Lr.partition=Bi,Lr.pick=Na,Lr.pickBy=Ua,Lr.property=pc,Lr.propertyOf=function(e){return function(t){return null==e?o:Pn(e,t)}},Lr.pull=Xs,Lr.pullAll=Qs,Lr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,ls(r,2)):e},Lr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,o,r):e},Lr.pullAt=ei,Lr.range=hc,Lr.rangeRight=gc,Lr.rearg=Li,Lr.reject=function(e,t){return(Hi(e)?Rt:mn)(e,Mi(ls(t,3)))},Lr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],s=e.length;for(t=ls(t,3);++n<s;){var i=e[n];t(i,n,e)&&(r.push(i),o.push(n))}return qn(e,o),r},Lr.rest=function(e,t){if(\"function\"!=typeof e)throw new xe(s);return Jn(e,t=t===o?t:ga(t))},Lr.reverse=ti,Lr.sampleSize=function(e,t,r){return t=(r?Ts(e,t,r):t===o)?1:ga(t),(Hi(e)?Xr:Qn)(e,t)},Lr.set=function(e,t,r){return null==e?e:eo(e,t,r)},Lr.setWith=function(e,t,r,n){return n=\"function\"==typeof n?n:o,null==e?e:eo(e,t,r,n)},Lr.shuffle=function(e){return(Hi(e)?Qr:no)(e)},Lr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&\"number\"!=typeof r&&Ts(e,t,r)?(t=0,r=n):(t=null==t?0:ga(t),r=r===o?n:ga(r)),oo(e,t,r)):[]},Lr.sortBy=Ci,Lr.sortedUniq=function(e){return e&&e.length?co(e):[]},Lr.sortedUniqBy=function(e,t){return e&&e.length?co(e,ls(t,2)):[]},Lr.split=function(e,t,r){return r&&\"number\"!=typeof r&&Ts(e,t,r)&&(t=r=o),(r=r===o?y:r>>>0)?(e=wa(e))&&(\"string\"==typeof t||null!=t&&!ia(t))&&!(t=lo(t))&&ar(e)?Eo(hr(e),0,r):e.split(t,r):[]},Lr.spread=function(e,t){if(\"function\"!=typeof e)throw new xe(s);return t=null==t?0:br(ga(t),0),Jn(function(r){var n=r[t],o=Eo(r,0,t);return n&&Mt(o,n),It(e,this,o)})},Lr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Lr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:ga(t))<0?0:t):[]},Lr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:ga(t)))<0?0:t,n):[]},Lr.takeRightWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!1,!0):[]},Lr.takeWhile=function(e,t){return e&&e.length?go(e,ls(t,3)):[]},Lr.tap=function(e,t){return t(e),e},Lr.throttle=function(e,t,r){var n=!0,o=!0;if(\"function\"!=typeof e)throw new xe(s);return ta(r)&&(n=\"leading\"in r?!!r.leading:n,o=\"trailing\"in r?!!r.trailing:o),Ri(e,t,{leading:n,maxWait:t,trailing:o})},Lr.thru=hi,Lr.toArray=pa,Lr.toPairs=Da,Lr.toPairsIn=La,Lr.toPath=function(e){return Hi(e)?Ft(e,Us):ua(e)?[e]:_o(Ns(wa(e)))},Lr.toPlainObject=ba,Lr.transform=function(e,t,r){var n=Hi(e),o=n||Zi(e)||la(e);if(t=ls(t,4),null==r){var s=e&&e.constructor;r=o?n?new s:[]:ta(e)&&Xi(s)?$r(Ke(e)):{}}return(o?Wt:Tn)(e,function(e,n,o){return t(r,e,n,o)}),r},Lr.unary=function(e){return Si(e,1)},Lr.union=ri,Lr.unionBy=ni,Lr.unionWith=oi,Lr.uniq=function(e){return e&&e.length?fo(e):[]},Lr.uniqBy=function(e,t){return e&&e.length?fo(e,ls(t,2)):[]},Lr.uniqWith=function(e,t){return t=\"function\"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Lr.unset=function(e,t){return null==e||po(e,t)},Lr.unzip=si,Lr.unzipWith=ii,Lr.update=function(e,t,r){return null==e?e:ho(e,t,vo(r))},Lr.updateWith=function(e,t,r,n){return n=\"function\"==typeof n?n:o,null==e?e:ho(e,t,vo(r),n)},Lr.values=$a,Lr.valuesIn=function(e){return null==e?[]:er(e,ka(e))},Lr.without=ai,Lr.words=Xa,Lr.wrap=function(e,t){return Ui(vo(t),e)},Lr.xor=ci,Lr.xorBy=ui,Lr.xorWith=li,Lr.zip=di,Lr.zipObject=function(e,t){return bo(e||[],t||[],tn)},Lr.zipObjectDeep=function(e,t){return bo(e||[],t||[],eo)},Lr.zipWith=fi,Lr.entries=Da,Lr.entriesIn=La,Lr.extend=Ta,Lr.extendWith=Aa,cc(Lr,Lr),Lr.add=bc,Lr.attempt=Qa,Lr.camelCase=za,Lr.capitalize=ja,Lr.ceil=wc,Lr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ma(r))==r?r:0),t!==o&&(t=(t=ma(t))==t?t:0),cn(ma(e),t,r)},Lr.clone=function(e){return un(e,4)},Lr.cloneDeep=function(e){return un(e,5)},Lr.cloneDeepWith=function(e,t){return un(e,5,t=\"function\"==typeof t?t:o)},Lr.cloneWith=function(e,t){return un(e,4,t=\"function\"==typeof t?t:o)},Lr.conformsTo=function(e,t){return null==t||ln(e,t,Ra(t))},Lr.deburr=Va,Lr.defaultTo=function(e,t){return null==e||e!=e?t:e},Lr.divide=vc,Lr.endsWith=function(e,t,r){e=wa(e),t=lo(t);var n=e.length,s=r=r===o?n:cn(ga(r),0,n);return(r-=t.length)>=0&&e.slice(r,s)==t},Lr.eq=$i,Lr.escape=function(e){return(e=wa(e))&&J.test(e)?e.replace(Z,sr):e},Lr.escapeRegExp=function(e){return(e=wa(e))&&se.test(e)?e.replace(oe,\"\\\\$&\"):e},Lr.every=function(e,t,r){var n=Hi(e)?_t:gn;return r&&Ts(e,t,r)&&(t=o),n(e,ls(t,3))},Lr.find=mi,Lr.findIndex=Vs,Lr.findKey=function(e,t){return $t(e,ls(t,3),Tn)},Lr.findLast=bi,Lr.findLastIndex=Hs,Lr.findLastKey=function(e,t){return $t(e,ls(t,3),An)},Lr.floor=Tc,Lr.forEach=wi,Lr.forEachRight=vi,Lr.forIn=function(e,t){return null==e?e:wn(e,ls(t,3),ka)},Lr.forInRight=function(e,t){return null==e?e:vn(e,ls(t,3),ka)},Lr.forOwn=function(e,t){return e&&Tn(e,ls(t,3))},Lr.forOwnRight=function(e,t){return e&&An(e,ls(t,3))},Lr.get=Ia,Lr.gt=zi,Lr.gte=ji,Lr.has=function(e,t){return null!=e&&ms(e,t,Sn)},Lr.hasIn=Sa,Lr.head=Ks,Lr.identity=oc,Lr.includes=function(e,t,r,n){e=Ki(e)?e:$a(e),r=r&&!n?ga(r):0;var o=e.length;return r<0&&(r=br(o+r,0)),ca(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&jt(e,t,r)>-1},Lr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=br(n+o,0)),jt(e,t,o)},Lr.inRange=function(e,t,r){return t=ha(t),r===o?(r=t,t=0):r=ha(r),function(e,t,r){return e>=wr(t,r)&&e<br(t,r)}(e=ma(e),t,r)},Lr.invoke=_a,Lr.isArguments=Vi,Lr.isArray=Hi,Lr.isArrayBuffer=Gi,Lr.isArrayLike=Ki,Lr.isArrayLikeObject=qi,Lr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&Cn(e)==v},Lr.isBuffer=Zi,Lr.isDate=Yi,Lr.isElement=function(e){return ra(e)&&1===e.nodeType&&!sa(e)},Lr.isEmpty=function(e){if(null==e)return!0;if(Ki(e)&&(Hi(e)||\"string\"==typeof e||\"function\"==typeof e.splice||Zi(e)||la(e)||Vi(e)))return!e.length;var t=ys(e);if(t==B||t==x)return!e.size;if(Bs(e))return!Nn(e).length;for(var r in e)if(Me.call(e,r))return!1;return!0},Lr.isEqual=function(e,t){return kn(e,t)},Lr.isEqualWith=function(e,t,r){var n=(r=\"function\"==typeof r?r:o)?r(e,t):o;return n===o?kn(e,t,o,r):!!n},Lr.isError=Ji,Lr.isFinite=function(e){return\"number\"==typeof e&&vt(e)},Lr.isFunction=Xi,Lr.isInteger=Qi,Lr.isLength=ea,Lr.isMap=na,Lr.isMatch=function(e,t){return e===t||On(e,t,fs(t))},Lr.isMatchWith=function(e,t,r){return r=\"function\"==typeof r?r:o,On(e,t,fs(t),r)},Lr.isNaN=function(e){return oa(e)&&e!=+e},Lr.isNative=function(e){if(Ps(e))throw new Pe(\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\");return Fn(e)},Lr.isNil=function(e){return null==e},Lr.isNull=function(e){return null===e},Lr.isNumber=oa,Lr.isObject=ta,Lr.isObjectLike=ra,Lr.isPlainObject=sa,Lr.isRegExp=ia,Lr.isSafeInteger=function(e){return Qi(e)&&e>=-9007199254740991&&e<=h},Lr.isSet=aa,Lr.isString=ca,Lr.isSymbol=ua,Lr.isTypedArray=la,Lr.isUndefined=function(e){return e===o},Lr.isWeakMap=function(e){return ra(e)&&ys(e)==k},Lr.isWeakSet=function(e){return ra(e)&&\"[object WeakSet]\"==Cn(e)},Lr.join=function(e,t){return null==e?\"\":Lt.call(e,t)},Lr.kebabCase=Ha,Lr.last=Js,Lr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n;return r!==o&&(s=(s=ga(r))<0?br(n+s,0):wr(s,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,s):zt(e,Ht,s,!0)},Lr.lowerCase=Ga,Lr.lowerFirst=Ka,Lr.lt=da,Lr.lte=fa,Lr.max=function(e){return e&&e.length?yn(e,oc,In):o},Lr.maxBy=function(e,t){return e&&e.length?yn(e,ls(t,2),In):o},Lr.mean=function(e){return Gt(e,oc)},Lr.meanBy=function(e,t){return Gt(e,ls(t,2))},Lr.min=function(e){return e&&e.length?yn(e,oc,Dn):o},Lr.minBy=function(e,t){return e&&e.length?yn(e,ls(t,2),Dn):o},Lr.stubArray=yc,Lr.stubFalse=mc,Lr.stubObject=function(){return{}},Lr.stubString=function(){return\"\"},Lr.stubTrue=function(){return!0},Lr.multiply=Ec,Lr.nth=function(e,t){return e&&e.length?Vn(e,ga(t)):o},Lr.noConflict=function(){return gt._===this&&(gt._=$e),this},Lr.noop=uc,Lr.now=Ii,Lr.pad=function(e,t,r){e=wa(e);var n=(t=ga(t))?pr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Go(yt(o),r)+e+Go(ht(o),r)},Lr.padEnd=function(e,t,r){e=wa(e);var n=(t=ga(t))?pr(e):0;return t&&n<t?e+Go(t-n,r):e},Lr.padStart=function(e,t,r){e=wa(e);var n=(t=ga(t))?pr(e):0;return t&&n<t?Go(t-n,r)+e:e},Lr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Tr(wa(e).replace(ie,\"\"),t||0)},Lr.random=function(e,t,r){if(r&&\"boolean\"!=typeof r&&Ts(e,t,r)&&(t=r=o),r===o&&(\"boolean\"==typeof t?(r=t,t=o):\"boolean\"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=ha(e),t===o?(t=e,e=0):t=ha(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var s=Ar();return wr(e+s*(t-e+dt(\"1e-\"+((s+\"\").length-1))),t)}return Zn(e,t)},Lr.reduce=function(e,t,r){var n=Hi(e)?Nt:Zt,o=arguments.length<3;return n(e,ls(t,4),r,o,pn)},Lr.reduceRight=function(e,t,r){var n=Hi(e)?Ut:Zt,o=arguments.length<3;return n(e,ls(t,4),r,o,hn)},Lr.repeat=function(e,t,r){return t=(r?Ts(e,t,r):t===o)?1:ga(t),Yn(wa(e),t)},Lr.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Lr.result=function(e,t,r){var n=-1,s=(t=To(t,e)).length;for(s||(s=1,e=o);++n<s;){var i=null==e?o:e[Us(t[n])];i===o&&(n=s,i=r),e=Xi(i)?i.call(e):i}return e},Lr.round=Pc,Lr.runInContext=e,Lr.sample=function(e){return(Hi(e)?Jr:Xn)(e)},Lr.size=function(e){if(null==e)return 0;if(Ki(e))return ca(e)?pr(e):e.length;var t=ys(e);return t==B||t==x?e.size:Nn(e).length},Lr.snakeCase=qa,Lr.some=function(e,t,r){var n=Hi(e)?Dt:so;return r&&Ts(e,t,r)&&(t=o),n(e,ls(t,3))},Lr.sortedIndex=function(e,t){return io(e,t)},Lr.sortedIndexBy=function(e,t,r){return ao(e,t,ls(r,2))},Lr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=io(e,t);if(n<r&&$i(e[n],t))return n}return-1},Lr.sortedLastIndex=function(e,t){return io(e,t,!0)},Lr.sortedLastIndexBy=function(e,t,r){return ao(e,t,ls(r,2),!0)},Lr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=io(e,t,!0)-1;if($i(e[r],t))return r}return-1},Lr.startCase=Za,Lr.startsWith=function(e,t,r){return e=wa(e),r=null==r?0:cn(ga(r),0,e.length),t=lo(t),e.slice(r,r+t.length)==t},Lr.subtract=Bc,Lr.sum=function(e){return e&&e.length?Yt(e,oc):0},Lr.sumBy=function(e,t){return e&&e.length?Yt(e,ls(t,2)):0},Lr.template=function(e,t,r){var n=Lr.templateSettings;r&&Ts(e,t,r)&&(t=o),e=wa(e),t=Ea({},t,n,es);var s=Ea({},t.imports,n.imports,es),i=Ra(s),a=er(s,i);Wt(i,function(e){if(fe.test(e))throw new Pe(\"Invalid `imports` option passed into `_.template`\")});var c,u,l=0,d=t.interpolate||Ae,f=\"__p += '\",p=Se((t.escape||Ae).source+\"|\"+d.source+\"|\"+(d===ee?he:Ae).source+\"|\"+(t.evaluate||Ae).source+\"|$\",\"g\"),h=\"//# sourceURL=\"+(Me.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++at+\"]\")+\"\\n\";e.replace(p,function(t,r,n,o,s,i){return n||(n=o),f+=e.slice(l,i).replace(Ee,ir),r&&(c=!0,f+=\"' +\\n__e(\"+r+\") +\\n'\"),s&&(u=!0,f+=\"';\\n\"+s+\";\\n__p += '\"),n&&(f+=\"' +\\n((__t = (\"+n+\")) == null ? '' : __t) +\\n'\"),l=i+t.length,t}),f+=\"';\\n\";var g=Me.call(t,\"variable\")&&t.variable;if(g){if(fe.test(g))throw new Pe(\"Invalid `variable` option passed into `_.template`\")}else f=\"with (obj) {\\n\"+f+\"\\n}\\n\";f=(u?f.replace(H,\"\"):f).replace(G,\"$1\").replace(K,\"$1;\"),f=\"function(\"+(g||\"obj\")+\") {\\n\"+(g?\"\":\"obj || (obj = {});\\n\")+\"var __t, __p = ''\"+(c?\", __e = _.escape\":\"\")+(u?\", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, '') }\\n\":\";\\n\")+f+\"return __p\\n}\";var y=Qa(function(){return Be(i,h+\"return \"+f).apply(o,a)});if(y.source=f,Ji(y))throw y;return y},Lr.times=function(e,t){if((e=ga(e))<1||e>h)return[];var r=y,n=wr(e,y);t=ls(t),e-=y;for(var o=Jt(n,t);++r<e;)t(r);return o},Lr.toFinite=ha,Lr.toInteger=ga,Lr.toLength=ya,Lr.toLower=function(e){return wa(e).toLowerCase()},Lr.toNumber=ma,Lr.toSafeInteger=function(e){return e?cn(ga(e),-9007199254740991,h):0===e?e:0},Lr.toString=wa,Lr.toUpper=function(e){return wa(e).toUpperCase()},Lr.trim=function(e,t,r){if((e=wa(e))&&(r||t===o))return Xt(e);if(!e||!(t=lo(t)))return e;var n=hr(e),s=hr(t);return Eo(n,rr(n,s),nr(n,s)+1).join(\"\")},Lr.trimEnd=function(e,t,r){if((e=wa(e))&&(r||t===o))return e.slice(0,gr(e)+1);if(!e||!(t=lo(t)))return e;var n=hr(e);return Eo(n,0,nr(n,hr(t))+1).join(\"\")},Lr.trimStart=function(e,t,r){if((e=wa(e))&&(r||t===o))return e.replace(ie,\"\");if(!e||!(t=lo(t)))return e;var n=hr(e);return Eo(n,rr(n,hr(t))).join(\"\")},Lr.truncate=function(e,t){var r=30,n=\"...\";if(ta(t)){var s=\"separator\"in t?t.separator:s;r=\"length\"in t?ga(t.length):r,n=\"omission\"in t?lo(t.omission):n}var i=(e=wa(e)).length;if(ar(e)){var a=hr(e);i=a.length}if(r>=i)return e;var c=r-pr(n);if(c<1)return n;var u=a?Eo(a,0,c).join(\"\"):e.slice(0,c);if(s===o)return u+n;if(a&&(c+=u.length-c),ia(s)){if(e.slice(c).search(s)){var l,d=u;for(s.global||(s=Se(s.source,wa(ge.exec(s))+\"g\")),s.lastIndex=0;l=s.exec(d);)var f=l.index;u=u.slice(0,f===o?c:f)}}else if(e.indexOf(lo(s),c)!=c){var p=u.lastIndexOf(s);p>-1&&(u=u.slice(0,p))}return u+n},Lr.unescape=function(e){return(e=wa(e))&&Y.test(e)?e.replace(q,yr):e},Lr.uniqueId=function(e){var t=++Ne;return wa(e)+t},Lr.upperCase=Ya,Lr.upperFirst=Ja,Lr.each=wi,Lr.eachRight=vi,Lr.first=Ks,cc(Lr,(Ac={},Tn(Lr,function(e,t){Me.call(Lr.prototype,t)||(Ac[t]=e)}),Ac),{chain:!1}),Lr.VERSION=\"4.18.1\",Wt([\"bind\",\"bindKey\",\"curry\",\"curryRight\",\"partial\",\"partialRight\"],function(e){Lr[e].placeholder=Lr}),Wt([\"drop\",\"take\"],function(e,t){Vr.prototype[e]=function(r){r=r===o?1:br(ga(r),0);var n=this.__filtered__&&!t?new Vr(this):this.clone();return n.__filtered__?n.__takeCount__=wr(r,n.__takeCount__):n.__views__.push({size:wr(r,y),type:e+(n.__dir__<0?\"Right\":\"\")}),n},Vr.prototype[e+\"Right\"]=function(t){return this.reverse()[e](t).reverse()}}),Wt([\"filter\",\"map\",\"takeWhile\"],function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ls(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),Wt([\"head\",\"last\"],function(e,t){var r=\"take\"+(t?\"Right\":\"\");Vr.prototype[e]=function(){return this[r](1).value()[0]}}),Wt([\"initial\",\"tail\"],function(e,t){var r=\"drop\"+(t?\"\":\"Right\");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}}),Vr.prototype.compact=function(){return this.filter(oc)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Jn(function(e,t){return\"function\"==typeof e?new Vr(this):this.map(function(r){return _n(r,e,t)})}),Vr.prototype.reject=function(e){return this.filter(Mi(ls(e)))},Vr.prototype.slice=function(e,t){e=ga(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ga(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(y)},Tn(Vr.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Lr[n?\"take\"+(\"last\"==t?\"Right\":\"\"):t],i=n||/^find/.test(t);s&&(Lr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof Vr,u=a[0],l=c||Hi(t),d=function(e){var t=s.apply(Lr,Mt([e],a));return n&&f?t[0]:t};l&&r&&\"function\"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,p=!!this.__actions__.length,h=i&&!f,g=c&&!p;if(!i&&l){t=g?t:new Vr(this);var y=e.apply(t,a);return y.__actions__.push({func:hi,args:[d],thisArg:o}),new jr(y,f)}return h&&g?e.apply(this,a):(y=this.thru(d),h?n?y.value()[0]:y.value():y)})}),Wt([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(e){var t=_e[e],r=/^(?:push|sort|unshift)$/.test(e)?\"tap\":\"thru\",n=/^(?:pop|shift)$/.test(e);Lr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Hi(o)?o:[],e)}return this[r](function(r){return t.apply(Hi(r)?r:[],e)})}}),Tn(Vr.prototype,function(e,t){var r=Lr[t];if(r){var n=r.name+\"\";Me.call(_r,n)||(_r[n]=[]),_r[n].push({name:t,func:r})}}),_r[zo(o,2).name]=[{name:\"wrapper\",func:o}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=_o(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_o(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_o(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Hi(e),n=t<0,o=r?e.length:0,s=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var s=r[n],i=s.size;switch(s.type){case\"drop\":e+=i;break;case\"dropRight\":t-=i;break;case\"take\":t=wr(t,e+i);break;case\"takeRight\":e=br(e,t-i)}}return{start:e,end:t}}(0,o,this.__views__),i=s.start,a=s.end,c=a-i,u=n?a:i-1,l=this.__iteratees__,d=l.length,f=0,p=wr(c,this.__takeCount__);if(!r||!n&&o==c&&p==c)return yo(e,this.__actions__);var h=[];e:for(;c--&&f<p;){for(var g=-1,y=e[u+=t];++g<d;){var m=l[g],b=m.iteratee,w=m.type,v=b(y);if(2==w)y=v;else if(!v){if(1==w)continue e;break e}}h[f++]=y}return h},Lr.prototype.at=gi,Lr.prototype.chain=function(){return pi(this)},Lr.prototype.commit=function(){return new jr(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===o&&(this.__values__=pa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Lr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Ls(r);n.__index__=0,n.__values__=o,t?s.__wrapped__=n:t=n;var s=n;r=r.__wrapped__}return s.__wrapped__=e,t},Lr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:hi,args:[ti],thisArg:o}),new jr(t,this.__chain__)}return this.thru(ti)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,Xe&&(Lr.prototype[Xe]=function(){return this}),Lr}();gt._=mr,(n=function(){return mr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},8308(e,t,r){const n=Symbol(\"SemVer ANY\");class o{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\\s+/).join(\" \"),u(\"comparator\",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value=\"\":this.value=this.operator+this.semver.version,u(\"comp\",this)}parse(e){const t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:\"\",\"=\"===this.operator&&(this.operator=\"\"),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u(\"Comparator.test\",e,this.options.loose),this.semver===n||e===n)return!0;if(\"string\"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError(\"a Comparator is required\");return\"\"===this.operator?\"\"===this.value||new d(e.value,t).test(this.value):\"\"===e.operator?\"\"===e.value||new d(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||\"<0.0.0-0\"!==this.value&&\"<0.0.0-0\"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith(\"<0.0.0\")||e.value.startsWith(\"<0.0.0\")))&&(!(!this.operator.startsWith(\">\")||!e.operator.startsWith(\">\"))||(!(!this.operator.startsWith(\"<\")||!e.operator.startsWith(\"<\"))||(!(this.semver.version!==e.semver.version||!this.operator.includes(\"=\")||!e.operator.includes(\"=\"))||(!!(c(this.semver,\"<\",e.semver,t)&&this.operator.startsWith(\">\")&&e.operator.startsWith(\"<\"))||!!(c(this.semver,\">\",e.semver,t)&&this.operator.startsWith(\"<\")&&e.operator.startsWith(\">\")))))))}}e.exports=o;const s=r(3607),{safeRe:i,t:a}=r(946),c=r(835),u=r(6820),l=r(7784),d=r(2859)},2859(e,t,r){const n=/\\s+/g;class o{constructor(e,t){if(t=i(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n,\" \"),this.set=this.raw.split(\"||\").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!m(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted=\"\";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=\"||\");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=\" \"),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&g)|(this.options.loose&&y))+\":\"+e,r=s.get(t);if(r)return r;const n=this.options.loose,o=n?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(o,x(this.options.includePrerelease)),c(\"hyphen replace\",e),e=e.replace(l[d.COMPARATORTRIM],f),c(\"comparator trim\",e),e=e.replace(l[d.TILDETRIM],p),c(\"tilde trim\",e),e=e.replace(l[d.CARETTRIM],h),c(\"caret trim\",e);let i=e.split(\" \").map(e=>v(e,this.options)).join(\" \").split(/\\s+/).map(e=>W(e,this.options));n&&(i=i.filter(e=>(c(\"loose invalid filter\",e,this.options),!!e.match(l[d.COMPARATORLOOSE])))),c(\"range list\",i);const u=new Map,b=i.map(e=>new a(e,this.options));for(const e of b){if(m(e))return[e];u.set(e.value,e)}u.size>1&&u.has(\"\")&&u.delete(\"\");const w=[...u.values()];return s.set(t,w),w}intersects(e,t){if(!(e instanceof o))throw new TypeError(\"a Range is required\");return this.set.some(r=>w(r,t)&&e.set.some(e=>w(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if(\"string\"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(_(this.set[t],e,this.options))return!0;return!1}}e.exports=o;const s=new(r(4390)),i=r(3607),a=r(8308),c=r(6820),u=r(7784),{safeRe:l,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:h}=r(946),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:y}=r(4830),m=e=>\"<0.0.0-0\"===e.value,b=e=>\"\"===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},v=(e,t)=>(c(\"comp\",e,t),e=P(e,t),c(\"caret\",e),e=A(e,t),c(\"tildes\",e),e=C(e,t),c(\"xrange\",e),e=S(e,t),c(\"stars\",e),e),T=e=>!e||\"x\"===e.toLowerCase()||\"*\"===e,A=(e,t)=>e.trim().split(/\\s+/).map(e=>E(e,t)).join(\" \"),E=(e,t)=>{const r=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(r,(t,r,n,o,s)=>{let i;return c(\"tilde\",e,t,r,n,o,s),T(r)?i=\"\":T(n)?i=`>=${r}.0.0 <${+r+1}.0.0-0`:T(o)?i=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(c(\"replaceTilde pr\",s),i=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):i=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,c(\"tilde return\",i),i})},P=(e,t)=>e.trim().split(/\\s+/).map(e=>B(e,t)).join(\" \"),B=(e,t)=>{c(\"caret\",e,t);const r=t.loose?l[d.CARETLOOSE]:l[d.CARET],n=t.includePrerelease?\"-0\":\"\";return e.replace(r,(t,r,o,s,i)=>{let a;return c(\"caret\",e,t,r,o,s,i),T(r)?a=\"\":T(o)?a=`>=${r}.0.0${n} <${+r+1}.0.0-0`:T(s)?a=\"0\"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:i?(c(\"replaceCaret pr\",i),a=\"0\"===r?\"0\"===o?`>=${r}.${o}.${s}-${i} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${i} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${i} <${+r+1}.0.0-0`):(c(\"no pr\"),a=\"0\"===r?\"0\"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),c(\"caret return\",a),a})},C=(e,t)=>(c(\"replaceXRanges\",e,t),e.split(/\\s+/).map(e=>I(e,t)).join(\" \")),I=(e,t)=>{e=e.trim();const r=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(r,(r,n,o,s,i,a)=>{c(\"xRange\",e,r,n,o,s,i,a);const u=T(o),l=u||T(s),d=l||T(i),f=d;return\"=\"===n&&f&&(n=\"\"),a=t.includePrerelease?\"-0\":\"\",u?r=\">\"===n||\"<\"===n?\"<0.0.0-0\":\"*\":n&&f?(l&&(s=0),i=0,\">\"===n?(n=\">=\",l?(o=+o+1,s=0,i=0):(s=+s+1,i=0)):\"<=\"===n&&(n=\"<\",l?o=+o+1:s=+s+1),\"<\"===n&&(a=\"-0\"),r=`${n+o}.${s}.${i}${a}`):l?r=`>=${o}.0.0${a} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${s}.0${a} <${o}.${+s+1}.0-0`),c(\"xRange return\",r),r})},S=(e,t)=>(c(\"replaceStars\",e,t),e.trim().replace(l[d.STAR],\"\")),W=(e,t)=>(c(\"replaceGTE0\",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],\"\")),x=e=>(t,r,n,o,s,i,a,c,u,l,d,f)=>`${r=T(n)?\"\":T(o)?`>=${n}.0.0${e?\"-0\":\"\"}`:T(s)?`>=${n}.${o}.0${e?\"-0\":\"\"}`:i?`>=${r}`:`>=${r}${e?\"-0\":\"\"}`} ${c=T(u)?\"\":T(l)?`<${+u+1}.0.0-0`:T(d)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${d}-${f}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),_=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==a.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},7784(e,t,r){const n=r(6820),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(4830),{safeRe:i,safeSrc:a,t:c}=r(946),u=r(3607),{compareIdentifiers:l}=r(5647);class d{constructor(e,t){if(t=u(t),e instanceof d){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(\"string\"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof e}\".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n(\"SemVer\",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[c.LOOSE]:i[c.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError(\"Invalid major version\");if(this.minor>s||this.minor<0)throw new TypeError(\"Invalid minor version\");if(this.patch>s||this.patch<0)throw new TypeError(\"Invalid patch version\");r[4]?this.prerelease=r[4].split(\".\").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(\".\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\".\")}`),this.version}toString(){return this.version}compare(e){if(n(\"SemVer.compare\",this.version,this.options,e),!(e instanceof d)){if(\"string\"==typeof e&&e===this.version)return 0;e=new d(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof d||(e=new d(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof d||(e=new d(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n(\"prerelease compare\",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}compareBuild(e){e instanceof d||(e=new d(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n(\"build compare\",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}inc(e,t,r){if(e.startsWith(\"pre\")){if(!t&&!1===r)throw new Error(\"invalid increment argument: identifier is empty\");if(t){const e=new RegExp(`^${this.options.loose?a[c.PRERELEASELOOSE]:a[c.PRERELEASE]}$`),r=`-${t}`.match(e);if(!r||r[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case\"premajor\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\"pre\",t,r);break;case\"preminor\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\"pre\",t,r);break;case\"prepatch\":this.prerelease.length=0,this.inc(\"patch\",t,r),this.inc(\"pre\",t,r);break;case\"prerelease\":0===this.prerelease.length&&this.inc(\"patch\",t,r),this.inc(\"pre\",t,r);break;case\"release\":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case\"major\":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\"minor\":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case\"patch\":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case\"pre\":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)\"number\"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(\".\")&&!1===r)throw new Error(\"invalid increment argument: identifier already exists\");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\".\")}`),this}}e.exports=d},5338(e,t,r){const n=r(1636);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,\"\"),t);return r?r.version:null}},835(e,t,r){const n=r(8925),o=r(3579),s=r(5456),i=r(5933),a=r(2615),c=r(2436);e.exports=(e,t,r,u)=>{switch(t){case\"===\":return\"object\"==typeof e&&(e=e.version),\"object\"==typeof r&&(r=r.version),e===r;case\"!==\":return\"object\"==typeof e&&(e=e.version),\"object\"==typeof r&&(r=r.version),e!==r;case\"\":case\"=\":case\"==\":return n(e,r,u);case\"!=\":return o(e,r,u);case\">\":return s(e,r,u);case\">=\":return i(e,r,u);case\"<\":return a(e,r,u);case\"<=\":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},5478(e,t,r){const n=r(7784),o=r(1636),{safeRe:s,t:i}=r(946);e.exports=(e,t)=>{if(e instanceof n)return e;if(\"number\"==typeof e&&(e=String(e)),\"string\"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?s[i.COERCERTLFULL]:s[i.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?s[i.COERCEFULL]:s[i.COERCE]);if(null===r)return null;const a=r[2],c=r[3]||\"0\",u=r[4]||\"0\",l=t.includePrerelease&&r[5]?`-${r[5]}`:\"\",d=t.includePrerelease&&r[6]?`+${r[6]}`:\"\";return o(`${a}.${c}.${u}${l}${d}`,t)}},5441(e,t,r){const n=r(7784);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},2767(e,t,r){const n=r(532);e.exports=(e,t)=>n(e,t,!0)},532(e,t,r){const n=r(7784);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1092(e,t,r){const n=r(1636);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),s=r.compare(o);if(0===s)return null;const i=s>0,a=i?r:o,c=i?o:r,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return\"major\";if(0===c.compareMain(a))return c.minor&&!c.patch?\"minor\":\"patch\"}const l=u?\"pre\":\"\";return r.major!==o.major?l+\"major\":r.minor!==o.minor?l+\"minor\":r.patch!==o.patch?l+\"patch\":\"prerelease\"}},8925(e,t,r){const n=r(532);e.exports=(e,t,r)=>0===n(e,t,r)},5456(e,t,r){const n=r(532);e.exports=(e,t,r)=>n(e,t,r)>0},5933(e,t,r){const n=r(532);e.exports=(e,t,r)=>n(e,t,r)>=0},7651(e,t,r){const n=r(7784);e.exports=(e,t,r,o,s)=>{\"string\"==typeof r&&(s=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,s).version}catch(e){return null}}},2615(e,t,r){const n=r(532);e.exports=(e,t,r)=>n(e,t,r)<0},2436(e,t,r){const n=r(532);e.exports=(e,t,r)=>n(e,t,r)<=0},3382(e,t,r){const n=r(7784);e.exports=(e,t)=>new n(e,t).major},3650(e,t,r){const n=r(7784);e.exports=(e,t)=>new n(e,t).minor},3579(e,t,r){const n=r(532);e.exports=(e,t,r)=>0!==n(e,t,r)},1636(e,t,r){const n=r(7784);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},8993(e,t,r){const n=r(7784);e.exports=(e,t)=>new n(e,t).patch},2429(e,t,r){const n=r(1636);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},1406(e,t,r){const n=r(532);e.exports=(e,t,r)=>n(t,e,r)},3889(e,t,r){const n=r(5441);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},8346(e,t,r){const n=r(2859);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4955(e,t,r){const n=r(5441);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},4269(e,t,r){const n=r(1636);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},4545(e,t,r){const n=r(946),o=r(4830),s=r(7784),i=r(5647),a=r(1636),c=r(4269),u=r(5338),l=r(7651),d=r(1092),f=r(3382),p=r(3650),h=r(8993),g=r(2429),y=r(532),m=r(1406),b=r(2767),w=r(5441),v=r(4955),T=r(3889),A=r(5456),E=r(2615),P=r(8925),B=r(3579),C=r(5933),I=r(2436),S=r(835),W=r(5478),x=r(8308),_=r(2859),R=r(8346),k=r(2619),O=r(9760),F=r(5578),M=r(7217),N=r(7814),U=r(8247),D=r(6255),L=r(6298),$=r(3720),z=r(1049),j=r(5716);e.exports={parse:a,valid:c,clean:u,inc:l,diff:d,major:f,minor:p,patch:h,prerelease:g,compare:y,rcompare:m,compareLoose:b,compareBuild:w,sort:v,rsort:T,gt:A,lt:E,eq:P,neq:B,gte:C,lte:I,cmp:S,coerce:W,Comparator:x,Range:_,satisfies:R,toComparators:k,maxSatisfying:O,minSatisfying:F,minVersion:M,validRange:N,outside:U,gtr:D,ltr:L,intersects:$,simplifyRange:z,subset:j,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},4830(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:[\"major\",\"premajor\",\"minor\",\"preminor\",\"patch\",\"prepatch\",\"prerelease\"],SEMVER_SPEC_VERSION:\"2.0.0\",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},6820(e){const t=\"object\"==typeof process&&process.env&&/\\bsemver\\b/i.test(\"false\")?(...e)=>console.error(\"SEMVER\",...e):()=>{};e.exports=t},5647(e){const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},4390(e){e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},3607(e){const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?\"object\"!=typeof e?t:e:r},946(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=r(4830),i=r(6820),a=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.safeSrc=[],d=t.t={};let f=0;const p=\"[a-zA-Z0-9-]\",h=[[\"\\\\s\",1],[\"\\\\d\",s],[p,o]],g=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;i(e,o,t),d[e]=o,u[o]=t,l[o]=n,a[o]=new RegExp(t,r?\"g\":void 0),c[o]=new RegExp(n,r?\"g\":void 0)};g(\"NUMERICIDENTIFIER\",\"0|[1-9]\\\\d*\"),g(\"NUMERICIDENTIFIERLOOSE\",\"\\\\d+\"),g(\"NONNUMERICIDENTIFIER\",`\\\\d*[a-zA-Z-]${p}*`),g(\"MAINVERSION\",`(${u[d.NUMERICIDENTIFIER]})\\\\.(${u[d.NUMERICIDENTIFIER]})\\\\.(${u[d.NUMERICIDENTIFIER]})`),g(\"MAINVERSIONLOOSE\",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),g(\"PRERELEASEIDENTIFIER\",`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`),g(\"PRERELEASEIDENTIFIERLOOSE\",`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`),g(\"PRERELEASE\",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\\\.${u[d.PRERELEASEIDENTIFIER]})*))`),g(\"PRERELEASELOOSE\",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),g(\"BUILDIDENTIFIER\",`${p}+`),g(\"BUILD\",`(?:\\\\+(${u[d.BUILDIDENTIFIER]}(?:\\\\.${u[d.BUILDIDENTIFIER]})*))`),g(\"FULLPLAIN\",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),g(\"FULL\",`^${u[d.FULLPLAIN]}$`),g(\"LOOSEPLAIN\",`[v=\\\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),g(\"LOOSE\",`^${u[d.LOOSEPLAIN]}$`),g(\"GTLT\",\"((?:<|>)?=?)\"),g(\"XRANGEIDENTIFIERLOOSE\",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`),g(\"XRANGEIDENTIFIER\",`${u[d.NUMERICIDENTIFIER]}|x|X|\\\\*`),g(\"XRANGEPLAIN\",`[v=\\\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\\\.(${u[d.XRANGEIDENTIFIER]})(?:\\\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),g(\"XRANGEPLAINLOOSE\",`[v=\\\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),g(\"XRANGE\",`^${u[d.GTLT]}\\\\s*${u[d.XRANGEPLAIN]}$`),g(\"XRANGELOOSE\",`^${u[d.GTLT]}\\\\s*${u[d.XRANGEPLAINLOOSE]}$`),g(\"COERCEPLAIN\",`(^|[^\\\\d])(\\\\d{1,${n}})(?:\\\\.(\\\\d{1,${n}}))?(?:\\\\.(\\\\d{1,${n}}))?`),g(\"COERCE\",`${u[d.COERCEPLAIN]}(?:$|[^\\\\d])`),g(\"COERCEFULL\",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?(?:$|[^\\\\d])`),g(\"COERCERTL\",u[d.COERCE],!0),g(\"COERCERTLFULL\",u[d.COERCEFULL],!0),g(\"LONETILDE\",\"(?:~>?)\"),g(\"TILDETRIM\",`(\\\\s*)${u[d.LONETILDE]}\\\\s+`,!0),t.tildeTrimReplace=\"$1~\",g(\"TILDE\",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),g(\"TILDELOOSE\",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),g(\"LONECARET\",\"(?:\\\\^)\"),g(\"CARETTRIM\",`(\\\\s*)${u[d.LONECARET]}\\\\s+`,!0),t.caretTrimReplace=\"$1^\",g(\"CARET\",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),g(\"CARETLOOSE\",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),g(\"COMPARATORLOOSE\",`^${u[d.GTLT]}\\\\s*(${u[d.LOOSEPLAIN]})$|^$`),g(\"COMPARATOR\",`^${u[d.GTLT]}\\\\s*(${u[d.FULLPLAIN]})$|^$`),g(\"COMPARATORTRIM\",`(\\\\s*)${u[d.GTLT]}\\\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=\"$1$2$3\",g(\"HYPHENRANGE\",`^\\\\s*(${u[d.XRANGEPLAIN]})\\\\s+-\\\\s+(${u[d.XRANGEPLAIN]})\\\\s*$`),g(\"HYPHENRANGELOOSE\",`^\\\\s*(${u[d.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${u[d.XRANGEPLAINLOOSE]})\\\\s*$`),g(\"STAR\",\"(<|>)?=?\\\\s*\\\\*\"),g(\"GTE0\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\"),g(\"GTE0PRE\",\"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\")},6255(e,t,r){const n=r(8247);e.exports=(e,t,r)=>n(e,t,\">\",r)},3720(e,t,r){const n=r(2859);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},6298(e,t,r){const n=r(8247);e.exports=(e,t,r)=>n(e,t,\"<\",r)},9760(e,t,r){const n=r(7784),o=r(2859);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new n(s,r)))}),s}},5578(e,t,r){const n=r(7784),o=r(2859);e.exports=(e,t,r)=>{let s=null,i=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new n(s,r)))}),s}},7217(e,t,r){const n=r(7784),o=r(2859),s=r(5456);e.exports=(e,t)=>{e=new o(e,t);let r=new n(\"0.0.0\");if(e.test(r))return r;if(r=new n(\"0.0.0-0\"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let i=null;o.forEach(e=>{const t=new n(e.semver.version);switch(e.operator){case\">\":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case\"\":case\">=\":i&&!s(t,i)||(i=t);break;case\"<\":case\"<=\":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),!i||r&&!s(r,i)||(r=i)}return r&&e.test(r)?r:null}},8247(e,t,r){const n=r(7784),o=r(8308),{ANY:s}=o,i=r(2859),a=r(8346),c=r(5456),u=r(2615),l=r(2436),d=r(5933);e.exports=(e,t,r,f)=>{let p,h,g,y,m;switch(e=new n(e,f),t=new i(t,f),r){case\">\":p=c,h=l,g=u,y=\">\",m=\">=\";break;case\"<\":p=u,h=d,g=c,y=\"<\",m=\"<=\";break;default:throw new TypeError('Must provide a hilo val of \"<\" or \">\"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let i=null,a=null;if(n.forEach(e=>{e.semver===s&&(e=new o(\">=0.0.0\")),i=i||e,a=a||e,p(e.semver,i.semver,f)?i=e:g(e.semver,a.semver,f)&&(a=e)}),i.operator===y||i.operator===m)return!1;if((!a.operator||a.operator===y)&&h(e,a.semver))return!1;if(a.operator===m&&g(e,a.semver))return!1}return!0}},1049(e,t,r){const n=r(8346),o=r(532);e.exports=(e,t,r)=>{const s=[];let i=null,a=null;const c=e.sort((e,t)=>o(e,t,r));for(const e of c){n(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push(\"*\");const l=u.join(\" || \"),d=\"string\"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}},5716(e,t,r){const n=r(2859),o=r(8308),{ANY:s}=o,i=r(8346),a=r(532),c=[new o(\">=0.0.0-0\")],u=[new o(\">=0.0.0\")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,p,h,g,y,m;for(const t of e)\">\"===t.operator||\">=\"===t.operator?o=d(o,t,r):\"<\"===t.operator||\"<=\"===t.operator?l=f(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(p=a(o.semver,l.semver,r),p>0)return null;if(0===p&&(\">=\"!==o.operator||\"<=\"!==l.operator))return null}for(const e of n){if(o&&!i(e,String(o),r))return null;if(l&&!i(e,String(l),r))return null;for(const n of t)if(!i(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;b&&1===b.prerelease.length&&\"<\"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(m=m||\">\"===e.operator||\">=\"===e.operator,y=y||\"<\"===e.operator||\"<=\"===e.operator,o)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),\">\"===e.operator||\">=\"===e.operator){if(h=d(o,e,r),h===e&&h!==o)return!1}else if(\">=\"===o.operator&&!i(o.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),\"<\"===e.operator||\"<=\"===e.operator){if(g=f(l,e,r),g===e&&g!==l)return!1}else if(\"<=\"===l.operator&&!i(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==p)return!1}return!(o&&y&&!l&&0!==p)&&(!(l&&m&&!o&&0!==p)&&(!w&&!b))},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||\">\"===t.operator&&\">=\"===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||\"<\"===t.operator&&\"<=\"===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},2619(e,t,r){const n=r(2859);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(\" \").trim().split(\" \"))},7814(e,t,r){const n=r(2859);e.exports=(e,t)=>{try{return new n(e,t).range||\"*\"}catch(e){return null}}},2220(e,t,r){\"use strict\";function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var o=Qe(r(5071)),s=Qe(r(2177)),i=Qe(r(3422)),a=Qe(r(3751)),c=Qe(r(939)),u=Qe(r(335)),l=Qe(r(2929)),d=Qe(r(4156)),f=Qe(r(4121)),p=Qe(r(9711)),h=Qe(r(6331)),g=Qe(r(9026)),y=Qe(r(1881)),m=Qe(r(1426)),b=Qe(r(427)),w=Qe(r(4468)),v=Qe(r(4300)),T=Qe(r(7574)),A=Xe(r(1624)),E=Xe(r(8241)),P=Qe(r(4583)),B=Xe(r(4429)),C=Qe(r(6969)),I=Qe(r(3705)),S=Qe(r(9864)),W=Qe(r(9514)),x=Qe(r(6959)),_=Qe(r(3167)),R=Qe(r(2167)),k=Qe(r(8524)),O=Qe(r(8631)),F=Qe(r(5830)),M=Qe(r(6774)),N=Qe(r(3353)),U=Xe(r(9190)),D=Qe(r(8515)),L=Qe(r(3943)),$=Qe(r(5627)),z=Qe(r(62)),j=Qe(r(9974)),V=Qe(r(9664)),H=Qe(r(7303)),G=Qe(r(6237)),K=Xe(r(8198)),q=Qe(r(6198)),Z=Qe(r(1328)),Y=Qe(r(5410)),J=Qe(r(2937)),X=Qe(r(6528)),Q=Qe(r(8689)),ee=Qe(r(6982)),te=Qe(r(7900)),re=Qe(r(978)),ne=Qe(r(9317)),oe=Qe(r(4685)),se=Qe(r(7706)),ie=Qe(r(385)),ae=Qe(r(3673)),ce=Qe(r(8498)),ue=Qe(r(9013)),le=Qe(r(54)),de=Qe(r(3220)),fe=Qe(r(329)),pe=Qe(r(5098)),he=Qe(r(331)),ge=Qe(r(2452)),ye=Xe(r(2334)),me=Qe(r(3911)),be=Qe(r(1969)),we=Qe(r(3511)),ve=r(7616),Te=Qe(r(4608)),Ae=Qe(r(7692)),Ee=Qe(r(6299)),Pe=Qe(r(5318)),Be=Qe(r(2736)),Ce=Qe(r(6887)),Ie=Qe(r(1687)),Se=Qe(r(4335)),We=Qe(r(1282)),xe=Qe(r(4438)),_e=Qe(r(5997)),Re=Qe(r(5030)),ke=Qe(r(8036)),Oe=Qe(r(3880)),Fe=Qe(r(2054)),Me=Qe(r(6343)),Ne=Xe(r(924)),Ue=Qe(r(448)),De=Qe(r(2690)),Le=Qe(r(3146)),$e=Qe(r(8137)),ze=Qe(r(6070)),je=Qe(r(3350)),Ve=Qe(r(3181)),He=Qe(r(3099)),Ge=Qe(r(4144)),Ke=Qe(r(5635)),qe=Qe(r(5977)),Ze=Qe(r(4063)),Ye=Qe(r(9300)),Je=Qe(r(2731));function Xe(e,t){if(\"function\"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(Xe=function(e,t){if(!t&&e&&e.__esModule)return e;var s,i,a={__proto__:null,default:e};if(null===e||\"object\"!=n(e)&&\"function\"!=typeof e)return a;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)\"default\"!==c&&{}.hasOwnProperty.call(e,c)&&((i=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(i.get||i.set)?s(a,c,i):a[c]=e[c]);return a})(e,t)}function Qe(e){return e&&e.__esModule?e:{default:e}}var et={version:\"13.15.20\",toDate:o.default,toFloat:s.default,toInt:i.default,toBoolean:a.default,equals:c.default,contains:u.default,matches:l.default,isEmail:d.default,isURL:f.default,isMACAddress:p.default,isIP:h.default,isIPRange:g.default,isFQDN:y.default,isBoolean:w.default,isIBAN:K.default,isBIC:q.default,isAbaRouting:T.default,isAlpha:A.default,isAlphaLocales:A.locales,isAlphanumeric:E.default,isAlphanumericLocales:E.locales,isNumeric:P.default,isPassportNumber:B.default,passportNumberLocales:B.locales,isPort:C.default,isLowercase:I.default,isUppercase:S.default,isAscii:x.default,isFullWidth:_.default,isHalfWidth:R.default,isVariableWidth:k.default,isMultibyte:O.default,isSemVer:F.default,isSurrogatePair:M.default,isInt:N.default,isIMEI:W.default,isFloat:U.default,isFloatLocales:U.locales,isDecimal:D.default,isHexadecimal:L.default,isOctal:$.default,isDivisibleBy:z.default,isHexColor:j.default,isRgbColor:V.default,isHSL:H.default,isISRC:G.default,isMD5:Z.default,isHash:Y.default,isJWT:J.default,isJSON:X.default,isEmpty:Q.default,isLength:ee.default,isLocale:v.default,isByteLength:te.default,isULID:re.default,isUUID:ne.default,isMongoId:oe.default,isAfter:se.default,isBefore:ie.default,isIn:ae.default,isLuhnNumber:ce.default,isCreditCard:ue.default,isIdentityCard:le.default,isEAN:de.default,isISIN:fe.default,isISBN:pe.default,isISSN:he.default,isMobilePhone:ye.default,isMobilePhoneLocales:ye.locales,isPostalCode:Ne.default,isPostalCodeLocales:Ne.locales,isEthereumAddress:me.default,isCurrency:be.default,isBtcAddress:we.default,isISO6346:ve.isISO6346,isFreightContainerID:ve.isFreightContainerID,isISO6391:Te.default,isISO8601:Ae.default,isISO15924:Pe.default,isRFC3339:Ee.default,isISO31661Alpha2:Be.default,isISO31661Alpha3:Ce.default,isISO31661Numeric:Ie.default,isISO4217:Se.default,isBase32:We.default,isBase58:xe.default,isBase64:_e.default,isDataURI:Re.default,isMagnetURI:ke.default,isMailtoURI:Oe.default,isMimeType:Fe.default,isLatLong:Me.default,ltrim:Ue.default,rtrim:De.default,trim:Le.default,escape:$e.default,unescape:ze.default,stripLow:je.default,whitelist:Ve.default,blacklist:He.default,isWhitelisted:Ge.default,normalizeEmail:Ke.default,toString,isSlug:qe.default,isStrongPassword:Ye.default,isTaxID:ge.default,isDate:m.default,isTime:b.default,isLicensePlate:Ze.default,isVAT:Je.default,ibanLocales:K.locales};t.default=et;e.exports=t.default,e.exports.default=t.default},7640(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.farsiLocales=t.englishLocales=t.dotDecimal=t.decimal=t.commaDecimal=t.bengaliLocales=t.arabicLocales=t.alphanumeric=t.alpha=void 0;for(var r,n=t.alpha={\"en-US\":/^[A-Z]+$/i,\"az-AZ\":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,\"bg-BG\":/^[А-Я]+$/i,\"cs-CZ\":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\"da-DK\":/^[A-ZÆØÅ]+$/i,\"de-DE\":/^[A-ZÄÖÜß]+$/i,\"el-GR\":/^[Α-ώ]+$/i,\"es-ES\":/^[A-ZÁÉÍÑÓÚÜ]+$/i,\"fa-IR\":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,\"fi-FI\":/^[A-ZÅÄÖ]+$/i,\"fr-FR\":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\"it-IT\":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,\"ja-JP\":/^[ぁ-んァ-ヶｦ-ﾟ一-龠ー・。、]+$/i,\"nb-NO\":/^[A-ZÆØÅ]+$/i,\"nl-NL\":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,\"nn-NO\":/^[A-ZÆØÅ]+$/i,\"hu-HU\":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\"pl-PL\":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\"pt-PT\":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,\"ru-RU\":/^[А-ЯЁ]+$/i,\"kk-KZ\":/^[А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/i,\"sl-SI\":/^[A-ZČĆĐŠŽ]+$/i,\"sk-SK\":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\"sr-RS@latin\":/^[A-ZČĆŽŠĐ]+$/i,\"sr-RS\":/^[А-ЯЂЈЉЊЋЏ]+$/i,\"sv-SE\":/^[A-ZÅÄÖ]+$/i,\"th-TH\":/^[ก-๐\\s]+$/i,\"tr-TR\":/^[A-ZÇĞİıÖŞÜ]+$/i,\"uk-UA\":/^[А-ЩЬЮЯЄIЇҐі]+$/i,\"vi-VN\":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,\"ko-KR\":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\"ku-IQ\":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\"hi-IN\":/^[\\u0900-\\u0961]+[\\u0972-\\u097F]*$/i,\"si-LK\":/^[\\u0D80-\\u0DFF]+$/,\"ta-IN\":/^[\\u0B80-\\u0BFF]+$/i,\"te-IN\":/^[\\u0C00-\\u0C7F]+$/i,\"kn-IN\":/^[\\u0C80-\\u0CFF]+$/i,\"ml-IN\":/^[\\u0D00-\\u0D7F]+$/i,\"gu-IN\":/^[\\u0A80-\\u0AFF]+$/i,\"pa-IN\":/^[\\u0A00-\\u0A7F]+$/i,\"or-IN\":/^[\\u0B00-\\u0B7F]+$/i},o=t.alphanumeric={\"en-US\":/^[0-9A-Z]+$/i,\"az-AZ\":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,\"bg-BG\":/^[0-9А-Я]+$/i,\"cs-CZ\":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\"da-DK\":/^[0-9A-ZÆØÅ]+$/i,\"de-DE\":/^[0-9A-ZÄÖÜß]+$/i,\"el-GR\":/^[0-9Α-ω]+$/i,\"es-ES\":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,\"fi-FI\":/^[0-9A-ZÅÄÖ]+$/i,\"fr-FR\":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\"it-IT\":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,\"ja-JP\":/^[0-9０-９ぁ-んァ-ヶｦ-ﾟ一-龠ー・。、]+$/i,\"hu-HU\":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\"nb-NO\":/^[0-9A-ZÆØÅ]+$/i,\"nl-NL\":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,\"nn-NO\":/^[0-9A-ZÆØÅ]+$/i,\"pl-PL\":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\"pt-PT\":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,\"ru-RU\":/^[0-9А-ЯЁ]+$/i,\"kk-KZ\":/^[0-9А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/i,\"sl-SI\":/^[0-9A-ZČĆĐŠŽ]+$/i,\"sk-SK\":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\"sr-RS@latin\":/^[0-9A-ZČĆŽŠĐ]+$/i,\"sr-RS\":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,\"sv-SE\":/^[0-9A-ZÅÄÖ]+$/i,\"th-TH\":/^[ก-๙\\s]+$/i,\"tr-TR\":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,\"uk-UA\":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,\"ko-KR\":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\"ku-IQ\":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\"vi-VN\":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\"hi-IN\":/^[\\u0900-\\u0963]+[\\u0966-\\u097F]*$/i,\"si-LK\":/^[0-9\\u0D80-\\u0DFF]+$/,\"ta-IN\":/^[0-9\\u0B80-\\u0BFF.]+$/i,\"te-IN\":/^[0-9\\u0C00-\\u0C7F.]+$/i,\"kn-IN\":/^[0-9\\u0C80-\\u0CFF.]+$/i,\"ml-IN\":/^[0-9\\u0D00-\\u0D7F.]+$/i,\"gu-IN\":/^[0-9\\u0A80-\\u0AFF.]+$/i,\"pa-IN\":/^[0-9\\u0A00-\\u0A7F.]+$/i,\"or-IN\":/^[0-9\\u0B00-\\u0B7F.]+$/i},s=t.decimal={\"en-US\":\".\",ar:\"٫\"},i=t.englishLocales=[\"AU\",\"GB\",\"HK\",\"IN\",\"NZ\",\"ZA\",\"ZM\"],a=0;a<i.length;a++)n[r=\"en-\".concat(i[a])]=n[\"en-US\"],o[r]=o[\"en-US\"],s[r]=s[\"en-US\"];for(var c,u=t.arabicLocales=[\"AE\",\"BH\",\"DZ\",\"EG\",\"IQ\",\"JO\",\"KW\",\"LB\",\"LY\",\"MA\",\"QM\",\"QA\",\"SA\",\"SD\",\"SY\",\"TN\",\"YE\"],l=0;l<u.length;l++)n[c=\"ar-\".concat(u[l])]=n.ar,o[c]=o.ar,s[c]=s.ar;for(var d,f=t.farsiLocales=[\"IR\",\"AF\"],p=0;p<f.length;p++)o[d=\"fa-\".concat(f[p])]=o.fa,s[d]=s.ar;for(var h,g=t.bengaliLocales=[\"BD\",\"IN\"],y=0;y<g.length;y++)n[h=\"bn-\".concat(g[y])]=n.bn,o[h]=o.bn,s[h]=s[\"en-US\"];for(var m=t.dotDecimal=[\"ar-EG\",\"ar-LB\",\"ar-LY\"],b=t.commaDecimal=[\"bg-BG\",\"cs-CZ\",\"da-DK\",\"de-DE\",\"el-GR\",\"en-ZM\",\"eo\",\"es-ES\",\"fr-CA\",\"fr-FR\",\"gu-IN\",\"hi-IN\",\"hu-HU\",\"id-ID\",\"it-IT\",\"kk-KZ\",\"kn-IN\",\"ku-IQ\",\"ml-IN\",\"nb-NO\",\"nl-NL\",\"nn-NO\",\"or-IN\",\"pa-IN\",\"pl-PL\",\"pt-PT\",\"ru-RU\",\"si-LK\",\"sl-SI\",\"sr-RS\",\"sr-RS@latin\",\"sv-SE\",\"ta-IN\",\"te-IN\",\"tr-TR\",\"uk-UA\",\"vi-VN\"],w=0;w<m.length;w++)s[m[w]]=s[\"en-US\"];for(var v=0;v<b.length;v++)s[b[v]]=\",\";n[\"fr-CA\"]=n[\"fr-FR\"],o[\"fr-CA\"]=o[\"fr-FR\"],n[\"pt-BR\"]=n[\"pt-PT\"],o[\"pt-BR\"]=o[\"pt-PT\"],s[\"pt-BR\"]=s[\"pt-PT\"],n[\"pl-Pl\"]=n[\"pl-PL\"],o[\"pl-Pl\"]=o[\"pl-PL\"],s[\"pl-Pl\"]=s[\"pl-PL\"],n[\"fa-AF\"]=n.fa},3099(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp(\"[\".concat(t,\"]+\"),\"g\"),\"\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},335(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if((0,n.default)(e),(r=(0,s.default)(r,a)).ignoreCase)return e.toLowerCase().split((0,o.default)(t).toLowerCase()).length>r.minOccurrences;return e.split((0,o.default)(t)).length>r.minOccurrences};var n=i(r(8354)),o=i(r(1069)),s=i(r(2533));function i(e){return e&&e.__esModule?e:{default:e}}var a={ignoreCase:!1,minOccurrences:1};e.exports=t.default,e.exports.default=t.default},939(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e===t};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8137(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e.replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#x27;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\\//g,\"&#x2F;\").replace(/\\\\/g,\"&#x5C;\").replace(/`/g,\"&#96;\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},7574(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=0,r=0;r<e.length;r++)t+=r%3==0?3*e[r]:r%3==1?7*e[r]:1*e[r];return t%10==0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;e.exports=t.default,e.exports.default=t.default},7706(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r=(\"object\"===s(t)?t.comparisonDate:t)||Date().toString(),n=(0,o.default)(r),i=(0,o.default)(e);return!!(i&&n&&i>n)};var n,o=(n=r(5071))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},1624(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"en-US\",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,\"\");else{if(\"string\"!=typeof i)throw new Error(\"ignore should be instance of a String or RegExp\");n=n.replace(new RegExp(\"[\".concat(i.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g,\"\\\\$&\"),\"]\"),\"g\"),\"\")}if(t in s.alpha)return s.alpha[t].test(n);throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);t.locales=Object.keys(s.alpha)},8241(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"en-US\",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,\"\");else{if(\"string\"!=typeof i)throw new Error(\"ignore should be instance of a String or RegExp\");n=n.replace(new RegExp(\"[\".concat(i.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g,\"\\\\$&\"),\"]\"),\"g\"),\"\")}if(t in s.alphanumeric)return s.alphanumeric[t].test(n);throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);t.locales=Object.keys(s.alphanumeric)},6959(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[\\x00-\\x7F]+$/;e.exports=t.default,e.exports.default=t.default},6198(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.slice(4,6).toUpperCase();if(!s.CountryCodes.has(t)&&\"XK\"!==t)return!1;return i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(2736);var i=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;e.exports=t.default,e.exports.default=t.default},1282(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,o.default)(t,c)).crockford)return a.test(e);if(e.length%8==0&&i.test(e))return!0;return!1};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Z2-7]+=*$/,a=/^[A-HJKMNP-TV-Z0-9]+$/,c={crockford:!1};e.exports=t.default,e.exports.default=t.default},4438(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),s.test(e))return!0;return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-HJ-NP-Za-km-z1-9]*$/;e.exports=t.default,e.exports.default=t.default},5997(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r,s;if((0,n.default)(e),t=(0,o.default)(t,{urlSafe:!1,padding:!(null!==(r=t)&&void 0!==r&&r.urlSafe)}),\"\"===e)return!0;if(t.padding&&e.length%4!=0)return!1;s=t.urlSafe?t.padding?c:u:t.padding?i:a;return(!t.padding||e.length%4==0)&&s.test(e)};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Za-z0-9+/]+={0,2}$/,a=/^[A-Za-z0-9+/]+$/,c=/^[A-Za-z0-9_-]+={0,2}$/,u=/^[A-Za-z0-9_-]+$/;e.exports=t.default,e.exports.default=t.default},385(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r=(\"object\"===s(t)?t.comparisonDate:t)||Date().toString(),n=(0,o.default)(r),i=(0,o.default)(e);return!!(i&&n&&i<n)};var n,o=(n=r(5071))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},4468(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if((0,n.default)(e),t.loose)return(0,o.default)(c,e.toLowerCase());return(0,o.default)(a,e)};var n=s(r(8354)),o=s(r(567));function s(e){return e&&e.__esModule?e:{default:e}}var i={loose:!1},a=[\"true\",\"false\",\"1\",\"0\"],c=[].concat(a,[\"yes\",\"no\"]);e.exports=t.default,e.exports.default=t.default},3511(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/,i=/^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/;e.exports=t.default,e.exports.default=t.default},7900(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),\"object\"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=r&&(void 0===n||i<=n)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},9013(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=t.provider,s=e.replace(/[- ]+/g,\"\");if(r&&r.toLowerCase()in i){if(!i[r.toLowerCase()].test(s))return!1}else{if(r&&!(r.toLowerCase()in i))throw new Error(\"\".concat(r,\" is not a valid credit card provider.\"));if(!a.some(function(e){return e.test(s)}))return!1}return(0,o.default)(e)};var n=s(r(8354)),o=s(r(8498));function s(e){return e&&e.__esModule?e:{default:e}}var i={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\\d{3})\\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},a=function(){var e=[];for(var t in i)i.hasOwnProperty(t)&&e.push(i[t]);return e}();e.exports=t.default,e.exports.default=t.default},1969(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),function(e){var t=\"\\\\d{\".concat(e.digits_after_decimal[0],\"}\");e.digits_after_decimal.forEach(function(e,r){0!==r&&(t=\"\".concat(t,\"|\\\\d{\").concat(e,\"}\"))});var r=\"(\".concat(e.symbol.replace(/\\W/,function(e){return\"\\\\\".concat(e)}),\")\").concat(e.require_symbol?\"\":\"?\"),n=\"-?\",o=\"[1-9]\\\\d{0,2}(\\\\\".concat(e.thousands_separator,\"\\\\d{3})*\"),s=\"(\".concat([\"0\",\"[1-9]\\\\d*\",o].join(\"|\"),\")?\"),i=\"(\\\\\".concat(e.decimal_separator,\"(\").concat(t,\"))\").concat(e.require_decimal?\"\":\"?\"),a=s+(e.allow_decimal||e.require_decimal?i:\"\");e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?a+=n:e.negative_sign_before_digits&&(a=n+a));e.allow_negative_sign_placeholder?a=\"( (?!\\\\-))?\".concat(a):e.allow_space_after_symbol?a=\" ?\".concat(a):e.allow_space_after_digits&&(a+=\"( (?!$))?\");e.symbol_after_digits?a+=r:a=r+a;e.allow_negatives&&(e.parens_for_negatives?a=\"(\\\\(\".concat(a,\"\\\\)|\").concat(a,\")\"):e.negative_sign_before_digits||e.negative_sign_after_digits||(a=n+a));return new RegExp(\"^(?!-? )(?=.*\\\\d)\".concat(a,\"$\"))}(t=(0,n.default)(t,i)).test(e)};var n=s(r(2533)),o=s(r(8354));function s(e){return e&&e.__esModule?e:{default:e}}var i={symbol:\"$\",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:\",\",decimal_separator:\".\",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};e.exports=t.default,e.exports.default=t.default},5030(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.split(\",\");if(t.length<2)return!1;var r=t.shift().trim().split(\";\"),n=r.shift();if(\"data:\"!==n.slice(0,5))return!1;var c=n.slice(5);if(\"\"!==c&&!s.test(c))return!1;for(var u=0;u<r.length;u++)if((u!==r.length-1||\"base64\"!==r[u].toLowerCase())&&!i.test(r[u]))return!1;for(var l=0;l<t.length;l++)if(!a.test(t[l]))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[a-z]+\\/[a-z0-9\\-\\+\\._]+$/i,i=/^[a-z\\-]+=[a-z0-9\\-]+$/i,a=/^[a-z0-9!\\$&'\\(\\)\\*\\+,;=\\-\\._~:@\\/\\?%\\s]*$/i;e.exports=t.default,e.exports.default=t.default},1426(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){t=\"string\"==typeof t?(0,o.default)({format:t},c):(0,o.default)(t,c);if(\"string\"==typeof e&&(w=t.format,/(^(y{4}|y{2})[.\\/-](m{1,2})[.\\/-](d{1,2})$)|(^(m{1,2})[.\\/-](d{1,2})[.\\/-]((y{4}|y{2})$))|(^(d{1,2})[.\\/-](m{1,2})[.\\/-]((y{4}|y{2})$))/gi.test(w))){if(t.strictMode&&e.length!==t.format.length)return!1;var r,n=t.delimiters.find(function(e){return-1!==t.format.indexOf(e)}),a=t.strictMode?n:t.delimiters.find(function(t){return-1!==e.indexOf(t)}),u=function(e,t){for(var r=[],n=Math.max(e.length,t.length),o=0;o<n;o++)r.push([e[o],t[o]]);return r}(e.split(a),t.format.toLowerCase().split(n)),l={},d=function(e,t){var r=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var s,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}(u);try{for(d.s();!(r=d.n()).done;){var f=s(r.value,2),p=f[0],h=f[1];if(!p||!h||p.length!==h.length)return!1;l[h.charAt(0)]=p}}catch(e){d.e(e)}finally{d.f()}var g=l.y;if(g.startsWith(\"-\"))return!1;if(2===l.y.length){var y=parseInt(l.y,10);if(isNaN(y))return!1;g=y<(new Date).getFullYear()%100?\"20\".concat(l.y):\"19\".concat(l.y)}var m=l.m;1===l.m.length&&(m=\"0\".concat(l.m));var b=l.d;return 1===l.d.length&&(b=\"0\".concat(l.d)),new Date(\"\".concat(g,\"-\").concat(m,\"-\").concat(b,\"T00:00:00.000Z\")).getUTCDate()===+l.d}var w;if(!t.strictMode)return\"[object Date]\"===Object.prototype.toString.call(e)&&isFinite(e);return!1};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,s,i,a=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}(e,t)||i(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function i(e,t){if(e){if(\"string\"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var c={format:\"YYYY/MM/DD\",delimiters:[\"/\",\"-\"],strictMode:!1};e.exports=t.default,e.exports.default=t.default},8515(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),(t=(0,n.default)(t,c)).locale in i.decimal)return!(0,s.default)(u,e.replace(/ /g,\"\"))&&function(e){var t=new RegExp(\"^[-+]?([0-9]+)?(\\\\\".concat(i.decimal[e.locale],\"[0-9]{\").concat(e.decimal_digits,\"})\").concat(e.force_decimal?\"\":\"?\",\"$\"));return t}(t).test(e);throw new Error(\"Invalid locale '\".concat(t.locale,\"'\"))};var n=a(r(2533)),o=a(r(8354)),s=a(r(567)),i=r(7640);function a(e){return e&&e.__esModule?e:{default:e}}var c={force_decimal:!1,decimal_digits:\"1,\",locale:\"en-US\"},u=[\"\",\"-\",\"+\"];e.exports=t.default,e.exports.default=t.default},62(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)(e),(0,o.default)(e)%parseInt(t,10)===0};var n=s(r(8354)),o=s(r(2177));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3220(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=Number(e.slice(-1));return s.test(e)&&t===(r=e,n=10-r.slice(0,-1).split(\"\").map(function(e,t){return Number(e)*function(e,t){return 8===e||14===e?t%2==0?3:1:t%2==0?1:3}(r.length,t)}).reduce(function(e,t){return e+t},0)%10,n<10?n:0);var r,n};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(\\d{8}|\\d{13}|\\d{14})$/;e.exports=t.default,e.exports.default=t.default},4156(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,c.default)(t,l)).require_display_name||t.allow_display_name){var r=e.match(d);if(r){var u=r[1];if(e=e.replace(u,\"\").replace(/(^<|>$)/g,\"\"),u.endsWith(\" \")&&(u=u.slice(0,-1)),!function(e){var t=e.replace(/^\"(.+)\"$/,\"$1\");if(!t.trim())return!1;if(/[\\.\";<>]/.test(t)){if(t===e)return!1;if(!(t.split('\"').length===t.split('\\\\\"').length))return!1}return!0}(u))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>254)return!1;var m=e.split(\"@\"),b=m.pop(),w=b.toLowerCase();if(t.host_blacklist.length>0&&(0,o.default)(w,t.host_blacklist))return!1;if(t.host_whitelist.length>0&&!(0,o.default)(w,t.host_whitelist))return!1;var v=m.join(\"@\");if(t.domain_specific_validation&&(\"gmail.com\"===w||\"googlemail.com\"===w)){var T=(v=v.toLowerCase()).split(\"+\")[0];if(!(0,s.default)(T.replace(/\\./g,\"\"),{min:6,max:30}))return!1;for(var A=T.split(\".\"),E=0;E<A.length;E++)if(!p.test(A[E]))return!1}if(!(!1!==t.ignore_max_length||(0,s.default)(v,{max:64})&&(0,s.default)(b,{max:254})))return!1;if(!(0,i.default)(b,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,a.default)(b)){if(!b.startsWith(\"[\")||!b.endsWith(\"]\"))return!1;var P=b.slice(1,-1);if(0===P.length||!(0,a.default)(P))return!1}}if(t.blacklisted_chars&&-1!==v.search(new RegExp(\"[\".concat(t.blacklisted_chars,\"]+\"),\"g\")))return!1;if('\"'===v[0]&&'\"'===v[v.length-1])return v=v.slice(1,v.length-1),t.allow_utf8_local_part?y.test(v):h.test(v);for(var B=t.allow_utf8_local_part?g:f,C=v.split(\".\"),I=0;I<C.length;I++)if(!B.test(C[I]))return!1;return!0};var n=u(r(8354)),o=u(r(8755)),s=u(r(7900)),i=u(r(1881)),a=u(r(6331)),c=u(r(2533));function u(e){return e&&e.__esModule?e:{default:e}}var l={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:\"\",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},d=/^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)</i,f=/^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i,p=/^[a-z\\d]+$/,h=/^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i,g=/^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A1-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i,y=/^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;e.exports=t.default,e.exports.default=t.default},8689(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)(e),0===((t=(0,o.default)(t,i)).ignore_whitespace?e.trim().length:e.length)};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var i={ignore_whitespace:!1};e.exports=t.default,e.exports.default=t.default},3911(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default},1881(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,o.default)(t,i)).allow_trailing_dot&&\".\"===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf(\"*.\")&&(e=e.substring(2));var r=e.split(\".\"),s=r[r.length-1];if(t.require_tld){if(r.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\\u00A1-\\u00A8\\u00AA-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/\\s/.test(s))return!1}if(!t.allow_numeric_tld&&/^\\d+$/.test(s))return!1;return r.every(function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(e)&&(!/[\\uff01-\\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))})};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var i={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},9190(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e),t=t||{};var r=new RegExp(\"^(?:[-+])?(?:[0-9]+)?(?:\\\\\".concat(t.locale?s.decimal[t.locale]:\".\",\"[0-9]*)?(?:[eE][\\\\+\\\\-]?(?:[0-9]+))?$\"));if(\"\"===e||\".\"===e||\",\"===e||\"-\"===e||\"+\"===e)return!1;var i=parseFloat(e.replace(\",\",\".\"));return r.test(e)&&(!t.hasOwnProperty(\"min\")||(0,o.default)(t.min)||i>=t.min)&&(!t.hasOwnProperty(\"max\")||(0,o.default)(t.max)||i<=t.max)&&(!t.hasOwnProperty(\"lt\")||(0,o.default)(t.lt)||i<t.lt)&&(!t.hasOwnProperty(\"gt\")||(0,o.default)(t.gt)||i>t.gt)},t.locales=void 0;var n=i(r(8354)),o=i(r(3224)),s=r(7640);function i(e){return e&&e.__esModule?e:{default:e}}t.locales=Object.keys(s.decimal)},3167(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.fullWidth=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=t.fullWidth=/[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/},7303(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.replace(/\\s+/g,\" \").replace(/\\s?(hsla?\\(|\\)|,)\\s?/gi,\"$1\");if(-1!==t.indexOf(\",\"))return s.test(t);return i.test(t)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^hsla?\\(((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%){2}(,((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%?))?\\)$/i,i=/^hsla?\\(((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?))(deg|grad|rad|turn)?(\\s(\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%){2}\\s?(\\/\\s((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%?)\\s?)?\\)$/i;e.exports=t.default,e.exports.default=t.default},2167(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.halfWidth=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=t.halfWidth=/[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/},5410(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),new RegExp(\"^[a-fA-F0-9]{\".concat(s[t],\"}$\")).test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default},9974(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;e.exports=t.default,e.exports.default=t.default},3943(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0x|0h)?[0-9A-F]+$/i;e.exports=t.default,e.exports.default=t.default},8198(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.default)(e),function(e,t){var r=e.replace(/[\\s\\-]+/gi,\"\").toUpperCase(),n=r.slice(0,2).toUpperCase(),s=n in i;if(t.whitelist){if(!function(e){if(e.filter(function(e){return!(e in i)}).length>0)return!1;return!0}(t.whitelist))return!1;if(!(0,o.default)(t.whitelist,n))return!1}if(t.blacklist){if((0,o.default)(t.blacklist,n))return!1}return s&&i[n].test(r)}(e,t)&&function(e){var t=e.replace(/[^A-Z0-9]+/gi,\"\").toUpperCase();return 1===(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,function(e){return e.charCodeAt(0)-55}).match(/\\d{1,7}/g).reduce(function(e,t){return Number(e+t)%97},\"\")}(e)},t.locales=void 0;var n=s(r(8354)),o=s(r(567));function s(e){return e&&e.__esModule?e:{default:e}}var i={AD:/^(AD[0-9]{2})\\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\\d{3}\\d{16}$/,AL:/^(AL[0-9]{2})\\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\\d{20}$/,BA:/^(BA[0-9]{2})\\d{16}$/,BE:/^(BE[0-9]{2})\\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\\d{20}$/,CH:/^(CH[0-9]{2})\\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\\d{18}$/,CY:/^(CY[0-9]{2})\\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\\d{20}$/,DE:/^(DE[0-9]{2})\\d{18}$/,DK:/^(DK[0-9]{2})\\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\\d{20}$/,DZ:/^(DZ\\d{24})$/,EE:/^(EE[0-9]{2})\\d{16}$/,EG:/^(EG[0-9]{2})\\d{25}$/,ES:/^(ES[0-9]{2})\\d{20}$/,FI:/^(FI[0-9]{2})\\d{14}$/,FO:/^(FO[0-9]{2})\\d{14}$/,FR:/^(FR[0-9]{2})\\d{10}[A-Z0-9]{11}\\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\\d{14}$/,GR:/^(GR[0-9]{2})\\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\\d{17}$/,HU:/^(HU[0-9]{2})\\d{24}$/,IE:/^(IE[0-9]{2})[A-Z]{4}\\d{14}$/,IL:/^(IL[0-9]{2})\\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\\d{15}$/,IR:/^(IR[0-9]{2})0\\d{2}0\\d{18}$/,IS:/^(IS[0-9]{2})\\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\\d{16}$/,LU:/^(LU[0-9]{2})\\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\\d{10}[A-Z0-9]{11}\\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\\d{18}$/,MK:/^(MK[0-9]{2})\\d{3}[A-Z0-9]{10}\\d{2}$/,MR:/^(MR[0-9]{2})\\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\\d{10}$/,NO:/^(NO[0-9]{2})\\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\\d{16}$/,PL:/^(PL[0-9]{2})\\d{24}$/,PS:/^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,PT:/^(PT[0-9]{2})\\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\\d{18}$/,SA:/^(SA[0-9]{2})\\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\\d{20}$/,SI:/^(SI[0-9]{2})\\d{15}$/,SK:/^(SK[0-9]{2})\\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\\d{20}$/,TL:/^(TL[0-9]{2})\\d{19}$/,TN:/^(TN[0-9]{2})\\d{20}$/,TR:/^(TR[0-9]{2})\\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\\d{18}$/,VG:/^(VG[0-9]{2})[A-Z]{4}\\d{16}$/,XK:/^(XK[0-9]{2})\\d{16}$/};t.locales=Object.keys(i)},9514(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=s;(t=t||{}).allow_hyphens&&(r=i);if(!r.test(e))return!1;e=e.replace(/-/g,\"\");for(var n=0,a=2,c=0;c<14;c++){var u=e.substring(14-c-1,14-c),l=parseInt(u,10)*a;n+=l>=10?l%10+1:l,1===a?a+=1:a-=1}if((10-n%10)%10!==parseInt(e.substring(14,15),10))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[0-9]{15}$/,i=/^\\d{2}-\\d{6}-\\d{6}-\\d{1}$/;e.exports=t.default,e.exports.default=t.default},6331(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(t);var n=(\"object\"===s(r)?r.version:arguments[1])||\"\";if(!n)return e(t,{version:4})||e(t,{version:6});if(\"4\"===n.toString())return c.test(t);if(\"6\"===n.toString())return l.test(t);return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}var i=\"(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\",a=\"(\".concat(i,\"[.]){3}\").concat(i),c=new RegExp(\"^\".concat(a,\"$\")),u=\"(?:[0-9a-fA-F]{1,4})\",l=new RegExp(\"^(\"+\"(?:\".concat(u,\":){7}(?:\").concat(u,\"|:)|\")+\"(?:\".concat(u,\":){6}(?:\").concat(a,\"|:\").concat(u,\"|:)|\")+\"(?:\".concat(u,\":){5}(?::\").concat(a,\"|(:\").concat(u,\"){1,2}|:)|\")+\"(?:\".concat(u,\":){4}(?:(:\").concat(u,\"){0,1}:\").concat(a,\"|(:\").concat(u,\"){1,3}|:)|\")+\"(?:\".concat(u,\":){3}(?:(:\").concat(u,\"){0,2}:\").concat(a,\"|(:\").concat(u,\"){1,4}|:)|\")+\"(?:\".concat(u,\":){2}(?:(:\").concat(u,\"){0,3}:\").concat(a,\"|(:\").concat(u,\"){1,5}|:)|\")+\"(?:\".concat(u,\":){1}(?:(:\").concat(u,\"){0,4}:\").concat(a,\"|(:\").concat(u,\"){1,6}|:)|\")+\"(?::((?::\".concat(u,\"){0,5}:\").concat(a,\"|(?::\").concat(u,\"){1,7}|:))\")+\")(%[0-9a-zA-Z.]{1,})?$\");e.exports=t.default,e.exports.default=t.default},9026(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";(0,n.default)(e);var r=e.split(\"/\");if(2!==r.length)return!1;if(!i.test(r[1]))return!1;if(r[1].length>1&&r[1].startsWith(\"0\"))return!1;if(!(0,o.default)(r[0],t))return!1;var s=null;switch(String(t)){case\"4\":s=32;break;case\"6\":s=128;break;default:s=(0,o.default)(r[0],\"6\")?128:32}return r[1]<=s&&r[1]>=0};var n=s(r(8354)),o=s(r(6331));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^\\d{1,3}$/;e.exports=t.default,e.exports.default=t.default},5098(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r){(0,o.default)(t);var n=String((null==r?void 0:r.version)||r);if(!(null!=r&&r.version||r))return e(t,{version:10})||e(t,{version:13});var c=t.replace(/[\\s-]+/g,\"\"),u=0;if(\"10\"===n){if(!s.test(c))return!1;for(var l=0;l<n-1;l++)u+=(l+1)*c.charAt(l);if(\"X\"===c.charAt(9)?u+=100:u+=10*c.charAt(9),u%11==0)return!0}else if(\"13\"===n){if(!i.test(c))return!1;for(var d=0;d<12;d++)u+=a[d%2]*c.charAt(d);if(c.charAt(12)-(10-u%10)%10==0)return!0}return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?:[0-9]{9}X|[0-9]{10})$/,i=/^(?:[0-9]{13})$/,a=[1,3];e.exports=t.default,e.exports.default=t.default},329(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=!0,r=0,n=e.length-2;n>=0;n--)if(e[n]>=\"A\"&&e[n]<=\"Z\")for(var i=e[n].charCodeAt(0)-55,a=0,c=[i%10,Math.trunc(i/10)];a<c.length;a++){var u=c[a];r+=t?u>=5?1+2*(u-5):2*u:u,t=!t}else{var l=e[n].charCodeAt(0)-\"0\".charCodeAt(0);r+=t?l>=5?1+2*(l-5):2*l:l,t=!t}var d=10*Math.trunc((r+9)/10)-r;return+e[e.length-1]===d};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;e.exports=t.default,e.exports.default=t.default},5318(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ScriptCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"Adlm\",\"Afak\",\"Aghb\",\"Ahom\",\"Arab\",\"Aran\",\"Armi\",\"Armn\",\"Avst\",\"Bali\",\"Bamu\",\"Bass\",\"Batk\",\"Beng\",\"Bhks\",\"Blis\",\"Bopo\",\"Brah\",\"Brai\",\"Bugi\",\"Buhd\",\"Cakm\",\"Cans\",\"Cari\",\"Cham\",\"Cher\",\"Chis\",\"Chrs\",\"Cirt\",\"Copt\",\"Cpmn\",\"Cprt\",\"Cyrl\",\"Cyrs\",\"Deva\",\"Diak\",\"Dogr\",\"Dsrt\",\"Dupl\",\"Egyd\",\"Egyh\",\"Egyp\",\"Elba\",\"Elym\",\"Ethi\",\"Gara\",\"Geok\",\"Geor\",\"Glag\",\"Gong\",\"Gonm\",\"Goth\",\"Gran\",\"Grek\",\"Gujr\",\"Gukh\",\"Guru\",\"Hanb\",\"Hang\",\"Hani\",\"Hano\",\"Hans\",\"Hant\",\"Hatr\",\"Hebr\",\"Hira\",\"Hluw\",\"Hmng\",\"Hmnp\",\"Hrkt\",\"Hung\",\"Inds\",\"Ital\",\"Jamo\",\"Java\",\"Jpan\",\"Jurc\",\"Kali\",\"Kana\",\"Kawi\",\"Khar\",\"Khmr\",\"Khoj\",\"Kitl\",\"Kits\",\"Knda\",\"Kore\",\"Kpel\",\"Krai\",\"Kthi\",\"Lana\",\"Laoo\",\"Latf\",\"Latg\",\"Latn\",\"Leke\",\"Lepc\",\"Limb\",\"Lina\",\"Linb\",\"Lisu\",\"Loma\",\"Lyci\",\"Lydi\",\"Mahj\",\"Maka\",\"Mand\",\"Mani\",\"Marc\",\"Maya\",\"Medf\",\"Mend\",\"Merc\",\"Mero\",\"Mlym\",\"Modi\",\"Mong\",\"Moon\",\"Mroo\",\"Mtei\",\"Mult\",\"Mymr\",\"Nagm\",\"Nand\",\"Narb\",\"Nbat\",\"Newa\",\"Nkdb\",\"Nkgb\",\"Nkoo\",\"Nshu\",\"Ogam\",\"Olck\",\"Onao\",\"Orkh\",\"Orya\",\"Osge\",\"Osma\",\"Ougr\",\"Palm\",\"Pauc\",\"Pcun\",\"Pelm\",\"Perm\",\"Phag\",\"Phli\",\"Phlp\",\"Phlv\",\"Phnx\",\"Plrd\",\"Piqd\",\"Prti\",\"Psin\",\"Qaaa\",\"Qaab\",\"Qaac\",\"Qaad\",\"Qaae\",\"Qaaf\",\"Qaag\",\"Qaah\",\"Qaai\",\"Qaaj\",\"Qaak\",\"Qaal\",\"Qaam\",\"Qaan\",\"Qaao\",\"Qaap\",\"Qaaq\",\"Qaar\",\"Qaas\",\"Qaat\",\"Qaau\",\"Qaav\",\"Qaaw\",\"Qaax\",\"Qaay\",\"Qaaz\",\"Qaba\",\"Qabb\",\"Qabc\",\"Qabd\",\"Qabe\",\"Qabf\",\"Qabg\",\"Qabh\",\"Qabi\",\"Qabj\",\"Qabk\",\"Qabl\",\"Qabm\",\"Qabn\",\"Qabo\",\"Qabp\",\"Qabq\",\"Qabr\",\"Qabs\",\"Qabt\",\"Qabu\",\"Qabv\",\"Qabw\",\"Qabx\",\"Ranj\",\"Rjng\",\"Rohg\",\"Roro\",\"Runr\",\"Samr\",\"Sara\",\"Sarb\",\"Saur\",\"Sgnw\",\"Shaw\",\"Shrd\",\"Shui\",\"Sidd\",\"Sidt\",\"Sind\",\"Sinh\",\"Sogd\",\"Sogo\",\"Sora\",\"Soyo\",\"Sund\",\"Sunu\",\"Sylo\",\"Syrc\",\"Syre\",\"Syrj\",\"Syrn\",\"Tagb\",\"Takr\",\"Tale\",\"Talu\",\"Taml\",\"Tang\",\"Tavt\",\"Tayo\",\"Telu\",\"Teng\",\"Tfng\",\"Tglg\",\"Thaa\",\"Thai\",\"Tibt\",\"Tirh\",\"Tnsa\",\"Todr\",\"Tols\",\"Toto\",\"Tutg\",\"Ugar\",\"Vaii\",\"Visp\",\"Vith\",\"Wara\",\"Wcho\",\"Wole\",\"Xpeo\",\"Xsux\",\"Yezi\",\"Yiii\",\"Zanb\",\"Zinh\",\"Zmth\",\"Zsye\",\"Zsym\",\"Zxxx\",\"Zyyy\",\"Zzzz\"]);t.ScriptCodes=s},2736(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.CountryCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"AD\",\"AE\",\"AF\",\"AG\",\"AI\",\"AL\",\"AM\",\"AO\",\"AQ\",\"AR\",\"AS\",\"AT\",\"AU\",\"AW\",\"AX\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BF\",\"BG\",\"BH\",\"BI\",\"BJ\",\"BL\",\"BM\",\"BN\",\"BO\",\"BQ\",\"BR\",\"BS\",\"BT\",\"BV\",\"BW\",\"BY\",\"BZ\",\"CA\",\"CC\",\"CD\",\"CF\",\"CG\",\"CH\",\"CI\",\"CK\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"CZ\",\"DE\",\"DJ\",\"DK\",\"DM\",\"DO\",\"DZ\",\"EC\",\"EE\",\"EG\",\"EH\",\"ER\",\"ES\",\"ET\",\"FI\",\"FJ\",\"FK\",\"FM\",\"FO\",\"FR\",\"GA\",\"GB\",\"GD\",\"GE\",\"GF\",\"GG\",\"GH\",\"GI\",\"GL\",\"GM\",\"GN\",\"GP\",\"GQ\",\"GR\",\"GS\",\"GT\",\"GU\",\"GW\",\"GY\",\"HK\",\"HM\",\"HN\",\"HR\",\"HT\",\"HU\",\"ID\",\"IE\",\"IL\",\"IM\",\"IN\",\"IO\",\"IQ\",\"IR\",\"IS\",\"IT\",\"JE\",\"JM\",\"JO\",\"JP\",\"KE\",\"KG\",\"KH\",\"KI\",\"KM\",\"KN\",\"KP\",\"KR\",\"KW\",\"KY\",\"KZ\",\"LA\",\"LB\",\"LC\",\"LI\",\"LK\",\"LR\",\"LS\",\"LT\",\"LU\",\"LV\",\"LY\",\"MA\",\"MC\",\"MD\",\"ME\",\"MF\",\"MG\",\"MH\",\"MK\",\"ML\",\"MM\",\"MN\",\"MO\",\"MP\",\"MQ\",\"MR\",\"MS\",\"MT\",\"MU\",\"MV\",\"MW\",\"MX\",\"MY\",\"MZ\",\"NA\",\"NC\",\"NE\",\"NF\",\"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NR\",\"NU\",\"NZ\",\"OM\",\"PA\",\"PE\",\"PF\",\"PG\",\"PH\",\"PK\",\"PL\",\"PM\",\"PN\",\"PR\",\"PS\",\"PT\",\"PW\",\"PY\",\"QA\",\"RE\",\"RO\",\"RS\",\"RU\",\"RW\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"SG\",\"SH\",\"SI\",\"SJ\",\"SK\",\"SL\",\"SM\",\"SN\",\"SO\",\"SR\",\"SS\",\"ST\",\"SV\",\"SX\",\"SY\",\"SZ\",\"TC\",\"TD\",\"TF\",\"TG\",\"TH\",\"TJ\",\"TK\",\"TL\",\"TM\",\"TN\",\"TO\",\"TR\",\"TT\",\"TV\",\"TW\",\"TZ\",\"UA\",\"UG\",\"UM\",\"US\",\"UY\",\"UZ\",\"VA\",\"VC\",\"VE\",\"VG\",\"VI\",\"VN\",\"VU\",\"WF\",\"WS\",\"YE\",\"YT\",\"ZA\",\"ZM\",\"ZW\"]);t.CountryCodes=s},6887(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"AFG\",\"ALA\",\"ALB\",\"DZA\",\"ASM\",\"AND\",\"AGO\",\"AIA\",\"ATA\",\"ATG\",\"ARG\",\"ARM\",\"ABW\",\"AUS\",\"AUT\",\"AZE\",\"BHS\",\"BHR\",\"BGD\",\"BRB\",\"BLR\",\"BEL\",\"BLZ\",\"BEN\",\"BMU\",\"BTN\",\"BOL\",\"BES\",\"BIH\",\"BWA\",\"BVT\",\"BRA\",\"IOT\",\"BRN\",\"BGR\",\"BFA\",\"BDI\",\"KHM\",\"CMR\",\"CAN\",\"CPV\",\"CYM\",\"CAF\",\"TCD\",\"CHL\",\"CHN\",\"CXR\",\"CCK\",\"COL\",\"COM\",\"COG\",\"COD\",\"COK\",\"CRI\",\"CIV\",\"HRV\",\"CUB\",\"CUW\",\"CYP\",\"CZE\",\"DNK\",\"DJI\",\"DMA\",\"DOM\",\"ECU\",\"EGY\",\"SLV\",\"GNQ\",\"ERI\",\"EST\",\"ETH\",\"FLK\",\"FRO\",\"FJI\",\"FIN\",\"FRA\",\"GUF\",\"PYF\",\"ATF\",\"GAB\",\"GMB\",\"GEO\",\"DEU\",\"GHA\",\"GIB\",\"GRC\",\"GRL\",\"GRD\",\"GLP\",\"GUM\",\"GTM\",\"GGY\",\"GIN\",\"GNB\",\"GUY\",\"HTI\",\"HMD\",\"VAT\",\"HND\",\"HKG\",\"HUN\",\"ISL\",\"IND\",\"IDN\",\"IRN\",\"IRQ\",\"IRL\",\"IMN\",\"ISR\",\"ITA\",\"JAM\",\"JPN\",\"JEY\",\"JOR\",\"KAZ\",\"KEN\",\"KIR\",\"PRK\",\"KOR\",\"KWT\",\"KGZ\",\"LAO\",\"LVA\",\"LBN\",\"LSO\",\"LBR\",\"LBY\",\"LIE\",\"LTU\",\"LUX\",\"MAC\",\"MKD\",\"MDG\",\"MWI\",\"MYS\",\"MDV\",\"MLI\",\"MLT\",\"MHL\",\"MTQ\",\"MRT\",\"MUS\",\"MYT\",\"MEX\",\"FSM\",\"MDA\",\"MCO\",\"MNG\",\"MNE\",\"MSR\",\"MAR\",\"MOZ\",\"MMR\",\"NAM\",\"NRU\",\"NPL\",\"NLD\",\"NCL\",\"NZL\",\"NIC\",\"NER\",\"NGA\",\"NIU\",\"NFK\",\"MNP\",\"NOR\",\"OMN\",\"PAK\",\"PLW\",\"PSE\",\"PAN\",\"PNG\",\"PRY\",\"PER\",\"PHL\",\"PCN\",\"POL\",\"PRT\",\"PRI\",\"QAT\",\"REU\",\"ROU\",\"RUS\",\"RWA\",\"BLM\",\"SHN\",\"KNA\",\"LCA\",\"MAF\",\"SPM\",\"VCT\",\"WSM\",\"SMR\",\"STP\",\"SAU\",\"SEN\",\"SRB\",\"SYC\",\"SLE\",\"SGP\",\"SXM\",\"SVK\",\"SVN\",\"SLB\",\"SOM\",\"ZAF\",\"SGS\",\"SSD\",\"ESP\",\"LKA\",\"SDN\",\"SUR\",\"SJM\",\"SWZ\",\"SWE\",\"CHE\",\"SYR\",\"TWN\",\"TJK\",\"TZA\",\"THA\",\"TLS\",\"TGO\",\"TKL\",\"TON\",\"TTO\",\"TUN\",\"TUR\",\"TKM\",\"TCA\",\"TUV\",\"UGA\",\"UKR\",\"ARE\",\"GBR\",\"USA\",\"UMI\",\"URY\",\"UZB\",\"VUT\",\"VEN\",\"VNM\",\"VGB\",\"VIR\",\"WLF\",\"ESH\",\"YEM\",\"ZMB\",\"ZWE\"]);e.exports=t.default,e.exports.default=t.default},1687(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"004\",\"008\",\"010\",\"012\",\"016\",\"020\",\"024\",\"028\",\"031\",\"032\",\"036\",\"040\",\"044\",\"048\",\"050\",\"051\",\"052\",\"056\",\"060\",\"064\",\"068\",\"070\",\"072\",\"074\",\"076\",\"084\",\"086\",\"090\",\"092\",\"096\",\"100\",\"104\",\"108\",\"112\",\"116\",\"120\",\"124\",\"132\",\"136\",\"140\",\"144\",\"148\",\"152\",\"156\",\"158\",\"162\",\"166\",\"170\",\"174\",\"175\",\"178\",\"180\",\"184\",\"188\",\"191\",\"192\",\"196\",\"203\",\"204\",\"208\",\"212\",\"214\",\"218\",\"222\",\"226\",\"231\",\"232\",\"233\",\"234\",\"238\",\"239\",\"242\",\"246\",\"248\",\"250\",\"254\",\"258\",\"260\",\"262\",\"266\",\"268\",\"270\",\"275\",\"276\",\"288\",\"292\",\"296\",\"300\",\"304\",\"308\",\"312\",\"316\",\"320\",\"324\",\"328\",\"332\",\"334\",\"336\",\"340\",\"344\",\"348\",\"352\",\"356\",\"360\",\"364\",\"368\",\"372\",\"376\",\"380\",\"384\",\"388\",\"392\",\"398\",\"400\",\"404\",\"408\",\"410\",\"414\",\"417\",\"418\",\"422\",\"426\",\"428\",\"430\",\"434\",\"438\",\"440\",\"442\",\"446\",\"450\",\"454\",\"458\",\"462\",\"466\",\"470\",\"474\",\"478\",\"480\",\"484\",\"492\",\"496\",\"498\",\"499\",\"500\",\"504\",\"508\",\"512\",\"516\",\"520\",\"524\",\"528\",\"531\",\"533\",\"534\",\"535\",\"540\",\"548\",\"554\",\"558\",\"562\",\"566\",\"570\",\"574\",\"578\",\"580\",\"581\",\"583\",\"584\",\"585\",\"586\",\"591\",\"598\",\"600\",\"604\",\"608\",\"612\",\"616\",\"620\",\"624\",\"626\",\"630\",\"634\",\"638\",\"642\",\"643\",\"646\",\"652\",\"654\",\"659\",\"660\",\"662\",\"663\",\"666\",\"670\",\"674\",\"678\",\"682\",\"686\",\"688\",\"690\",\"694\",\"702\",\"703\",\"704\",\"705\",\"706\",\"710\",\"716\",\"724\",\"728\",\"729\",\"732\",\"740\",\"744\",\"748\",\"752\",\"756\",\"760\",\"762\",\"764\",\"768\",\"772\",\"776\",\"780\",\"784\",\"788\",\"792\",\"795\",\"796\",\"798\",\"800\",\"804\",\"807\",\"818\",\"826\",\"831\",\"832\",\"833\",\"834\",\"840\",\"850\",\"854\",\"858\",\"860\",\"862\",\"876\",\"882\",\"887\",\"894\"]);e.exports=t.default,e.exports.default=t.default},4335(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.CurrencyCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"AED\",\"AFN\",\"ALL\",\"AMD\",\"ANG\",\"AOA\",\"ARS\",\"AUD\",\"AWG\",\"AZN\",\"BAM\",\"BBD\",\"BDT\",\"BGN\",\"BHD\",\"BIF\",\"BMD\",\"BND\",\"BOB\",\"BOV\",\"BRL\",\"BSD\",\"BTN\",\"BWP\",\"BYN\",\"BZD\",\"CAD\",\"CDF\",\"CHE\",\"CHF\",\"CHW\",\"CLF\",\"CLP\",\"CNY\",\"COP\",\"COU\",\"CRC\",\"CUP\",\"CVE\",\"CZK\",\"DJF\",\"DKK\",\"DOP\",\"DZD\",\"EGP\",\"ERN\",\"ETB\",\"EUR\",\"FJD\",\"FKP\",\"GBP\",\"GEL\",\"GHS\",\"GIP\",\"GMD\",\"GNF\",\"GTQ\",\"GYD\",\"HKD\",\"HNL\",\"HTG\",\"HUF\",\"IDR\",\"ILS\",\"INR\",\"IQD\",\"IRR\",\"ISK\",\"JMD\",\"JOD\",\"JPY\",\"KES\",\"KGS\",\"KHR\",\"KMF\",\"KPW\",\"KRW\",\"KWD\",\"KYD\",\"KZT\",\"LAK\",\"LBP\",\"LKR\",\"LRD\",\"LSL\",\"LYD\",\"MAD\",\"MDL\",\"MGA\",\"MKD\",\"MMK\",\"MNT\",\"MOP\",\"MRU\",\"MUR\",\"MVR\",\"MWK\",\"MXN\",\"MXV\",\"MYR\",\"MZN\",\"NAD\",\"NGN\",\"NIO\",\"NOK\",\"NPR\",\"NZD\",\"OMR\",\"PAB\",\"PEN\",\"PGK\",\"PHP\",\"PKR\",\"PLN\",\"PYG\",\"QAR\",\"RON\",\"RSD\",\"RUB\",\"RWF\",\"SAR\",\"SBD\",\"SCR\",\"SDG\",\"SEK\",\"SGD\",\"SHP\",\"SLE\",\"SLL\",\"SOS\",\"SRD\",\"SSP\",\"STN\",\"SVC\",\"SYP\",\"SZL\",\"THB\",\"TJS\",\"TMT\",\"TND\",\"TOP\",\"TRY\",\"TTD\",\"TWD\",\"TZS\",\"UAH\",\"UGX\",\"USD\",\"USN\",\"UYI\",\"UYU\",\"UYW\",\"UZS\",\"VED\",\"VES\",\"VND\",\"VUV\",\"WST\",\"XAF\",\"XAG\",\"XAU\",\"XBA\",\"XBB\",\"XBC\",\"XBD\",\"XCD\",\"XDR\",\"XOF\",\"XPD\",\"XPF\",\"XPT\",\"XSU\",\"XTS\",\"XUA\",\"XXX\",\"YER\",\"ZAR\",\"ZMW\",\"ZWL\"]);t.CurrencyCodes=s},7616(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.isFreightContainerID=void 0,t.isISO6346=a;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,i=/^[0-9]$/;function a(e){if((0,o.default)(e),e=e.toUpperCase(),!s.test(e))return!1;if(11===e.length){for(var t=0,r=0;r<e.length-1;r++)if(i.test(e[r]))t+=e[r]*Math.pow(2,r);else{var n=e.charCodeAt(r)-55;t+=(n<11?n:n>=11&&n<=20?12+n%11:n>=21&&n<=30?23+n%21:34+n%31)*Math.pow(2,r)}var a=t%11;return 10===a&&(a=0),Number(e[e.length-1])===a}return!0}t.isFreightContainerID=a},4608(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set([\"aa\",\"ab\",\"ae\",\"af\",\"ak\",\"am\",\"an\",\"ar\",\"as\",\"av\",\"ay\",\"az\",\"az\",\"ba\",\"be\",\"bg\",\"bh\",\"bi\",\"bm\",\"bn\",\"bo\",\"br\",\"bs\",\"ca\",\"ce\",\"ch\",\"co\",\"cr\",\"cs\",\"cu\",\"cv\",\"cy\",\"da\",\"de\",\"dv\",\"dz\",\"ee\",\"el\",\"en\",\"eo\",\"es\",\"et\",\"eu\",\"fa\",\"ff\",\"fi\",\"fj\",\"fo\",\"fr\",\"fy\",\"ga\",\"gd\",\"gl\",\"gn\",\"gu\",\"gv\",\"ha\",\"he\",\"hi\",\"ho\",\"hr\",\"ht\",\"hu\",\"hy\",\"hz\",\"ia\",\"id\",\"ie\",\"ig\",\"ii\",\"ik\",\"io\",\"is\",\"it\",\"iu\",\"ja\",\"jv\",\"ka\",\"kg\",\"ki\",\"kj\",\"kk\",\"kl\",\"km\",\"kn\",\"ko\",\"kr\",\"ks\",\"ku\",\"kv\",\"kw\",\"ky\",\"la\",\"lb\",\"lg\",\"li\",\"ln\",\"lo\",\"lt\",\"lu\",\"lv\",\"mg\",\"mh\",\"mi\",\"mk\",\"ml\",\"mn\",\"mr\",\"ms\",\"mt\",\"my\",\"na\",\"nb\",\"nd\",\"ne\",\"ng\",\"nl\",\"nn\",\"no\",\"nr\",\"nv\",\"ny\",\"oc\",\"oj\",\"om\",\"or\",\"os\",\"pa\",\"pi\",\"pl\",\"ps\",\"pt\",\"qu\",\"rm\",\"rn\",\"ro\",\"ru\",\"rw\",\"sa\",\"sc\",\"sd\",\"se\",\"sg\",\"si\",\"sk\",\"sl\",\"sm\",\"sn\",\"so\",\"sq\",\"sr\",\"ss\",\"st\",\"su\",\"sv\",\"sw\",\"ta\",\"te\",\"tg\",\"th\",\"ti\",\"tk\",\"tl\",\"tn\",\"to\",\"tr\",\"ts\",\"tt\",\"tw\",\"ty\",\"ug\",\"uk\",\"ur\",\"uz\",\"ve\",\"vi\",\"vo\",\"wa\",\"wo\",\"xh\",\"yi\",\"yo\",\"za\",\"zh\",\"zu\"]);e.exports=t.default,e.exports.default=t.default},7692(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=t.strictSeparator?i.test(e):s.test(e);return r&&t.strict?function(e){var t=e.match(/^(\\d{4})-?(\\d{3})([ T]{1}\\.*|$)/);if(t){var r=Number(t[1]),n=Number(t[2]);return r%4==0&&r%100!=0||r%400==0?n<=366:n<=365}var o=e.match(/(\\d{4})-?(\\d{0,2})-?(\\d*)/).map(Number),s=o[1],i=o[2],a=o[3],c=i?\"0\".concat(i).slice(-2):i,u=a?\"0\".concat(a).slice(-2):a,l=new Date(\"\".concat(s,\"-\").concat(c||\"01\",\"-\").concat(u||\"01\"));if(i&&a)return l.getUTCFullYear()===s&&l.getUTCMonth()+1===i&&l.getUTCDate()===a;return!0}(e):r};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/,i=/^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;e.exports=t.default,e.exports.default=t.default},6237(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{2}[0-9A-Z]{3}\\d{2}\\d{5}$/;e.exports=t.default,e.exports.default=t.default},331(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=\"^\\\\d{4}-?\\\\d{3}[\\\\dX]$\";if(r=t.require_hyphen?r.replace(\"?\",\"\"):r,!(r=t.case_sensitive?new RegExp(r):new RegExp(r,\"i\")).test(e))return!1;for(var n=e.replace(\"-\",\"\").toUpperCase(),s=0,i=0;i<n.length;i++){var a=n[i];s+=(\"X\"===a?10:+a)*(8-i)}return s%11==0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},54(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t in a)return a[t](e);if(\"any\"===t){for(var r in a){if(a.hasOwnProperty(r))if((0,a[r])(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))};var n=i(r(8354)),o=i(r(567)),s=i(r(3353));function i(e){return e&&e.__esModule?e:{default:e}}var a={PL:function(e){(0,n.default)(e);var t={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=e&&11===e.length&&(0,s.default)(e,{allow_leading_zeroes:!0})){var r=e.split(\"\").slice(0,-1).reduce(function(e,r,n){return e+Number(r)*t[n+1]},0)%10,o=Number(e.charAt(e.length-1));if(0===r&&0===o||o===10-r)return!0}return!1},ES:function(e){(0,n.default)(e);var t={X:0,Y:1,Z:2},r=e.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(r))return!1;var o=r.slice(0,-1).replace(/[X,Y,Z]/g,function(e){return t[e]});return r.endsWith([\"T\",\"R\",\"W\",\"A\",\"G\",\"M\",\"Y\",\"F\",\"P\",\"D\",\"X\",\"B\",\"N\",\"J\",\"Z\",\"S\",\"Q\",\"V\",\"H\",\"L\",\"C\",\"K\",\"E\"][o%23])},FI:function(e){if((0,n.default)(e),11!==e.length)return!1;if(!e.match(/^\\d{6}[\\-A\\+]\\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;return\"0123456789ABCDEFHJKLMNPRSTUVWXY\"[(1e3*parseInt(e.slice(0,6),10)+parseInt(e.slice(7,10),10))%31]===e.slice(10,11)},IN:function(e){var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.trim();if(!/^[1-9]\\d{3}\\s?\\d{4}\\s?\\d{4}$/.test(n))return!1;var o=0;return n.replace(/\\s/g,\"\").split(\"\").map(Number).reverse().forEach(function(e,n){o=t[o][r[n%8][e]]}),0===o},IR:function(e){if(!e.match(/^\\d{10}$/))return!1;if(e=\"0000\".concat(e).slice(e.length-6),0===parseInt(e.slice(3,9),10))return!1;for(var t=parseInt(e.slice(9,10),10),r=0,n=0;n<9;n++)r+=parseInt(e.slice(n,n+1),10)*(10-n);return(r%=11)<2&&t===r||r>=2&&t===11-r},IT:function(e){return 9===e.length&&(\"CA00000AA\"!==e&&e.search(/C[A-Z]\\d{5}[A-Z]{2}/i)>-1)},NO:function(e){var t=e.trim();if(isNaN(Number(t)))return!1;if(11!==t.length)return!1;if(\"00000000000\"===t)return!1;var r=t.split(\"\").map(Number),n=(11-(3*r[0]+7*r[1]+6*r[2]+1*r[3]+8*r[4]+9*r[5]+4*r[6]+5*r[7]+2*r[8])%11)%11,o=(11-(5*r[0]+4*r[1]+3*r[2]+2*r[3]+7*r[4]+6*r[5]+5*r[6]+4*r[7]+3*r[8]+2*n)%11)%11;return n===r[9]&&o===r[10]},TH:function(e){if(!e.match(/^[1-8]\\d{12}$/))return!1;for(var t=0,r=0;r<12;r++)t+=parseInt(e[r],10)*(13-r);return e[12]===((11-t%11)%10).toString()},LK:function(e){return!(10!==e.length||!/^[1-9]\\d{8}[vx]$/i.test(e))||!(12!==e.length||!/^[1-9]\\d{11}$/i.test(e))},\"he-IL\":function(e){var t=e.trim();if(!/^\\d{9}$/.test(t))return!1;for(var r,n=t,o=0,s=0;s<n.length;s++)o+=(r=Number(n[s])*(s%2+1))>9?r-9:r;return o%10==0},\"ar-LY\":function(e){var t=e.trim();return!!/^(1|2)\\d{11}$/.test(t)},\"ar-TN\":function(e){var t=e.trim();return!!/^\\d{8}$/.test(t)},\"zh-CN\":function(e){var t,r=[\"11\",\"12\",\"13\",\"14\",\"15\",\"21\",\"22\",\"23\",\"31\",\"32\",\"33\",\"34\",\"35\",\"36\",\"37\",\"41\",\"42\",\"43\",\"44\",\"45\",\"46\",\"50\",\"51\",\"52\",\"53\",\"54\",\"61\",\"62\",\"63\",\"64\",\"65\",\"71\",\"81\",\"82\",\"91\"],n=[\"7\",\"9\",\"10\",\"5\",\"8\",\"4\",\"2\",\"1\",\"6\",\"3\",\"7\",\"9\",\"10\",\"5\",\"8\",\"4\",\"2\"],s=[\"1\",\"0\",\"X\",\"9\",\"8\",\"7\",\"6\",\"5\",\"4\",\"3\",\"2\"],i=function(e){return(0,o.default)(r,e)},a=function(e){var t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6),10),o=new Date(t,r-1,n);return!(o>new Date)&&(o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n)},c=function(e){return function(e){for(var t=e.substring(0,17),r=0,o=0;o<17;o++)r+=parseInt(t.charAt(o),10)*parseInt(n[o],10);return s[r%11]}(e)===e.charAt(17).toUpperCase()};return!!/^\\d{15}|(\\d{17}(\\d|x|X))$/.test(t=e)&&(15===t.length?function(e){var t=/^[1-9]\\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=i(r)))return!1;var n=\"19\".concat(e.substring(6,12));return!!(t=a(n))}(t):function(e){var t=/^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}(\\d|x|X)$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=i(r)))return!1;var n=e.substring(6,14);return!!(t=a(n))&&c(e)}(t))},\"zh-HK\":function(e){var t=/^[0-9]$/;if(e=(e=e.trim()).toUpperCase(),!/^[A-Z]{1,2}[0-9]{6}((\\([0-9A]\\))|(\\[[0-9A]\\])|([0-9A]))$/.test(e))return!1;8===(e=e.replace(/\\[|\\]|\\(|\\)/g,\"\")).length&&(e=\"3\".concat(e));for(var r=0,n=0;n<=7;n++){r+=(t.test(e[n])?e[n]:(e[n].charCodeAt(0)-55)%11)*(9-n)}return(0===(r%=11)?\"0\":1===r?\"A\":String(11-r))===e[e.length-1]},\"zh-TW\":function(e){var t={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},r=e.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(r)&&Array.from(r).reduce(function(e,r,n){if(0===n){var o=t[r];return o%10*9+Math.floor(o/10)}return 9===n?(10-e%10-Number(r))%10==0:e+Number(r)*(9-n)},0)},PK:function(e){var t=e.trim();return/^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/.test(t)}};e.exports=t.default,e.exports.default=t.default},3673(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r;if((0,n.default)(e),\"[object Array]\"===Object.prototype.toString.call(t)){var s=[];for(r in t)({}).hasOwnProperty.call(t,r)&&(s[r]=(0,o.default)(t[r]));return s.indexOf(e)>=0}if(\"object\"===i(t))return t.hasOwnProperty(e);if(t&&\"function\"==typeof t.indexOf)return t.indexOf(e)>=0;return!1};var n=s(r(8354)),o=s(r(1069));function s(e){return e&&e.__esModule?e:{default:e}}function i(e){return i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},i(e)}e.exports=t.default,e.exports.default=t.default},3353(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=!1===(t=t||{}).allow_leading_zeroes?i:a,s=!t.hasOwnProperty(\"min\")||(0,o.default)(t.min)||e>=t.min,c=!t.hasOwnProperty(\"max\")||(0,o.default)(t.max)||e<=t.max,u=!t.hasOwnProperty(\"lt\")||(0,o.default)(t.lt)||e<t.lt,l=!t.hasOwnProperty(\"gt\")||(0,o.default)(t.gt)||e>t.gt;return r.test(e)&&s&&c&&u&&l};var n=s(r(8354)),o=s(r(3224));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;e.exports=t.default,e.exports.default=t.default},6528(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e);try{t=(0,s.default)(t,c);var r=[];t.allow_primitives&&(r=[null,!1,!0]);var i=JSON.parse(e);return(0,o.default)(r,i)||!!i&&\"object\"===a(i)}catch(e){}return!1};var n=i(r(8354)),o=i(r(567)),s=i(r(2533));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return a=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},a(e)}var c={allow_primitives:!1};e.exports=t.default,e.exports.default=t.default},2937(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.split(\".\");if(3!==t.length)return!1;return t.reduce(function(e,t){return e&&(0,o.default)(t,{urlSafe:!0})},!0)};var n=s(r(8354)),o=s(r(5997));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},6343(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t=(0,o.default)(t,d),!(0,s.default)(e,\",\"))return!1;var r=e.split(\",\");if(r[0].startsWith(\"(\")&&!r[1].endsWith(\")\")||r[1].endsWith(\")\")&&!r[0].startsWith(\"(\"))return!1;if(t.checkDMS)return u.test(r[0])&&l.test(r[1]);return a.test(r[0])&&c.test(r[1])};var n=i(r(8354)),o=i(r(2533)),s=i(r(4865));function i(e){return e&&e.__esModule?e:{default:e}}var a=/^\\(?[+-]?(90(\\.0+)?|[1-8]?\\d(\\.\\d+)?)$/,c=/^\\s?[+-]?(180(\\.0+)?|1[0-7]\\d(\\.\\d+)?|\\d{1,2}(\\.\\d+)?)\\)?$/,u=/^(([1-8]?\\d)\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|90\\D+0\\D+0)\\D+[NSns]?$/i,l=/^\\s*([1-7]?\\d{1,2}\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|180\\D+0\\D+0)\\D+[EWew]?$/i,d={checkDMS:!1};e.exports=t.default,e.exports.default=t.default},6982(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),\"object\"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1]||0,n=arguments[2]);var i=e.match(/(\\uFE0F|\\uFE0E)/g)||[],a=e.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g)||[],c=e.length-i.length-a.length,u=c>=r&&(void 0===n||c<=n);if(u&&Array.isArray(null==t?void 0:t.discreteLengths))return t.discreteLengths.some(function(e){return e===c});return u};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},4063(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in s)return s[t](e);if(\"any\"===t){for(var r in s){if((0,s[r])(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={\"cs-CZ\":function(e){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e)},\"de-DE\":function(e){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\\d{1,4})|([A-Z]{2}[- ]?\\d{1,3})))[- ]?(E|H)?$/.test(e)},\"de-LI\":function(e){return/^FL[- ]?\\d{1,5}[UZ]?$/.test(e)},\"en-IN\":function(e){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e)},\"en-SG\":function(e){return/^[A-Z]{3}[ -]?[\\d]{4}[ -]?[A-Z]{1}$/.test(e)},\"es-AR\":function(e){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e)},\"fi-FI\":function(e){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e)},\"hu-HU\":function(e){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\\d{3})|(M\\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \\d{2}-\\d{2})|(CD \\d{3}-\\d{3})|(C-(C|X) \\d{4})|(X-(A|B|C) \\d{4})|(([EPVZ]-\\d{5}))|(S A[A-Z]{2} \\d{2})|(SP \\d{2}-\\d{2}))$/.test(e)},\"pt-BR\":function(e){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e)},\"pt-PT\":function(e){return/^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(e)},\"sq-AL\":function(e){return/^[A-Z]{2}[- ]?((\\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\\d{3}))$/.test(e)},\"sv-SE\":function(e){return/^[A-HJ-PR-UW-Z]{3} ?[\\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim())},\"en-PK\":function(e){return/(^[A-Z]{2}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\\s|-){0,1})[0-9]{4}((\\s|-)[0-9]{2}){0,1}$)/.test(e.trim())}};e.exports=t.default,e.exports.default=t.default},4300(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),d.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=\"(([a-zA-Z]{2,3}(-\".concat(\"([A-Za-z]{3}(-[A-Za-z]{3}){0,2})\",\")?)|([a-zA-Z]{5,8}))\"),i=\"(\".concat(\"(\\\\d|[A-W]|[Y-Z]|[a-w]|[y-z])\",\"(-[A-Za-z0-9]{2,8})+)\"),a=\"(x(-[A-Za-z0-9]{1,8})+)\",c=\"(\".concat(\"((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))\",\"|\").concat(\"((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))\",\")\"),u=\"(-|_)\",l=\"\".concat(s,\"(\").concat(u).concat(\"([A-Za-z]{4})\",\")?(\").concat(u).concat(\"([A-Za-z]{2}|\\\\d{3})\",\")?(\").concat(u).concat(\"([A-Za-z0-9]{5,8}|(\\\\d[A-Z-a-z0-9]{3}))\",\")*(\").concat(u).concat(i,\")*(\").concat(u).concat(a,\")?\"),d=new RegExp(\"(^\".concat(a,\"$)|(^\").concat(c,\"$)|(^\").concat(l,\"$)\"));e.exports=t.default,e.exports.default=t.default},3705(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toLowerCase()};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8498(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){(0,o.default)(e);for(var t,r,n,s=e.replace(/[- ]+/g,\"\"),i=0,a=s.length-1;a>=0;a--)t=s.substring(a,a+1),r=parseInt(t,10),i+=n&&(r*=2)>=10?r%10+1:r,n=!n;return!(i%10!=0||!s)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},9711(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function e(t,r){(0,o.default)(t),null!=r&&r.eui&&(r.eui=String(r.eui));if(null!=r&&r.no_colons||null!=r&&r.no_separators)return\"48\"===r.eui?i.test(t):\"64\"===r.eui?u.test(t):i.test(t)||u.test(t);if(\"48\"===(null==r?void 0:r.eui))return s.test(t)||a.test(t);if(\"64\"===(null==r?void 0:r.eui))return c.test(t)||l.test(t);return e(t,{eui:\"48\"})||e(t,{eui:\"64\"})};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){4}([0-9a-fA-F]{2})$/,i=/^([0-9a-fA-F]){12}$/,a=/^([0-9a-fA-F]{4}\\.){2}([0-9a-fA-F]{4})$/,c=/^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){6}([0-9a-fA-F]{2})$/,u=/^([0-9a-fA-F]){16}$/,l=/^([0-9a-fA-F]{4}\\.){3}([0-9a-fA-F]{4})$/;e.exports=t.default,e.exports.default=t.default},1328(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[a-f0-9]{32}$/;e.exports=t.default,e.exports.default=t.default},8036(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if((0,o.default)(e),0!==e.indexOf(\"magnet:?\"))return!1;return s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/(?:^magnet:\\?|[^?&]&)xt(?:\\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;e.exports=t.default,e.exports.default=t.default},3880(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,s.default)(e),0!==e.indexOf(\"mailto:\"))return!1;var r=a(e.replace(\"mailto:\",\"\").split(\"?\"),2),i=r[0],u=r[1],l=void 0===u?\"\":u;if(!i&&!l)return!0;var d=function(e){var t=new Set([\"subject\",\"body\",\"cc\",\"bcc\"]),r={cc:\"\",bcc:\"\"},n=!1,o=e.split(\"&\");if(o.length>4)return!1;var s,i=function(e,t){var r=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&\"number\"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}(o);try{for(i.s();!(s=i.n()).done;){var u=a(s.value.split(\"=\"),2),l=u[0],d=u[1];if(l&&!t.has(l)){n=!0;break}!d||\"cc\"!==l&&\"bcc\"!==l||(r[l]=d),l&&t.delete(l)}}catch(e){i.e(e)}finally{i.f()}return!n&&r}(l);if(!d)return!1;return\"\".concat(i,\",\").concat(d.cc,\",\").concat(d.bcc).split(\",\").every(function(e){return!(e=(0,n.default)(e,\" \"))||(0,o.default)(e,t)})};var n=i(r(3146)),o=i(r(4156)),s=i(r(8354));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,s,i,a=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}(e,t)||c(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function c(e,t){if(e){if(\"string\"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.exports=t.default,e.exports.default=t.default},2054(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||i.test(e)||a.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(application|audio|font|image|message|model|multipart|text|video)\\/[a-zA-Z0-9\\.\\-\\+_]{1,100}$/i,i=/^text\\/[a-zA-Z0-9\\.\\-\\+]{1,100};\\s?charset=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?$/i,a=/^multipart\\/[a-zA-Z0-9\\.\\-\\+]{1,100}(;\\s?(boundary|charset)=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?){0,2}$/i;e.exports=t.default,e.exports.default=t.default},2334(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){if((0,o.default)(e),r&&r.strictMode&&!e.startsWith(\"+\"))return!1;if(Array.isArray(t))return t.some(function(t){if(s.hasOwnProperty(t)&&s[t].test(e))return!0;return!1});if(t in s)return s[t].test(e);if(!t||\"any\"===t){for(var n in s){if(s.hasOwnProperty(n))if(s[n].test(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={\"am-AM\":/^(\\+?374|0)(33|4[134]|55|77|88|9[13-689])\\d{6}$/,\"ar-AE\":/^((\\+?971)|0)?5[024568]\\d{7}$/,\"ar-BH\":/^(\\+?973)?(3|6)\\d{7}$/,\"ar-DZ\":/^(\\+?213|0)(5|6|7)\\d{8}$/,\"ar-LB\":/^(\\+?961)?((3|81)\\d{6}|7\\d{7})$/,\"ar-EG\":/^((\\+?20)|0)?1[0125]\\d{8}$/,\"ar-IQ\":/^(\\+?964|0)?7[0-9]\\d{8}$/,\"ar-JO\":/^(\\+?962|0)?7[789]\\d{7}$/,\"ar-KW\":/^(\\+?965)([569]\\d{7}|41\\d{6})$/,\"ar-LY\":/^((\\+?218)|0)?(9[1-6]\\d{7}|[1-8]\\d{7,9})$/,\"ar-MA\":/^(?:(?:\\+|00)212|0)[5-7]\\d{8}$/,\"ar-OM\":/^((\\+|00)968)?([79][1-9])\\d{6}$/,\"ar-PS\":/^(\\+?970|0)5[6|9](\\d{7})$/,\"ar-SA\":/^(!?(\\+?966)|0)?5\\d{8}$/,\"ar-SD\":/^((\\+?249)|0)?(9[012369]|1[012])\\d{7}$/,\"ar-SY\":/^(!?(\\+?963)|0)?9\\d{8}$/,\"ar-TN\":/^(\\+?216)?[2459]\\d{7}$/,\"az-AZ\":/^(\\+994|0)(10|5[015]|7[07]|99)\\d{7}$/,\"ar-QA\":/^(\\+?974|0)?([3567]\\d{7})$/,\"bs-BA\":/^((((\\+|00)3876)|06))((([0-3]|[5-6])\\d{6})|(4\\d{7}))$/,\"be-BY\":/^(\\+?375)?(24|25|29|33|44)\\d{7}$/,\"bg-BG\":/^(\\+?359|0)?8[789]\\d{7}$/,\"bn-BD\":/^(\\+?880|0)1[13456789][0-9]{8}$/,\"ca-AD\":/^(\\+376)?[346]\\d{5}$/,\"cs-CZ\":/^(\\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\"da-DK\":/^(\\+?45)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\"de-DE\":/^((\\+49|0)1)(5[0-25-9]\\d|6([23]|0\\d?)|7([0-57-9]|6\\d))\\d{7,9}$/,\"de-AT\":/^(\\+43|0)\\d{1,4}\\d{3,12}$/,\"de-CH\":/^(\\+41|0)([1-9])\\d{1,9}$/,\"de-LU\":/^(\\+352)?((6\\d1)\\d{6})$/,\"dv-MV\":/^(\\+?960)?(7[2-9]|9[1-9])\\d{5}$/,\"el-GR\":/^(\\+?30|0)?6(8[5-9]|9(?![26])[0-9])\\d{7}$/,\"el-CY\":/^(\\+?357?)?(9(9|7|6|5|4)\\d{6})$/,\"en-AI\":/^(\\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\\d{4}$/,\"en-AU\":/^(\\+?61|0)4\\d{8}$/,\"en-AG\":/^(?:\\+1|1)268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}$/,\"en-BM\":/^(\\+?1)?441(((3|7)\\d{6}$)|(5[0-3][0-9]\\d{4}$)|(59\\d{5}$))/,\"en-BS\":/^(\\+?1[-\\s]?|0)?\\(?242\\)?[-\\s]?\\d{3}[-\\s]?\\d{4}$/,\"en-GB\":/^(\\+?44|0)7[1-9]\\d{8}$/,\"en-GG\":/^(\\+?44|0)1481\\d{6}$/,\"en-GH\":/^(\\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\\d{7}$/,\"en-GY\":/^(\\+592|0)6\\d{6}$/,\"en-HK\":/^(\\+?852[-\\s]?)?[456789]\\d{3}[-\\s]?\\d{4}$/,\"en-MO\":/^(\\+?853[-\\s]?)?[6]\\d{3}[-\\s]?\\d{4}$/,\"en-IE\":/^(\\+?353|0)8[356789]\\d{7}$/,\"en-IN\":/^(\\+?91|0)?[6789]\\d{9}$/,\"en-JM\":/^(\\+?876)?\\d{7}$/,\"en-KE\":/^(\\+?254|0)(7|1)\\d{8}$/,\"fr-CF\":/^(\\+?236| ?)(70|75|77|72|21|22)\\d{6}$/,\"en-SS\":/^(\\+?211|0)(9[1257])\\d{7}$/,\"en-KI\":/^((\\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,\"en-KN\":/^(?:\\+1|1)869(?:46\\d|48[89]|55[6-8]|66\\d|76[02-7])\\d{4}$/,\"en-LS\":/^(\\+?266)(22|28|57|58|59|27|52)\\d{6}$/,\"en-MT\":/^(\\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,\"en-MU\":/^(\\+?230|0)?\\d{8}$/,\"en-MW\":/^(\\+?265|0)(((77|88|31|99|98|21)\\d{7})|(((111)|1)\\d{6})|(32000\\d{4}))$/,\"en-NA\":/^(\\+?264|0)(6|8)\\d{7}$/,\"en-NG\":/^(\\+?234|0)?[789]\\d{9}$/,\"en-NZ\":/^(\\+?64|0)[28]\\d{7,9}$/,\"en-PG\":/^(\\+?675|0)?(7\\d|8[18])\\d{6}$/,\"en-PK\":/^((00|\\+)?92|0)3[0-6]\\d{8}$/,\"en-PH\":/^(09|\\+639)\\d{9}$/,\"en-RW\":/^(\\+?250|0)?[7]\\d{8}$/,\"en-SG\":/^(\\+65)?[3689]\\d{7}$/,\"en-SL\":/^(\\+?232|0)\\d{8}$/,\"en-TZ\":/^(\\+?255|0)?[67]\\d{8}$/,\"en-UG\":/^(\\+?256|0)?[7]\\d{8}$/,\"en-US\":/^((\\+1|1)?( |-)?)?(\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,\"en-ZA\":/^(\\+?27|0)\\d{9}$/,\"en-ZM\":/^(\\+?26)?0[79][567]\\d{7}$/,\"en-ZW\":/^(\\+263)[0-9]{9}$/,\"en-BW\":/^(\\+?267)?(7[1-8]{1})\\d{6}$/,\"es-AR\":/^\\+?549(11|[2368]\\d)\\d{8}$/,\"es-BO\":/^(\\+?591)?(6|7)\\d{7}$/,\"es-CO\":/^(\\+?57)?3(0(0|1|2|4|5)|1\\d|2[0-4]|5(0|1))\\d{7}$/,\"es-CL\":/^(\\+?56|0)[2-9]\\d{1}\\d{7}$/,\"es-CR\":/^(\\+506)?[2-8]\\d{7}$/,\"es-CU\":/^(\\+53|0053)?5\\d{7}$/,\"es-DO\":/^(\\+?1)?8[024]9\\d{7}$/,\"es-HN\":/^(\\+?504)?[9|8|3|2]\\d{7}$/,\"es-EC\":/^(\\+?593|0)([2-7]|9[2-9])\\d{7}$/,\"es-ES\":/^(\\+?34)?[6|7]\\d{8}$/,\"es-GT\":/^(\\+?502)?[2|6|7]\\d{7}$/,\"es-PE\":/^(\\+?51)?9\\d{8}$/,\"es-MX\":/^(\\+?52)?(1|01)?\\d{10,11}$/,\"es-NI\":/^(\\+?505)\\d{7,8}$/,\"es-PA\":/^(\\+?507)\\d{7,8}$/,\"es-PY\":/^(\\+?595|0)9[9876]\\d{7}$/,\"es-SV\":/^(\\+?503)?[67]\\d{7}$/,\"es-UY\":/^(\\+598|0)9[1-9][\\d]{6}$/,\"es-VE\":/^(\\+?58)?(2|4)\\d{9}$/,\"et-EE\":/^(\\+?372)?\\s?(5|8[1-4])\\s?([0-9]\\s?){6,7}$/,\"fa-IR\":/^(\\+?98[\\-\\s]?|0)9[0-39]\\d[\\-\\s]?\\d{3}[\\-\\s]?\\d{4}$/,\"fi-FI\":/^(\\+?358|0)\\s?(4[0-6]|50)\\s?(\\d\\s?){4,8}$/,\"fj-FJ\":/^(\\+?679)?\\s?\\d{3}\\s?\\d{4}$/,\"fo-FO\":/^(\\+?298)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\"fr-BF\":/^(\\+226|0)[67]\\d{7}$/,\"fr-BJ\":/^(\\+229)\\d{8}$/,\"fr-CD\":/^(\\+?243|0)?(8|9)\\d{8}$/,\"fr-CM\":/^(\\+?237)6[0-9]{8}$/,\"fr-FR\":/^(\\+?33|0)[67]\\d{8}$/,\"fr-GF\":/^(\\+?594|0|00594)[67]\\d{8}$/,\"fr-GP\":/^(\\+?590|0|00590)[67]\\d{8}$/,\"fr-MQ\":/^(\\+?596|0|00596)[67]\\d{8}$/,\"fr-PF\":/^(\\+?689)?8[789]\\d{6}$/,\"fr-RE\":/^(\\+?262|0|00262)[67]\\d{8}$/,\"fr-WF\":/^(\\+681)?\\d{6}$/,\"he-IL\":/^(\\+972|0)([23489]|5[012345689]|77)[1-9]\\d{6}$/,\"hu-HU\":/^(\\+?36|06)(20|30|31|50|70)\\d{7}$/,\"id-ID\":/^(\\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\\s?|\\d]{5,11})$/,\"ir-IR\":/^(\\+98|0)?9\\d{9}$/,\"it-IT\":/^(\\+?39)?\\s?3\\d{2} ?\\d{6,7}$/,\"it-SM\":/^((\\+378)|(0549)|(\\+390549)|(\\+3780549))?6\\d{5,9}$/,\"ja-JP\":/^(\\+81[ \\-]?(\\(0\\))?|0)[6789]0[ \\-]?\\d{4}[ \\-]?\\d{4}$/,\"ka-GE\":/^(\\+?995)?(79\\d{7}|5\\d{8})$/,\"kk-KZ\":/^(\\+?7|8)?7\\d{9}$/,\"kl-GL\":/^(\\+?299)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\"ko-KR\":/^((\\+?82)[ \\-]?)?0?1([0|1|6|7|8|9]{1})[ \\-]?\\d{3,4}[ \\-]?\\d{4}$/,\"ky-KG\":/^(\\+996\\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\\s?\\d{3}\\s?\\d{3}$/,\"lt-LT\":/^(\\+370|8)\\d{8}$/,\"lv-LV\":/^(\\+?371)2\\d{7}$/,\"mg-MG\":/^((\\+?261|0)(2|3)\\d)?\\d{7}$/,\"mn-MN\":/^(\\+|00|011)?976(77|81|88|91|94|95|96|99)\\d{6}$/,\"my-MM\":/^(\\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,\"ms-MY\":/^(\\+?60|0)1(([0145](-|\\s)?\\d{7,8})|([236-9](-|\\s)?\\d{7}))$/,\"mz-MZ\":/^(\\+?258)?8[234567]\\d{7}$/,\"nb-NO\":/^(\\+?47)?[49]\\d{7}$/,\"ne-NP\":/^(\\+?977)?9[78]\\d{8}$/,\"nl-BE\":/^(\\+?32|0)4\\d{8}$/,\"nl-NL\":/^(((\\+|00)?31\\(0\\))|((\\+|00)?31)|0)6{1}\\d{8}$/,\"nl-AW\":/^(\\+)?297(56|59|64|73|74|99)\\d{5}$/,\"nn-NO\":/^(\\+?47)?[49]\\d{7}$/,\"pl-PL\":/^(\\+?48)? ?([5-8]\\d|45) ?\\d{3} ?\\d{2} ?\\d{2}$/,\"pt-BR\":/^((\\+?55\\ ?[1-9]{2}\\ ?)|(\\+?55\\ ?\\([1-9]{2}\\)\\ ?)|(0[1-9]{2}\\ ?)|(\\([1-9]{2}\\)\\ ?)|([1-9]{2}\\ ?))((\\d{4}\\-?\\d{4})|(9[1-9]{1}\\d{3}\\-?\\d{4}))$/,\"pt-PT\":/^(\\+?351)?9[1236]\\d{7}$/,\"pt-AO\":/^(\\+?244)?9\\d{8}$/,\"ro-MD\":/^(\\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\\d{6}$/,\"ro-RO\":/^(\\+?40|0)\\s?7\\d{2}(\\/|\\s|\\.|-)?\\d{3}(\\s|\\.|-)?\\d{3}$/,\"ru-RU\":/^(\\+?7|8)?9\\d{9}$/,\"si-LK\":/^(?:0|94|\\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\\d{7}$/,\"sl-SI\":/^(\\+386\\s?|0)(\\d{1}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2}|\\d{2}\\s?\\d{3}\\s?\\d{3})$/,\"sk-SK\":/^(\\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\"so-SO\":/^(\\+?252|0)((6[0-9])\\d{7}|(7[1-9])\\d{7})$/,\"sq-AL\":/^(\\+355|0)6[2-9]\\d{7}$/,\"sr-RS\":/^(\\+3816|06)[- \\d]{5,9}$/,\"sv-SE\":/^(\\+?46|0)[\\s\\-]?7[\\s\\-]?[02369]([\\s\\-]?\\d){7}$/,\"tg-TJ\":/^(\\+?992)?[5][5]\\d{7}$/,\"th-TH\":/^(\\+66|66|0)\\d{9}$/,\"tr-TR\":/^(\\+?90|0)?5\\d{9}$/,\"tk-TM\":/^(\\+993|993|8)\\d{8}$/,\"uk-UA\":/^(\\+?38)?0(50|6[36-8]|7[357]|9[1-9])\\d{7}$/,\"uz-UZ\":/^(\\+?998)?(6[125-79]|7[1-69]|88|9\\d)\\d{7}$/,\"vi-VN\":/^((\\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,\"zh-CN\":/^((\\+|00)86)?(1[3-9]|9[28])\\d{9}$/,\"zh-TW\":/^(\\+?886\\-?|0)?9\\d{8}$/,\"dz-BT\":/^(\\+?975|0)?(17|16|77|02)\\d{6}$/,\"ar-YE\":/^(((\\+|00)9677|0?7)[0137]\\d{7}|((\\+|00)967|0)[1-7]\\d{6})$/,\"ar-EH\":/^(\\+?212|0)[\\s\\-]?(5288|5289)[\\s\\-]?\\d{5}$/,\"fa-AF\":/^(\\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\\d{7})$/,\"mk-MK\":/^(\\+?389|0)?((?:2[2-9]\\d{6}|(?:3[1-4]|4[2-8])\\d{6}|500\\d{5}|5[2-9]\\d{6}|7[0-9][2-9]\\d{5}|8[1-9]\\d{6}|800\\d{5}|8009\\d{4}))$/};s[\"en-CA\"]=s[\"en-US\"],s[\"fr-CA\"]=s[\"en-CA\"],s[\"fr-BE\"]=s[\"nl-BE\"],s[\"zh-HK\"]=s[\"en-HK\"],s[\"zh-MO\"]=s[\"en-MO\"],s[\"ga-IE\"]=s[\"en-IE\"],s[\"fr-CH\"]=s[\"de-CH\"],s[\"it-CH\"]=s[\"fr-CH\"];t.locales=Object.keys(s)},4685(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e),(0,o.default)(e)&&24===e.length};var n=s(r(8354)),o=s(r(3943));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},8631(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/[^\\x00-\\x7F]/;e.exports=t.default,e.exports.default=t.default},4583(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t&&t.no_symbols)return i.test(e);return new RegExp(\"^[+-]?([0-9]*[\".concat((t||{}).locale?s.decimal[t.locale]:\".\",\"])?[0-9]+$\")).test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);var i=/^[0-9]+$/;e.exports=t.default,e.exports.default=t.default},5627(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0o)?[0-7]+$/i;e.exports=t.default,e.exports.default=t.default},4429(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=e.replace(/\\s/g,\"\").toUpperCase();return t.toUpperCase()in s&&s[t].test(r)},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={AM:/^[A-Z]{2}\\d{7}$/,AR:/^[A-Z]{3}\\d{6}$/,AT:/^[A-Z]\\d{7}$/,AU:/^[A-Z]\\d{7}$/,AZ:/^[A-Z]{1}\\d{8}$/,BE:/^[A-Z]{2}\\d{6}$/,BG:/^\\d{9}$/,BR:/^[A-Z]{2}\\d{6}$/,BY:/^[A-Z]{2}\\d{7}$/,CA:/^[A-Z]{2}\\d{6}$|^[A-Z]\\d{6}[A-Z]{2}$/,CH:/^[A-Z]\\d{7}$/,CN:/^G\\d{8}$|^E(?![IO])[A-Z0-9]\\d{7}$/,CY:/^[A-Z](\\d{6}|\\d{8})$/,CZ:/^\\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\\d{9}$/,DZ:/^\\d{9}$/,EE:/^([A-Z]\\d{7}|[A-Z]{2}\\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\\d{6}$/,FI:/^[A-Z]{2}\\d{7}$/,FR:/^\\d{2}[A-Z]{2}\\d{5}$/,GB:/^\\d{9}$/,GR:/^[A-Z]{2}\\d{7}$/,HR:/^\\d{9}$/,HU:/^[A-Z]{2}(\\d{6}|\\d{7})$/,IE:/^[A-Z0-9]{2}\\d{7}$/,IN:/^[A-Z]{1}-?\\d{7}$/,ID:/^[A-C]\\d{7}$/,IR:/^[A-Z]\\d{8}$/,IS:/^(A)\\d{7}$/,IT:/^[A-Z0-9]{2}\\d{7}$/,JM:/^[Aa]\\d{7}$/,JP:/^[A-Z]{2}\\d{7}$/,KR:/^[MS]\\d{8}$/,KZ:/^[a-zA-Z]\\d{7}$/,LI:/^[a-zA-Z]\\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\\d{7}$/,MZ:/^([A-Z]{2}\\d{7})|(\\d{2}[A-Z]{2}\\d{5})$/,MY:/^[AHK]\\d{8}$/,MX:/^\\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\\d{6}$/,PH:/^([A-Z](\\d{6}|\\d{7}[A-Z]))|([A-Z]{2}(\\d{6}|\\d{7}))$/,PK:/^[A-Z]{2}\\d{7}$/,PL:/^[A-Z]{2}\\d{7}$/,PT:/^[A-Z]\\d{6}$/,RO:/^\\d{8,9}$/,RU:/^\\d{9}$/,SE:/^\\d{8}$/,SL:/^(P)[A-Z]\\d{7}$/,SK:/^[0-9A-Z]\\d{7}$/,TH:/^[A-Z]{1,2}\\d{6,7}$/,TR:/^[A-Z]\\d{8}$/,UA:/^[A-Z]{2}\\d{6}$/,US:/^\\d{9}$|^[A-Z]\\d{8}$/,ZA:/^[TAMD]\\d{8}$/};t.locales=Object.keys(s)},6969(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e,{allow_leading_zeroes:!1,min:0,max:65535})};var n,o=(n=r(3353))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},924(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in u)return u[t].test(e);if(\"any\"===t){for(var r in u){if(u.hasOwnProperty(r))if(u[r].test(e))return!0}return!1}throw new Error(\"Invalid locale '\".concat(t,\"'\"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^\\d{3}$/,i=/^\\d{4}$/,a=/^\\d{5}$/,c=/^\\d{6}$/,u={AD:/^AD\\d{3}$/,AT:i,AU:i,AZ:/^AZ\\d{4}$/,BA:/^([7-8]\\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:i,BG:i,BR:/^\\d{5}-?\\d{3}$/,BY:/^2[1-4]\\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][\\s\\-]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i,CH:i,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\\d{4}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\\d{4})$/,CZ:/^\\d{3}\\s?\\d{2}$/,DE:a,DK:i,DO:a,DZ:a,EE:a,ES:/^(5[0-2]{1}|[0-4]{1}\\d{1})\\d{3}$/,FI:a,FR:/^(?:(?:0[1-9]|[1-8]\\d|9[0-5])\\d{3}|97[1-46]\\d{2})$/,GB:/^(gir\\s?0aa|[a-z]{1,2}\\d[\\da-z]?\\s?(\\d[a-z]{2})?)$/i,GR:/^\\d{3}\\s?\\d{2}$/,HR:/^([1-5]\\d{4}$)/,HT:/^HT\\d{4}$/,HU:i,ID:a,IE:/^(?!.*(?:o))[A-Za-z]\\d[\\dw]\\s\\w{4}$/i,IL:/^(\\d{5}|\\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\\d)\\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:s,IT:a,JP:/^\\d{3}\\-\\d{4}$/,KE:a,KR:/^(\\d{5}|\\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\\-\\d{5}$/,LU:i,LV:/^LV\\-\\d{4}$/,LK:a,MG:s,MX:a,MT:/^[A-Za-z]{3}\\s{0,1}\\d{4}$/,MY:a,NL:/^[1-9]\\d{3}\\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:i,NP:/^(10|21|22|32|33|34|44|45|56|57)\\d{3}$|^(977)$/i,NZ:i,PK:a,PL:/^\\d{2}\\-\\d{3}$/,PR:/^00[679]\\d{2}([ -]\\d{4})?$/,PT:/^\\d{4}\\-\\d{3}?$/,RO:c,RU:c,SA:a,SE:/^[1-9]\\d{2}\\s?\\d{2}$/,SG:c,SI:i,SK:/^\\d{3}\\s?\\d{2}$/,TH:a,TN:i,TW:/^\\d{3}(\\d{2,3})?$/,UA:a,US:/^\\d{5}(-\\d{4})?$/,ZA:i,ZM:a};t.locales=Object.keys(u)},6299(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),f.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/([01][0-9]|2[0-3])/,i=/[0-5][0-9]/,a=new RegExp(\"[-+]\".concat(s.source,\":\").concat(i.source)),c=new RegExp(\"([zZ]|\".concat(a.source,\")\")),u=new RegExp(\"\".concat(s.source,\":\").concat(i.source,\":\").concat(/([0-5][0-9]|60)/.source).concat(/(\\.[0-9]+)?/.source)),l=new RegExp(\"\".concat(/[0-9]{4}/.source,\"-\").concat(/(0[1-9]|1[0-2])/.source,\"-\").concat(/([12]\\d|0[1-9]|3[01])/.source)),d=new RegExp(\"\".concat(u.source).concat(c.source)),f=new RegExp(\"^\".concat(l.source,\"[ tT]\").concat(d.source,\"$\"));e.exports=t.default,e.exports.default=t.default},9664(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=!1,n=!0;\"object\"!==s(t)?arguments.length>=2&&(n=arguments[1]):(r=void 0!==t.allowSpaces?t.allowSpaces:r,n=void 0!==t.includePercentValues?t.includePercentValues:n);if(r){if(!l.test(e))return!1;e=e.replace(/\\s/g,\"\")}if(!n)return i.test(e)||a.test(e);return i.test(e)||a.test(e)||c.test(e)||u.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s(e)}var i=/^rgb\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\)$/,a=/^rgba\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\\.\\d\\d?|1(\\.0)?|0(\\.0)?)\\)$/,c=/^rgb\\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\\)$/,u=/^rgba\\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\\.\\d\\d?|1(\\.0)?|0(\\.0)?)\\)$/,l=/^rgba?/;e.exports=t.default,e.exports.default=t.default},5830(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,n.default)(e),s.test(e)};var n=o(r(8354));function o(e){return e&&e.__esModule?e:{default:e}}var s=(0,o(r(9043)).default)([\"^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\",\"(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-z-][0-9a-z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-z-][0-9a-z-]*))*))\",\"?(?:\\\\+([0-9a-z-]+(?:\\\\.[0-9a-z-]+)*))?$\"],\"i\");e.exports=t.default,e.exports.default=t.default},5977(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[^\\s-_](?!.*?[-_]{2,})[a-z0-9-\\\\][^\\s]*[^-_\\s]$/;e.exports=t.default,e.exports.default=t.default},9300(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(e);var r=function(e){var t=function(e){var t={};return Array.from(e).forEach(function(e){t[e]?t[e]+=1:t[e]=1}),t}(e),r={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach(function(e){i.test(e)?r.uppercaseCount+=t[e]:a.test(e)?r.lowercaseCount+=t[e]:c.test(e)?r.numberCount+=t[e]:u.test(e)&&(r.symbolCount+=t[e])}),r}(e);if((t=(0,n.default)(t||{},l)).returnScore)return function(e,t){var r=0;r+=e.uniqueChars*t.pointsPerUnique,r+=(e.length-e.uniqueChars)*t.pointsPerRepeat,e.lowercaseCount>0&&(r+=t.pointsForContainingLower);e.uppercaseCount>0&&(r+=t.pointsForContainingUpper);e.numberCount>0&&(r+=t.pointsForContainingNumber);e.symbolCount>0&&(r+=t.pointsForContainingSymbol);return r}(r,t);return r.length>=t.minLength&&r.lowercaseCount>=t.minLowercase&&r.uppercaseCount>=t.minUppercase&&r.numberCount>=t.minNumbers&&r.symbolCount>=t.minSymbols};var n=s(r(2533)),o=s(r(8354));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Z]$/,a=/^[a-z]$/,c=/^[0-9]$/,u=/^[-#!$@£%^&*()_+|~=`{}\\[\\]:\";'<>?,.\\/\\\\ ]$/,l={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};e.exports=t.default,e.exports.default=t.default},6774(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;e.exports=t.default,e.exports.default=t.default},2452(e,t,r){\"use strict\";function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"en-US\";(0,o.default)(e);var r=e.slice(0);if(t in f)return t in g&&(r=r.replace(g[t],\"\")),!!f[t].test(r)&&(!(t in p)||p[t](r));throw new Error(\"Invalid locale '\".concat(t,\"'\"))};var o=a(r(8354)),s=function(e,t){if(\"function\"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var s,i,a={__proto__:null,default:e};if(null===e||\"object\"!=n(e)&&\"function\"!=typeof e)return a;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)\"default\"!==c&&{}.hasOwnProperty.call(e,c)&&((i=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(i.get||i.set)?s(a,c,i):a[c]=e[c]);return a}(e,t)}(r(499)),i=a(r(1426));function a(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}(e)||function(e,t){if(e){if(\"string\"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l={andover:[\"10\",\"12\"],atlanta:[\"60\",\"67\"],austin:[\"50\",\"53\"],brookhaven:[\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"11\",\"13\",\"14\",\"16\",\"21\",\"22\",\"23\",\"25\",\"34\",\"51\",\"52\",\"54\",\"55\",\"56\",\"57\",\"58\",\"59\",\"65\"],cincinnati:[\"30\",\"32\",\"35\",\"36\",\"37\",\"38\",\"61\"],fresno:[\"15\",\"24\"],internet:[\"20\",\"26\",\"27\",\"45\",\"46\",\"47\"],kansas:[\"40\",\"44\"],memphis:[\"94\",\"95\"],ogden:[\"80\",\"90\"],philadelphia:[\"33\",\"39\",\"41\",\"42\",\"43\",\"46\",\"48\",\"62\",\"63\",\"64\",\"66\",\"68\",\"71\",\"72\",\"73\",\"74\",\"75\",\"76\",\"77\",\"81\",\"82\",\"83\",\"84\",\"85\",\"86\",\"87\",\"88\",\"91\",\"92\",\"93\",\"98\",\"99\"],sba:[\"31\"]};function d(e){for(var t=!1,r=!1,n=0;n<3;n++)if(!t&&/[AEIOU]/.test(e[n]))t=!0;else if(!r&&t&&\"X\"===e[n])r=!0;else if(n>0){if(t&&!r&&!/[AEIOU]/.test(e[n]))return!1;if(r&&!/X/.test(e[n]))return!1}return!0}var f={\"bg-BG\":/^\\d{10}$/,\"cs-CZ\":/^\\d{6}\\/{0,1}\\d{3,4}$/,\"de-AT\":/^\\d{9}$/,\"de-DE\":/^[1-9]\\d{10}$/,\"dk-DK\":/^\\d{6}-{0,1}\\d{4}$/,\"el-CY\":/^[09]\\d{7}[A-Z]$/,\"el-GR\":/^([0-4]|[7-9])\\d{8}$/,\"en-CA\":/^\\d{9}$/,\"en-GB\":/^\\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\\d{6}[ABCD ]$/i,\"en-IE\":/^\\d{7}[A-W][A-IW]{0,1}$/i,\"en-US\":/^\\d{2}[- ]{0,1}\\d{7}$/,\"es-AR\":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,\"es-ES\":/^(\\d{0,8}|[XYZKLM]\\d{7})[A-HJ-NP-TV-Z]$/i,\"et-EE\":/^[1-6]\\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\\d$/,\"fi-FI\":/^\\d{6}[-+A]\\d{3}[0-9A-FHJ-NPR-Y]$/i,\"fr-BE\":/^\\d{11}$/,\"fr-FR\":/^[0-3]\\d{12}$|^[0-3]\\d\\s\\d{2}(\\s\\d{3}){3}$/,\"fr-LU\":/^\\d{13}$/,\"hr-HR\":/^\\d{11}$/,\"hu-HU\":/^8\\d{9}$/,\"it-IT\":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,\"lv-LV\":/^\\d{6}-{0,1}\\d{5}$/,\"mt-MT\":/^\\d{3,7}[APMGLHBZ]$|^([1-8])\\1\\d{7}$/i,\"nl-NL\":/^\\d{9}$/,\"pl-PL\":/^\\d{10,11}$/,\"pt-BR\":/(?:^\\d{11}$)|(?:^\\d{14}$)/,\"pt-PT\":/^\\d{9}$/,\"ro-RO\":/^\\d{13}$/,\"sk-SK\":/^\\d{6}\\/{0,1}\\d{3,4}$/,\"sl-SI\":/^[1-9]\\d{7}$/,\"sv-SE\":/^(\\d{6}[-+]{0,1}\\d{4}|(18|19|20)\\d{6}[-+]{0,1}\\d{4})$/,\"uk-UA\":/^\\d{10}$/};f[\"lb-LU\"]=f[\"fr-LU\"],f[\"lt-LT\"]=f[\"et-EE\"],f[\"nl-BE\"]=f[\"fr-BE\"],f[\"fr-CA\"]=f[\"en-CA\"];var p={\"bg-BG\":function(e){var t=e.slice(0,2),r=parseInt(e.slice(2,4),10);r>40?(r-=40,t=\"20\".concat(t)):r>20?(r-=20,t=\"18\".concat(t)):t=\"19\".concat(t),r<10&&(r=\"0\".concat(r));var n=\"\".concat(t,\"/\").concat(r,\"/\").concat(e.slice(4,6));if(!(0,i.default)(n,\"YYYY/MM/DD\"))return!1;for(var o=e.split(\"\").map(function(e){return parseInt(e,10)}),s=[2,4,8,5,10,9,7,3,6],a=0,c=0;c<s.length;c++)a+=o[c]*s[c];return(a=a%11==10?0:a%11)===o[9]},\"cs-CZ\":function(e){e=e.replace(/\\W/,\"\");var t=parseInt(e.slice(0,2),10);if(10===e.length)t=t<54?\"20\".concat(t):\"19\".concat(t);else{if(\"000\"===e.slice(6))return!1;if(!(t<54))return!1;t=\"19\".concat(t)}3===t.length&&(t=[t.slice(0,2),\"0\",t.slice(2)].join(\"\"));var r=parseInt(e.slice(2,4),10);if(r>50&&(r-=50),r>20){if(parseInt(t,10)<2004)return!1;r-=20}r<10&&(r=\"0\".concat(r));var n=\"\".concat(t,\"/\").concat(r,\"/\").concat(e.slice(4,6));if(!(0,i.default)(n,\"YYYY/MM/DD\"))return!1;if(10===e.length&&parseInt(e,10)%11!=0){var o=parseInt(e.slice(0,9),10)%11;if(!(parseInt(t,10)<1986&&10===o))return!1;if(0!==parseInt(e.slice(9),10))return!1}return!0},\"de-AT\":function(e){return s.luhnCheck(e)},\"de-DE\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=[],n=0;n<t.length-1;n++){r.push(\"\");for(var o=0;o<t.length-1;o++)t[n]===t[o]&&(r[n]+=o)}if(2!==(r=r.filter(function(e){return e.length>1})).length&&3!==r.length)return!1;if(3===r[0].length){for(var i=r[0].split(\"\").map(function(e){return parseInt(e,10)}),a=0,c=0;c<i.length-1;c++)i[c]+1===i[c+1]&&(a+=1);if(2===a)return!1}return s.iso7064Check(e)},\"dk-DK\":function(e){e=e.replace(/\\W/,\"\");var t=parseInt(e.slice(4,6),10);switch(e.slice(6,7)){case\"0\":case\"1\":case\"2\":case\"3\":t=\"19\".concat(t);break;case\"4\":case\"9\":t=t<37?\"20\".concat(t):\"19\".concat(t);break;default:if(t<37)t=\"20\".concat(t);else{if(!(t>58))return!1;t=\"18\".concat(t)}}3===t.length&&(t=[t.slice(0,2),\"0\",t.slice(2)].join(\"\"));var r=\"\".concat(t,\"/\").concat(e.slice(2,4),\"/\").concat(e.slice(0,2));if(!(0,i.default)(r,\"YYYY/MM/DD\"))return!1;for(var n=e.split(\"\").map(function(e){return parseInt(e,10)}),o=0,s=4,a=0;a<9;a++)o+=n[a]*s,1===(s-=1)&&(s=7);return 1!==(o%=11)&&(0===o?0===n[9]:n[9]===11-o)},\"el-CY\":function(e){for(var t=e.slice(0,8).split(\"\").map(function(e){return parseInt(e,10)}),r=0,n=1;n<t.length;n+=2)r+=t[n];for(var o=0;o<t.length;o+=2)t[o]<2?r+=1-t[o]:(r+=2*(t[o]-2)+5,t[o]>4&&(r+=2));return String.fromCharCode(r%26+65)===e.charAt(8)},\"el-GR\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=0,n=0;n<8;n++)r+=t[n]*Math.pow(2,8-n);return r%11%10===t[8]},\"en-CA\":function(e){var t=e.split(\"\"),r=t.filter(function(e,t){return t%2}).map(function(e){return 2*Number(e)}).join(\"\").split(\"\");return t.filter(function(e,t){return!(t%2)}).concat(r).map(function(e){return Number(e)}).reduce(function(e,t){return e+t})%10==0},\"en-IE\":function(e){var t=s.reverseMultiplyAndSum(e.split(\"\").slice(0,7).map(function(e){return parseInt(e,10)}),8);return 9===e.length&&\"W\"!==e[8]&&(t+=9*(e[8].charCodeAt(0)-64)),0===(t%=23)?\"W\"===e[7].toUpperCase():e[7].toUpperCase()===String.fromCharCode(64+t)},\"en-US\":function(e){return-1!==function(){var e=[];for(var t in l)l.hasOwnProperty(t)&&e.push.apply(e,c(l[t]));return e}().indexOf(e.slice(0,2))},\"es-AR\":function(e){for(var t=0,r=e.split(\"\"),n=parseInt(r.pop(),10),o=0;o<r.length;o++)t+=r[9-o]*(2+o%6);var s=11-t%11;return 11===s?s=0:10===s&&(s=9),n===s},\"es-ES\":function(e){var t=e.toUpperCase().split(\"\");if(isNaN(parseInt(t[0],10))&&t.length>1){var r=0;switch(t[0]){case\"Y\":r=1;break;case\"Z\":r=2}t.splice(0,1,r)}else for(;t.length<9;)t.unshift(0);t=t.join(\"\");var n=parseInt(t.slice(0,8),10)%23;return t[8]===[\"T\",\"R\",\"W\",\"A\",\"G\",\"M\",\"Y\",\"F\",\"P\",\"D\",\"X\",\"B\",\"N\",\"J\",\"Z\",\"S\",\"Q\",\"V\",\"H\",\"L\",\"C\",\"K\",\"E\"][n]},\"et-EE\":function(e){var t=e.slice(1,3);switch(e.slice(0,1)){case\"1\":case\"2\":t=\"18\".concat(t);break;case\"3\":case\"4\":t=\"19\".concat(t);break;default:t=\"20\".concat(t)}var r=\"\".concat(t,\"/\").concat(e.slice(3,5),\"/\").concat(e.slice(5,7));if(!(0,i.default)(r,\"YYYY/MM/DD\"))return!1;for(var n=e.split(\"\").map(function(e){return parseInt(e,10)}),o=0,s=1,a=0;a<10;a++)o+=n[a]*s,10===(s+=1)&&(s=1);if(o%11==10){o=0,s=3;for(var c=0;c<10;c++)o+=n[c]*s,10===(s+=1)&&(s=1);if(o%11==10)return 0===n[10]}return o%11===n[10]},\"fi-FI\":function(e){var t=e.slice(4,6);switch(e.slice(6,7)){case\"+\":t=\"18\".concat(t);break;case\"-\":t=\"19\".concat(t);break;default:t=\"20\".concat(t)}var r=\"\".concat(t,\"/\").concat(e.slice(2,4),\"/\").concat(e.slice(0,2));if(!(0,i.default)(r,\"YYYY/MM/DD\"))return!1;var n=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;return n<10?n===parseInt(e.slice(10),10):[\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"H\",\"J\",\"K\",\"L\",\"M\",\"N\",\"P\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\"][n-=10]===e.slice(10)},\"fr-BE\":function(e){if(\"00\"!==e.slice(2,4)||\"00\"!==e.slice(4,6)){var t=\"\".concat(e.slice(0,2),\"/\").concat(e.slice(2,4),\"/\").concat(e.slice(4,6));if(!(0,i.default)(t,\"YY/MM/DD\"))return!1}var r=97-parseInt(e.slice(0,9),10)%97,n=parseInt(e.slice(9,11),10);return r===n||(r=97-parseInt(\"2\".concat(e.slice(0,9)),10)%97)===n},\"fr-FR\":function(e){return e=e.replace(/\\s/g,\"\"),parseInt(e.slice(0,10),10)%511===parseInt(e.slice(10,13),10)},\"fr-LU\":function(e){var t=\"\".concat(e.slice(0,4),\"/\").concat(e.slice(4,6),\"/\").concat(e.slice(6,8));return!!(0,i.default)(t,\"YYYY/MM/DD\")&&(!!s.luhnCheck(e.slice(0,12))&&s.verhoeffCheck(\"\".concat(e.slice(0,11)).concat(e[12])))},\"hr-HR\":function(e){return s.iso7064Check(e)},\"hu-HU\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=8,n=1;n<9;n++)r+=t[n]*(n+1);return r%11===t[9]},\"it-IT\":function(e){var t=e.toUpperCase().split(\"\");if(!d(t.slice(0,3)))return!1;if(!d(t.slice(3,6)))return!1;for(var r={L:\"0\",M:\"1\",N:\"2\",P:\"3\",Q:\"4\",R:\"5\",S:\"6\",T:\"7\",U:\"8\",V:\"9\"},n=0,o=[6,7,9,10,12,13,14];n<o.length;n++){var s=o[n];t[s]in r&&t.splice(s,1,r[t[s]])}var a={A:\"01\",B:\"02\",C:\"03\",D:\"04\",E:\"05\",H:\"06\",L:\"07\",M:\"08\",P:\"09\",R:\"10\",S:\"11\",T:\"12\"}[t[8]],c=parseInt(t[9]+t[10],10);c>40&&(c-=40),c<10&&(c=\"0\".concat(c));var u=\"\".concat(t[6]).concat(t[7],\"/\").concat(a,\"/\").concat(c);if(!(0,i.default)(u,\"YY/MM/DD\"))return!1;for(var l=0,f=1;f<t.length-1;f+=2){var p=parseInt(t[f],10);isNaN(p)&&(p=t[f].charCodeAt(0)-65),l+=p}for(var h={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},g=0;g<t.length-1;g+=2){var y=0;if(t[g]in h)y=h[t[g]];else{var m=parseInt(t[g],10);y=2*m+1,m>4&&(y+=2)}l+=y}return String.fromCharCode(65+l%26)===t[15]},\"lv-LV\":function(e){var t=(e=e.replace(/\\W/,\"\")).slice(0,2);if(\"32\"!==t){if(\"00\"!==e.slice(2,4)){var r=e.slice(4,6);switch(e[6]){case\"0\":r=\"18\".concat(r);break;case\"1\":r=\"19\".concat(r);break;default:r=\"20\".concat(r)}var n=\"\".concat(r,\"/\").concat(e.slice(2,4),\"/\").concat(t);if(!(0,i.default)(n,\"YYYY/MM/DD\"))return!1}for(var o=1101,s=[1,6,3,7,9,10,5,8,4,2],a=0;a<e.length-1;a++)o-=parseInt(e[a],10)*s[a];return parseInt(e[10],10)===o%11}return!0},\"mt-MT\":function(e){if(9!==e.length){for(var t=e.toUpperCase().split(\"\");t.length<8;)t.unshift(0);switch(e[7]){case\"A\":case\"P\":if(0===parseInt(t[6],10))return!1;break;default:var r=parseInt(t.join(\"\").slice(0,5),10);if(r>32e3)return!1;if(r===parseInt(t.join(\"\").slice(5,7),10))return!1}}return!0},\"nl-NL\":function(e){return s.reverseMultiplyAndSum(e.split(\"\").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11===parseInt(e[8],10)},\"pl-PL\":function(e){if(10===e.length){for(var t=[6,5,7,2,3,4,5,6,7],r=0,n=0;n<t.length;n++)r+=parseInt(e[n],10)*t[n];return 10!==(r%=11)&&r===parseInt(e[9],10)}var o=e.slice(0,2),s=parseInt(e.slice(2,4),10);s>80?(o=\"18\".concat(o),s-=80):s>60?(o=\"22\".concat(o),s-=60):s>40?(o=\"21\".concat(o),s-=40):s>20?(o=\"20\".concat(o),s-=20):o=\"19\".concat(o),s<10&&(s=\"0\".concat(s));var a=\"\".concat(o,\"/\").concat(s,\"/\").concat(e.slice(4,6));if(!(0,i.default)(a,\"YYYY/MM/DD\"))return!1;for(var c=0,u=1,l=0;l<e.length-1;l++)c+=parseInt(e[l],10)*u%10,(u+=2)>10?u=1:5===u&&(u+=2);return(c=10-c%10)===parseInt(e[10],10)},\"pt-BR\":function(e){if(11===e.length){var t,r;if(t=0,\"11111111111\"===e||\"22222222222\"===e||\"33333333333\"===e||\"44444444444\"===e||\"55555555555\"===e||\"66666666666\"===e||\"77777777777\"===e||\"88888888888\"===e||\"99999999999\"===e||\"00000000000\"===e)return!1;for(var n=1;n<=9;n++)t+=parseInt(e.substring(n-1,n),10)*(11-n);if(10===(r=10*t%11)&&(r=0),r!==parseInt(e.substring(9,10),10))return!1;t=0;for(var o=1;o<=10;o++)t+=parseInt(e.substring(o-1,o),10)*(12-o);return 10===(r=10*t%11)&&(r=0),r===parseInt(e.substring(10,11),10)}if(\"00000000000000\"===e||\"11111111111111\"===e||\"22222222222222\"===e||\"33333333333333\"===e||\"44444444444444\"===e||\"55555555555555\"===e||\"66666666666666\"===e||\"77777777777777\"===e||\"88888888888888\"===e||\"99999999999999\"===e)return!1;for(var s=e.length-2,i=e.substring(0,s),a=e.substring(s),c=0,u=s-7,l=s;l>=1;l--)c+=i.charAt(s-l)*u,(u-=1)<2&&(u=9);var d=c%11<2?0:11-c%11;if(d!==parseInt(a.charAt(0),10))return!1;s+=1,i=e.substring(0,s),c=0,u=s-7;for(var f=s;f>=1;f--)c+=i.charAt(s-f)*u,(u-=1)<2&&(u=9);return(d=c%11<2?0:11-c%11)===parseInt(a.charAt(1),10)},\"pt-PT\":function(e){var t=11-s.reverseMultiplyAndSum(e.split(\"\").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return t>9?0===parseInt(e[8],10):t===parseInt(e[8],10)},\"ro-RO\":function(e){if(\"9000\"!==e.slice(0,4)){var t=e.slice(1,3);switch(e[0]){case\"1\":case\"2\":t=\"19\".concat(t);break;case\"3\":case\"4\":t=\"18\".concat(t);break;case\"5\":case\"6\":t=\"20\".concat(t)}var r=\"\".concat(t,\"/\").concat(e.slice(3,5),\"/\").concat(e.slice(5,7));if(8===r.length){if(!(0,i.default)(r,\"YY/MM/DD\"))return!1}else if(!(0,i.default)(r,\"YYYY/MM/DD\"))return!1;for(var n=e.split(\"\").map(function(e){return parseInt(e,10)}),o=[2,7,9,1,4,6,3,5,8,2,7,9],s=0,a=0;a<o.length;a++)s+=n[a]*o[a];return s%11==10?1===n[12]:n[12]===s%11}return!0},\"sk-SK\":function(e){if(9===e.length){if(\"000\"===(e=e.replace(/\\W/,\"\")).slice(6))return!1;var t=parseInt(e.slice(0,2),10);if(t>53)return!1;t=t<10?\"190\".concat(t):\"19\".concat(t);var r=parseInt(e.slice(2,4),10);r>50&&(r-=50),r<10&&(r=\"0\".concat(r));var n=\"\".concat(t,\"/\").concat(r,\"/\").concat(e.slice(4,6));if(!(0,i.default)(n,\"YYYY/MM/DD\"))return!1}return!0},\"sl-SI\":function(e){var t=11-s.reverseMultiplyAndSum(e.split(\"\").slice(0,7).map(function(e){return parseInt(e,10)}),8)%11;return 10===t?0===parseInt(e[7],10):t===parseInt(e[7],10)},\"sv-SE\":function(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var r=\"\",n=t.slice(2,4),o=parseInt(t.slice(4,6),10);if(e.length>11)r=e.slice(0,4);else if(r=e.slice(0,2),11===e.length&&o<60){var a=(new Date).getFullYear().toString(),c=parseInt(a.slice(0,2),10);if(a=parseInt(a,10),\"-\"===e[6])r=parseInt(\"\".concat(c).concat(r),10)>a?\"\".concat(c-1).concat(r):\"\".concat(c).concat(r);else if(r=\"\".concat(c-1).concat(r),a-parseInt(r,10)<100)return!1}o>60&&(o-=60),o<10&&(o=\"0\".concat(o));var u=\"\".concat(r,\"/\").concat(n,\"/\").concat(o);if(8===u.length){if(!(0,i.default)(u,\"YY/MM/DD\"))return!1}else if(!(0,i.default)(u,\"YYYY/MM/DD\"))return!1;return s.luhnCheck(e.replace(/\\W/,\"\"))},\"uk-UA\":function(e){for(var t=e.split(\"\").map(function(e){return parseInt(e,10)}),r=[-1,5,7,9,4,6,10,5,7],n=0,o=0;o<r.length;o++)n+=t[o]*r[o];return n%11==10?0===t[9]:t[9]===n%11}};p[\"lb-LU\"]=p[\"fr-LU\"],p[\"lt-LT\"]=p[\"et-EE\"],p[\"nl-BE\"]=p[\"fr-BE\"],p[\"fr-CA\"]=p[\"en-CA\"];var h=/[-\\\\\\/!@#$%\\^&\\*\\(\\)\\+\\=\\[\\]]+/g,g={\"de-AT\":h,\"de-DE\":/[\\/\\\\]/g,\"fr-BE\":h};g[\"nl-BE\"]=g[\"fr-BE\"],e.exports=t.default,e.exports.default=t.default},427(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return t=(0,o.default)(t,s),\"string\"==typeof e&&i[t.hourFormat][t.mode].test(e)};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};var s={hourFormat:\"hour24\",mode:\"default\"},i={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/,withOptionalSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/,withOptionalSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/}};e.exports=t.default,e.exports.default=t.default},978(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},4121(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\\s<>]/.test(e))return!1;if(0===e.indexOf(\"mailto:\"))return!1;if((t=(0,c.default)(t,d)).validate_length&&e.length>t.max_allowed_length)return!1;if(!t.allow_fragments&&(0,s.default)(e,\"#\"))return!1;if(!t.allow_query_components&&((0,s.default)(e,\"?\")||(0,s.default)(e,\"&\")))return!1;var r,u,p,h,g,y,m,b;m=e.split(\"#\"),e=m.shift(),m=e.split(\"?\");var w=(e=m.shift()).match(/^([a-z][a-z0-9+\\-.]*):/i),v=!1,T=function(n){return v=!0,r=n.toLowerCase(),(!t.require_valid_protocol||-1!==t.protocols.indexOf(r))&&e.substring(w[0].length)};if(w){var A=w[1],E=e.substring(w[0].length);if(\"//\"===E.slice(0,2)){if(!1===(e=T(A)))return!1}else{var P=E.indexOf(\"/\"),B=-1===P?E:E.substring(0,P),C=B.indexOf(\"@\");if(-1!==C){var I=B.substring(0,C);if(/^[a-zA-Z0-9\\-_.%:]*$/.test(I)){if(t.require_protocol)return!1}else if(!1===(e=T(A)))return!1}else if(!1===(e=T(A)))return!1}}else if(t.require_protocol)return!1;if(\"//\"===e.slice(0,2)){if(!v&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(\"\"===e)return!1;if(m=e.split(\"/\"),\"\"===(e=m.shift())&&!t.require_host)return!0;if((m=e.split(\"@\")).length>1){if(t.disallow_auth)return!1;if(\"\"===m[0])return!1;if((u=m.shift()).indexOf(\":\")>=0&&u.split(\":\").length>2)return!1;var S=u.split(\":\"),W=(k=2,function(e){if(Array.isArray(e))return e}(R=S)||function(e,t){var r=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null!=r){var n,o,s,i,a=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}(R,k)||function(e,t){if(e){if(\"string\"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return\"Object\"===r&&e.constructor&&(r=e.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(e):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(R,k)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()),x=W[0],_=W[1];if(\"\"===x&&\"\"===_)return!1}var R,k;h=m.join(\"@\"),y=null,b=null;var O=h.match(f);O?(p=\"\",b=O[1],y=O[2]||null):(p=(m=h.split(\":\")).shift(),m.length&&(y=m.join(\":\")));if(null!==y&&y.length>0){if(g=parseInt(y,10),!/^[0-9]+$/.test(y)||g<=0||g>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return(0,o.default)(p,t.host_whitelist);if(\"\"===p&&!t.require_host)return!0;if(!((0,a.default)(p)||(0,i.default)(p,t)||b&&(0,a.default)(b,6)))return!1;if(p=p||b,t.host_blacklist&&(0,o.default)(p,t.host_blacklist))return!1;return!0};var n=u(r(8354)),o=u(r(8755)),s=u(r(4865)),i=u(r(1881)),a=u(r(6331)),c=u(r(2533));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var d={protocols:[\"http\",\"https\",\"ftp\"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},f=/^\\[([^\\]]+)\\](?::([0-9]+))?$/;e.exports=t.default,e.exports.default=t.default},9317(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e),null==t&&(t=\"all\");return t in s&&s[t].test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default},9864(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toUpperCase()};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2731(e,t,r){\"use strict\";function n(e){return n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,s.default)(e),(0,s.default)(t),t in a)return a[t](e);throw new Error(\"Invalid country code: '\".concat(t,\"'\"))},t.vatMatchers=void 0;var o,s=(o=r(8354))&&o.__esModule?o:{default:o},i=function(e,t){if(\"function\"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var s,i,a={__proto__:null,default:e};if(null===e||\"object\"!=n(e)&&\"function\"!=typeof e)return a;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)\"default\"!==c&&{}.hasOwnProperty.call(e,c)&&((i=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(i.get||i.set)?s(a,c,i):a[c]=e[c]);return a}(e,t)}(r(499));var a=t.vatMatchers={AT:function(e){return/^(AT)?U\\d{8}$/.test(e)},BE:function(e){return/^(BE)?\\d{10}$/.test(e)},BG:function(e){return/^(BG)?\\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\\d{11}$/.test(e)},CY:function(e){return/^(CY)?\\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\\d{8}$/.test(e)},EE:function(e){return/^(EE)?\\d{9}$/.test(e)},FI:function(e){return/^(FI)?\\d{8}$/.test(e)},FR:function(e){return/^(FR)([A-Z0-9]{2}\\d{9})$/.test(e)},DE:function(e){return/^(DE)?\\d{9}$/.test(e)},EL:function(e){return/^(EL)?\\d{9}$/.test(e)},HU:function(e){return/^(HU)?\\d{8}$/.test(e)},IE:function(e){return/^(IE)?\\d{7}\\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\\d{11}$/.test(e)},LV:function(e){return/^(LV)?\\d{11}$/.test(e)},LT:function(e){return/^(LT)?\\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\\d{8}$/.test(e)},MT:function(e){return/^(MT)?\\d{8}$/.test(e)},NL:function(e){return/^(NL)?\\d{9}B\\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\\d{10}|(\\d{3}-\\d{3}-\\d{2}-\\d{2})|(\\d{3}-\\d{2}-\\d{2}-\\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\\d{9})$/);if(!t)return!1;var r=t[2],n=11-i.reverseMultiplyAndSum(r.split(\"\").slice(0,8).map(function(e){return parseInt(e,10)}),9)%11;return n>9?0===parseInt(r[8],10):n===parseInt(r[8],10)},RO:function(e){return/^(RO)?\\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\\d{10}$/.test(e)},SI:function(e){return/^(SI)?\\d{8}$/.test(e)},ES:function(e){return/^(ES)?\\w\\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\\d{12}$/.test(e)},AL:function(e){return/^(AL)?\\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\\d{13}$/.test(e)},AU:function(e){if(!e.match(/^(AU)?(\\d{11})$/))return!1;var t=[10,1,3,5,7,9,11,13,15,17,19];e=e.replace(/^AU/,\"\");for(var r=(parseInt(e.slice(0,1),10)-1).toString()+e.slice(1),n=0,o=0;o<11;o++)n+=t[o]*r.charAt(o);return 0!==n&&n%89==0},BY:function(e){return/^(УНП )?\\d{9}$/.test(e)},CA:function(e){return/^(CA)?\\d{9}$/.test(e)},IS:function(e){return/^(IS)?\\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\\d{15}|(\\d{2}.\\d{3}.\\d{3}.\\d{1}-\\d{3}.\\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\\d{12}$/.test(e)},NZ:function(e){return/^(NZ)?\\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\\d{12}|(\\d{8}-\\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\\d{12}|\\d{3} \\d{3} \\d{3} \\d{3})$/.test(e)},RU:function(e){return/^(RU)?(\\d{10}|\\d{12})$/.test(e)},SM:function(e){return/^(SM)?\\d{5}$/.test(e)},SA:function(e){return/^(SA)?\\d{15}$/.test(e)},RS:function(e){return/^(RS)?\\d{9}$/.test(e)},CH:function(e){var t,r,n;return/^(CHE[- ]?)?(\\d{9}|(\\d{3}\\.\\d{3}\\.\\d{3})|(\\d{3} \\d{3} \\d{3})) ?(TVA|MWST|IVA)?$/.test(e)&&(t=e.match(/\\d/g).map(function(e){return+e}),r=t.pop(),n=[5,4,3,2,7,6,5,4],r===(11-t.reduce(function(e,t,r){return e+t*n[r]},0)%11)%11)},TR:function(e){return/^(TR)?\\d{10}$/.test(e)},UA:function(e){return/^(UA)?\\d{12}$/.test(e)},GB:function(e){return/^GB((\\d{3} \\d{4} ([0-8][0-9]|9[0-6]))|(\\d{9} \\d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e)},UZ:function(e){return/^(UZ)?\\d{9}$/.test(e)},AR:function(e){return/^(AR)?\\d{11}$/.test(e)},BO:function(e){return/^(BO)?\\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\\d{2}.\\d{3}.\\d{3}\\/\\d{4}-\\d{2})|(\\d{3}.\\d{3}.\\d{3}-\\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\\d{8}-\\d{1}$/.test(e)},CO:function(e){return/^(CO)?\\d{10}$/.test(e)},CR:function(e){return/^(CR)?\\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\\d{13}$/.test(e)},SV:function(e){return/^(SV)?\\d{4}-\\d{6}-\\d{3}-\\d{1}$/.test(e)},GT:function(e){return/^(GT)?\\d{7}-\\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\\w{3,4}\\d{6}\\w{3}$/.test(e)},NI:function(e){return/^(NI)?\\d{3}-\\d{6}-\\d{4}\\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\\d{6,8}-\\d{1}$/.test(e)},PE:function(e){return/^(PE)?\\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\\d{11}|(\\d{3}-\\d{7}-\\d{1})|[1,4,5]{1}\\d{8}|([1,4,5]{1})-\\d{2}-\\d{5}-\\d{1})$/.test(e)},UY:function(e){return/^(UY)?\\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\\d{9}|(\\d{8}-\\d{1}))$/.test(e)}}},8524(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),s.fullWidth.test(e)&&i.halfWidth.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(3167),i=r(2167);e.exports=t.default,e.exports.default=t.default},4144(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},448(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=t?new RegExp(\"^[\".concat(t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"]+\"),\"g\"):/^\\s+/g;return e.replace(r,\"\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2929(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t,r){(0,o.default)(e),\"[object RegExp]\"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r));return!!e.match(t)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5635(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){t=(0,o.default)(t,s);var r=e.split(\"@\"),n=r.pop(),d=[r.join(\"@\"),n];if(d[1]=d[1].toLowerCase(),\"gmail.com\"===d[1]||\"googlemail.com\"===d[1]){if(t.gmail_remove_subaddress&&(d[0]=d[0].split(\"+\")[0]),t.gmail_remove_dots&&(d[0]=d[0].replace(/\\.+/g,l)),!d[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.gmail_convert_googlemaildotcom?\"gmail.com\":d[1]}else if(i.indexOf(d[1])>=0){if(t.icloud_remove_subaddress&&(d[0]=d[0].split(\"+\")[0]),!d[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(d[0]=d[0].toLowerCase())}else if(a.indexOf(d[1])>=0){if(t.outlookdotcom_remove_subaddress&&(d[0]=d[0].split(\"+\")[0]),!d[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(d[0]=d[0].toLowerCase())}else if(c.indexOf(d[1])>=0){if(t.yahoo_remove_subaddress){var f=d[0].split(\"-\");d[0]=f.length>1?f.slice(0,-1).join(\"-\"):f[0]}if(!d[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(d[0]=d[0].toLowerCase())}else u.indexOf(d[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.yandex_convert_yandexru?\"yandex.ru\":d[1]):t.all_lowercase&&(d[0]=d[0].toLowerCase());return d.join(\"@\")};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};var s={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,yandex_convert_yandexru:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},i=[\"icloud.com\",\"me.com\"],a=[\"hotmail.at\",\"hotmail.be\",\"hotmail.ca\",\"hotmail.cl\",\"hotmail.co.il\",\"hotmail.co.nz\",\"hotmail.co.th\",\"hotmail.co.uk\",\"hotmail.com\",\"hotmail.com.ar\",\"hotmail.com.au\",\"hotmail.com.br\",\"hotmail.com.gr\",\"hotmail.com.mx\",\"hotmail.com.pe\",\"hotmail.com.tr\",\"hotmail.com.vn\",\"hotmail.cz\",\"hotmail.de\",\"hotmail.dk\",\"hotmail.es\",\"hotmail.fr\",\"hotmail.hu\",\"hotmail.id\",\"hotmail.ie\",\"hotmail.in\",\"hotmail.it\",\"hotmail.jp\",\"hotmail.kr\",\"hotmail.lv\",\"hotmail.my\",\"hotmail.ph\",\"hotmail.pt\",\"hotmail.sa\",\"hotmail.sg\",\"hotmail.sk\",\"live.be\",\"live.co.uk\",\"live.com\",\"live.com.ar\",\"live.com.mx\",\"live.de\",\"live.es\",\"live.eu\",\"live.fr\",\"live.it\",\"live.nl\",\"msn.com\",\"outlook.at\",\"outlook.be\",\"outlook.cl\",\"outlook.co.il\",\"outlook.co.nz\",\"outlook.co.th\",\"outlook.com\",\"outlook.com.ar\",\"outlook.com.au\",\"outlook.com.br\",\"outlook.com.gr\",\"outlook.com.pe\",\"outlook.com.tr\",\"outlook.com.vn\",\"outlook.cz\",\"outlook.de\",\"outlook.dk\",\"outlook.es\",\"outlook.fr\",\"outlook.hu\",\"outlook.id\",\"outlook.ie\",\"outlook.in\",\"outlook.it\",\"outlook.jp\",\"outlook.kr\",\"outlook.lv\",\"outlook.my\",\"outlook.ph\",\"outlook.pt\",\"outlook.sa\",\"outlook.sg\",\"outlook.sk\",\"passport.com\"],c=[\"rocketmail.com\",\"yahoo.ca\",\"yahoo.co.uk\",\"yahoo.com\",\"yahoo.de\",\"yahoo.fr\",\"yahoo.in\",\"yahoo.it\",\"ymail.com\"],u=[\"yandex.ru\",\"yandex.ua\",\"yandex.kz\",\"yandex.com\",\"yandex.by\",\"ya.ru\"];function l(e){return e.length>1?e:\"\"}e.exports=t.default,e.exports.default=t.default},2690(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t){var r=new RegExp(\"[\".concat(t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"),\"]+$\"),\"g\");return e.replace(r,\"\")}var n=e.length-1;for(;/\\s/.test(e.charAt(n));)n-=1;return e.slice(0,n+1)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3350(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=t?\"\\\\x00-\\\\x09\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F\":\"\\\\x00-\\\\x1F\\\\x7F\";return(0,o.default)(e,r)};var n=s(r(8354)),o=s(r(3099));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3751(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t)return\"1\"===e||/^true$/i.test(e);return\"0\"!==e&&!/^false$/i.test(e)&&\"\"!==e};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5071(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2177(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e)?parseFloat(e):NaN};var n,o=(n=r(9190))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3422(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),parseInt(e,t||10)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3146(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,n.default)((0,o.default)(e,t),t)};var n=s(r(2690)),o=s(r(448));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},6070(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return(0,o.default)(e),e.replace(/&quot;/g,'\"').replace(/&#x27;/g,\"'\").replace(/&lt;/g,\"<\").replace(/&gt;/g,\">\").replace(/&#x2F;/g,\"/\").replace(/&#x5C;/g,\"\\\\\").replace(/&#96;/g,\"`\").replace(/&amp;/g,\"&\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},499(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.iso7064Check=function(e){for(var t=10,r=0;r<e.length-1;r++)t=(parseInt(e[r],10)+t)%10==0?9:(parseInt(e[r],10)+t)%10*2%11;return(t=1===t?0:11-t)===parseInt(e[10],10)},t.luhnCheck=function(e){for(var t=0,r=!1,n=e.length-1;n>=0;n--){if(r){var o=2*parseInt(e[n],10);t+=o>9?o.toString().split(\"\").map(function(e){return parseInt(e,10)}).reduce(function(e,t){return e+t},0):o}else t+=parseInt(e[n],10);r=!r}return t%10==0},t.reverseMultiplyAndSum=function(e,t){for(var r=0,n=0;n<e.length;n++)r+=e[n]*(t-n);return r},t.verhoeffCheck=function(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.split(\"\").reverse().join(\"\"),o=0,s=0;s<n.length;s++)o=t[o][r[s%8][parseInt(n[s],10)]];return 0===o}},8354(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){if(null==e)throw new TypeError(\"Expected a string but received a \".concat(e));if(\"String\"!==e.constructor.name)throw new TypeError(\"Expected a string but received a \".concat(e.constructor.name))},e.exports=t.default,e.exports.default=t.default},8755(e,t){\"use strict\";function r(e){return\"[object RegExp]\"===Object.prototype.toString.call(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){for(var n=0;n<t.length;n++){var o=t[n];if(e===o||r(o)&&o.test(e))return!0}return!1},e.exports=t.default,e.exports.default=t.default},567(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;t.default=function(e,t){return e.some(function(e){return t===e})};e.exports=t.default,e.exports.default=t.default},4865(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;t.default=function(e,t){return-1!==e.indexOf(t)};e.exports=t.default,e.exports.default=t.default},2533(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default},9043(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){var r=e.join(\"\");return new RegExp(r,t)},e.exports=t.default,e.exports.default=t.default},3224(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){return null==e},e.exports=t.default,e.exports.default=t.default},1069(e,t){\"use strict\";function r(e){return r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},r(e)}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){\"object\"===r(e)&&null!==e?e=\"function\"==typeof e.toString?e.toString():\"[object Object]\":(null==e||isNaN(e)&&!e.length)&&(e=\"\");return String(e)},e.exports=t.default,e.exports.default=t.default},3181(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp(\"[^\".concat(t,\"]+\"),\"g\"),\"\")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},4856(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),i=r(5358);o.object.extend(proto,i),o.exportSymbol(\"TronWebProto.Account\",null,s),o.exportSymbol(\"TronWebProto.Account.AccountResource\",null,s),o.exportSymbol(\"TronWebProto.Account.Frozen\",null,s),o.exportSymbol(\"TronWebProto.AccountId\",null,s),o.exportSymbol(\"TronWebProto.AccountType\",null,s),o.exportSymbol(\"TronWebProto.DelegatedResource\",null,s),o.exportSymbol(\"TronWebProto.Exchange\",null,s),o.exportSymbol(\"TronWebProto.Key\",null,s),o.exportSymbol(\"TronWebProto.MarketOrderDetail\",null,s),o.exportSymbol(\"TronWebProto.Permission\",null,s),o.exportSymbol(\"TronWebProto.Permission.PermissionType\",null,s),o.exportSymbol(\"TronWebProto.Proposal\",null,s),o.exportSymbol(\"TronWebProto.Proposal.State\",null,s),o.exportSymbol(\"TronWebProto.Transaction\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Contract\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Contract.ContractType\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Result\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Result.code\",null,s),o.exportSymbol(\"TronWebProto.Transaction.Result.contractResult\",null,s),o.exportSymbol(\"TronWebProto.Transaction.raw\",null,s),o.exportSymbol(\"TronWebProto.Vote\",null,s),o.exportSymbol(\"TronWebProto.Votes\",null,s),o.exportSymbol(\"TronWebProto.Witness\",null,s),o.exportSymbol(\"TronWebProto.authority\",null,s),TronWebProto.AccountId=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountId,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountId.displayName=\"TronWebProto.AccountId\"),TronWebProto.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Vote.displayName=\"TronWebProto.Vote\"),TronWebProto.Proposal=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Proposal.repeatedFields_,null)},o.inherits(TronWebProto.Proposal,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Proposal.displayName=\"TronWebProto.Proposal\"),TronWebProto.Exchange=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Exchange,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Exchange.displayName=\"TronWebProto.Exchange\"),TronWebProto.Account=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Account.repeatedFields_,null)},o.inherits(TronWebProto.Account,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.displayName=\"TronWebProto.Account\"),TronWebProto.Account.Frozen=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.Frozen,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.Frozen.displayName=\"TronWebProto.Account.Frozen\"),TronWebProto.Account.AccountResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.AccountResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.AccountResource.displayName=\"TronWebProto.Account.AccountResource\"),TronWebProto.Key=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Key,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Key.displayName=\"TronWebProto.Key\"),TronWebProto.DelegatedResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegatedResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegatedResource.displayName=\"TronWebProto.DelegatedResource\"),TronWebProto.authority=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.authority,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.authority.displayName=\"TronWebProto.authority\"),TronWebProto.Permission=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Permission.repeatedFields_,null)},o.inherits(TronWebProto.Permission,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Permission.displayName=\"TronWebProto.Permission\"),TronWebProto.Witness=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Witness,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Witness.displayName=\"TronWebProto.Witness\"),TronWebProto.Votes=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Votes.repeatedFields_,null)},o.inherits(TronWebProto.Votes,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Votes.displayName=\"TronWebProto.Votes\"),TronWebProto.MarketOrderDetail=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.MarketOrderDetail,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.MarketOrderDetail.displayName=\"TronWebProto.MarketOrderDetail\"),TronWebProto.Transaction=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.repeatedFields_,null)},o.inherits(TronWebProto.Transaction,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.displayName=\"TronWebProto.Transaction\"),TronWebProto.Transaction.Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Transaction.Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Contract.displayName=\"TronWebProto.Transaction.Contract\"),TronWebProto.Transaction.Result=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.Result.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.Result,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Result.displayName=\"TronWebProto.Transaction.Result\"),TronWebProto.Transaction.raw=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.raw.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.raw,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.raw.displayName=\"TronWebProto.Transaction.raw\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountId.prototype.toObject=function(e){return TronWebProto.AccountId.toObject(e,this)},TronWebProto.AccountId.toObject=function(e,t){var r={name:t.getName_asB64(),address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountId.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountId;return TronWebProto.AccountId.deserializeBinaryFromReader(r,t)},TronWebProto.AccountId.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setName(r);break;case 2:r=t.readBytes();e.setAddress(r);break;default:t.skipField()}}return e},TronWebProto.AccountId.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountId.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountId.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountId.prototype.getName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountId.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AccountId.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AccountId.prototype.setName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountId.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AccountId.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountId.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountId.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Vote.prototype.toObject=function(e){return TronWebProto.Vote.toObject(e,this)},TronWebProto.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Vote;return TronWebProto.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64();e.setVoteCount(r);break;default:t.skipField()}}return e},TronWebProto.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Proposal.repeatedFields_=[6],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Proposal.prototype.toObject=function(e){return TronWebProto.Proposal.toObject(e,this)},TronWebProto.Proposal.toObject=function(e,t){var r,o={proposalId:n.Message.getFieldWithDefault(t,1,0),proposerAddress:t.getProposerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[],expirationTime:n.Message.getFieldWithDefault(t,4,0),createTime:n.Message.getFieldWithDefault(t,5,0),approvalsList:t.getApprovalsList_asB64(),state:n.Message.getFieldWithDefault(t,7,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Proposal.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Proposal;return TronWebProto.Proposal.deserializeBinaryFromReader(r,t)},TronWebProto.Proposal.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setProposalId(r);break;case 2:r=t.readBytes();e.setProposerAddress(r);break;case 3:r=e.getParametersMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)});break;case 4:r=t.readInt64();e.setExpirationTime(r);break;case 5:r=t.readInt64();e.setCreateTime(r);break;case 6:r=t.readBytes();e.addApprovals(r);break;case 7:r=t.readEnum();e.setState(r);break;default:t.skipField()}}return e},TronWebProto.Proposal.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Proposal.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Proposal.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getProposalId())&&t.writeInt64(1,r),(r=e.getProposerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(3,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getExpirationTime())&&t.writeInt64(4,r),0!==(r=e.getCreateTime())&&t.writeInt64(5,r),(r=e.getApprovalsList_asU8()).length>0&&t.writeRepeatedBytes(6,r),0!==(r=e.getState())&&t.writeEnum(7,r)},TronWebProto.Proposal.State={PENDING:0,DISAPPROVED:1,APPROVED:2,CANCELED:3},TronWebProto.Proposal.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Proposal.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Proposal.prototype.getProposerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.Proposal.prototype.getProposerAddress_asB64=function(){return n.Message.bytesAsB64(this.getProposerAddress())},TronWebProto.Proposal.prototype.getProposerAddress_asU8=function(){return n.Message.bytesAsU8(this.getProposerAddress())},TronWebProto.Proposal.prototype.setProposerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Proposal.prototype.getParametersMap=function(e){return n.Message.getMapField(this,3,e,null)},TronWebProto.Proposal.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},TronWebProto.Proposal.prototype.getExpirationTime=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Proposal.prototype.setExpirationTime=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Proposal.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Proposal.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Proposal.prototype.getApprovalsList=function(){return n.Message.getRepeatedField(this,6)},TronWebProto.Proposal.prototype.getApprovalsList_asB64=function(){return n.Message.bytesListAsB64(this.getApprovalsList())},TronWebProto.Proposal.prototype.getApprovalsList_asU8=function(){return n.Message.bytesListAsU8(this.getApprovalsList())},TronWebProto.Proposal.prototype.setApprovalsList=function(e){return n.Message.setField(this,6,e||[])},TronWebProto.Proposal.prototype.addApprovals=function(e,t){return n.Message.addToRepeatedField(this,6,e,t)},TronWebProto.Proposal.prototype.clearApprovalsList=function(){return this.setApprovalsList([])},TronWebProto.Proposal.prototype.getState=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Proposal.prototype.setState=function(e){return n.Message.setProto3EnumField(this,7,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Exchange.prototype.toObject=function(e){return TronWebProto.Exchange.toObject(e,this)},TronWebProto.Exchange.toObject=function(e,t){var r={exchangeId:n.Message.getFieldWithDefault(t,1,0),creatorAddress:t.getCreatorAddress_asB64(),createTime:n.Message.getFieldWithDefault(t,3,0),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,7,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,9,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Exchange.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Exchange;return TronWebProto.Exchange.deserializeBinaryFromReader(r,t)},TronWebProto.Exchange.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setExchangeId(r);break;case 2:r=t.readBytes();e.setCreatorAddress(r);break;case 3:r=t.readInt64();e.setCreateTime(r);break;case 6:r=t.readBytes();e.setFirstTokenId(r);break;case 7:r=t.readInt64();e.setFirstTokenBalance(r);break;case 8:r=t.readBytes();e.setSecondTokenId(r);break;case 9:r=t.readInt64();e.setSecondTokenBalance(r);break;default:t.skipField()}}return e},TronWebProto.Exchange.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Exchange.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Exchange.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getExchangeId())&&t.writeInt64(1,r),(r=e.getCreatorAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCreateTime())&&t.writeInt64(3,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(6,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(7,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(8,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(9,r)},TronWebProto.Exchange.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Exchange.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Exchange.prototype.getCreatorAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.Exchange.prototype.getCreatorAddress_asB64=function(){return n.Message.bytesAsB64(this.getCreatorAddress())},TronWebProto.Exchange.prototype.getCreatorAddress_asU8=function(){return n.Message.bytesAsU8(this.getCreatorAddress())},TronWebProto.Exchange.prototype.setCreatorAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Exchange.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Exchange.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Exchange.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,6,\"\")},TronWebProto.Exchange.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.Exchange.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.Exchange.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Exchange.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Exchange.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Exchange.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,8,\"\")},TronWebProto.Exchange.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.Exchange.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.Exchange.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,8,e)},TronWebProto.Exchange.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Exchange.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.repeatedFields_=[5,7,16,33],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.prototype.toObject=function(e){return TronWebProto.Account.toObject(e,this)},TronWebProto.Account.toObject=function(e,t){var r,o={accountName:t.getAccountName_asB64(),type:n.Message.getFieldWithDefault(t,2,0),address:t.getAddress_asB64(),balance:n.Message.getFieldWithDefault(t,4,0),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.Vote.toObject,e),assetMap:(r=t.getAssetMap())?r.toObject(e,void 0):[],assetv2Map:(r=t.getAssetv2Map())?r.toObject(e,void 0):[],frozenList:n.Message.toObjectList(t.getFrozenList(),TronWebProto.Account.Frozen.toObject,e),netUsage:n.Message.getFieldWithDefault(t,8,0),acquiredDelegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,41,0),delegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,42,0),oldTronPower:n.Message.getFieldWithDefault(t,46,0),tronPower:(r=t.getTronPower())&&TronWebProto.Account.Frozen.toObject(e,r),assetOptimized:n.Message.getBooleanFieldWithDefault(t,60,!1),createTime:n.Message.getFieldWithDefault(t,9,0),latestOprationTime:n.Message.getFieldWithDefault(t,10,0),allowance:n.Message.getFieldWithDefault(t,11,0),latestWithdrawTime:n.Message.getFieldWithDefault(t,12,0),code:t.getCode_asB64(),isWitness:n.Message.getBooleanFieldWithDefault(t,14,!1),isCommittee:n.Message.getBooleanFieldWithDefault(t,15,!1),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.Account.Frozen.toObject,e),assetIssuedName:t.getAssetIssuedName_asB64(),assetIssuedId:t.getAssetIssuedId_asB64(),latestAssetOperationTimeMap:(r=t.getLatestAssetOperationTimeMap())?r.toObject(e,void 0):[],latestAssetOperationTimev2Map:(r=t.getLatestAssetOperationTimev2Map())?r.toObject(e,void 0):[],freeNetUsage:n.Message.getFieldWithDefault(t,19,0),freeAssetNetUsageMap:(r=t.getFreeAssetNetUsageMap())?r.toObject(e,void 0):[],freeAssetNetUsagev2Map:(r=t.getFreeAssetNetUsagev2Map())?r.toObject(e,void 0):[],latestConsumeTime:n.Message.getFieldWithDefault(t,21,0),latestConsumeFreeTime:n.Message.getFieldWithDefault(t,22,0),accountId:t.getAccountId_asB64(),accountResource:(r=t.getAccountResource())&&TronWebProto.Account.AccountResource.toObject(e,r),codehash:t.getCodehash_asB64(),ownerPermission:(r=t.getOwnerPermission())&&TronWebProto.Permission.toObject(e,r),witnessPermission:(r=t.getWitnessPermission())&&TronWebProto.Permission.toObject(e,r),activePermissionList:n.Message.toObjectList(t.getActivePermissionList(),TronWebProto.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account;return TronWebProto.Account.deserializeBinaryFromReader(r,t)},TronWebProto.Account.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readEnum();e.setType(r);break;case 3:r=t.readBytes();e.setAddress(r);break;case 4:r=t.readInt64();e.setBalance(r);break;case 5:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 6:r=e.getAssetMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 56:r=e.getAssetv2Map();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 7:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozen(r);break;case 8:r=t.readInt64();e.setNetUsage(r);break;case 41:r=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForBandwidth(r);break;case 42:r=t.readInt64();e.setDelegatedFrozenBalanceForBandwidth(r);break;case 46:r=t.readInt64();e.setOldTronPower(r);break;case 47:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setTronPower(r);break;case 60:r=t.readBool();e.setAssetOptimized(r);break;case 9:r=t.readInt64();e.setCreateTime(r);break;case 10:r=t.readInt64();e.setLatestOprationTime(r);break;case 11:r=t.readInt64();e.setAllowance(r);break;case 12:r=t.readInt64();e.setLatestWithdrawTime(r);break;case 13:r=t.readBytes();e.setCode(r);break;case 14:r=t.readBool();e.setIsWitness(r);break;case 15:r=t.readBool();e.setIsCommittee(r);break;case 16:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 17:r=t.readBytes();e.setAssetIssuedName(r);break;case 57:r=t.readBytes();e.setAssetIssuedId(r);break;case 18:r=e.getLatestAssetOperationTimeMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 58:r=e.getLatestAssetOperationTimev2Map();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 19:r=t.readInt64();e.setFreeNetUsage(r);break;case 20:r=e.getFreeAssetNetUsageMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 59:r=e.getFreeAssetNetUsagev2Map();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,\"\",0)});break;case 21:r=t.readInt64();e.setLatestConsumeTime(r);break;case 22:r=t.readInt64();e.setLatestConsumeFreeTime(r);break;case 23:r=t.readBytes();e.setAccountId(r);break;case 26:r=new TronWebProto.Account.AccountResource;t.readMessage(r,TronWebProto.Account.AccountResource.deserializeBinaryFromReader),e.setAccountResource(r);break;case 30:r=t.readBytes();e.setCodehash(r);break;case 31:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setOwnerPermission(r);break;case 32:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setWitnessPermission(r);break;case 33:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.addActivePermission(r);break;default:t.skipField()}}return e},TronWebProto.Account.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getType())&&t.writeEnum(2,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getBalance())&&t.writeInt64(4,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getAssetMap(!0))&&r.getLength()>0&&r.serializeBinary(6,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getAssetv2Map(!0))&&r.getLength()>0&&r.serializeBinary(56,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFrozenList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getNetUsage())&&t.writeInt64(8,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(41,r),0!==(r=e.getDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(42,r),0!==(r=e.getOldTronPower())&&t.writeInt64(46,r),null!=(r=e.getTronPower())&&t.writeMessage(47,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetOptimized())&&t.writeBool(60,r),0!==(r=e.getCreateTime())&&t.writeInt64(9,r),0!==(r=e.getLatestOprationTime())&&t.writeInt64(10,r),0!==(r=e.getAllowance())&&t.writeInt64(11,r),0!==(r=e.getLatestWithdrawTime())&&t.writeInt64(12,r),(r=e.getCode_asU8()).length>0&&t.writeBytes(13,r),(r=e.getIsWitness())&&t.writeBool(14,r),(r=e.getIsCommittee())&&t.writeBool(15,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(16,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetIssuedName_asU8()).length>0&&t.writeBytes(17,r),(r=e.getAssetIssuedId_asU8()).length>0&&t.writeBytes(57,r),(r=e.getLatestAssetOperationTimeMap(!0))&&r.getLength()>0&&r.serializeBinary(18,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getLatestAssetOperationTimev2Map(!0))&&r.getLength()>0&&r.serializeBinary(58,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getFreeNetUsage())&&t.writeInt64(19,r),(r=e.getFreeAssetNetUsageMap(!0))&&r.getLength()>0&&r.serializeBinary(20,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFreeAssetNetUsagev2Map(!0))&&r.getLength()>0&&r.serializeBinary(59,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getLatestConsumeTime())&&t.writeInt64(21,r),0!==(r=e.getLatestConsumeFreeTime())&&t.writeInt64(22,r),(r=e.getAccountId_asU8()).length>0&&t.writeBytes(23,r),null!=(r=e.getAccountResource())&&t.writeMessage(26,r,TronWebProto.Account.AccountResource.serializeBinaryToWriter),(r=e.getCodehash_asU8()).length>0&&t.writeBytes(30,r),null!=(r=e.getOwnerPermission())&&t.writeMessage(31,r,TronWebProto.Permission.serializeBinaryToWriter),null!=(r=e.getWitnessPermission())&&t.writeMessage(32,r,TronWebProto.Permission.serializeBinaryToWriter),(r=e.getActivePermissionList()).length>0&&t.writeRepeatedMessage(33,r,TronWebProto.Permission.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.Frozen.prototype.toObject=function(e){return TronWebProto.Account.Frozen.toObject(e,this)},TronWebProto.Account.Frozen.toObject=function(e,t){var r={frozenBalance:n.Message.getFieldWithDefault(t,1,0),expireTime:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Account.Frozen.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.Frozen;return TronWebProto.Account.Frozen.deserializeBinaryFromReader(r,t)},TronWebProto.Account.Frozen.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenBalance(r);break;case 2:r=t.readInt64();e.setExpireTime(r);break;default:t.skipField()}}return e},TronWebProto.Account.Frozen.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.Frozen.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.Frozen.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenBalance())&&t.writeInt64(1,r),0!==(r=e.getExpireTime())&&t.writeInt64(2,r)},TronWebProto.Account.Frozen.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.Frozen.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.Frozen.prototype.getExpireTime=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.Frozen.prototype.setExpireTime=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.AccountResource.prototype.toObject=function(e){return TronWebProto.Account.AccountResource.toObject(e,this)},TronWebProto.Account.AccountResource.toObject=function(e,t){var r,o={energyUsage:n.Message.getFieldWithDefault(t,1,0),frozenBalanceForEnergy:(r=t.getFrozenBalanceForEnergy())&&TronWebProto.Account.Frozen.toObject(e,r),latestConsumeTimeForEnergy:n.Message.getFieldWithDefault(t,3,0),acquiredDelegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),delegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,5,0),storageLimit:n.Message.getFieldWithDefault(t,6,0),storageUsage:n.Message.getFieldWithDefault(t,7,0),latestExchangeStorageTime:n.Message.getFieldWithDefault(t,8,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.AccountResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.AccountResource;return TronWebProto.Account.AccountResource.deserializeBinaryFromReader(r,t)},TronWebProto.Account.AccountResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setFrozenBalanceForEnergy(r);break;case 3:r=t.readInt64();e.setLatestConsumeTimeForEnergy(r);break;case 4:r=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64();e.setDelegatedFrozenBalanceForEnergy(r);break;case 6:r=t.readInt64();e.setStorageLimit(r);break;case 7:r=t.readInt64();e.setStorageUsage(r);break;case 8:r=t.readInt64();e.setLatestExchangeStorageTime(r);break;default:t.skipField()}}return e},TronWebProto.Account.AccountResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.AccountResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.AccountResource.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),null!=(r=e.getFrozenBalanceForEnergy())&&t.writeMessage(2,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getLatestConsumeTimeForEnergy())&&t.writeInt64(3,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getDelegatedFrozenBalanceForEnergy())&&t.writeInt64(5,r),0!==(r=e.getStorageLimit())&&t.writeInt64(6,r),0!==(r=e.getStorageUsage())&&t.writeInt64(7,r),0!==(r=e.getLatestExchangeStorageTime())&&t.writeInt64(8,r)},TronWebProto.Account.AccountResource.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.AccountResource.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.AccountResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,2)},TronWebProto.Account.AccountResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Account.AccountResource.prototype.clearFrozenBalanceForEnergy=function(){return this.setFrozenBalanceForEnergy(void 0)},TronWebProto.Account.AccountResource.prototype.hasFrozenBalanceForEnergy=function(){return null!=n.Message.getField(this,2)},TronWebProto.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Account.AccountResource.prototype.getStorageLimit=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Account.AccountResource.prototype.setStorageLimit=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Account.AccountResource.prototype.getStorageUsage=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Account.AccountResource.prototype.setStorageUsage=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Account.AccountResource.prototype.getLatestExchangeStorageTime=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.AccountResource.prototype.setLatestExchangeStorageTime=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Account.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.Account.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.Account.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Account.prototype.getType=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.prototype.setType=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Account.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Account.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Account.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Account.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Account.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,5)},TronWebProto.Account.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Account.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Vote,t)},TronWebProto.Account.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.Account.prototype.getAssetMap=function(e){return n.Message.getMapField(this,6,e,null)},TronWebProto.Account.prototype.clearAssetMap=function(){return this.getAssetMap().clear(),this},TronWebProto.Account.prototype.getAssetv2Map=function(e){return n.Message.getMapField(this,56,e,null)},TronWebProto.Account.prototype.clearAssetv2Map=function(){return this.getAssetv2Map().clear(),this},TronWebProto.Account.prototype.getFrozenList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,7)},TronWebProto.Account.prototype.setFrozenList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Account.prototype.addFrozen=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenList=function(){return this.setFrozenList([])},TronWebProto.Account.prototype.getNetUsage=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.prototype.setNetUsage=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,41,0)},TronWebProto.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,41,e)},TronWebProto.Account.prototype.getDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,42,0)},TronWebProto.Account.prototype.setDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,42,e)},TronWebProto.Account.prototype.getOldTronPower=function(){return n.Message.getFieldWithDefault(this,46,0)},TronWebProto.Account.prototype.setOldTronPower=function(e){return n.Message.setProto3IntField(this,46,e)},TronWebProto.Account.prototype.getTronPower=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,47)},TronWebProto.Account.prototype.setTronPower=function(e){return n.Message.setWrapperField(this,47,e)},TronWebProto.Account.prototype.clearTronPower=function(){return this.setTronPower(void 0)},TronWebProto.Account.prototype.hasTronPower=function(){return null!=n.Message.getField(this,47)},TronWebProto.Account.prototype.getAssetOptimized=function(){return n.Message.getBooleanFieldWithDefault(this,60,!1)},TronWebProto.Account.prototype.setAssetOptimized=function(e){return n.Message.setProto3BooleanField(this,60,e)},TronWebProto.Account.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Account.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.prototype.getLatestOprationTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.Account.prototype.setLatestOprationTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.Account.prototype.getAllowance=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.Account.prototype.setAllowance=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.Account.prototype.getLatestWithdrawTime=function(){return n.Message.getFieldWithDefault(this,12,0)},TronWebProto.Account.prototype.setLatestWithdrawTime=function(e){return n.Message.setProto3IntField(this,12,e)},TronWebProto.Account.prototype.getCode=function(){return n.Message.getFieldWithDefault(this,13,\"\")},TronWebProto.Account.prototype.getCode_asB64=function(){return n.Message.bytesAsB64(this.getCode())},TronWebProto.Account.prototype.getCode_asU8=function(){return n.Message.bytesAsU8(this.getCode())},TronWebProto.Account.prototype.setCode=function(e){return n.Message.setProto3BytesField(this,13,e)},TronWebProto.Account.prototype.getIsWitness=function(){return n.Message.getBooleanFieldWithDefault(this,14,!1)},TronWebProto.Account.prototype.setIsWitness=function(e){return n.Message.setProto3BooleanField(this,14,e)},TronWebProto.Account.prototype.getIsCommittee=function(){return n.Message.getBooleanFieldWithDefault(this,15,!1)},TronWebProto.Account.prototype.setIsCommittee=function(e){return n.Message.setProto3BooleanField(this,15,e)},TronWebProto.Account.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,16)},TronWebProto.Account.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,16,e)},TronWebProto.Account.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,16,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.Account.prototype.getAssetIssuedName=function(){return n.Message.getFieldWithDefault(this,17,\"\")},TronWebProto.Account.prototype.getAssetIssuedName_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedName())},TronWebProto.Account.prototype.getAssetIssuedName_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedName())},TronWebProto.Account.prototype.setAssetIssuedName=function(e){return n.Message.setProto3BytesField(this,17,e)},TronWebProto.Account.prototype.getAssetIssuedId=function(){return n.Message.getFieldWithDefault(this,57,\"\")},TronWebProto.Account.prototype.getAssetIssuedId_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedId())},TronWebProto.Account.prototype.getAssetIssuedId_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedId())},TronWebProto.Account.prototype.setAssetIssuedId=function(e){return n.Message.setProto3BytesField(this,57,e)},TronWebProto.Account.prototype.getLatestAssetOperationTimeMap=function(e){return n.Message.getMapField(this,18,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimeMap=function(){return this.getLatestAssetOperationTimeMap().clear(),this},TronWebProto.Account.prototype.getLatestAssetOperationTimev2Map=function(e){return n.Message.getMapField(this,58,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimev2Map=function(){return this.getLatestAssetOperationTimev2Map().clear(),this},TronWebProto.Account.prototype.getFreeNetUsage=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Account.prototype.setFreeNetUsage=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Account.prototype.getFreeAssetNetUsageMap=function(e){return n.Message.getMapField(this,20,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsageMap=function(){return this.getFreeAssetNetUsageMap().clear(),this},TronWebProto.Account.prototype.getFreeAssetNetUsagev2Map=function(e){return n.Message.getMapField(this,59,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsagev2Map=function(){return this.getFreeAssetNetUsagev2Map().clear(),this},TronWebProto.Account.prototype.getLatestConsumeTime=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Account.prototype.setLatestConsumeTime=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Account.prototype.getLatestConsumeFreeTime=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Account.prototype.setLatestConsumeFreeTime=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Account.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,23,\"\")},TronWebProto.Account.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.Account.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.Account.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,23,e)},TronWebProto.Account.prototype.getAccountResource=function(){return n.Message.getWrapperField(this,TronWebProto.Account.AccountResource,26)},TronWebProto.Account.prototype.setAccountResource=function(e){return n.Message.setWrapperField(this,26,e)},TronWebProto.Account.prototype.clearAccountResource=function(){return this.setAccountResource(void 0)},TronWebProto.Account.prototype.hasAccountResource=function(){return null!=n.Message.getField(this,26)},TronWebProto.Account.prototype.getCodehash=function(){return n.Message.getFieldWithDefault(this,30,\"\")},TronWebProto.Account.prototype.getCodehash_asB64=function(){return n.Message.bytesAsB64(this.getCodehash())},TronWebProto.Account.prototype.getCodehash_asU8=function(){return n.Message.bytesAsU8(this.getCodehash())},TronWebProto.Account.prototype.setCodehash=function(e){return n.Message.setProto3BytesField(this,30,e)},TronWebProto.Account.prototype.getOwnerPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,31)},TronWebProto.Account.prototype.setOwnerPermission=function(e){return n.Message.setWrapperField(this,31,e)},TronWebProto.Account.prototype.clearOwnerPermission=function(){return this.setOwnerPermission(void 0)},TronWebProto.Account.prototype.hasOwnerPermission=function(){return null!=n.Message.getField(this,31)},TronWebProto.Account.prototype.getWitnessPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,32)},TronWebProto.Account.prototype.setWitnessPermission=function(e){return n.Message.setWrapperField(this,32,e)},TronWebProto.Account.prototype.clearWitnessPermission=function(){return this.setWitnessPermission(void 0)},TronWebProto.Account.prototype.hasWitnessPermission=function(){return null!=n.Message.getField(this,32)},TronWebProto.Account.prototype.getActivePermissionList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Permission,33)},TronWebProto.Account.prototype.setActivePermissionList=function(e){return n.Message.setRepeatedWrapperField(this,33,e)},TronWebProto.Account.prototype.addActivePermission=function(e,t){return n.Message.addToRepeatedWrapperField(this,33,e,TronWebProto.Permission,t)},TronWebProto.Account.prototype.clearActivePermissionList=function(){return this.setActivePermissionList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Key.prototype.toObject=function(e){return TronWebProto.Key.toObject(e,this)},TronWebProto.Key.toObject=function(e,t){var r={address:t.getAddress_asB64(),weight:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Key.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Key;return TronWebProto.Key.deserializeBinaryFromReader(r,t)},TronWebProto.Key.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64();e.setWeight(r);break;default:t.skipField()}}return e},TronWebProto.Key.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Key.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Key.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getWeight())&&t.writeInt64(2,r)},TronWebProto.Key.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Key.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Key.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Key.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Key.prototype.getWeight=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Key.prototype.setWeight=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegatedResource.prototype.toObject=function(e){return TronWebProto.DelegatedResource.toObject(e,this)},TronWebProto.DelegatedResource.toObject=function(e,t){var r={from:t.getFrom_asB64(),to:t.getTo_asB64(),frozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,3,0),frozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),expireTimeForBandwidth:n.Message.getFieldWithDefault(t,5,0),expireTimeForEnergy:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegatedResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegatedResource;return TronWebProto.DelegatedResource.deserializeBinaryFromReader(r,t)},TronWebProto.DelegatedResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setFrom(r);break;case 2:r=t.readBytes();e.setTo(r);break;case 3:r=t.readInt64();e.setFrozenBalanceForBandwidth(r);break;case 4:r=t.readInt64();e.setFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64();e.setExpireTimeForBandwidth(r);break;case 6:r=t.readInt64();e.setExpireTimeForEnergy(r);break;default:t.skipField()}}return e},TronWebProto.DelegatedResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegatedResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegatedResource.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getFrom_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTo_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFrozenBalanceForBandwidth())&&t.writeInt64(3,r),0!==(r=e.getFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getExpireTimeForBandwidth())&&t.writeInt64(5,r),0!==(r=e.getExpireTimeForEnergy())&&t.writeInt64(6,r)},TronWebProto.DelegatedResource.prototype.getFrom=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.DelegatedResource.prototype.getFrom_asB64=function(){return n.Message.bytesAsB64(this.getFrom())},TronWebProto.DelegatedResource.prototype.getFrom_asU8=function(){return n.Message.bytesAsU8(this.getFrom())},TronWebProto.DelegatedResource.prototype.setFrom=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegatedResource.prototype.getTo=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.DelegatedResource.prototype.getTo_asB64=function(){return n.Message.bytesAsB64(this.getTo())},TronWebProto.DelegatedResource.prototype.getTo_asU8=function(){return n.Message.bytesAsU8(this.getTo())},TronWebProto.DelegatedResource.prototype.setTo=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForBandwidth=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForBandwidth=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForEnergy=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.authority.prototype.toObject=function(e){return TronWebProto.authority.toObject(e,this)},TronWebProto.authority.toObject=function(e,t){var r,n={account:(r=t.getAccount())&&TronWebProto.AccountId.toObject(e,r),permissionName:t.getPermissionName_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.authority.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.authority;return TronWebProto.authority.deserializeBinaryFromReader(r,t)},TronWebProto.authority.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountId;t.readMessage(r,TronWebProto.AccountId.deserializeBinaryFromReader),e.setAccount(r);break;case 2:r=t.readBytes();e.setPermissionName(r);break;default:t.skipField()}}return e},TronWebProto.authority.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.authority.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.authority.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccount())&&t.writeMessage(1,r,TronWebProto.AccountId.serializeBinaryToWriter),(r=e.getPermissionName_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.authority.prototype.getAccount=function(){return n.Message.getWrapperField(this,TronWebProto.AccountId,1)},TronWebProto.authority.prototype.setAccount=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.authority.prototype.clearAccount=function(){return this.setAccount(void 0)},TronWebProto.authority.prototype.hasAccount=function(){return null!=n.Message.getField(this,1)},TronWebProto.authority.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.authority.prototype.getPermissionName_asB64=function(){return n.Message.bytesAsB64(this.getPermissionName())},TronWebProto.authority.prototype.getPermissionName_asU8=function(){return n.Message.bytesAsU8(this.getPermissionName())},TronWebProto.authority.prototype.setPermissionName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Permission.repeatedFields_=[7],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Permission.prototype.toObject=function(e){return TronWebProto.Permission.toObject(e,this)},TronWebProto.Permission.toObject=function(e,t){var r={type:n.Message.getFieldWithDefault(t,1,0),id:n.Message.getFieldWithDefault(t,2,0),permissionName:n.Message.getFieldWithDefault(t,3,\"\"),threshold:n.Message.getFieldWithDefault(t,4,0),parentId:n.Message.getFieldWithDefault(t,5,0),operations:t.getOperations_asB64(),keysList:n.Message.toObjectList(t.getKeysList(),TronWebProto.Key.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Permission.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Permission;return TronWebProto.Permission.deserializeBinaryFromReader(r,t)},TronWebProto.Permission.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=t.readInt32();e.setId(r);break;case 3:r=t.readString();e.setPermissionName(r);break;case 4:r=t.readInt64();e.setThreshold(r);break;case 5:r=t.readInt32();e.setParentId(r);break;case 6:r=t.readBytes();e.setOperations(r);break;case 7:r=new TronWebProto.Key;t.readMessage(r,TronWebProto.Key.deserializeBinaryFromReader),e.addKeys(r);break;default:t.skipField()}}return e},TronWebProto.Permission.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Permission.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Permission.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),0!==(r=e.getId())&&t.writeInt32(2,r),(r=e.getPermissionName()).length>0&&t.writeString(3,r),0!==(r=e.getThreshold())&&t.writeInt64(4,r),0!==(r=e.getParentId())&&t.writeInt32(5,r),(r=e.getOperations_asU8()).length>0&&t.writeBytes(6,r),(r=e.getKeysList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Key.serializeBinaryToWriter)},TronWebProto.Permission.PermissionType={OWNER:0,WITNESS:1,ACTIVE:2},TronWebProto.Permission.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Permission.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Permission.prototype.getId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Permission.prototype.setId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Permission.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Permission.prototype.setPermissionName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.Permission.prototype.getThreshold=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Permission.prototype.setThreshold=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Permission.prototype.getParentId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Permission.prototype.setParentId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Permission.prototype.getOperations=function(){return n.Message.getFieldWithDefault(this,6,\"\")},TronWebProto.Permission.prototype.getOperations_asB64=function(){return n.Message.bytesAsB64(this.getOperations())},TronWebProto.Permission.prototype.getOperations_asU8=function(){return n.Message.bytesAsU8(this.getOperations())},TronWebProto.Permission.prototype.setOperations=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Permission.prototype.getKeysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Key,7)},TronWebProto.Permission.prototype.setKeysList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Permission.prototype.addKeys=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Key,t)},TronWebProto.Permission.prototype.clearKeysList=function(){return this.setKeysList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Witness.prototype.toObject=function(e){return TronWebProto.Witness.toObject(e,this)},TronWebProto.Witness.toObject=function(e,t){var r={address:t.getAddress_asB64(),votecount:n.Message.getFieldWithDefault(t,2,0),pubkey:t.getPubkey_asB64(),url:n.Message.getFieldWithDefault(t,4,\"\"),totalproduced:n.Message.getFieldWithDefault(t,5,0),totalmissed:n.Message.getFieldWithDefault(t,6,0),latestblocknum:n.Message.getFieldWithDefault(t,7,0),latestslotnum:n.Message.getFieldWithDefault(t,8,0),isjobs:n.Message.getBooleanFieldWithDefault(t,9,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Witness.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Witness;return TronWebProto.Witness.deserializeBinaryFromReader(r,t)},TronWebProto.Witness.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64();e.setVotecount(r);break;case 3:r=t.readBytes();e.setPubkey(r);break;case 4:r=t.readString();e.setUrl(r);break;case 5:r=t.readInt64();e.setTotalproduced(r);break;case 6:r=t.readInt64();e.setTotalmissed(r);break;case 7:r=t.readInt64();e.setLatestblocknum(r);break;case 8:r=t.readInt64();e.setLatestslotnum(r);break;case 9:r=t.readBool();e.setIsjobs(r);break;default:t.skipField()}}return e},TronWebProto.Witness.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Witness.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Witness.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVotecount())&&t.writeInt64(2,r),(r=e.getPubkey_asU8()).length>0&&t.writeBytes(3,r),(r=e.getUrl()).length>0&&t.writeString(4,r),0!==(r=e.getTotalproduced())&&t.writeInt64(5,r),0!==(r=e.getTotalmissed())&&t.writeInt64(6,r),0!==(r=e.getLatestblocknum())&&t.writeInt64(7,r),0!==(r=e.getLatestslotnum())&&t.writeInt64(8,r),(r=e.getIsjobs())&&t.writeBool(9,r)},TronWebProto.Witness.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Witness.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Witness.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Witness.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Witness.prototype.getVotecount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Witness.prototype.setVotecount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Witness.prototype.getPubkey=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Witness.prototype.getPubkey_asB64=function(){return n.Message.bytesAsB64(this.getPubkey())},TronWebProto.Witness.prototype.getPubkey_asU8=function(){return n.Message.bytesAsU8(this.getPubkey())},TronWebProto.Witness.prototype.setPubkey=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Witness.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.Witness.prototype.setUrl=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.Witness.prototype.getTotalproduced=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Witness.prototype.setTotalproduced=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Witness.prototype.getTotalmissed=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Witness.prototype.setTotalmissed=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Witness.prototype.getLatestblocknum=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Witness.prototype.setLatestblocknum=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Witness.prototype.getLatestslotnum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Witness.prototype.setLatestslotnum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Witness.prototype.getIsjobs=function(){return n.Message.getBooleanFieldWithDefault(this,9,!1)},TronWebProto.Witness.prototype.setIsjobs=function(e){return n.Message.setProto3BooleanField(this,9,e)},TronWebProto.Votes.repeatedFields_=[2,3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Votes.prototype.toObject=function(e){return TronWebProto.Votes.toObject(e,this)},TronWebProto.Votes.toObject=function(e,t){var r={address:t.getAddress_asB64(),oldVotesList:n.Message.toObjectList(t.getOldVotesList(),TronWebProto.Vote.toObject,e),newVotesList:n.Message.toObjectList(t.getNewVotesList(),TronWebProto.Vote.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Votes.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Votes;return TronWebProto.Votes.deserializeBinaryFromReader(r,t)},TronWebProto.Votes.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addOldVotes(r);break;case 3:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addNewVotes(r);break;default:t.skipField()}}return e},TronWebProto.Votes.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Votes.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Votes.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOldVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getNewVotesList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.Vote.serializeBinaryToWriter)},TronWebProto.Votes.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Votes.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Votes.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Votes.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Votes.prototype.getOldVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,2)},TronWebProto.Votes.prototype.setOldVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.Votes.prototype.addOldVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearOldVotesList=function(){return this.setOldVotesList([])},TronWebProto.Votes.prototype.getNewVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,3)},TronWebProto.Votes.prototype.setNewVotesList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.Votes.prototype.addNewVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearNewVotesList=function(){return this.setNewVotesList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.MarketOrderDetail.prototype.toObject=function(e){return TronWebProto.MarketOrderDetail.toObject(e,this)},TronWebProto.MarketOrderDetail.toObject=function(e,t){var r={makerorderid:t.getMakerorderid_asB64(),takerorderid:t.getTakerorderid_asB64(),fillsellquantity:n.Message.getFieldWithDefault(t,3,0),fillbuyquantity:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.MarketOrderDetail.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.MarketOrderDetail;return TronWebProto.MarketOrderDetail.deserializeBinaryFromReader(r,t)},TronWebProto.MarketOrderDetail.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setMakerorderid(r);break;case 2:r=t.readBytes();e.setTakerorderid(r);break;case 3:r=t.readInt64();e.setFillsellquantity(r);break;case 4:r=t.readInt64();e.setFillbuyquantity(r);break;default:t.skipField()}}return e},TronWebProto.MarketOrderDetail.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.MarketOrderDetail.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.MarketOrderDetail.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getMakerorderid_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTakerorderid_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFillsellquantity())&&t.writeInt64(3,r),0!==(r=e.getFillbuyquantity())&&t.writeInt64(4,r)},TronWebProto.MarketOrderDetail.prototype.getMakerorderid=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.setMakerorderid=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.MarketOrderDetail.prototype.getTakerorderid=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.setTakerorderid=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.MarketOrderDetail.prototype.getFillsellquantity=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.MarketOrderDetail.prototype.setFillsellquantity=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.MarketOrderDetail.prototype.getFillbuyquantity=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.MarketOrderDetail.prototype.setFillbuyquantity=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Transaction.repeatedFields_=[2,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.prototype.toObject=function(e){return TronWebProto.Transaction.toObject(e,this)},TronWebProto.Transaction.toObject=function(e,t){var r,o={rawData:(r=t.getRawData())&&TronWebProto.Transaction.raw.toObject(e,r),signatureList:t.getSignatureList_asB64(),retList:n.Message.toObjectList(t.getRetList(),TronWebProto.Transaction.Result.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction;return TronWebProto.Transaction.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.Transaction.raw;t.readMessage(r,TronWebProto.Transaction.raw.deserializeBinaryFromReader),e.setRawData(r);break;case 2:r=t.readBytes();e.addSignature(r);break;case 5:r=new TronWebProto.Transaction.Result;t.readMessage(r,TronWebProto.Transaction.Result.deserializeBinaryFromReader),e.addRet(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getRawData())&&t.writeMessage(1,r,TronWebProto.Transaction.raw.serializeBinaryToWriter),(r=e.getSignatureList_asU8()).length>0&&t.writeRepeatedBytes(2,r),(r=e.getRetList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Transaction.Result.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Contract.prototype.toObject=function(e){return TronWebProto.Transaction.Contract.toObject(e,this)},TronWebProto.Transaction.Contract.toObject=function(e,t){var r,o={type:n.Message.getFieldWithDefault(t,1,0),parameter:(r=t.getParameter())&&i.Any.toObject(e,r),provider:t.getProvider_asB64(),contractname:t.getContractname_asB64(),permissionId:n.Message.getFieldWithDefault(t,5,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Contract;return TronWebProto.Transaction.Contract.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=new i.Any;t.readMessage(r,i.Any.deserializeBinaryFromReader),e.setParameter(r);break;case 3:r=t.readBytes();e.setProvider(r);break;case 4:r=t.readBytes();e.setContractname(r);break;case 5:r=t.readInt32();e.setPermissionId(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Contract.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),null!=(r=e.getParameter())&&t.writeMessage(2,r,i.Any.serializeBinaryToWriter),(r=e.getProvider_asU8()).length>0&&t.writeBytes(3,r),(r=e.getContractname_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getPermissionId())&&t.writeInt32(5,r)},TronWebProto.Transaction.Contract.ContractType={ACCOUNTCREATECONTRACT:0,TRANSFERCONTRACT:1,TRANSFERASSETCONTRACT:2,VOTEASSETCONTRACT:3,VOTEWITNESSCONTRACT:4,WITNESSCREATECONTRACT:5,ASSETISSUECONTRACT:6,WITNESSUPDATECONTRACT:8,PARTICIPATEASSETISSUECONTRACT:9,ACCOUNTUPDATECONTRACT:10,FREEZEBALANCECONTRACT:11,UNFREEZEBALANCECONTRACT:12,WITHDRAWBALANCECONTRACT:13,UNFREEZEASSETCONTRACT:14,UPDATEASSETCONTRACT:15,PROPOSALCREATECONTRACT:16,PROPOSALAPPROVECONTRACT:17,PROPOSALDELETECONTRACT:18,SETACCOUNTIDCONTRACT:19,CUSTOMCONTRACT:20,CREATESMARTCONTRACT:30,TRIGGERSMARTCONTRACT:31,GETCONTRACT:32,UPDATESETTINGCONTRACT:33,EXCHANGECREATECONTRACT:41,EXCHANGEINJECTCONTRACT:42,EXCHANGEWITHDRAWCONTRACT:43,EXCHANGETRANSACTIONCONTRACT:44,UPDATEENERGYLIMITCONTRACT:45,ACCOUNTPERMISSIONUPDATECONTRACT:46,CLEARABICONTRACT:48,UPDATEBROKERAGECONTRACT:49,SHIELDEDTRANSFERCONTRACT:51,MARKETSELLASSETCONTRACT:52,MARKETCANCELORDERCONTRACT:53,FREEZEBALANCEV2CONTRACT:54,UNFREEZEBALANCEV2CONTRACT:55,WITHDRAWEXPIREUNFREEZECONTRACT:56,DELEGATERESOURCECONTRACT:57,UNDELEGATERESOURCECONTRACT:58,CANCELALLUNFREEZEV2CONTRACT:59},TronWebProto.Transaction.Contract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Contract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Transaction.Contract.prototype.getParameter=function(){return n.Message.getWrapperField(this,i.Any,2)},TronWebProto.Transaction.Contract.prototype.setParameter=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Transaction.Contract.prototype.clearParameter=function(){return this.setParameter(void 0)},TronWebProto.Transaction.Contract.prototype.hasParameter=function(){return null!=n.Message.getField(this,2)},TronWebProto.Transaction.Contract.prototype.getProvider=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.Transaction.Contract.prototype.getProvider_asB64=function(){return n.Message.bytesAsB64(this.getProvider())},TronWebProto.Transaction.Contract.prototype.getProvider_asU8=function(){return n.Message.bytesAsU8(this.getProvider())},TronWebProto.Transaction.Contract.prototype.setProvider=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Transaction.Contract.prototype.getContractname=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.Transaction.Contract.prototype.getContractname_asB64=function(){return n.Message.bytesAsB64(this.getContractname())},TronWebProto.Transaction.Contract.prototype.getContractname_asU8=function(){return n.Message.bytesAsU8(this.getContractname())},TronWebProto.Transaction.Contract.prototype.setContractname=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.Contract.prototype.getPermissionId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Transaction.Contract.prototype.setPermissionId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Transaction.Result.repeatedFields_=[26],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Result.prototype.toObject=function(e){return TronWebProto.Transaction.Result.toObject(e,this)},TronWebProto.Transaction.Result.toObject=function(e,t){var r={fee:n.Message.getFieldWithDefault(t,1,0),ret:n.Message.getFieldWithDefault(t,2,0),contractret:n.Message.getFieldWithDefault(t,3,0),assetissueid:n.Message.getFieldWithDefault(t,14,\"\"),withdrawAmount:n.Message.getFieldWithDefault(t,15,0),unfreezeAmount:n.Message.getFieldWithDefault(t,16,0),exchangeReceivedAmount:n.Message.getFieldWithDefault(t,18,0),exchangeInjectAnotherAmount:n.Message.getFieldWithDefault(t,19,0),exchangeWithdrawAnotherAmount:n.Message.getFieldWithDefault(t,20,0),exchangeId:n.Message.getFieldWithDefault(t,21,0),shieldedTransactionFee:n.Message.getFieldWithDefault(t,22,0),orderid:t.getOrderid_asB64(),orderdetailsList:n.Message.toObjectList(t.getOrderdetailsList(),TronWebProto.MarketOrderDetail.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.Result.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Result;return TronWebProto.Transaction.Result.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Result.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFee(r);break;case 2:r=t.readEnum();e.setRet(r);break;case 3:r=t.readEnum();e.setContractret(r);break;case 14:r=t.readString();e.setAssetissueid(r);break;case 15:r=t.readInt64();e.setWithdrawAmount(r);break;case 16:r=t.readInt64();e.setUnfreezeAmount(r);break;case 18:r=t.readInt64();e.setExchangeReceivedAmount(r);break;case 19:r=t.readInt64();e.setExchangeInjectAnotherAmount(r);break;case 20:r=t.readInt64();e.setExchangeWithdrawAnotherAmount(r);break;case 21:r=t.readInt64();e.setExchangeId(r);break;case 22:r=t.readInt64();e.setShieldedTransactionFee(r);break;case 25:r=t.readBytes();e.setOrderid(r);break;case 26:r=new TronWebProto.MarketOrderDetail;t.readMessage(r,TronWebProto.MarketOrderDetail.deserializeBinaryFromReader),e.addOrderdetails(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.Result.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Result.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Result.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFee())&&t.writeInt64(1,r),0!==(r=e.getRet())&&t.writeEnum(2,r),0!==(r=e.getContractret())&&t.writeEnum(3,r),(r=e.getAssetissueid()).length>0&&t.writeString(14,r),0!==(r=e.getWithdrawAmount())&&t.writeInt64(15,r),0!==(r=e.getUnfreezeAmount())&&t.writeInt64(16,r),0!==(r=e.getExchangeReceivedAmount())&&t.writeInt64(18,r),0!==(r=e.getExchangeInjectAnotherAmount())&&t.writeInt64(19,r),0!==(r=e.getExchangeWithdrawAnotherAmount())&&t.writeInt64(20,r),0!==(r=e.getExchangeId())&&t.writeInt64(21,r),0!==(r=e.getShieldedTransactionFee())&&t.writeInt64(22,r),(r=e.getOrderid_asU8()).length>0&&t.writeBytes(25,r),(r=e.getOrderdetailsList()).length>0&&t.writeRepeatedMessage(26,r,TronWebProto.MarketOrderDetail.serializeBinaryToWriter)},TronWebProto.Transaction.Result.code={SUCESS:0,FAILED:1},TronWebProto.Transaction.Result.contractResult={DEFAULT:0,SUCCESS:1,REVERT:2,BAD_JUMP_DESTINATION:3,OUT_OF_MEMORY:4,PRECOMPILED_CONTRACT:5,STACK_TOO_SMALL:6,STACK_TOO_LARGE:7,ILLEGAL_OPERATION:8,STACK_OVERFLOW:9,OUT_OF_ENERGY:10,OUT_OF_TIME:11,JVM_STACK_OVER_FLOW:12,UNKNOWN:13,TRANSFER_FAILED:14,INVALID_CODE:15},TronWebProto.Transaction.Result.prototype.getFee=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Result.prototype.setFee=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Transaction.Result.prototype.getRet=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Transaction.Result.prototype.setRet=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Transaction.Result.prototype.getContractret=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.Result.prototype.setContractret=function(e){return n.Message.setProto3EnumField(this,3,e)},TronWebProto.Transaction.Result.prototype.getAssetissueid=function(){return n.Message.getFieldWithDefault(this,14,\"\")},TronWebProto.Transaction.Result.prototype.setAssetissueid=function(e){return n.Message.setProto3StringField(this,14,e)},TronWebProto.Transaction.Result.prototype.getWithdrawAmount=function(){return n.Message.getFieldWithDefault(this,15,0)},TronWebProto.Transaction.Result.prototype.setWithdrawAmount=function(e){return n.Message.setProto3IntField(this,15,e)},TronWebProto.Transaction.Result.prototype.getUnfreezeAmount=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.Transaction.Result.prototype.setUnfreezeAmount=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.Transaction.Result.prototype.getExchangeReceivedAmount=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.Result.prototype.setExchangeReceivedAmount=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.Result.prototype.getExchangeInjectAnotherAmount=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Transaction.Result.prototype.setExchangeInjectAnotherAmount=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount=function(){return n.Message.getFieldWithDefault(this,20,0)},TronWebProto.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount=function(e){return n.Message.setProto3IntField(this,20,e)},TronWebProto.Transaction.Result.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Transaction.Result.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Transaction.Result.prototype.getShieldedTransactionFee=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Transaction.Result.prototype.setShieldedTransactionFee=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Transaction.Result.prototype.getOrderid=function(){return n.Message.getFieldWithDefault(this,25,\"\")},TronWebProto.Transaction.Result.prototype.getOrderid_asB64=function(){return n.Message.bytesAsB64(this.getOrderid())},TronWebProto.Transaction.Result.prototype.getOrderid_asU8=function(){return n.Message.bytesAsU8(this.getOrderid())},TronWebProto.Transaction.Result.prototype.setOrderid=function(e){return n.Message.setProto3BytesField(this,25,e)},TronWebProto.Transaction.Result.prototype.getOrderdetailsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.MarketOrderDetail,26)},TronWebProto.Transaction.Result.prototype.setOrderdetailsList=function(e){return n.Message.setRepeatedWrapperField(this,26,e)},TronWebProto.Transaction.Result.prototype.addOrderdetails=function(e,t){return n.Message.addToRepeatedWrapperField(this,26,e,TronWebProto.MarketOrderDetail,t)},TronWebProto.Transaction.Result.prototype.clearOrderdetailsList=function(){return this.setOrderdetailsList([])},TronWebProto.Transaction.raw.repeatedFields_=[9,11],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.raw.prototype.toObject=function(e){return TronWebProto.Transaction.raw.toObject(e,this)},TronWebProto.Transaction.raw.toObject=function(e,t){var r={refBlockBytes:t.getRefBlockBytes_asB64(),refBlockNum:n.Message.getFieldWithDefault(t,3,0),refBlockHash:t.getRefBlockHash_asB64(),expiration:n.Message.getFieldWithDefault(t,8,0),authsList:n.Message.toObjectList(t.getAuthsList(),TronWebProto.authority.toObject,e),data:t.getData_asB64(),contractList:n.Message.toObjectList(t.getContractList(),TronWebProto.Transaction.Contract.toObject,e),scripts:t.getScripts_asB64(),timestamp:n.Message.getFieldWithDefault(t,14,0),feeLimit:n.Message.getFieldWithDefault(t,18,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.raw.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.raw;return TronWebProto.Transaction.raw.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.raw.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setRefBlockBytes(r);break;case 3:r=t.readInt64();e.setRefBlockNum(r);break;case 4:r=t.readBytes();e.setRefBlockHash(r);break;case 8:r=t.readInt64();e.setExpiration(r);break;case 9:r=new TronWebProto.authority;t.readMessage(r,TronWebProto.authority.deserializeBinaryFromReader),e.addAuths(r);break;case 10:r=t.readBytes();e.setData(r);break;case 11:r=new TronWebProto.Transaction.Contract;t.readMessage(r,TronWebProto.Transaction.Contract.deserializeBinaryFromReader),e.addContract(r);break;case 12:r=t.readBytes();e.setScripts(r);break;case 14:r=t.readInt64();e.setTimestamp(r);break;case 18:r=t.readInt64();e.setFeeLimit(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.raw.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.raw.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.raw.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getRefBlockBytes_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getRefBlockNum())&&t.writeInt64(3,r),(r=e.getRefBlockHash_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getExpiration())&&t.writeInt64(8,r),(r=e.getAuthsList()).length>0&&t.writeRepeatedMessage(9,r,TronWebProto.authority.serializeBinaryToWriter),(r=e.getData_asU8()).length>0&&t.writeBytes(10,r),(r=e.getContractList()).length>0&&t.writeRepeatedMessage(11,r,TronWebProto.Transaction.Contract.serializeBinaryToWriter),(r=e.getScripts_asU8()).length>0&&t.writeBytes(12,r),0!==(r=e.getTimestamp())&&t.writeInt64(14,r),0!==(r=e.getFeeLimit())&&t.writeInt64(18,r)},TronWebProto.Transaction.raw.prototype.getRefBlockBytes=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.setRefBlockBytes=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Transaction.raw.prototype.getRefBlockNum=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.raw.prototype.setRefBlockNum=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Transaction.raw.prototype.getRefBlockHash=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.setRefBlockHash=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.raw.prototype.getExpiration=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Transaction.raw.prototype.setExpiration=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Transaction.raw.prototype.getAuthsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.authority,9)},TronWebProto.Transaction.raw.prototype.setAuthsList=function(e){return n.Message.setRepeatedWrapperField(this,9,e)},TronWebProto.Transaction.raw.prototype.addAuths=function(e,t){return n.Message.addToRepeatedWrapperField(this,9,e,TronWebProto.authority,t)},TronWebProto.Transaction.raw.prototype.clearAuthsList=function(){return this.setAuthsList([])},TronWebProto.Transaction.raw.prototype.getData=function(){return n.Message.getFieldWithDefault(this,10,\"\")},TronWebProto.Transaction.raw.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.Transaction.raw.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.Transaction.raw.prototype.setData=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.Transaction.raw.prototype.getContractList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Contract,11)},TronWebProto.Transaction.raw.prototype.setContractList=function(e){return n.Message.setRepeatedWrapperField(this,11,e)},TronWebProto.Transaction.raw.prototype.addContract=function(e,t){return n.Message.addToRepeatedWrapperField(this,11,e,TronWebProto.Transaction.Contract,t)},TronWebProto.Transaction.raw.prototype.clearContractList=function(){return this.setContractList([])},TronWebProto.Transaction.raw.prototype.getScripts=function(){return n.Message.getFieldWithDefault(this,12,\"\")},TronWebProto.Transaction.raw.prototype.getScripts_asB64=function(){return n.Message.bytesAsB64(this.getScripts())},TronWebProto.Transaction.raw.prototype.getScripts_asU8=function(){return n.Message.bytesAsU8(this.getScripts())},TronWebProto.Transaction.raw.prototype.setScripts=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.Transaction.raw.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,14,0)},TronWebProto.Transaction.raw.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,14,e)},TronWebProto.Transaction.raw.prototype.getFeeLimit=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.raw.prototype.setFeeLimit=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.prototype.getRawData=function(){return n.Message.getWrapperField(this,TronWebProto.Transaction.raw,1)},TronWebProto.Transaction.prototype.setRawData=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.Transaction.prototype.clearRawData=function(){return this.setRawData(void 0)},TronWebProto.Transaction.prototype.hasRawData=function(){return null!=n.Message.getField(this,1)},TronWebProto.Transaction.prototype.getSignatureList=function(){return n.Message.getRepeatedField(this,2)},TronWebProto.Transaction.prototype.getSignatureList_asB64=function(){return n.Message.bytesListAsB64(this.getSignatureList())},TronWebProto.Transaction.prototype.getSignatureList_asU8=function(){return n.Message.bytesListAsU8(this.getSignatureList())},TronWebProto.Transaction.prototype.setSignatureList=function(e){return n.Message.setField(this,2,e||[])},TronWebProto.Transaction.prototype.addSignature=function(e,t){return n.Message.addToRepeatedField(this,2,e,t)},TronWebProto.Transaction.prototype.clearSignatureList=function(){return this.setSignatureList([])},TronWebProto.Transaction.prototype.getRetList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Result,5)},TronWebProto.Transaction.prototype.setRetList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Transaction.prototype.addRet=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Transaction.Result,t)},TronWebProto.Transaction.prototype.clearRetList=function(){return this.setRetList([])},TronWebProto.AccountType={NORMAL:0,ASSETISSUE:1,CONTRACT:2},o.object.extend(t,TronWebProto)},8462(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),i=r(4856);o.object.extend(proto,i),o.exportSymbol(\"TronWebProto.AccountCreateContract\",null,s),o.exportSymbol(\"TronWebProto.AccountPermissionUpdateContract\",null,s),o.exportSymbol(\"TronWebProto.AccountUpdateContract\",null,s),o.exportSymbol(\"TronWebProto.SetAccountIdContract\",null,s),TronWebProto.AccountCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountCreateContract.displayName=\"TronWebProto.AccountCreateContract\"),TronWebProto.AccountUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountUpdateContract.displayName=\"TronWebProto.AccountUpdateContract\"),TronWebProto.SetAccountIdContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SetAccountIdContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SetAccountIdContract.displayName=\"TronWebProto.SetAccountIdContract\"),TronWebProto.AccountPermissionUpdateContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AccountPermissionUpdateContract.repeatedFields_,null)},o.inherits(TronWebProto.AccountPermissionUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountPermissionUpdateContract.displayName=\"TronWebProto.AccountPermissionUpdateContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountCreateContract.prototype.toObject=function(e){return TronWebProto.AccountCreateContract.toObject(e,this)},TronWebProto.AccountCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),accountAddress:t.getAccountAddress_asB64(),type:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountCreateContract;return TronWebProto.AccountCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setAccountAddress(r);break;case 3:r=t.readEnum();e.setType(r);break;default:t.skipField()}}return e},TronWebProto.AccountCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAccountAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getType())&&t.writeEnum(3,r)},TronWebProto.AccountCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountCreateContract.prototype.getAccountAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asB64=function(){return n.Message.bytesAsB64(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asU8=function(){return n.Message.bytesAsU8(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.setAccountAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountCreateContract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.AccountCreateContract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountUpdateContract.toObject(e,this)},TronWebProto.AccountUpdateContract.toObject=function(e,t){var r={accountName:t.getAccountName_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountUpdateContract;return TronWebProto.AccountUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;default:t.skipField()}}return e},TronWebProto.AccountUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountUpdateContract.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountUpdateContract.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SetAccountIdContract.prototype.toObject=function(e){return TronWebProto.SetAccountIdContract.toObject(e,this)},TronWebProto.SetAccountIdContract.toObject=function(e,t){var r={accountId:t.getAccountId_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SetAccountIdContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SetAccountIdContract;return TronWebProto.SetAccountIdContract.deserializeBinaryFromReader(r,t)},TronWebProto.SetAccountIdContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountId(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;default:t.skipField()}}return e},TronWebProto.SetAccountIdContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SetAccountIdContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SetAccountIdContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountId_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.SetAccountIdContract.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.SetAccountIdContract.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.repeatedFields_=[4],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountPermissionUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountPermissionUpdateContract.toObject(e,this)},TronWebProto.AccountPermissionUpdateContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),owner:(r=t.getOwner())&&i.Permission.toObject(e,r),witness:(r=t.getWitness())&&i.Permission.toObject(e,r),activesList:n.Message.toObjectList(t.getActivesList(),i.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountPermissionUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountPermissionUpdateContract;return TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new i.Permission;t.readMessage(r,i.Permission.deserializeBinaryFromReader),e.setOwner(r);break;case 3:r=new i.Permission;t.readMessage(r,i.Permission.deserializeBinaryFromReader),e.setWitness(r);break;case 4:r=new i.Permission;t.readMessage(r,i.Permission.deserializeBinaryFromReader),e.addActives(r);break;default:t.skipField()}}return e},TronWebProto.AccountPermissionUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getOwner())&&t.writeMessage(2,r,i.Permission.serializeBinaryToWriter),null!=(r=e.getWitness())&&t.writeMessage(3,r,i.Permission.serializeBinaryToWriter),(r=e.getActivesList()).length>0&&t.writeRepeatedMessage(4,r,i.Permission.serializeBinaryToWriter)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwner=function(){return n.Message.getWrapperField(this,i.Permission,2)},TronWebProto.AccountPermissionUpdateContract.prototype.setOwner=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearOwner=function(){return this.setOwner(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasOwner=function(){return null!=n.Message.getField(this,2)},TronWebProto.AccountPermissionUpdateContract.prototype.getWitness=function(){return n.Message.getWrapperField(this,i.Permission,3)},TronWebProto.AccountPermissionUpdateContract.prototype.setWitness=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearWitness=function(){return this.setWitness(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasWitness=function(){return null!=n.Message.getField(this,3)},TronWebProto.AccountPermissionUpdateContract.prototype.getActivesList=function(){return n.Message.getRepeatedWrapperField(this,i.Permission,4)},TronWebProto.AccountPermissionUpdateContract.prototype.setActivesList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.AccountPermissionUpdateContract.prototype.addActives=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.Permission,t)},TronWebProto.AccountPermissionUpdateContract.prototype.clearActivesList=function(){return this.setActivesList([])},o.object.extend(t,TronWebProto)},139(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.AssetIssueContract\",null,s),o.exportSymbol(\"TronWebProto.AssetIssueContract.FrozenSupply\",null,s),o.exportSymbol(\"TronWebProto.ParticipateAssetIssueContract\",null,s),o.exportSymbol(\"TronWebProto.TransferAssetContract\",null,s),o.exportSymbol(\"TronWebProto.UnfreezeAssetContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateAssetContract\",null,s),TronWebProto.AssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AssetIssueContract.repeatedFields_,null)},o.inherits(TronWebProto.AssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.displayName=\"TronWebProto.AssetIssueContract\"),TronWebProto.AssetIssueContract.FrozenSupply=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AssetIssueContract.FrozenSupply,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.FrozenSupply.displayName=\"TronWebProto.AssetIssueContract.FrozenSupply\"),TronWebProto.TransferAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferAssetContract.displayName=\"TronWebProto.TransferAssetContract\"),TronWebProto.UnfreezeAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeAssetContract.displayName=\"TronWebProto.UnfreezeAssetContract\"),TronWebProto.UpdateAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateAssetContract.displayName=\"TronWebProto.UpdateAssetContract\"),TronWebProto.ParticipateAssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ParticipateAssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ParticipateAssetIssueContract.displayName=\"TronWebProto.ParticipateAssetIssueContract\"),TronWebProto.AssetIssueContract.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.toObject(e,this)},TronWebProto.AssetIssueContract.toObject=function(e,t){var r={id:n.Message.getFieldWithDefault(t,41,\"\"),ownerAddress:t.getOwnerAddress_asB64(),name:t.getName_asB64(),abbr:t.getAbbr_asB64(),totalSupply:n.Message.getFieldWithDefault(t,4,0),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.AssetIssueContract.FrozenSupply.toObject,e),trxNum:n.Message.getFieldWithDefault(t,6,0),precision:n.Message.getFieldWithDefault(t,7,0),num:n.Message.getFieldWithDefault(t,8,0),startTime:n.Message.getFieldWithDefault(t,9,0),endTime:n.Message.getFieldWithDefault(t,10,0),order:n.Message.getFieldWithDefault(t,11,0),voteScore:n.Message.getFieldWithDefault(t,16,0),description:t.getDescription_asB64(),url:t.getUrl_asB64(),freeAssetNetLimit:n.Message.getFieldWithDefault(t,22,0),publicFreeAssetNetLimit:n.Message.getFieldWithDefault(t,23,0),publicFreeAssetNetUsage:n.Message.getFieldWithDefault(t,24,0),publicLatestFreeNetTime:n.Message.getFieldWithDefault(t,25,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract;return TronWebProto.AssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 41:var r=t.readString();e.setId(r);break;case 1:r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setName(r);break;case 3:r=t.readBytes();e.setAbbr(r);break;case 4:r=t.readInt64();e.setTotalSupply(r);break;case 5:r=new TronWebProto.AssetIssueContract.FrozenSupply;t.readMessage(r,TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 6:r=t.readInt32();e.setTrxNum(r);break;case 7:r=t.readInt32();e.setPrecision(r);break;case 8:r=t.readInt32();e.setNum(r);break;case 9:r=t.readInt64();e.setStartTime(r);break;case 10:r=t.readInt64();e.setEndTime(r);break;case 11:r=t.readInt64();e.setOrder(r);break;case 16:r=t.readInt32();e.setVoteScore(r);break;case 20:r=t.readBytes();e.setDescription(r);break;case 21:r=t.readBytes();e.setUrl(r);break;case 22:r=t.readInt64();e.setFreeAssetNetLimit(r);break;case 23:r=t.readInt64();e.setPublicFreeAssetNetLimit(r);break;case 24:r=t.readInt64();e.setPublicFreeAssetNetUsage(r);break;case 25:r=t.readInt64();e.setPublicLatestFreeNetTime(r);break;default:t.skipField()}}return e},TronWebProto.AssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getId()).length>0&&t.writeString(41,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getName_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAbbr_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getTotalSupply())&&t.writeInt64(4,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter),0!==(r=e.getTrxNum())&&t.writeInt32(6,r),0!==(r=e.getPrecision())&&t.writeInt32(7,r),0!==(r=e.getNum())&&t.writeInt32(8,r),0!==(r=e.getStartTime())&&t.writeInt64(9,r),0!==(r=e.getEndTime())&&t.writeInt64(10,r),0!==(r=e.getOrder())&&t.writeInt64(11,r),0!==(r=e.getVoteScore())&&t.writeInt32(16,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(20,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(21,r),0!==(r=e.getFreeAssetNetLimit())&&t.writeInt64(22,r),0!==(r=e.getPublicFreeAssetNetLimit())&&t.writeInt64(23,r),0!==(r=e.getPublicFreeAssetNetUsage())&&t.writeInt64(24,r),0!==(r=e.getPublicLatestFreeNetTime())&&t.writeInt64(25,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.FrozenSupply.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.FrozenSupply.toObject(e,this)},TronWebProto.AssetIssueContract.FrozenSupply.toObject=function(e,t){var r={frozenAmount:n.Message.getFieldWithDefault(t,1,0),frozenDays:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract.FrozenSupply;return TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenAmount(r);break;case 2:r=t.readInt64();e.setFrozenDays(r);break;default:t.skipField()}}return e},TronWebProto.AssetIssueContract.FrozenSupply.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenAmount())&&t.writeInt64(1,r),0!==(r=e.getFrozenDays())&&t.writeInt64(2,r)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenDays=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenDays=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getId=function(){return n.Message.getFieldWithDefault(this,41,\"\")},TronWebProto.AssetIssueContract.prototype.setId=function(e){return n.Message.setProto3StringField(this,41,e)},TronWebProto.AssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AssetIssueContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.AssetIssueContract.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AssetIssueContract.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AssetIssueContract.prototype.setName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getAbbr=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.AssetIssueContract.prototype.getAbbr_asB64=function(){return n.Message.bytesAsB64(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.getAbbr_asU8=function(){return n.Message.bytesAsU8(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.setAbbr=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.AssetIssueContract.prototype.getTotalSupply=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.AssetIssueContract.prototype.setTotalSupply=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.AssetIssueContract.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.AssetIssueContract.FrozenSupply,5)},TronWebProto.AssetIssueContract.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.AssetIssueContract.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.AssetIssueContract.FrozenSupply,t)},TronWebProto.AssetIssueContract.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.AssetIssueContract.prototype.getTrxNum=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.AssetIssueContract.prototype.setTrxNum=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.AssetIssueContract.prototype.getPrecision=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.AssetIssueContract.prototype.setPrecision=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.AssetIssueContract.prototype.getNum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.AssetIssueContract.prototype.setNum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.AssetIssueContract.prototype.getStartTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.AssetIssueContract.prototype.setStartTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.AssetIssueContract.prototype.getEndTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.AssetIssueContract.prototype.setEndTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.AssetIssueContract.prototype.getOrder=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.AssetIssueContract.prototype.setOrder=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.AssetIssueContract.prototype.getVoteScore=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.AssetIssueContract.prototype.setVoteScore=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.AssetIssueContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,20,\"\")},TronWebProto.AssetIssueContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.AssetIssueContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.AssetIssueContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,20,e)},TronWebProto.AssetIssueContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,21,\"\")},TronWebProto.AssetIssueContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.AssetIssueContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.AssetIssueContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,21,e)},TronWebProto.AssetIssueContract.prototype.getFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.AssetIssueContract.prototype.setFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,23,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,23,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetUsage=function(){return n.Message.getFieldWithDefault(this,24,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetUsage=function(e){return n.Message.setProto3IntField(this,24,e)},TronWebProto.AssetIssueContract.prototype.getPublicLatestFreeNetTime=function(){return n.Message.getFieldWithDefault(this,25,0)},TronWebProto.AssetIssueContract.prototype.setPublicLatestFreeNetTime=function(e){return n.Message.setProto3IntField(this,25,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferAssetContract.prototype.toObject=function(e){return TronWebProto.TransferAssetContract.toObject(e,this)},TronWebProto.TransferAssetContract.toObject=function(e,t){var r={assetName:t.getAssetName_asB64(),ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferAssetContract;return TronWebProto.TransferAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAssetName(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;case 3:r=t.readBytes();e.setToAddress(r);break;case 4:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransferAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAssetName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.TransferAssetContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TransferAssetContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferAssetContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.TransferAssetContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.TransferAssetContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.TransferAssetContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeAssetContract.prototype.toObject=function(e){return TronWebProto.UnfreezeAssetContract.toObject(e,this)},TronWebProto.UnfreezeAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeAssetContract;return TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.UnfreezeAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateAssetContract.prototype.toObject=function(e){return TronWebProto.UpdateAssetContract.toObject(e,this)},TronWebProto.UpdateAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),description:t.getDescription_asB64(),url:t.getUrl_asB64(),newLimit:n.Message.getFieldWithDefault(t,4,0),newPublicLimit:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateAssetContract;return TronWebProto.UpdateAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setDescription(r);break;case 3:r=t.readBytes();e.setUrl(r);break;case 4:r=t.readInt64();e.setNewLimit(r);break;case 5:r=t.readInt64();e.setNewPublicLimit(r);break;default:t.skipField()}}return e},TronWebProto.UpdateAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(2,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getNewLimit())&&t.writeInt64(4,r),0!==(r=e.getNewPublicLimit())&&t.writeInt64(5,r)},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateAssetContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.UpdateAssetContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateAssetContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.UpdateAssetContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.UpdateAssetContract.prototype.getNewLimit=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.UpdateAssetContract.prototype.setNewLimit=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.UpdateAssetContract.prototype.getNewPublicLimit=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.UpdateAssetContract.prototype.setNewPublicLimit=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ParticipateAssetIssueContract.prototype.toObject=function(e){return TronWebProto.ParticipateAssetIssueContract.toObject(e,this)},TronWebProto.ParticipateAssetIssueContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),assetName:t.getAssetName_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ParticipateAssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ParticipateAssetIssueContract;return TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setToAddress(r);break;case 3:r=t.readBytes();e.setAssetName(r);break;case 4:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.ParticipateAssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAssetName_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ParticipateAssetIssueContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},o.object.extend(t,TronWebProto)},6919(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),i=r(4781);o.object.extend(proto,i),o.exportSymbol(\"TronWebProto.AccountBalanceRequest\",null,s),o.exportSymbol(\"TronWebProto.AccountBalanceResponse\",null,s),o.exportSymbol(\"TronWebProto.AccountIdentifier\",null,s),o.exportSymbol(\"TronWebProto.AccountTrace\",null,s),o.exportSymbol(\"TronWebProto.BlockBalanceTrace\",null,s),o.exportSymbol(\"TronWebProto.BlockBalanceTrace.BlockIdentifier\",null,s),o.exportSymbol(\"TronWebProto.CancelAllUnfreezeV2Contract\",null,s),o.exportSymbol(\"TronWebProto.DelegateResourceContract\",null,s),o.exportSymbol(\"TronWebProto.FreezeBalanceContract\",null,s),o.exportSymbol(\"TronWebProto.FreezeBalanceV2Contract\",null,s),o.exportSymbol(\"TronWebProto.TransactionBalanceTrace\",null,s),o.exportSymbol(\"TronWebProto.TransactionBalanceTrace.Operation\",null,s),o.exportSymbol(\"TronWebProto.TransferContract\",null,s),o.exportSymbol(\"TronWebProto.UnDelegateResourceContract\",null,s),o.exportSymbol(\"TronWebProto.UnfreezeBalanceContract\",null,s),o.exportSymbol(\"TronWebProto.UnfreezeBalanceV2Contract\",null,s),o.exportSymbol(\"TronWebProto.WithdrawBalanceContract\",null,s),o.exportSymbol(\"TronWebProto.WithdrawExpireUnfreezeContract\",null,s),TronWebProto.FreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceContract.displayName=\"TronWebProto.FreezeBalanceContract\"),TronWebProto.UnfreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceContract.displayName=\"TronWebProto.UnfreezeBalanceContract\"),TronWebProto.WithdrawBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawBalanceContract.displayName=\"TronWebProto.WithdrawBalanceContract\"),TronWebProto.TransferContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferContract.displayName=\"TronWebProto.TransferContract\"),TronWebProto.TransactionBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.TransactionBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.TransactionBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.displayName=\"TronWebProto.TransactionBalanceTrace\"),TronWebProto.TransactionBalanceTrace.Operation=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransactionBalanceTrace.Operation,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.Operation.displayName=\"TronWebProto.TransactionBalanceTrace.Operation\"),TronWebProto.BlockBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.BlockBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.BlockBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.displayName=\"TronWebProto.BlockBalanceTrace\"),TronWebProto.BlockBalanceTrace.BlockIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName=\"TronWebProto.BlockBalanceTrace.BlockIdentifier\"),TronWebProto.AccountTrace=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountTrace.displayName=\"TronWebProto.AccountTrace\"),TronWebProto.AccountIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountIdentifier.displayName=\"TronWebProto.AccountIdentifier\"),TronWebProto.AccountBalanceRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceRequest,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceRequest.displayName=\"TronWebProto.AccountBalanceRequest\"),TronWebProto.AccountBalanceResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceResponse,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceResponse.displayName=\"TronWebProto.AccountBalanceResponse\"),TronWebProto.FreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceV2Contract.displayName=\"TronWebProto.FreezeBalanceV2Contract\"),TronWebProto.UnfreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceV2Contract.displayName=\"TronWebProto.UnfreezeBalanceV2Contract\"),TronWebProto.WithdrawExpireUnfreezeContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawExpireUnfreezeContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawExpireUnfreezeContract.displayName=\"TronWebProto.WithdrawExpireUnfreezeContract\"),TronWebProto.DelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegateResourceContract.displayName=\"TronWebProto.DelegateResourceContract\"),TronWebProto.UnDelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnDelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnDelegateResourceContract.displayName=\"TronWebProto.UnDelegateResourceContract\"),TronWebProto.CancelAllUnfreezeV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CancelAllUnfreezeV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CancelAllUnfreezeV2Contract.displayName=\"TronWebProto.CancelAllUnfreezeV2Contract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceContract.toObject(e,this)},TronWebProto.FreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),frozenDuration:n.Message.getFieldWithDefault(t,3,0),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceContract;return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setFrozenBalance(r);break;case 3:r=t.readInt64();e.setFrozenDuration(r);break;case 10:r=t.readEnum();e.setResource(r);break;case 15:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.FreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getFrozenDuration())&&t.writeInt64(3,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.FreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.FreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,\"\")},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceContract.toObject(e,this)},TronWebProto.UnfreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceContract;return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 10:r=t.readEnum();e.setResource(r);break;case 15:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.UnfreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,\"\")},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawBalanceContract.prototype.toObject=function(e){return TronWebProto.WithdrawBalanceContract.toObject(e,this)},TronWebProto.WithdrawBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawBalanceContract;return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.WithdrawBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferContract.prototype.toObject=function(e){return TronWebProto.TransferContract.toObject(e,this)},TronWebProto.TransferContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferContract;return TronWebProto.TransferContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setToAddress(r);break;case 3:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransferContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransferContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TransferContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TransferContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransferContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.toObject(e,this)},TronWebProto.TransactionBalanceTrace.toObject=function(e,t){var r={transactionIdentifier:t.getTransactionIdentifier_asB64(),operationList:n.Message.toObjectList(t.getOperationList(),TronWebProto.TransactionBalanceTrace.Operation.toObject,e),type:n.Message.getFieldWithDefault(t,3,\"\"),status:n.Message.getFieldWithDefault(t,4,\"\")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace;return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setTransactionIdentifier(r);break;case 2:r=new TronWebProto.TransactionBalanceTrace.Operation;t.readMessage(r,TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader),e.addOperation(r);break;case 3:r=t.readString();e.setType(r);break;case 4:r=t.readString();e.setStatus(r);break;default:t.skipField()}}return e},TronWebProto.TransactionBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTransactionIdentifier_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOperationList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter),(r=e.getType()).length>0&&t.writeString(3,r),(r=e.getStatus()).length>0&&t.writeString(4,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.Operation.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.Operation.toObject(e,this)},TronWebProto.TransactionBalanceTrace.Operation.toObject=function(e,t){var r={operationIdentifier:n.Message.getFieldWithDefault(t,1,0),address:t.getAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.Operation.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace.Operation;return TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setOperationIdentifier(r);break;case 2:r=t.readBytes();e.setAddress(r);break;case 3:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransactionBalanceTrace.Operation.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getOperationIdentifier())&&t.writeInt64(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64=function(){return n.Message.bytesAsB64(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8=function(){return n.Message.bytesAsU8(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.setTransactionIdentifier=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransactionBalanceTrace.prototype.getOperationList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace.Operation,2)},TronWebProto.TransactionBalanceTrace.prototype.setOperationList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.TransactionBalanceTrace.prototype.addOperation=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.TransactionBalanceTrace.Operation,t)},TronWebProto.TransactionBalanceTrace.prototype.clearOperationList=function(){return this.setOperationList([])},TronWebProto.TransactionBalanceTrace.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.TransactionBalanceTrace.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getStatus=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.TransactionBalanceTrace.prototype.setStatus=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.BlockBalanceTrace.repeatedFields_=[3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.toObject(e,this)},TronWebProto.BlockBalanceTrace.toObject=function(e,t){var r,o={blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r),timestamp:n.Message.getFieldWithDefault(t,2,0),transactionBalanceTraceList:n.Message.toObjectList(t.getTransactionBalanceTraceList(),TronWebProto.TransactionBalanceTrace.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.BlockBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace;return TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;case 2:r=t.readInt64();e.setTimestamp(r);break;case 3:r=new TronWebProto.TransactionBalanceTrace;t.readMessage(r,TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader),e.addTransactionBalanceTrace(r);break;default:t.skipField()}}return e},TronWebProto.BlockBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getBlockIdentifier())&&t.writeMessage(1,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter),0!==(r=e.getTimestamp())&&t.writeInt64(2,r),(r=e.getTransactionBalanceTraceList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,this)},TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject=function(e,t){var r={hash:t.getHash_asB64(),number:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;return TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setHash(r);break;case 2:r=t.readInt64();e.setNumber(r);break;default:t.skipField()}}return e},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHash_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getNumber())&&t.writeInt64(2,r)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setHash=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getNumber=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setNumber=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,1)},TronWebProto.BlockBalanceTrace.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.BlockBalanceTrace.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.BlockBalanceTrace.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.BlockBalanceTrace.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getTransactionBalanceTraceList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace,3)},TronWebProto.BlockBalanceTrace.prototype.setTransactionBalanceTraceList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.BlockBalanceTrace.prototype.addTransactionBalanceTrace=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.TransactionBalanceTrace,t)},TronWebProto.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList=function(){return this.setTransactionBalanceTraceList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountTrace.prototype.toObject=function(e){return TronWebProto.AccountTrace.toObject(e,this)},TronWebProto.AccountTrace.toObject=function(e,t){var r={balance:n.Message.getFieldWithDefault(t,1,0),placeholder:n.Message.getFieldWithDefault(t,99,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountTrace;return TronWebProto.AccountTrace.deserializeBinaryFromReader(r,t)},TronWebProto.AccountTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 99:r=t.readInt64();e.setPlaceholder(r);break;default:t.skipField()}}return e},TronWebProto.AccountTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountTrace.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),0!==(r=e.getPlaceholder())&&t.writeInt64(99,r)},TronWebProto.AccountTrace.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountTrace.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountTrace.prototype.getPlaceholder=function(){return n.Message.getFieldWithDefault(this,99,0)},TronWebProto.AccountTrace.prototype.setPlaceholder=function(e){return n.Message.setProto3IntField(this,99,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountIdentifier.prototype.toObject=function(e){return TronWebProto.AccountIdentifier.toObject(e,this)},TronWebProto.AccountIdentifier.toObject=function(e,t){var r={address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountIdentifier;return TronWebProto.AccountIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.AccountIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setAddress(r)}else t.skipField()}return e},TronWebProto.AccountIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountIdentifier.serializeBinaryToWriter=function(e,t){var r;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.AccountIdentifier.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.AccountIdentifier.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountIdentifier.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountIdentifier.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceRequest.prototype.toObject=function(e){return TronWebProto.AccountBalanceRequest.toObject(e,this)},TronWebProto.AccountBalanceRequest.toObject=function(e,t){var r,n={accountIdentifier:(r=t.getAccountIdentifier())&&TronWebProto.AccountIdentifier.toObject(e,r),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountBalanceRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceRequest;return TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountIdentifier;t.readMessage(r,TronWebProto.AccountIdentifier.deserializeBinaryFromReader),e.setAccountIdentifier(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}}return e},TronWebProto.AccountBalanceRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceRequest.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccountIdentifier())&&t.writeMessage(1,r,TronWebProto.AccountIdentifier.serializeBinaryToWriter),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceRequest.prototype.getAccountIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.AccountIdentifier,1)},TronWebProto.AccountBalanceRequest.prototype.setAccountIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.AccountBalanceRequest.prototype.clearAccountIdentifier=function(){return this.setAccountIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasAccountIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.AccountBalanceRequest.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceRequest.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceRequest.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceResponse.prototype.toObject=function(e){return TronWebProto.AccountBalanceResponse.toObject(e,this)},TronWebProto.AccountBalanceResponse.toObject=function(e,t){var r,o={balance:n.Message.getFieldWithDefault(t,1,0),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountBalanceResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceResponse;return TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}}return e},TronWebProto.AccountBalanceResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceResponse.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceResponse.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountBalanceResponse.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountBalanceResponse.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceResponse.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceResponse.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceResponse.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceV2Contract.toObject(e,this)},TronWebProto.FreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceV2Contract;return TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setFrozenBalance(r);break;case 3:r=t.readEnum();e.setResource(r);break;default:t.skipField()}}return e},TronWebProto.FreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceV2Contract.toObject(e,this)},TronWebProto.UnfreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),unfreezeBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceV2Contract;return TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setUnfreezeBalance(r);break;case 3:r=t.readEnum();e.setResource(r);break;default:t.skipField()}}return e},TronWebProto.UnfreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getUnfreezeBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawExpireUnfreezeContract.prototype.toObject=function(e){return TronWebProto.WithdrawExpireUnfreezeContract.toObject(e,this)},TronWebProto.WithdrawExpireUnfreezeContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawExpireUnfreezeContract;return TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.WithdrawExpireUnfreezeContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegateResourceContract.prototype.toObject=function(e){return TronWebProto.DelegateResourceContract.toObject(e,this)},TronWebProto.DelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64(),lock:n.Message.getBooleanFieldWithDefault(t,5,!1),lockPeriod:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegateResourceContract;return TronWebProto.DelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.DelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum();e.setResource(r);break;case 3:r=t.readInt64();e.setBalance(r);break;case 4:r=t.readBytes();e.setReceiverAddress(r);break;case 5:r=t.readBool();e.setLock(r);break;case 6:r=t.readInt64();e.setLockPeriod(r);break;default:t.skipField()}}return e},TronWebProto.DelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r),(r=e.getLock())&&t.writeBool(5,r),0!==(r=e.getLockPeriod())&&t.writeInt64(6,r)},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.DelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.DelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.DelegateResourceContract.prototype.getLock=function(){return n.Message.getBooleanFieldWithDefault(this,5,!1)},TronWebProto.DelegateResourceContract.prototype.setLock=function(e){return n.Message.setProto3BooleanField(this,5,e)},TronWebProto.DelegateResourceContract.prototype.getLockPeriod=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegateResourceContract.prototype.setLockPeriod=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnDelegateResourceContract.prototype.toObject=function(e){return TronWebProto.UnDelegateResourceContract.toObject(e,this)},TronWebProto.UnDelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnDelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnDelegateResourceContract;return TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum();e.setResource(r);break;case 3:r=t.readInt64();e.setBalance(r);break;case 4:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.UnDelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r)},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnDelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnDelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.UnDelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnDelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CancelAllUnfreezeV2Contract.prototype.toObject=function(e){return TronWebProto.CancelAllUnfreezeV2Contract.toObject(e,this)},TronWebProto.CancelAllUnfreezeV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CancelAllUnfreezeV2Contract;return TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.CancelAllUnfreezeV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},o.object.extend(t,TronWebProto)},4781(e,t,r){var n=r(7186),o=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==o&&o||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();n.exportSymbol(\"TronWebProto.ResourceCode\",null,o),TronWebProto.ResourceCode={BANDWIDTH:0,ENERGY:1,TRON_POWER:2},n.object.extend(t,TronWebProto)},5226(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.ExchangeCreateContract\",null,s),o.exportSymbol(\"TronWebProto.ExchangeInjectContract\",null,s),o.exportSymbol(\"TronWebProto.ExchangeTransactionContract\",null,s),o.exportSymbol(\"TronWebProto.ExchangeWithdrawContract\",null,s),TronWebProto.ExchangeCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeCreateContract.displayName=\"TronWebProto.ExchangeCreateContract\"),TronWebProto.ExchangeInjectContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeInjectContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeInjectContract.displayName=\"TronWebProto.ExchangeInjectContract\"),TronWebProto.ExchangeWithdrawContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeWithdrawContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeWithdrawContract.displayName=\"TronWebProto.ExchangeWithdrawContract\"),TronWebProto.ExchangeTransactionContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeTransactionContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeTransactionContract.displayName=\"TronWebProto.ExchangeTransactionContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeCreateContract.prototype.toObject=function(e){return TronWebProto.ExchangeCreateContract.toObject(e,this)},TronWebProto.ExchangeCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,3,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeCreateContract;return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setFirstTokenId(r);break;case 3:r=t.readInt64();e.setFirstTokenBalance(r);break;case 4:r=t.readBytes();e.setSecondTokenId(r);break;case 5:r=t.readInt64();e.setSecondTokenBalance(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(3,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(5,r)},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeInjectContract.prototype.toObject=function(e){return TronWebProto.ExchangeInjectContract.toObject(e,this)},TronWebProto.ExchangeInjectContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeInjectContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeInjectContract;return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeInjectContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeInjectContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeInjectContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeInjectContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeInjectContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeInjectContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeInjectContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeWithdrawContract.prototype.toObject=function(e){return TronWebProto.ExchangeWithdrawContract.toObject(e,this)},TronWebProto.ExchangeWithdrawContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeWithdrawContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeWithdrawContract;return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeWithdrawContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeWithdrawContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeTransactionContract.prototype.toObject=function(e){return TronWebProto.ExchangeTransactionContract.toObject(e,this)},TronWebProto.ExchangeTransactionContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0),expected:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeTransactionContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeTransactionContract;return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;case 5:r=t.readInt64();e.setExpected(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeTransactionContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r),0!==(r=e.getExpected())&&t.writeInt64(5,r)},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeTransactionContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeTransactionContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeTransactionContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeTransactionContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeTransactionContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.ExchangeTransactionContract.prototype.getExpected=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeTransactionContract.prototype.setExpected=function(e){return n.Message.setProto3IntField(this,5,e)},o.object.extend(t,TronWebProto)},8099(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.ProposalApproveContract\",null,s),o.exportSymbol(\"TronWebProto.ProposalCreateContract\",null,s),o.exportSymbol(\"TronWebProto.ProposalDeleteContract\",null,s),TronWebProto.ProposalApproveContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalApproveContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalApproveContract.displayName=\"TronWebProto.ProposalApproveContract\"),TronWebProto.ProposalCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalCreateContract.displayName=\"TronWebProto.ProposalCreateContract\"),TronWebProto.ProposalDeleteContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalDeleteContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalDeleteContract.displayName=\"TronWebProto.ProposalDeleteContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalApproveContract.prototype.toObject=function(e){return TronWebProto.ProposalApproveContract.toObject(e,this)},TronWebProto.ProposalApproveContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0),isAddApproval:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalApproveContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalApproveContract;return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalApproveContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setProposalId(r);break;case 3:r=t.readBool();e.setIsAddApproval(r);break;default:t.skipField()}}return e},TronWebProto.ProposalApproveContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalApproveContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r),(r=e.getIsAddApproval())&&t.writeBool(3,r)},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalApproveContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalApproveContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ProposalApproveContract.prototype.getIsAddApproval=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.ProposalApproveContract.prototype.setIsAddApproval=function(e){return n.Message.setProto3BooleanField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalCreateContract.prototype.toObject=function(e){return TronWebProto.ProposalCreateContract.toObject(e,this)},TronWebProto.ProposalCreateContract.toObject=function(e,t){var r,n={ownerAddress:t.getOwnerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[]};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.ProposalCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalCreateContract;return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=e.getParametersMap();t.readMessage(r,function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)});break;default:t.skipField()}}return e},TronWebProto.ProposalCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(2,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64)},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalCreateContract.prototype.getParametersMap=function(e){return n.Message.getMapField(this,2,e,null)},TronWebProto.ProposalCreateContract.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalDeleteContract.prototype.toObject=function(e){return TronWebProto.ProposalDeleteContract.toObject(e,this)},TronWebProto.ProposalDeleteContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalDeleteContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalDeleteContract;return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setProposalId(r);break;default:t.skipField()}}return e},TronWebProto.ProposalDeleteContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalDeleteContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r)},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalDeleteContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalDeleteContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},504(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")(),i=r(4856);o.object.extend(proto,i),o.exportSymbol(\"TronWebProto.ClearABIContract\",null,s),o.exportSymbol(\"TronWebProto.ContractState\",null,s),o.exportSymbol(\"TronWebProto.CreateSmartContract\",null,s),o.exportSymbol(\"TronWebProto.SmartContract\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry.EntryType\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry.Param\",null,s),o.exportSymbol(\"TronWebProto.SmartContract.ABI.Entry.StateMutabilityType\",null,s),o.exportSymbol(\"TronWebProto.SmartContractDataWrapper\",null,s),o.exportSymbol(\"TronWebProto.TriggerSmartContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateEnergyLimitContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateSettingContract\",null,s),TronWebProto.SmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.displayName=\"TronWebProto.SmartContract\"),TronWebProto.SmartContract.ABI=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.displayName=\"TronWebProto.SmartContract.ABI\"),TronWebProto.SmartContract.ABI.Entry=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.Entry.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.displayName=\"TronWebProto.SmartContract.ABI.Entry\"),TronWebProto.SmartContract.ABI.Entry.Param=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry.Param,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.Param.displayName=\"TronWebProto.SmartContract.ABI.Entry.Param\"),TronWebProto.ContractState=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ContractState,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ContractState.displayName=\"TronWebProto.ContractState\"),TronWebProto.CreateSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CreateSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CreateSmartContract.displayName=\"TronWebProto.CreateSmartContract\"),TronWebProto.TriggerSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TriggerSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TriggerSmartContract.displayName=\"TronWebProto.TriggerSmartContract\"),TronWebProto.ClearABIContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ClearABIContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ClearABIContract.displayName=\"TronWebProto.ClearABIContract\"),TronWebProto.UpdateSettingContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateSettingContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateSettingContract.displayName=\"TronWebProto.UpdateSettingContract\"),TronWebProto.UpdateEnergyLimitContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateEnergyLimitContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateEnergyLimitContract.displayName=\"TronWebProto.UpdateEnergyLimitContract\"),TronWebProto.SmartContractDataWrapper=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContractDataWrapper,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContractDataWrapper.displayName=\"TronWebProto.SmartContractDataWrapper\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.prototype.toObject=function(e){return TronWebProto.SmartContract.toObject(e,this)},TronWebProto.SmartContract.toObject=function(e,t){var r,o={originAddress:t.getOriginAddress_asB64(),contractAddress:t.getContractAddress_asB64(),abi:(r=t.getAbi())&&TronWebProto.SmartContract.ABI.toObject(e,r),bytecode:t.getBytecode_asB64(),callValue:n.Message.getFieldWithDefault(t,5,0),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,6,0),name:n.Message.getFieldWithDefault(t,7,\"\"),originEnergyLimit:n.Message.getFieldWithDefault(t,8,0),codeHash:t.getCodeHash_asB64(),trxHash:t.getTrxHash_asB64(),version:n.Message.getFieldWithDefault(t,11,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.SmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract;return TronWebProto.SmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOriginAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=new TronWebProto.SmartContract.ABI;t.readMessage(r,TronWebProto.SmartContract.ABI.deserializeBinaryFromReader),e.setAbi(r);break;case 4:r=t.readBytes();e.setBytecode(r);break;case 5:r=t.readInt64();e.setCallValue(r);break;case 6:r=t.readInt64();e.setConsumeUserResourcePercent(r);break;case 7:r=t.readString();e.setName(r);break;case 8:r=t.readInt64();e.setOriginEnergyLimit(r);break;case 9:r=t.readBytes();e.setCodeHash(r);break;case 10:r=t.readBytes();e.setTrxHash(r);break;case 11:r=t.readInt32();e.setVersion(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOriginAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getAbi())&&t.writeMessage(3,r,TronWebProto.SmartContract.ABI.serializeBinaryToWriter),(r=e.getBytecode_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallValue())&&t.writeInt64(5,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(6,r),(r=e.getName()).length>0&&t.writeString(7,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(8,r),(r=e.getCodeHash_asU8()).length>0&&t.writeBytes(9,r),(r=e.getTrxHash_asU8()).length>0&&t.writeBytes(10,r),0!==(r=e.getVersion())&&t.writeInt32(11,r)},TronWebProto.SmartContract.ABI.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.toObject(e,this)},TronWebProto.SmartContract.ABI.toObject=function(e,t){var r={entrysList:n.Message.toObjectList(t.getEntrysList(),TronWebProto.SmartContract.ABI.Entry.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI;return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=new TronWebProto.SmartContract.ABI.Entry;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader),e.addEntrys(r)}else t.skipField()}return e},TronWebProto.SmartContract.ABI.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.serializeBinaryToWriter=function(e,t){var r;(r=e.getEntrysList()).length>0&&t.writeRepeatedMessage(1,r,TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter)},TronWebProto.SmartContract.ABI.Entry.repeatedFields_=[4,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.toObject=function(e,t){var r={anonymous:n.Message.getBooleanFieldWithDefault(t,1,!1),constant:n.Message.getBooleanFieldWithDefault(t,2,!1),name:n.Message.getFieldWithDefault(t,3,\"\"),inputsList:n.Message.toObjectList(t.getInputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),outputsList:n.Message.toObjectList(t.getOutputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),type:n.Message.getFieldWithDefault(t,6,0),payable:n.Message.getBooleanFieldWithDefault(t,7,!1),statemutability:n.Message.getFieldWithDefault(t,8,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry;return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setAnonymous(r);break;case 2:r=t.readBool();e.setConstant(r);break;case 3:r=t.readString();e.setName(r);break;case 4:r=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addInputs(r);break;case 5:r=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addOutputs(r);break;case 6:r=t.readEnum();e.setType(r);break;case 7:r=t.readBool();e.setPayable(r);break;case 8:r=t.readEnum();e.setStatemutability(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAnonymous())&&t.writeBool(1,r),(r=e.getConstant())&&t.writeBool(2,r),(r=e.getName()).length>0&&t.writeString(3,r),(r=e.getInputsList()).length>0&&t.writeRepeatedMessage(4,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),(r=e.getOutputsList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),0!==(r=e.getType())&&t.writeEnum(6,r),(r=e.getPayable())&&t.writeBool(7,r),0!==(r=e.getStatemutability())&&t.writeEnum(8,r)},TronWebProto.SmartContract.ABI.Entry.EntryType={UNKNOWNENTRYTYPE:0,CONSTRUCTOR:1,FUNCTION:2,EVENT:3,FALLBACK:4,RECEIVE:5,ERROR:6},TronWebProto.SmartContract.ABI.Entry.StateMutabilityType={UNKNOWNMUTABILITYTYPE:0,PURE:1,VIEW:2,NONPAYABLE:3,PAYABLE:4},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.Param.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.Param.toObject=function(e,t){var r={indexed:n.Message.getBooleanFieldWithDefault(t,1,!1),name:n.Message.getFieldWithDefault(t,2,\"\"),type:n.Message.getFieldWithDefault(t,3,\"\")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry.Param;return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setIndexed(r);break;case 2:r=t.readString();e.setName(r);break;case 3:r=t.readString();e.setType(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getIndexed())&&t.writeBool(1,r),(r=e.getName()).length>0&&t.writeString(2,r),(r=e.getType()).length>0&&t.writeString(3,r)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName=function(e){return n.Message.setProto3StringField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getConstant=function(){return n.Message.getBooleanFieldWithDefault(this,2,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setConstant=function(e){return n.Message.setProto3BooleanField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getName=function(){return n.Message.getFieldWithDefault(this,3,\"\")},TronWebProto.SmartContract.ABI.Entry.prototype.setName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,4)},TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addInputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList=function(){return this.setInputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,5)},TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList=function(){return this.setOutputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getType=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setType=function(e){return n.Message.setProto3EnumField(this,6,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getPayable=function(){return n.Message.getBooleanFieldWithDefault(this,7,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setPayable=function(e){return n.Message.setProto3BooleanField(this,7,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability=function(e){return n.Message.setProto3EnumField(this,8,e)},TronWebProto.SmartContract.ABI.prototype.getEntrysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry,1)},TronWebProto.SmartContract.ABI.prototype.setEntrysList=function(e){return n.Message.setRepeatedWrapperField(this,1,e)},TronWebProto.SmartContract.ABI.prototype.addEntrys=function(e,t){return n.Message.addToRepeatedWrapperField(this,1,e,TronWebProto.SmartContract.ABI.Entry,t)},TronWebProto.SmartContract.ABI.prototype.clearEntrysList=function(){return this.setEntrysList([])},TronWebProto.SmartContract.prototype.getOriginAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.SmartContract.prototype.getOriginAddress_asB64=function(){return n.Message.bytesAsB64(this.getOriginAddress())},TronWebProto.SmartContract.prototype.getOriginAddress_asU8=function(){return n.Message.bytesAsU8(this.getOriginAddress())},TronWebProto.SmartContract.prototype.setOriginAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.SmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.SmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContract.prototype.getAbi=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract.ABI,3)},TronWebProto.SmartContract.prototype.setAbi=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContract.prototype.clearAbi=function(){return this.setAbi(void 0)},TronWebProto.SmartContract.prototype.hasAbi=function(){return null!=n.Message.getField(this,3)},TronWebProto.SmartContract.prototype.getBytecode=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.SmartContract.prototype.getBytecode_asB64=function(){return n.Message.bytesAsB64(this.getBytecode())},TronWebProto.SmartContract.prototype.getBytecode_asU8=function(){return n.Message.bytesAsU8(this.getBytecode())},TronWebProto.SmartContract.prototype.setBytecode=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.SmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.SmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.SmartContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,7,\"\")},TronWebProto.SmartContract.prototype.setName=function(e){return n.Message.setProto3StringField(this,7,e)},TronWebProto.SmartContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.SmartContract.prototype.getCodeHash=function(){return n.Message.getFieldWithDefault(this,9,\"\")},TronWebProto.SmartContract.prototype.getCodeHash_asB64=function(){return n.Message.bytesAsB64(this.getCodeHash())},TronWebProto.SmartContract.prototype.getCodeHash_asU8=function(){return n.Message.bytesAsU8(this.getCodeHash())},TronWebProto.SmartContract.prototype.setCodeHash=function(e){return n.Message.setProto3BytesField(this,9,e)},TronWebProto.SmartContract.prototype.getTrxHash=function(){return n.Message.getFieldWithDefault(this,10,\"\")},TronWebProto.SmartContract.prototype.getTrxHash_asB64=function(){return n.Message.bytesAsB64(this.getTrxHash())},TronWebProto.SmartContract.prototype.getTrxHash_asU8=function(){return n.Message.bytesAsU8(this.getTrxHash())},TronWebProto.SmartContract.prototype.setTrxHash=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.SmartContract.prototype.getVersion=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.SmartContract.prototype.setVersion=function(e){return n.Message.setProto3IntField(this,11,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ContractState.prototype.toObject=function(e){return TronWebProto.ContractState.toObject(e,this)},TronWebProto.ContractState.toObject=function(e,t){var r={energyUsage:n.Message.getFieldWithDefault(t,1,0),energyFactor:n.Message.getFieldWithDefault(t,2,0),updateCycle:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ContractState.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ContractState;return TronWebProto.ContractState.deserializeBinaryFromReader(r,t)},TronWebProto.ContractState.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=t.readInt64();e.setEnergyFactor(r);break;case 3:r=t.readInt64();e.setUpdateCycle(r);break;default:t.skipField()}}return e},TronWebProto.ContractState.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ContractState.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ContractState.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),0!==(r=e.getEnergyFactor())&&t.writeInt64(2,r),0!==(r=e.getUpdateCycle())&&t.writeInt64(3,r)},TronWebProto.ContractState.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.ContractState.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.ContractState.prototype.getEnergyFactor=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ContractState.prototype.setEnergyFactor=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ContractState.prototype.getUpdateCycle=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ContractState.prototype.setUpdateCycle=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CreateSmartContract.prototype.toObject=function(e){return TronWebProto.CreateSmartContract.toObject(e,this)},TronWebProto.CreateSmartContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),newContract:(r=t.getNewContract())&&TronWebProto.SmartContract.toObject(e,r),callTokenValue:n.Message.getFieldWithDefault(t,3,0),tokenId:n.Message.getFieldWithDefault(t,4,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.CreateSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CreateSmartContract;return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.CreateSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setNewContract(r);break;case 3:r=t.readInt64();e.setCallTokenValue(r);break;case 4:r=t.readInt64();e.setTokenId(r);break;default:t.skipField()}}return e},TronWebProto.CreateSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CreateSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CreateSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getNewContract())&&t.writeMessage(2,r,TronWebProto.SmartContract.serializeBinaryToWriter),0!==(r=e.getCallTokenValue())&&t.writeInt64(3,r),0!==(r=e.getTokenId())&&t.writeInt64(4,r)},TronWebProto.CreateSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.CreateSmartContract.prototype.getNewContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,2)},TronWebProto.CreateSmartContract.prototype.setNewContract=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.CreateSmartContract.prototype.clearNewContract=function(){return this.setNewContract(void 0)},TronWebProto.CreateSmartContract.prototype.hasNewContract=function(){return null!=n.Message.getField(this,2)},TronWebProto.CreateSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.CreateSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.CreateSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.CreateSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TriggerSmartContract.prototype.toObject=function(e){return TronWebProto.TriggerSmartContract.toObject(e,this)},TronWebProto.TriggerSmartContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),callValue:n.Message.getFieldWithDefault(t,3,0),data:t.getData_asB64(),callTokenValue:n.Message.getFieldWithDefault(t,5,0),tokenId:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TriggerSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TriggerSmartContract;return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.TriggerSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setCallValue(r);break;case 4:r=t.readBytes();e.setData(r);break;case 5:r=t.readInt64();e.setCallTokenValue(r);break;case 6:r=t.readInt64();e.setTokenId(r);break;default:t.skipField()}}return e},TronWebProto.TriggerSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TriggerSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCallValue())&&t.writeInt64(3,r),(r=e.getData_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallTokenValue())&&t.writeInt64(5,r),0!==(r=e.getTokenId())&&t.writeInt64(6,r)},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TriggerSmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TriggerSmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TriggerSmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TriggerSmartContract.prototype.getData=function(){return n.Message.getFieldWithDefault(this,4,\"\")},TronWebProto.TriggerSmartContract.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.TriggerSmartContract.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.TriggerSmartContract.prototype.setData=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.TriggerSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.TriggerSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.TriggerSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.TriggerSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ClearABIContract.prototype.toObject=function(e){return TronWebProto.ClearABIContract.toObject(e,this)},TronWebProto.ClearABIContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ClearABIContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ClearABIContract;return TronWebProto.ClearABIContract.deserializeBinaryFromReader(r,t)},TronWebProto.ClearABIContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;default:t.skipField()}}return e},TronWebProto.ClearABIContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ClearABIContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ClearABIContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.ClearABIContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ClearABIContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.ClearABIContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateSettingContract.prototype.toObject=function(e){return TronWebProto.UpdateSettingContract.toObject(e,this)},TronWebProto.UpdateSettingContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateSettingContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateSettingContract;return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateSettingContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setConsumeUserResourcePercent(r);break;default:t.skipField()}}return e},TronWebProto.UpdateSettingContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateSettingContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(3,r)},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateSettingContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateEnergyLimitContract.prototype.toObject=function(e){return TronWebProto.UpdateEnergyLimitContract.toObject(e,this)},TronWebProto.UpdateEnergyLimitContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),originEnergyLimit:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateEnergyLimitContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateEnergyLimitContract;return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setOriginEnergyLimit(r);break;default:t.skipField()}}return e},TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(3,r)},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContractDataWrapper.prototype.toObject=function(e){return TronWebProto.SmartContractDataWrapper.toObject(e,this)},TronWebProto.SmartContractDataWrapper.toObject=function(e,t){var r,n={smartContract:(r=t.getSmartContract())&&TronWebProto.SmartContract.toObject(e,r),runtimecode:t.getRuntimecode_asB64(),contractState:(r=t.getContractState())&&TronWebProto.ContractState.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.SmartContractDataWrapper.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContractDataWrapper;return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setSmartContract(r);break;case 2:r=t.readBytes();e.setRuntimecode(r);break;case 3:r=new TronWebProto.ContractState;t.readMessage(r,TronWebProto.ContractState.deserializeBinaryFromReader),e.setContractState(r);break;default:t.skipField()}}return e},TronWebProto.SmartContractDataWrapper.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getSmartContract())&&t.writeMessage(1,r,TronWebProto.SmartContract.serializeBinaryToWriter),(r=e.getRuntimecode_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getContractState())&&t.writeMessage(3,r,TronWebProto.ContractState.serializeBinaryToWriter)},TronWebProto.SmartContractDataWrapper.prototype.getSmartContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,1)},TronWebProto.SmartContractDataWrapper.prototype.setSmartContract=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract=function(){return this.setSmartContract(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract=function(){return null!=n.Message.getField(this,1)},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64=function(){return n.Message.bytesAsB64(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8=function(){return n.Message.bytesAsU8(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContractDataWrapper.prototype.getContractState=function(){return n.Message.getWrapperField(this,TronWebProto.ContractState,3)},TronWebProto.SmartContractDataWrapper.prototype.setContractState=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContractDataWrapper.prototype.clearContractState=function(){return this.setContractState(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasContractState=function(){return null!=n.Message.getField(this,3)},o.object.extend(t,TronWebProto)},7724(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.BuyStorageBytesContract\",null,s),o.exportSymbol(\"TronWebProto.BuyStorageContract\",null,s),o.exportSymbol(\"TronWebProto.SellStorageContract\",null,s),o.exportSymbol(\"TronWebProto.UpdateBrokerageContract\",null,s),TronWebProto.BuyStorageBytesContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageBytesContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageBytesContract.displayName=\"TronWebProto.BuyStorageBytesContract\"),TronWebProto.BuyStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageContract.displayName=\"TronWebProto.BuyStorageContract\"),TronWebProto.SellStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SellStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SellStorageContract.displayName=\"TronWebProto.SellStorageContract\"),TronWebProto.UpdateBrokerageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateBrokerageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateBrokerageContract.displayName=\"TronWebProto.UpdateBrokerageContract\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageBytesContract.prototype.toObject=function(e){return TronWebProto.BuyStorageBytesContract.toObject(e,this)},TronWebProto.BuyStorageBytesContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),bytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageBytesContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageBytesContract;return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setBytes(r);break;default:t.skipField()}}return e},TronWebProto.BuyStorageBytesContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBytes())&&t.writeInt64(2,r)},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageBytesContract.prototype.getBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageBytesContract.prototype.setBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageContract.prototype.toObject=function(e){return TronWebProto.BuyStorageContract.toObject(e,this)},TronWebProto.BuyStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),quant:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageContract;return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.BuyStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getQuant())&&t.writeInt64(2,r)},TronWebProto.BuyStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SellStorageContract.prototype.toObject=function(e){return TronWebProto.SellStorageContract.toObject(e,this)},TronWebProto.SellStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),storageBytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SellStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SellStorageContract;return TronWebProto.SellStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.SellStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setStorageBytes(r);break;default:t.skipField()}}return e},TronWebProto.SellStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SellStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SellStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getStorageBytes())&&t.writeInt64(2,r)},TronWebProto.SellStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SellStorageContract.prototype.getStorageBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.SellStorageContract.prototype.setStorageBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateBrokerageContract.prototype.toObject=function(e){return TronWebProto.UpdateBrokerageContract.toObject(e,this)},TronWebProto.UpdateBrokerageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),brokerage:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateBrokerageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateBrokerageContract;return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt32();e.setBrokerage(r);break;default:t.skipField()}}return e},TronWebProto.UpdateBrokerageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBrokerage())&&t.writeInt32(2,r)},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateBrokerageContract.prototype.getBrokerage=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UpdateBrokerageContract.prototype.setBrokerage=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},4078(e,t,r){var n=r(7186),o=n,s=\"undefined\"!=typeof globalThis&&globalThis||\"undefined\"!=typeof window&&window||void 0!==s&&s||\"undefined\"!=typeof self&&self||function(){return this}.call(null)||Function(\"return this\")();o.exportSymbol(\"TronWebProto.VoteWitnessContract\",null,s),o.exportSymbol(\"TronWebProto.VoteWitnessContract.Vote\",null,s),o.exportSymbol(\"TronWebProto.WitnessCreateContract\",null,s),o.exportSymbol(\"TronWebProto.WitnessUpdateContract\",null,s),TronWebProto.WitnessCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessCreateContract.displayName=\"TronWebProto.WitnessCreateContract\"),TronWebProto.WitnessUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessUpdateContract.displayName=\"TronWebProto.WitnessUpdateContract\"),TronWebProto.VoteWitnessContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.VoteWitnessContract.repeatedFields_,null)},o.inherits(TronWebProto.VoteWitnessContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.displayName=\"TronWebProto.VoteWitnessContract\"),TronWebProto.VoteWitnessContract.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.VoteWitnessContract.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.Vote.displayName=\"TronWebProto.VoteWitnessContract.Vote\"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessCreateContract.prototype.toObject=function(e){return TronWebProto.WitnessCreateContract.toObject(e,this)},TronWebProto.WitnessCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),url:t.getUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessCreateContract;return TronWebProto.WitnessCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setUrl(r);break;default:t.skipField()}}return e},TronWebProto.WitnessCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessCreateContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,2,\"\")},TronWebProto.WitnessCreateContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessUpdateContract.prototype.toObject=function(e){return TronWebProto.WitnessUpdateContract.toObject(e,this)},TronWebProto.WitnessUpdateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),updateUrl:t.getUpdateUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessUpdateContract;return TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 12:r=t.readBytes();e.setUpdateUrl(r);break;default:t.skipField()}}return e},TronWebProto.WitnessUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUpdateUrl_asU8()).length>0&&t.writeBytes(12,r)},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl=function(){return n.Message.getFieldWithDefault(this,12,\"\")},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asB64=function(){return n.Message.bytesAsB64(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asU8=function(){return n.Message.bytesAsU8(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.setUpdateUrl=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.VoteWitnessContract.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.toObject(e,this)},TronWebProto.VoteWitnessContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.VoteWitnessContract.Vote.toObject,e),support:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract;return TronWebProto.VoteWitnessContract.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.VoteWitnessContract.Vote;t.readMessage(r,TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 3:r=t.readBool();e.setSupport(r);break;default:t.skipField()}}return e},TronWebProto.VoteWitnessContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter),(r=e.getSupport())&&t.writeBool(3,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.Vote.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.Vote.toObject(e,this)},TronWebProto.VoteWitnessContract.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract.Vote;return TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64();e.setVoteCount(r);break;default:t.skipField()}}return e},TronWebProto.VoteWitnessContract.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,\"\")},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.VoteWitnessContract.Vote,2)},TronWebProto.VoteWitnessContract.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.VoteWitnessContract.Vote,t)},TronWebProto.VoteWitnessContract.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.VoteWitnessContract.prototype.getSupport=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.VoteWitnessContract.prototype.setSupport=function(e){return n.Message.setProto3BooleanField(this,3,e)},o.object.extend(t,TronWebProto)}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{\"use strict\";r.r(n),r.d(n,{onAssetHistoricalPrice:()=>AD,onAssetsConversion:()=>ED,onAssetsLookup:()=>PD,onAssetsMarketData:()=>BD,onClientRequest:()=>CD,onCronjob:()=>ID,onKeyringRequest:()=>SD,onRpcRequest:()=>WD,onUserInput:()=>xD});var e={};r.r(e),r.d(e,{base64DecodeFromString:()=>vr,base64EncodeToString:()=>Tr,byte2hexStr:()=>yr,byteArray2hexStr:()=>wr,bytesToString:()=>mr,hextoString:()=>br});var t={};r.r(t),r.d(t,{ADDRESS_PREFIX:()=>Er,ADDRESS_PREFIX_BYTE:()=>Pr,ADDRESS_PREFIX_REGEX:()=>Br,ADDRESS_SIZE:()=>Ar,TRON_BIP39_PATH_INDEX_0:()=>Ir,TRON_BIP39_PATH_PREFIX:()=>Cr});var o={};r.r(o),r.d(o,{arrayEquals:()=>Wr,base64DecodeFromString:()=>vr,base64EncodeToString:()=>Tr,bin2String:()=>Sr,byte2hexStr:()=>yr,byteArray2hexStr:()=>wr,bytesToString:()=>mr,getStringType:()=>Mr,hexChar2byte:()=>_r,hexStr2byteArray:()=>kr,hextoString:()=>br,isHexChar:()=>Rr,isNumber:()=>Fr,strToDate:()=>Or,stringToBytes:()=>xr});var s={};r.r(s),r.d(s,{decode58:()=>$r,encode58:()=>Lr});var i={};r.r(i),r.d(i,{OG:()=>ri,My:()=>Ks,Ph:()=>Ys,lX:()=>Js,Id:()=>ti,fg:()=>si,qj:()=>ei,aT:()=>Zs,lq:()=>Xs,z:()=>Qs,Q5:()=>ai});var a={};r.r(a),r.d(a,{AbiCoder:()=>tc,FormatTypes:()=>Ld,Interface:()=>Fd,Mnemonic:()=>xs,Signature:()=>Mn,SigningKey:()=>Vi,Wordlist:()=>Ts,arrayify:()=>Dd,concat:()=>ln,ethersHDNodeWallet:()=>Fl,id:()=>ys,isValidMnemonic:()=>$d,joinSignature:()=>Ud,keccak256:()=>gs,pbkdf2:()=>Vo,recoverAddress:()=>Gi,sha256:()=>Do,sha512:()=>Lo,splitSignature:()=>Nd,toUtf8Bytes:()=>qo,toUtf8String:()=>Zo,wordlists:()=>Nl});var c={};r.r(c),r.d(c,{DO:()=>pf,OG:()=>Cf,My:()=>gf,Ph:()=>vf,lX:()=>Tf,Id:()=>Bf,fg:()=>Wf,qj:()=>Pf,aT:()=>wf,aY:()=>ff,lq:()=>Af,z:()=>Ef,Q5:()=>_f});var u={};r.r(u),r.d(u,{ECKeySign:()=>_p,SHA256:()=>Rp,arrayToBase64String:()=>wp,computeAddress:()=>Ep,decode58Check:()=>Bp,decodeBase58Address:()=>yp,ecRecover:()=>bp,genPriKey:()=>Ap,getAddressFromPriKey:()=>Pp,getAddressFromPriKeyBase64String:()=>Wp,getBase58CheckAddress:()=>gp,getBase58CheckAddressFromPriKeyBase64String:()=>Ip,getHexStrAddressFromPriKeyBase64String:()=>Sp,getPubKeyFromPriKey:()=>xp,getRowBytesFromTransactionBase64:()=>Tp,isAddressValid:()=>Cp,passwordToAddress:()=>kp,pkToAddress:()=>Op,sha3:()=>Fp,signBytes:()=>vp,signTransaction:()=>mp});var l={};r.r(l),r.d(l,{generateAccount:()=>Np,generateAccountWithMnemonic:()=>Dp,generateRandom:()=>Up});var d={};r.r(d),r.d(d,{hasProperties:()=>mh,hasProperty:()=>yh,isArray:()=>ch,isBigNumber:()=>dh,isBoolean:()=>lh,isFunction:()=>ph,isHex:()=>hh,isInteger:()=>gh,isJson:()=>uh,isNotNullOrUndefined:()=>Th,isObject:()=>ah,isString:()=>fh,isValidURL:()=>ih,mapEvent:()=>bh,padLeft:()=>vh,parseEvent:()=>wh,sleep:()=>Ah});var f={};r.r(f),r.d(f,{fromHex:()=>Eh,fromPrivateKey:()=>Ih,isAddress:()=>Sh,isChecksumAddress:()=>Ch,toChecksumAddress:()=>Bh,toHex:()=>Ph});var p={};r.r(p),r.d(p,{decodeParams:()=>_h,decodeParamsV2ByABI:()=>Mh,encodeParams:()=>Rh,encodeParamsV2ByABI:()=>Fh});var h={};r.r(h),r.d(h,{TRON_MESSAGE_PREFIX:()=>Nh,hashMessage:()=>Uh,signMessage:()=>Dh,verifyMessage:()=>Lh});var g={};r.r(g),r.d(g,{TypedDataEncoder:()=>eg,signTypedData:()=>tg,verifyTypedData:()=>rg});var y={};r.r(y),r.d(y,{hasBrowserEnv:()=>hy,hasStandardBrowserEnv:()=>yy,hasStandardBrowserWebWorkerEnv:()=>my,navigator:()=>gy,origin:()=>by});var m={};r.r(m),r.d(m,{txCheck:()=>Zb,txCheckWithArgs:()=>Yb,txJsonToPb:()=>Hb,txJsonToPbWithArgs:()=>Gb,txPbToRawDataHex:()=>qb,txPbToTxID:()=>Jb});var b={};r.r(b),r.d(b,{deserializeTransaction:()=>pw});var w={};r.r(w),r.d(w,{OG:()=>kx,My:()=>Px,Ph:()=>Ix,lX:()=>Sx,Id:()=>Rx,fg:()=>Mx,qj:()=>_x,aT:()=>Cx,lq:()=>Wx,z:()=>xx,Q5:()=>Ux});var v={};r.r(v),r.d(v,{compressPublicKey:()=>rF,compressedPublicKeyLength:()=>iF,curve:()=>qO,decompressPublicKey:()=>nF,deriveUnhardenedKeys:()=>XO,getPublicKey:()=>eF,isValidPrivateKey:()=>JO,masterNodeGenerationSpec:()=>sF,name:()=>ZO,privateKeyLength:()=>oF,publicAdd:()=>tF,publicKeyLength:()=>QO,secret:()=>YO});var T={};r.r(T),r.d(T,{bytesToNumberLE:()=>hF,compressPublicKey:()=>bF,compressedPublicKeyLength:()=>AF,curve:()=>aF,decompressPublicKey:()=>wF,deriveUnhardenedKeys:()=>fF,getPublicKey:()=>yF,isValidPrivateKey:()=>dF,masterNodeGenerationSpec:()=>TF,multiplyWithBase:()=>gF,name:()=>cF,privateKeyLength:()=>vF,publicAdd:()=>mF,publicKeyLength:()=>pF,secret:()=>uF});var A={};r.r(A),r.d(A,{deriveChildKey:()=>oM,privateKeyToEthAddress:()=>rM,publicKeyToEthAddress:()=>nM});var E={};r.r(E),r.d(E,{bip39MnemonicToMultipath:()=>lM,createBip39KeyFromSeed:()=>hM,deriveChildKey:()=>pM,entropyToCip3MasterNode:()=>gM,getDerivationPathWithSeed:()=>fM,mnemonicToSeed:()=>uM,multipathToBip39Mnemonic:()=>dM});var P={};r.r(P),r.d(P,{add:()=>AM,bigIntToBytes:()=>bM,bytesToBigInt:()=>mM,deriveChainCode:()=>WM,deriveChildKey:()=>RM,derivePrivateKey:()=>CM,derivePublicKey:()=>_M,getKeyExtension:()=>EM,mod2Pow256:()=>TM,padEnd32Bytes:()=>wM,toReversed:()=>yM,trunc28Mul8:()=>vM});var B={};r.r(B),r.d(B,{deriveChildKey:()=>kM});var C={};r.r(C),r.d(C,{compressPublicKey:()=>EN,compressedPublicKeyLength:()=>IN,curve:()=>gN,decompressPublicKey:()=>PN,deriveUnhardenedKeys:()=>bN,getPublicKey:()=>TN,isValidPrivateKey:()=>vN,masterNodeGenerationSpec:()=>CN,name:()=>yN,privateKeyLength:()=>BN,publicAdd:()=>AN,publicKeyLength:()=>wN,secret:()=>mN});var I,S=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},W=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};I=new WeakMap;var x,_=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},R=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};function k(e,t){return r=e,Boolean(\"string\"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}x=new WeakMap;class O extends Error{constructor(e){super(e.message),this.code=\"ERR_ASSERTION\"}}function F(e,t=\"Assertion failed.\",r=O){if(!e){if(t instanceof Error)throw t;throw k(r,t)}}function M(e){throw new Error(\"Invalid branch reached. Should be detected during compilation.\")}class N extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...s}=e,{path:i}=e,a=0===i.length?n:`At path: ${i.join(\".\")} -- ${n}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function U(e){return\"object\"==typeof e&&null!==e}function D(e){return\"symbol\"==typeof e?e.toString():\"string\"==typeof e?JSON.stringify(e):`${e}`}function L(e,t,r,n){if(!0===e)return;!1===e?e={}:\"string\"==typeof e&&(e={message:e});const{path:o,branch:s}=t,{type:i}=r,{refinement:a,message:c=`Expected a value of type \\`${i}\\`${a?` with refinement \\`${a}\\``:\"\"}, but received: \\`${D(n)}\\``}=e;return{value:n,type:i,refinement:a,key:o[o.length-1],path:o,branch:s,...e,message:c}}function*$(e,t,r,n){(function(e){return U(e)&&\"function\"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const o of e){const e=L(o,t,r,n);e&&(yield e)}}function*z(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:i=!1}=r,a={path:n,branch:o};if(s&&(e=t.coercer(e,a),i&&\"type\"!==t.type&&U(t.schema)&&U(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c=\"valid\";for(const n of t.validator(e,a))n.explanation=r.message,c=\"not_valid\",yield[n,void 0];for(let[u,l,d]of t.entries(e,a)){const t=z(l,d,{path:void 0===u?n:[...n,u],branch:void 0===u?o:[...o,l],coerce:s,mask:i,message:r.message});for(const r of t)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?\"not_valid\":\"not_refined\",yield[r[0],void 0]):s&&(l=r[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):U(e)&&(void 0!==l||u in e)&&(e[u]=l))}if(\"not_valid\"!==c)for(const n of t.refiner(e,a))n.explanation=r.message,c=\"not_refined\",yield[n,void 0];\"valid\"===c&&(yield[void 0,e])}class j{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:s=e=>e,entries:i=function*(){}}=e;this.type=t,this.schema=r,this.entries=i,this.coercer=s,this.validator=n?(e,t)=>$(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>$(o(e,t),t,this,e):()=>[];for(const t of Object.getOwnPropertySymbols(e))Object.defineProperty(this,t,Object.getOwnPropertyDescriptor(e,t))}assert(e,t){return G(e,this,t)}create(e,t){return K(e,this,t)}is(e){return q(e,this)}mask(e,t){return function(e,t,r){const n=Z(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e,t={}){return Z(e,this,t)}}const V=\"EXACT_OPTIONAL\";class H extends j{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=V}static isExactOptional(e){return U(e)&&\"brand\"in e&&e.brand===V}}function G(e,t,r){const n=Z(e,t,{message:r});if(n[0])throw n[0]}function K(e,t,r){const n=Z(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function q(e,t){return!Z(e,t)[0]}function Z(e,t,r={}){const n=z(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);if(o[0]){return[new N(o[0],function*(){for(const e of n)e[0]&&(yield e[0])}),void 0]}return[void 0,o[1]]}function Y(e){return e instanceof Map||e instanceof Set?e.size:e.length}function J(e,t,r={}){const{exclusive:n}=r;return ee(e,\"min\",r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?\"\":\"or equal to \"}${t} but received \\`${r}\\``)}function X(e){return ee(e,\"nonempty\",t=>Y(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function Q(e,t){return ee(e,\"pattern\",r=>t.test(r)||`Expected a ${e.type} matching \\`/${t.source}/\\` but received \"${r}\"`)}function ee(e,t,r){return new j({...e,*refiner(n,o){yield*e.refiner(n,o);const s=$(r(n,o),o,e,n);for(const e of s)yield{...e,refinement:t}}})}const te=\"***\",re=Symbol.for(\"superstruct.sensitive\");function ne(e,t){const r={...e};for(const e of t)e in r&&(r[e]=te);return r}function oe(e){function*t(t){for(const r of t)yield{...r,value:te,message:`Expected a value of type \\`${e.type}\\`${r.refinement?` with refinement \\`${r.refinement}\\``:\"\"}, but received: \\`${te}\\``,branch:new Array(r.branch.length).fill(te)}}return new j({...e,validator:(r,n)=>t(e.validator(r,n)),refiner:(r,n)=>t(e.refiner(r,n)),*entries(t,r){for(const[n,o,s]of e.entries(t,r))yield[n,o,oe(s)]}})}function se(e,t,r){function*n(e){for(const n of e){if(!U(t)){yield n;continue}const e=n.branch.indexOf(t);if(-1===e){yield n;continue}const o=[...n.branch];o[e]=ne(t,r);for(let t=e-1;t>=0;t--){const e=o[t];if(!U(e))break;const r=n.branch[t+1],s=o[t+1];if(Array.isArray(e)){const n=e.indexOf(r);if(-1===n)break;const i=[...e];i[n]=s,o[t]=i}else if(e instanceof Map){let n,i=!1;for(const[t,o]of e)if(o===r){n=t,i=!0;break}if(!i)break;const a=new Map(e);a.set(n,s),o[t]=a}else{const n=Object.keys(e).find(t=>e[t]===r);if(void 0===n)break;o[t]={...e,[n]:s}}}yield{...n,branch:o}}}return new j({...e,validator:(t,r)=>n(e.validator(t,r)),refiner:(t,r)=>n(e.refiner(t,r)),*entries(n,o){for(const s of e.entries(n,o)){const[e,n,o]=s;yield[e,n,se(o,t,r)]}}})}function ie(e){const t=oe(e);return Object.defineProperty(t,re,{value:!0,enumerable:!0,configurable:!0,writable:!1}),t}function ae(e,t){return new j({type:e,schema:null,validator:t})}function ce(e,t){const r=Object.keys(t).filter(e=>{return void 0!==t[e]&&(r=t[e],Object.prototype.hasOwnProperty.call(r,re));var r});return 0===r.length?e:new j({...e,*entries(t,n){const o=n.branch[n.branch.length-1]??t;for(const s of e.entries(t,n)){const[e,t,n]=s;yield[e,t,se(n,o,r)]}}})}function ue(){return ae(\"any\",()=>!0)}function le(e){return new j({type:\"array\",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${D(e)}`})}function de(){return ae(\"boolean\",e=>\"boolean\"==typeof e)}function fe(e){const t={},r=e.map(e=>D(e)).join();for(const r of e)t[r]=r;return new j({type:\"enums\",schema:t,validator:t=>e.includes(t)||`Expected one of \\`${r}\\`, but received: ${D(t)}`})}function pe(){return ae(\"integer\",e=>\"number\"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${D(e)}`)}function he(e){const t=D(e),r=typeof e;return new j({type:\"literal\",schema:\"string\"===r||\"number\"===r||\"boolean\"===r?e:null,validator:r=>r===e||`Expected the literal \\`${t}\\`, but received: ${D(r)}`})}function ge(){return ae(\"never\",()=>!1)}function ye(e){return new j({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function me(){return ae(\"number\",e=>\"number\"==typeof e&&!isNaN(e)||`Expected a number, but received: ${D(e)}`)}function be(e){const t=e?Object.keys(e):[],r=ge(),n=new j({type:\"object\",schema:e??null,*entries(n){if(e&&U(n)){const o=new Set(Object.keys(n));for(const r of t){o.delete(r);const t=e[r];H.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(n,r)||(yield[r,n[r],e[r]])}for(const e of o)yield[e,n[e],r]}},validator:e=>U(e)||`Expected an object, but received: ${D(e)}`,coercer:e=>U(e)?{...e}:e});return e?ce(n,e):n}function we(e){return new j({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function ve(e){return new H(e)}function Te(e,t){return new j({type:\"record\",schema:null,*entries(r){if(U(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>U(e)||`Expected an object, but received: ${D(e)}`})}function Ae(){return ae(\"string\",e=>\"string\"==typeof e||`Expected a string, but received: ${D(e)}`)}function Ee(e){const t=ge();return new j({type:\"tuple\",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${D(e)}`})}function Pe(e){const t=Object.keys(e);return ce(new j({type:\"type\",schema:e,*entries(r){if(U(r))for(const n of t)H.isExactOptional(e[n])&&!Object.prototype.hasOwnProperty.call(r,n)||(yield[n,r[n],e[n]])},validator:e=>U(e)||`Expected an object, but received: ${D(e)}`,coercer:e=>U(e)?{...e}:e}),e)}function Be(e){const t=e.map(e=>e.type).join(\" | \");return new j({type:\"union\",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=z(r,t,n),[s]=e;if(!s?.[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${D(r)}`,...o]}})}function Ce(){return ae(\"unknown\",()=>!0)}const Ie=ee(Ae(),\"safe-url\",e=>{try{const t=new URL(e),r=[\"http:\",\"https:\",\"wss:\"];if(!r.includes(t.protocol))return`URL must use one of the following protocols: ${r.join(\", \")}`;if(!e.match(/^(https?|wss):\\/\\/[^/]+\\/?/u))return\"Malformed URL - incorrect protocol format\";const n=t.hostname.toLowerCase();if(!(\"localhost\"===n||n.includes(\".\")&&/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/u.test(n)))return\"Invalid hostname format\";const o=decodeURIComponent(e.toLowerCase());if(e.includes(\"\\\\\")||e.includes(\"@\")||o.includes(\"\\\\\")||o.includes(\"@\")||e.toLowerCase().includes(\"%2f@\")||e.toLowerCase().includes(\"%5c@\"))return\"URL contains protocol pollution attempts\";if(e.includes(\"../\")||e.includes(\"..%2f\")||e.includes(\"..%2F\"))return\"Directory traversal attempts are not allowed\";const s=[/<[^>]*>/u,/javascript:/u,/data:/u,/\\\\[@\\\\]/u,/%2f@/u,/[^\\x20-\\x7E]/u,/\\$\\{.*?\\}/u,/#\\{.*?\\}/u,/[|;]/u,/%0[acd]|%0[acd]/u,/\\/\\/\\w+@/u,/(?:[^a-z]|^)(?:union\\s+(?:all\\s+)?select|select\\s+(?:.*\\s+)?from|insert\\s+into|update\\s+.*\\s+set|delete\\s+from|drop\\s+table|alter\\s+table|create\\s+table|exec(?:ute)?|union|where\\s+[\\d\\w]\\s*=\\s*[\\d\\w]|\\bor\\b\\s*[\\d\\w]\\s*=\\s*[\\d\\w])/iu,/'.*?(?:OR|UNION|SELECT|FROM|WHERE).*?'/iu,/%27.*?(?:OR|UNION|SELECT|FROM|WHERE).*?(?:%27|')/iu,/%20(?:OR|UNION|SELECT|FROM|WHERE)%20/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=(?:[^&]*\\/\\/|https?:)/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=%(?:[^&]*\\/\\/|https?:)/iu];for(const e of s)if(e.test(o))return\"URL contains potentially malicious patterns\";return!0}catch(e){return`Invalid URL format: ${e.message}`}});function Se(e){return e&&\"string\"==typeof e?e.replace(/[\\u0000-\\u0008\\u000A-\\u001F\\u007F]/gu,\"\"):\"\"}function We(e){const{baseUrl:t,path:r,pathParams:n,queryParams:o,encodePathParams:s=!0}=e,i=function(e){if(!e||\"string\"!=typeof e)return\"\";const t=Se(e);try{const e=new URL(t);return![\"http:\",\"https:\",\"wss:\",\"ipfs:\"].includes(e.protocol)||t.length>2048?\"\":t}catch{return\"\"}}(t);if(\"\"===i)throw new Error(\"Invalid URL format\");G(i,Ie);const a=r.replace(/\\{(\\w+)\\}/gu,(e,t)=>{const r=n?.[t];if(void 0===r)throw new Error(`Path parameter ${t} is undefined`);const o=Se(r);return s?encodeURIComponent(o):o}).replace(/^\\/+/u,\"\").replace(/\\/+/gu,\"/\").replace(/\\/+$/u,\"\"),c=i.endsWith(\"/\")?i:`${i}/`,u=new URL(a,c);Object.entries(o??{}).filter(([e,t])=>void 0!==t).filter(([e,t])=>null!==t).forEach(([e,t])=>{if(t){const r=Se(t);u.searchParams.append(e,r)}});const l=u.toString();return G(l,Ie),l}function xe(e,t){return ae(e,e=>\"string\"==typeof e&&t.test(e))}const _e=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,Re=/^[-a-z0-9]{3,8}$/u,ke=/^[-_a-zA-Z0-9]{1,32}$/u,Oe=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,Fe=/^[-.%a-zA-Z0-9]{1,128}$/u,Me=/^[-a-z0-9]{3,8}$/u,Ne=/^[-.%a-zA-Z0-9]{1,128}$/u,Ue=/^[-.%a-zA-Z0-9]{1,78}$/u,De=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,Le=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,$e=xe(\"CaipChainId\",_e),ze=(xe(\"CaipNamespace\",Re),xe(\"CaipReference\",ke),xe(\"CaipAccountId\",Oe)),je=(xe(\"CaipAccountAddress\",Fe),xe(\"CaipAssetNamespace\",Me),xe(\"CaipAssetReference\",Ne),xe(\"CaipTokenId\",Ue),xe(\"CaipAssetType\",De)),Ve=xe(\"CaipAssetId\",Le),He=xe(\"CaipAssetTypeOrId\",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u);var Ge;function Ke(e){const t=De.exec(e);if(!t?.groups)throw new Error(\"Invalid CAIP asset type.\");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}!function(e){e.Bip122=\"bip122\",e.Solana=\"solana\",e.Stellar=\"stellar\",e.Tron=\"tron\",e.Eip155=\"eip155\",e.Wallet=\"wallet\"}(Ge=Ge||(Ge={}));var qe,Ze,Ye,Je,Xe,Qe,et=r(5250),tt=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},rt=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};const nt={SILENT:\"silent\",ERROR:\"error\",WARN:\"warn\",INFO:\"info\",DEBUG:\"debug\",TRACE:\"trace\"},ot={[nt.SILENT]:0,[nt.ERROR]:1,[nt.WARN]:2,[nt.INFO]:3,[nt.DEBUG]:4,[nt.TRACE]:5},st=fe(Object.values(nt));class it{constructor({level:e,prefix:t,decorators:r}){qe.add(this),Ze.set(this,void 0),Ye.set(this,void 0),Je.set(this,void 0),G(e,st),tt(this,Ze,e,\"f\"),tt(this,Ye,t,\"f\"),tt(this,Je,r,\"f\")}withPrefix(e){return new it({level:rt(this,Ze,\"f\"),prefix:rt(this,Ye,\"f\")?`${rt(this,Ye,\"f\")} ${e}`:e,decorators:rt(this,Je,\"f\")})}error(...e){rt(this,qe,\"m\",Qe).call(this,nt.ERROR,console.error,e)}warn(...e){rt(this,qe,\"m\",Qe).call(this,nt.WARN,console.warn,e)}log(...e){this.info(...e)}info(...e){rt(this,qe,\"m\",Qe).call(this,nt.INFO,console.info,e)}debug(...e){rt(this,qe,\"m\",Qe).call(this,nt.DEBUG,console.debug,e)}trace(...e){rt(this,qe,\"m\",Qe).call(this,nt.TRACE,console.trace,e)}}var at;function ct(e,t,r){return new j({...e,coercer:(n,o)=>q(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}Ze=new WeakMap,Ye=new WeakMap,Je=new WeakMap,qe=new WeakSet,Xe=function(e){return ot[e]>ot[rt(this,Ze,\"f\")]},Qe=function(e,t,r){if(rt(this,qe,\"m\",Xe).call(this,e))return;const n=rt(this,Ye,\"f\")?(...e)=>t(rt(this,Ye,\"f\"),...e):t,o=rt(this,Je,\"f\")?.[e];o?o(n,...r):n(...r)},function(e){e[e.Millisecond=1]=\"Millisecond\",e[e.Second=1e3]=\"Second\",e[e.Minute=6e4]=\"Minute\",e[e.Hour=36e5]=\"Hour\",e[e.Day=864e5]=\"Day\",e[e.Week=6048e5]=\"Week\",e[e.Year=31536e6]=\"Year\"}(at=at||(at={}));var ut=/^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,lt=Math.ceil,dt=Math.floor,ft=\"[BigNumber Error] \",pt=ft+\"Number primitive has more than 15 significant digits: \",ht=1e14,gt=14,yt=9007199254740991,mt=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],bt=1e7,wt=1e9;function vt(e){var t=0|e;return e>0||e===t?t:t-1}function Tt(e){for(var t,r,n=1,o=e.length,s=e[0]+\"\";n<o;){for(t=e[n++]+\"\",r=gt-t.length;r--;t=\"0\"+t);s+=t}for(o=s.length;48===s.charCodeAt(--o););return s.slice(0,o+1||1)}function At(e,t){var r,n,o=e.c,s=t.c,i=e.s,a=t.s,c=e.e,u=t.e;if(!i||!a)return null;if(r=o&&!o[0],n=s&&!s[0],r||n)return r?n?0:-a:i;if(i!=a)return i;if(r=i<0,n=c==u,!o||!s)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=o.length)<(u=s.length)?c:u,i=0;i<a;i++)if(o[i]!=s[i])return o[i]>s[i]^r?1:-1;return c==u?0:c>u^r?1:-1}function Et(e,t,r,n){if(e<t||e>r||e!==dt(e))throw Error(ft+(n||\"Argument\")+(\"number\"==typeof e?e<t||e>r?\" out of range: \":\" not an integer: \":\" not a primitive number: \")+String(e))}function Pt(e){var t=e.c.length-1;return vt(e.e/gt)==t&&e.c[t]%2!=0}function Bt(e,t){return(e.length>1?e.charAt(0)+\".\"+e.slice(1):e)+(t<0?\"e\":\"e+\")+t}function Ct(e,t,r){var n,o;if(t<0){for(o=r+\".\";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+\".\"+e.slice(t));return e}var It=function e(t){var r,n,o,s,i,a,c,u,l,d,f=C.prototype={constructor:C,toString:null,valueOf:null},p=new C(1),h=20,g=4,y=-7,m=21,b=-1e7,w=1e7,v=!1,T=1,A=0,E={prefix:\"\",groupSize:3,secondaryGroupSize:0,groupSeparator:\",\",decimalSeparator:\".\",fractionGroupSize:0,fractionGroupSeparator:\" \",suffix:\"\"},P=\"0123456789abcdefghijklmnopqrstuvwxyz\",B=!0;function C(e,t){var r,s,i,a,c,u,l,d,f=this;if(!(f instanceof C))return new C(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u=\"number\"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>w?f.c=f.e=null:(f.e=a,f.c=[e]))}d=String(e)}else{if(!ut.test(d=String(e)))return o(f,d,u);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf(\".\"))>-1&&(d=d.replace(\".\",\"\")),(c=d.search(/e/i))>0?(a<0&&(a=c),a+=+d.slice(c+1),d=d.substring(0,c)):a<0&&(a=d.length)}else{if(Et(t,2,P.length,\"Base\"),10==t&&B)return x(f=new C(e),h+f.e+1,g);if(d=String(e),u=\"number\"==typeof e){if(0*e!=0)return o(f,d,u,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,C.DEBUG&&d.replace(/^0\\.0*|\\./,\"\").length>15)throw Error(pt+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=P.slice(0,t),a=c=0,l=d.length;c<l;c++)if(r.indexOf(s=d.charAt(c))<0){if(\".\"==s){if(c>a){a=l;continue}}else if(!i&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){i=!0,c=-1,a=0;continue}return o(f,String(e),u,t)}u=!1,(a=(d=n(d,t,10,f.s)).indexOf(\".\"))>-1?d=d.replace(\".\",\"\"):a=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&C.DEBUG&&l>15&&(e>yt||e!==dt(e)))throw Error(pt+f.s*e);if((a=a-c-1)>w)f.c=f.e=null;else if(a<b)f.c=[f.e=0];else{if(f.e=a,f.c=[],c=(a+1)%gt,a<0&&(c+=gt),c<l){for(c&&f.c.push(+d.slice(0,c)),l-=gt;c<l;)f.c.push(+d.slice(c,c+=gt));c=gt-(d=d.slice(c)).length}else c-=l;for(;c--;d+=\"0\");f.c.push(+d)}}else f.c=[f.e=0]}function I(e,t,r,n){var o,s,i,a,c;if(null==r?r=g:Et(r,0,8),!e.c)return e.toString();if(o=e.c[0],i=e.e,null==t)c=Tt(e.c),c=1==n||2==n&&(i<=y||i>=m)?Bt(c,i):Ct(c,i,\"0\");else if(s=(e=x(new C(e),t,r)).e,a=(c=Tt(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;a<t;c+=\"0\",a++);c=Bt(c,s)}else if(t-=i+(2===n&&s>i),c=Ct(c,s,\"0\"),s+1>a){if(--t>0)for(c+=\".\";t--;c+=\"0\");}else if((t+=s-a)>0)for(s+1==a&&(c+=\".\");t--;c+=\"0\");return e.s<0&&o?\"-\"+c:c}function S(e,t){for(var r,n,o=1,s=new C(e[0]);o<e.length;o++)(!(n=new C(e[o])).s||(r=At(s,n))===t||0===r&&s.s===t)&&(s=n);return s}function W(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*gt-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function x(e,t,r,n){var o,s,i,a,c,u,l,d=e.c,f=mt;if(d){e:{for(o=1,a=d[0];a>=10;a/=10,o++);if((s=t-o)<0)s+=gt,i=t,c=d[u=0],l=dt(c/f[o-i-1]%10);else if((u=lt((s+1)/gt))>=d.length){if(!n)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,i=(s%=gt)-gt+1}else{for(c=a=d[u],o=1;a>=10;a/=10,o++);l=(i=(s%=gt)-gt+o)<0?0:dt(c/f[o-i-1]%10)}if(n=n||t<0||null!=d[u+1]||(i<0?c:c%f[o-i-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?i>0?c/f[o-i]:0:d[u-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=f[(gt-t%gt)%gt],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=u,a=1,u--):(d.length=u+1,a=f[gt-s],d[u]=i>0?dt(c/f[o-i]%f[i])*a:0),n)for(;;){if(0==u){for(s=1,i=d[0];i>=10;i/=10,s++);for(i=d[0]+=a,a=1;i>=10;i/=10,a++);s!=a&&(e.e++,d[0]==ht&&(d[0]=1));break}if(d[u]+=a,d[u]!=ht)break;d[u--]=0,a=1}for(s=d.length;0===d[--s];d.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function _(e){var t,r=e.e;return null===r?e.toString():(t=Tt(e.c),t=r<=y||r>=m?Bt(t,r):Ct(t,r,\"0\"),e.s<0?\"-\"+t:t)}return C.clone=e,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(e){var t,r;if(null!=e){if(\"object\"!=typeof e)throw Error(ft+\"Object expected: \"+e);if(e.hasOwnProperty(t=\"DECIMAL_PLACES\")&&(Et(r=e[t],0,wt,t),h=r),e.hasOwnProperty(t=\"ROUNDING_MODE\")&&(Et(r=e[t],0,8,t),g=r),e.hasOwnProperty(t=\"EXPONENTIAL_AT\")&&((r=e[t])&&r.pop?(Et(r[0],-wt,0,t),Et(r[1],0,wt,t),y=r[0],m=r[1]):(Et(r,-wt,wt,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t=\"RANGE\"))if((r=e[t])&&r.pop)Et(r[0],-wt,-1,t),Et(r[1],1,wt,t),b=r[0],w=r[1];else{if(Et(r,-wt,wt,t),!r)throw Error(ft+t+\" cannot be zero: \"+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t=\"CRYPTO\")){if((r=e[t])!==!!r)throw Error(ft+t+\" not true or false: \"+r);if(r){if(\"undefined\"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(ft+\"crypto unavailable\");v=r}else v=r}if(e.hasOwnProperty(t=\"MODULO_MODE\")&&(Et(r=e[t],0,9,t),T=r),e.hasOwnProperty(t=\"POW_PRECISION\")&&(Et(r=e[t],0,wt,t),A=r),e.hasOwnProperty(t=\"FORMAT\")){if(\"object\"!=typeof(r=e[t]))throw Error(ft+t+\" not an object: \"+r);E=r}if(e.hasOwnProperty(t=\"ALPHABET\")){if(\"string\"!=typeof(r=e[t])||/^.?$|[+\\-.\\s]|(.).*\\1/.test(r))throw Error(ft+t+\" invalid: \"+r);B=\"0123456789\"==r.slice(0,10),P=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,m],RANGE:[b,w],CRYPTO:v,MODULO_MODE:T,POW_PRECISION:A,FORMAT:E,ALPHABET:P}},C.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!C.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if(\"[object Array]\"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-wt&&o<=wt&&o===dt(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%gt)<1&&(t+=gt),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=ht||r!==dt(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(ft+\"Invalid BigNumber: \"+e)},C.maximum=C.max=function(){return S(arguments,-1)},C.minimum=C.min=function(){return S(arguments,1)},C.random=(s=9007199254740992,i=Math.random()*s&2097151?function(){return dt(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,a=0,c=[],u=new C(p);if(null==e?e=h:Et(e,0,wt),o=lt(e/gt),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)(s=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(s%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(ft+\"crypto unavailable\");for(t=crypto.randomBytes(o*=7);a<o;)(s=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(c.push(s%1e14),a+=7);a=o/7}if(!v)for(;a<o;)(s=i())<9e15&&(c[a++]=s%1e14);for(o=c[--a],e%=gt,o&&e&&(s=mt[gt-e],c[a]=dt(o/s)*s);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=gt);for(a=1,s=c[0];s>=10;s/=10,a++);a<gt&&(n-=gt-a)}return u.e=n,u.c=c,u}),C.sum=function(){for(var e=1,t=arguments,r=new C(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e=\"0123456789\";function t(e,t,r,n){for(var o,s,i=[0],a=0,c=e.length;a<c;){for(s=i.length;s--;i[s]*=t);for(i[0]+=n.indexOf(e.charAt(a++)),o=0;o<i.length;o++)i[o]>r-1&&(null==i[o+1]&&(i[o+1]=0),i[o+1]+=i[o]/r|0,i[o]%=r)}return i.reverse()}return function(n,o,s,i,a){var c,u,l,d,f,p,y,m,b=n.indexOf(\".\"),w=h,v=g;for(b>=0&&(d=A,A=0,n=n.replace(\".\",\"\"),p=(m=new C(o)).pow(n.length-b),A=d,m.c=t(Ct(Tt(p.c),p.e,\"0\"),10,s,e),m.e=m.c.length),l=d=(y=t(n,o,s,a?(c=P,e):(c=e,P))).length;0==y[--d];y.pop());if(!y[0])return c.charAt(0);if(b<0?--l:(p.c=y,p.e=l,p.s=i,y=(p=r(p,m,w,v,s)).c,f=p.r,l=p.e),b=y[u=l+w+1],d=s/2,f=f||u<0||null!=y[u+1],f=v<4?(null!=b||f)&&(0==v||v==(p.s<0?3:2)):b>d||b==d&&(4==v||f||6==v&&1&y[u-1]||v==(p.s<0?8:7)),u<1||!y[0])n=f?Ct(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,f)for(--s;++y[--u]>s;)y[u]=0,u||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(b=0,n=\"\";b<=d;n+=c.charAt(y[b++]));n=Ct(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,i,a=0,c=e.length,u=t%bt,l=t/bt|0;for(e=e.slice();c--;)a=((o=u*(s=e[c]%bt)+(n=l*s+(i=e[c]/bt|0)*u)%bt*bt+a)/r|0)+(n/bt|0)+l*i,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;o<r;o++)if(e[o]!=t[o]){s=e[o]>t[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,s,i,a){var c,u,l,d,f,p,h,g,y,m,b,w,v,T,A,E,P,B=n.s==o.s?1:-1,I=n.c,S=o.c;if(!(I&&I[0]&&S&&S[0]))return new C(n.s&&o.s&&(I?!S||I[0]!=S[0]:S)?I&&0==I[0]||!S?0*B:B/0:NaN);for(y=(g=new C(B)).c=[],B=s+(u=n.e-o.e)+1,a||(a=ht,u=vt(n.e/gt)-vt(o.e/gt),B=B/gt|0),l=0;S[l]==(I[l]||0);l++);if(S[l]>(I[l]||0)&&u--,B<0)y.push(1),d=!0;else{for(T=I.length,E=S.length,l=0,B+=2,(f=dt(a/(S[0]+1)))>1&&(S=e(S,f,a),I=e(I,f,a),E=S.length,T=I.length),v=E,b=(m=I.slice(0,E)).length;b<E;m[b++]=0);P=S.slice(),P=[0].concat(P),A=S[0],S[1]>=a/2&&A++;do{if(f=0,(c=t(S,m,E,b))<0){if(w=m[0],E!=b&&(w=w*a+(m[1]||0)),(f=dt(w/A))>1)for(f>=a&&(f=a-1),h=(p=e(S,f,a)).length,b=m.length;1==t(p,m,h,b);)f--,r(p,E<h?P:S,h,a),h=p.length,c=1;else 0==f&&(c=f=1),h=(p=S.slice()).length;if(h<b&&(p=[0].concat(p)),r(m,p,b,a),b=m.length,-1==c)for(;t(S,m,E,b)<1;)f++,r(m,E<b?P:S,b,a),b=m.length}else 0===c&&(f++,m=[0]);y[l++]=f,m[0]?m[b++]=I[v]||0:(m=[I[v]],b=1)}while((v++<T||null!=m[0])&&B--);d=null!=m[0],y[0]||y.splice(0,1)}if(a==ht){for(l=1,B=y[0];B>=10;B/=10,l++);x(g,s+(g.e=l+u*gt-1)+1,i,d)}else g.e=u,g.r=+d;return g}}(),a=/^(-?)0([xbo])(?=\\w[\\w.]*$)/i,c=/^([^.]+)\\.$/,u=/^\\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,\"\");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(a,function(e,t,r){return o=\"x\"==(r=r.toLowerCase())?16:\"b\"==r?2:8,n&&n!=o?e:t}),n&&(o=n,s=s.replace(c,\"$1\").replace(u,\"0.$1\")),t!=s))return new C(s,o);if(C.DEBUG)throw Error(ft+\"Not a\"+(n?\" base \"+n:\"\")+\" number: \"+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new C(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return At(this,new C(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,s=this;if(null!=e)return Et(e,0,wt),null==t?t=g:Et(t,0,8),x(new C(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-vt(this.e/gt))*gt,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new C(e,t),h,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new C(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,s,i,a,c,u,l=this;if((e=new C(e)).c&&!e.isInteger())throw Error(ft+\"Exponent not an integer: \"+_(e));if(null!=t&&(t=new C(t)),i=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new C(Math.pow(+_(l),i?e.s*(2-Pt(e)):+_(e))),t?u.mod(t):u;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new C(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||i&&l.c[1]>=24e7:l.c[0]<8e13||i&&l.c[0]<=9999975e7)))return s=l.s<0&&Pt(e)?-0:0,l.e>-1&&(s=1/s),new C(a?1/s:s);A&&(s=lt(A/gt+2))}for(i?(r=new C(.5),a&&(e.s=1),c=Pt(e)):c=(o=Math.abs(+_(e)))%2,u=new C(p);;){if(c){if(!(u=u.times(l)).c)break;s?u.c.length>s&&(u.c.length=s):n&&(u=u.mod(t))}if(o){if(0===(o=dt(o/2)))break;c=o%2}else if(x(e=e.times(r),e.e+1,1),e.e>14)c=Pt(e);else{if(0===(o=+_(e)))break;c=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?u:(a&&(u=p.div(u)),t?u.mod(t):s?x(u,A,g,void 0):u)},f.integerValue=function(e){var t=new C(this);return null==e?e=g:Et(e,0,8),x(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===At(this,new C(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return At(this,new C(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=At(this,new C(e,t)))||0===t},f.isInteger=function(){return!!this.c&&vt(this.e/gt)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return At(this,new C(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=At(this,new C(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,s,i=this,a=i.s;if(t=(e=new C(e,t)).s,!a||!t)return new C(NaN);if(a!=t)return e.s=-t,i.plus(e);var c=i.e/gt,u=e.e/gt,l=i.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new C(d?i:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new C(l[0]?i:3==g?-0:0)}if(c=vt(c),u=vt(u),l=l.slice(),a=c-u){for((s=a<0)?(a=-a,o=l):(u=c,o=d),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(s=(a=l.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(o=l,l=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=ht-1;n>a;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=ht}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?W(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o,s=this;return e=new C(e,t),!s.c||!e.s||e.c&&!e.c[0]?new C(NaN):!e.c||s.c&&!s.c[0]?new C(s):(9==T?(o=e.s,e.s=1,n=r(s,e,0,3),e.s=o,n.s*=o):n=r(s,e,0,T),(e=s.minus(n.times(e))).c[0]||1!=T||(e.s=s.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,s,i,a,c,u,l,d,f,p,h,g,y,m=this,b=m.c,w=(e=new C(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=vt(m.e/gt)+vt(e.e/gt),e.s*=m.s,(c=b.length)<(d=w.length)&&(h=b,b=w,w=h,o=c,c=d,d=o),o=c+d,h=[];o--;h.push(0));for(g=ht,y=bt,o=d;--o>=0;){for(r=0,f=w[o]%y,p=w[o]/y|0,s=o+(i=c);s>o;)r=((u=f*(u=b[--i]%y)+(a=p*u+(l=b[i]/y|0)*f)%y*y+h[s]+r)/g|0)+(a/y|0)+p*l,h[s--]=u%g;h[s]=r}return r?++n:h.splice(0,1),W(e,h,n)},f.negated=function(){var e=new C(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new C(e,t)).s,!o||!t)return new C(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/gt,i=e.e/gt,a=n.c,c=e.c;if(!s||!i){if(!a||!c)return new C(o/0);if(!a[0]||!c[0])return c[0]?e:new C(a[0]?n:0*o)}if(s=vt(s),i=vt(i),a=a.slice(),o=s-i){for(o>0?(i=s,r=c):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+c[t]+o)/ht|0,a[t]=ht===a[t]?0:a[t]%ht;return o&&(a=[o].concat(a),++i),W(e,a,i)},f.precision=f.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return Et(e,1,wt),null==t?t=g:Et(t,0,8),x(new C(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*gt+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(e){return Et(e,-9007199254740991,yt),this.times(\"1e\"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,s,i=this,a=i.c,c=i.s,u=i.e,l=h+4,d=new C(\"0.5\");if(1!==c||!a||!a[0])return new C(!c||c<0&&(!a||a[0])?NaN:a?i:1/0);if(0==(c=Math.sqrt(+_(i)))||c==1/0?(((t=Tt(a)).length+u)%2==0&&(t+=\"0\"),c=Math.sqrt(+t),u=vt((u+1)/2)-(u<0||u%2),n=new C(t=c==1/0?\"5e\"+u:(t=c.toExponential()).slice(0,t.indexOf(\"e\")+1)+u)):n=new C(c+\"\"),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(s=n,n=d.times(s.plus(r(i,s,l,1))),Tt(s.c).slice(0,c)===(t=Tt(n.c)).slice(0,c)){if(n.e<u&&--c,\"9999\"!=(t=t.slice(c-3,c+1))&&(o||\"4999\"!=t)){+t&&(+t.slice(1)||\"5\"!=t.charAt(0))||(x(n,n.e+h+2,1),e=!n.times(n).eq(i));break}if(!o&&(x(s,s.e+h+2,0),s.times(s).eq(i))){n=s;break}l+=4,c+=4,o=1}return x(n,n.e+h+1,g,e)},f.toExponential=function(e,t){return null!=e&&(Et(e,0,wt),e++),I(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(Et(e,0,wt),e=e+this.e+1),I(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&\"object\"==typeof t?(r=t,t=null):e&&\"object\"==typeof e?(r=e,e=t=null):r=E;else if(\"object\"!=typeof r)throw Error(ft+\"Argument not an object: \"+r);if(n=o.toFixed(e,t),o.c){var s,i=n.split(\".\"),a=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||\"\",l=i[0],d=i[1],f=o.s<0,p=f?l.slice(1):l,h=p.length;if(c&&(s=a,a=c,c=s,h-=s),a>0&&h>0){for(s=h%a||a,l=p.substr(0,s);s<h;s+=a)l+=u+p.substr(s,a);c>0&&(l+=u+p.slice(s)),f&&(l=\"-\"+l)}n=d?l+(r.decimalSeparator||\"\")+((c=+r.fractionGroupSize)?d.replace(new RegExp(\"\\\\d{\"+c+\"}\\\\B\",\"g\"),\"$&\"+(r.fractionGroupSeparator||\"\")):d):l}return(r.prefix||\"\")+n+(r.suffix||\"\")},f.toFraction=function(e){var t,n,o,s,i,a,c,u,l,d,f,h,y=this,m=y.c;if(null!=e&&(!(c=new C(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(ft+\"Argument \"+(c.isInteger()?\"out of range: \":\"not an integer: \")+_(c));if(!m)return new C(y);for(t=new C(p),l=n=new C(p),o=u=new C(p),h=Tt(m),i=t.e=h.length-y.e-1,t.c[0]=mt[(a=i%gt)<0?gt+a:a],e=!e||c.comparedTo(t)>0?i>0?t:l:c,a=w,w=1/0,c=new C(h),u.c[0]=0;d=r(c,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=u.plus(d.times(s=l)),u=s,t=c.minus(d.times(s=t)),c=s;return s=r(e.minus(n),o,0,1),u=u.plus(s.times(l)),n=n.plus(s.times(o)),u.s=l.s=y.s,f=r(l,o,i*=2,g).minus(y).abs().comparedTo(r(u,n,i,g).minus(y).abs())<1?[l,o]:[u,n],w=a,f},f.toNumber=function(){return+_(this)},f.toPrecision=function(e,t){return null!=e&&Et(e,1,wt),I(this,e,t,2)},f.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t=\"Infinity\",o<0&&(t=\"-\"+t)):t=\"NaN\":(null==e?t=s<=y||s>=m?Bt(Tt(r.c),s):Ct(Tt(r.c),s,\"0\"):10===e&&B?t=Ct(Tt((r=x(new C(r),h+s+1,g)).c),r.e,\"0\"):(Et(e,2,P.length,\"Base\"),t=n(Ct(Tt(r.c),s,\"0\"),10,e,o,!0)),o<0&&r.c[0]&&(t=\"-\"+t)),t},f.valueOf=f.toJSON=function(){return _(this)},f._isBigNumber=!0,f[Symbol.toStringTag]=\"BigNumber\",f[Symbol.for(\"nodejs.util.inspect.custom\")]=f.valueOf,null!=t&&C.set(t),C}();const St=It(0),Wt=(It(1),It(1)),xt=1e6,_t=1e3,Rt=9999e6,kt=101e6,Ot=\"PT3S\",Ft={Mainnet:\"tron:728126428\",Nile:\"tron:3448148188\",Shasta:\"tron:2494104990\"},Mt={TrxMainnet:`${Ft.Mainnet}/slip44:195`,TrxNile:`${Ft.Nile}/slip44:195`,TrxShasta:`${Ft.Shasta}/slip44:195`,UsdtMainnet:`${Ft.Mainnet}/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t`,TrxStakedForBandwidthMainnet:`${Ft.Mainnet}/slip44:195-staked-for-bandwidth`,TrxStakedForBandwidthNile:`${Ft.Nile}/slip44:195-staked-for-bandwidth`,TrxStakedForBandwidthShasta:`${Ft.Shasta}/slip44:195-staked-for-bandwidth`,TrxStakedForEnergyMainnet:`${Ft.Mainnet}/slip44:195-staked-for-energy`,TrxStakedForEnergyNile:`${Ft.Nile}/slip44:195-staked-for-energy`,TrxStakedForEnergyShasta:`${Ft.Shasta}/slip44:195-staked-for-energy`,TrxReadyForWithdrawalMainnet:`${Ft.Mainnet}/slip44:195-ready-for-withdrawal`,TrxReadyForWithdrawalNile:`${Ft.Nile}/slip44:195-ready-for-withdrawal`,TrxReadyForWithdrawalShasta:`${Ft.Shasta}/slip44:195-ready-for-withdrawal`,TrxStakingRewardsMainnet:`${Ft.Mainnet}/slip44:195-staking-rewards`,TrxStakingRewardsNile:`${Ft.Nile}/slip44:195-staking-rewards`,TrxStakingRewardsShasta:`${Ft.Shasta}/slip44:195-staking-rewards`,TrxInLockPeriodMainnet:`${Ft.Mainnet}/slip44:195-in-lock-period`,TrxInLockPeriodNile:`${Ft.Nile}/slip44:195-in-lock-period`,TrxInLockPeriodShasta:`${Ft.Shasta}/slip44:195-in-lock-period`,EnergyMainnet:`${Ft.Mainnet}/slip44:energy`,EnergyNile:`${Ft.Nile}/slip44:energy`,EnergyShasta:`${Ft.Shasta}/slip44:energy`,MaximumEnergyMainnet:`${Ft.Mainnet}/slip44:maximum-energy`,MaximumEnergyNile:`${Ft.Nile}/slip44:maximum-energy`,MaximumEnergyShasta:`${Ft.Shasta}/slip44:maximum-energy`,BandwidthMainnet:`${Ft.Mainnet}/slip44:bandwidth`,BandwidthNile:`${Ft.Nile}/slip44:bandwidth`,BandwidthShasta:`${Ft.Shasta}/slip44:bandwidth`,MaximumBandwidthMainnet:`${Ft.Mainnet}/slip44:maximum-bandwidth`,MaximumBandwidthNile:`${Ft.Nile}/slip44:maximum-bandwidth`,MaximumBandwidthShasta:`${Ft.Shasta}/slip44:maximum-bandwidth`},Nt={fungible:!0,name:\"Tron\",symbol:\"TRX\",decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Ut={name:\"Staked for Bandwidth\",symbol:\"sTRX-BANDWIDTH\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Dt={name:\"Staked for Energy\",symbol:\"sTRX-ENERGY\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Lt={name:\"Ready for Withdrawal\",symbol:\"trx-ready-for-withdrawal\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},$t={name:\"Staking Rewards\",symbol:\"trx-staking-rewards\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},zt={name:\"In Lock Period\",symbol:\"trx-in-lock-period\",fungible:!0,decimals:6,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},jt={name:\"Bandwidth\",symbol:\"BANDWIDTH\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Vt={name:\"Max Bandwidth\",symbol:\"MAX-BANDWIDTH\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Ht={name:\"Energy\",symbol:\"ENERGY\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Gt={name:\"Max Energy\",symbol:\"MAX-ENERGY\",fungible:!0,decimals:0,iconUrl:\"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png\"},Kt={[Mt.TrxMainnet]:{id:Mt.TrxMainnet,...Nt},[Mt.TrxNile]:{id:Mt.TrxNile,...Nt},[Mt.TrxShasta]:{id:Mt.TrxShasta,...Nt},[Mt.TrxStakedForBandwidthMainnet]:{id:Mt.TrxStakedForBandwidthMainnet,...Ut},[Mt.TrxStakedForBandwidthNile]:{id:Mt.TrxStakedForBandwidthNile,...Ut},[Mt.TrxStakedForBandwidthShasta]:{id:Mt.TrxStakedForBandwidthShasta,...Ut},[Mt.TrxStakedForEnergyMainnet]:{id:Mt.TrxStakedForEnergyMainnet,...Dt},[Mt.TrxStakedForEnergyNile]:{id:Mt.TrxStakedForEnergyNile,...Dt},[Mt.TrxStakedForEnergyShasta]:{id:Mt.TrxStakedForEnergyShasta,...Dt},[Mt.TrxReadyForWithdrawalMainnet]:{id:Mt.TrxReadyForWithdrawalMainnet,...Lt},[Mt.TrxReadyForWithdrawalNile]:{id:Mt.TrxReadyForWithdrawalNile,...Lt},[Mt.TrxReadyForWithdrawalShasta]:{id:Mt.TrxReadyForWithdrawalShasta,...Lt},[Mt.TrxStakingRewardsMainnet]:{id:Mt.TrxStakingRewardsMainnet,...$t},[Mt.TrxStakingRewardsNile]:{id:Mt.TrxStakingRewardsNile,...$t},[Mt.TrxStakingRewardsShasta]:{id:Mt.TrxStakingRewardsShasta,...$t},[Mt.TrxInLockPeriodMainnet]:{id:Mt.TrxInLockPeriodMainnet,...zt},[Mt.TrxInLockPeriodNile]:{id:Mt.TrxInLockPeriodNile,...zt},[Mt.TrxInLockPeriodShasta]:{id:Mt.TrxInLockPeriodShasta,...zt},[Mt.BandwidthMainnet]:{id:Mt.BandwidthMainnet,...jt},[Mt.BandwidthNile]:{id:Mt.BandwidthNile,...jt},[Mt.BandwidthShasta]:{id:Mt.BandwidthShasta,...jt},[Mt.MaximumBandwidthMainnet]:{id:Mt.MaximumBandwidthMainnet,...Vt},[Mt.MaximumBandwidthNile]:{id:Mt.MaximumBandwidthNile,...Vt},[Mt.MaximumBandwidthShasta]:{id:Mt.MaximumBandwidthShasta,...Vt},[Mt.EnergyMainnet]:{id:Mt.EnergyMainnet,...Ht},[Mt.EnergyNile]:{id:Mt.EnergyNile,...Ht},[Mt.EnergyShasta]:{id:Mt.EnergyShasta,...Ht},[Mt.MaximumEnergyMainnet]:{id:Mt.MaximumEnergyMainnet,...Gt},[Mt.MaximumEnergyNile]:{id:Mt.MaximumEnergyNile,...Gt},[Mt.MaximumEnergyShasta]:{id:Mt.MaximumEnergyShasta,...Gt}},qt={[Ft.Mainnet]:{caip2Id:Ft.Mainnet,cluster:\"mainnet\",name:\"Tron Mainnet\",nativeToken:Kt[Mt.TrxMainnet],stakedForBandwidth:Kt[Mt.TrxStakedForBandwidthMainnet],stakedForEnergy:Kt[Mt.TrxStakedForEnergyMainnet],readyForWithdrawal:Kt[Mt.TrxReadyForWithdrawalMainnet],stakingRewards:Kt[Mt.TrxStakingRewardsMainnet],inLockPeriod:Kt[Mt.TrxInLockPeriodMainnet],bandwidth:Kt[Mt.BandwidthMainnet],maximumBandwidth:Kt[Mt.MaximumBandwidthMainnet],energy:Kt[Mt.EnergyMainnet],maximumEnergy:Kt[Mt.MaximumEnergyMainnet]},[Ft.Nile]:{caip2Id:Ft.Nile,cluster:\"devnet\",name:\"Tron Nile\",nativeToken:Kt[Mt.TrxNile],stakedForBandwidth:Kt[Mt.TrxStakedForBandwidthNile],stakedForEnergy:Kt[Mt.TrxStakedForEnergyNile],readyForWithdrawal:Kt[Mt.TrxReadyForWithdrawalNile],stakingRewards:Kt[Mt.TrxStakingRewardsNile],inLockPeriod:Kt[Mt.TrxInLockPeriodNile],bandwidth:Kt[Mt.BandwidthNile],maximumBandwidth:Kt[Mt.MaximumBandwidthNile],energy:Kt[Mt.EnergyNile],maximumEnergy:Kt[Mt.MaximumEnergyNile]},[Ft.Shasta]:{caip2Id:Ft.Shasta,cluster:\"testnet\",name:\"Tron Shasta\",nativeToken:Kt[Mt.TrxShasta],stakedForBandwidth:Kt[Mt.TrxStakedForBandwidthShasta],stakedForEnergy:Kt[Mt.TrxStakedForEnergyShasta],readyForWithdrawal:Kt[Mt.TrxReadyForWithdrawalShasta],stakingRewards:Kt[Mt.TrxStakingRewardsShasta],inLockPeriod:Kt[Mt.TrxInLockPeriodShasta],bandwidth:Kt[Mt.BandwidthShasta],maximumBandwidth:Kt[Mt.MaximumBandwidthShasta],energy:Kt[Mt.EnergyShasta],maximumEnergy:Kt[Mt.MaximumEnergyShasta]}},Zt=[Mt.TrxStakedForBandwidthMainnet,Mt.TrxStakedForBandwidthNile,Mt.TrxStakedForBandwidthShasta,Mt.TrxStakedForEnergyMainnet,Mt.TrxStakedForEnergyNile,Mt.TrxStakedForEnergyShasta,Mt.TrxReadyForWithdrawalMainnet,Mt.TrxReadyForWithdrawalNile,Mt.TrxReadyForWithdrawalShasta,Mt.TrxStakingRewardsMainnet,Mt.TrxStakingRewardsNile,Mt.TrxStakingRewardsShasta,Mt.TrxInLockPeriodMainnet,Mt.TrxInLockPeriodNile,Mt.TrxInLockPeriodShasta,Mt.BandwidthMainnet,Mt.BandwidthNile,Mt.BandwidthShasta,Mt.MaximumBandwidthMainnet,Mt.MaximumBandwidthNile,Mt.MaximumBandwidthShasta,Mt.EnergyMainnet,Mt.EnergyNile,Mt.EnergyShasta,Mt.MaximumEnergyMainnet,Mt.MaximumEnergyNile,Mt.MaximumEnergyShasta],Yt=[Mt.TrxMainnet,Mt.TrxNile,Mt.TrxShasta,...Zt],Jt={production:[Ft.Mainnet],local:[Ft.Mainnet],test:[Ft.Mainnet]},Xt=ct(le(Ie),Ae(),e=>e.split(\",\")),Qt=be({ENVIRONMENT:fe([\"local\",\"test\",\"production\"]),LOG_LEVEL:fe(Object.values(nt)),RPC_URL_LIST_MAINNET:Xt,RPC_URL_LIST_NILE_TESTNET:Xt,RPC_URL_LIST_SHASTA_TESTNET:Xt,EXPLORER_MAINNET_BASE_URL:Ie,EXPLORER_NILE_BASE_URL:Ie,EXPLORER_SHASTA_BASE_URL:Ie,PRICE_API_BASE_URL:Ie,TOKEN_API_BASE_URL:Ie,STATIC_API_BASE_URL:Ie,SECURITY_ALERTS_API_BASE_URL:Ie,NFT_API_BASE_URL:Ie,LOCAL_API_BASE_URL:Ae(),TRONGRID_BASE_URL_MAINNET:Ie,TRONGRID_BASE_URL_NILE:Ie,TRONGRID_BASE_URL_SHASTA:Ie,TRON_HTTP_BASE_URL_MAINNET:Ie,TRON_HTTP_BASE_URL_NILE:Ie,TRON_HTTP_BASE_URL_SHASTA:Ie});class er{#e;constructor(){const e=this.#t();this.#e=this.#r(e)}#t(){return K({ENVIRONMENT:\"production\",LOG_LEVEL:\"silent\",RPC_URL_LIST_MAINNET:\"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",RPC_URL_LIST_NILE_TESTNET:\"https://nile.trongrid.io\",RPC_URL_LIST_SHASTA_TESTNET:\"https://api.shasta.trongrid.io/jsonrpc\",EXPLORER_MAINNET_BASE_URL:\"https://tronscan.org\",EXPLORER_NILE_BASE_URL:\"https://nile.tronscan.org\",EXPLORER_SHASTA_BASE_URL:\"https://shasta.tronscan.org\",PRICE_API_BASE_URL:\"https://price.api.cx.metamask.io\",TOKEN_API_BASE_URL:\"https://tokens.api.cx.metamask.io\",STATIC_API_BASE_URL:\"https://static.cx.metamask.io\",SECURITY_ALERTS_API_BASE_URL:\"https://security-alerts.api.cx.metamask.io\",NFT_API_BASE_URL:\"https://nft.api.cx.metamask.io\",LOCAL_API_BASE_URL:\"http://localhost:8899\",TRONGRID_BASE_URL_MAINNET:\"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",TRONGRID_BASE_URL_NILE:\"https://nile.api.trongrid.io\",TRONGRID_BASE_URL_SHASTA:\"https://shasta.api.trongrid.io\",TRON_HTTP_BASE_URL_MAINNET:\"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d\",TRON_HTTP_BASE_URL_NILE:\"https://nile.trongrid.io\",TRON_HTTP_BASE_URL_SHASTA:\"https://shasta.trongrid.io\"},Qt)}#r(e){return{environment:e.ENVIRONMENT,logLevel:e.LOG_LEVEL,networks:[{...qt[Ft.Mainnet],rpcUrls:e.RPC_URL_LIST_MAINNET,explorerBaseUrl:e.EXPLORER_MAINNET_BASE_URL},{...qt[Ft.Nile],rpcUrls:e.RPC_URL_LIST_NILE_TESTNET,explorerBaseUrl:e.EXPLORER_NILE_BASE_URL},{...qt[Ft.Shasta],rpcUrls:e.RPC_URL_LIST_SHASTA_TESTNET,explorerBaseUrl:e.EXPLORER_SHASTA_BASE_URL}],activeNetworks:Jt[e.ENVIRONMENT],priceApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.PRICE_API_BASE_URL,chunkSize:50,cacheTtlsMilliseconds:{fiatExchangeRates:at.Minute,spotPrices:at.Minute,historicalPrices:at.Minute}},tokenApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.TOKEN_API_BASE_URL,chunkSize:50},staticApi:{baseUrl:e.STATIC_API_BASE_URL},transactions:{storageLimit:10},securityAlertsApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.SECURITY_ALERTS_API_BASE_URL},nftApi:{baseUrl:\"test\"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.NFT_API_BASE_URL,cacheTtlsMilliseconds:{listAddressSolanaNfts:at.Minute,getNftMetadata:at.Minute}},trongridApi:{baseUrls:{[Ft.Mainnet]:e.TRONGRID_BASE_URL_MAINNET,[Ft.Nile]:e.TRONGRID_BASE_URL_NILE,[Ft.Shasta]:e.TRONGRID_BASE_URL_SHASTA}},tronHttpApi:{baseUrls:{[Ft.Mainnet]:e.TRON_HTTP_BASE_URL_MAINNET,[Ft.Nile]:e.TRON_HTTP_BASE_URL_NILE,[Ft.Shasta]:e.TRON_HTTP_BASE_URL_SHASTA}}}}get(){return this.#e}getNetworkBy(e,t){const r=this.get().networks.find(r=>r[e]===t);if(!r)throw new Error(`Network ${e} not found`);return r}}const tr=new er,rr=new it({level:tr.get().logLevel}),nr=new it({level:nt.SILENT}),or=rr,sr=(e,t)=>`${e}:${t.map(e=>JSON.stringify(e)).join(\":\")}`,ir=Be([fe([\"btc\",\"eth\",\"ltc\",\"bch\",\"bnb\",\"eos\",\"xrp\",\"xlm\",\"link\",\"dot\",\"yfi\",\"bits\",\"sats\",\"sol\",\"sei\",\"sonic\"]),fe([\"usd\",\"aed\",\"amd\",\"ars\",\"aud\",\"bam\",\"bdt\",\"bhd\",\"bmd\",\"brl\",\"cad\",\"chf\",\"clp\",\"cny\",\"cop\",\"crc\",\"czk\",\"dkk\",\"dop\",\"eur\",\"gbp\",\"gel\",\"gtq\",\"hkd\",\"hnl\",\"huf\",\"idr\",\"ils\",\"inr\",\"jpy\",\"kes\",\"krw\",\"kwd\",\"lbp\",\"lkr\",\"mmk\",\"mxn\",\"myr\",\"ngn\",\"nok\",\"nzd\",\"pen\",\"php\",\"pkr\",\"pln\",\"ron\",\"rub\",\"sar\",\"sek\",\"sgd\",\"svc\",\"thb\",\"try\",\"twd\",\"uah\",\"vef\",\"vnd\",\"xdr\",\"zar\",\"zmw\"]),fe([\"xag\",\"xau\"])]),ar=Te(ir,be({name:Ae(),ticker:ir,value:J(me(),0),currencyType:fe([\"fiat\",\"crypto\",\"commodity\"])})),cr=Pe({id:Ae(),price:J(me(),0),marketCap:we(ye(J(me(),0))),allTimeHigh:we(ye(J(me(),0))),allTimeLow:we(ye(J(me(),0))),totalVolume:we(ye(J(me(),0))),high1d:we(ye(J(me(),0))),low1d:we(ye(J(me(),0))),circulatingSupply:we(ye(J(me(),0))),dilutedMarketCap:we(ye(J(me(),0))),marketCapPercentChange1d:we(ye(me())),priceChange1d:we(ye(me())),pricePercentChange1h:we(ye(me())),pricePercentChange1d:we(ye(me())),pricePercentChange7d:we(ye(me())),pricePercentChange14d:we(ye(me())),pricePercentChange30d:we(ye(me())),pricePercentChange200d:we(ye(me())),pricePercentChange1y:we(ye(me())),bondingCurveProgressPercent:we(ye(me())),liquidity:we(ye(me())),totalSupply:we(ye(me())),holderCount:we(ye(me())),isMutable:we(ye(de()))}),ur=Te(je,ye(cr)),lr=ir,dr=be({assetType:je,timePeriod:we(Q(Ae(),/^[1-9][0-9]*[dmy]$/u)),from:we(J(me(),0)),to:we(J(me(),0)),vsCurrency:we(lr)}),fr=be({prices:le(Ee([me(),me()])),marketCaps:le(Ee([me(),me()])),totalVolumes:le(Ee([me(),me()]))}),pr={prices:[],marketCaps:[],totalVolumes:[]};const hr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";class gr{encode(e){let t,r,n,o,s,i,a,c=\"\",u=0;for(;u<e.length;)t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),o=t>>2,s=(3&t)<<4|r>>4,i=(15&r)<<2|n>>6,a=63&n,isNaN(r)?i=a=64:isNaN(n)&&(a=64),c=c+hr.charAt(o)+hr.charAt(s)+hr.charAt(i)+hr.charAt(a);return c}encodeIgnoreUtf8(e){let t,r,n,o,s,i,a,c=\"\",u=0;for(;u<e.length;)t=e[u++],r=e[u++],n=e[u++],o=t>>2,s=(3&t)<<4|r>>4,i=(15&r)<<2|n>>6,a=63&n,isNaN(r)?i=a=64:isNaN(n)&&(a=64),c=c+hr.charAt(o)+hr.charAt(s)+hr.charAt(i)+hr.charAt(a);return c}decode(e){let t,r,n,o,s,i,a,c=\"\",u=0;for(e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");u<e.length;)o=hr.indexOf(e.charAt(u++)),s=hr.indexOf(e.charAt(u++)),i=hr.indexOf(e.charAt(u++)),a=hr.indexOf(e.charAt(u++)),t=o<<2|s>>4,r=(15&s)<<4|i>>2,n=(3&i)<<6|a,c+=String.fromCharCode(t),64!=i&&(c+=String.fromCharCode(r)),64!=a&&(c+=String.fromCharCode(n));return this._utf8_decode(c)}decodeToByteArray(e){let t,r,n,o,s,i,a,c=\"\",u=0;for(e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");u<e.length;)o=hr.indexOf(e.charAt(u++)),s=hr.indexOf(e.charAt(u++)),i=hr.indexOf(e.charAt(u++)),a=hr.indexOf(e.charAt(u++)),t=o<<2|s>>4,r=(15&s)<<4|i>>2,n=(3&i)<<6|a,c+=String.fromCharCode(t),64!=i&&(c+=String.fromCharCode(r)),64!=a&&(c+=String.fromCharCode(n));return this._out2ByteArray(c)}_out2ByteArray(e){const t=new Array(e.length);let r=0,n=0;for(;r<e.length;)n=e.charCodeAt(r),t[r]=n,r++;return t}_utf8_encode(e){e=e.replace(/\\r\\n/g,\"\\n\");let t=\"\";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}_utf8_decode(e){let t=\"\",r=0,n=0,o=0,s=0;for(;r<e.length;)n=e.charCodeAt(r),n<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),s=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&s),r+=3);return t}}function yr(e){if(e<0||e>255)throw new Error(\"Input must be a byte\");const t=\"0123456789ABCDEF\";let r=\"\";return r+=t.charAt(e>>4),r+=t.charAt(15&e),r}function mr(e){let t=\"\";for(let r=0;r<e.length;r++){const n=e[r].toString(2),o=n.match(/^1+?(?=0)/);if(o&&8===n.length){const n=o[0].length;let s=e[r].toString(2).slice(7-n);for(let t=1;t<n;t++)s+=e[t+r].toString(2).slice(2);t+=String.fromCharCode(parseInt(s,2)),r+=n-1}else t+=String.fromCharCode(e[r])}return t}function br(e){const t=e.replace(/^0x/,\"\").split(\"\");let r=\"\";for(let e=0;e<t.length/2;e++){const n=`0x${t[2*e]}${t[2*e+1]}`;r+=String.fromCharCode(parseInt(n))}return r}function wr(e){let t=\"\";for(let r=0;r<e.length;r++)t+=yr(e[r]);return t}function vr(e){return(new gr).decodeToByteArray(e)}function Tr(e){return(new gr).encodeIgnoreUtf8(e)}const Ar=34,Er=\"41\",Pr=65,Br=/^(41)/,Cr=\"m/44'/195'\",Ir=Cr+\"/0'/0/0\";function Sr(e){return mr(e)}function Wr(e,t,r=!1){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(r){if(e[n]!=t[n])return!1}else if(JSON.stringify(e[n])!=JSON.stringify(t[n]))return!1;return!0}function xr(e){const t=[],r=e.length;let n;for(let o=0;o<r;o++)n=e.charCodeAt(o),n>=65536&&n<=1114111?(t.push(n>>18&7|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):n>=2048&&n<=65535?(t.push(n>>12&15|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=128&&n<=2047?(t.push(n>>6&31|192),t.push(63&n|128)):t.push(255&n);return t}function _r(e){let t;if(e>=\"A\"&&e<=\"F\"?t=e.charCodeAt(0)-\"A\".charCodeAt(0)+10:e>=\"a\"&&e<=\"f\"?t=e.charCodeAt(0)-\"a\".charCodeAt(0)+10:e>=\"0\"&&e<=\"9\"&&(t=e.charCodeAt(0)-\"0\".charCodeAt(0)),\"number\"==typeof t)return t;throw new Error(\"The passed hex char is not a valid hex char\")}function Rr(e){return e>=\"A\"&&e<=\"F\"||e>=\"a\"&&e<=\"f\"||e>=\"0\"&&e<=\"9\"?1:0}function kr(e,t=!1){let r=e.length;t&&r%2&&(e=`0${e}`,r++);const n=[];let o=0,s=0,i=0;for(let t=0;t<r;t++){const r=e.charAt(t);if(!Rr(r))throw new Error(\"The passed hex char is not a valid hex string\");o<<=4,o+=_r(r),s++,0==s%2&&(n[i++]=o,o=0)}return n}function Or(e){if(!/^\\d{4}-\\d{2}-\\d{2}( \\d{2}-\\d{2}-\\d{2}|)/.test(e))throw new Error(\"The passed date string is not valid\");const t=e.split(\" \"),r=t[0].split(\"-\"),n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10);if(t.length>1){const e=t[1].split(\"-\"),r=parseInt(e[0],10),i=parseInt(e[1],10),a=parseInt(e[2],10);return new Date(n,o,s,r,i,a)}return new Date(n,o,s)}function Fr(e){return e>=\"0\"&&e<=\"9\"?1:0}function Mr(e){if(null==e)return-1;if(0==e.length||\"\"==e)return-1;let t=0;if(40==e.length)for(;t<40;t++){if(!Rr(e.charAt(t)))break}if(40==t)return 1;for(t=0;t<e.length;t++){if(!Fr(e.charAt(t)))break}if(t==e.length)return 2;for(t=0;t<e.length;t++){if(e.charAt(t)>\" \")return 3}return-1}const Nr=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\",Ur={};for(let e=0;e<Nr.length;e++)Ur[Nr.charAt(e)]=e;const Dr=58;function Lr(e){if(0===e.length)return\"\";let t,r;const n=[0];for(t=0;t<e.length;t++){for(r=0;r<n.length;r++)n[r]<<=8;n[0]+=e[t];let o=0;for(r=0;r<n.length;++r)n[r]+=o,o=n[r]/Dr|0,n[r]%=Dr;for(;o;)n.push(o%Dr),o=o/Dr|0}for(t=0;0===e[t]&&t<e.length-1;t++)n.push(0);return n.reverse().map(e=>Nr[e]).join(\"\")}function $r(e){if(0===e.length)return[];let t,r;const n=[0];for(t=0;t<e.length;t++){const o=e[t];if(!(o in Ur))throw new Error(\"Non-base58 character\");for(r=0;r<n.length;r++)n[r]*=Dr;n[0]+=Ur[o];let s=0;for(r=0;r<n.length;++r)n[r]+=s,s=n[r]>>8,n[r]&=255;for(;s;)n.push(255&s),s>>=8}for(t=0;\"1\"===e[t]&&t<e.length-1;t++)n.push(0);return n.reverse()}const zr=\"0x0000000000000000000000000000000000000000000000000000000000000000\",jr=\"6.13.5\";function Vr(e,t,r){const n=t.split(\"|\").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case\"any\":return;case\"bigint\":case\"boolean\":case\"number\":case\"string\":if(typeof e===t)return}const o=new Error(`invalid value for type ${t}`);throw o.code=\"INVALID_ARGUMENT\",o.argument=`value.${r}`,o.value=e,o}async function Hr(e){const t=Object.keys(e);return(await Promise.all(t.map(t=>Promise.resolve(e[t])))).reduce((e,r,n)=>(e[t[n]]=r,e),{})}function Gr(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&Vr(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function Kr(e){if(null==e)return\"null\";if(Array.isArray(e))return\"[ \"+e.map(Kr).join(\", \")+\" ]\";if(e instanceof Uint8Array){const t=\"0123456789abcdef\";let r=\"0x\";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if(\"object\"==typeof e&&\"function\"==typeof e.toJSON)return Kr(e.toJSON());switch(typeof e){case\"boolean\":case\"symbol\":case\"number\":return e.toString();case\"bigint\":return BigInt(e).toString();case\"string\":return JSON.stringify(e);case\"object\":{const t=Object.keys(e);return t.sort(),\"{ \"+t.map(t=>`${Kr(t)}: ${Kr(e[t])}`).join(\", \")+\" }\"}}return\"[ COULD NOT SERIALIZE ]\"}function qr(e,t){return e&&e.code===t}function Zr(e,t,r){let n,o=e;{const n=[];if(r){if(\"message\"in r||\"code\"in r||\"name\"in r)throw new Error(`value will overwrite populated values: ${Kr(r)}`);for(const e in r){if(\"shortMessage\"===e)continue;const t=r[e];n.push(e+\"=\"+Kr(t))}}n.push(`code=${t}`),n.push(`version=${jr}`),n.length&&(e+=\" (\"+n.join(\", \")+\")\")}switch(t){case\"INVALID_ARGUMENT\":n=new TypeError(e);break;case\"NUMERIC_FAULT\":case\"BUFFER_OVERRUN\":n=new RangeError(e);break;default:n=new Error(e)}return Gr(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&Gr(n,{shortMessage:o}),n}function Yr(e,t,r,n){if(!e)throw Zr(t,r,n)}function Jr(e,t,r,n){Yr(e,t,\"INVALID_ARGUMENT\",{argument:r,value:n})}function Xr(e,t,r){null==r&&(r=\"\"),r&&(r=\": \"+r),Yr(e>=t,\"missing argument\"+r,\"MISSING_ARGUMENT\",{count:e,expectedCount:t}),Yr(e<=t,\"too many arguments\"+r,\"UNEXPECTED_ARGUMENT\",{count:e,expectedCount:t})}const Qr=[\"NFD\",\"NFC\",\"NFKD\",\"NFKC\"].reduce((e,t)=>{try{if(\"test\"!==\"test\".normalize(t))throw new Error(\"bad\");if(\"NFD\"===t){const e=String.fromCharCode(233).normalize(\"NFD\");if(e!==String.fromCharCode(101,769))throw new Error(\"broken\")}e.push(t)}catch(e){}return e},[]);function en(e){Yr(Qr.indexOf(e)>=0,\"platform missing String.prototype.normalize\",\"UNSUPPORTED_OPERATION\",{operation:\"String.prototype.normalize\",info:{form:e}})}function tn(e,t,r){if(null==r&&(r=\"\"),e!==t){let e=r,t=\"new\";r&&(e+=\".\",t+=\" \"+r),Yr(!1,`private constructor; use ${e}from* methods`,\"UNSUPPORTED_OPERATION\",{operation:t})}}function rn(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if(\"string\"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}Jr(!1,\"invalid BytesLike value\",t||\"value\",e)}function nn(e,t){return rn(e,t,!1)}function on(e,t){return rn(e,t,!0)}function sn(e,t){return!(\"string\"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&((\"number\"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}function an(e){return sn(e,!0)||e instanceof Uint8Array}const cn=\"0123456789abcdef\";function un(e){const t=nn(e);let r=\"0x\";for(let e=0;e<t.length;e++){const n=t[e];r+=cn[(240&n)>>4]+cn[15&n]}return r}function ln(e){return\"0x\"+e.map(e=>un(e).substring(2)).join(\"\")}function dn(e){return sn(e,!0)?(e.length-2)/2:nn(e).length}function fn(e,t,r){const n=nn(e);return null!=r&&r>n.length&&Yr(!1,\"cannot slice beyond data bounds\",\"BUFFER_OVERRUN\",{buffer:n,length:n.length,offset:r}),un(n.slice(t??0,r??n.length))}function pn(e,t,r){const n=nn(e);Yr(t>=n.length,\"padding exceeds data length\",\"BUFFER_OVERRUN\",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),un(o)}function hn(e,t){return pn(e,t,!0)}const gn=BigInt(0),yn=BigInt(1),mn=9007199254740991;function bn(e,t){let r=vn(e,\"value\");const n=BigInt(Pn(t,\"width\")),o=yn<<n-yn;if(r<gn){r=-r,Yr(r<=o,\"too low\",\"NUMERIC_FAULT\",{operation:\"toTwos\",fault:\"overflow\",value:e});return(~r&(yn<<n)-yn)+yn}return Yr(r<o,\"too high\",\"NUMERIC_FAULT\",{operation:\"toTwos\",fault:\"overflow\",value:e}),r}function wn(e,t){const r=Tn(e,\"value\"),n=BigInt(Pn(t,\"bits\"));return r&(yn<<n)-yn}function vn(e,t){switch(typeof e){case\"bigint\":return e;case\"number\":return Jr(Number.isInteger(e),\"underflow\",t||\"value\",e),Jr(e>=-mn&&e<=mn,\"overflow\",t||\"value\",e),BigInt(e);case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return\"-\"===e[0]&&\"-\"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){Jr(!1,`invalid BigNumberish string: ${r.message}`,t||\"value\",e)}}Jr(!1,\"invalid BigNumberish value\",t||\"value\",e)}function Tn(e,t){const r=vn(e,t);return Yr(r>=gn,\"unsigned value cannot be negative\",\"NUMERIC_FAULT\",{fault:\"overflow\",operation:\"getUint\",value:e}),r}const An=\"0123456789abcdef\";function En(e){if(e instanceof Uint8Array){let t=\"0x0\";for(const r of e)t+=An[r>>4],t+=An[15&r];return BigInt(t)}return vn(e)}function Pn(e,t){switch(typeof e){case\"bigint\":return Jr(e>=-mn&&e<=mn,\"overflow\",t||\"value\",e),Number(e);case\"number\":return Jr(Number.isInteger(e),\"underflow\",t||\"value\",e),Jr(e>=-mn&&e<=mn,\"overflow\",t||\"value\",e),e;case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return Pn(BigInt(e),t)}catch(r){Jr(!1,`invalid numeric string: ${r.message}`,t||\"value\",e)}}Jr(!1,\"invalid numeric value\",t||\"value\",e)}function Bn(e,t){let r=Tn(e,\"value\").toString(16);if(null==t)r.length%2&&(r=\"0\"+r);else{const n=Pn(t,\"width\");for(Yr(2*n>=r.length,`value exceeds width (${n} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeHex\",fault:\"overflow\",value:e});r.length<2*n;)r=\"0\"+r}return\"0x\"+r}function Cn(e){const t=Tn(e,\"value\");if(t===gn)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r=\"0\"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}function In(e){let t=un(an(e)?e:Cn(e)).substring(2);for(;t.startsWith(\"0\");)t=t.substring(1);return\"\"===t&&(t=\"0\"),\"0x\"+t}const Sn=BigInt(0),Wn=BigInt(1),xn=BigInt(2),_n=BigInt(27),Rn=BigInt(28),kn=BigInt(35),On={};function Fn(e){return hn(Cn(e),32)}class Mn{#n;#o;#s;#i;get r(){return this.#n}set r(e){Jr(32===dn(e),\"invalid r\",\"value\",e),this.#n=un(e)}get s(){return this.#o}set s(e){Jr(32===dn(e),\"invalid s\",\"value\",e);const t=un(e);Jr(parseInt(t.substring(0,3))<8,\"non-canonical s\",\"value\",t),this.#o=t}get v(){return this.#s}set v(e){const t=Pn(e,\"value\");Jr(27===t||28===t,\"invalid v\",\"v\",e),this.#s=t}get networkV(){return this.#i}get legacyChainId(){const e=this.networkV;return null==e?null:Mn.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=nn(this.s);return this.yParity&&(e[0]|=128),un(e)}get compactSerialized(){return ln([this.r,this.yParityAndS])}get serialized(){return ln([this.r,this.s,this.yParity?\"0x1c\":\"0x1b\"])}constructor(e,t,r,n){tn(e,On,\"Signature\"),this.#n=t,this.#o=r,this.#s=n,this.#i=null}[Symbol.for(\"nodejs.util.inspect.custom\")](){return`Signature { r: \"${this.r}\", s: \"${this.s}\", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Mn(On,this.r,this.s,this.v);return this.networkV&&(e.#i=this.networkV),e}toJSON(){const e=this.networkV;return{_type:\"signature\",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=vn(e,\"v\");return t==_n||t==Rn?Sn:(Jr(t>=kn,\"invalid EIP-155 v\",\"v\",e),(t-kn)/xn)}static getChainIdV(e,t){return vn(e)*xn+BigInt(35+t-27)}static getNormalizedV(e){const t=vn(e);return t===Sn||t===_n?27:t===Wn||t===Rn?28:(Jr(t>=kn,\"invalid v\",\"v\",e),t&Wn?27:28)}static from(e){function t(t,r){Jr(t,r,\"signature\",e)}if(null==e)return new Mn(On,zr,zr,27);if(\"string\"==typeof e){const r=nn(e,\"signature\");if(64===r.length){const e=un(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new Mn(On,e,un(t),n)}if(65===r.length){const e=un(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),\"non-canonical s\");const o=Mn.getNormalizedV(r[64]);return new Mn(On,e,un(n),o)}t(!1,\"invalid raw signature length\")}if(e instanceof Mn)return e.clone();const r=e.r;t(null!=r,\"missing r\");const n=Fn(r),o=function(e,r){if(null!=e)return Fn(e);if(null!=r){t(sn(r,32),\"invalid yParityAndS\");const e=nn(r);return e[0]&=127,un(e)}t(!1,\"missing s\")}(e.s,e.yParityAndS);t(!(128&nn(o)[0]),\"non-canonical s\");const{networkV:s,v:i}=function(e,r,n){if(null!=e){const t=vn(e);return{networkV:t>=kn?t:void 0,v:Mn.getNormalizedV(t)}}if(null!=r)return t(sn(r,32),\"invalid yParityAndS\"),{v:128&nn(r)[0]?28:27};if(null!=n){switch(Pn(n,\"sig.yParity\")){case 0:return{v:27};case 1:return{v:28}}t(!1,\"invalid yParity\")}t(!1,\"missing v\")}(e.v,e.yParityAndS,e.yParity),a=new Mn(On,n,o,i);return s&&(a.#i=s),t(null==e.yParity||Pn(e.yParity,\"sig.yParity\")===a.yParity,\"yParity mismatch\"),t(null==e.yParityAndS||e.yParityAndS===a.yParityAndS,\"yParityAndS mismatch\"),a}}function Nn(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Un(e,...t){if(!(e instanceof Uint8Array))throw new Error(\"Expected Uint8Array\");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Dn(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");Nn(e.outputLen),Nn(e.blockLen)}function Ln(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function $n(e,t){Un(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const zn=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,jn=e=>e instanceof Uint8Array,Vn=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Hn=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Gn=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error(\"Non little-endian hardware is not supported\");const Kn=async()=>{};async function qn(e,t,r){let n=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-n;e>=0&&e<t||(await Kn(),n+=e)}}function Zn(e){if(\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!jn(e))throw new Error(\"expected Uint8Array, got \"+typeof e);return e}class Yn{clone(){return this._cloneInto()}}const Jn={}.toString;function Xn(e,t){if(void 0!==t&&\"[object Object]\"!==Jn.call(t))throw new Error(\"Options should be object or undefined\");return Object.assign(e,t)}function Qn(e){const t=t=>e().update(Zn(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function eo(e=32){if(zn&&\"function\"==typeof zn.getRandomValues)return zn.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}class to extends Yn{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Dn(e);const r=Zn(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return Ln(this),this.iHash.update(e),this}digestInto(e){Ln(this),Un(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:i}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=i,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ro=(e,t,r)=>new to(e,t).update(r).digest();function no(e,t,r,n){Dn(e);const o=Xn({dkLen:32,asyncTick:10},n),{c:s,dkLen:i,asyncTick:a}=o;if(Nn(s),Nn(i),Nn(a),s<1)throw new Error(\"PBKDF2: iterations (c) should be >= 1\");const c=Zn(t),u=Zn(r),l=new Uint8Array(i),d=ro.create(e,c),f=d._cloneInto().update(u);return{c:s,dkLen:i,asyncTick:a,DK:l,PRF:d,PRFSalt:f}}function oo(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),o.fill(0),r}function so(e,t,r,n){const{c:o,dkLen:s,DK:i,PRF:a,PRFSalt:c}=no(e,t,r,n);let u;const l=new Uint8Array(4),d=Hn(l),f=new Uint8Array(a.outputLen);for(let e=1,t=0;t<s;e++,t+=a.outputLen){const r=i.subarray(t,t+a.outputLen);d.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(f),r.set(f.subarray(0,r.length));for(let e=1;e<o;e++){a._cloneInto(u).update(f).digestInto(f);for(let e=0;e<r.length;e++)r[e]^=f[e]}}return oo(a,c,i,u,f)}ro.create=(e,t)=>new to(e,t);class io extends Yn{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Hn(this.buffer)}update(e){Ln(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=Zn(e)).length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);if(i===n){const t=Hn(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ln(this),$n(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const i=Hn(e),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=a/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)i.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:i}=this;return e.length=n,e.pos=i,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const ao=(e,t,r)=>e&t^~e&r,co=(e,t,r)=>e&t^e&r^t&r,uo=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),lo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),fo=new Uint32Array(64);class po extends io{constructor(){super(64,32,8,!1),this.A=0|lo[0],this.B=0|lo[1],this.C=0|lo[2],this.D=0|lo[3],this.E=0|lo[4],this.F=0|lo[5],this.G=0|lo[6],this.H=0|lo[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)fo[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=fo[e-15],r=fo[e-2],n=Gn(t,7)^Gn(t,18)^t>>>3,o=Gn(r,17)^Gn(r,19)^r>>>10;fo[e]=o+fo[e-7]+n+fo[e-16]|0}let{A:r,B:n,C:o,D:s,E:i,F:a,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(Gn(i,6)^Gn(i,11)^Gn(i,25))+ao(i,a,c)+uo[e]+fo[e]|0,l=(Gn(r,2)^Gn(r,13)^Gn(r,22))+co(r,n,o)|0;u=c,c=a,a=i,i=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,i=i+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,i,a,c,u)}roundClean(){fo.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ho=Qn(()=>new po),go=BigInt(2**32-1),yo=BigInt(32);function mo(e,t=!1){return t?{h:Number(e&go),l:Number(e>>yo&go)}:{h:0|Number(e>>yo&go),l:0|Number(e&go)}}function bo(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:i}=mo(e[o],t);[r[o],n[o]]=[s,i]}return[r,n]}const wo=(e,t,r)=>e<<r|t>>>32-r,vo=(e,t,r)=>t<<r|e>>>32-r,To=(e,t,r)=>t<<r-32|e>>>64-r,Ao=(e,t,r)=>e<<r-32|t>>>64-r;const Eo={fromBig:mo,split:bo,toBig:(e,t)=>BigInt(e>>>0)<<yo|BigInt(t>>>0),shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:wo,rotlSL:vo,rotlBH:To,rotlBL:Ao,add:function(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,add5H:(e,t,r,n,o,s)=>t+r+n+o+s+(e/2**32|0)|0,add5L:(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0)};const[Po,Bo]=Eo.split([\"0x428a2f98d728ae22\",\"0x7137449123ef65cd\",\"0xb5c0fbcfec4d3b2f\",\"0xe9b5dba58189dbbc\",\"0x3956c25bf348b538\",\"0x59f111f1b605d019\",\"0x923f82a4af194f9b\",\"0xab1c5ed5da6d8118\",\"0xd807aa98a3030242\",\"0x12835b0145706fbe\",\"0x243185be4ee4b28c\",\"0x550c7dc3d5ffb4e2\",\"0x72be5d74f27b896f\",\"0x80deb1fe3b1696b1\",\"0x9bdc06a725c71235\",\"0xc19bf174cf692694\",\"0xe49b69c19ef14ad2\",\"0xefbe4786384f25e3\",\"0x0fc19dc68b8cd5b5\",\"0x240ca1cc77ac9c65\",\"0x2de92c6f592b0275\",\"0x4a7484aa6ea6e483\",\"0x5cb0a9dcbd41fbd4\",\"0x76f988da831153b5\",\"0x983e5152ee66dfab\",\"0xa831c66d2db43210\",\"0xb00327c898fb213f\",\"0xbf597fc7beef0ee4\",\"0xc6e00bf33da88fc2\",\"0xd5a79147930aa725\",\"0x06ca6351e003826f\",\"0x142929670a0e6e70\",\"0x27b70a8546d22ffc\",\"0x2e1b21385c26c926\",\"0x4d2c6dfc5ac42aed\",\"0x53380d139d95b3df\",\"0x650a73548baf63de\",\"0x766a0abb3c77b2a8\",\"0x81c2c92e47edaee6\",\"0x92722c851482353b\",\"0xa2bfe8a14cf10364\",\"0xa81a664bbc423001\",\"0xc24b8b70d0f89791\",\"0xc76c51a30654be30\",\"0xd192e819d6ef5218\",\"0xd69906245565a910\",\"0xf40e35855771202a\",\"0x106aa07032bbd1b8\",\"0x19a4c116b8d2d0c8\",\"0x1e376c085141ab53\",\"0x2748774cdf8eeb99\",\"0x34b0bcb5e19b48a8\",\"0x391c0cb3c5c95a63\",\"0x4ed8aa4ae3418acb\",\"0x5b9cca4f7763e373\",\"0x682e6ff3d6b2b8a3\",\"0x748f82ee5defb2fc\",\"0x78a5636f43172f60\",\"0x84c87814a1f0ab72\",\"0x8cc702081a6439ec\",\"0x90befffa23631e28\",\"0xa4506cebde82bde9\",\"0xbef9a3f7b2c67915\",\"0xc67178f2e372532b\",\"0xca273eceea26619c\",\"0xd186b8c721c0c207\",\"0xeada7dd6cde0eb1e\",\"0xf57d4f7fee6ed178\",\"0x06f067aa72176fba\",\"0x0a637dc5a2c898a6\",\"0x113f9804bef90dae\",\"0x1b710b35131c471b\",\"0x28db77f523047d84\",\"0x32caab7b40c72493\",\"0x3c9ebe0a15c9bebc\",\"0x431d67c49c100d4c\",\"0x4cc5d4becb3e42b6\",\"0x597f299cfc657e2a\",\"0x5fcb6fab3ad6faec\",\"0x6c44198c4a475817\"].map(e=>BigInt(e))),Co=new Uint32Array(80),Io=new Uint32Array(80);class So extends io{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:s,Dh:i,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:h,Hl:g}=this;return[e,t,r,n,o,s,i,a,c,u,l,d,f,p,h,g]}set(e,t,r,n,o,s,i,a,c,u,l,d,f,p,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|i,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)Co[r]=e.getUint32(t),Io[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|Co[e-15],r=0|Io[e-15],n=Eo.rotrSH(t,r,1)^Eo.rotrSH(t,r,8)^Eo.shrSH(t,r,7),o=Eo.rotrSL(t,r,1)^Eo.rotrSL(t,r,8)^Eo.shrSL(t,r,7),s=0|Co[e-2],i=0|Io[e-2],a=Eo.rotrSH(s,i,19)^Eo.rotrBH(s,i,61)^Eo.shrSH(s,i,6),c=Eo.rotrSL(s,i,19)^Eo.rotrBL(s,i,61)^Eo.shrSL(s,i,6),u=Eo.add4L(o,c,Io[e-7],Io[e-16]),l=Eo.add4H(u,n,a,Co[e-7],Co[e-16]);Co[e]=0|l,Io[e]=0|u}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:i,Cl:a,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:p,Gh:h,Gl:g,Hh:y,Hl:m}=this;for(let e=0;e<80;e++){const t=Eo.rotrSH(l,d,14)^Eo.rotrSH(l,d,18)^Eo.rotrBH(l,d,41),b=Eo.rotrSL(l,d,14)^Eo.rotrSL(l,d,18)^Eo.rotrBL(l,d,41),w=l&f^~l&h,v=d&p^~d&g,T=Eo.add5L(m,b,v,Bo[e],Io[e]),A=Eo.add5H(T,y,t,w,Po[e],Co[e]),E=0|T,P=Eo.rotrSH(r,n,28)^Eo.rotrBH(r,n,34)^Eo.rotrBH(r,n,39),B=Eo.rotrSL(r,n,28)^Eo.rotrBL(r,n,34)^Eo.rotrBL(r,n,39),C=r&o^r&i^o&i,I=n&s^n&a^s&a;y=0|h,m=0|g,h=0|f,g=0|p,f=0|l,p=0|d,({h:l,l:d}=Eo.add(0|c,0|u,0|A,0|E)),c=0|i,u=0|a,i=0|o,a=0|s,o=0|r,s=0|n;const S=Eo.add3L(E,B,I);r=Eo.add3H(S,A,P,C),n=0|S}({h:r,l:n}=Eo.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=Eo.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:i,l:a}=Eo.add(0|this.Ch,0|this.Cl,0|i,0|a)),({h:c,l:u}=Eo.add(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=Eo.add(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:p}=Eo.add(0|this.Fh,0|this.Fl,0|f,0|p)),({h,l:g}=Eo.add(0|this.Gh,0|this.Gl,0|h,0|g)),({h:y,l:m}=Eo.add(0|this.Hh,0|this.Hl,0|y,0|m)),this.set(r,n,o,s,i,a,c,u,l,d,f,p,h,g,y,m)}roundClean(){Co.fill(0),Io.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Wo=Qn(()=>new So);const xo=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof globalThis)return globalThis;throw new Error(\"unable to locate global object\")}(),_o=xo.crypto||xo.msCrypto;function Ro(e){switch(e){case\"sha256\":return ho.create();case\"sha512\":return Wo.create()}Jr(!1,\"invalid hashing algorithm name\",\"algorithm\",e)}const ko=function(e){return Ro(\"sha256\").update(e).digest()},Oo=function(e){return Ro(\"sha512\").update(e).digest()};let Fo=ko,Mo=Oo,No=!1,Uo=!1;function Do(e){const t=nn(e,\"data\");return un(Fo(t))}function Lo(e){const t=nn(e,\"data\");return un(Mo(t))}Do._=ko,Do.lock=function(){No=!0},Do.register=function(e){if(No)throw new Error(\"sha256 is locked\");Fo=e},Object.freeze(Do),Lo._=Oo,Lo.lock=function(){Uo=!0},Lo.register=function(e){if(Uo)throw new Error(\"sha512 is locked\");Mo=e},Object.freeze(Do);let $o=!1;const zo=function(e,t,r,n,o){return function(e,t,r,n,o){const s={sha256:ho,sha512:Wo}[o];return Jr(null!=s,\"invalid pbkdf2 algorithm\",\"algorithm\",o),so(s,e,t,{c:r,dkLen:n})}(e,t,r,n,o)};let jo=zo;function Vo(e,t,r,n,o){const s=nn(e,\"password\"),i=nn(t,\"salt\");return un(jo(s,i,r,n,o))}function Ho(e,t,r,n,o){if(\"BAD_PREFIX\"===e||\"UNEXPECTED_CONTINUE\"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return\"OVERRUN\"===e?r.length-t-1:0}Vo._=zo,Vo.lock=function(){$o=!0},Vo.register=function(e){if($o)throw new Error(\"pbkdf2 is locked\");jo=e},Object.freeze(Vo);const Go=Object.freeze({error:function(e,t,r,n,o){Jr(!1,`invalid codepoint at offset ${t}; ${e}`,\"bytes\",r)},ignore:Ho,replace:function(e,t,r,n,o){return\"OVERLONG\"===e?(Jr(\"number\"==typeof o,\"invalid bad code point for replacement\",\"badCodepoint\",o),n.push(o),0):(n.push(65533),Ho(e,t,r))}});function Ko(e,t){null==t&&(t=Go.error);const r=nn(e,\"bytes\"),n=[];let o=0;for(;o<r.length;){const e=r[o++];if(!(e>>7)){n.push(e);continue}let s=null,i=null;if(192==(224&e))s=1,i=127;else if(224==(240&e))s=2,i=2047;else{if(240!=(248&e)){o+=t(128==(192&e)?\"UNEXPECTED_CONTINUE\":\"BAD_PREFIX\",o-1,r,n);continue}s=3,i=65535}if(o-1+s>=r.length){o+=t(\"OVERRUN\",o-1,r,n);continue}let a=e&(1<<8-s-1)-1;for(let e=0;e<s;e++){let e=r[o];if(128!=(192&e)){o+=t(\"MISSING_CONTINUE\",o,r,n),a=null;break}a=a<<6|63&e,o++}null!==a&&(a>1114111?o+=t(\"OUT_OF_RANGE\",o-1-s,r,n,a):a>=55296&&a<=57343?o+=t(\"UTF16_SURROGATE\",o-1-s,r,n,a):a<=i?o+=t(\"OVERLONG\",o-1-s,r,n,a):n.push(a))}return n}function qo(e,t){Jr(\"string\"==typeof e,\"invalid string value\",\"str\",e),null!=t&&(en(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);Jr(t<e.length&&56320==(64512&o),\"invalid surrogate pair\",\"str\",e);const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}function Zo(e,t){return Ko(e,t).map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join(\"\")}const[Yo,Jo,Xo]=[[],[],[]],Qo=BigInt(0),es=BigInt(1),ts=BigInt(2),rs=BigInt(7),ns=BigInt(256),os=BigInt(113);for(let e=0,t=es,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Yo.push(2*(5*n+r)),Jo.push((e+1)*(e+2)/2%64);let o=Qo;for(let e=0;e<7;e++)t=(t<<es^(t>>rs)*os)%ns,t&ts&&(o^=es<<(es<<BigInt(e))-es);Xo.push(o)}const[ss,is]=bo(Xo,!0),as=(e,t,r)=>r>32?To(e,t,r):wo(e,t,r),cs=(e,t,r)=>r>32?Ao(e,t,r):vo(e,t,r);class us extends Yn{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Nn(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");this.state=new Uint8Array(200),this.state32=Vn(this.state)}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],i=r[o+1],a=as(s,i,1)^r[n],c=cs(s,i,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=Jo[r],s=as(t,o,n),i=cs(t,o,n),a=Yo[r];t=e[a],o=e[a+1],e[a]=s,e[a+1]=i}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=ss[n],e[1]^=is[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Ln(this);const{blockLen:t,state:r}=this,n=(e=Zn(e)).length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){Ln(this,!1),Un(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(e)}xof(e){return Nn(e),this.xofInto(new Uint8Array(e))}digestInto(e){if($n(e,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new us(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const ls=(e,t,r)=>Qn(()=>new us(t,e,r)),ds=ls(1,136,32);let fs=!1;const ps=function(e){return ds(e)};let hs=ps;function gs(e){const t=nn(e,\"data\");return un(hs(t))}function ys(e){return gs(qo(e))}gs._=ps,gs.lock=function(){fs=!0},gs.register=function(e){if(fs)throw new TypeError(\"keccak256 is locked\");hs=e},Object.freeze(gs);const ms=\" !#$%&'()*+,-./<=>?@[]^_`{|}~\",bs=/^[a-z]*$/i;function ws(e,t){let r=97;return e.reduce((e,n)=>(n===t?r++:n.match(bs)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e),[])}function vs(e){return Jr(\"0\"===e[0],\"unsupported auwl data\",\"data\",e),function(e,t){for(let r=28;r>=0;r--)e=e.split(ms[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(e,t,n,o)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(\";\");else r.push(t.toLowerCase());return\"\"});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return ws(ws(r,\";\"),\":\")}(e.substring(59),e.substring(1,59))}class Ts{locale;constructor(e){Gr(this,{locale:e})}split(e){return e.toLowerCase().split(/\\s+/g)}join(e){return e.join(\" \")}}class As extends Ts{#a;#c;constructor(e,t,r){super(e),this.#a=t,this.#c=r,this.#u=null}get _data(){return this.#a}_decodeWords(){return vs(this.#a)}#u;#l(){if(null==this.#u){const e=this._decodeWords();if(ys(e.join(\"\\n\")+\"\\n\")!==this.#c)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#u=e}return this.#u}getWord(e){const t=this.#l();return Jr(e>=0&&e<t.length,`invalid word index: ${e}`,\"index\",e),t[e]}getWordIndex(e){return this.#l().indexOf(e)}}let Es=null;class Ps extends As{constructor(){super(\"en\",\"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO\",\"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\")}static wordlist(){return null==Es&&(Es=new Ps),Es}}function Bs(e){return(1<<e)-1<<8-e&255}function Cs(e){return(1<<e)-1&255}function Is(e,t){en(\"NFKD\"),null==t&&(t=Ps.wordlist());const r=t.split(e);Jr(r.length%3==0&&r.length>=12&&r.length<=24,\"invalid mnemonic length\",\"mnemonic\",\"[ REDACTED ]\");const n=new Uint8Array(Math.ceil(11*r.length/8));let o=0;for(let e=0;e<r.length;e++){let s=t.getWordIndex(r[e].normalize(\"NFKD\"));Jr(s>=0,`invalid mnemonic word at index ${e}`,\"mnemonic\",\"[ REDACTED ]\");for(let e=0;e<11;e++)s&1<<10-e&&(n[o>>3]|=1<<7-o%8),o++}const s=32*r.length/3,i=Bs(r.length/3);return Jr((nn(Do(n.slice(0,s/8)))[0]&i)===(n[n.length-1]&i),\"invalid mnemonic checksum\",\"mnemonic\",\"[ REDACTED ]\"),un(n.slice(0,s/8))}function Ss(e,t){Jr(e.length%4==0&&e.length>=16&&e.length<=32,\"invalid entropy size\",\"entropy\",\"[ REDACTED ]\"),null==t&&(t=Ps.wordlist());const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&Cs(8-n)),n+=3);const o=e.length/4,s=parseInt(Do(e).substring(2,4),16)&Bs(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map(e=>t.getWord(e)))}const Ws={};class xs{phrase;password;wordlist;entropy;constructor(e,t,r,n,o){null==n&&(n=\"\"),null==o&&(o=Ps.wordlist()),tn(e,Ws,\"Mnemonic\"),Gr(this,{phrase:r,password:n,wordlist:o,entropy:t})}computeSeed(){const e=qo(\"mnemonic\"+this.password,\"NFKD\");return Vo(qo(this.phrase,\"NFKD\"),e,2048,64,\"sha512\")}static fromPhrase(e,t,r){const n=Is(e,r);return e=Ss(nn(n),r),new xs(Ws,n,e,t,r)}static fromEntropy(e,t,r){const n=nn(e,\"entropy\"),o=Ss(n,r);return new xs(Ws,un(n),o,t,r)}static entropyToPhrase(e,t){return Ss(nn(e,\"entropy\"),t)}static phraseToEntropy(e,t){return Is(e,t)}static isValidMnemonic(e,t){try{return Is(e,t),!0}catch(e){}return!1}}let _s=!1;const Rs=function(e,t,r){return function(e,t){const r={sha256:ho,sha512:Wo}[e];return Jr(null!=r,\"invalid hmac algorithm\",\"algorithm\",e),ro.create(r,t)}(e,t).update(r).digest()};let ks=Rs;function Os(e,t,r){const n=nn(t,\"key\"),o=nn(r,\"data\");return un(ks(e,n,o))}Os._=Rs,Os.lock=function(){_s=!0},Os.register=function(e){if(_s)throw new Error(\"computeHmac is locked\");ks=e},Object.freeze(Os);const Fs=BigInt(0),Ms=BigInt(36);function Ns(e){const t=(e=e.toLowerCase()).substring(2).split(\"\"),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=nn(gs(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return\"0x\"+t.join(\"\")}const Us={};for(let e=0;e<10;e++)Us[String(e)]=String(e);for(let e=0;e<26;e++)Us[String.fromCharCode(65+e)]=String(10+e);const Ds=15;function Ls(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+\"00\").split(\"\").map(e=>Us[e]).join(\"\");for(;t.length>=Ds;){let e=t.substring(0,Ds);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r=\"0\"+r;return r}const $s=function(){const e={};for(let t=0;t<36;t++){e[\"0123456789abcdefghijklmnopqrstuvwxyz\"[t]]=BigInt(t)}return e}();function zs(e){if(Jr(\"string\"==typeof e,\"invalid address\",\"address\",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith(\"0x\")||(e=\"0x\"+e);const t=Ns(e);return Jr(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,\"bad address checksum\",\"address\",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){Jr(e.substring(2,4)===Ls(e),\"bad icap checksum\",\"address\",e);let t=function(e){e=e.toLowerCase();let t=Fs;for(let r=0;r<e.length;r++)t=t*Ms+$s[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t=\"0\"+t;return Ns(\"0x\"+t)}Jr(!1,\"invalid address\",\"address\",e)}BigInt(0);const js=BigInt(1),Vs=BigInt(2),Hs=e=>e instanceof Uint8Array,Gs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function Ks(e){if(!Hs(e))throw new Error(\"Uint8Array expected\");let t=\"\";for(let r=0;r<e.length;r++)t+=Gs[e[r]];return t}function qs(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return BigInt(\"\"===e?\"0\":`0x${e}`)}function Zs(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),s=Number.parseInt(o,16);if(Number.isNaN(s)||s<0)throw new Error(\"Invalid byte sequence\");r[t]=s}return r}function Ys(e){return qs(Ks(e))}function Js(e){if(!Hs(e))throw new Error(\"Uint8Array expected\");return qs(Ks(Uint8Array.from(e).reverse()))}function Xs(e,t){return Zs(e.toString(16).padStart(2*t,\"0\"))}function Qs(e,t){return Xs(e,t).reverse()}function ei(e,t,r){let n;if(\"string\"==typeof t)try{n=Zs(t)}catch(r){throw new Error(`${e} must be valid hex string, got \"${t}\". Cause: ${r}`)}else{if(!Hs(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function ti(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!Hs(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}const ri=e=>(Vs<<BigInt(e-1))-js,ni=e=>new Uint8Array(e),oi=e=>Uint8Array.from(e);function si(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=ni(e),o=ni(e),s=0;const i=()=>{n.fill(1),o.fill(0),s=0},a=(...e)=>r(o,n,...e),c=(e=ni())=>{o=a(oi([0]),e),n=a(),0!==e.length&&(o=a(oi([1]),e),n=a())},u=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return ti(...r)};return(e,t)=>{let r;for(i(),c(e);!(r=t(u()));)c();return i(),r}}const ii={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function ai(e,t,r={}){const n=(t,r,n)=>{const o=ii[r];if(\"function\"!=typeof o)throw new Error(`Invalid validator \"${r}\", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const ci=BigInt(0),ui=BigInt(1),li=BigInt(2),di=BigInt(3),fi=BigInt(4),pi=BigInt(5),hi=BigInt(8);BigInt(9),BigInt(16);function gi(e,t){const r=e%t;return r>=ci?r:t+r}function yi(e,t,r){if(r<=ci||t<ci)throw new Error(\"Expected power/modulo > 0\");if(r===ui)return ci;let n=ui;for(;t>ci;)t&ui&&(n=n*e%r),e=e*e%r,t>>=ui;return n}function mi(e,t,r){let n=e;for(;t-- >ci;)n*=n,n%=r;return n}function bi(e,t){if(e===ci||t<=ci)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=gi(e,t),n=t,o=ci,s=ui,i=ui,a=ci;for(;r!==ci;){const e=n/r,t=n%r,c=o-i*e,u=s-a*e;n=r,r=t,o=i,s=a,i=c,a=u}if(n!==ui)throw new Error(\"invert: does not exist\");return gi(o,t)}function wi(e){if(e%fi===di){const t=(e+ui)/fi;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%hi===pi){const t=(e-pi)/hi;return function(e,r){const n=e.mul(r,li),o=e.pow(n,t),s=e.mul(r,o),i=e.mul(e.mul(s,li),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error(\"Cannot find square root\");return a}}return function(e){const t=(e-ui)/li;let r,n,o;for(r=e-ui,n=0;r%li===ci;r/=li,n++);for(o=li;o<e&&yi(o,t,e)!==e-ui;o++);if(1===n){const t=(e+ui)/fi;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+ui)/li;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let a=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(i,s),l=e.pow(i,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,ui<<BigInt(a-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),a=t}return u}}(e)}const vi=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function Ti(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Ai(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function Ei(e){const t=Ai(e);return t+Math.ceil(t/2)}const Pi=BigInt(0),Bi=BigInt(1);function Ci(e){return function(e){const t=vi.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});ai(e,t)}(e.Fp),ai(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...Ti(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Ii,aT:Si}=i,Wi={Err:class extends Error{constructor(e=\"\"){super(e)}},_parseInt(e){const{Err:t}=Wi;if(e.length<2||2!==e[0])throw new t(\"Invalid signature integer tag\");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t(\"Invalid signature integer: wrong length\");if(128&n[0])throw new t(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new t(\"Invalid signature integer: unnecessary leading zero\");return{d:Ii(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Wi,r=\"string\"==typeof e?Si(e):e;if(!(r instanceof Uint8Array))throw new Error(\"ui8a expected\");let n=r.length;if(n<2||48!=r[0])throw new t(\"Invalid signature tag\");if(r[1]!==n-2)throw new t(\"Invalid signature: incorrect length\");const{d:o,l:s}=Wi._parseInt(r.subarray(2)),{d:i,l:a}=Wi._parseInt(s);if(a.length)throw new t(\"Invalid signature: left bytes after parsing\");return{r:o,s:i}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?\"00\"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,i=o.length/2,a=r(s),c=r(i);return`30${r(i+s+4)}02${c}${o}02${a}${n}`}},xi=BigInt(0),_i=BigInt(1),Ri=(BigInt(2),BigInt(3));BigInt(4);function ki(e){const t=function(e){const t=Ci(e);ai(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return ti(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),i=r.mul(s,e);return r.add(r.add(i,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function i(e){return\"bigint\"==typeof e&&xi<e&&e<t.n}function a(e){if(!i(e))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&\"bigint\"!=typeof e){if(e instanceof Uint8Array&&(e=Ks(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"Invalid key\");e=e.padStart(2*n,\"0\")}let i;try{i=\"bigint\"==typeof e?e:Ys(ei(\"private key\",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(i=gi(i,s)),a(i),i}const u=new Map;function l(e){if(!(e instanceof d))throw new Error(\"ProjectivePoint expected\")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof d)throw new Error(\"projective point not allowed\");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(ei(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const o=r.sqr(n),i=s(e);if(!r.eql(o,i))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:i,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(s,o)),u=r.eql(r.mul(n,a),r.mul(i,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,Ri),{px:s,py:i,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(i,i),h=r.mul(a,a),g=r.mul(s,i);return g=r.add(g,g),l=r.mul(s,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(i,a),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:i,py:a,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,Ri);let y=r.mul(n,i),m=r.mul(o,a),b=r.mul(s,c),w=r.add(n,o),v=r.add(i,a);w=r.mul(w,v),v=r.add(y,m),w=r.sub(w,v),v=r.add(n,s);let T=r.add(i,c);return v=r.mul(v,T),T=r.add(y,b),v=r.sub(v,T),T=r.add(o,s),u=r.add(a,c),T=r.mul(T,u),u=r.add(m,b),T=r.sub(T,u),p=r.mul(h,v),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),v=r.mul(g,v),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),v=r.add(v,b),y=r.mul(m,v),f=r.add(f,y),y=r.mul(T,v),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(T,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,e=>{const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){const n=d.ZERO;if(e===xi)return n;if(a(e),e===_i)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:i,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;i>xi||u>xi;)i&_i&&(l=l.add(h)),u&_i&&(f=f.add(h)),h=h.double(),i>>=_i,u>>=_i;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){a(e);let n,o,s=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:a,k2:c}=i.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(a,f),f=new d(r.mul(f.px,i.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==xi&&t!==_i&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const i=r.mul(t,e),a=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:i,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===_i)return!0;if(r)return r(d,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===_i?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return Ks(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>Pi;)r&Bi&&(n=n.add(o)),o=o.double(),r>>=Bi;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let i=e,a=i;for(let e=0;e<r;e++){a=i,s.push(a);for(let e=1;e<o;e++)a=a.add(i),s.push(a);i=a.double()}return s},wNAF(t,o,s){const{windows:i,windowSize:a}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<i;e++){const t=e*a;let n=Number(s&l);s>>=f,n>a&&(n-=d,s+=Bi);const i=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[i])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:i}}function Oi(e){const t=function(e){const t=Ci(e);return ai(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function i(e){return gi(e,n)}function a(e){return bi(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=ki({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),i=ti;return n?i(Uint8Array.from([t.hasEvenY()?2:3]),s):i(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],i=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=Ys(i);if(!function(e){return xi<e&&e<r.ORDER}(e))throw new Error(\"Point is not on curve\");const t=l(e);let o=r.sqrt(t);return!(1&~n)!==((o&_i)===_i)&&(o=r.neg(o)),{x:e,y:o}}}}),f=e=>Ks(Xs(e,t.nByteLength));function p(e){return e>n>>_i}const h=(e,t,r)=>Ys(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=ei(\"compactSignature\",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Wi.toSig(ei(\"DER\",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!d(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(ei(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const d=1&s?\"03\":\"02\",p=c.fromHex(d+f(l)),h=a(l),g=i(-u*h),y=i(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Zs(this.toDERHex())}toDERHex(){return Wi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Zs(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=Ei(t.n);return function(e,t,r=!1){const n=e.length,o=Ai(t),s=Ei(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const i=gi(r?Ys(e):Js(e),t-ui)+ui;return r?Qs(i,o):Xs(i,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=e instanceof Uint8Array,r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=Ys(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return i(b(e))},v=ri(t.nBitLength);function T(e){if(\"bigint\"!=typeof e)throw new Error(\"bigint expected\");if(!(xi<=e&&e<v))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Xs(e,t.nByteLength)}function A(e,n,o=E){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=ei(\"msgHash\",e),h&&(e=ei(\"prehashed msgHash\",s(e)));const m=w(e),v=u(n),A=[T(v),T(m)];if(null!=y){const e=!0===y?l(r.BYTES):y;A.push(ei(\"extraEntropy\",e))}const P=ti(...A),B=m;return{seed:P,k2sig:function(e){const t=b(e);if(!d(t))return;const r=a(t),n=c.BASE.multiply(t).toAffine(),o=i(n.x);if(o===xi)return;const s=i(r*i(B+o*v));if(s===xi)return;let u=(n.x===o?0:2)|Number(n.y&_i),l=s;return f&&p(s)&&(l=function(e){return p(e)?i(-e):e}(s),u^=1),new g(o,l,u)}}}const E={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=E){const{seed:o,k2sig:s}=A(e,r,n),i=t;return si(i.hash.outputLen,i.nByteLength,i.hmac)(o,s)},verify:function(e,r,n,o=P){const s=e;if(r=ei(\"msgHash\",r),n=ei(\"publicKey\",n),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const{lowS:u,prehash:l}=o;let d,f;try{if(\"string\"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof Wi.Err))throw e;d=g.fromCompact(s)}else{if(\"object\"!=typeof s||\"bigint\"!=typeof s.r||\"bigint\"!=typeof s.s)throw new Error(\"PARSE\");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if(\"PARSE\"===e.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=a(h),b=i(y*m),v=i(p*m),T=c.BASE.multiplyAndAddUnsafe(f,b,v)?.toAffine();return!!T&&i(T.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function Fi(e){return{hash:e,hmac:(t,...r)=>ro(e,t,function(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!jn(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}(...r)),randomBytes:eo}}const Mi=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),Ni=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),Ui=BigInt(1),Di=BigInt(2),Li=(e,t)=>(e+t/Di)/t;function $i(e){const t=Mi,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=mi(l,r,t)*l%t,f=mi(d,r,t)*l%t,p=mi(f,Di,t)*u%t,h=mi(p,o,t)*p%t,g=mi(h,s,t)*h%t,y=mi(g,a,t)*g%t,m=mi(y,c,t)*y%t,b=mi(m,a,t)*g%t,w=mi(b,r,t)*l%t,v=mi(w,i,t)*h%t,T=mi(v,n,t)*u%t,A=mi(T,Di,t);if(!zi.eql(zi.sqr(A),e))throw new Error(\"Cannot find square root\");return A}const zi=function(e,t,r=!1,n={}){if(e<=ci)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=Ti(e,t);if(s>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const i=wi(e),a=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:ri(o),ZERO:ci,ONE:ui,create:t=>gi(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"Invalid field element: expected bigint, got \"+typeof t);return ci<=t&&t<e},is0:e=>e===ci,isOdd:e=>(e&ui)===ui,neg:t=>gi(-t,e),eql:(e,t)=>e===t,sqr:t=>gi(t*t,e),add:(t,r)=>gi(t+r,e),sub:(t,r)=>gi(t-r,e),mul:(t,r)=>gi(t*r,e),pow:(e,t)=>function(e,t,r){if(r<ci)throw new Error(\"Expected power > 0\");if(r===ci)return e.ONE;if(r===ui)return t;let n=e.ONE,o=t;for(;r>ci;)r&ui&&(n=e.mul(n,o)),o=e.sqr(o),r>>=ui;return n}(a,e,t),div:(t,r)=>gi(t*bi(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>bi(t,e),sqrt:n.sqrt||(e=>i(a,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),o=e.inv(n);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),o),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Qs(e,s):Xs(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Js(e):Ys(e)}});return Object.freeze(a)}(Mi,void 0,void 0,{sqrt:$i}),ji=function(e,t){const r=t=>Oi({...e,...Fi(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:zi,n:Ni,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=Ni,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-Ui*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),o=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,i=BigInt(\"0x100000000000000000000000000000000\"),a=Li(s*e,t),c=Li(-n*e,t);let u=gi(e-a*r-c*o,t),l=gi(-a*n-c*s,t);const d=u>i,f=l>i;if(d&&(u=t-u),f&&(l=t-l),u>i||l>i)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},ho);BigInt(0);ji.ProjectivePoint;class Vi{#d;constructor(e){Jr(32===dn(e),\"invalid private key\",\"privateKey\",\"[REDACTED]\"),this.#d=un(e)}get privateKey(){return this.#d}get publicKey(){return Vi.computePublicKey(this.#d)}get compressedPublicKey(){return Vi.computePublicKey(this.#d,!0)}sign(e){Jr(32===dn(e),\"invalid digest length\",\"digest\",e);const t=ji.sign(on(e),on(this.#d),{lowS:!0});return Mn.from({r:Bn(t.r,32),s:Bn(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=Vi.computePublicKey(e);return un(ji.getSharedSecret(on(this.#d),nn(t),!1))}static computePublicKey(e,t){let r=nn(e,\"key\");if(32===r.length){return un(ji.getPublicKey(r,!!t))}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return un(ji.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){Jr(32===dn(e),\"invalid digest length\",\"digest\",e);const r=Mn.from(t);let n=ji.Signature.fromCompact(on(ln([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(on(e));return Jr(null!=o,\"invalid signautre for digest\",\"signature\",t),\"0x\"+o.toHex(!1)}static addPoints(e,t,r){const n=ji.ProjectivePoint.fromHex(Vi.computePublicKey(e).substring(2)),o=ji.ProjectivePoint.fromHex(Vi.computePublicKey(t).substring(2));return\"0x\"+n.add(o).toHex(!!r)}}function Hi(e){let t;return t=\"string\"==typeof e?Vi.computePublicKey(e,!1):e.publicKey,zs(gs(\"0x\"+t.substring(4)).substring(26))}function Gi(e,t){return Hi(Vi.recoverPublicKey(e,t))}const Ki=32,qi=new Uint8Array(Ki),Zi=[\"then\"],Yi={},Ji=new WeakMap;function Xi(e){return Ji.get(e)}function Qi(e,t){Ji.set(e,t)}function ea(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function ta(e,t,r){return e.indexOf(null)>=0?t.map((e,t)=>e instanceof ra?ta(Xi(e),e,r):e):e.reduce((e,n,o)=>{let s=t.getValue(n);return n in e||(r&&s instanceof ra&&(s=ta(Xi(s),s,r)),e[n]=s),e},{})}class ra extends Array{#f;constructor(...e){const t=e[0];let r=e[1],n=(e[2]||[]).slice(),o=!0;t!==Yi&&(r=e,n=[],o=!1),super(r.length),r.forEach((e,t)=>{this[t]=e});const s=n.reduce((e,t)=>(\"string\"==typeof t&&e.set(t,(e.get(t)||0)+1),e),new Map);if(Qi(this,Object.freeze(r.map((e,t)=>{const r=n[t];return null!=r&&1===s.get(r)?r:null}))),this.#f=[],null==this.#f&&this.#f,!o)return;Object.freeze(this);const i=new Proxy(this,{get:(e,t,r)=>{if(\"string\"==typeof t){if(t.match(/^[0-9]+$/)){const r=Pn(t,\"%index\");if(r<0||r>=this.length)throw new RangeError(\"out of result range\");const n=e[r];return n instanceof Error&&ea(`index ${r}`,n),n}if(Zi.indexOf(t)>=0)return Reflect.get(e,t,r);const n=e[t];if(n instanceof Function)return function(...t){return n.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return Qi(i,Xi(this)),i}toArray(e){const t=[];return this.forEach((r,n)=>{r instanceof Error&&ea(`index ${n}`,r),e&&r instanceof ra&&(r=r.toArray(e)),t.push(r)}),t}toObject(e){const t=Xi(this);return t.reduce((r,n,o)=>(Yr(null!=n,`value at index ${o} unnamed`,\"UNSUPPORTED_OPERATION\",{operation:\"toObject()\"}),ta(t,this,e)),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=Xi(this),n=[],o=[];for(let s=e;s<t;s++)n.push(this[s]),o.push(r[s]);return new ra(Yi,n,o)}filter(e,t){const r=Xi(this),n=[],o=[];for(let s=0;s<this.length;s++){const i=this[s];i instanceof Error&&ea(`index ${s}`,i),e.call(t,i,s,this)&&(n.push(i),o.push(r[s]))}return new ra(Yi,n,o)}map(e,t){const r=[];for(let n=0;n<this.length;n++){const o=this[n];o instanceof Error&&ea(`index ${n}`,o),r.push(e.call(t,o,n,this))}return r}getValue(e){const t=Xi(this).indexOf(e);if(-1===t)return;const r=this[t];return r instanceof Error&&ea(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new ra(Yi,e,t)}}function na(e){let t=Cn(e);return Yr(t.length<=Ki,\"value out-of-bounds\",\"BUFFER_OVERRUN\",{buffer:t,length:Ki,offset:t.length}),t.length!==Ki&&(t=on(ln([qi.slice(t.length%Ki),t]))),t}class oa{name;type;localName;dynamic;constructor(e,t,r,n){Gr(this,{name:e,type:t,localName:r,dynamic:n},{name:\"string\",type:\"string\",localName:\"string\",dynamic:\"boolean\"})}_throwError(e,t){Jr(!1,e,this.localName,t)}}class sa{#a;#p;constructor(){this.#a=[],this.#p=0}get data(){return ln(this.#a)}get length(){return this.#p}#h(e){return this.#a.push(e),this.#p+=e.length,e.length}appendWriter(e){return this.#h(on(e.data))}writeBytes(e){let t=on(e);const r=t.length%Ki;return r&&(t=on(ln([t,qi.slice(r)]))),this.#h(t)}writeValue(e){return this.#h(na(e))}writeUpdatableValue(){const e=this.#a.length;return this.#a.push(qi),this.#p+=Ki,t=>{this.#a[e]=na(t)}}}class ia{allowLoose;#a;#g;#y;#m;#b;constructor(e,t,r){Gr(this,{allowLoose:!!t}),this.#a=on(e),this.#y=0,this.#m=null,this.#b=null!=r?r:1024,this.#g=0}get data(){return un(this.#a)}get dataLength(){return this.#a.length}get consumed(){return this.#g}get bytes(){return new Uint8Array(this.#a)}#w(e){if(this.#m)return this.#m.#w(e);this.#y+=e,Yr(this.#b<1||this.#y<=this.#b*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#b} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,\"BUFFER_OVERRUN\",{buffer:on(this.#a),offset:this.#g,length:e,info:{bytesRead:this.#y,dataLength:this.dataLength}})}#v(e,t,r){let n=Math.ceil(t/Ki)*Ki;return this.#g+n>this.#a.length&&(this.allowLoose&&r&&this.#g+t<=this.#a.length?n=t:Yr(!1,\"data out-of-bounds\",\"BUFFER_OVERRUN\",{buffer:on(this.#a),length:this.#a.length,offset:this.#g+n})),this.#a.slice(this.#g,this.#g+n)}subReader(e){const t=new ia(this.#a.slice(this.#g+e),this.allowLoose,this.#b);return t.#m=this,t}readBytes(e,t){let r=this.#v(0,e,!!t);return this.#w(e),this.#g+=r.length,r.slice(0,e)}readValue(){return En(this.readBytes(Ki))}readIndex(){return Pn(En(this.readBytes(Ki)))}}const aa={};function ca(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new da(aa,`${r?\"\":\"u\"}int${t}`,e,{signed:r,width:t})}function ua(e,t){return new da(aa,`bytes${t||\"\"}`,e,{size:t})}const la=Symbol.for(\"_ethers_typed\");class da{type;value;#T;_typedSymbol;constructor(e,t,r,n){null==n&&(n=null),tn(aa,e,\"Typed\"),Gr(this,{_typedSymbol:la,type:t,value:r}),this.#T=n,this.format()}format(){if(\"array\"===this.type)throw new Error(\"\");if(\"dynamicArray\"===this.type)throw new Error(\"\");return\"tuple\"===this.type?`tuple(${this.value.map(e=>e.format()).join(\",\")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith(\"bytes\")}isString(){return\"string\"===this.type}get tupleName(){if(\"tuple\"!==this.type)throw TypeError(\"not a tuple\");return this.#T}get arrayLength(){if(\"array\"!==this.type)throw TypeError(\"not an array\");return!0===this.#T?-1:!1===this.#T?this.value.length:null}static from(e,t){return new da(aa,e,t)}static uint8(e){return ca(e,8)}static uint16(e){return ca(e,16)}static uint24(e){return ca(e,24)}static uint32(e){return ca(e,32)}static uint40(e){return ca(e,40)}static uint48(e){return ca(e,48)}static uint56(e){return ca(e,56)}static uint64(e){return ca(e,64)}static uint72(e){return ca(e,72)}static uint80(e){return ca(e,80)}static uint88(e){return ca(e,88)}static uint96(e){return ca(e,96)}static uint104(e){return ca(e,104)}static uint112(e){return ca(e,112)}static uint120(e){return ca(e,120)}static uint128(e){return ca(e,128)}static uint136(e){return ca(e,136)}static uint144(e){return ca(e,144)}static uint152(e){return ca(e,152)}static uint160(e){return ca(e,160)}static uint168(e){return ca(e,168)}static uint176(e){return ca(e,176)}static uint184(e){return ca(e,184)}static uint192(e){return ca(e,192)}static uint200(e){return ca(e,200)}static uint208(e){return ca(e,208)}static uint216(e){return ca(e,216)}static uint224(e){return ca(e,224)}static uint232(e){return ca(e,232)}static uint240(e){return ca(e,240)}static uint248(e){return ca(e,248)}static uint256(e){return ca(e,256)}static uint(e){return ca(e,256)}static int8(e){return ca(e,-8)}static int16(e){return ca(e,-16)}static int24(e){return ca(e,-24)}static int32(e){return ca(e,-32)}static int40(e){return ca(e,-40)}static int48(e){return ca(e,-48)}static int56(e){return ca(e,-56)}static int64(e){return ca(e,-64)}static int72(e){return ca(e,-72)}static int80(e){return ca(e,-80)}static int88(e){return ca(e,-88)}static int96(e){return ca(e,-96)}static int104(e){return ca(e,-104)}static int112(e){return ca(e,-112)}static int120(e){return ca(e,-120)}static int128(e){return ca(e,-128)}static int136(e){return ca(e,-136)}static int144(e){return ca(e,-144)}static int152(e){return ca(e,-152)}static int160(e){return ca(e,-160)}static int168(e){return ca(e,-168)}static int176(e){return ca(e,-176)}static int184(e){return ca(e,-184)}static int192(e){return ca(e,-192)}static int200(e){return ca(e,-200)}static int208(e){return ca(e,-208)}static int216(e){return ca(e,-216)}static int224(e){return ca(e,-224)}static int232(e){return ca(e,-232)}static int240(e){return ca(e,-240)}static int248(e){return ca(e,-248)}static int256(e){return ca(e,-256)}static int(e){return ca(e,-256)}static bytes1(e){return ua(e,1)}static bytes2(e){return ua(e,2)}static bytes3(e){return ua(e,3)}static bytes4(e){return ua(e,4)}static bytes5(e){return ua(e,5)}static bytes6(e){return ua(e,6)}static bytes7(e){return ua(e,7)}static bytes8(e){return ua(e,8)}static bytes9(e){return ua(e,9)}static bytes10(e){return ua(e,10)}static bytes11(e){return ua(e,11)}static bytes12(e){return ua(e,12)}static bytes13(e){return ua(e,13)}static bytes14(e){return ua(e,14)}static bytes15(e){return ua(e,15)}static bytes16(e){return ua(e,16)}static bytes17(e){return ua(e,17)}static bytes18(e){return ua(e,18)}static bytes19(e){return ua(e,19)}static bytes20(e){return ua(e,20)}static bytes21(e){return ua(e,21)}static bytes22(e){return ua(e,22)}static bytes23(e){return ua(e,23)}static bytes24(e){return ua(e,24)}static bytes25(e){return ua(e,25)}static bytes26(e){return ua(e,26)}static bytes27(e){return ua(e,27)}static bytes28(e){return ua(e,28)}static bytes29(e){return ua(e,29)}static bytes30(e){return ua(e,30)}static bytes31(e){return ua(e,31)}static bytes32(e){return ua(e,32)}static address(e){return new da(aa,\"address\",e)}static bool(e){return new da(aa,\"bool\",!!e)}static bytes(e){return new da(aa,\"bytes\",e)}static string(e){return new da(aa,\"string\",e)}static array(e,t){throw new Error(\"not implemented yet\")}static tuple(e,t){throw new Error(\"not implemented yet\")}static overrides(e){return new da(aa,\"overrides\",Object.assign({},e))}static isTyped(e){return e&&\"object\"==typeof e&&\"_typedSymbol\"in e&&e._typedSymbol===la}static dereference(e,t){if(da.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class fa extends oa{constructor(e){super(\"address\",\"address\",e,!1)}defaultValue(){return\"0x0000000000000000000000000000000000000000\"}encode(e,t){let r=da.dereference(t,\"string\");try{r=zs(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return zs(Bn(e.readValue(),20))}}class pa extends oa{coder;constructor(e){super(e.name,e.type,\"_\",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function ha(e,t,r){let n=[];if(Array.isArray(r))n=r;else if(r&&\"object\"==typeof r){let e={};n=t.map(t=>{const n=t.localName;return Yr(n,\"cannot encode object for signature with missing names\",\"INVALID_ARGUMENT\",{argument:\"values\",info:{coder:t},value:r}),Yr(!e[n],\"cannot encode object for signature with duplicate names\",\"INVALID_ARGUMENT\",{argument:\"values\",info:{coder:t},value:r}),e[n]=!0,r[n]})}else Jr(!1,\"invalid tuple value\",\"tuple\",r);Jr(t.length===n.length,\"types/value length mismatch\",\"tuple\",r);let o=new sa,s=new sa,i=[];t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=o.writeUpdatableValue();i.push(e=>{n(e+t)})}else e.encode(o,r)}),i.forEach(e=>{e(o.length)});let a=e.appendWriter(o);return a+=e.appendWriter(s),a}function ga(e,t){let r=[],n=[],o=e.subReader(0);return t.forEach(t=>{let s=null;if(t.dynamic){let r=e.readIndex(),n=o.subReader(r);try{s=t.decode(n)}catch(e){if(qr(e,\"BUFFER_OVERRUN\"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}}else try{s=t.decode(e)}catch(e){if(qr(e,\"BUFFER_OVERRUN\"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}if(null==s)throw new Error(\"investigate\");r.push(s),n.push(t.localName||null)}),ra.fromItems(r,n)}class ya extends oa{coder;length;constructor(e,t,r){super(\"array\",e.type+\"[\"+(t>=0?t:\"\")+\"]\",r,-1===t||e.dynamic),Gr(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){const r=da.dereference(t,\"array\");Array.isArray(r)||this._throwError(\"expected array value\",r);let n=this.length;-1===n&&(n=r.length,e.writeValue(r.length)),Xr(r.length,n,\"coder array\"+(this.localName?\" \"+this.localName:\"\"));let o=[];for(let e=0;e<r.length;e++)o.push(this.coder);return ha(e,o,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),Yr(t*Ki<=e.dataLength,\"insufficient data length\",\"BUFFER_OVERRUN\",{buffer:e.bytes,offset:t*Ki,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new pa(this.coder));return ga(e,r)}}class ma extends oa{constructor(e){super(\"bool\",\"bool\",e,!1)}defaultValue(){return!1}encode(e,t){const r=da.dereference(t,\"bool\");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}class ba extends oa{constructor(e,t){super(e,e,t,!0)}defaultValue(){return\"0x\"}encode(e,t){t=on(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}class wa extends ba{constructor(e){super(\"bytes\",e)}decode(e){return un(super.decode(e))}}class va extends oa{size;constructor(e,t){let r=\"bytes\"+String(e);super(r,r,t,!1),Gr(this,{size:e},{size:\"number\"})}defaultValue(){return\"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0,2+2*this.size)}encode(e,t){let r=on(da.dereference(t,this.type));return r.length!==this.size&&this._throwError(\"incorrect data length\",t),e.writeBytes(r)}decode(e){return un(e.readBytes(this.size))}}const Ta=new Uint8Array([]);class Aa extends oa{constructor(e){super(\"null\",\"\",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError(\"not null\",t),e.writeBytes(Ta)}decode(e){return e.readBytes(0),null}}const Ea=BigInt(0),Pa=BigInt(1),Ba=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");class Ca extends oa{size;signed;constructor(e,t,r){const n=(t?\"int\":\"uint\")+8*e;super(n,n,r,!1),Gr(this,{size:e,signed:t},{size:\"number\",signed:\"boolean\"})}defaultValue(){return 0}encode(e,t){let r=vn(da.dereference(t,this.type)),n=wn(Ba,256);if(this.signed){let e=wn(n,8*this.size-1);(r>e||r<-(e+Pa))&&this._throwError(\"value out-of-bounds\",t),r=bn(r,256)}else(r<Ea||r>wn(n,8*this.size))&&this._throwError(\"value out-of-bounds\",t);return e.writeValue(r)}decode(e){let t=wn(e.readValue(),8*this.size);return this.signed&&(t=function(e,t){const r=Tn(e,\"value\"),n=BigInt(Pn(t,\"width\"));if(Yr(r>>n===gn,\"overflow\",\"NUMERIC_FAULT\",{operation:\"fromTwos\",fault:\"overflow\",value:e}),r>>n-yn)return-((~r&(yn<<n)-yn)+yn);return r}(t,8*this.size)),t}}class Ia extends ba{constructor(e){super(\"string\",e)}defaultValue(){return\"\"}encode(e,t){return super.encode(e,qo(da.dereference(t,\"string\")))}decode(e){return Zo(super.decode(e))}}class Sa extends oa{coders;constructor(e,t){let r=!1;const n=[];e.forEach(e=>{e.dynamic&&(r=!0),n.push(e.type)});super(\"tuple\",\"tuple(\"+n.join(\",\")+\")\",t,r),Gr(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});const t=this.coders.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e},{});return this.coders.forEach((r,n)=>{let o=r.localName;o&&1===t[o]&&(\"length\"===o&&(o=\"_length\"),null==e[o]&&(e[o]=e[n]))}),Object.freeze(e)}encode(e,t){const r=da.dereference(t,\"tuple\");return ha(e,this.coders,r)}decode(e){return ga(e,this.coders)}}function Wa(e){const t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}Wa(\"external public payable override\".split(\" \"));const xa=\"constant external internal payable private public pure view override\",_a=(Wa(xa.split(\" \")),\"constructor error event fallback function receive struct\"),Ra=(Wa(_a.split(\" \")),\"calldata memory storage payable indexed\"),ka=Wa(Ra.split(\" \")),Oa=Wa([_a,Ra,\"tuple returns\",xa].join(\" \").split(\" \")),Fa={\"(\":\"OPEN_PAREN\",\")\":\"CLOSE_PAREN\",\"[\":\"OPEN_BRACKET\",\"]\":\"CLOSE_BRACKET\",\",\":\"COMMA\",\"@\":\"AT\"},Ma=new RegExp(\"^(\\\\s*)\"),Na=new RegExp(\"^([0-9]+)\"),Ua=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\"),Da=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\"),La=new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");class $a{#g;#A;get offset(){return this.#g}get length(){return this.#A.length-this.#g}constructor(e){this.#g=0,this.#A=e.slice()}clone(){return new $a(this.#A)}reset(){this.#g=0}#E(e=0,t=0){return new $a(this.#A.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){const t=this.peek();if(\"KEYWORD\"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=this.#E(this.#g+1,e.match+1);return this.#g=e.match+1,t}popParams(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=[];for(;this.#g<e.match-1;){const e=this.peek().linkNext;t.push(this.#E(this.#g+1,e)),this.#g=e}return this.#g=e.match+1,t}peek(){if(this.#g>=this.#A.length)throw new Error(\"out-of-bounds\");return this.#A[this.#g]}peekKeyword(e){const t=this.peekType(\"KEYWORD\");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#g++,e}toString(){const e=[];for(let t=this.#g;t<this.#A.length;t++){const r=this.#A[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(\" \")}>`}}function za(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):\"$EOI\";throw new Error(`invalid token ${r} at ${s}: ${t}`)};let n=[],o=[],s=0;for(;s<e.length;){let i=e.substring(s),a=i.match(Ma);a&&(s+=a[1].length,i=e.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:\"\",text:\"\",offset:s,value:-1};t.push(c);let u=Fa[i[0]]||\"\";if(u){if(c.type=u,c.text=i[0],s++,\"OPEN_PAREN\"===u)n.push(t.length-1),o.push(t.length-1);else if(\"CLOSE_PAREN\"==u)0===n.length&&r(\"no matching open bracket\"),c.match=n.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if(\"COMMA\"===u)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if(\"OPEN_BRACKET\"===u)c.type=\"BRACKET\";else if(\"CLOSE_BRACKET\"===u){let e=t.pop().text;if(t.length>0&&\"NUMBER\"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=Pn(r)}if(0===t.length||\"BRACKET\"!==t[t.length-1].type)throw new Error(\"missing opening bracket\");t[t.length-1].text+=e}}else if(a=i.match(Ua),a){if(c.text=a[1],s+=c.text.length,Oa.has(c.text)){c.type=\"KEYWORD\";continue}if(c.text.match(La)){c.type=\"TYPE\";continue}c.type=\"ID\"}else{if(a=i.match(Na),!a)throw new Error(`unexpected token ${JSON.stringify(i[0])} at position ${s}`);c.text=a[1],c.type=\"NUMBER\",s+=c.text.length}}return new $a(t.map(e=>Object.freeze(e)))}function ja(e,t){const r=new Set;for(;;){const n=e.peekType(\"KEYWORD\");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}const Va=new RegExp(/^(.*)\\[([0-9]*)\\]$/);function Ha(e){const t=e.match(La);if(Jr(t,\"invalid type\",\"type\",e),\"uint\"===e)return\"uint256\";if(\"int\"===e)return\"int256\";if(t[2]){const r=parseInt(t[2]);Jr(0!==r&&r<=32,\"invalid bytes length\",\"type\",e)}else if(t[3]){const r=parseInt(t[3]);Jr(0!==r&&r<=256&&r%8==0,\"invalid numeric width\",\"type\",e)}return e}const Ga={},Ka=Symbol.for(\"_ethers_internal\"),qa=\"_ParamTypeInternal\";class Za{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,i,a){if(tn(e,Ga,\"ParamType\"),Object.defineProperty(this,Ka,{value:qa}),s&&(s=Object.freeze(s.slice())),\"array\"===n){if(null==i||null==a)throw new Error(\"\")}else if(null!=i||null!=a)throw new Error(\"\");if(\"tuple\"===n){if(null==s)throw new Error(\"\")}else if(null!=s)throw new Error(\"\");Gr(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:i,arrayChildren:a})}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e){const t=this.name||\"\";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format(\"json\"));return e.name=t,e.type+=`[${this.arrayLength<0?\"\":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:\"tuple\"===this.baseType?\"tuple\":this.type,name:t};return\"boolean\"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(r)}let t=\"\";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?\"\":String(this.arrayLength)}]`):this.isTuple()?t+=\"(\"+this.components.map(t=>t.format(e)).join(\"full\"===e?\", \":\",\")+\")\":t+=this.type,\"sighash\"!==e&&(!0===this.indexed&&(t+=\" indexed\"),\"full\"===e&&this.name&&(t+=\" \"+this.name)),t}isArray(){return\"array\"===this.baseType}isTuple(){return\"tuple\"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error(\"array is wrong length\");const r=this;return e.map(e=>r.arrayChildren.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error(\"invalid tuple value\");if(e.length!==this.components.length)throw new Error(\"array is wrong length\");const r=this;return e.map((e,n)=>r.components[n].walk(e,t))}return t(this.type,e)}#P(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error(\"array is wrong length\");const o=this.arrayChildren,s=t.slice();return s.forEach((t,n)=>{o.#P(e,t,r,e=>{s[n]=e})}),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||\"object\"!=typeof t)throw new Error(\"invalid tuple value\");s=o.map(e=>{if(!e.name)throw new Error(\"cannot use object value with unnamed components\");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]})}if(s.length!==this.components.length)throw new Error(\"array is wrong length\");return s.forEach((t,n)=>{o[n].#P(e,t,r,e=>{s[n]=e})}),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#P(r,e,t,e=>{n[0]=e}),r.length&&await Promise.all(r),n[0]}static from(e,t){if(Za.isParamType(e))return e;if(\"string\"==typeof e)try{return Za.from(za(e),t)}catch(t){Jr(!1,\"invalid param type\",\"obj\",e)}else if(e instanceof $a){let r=\"\",n=\"\",o=null;ja(e,Wa([\"tuple\"])).has(\"tuple\")||e.peekType(\"OPEN_PAREN\")?(n=\"tuple\",o=e.popParams().map(e=>Za.from(e)),r=`tuple(${o.map(e=>e.format()).join(\",\")})`):(r=Ha(e.popType(\"TYPE\")),n=r);let s=null,i=null;for(;e.length&&e.peekType(\"BRACKET\");){const t=e.pop();s=new Za(Ga,\"\",r,n,null,o,i,s),i=t.value,r+=t.text,n=\"array\",o=null}let a=null;if(ja(e,ka).has(\"indexed\")){if(!t)throw new Error(\"\");a=!0}const c=e.peekType(\"ID\")?e.pop().text:\"\";if(e.length)throw new Error(\"leftover tokens\");return new Za(Ga,c,r,n,a,o,i,s)}const r=e.name;Jr(!r||\"string\"==typeof r&&r.match(Da),\"invalid name\",\"obj.name\",r);let n=e.indexed;null!=n&&(Jr(t,\"parameter cannot be indexed\",\"obj.indexed\",e.indexed),n=!!n);let o=e.type,s=o.match(Va);if(s){const t=parseInt(s[2]||\"-1\"),i=Za.from({type:s[1],components:e.components});return new Za(Ga,r||\"\",o,\"array\",n,null,t,i)}if(\"tuple\"===o||o.startsWith(\"tuple(\")||o.startsWith(\"(\")){const t=null!=e.components?e.components.map(e=>Za.from(e)):null;return new Za(Ga,r||\"\",o,\"tuple\",n,t,null,null)}return o=Ha(e.type),new Za(Ga,r||\"\",o,o,n,null,null,null)}static isParamType(e){return e&&e[Ka]===qa}}const Ya=new Map;Ya.set(0,\"GENERIC_PANIC\"),Ya.set(1,\"ASSERT_FALSE\"),Ya.set(17,\"OVERFLOW\"),Ya.set(18,\"DIVIDE_BY_ZERO\"),Ya.set(33,\"ENUM_RANGE_ERROR\"),Ya.set(34,\"BAD_STORAGE_DATA\"),Ya.set(49,\"STACK_UNDERFLOW\"),Ya.set(50,\"ARRAY_RANGE_ERROR\"),Ya.set(65,\"OUT_OF_MEMORY\"),Ya.set(81,\"UNINITIALIZED_FUNCTION_CALL\");const Ja=new RegExp(/^bytes([0-9]*)$/),Xa=new RegExp(/^(u?int)([0-9]*)$/);let Qa=null,ec=1024;class tc{#B(e){if(e.isArray())return new ya(this.#B(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new Sa(e.components.map(e=>this.#B(e)),e.name);switch(e.baseType){case\"address\":return new fa(e.name);case\"bool\":return new ma(e.name);case\"string\":return new Ia(e.name);case\"bytes\":return new wa(e.name);case\"\":return new Aa(e.name)}let t=e.type.match(Xa);if(t){let r=parseInt(t[2]||\"256\");return Jr(0!==r&&r<=256&&r%8==0,\"invalid \"+t[1]+\" bit length\",\"param\",e),new Ca(r/8,\"int\"===t[1],e.name)}if(t=e.type.match(Ja),t){let r=parseInt(t[1]);return Jr(0!==r&&r<=32,\"invalid bytes length\",\"param\",e),new va(r,e.name)}Jr(!1,\"invalid type\",\"type\",e.type)}getDefaultValue(e){const t=e.map(e=>this.#B(Za.from(e)));return new Sa(t,\"_\").defaultValue()}encode(e,t){Xr(t.length,e.length,\"types/values length mismatch\");const r=e.map(e=>this.#B(Za.from(e))),n=new Sa(r,\"_\"),o=new sa;return n.encode(o,t),o.data}decode(e,t,r){const n=e.map(e=>this.#B(Za.from(e)));return new Sa(n,\"_\").decode(new ia(t,r,ec))}static _setDefaultMaxInflation(e){Jr(\"number\"==typeof e&&Number.isInteger(e),\"invalid defaultMaxInflation factor\",\"value\",e),ec=e}static defaultAbiCoder(){return null==Qa&&(Qa=new tc),Qa}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let o=\"missing revert data\",s=null,i=null;if(r){o=\"execution reverted\";const e=nn(r);if(r=un(r),0===e.length)o+=\" (no data present; likely require(false) occurred\",s=\"require(false)\";else if(e.length%32!=4)o+=\" (could not decode reason; invalid data length)\";else if(\"0x08c379a0\"===un(e.slice(0,4)))try{s=n.decode([\"string\"],e.slice(4))[0],i={signature:\"Error(string)\",name:\"Error\",args:[s]},o+=`: ${JSON.stringify(s)}`}catch(e){o+=\" (could not decode reason; invalid string data)\"}else if(\"0x4e487b71\"===un(e.slice(0,4)))try{const t=Number(n.decode([\"uint256\"],e.slice(4))[0]);i={signature:\"Panic(uint256)\",name:\"Panic\",args:[t]},s=`Panic due to ${Ya.get(t)||\"UNKNOWN\"}(${t})`,o+=`: ${s}`}catch(e){o+=\" (could not decode panic code)\"}else o+=\" (unknown custom error)\"}const a={to:t.to?zs(t.to):null,data:t.data||\"0x\"};return t.from&&(a.from=zs(t.from)),Zr(o,\"CALL_EXCEPTION\",{action:e,data:r,reason:s,transaction:a,invocation:null,revert:i})}(e,t,r,tc.defaultAbiCoder())}}const rc=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),nc=Uint8Array.from({length:16},(e,t)=>t),oc=nc.map(e=>(9*e+5)%16);let sc=[nc],ic=[oc];for(let e=0;e<4;e++)for(let t of[sc,ic])t.push(t[e].map(e=>rc[e]));const ac=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),cc=sc.map((e,t)=>e.map(e=>ac[t][e])),uc=ic.map((e,t)=>e.map(e=>ac[t][e])),lc=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),dc=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),fc=(e,t)=>e<<t|e>>>32-t;function pc(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const hc=new Uint32Array(16);class gc extends io{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)hc[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,o=0|this.h1,s=o,i=0|this.h2,a=i,c=0|this.h3,u=c,l=0|this.h4,d=l;for(let e=0;e<5;e++){const t=4-e,f=lc[e],p=dc[e],h=sc[e],g=ic[e],y=cc[e],m=uc[e];for(let t=0;t<16;t++){const n=fc(r+pc(e,o,i,c)+hc[h[t]]+f,y[t])+l|0;r=l,l=c,c=0|fc(i,10),i=o,o=n}for(let e=0;e<16;e++){const r=fc(n+pc(t,s,a,u)+hc[g[e]]+p,m[e])+d|0;n=d,d=u,u=0|fc(a,10),a=s,s=r}}this.set(this.h1+i+u|0,this.h2+c+d|0,this.h3+l+n|0,this.h4+r+s|0,this.h0+o+a|0)}roundClean(){hc.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const yc=Qn(()=>new gc);let mc=!1;const bc=function(e){return yc(e)};let wc=bc;function vc(e){const t=nn(e,\"data\");return un(wc(t))}vc._=bc,vc.lock=function(){mc=!0},vc.register=function(e){if(mc)throw new TypeError(\"ripemd160 is locked\");wc=e},Object.freeze(vc);let Tc=!1;const Ac=function(e){return new Uint8Array(function(e){Yr(null!=_o,\"platform does not support secure random numbers\",\"UNSUPPORTED_OPERATION\",{operation:\"randomBytes\"}),Jr(Number.isInteger(e)&&e>0&&e<=1024,\"invalid length\",\"length\",e);const t=new Uint8Array(e);return _o.getRandomValues(t),t}(e))};let Ec=Ac;function Pc(e){return Ec(e)}async function Bc(e,t){const r=await t;return null!=r&&\"0x0000000000000000000000000000000000000000\"!==r||(Yr(\"string\"!=typeof e,\"unconfigured name\",\"UNCONFIGURED_NAME\",{value:e}),Jr(!1,\"invalid AddressLike value; did not resolve to a value address\",\"target\",e)),zs(r)}function Cc(e,t){return\"string\"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?zs(e):(Yr(null!=t,\"ENS resolution requires a provider\",\"UNSUPPORTED_OPERATION\",{operation:\"resolveName\"}),Bc(e,t.resolveName(e))):(r=e)&&\"function\"==typeof r.getAddress?Bc(e,e.getAddress()):e&&\"function\"==typeof e.then?Bc(e,e):void Jr(!1,\"unsupported addressable value\",\"target\",e);var r}Pc._=Ac,Pc.lock=function(){Tc=!0},Pc.register=function(e){if(Tc)throw new Error(\"randomBytes is locked\");Ec=e},Object.freeze(Pc);const Ic=\"0x0000000000000000000000000000000000000000\";function Sc(e){let t=e.toString(16);for(;t.length<2;)t=\"0\"+t;return\"0x\"+t}function Wc(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function xc(e,t,r,n){const o=[];for(;r<t+1+n;){const s=_c(e,r);o.push(s.result),Yr((r+=s.consumed)<=t+1+n,\"child data too short\",\"BUFFER_OVERRUN\",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:o}}function _c(e,t){Yr(0!==e.length,\"data too short\",\"BUFFER_OVERRUN\",{buffer:e,length:0,offset:1});const r=t=>{Yr(t<=e.length,\"data short segment too short\",\"BUFFER_OVERRUN\",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const o=Wc(e,t+1,n);return r(t+1+n+o),xc(e,t,t+1+n,n+o)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),xc(e,t,t+1,n)}if(e[t]>=184){const n=e[t]-183;r(t+1+n);const o=Wc(e,t+1,n);r(t+1+n+o);return{consumed:1+n+o,result:un(e.slice(t+1+n,t+1+n+o))}}if(e[t]>=128){const n=e[t]-128;r(t+1+n);return{consumed:1+n,result:un(e.slice(t+1,t+1+n))}}return{consumed:1,result:Sc(e[t])}}function Rc(e){const t=nn(e,\"data\"),r=_c(t,0);return Jr(r.consumed===t.length,\"unexpected junk after rlp payload\",\"data\",e),r.result}function kc(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Oc(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(Oc(e))}),t.length<=55)return t.unshift(192+t.length),t;const r=kc(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call(nn(e,\"object\"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=kc(t.length);return r.unshift(183+r.length),r.concat(t)}const Fc=\"0123456789abcdef\";function Mc(e){let t=\"0x\";for(const r of Oc(e))t+=Fc[r>>4],t+=Fc[15&r];return t}function Nc(e,t){return{address:zs(e),storageKeys:t.map((e,t)=>(Jr(sn(e,32),\"invalid slot\",`storageKeys[${t}]`,e),e.toLowerCase()))}}function Uc(e){if(Array.isArray(e))return e.map((t,r)=>Array.isArray(t)?(Jr(2===t.length,\"invalid slot set\",`value[${r}]`,t),Nc(t[0],t[1])):(Jr(null!=t&&\"object\"==typeof t,\"invalid address-slot set\",\"value\",e),Nc(t.address,t.storageKeys)));Jr(null!=e&&\"object\"==typeof e,\"invalid access list\",\"value\",e);const t=Object.keys(e).map(t=>{const r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return Nc(t,Object.keys(r).sort())});return t.sort((e,t)=>e.address.localeCompare(t.address)),t}const Dc=BigInt(0),Lc=BigInt(2),$c=BigInt(27),zc=BigInt(28),jc=BigInt(35),Vc=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),Hc=131072;function Gc(e,t){let r=e.toString(16);for(;r.length<2;)r=\"0\"+r;return r+=Do(t).substring(4),\"0x\"+r}function Kc(e){return\"0x\"===e?null:zs(e)}function qc(e,t){try{return Uc(e)}catch(r){Jr(!1,r.message,t,e)}}function Zc(e,t){return\"0x\"===e?0:Pn(e,t)}function Yc(e,t){if(\"0x\"===e)return Dc;const r=vn(e,t);return Jr(r<=Vc,\"value exceeds uint size\",t,r),r}function Jc(e,t){const r=vn(e,\"value\"),n=Cn(r);return Jr(n.length<=32,\"value too large\",`tx.${t}`,r),n}function Xc(e){return Uc(e).map(e=>[e.address,e.storageKeys])}function Qc(e,t){Jr(Array.isArray(e),`invalid ${t}`,\"value\",e);for(let t=0;t<e.length;t++)Jr(sn(e[t],32),\"invalid ${ param } hash\",`value[${t}]`,e[t]);return e}function eu(e,t){let r;try{if(r=Zc(t[0],\"yParity\"),0!==r&&1!==r)throw new Error(\"bad yParity\")}catch(e){Jr(!1,\"invalid yParity\",\"yParity\",t[0])}const n=hn(t[1],32),o=hn(t[2],32),s=Mn.from({r:n,s:o,yParity:r});e.signature=s}class tu{#C;#I;#a;#S;#W;#x;#_;#R;#k;#O;#F;#M;#N;#U;#D;#L;get type(){return this.#C}set type(e){switch(e){case null:this.#C=null;break;case 0:case\"legacy\":this.#C=0;break;case 1:case\"berlin\":case\"eip-2930\":this.#C=1;break;case 2:case\"london\":case\"eip-1559\":this.#C=2;break;case 3:case\"cancun\":case\"eip-4844\":this.#C=3;break;default:Jr(!1,\"unsupported transaction type\",\"type\",e)}}get typeName(){switch(this.type){case 0:return\"legacy\";case 1:return\"eip-2930\";case 2:return\"eip-1559\";case 3:return\"eip-4844\"}return null}get to(){const e=this.#I;return null==e&&3===this.type?Ic:e}set to(e){this.#I=null==e?null:zs(e)}get nonce(){return this.#S}set nonce(e){this.#S=Pn(e,\"value\")}get gasLimit(){return this.#W}set gasLimit(e){this.#W=vn(e)}get gasPrice(){const e=this.#x;return null!=e||0!==this.type&&1!==this.type?e:Dc}set gasPrice(e){this.#x=null==e?null:vn(e,\"gasPrice\")}get maxPriorityFeePerGas(){const e=this.#_;return e??(2===this.type||3===this.type?Dc:null)}set maxPriorityFeePerGas(e){this.#_=null==e?null:vn(e,\"maxPriorityFeePerGas\")}get maxFeePerGas(){const e=this.#R;return e??(2===this.type||3===this.type?Dc:null)}set maxFeePerGas(e){this.#R=null==e?null:vn(e,\"maxFeePerGas\")}get data(){return this.#a}set data(e){this.#a=un(e)}get value(){return this.#k}set value(e){this.#k=vn(e,\"value\")}get chainId(){return this.#O}set chainId(e){this.#O=vn(e)}get signature(){return this.#F||null}set signature(e){this.#F=null==e?null:Mn.from(e)}get accessList(){const e=this.#M||null;return e??(1===this.type||2===this.type||3===this.type?[]:null)}set accessList(e){this.#M=null==e?null:Uc(e)}get maxFeePerBlobGas(){const e=this.#N;return null==e&&3===this.type?Dc:e}set maxFeePerBlobGas(e){this.#N=null==e?null:vn(e,\"maxFeePerBlobGas\")}get blobVersionedHashes(){let e=this.#U;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){Jr(Array.isArray(e),\"blobVersionedHashes must be an Array\",\"value\",e),e=e.slice();for(let t=0;t<e.length;t++)Jr(sn(e[t],32),\"invalid blobVersionedHash\",`value[${t}]`,e[t])}this.#U=e}get blobs(){return null==this.#L?null:this.#L.map(e=>Object.assign({},e))}set blobs(e){if(null==e)return void(this.#L=null);const t=[],r=[];for(let n=0;n<e.length;n++){const o=e[n];if(an(o)){Yr(this.#D,\"adding a raw blob requires a KZG library\",\"UNSUPPORTED_OPERATION\",{operation:\"set blobs()\"});let e=nn(o);if(Jr(e.length<=Hc,\"blob is too large\",`blobs[${n}]`,o),e.length!==Hc){const t=new Uint8Array(Hc);t.set(e),e=t}const s=this.#D.blobToKzgCommitment(e),i=un(this.#D.computeBlobKzgProof(e,s));t.push({data:un(e),commitment:un(s),proof:i}),r.push(Gc(1,s))}else{const e=un(o.commitment);t.push({data:un(o.data),commitment:e,proof:un(o.proof)}),r.push(Gc(1,e))}}this.#L=t,this.#U=r}get kzg(){return this.#D}set kzg(e){this.#D=e}constructor(){this.#C=null,this.#I=null,this.#S=0,this.#W=Dc,this.#x=null,this.#_=null,this.#R=null,this.#a=\"0x\",this.#k=Dc,this.#O=Dc,this.#F=null,this.#M=null,this.#N=null,this.#U=null,this.#L=null,this.#D=null}get hash(){return null==this.signature?null:gs(this.#$(!0,!1))}get unsignedHash(){return gs(this.unsignedSerialized)}get from(){return null==this.signature?null:Gi(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:Vi.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#$(e,t){Yr(!e||null!=this.signature,\"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\",\"UNSUPPORTED_OPERATION\",{operation:\".serialized\"});const r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const r=[Jc(e.nonce,\"nonce\"),Jc(e.gasPrice||0,\"gasPrice\"),Jc(e.gasLimit,\"gasLimit\"),e.to||\"0x\",Jc(e.value,\"value\"),e.data];let n=Dc;if(e.chainId!=Dc)n=vn(e.chainId,\"tx.chainId\"),Jr(!t||null==t.networkV||t.legacyChainId===n,\"tx.chainId/sig.v mismatch\",\"sig\",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==Dc&&(r.push(Cn(n)),r.push(\"0x\"),r.push(\"0x\")),Mc(r);let o=BigInt(27+t.yParity);return n!==Dc?o=Mn.getChainIdV(n,t.v):BigInt(t.v)!==o&&Jr(!1,\"tx.chainId/sig.v mismatch\",\"sig\",t),r.push(Cn(o)),r.push(Cn(t.r)),r.push(Cn(t.s)),Mc(r)}(this,r);case 1:return function(e,t){const r=[Jc(e.chainId,\"chainId\"),Jc(e.nonce,\"nonce\"),Jc(e.gasPrice||0,\"gasPrice\"),Jc(e.gasLimit,\"gasLimit\"),e.to||\"0x\",Jc(e.value,\"value\"),e.data,Xc(e.accessList||[])];return t&&(r.push(Jc(t.yParity,\"recoveryParam\")),r.push(Cn(t.r)),r.push(Cn(t.s))),ln([\"0x01\",Mc(r)])}(this,r);case 2:return function(e,t){const r=[Jc(e.chainId,\"chainId\"),Jc(e.nonce,\"nonce\"),Jc(e.maxPriorityFeePerGas||0,\"maxPriorityFeePerGas\"),Jc(e.maxFeePerGas||0,\"maxFeePerGas\"),Jc(e.gasLimit,\"gasLimit\"),e.to||\"0x\",Jc(e.value,\"value\"),e.data,Xc(e.accessList||[])];return t&&(r.push(Jc(t.yParity,\"yParity\")),r.push(Cn(t.r)),r.push(Cn(t.s))),ln([\"0x02\",Mc(r)])}(this,r);case 3:return function(e,t,r){const n=[Jc(e.chainId,\"chainId\"),Jc(e.nonce,\"nonce\"),Jc(e.maxPriorityFeePerGas||0,\"maxPriorityFeePerGas\"),Jc(e.maxFeePerGas||0,\"maxFeePerGas\"),Jc(e.gasLimit,\"gasLimit\"),e.to||Ic,Jc(e.value,\"value\"),e.data,Xc(e.accessList||[]),Jc(e.maxFeePerBlobGas||0,\"maxFeePerBlobGas\"),Qc(e.blobVersionedHashes||[],\"blobVersionedHashes\")];return t&&(n.push(Jc(t.yParity,\"yParity\")),n.push(Cn(t.r)),n.push(Cn(t.s)),r)?ln([\"0x03\",Mc([n,r.map(e=>e.data),r.map(e=>e.commitment),r.map(e=>e.proof)])]):ln([\"0x03\",Mc(n)])}(this,r,t?this.blobs:null)}Yr(!1,\"unsupported transaction type\",\"UNSUPPORTED_OPERATION\",{operation:\".serialized\"})}get serialized(){return this.#$(!0,!0)}get unsignedSerialized(){return this.#$(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#N||this.#U;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&Yr(this.maxFeePerGas>=this.maxPriorityFeePerGas,\"priorityFee cannot be more than maxFee\",\"BAD_DATA\",{value:this}),Yr(!t||0!==this.type&&1!==this.type,\"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\",\"BAD_DATA\",{value:this}),Yr(0!==this.type||!r,\"legacy transaction cannot have accessList\",\"BAD_DATA\",{value:this});const o=[];return null!=this.type?o.push(this.type):t?o.push(2):e?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(n&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return tu.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new tu;if(\"string\"==typeof e){const t=nn(e);if(t[0]>=127)return tu.from(function(e){const t=Rc(e);Jr(Array.isArray(t)&&(9===t.length||6===t.length),\"invalid field count for legacy transaction\",\"data\",e);const r={type:0,nonce:Zc(t[0],\"nonce\"),gasPrice:Yc(t[1],\"gasPrice\"),gasLimit:Yc(t[2],\"gasLimit\"),to:Kc(t[3]),value:Yc(t[4],\"value\"),data:un(t[5]),chainId:Dc};if(6===t.length)return r;const n=Yc(t[6],\"v\"),o=Yc(t[7],\"r\"),s=Yc(t[8],\"s\");if(o===Dc&&s===Dc)r.chainId=n;else{let e=(n-jc)/Lc;e<Dc&&(e=Dc),r.chainId=e,Jr(e!==Dc||n===$c||n===zc,\"non-canonical legacy v\",\"v\",t[6]),r.signature=Mn.from({r:hn(t[7],32),s:hn(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return tu.from(function(e){const t=Rc(nn(e).slice(1));Jr(Array.isArray(t)&&(8===t.length||11===t.length),\"invalid field count for transaction type: 1\",\"data\",un(e));const r={type:1,chainId:Yc(t[0],\"chainId\"),nonce:Zc(t[1],\"nonce\"),gasPrice:Yc(t[2],\"gasPrice\"),gasLimit:Yc(t[3],\"gasLimit\"),to:Kc(t[4]),value:Yc(t[5],\"value\"),data:un(t[6]),accessList:qc(t[7],\"accessList\")};return 8===t.length||eu(r,t.slice(8)),r}(t));case 2:return tu.from(function(e){const t=Rc(nn(e).slice(1));Jr(Array.isArray(t)&&(9===t.length||12===t.length),\"invalid field count for transaction type: 2\",\"data\",un(e));const r={type:2,chainId:Yc(t[0],\"chainId\"),nonce:Zc(t[1],\"nonce\"),maxPriorityFeePerGas:Yc(t[2],\"maxPriorityFeePerGas\"),maxFeePerGas:Yc(t[3],\"maxFeePerGas\"),gasPrice:null,gasLimit:Yc(t[4],\"gasLimit\"),to:Kc(t[5]),value:Yc(t[6],\"value\"),data:un(t[7]),accessList:qc(t[8],\"accessList\")};return 9===t.length||eu(r,t.slice(9)),r}(t));case 3:return tu.from(function(e){let t=Rc(nn(e).slice(1)),r=\"3\",n=null;if(4===t.length&&Array.isArray(t[0])){r=\"3 (network format)\";const e=t[1],o=t[2],s=t[3];Jr(Array.isArray(e),\"invalid network format: blobs not an array\",\"fields[1]\",e),Jr(Array.isArray(o),\"invalid network format: commitments not an array\",\"fields[2]\",o),Jr(Array.isArray(s),\"invalid network format: proofs not an array\",\"fields[3]\",s),Jr(e.length===o.length,\"invalid network format: blobs/commitments length mismatch\",\"fields\",t),Jr(e.length===s.length,\"invalid network format: blobs/proofs length mismatch\",\"fields\",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:o[r],proof:s[r]});t=t[0]}Jr(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,\"data\",un(e));const o={type:3,chainId:Yc(t[0],\"chainId\"),nonce:Zc(t[1],\"nonce\"),maxPriorityFeePerGas:Yc(t[2],\"maxPriorityFeePerGas\"),maxFeePerGas:Yc(t[3],\"maxFeePerGas\"),gasPrice:null,gasLimit:Yc(t[4],\"gasLimit\"),to:Kc(t[5]),value:Yc(t[6],\"value\"),data:un(t[7]),accessList:qc(t[8],\"accessList\"),maxFeePerBlobGas:Yc(t[9],\"maxFeePerBlobGas\"),blobVersionedHashes:t[10]};n&&(o.blobs=n),Jr(null!=o.to,`invalid address for transaction type: ${r}`,\"data\",e),Jr(Array.isArray(o.blobVersionedHashes),\"invalid blobVersionedHashes: must be an array\",\"data\",e);for(let t=0;t<o.blobVersionedHashes.length;t++)Jr(sn(o.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,\"data\",e);return 11===t.length||eu(o,t.slice(11)),o}(t))}Yr(!1,\"unsupported transaction type\",\"UNSUPPORTED_OPERATION\",{operation:\"from\"})}const t=new tu;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=Mn.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&(Jr(t.isSigned(),\"unsigned transaction cannot define '.hash'\",\"tx\",e),Jr(t.hash===e.hash,\"hash mismatch\",\"tx\",e)),null!=e.from&&(Jr(t.isSigned(),\"unsigned transaction cannot define '.from'\",\"tx\",e),Jr(t.from.toLowerCase()===(e.from||\"\").toLowerCase(),\"from mismatch\",\"tx\",e)),t}}BigInt(0);function ru(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=un(e.data));const r=\"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);for(const n of r)n in e&&null!=e[n]&&(t[n]=vn(e[n],`request.${n}`));const n=\"type,nonce\".split(/,/);for(const r of n)r in e&&null!=e[r]&&(t[r]=Pn(e[r],`request.${r}`));return e.accessList&&(t.accessList=Uc(e.accessList)),\"blockTag\"in e&&(t.blockTag=e.blockTag),\"enableCcipRead\"in e&&(t.enableCcipRead=!!e.enableCcipRead),\"customData\"in e&&(t.customData=e.customData),\"blobVersionedHashes\"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),\"kzg\"in e&&(t.kzg=e.kzg),\"blobs\"in e&&e.blobs&&(t.blobs=e.blobs.map(e=>an(e)?un(e):Object.assign({},e))),t}Symbol.iterator;Symbol.iterator;function nu(e,t){if(e.provider)return e.provider;Yr(!1,\"missing provider\",\"UNSUPPORTED_OPERATION\",{operation:t})}async function ou(e,t){let r=ru(t);if(null!=r.to&&(r.to=Cc(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),Cc(t,e)]).then(([e,t])=>(Jr(e.toLowerCase()===t.toLowerCase(),\"transaction from mismatch\",\"tx.from\",t),e))}else r.from=e.getAddress();return await Hr(r)}class su{provider;constructor(e){Gr(this,{provider:e||null})}async getNonce(e){return nu(this,\"getTransactionCount\").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await ou(this,e)}async populateTransaction(e){const t=nu(this,\"populateTransaction\"),r=await ou(this,e);null==r.nonce&&(r.nonce=await this.getNonce(\"pending\")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){Jr(vn(r.chainId)===n.chainId,\"transaction chainId mismatch\",\"tx.chainId\",e.chainId)}else r.chainId=n.chainId;const o=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!o?0!==r.type&&1!==r.type||!o||Jr(!1,\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\",\"tx\",e):Jr(!1,\"eip-1559 transaction do not support gasPrice\",\"tx\",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();Yr(null!=e.gasPrice,\"network does not support gasPrice\",\"UNSUPPORTED_OPERATION\",{operation:\"getGasPrice\"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(Yr(!o,\"network does not support EIP-1559\",\"UNSUPPORTED_OPERATION\",{operation:\"populateTransaction\"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):Yr(!1,\"failed to get consistent fee data\",\"UNSUPPORTED_OPERATION\",{operation:\"signer.getFeeData\"});else 2!==r.type&&3!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await Hr(r)}async estimateGas(e){return nu(this,\"estimateGas\").estimateGas(await this.populateCall(e))}async call(e){return nu(this,\"call\").call(await this.populateCall(e))}async resolveName(e){const t=nu(this,\"resolveName\");return await t.resolveName(e)}async sendTransaction(e){const t=nu(this,\"sendTransaction\"),r=await this.populateTransaction(e);delete r.from;const n=tu.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}class iu extends su{address;constructor(e,t){super(t),Gr(this,{address:e})}async getAddress(){return this.address}connect(e){return new iu(this.address,e)}#z(e,t){Yr(!1,`VoidSigner cannot sign ${e}`,\"UNSUPPORTED_OPERATION\",{operation:t})}async signTransaction(e){this.#z(\"transactions\",\"signTransaction\")}async signMessage(e){this.#z(\"messages\",\"signMessage\")}async signTypedData(e,t,r){this.#z(\"typed-data\",\"signTypedData\")}}const au=\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";let cu=null;function uu(e){if(null==cu){cu={};for(let e=0;e<58;e++)cu[au[e]]=BigInt(e)}const t=cu[e];return Jr(null!=t,\"invalid base58 value\",\"letter\",e),t}const lu=BigInt(0),du=BigInt(58);function fu(e){return\"string\"==typeof e&&(e=qo(e)),gs(ln([qo(\"\u0019Ethereum Signed Message:\\n\"),qo(String(e.length)),e]))}const pu=new Uint8Array(32);pu.fill(0);const hu=BigInt(-1),gu=BigInt(0),yu=BigInt(1),mu=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");const bu=Bn(yu,32),wu=Bn(gu,32),vu={name:\"string\",version:\"string\",chainId:\"uint256\",verifyingContract:\"address\",salt:\"bytes32\"},Tu=[\"name\",\"version\",\"chainId\",\"verifyingContract\",\"salt\"];function Au(e){return function(t){return Jr(\"string\"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Eu={name:Au(\"name\"),version:Au(\"version\"),chainId:function(e){const t=vn(e,\"domain.chainId\");return Jr(t>=0,\"invalid chain ID\",\"domain.chainId\",e),Number.isSafeInteger(t)?Number(t):In(t)},verifyingContract:function(e){try{return zs(e).toLowerCase()}catch(e){}Jr(!1,'invalid domain value \"verifyingContract\"',\"domain.verifyingContract\",e)},salt:function(e){const t=nn(e,\"domain.salt\");return Jr(32===t.length,'invalid domain value \"salt\"',\"domain.salt\",e),un(t)}};function Pu(e){{const t=e.match(/^(u?)int(\\d+)$/);if(t){const r=\"\"===t[1],n=parseInt(t[2]);Jr(n%8==0&&0!==n&&n<=256&&t[2]===String(n),\"invalid numeric width\",\"type\",e);const o=wn(mu,r?n-1:n),s=r?(o+yu)*hu:gu;return function(t){const n=vn(t,\"value\");return Jr(n>=s&&n<=o,`value out-of-bounds for ${e}`,\"value\",n),Bn(r?bn(n,256):n,32)}}}{const t=e.match(/^bytes(\\d+)$/);if(t){const r=parseInt(t[1]);return Jr(0!==r&&r<=32&&t[1]===String(r),\"invalid bytes width\",\"type\",e),function(t){return Jr(nn(t).length===r,`invalid length for ${e}`,\"value\",t),function(e){const t=nn(e),r=t.length%32;return r?ln([t,pu.slice(r)]):un(t)}(t)}}}switch(e){case\"address\":return function(e){return hn(zs(e),32)};case\"bool\":return function(e){return e?bu:wu};case\"bytes\":return function(e){return gs(e)};case\"string\":return function(e){return ys(e)}}return null}function Bu(e,t){return`${e}(${t.map(({name:e,type:t})=>t+\" \"+e).join(\",\")})`}function Cu(e){const t=e.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class Iu{primaryType;#j;get types(){return JSON.parse(this.#j)}#V;#H;constructor(e){this.#V=new Map,this.#H=new Map;const t=new Map,r=new Map,n=new Map,o={};Object.keys(e).forEach(s=>{o[s]=e[s].map(({name:t,type:r})=>{let{base:n,index:o}=Cu(r);return\"int\"!==n||e.int||(n=\"int256\"),\"uint\"!==n||e.uint||(n=\"uint256\"),{name:t,type:n+(o||\"\")}}),t.set(s,new Set),r.set(s,[]),n.set(s,new Set)}),this.#j=JSON.stringify(o);for(const n in o){const s=new Set;for(const i of o[n]){Jr(!s.has(i.name),`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,\"types\",e),s.add(i.name);const o=Cu(i.type).base;Jr(o!==n,`circular type reference to ${JSON.stringify(o)}`,\"types\",e);Pu(o)||(Jr(r.has(o),`unknown type ${JSON.stringify(o)}`,\"types\",e),r.get(o).push(n),t.get(n).add(o))}}const s=Array.from(r.keys()).filter(e=>0===r.get(e).length);Jr(0!==s.length,\"missing primary type\",\"types\",e),Jr(1===s.length,`ambiguous primary types or unused types: ${s.map(e=>JSON.stringify(e)).join(\", \")}`,\"types\",e),Gr(this,{primaryType:s[0]}),function o(s,i){Jr(!i.has(s),`circular type reference to ${JSON.stringify(s)}`,\"types\",e),i.add(s);for(const e of t.get(s))if(r.has(e)){o(e,i);for(const t of i)n.get(t).add(e)}i.delete(s)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#V.set(e,Bu(e,o[e])+r.map(e=>Bu(e,o[e])).join(\"\"))}}getEncoder(e){let t=this.#H.get(e);return t||(t=this.#G(e),this.#H.set(e,t)),t}#G(e){{const t=Pu(e);if(t)return t}const t=Cu(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{Jr(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,\"value\",n);let o=n.map(r);return this.#V.has(e)&&(o=o.map(gs)),gs(ln(o))}}const r=this.types[e];if(r){const t=ys(this.#V.get(e));return e=>{const n=r.map(({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#V.has(r)?gs(n):n});return n.unshift(t),ln(n)}}Jr(!1,`unknown type: ${e}`,\"type\",e)}encodeType(e){const t=this.#V.get(e);return Jr(t,`unknown type: ${JSON.stringify(e)}`,\"name\",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return gs(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Pu(e))return r(e,t);const n=Cu(e).array;if(n)return Jr(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,\"value\",t),t.map(e=>this._visit(n.prefix,e,r));const o=this.types[e];if(o)return o.reduce((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e),{});Jr(!1,`unknown type: ${e}`,\"type\",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Iu(e)}static getPrimaryType(e){return Iu.from(e).primaryType}static hashStruct(e,t,r){return Iu.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=vu[r];Jr(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,\"domain\",e),t.push({name:r,type:n})}return t.sort((e,t)=>Tu.indexOf(e.name)-Tu.indexOf(t.name)),Iu.hashStruct(\"EIP712Domain\",{EIP712Domain:t},e)}static encode(e,t,r){return ln([\"0x1901\",Iu.hashDomain(e),Iu.from(t).hash(r)])}static hash(e,t,r){return gs(Iu.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!sn(e.verifyingContract,20)&&(o[e.verifyingContract]=\"0x\");const s=Iu.from(t);s.visit(r,(e,t)=>(\"address\"!==e||sn(t,20)||(o[t]=\"0x\"),t));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=s.visit(r,(e,t)=>\"address\"===e&&o[t]?o[t]:t),{domain:e,value:r}}static getPayload(e,t,r){Iu.hashDomain(e);const n={},o=[];Tu.forEach(t=>{const r=e[t];null!=r&&(n[t]=Eu[t](r),o.push({name:t,type:vu[t]}))});const s=Iu.from(t);t=s.types;const i=Object.assign({},t);return Jr(null==i.EIP712Domain,\"types must not contain EIP712Domain type\",\"types.EIP712Domain\",t),i.EIP712Domain=o,s.encode(r),{types:i,domain:n,primaryType:s.primaryType,message:s.visit(r,(e,t)=>{if(e.match(/^bytes(\\d*)/))return un(nn(t));if(e.match(/^u?int/))return vn(t).toString();switch(e){case\"address\":return t.toLowerCase();case\"bool\":return!!t;case\"string\":return Jr(\"string\"==typeof t,\"invalid string\",\"value\",t),t}Jr(!1,\"unsupported type\",\"type\",e)})}}}class Su extends su{address;#K;constructor(e,t){super(t),Jr(e&&\"function\"==typeof e.sign,\"invalid private key\",\"privateKey\",\"[ REDACTED ]\"),this.#K=e;Gr(this,{address:Hi(this.signingKey.publicKey)})}get signingKey(){return this.#K}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new Su(this.#K,e)}async signTransaction(e){e=ru(e);const{to:t,from:r}=await Hr({to:e.to?Cc(e.to,this.provider):void 0,from:e.from?Cc(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&(Jr(zs(e.from)===this.address,\"transaction from address mismatch\",\"tx.from\",e.from),delete e.from);const n=tu.from(e);return n.signature=this.signingKey.sign(n.unsignedHash),n.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(fu(e)).serialized}async signTypedData(e,t,r){const n=await Iu.resolveNames(e,t,r,async e=>{Yr(null!=this.provider,\"cannot resolve ENS names without a provider\",\"UNSUPPORTED_OPERATION\",{operation:\"resolveName\",info:{name:e}});const t=await this.provider.resolveName(e);return Yr(null!=t,\"unconfigured ENS name\",\"UNCONFIGURED_NAME\",{value:e}),t});return this.signingKey.sign(Iu.hash(n.domain,t,n.value)).serialized}}var Wu,xu,_u,Ru=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)},ku=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};const Ou={16:10,24:12,32:14},Fu=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Mu=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Nu=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],Uu=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Du=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Lu=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],$u=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],zu=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ju=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Vu=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Hu=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Gu=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Ku=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],qu=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Zu=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Yu(e){const t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class Ju{get key(){return Ru(this,Wu,\"f\").slice()}constructor(e){if(Wu.set(this,void 0),xu.set(this,void 0),_u.set(this,void 0),!(this instanceof Ju))throw Error(\"AES must be instanitated with `new`\");ku(this,Wu,new Uint8Array(e),\"f\");const t=Ou[this.key.length];if(null==t)throw new TypeError(\"invalid key size (must be 16, 24 or 32 bytes)\");ku(this,_u,[],\"f\"),ku(this,xu,[],\"f\");for(let e=0;e<=t;e++)Ru(this,_u,\"f\").push([0,0,0,0]),Ru(this,xu,\"f\").push([0,0,0,0]);const r=4*(t+1),n=this.key.length/4,o=Yu(this.key);let s;for(let e=0;e<n;e++)s=e>>2,Ru(this,_u,\"f\")[s][e%4]=o[e],Ru(this,xu,\"f\")[t-s][e%4]=o[e];let i,a=0,c=n;for(;c<r;){if(i=o[n-1],o[0]^=Mu[i>>16&255]<<24^Mu[i>>8&255]<<16^Mu[255&i]<<8^Mu[i>>24&255]^Fu[a]<<24,a+=1,8!=n)for(let e=1;e<n;e++)o[e]^=o[e-1];else{for(let e=1;e<n/2;e++)o[e]^=o[e-1];i=o[n/2-1],o[n/2]^=Mu[255&i]^Mu[i>>8&255]<<8^Mu[i>>16&255]<<16^Mu[i>>24&255]<<24;for(let e=n/2+1;e<n;e++)o[e]^=o[e-1]}let e,s,u=0;for(;u<n&&c<r;)e=c>>2,s=c%4,Ru(this,_u,\"f\")[e][s]=o[u],Ru(this,xu,\"f\")[t-e][s]=o[u++],c++}for(let e=1;e<t;e++)for(let t=0;t<4;t++)i=Ru(this,xu,\"f\")[e][t],Ru(this,xu,\"f\")[e][t]=Gu[i>>24&255]^Ku[i>>16&255]^qu[i>>8&255]^Zu[255&i]}encrypt(e){if(16!=e.length)throw new TypeError(\"invalid plaintext size (must be 16 bytes)\");const t=Ru(this,_u,\"f\").length-1,r=[0,0,0,0];let n=Yu(e);for(let e=0;e<4;e++)n[e]^=Ru(this,_u,\"f\")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=Uu[n[t]>>24&255]^Du[n[(t+1)%4]>>16&255]^Lu[n[(t+2)%4]>>8&255]^$u[255&n[(t+3)%4]]^Ru(this,_u,\"f\")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=Ru(this,_u,\"f\")[t][e],o[4*e]=255&(Mu[n[e]>>24&255]^s>>24),o[4*e+1]=255&(Mu[n[(e+1)%4]>>16&255]^s>>16),o[4*e+2]=255&(Mu[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(Mu[255&n[(e+3)%4]]^s);return o}decrypt(e){if(16!=e.length)throw new TypeError(\"invalid ciphertext size (must be 16 bytes)\");const t=Ru(this,xu,\"f\").length-1,r=[0,0,0,0];let n=Yu(e);for(let e=0;e<4;e++)n[e]^=Ru(this,xu,\"f\")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=zu[n[t]>>24&255]^ju[n[(t+3)%4]>>16&255]^Vu[n[(t+2)%4]>>8&255]^Hu[255&n[(t+1)%4]]^Ru(this,xu,\"f\")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=Ru(this,xu,\"f\")[t][e],o[4*e]=255&(Nu[n[e]>>24&255]^s>>24),o[4*e+1]=255&(Nu[n[(e+3)%4]>>16&255]^s>>16),o[4*e+2]=255&(Nu[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(Nu[255&n[(e+1)%4]]^s);return o}}Wu=new WeakMap,xu=new WeakMap,_u=new WeakMap;class Xu{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with \"new\"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new Ju(t)},name:{enumerable:!0,value:e}})}}new WeakMap,new WeakMap;var Qu,el=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};new WeakMap,Qu=new WeakMap,new WeakSet;var tl,rl,nl,ol=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},sl=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};class il extends Xu{constructor(e,t){super(\"CTR\",e,il),tl.set(this,void 0),rl.set(this,void 0),nl.set(this,void 0),ol(this,nl,new Uint8Array(16),\"f\"),sl(this,nl,\"f\").fill(0),ol(this,tl,sl(this,nl,\"f\"),\"f\"),ol(this,rl,16,\"f\"),null==t&&(t=1),\"number\"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(sl(this,nl,\"f\"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError(\"invalid counter initial integer value\");for(let t=15;t>=0;--t)sl(this,nl,\"f\")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError(\"invalid counter initial Uint8Array value length\");sl(this,nl,\"f\").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==sl(this,nl,\"f\")[e]){sl(this,nl,\"f\")[e]++;break}sl(this,nl,\"f\")[e]=0}}encrypt(e){var t,r;const n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===sl(this,rl,\"f\")&&(ol(this,tl,this.aes.encrypt(sl(this,nl,\"f\")),\"f\"),ol(this,rl,0,\"f\"),this.increment()),n[e]^=sl(this,tl,\"f\")[ol(this,rl,(r=sl(this,rl,\"f\"),t=r++,r),\"f\"),t];return n}decrypt(e){return this.encrypt(e)}}tl=new WeakMap,rl=new WeakMap,nl=new WeakMap;new WeakMap,new WeakMap,new WeakMap;const al=(e,t)=>e<<t|e>>>32-t;function cl(e,t,r,n,o,s){let i=e[t++]^r[n++],a=e[t++]^r[n++],c=e[t++]^r[n++],u=e[t++]^r[n++],l=e[t++]^r[n++],d=e[t++]^r[n++],f=e[t++]^r[n++],p=e[t++]^r[n++],h=e[t++]^r[n++],g=e[t++]^r[n++],y=e[t++]^r[n++],m=e[t++]^r[n++],b=e[t++]^r[n++],w=e[t++]^r[n++],v=e[t++]^r[n++],T=e[t++]^r[n++],A=i,E=a,P=c,B=u,C=l,I=d,S=f,W=p,x=h,_=g,R=y,k=m,O=b,F=w,M=v,N=T;for(let e=0;e<8;e+=2)C^=al(A+O|0,7),x^=al(C+A|0,9),O^=al(x+C|0,13),A^=al(O+x|0,18),_^=al(I+E|0,7),F^=al(_+I|0,9),E^=al(F+_|0,13),I^=al(E+F|0,18),M^=al(R+S|0,7),P^=al(M+R|0,9),S^=al(P+M|0,13),R^=al(S+P|0,18),B^=al(N+k|0,7),W^=al(B+N|0,9),k^=al(W+B|0,13),N^=al(k+W|0,18),E^=al(A+B|0,7),P^=al(E+A|0,9),B^=al(P+E|0,13),A^=al(B+P|0,18),S^=al(I+C|0,7),W^=al(S+I|0,9),C^=al(W+S|0,13),I^=al(C+W|0,18),k^=al(R+_|0,7),x^=al(k+R|0,9),_^=al(x+k|0,13),R^=al(_+x|0,18),O^=al(N+M|0,7),F^=al(O+N|0,9),M^=al(F+O|0,13),N^=al(M+F|0,18);o[s++]=i+A|0,o[s++]=a+E|0,o[s++]=c+P|0,o[s++]=u+B|0,o[s++]=l+C|0,o[s++]=d+I|0,o[s++]=f+S|0,o[s++]=p+W|0,o[s++]=h+x|0,o[s++]=g+_|0,o[s++]=y+R|0,o[s++]=m+k|0,o[s++]=b+O|0,o[s++]=w+F|0,o[s++]=v+M|0,o[s++]=T+N|0}function ul(e,t,r,n,o){let s=n+0,i=n+16*o;for(let n=0;n<16;n++)r[i+n]=e[t+16*(2*o-1)+n];for(let n=0;n<o;n++,s+=16,t+=16)cl(r,i,e,t,r,s),n>0&&(i+=16),cl(r,s,e,t+=16,r,i)}function ll(e,t,r){const n=Xn({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:o,r:s,p:i,dkLen:a,asyncTick:c,maxmem:u,onProgress:l}=n;if(Nn(o),Nn(s),Nn(i),Nn(a),Nn(c),Nn(u),void 0!==l&&\"function\"!=typeof l)throw new Error(\"progressCb should be function\");const d=128*s,f=d/4;if(o<=1||o&o-1||o>=2**(d/8)||o>2**32)throw new Error(\"Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32\");if(i<0||i>137438953440/d)throw new Error(\"Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)\");if(a<0||a>137438953440)throw new Error(\"Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32\");const p=d*(o+i);if(p>u)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${u} (maxmem)`);const h=so(ho,e,t,{c:1,dkLen:d*i}),g=Vn(h),y=Vn(new Uint8Array(d*o)),m=Vn(new Uint8Array(d));let b=()=>{};if(l){const e=2*o*i,t=Math.max(Math.floor(e/1e4),1);let r=0;b=()=>{r++,!l||r%t&&r!==e||l(r/e)}}return{N:o,r:s,p:i,dkLen:a,blockSize32:f,V:y,B32:g,B:h,tmp:m,blockMixCb:b,asyncTick:c}}function dl(e,t,r,n,o){const s=so(ho,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),o.fill(0),s}let fl=!1,pl=!1;const hl=async function(e,t,r,n,o,s,i){return await async function(e,t,r){const{N:n,r:o,p:s,dkLen:i,blockSize32:a,V:c,B32:u,B:l,tmp:d,blockMixCb:f,asyncTick:p}=ll(e,t,r);for(let e=0;e<s;e++){const t=a*e;for(let e=0;e<a;e++)c[e]=u[t+e];let r=0;await qn(n-1,p,()=>{ul(c,r,c,r+=a,o),f()}),ul(c,(n-1)*a,u,t,o),f(),await qn(n,p,()=>{const e=u[t+a-16]%n;for(let r=0;r<a;r++)d[r]=u[t+r]^c[e*a+r];ul(d,0,u,t,o),f()})}return dl(e,i,l,c,d)}(e,t,{N:r,r:n,p:o,dkLen:s,onProgress:i})},gl=function(e,t,r,n,o,s){return function(e,t,r){const{N:n,r:o,p:s,dkLen:i,blockSize32:a,V:c,B32:u,B:l,tmp:d,blockMixCb:f}=ll(e,t,r);for(let e=0;e<s;e++){const t=a*e;for(let e=0;e<a;e++)c[e]=u[t+e];for(let e=0,t=0;e<n-1;e++)ul(c,t,c,t+=a,o),f();ul(c,(n-1)*a,u,t,o),f();for(let e=0;e<n;e++){const e=u[t+a-16]%n;for(let r=0;r<a;r++)d[r]=u[t+r]^c[e*a+r];ul(d,0,u,t,o),f()}}return dl(e,i,l,c,d)}(e,t,{N:r,r:n,p:o,dkLen:s})};let yl=hl,ml=gl;async function bl(e,t,r,n,o,s,i){const a=nn(e,\"passwd\"),c=nn(t,\"salt\");return un(await yl(a,c,r,n,o,s,i))}function wl(e,t,r,n,o,s){const i=nn(e,\"passwd\"),a=nn(t,\"salt\");return un(ml(i,a,r,n,o,s))}function vl(e){const t=nn(e,\"randomBytes\");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=un(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join(\"-\")}function Tl(e,t){for(e=String(e);e.length<t;)e=\"0\"+e;return e}function Al(e){return\"string\"==typeof e?qo(e,\"NFKC\"):on(e)}bl._=hl,bl.lock=function(){pl=!0},bl.register=function(e){if(pl)throw new Error(\"scrypt is locked\");yl=e},Object.freeze(bl),wl._=gl,wl.lock=function(){fl=!0},wl.register=function(e){if(fl)throw new Error(\"scryptSync is locked\");ml=e},Object.freeze(wl);const El=\"m/44'/60'/0'/0/0\";function Pl(e){const t=null!=e.salt?nn(e.salt,\"options.salt\"):Pc(32);let r=1<<17,n=8,o=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(o=e.scrypt.p)),Jr(\"number\"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),\"invalid scrypt N parameter\",\"options.N\",r),Jr(\"number\"==typeof n&&n>0&&Number.isSafeInteger(n),\"invalid scrypt r parameter\",\"options.r\",n),Jr(\"number\"==typeof o&&o>0&&Number.isSafeInteger(o),\"invalid scrypt p parameter\",\"options.p\",o),{name:\"scrypt\",dkLen:32,salt:t,N:r,r:n,p:o}}function Bl(e,t,r,n){const o=nn(r.privateKey,\"privateKey\"),s=null!=n.iv?nn(n.iv,\"options.iv\"):Pc(16);Jr(16===s.length,\"invalid options.iv length\",\"options.iv\",n.iv);const i=null!=n.uuid?nn(n.uuid,\"options.uuid\"):Pc(16);Jr(16===i.length,\"invalid options.uuid length\",\"options.uuid\",n.iv);const a=e.slice(0,16),c=e.slice(16,32),u=nn(new il(a,s).encrypt(o)),l=gs(ln([c,u])),d={address:r.address.substring(2).toLowerCase(),id:vl(i),version:3,Crypto:{cipher:\"aes-128-ctr\",cipherparams:{iv:un(s).substring(2)},ciphertext:un(u).substring(2),kdf:\"scrypt\",kdfparams:{salt:un(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:l.substring(2)}};if(r.mnemonic){const t=null!=n.client?n.client:`ethers/${jr}`,o=r.mnemonic.path||El,s=r.mnemonic.locale||\"en\",i=e.slice(32,64),a=nn(r.mnemonic.entropy,\"account.mnemonic.entropy\"),c=Pc(16),u=nn(new il(i,c).encrypt(a)),l=new Date,f=\"UTC--\"+(l.getUTCFullYear()+\"-\"+Tl(l.getUTCMonth()+1,2)+\"-\"+Tl(l.getUTCDate(),2)+\"T\"+Tl(l.getUTCHours(),2)+\"-\"+Tl(l.getUTCMinutes(),2)+\"-\"+Tl(l.getUTCSeconds(),2)+\".0Z\")+\"--\"+d.address;d[\"x-ethers\"]={client:t,gethFilename:f,path:o,locale:s,mnemonicCounter:un(c).substring(2),mnemonicCiphertext:un(u).substring(2),version:\"0.1\"}}return JSON.stringify(d)}const Cl=\"m/44'/60'/0'/0/0\",Il=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),Sl=2147483648,Wl=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");function xl(e,t){let r=\"\";for(;e;)r=\"0123456789abcdef\"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r=\"0\"+r;return\"0x\"+r}function _l(e){const t=nn(e);return function(e){const t=nn(e);let r=En(t),n=\"\";for(;r;)n=au[Number(r%du)]+n,r/=du;for(let e=0;e<t.length&&!t[e];e++)n=au[0]+n;return n}(ln([t,fn(Do(Do(t)),0,4)]))}const Rl={};function kl(e,t,r,n){const o=new Uint8Array(37);e&Sl?(Yr(null!=n,\"cannot derive child of neutered node\",\"UNSUPPORTED_OPERATION\",{operation:\"deriveChild\"}),o.set(nn(n),1)):o.set(nn(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const s=nn(Os(\"sha512\",t,o));return{IL:s.slice(0,32),IR:s.slice(32)}}function Ol(e,t){const r=t.split(\"/\");Jr(r.length>0,\"invalid path\",\"path\",t),\"m\"===r[0]&&(Jr(0===e.depth,`cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${e.depth}`,\"path\",t),r.shift());let n=e;for(let e=0;e<r.length;e++){const t=r[e];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));Jr(r<Sl,\"invalid path index\",`path[${e}]`,t),n=n.deriveChild(Sl+r)}else if(t.match(/^[0-9]+$/)){const r=parseInt(t);Jr(r<Sl,\"invalid path index\",`path[${e}]`,t),n=n.deriveChild(r)}else Jr(!1,\"invalid path component\",`path[${e}]`,t)}return n}class Fl extends Su{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,n,o,s,i,a,c){super(t,c),tn(e,Rl,\"HDNodeWallet\"),Gr(this,{publicKey:t.compressedPublicKey});Gr(this,{parentFingerprint:r,fingerprint:fn(vc(Do(this.publicKey)),0,4),chainCode:n,path:o,index:s,depth:i}),Gr(this,{mnemonic:a})}connect(e){return new Fl(Rl,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#q(){const e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&\"en\"===t.wordlist.locale&&\"\"===t.password&&(e.mnemonic={path:this.path,locale:\"en\",entropy:t.entropy}),e}async encrypt(e,t){return await async function(e,t,r){null==r&&(r={});const n=Al(t),o=Pl(r);return Bl(nn(await bl(n,o.salt,o.N,o.r,o.p,64,r.progressCallback)),o,e,r)}(this.#q(),e,{progressCallback:t})}encryptSync(e){return function(e,t,r){null==r&&(r={});const n=Al(t),o=Pl(r);return Bl(nn(wl(n,o.salt,o.N,o.r,o.p,64)),o,e,r)}(this.#q(),e)}get extendedKey(){return Yr(this.depth<256,\"Depth too deep\",\"UNSUPPORTED_OPERATION\",{operation:\"extendedKey\"}),_l(ln([\"0x0488ADE4\",xl(this.depth,1),this.parentFingerprint,xl(this.index,4),this.chainCode,ln([\"0x00\",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new Ml(Rl,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){const t=Pn(e,\"index\");Jr(t<=4294967295,\"invalid index\",\"index\",t);let r=this.path;r&&(r+=\"/\"+(2147483647&t),t&Sl&&(r+=\"'\"));const{IR:n,IL:o}=kl(t,this.chainCode,this.publicKey,this.privateKey),s=new Vi(Bn((En(o)+BigInt(this.privateKey))%Wl,32));return new Fl(Rl,s,this.fingerprint,un(n),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return Ol(this,e)}static#Z(e,t){Jr(an(e),\"invalid seed\",\"seed\",\"[REDACTED]\");const r=nn(e,\"seed\");Jr(r.length>=16&&r.length<=64,\"invalid seed\",\"seed\",\"[REDACTED]\");const n=nn(Os(\"sha512\",Il,r)),o=new Vi(un(n.slice(0,32)));return new Fl(Rl,o,\"0x00000000\",un(n.slice(32)),\"m\",0,0,t,null)}static fromExtendedKey(e){const t=Cn(function(e){let t=lu;for(let r=0;r<e.length;r++)t*=du,t+=uu(e[r]);return t}(e));Jr(82===t.length||_l(t.slice(0,78))===e,\"invalid extended key\",\"extendedKey\",\"[ REDACTED ]\");const r=t[4],n=un(t.slice(5,9)),o=parseInt(un(t.slice(9,13)).substring(2),16),s=un(t.slice(13,45)),i=t.slice(45,78);switch(un(t.slice(0,4))){case\"0x0488b21e\":case\"0x043587cf\":{const e=un(i);return new Ml(Rl,Hi(e),e,n,s,null,o,r,null)}case\"0x0488ade4\":case\"0x04358394 \":if(0!==i[0])break;return new Fl(Rl,new Vi(i.slice(1)),n,s,null,o,r,null,null)}Jr(!1,\"invalid extended key prefix\",\"extendedKey\",\"[ REDACTED ]\")}static createRandom(e,t,r){null==e&&(e=\"\"),null==t&&(t=Cl),null==r&&(r=Ps.wordlist());const n=xs.fromEntropy(Pc(16),e,r);return Fl.#Z(n.computeSeed(),n).derivePath(t)}static fromMnemonic(e,t){return t||(t=Cl),Fl.#Z(e.computeSeed(),e).derivePath(t)}static fromPhrase(e,t,r,n){null==t&&(t=\"\"),null==r&&(r=Cl),null==n&&(n=Ps.wordlist());const o=xs.fromPhrase(e,t,n);return Fl.#Z(o.computeSeed(),o).derivePath(r)}static fromSeed(e){return Fl.#Z(e,null)}}class Ml extends iu{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,n,o,s,i,a,c){super(t,c),tn(e,Rl,\"HDNodeVoidWallet\"),Gr(this,{publicKey:r});Gr(this,{publicKey:r,fingerprint:fn(vc(Do(r)),0,4),parentFingerprint:n,chainCode:o,path:s,index:i,depth:a})}connect(e){return new Ml(Rl,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return Yr(this.depth<256,\"Depth too deep\",\"UNSUPPORTED_OPERATION\",{operation:\"extendedKey\"}),_l(ln([\"0x0488B21E\",xl(this.depth,1),this.parentFingerprint,xl(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=Pn(e,\"index\");Jr(t<=4294967295,\"invalid index\",\"index\",t);let r=this.path;r&&(r+=\"/\"+(2147483647&t),t&Sl&&(r+=\"'\"));const{IR:n,IL:o}=kl(t,this.chainCode,this.publicKey,null),s=Vi.addPoints(o,this.publicKey,!0),i=Hi(s);return new Ml(Rl,i,s,this.fingerprint,un(n),r,t,this.depth+1,this.provider)}derivePath(e){return Ol(this,e)}}const Nl={en:Ps.wordlist()};var Ul;function Dl(e){const t=new Set;return e.forEach(e=>t.add(e)),Object.freeze(t)}const Ll=\"constant external internal payable private public pure view\",$l=Dl(Ll.split(\" \")),zl=\"constructor error event fallback function receive struct\",jl=Dl(zl.split(\" \")),Vl=\"calldata memory storage payable indexed\",Hl=Dl(Vl.split(\" \")),Gl=Dl([zl,Vl,\"tuple returns\",Ll].join(\" \").split(\" \")),Kl={\"(\":\"OPEN_PAREN\",\")\":\"CLOSE_PAREN\",\"[\":\"OPEN_BRACKET\",\"]\":\"CLOSE_BRACKET\",\",\":\"COMMA\",\"@\":\"AT\"},ql=new RegExp(\"^(\\\\s*)\"),Zl=new RegExp(\"^([0-9]+)\"),Yl=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\"),Jl=new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\"),Xl=new RegExp(\"^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");class Ql{#g;#A;get offset(){return this.#g}get length(){return this.#A.length-this.#g}constructor(e){this.#g=0,this.#A=e.slice()}clone(){return new Ul(this.#A)}reset(){this.#g=0}#E(e=0,t=0){return new Ul(this.#A.slice(e,t).map(t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e}))))}popKeyword(e){const t=this.peek();if(\"KEYWORD\"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=this.#E(this.#g+1,e.match+1);return this.#g=e.match+1,t}popParams(){const e=this.peek();if(\"OPEN_PAREN\"!==e.type)throw new Error(\"bad start\");const t=[];for(;this.#g<e.match-1;){const e=this.peek().linkNext;t.push(this.#E(this.#g+1,e)),this.#g=e}return this.#g=e.match+1,t}peek(){if(this.#g>=this.#A.length)throw new Error(\"out-of-bounds\");return this.#A[this.#g]}peekKeyword(e){const t=this.peekType(\"KEYWORD\");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#g++,e}toString(){const e=[];for(let t=this.#g;t<this.#A.length;t++){const r=this.#A[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(\" \")}>`}}function ed(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):\"$EOI\";throw new Error(`invalid token ${r} at ${s}: ${t}`)},n=[],o=[];let s=0;for(;s<e.length;){let i=e.substring(s),a=i.match(ql);a&&(s+=a[1].length,i=e.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:\"\",text:\"\",offset:s,value:-1};t.push(c);const u=Kl[i[0]]||\"\";if(u){if(c.type=u,c.text=i[0],s++,\"OPEN_PAREN\"===u)n.push(t.length-1),o.push(t.length-1);else if(\"CLOSE_PAREN\"==u)0===n.length&&r(\"no matching open bracket\"),c.match=n.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if(\"COMMA\"===u)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if(\"OPEN_BRACKET\"===u)c.type=\"BRACKET\";else if(\"CLOSE_BRACKET\"===u){let e=t.pop().text;if(t.length>0&&\"NUMBER\"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=Pn(r)}if(0===t.length||\"BRACKET\"!==t[t.length-1].type)throw new Error(\"missing opening bracket\");t[t.length-1].text+=e}}else if(a=i.match(Yl),a){if(c.text=a[1],s+=c.text.length,Gl.has(c.text)){c.type=\"KEYWORD\";continue}if(c.text.match(Xl)){c.type=\"TYPE\";continue}c.type=\"ID\"}else{if(a=i.match(Zl),!a)throw new Error(`unexpected token ${JSON.stringify(i[0])} at position ${s}`);c.text=a[1],c.type=\"NUMBER\",s+=c.text.length}}return new Ql(t.map(e=>Object.freeze(e)))}function td(e,t){const r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(\", \")}`)}function rd(e,t){if(t.peekKeyword(jl)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType(\"ID\")}function nd(e,t){const r=new Set;for(;;){const n=e.peekType(\"KEYWORD\");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function od(e){const t=nd(e,$l);return td(t,Dl(\"constant payable nonpayable\".split(\" \"))),td(t,Dl(\"pure view payable nonpayable\".split(\" \"))),t.has(\"view\")?\"view\":t.has(\"pure\")?\"pure\":t.has(\"payable\")?\"payable\":t.has(\"nonpayable\")?\"nonpayable\":t.has(\"constant\")?\"view\":\"nonpayable\"}function sd(e,t){return e.popParams().map(e=>wd.from(e,t))}function id(e){if(e.peekType(\"AT\")){if(e.pop(),e.peekType(\"NUMBER\"))return vn(e.pop().text);throw new Error(\"invalid gas\")}return null}function ad(e){if(e.length)throw new Error(`unexpected tokens: ${e.toString()}`)}Ul=Ql;const cd=new RegExp(/^(.*)\\[([0-9]*)\\]$/);function ud(e){const t=e.match(Xl);if(Jr(t,\"invalid type\",\"type\",e),\"uint\"===e)return\"uint256\";if(\"int\"===e)return\"int256\";if(t[2]){const r=parseInt(t[2]);Jr(0!==r&&r<=32,\"invalid bytes length\",\"type\",e)}else if(t[3]){const r=parseInt(t[3]);Jr(0!==r&&r<=256&&r%8==0,\"invalid numeric width\",\"type\",e)}return e}const ld={},dd=Symbol.for(\"_ethers_internal\"),fd=\"_ParamTypeInternal\",pd=\"_ErrorInternal\",hd=\"_EventInternal\",gd=\"_ConstructorInternal\",yd=\"_FallbackInternal\",md=\"_FunctionInternal\",bd=\"_StructInternal\";class wd{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,i,a){if(tn(e,ld,\"ParamType\"),Object.defineProperty(this,dd,{value:fd}),s&&(s=Object.freeze(s.slice())),\"array\"===n){if(null==i||null==a)throw new Error(\"\")}else if(null!=i||null!=a)throw new Error(\"\");if(\"tuple\"===n){if(null==s)throw new Error(\"\")}else if(null!=s)throw new Error(\"\");Gr(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:i,arrayChildren:a})}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e){const t={type:\"tuple\"===this.baseType?\"tuple\":this.type,name:this.name||void 0};return\"boolean\"==typeof this.indexed&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t)}let t=\"\";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?\"\":String(this.arrayLength)}]`):this.isTuple()?(\"sighash\"!==e&&(t+=this.type),t+=\"(\"+this.components.map(t=>t.format(e)).join(\"full\"===e?\", \":\",\")+\")\"):t+=this.type,\"sighash\"!==e&&(!0===this.indexed&&(t+=\" indexed\"),\"full\"===e&&this.name&&(t+=\" \"+this.name)),t}isArray(){return\"array\"===this.baseType}isTuple(){return\"tuple\"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error(\"array is wrong length\");return e.map(e=>this.arrayChildren?.walk(e,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error(\"invalid tuple value\");if(e.length!==this.components.length)throw new Error(\"array is wrong length\");return e.map((e,r)=>this.components?.[r].walk(e,t))}return t(this.type,e)}#P(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error(\"invalid array value\");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error(\"array is wrong length\");const o=this.arrayChildren,s=t.slice();return s.forEach((t,n)=>{o.#P(e,t,r,e=>{s[n]=e})}),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||\"object\"!=typeof t)throw new Error(\"invalid tuple value\");s=o.map(e=>{if(!e.name)throw new Error(\"cannot use object value with unnamed components\");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]})}if(s.length!==this.components.length)throw new Error(\"array is wrong length\");return s.forEach((t,n)=>{o[n].#P(e,t,r,e=>{s[n]=e})}),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#P(r,e,t,e=>{n[0]=e}),r.length&&await Promise.all(r),n[0]}static from(e,t){if(wd.isParamType(e))return e;if(\"string\"==typeof e)return wd.from(ed(e),t);if(e instanceof Ql){let r=\"\",n=\"\",o=null;nd(e,Dl([\"tuple\"])).has(\"tuple\")||e.peekType(\"OPEN_PAREN\")?(n=\"tuple\",o=e.popParams().map(e=>wd.from(e)),r=`tuple(${o.map(e=>e.format()).join(\",\")})`):(r=ud(e.popType(\"TYPE\")),n=r);let s=null,i=null;for(;e.length&&e.peekType(\"BRACKET\");){const t=e.pop();s=new wd(ld,\"\",r,n,null,o,i,s),i=t.value,r+=t.text,n=\"array\",o=null}let a=null;if(nd(e,Hl).has(\"indexed\")){if(!t)throw new Error(\"\");a=!0}const c=e.peekType(\"ID\")?e.pop().text:\"\";if(e.length)throw new Error(\"leftover tokens\");return new wd(ld,c,r,n,a,o,i,s)}const r=e.name;Jr(!r||\"string\"==typeof r&&r.match(Jl),\"invalid name\",\"obj.name\",r);let n=e.indexed;null!=n&&(Jr(t,\"parameter cannot be indexed\",\"obj.indexed\",e.indexed),n=!!n);let o=e.type;const s=o.match(cd);if(s){const t=parseInt(s[2]||\"-1\"),i=wd.from({type:s[1],components:e.components});return new wd(ld,r||\"\",o,\"array\",n,null,t,i)}if(\"tuple\"===o||o.startsWith(\"tuple(\")||o.startsWith(\"(\")){const t=null!=e.components?e.components.map(e=>wd.from(e)):null;return new wd(ld,r||\"\",o,\"tuple\",n,t,null,null)}return o=ud(e.type),new wd(ld,r||\"\",o,o,n,null,null,null)}static isParamType(e){return e&&e[dd]===fd}}class vd{type;inputs;constructor(e,t,r){tn(e,ld,\"Fragment\"),Gr(this,{type:t,inputs:r=Object.freeze(r.slice())})}static from(e){if(\"string\"==typeof e){try{vd.from(JSON.parse(e))}catch(e){}return vd.from(ed(e))}if(e instanceof Ql){switch(e.peekKeyword(jl)){case\"constructor\":return Bd.from(e);case\"error\":return Ed.from(e);case\"event\":return Pd.from(e);case\"fallback\":case\"receive\":return Cd.from(e);case\"function\":return Id.from(e);case\"struct\":return Sd.from(e)}}else if(\"object\"==typeof e){switch(e.type){case\"constructor\":return Bd.from(e);case\"error\":return Ed.from(e);case\"event\":return Pd.from(e);case\"fallback\":case\"receive\":return Cd.from(e);case\"function\":return Id.from(e);case\"struct\":return Sd.from(e)}Yr(!1,`unsupported type: ${e.type}`,\"UNSUPPORTED_OPERATION\",{operation:\"Fragment.from\"})}Jr(!1,\"unsupported frgament object\",\"obj\",e)}static isConstructor(e){return Bd.isFragment(e)}static isError(e){return Ed.isFragment(e)}static isEvent(e){return Pd.isFragment(e)}static isFunction(e){return Id.isFragment(e)}static isStruct(e){return Sd.isFragment(e)}}class Td extends vd{name;constructor(e,t,r,n){super(e,t,n),Jr(\"string\"==typeof r&&r.match(Jl),\"invalid identifier\",\"name\",r),n=Object.freeze(n.slice()),Gr(this,{name:r})}}function Ad(e,t){return\"(\"+t.map(t=>t.format(e)).join(\"full\"===e?\", \":\",\")+\")\"}class Ed extends Td{constructor(e,t,r){super(e,\"error\",t,r),Object.defineProperty(this,dd,{value:pd})}get selector(){return ys(this.format(\"sighash\")).substring(0,10)}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e)return JSON.stringify({type:\"error\",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});const t=[];return\"sighash\"!==e&&t.push(\"error\"),t.push(this.name+Ad(e,this.inputs)),t.join(\" \")}static from(e){if(Ed.isFragment(e))return e;if(\"string\"==typeof e)return Ed.from(ed(e));if(e instanceof Ql){const t=rd(\"error\",e),r=sd(e);return ad(e),new Ed(ld,t,r)}return new Ed(ld,e.name,e.inputs?e.inputs.map(wd.from):[])}static isFragment(e){return e&&e[dd]===pd}}class Pd extends Td{anonymous;constructor(e,t,r,n){super(e,\"event\",t,r),Object.defineProperty(this,dd,{value:hd}),Gr(this,{anonymous:n})}get topicHash(){return ys(this.format(\"sighash\"))}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e)return JSON.stringify({type:\"event\",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});const t=[];return\"sighash\"!==e&&t.push(\"event\"),t.push(this.name+Ad(e,this.inputs)),\"sighash\"!==e&&this.anonymous&&t.push(\"anonymous\"),t.join(\" \")}static getTopicHash(e,t){t=(t||[]).map(e=>wd.from(e));return new Pd(ld,e,t,!1).topicHash}static from(e){if(Pd.isFragment(e))return e;if(\"string\"==typeof e)return Pd.from(ed(e));if(e instanceof Ql){const t=rd(\"event\",e),r=sd(e,!0),n=!!nd(e,Dl([\"anonymous\"])).has(\"anonymous\");return ad(e),new Pd(ld,t,r,n)}return new Pd(ld,e.name,e.inputs?e.inputs.map(e=>wd.from(e,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[dd]===hd}}class Bd extends vd{payable;gas;constructor(e,t,r,n,o){super(e,t,r),Object.defineProperty(this,dd,{value:gd}),Gr(this,{payable:n,gas:o})}format(e){if(Yr(null!=e&&\"sighash\"!==e,\"cannot format a constructor for sighash\",\"UNSUPPORTED_OPERATION\",{operation:\"format(sighash)\"}),\"json\"===e)return JSON.stringify({type:\"constructor\",stateMutability:this.payable?\"payable\":\"undefined\",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});const t=[`constructor${Ad(e,this.inputs)}`];return t.push(this.payable?\"payable\":\"nonpayable\"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(\" \")}static from(e){if(Bd.isFragment(e))return e;if(\"string\"==typeof e)return Bd.from(ed(e));if(e instanceof Ql){nd(e,Dl([\"constructor\"]));const t=sd(e),r=!!nd(e,Dl([\"payable\"])).has(\"payable\"),n=id(e);return ad(e),new Bd(ld,\"constructor\",t,r,n)}return new Bd(ld,\"constructor\",e.inputs?e.inputs.map(wd.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[dd]===gd}}class Cd extends vd{payable;constructor(e,t,r){super(e,\"fallback\",t),Object.defineProperty(this,dd,{value:yd}),Gr(this,{payable:r})}format(e){const t=0===this.inputs.length?\"receive\":\"fallback\";if(\"json\"===e){const e=this.payable?\"payable\":\"nonpayable\";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?\" payable\":\"\"}`}static from(e){if(Cd.isFragment(e))return e;if(\"string\"==typeof e)return Cd.from(ed(e));if(e instanceof Ql){const t=e.toString();Jr(e.peekKeyword(Dl([\"fallback\",\"receive\"])),\"type must be fallback or receive\",\"obj\",t);if(\"receive\"===e.popKeyword(Dl([\"fallback\",\"receive\"]))){const t=sd(e);return Jr(0===t.length,\"receive cannot have arguments\",\"obj.inputs\",t),nd(e,Dl([\"payable\"])),ad(e),new Cd(ld,[],!0)}let r=sd(e);r.length?Jr(1===r.length&&\"bytes\"===r[0].type,\"invalid fallback inputs\",\"obj.inputs\",r.map(e=>e.format(\"minimal\")).join(\", \")):r=[wd.from(\"bytes\")];const n=od(e);if(Jr(\"nonpayable\"===n||\"payable\"===n,\"fallback cannot be constants\",\"obj.stateMutability\",n),nd(e,Dl([\"returns\"])).has(\"returns\")){const t=sd(e);Jr(1===t.length&&\"bytes\"===t[0].type,\"invalid fallback outputs\",\"obj.outputs\",t.map(e=>e.format(\"minimal\")).join(\", \"))}return ad(e),new Cd(ld,r,\"payable\"===n)}if(\"receive\"===e.type)return new Cd(ld,[],!0);if(\"fallback\"===e.type){const t=[wd.from(\"bytes\")],r=\"payable\"===e.stateMutability;return new Cd(ld,t,r)}Jr(!1,\"invalid fallback description\",\"obj\",e)}static isFragment(e){return e&&e[dd]===yd}}class Id extends Td{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,n,o,s){super(e,\"function\",t,n),Object.defineProperty(this,dd,{value:md});Gr(this,{constant:\"view\"===r||\"pure\"===r,gas:s,outputs:o=Object.freeze(o.slice()),payable:\"payable\"===r,stateMutability:r})}get selector(){return ys(this.format(\"sighash\")).substring(0,10)}format(e){if(null==e&&(e=\"sighash\"),\"json\"===e)return JSON.stringify({type:\"function\",name:this.name,constant:this.constant,stateMutability:\"nonpayable\"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(t=>JSON.parse(t.format(e))),outputs:this.outputs.map(t=>JSON.parse(t.format(e)))});const t=[];return\"sighash\"!==e&&t.push(\"function\"),t.push(this.name+Ad(e,this.inputs)),\"sighash\"!==e&&(\"nonpayable\"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push(\"returns\"),t.push(Ad(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(\" \")}static getSelector(e,t){t=(t||[]).map(e=>wd.from(e));return new Id(ld,e,\"view\",t,[],null).selector}static from(e){if(Id.isFragment(e))return e;if(\"string\"==typeof e)return Id.from(ed(e));if(e instanceof Ql){const t=rd(\"function\",e),r=sd(e),n=od(e);let o=[];nd(e,Dl([\"returns\"])).has(\"returns\")&&(o=sd(e));const s=id(e);return ad(e),new Id(ld,t,n,r,o,s)}let t=e.stateMutability;return null==t&&(t=\"payable\",\"boolean\"==typeof e.constant?(t=\"view\",e.constant||(t=\"payable\",\"boolean\"!=typeof e.payable||e.payable||(t=\"nonpayable\"))):\"boolean\"!=typeof e.payable||e.payable||(t=\"nonpayable\")),new Id(ld,e.name,t,e.inputs?e.inputs.map(wd.from):[],e.outputs?e.outputs.map(wd.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[dd]===md}}class Sd extends Td{constructor(e,t,r){super(e,\"struct\",t,r),Object.defineProperty(this,dd,{value:bd})}format(){throw new Error(\"@TODO\")}static from(e){if(\"string\"==typeof e)return Sd.from(ed(e));if(e instanceof Ql){const t=rd(\"struct\",e),r=sd(e);return ad(e),new Sd(ld,t,r)}return new Sd(ld,e.name,e.inputs?e.inputs.map(wd.from):[])}static isFragment(e){return e&&e[dd]===bd}}class Wd{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,o=e.format();Gr(this,{fragment:e,name:n,signature:o,topic:t,args:r})}}class xd{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const o=e.name,s=e.format();Gr(this,{fragment:e,name:o,args:r,signature:s,selector:t,value:n})}}class _d{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,o=e.format();Gr(this,{fragment:e,name:n,args:r,signature:o,selector:t})}}class Rd{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){Gr(this,{hash:e,_isIndexed:!0})}}const kd={0:\"generic panic\",1:\"assert(false)\",17:\"arithmetic overflow\",18:\"division or modulo by zero\",33:\"enum overflow\",34:\"invalid encoded storage byte array accessed\",49:\"out-of-bounds array access; popping on an empty array\",50:\"out-of-bounds access of an array or bytesN\",65:\"out of memory\",81:\"uninitialized function\"},Od={\"0x08c379a0\":{signature:\"Error(string)\",name:\"Error\",inputs:[\"string\"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},\"0x4e487b71\":{signature:\"Panic(uint256)\",name:\"Panic\",inputs:[\"uint256\"],reason:e=>{let t=\"unknown panic code\";return e>=0&&e<=255&&kd[e.toString()]&&(t=kd[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class Fd{fragments;deploy;fallback;receive;#Y;#J;#X;#Q;constructor(e){let t=[];t=\"string\"==typeof e?JSON.parse(e):e,this.#X=new Map,this.#Y=new Map,this.#J=new Map;const r=[];for(const e of t)try{r.push(vd.from(e))}catch(e){console.log(\"EE\",e)}Gr(this,{fragments:Object.freeze(r)});let n=null,o=!1;this.#Q=this.getAbiCoder(),this.fragments.forEach((e,t)=>{let r;switch(e.type){case\"constructor\":return this.deploy?void console.log(\"duplicate definition - constructor\"):void Gr(this,{deploy:e});case\"fallback\":return void(0===e.inputs.length?o=!0:(Jr(!n||e.payable!==n.payable,\"conflicting fallback fragments\",`fragments[${t}]`,e),n=e,o=n.payable));case\"function\":r=this.#X;break;case\"event\":r=this.#J;break;case\"error\":r=this.#Y;break;default:return}const s=e.format();r.has(s)||r.set(s,e)}),this.deploy||Gr(this,{deploy:Bd.from(\"constructor()\")}),Gr(this,{fallback:n,receive:o})}format(e){const t=e?\"minimal\":\"full\",r=this.fragments.map(e=>e.format(t));return r}formatJson(){const e=this.fragments.map(e=>e.format(\"json\"));return JSON.stringify(e.map(e=>JSON.parse(e)))}getAbiCoder(){return tc.defaultAbiCoder()}#ee(e,t,r){if(sn(e)){const t=e.toLowerCase();for(const e of this.#X.values())if(t===e.selector)return e;return null}if(-1===e.indexOf(\"(\")){const n=[];for(const[t,r]of this.#X)t.split(\"(\")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,o=!0;da.isTyped(e)&&\"overrides\"===e.type&&(o=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||o&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o<t.length;o++)if(da.isTyped(t[o])){if(o>=r.length){if(\"overrides\"===t[o].type)continue;n.splice(e,1);break}if(t[o].type!==r[o].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||\"object\"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){Jr(!1,`ambiguous function description (i.e. matches ${n.map(e=>JSON.stringify(e.format())).join(\", \")})`,\"key\",e)}return n[0]}const n=this.#X.get(Id.from(e).format());return n||null}getFunctionName(e){const t=this.#ee(e,null,!1);return Jr(t,\"no matching function\",\"key\",e),t.name}hasFunction(e){return!!this.#ee(e,null,!1)}getFunction(e,t){return this.#ee(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#X.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){const n=t[r];e(this.#X.get(n),r)}}#te(e,t,r){if(sn(e)){const t=e.toLowerCase();for(const e of this.#J.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf(\"(\")){const n=[];for(const[t,r]of this.#J)t.split(\"(\")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o<t.length;o++)if(da.isTyped(t[o])&&t[o].type!==r[o].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){Jr(!1,`ambiguous event description (i.e. matches ${n.map(e=>JSON.stringify(e.format())).join(\", \")})`,\"key\",e)}return n[0]}const n=this.#J.get(Pd.from(e).format());return n||null}getEventName(e){const t=this.#te(e,null,!1);return Jr(t,\"no matching event\",\"key\",e),t.name}hasEvent(e){return!!this.#te(e,null,!1)}getEvent(e,t){return this.#te(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#J.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){const n=t[r];e(this.#J.get(n),r)}}getError(e,t){if(sn(e)){const t=e.toLowerCase();if(Od[t])return Ed.from(Od[t].signature);for(const e of this.#Y.values())if(t===e.selector)return e;return null}if(-1===e.indexOf(\"(\")){const t=[];for(const[r,n]of this.#Y)r.split(\"(\")[0]===e&&t.push(n);if(0===t.length)return\"Error\"===e?Ed.from(\"error Error(string)\"):\"Panic\"===e?Ed.from(\"error Panic(uint256)\"):null;if(t.length>1){Jr(!1,`ambiguous error description (i.e. ${t.map(e=>JSON.stringify(e.format())).join(\", \")})`,\"name\",e)}return t[0]}if(\"Error(string)\"===(e=Ed.from(e).format()))return Ed.from(\"error Error(string)\");if(\"Panic(uint256)\"===e)return Ed.from(\"error Panic(uint256)\");const r=this.#Y.get(e);return r||null}forEachError(e){const t=Array.from(this.#Y.keys());t.sort((e,t)=>e.localeCompare(t));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Y.get(n),r)}}_decodeParams(e,t){return this.#Q.decode(e,t)}_encodeParams(e,t){return this.#Q.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if(\"string\"==typeof e){const t=this.getError(e);Jr(t,\"unknown error\",\"fragment\",e),e=t}return Jr(fn(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,\"data\",t),this._decodeParams(e.inputs,fn(t,4))}encodeErrorResult(e,t){if(\"string\"==typeof e){const t=this.getError(e);Jr(t,\"unknown error\",\"fragment\",e),e=t}return ln([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);Jr(t,\"unknown function\",\"fragment\",e),e=t}return Jr(fn(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,\"data\",t),this._decodeParams(e.inputs,fn(t,4))}encodeFunctionData(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);Jr(t,\"unknown function\",\"fragment\",e),e=t}return ln([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);Jr(t,\"unknown function\",\"fragment\",e),e=t}let r=\"invalid length for result data\";const n=on(t);if(n.length%32==0)try{return this.#Q.decode(e.outputs,n)}catch(e){r=\"could not decode result data\"}Yr(!1,r,\"BAD_DATA\",{value:un(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){const r=nn(e,\"data\"),n=tc.getBuiltinCallException(\"call\",t,r);if(n.message.startsWith(\"execution reverted (unknown custom error)\")){const e=un(r.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#Q.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message=\"execution reverted (coult not decode custom error)\"}}const o=this.parseTransaction(t);return o&&(n.invocation={method:o.name,signature:o.signature,args:o.args}),n}encodeFunctionResult(e,t){if(\"string\"==typeof e){const t=this.getFunction(e);Jr(t,\"unknown function\",\"fragment\",e),e=t}return un(this.#Q.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if(\"string\"==typeof e){const t=this.getEvent(e);Jr(t,\"unknown event\",\"eventFragment\",e),e=t}Yr(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,\"UNEXPECTED_ARGUMENT\",{count:t.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const n=(e,t)=>\"string\"===e.type?ys(t):\"bytes\"===e.type?gs(un(t)):(\"bool\"===e.type&&\"boolean\"==typeof t&&(t=t?\"0x01\":\"0x00\"),e.type.match(/^u?int/)&&(t=Bn(t)),\"address\"===e.type&&this.#Q.encode([\"address\"],[t]),hn(un(t),32));for(t.forEach((t,o)=>{const s=e.inputs[o];s.indexed?null==t?r.push(null):\"array\"===s.baseType||\"tuple\"===s.baseType?Jr(!1,\"filtering with tuples or arrays not supported\",\"contract.\"+s.name,t):Array.isArray(t)?r.push(t.map(e=>n(s,e))):r.push(n(s,t)):Jr(null==t,\"cannot filter non-indexed parameters; must be null\",\"contract.\"+s.name,t)});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if(\"string\"==typeof e){const t=this.getEvent(e);Jr(t,\"unknown event\",\"eventFragment\",e),e=t}const r=[],n=[],o=[];return e.anonymous||r.push(e.topicHash),Jr(t.length===e.inputs.length,\"event arguments/values mismatch\",\"values\",t),e.inputs.forEach((e,s)=>{const i=t[s];if(e.indexed)if(\"string\"===e.type)r.push(ys(i));else if(\"bytes\"===e.type)r.push(gs(i));else{if(\"tuple\"===e.baseType||\"array\"===e.baseType)throw new Error(\"not implemented\");r.push(this.#Q.encode([e.type],[i]))}else n.push(e),o.push(i)}),{data:this.#Q.encode(n,o),topics:r}}decodeEventLog(e,t,r){if(\"string\"==typeof e){const t=this.getEvent(e);Jr(t,\"unknown event\",\"eventFragment\",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;Jr(sn(r[0],32)&&r[0].toLowerCase()===t,\"fragment/topic mismatch\",\"topics[0]\",r[0]),r=r.slice(1)}const n=[],o=[],s=[];e.inputs.forEach((e,t)=>{e.indexed?\"string\"===e.type||\"bytes\"===e.type||\"tuple\"===e.baseType||\"array\"===e.baseType?(n.push(wd.from({type:\"bytes32\",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(o.push(e),s.push(!1))});const i=null!=r?this.#Q.decode(n,ln(r)):null,a=this.#Q.decode(o,t,!0),c=[],u=[];let l=0,d=0;return e.inputs.forEach((e,t)=>{let r=null;if(e.indexed)if(null==i)r=new Rd(null);else if(s[t])r=new Rd(i[d++]);else try{r=i[d++]}catch(e){r=e}else try{r=a[l++]}catch(e){r=e}c.push(r),u.push(e.name||null)}),ra.fromItems(c,u)}parseTransaction(e){const t=nn(e.data,\"tx.data\"),r=vn(null!=e.value?e.value:0,\"tx.value\"),n=this.getFunction(un(t.slice(0,4)));if(!n)return null;const o=this.#Q.decode(n.inputs,t.slice(4));return new xd(n,n.selector,o,r)}parseCallResult(e){throw new Error(\"@TODO\")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Wd(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=un(e),r=this.getError(fn(t,0,4));if(!r)return null;const n=this.#Q.decode(r.inputs,fn(t,4));return new _d(r,r.selector,n)}static from(e){return e instanceof Fd?e:\"string\"==typeof e?new Fd(JSON.parse(e)):\"function\"==typeof e.format?new Fd(e.format(\"json\")):new Fd(e)}}var Md=r(1048).hp;const Nd=e=>Mn.from(e),Ud=e=>Mn.from(e).serialized,Dd=e=>nn(e),Ld={sighash:\"sighash\",minimal:\"minimal\",full:\"full\",json:\"json\"},$d=xs.isValidMnemonic;function zd(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function jd(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&\"object\"==typeof r&&\"Uint8Array\"===r.constructor.name))throw new Error(\"Uint8Array expected\");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Vd(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");zd(e.outputLen),zd(e.blockLen)}function Hd(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function Gd(e,t){jd(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Os.register((e,t,r)=>Os._(e,Md.from(t),Md.from(r)));const Kd=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0;const qd=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Zd=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function Yd(e){return\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),jd(e),e}class Jd{clone(){return this._cloneInto()}}function Xd(e=32){if(Kd&&\"function\"==typeof Kd.getRandomValues)return Kd.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}const Qd=(e,t,r)=>e&t^~e&r,ef=(e,t,r)=>e&t^e&r^t&r;class tf extends Jd{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=qd(this.buffer)}update(e){Hd(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=Yd(e)).length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);if(i===n){const t=qd(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Hd(this),Gd(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const i=qd(e),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=a/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)i.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:i}=this;return e.length=n,e.pos=i,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const rf=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),nf=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),of=new Uint32Array(64);class sf extends tf{constructor(){super(64,32,8,!1),this.A=0|nf[0],this.B=0|nf[1],this.C=0|nf[2],this.D=0|nf[3],this.E=0|nf[4],this.F=0|nf[5],this.G=0|nf[6],this.H=0|nf[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)of[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=of[e-15],r=of[e-2],n=Zd(t,7)^Zd(t,18)^t>>>3,o=Zd(r,17)^Zd(r,19)^r>>>10;of[e]=o+of[e-7]+n+of[e-16]|0}let{A:r,B:n,C:o,D:s,E:i,F:a,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(Zd(i,6)^Zd(i,11)^Zd(i,25))+Qd(i,a,c)+rf[e]+of[e]|0,l=(Zd(r,2)^Zd(r,13)^Zd(r,22))+ef(r,n,o)|0;u=c,c=a,a=i,i=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,i=i+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,i,a,c,u)}roundClean(){of.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const af=function(e){const t=t=>e().update(Yd(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}(()=>new sf);class cf extends Jd{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Vd(e);const r=Yd(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return Hd(this),this.iHash.update(e),this}digestInto(e){Hd(this),jd(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:i}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=i,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const uf=(e,t,r)=>new cf(e,t).update(r).digest();uf.create=(e,t)=>new cf(e,t);const lf=BigInt(1),df=BigInt(2);function ff(e){return e instanceof Uint8Array||null!=e&&\"object\"==typeof e&&\"Uint8Array\"===e.constructor.name}function pf(e){if(!ff(e))throw new Error(\"Uint8Array expected\")}const hf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function gf(e){pf(e);let t=\"\";for(let r=0;r<e.length;r++)t+=hf[e[r]];return t}function yf(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return BigInt(\"\"===e?\"0\":`0x${e}`)}const mf={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function bf(e){return e>=mf._0&&e<=mf._9?e-mf._0:e>=mf._A&&e<=mf._F?e-(mf._A-10):e>=mf._a&&e<=mf._f?e-(mf._a-10):void 0}function wf(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=bf(e.charCodeAt(o)),s=bf(e.charCodeAt(o+1));if(void 0===r||void 0===s){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character \"'+t+'\" at index '+o)}n[t]=16*r+s}return n}function vf(e){return yf(gf(e))}function Tf(e){return pf(e),yf(gf(Uint8Array.from(e).reverse()))}function Af(e,t){return wf(e.toString(16).padStart(2*t,\"0\"))}function Ef(e,t){return Af(e,t).reverse()}function Pf(e,t,r){let n;if(\"string\"==typeof t)try{n=wf(t)}catch(r){throw new Error(`${e} must be valid hex string, got \"${t}\". Cause: ${r}`)}else{if(!ff(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function Bf(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];pf(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}const Cf=e=>(df<<BigInt(e-1))-lf,If=e=>new Uint8Array(e),Sf=e=>Uint8Array.from(e);function Wf(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=If(e),o=If(e),s=0;const i=()=>{n.fill(1),o.fill(0),s=0},a=(...e)=>r(o,n,...e),c=(e=If())=>{o=a(Sf([0]),e),n=a(),0!==e.length&&(o=a(Sf([1]),e),n=a())},u=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return Bf(...r)};return(e,t)=>{let r;for(i(),c(e);!(r=t(u()));)c();return i(),r}}const xf={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||ff(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function _f(e,t,r={}){const n=(t,r,n)=>{const o=xf[r];if(\"function\"!=typeof o)throw new Error(`Invalid validator \"${r}\", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const Rf=BigInt(0),kf=BigInt(1),Of=BigInt(2),Ff=BigInt(3),Mf=BigInt(4),Nf=BigInt(5),Uf=BigInt(8);BigInt(9),BigInt(16);function Df(e,t){const r=e%t;return r>=Rf?r:t+r}function Lf(e,t,r){if(r<=Rf||t<Rf)throw new Error(\"Expected power/modulo > 0\");if(r===kf)return Rf;let n=kf;for(;t>Rf;)t&kf&&(n=n*e%r),e=e*e%r,t>>=kf;return n}function $f(e,t,r){let n=e;for(;t-- >Rf;)n*=n,n%=r;return n}function zf(e,t){if(e===Rf||t<=Rf)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Df(e,t),n=t,o=Rf,s=kf,i=kf,a=Rf;for(;r!==Rf;){const e=n/r,t=n%r,c=o-i*e,u=s-a*e;n=r,r=t,o=i,s=a,i=c,a=u}if(n!==kf)throw new Error(\"invert: does not exist\");return Df(o,t)}function jf(e){if(e%Mf===Ff){const t=(e+kf)/Mf;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%Uf===Nf){const t=(e-Nf)/Uf;return function(e,r){const n=e.mul(r,Of),o=e.pow(n,t),s=e.mul(r,o),i=e.mul(e.mul(s,Of),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error(\"Cannot find square root\");return a}}return function(e){const t=(e-kf)/Of;let r,n,o;for(r=e-kf,n=0;r%Of===Rf;r/=Of,n++);for(o=Of;o<e&&Lf(o,t,e)!==e-kf;o++);if(1===n){const t=(e+kf)/Mf;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+kf)/Of;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let a=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(i,s),l=e.pow(i,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,kf<<BigInt(a-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),a=t}return u}}(e)}const Vf=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function Hf(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Gf(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function Kf(e){const t=Gf(e);return t+Math.ceil(t/2)}const qf=BigInt(0),Zf=BigInt(1);function Yf(e){return function(e){const t=Vf.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});_f(e,t)}(e.Fp),_f(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...Hf(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Jf,aT:Xf}=c,Qf={Err:class extends Error{constructor(e=\"\"){super(e)}},_parseInt(e){const{Err:t}=Qf;if(e.length<2||2!==e[0])throw new t(\"Invalid signature integer tag\");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t(\"Invalid signature integer: wrong length\");if(128&n[0])throw new t(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new t(\"Invalid signature integer: unnecessary leading zero\");return{d:Jf(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Qf,r=\"string\"==typeof e?Xf(e):e;pf(r);let n=r.length;if(n<2||48!=r[0])throw new t(\"Invalid signature tag\");if(r[1]!==n-2)throw new t(\"Invalid signature: incorrect length\");const{d:o,l:s}=Qf._parseInt(r.subarray(2)),{d:i,l:a}=Qf._parseInt(s);if(a.length)throw new t(\"Invalid signature: left bytes after parsing\");return{r:o,s:i}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?\"00\"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,i=o.length/2,a=r(s),c=r(i);return`30${r(i+s+4)}02${c}${o}02${a}${n}`}},ep=BigInt(0),tp=BigInt(1),rp=(BigInt(2),BigInt(3));BigInt(4);function np(e){const t=function(e){const t=Yf(e);_f(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return Bf(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),i=r.mul(s,e);return r.add(r.add(i,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function i(e){return\"bigint\"==typeof e&&ep<e&&e<t.n}function a(e){if(!i(e))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&\"bigint\"!=typeof e){if(ff(e)&&(e=gf(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"Invalid key\");e=e.padStart(2*n,\"0\")}let i;try{i=\"bigint\"==typeof e?e:vf(Pf(\"private key\",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(i=Df(i,s)),a(i),i}const u=new Map;function l(e){if(!(e instanceof d))throw new Error(\"ProjectivePoint expected\")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof d)throw new Error(\"projective point not allowed\");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(Pf(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const o=r.sqr(n),i=s(e);if(!r.eql(o,i))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:i,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(s,o)),u=r.eql(r.mul(n,a),r.mul(i,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,rp),{px:s,py:i,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(i,i),h=r.mul(a,a),g=r.mul(s,i);return g=r.add(g,g),l=r.mul(s,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(i,a),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:i,py:a,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,rp);let y=r.mul(n,i),m=r.mul(o,a),b=r.mul(s,c),w=r.add(n,o),v=r.add(i,a);w=r.mul(w,v),v=r.add(y,m),w=r.sub(w,v),v=r.add(n,s);let T=r.add(i,c);return v=r.mul(v,T),T=r.add(y,b),v=r.sub(v,T),T=r.add(o,s),u=r.add(a,c),T=r.mul(T,u),u=r.add(m,b),T=r.sub(T,u),p=r.mul(h,v),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),v=r.mul(g,v),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),v=r.add(v,b),y=r.mul(m,v),f=r.add(f,y),y=r.mul(T,v),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(T,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,e=>{const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){const n=d.ZERO;if(e===ep)return n;if(a(e),e===tp)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:i,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;i>ep||u>ep;)i&tp&&(l=l.add(h)),u&tp&&(f=f.add(h)),h=h.double(),i>>=tp,u>>=tp;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){a(e);let n,o,s=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:a,k2:c}=i.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(a,f),f=new d(r.mul(f.px,i.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==ep&&t!==tp&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const i=r.mul(t,e),a=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:i,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===tp)return!0;if(r)return r(d,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===tp?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return gf(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>qf;)r&Zf&&(n=n.add(o)),o=o.double(),r>>=Zf;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let i=e,a=i;for(let e=0;e<r;e++){a=i,s.push(a);for(let e=1;e<o;e++)a=a.add(i),s.push(a);i=a.double()}return s},wNAF(t,o,s){const{windows:i,windowSize:a}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<i;e++){const t=e*a;let n=Number(s&l);s>>=f,n>a&&(n-=d,s+=Zf);const i=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[i])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:i}}function op(e){const t=function(e){const t=Yf(e);return _f(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function i(e){return Df(e,n)}function a(e){return zf(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=np({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),i=Bf;return n?i(Uint8Array.from([t.hasEvenY()?2:3]),s):i(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],i=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=vf(i);if(!function(e){return ep<e&&e<r.ORDER}(e))throw new Error(\"Point is not on curve\");const t=l(e);let o;try{o=r.sqrt(t)}catch(e){const t=e instanceof Error?\": \"+e.message:\"\";throw new Error(\"Point is not on curve\"+t)}return!(1&~n)!==((o&tp)===tp)&&(o=r.neg(o)),{x:e,y:o}}}}),f=e=>gf(Af(e,t.nByteLength));function p(e){return e>n>>tp}const h=(e,t,r)=>vf(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=Pf(\"compactSignature\",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Qf.toSig(Pf(\"DER\",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!d(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(Pf(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const d=1&s?\"03\":\"02\",p=c.fromHex(d+f(l)),h=a(l),g=i(-u*h),y=i(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return wf(this.toDERHex())}toDERHex(){return Qf.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return wf(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=Kf(t.n);return function(e,t,r=!1){const n=e.length,o=Gf(t),s=Kf(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const i=Df(r?vf(e):Tf(e),t-kf)+kf;return r?Ef(i,o):Af(i,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=ff(e),r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=vf(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return i(b(e))},v=Cf(t.nBitLength);function T(e){if(\"bigint\"!=typeof e)throw new Error(\"bigint expected\");if(!(ep<=e&&e<v))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Af(e,t.nByteLength)}function A(e,n,o=E){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=Pf(\"msgHash\",e),h&&(e=Pf(\"prehashed msgHash\",s(e)));const m=w(e),v=u(n),A=[T(v),T(m)];if(null!=y&&!1!==y){const e=!0===y?l(r.BYTES):y;A.push(Pf(\"extraEntropy\",e))}const P=Bf(...A),B=m;return{seed:P,k2sig:function(e){const t=b(e);if(!d(t))return;const r=a(t),n=c.BASE.multiply(t).toAffine(),o=i(n.x);if(o===ep)return;const s=i(r*i(B+o*v));if(s===ep)return;let u=(n.x===o?0:2)|Number(n.y&tp),l=s;return f&&p(s)&&(l=function(e){return p(e)?i(-e):e}(s),u^=1),new g(o,l,u)}}}const E={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=E){const{seed:o,k2sig:s}=A(e,r,n),i=t;return Wf(i.hash.outputLen,i.nByteLength,i.hmac)(o,s)},verify:function(e,r,n,o=P){const s=e;if(r=Pf(\"msgHash\",r),n=Pf(\"publicKey\",n),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const{lowS:u,prehash:l}=o;let d,f;try{if(\"string\"==typeof s||ff(s))try{d=g.fromDER(s)}catch(e){if(!(e instanceof Qf.Err))throw e;d=g.fromCompact(s)}else{if(\"object\"!=typeof s||\"bigint\"!=typeof s.r||\"bigint\"!=typeof s.s)throw new Error(\"PARSE\");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if(\"PARSE\"===e.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=a(h),b=i(y*m),v=i(p*m),T=c.BASE.multiplyAndAddUnsafe(f,b,v)?.toAffine();return!!T&&i(T.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function sp(e){return{hash:e,hmac:(t,...r)=>uf(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];jd(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}(...r)),randomBytes:Xd}}const ip=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),ap=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),cp=BigInt(1),up=BigInt(2),lp=(e,t)=>(e+t/up)/t;function dp(e){const t=ip,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=$f(l,r,t)*l%t,f=$f(d,r,t)*l%t,p=$f(f,up,t)*u%t,h=$f(p,o,t)*p%t,g=$f(h,s,t)*h%t,y=$f(g,a,t)*g%t,m=$f(y,c,t)*y%t,b=$f(m,a,t)*g%t,w=$f(b,r,t)*l%t,v=$f(w,i,t)*h%t,T=$f(v,n,t)*u%t,A=$f(T,up,t);if(!fp.eql(fp.sqr(A),e))throw new Error(\"Cannot find square root\");return A}const fp=function(e,t,r=!1,n={}){if(e<=Rf)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=Hf(e,t);if(s>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const i=jf(e),a=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:Cf(o),ZERO:Rf,ONE:kf,create:t=>Df(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"Invalid field element: expected bigint, got \"+typeof t);return Rf<=t&&t<e},is0:e=>e===Rf,isOdd:e=>(e&kf)===kf,neg:t=>Df(-t,e),eql:(e,t)=>e===t,sqr:t=>Df(t*t,e),add:(t,r)=>Df(t+r,e),sub:(t,r)=>Df(t-r,e),mul:(t,r)=>Df(t*r,e),pow:(e,t)=>function(e,t,r){if(r<Rf)throw new Error(\"Expected power > 0\");if(r===Rf)return e.ONE;if(r===kf)return t;let n=e.ONE,o=t;for(;r>Rf;)r&kf&&(n=e.mul(n,o)),o=e.sqr(o),r>>=kf;return n}(a,e,t),div:(t,r)=>Df(t*zf(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>zf(t,e),sqrt:n.sqrt||(e=>i(a,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),o=e.inv(n);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),o),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Ef(e,s):Af(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Tf(e):vf(e)}});return Object.freeze(a)}(ip,void 0,void 0,{sqrt:dp}),pp=function(e,t){const r=t=>op({...e,...sp(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:fp,n:ap,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=ap,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-cp*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),o=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,i=BigInt(\"0x100000000000000000000000000000000\"),a=lp(s*e,t),c=lp(-n*e,t);let u=Df(e-a*r-c*o,t),l=Df(-a*n-c*s,t);const d=u>i,f=l>i;if(d&&(u=t-u),f&&(l=t-l),u>i||l>i)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},af);BigInt(0);pp.ProjectivePoint;var hp=r(1048).hp;function gp(e){const t=Rp(e);let r=Rp(t).slice(0,4);return r=e.concat(r),Lr(r)}function yp(e){if(\"string\"!=typeof e)return!1;if(e.length<=4)return!1;let t=$r(e);if(e.length<=4)return!1;const r=t.length-4,n=t.slice(r);t=t.slice(0,r);const o=Rp(t),s=Rp(o).slice(0,4);if(n[0]==s[0]&&n[1]==s[1]&&n[2]==s[2]&&n[3]==s[3])return t;throw new Error(\"Invalid address provided\")}function mp(e,t){\"string\"==typeof e&&(e=kr(e));const r=_p(kr(t.txID),e);return Array.isArray(t.signature)?t.signature.includes(r)||t.signature.push(r):t.signature=[r],t}function bp(e,t){e=\"0x\"+e.replace(/^0x/,\"\"),t=\"0x\"+t.replace(/^0x/,\"\");const r=Gi(Dd(e),Mn.from(t));return Er+r.substring(2)}function wp(e){return btoa(String.fromCharCode(...e))}function vp(e,t){\"string\"==typeof e&&(e=kr(e));return _p(Rp(t),e)}function Tp(e){const t=vr(e);return globalThis.proto.protocol.Transaction.deserializeBinary(t).getRawData().serializeBinary()}function Ap(){let e=wr(pp.utils.randomPrivateKey());return e=e.padStart(64,\"0\"),kr(e)}function Ep(e){65===e.length&&(e=e.slice(1));const t=gs(new Uint8Array(e)).toString().substring(2);return kr(Er+t.substring(24))}function Pp(e){return Ep(xp(e))}function Bp(e){const t=$r(e);if(t.length<=4)return!1;const r=t.slice(0,t.length-4),n=Rp(r),o=Rp(n);return o[0]===t[r.length]&&o[1]===t[r.length+1]&&o[2]===t[r.length+2]&&o[3]===t[r.length+3]&&r}function Cp(e){if(\"string\"!=typeof e)return!1;if(e.length!==Ar)return!1;let t=$r(e);if(25!==t.length)return!1;if(t[0]!==Pr)return!1;const r=t.slice(21);t=t.slice(0,21);const n=Rp(t),o=Rp(n).slice(0,4);return r[0]==o[0]&&r[1]==o[1]&&r[2]==o[2]&&r[3]==o[3]}function Ip(e){return gp(Ep(xp(vr(e))))}function Sp(e){return wr(Ep(xp(vr(e))))}function Wp(e){return Tr(Ep(xp(vr(e))))}function xp(e){const t=pp.ProjectivePoint.fromPrivateKey(new Uint8Array(function(e){return kr(wr(e).padStart(64,\"0\"))}(e))),r=t.x,n=t.y;return kr(`04${r.toString(16).padStart(64,\"0\")}${n.toString(16).padStart(64,\"0\")}`)}function _p(e,t){const r=pp.sign(wr(e),wr(t)),n=r.r.toString(16),o=r.s.toString(16),s=r.recovery+27;return n.padStart(64,\"0\")+o.padStart(64,\"0\")+yr(s)}function Rp(e){return kr(Do(\"0x\"+wr(e)).replace(/^0x/,\"\"))}function kp(e){return gp(Pp(vr(e)))}function Op(e,t=!1){return gp(Pp(kr(e,t)))}function Fp(e,t=!0){return(t?\"0x\":\"\")+gs(hp.from(e,\"utf-8\")).toString().substring(2)}const Mp=\"Invalid tron path provided\";function Np(){const e=Ap(),t=xp(e),r=Pp(e);return{privateKey:wr(e),publicKey:wr(t),address:{base58:gp(r),hex:wr(r)}}}function Up(e=\"\",t=Ir,r){const n=Fl.createRandom(e,t,r);return{mnemonic:n.mnemonic,privateKey:n.privateKey,publicKey:n.signingKey.publicKey,address:Op(n.privateKey.replace(/^0x/,\"\")),path:n.path}}function Dp(e,t=Ir,r=\"\",n=null){if(!String(t).match(/^m\\/44\\'\\/195\\'/))throw new Error(Mp);const o=Fl.fromMnemonic(xs.fromPhrase(e,r,n),t);return{mnemonic:o.mnemonic,privateKey:o.privateKey,publicKey:o.signingKey.publicKey,address:Op(o.privateKey.replace(/^0x/,\"\"))}}var Lp=/^-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/i,$p=Math.ceil,zp=Math.floor,jp=\"[BigNumber Error] \",Vp=jp+\"Number primitive has more than 15 significant digits: \",Hp=1e14,Gp=14,Kp=9007199254740991,qp=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Zp=1e7,Yp=1e9;function Jp(e){var t=0|e;return e>0||e===t?t:t-1}function Xp(e){for(var t,r,n=1,o=e.length,s=e[0]+\"\";n<o;){for(t=e[n++]+\"\",r=Gp-t.length;r--;t=\"0\"+t);s+=t}for(o=s.length;48===s.charCodeAt(--o););return s.slice(0,o+1||1)}function Qp(e,t){var r,n,o=e.c,s=t.c,i=e.s,a=t.s,c=e.e,u=t.e;if(!i||!a)return null;if(r=o&&!o[0],n=s&&!s[0],r||n)return r?n?0:-a:i;if(i!=a)return i;if(r=i<0,n=c==u,!o||!s)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=o.length)<(u=s.length)?c:u,i=0;i<a;i++)if(o[i]!=s[i])return o[i]>s[i]^r?1:-1;return c==u?0:c>u^r?1:-1}function eh(e,t,r,n){if(e<t||e>r||e!==zp(e))throw Error(jp+(n||\"Argument\")+(\"number\"==typeof e?e<t||e>r?\" out of range: \":\" not an integer: \":\" not a primitive number: \")+String(e))}function th(e){var t=e.c.length-1;return Jp(e.e/Gp)==t&&e.c[t]%2!=0}function rh(e,t){return(e.length>1?e.charAt(0)+\".\"+e.slice(1):e)+(t<0?\"e\":\"e+\")+t}function nh(e,t,r){var n,o;if(t<0){for(o=r+\".\";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+\".\"+e.slice(t));return e}var oh=function e(t){var r,n,o,s,i,a,c,u,l,d,f=C.prototype={constructor:C,toString:null,valueOf:null},p=new C(1),h=20,g=4,y=-7,m=21,b=-1e7,w=1e7,v=!1,T=1,A=0,E={prefix:\"\",groupSize:3,secondaryGroupSize:0,groupSeparator:\",\",decimalSeparator:\".\",fractionGroupSize:0,fractionGroupSeparator:\" \",suffix:\"\"},P=\"0123456789abcdefghijklmnopqrstuvwxyz\",B=!0;function C(e,t){var r,s,i,a,c,u,l,d,f=this;if(!(f instanceof C))return new C(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u=\"number\"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,c=e;c>=10;c/=10,a++);return void(a>w?f.c=f.e=null:(f.e=a,f.c=[e]))}d=String(e)}else{if(!Lp.test(d=String(e)))return o(f,d,u);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf(\".\"))>-1&&(d=d.replace(\".\",\"\")),(c=d.search(/e/i))>0?(a<0&&(a=c),a+=+d.slice(c+1),d=d.substring(0,c)):a<0&&(a=d.length)}else{if(eh(t,2,P.length,\"Base\"),10==t&&B)return x(f=new C(e),h+f.e+1,g);if(d=String(e),u=\"number\"==typeof e){if(0*e!=0)return o(f,d,u,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,C.DEBUG&&d.replace(/^0\\.0*|\\./,\"\").length>15)throw Error(Vp+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=P.slice(0,t),a=c=0,l=d.length;c<l;c++)if(r.indexOf(s=d.charAt(c))<0){if(\".\"==s){if(c>a){a=l;continue}}else if(!i&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){i=!0,c=-1,a=0;continue}return o(f,String(e),u,t)}u=!1,(a=(d=n(d,t,10,f.s)).indexOf(\".\"))>-1?d=d.replace(\".\",\"\"):a=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&C.DEBUG&&l>15&&(e>Kp||e!==zp(e)))throw Error(Vp+f.s*e);if((a=a-c-1)>w)f.c=f.e=null;else if(a<b)f.c=[f.e=0];else{if(f.e=a,f.c=[],c=(a+1)%Gp,a<0&&(c+=Gp),c<l){for(c&&f.c.push(+d.slice(0,c)),l-=Gp;c<l;)f.c.push(+d.slice(c,c+=Gp));c=Gp-(d=d.slice(c)).length}else c-=l;for(;c--;d+=\"0\");f.c.push(+d)}}else f.c=[f.e=0]}function I(e,t,r,n){var o,s,i,a,c;if(null==r?r=g:eh(r,0,8),!e.c)return e.toString();if(o=e.c[0],i=e.e,null==t)c=Xp(e.c),c=1==n||2==n&&(i<=y||i>=m)?rh(c,i):nh(c,i,\"0\");else if(s=(e=x(new C(e),t,r)).e,a=(c=Xp(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;a<t;c+=\"0\",a++);c=rh(c,s)}else if(t-=i,c=nh(c,s,\"0\"),s+1>a){if(--t>0)for(c+=\".\";t--;c+=\"0\");}else if((t+=s-a)>0)for(s+1==a&&(c+=\".\");t--;c+=\"0\");return e.s<0&&o?\"-\"+c:c}function S(e,t){for(var r,n,o=1,s=new C(e[0]);o<e.length;o++)(!(n=new C(e[o])).s||(r=Qp(s,n))===t||0===r&&s.s===t)&&(s=n);return s}function W(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*Gp-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function x(e,t,r,n){var o,s,i,a,c,u,l,d=e.c,f=qp;if(d){e:{for(o=1,a=d[0];a>=10;a/=10,o++);if((s=t-o)<0)s+=Gp,i=t,c=d[u=0],l=zp(c/f[o-i-1]%10);else if((u=$p((s+1)/Gp))>=d.length){if(!n)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,i=(s%=Gp)-Gp+1}else{for(c=a=d[u],o=1;a>=10;a/=10,o++);l=(i=(s%=Gp)-Gp+o)<0?0:zp(c/f[o-i-1]%10)}if(n=n||t<0||null!=d[u+1]||(i<0?c:c%f[o-i-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?i>0?c/f[o-i]:0:d[u-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=f[(Gp-t%Gp)%Gp],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=u,a=1,u--):(d.length=u+1,a=f[Gp-s],d[u]=i>0?zp(c/f[o-i]%f[i])*a:0),n)for(;;){if(0==u){for(s=1,i=d[0];i>=10;i/=10,s++);for(i=d[0]+=a,a=1;i>=10;i/=10,a++);s!=a&&(e.e++,d[0]==Hp&&(d[0]=1));break}if(d[u]+=a,d[u]!=Hp)break;d[u--]=0,a=1}for(s=d.length;0===d[--s];d.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function _(e){var t,r=e.e;return null===r?e.toString():(t=Xp(e.c),t=r<=y||r>=m?rh(t,r):nh(t,r,\"0\"),e.s<0?\"-\"+t:t)}return C.clone=e,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(e){var t,r;if(null!=e){if(\"object\"!=typeof e)throw Error(jp+\"Object expected: \"+e);if(e.hasOwnProperty(t=\"DECIMAL_PLACES\")&&(eh(r=e[t],0,Yp,t),h=r),e.hasOwnProperty(t=\"ROUNDING_MODE\")&&(eh(r=e[t],0,8,t),g=r),e.hasOwnProperty(t=\"EXPONENTIAL_AT\")&&((r=e[t])&&r.pop?(eh(r[0],-1e9,0,t),eh(r[1],0,Yp,t),y=r[0],m=r[1]):(eh(r,-1e9,Yp,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t=\"RANGE\"))if((r=e[t])&&r.pop)eh(r[0],-1e9,-1,t),eh(r[1],1,Yp,t),b=r[0],w=r[1];else{if(eh(r,-1e9,Yp,t),!r)throw Error(jp+t+\" cannot be zero: \"+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t=\"CRYPTO\")){if((r=e[t])!==!!r)throw Error(jp+t+\" not true or false: \"+r);if(r){if(\"undefined\"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(jp+\"crypto unavailable\");v=r}else v=r}if(e.hasOwnProperty(t=\"MODULO_MODE\")&&(eh(r=e[t],0,9,t),T=r),e.hasOwnProperty(t=\"POW_PRECISION\")&&(eh(r=e[t],0,Yp,t),A=r),e.hasOwnProperty(t=\"FORMAT\")){if(\"object\"!=typeof(r=e[t]))throw Error(jp+t+\" not an object: \"+r);E=r}if(e.hasOwnProperty(t=\"ALPHABET\")){if(\"string\"!=typeof(r=e[t])||/^.?$|[+\\-.\\s]|(.).*\\1/.test(r))throw Error(jp+t+\" invalid: \"+r);B=\"0123456789\"==r.slice(0,10),P=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,m],RANGE:[b,w],CRYPTO:v,MODULO_MODE:T,POW_PRECISION:A,FORMAT:E,ALPHABET:P}},C.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!C.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if(\"[object Array]\"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-1e9&&o<=Yp&&o===zp(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%Gp)<1&&(t+=Gp),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Hp||r!==zp(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(jp+\"Invalid BigNumber: \"+e)},C.maximum=C.max=function(){return S(arguments,-1)},C.minimum=C.min=function(){return S(arguments,1)},C.random=(s=9007199254740992,i=Math.random()*s&2097151?function(){return zp(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,a=0,c=[],u=new C(p);if(null==e?e=h:eh(e,0,Yp),o=$p(e/Gp),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)(s=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(c.push(s%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(jp+\"crypto unavailable\");for(t=crypto.randomBytes(o*=7);a<o;)(s=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(c.push(s%1e14),a+=7);a=o/7}if(!v)for(;a<o;)(s=i())<9e15&&(c[a++]=s%1e14);for(o=c[--a],e%=Gp,o&&e&&(s=qp[Gp-e],c[a]=zp(o/s)*s);0===c[a];c.pop(),a--);if(a<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=Gp);for(a=1,s=c[0];s>=10;s/=10,a++);a<Gp&&(n-=Gp-a)}return u.e=n,u.c=c,u}),C.sum=function(){for(var e=1,t=arguments,r=new C(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e=\"0123456789\";function t(e,t,r,n){for(var o,s,i=[0],a=0,c=e.length;a<c;){for(s=i.length;s--;i[s]*=t);for(i[0]+=n.indexOf(e.charAt(a++)),o=0;o<i.length;o++)i[o]>r-1&&(null==i[o+1]&&(i[o+1]=0),i[o+1]+=i[o]/r|0,i[o]%=r)}return i.reverse()}return function(n,o,s,i,a){var c,u,l,d,f,p,y,m,b=n.indexOf(\".\"),w=h,v=g;for(b>=0&&(d=A,A=0,n=n.replace(\".\",\"\"),p=(m=new C(o)).pow(n.length-b),A=d,m.c=t(nh(Xp(p.c),p.e,\"0\"),10,s,e),m.e=m.c.length),l=d=(y=t(n,o,s,a?(c=P,e):(c=e,P))).length;0==y[--d];y.pop());if(!y[0])return c.charAt(0);if(b<0?--l:(p.c=y,p.e=l,p.s=i,y=(p=r(p,m,w,v,s)).c,f=p.r,l=p.e),b=y[u=l+w+1],d=s/2,f=f||u<0||null!=y[u+1],f=v<4?(null!=b||f)&&(0==v||v==(p.s<0?3:2)):b>d||b==d&&(4==v||f||6==v&&1&y[u-1]||v==(p.s<0?8:7)),u<1||!y[0])n=f?nh(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,f)for(--s;++y[--u]>s;)y[u]=0,u||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(b=0,n=\"\";b<=d;n+=c.charAt(y[b++]));n=nh(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,i,a=0,c=e.length,u=t%Zp,l=t/Zp|0;for(e=e.slice();c--;)a=((o=u*(s=e[c]%Zp)+(n=l*s+(i=e[c]/Zp|0)*u)%Zp*Zp+a)/r|0)+(n/Zp|0)+l*i,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;o<r;o++)if(e[o]!=t[o]){s=e[o]>t[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,s,i,a){var c,u,l,d,f,p,h,g,y,m,b,w,v,T,A,E,P,B=n.s==o.s?1:-1,I=n.c,S=o.c;if(!(I&&I[0]&&S&&S[0]))return new C(n.s&&o.s&&(I?!S||I[0]!=S[0]:S)?I&&0==I[0]||!S?0*B:B/0:NaN);for(y=(g=new C(B)).c=[],B=s+(u=n.e-o.e)+1,a||(a=Hp,u=Jp(n.e/Gp)-Jp(o.e/Gp),B=B/Gp|0),l=0;S[l]==(I[l]||0);l++);if(S[l]>(I[l]||0)&&u--,B<0)y.push(1),d=!0;else{for(T=I.length,E=S.length,l=0,B+=2,(f=zp(a/(S[0]+1)))>1&&(S=e(S,f,a),I=e(I,f,a),E=S.length,T=I.length),v=E,b=(m=I.slice(0,E)).length;b<E;m[b++]=0);P=S.slice(),P=[0].concat(P),A=S[0],S[1]>=a/2&&A++;do{if(f=0,(c=t(S,m,E,b))<0){if(w=m[0],E!=b&&(w=w*a+(m[1]||0)),(f=zp(w/A))>1)for(f>=a&&(f=a-1),h=(p=e(S,f,a)).length,b=m.length;1==t(p,m,h,b);)f--,r(p,E<h?P:S,h,a),h=p.length,c=1;else 0==f&&(c=f=1),h=(p=S.slice()).length;if(h<b&&(p=[0].concat(p)),r(m,p,b,a),b=m.length,-1==c)for(;t(S,m,E,b)<1;)f++,r(m,E<b?P:S,b,a),b=m.length}else 0===c&&(f++,m=[0]);y[l++]=f,m[0]?m[b++]=I[v]||0:(m=[I[v]],b=1)}while((v++<T||null!=m[0])&&B--);d=null!=m[0],y[0]||y.splice(0,1)}if(a==Hp){for(l=1,B=y[0];B>=10;B/=10,l++);x(g,s+(g.e=l+u*Gp-1)+1,i,d)}else g.e=u,g.r=+d;return g}}(),a=/^(-?)0([xbo])(?=\\w[\\w.]*$)/i,c=/^([^.]+)\\.$/,u=/^\\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,\"\");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(a,function(e,t,r){return o=\"x\"==(r=r.toLowerCase())?16:\"b\"==r?2:8,n&&n!=o?e:t}),n&&(o=n,s=s.replace(c,\"$1\").replace(u,\"0.$1\")),t!=s))return new C(s,o);if(C.DEBUG)throw Error(jp+\"Not a\"+(n?\" base \"+n:\"\")+\" number: \"+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new C(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return Qp(this,new C(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,s=this;if(null!=e)return eh(e,0,Yp),null==t?t=g:eh(t,0,8),x(new C(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-Jp(this.e/Gp))*Gp,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new C(e,t),h,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new C(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,s,i,a,c,u,l=this;if((e=new C(e)).c&&!e.isInteger())throw Error(jp+\"Exponent not an integer: \"+_(e));if(null!=t&&(t=new C(t)),i=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new C(Math.pow(+_(l),i?e.s*(2-th(e)):+_(e))),t?u.mod(t):u;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new C(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||i&&l.c[1]>=24e7:l.c[0]<8e13||i&&l.c[0]<=9999975e7)))return s=l.s<0&&th(e)?-0:0,l.e>-1&&(s=1/s),new C(a?1/s:s);A&&(s=$p(A/Gp+2))}for(i?(r=new C(.5),a&&(e.s=1),c=th(e)):c=(o=Math.abs(+_(e)))%2,u=new C(p);;){if(c){if(!(u=u.times(l)).c)break;s?u.c.length>s&&(u.c.length=s):n&&(u=u.mod(t))}if(o){if(0===(o=zp(o/2)))break;c=o%2}else if(x(e=e.times(r),e.e+1,1),e.e>14)c=th(e);else{if(0===(o=+_(e)))break;c=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?u:(a&&(u=p.div(u)),t?u.mod(t):s?x(u,A,g,void 0):u)},f.integerValue=function(e){var t=new C(this);return null==e?e=g:eh(e,0,8),x(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===Qp(this,new C(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return Qp(this,new C(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=Qp(this,new C(e,t)))||0===t},f.isInteger=function(){return!!this.c&&Jp(this.e/Gp)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return Qp(this,new C(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=Qp(this,new C(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,s,i=this,a=i.s;if(t=(e=new C(e,t)).s,!a||!t)return new C(NaN);if(a!=t)return e.s=-t,i.plus(e);var c=i.e/Gp,u=e.e/Gp,l=i.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new C(d?i:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new C(l[0]?i:3==g?-0:0)}if(c=Jp(c),u=Jp(u),l=l.slice(),a=c-u){for((s=a<0)?(a=-a,o=l):(u=c,o=d),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(s=(a=l.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(o=l,l=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=99999999999999;n>a;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Hp}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?W(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o,s=this;return e=new C(e,t),!s.c||!e.s||e.c&&!e.c[0]?new C(NaN):!e.c||s.c&&!s.c[0]?new C(s):(9==T?(o=e.s,e.s=1,n=r(s,e,0,3),e.s=o,n.s*=o):n=r(s,e,0,T),(e=s.minus(n.times(e))).c[0]||1!=T||(e.s=s.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,s,i,a,c,u,l,d,f,p,h,g,y,m=this,b=m.c,w=(e=new C(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Jp(m.e/Gp)+Jp(e.e/Gp),e.s*=m.s,(c=b.length)<(d=w.length)&&(h=b,b=w,w=h,o=c,c=d,d=o),o=c+d,h=[];o--;h.push(0));for(g=Hp,y=Zp,o=d;--o>=0;){for(r=0,f=w[o]%y,p=w[o]/y|0,s=o+(i=c);s>o;)r=((u=f*(u=b[--i]%y)+(a=p*u+(l=b[i]/y|0)*f)%y*y+h[s]+r)/g|0)+(a/y|0)+p*l,h[s--]=u%g;h[s]=r}return r?++n:h.splice(0,1),W(e,h,n)},f.negated=function(){var e=new C(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new C(e,t)).s,!o||!t)return new C(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/Gp,i=e.e/Gp,a=n.c,c=e.c;if(!s||!i){if(!a||!c)return new C(o/0);if(!a[0]||!c[0])return c[0]?e:new C(a[0]?n:0*o)}if(s=Jp(s),i=Jp(i),a=a.slice(),o=s-i){for(o>0?(i=s,r=c):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+c[t]+o)/Hp|0,a[t]=Hp===a[t]?0:a[t]%Hp;return o&&(a=[o].concat(a),++i),W(e,a,i)},f.precision=f.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return eh(e,1,Yp),null==t?t=g:eh(t,0,8),x(new C(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*Gp+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(e){return eh(e,-9007199254740991,Kp),this.times(\"1e\"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,s,i=this,a=i.c,c=i.s,u=i.e,l=h+4,d=new C(\"0.5\");if(1!==c||!a||!a[0])return new C(!c||c<0&&(!a||a[0])?NaN:a?i:1/0);if(0==(c=Math.sqrt(+_(i)))||c==1/0?(((t=Xp(a)).length+u)%2==0&&(t+=\"0\"),c=Math.sqrt(+t),u=Jp((u+1)/2)-(u<0||u%2),n=new C(t=c==1/0?\"5e\"+u:(t=c.toExponential()).slice(0,t.indexOf(\"e\")+1)+u)):n=new C(c+\"\"),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(s=n,n=d.times(s.plus(r(i,s,l,1))),Xp(s.c).slice(0,c)===(t=Xp(n.c)).slice(0,c)){if(n.e<u&&--c,\"9999\"!=(t=t.slice(c-3,c+1))&&(o||\"4999\"!=t)){+t&&(+t.slice(1)||\"5\"!=t.charAt(0))||(x(n,n.e+h+2,1),e=!n.times(n).eq(i));break}if(!o&&(x(s,s.e+h+2,0),s.times(s).eq(i))){n=s;break}l+=4,c+=4,o=1}return x(n,n.e+h+1,g,e)},f.toExponential=function(e,t){return null!=e&&(eh(e,0,Yp),e++),I(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(eh(e,0,Yp),e=e+this.e+1),I(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&\"object\"==typeof t?(r=t,t=null):e&&\"object\"==typeof e?(r=e,e=t=null):r=E;else if(\"object\"!=typeof r)throw Error(jp+\"Argument not an object: \"+r);if(n=o.toFixed(e,t),o.c){var s,i=n.split(\".\"),a=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||\"\",l=i[0],d=i[1],f=o.s<0,p=f?l.slice(1):l,h=p.length;if(c&&(s=a,a=c,c=s,h-=s),a>0&&h>0){for(s=h%a||a,l=p.substr(0,s);s<h;s+=a)l+=u+p.substr(s,a);c>0&&(l+=u+p.slice(s)),f&&(l=\"-\"+l)}n=d?l+(r.decimalSeparator||\"\")+((c=+r.fractionGroupSize)?d.replace(new RegExp(\"\\\\d{\"+c+\"}\\\\B\",\"g\"),\"$&\"+(r.fractionGroupSeparator||\"\")):d):l}return(r.prefix||\"\")+n+(r.suffix||\"\")},f.toFraction=function(e){var t,n,o,s,i,a,c,u,l,d,f,h,y=this,m=y.c;if(null!=e&&(!(c=new C(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(jp+\"Argument \"+(c.isInteger()?\"out of range: \":\"not an integer: \")+_(c));if(!m)return new C(y);for(t=new C(p),l=n=new C(p),o=u=new C(p),h=Xp(m),i=t.e=h.length-y.e-1,t.c[0]=qp[(a=i%Gp)<0?Gp+a:a],e=!e||c.comparedTo(t)>0?i>0?t:l:c,a=w,w=1/0,c=new C(h),u.c[0]=0;d=r(c,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=u.plus(d.times(s=l)),u=s,t=c.minus(d.times(s=t)),c=s;return s=r(e.minus(n),o,0,1),u=u.plus(s.times(l)),n=n.plus(s.times(o)),u.s=l.s=y.s,f=r(l,o,i*=2,g).minus(y).abs().comparedTo(r(u,n,i,g).minus(y).abs())<1?[l,o]:[u,n],w=a,f},f.toNumber=function(){return+_(this)},f.toPrecision=function(e,t){return null!=e&&eh(e,1,Yp),I(this,e,t,2)},f.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t=\"Infinity\",o<0&&(t=\"-\"+t)):t=\"NaN\":(null==e?t=s<=y||s>=m?rh(Xp(r.c),s):nh(Xp(r.c),s,\"0\"):10===e&&B?t=nh(Xp((r=x(new C(r),h+s+1,g)).c),r.e,\"0\"):(eh(e,2,P.length,\"Base\"),t=n(nh(Xp(r.c),s,\"0\"),10,e,o,!0)),o<0&&r.c[0]&&(t=\"-\"+t)),t},f.valueOf=f.toJSON=function(){return _(this)},f._isBigNumber=!0,f[Symbol.toStringTag]=\"BigNumber\",f[Symbol.for(\"nodejs.util.inspect.custom\")]=f.valueOf,null!=t&&C.set(t),C}();var sh=r(2220);function ih(e){return\"string\"==typeof e&&sh.isURL(e.toString(),{protocols:[\"http\",\"https\"],require_tld:!1})}function ah(e){return e===Object(e)&&\"[object Array]\"!==Object.prototype.toString.call(e)}function ch(e){return Array.isArray(e)}function uh(e){try{return!!JSON.parse(e)}catch(e){return!1}}function lh(e){return\"boolean\"==typeof e}function dh(e){return!!e&&(e instanceof oh||e.constructor&&\"BigNumber\"===e.constructor.name)}function fh(e){return\"string\"==typeof e||!!e&&e.constructor&&\"String\"===e.constructor.name}function ph(e){return\"function\"==typeof e}function hh(e){return\"string\"==typeof e&&!isNaN(parseInt(e,16))&&/^(0x|)[a-fA-F0-9]+$/.test(e)}function gh(e){return null!==e&&Number.isInteger(Number(e))}function yh(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function mh(e,...t){return t.length&&!t.map(t=>yh(e,t)).includes(!1)}function bh(e){const t={block:e.block_number,timestamp:e.block_timestamp,contract:e.contract_address,name:e.event_name,transaction:e.transaction_id,result:e.result,resourceNode:e.resource_Node||(e._unconfirmed?\"fullNode\":\"solidityNode\")};return e._unconfirmed&&(t.unconfirmed=e._unconfirmed),e._fingerprint&&(t.fingerprint=e._fingerprint),t}function wh(e,{inputs:t}){if(!e.result)return e;if(ah(e.result))for(let r=0;r<t.length;r++){const n=t[r];\"address\"==n.type&&n.name in e.result&&(e.result[n.name]=Er+e.result[n.name].substr(2).toLowerCase())}else ch(e.result)&&(e.result=e.result.reduce((e,r,n)=>{const{name:o,type:s}=t[n];return\"address\"==s&&(r=Er+r.substr(2).toLowerCase()),e[o]=r,e},{}));return e}function vh(e,t,r){let n=e.toString();for(;n.length<r;)n=t+n;return n}function Th(e){return null!=e}async function Ah(e=1e3){return new Promise(t=>setTimeout(t,e))}function Eh(e){return hh(e)?gp(kr(e.replace(/^0x/,Er))):e}function Ph(e){return hh(e)?e.toLowerCase().replace(/^0x/,Er):wr(yp(e)).toLowerCase()}function Bh(e){if(!Sh(e))throw new Error(`'${e}' is not a valid address string`);return function(e){const t=(e=e.toLowerCase()).substring(2).split(\"\"),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=kr(gs(r).slice(2));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return Er+t.join(\"\")}(Ph(e))}function Ch(e){if(!hh(e)||42!==e.length)return!1;try{return Bh(e)===e}catch{return!1}}function Ih(e,t=!1){try{return Op(e,t)}catch{return!1}}function Sh(e){if(!e||!fh(e))return!1;if(42===e.length)try{return Sh(gp(kr(e)))}catch(e){return!1}try{return Cp(e)}catch(e){return!1}}const Wh=new tc;function xh(e){return Ph(e).replace(Br,\"0x\")}function _h(e,t,r,n=!1){if(n&&r.replace(/^0x/,\"\").length%64==8&&(r=\"0x\"+r.replace(/^0x/,\"\").substring(8)),r.replace(/^0x/,\"\").length%64)throw new Error(\"The encoded string is not valid. Its length must be a multiple of 64.\");return t=t.map(e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,\"uint256\")),e)),Wh.decode(t,r).reduce((r,n,o)=>(\"address\"==t[o]&&(n=Er+n.substr(2).toLowerCase()),e.length?r[e[o]]=n:r.push(n),r),e.length?{}:[])}function Rh(e,t){for(let r=0;r<e.length;r++)\"address\"===e[r]&&(t[r]=xh(t[r]));return Wh.encode(e,t)}function kh(e){const t=e.match(/([a-zA-Z0-9])(\\[.*\\])/);return t?t[2]:\"\"}function Oh(e){return(kh(e).match(/\\]\\[/g)||[]).length+1}function Fh(e,t){const r=[],n=e=>{if(e&&0===e.type.indexOf(\"tuple\")&&e.components){return`tuple(${e.components.map(e=>n(e)).join(\",\")})${kh(e.type)}`}return/trcToken/.test(e.type)?e.type.replace(/trcToken/,\"uint256\"):e.type},o=e=>Array.isArray(e)?(e.forEach((t,r)=>{e[r]=o(t)}),e):xh(e),s=(e,t,r)=>{r>1?t.length&&t.forEach(t=>{s(e,t,r-1)}):t.length&&r&&t.forEach(t=>{i(e,t)})},i=(e=[],t)=>{e.length&&e.forEach((e,r)=>{const n=e.type;if(t[r])if(\"address\"===n)t[r]=xh(t[r]);else if(\"address[\"===n.match(/^([^\\x5b]*)(\\x5b|$)/)[0])o(t[r]);else if(0===n.indexOf(\"tuple\"))if(kh(n)){const o=Oh(n);s(e.components,t[r],o)}else i(e.components,t[r])})};if(e.inputs&&e.inputs.length)for(let o=0;o<e.inputs.length;o++){const s=e.inputs[o].type;\"bool\"===s&&\"false\"===t[o]&&(t[o]=!1),r.push(0===s.indexOf(\"tuple\")?n(e.inputs[o]):s),t.length<r.length&&t.push(\"\")}return i(e.inputs,t),(e=>{for(let t=0;t<e.length;t++){const r=e[t];/trcToken/.test(r)&&(e[t]=r.replace(/trcToken/,\"uint256\"))}})(r),Wh.encode(r,t)}function Mh(e,t){const r=e=>Array.isArray(e)?(e.forEach((t,n)=>{e[n]=r(t)}),e):Ph(e),n=(e,t,r)=>{r>1?t.length&&t.forEach(t=>{n(e,t,r-1)}):t.length&&r&&t.forEach(t=>{i(e,t)})},o=e=>{const t=e.name?` ${e.name}`:\"\";if(e&&0===e.type.indexOf(\"tuple\")&&e.components){return`tuple(${e.components.map(e=>o(e)).join(\",\")})${kh(e.type)}${t}`}return/trcToken/.test(e.type)?e.type.replace(/trcToken/,\"uint256\")+t:e.type+t},s=(e,t,r)=>{t&&![\"length\"].includes(t)&&(e[t]=r)},i=(e,t)=>{e.length&&e.forEach((e,o)=>{const{type:a,name:c}=e;if(t[o])if(\"address\"===a)t[o]=Ph(t[o]),s(t,c,Ph(t[o]));else if(\"address[\"===a.match(/^([^\\x5b]*)(\\x5b|$)/)[0])r(t[o]),s(t,c,r(t[o]));else if(0===a.indexOf(\"tuple\")){if(kh(a)){const r=Oh(a);n(e.components,t[o],r)}else i(e.components,t[o]);s(t,c,t[o])}else s(t,c,t[o]);else s(t,c,t[o])})};if(\"outputs\"in e&&e.outputs&&e.outputs.length>0){const r=[];for(let t=0;t<e.outputs.length;t++){const n=e.outputs[t].type,s=e.outputs[t].name?` ${e.outputs[t].name}`:\"\";r.push(0===n.indexOf(\"tuple\")?o(e.outputs[t]):n+s)}(e=>{for(let t=0;t<e.length;t++){const r=e[t];/^trcToken/.test(r)&&(e[t]=r.replace(/^trcToken/,\"uint256\"))}})(r),t&&t.length||(t=new Uint8Array(32*e.outputs.length));const n=Wh.decode(r,t).toArray(!0);return i(e.outputs,n),n}return[]}const Nh=\"\u0019TRON Signed Message:\\n\";function Uh(e){return\"string\"==typeof e?e=qo(e):Array.isArray(e)&&(e=new Uint8Array(e)),gs(ln([qo(Nh),qo(String(e.length)),e]))}function Dh(e,t){t.match(/^0x/)||(t=\"0x\"+t);const r=new Vi(t),n=Uh(e),o=r.sign(n);return Ud(o)}function Lh(e,t){t.match(/^0x/)||(t=\"0x\"+t);return gp(kr(Gi(Uh(e),t).replace(/^0x/,Er)))}const $h=new Uint8Array(32);$h.fill(0);const zh=BigInt(-1),jh=BigInt(0),Vh=BigInt(1),Hh=BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");const Gh=Bn(Vh,32),Kh=Bn(jh,32),qh={name:\"string\",version:\"string\",chainId:\"uint256\",verifyingContract:\"address\",salt:\"bytes32\"},Zh=[\"name\",\"version\",\"chainId\",\"verifyingContract\",\"salt\"];function Yh(e){return function(t){return Jr(\"string\"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Jh={name:Yh(\"name\"),version:Yh(\"version\"),chainId:function(e){const t=vn(e,\"domain.chainId\");return Jr(t>=0,\"invalid chain ID\",\"domain.chainId\",e),Number.isSafeInteger(t)?Number(t):In(t)},verifyingContract:function(e){try{return(t=e,Ph(t)).toLowerCase()}catch(e){}var t;Jr(!1,'invalid domain value \"verifyingContract\"',\"domain.verifyingContract\",e)},salt:function(e){const t=nn(e,\"domain.salt\");return Jr(32===t.length,'invalid domain value \"salt\"',\"domain.salt\",e),un(t)}};function Xh(e){{const t=e.match(/^(u?)int(\\d*)$/);if(t){const r=\"\"===t[1],n=parseInt(t[2]||\"256\");Jr(n%8==0&&0!==n&&n<=256&&(null==t[2]||t[2]===String(n)),\"invalid numeric width\",\"type\",e);const o=wn(Hh,r?n-1:n),s=r?(o+Vh)*zh:jh;return function(t){const n=vn(t,\"value\");return Jr(n>=s&&n<=o,`value out-of-bounds for ${e}`,\"value\",n),Bn(r?bn(n,256):n,32)}}}{const t=e.match(/^bytes(\\d+)$/);if(t){const r=parseInt(t[1]);return Jr(0!==r&&r<=32&&t[1]===String(r),\"invalid bytes width\",\"type\",e),function(t){return Jr(nn(t).length===r,`invalid length for ${e}`,\"value\",t),function(e){const t=nn(e),r=t.length%32;return r?ln([t,$h.slice(r)]):un(t)}(t)}}}switch(e){case\"trcToken\":return Xh(\"uint256\");case\"address\":return function(e){return hn(Ph(e).replace(Br,\"0x\"),32)};case\"bool\":return function(e){return e?Gh:Kh};case\"bytes\":return function(e){return gs(e)};case\"string\":return function(e){return ys(e)}}return null}function Qh(e,t){return`${e}(${t.map(({name:e,type:t})=>t+\" \"+e).join(\",\")})`}class eg{primaryType;#j;get types(){return JSON.parse(this.#j)}#V;#H;constructor(e){this.#j=JSON.stringify(e),this.#V=new Map,this.#H=new Map;const t=new Map,r=new Map,n=new Map;Object.keys(e).forEach(e=>{t.set(e,new Set),r.set(e,[]),n.set(e,new Set)});for(const n in e){const o=new Set;for(const s of e[n]){Jr(!o.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`,\"types\",e),o.add(s.name);const i=s.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1]||null;Jr(i!==n,`circular type reference to ${JSON.stringify(i)}`,\"types\",e);Xh(i)||(Jr(r.has(i),`unknown type ${JSON.stringify(i)}`,\"types\",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter(e=>0===r.get(e).length);Jr(0!==o.length,\"missing primary type\",\"types\",e),Jr(1===o.length,`ambiguous primary types or unused types: ${o.map(e=>JSON.stringify(e)).join(\", \")}`,\"types\",e),Gr(this,{primaryType:o[0]}),function o(s,i){Jr(!i.has(s),`circular type reference to ${JSON.stringify(s)}`,\"types\",e),i.add(s);for(const e of t.get(s))if(r.has(e)){o(e,i);for(const t of i)n.get(t).add(e)}i.delete(s)}(this.primaryType,new Set);for(const[t,r]of n){const n=Array.from(r);n.sort(),this.#V.set(t,Qh(t,e[t])+n.map(t=>Qh(t,e[t])).join(\"\"))}}getEncoder(e){let t=this.#H.get(e);return t||(t=this.#G(e),this.#H.set(e,t)),t}#G(e){{const t=Xh(e);if(t)return t}const t=e.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e);return n=>{Jr(!t[3]||parseInt(t[3])===n.length,`array length mismatch; expected length ${parseInt(t[3])}`,\"value\",n);let o=n.map(r);return this.#V.has(e)&&(o=o.map(gs)),gs(ln(o))}}const r=this.types[e];if(r){const t=ys(this.#V.get(e));return e=>{const n=r.map(({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#V.has(r)?gs(n):n});return n.unshift(t),ln(n)}}Jr(!1,`unknown type: ${e}`,\"type\",e)}encodeType(e){const t=this.#V.get(e);return Jr(t,`unknown type: ${JSON.stringify(e)}`,\"name\",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return gs(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Xh(e))return r(e,t);const n=e.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);if(n)return Jr(!n[3]||parseInt(n[3])===t.length,`array length mismatch; expected length ${parseInt(n[3])}`,\"value\",t),t.map(e=>this._visit(n[1],e,r));const o=this.types[e];if(o)return o.reduce((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e),{});Jr(!1,`unknown type: ${e}`,\"type\",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new eg(e)}static getPrimaryType(e){return eg.from(e).primaryType}static hashStruct(e,t,r){return eg.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=qh[r];Jr(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,\"domain\",e),t.push({name:r,type:n})}return t.sort((e,t)=>Zh.indexOf(e.name)-Zh.indexOf(t.name)),eg.hashStruct(\"EIP712Domain\",{EIP712Domain:t},e)}static encode(e,t,r){return ln([\"0x1901\",eg.hashDomain(e),eg.from(t).hash(r)])}static hash(e,t,r){return gs(eg.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!sn(e.verifyingContract,20)&&(o[e.verifyingContract]=\"0x\");const s=eg.from(t);s.visit(r,(e,t)=>(\"address\"!==e||sn(t,20)||(o[t]=\"0x\"),t));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=s.visit(r,(e,t)=>\"address\"===e&&o[t]?o[t]:t),{domain:e,value:r}}static getPayload(e,t,r){eg.hashDomain(e);const n={},o=[];Zh.forEach(t=>{const r=e[t];null!=r&&(n[t]=Jh[t](r),o.push({name:t,type:qh[t]}))});const s=eg.from(t),i=Object.assign({},t);return Jr(null==i.EIP712Domain,\"types must not contain EIP712Domain type\",\"types.EIP712Domain\",t),i.EIP712Domain=o,s.encode(r),{types:i,domain:n,primaryType:s.primaryType,message:s.visit(r,(e,t)=>{if(e.match(/^bytes(\\d*)/))return un(nn(t));if(e.match(/^u?int/))return vn(t).toString();switch(e){case\"trcToken\":return vn(t).toString();case\"address\":return t.toLowerCase();case\"bool\":return!!t;case\"string\":return Jr(\"string\"==typeof t,\"invalid string\",\"value\",t),t}Jr(!1,\"unsupported type\",\"type\",e)})}}}function tg(e,t,r,n){const o=`0x${n.replace(/^0x/,\"\")}`,s=new Vi(o),i=eg.hash(e,t,r),a=s.sign(i);return[\"0x\",a.r.substring(2),a.s.substring(2),Number(a.v).toString(16)].join(\"\")}function rg(e,t,r,n){return Gi(eg.hash(e,t,r),n)}var ng=r(5358);r(4856),r(6919),r(139),r(504),r(4781),r(4078),r(7724),r(8462),r(8099),r(5226);function og(e,t){return function(){return e.apply(t,arguments)}}const{toString:sg}=Object.prototype,{getPrototypeOf:ig}=Object,{iterator:ag,toStringTag:cg}=Symbol,ug=(lg=Object.create(null),e=>{const t=sg.call(e);return lg[t]||(lg[t]=t.slice(8,-1).toLowerCase())});var lg;const dg=e=>(e=e.toLowerCase(),t=>ug(t)===e),fg=e=>t=>typeof t===e,{isArray:pg}=Array,hg=fg(\"undefined\");function gg(e){return null!==e&&!hg(e)&&null!==e.constructor&&!hg(e.constructor)&&bg(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yg=dg(\"ArrayBuffer\");const mg=fg(\"string\"),bg=fg(\"function\"),wg=fg(\"number\"),vg=e=>null!==e&&\"object\"==typeof e,Tg=e=>{if(\"object\"!==ug(e))return!1;const t=ig(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||cg in e||ag in e)},Ag=dg(\"Date\"),Eg=dg(\"File\"),Pg=dg(\"Blob\"),Bg=dg(\"FileList\"),Cg=dg(\"URLSearchParams\"),[Ig,Sg,Wg,xg]=[\"ReadableStream\",\"Request\",\"Response\",\"Headers\"].map(dg);function _g(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if(\"object\"!=typeof e&&(e=[e]),pg(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(gg(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function Rg(e,t){if(gg(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const kg=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:globalThis,Og=e=>!hg(e)&&e!==kg;const Fg=(Mg=\"undefined\"!=typeof Uint8Array&&ig(Uint8Array),e=>Mg&&e instanceof Mg);var Mg;const Ng=dg(\"HTMLFormElement\"),Ug=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Dg=dg(\"RegExp\"),Lg=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};_g(r,(r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)}),Object.defineProperties(e,n)};const $g=dg(\"AsyncFunction\"),zg=(jg=\"function\"==typeof setImmediate,Vg=bg(kg.postMessage),jg?setImmediate:Vg?(Hg=`axios@${Math.random()}`,Gg=[],kg.addEventListener(\"message\",({source:e,data:t})=>{e===kg&&t===Hg&&Gg.length&&Gg.shift()()},!1),e=>{Gg.push(e),kg.postMessage(Hg,\"*\")}):e=>setTimeout(e));var jg,Vg,Hg,Gg;const Kg=\"undefined\"!=typeof queueMicrotask?queueMicrotask.bind(kg):\"undefined\"!=typeof process&&process.nextTick||zg,qg={isArray:pg,isArrayBuffer:yg,isBuffer:gg,isFormData:e=>{let t;return e&&(\"function\"==typeof FormData&&e instanceof FormData||bg(e.append)&&(\"formdata\"===(t=ug(e))||\"object\"===t&&bg(e.toString)&&\"[object FormData]\"===e.toString()))},isArrayBufferView:function(e){let t;return t=\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&yg(e.buffer),t},isString:mg,isNumber:wg,isBoolean:e=>!0===e||!1===e,isObject:vg,isPlainObject:Tg,isEmptyObject:e=>{if(!vg(e)||gg(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Ig,isRequest:Sg,isResponse:Wg,isHeaders:xg,isUndefined:hg,isDate:Ag,isFile:Eg,isBlob:Pg,isRegExp:Dg,isFunction:bg,isStream:e=>vg(e)&&bg(e.pipe),isURLSearchParams:Cg,isTypedArray:Fg,isFileList:Bg,forEach:_g,merge:function e(){const{caseless:t,skipUndefined:r}=Og(this)&&this||{},n={},o=(o,s)=>{const i=t&&Rg(n,s)||s;Tg(n[i])&&Tg(o)?n[i]=e(n[i],o):Tg(o)?n[i]=e({},o):pg(o)?n[i]=o.slice():r&&hg(o)||(n[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&_g(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(_g(t,(t,n)=>{r&&bg(t)?e[n]=og(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\"\"),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,\"super\",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],n&&!n(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==r&&ig(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:ug,kindOfTest:dg,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(pg(e))return e;let t=e.length;if(!wg(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[ag]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Ng,hasOwnProperty:Ug,hasOwnProp:Ug,reduceDescriptors:Lg,freezeMethods:e=>{Lg(e,(t,r)=>{if(bg(e)&&-1!==[\"arguments\",\"caller\",\"callee\"].indexOf(r))return!1;const n=e[r];bg(n)&&(t.enumerable=!1,\"writable\"in t?t.writable=!1:t.set||(t.set=()=>{throw Error(\"Can not rewrite read-only method '\"+r+\"'\")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return pg(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Rg,global:kg,isContextDefined:Og,isSpecCompliantForm:function(e){return!!(e&&bg(e.append)&&\"FormData\"===e[cg]&&e[ag])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(vg(e)){if(t.indexOf(e)>=0)return;if(gg(e))return e;if(!(\"toJSON\"in e)){t[n]=e;const o=pg(e)?[]:{};return _g(e,(e,t)=>{const s=r(e,n+1);!hg(s)&&(o[t]=s)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:$g,isThenable:e=>e&&(vg(e)||bg(e))&&bg(e.then)&&bg(e.catch),setImmediate:zg,asap:Kg,isIterable:e=>null!=e&&bg(e[ag])};function Zg(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name=\"AxiosError\",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}qg.inherits(Zg,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:qg.toJSONObject(this.config),code:this.code,status:this.status}}});const Yg=Zg.prototype,Jg={};[\"ERR_BAD_OPTION_VALUE\",\"ERR_BAD_OPTION\",\"ECONNABORTED\",\"ETIMEDOUT\",\"ERR_NETWORK\",\"ERR_FR_TOO_MANY_REDIRECTS\",\"ERR_DEPRECATED\",\"ERR_BAD_RESPONSE\",\"ERR_BAD_REQUEST\",\"ERR_CANCELED\",\"ERR_NOT_SUPPORT\",\"ERR_INVALID_URL\"].forEach(e=>{Jg[e]={value:e}}),Object.defineProperties(Zg,Jg),Object.defineProperty(Yg,\"isAxiosError\",{value:!0}),Zg.from=(e,t,r,n,o,s)=>{const i=Object.create(Yg);qg.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>\"isAxiosError\"!==e);const a=e&&e.message?e.message:\"Error\",c=null==t&&e?e.code:t;return Zg.call(i,a,c,r,n,o),e&&null==i.cause&&Object.defineProperty(i,\"cause\",{value:e,configurable:!0}),i.name=e&&e.name||\"Error\",s&&Object.assign(i,s),i};const Xg=Zg;var Qg=r(1048).hp;function ey(e){return qg.isPlainObject(e)||qg.isArray(e)}function ty(e){return qg.endsWith(e,\"[]\")?e.slice(0,-2):e}function ry(e,t,r){return e?e.concat(t).map(function(e,t){return e=ty(e),!r&&t?\"[\"+e+\"]\":e}).join(r?\".\":\"\"):t}const ny=qg.toFlatObject(qg,{},null,function(e){return/^is[A-Z]/.test(e)});const oy=function(e,t,r){if(!qg.isObject(e))throw new TypeError(\"target must be an object\");t=t||new FormData;const n=(r=qg.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!qg.isUndefined(t[e])})).metaTokens,o=r.visitor||u,s=r.dots,i=r.indexes,a=(r.Blob||\"undefined\"!=typeof Blob&&Blob)&&qg.isSpecCompliantForm(t);if(!qg.isFunction(o))throw new TypeError(\"visitor must be a function\");function c(e){if(null===e)return\"\";if(qg.isDate(e))return e.toISOString();if(qg.isBoolean(e))return e.toString();if(!a&&qg.isBlob(e))throw new Xg(\"Blob is not supported. Use a Buffer instead.\");return qg.isArrayBuffer(e)||qg.isTypedArray(e)?a&&\"function\"==typeof Blob?new Blob([e]):Qg.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&\"object\"==typeof e)if(qg.endsWith(r,\"{}\"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(qg.isArray(e)&&function(e){return qg.isArray(e)&&!e.some(ey)}(e)||(qg.isFileList(e)||qg.endsWith(r,\"[]\"))&&(a=qg.toArray(e)))return r=ty(r),a.forEach(function(e,n){!qg.isUndefined(e)&&null!==e&&t.append(!0===i?ry([r],n,s):null===i?r:r+\"[]\",c(e))}),!1;return!!ey(e)||(t.append(ry(o,r,s),c(e)),!1)}const l=[],d=Object.assign(ny,{defaultVisitor:u,convertValue:c,isVisitable:ey});if(!qg.isObject(e))throw new TypeError(\"data must be an object\");return function e(r,n){if(!qg.isUndefined(r)){if(-1!==l.indexOf(r))throw Error(\"Circular reference detected in \"+n.join(\".\"));l.push(r),qg.forEach(r,function(r,s){!0===(!(qg.isUndefined(r)||null===r)&&o.call(t,r,qg.isString(s)?s.trim():s,n,d))&&e(r,n?n.concat(s):[s])}),l.pop()}}(e),t};function sy(e){const t={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\",\"%00\":\"\\0\"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function iy(e,t){this._pairs=[],e&&oy(e,this,t)}const ay=iy.prototype;ay.append=function(e,t){this._pairs.push([e,t])},ay.toString=function(e){const t=e?function(t){return e.call(this,t,sy)}:sy;return this._pairs.map(function(e){return t(e[0])+\"=\"+t(e[1])},\"\").join(\"&\")};const cy=iy;function uy(e){return encodeURIComponent(e).replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\")}function ly(e,t,r){if(!t)return e;const n=r&&r.encode||uy;qg.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(s=o?o(t,r):qg.isURLSearchParams(t)?t.toString():new cy(t,r).toString(n),s){const t=e.indexOf(\"#\");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+s}return e}const dy=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){qg.forEach(this.handlers,function(t){null!==t&&e(t)})}},fy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},py={isBrowser:!0,classes:{URLSearchParams:\"undefined\"!=typeof URLSearchParams?URLSearchParams:cy,FormData:\"undefined\"!=typeof FormData?FormData:null,Blob:\"undefined\"!=typeof Blob?Blob:null},protocols:[\"http\",\"https\",\"file\",\"blob\",\"url\",\"data\"]},hy=\"undefined\"!=typeof window&&\"undefined\"!=typeof document,gy=\"object\"==typeof navigator&&navigator||void 0,yy=hy&&(!gy||[\"ReactNative\",\"NativeScript\",\"NS\"].indexOf(gy.product)<0),my=\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&\"function\"==typeof self.importScripts,by=hy&&window.location.href||\"http://localhost\",wy={...y,...py};const vy=function(e){function t(e,r,n,o){let s=e[o++];if(\"__proto__\"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&qg.isArray(n)?n.length:s,a)return qg.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!i;n[s]&&qg.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],o)&&qg.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[s])),!i}if(qg.isFormData(e)&&qg.isFunction(e.entries)){const r={};return qg.forEachEntry(e,(e,n)=>{t(function(e){return qg.matchAll(/\\w+|\\[(\\w*)]/g,e).map(e=>\"[]\"===e[0]?\"\":e[1]||e[0])}(e),n,r,0)}),r}return null};const Ty={transitional:fy,adapter:[\"xhr\",\"http\",\"fetch\"],transformRequest:[function(e,t){const r=t.getContentType()||\"\",n=r.indexOf(\"application/json\")>-1,o=qg.isObject(e);o&&qg.isHTMLForm(e)&&(e=new FormData(e));if(qg.isFormData(e))return n?JSON.stringify(vy(e)):e;if(qg.isArrayBuffer(e)||qg.isBuffer(e)||qg.isStream(e)||qg.isFile(e)||qg.isBlob(e)||qg.isReadableStream(e))return e;if(qg.isArrayBufferView(e))return e.buffer;if(qg.isURLSearchParams(e))return t.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\",!1),e.toString();let s;if(o){if(r.indexOf(\"application/x-www-form-urlencoded\")>-1)return function(e,t){return oy(e,new wy.classes.URLSearchParams,{visitor:function(e,t,r,n){return wy.isNode&&qg.isBuffer(e)?(this.append(t,e.toString(\"base64\")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=qg.isFileList(e))||r.indexOf(\"multipart/form-data\")>-1){const t=this.env&&this.env.FormData;return oy(s?{\"files[]\":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType(\"application/json\",!1),function(e,t,r){if(qg.isString(e))try{return(t||JSON.parse)(e),qg.trim(e)}catch(e){if(\"SyntaxError\"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ty.transitional,r=t&&t.forcedJSONParsing,n=\"json\"===this.responseType;if(qg.isResponse(e)||qg.isReadableStream(e))return e;if(e&&qg.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if(\"SyntaxError\"===e.name)throw Xg.from(e,Xg.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wy.classes.FormData,Blob:wy.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\",\"Content-Type\":void 0}}};qg.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\"],e=>{Ty.headers[e]={}});const Ay=Ty,Ey=qg.toObjectSet([\"age\",\"authorization\",\"content-length\",\"content-type\",\"etag\",\"expires\",\"from\",\"host\",\"if-modified-since\",\"if-unmodified-since\",\"last-modified\",\"location\",\"max-forwards\",\"proxy-authorization\",\"referer\",\"retry-after\",\"user-agent\"]),Py=Symbol(\"internals\");function By(e){return e&&String(e).trim().toLowerCase()}function Cy(e){return!1===e||null==e?e:qg.isArray(e)?e.map(Cy):String(e)}function Iy(e,t,r,n,o){return qg.isFunction(n)?n.call(this,t,r):(o&&(t=r),qg.isString(t)?qg.isString(n)?-1!==t.indexOf(n):qg.isRegExp(n)?n.test(t):void 0:void 0)}class Sy{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=By(t);if(!o)throw new Error(\"header name must be a non-empty string\");const s=qg.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=Cy(e))}const s=(e,t)=>qg.forEach(e,(e,r)=>o(e,r,t));if(qg.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(qg.isString(e)&&(e=e.trim())&&!(e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))(e))s((e=>{const t={};let r,n,o;return e&&e.split(\"\\n\").forEach(function(e){o=e.indexOf(\":\"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Ey[r]||(\"set-cookie\"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+\", \"+n:n)}),t})(e),t);else if(qg.isObject(e)&&qg.isIterable(e)){let r,n,o={};for(const t of e){if(!qg.isArray(t))throw TypeError(\"Object iterator must return a key-value pair\");o[n=t[0]]=(r=o[n])?qg.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=By(e)){const r=qg.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(qg.isFunction(t))return t.call(this,e,r);if(qg.isRegExp(t))return t.exec(e);throw new TypeError(\"parser must be boolean|regexp|function\")}}}has(e,t){if(e=By(e)){const r=qg.findKey(this,e);return!(!r||void 0===this[r]||t&&!Iy(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=By(e)){const o=qg.findKey(r,e);!o||t&&!Iy(0,r[o],o,t)||(delete r[o],n=!0)}}return qg.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Iy(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return qg.forEach(this,(n,o)=>{const s=qg.findKey(r,o);if(s)return t[s]=Cy(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Cy(n),r[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return qg.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&qg.isArray(r)?r.join(\", \"):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+\": \"+t).join(\"\\n\")}getSetCookie(){return this.get(\"set-cookie\")||[]}get[Symbol.toStringTag](){return\"AxiosHeaders\"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[Py]=this[Py]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=By(e);t[n]||(!function(e,t){const r=qg.toCamelCase(\" \"+t);[\"get\",\"set\",\"has\"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return qg.isArray(e)?e.forEach(n):n(e),this}}Sy.accessor([\"Content-Type\",\"Content-Length\",\"Accept\",\"Accept-Encoding\",\"User-Agent\",\"Authorization\"]),qg.reduceDescriptors(Sy.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),qg.freezeMethods(Sy);const Wy=Sy;function xy(e,t){const r=this||Ay,n=t||r,o=Wy.from(n.headers);let s=n.data;return qg.forEach(e,function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function _y(e){return!(!e||!e.__CANCEL__)}function Ry(e,t,r){Xg.call(this,e??\"canceled\",Xg.ERR_CANCELED,t,r),this.name=\"CanceledError\"}qg.inherits(Ry,Xg,{__CANCEL__:!0});const ky=Ry;function Oy(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Xg(\"Request failed with status code \"+r.status,[Xg.ERR_BAD_REQUEST,Xg.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Fy=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[i];o||(o=c),r[s]=a,n[s]=c;let l=i,d=0;for(;l!==s;)d+=r[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}};const My=function(e,t){let r,n,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(r=e,n||(n=setTimeout(()=>{n=null,i(r)},s-a)))},()=>r&&i(r)]},Ny=(e,t,r=3)=>{let n=0;const o=Fy(50,250);return My(r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-n,c=o(a);n=s;e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r,lengthComputable:null!=i,[t?\"download\":\"upload\"]:!0})},r)},Uy=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Dy=e=>(...t)=>qg.asap(()=>e(...t)),Ly=wy.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,wy.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(wy.origin),wy.navigator&&/(msie|trident)/i.test(wy.navigator.userAgent)):()=>!0,$y=wy.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+\"=\"+encodeURIComponent(t)];qg.isNumber(r)&&i.push(\"expires=\"+new Date(r).toGMTString()),qg.isString(n)&&i.push(\"path=\"+n),qg.isString(o)&&i.push(\"domain=\"+o),!0===s&&i.push(\"secure\"),document.cookie=i.join(\"; \")},read(e){const t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,\"\",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function zy(e,t,r){let n=!/^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\\/?\\/$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}(e,t):t}const jy=e=>e instanceof Wy?{...e}:e;function Vy(e,t){t=t||{};const r={};function n(e,t,r,n){return qg.isPlainObject(e)&&qg.isPlainObject(t)?qg.merge.call({caseless:n},e,t):qg.isPlainObject(t)?qg.merge({},t):qg.isArray(t)?t.slice():t}function o(e,t,r,o){return qg.isUndefined(t)?qg.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function s(e,t){if(!qg.isUndefined(t))return n(void 0,t)}function i(e,t){return qg.isUndefined(t)?qg.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,r)=>o(jy(e),jy(t),0,!0)};return qg.forEach(Object.keys({...e,...t}),function(n){const s=c[n]||o,i=s(e[n],t[n],n);qg.isUndefined(i)&&s!==a||(r[n]=i)}),r}const Hy=e=>{const t=Vy({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=Wy.from(i),t.url=ly(zy(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set(\"Authorization\",\"Basic \"+btoa((a.username||\"\")+\":\"+(a.password?unescape(encodeURIComponent(a.password)):\"\"))),qg.isFormData(r))if(wy.hasStandardBrowserEnv||wy.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(qg.isFunction(r.getHeaders)){const e=r.getHeaders(),t=[\"content-type\",\"content-length\"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&i.set(e,r)})}if(wy.hasStandardBrowserEnv&&(n&&qg.isFunction(n)&&(n=n(t)),n||!1!==n&&Ly(t.url))){const e=o&&s&&$y.read(s);e&&i.set(o,e)}return t},Gy=\"undefined\"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Hy(e);let o=n.data;const s=Wy.from(n.headers).normalize();let i,a,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(i),n.signal&&n.signal.removeEventListener(\"abort\",i)}let g=new XMLHttpRequest;function y(){if(!g)return;const n=Wy.from(\"getAllResponseHeaders\"in g&&g.getAllResponseHeaders());Oy(function(e){t(e),h()},function(e){r(e),h()},{data:d&&\"text\"!==d&&\"json\"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,\"onloadend\"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf(\"file:\"))&&setTimeout(y)},g.onabort=function(){g&&(r(new Xg(\"Request aborted\",Xg.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const n=t&&t.message?t.message:\"Network Error\",o=new Xg(n,Xg.ERR_NETWORK,e,g);o.event=t||null,r(o),g=null},g.ontimeout=function(){let t=n.timeout?\"timeout of \"+n.timeout+\"ms exceeded\":\"timeout exceeded\";const o=n.transitional||fy;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Xg(t,o.clarifyTimeoutError?Xg.ETIMEDOUT:Xg.ECONNABORTED,e,g)),g=null},void 0===o&&s.setContentType(null),\"setRequestHeader\"in g&&qg.forEach(s.toJSON(),function(e,t){g.setRequestHeader(t,e)}),qg.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&\"json\"!==d&&(g.responseType=n.responseType),p&&([c,l]=Ny(p,!0),g.addEventListener(\"progress\",c)),f&&g.upload&&([a,u]=Ny(f),g.upload.addEventListener(\"progress\",a),g.upload.addEventListener(\"loadend\",u)),(n.cancelToken||n.signal)&&(i=t=>{g&&(r(!t||t.type?new ky(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(i),n.signal&&(n.signal.aborted?i():n.signal.addEventListener(\"abort\",i)));const m=function(e){const t=/^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(e);return t&&t[1]||\"\"}(n.url);m&&-1===wy.protocols.indexOf(m)?r(new Xg(\"Unsupported protocol \"+m+\":\",Xg.ERR_BAD_REQUEST,e)):g.send(o||null)})},Ky=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Xg?t:new ky(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new Xg(`timeout ${t} of ms exceeded`,Xg.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener(\"abort\",o)}),e=null)};e.forEach(e=>e.addEventListener(\"abort\",o));const{signal:a}=n;return a.unsubscribe=()=>qg.asap(i),a}},qy=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Zy=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Yy=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Zy(e))yield*qy(r,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let s=n.byteLength;if(r){let e=i+=s;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:Jy}=qg,Xy=(({Request:e,Response:t})=>({Request:e,Response:t}))(qg.global),{ReadableStream:Qy,TextEncoder:em}=qg.global,tm=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},rm=e=>{e=qg.merge.call({skipUndefined:!0},Xy,e);const{fetch:t,Request:r,Response:n}=e,o=t?Jy(t):\"function\"==typeof fetch,s=Jy(r),i=Jy(n);if(!o)return!1;const a=o&&Jy(Qy),c=o&&(\"function\"==typeof em?(u=new em,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=s&&a&&tm(()=>{let e=!1;const t=new r(wy.origin,{body:new Qy,method:\"POST\",get duplex(){return e=!0,\"half\"}}).headers.has(\"Content-Type\");return e&&!t}),d=i&&a&&tm(()=>qg.isReadableStream(new n(\"\").body)),f={stream:d&&(e=>e.body)};o&&[\"text\",\"arrayBuffer\",\"blob\",\"formData\",\"stream\"].forEach(e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Xg(`Response type '${e}' is not supported`,Xg.ERR_NOT_SUPPORT,r)})});const p=async(e,t)=>{const n=qg.toFiniteNumber(e.getContentLength());return n??(async e=>{if(null==e)return 0;if(qg.isBlob(e))return e.size;if(qg.isSpecCompliantForm(e)){const t=new r(wy.origin,{method:\"POST\",body:e});return(await t.arrayBuffer()).byteLength}return qg.isArrayBufferView(e)||qg.isArrayBuffer(e)?e.byteLength:(qg.isURLSearchParams(e)&&(e+=\"\"),qg.isString(e)?(await c(e)).byteLength:void 0)})(t)};return async e=>{let{url:o,method:i,data:a,signal:c,cancelToken:u,timeout:h,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:b,withCredentials:w=\"same-origin\",fetchOptions:v}=Hy(e),T=t||fetch;m=m?(m+\"\").toLowerCase():\"text\";let A=Ky([c,u&&u.toAbortSignal()],h),E=null;const P=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let B;try{if(y&&l&&\"get\"!==i&&\"head\"!==i&&0!==(B=await p(b,a))){let e,t=new r(o,{method:\"POST\",body:a,duplex:\"half\"});if(qg.isFormData(a)&&(e=t.headers.get(\"content-type\"))&&b.setContentType(e),t.body){const[e,r]=Uy(B,Ny(Dy(y)));a=Yy(t.body,65536,e,r)}}qg.isString(w)||(w=w?\"include\":\"omit\");const t=s&&\"credentials\"in r.prototype,c={...v,signal:A,method:i.toUpperCase(),headers:b.normalize().toJSON(),body:a,duplex:\"half\",credentials:t?w:void 0};E=s&&new r(o,c);let u=await(s?T(E,v):T(o,c));const h=d&&(\"stream\"===m||\"response\"===m);if(d&&(g||h&&P)){const e={};[\"status\",\"statusText\",\"headers\"].forEach(t=>{e[t]=u[t]});const t=qg.toFiniteNumber(u.headers.get(\"content-length\")),[r,o]=g&&Uy(t,Ny(Dy(g),!0))||[];u=new n(Yy(u.body,65536,r,()=>{o&&o(),P&&P()}),e)}m=m||\"text\";let C=await f[qg.findKey(f,m)||\"text\"](u,e);return!h&&P&&P(),await new Promise((t,r)=>{Oy(t,r,{data:C,headers:Wy.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:E})})}catch(t){if(P&&P(),t&&\"TypeError\"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Xg(\"Network Error\",Xg.ERR_NETWORK,e,E),{cause:t.cause||t});throw Xg.from(t,t&&t.code,e,E)}}},nm=new Map,om=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let i,a,c=s.length,u=nm;for(;c--;)i=s[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:rm(t)),u=a;return a},sm=(om(),{http:null,xhr:Gy,fetch:{get:om}});qg.forEach(sm,(e,t)=>{if(e){try{Object.defineProperty(e,\"name\",{value:t})}catch(e){}Object.defineProperty(e,\"adapterName\",{value:t})}});const im=e=>`- ${e}`,am=e=>qg.isFunction(e)||null===e||!1===e,cm=(e,t)=>{e=qg.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let i=0;i<r;i++){let r;if(n=e[i],o=n,!am(n)&&(o=sm[(r=String(n)).toLowerCase()],void 0===o))throw new Xg(`Unknown adapter '${r}'`);if(o&&(qg.isFunction(o)||(o=o.get(t))))break;s[r||\"#\"+i]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?\"is not supported by the environment\":\"is not available in the build\"));let t=r?e.length>1?\"since :\\n\"+e.map(im).join(\"\\n\"):\" \"+im(e[0]):\"as no adapter specified\";throw new Xg(\"There is no suitable adapter to dispatch the request \"+t,\"ERR_NOT_SUPPORT\")}return o};function um(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ky(null,e)}function lm(e){um(e),e.headers=Wy.from(e.headers),e.data=xy.call(e,e.transformRequest),-1!==[\"post\",\"put\",\"patch\"].indexOf(e.method)&&e.headers.setContentType(\"application/x-www-form-urlencoded\",!1);return cm(e.adapter||Ay.adapter,e)(e).then(function(t){return um(e),t.data=xy.call(e,e.transformResponse,t),t.headers=Wy.from(t.headers),t},function(t){return _y(t)||(um(e),t&&t.response&&(t.response.data=xy.call(e,e.transformResponse,t.response),t.response.headers=Wy.from(t.response.headers))),Promise.reject(t)})}const dm=\"1.12.2\",fm={};[\"object\",\"boolean\",\"number\",\"function\",\"string\",\"symbol\"].forEach((e,t)=>{fm[e]=function(r){return typeof r===e||\"a\"+(t<1?\"n \":\" \")+e}});const pm={};fm.transitional=function(e,t,r){function n(e,t){return\"[Axios v\"+dm+\"] Transitional option '\"+e+\"'\"+t+(r?\". \"+r:\"\")}return(r,o,s)=>{if(!1===e)throw new Xg(n(o,\" has been removed\"+(t?\" in \"+t:\"\")),Xg.ERR_DEPRECATED);return t&&!pm[o]&&(pm[o]=!0,console.warn(n(o,\" has been deprecated since v\"+t+\" and will be removed in the near future\"))),!e||e(r,o,s)}},fm.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const hm={assertOptions:function(e,t,r){if(\"object\"!=typeof e)throw new Xg(\"options must be an object\",Xg.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const t=e[s],r=void 0===t||i(t,s,e);if(!0!==r)throw new Xg(\"option \"+s+\" must be \"+r,Xg.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Xg(\"Unknown option \"+s,Xg.ERR_BAD_OPTION)}},validators:fm},gm=hm.validators;class ym{constructor(e){this.defaults=e||{},this.interceptors={request:new dy,response:new dy}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\\n/,\"\"):\"\";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\\n.+\\n/,\"\"))&&(e.stack+=\"\\n\"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){\"string\"==typeof e?(t=t||{}).url=e:t=e||{},t=Vy(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&hm.assertOptions(r,{silentJSONParsing:gm.transitional(gm.boolean),forcedJSONParsing:gm.transitional(gm.boolean),clarifyTimeoutError:gm.transitional(gm.boolean)},!1),null!=n&&(qg.isFunction(n)?t.paramsSerializer={serialize:n}:hm.assertOptions(n,{encode:gm.function,serialize:gm.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),hm.assertOptions(t,{baseUrl:gm.spelling(\"baseURL\"),withXsrfToken:gm.spelling(\"withXSRFToken\")},!0),t.method=(t.method||this.defaults.method||\"get\").toLowerCase();let s=o&&qg.merge(o.common,o[t.method]);o&&qg.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],e=>{delete o[e]}),t.headers=Wy.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){\"function\"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[lm.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=i.length;let f=t;for(;d<l;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=lm.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return ly(zy((e=Vy(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}qg.forEach([\"delete\",\"get\",\"head\",\"options\"],function(e){ym.prototype[e]=function(t,r){return this.request(Vy(r||{},{method:e,url:t,data:(r||{}).data}))}}),qg.forEach([\"post\",\"put\",\"patch\"],function(e){function t(t){return function(r,n,o){return this.request(Vy(o||{},{method:e,headers:t?{\"Content-Type\":\"multipart/form-data\"}:{},url:r,data:n}))}}ym.prototype[e]=t(),ym.prototype[e+\"Form\"]=t(!0)});const mm=ym;class bm{constructor(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new ky(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new bm(function(t){e=t}),cancel:e}}}const wm=bm;const vm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vm).forEach(([e,t])=>{vm[t]=e});const Tm=vm;const Am=function e(t){const r=new mm(t),n=og(mm.prototype.request,r);return qg.extend(n,mm.prototype,r,{allOwnKeys:!0}),qg.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Vy(t,r))},n}(Ay);Am.Axios=mm,Am.CanceledError=ky,Am.CancelToken=wm,Am.isCancel=_y,Am.VERSION=dm,Am.toFormData=oy,Am.AxiosError=Xg,Am.Cancel=Am.CanceledError,Am.all=function(e){return Promise.all(e)},Am.spread=function(e){return function(t){return e.apply(null,t)}},Am.isAxiosError=function(e){return qg.isObject(e)&&!0===e.isAxiosError},Am.mergeConfig=Vy,Am.AxiosHeaders=Wy,Am.formToJSON=e=>vy(qg.isHTMLForm(e)?new FormData(e):e),Am.getAdapter=cm,Am.HttpStatusCode=Tm,Am.default=Am;const Em=Am;class Pm{host;timeout;user;password;headers;statusPage;instance;constructor(e,t=3e4,r=\"\",n=\"\",o={},s=\"/\"){if(!ih(e))throw new Error(\"Invalid URL provided to HttpProvider\");if(isNaN(t)||t<0)throw new Error(\"Invalid timeout duration provided\");if(!ah(o))throw new Error(\"Invalid headers object provided\");this.host=e,this.timeout=t,this.user=r,this.password=n,this.headers=o,this.statusPage=s,this.instance=Em.create({baseURL:e,timeout:t,headers:o,auth:r?{username:r,password:n}:void 0})}setStatusPage(e=\"/\"){this.statusPage=e}async isConnected(e=this.statusPage){return this.request(e).then(e=>mh(e,\"blockID\",\"block_header\")).catch(()=>!1)}request(e,t={},r=\"get\"){return r=r.toLowerCase(),this.instance.request({data:\"post\"==r&&Object.keys(t).length?t:null,params:\"get\"==r&&t,url:e,method:r}).then(({data:e})=>e)}}const Bm={HttpProvider:Pm};const Cm=r(8985);var Im,Sm,Wm,xm=r(4545);class _m{invalid(e){return e.msg||`Invalid ${e.name}${\"address\"===e.type?\" address\":\"\"} provided`}notPositive(e){return`${e.name} must be a positive integer`}notEqual(e){return e.msg||`${e.names?.[0]} can not be equal to ${e.names?.[1]}`}notValid(e){const t={};let r=!1;for(const n of e){const{name:e,names:o,value:s,type:i,gt:a,lt:c,gte:u,lte:l,optional:d}=n;if(!d||Th(s)&&(\"boolean\"===i||!1!==s)){switch(t[e]=n.value,i){case\"address\":Sh(s)?t[e]=Ph(s):r=!0;break;case\"integer\":(!gh(s)||\"number\"==typeof a&&s<=a||\"number\"==typeof c&&s>=c||\"number\"==typeof u&&s<u||\"number\"==typeof l&&s>l)&&(r=!0);break;case\"positive-integer\":if(!gh(s)||s<=0)throw new Error(this.notPositive(n));break;case\"tokenId\":case\"not-empty-string\":fh(s)&&s.length||(r=!0);break;case\"notEmptyObject\":ah(s)&&Object.keys(s).length||(r=!0);break;case\"notEqual\":if(o&&t[o[0]]===t[o[1]])throw new Error(this.notEqual(n));break;case\"resource\":[\"BANDWIDTH\",\"ENERGY\"].includes(s)||(r=!0);break;case\"url\":ih(s)||(r=!0);break;case\"hex\":hh(s)||(r=!0);break;case\"array\":Array.isArray(s)||(r=!0);break;case\"boolean\":lh(s)||(r=!0);break;case\"string\":(!fh(s)||\"number\"==typeof a&&s.length<=a||\"number\"==typeof c&&s.length>=c||\"number\"==typeof u&&s.length<u||\"number\"==typeof l&&s.length>l)&&(r=!0)}if(r)throw new Error(this.invalid(n))}}return!1}}!function(e){e.AccountCreateContract=\"AccountCreateContract\",e.TransferContract=\"TransferContract\",e.TransferAssetContract=\"TransferAssetContract\",e.VoteAssetContract=\"VoteAssetContract\",e.VoteWitnessContract=\"VoteWitnessContract\",e.WitnessCreateContract=\"WitnessCreateContract\",e.AssetIssueContract=\"AssetIssueContract\",e.WitnessUpdateContract=\"WitnessUpdateContract\",e.ParticipateAssetIssueContract=\"ParticipateAssetIssueContract\",e.AccountUpdateContract=\"AccountUpdateContract\",e.FreezeBalanceContract=\"FreezeBalanceContract\",e.UnfreezeBalanceContract=\"UnfreezeBalanceContract\",e.CancelAllUnfreezeV2Contract=\"CancelAllUnfreezeV2Contract\",e.WithdrawBalanceContract=\"WithdrawBalanceContract\",e.UnfreezeAssetContract=\"UnfreezeAssetContract\",e.UpdateAssetContract=\"UpdateAssetContract\",e.ProposalCreateContract=\"ProposalCreateContract\",e.ProposalApproveContract=\"ProposalApproveContract\",e.ProposalDeleteContract=\"ProposalDeleteContract\",e.SetAccountIdContract=\"SetAccountIdContract\",e.CustomContract=\"CustomContract\",e.CreateSmartContract=\"CreateSmartContract\",e.TriggerSmartContract=\"TriggerSmartContract\",e.GetContract=\"GetContract\",e.UpdateSettingContract=\"UpdateSettingContract\",e.ExchangeCreateContract=\"ExchangeCreateContract\",e.ExchangeInjectContract=\"ExchangeInjectContract\",e.ExchangeWithdrawContract=\"ExchangeWithdrawContract\",e.ExchangeTransactionContract=\"ExchangeTransactionContract\",e.UpdateEnergyLimitContract=\"UpdateEnergyLimitContract\",e.AccountPermissionUpdateContract=\"AccountPermissionUpdateContract\",e.ClearABIContract=\"ClearABIContract\",e.UpdateBrokerageContract=\"UpdateBrokerageContract\",e.ShieldedTransferContract=\"ShieldedTransferContract\",e.MarketSellAssetContract=\"MarketSellAssetContract\",e.MarketCancelOrderContract=\"MarketCancelOrderContract\",e.FreezeBalanceV2Contract=\"FreezeBalanceV2Contract\",e.UnfreezeBalanceV2Contract=\"UnfreezeBalanceV2Contract\",e.WithdrawExpireUnfreezeContract=\"WithdrawExpireUnfreezeContract\",e.DelegateResourceContract=\"DelegateResourceContract\",e.UnDelegateResourceContract=\"UnDelegateResourceContract\",e.UNRECOGNIZED=\"UNRECOGNIZED\"}(Im||(Im={})),function(e){e[e.Owner=0]=\"Owner\",e[e.Witness=1]=\"Witness\",e[e.Active=2]=\"Active\",e[e.UNRECOGNIZED=-1]=\"UNRECOGNIZED\"}(Sm||(Sm={})),function(e){e[e.Normal=0]=\"Normal\",e[e.AssetIssue=1]=\"AssetIssue\",e[e.Contract=2]=\"Contract\",e[e.UNRECOGNIZED=-1]=\"UNRECOGNIZED\"}(Wm||(Wm={}));var Rm=r(1048).hp;function km(e){return Jm.fromUtf8(e).replace(/^0x/,\"\")}function Om(e){return JSON.parse(JSON.stringify(e))}function Fm(e={}){if(void 0===e.ref_block_bytes&&void 0===e.ref_block_hash&&void 0===e.expiration&&void 0===e.timestamp)return!1;if(\"string\"!=typeof e.ref_block_bytes)throw new Error(\"Invalid ref_block_bytes provided.\");if(\"string\"!=typeof e.ref_block_hash)throw new Error(\"Invalid ref_block_hash provided.\");if(\"number\"!=typeof e.expiration)throw new Error(\"Invalid expiration provided.\");if(\"number\"!=typeof e.timestamp)throw new Error(\"Invalid timestamp provided.\");return!0}async function Mm(e,t,r,n,o={}){const s={visible:!1,txID:\"\",raw_data_hex:\"\",raw_data:{contract:[{parameter:{value:r,type_url:`type.googleapis.com/protocol.${t}`},type:t}],...Fm(o)?{}:await e.trx.getCurrentRefBlockParams(),...o}};n&&(s.raw_data.contract[0].Permission_id=n);const i=Hb(s);return s.txID=Jb(i).replace(/^0x/,\"\"),s.raw_data_hex=qb(i).toLowerCase(),s}function Nm(e={}){const t={};return Fm(e.blockHeader)&&(t.ref_block_bytes=e.blockHeader.ref_block_bytes,t.ref_block_hash=e.blockHeader.ref_block_hash,t.expiration=e.blockHeader.expiration,t.timestamp=e.blockHeader.timestamp),t}var Um=r(1048).hp;class Dm{tronWeb;validator;constructor(e){if(!(e&&e instanceof Jm))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e,this.validator=new _m}async sendTrx(e,t=0,r=this.tronWeb.defaultAddress.hex,n={}){t=parseInt(t),this.validator.notValid([{name:\"recipient\",type:\"address\",value:e},{name:\"origin\",type:\"address\",value:r},{names:[\"recipient\",\"origin\"],type:\"notEqual\",msg:\"Cannot transfer TRX to the same account\"},{name:\"amount\",type:\"integer\",gt:0,value:t}]);const o={to_address:Ph(e),owner_address:Ph(r),amount:t},s=Nm(n);return Mm(this.tronWeb,Im.TransferContract,o,n?.permissionId,s)}async sendToken(e,t=0,r,n=this.tronWeb.defaultAddress.hex,o={}){t=parseInt(t),this.validator.notValid([{name:\"recipient\",type:\"address\",value:e},{name:\"origin\",type:\"address\",value:n},{names:[\"recipient\",\"origin\"],type:\"notEqual\",msg:\"Cannot transfer tokens to the same account\"},{name:\"amount\",type:\"integer\",gt:0,value:t},{name:\"token ID\",type:\"tokenId\",value:r}]);const s={to_address:Ph(e),owner_address:Ph(n),asset_name:km(r),amount:t},i=Nm(o);return Mm(this.tronWeb,Im.TransferAssetContract,s,o?.permissionId,i)}async purchaseToken(e,t,r=0,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"buyer\",type:\"address\",value:n},{name:\"issuer\",type:\"address\",value:e},{names:[\"buyer\",\"issuer\"],type:\"notEqual\",msg:\"Cannot purchase tokens from same account\"},{name:\"amount\",type:\"integer\",gt:0,value:r},{name:\"token ID\",type:\"tokenId\",value:t}]);const s={to_address:Ph(e),owner_address:Ph(n),asset_name:km(t),amount:parseInt(r)},i=Nm(o);return Mm(this.tronWeb,Im.ParticipateAssetIssueContract,s,o?.permissionId,i)}async freezeBalance(e=0,t=3,r=\"BANDWIDTH\",n=this.tronWeb.defaultAddress.hex,o,s={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:n},{name:\"receiver\",type:\"address\",value:o,optional:!0},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"duration\",type:\"integer\",gte:3,value:t},{name:\"resource\",type:\"resource\",value:r,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const i={owner_address:Ph(n),frozen_balance:parseInt(e),frozen_duration:parseInt(String(t))};\"BANDWIDTH\"!==r&&(i.resource=r),Th(o)&&Ph(o)!==Ph(n)&&(i.receiver_address=Ph(o));const a=Nm(s);return Mm(this.tronWeb,Im.FreezeBalanceContract,i,s?.permissionId,a)}async unfreezeBalance(e=\"BANDWIDTH\",t=this.tronWeb.defaultAddress.hex,r,n={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:t},{name:\"receiver\",type:\"address\",value:r,optional:!0},{name:\"resource\",type:\"resource\",value:e,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const o={owner_address:Ph(t)};\"BANDWIDTH\"!==e&&(o.resource=e),Th(r)&&Ph(r)!==Ph(t)&&(o.receiver_address=Ph(r));const s=Nm(n);return Mm(this.tronWeb,Im.UnfreezeBalanceContract,o,n?.permissionId,s)}async freezeBalanceV2(e=0,t=\"BANDWIDTH\",r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:r},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:t,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const o={owner_address:Ph(r),frozen_balance:parseInt(e)};\"BANDWIDTH\"!==t&&(o.resource=t);const s=Nm(n);return Mm(this.tronWeb,Im.FreezeBalanceV2Contract,o,n?.permissionId,s)}async unfreezeBalanceV2(e=0,t=\"BANDWIDTH\",r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:r},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:t,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]);const o={owner_address:Ph(r),unfreeze_balance:parseInt(e)};\"BANDWIDTH\"!==t&&(o.resource=t);const s=Nm(n);return Mm(this.tronWeb,Im.UnfreezeBalanceV2Contract,o,n?.permissionId,s)}async cancelUnfreezeBalanceV2(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={owner_address:Ph(e)},n=Nm(t);return Mm(this.tronWeb,Im.CancelAllUnfreezeV2Contract,r,t?.permissionId,n)}async delegateResource(e=0,t,r=\"BANDWIDTH\",n=this.tronWeb.defaultAddress.hex,o=!1,s,i={}){if(this.validator.notValid([{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:r,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'},{name:\"receiver\",type:\"address\",value:t},{name:\"origin\",type:\"address\",value:n},{name:\"lock\",type:\"boolean\",value:o},{name:\"lock period\",type:\"integer\",gte:0,value:s,optional:!0}]),Ph(t)===Ph(n))throw new Error(\"Receiver address must not be the same as owner address\");const a={owner_address:Ph(n),receiver_address:Ph(t),balance:parseInt(e)};\"BANDWIDTH\"!==r&&(a.resource=r),o&&(a.lock=o,Th(s)&&(a.lock_period=s));const c=Nm(i);return Mm(this.tronWeb,Im.DelegateResourceContract,a,i?.permissionId,c)}async undelegateResource(e=0,t,r=\"BANDWIDTH\",n=this.tronWeb.defaultAddress.hex,o={}){if(this.validator.notValid([{name:\"origin\",type:\"address\",value:n},{name:\"receiver\",type:\"address\",value:t},{name:\"amount\",type:\"integer\",gt:0,value:e},{name:\"resource\",type:\"resource\",value:r,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]),Ph(t)===Ph(n))throw new Error(\"Receiver address must not be the same as owner address\");const s={owner_address:Ph(n),receiver_address:Ph(t),balance:parseInt(e)};\"BANDWIDTH\"!==r&&(s.resource=r);const i=Nm(o);return Mm(this.tronWeb,Im.UnDelegateResourceContract,s,o?.permissionId,i)}async withdrawExpireUnfreeze(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={owner_address:Ph(e)},n=Nm(t);return Mm(this.tronWeb,Im.WithdrawExpireUnfreezeContract,r,t?.permissionId,n)}async withdrawBlockRewards(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={owner_address:Ph(e)},n=Nm(t);return Mm(this.tronWeb,Im.WithdrawBalanceContract,r,t?.permissionId,n)}async applyForSR(e=this.tronWeb.defaultAddress.hex,t=\"\",r={}){this.validator.notValid([{name:\"origin\",type:\"address\",value:e},{name:\"url\",type:\"url\",value:t,msg:\"Invalid url provided\"},{name:\"url\",type:\"string\",value:t,lte:256,msg:\"Invalid url provided\"}]);const n={owner_address:Ph(e),url:km(t)},o=Nm(r);return Mm(this.tronWeb,Im.WitnessCreateContract,n,r?.permissionId,o)}async vote(e={},t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"voter\",type:\"address\",value:t},{name:\"votes\",type:\"notEmptyObject\",value:e}]);const n=Object.entries(e);for(const[e,t]of n)this.validator.notValid([{name:\"SR\",type:\"address\",value:e},{name:\"vote count\",type:\"integer\",gt:0,value:t,msg:\"Invalid vote count provided for SR: \"+e}]);const o=n.map(([e,t])=>({vote_address:Ph(e),vote_count:parseInt(t)})),s={owner_address:Ph(t),votes:o},i=Nm(r);return Mm(this.tronWeb,Im.VoteWitnessContract,s,r?.permissionId,i)}async createSmartContract(e={},t=this.tronWeb.defaultAddress.hex){const r=e.feeLimit||this.tronWeb.feeLimit;let n=e.userFeePercentage;\"number\"==typeof n||n||(n=100);const o=e.originEnergyLimit||1e7,s=e.callValue||0,i=e.tokenValue,a=e.tokenId||e.token_id;let{abi:c}=e;const{parameters:u=[]}=e;let l=\"\";const{bytecode:d=!1,name:f=\"\"}=e;if(c&&fh(c))try{c=JSON.parse(c)}catch{throw new Error(\"Invalid options.abi provided\")}const p=c;let h=p;if(p.entrys&&(h=p.entrys),!ch(h))throw new Error(\"Invalid options.abi provided\");const g=h.some(e=>\"constructor\"===e.type&&\"payable\"===e.stateMutability.toLowerCase());if(this.validator.notValid([{name:\"bytecode\",type:\"hex\",value:d},{name:\"feeLimit\",type:\"integer\",value:r,gt:0},{name:\"callValue\",type:\"integer\",value:s,gte:0},{name:\"userFeePercentage\",type:\"integer\",value:n,gte:0,lte:100},{name:\"originEnergyLimit\",type:\"integer\",value:o,gte:0,lte:1e7},{name:\"parameters\",type:\"array\",value:u},{name:\"issuer\",type:\"address\",value:t},{name:\"tokenValue\",type:\"integer\",value:i,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:a,gte:0,optional:!0}]),!g&&(s>0||i>0))throw new Error(\"When contract is not payable, options.callValue and options.tokenValue must be 0\");const{rawParameter:y,funcABIV2:m,parametersV2:b}=e;if(y&&fh(y))l=y.replace(/^(0x)/,\"\");else if(m)l=Fh(m,b).replace(/^(0x)/,\"\");else{let e=h.find(e=>\"constructor\"===e.type);if(void 0!==e&&e){const t=new tc,r=[],n=[];if(e=e.inputs,u.length!=e.length)throw new Error(`constructor needs ${e.length} but ${u.length} provided`);for(let t=0;t<u.length;t++){let o=e[t].type,s=u[t];if(!o||!fh(o)||!o.length)throw new Error(\"Invalid parameter type provided: \"+o);const i=e=>ch(e)?e.map(e=>i(e)):Ph(e).replace(Br,\"0x\");\"address\"===o||\"address[\"===o.match(/^([^\\x5b]*)(\\x5b|$)/)?.[0]?s=i(s):/trcToken/.test(o)&&(o=o.replace(/trcToken/,\"uint256\")),r.push(o),n.push(s)}try{l=t.encode(r,n).replace(/^(0x)/,\"\")}catch(e){throw new Error(e)}}else l=\"\"}const w={owner_address:Ph(t),fee_limit:parseInt(r),call_value:parseInt(s),consume_user_resource_percent:n,origin_energy_limit:o,abi:JSON.stringify(h),bytecode:d,parameter:l,name:f};Th(i)&&(w.call_token_value=parseInt(i)),Th(a)&&(w.token_id=parseInt(a));const v={};v.owner_address=w.owner_address,Th(w.call_token_value)&&(v.call_token_value=w.call_token_value),Th(w.token_id)&&(v.token_id=w.token_id);const T=v.new_contract={};w.abi?T.abi={entrys:JSON.parse(w.abi)}:T.abi={},w.call_value&&(T.call_value=w.call_value),T.consume_user_resource_percent=w.consume_user_resource_percent,T.origin_energy_limit=w.origin_energy_limit,T.origin_address=w.origin_address??w.owner_address,w.bytecode+w.parameter&&(T.bytecode=(w.bytecode+w.parameter).replace(/^0x/,\"\")),Th(w.name)&&(T.name=w.name);const A=Nm(e),E=await Mm(this.tronWeb,Im.CreateSmartContract,v,e?.permissionId,{...A,fee_limit:w.fee_limit});var P,B;return E.contract_address=(P=w.owner_address,B=E.txID,\"41\"+gs(Rm.from(B+P,\"hex\")).toString().substring(2).slice(24)),E}async triggerSmartContract(e,t,r,n,o){const s=[e,t,r,n,o];return\"object\"!=typeof s[2]&&(s[2]={feeLimit:s[2],callValue:s[3]},s.splice(3,1)),s[2]?.txLocal?this._triggerSmartContractLocal(...s):this._triggerSmartContract(...s)}async triggerConstantContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){return r._isConstant=!0,this._triggerSmartContract(e,t,r,n,o)}async triggerConfirmedConstantContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){return r._isConstant=!0,r.confirmed=!0,this._triggerSmartContract(e,t,r,n,o)}async estimateEnergy(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){r.estimateEnergy=!0;return await this._triggerSmartContract(e,t,r,n,o)}async deployConstantContract(e={input:\"\",ownerAddress:\"\"}){const{input:t,ownerAddress:r,tokenId:n,tokenValue:o,callValue:s=0}=e;this.validator.notValid([{name:\"input\",type:\"not-empty-string\",value:t},{name:\"callValue\",type:\"integer\",value:s,gte:0},{name:\"owner\",type:\"address\",value:r},{name:\"tokenValue\",type:\"integer\",value:o,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:n,gte:0,optional:!0}]);const i={data:t,owner_address:Ph(r),call_value:s};n&&(i.token_id=n),o&&(i.call_token_value=o);const a=`wallet${e.confirmed?\"solidity\":\"\"}/estimateenergy`,c=await this.tronWeb[e.confirmed?\"solidityNode\":\"fullNode\"].request(a,i,\"post\");if(c.Error)throw new Error(c.Error);if(c.result&&c.result.message)throw new Error(this.tronWeb.toUtf8(c.result.message));return c}_getTriggerSmartContractArgs(e,t,r,n,o,s,i,a,c){const u={contract_address:Ph(e),owner_address:Ph(o)};if(t&&fh(t)){let e;if(t=t.replace(/\\s*/g,\"\"),n.length){const t=new tc;let r=[];const o=[];for(let e=0;e<n.length;e++){let{value:t}=n[e];const{type:s}=n[e];if(!s||!fh(s)||!s.length)throw new Error(\"Invalid parameter type provided: \"+s);const i=e=>ch(e)?e.map(e=>i(e)):Ph(e).replace(Br,\"0x\");(\"address\"===s||\"address[\"===s.match(/^([^\\x5b]*)(\\x5b|$)/)?.[0])&&(t=i(t)),r.push(s),o.push(t)}try{r=r.map(e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,\"uint256\")),e)),e=t.encode(r,o).replace(/^(0x)/,\"\")}catch(e){throw new Error(e)}}else e=\"\";r.funcABIV2&&(e=Fh(r.funcABIV2,r.parametersV2).replace(/^(0x)/,\"\")),r.shieldedParameter&&fh(r.shieldedParameter)&&(e=r.shieldedParameter.replace(/^(0x)/,\"\")),r.rawParameter&&fh(r.rawParameter)&&(e=r.rawParameter.replace(/^(0x)/,\"\")),u.function_selector=t,u.parameter=e}else r.input&&(u.data=r.input);return u.call_value=parseInt(a),Th(s)&&(u.call_token_value=parseInt(s)),Th(i)&&(u.token_id=parseInt(i)),r._isConstant||r.estimateEnergy||(u.fee_limit=parseInt(c)),r.permissionId&&(u.Permission_id=r.permissionId),u}async _triggerSmartContractLocal(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){const{tokenValue:s,tokenId:i,callValue:a,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);this.validator.notValid([{name:\"feeLimit\",type:\"integer\",value:c,gt:0},{name:\"callValue\",type:\"integer\",value:a,gte:0},{name:\"parameters\",type:\"array\",value:n},{name:\"contract\",type:\"address\",value:e},{name:\"issuer\",type:\"address\",value:o,optional:!0},{name:\"tokenValue\",type:\"integer\",value:s,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:i,gte:0,optional:!0}]);const u=this._getTriggerSmartContractArgs(e,t,r,n,o,s,i,a,c);u.function_selector&&(u.data=gs(Um.from(u.function_selector,\"utf-8\")).toString().substring(2,10)+u.parameter);const l={data:u.data,owner_address:u.owner_address,contract_address:u.contract_address};u.call_value&&(l.call_value=u.call_value),u.call_token_value&&(l.call_token_value=u.call_token_value),u.token_id&&(l.token_id=u.token_id);const d=Nm(r);return{result:{result:!0},transaction:await Mm(this.tronWeb,Im.TriggerSmartContract,l,r.permissionId,{...d,fee_limit:u.fee_limit})}}async _triggerSmartContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){const{tokenValue:s,tokenId:i,callValue:a,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);this.validator.notValid([{name:\"feeLimit\",type:\"integer\",value:c,gt:0},{name:\"callValue\",type:\"integer\",value:a,gte:0},{name:\"parameters\",type:\"array\",value:n},{name:\"contract\",type:\"address\",value:e},{name:\"issuer\",type:\"address\",value:o,optional:!0},{name:\"tokenValue\",type:\"integer\",value:s,gte:0,optional:!0},{name:\"tokenId\",type:\"integer\",value:i,gte:0,optional:!0}]);const u=this._getTriggerSmartContractArgs(e,t,r,n,o,s,i,a,c);let l=\"triggersmartcontract\";r._isConstant?l=\"triggerconstantcontract\":r.estimateEnergy&&(l=\"estimateenergy\"),l=`wallet${r.confirmed?\"solidity\":\"\"}/${l}`;return function(e,t,r){if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(Jm.toUtf8(e.result.message));if(!r._isConstant&&!r.estimateEnergy){if(Yb(e.transaction,t,r))return e;throw new Error(\"Invalid transaction\")}return e}(await this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(l,u,\"post\"),u,r)}async clearABI(e,t=this.tronWeb.defaultAddress.hex,r={}){if(!Jm.isAddress(e))throw new Error(\"Invalid contract address provided\");if(!Jm.isAddress(t))throw new Error(\"Invalid owner address provided\");const n={contract_address:Ph(e),owner_address:Ph(t)};this.tronWeb.trx.cache.contracts[e]&&delete this.tronWeb.trx.cache.contracts[e];const o=Nm(r);return Mm(this.tronWeb,Im.ClearABIContract,n,r?.permissionId,o)}async updateBrokerage(e,t=this.tronWeb.defaultAddress.hex,r={}){if(!Th(e))throw new Error(\"Invalid brokerage provided\");if(!gh(e)||e<0||e>100)throw new Error(\"Brokerage must be an integer between 0 and 100\");if(!Jm.isAddress(t))throw new Error(\"Invalid owner address provided\");const n={brokerage:parseInt(e),owner_address:Ph(t)},o=Nm(r);return Mm(this.tronWeb,Im.UpdateBrokerageContract,n,r?.permissionId,o)}async createToken(e={},t=this.tronWeb.defaultAddress.hex){const{name:r=!1,abbreviation:n=!1,description:o=\"\",url:s=!1,totalSupply:i=0,trxRatio:a=1,tokenRatio:c=1,saleStart:u=Date.now(),saleEnd:l=!1,freeBandwidth:d=0,freeBandwidthLimit:f=0,frozenAmount:p=0,frozenDuration:h=0,voteScore:g,precision:y}=e;if(this.validator.notValid([{name:\"Supply amount\",type:\"positive-integer\",value:i},{name:\"TRX ratio\",type:\"positive-integer\",value:a},{name:\"Token ratio\",type:\"positive-integer\",value:c},{name:\"token abbreviation\",type:\"string\",value:n,lte:32,gt:0},{name:\"token name\",type:\"not-empty-string\",value:r},{name:\"token description\",type:\"string\",value:o,lte:200},{name:\"token url\",type:\"url\",value:s},{name:\"token url\",type:\"string\",value:s,lte:256},{name:\"issuer\",type:\"address\",value:t},{name:\"sale start timestamp\",type:\"integer\",value:u,gte:Date.now()},{name:\"sale end timestamp\",type:\"integer\",value:l,gt:u},{name:\"Frozen supply\",type:\"integer\",value:p,gte:0},{name:\"Frozen duration\",type:\"integer\",value:h,gte:0}]),Th(g)&&(!gh(g)||g<=0))throw new Error(\"voteScore must be a positive integer greater than 0\");if(Th(y)&&(!gh(y)||y<0||y>6))throw new Error(\"precision must be a positive integer >= 0 and <= 6\");const m={owner_address:Ph(t),name:km(r),abbr:km(n),description:km(o),url:km(s),total_supply:parseInt(i),trx_num:parseInt(a),num:parseInt(c),start_time:parseInt(u),end_time:parseInt(l),frozen_supply:[{frozen_amount:parseInt(p),frozen_days:parseInt(h)}]};[\"name\",\"abbr\",\"description\",\"url\"].forEach(e=>{m[e]||delete m[e]}),parseInt(p)>0||delete m.frozen_supply,d&&!isNaN(parseInt(d))&&parseInt(d)>=0&&(m.free_asset_net_limit=parseInt(d)),f&&!isNaN(parseInt(f))&&parseInt(f)>=0&&(m.public_free_asset_net_limit=parseInt(f)),y&&!isNaN(parseInt(y))&&(m.precision=parseInt(y)),g&&!isNaN(parseInt(g))&&(m.vote_score=parseInt(g));const b=Nm(e);return Mm(this.tronWeb,Im.AssetIssueContract,m,e?.permissionId,b)}async createAccount(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"account\",type:\"address\",value:e},{name:\"origin\",type:\"address\",value:t}]);const n={owner_address:Ph(t),account_address:Ph(e)},o=Nm(r);return Mm(this.tronWeb,Im.AccountCreateContract,n,r?.permissionId,o)}async updateAccount(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"Name\",type:\"string\",lte:200,gt:0,value:e,msg:\"Invalid accountName\"},{name:\"origin\",type:\"address\",value:t}]);const n={account_name:km(e),owner_address:Ph(t)},o=Nm(r);return Mm(this.tronWeb,Im.AccountUpdateContract,n,r?.permissionId,o)}async setAccountId(e,t=this.tronWeb.defaultAddress.hex,r={}){e&&fh(e)&&e.startsWith(\"0x\")&&(e=e.slice(2)),this.validator.notValid([{name:\"accountId\",type:\"hex\",value:e},{name:\"accountId\",type:\"string\",lte:32,gte:8,value:e},{name:\"origin\",type:\"address\",value:t}]);const n={account_id:e,owner_address:Ph(t)},o=Nm(r);return Mm(this.tronWeb,Im.SetAccountIdContract,n,r?.permissionId,o)}async updateToken(e={},t=this.tronWeb.defaultAddress.hex){const{description:r=\"\",url:n=!1,freeBandwidth:o=0,freeBandwidthLimit:s=0}=e;this.validator.notValid([{name:\"token description\",type:\"string\",value:r,lte:200},{name:\"token url\",type:\"url\",value:n},{name:\"token url\",type:\"string\",value:n,lte:256},{name:\"issuer\",type:\"address\",value:t}]);const i={owner_address:Ph(t),description:km(r),url:km(n)};o&&!isNaN(parseInt(o))&&parseInt(o)>=0&&(i.new_limit=parseInt(o)),s&&!isNaN(parseInt(s))&&parseInt(s)>=0&&(i.new_public_limit=parseInt(s));const a=Nm(e);return Mm(this.tronWeb,Im.UpdateAssetContract,i,e?.permissionId,a)}async sendAsset(e,t=0,r,n=this.tronWeb.defaultAddress.hex,o={}){return this.sendToken(e,t,r,n,o)}async purchaseAsset(e,t,r=0,n=this.tronWeb.defaultAddress.hex,o={}){return this.purchaseToken(e,t,r,n,o)}async createAsset(e,t){return this.createToken(e,t)}async updateAsset(e={},t=this.tronWeb.defaultAddress.hex){return this.updateToken(e,t)}async createProposal(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"issuer\",type:\"address\",value:t}]);const n=\"Invalid proposal parameters provided\";if(!e)throw new Error(n);const o=ch(e)?e:[e];for(const e of o)if(!ah(e))throw new Error(n);const s={owner_address:Ph(t),parameters:o},i=Nm(r);return Mm(this.tronWeb,Im.ProposalCreateContract,s,r?.permissionId,i)}async deleteProposal(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:\"issuer\",type:\"address\",value:t},{name:\"proposalID\",type:\"integer\",value:e,gte:0}]);const n={owner_address:Ph(t),proposal_id:parseInt(e)},o=Nm(r);return Mm(this.tronWeb,Im.ProposalDeleteContract,n,r?.permissionId,o)}async voteProposal(e,t=!1,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"voter\",type:\"address\",value:r},{name:\"proposalID\",type:\"integer\",value:e,gte:0},{name:\"has approval\",type:\"boolean\",value:t}]);const o={owner_address:Ph(r),proposal_id:parseInt(e),is_add_approval:t},s=Nm(n);return Mm(this.tronWeb,Im.ProposalApproveContract,o,n?.permissionId,s)}async createTRXExchange(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:n},{name:\"token name\",type:\"not-empty-string\",value:e},{name:\"token balance\",type:\"positive-integer\",value:t},{name:\"trx balance\",type:\"positive-integer\",value:r}]);const s={owner_address:Ph(n),first_token_id:km(e),first_token_balance:t,second_token_id:\"5f\",second_token_balance:r},i=Nm(o);return Mm(this.tronWeb,Im.ExchangeCreateContract,s,o?.permissionId,i)}async createTokenExchange(e,t,r,n,o=this.tronWeb.defaultAddress.hex,s={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:o},{name:\"first token name\",type:\"not-empty-string\",value:e},{name:\"second token name\",type:\"not-empty-string\",value:r},{name:\"first token balance\",type:\"positive-integer\",value:t},{name:\"second token balance\",type:\"positive-integer\",value:n}]);const i={owner_address:Ph(o),first_token_id:km(e),first_token_balance:t,second_token_id:km(r),second_token_balance:n},a=Nm(s);return Mm(this.tronWeb,Im.ExchangeCreateContract,i,s?.permissionId,a)}async injectExchangeTokens(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:n},{name:\"token name\",type:\"not-empty-string\",value:t},{name:\"token amount\",type:\"integer\",value:r,gte:1},{name:\"exchangeID\",type:\"integer\",value:e,gte:0}]);const s={owner_address:Ph(n),exchange_id:parseInt(e),token_id:km(t),quant:parseInt(r)},i=Nm(o);return Mm(this.tronWeb,Im.ExchangeInjectContract,s,o?.permissionId,i)}async withdrawExchangeTokens(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:n},{name:\"token name\",type:\"not-empty-string\",value:t},{name:\"token amount\",type:\"integer\",value:r,gte:1},{name:\"exchangeID\",type:\"integer\",value:e,gte:0}]);const s={owner_address:Ph(n),exchange_id:parseInt(e),token_id:km(t),quant:parseInt(r)},i=Nm(o);return Mm(this.tronWeb,Im.ExchangeWithdrawContract,s,o?.permissionId,i)}async tradeExchangeTokens(e,t,r,n,o=this.tronWeb.defaultAddress.hex,s={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:o},{name:\"token name\",type:\"not-empty-string\",value:t},{name:\"tokenAmountSold\",type:\"integer\",value:r,gte:1},{name:\"tokenAmountExpected\",type:\"integer\",value:n,gte:1},{name:\"exchangeID\",type:\"integer\",value:e,gte:0}]);const i={owner_address:Ph(o),exchange_id:parseInt(e),token_id:Jm.fromAscii(t).replace(/^0x/,\"\"),quant:parseInt(r),expected:parseInt(n)},a=Nm(s);return Mm(this.tronWeb,Im.ExchangeTransactionContract,i,s?.permissionId,a)}async updateSetting(e,t,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:r},{name:\"contract\",type:\"address\",value:e},{name:\"userFeePercentage\",type:\"integer\",value:t,gte:0,lte:100}]);const o={owner_address:Ph(r),contract_address:Ph(e),consume_user_resource_percent:t},s=Nm(n);return Mm(this.tronWeb,Im.UpdateSettingContract,o,n?.permissionId,s)}async updateEnergyLimit(e,t=0,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:\"owner\",type:\"address\",value:r},{name:\"contract\",type:\"address\",value:e},{name:\"originEnergyLimit\",type:\"integer\",value:t,gte:0,lte:1e7}]);const o={owner_address:Ph(r),contract_address:Ph(e),origin_energy_limit:t},s=Nm(n);return Mm(this.tronWeb,Im.UpdateEnergyLimitContract,o,n?.permissionId,s)}checkPermissions(e,t){if(e){if(e.type!==t||!e.permission_name||!fh(e.permission_name)||!gh(e.threshold)||e.threshold<1||!e.keys)return!1;for(const r of e.keys)if(!Jm.isAddress(r.address)||!gh(r.weight)||r.weight>e.threshold||r.weight<1||2===t&&!e.operations)return!1}return!0}async updateAccountPermissions(e=this.tronWeb.defaultAddress.hex,t,r,n,o={}){if(!Jm.isAddress(e))throw new Error(\"Invalid ownerAddress provided\");if(!this.checkPermissions(t,0))throw new Error(\"Invalid ownerPermissions provided\");if(!this.checkPermissions(r,1))throw new Error(\"Invalid witnessPermissions provided\");Array.isArray(n)||(n=[n]);for(const e of n)if(!this.checkPermissions(e,2))throw new Error(\"Invalid activesPermissions provided\");const s={owner_address:Ph(e)};if(t){const e=Om(t);\"type\"in e&&delete e.type,e.keys=e.keys?.map(({address:e,weight:t})=>({address:Ph(e),weight:t})),s.owner=e}if(r){const e=Om(r);e.type=\"Witness\",e.keys=e.keys.map(({address:e,weight:t})=>({address:Ph(e),weight:t})),s.witness=e}if(n){const e=Om(n);e.forEach(e=>{e.type=\"Active\"}),e.forEach(e=>{e.keys=e.keys.map(({address:e,weight:t})=>({address:Ph(e),weight:t}))}),s.actives=e}const i=Nm(o);return Mm(this.tronWeb,Im.AccountPermissionUpdateContract,s,o?.permissionId,i)}async newTxID(e,t={}){if(t?.txLocal){const t=e.raw_data.contract[0];try{const r=await Mm(this.tronWeb,t.type,t.parameter.value,t.Permission_id,{fee_limit:e.raw_data.fee_limit,data:e.raw_data.data,ref_block_bytes:e.raw_data.ref_block_bytes,ref_block_hash:e.raw_data.ref_block_hash,expiration:e.raw_data.expiration,timestamp:e.raw_data.timestamp});return r.signature=e.signature,r.visible=e.visible,r}catch(e){throw new Error(\"Error generating a new transaction id.\")}}try{const t=await this.tronWeb.fullNode.request(\"wallet/getsignweight\",e,\"post\");return\"boolean\"==typeof e.visible&&(t.transaction.transaction.visible=e.visible),function(e,t,r){if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(Jm.toUtf8(e.result.message));if(Yb(e,t,r))return e;throw new Error(\"Invalid transaction\")}(t.transaction.transaction,{...e.raw_data.contract[0].parameter.value,Permission_id:e.raw_data.contract[0].Permission_id},{data:e.raw_data.data,fee_limit:e.raw_data.fee_limit})}catch(e){throw new Error(\"Error generating a new transaction id.\")}}async alterTransaction(e,t={}){if(Reflect.has(e,\"signature\"))throw new Error(\"You can not extend the expiration of a signed transaction.\");if(t.data){if(\"hex\"===t.dataFormat||/^0x/.test(t.data)||(t.data=Jm.fromUtf8(t.data)),!hh(t.data))throw new Error(\"Invalid data provided\");if(t.data=t.data.replace(/^0x/,\"\"),t.data=t.data.padStart(2*Math.ceil(t.data.length/2),\"0\"),0===t.data.length)throw new Error(\"Invalid data provided\");e.raw_data.data=t.data}if(t.extension){if(t.extension=parseInt(1e3*t.extension),isNaN(t.extension)||e.raw_data.expiration+t.extension<=Date.now()+3e3)throw new Error(\"Invalid extension provided\");e.raw_data.expiration+=t.extension}return await this.newTxID(e,{txLocal:t.txLocal})}async extendExpiration(e,t,r={}){return await this.alterTransaction(e,{extension:t,txLocal:r?.txLocal})}async addUpdateData(e,t,r=\"utf8\",n={}){return this.alterTransaction(e,{data:t,dataFormat:r,txLocal:n?.txLocal})}}const Lm=\"\u0019TRON Signed Message:\\n32\",$m=\"\u0019Ethereum Signed Message:\\n32\";class zm{tronWeb;cache;validator;signMessage;sendAsset;send;sendTrx;broadcast;broadcastHex;signTransaction;constructor(e){this.tronWeb=e,this.cache={contracts:{}},this.validator=new _m,this.signMessage=this.sign,this.sendAsset=this.sendToken,this.send=this.sendTransaction,this.sendTrx=this.sendTransaction,this.broadcast=this.sendRawTransaction,this.broadcastHex=this.sendHexTransaction,this.signTransaction=this.sign}_parseToken(e){return{...e,name:this.tronWeb.toUtf8(e.name),abbr:e.abbr&&this.tronWeb.toUtf8(e.abbr),description:e.description&&this.tronWeb.toUtf8(e.description),url:e.url&&this.tronWeb.toUtf8(e.url)}}getCurrentBlock(){return this.tronWeb.fullNode.request(\"wallet/getnowblock\")}getConfirmedCurrentBlock(){return this.tronWeb.solidityNode.request(\"walletsolidity/getnowblock\")}async getBlock(e=this.tronWeb.defaultBlock){if(!1===e)throw new Error(\"No block identifier provided\");return\"earliest\"==e&&(e=0),\"latest\"==e?this.getCurrentBlock():isNaN(+e)&&hw.isHex(e.toString())?this.getBlockByHash(e):this.getBlockByNumber(e)}async getBlockByHash(e){const t=await this.tronWeb.fullNode.request(\"wallet/getblockbyid\",{value:e},\"post\");if(!Object.keys(t).length)throw new Error(\"Block not found\");return t}async getBlockByNumber(e){if(!hw.isInteger(e)||e<0)throw new Error(\"Invalid block number provided\");return this.tronWeb.fullNode.request(\"wallet/getblockbynum\",{num:parseInt(e)},\"post\").then(e=>{if(!Object.keys(e).length)throw new Error(\"Block not found\");return e})}async getBlockTransactionCount(e=this.tronWeb.defaultBlock){const{transactions:t=[]}=await this.getBlock(e);return t.length}async getTransactionFromBlock(e=this.tronWeb.defaultBlock,t){const{transactions:r}=await this.getBlock(e);if(!r)throw new Error(\"Transaction not found in block\");if(t>=0&&t<r.length)return r[t];throw new Error(\"Invalid transaction index provided\")}async getTransactionsFromBlock(e=this.tronWeb.defaultBlock){const{transactions:t}=await this.getBlock(e);if(!t)throw new Error(\"Transaction not found in block\");return t}async getTransaction(e){const t=await this.tronWeb.fullNode.request(\"wallet/gettransactionbyid\",{value:e},\"post\");if(!Object.keys(t).length)throw new Error(\"Transaction not found\");return t}async getConfirmedTransaction(e){const t=await this.tronWeb.solidityNode.request(\"walletsolidity/gettransactionbyid\",{value:e},\"post\");if(!Object.keys(t).length)throw new Error(\"Transaction not found\");return t}getUnconfirmedTransactionInfo(e){return this.tronWeb.fullNode.request(\"wallet/gettransactioninfobyid\",{value:e},\"post\")}getTransactionInfo(e){return this.tronWeb.solidityNode.request(\"walletsolidity/gettransactioninfobyid\",{value:e},\"post\")}getTransactionsToAddress(e=this.tronWeb.defaultAddress.hex,t=30,r=0){return this.getTransactionsRelated(Ph(e),\"to\",t,r)}getTransactionsFromAddress(e=this.tronWeb.defaultAddress.hex,t=30,r=0){return this.getTransactionsRelated(Ph(e),\"from\",t,r)}async getTransactionsRelated(e=this.tronWeb.defaultAddress.hex,t=\"all\",r=30,n=0){if(this.tronWeb.fullnodeSatisfies(\">=4.1.1\"))throw new Error(\"This api is not supported any more\");if(![\"to\",\"from\",\"all\"].includes(t))throw new Error('Invalid direction provided: Expected \"to\", \"from\" or \"all\"');if(\"all\"==t){const[t,o]=await Promise.all([this.getTransactionsRelated(e,\"from\",r,n),this.getTransactionsRelated(e,\"to\",r,n)]);return[...t.map(e=>(e.direction=\"from\",e)),...o.map(e=>(e.direction=\"to\",e))].sort((e,t)=>t.raw_data.timestamp-e.raw_data.timestamp)}if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");if(!hw.isInteger(r)||r<0||n&&r<1)throw new Error(\"Invalid limit provided\");if(!hw.isInteger(n)||n<0)throw new Error(\"Invalid offset provided\");return e=Ph(e),this.tronWeb.solidityNode.request(`walletextension/gettransactions${t}this`,{account:{address:e},offset:n,limit:r},\"post\").then(({transaction:e})=>e)}async getAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=Ph(e),this.tronWeb.solidityNode.request(\"walletsolidity/getaccount\",{address:e},\"post\")}getAccountById(e){return this.getAccountInfoById(e,{confirmed:!0})}async getAccountInfoById(e,t){return this.validator.notValid([{name:\"accountId\",type:\"hex\",value:e},{name:\"accountId\",type:\"string\",lte:32,gte:8,value:e}]),e.startsWith(\"0x\")&&(e=e.slice(2)),this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getaccountbyid`,{account_id:e},\"post\")}async getBalance(e=this.tronWeb.defaultAddress.hex){const{balance:t=0}=await this.getAccount(e);return t}async getUnconfirmedAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=Ph(e),this.tronWeb.fullNode.request(\"wallet/getaccount\",{address:e},\"post\")}getUnconfirmedAccountById(e){return this.getAccountInfoById(e,{confirmed:!1})}async getUnconfirmedBalance(e=this.tronWeb.defaultAddress.hex){const{balance:t=0}=await this.getUnconfirmedAccount(e);return t}async getBandwidth(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=Ph(e),this.tronWeb.fullNode.request(\"wallet/getaccountnet\",{address:e},\"post\").then(({freeNetUsed:e=0,freeNetLimit:t=0,NetUsed:r=0,NetLimit:n=0})=>t-e+(n-r))}async getTokensIssuedByAddress(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return e=Ph(e),this.tronWeb.fullNode.request(\"wallet/getassetissuebyaccount\",{address:e},\"post\").then(({assetIssue:e})=>{if(!e)return{};const t=e.map(e=>this._parseToken(e)).reduce((e,t)=>(e[t.name]=t,e),{});return t})}async getTokenFromID(e){if(hw.isInteger(e)&&(e=e.toString()),!hw.isString(e)||!e.length)throw new Error(\"Invalid token ID provided\");return this.tronWeb.fullNode.request(\"wallet/getassetissuebyname\",{value:this.tronWeb.fromUtf8(e)},\"post\").then(e=>{if(!e.name)throw new Error(\"Token does not exist\");return this._parseToken(e)})}async listNodes(){const{nodes:e=[]}=await this.tronWeb.fullNode.request(\"wallet/listnodes\");return e.map(({address:{host:e,port:t}})=>`${this.tronWeb.toUtf8(e)}:${t}`)}async getBlockRange(e=0,t=30){if(!hw.isInteger(e)||e<0)throw new Error(\"Invalid start of range provided\");if(!hw.isInteger(t)||t<e)throw new Error(\"Invalid end of range provided\");if(t+1-e>100)throw new Error(\"Invalid range size, which should be no more than 100.\");return this.tronWeb.fullNode.request(\"wallet/getblockbylimitnext\",{startNum:parseInt(e),endNum:parseInt(t)+1},\"post\").then(({block:e=[]})=>e)}async listSuperRepresentatives(){const{witnesses:e=[]}=await this.tronWeb.fullNode.request(\"wallet/listwitnesses\");return e}async listTokens(e=0,t=0){if(!hw.isInteger(e)||e<0||t&&e<1)throw new Error(\"Invalid limit provided\");if(!hw.isInteger(t)||t<0)throw new Error(\"Invalid offset provided\");return e?this.tronWeb.fullNode.request(\"wallet/getpaginatedassetissuelist\",{offset:parseInt(t),limit:parseInt(e)},\"post\").then(({assetIssue:e=[]})=>e.map(e=>this._parseToken(e))):this.tronWeb.fullNode.request(\"wallet/getassetissuelist\").then(({assetIssue:e=[]})=>e.map(e=>this._parseToken(e)))}async timeUntilNextVoteCycle(){const{num:e=-1}=await this.tronWeb.fullNode.request(\"wallet/getnextmaintenancetime\");if(-1==e)throw new Error(\"Failed to get time until next vote cycle\");return Math.floor(e/1e3)}async getContract(e){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid contract address provided\");if(this.cache.contracts[e])return this.cache.contracts[e];e=Ph(e);const t=await this.tronWeb.fullNode.request(\"wallet/getcontract\",{value:e});if(t.Error)throw new Error(\"Contract does not exist\");return this.cache.contracts[e]=t,t}ecRecover(e){return zm.ecRecover(e)}static ecRecover(e){if(!Zb(e))throw new Error(\"Invalid transaction\");if(!e.signature?.length)throw new Error(\"Transaction is not signed\");if(1===e.signature.length){const t=bp(e.txID,e.signature[0]);return Jm.address.fromHex(t)}return e.signature.map(t=>{const r=bp(e.txID,t);return Jm.address.fromHex(r)})}async verifyMessage(e,t,r=this.tronWeb.defaultAddress.base58,n=!0){if(!hw.isHex(e))throw new Error(\"Expected hex message input\");if(zm.verifySignature(e,r,t,n))return!0;throw new Error(\"Signature does not match\")}static verifySignature(e,t,r,n=!0){e=e.replace(/^0x/,\"\");const o=[...qo(n?Lm:$m),...hw.code.hexStr2byteArray(e)],s=Gi(gs(new Uint8Array(o)),Mn.from(`0x${r.replace(/^0x/,\"\")}`)),i=Er+s.substr(2);return Jm.address.fromHex(i)==Jm.address.fromHex(t)}async verifyMessageV2(e,t){return zm.verifyMessageV2(e,t)}static verifyMessageV2(e,t){return hw.message.verifyMessage(e,t)}verifyTypedData(e,t,r,n,o=this.tronWeb.defaultAddress.base58){if(zm.verifyTypedData(e,t,r,n,o))return!0;throw new Error(\"Signature does not match\")}static verifyTypedData(e,t,r,n,o){const s=Gi(hw.typedData.TypedDataEncoder.hash(e,t,r),Mn.from(`0x${n.replace(/^0x/,\"\")}`)),i=Er+s.substr(2);return Jm.address.fromHex(i)==Jm.address.fromHex(o)}async sign(e,t=this.tronWeb.defaultPrivateKey,r=!0,n=!1){if(hw.isString(e)){if(!hw.isHex(e))throw new Error(\"Expected hex message input\");return zm.signString(e,t,r)}if(!hw.isObject(e))throw new Error(\"Invalid transaction provided\");if(!n&&e.signature)throw new Error(\"Transaction is already signed\");if(!n){if(Ph(this.tronWeb.address.fromPrivateKey(t)).toLowerCase()!==Ph(e.raw_data.contract[0].parameter.value.owner_address))throw new Error(\"Private key does not match address in transaction\");if(!Zb(e))throw new Error(\"Invalid transaction\")}return hw.crypto.signTransaction(t,e)}static signString(e,t,r=!0){e=e.replace(/^0x/,\"\");const n=`0x${t.replace(/^0x/,\"\")}`,o=new Vi(n),s=[...qo(r?Lm:$m),...hw.code.hexStr2byteArray(e)],i=gs(new Uint8Array(s)),a=o.sign(i);return[\"0x\",a.r.substring(2),a.s.substring(2),Number(a.v).toString(16)].join(\"\")}signMessageV2(e,t=this.tronWeb.defaultPrivateKey){return zm.signMessageV2(e,t)}static signMessageV2(e,t){return hw.message.signMessage(e,t)}_signTypedData(e,t,r,n=this.tronWeb.defaultPrivateKey){return zm._signTypedData(e,t,r,n)}static _signTypedData(e,t,r,n){return hw.typedData.signTypedData(e,t,r,n)}signTypedData(e,t,r,n=this.tronWeb.defaultPrivateKey){return zm.signTypedData(e,t,r,n)}static signTypedData(e,t,r,n){return hw.typedData.signTypedData(e,t,r,n)}async multiSign(e,t=this.tronWeb.defaultPrivateKey,r=0){if(!hw.isObject(e)||!e.raw_data||!e.raw_data.contract)throw new Error(\"Invalid transaction provided\");if(!e.raw_data.contract[0].Permission_id&&r>0){e.raw_data.contract[0].Permission_id=r;const n=Ph(this.tronWeb.address.fromPrivateKey(t)).toLowerCase(),o=await this.getSignWeight(e,r);if(\"PERMISSION_ERROR\"===o.result.code)throw new Error(o.result.message);let s=!1;if(o.permission.keys.map(e=>{e.address===n&&(s=!0)}),!s)throw new Error(t+\" has no permission to sign\");if(o.approved_list&&-1!=o.approved_list.indexOf(n))throw new Error(t+\" already sign transaction\");if(!o.transaction||!o.transaction.transaction)throw new Error(\"Invalid transaction provided\");e=o.transaction.transaction,r>0&&(e.raw_data.contract[0].Permission_id=r)}if(!Zb(e))throw new Error(\"Invalid transaction\");return hw.crypto.signTransaction(t,e)}async getApprovedList(e){if(!hw.isObject(e))throw new Error(\"Invalid transaction provided\");return this.tronWeb.fullNode.request(\"wallet/getapprovedlist\",e,\"post\")}async getSignWeight(e,t){if(!hw.isObject(e)||!e.raw_data||!e.raw_data.contract)throw new Error(\"Invalid transaction provided\");return hw.isInteger(t)?e.raw_data.contract[0].Permission_id=parseInt(t):\"number\"!=typeof e.raw_data.contract[0].Permission_id&&(e.raw_data.contract[0].Permission_id=0),this.tronWeb.fullNode.request(\"wallet/getsignweight\",e,\"post\")}async sendRawTransaction(e){if(!hw.isObject(e))throw new Error(\"Invalid transaction provided\");if(!e.signature||!hw.isArray(e.signature))throw new Error(\"Transaction is not signed\");return{...await this.tronWeb.fullNode.request(\"wallet/broadcasttransaction\",e,\"post\"),transaction:e}}async sendHexTransaction(e){if(!hw.isHex(e))throw new Error(\"Invalid hex transaction provided\");const t={transaction:e},r=await this.tronWeb.fullNode.request(\"wallet/broadcasthex\",t,\"post\");return r.result?{...r,transaction:JSON.parse(r.transaction),hexTransaction:e}:r}async sendTransaction(e,t,r={}){if(\"string\"==typeof r&&(r={privateKey:r}),!this.tronWeb.isAddress(e))throw new Error(\"Invalid recipient provided\");if(!hw.isInteger(t)||t<=0)throw new Error(\"Invalid amount provided\");if(!(r={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...r}).privateKey&&!r.address)throw new Error(\"Function requires either a private key or address to be set\");const n=r.privateKey?this.tronWeb.address.fromPrivateKey(r.privateKey):r.address,o=await this.tronWeb.transactionBuilder.sendTrx(e,t,n),s=await this.sign(o,r.privateKey);return await this.sendRawTransaction(s)}async sendToken(e,t,r,n={}){if(\"string\"==typeof n&&(n={privateKey:n}),!this.tronWeb.isAddress(e))throw new Error(\"Invalid recipient provided\");if(!hw.isInteger(t)||t<=0)throw new Error(\"Invalid amount provided\");if(hw.isInteger(r)&&(r=r.toString()),!hw.isString(r))throw new Error(\"Invalid token ID provided\");if(!(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n}).privateKey&&!n.address)throw new Error(\"Function requires either a private key or address to be set\");const o=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,s=await this.tronWeb.transactionBuilder.sendToken(e,t,r,o),i=await this.sign(s,n.privateKey);return await this.sendRawTransaction(i)}async freezeBalance(e=0,t=3,r=\"BANDWIDTH\",n={},o){if(\"string\"==typeof n&&(n={privateKey:n}),![\"BANDWIDTH\",\"ENERGY\"].includes(r))throw new Error('Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"');if(!hw.isInteger(e)||e<=0)throw new Error(\"Invalid amount provided\");if(!hw.isInteger(t)||t<3)throw new Error(\"Invalid duration provided, minimum of 3 days\");if(!(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n}).privateKey&&!n.address)throw new Error(\"Function requires either a private key or address to be set\");const s=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,i=await this.tronWeb.transactionBuilder.freezeBalance(e,t,r,s,o),a=await this.sign(i,n.privateKey);return await this.sendRawTransaction(a)}async unfreezeBalance(e=\"BANDWIDTH\",t={},r){if(\"string\"==typeof t&&(t={privateKey:t}),![\"BANDWIDTH\",\"ENERGY\"].includes(e))throw new Error('Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"');if(!(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t}).privateKey&&!t.address)throw new Error(\"Function requires either a private key or address to be set\");const n=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,o=await this.tronWeb.transactionBuilder.unfreezeBalance(e,n,r),s=await this.sign(o,t.privateKey);return await this.sendRawTransaction(s)}async updateAccount(e,t={}){if(\"string\"==typeof t&&(t={privateKey:t}),!hw.isString(e)||!e.length)throw new Error(\"Name must be a string\");if(!(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t}).privateKey&&!t.address)throw Error(\"Function requires either a private key or address to be set\");const r=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,n=await this.tronWeb.transactionBuilder.updateAccount(e,r),o=await this.sign(n,t.privateKey);return await this.sendRawTransaction(o)}async getProposal(e){if(!hw.isInteger(e)||e<0)throw new Error(\"Invalid proposalID provided\");return this.tronWeb.fullNode.request(\"wallet/getproposalbyid\",{id:parseInt(e)},\"post\")}async listProposals(){const{proposals:e=[]}=await this.tronWeb.fullNode.request(\"wallet/listproposals\",{},\"post\");return e}async getChainParameters(){const{chainParameter:e=[]}=await this.tronWeb.fullNode.request(\"wallet/getchainparameters\",{},\"post\");return e}async getAccountResources(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.tronWeb.fullNode.request(\"wallet/getaccountresource\",{address:Ph(e)},\"post\")}async getDelegatedResourceV2(e=this.tronWeb.defaultAddress.hex,t=this.tronWeb.defaultAddress.hex,r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");if(!this.tronWeb.isAddress(t))throw new Error(\"Invalid address provided\");return this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${r.confirmed?\"solidity\":\"\"}/getdelegatedresourcev2`,{fromAddress:Ph(e),toAddress:Ph(t)},\"post\")}async getDelegatedResourceAccountIndexV2(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getdelegatedresourceaccountindexv2`,{value:Ph(e)},\"post\")}async getCanDelegatedMaxSize(e=this.tronWeb.defaultAddress.hex,t=\"BANDWIDTH\",r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.validator.notValid([{name:\"resource\",type:\"resource\",value:t,msg:'Invalid resource provided: Expected \"BANDWIDTH\" or \"ENERGY\"'}]),this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${r.confirmed?\"solidity\":\"\"}/getcandelegatedmaxsize`,{owner_address:Ph(e),type:\"ENERGY\"===t?1:0},\"post\")}async getAvailableUnfreezeCount(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getavailableunfreezecount`,{owner_address:Ph(e)},\"post\")}async getCanWithdrawUnfreezeAmount(e=this.tronWeb.defaultAddress.hex,t=Date.now(),r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid address provided\");if(!hw.isInteger(t)||t<0)throw new Error(\"Invalid timestamp provided\");return this.tronWeb[r.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${r.confirmed?\"solidity\":\"\"}/getcanwithdrawunfreezeamount`,{owner_address:Ph(e),timestamp:t},\"post\")}async getExchangeByID(e){if(!hw.isInteger(e)||e<0)throw new Error(\"Invalid exchangeID provided\");return this.tronWeb.fullNode.request(\"wallet/getexchangebyid\",{id:e},\"post\")}async listExchanges(){return this.tronWeb.fullNode.request(\"wallet/listexchanges\",{},\"post\").then(({exchanges:e=[]})=>e)}async listExchangesPaginated(e=10,t=0){return this.tronWeb.fullNode.request(\"wallet/getpaginatedexchangelist\",{limit:e,offset:t},\"post\").then(({exchanges:e=[]})=>e)}async getNodeInfo(){return this.tronWeb.fullNode.request(\"wallet/getnodeinfo\",{},\"post\")}async getTokenListByName(e){if(hw.isInteger(e)&&(e=e.toString()),!hw.isString(e)||!e.length)throw new Error(\"Invalid token ID provided\");return this.tronWeb.fullNode.request(\"wallet/getassetissuelistbyname\",{value:this.tronWeb.fromUtf8(e)},\"post\").then(e=>{if(Array.isArray(e.assetIssue))return e.assetIssue.map(e=>this._parseToken(e));if(!e.name)throw new Error(\"Token does not exist\");return this._parseToken(e)})}getTokenByID(e){if(hw.isInteger(e)&&(e=e.toString()),!hw.isString(e)||!e.length)throw new Error(\"Invalid token ID provided\");return this.tronWeb.fullNode.request(\"wallet/getassetissuebyid\",{value:e},\"post\").then(e=>{if(!e.name)throw new Error(\"Token does not exist\");return this._parseToken(e)})}async getReward(e,t={}){return t.confirmed=!0,this._getReward(e,t)}async getUnconfirmedReward(e,t={}){return t.confirmed=!1,this._getReward(e,t)}async getBrokerage(e,t={}){return t.confirmed=!0,this._getBrokerage(e,t)}async getUnconfirmedBrokerage(e,t={}){return t.confirmed=!1,this._getBrokerage(e,t)}async _getReward(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={address:Ph(e)};return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getReward`,r,\"post\").then((e={reward:void 0})=>{if(void 0===e.reward)throw new Error(\"Not found.\");return e.reward})}async _getBrokerage(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:\"origin\",type:\"address\",value:e}]);const r={address:Ph(e)};return this.tronWeb[t.confirmed?\"solidityNode\":\"fullNode\"].request(`wallet${t.confirmed?\"solidity\":\"\"}/getBrokerage`,r,\"post\").then((e={})=>{if(void 0===e.brokerage)throw new Error(\"Not found.\");return e.brokerage})}async getBandwidthPrices(){return this.tronWeb.fullNode.request(\"wallet/getbandwidthprices\",{},\"post\").then((e={})=>{if(void 0===e.prices)throw new Error(\"Not found.\");return e.prices})}async getEnergyPrices(){return this.tronWeb.fullNode.request(\"wallet/getenergyprices\",{},\"post\").then((e={})=>{if(void 0===e.prices)throw new Error(\"Not found.\");return e.prices})}async getCurrentRefBlockParams(){try{const{block_header:e,blockID:t}=await this.tronWeb.fullNode.request(\"wallet/getblock\",{detail:!1},\"post\"),{number:r,timestamp:n}=e.raw_data;return{ref_block_bytes:r.toString(16).slice(-4).padStart(4,\"0\"),ref_block_hash:t.slice(16,32),expiration:n+6e4,timestamp:n}}catch(e){throw new Error(`Unable to get params: ${e.message||e}`)}}}const jm=(e,t)=>Mh(e,t);class Vm{tronWeb;contract;abi;name;inputs;outputs;functionSelector;signature;defaultOptions;constructor(e,t){this.tronWeb=e.tronWeb,this.contract=e,this.abi=t,this.name=t.name||t.type,this.inputs=t.inputs||[],this.outputs=[],\"outputs\"in t&&t.outputs&&(this.outputs=t.outputs),this.functionSelector=(e=>{if(\"stateMutability\"in e&&(e.stateMutability=e.stateMutability?e.stateMutability.toLowerCase():\"nonpayable\"),e.type=e.type?e.type.toLowerCase():\"\",\"fallback\"===e.type||\"receive\"===e.type)return\"0x\";const t=new hw.ethersUtils.Interface([e]);let r;if(r=\"event\"===e.type?t.getEvent(e.name):t.getFunction(e.name),r)return r.format(\"sighash\");throw new Error(\"unknown function\")})(t),this.signature=Fp(this.functionSelector,!1).slice(0,8),this.defaultOptions={feeLimit:this.tronWeb.feeLimit,callValue:0,shouldPollResponse:!1}}decodeInput(e){const t=JSON.parse(JSON.stringify(this.abi));return t.outputs=t.inputs,jm(t,\"0x\"+e)}onMethod(...e){let t=\"\";return this.abi&&!/event/i.test(this.abi.type)&&(t=Fh(this.abi,e)),{call:async(e={})=>(e={...e,rawParameter:t},await this._call([],[],e)),send:async(e={},r=this.tronWeb.defaultPrivateKey)=>(e={...e,rawParameter:t},await this._send([],[],e,r))}}async _call(e,t,r={}){if(e.length!==t.length)throw new Error(\"Invalid argument count provided\");if(!this.contract.address)throw new Error(\"Smart contract is missing address\");if(!this.contract.deployed)throw new Error(\"Calling smart contracts requires you to load the contract first\");if(\"stateMutability\"in this.abi){const{stateMutability:e}=this.abi;if(e&&![\"pure\",\"view\"].includes(e.toLowerCase()))throw new Error(`Methods with state mutability \"${e}\" must use send()`)}r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r,_isConstant:!0};const n=t.map((t,r)=>({type:e[r],value:t})),o=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,n,r.from?this.tronWeb.address.toHex(r.from):void 0);if(!hw.hasProperty(o,\"constant_result\"))throw new Error(\"Failed to execute\");const s=o.constant_result[0].length;if(0===s||s%64==8){let e=\"The call has been reverted or has thrown an error.\";if(0!==s){e+=\" Error message: \";let t=\"\";const r=o.constant_result[0].substring(8);for(let e=0;e<s-8;e+=64)t+=this.tronWeb.toUtf8(r.substring(e,e+64));e+=t.replace(/(\\u0000|\\u000b|\\f)+/g,\" \").replace(/ +/g,\" \").replace(/\\s+$/g,\"\")}throw new Error(e)}const i=jm(this.abi,\"0x\"+o.constant_result[0]);return 1===i.length&&1===Object.keys(i).length?i[0]:i}async _send(e,t,r={},n=this.tronWeb.defaultPrivateKey){if(e.length!==t.length)throw new Error(\"Invalid argument count provided\");if(!this.contract.address)throw new Error(\"Smart contract is missing address\");if(!this.contract.deployed)throw new Error(\"Calling smart contracts requires you to load the contract first\");const{stateMutability:o}=this.abi;if([\"pure\",\"view\"].includes(o.toLowerCase()))throw new Error(`Methods with state mutability \"${o}\" must use call()`);[\"payable\"].includes(o.toLowerCase())||(r.callValue=0),r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r};const s=t.map((t,r)=>({type:e[r],value:t})),i=n?this.tronWeb.address.fromPrivateKey(n):this.tronWeb.defaultAddress.base58,a=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,s,this.tronWeb.address.toHex(i));if(!a.result||!a.result.result)throw new Error(\"Unknown error: \"+JSON.stringify(a,null,2));const c=await this.tronWeb.trx.sign(a.transaction,n);if(!c.signature){if(!n)throw new Error(\"Transaction was not signed properly\");throw new Error(\"Invalid private key provided\")}const u=await this.tronWeb.trx.sendRawTransaction(c);if(u.code){const e={error:u.code,message:u.code};u.message&&(e.message=this.tronWeb.toUtf8(u.message));const t=new Error(e.message);throw t.error=u.code,t}if(!r.shouldPollResponse)return c.txID;const l=async e=>{if(e===(r.pollTimes||20)){const e=new Error(\"Cannot find result in solidity node\");throw e.error=\"Cannot find result in solidity node\",e.transaction=c,e}const t=await this.tronWeb.trx.getTransactionInfo(c.txID);if(!Object.keys(t).length)return await new Promise(e=>setTimeout(e,3e3)),l(e+1);if(t.result&&\"FAILED\"===t.result){const e=new Error(this.tronWeb.toUtf8(t.resMessage));throw e.error=this.tronWeb.toUtf8(t.resMessage),e.transaction=c,e.output=t,e}if(!hw.hasProperty(t,\"contractResult\")){const e=new Error(\"Failed to execute: \"+JSON.stringify(t,null,2));throw e.error=\"Failed to execute: \"+JSON.stringify(t,null,2),e.transaction=c,e.output=t,e}if(r.rawResponse)return t;let n=jm(this.abi,\"0x\"+t.contractResult[0]);return 1===n.length&&1===Object.keys(n).length?(n=n[0],r.keepTxID?[c.txID,n]:n):r.keepTxID?[c.txID,n]:n};return l(0)}}class Hm{tronWeb;abi;address;eventListener;bytecode;deployed;lastBlock;methods;methodInstances;props;constructor(e,t=[],r){if(!(e&&e instanceof Jm))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e,this.address=r,this.abi=t,this.eventListener=!1,this.bytecode=!1,this.deployed=!1,this.lastBlock=!1,this.methods={},this.methodInstances={},this.props=[],hw.address.isAddress(r)?this.deployed=!0:this.address=!1,this.loadAbi(t)}hasProperty(e){return this.hasOwnProperty(e)||this.__proto__.hasOwnProperty(e)}loadAbi(e){this.abi=e,this.methods={},this.props.forEach(e=>delete this[e]),e.forEach(e=>{if(!e.type||[\"constructor\",\"error\"].includes(e.type.toLowerCase()))return;const t=new Vm(this,e),r=t.onMethod.bind(t),{name:n,functionSelector:o,signature:s}=t,i=n,a=o,c=s;this.methods[n]=r,this.methods[o]=r,this.methods[s]=r,this.methodInstances[i]=t,this.methodInstances[a]=t,this.methodInstances[c]=t,this.hasProperty(n)||(this[n]=r,this.props.push(n)),this.hasProperty(o)||(this[o]=r,this.props.push(o)),this.hasProperty(s)||(this[s]=r,this.props.push(s))})}decodeInput(e){const t=e.substring(0,8),r=e.substring(8);if(!this.methodInstances[t])throw new Error(\"Contract method \"+t+\" not found\");return{name:this.methodInstances[t].name,params:this.methodInstances[t].decodeInput(r)}}async new(e,t=this.tronWeb.defaultPrivateKey){const r=this.tronWeb.address.fromPrivateKey(t),n=await this.tronWeb.transactionBuilder.createSmartContract(e,r),o=await this.tronWeb.trx.sign(n,t),s=await this.tronWeb.trx.sendRawTransaction(o);if(s.code)throw{error:s.code,message:this.tronWeb.toUtf8(s.message)};await hw.sleep(3e3);const i=o.raw_data.contract[0].parameter.value.new_contract.abi.entrys||[];return this.tronWeb.contract(i,o.contract_address)}async at(e){try{const t=await this.tronWeb.trx.getContract(e);if(!t.contract_address)throw new Error(\"Unknown error: \"+JSON.stringify(t,null,2));return this.address=t.contract_address,this.bytecode=t.bytecode,this.deployed=!0,this.loadAbi(t.abi&&t.abi.entrys?t.abi.entrys:[]),this}catch(e){if(e.toString().includes(\"does not exist\"))throw new Error(\"Contract has not been deployed on the network\");throw new Error(e)}}}class Gm{tronWeb;pluginNoOverride;disablePlugins;constructor(e,t={}){if(!(e&&e instanceof Jm))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e,this.pluginNoOverride=[\"register\"],this.disablePlugins=!!t.disablePlugins}register(e,t){let r={requires:\"0.0.0\",components:{}};const n={libs:[],plugged:[],skipped:[],error:void 0};if(this.disablePlugins)return n.error=\"This instance of TronWeb has plugins disabled.\",n;const o=new e(this.tronWeb);if(hw.isFunction(o.pluginInterface)&&(r=o.pluginInterface(t)),!xm.satisfies(Jm.version,r.requires))throw new Error(\"The plugin is not compatible with this version of TronWeb\");if(r.fullClass){const t=o.constructor.name,r=t.substring(0,1).toLowerCase()+t.substring(1);t!==r&&(Object.assign(Jm,{[t]:e}),Object.assign(this.tronWeb,{[r]:o}),n.libs.push(t))}else for(const e in r.components){if(!this.tronWeb.hasOwnProperty(e))continue;const t=r.components[e],o=this.tronWeb[e].pluginNoOverride||[];for(const r in t)\"constructor\"===r||this.tronWeb[e][r]&&(o.includes(r)||/^_/.test(r))?n.skipped.push(r):(this.tronWeb[e][r]=t[r].bind(this.tronWeb[e]),n.plugged.push(r))}return n}}class Km{tronWeb;constructor(e){if(!(e&&e instanceof Jm))throw new Error(\"Expected instance of TronWeb\");this.tronWeb=e}setServer(e,t=\"healthcheck\"){if(!e)return this.tronWeb.eventServer=void 0;if(hw.isString(e)&&(e=new Pm(e)),!this.tronWeb.isValidProvider(e))throw new Error(\"Invalid event server provided\");this.tronWeb.eventServer=e,this.tronWeb.eventServer.isConnected=()=>this.tronWeb.eventServer.request(t).then(()=>!0).catch(()=>!1)}async getEventsByContractAddress(e,t={}){const r=Object.assign({limit:20},t),{eventName:n,blockNumber:o,onlyUnconfirmed:s,onlyConfirmed:i,minBlockTimestamp:a,maxBlockTimestamp:c,orderBy:u,fingerprint:l}=r;let{limit:d}=r;if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");if(!this.tronWeb.isAddress(e))throw new Error(\"Invalid contract address provided\");if(void 0!==a&&!hw.isInteger(a))throw new Error(\"Invalid minBlockTimestamp provided\");if(void 0!==c&&!hw.isInteger(c))throw new Error(\"Invalid maxBlockTimestamp provided\");hw.isInteger(d)&&d>200&&(console.warn(\"Defaulting to maximum accepted limit: 200\"),d=200);const f={};n&&(f.event_name=n),o&&(f.block_number=o),\"boolean\"==typeof s&&(f.only_unconfirmed=s),\"boolean\"==typeof i&&(f.only_confirmed=i),a&&(f.min_block_timestamp=a),c&&(f.max_block_timestamp=c),u&&(f.order_by=u),l&&(f.fingerprint=l),hw.isInteger(d)&&(f.limit=d);const p=await this.tronWeb.eventServer.request(`v1/contracts/${this.tronWeb.address.fromHex(e)}/events?${new URLSearchParams(f).toString()}`);if(p.success)return p;throw new Error(p.error)}async getEventsByTransactionID(e,t={}){if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");const r={};return\"boolean\"==typeof t.only_unconfirmed&&(r.only_unconfirmed=t.only_unconfirmed),\"boolean\"==typeof t.only_confirmed&&(r.only_confirmed=t.only_confirmed),this.tronWeb.eventServer.request(`v1/transactions/${e}/events?${new URLSearchParams(r).toString()}`).then(e=>{if(e.success)return e;throw new Error(JSON.parse(e.error).message)})}async getEventsByBlockNumber(e,t={}){if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");const r={};return\"boolean\"==typeof t.only_confirmed&&(r.only_confirmed=t.only_confirmed),t.limit&&(r.limit=t.limit),t.fingerprint&&(r.fingerprint=t.fingerprint),this.tronWeb.eventServer.request(`v1/blocks/${e}/events?${new URLSearchParams(r).toString()}`).then(e=>{if(e.success)return e;throw new Error(e.error)})}async getEventsOfLatestBlock(e={}){if(!this.tronWeb.eventServer)throw new Error(\"No event server configured\");const t={};return\"boolean\"==typeof e.only_confirmed&&(t.only_confirmed=e.only_confirmed),this.tronWeb.eventServer.request(`v1/blocks/latest/events?${new URLSearchParams(t).toString()}`).then(e=>{if(e.success)return e;throw new Error(e.error)})}}var qm=r(1048).hp;const Zm=\"4.7.1\";function Ym(e){return!(!e||\"object\"!=typeof e||!e.fullNode&&!e.fullHost)}class Jm extends Cm{providers;BigNumber;transactionBuilder;trx;plugin;event;version;static version=\"6.1.0\";utils;defaultBlock;defaultPrivateKey;defaultAddress;fullnodeVersion;feeLimit;fullNode;solidityNode;eventServer;constructor(e,t=\"\",r,n=\"\"){let o;super();let s=!1,i=!1;Ym(e)?(o=e.fullNode||e.fullHost,t=e.solidityNode||e.fullHost,r=e.eventServer||e.fullHost,s=e.headers||!1,i=e.eventHeaders||s,n=e.privateKey):o=e,hw.isString(o)&&(o=new Bm.HttpProvider(o)),hw.isString(t)&&(t=new Bm.HttpProvider(t)),hw.isString(r)&&(r=new Bm.HttpProvider(r)),this.event=new Km(this),this.transactionBuilder=new Dm(this),this.trx=new zm(this),this.plugin=new Gm(this,{disablePlugins:!!Ym(e)&&e.disablePlugins}),this.utils=hw,this.setFullNode(o),this.setSolidityNode(t),this.setEventServer(r),this.providers=Bm,this.BigNumber=oh,this.defaultBlock=!1,this.defaultPrivateKey=!1,this.defaultAddress={hex:!1,base58:!1},this.version=Jm.version,this.sha3=Jm.sha3,this.fromUtf8=Jm.fromUtf8,this.address=Jm.address,this.toAscii=Jm.toAscii,this.toUtf8=Jm.toUtf8,this.isAddress=Jm.isAddress,this.fromAscii=Jm.fromAscii,this.toHex=Jm.toHex,this.toBigNumber=Jm.toBigNumber,this.toDecimal=Jm.toDecimal,this.fromDecimal=Jm.fromDecimal,this.toSun=Jm.toSun,this.fromSun=Jm.fromSun,this.createAccount=Jm.createAccount,this.createRandom=Jm.createRandom,this.fromMnemonic=Jm.fromMnemonic,n&&this.setPrivateKey(n),this.fullnodeVersion=Zm,this.feeLimit=15e7,s&&this.setFullNodeHeader(s),i&&this.setEventHeader(i)}async getFullnodeVersion(){try{const e=await this.trx.getNodeInfo();this.fullnodeVersion=e.configNodeInfo.codeVersion,2===this.fullnodeVersion.split(\".\").length&&(this.fullnodeVersion+=\".0\")}catch(e){this.fullnodeVersion=Zm}}setDefaultBlock(e=!1){if([!1,\"latest\",\"earliest\",0].includes(e))return this.defaultBlock=e;if(!hw.isInteger(e)||!e)throw new Error(\"Invalid block ID provided\");return this.defaultBlock=Math.abs(e)}setPrivateKey(e){try{this.setAddress(Jm.address.fromPrivateKey(e))}catch{throw new Error(\"Invalid private key provided\")}this.defaultPrivateKey=e,this.emit(\"privateKeyChanged\",e)}setAddress(e){if(!Jm.isAddress(e))throw new Error(\"Invalid address provided\");const t=Jm.address.toHex(e),r=Jm.address.fromHex(e);this.defaultPrivateKey&&Jm.address.fromPrivateKey(this.defaultPrivateKey)!==r&&(this.defaultPrivateKey=!1),this.defaultAddress={hex:t,base58:r},this.emit(\"addressChanged\",{hex:t,base58:r})}fullnodeSatisfies(e){return xm.satisfies(this.fullnodeVersion,e)}isValidProvider(e){return Object.values(Bm).some(t=>e instanceof t)}setFullNode(e){if(fh(e)&&(e=new Bm.HttpProvider(e)),!this.isValidProvider(e))throw new Error(\"Invalid full node provided\");this.fullNode=e,this.fullNode.setStatusPage(\"wallet/getnowblock\")}setSolidityNode(e){if(hw.isString(e)&&(e=new Bm.HttpProvider(e)),!this.isValidProvider(e))throw new Error(\"Invalid solidity node provided\");this.solidityNode=e,this.solidityNode.setStatusPage(\"walletsolidity/getnowblock\")}setEventServer(e,t){this.event.setServer(e,t)}setHeader(e={}){const t=new Bm.HttpProvider(this.fullNode.host,3e4,\"\",\"\",e),r=new Bm.HttpProvider(this.solidityNode.host,3e4,\"\",\"\",e),n=new Bm.HttpProvider(this.eventServer.host,3e4,\"\",\"\",e);this.setFullNode(t),this.setSolidityNode(r),this.setEventServer(n)}setFullNodeHeader(e={}){const t=new Bm.HttpProvider(this.fullNode.host,3e4,\"\",\"\",e),r=new Bm.HttpProvider(this.solidityNode.host,3e4,\"\",\"\",e);this.setFullNode(t),this.setSolidityNode(r)}setEventHeader(e={}){const t=new Bm.HttpProvider(this.eventServer.host,3e4,\"\",\"\",e);this.setEventServer(t)}currentProviders(){return{fullNode:this.fullNode,solidityNode:this.solidityNode,eventServer:this.eventServer}}currentProvider(){return this.currentProviders()}getEventResult(...e){return this.event.getEventsByContractAddress(...e)}getEventByTransactionID(...e){return this.event.getEventsByTransactionID(...e)}contract(e=[],t){return new Hm(this,e,t)}address;static get address(){return{fromHex:e=>Eh(e),toHex:e=>Ph(e),toChecksumAddress:e=>Bh(e),isChecksumAddress:e=>Ch(e),fromPrivateKey:(e,t=!1)=>Ih(e,t)}}sha3;static sha3(e,t=!0){return(t?\"0x\":\"\")+gs(qm.from(e,\"utf-8\")).toString().substring(2)}toHex;static toHex(e){if(hw.isBoolean(e))return Jm.fromDecimal(+e);if(hw.isBigNumber(e))return Jm.fromDecimal(e);if(\"object\"==typeof e)return Jm.fromUtf8(JSON.stringify(e));if(hw.isString(e)){if(/^(-|)0x/.test(e))return e;if(!isFinite(e)||/^\\s*$/.test(e))return Jm.fromUtf8(e)}const t=Jm.fromDecimal(e);if(\"0xNaN\"===t)throw new Error(\"The passed value is not convertible to a hex string\");return t}toUtf8;static toUtf8(e){if(hw.isHex(e))return e=e.replace(/^0x/,\"\"),qm.from(e,\"hex\").toString(\"utf8\");throw new Error(\"The passed value is not a valid hex string\")}fromUtf8;static fromUtf8(e){if(!hw.isString(e))throw new Error(\"The passed value is not a valid utf-8 string\");return\"0x\"+qm.from(e,\"utf8\").toString(\"hex\")}toAscii;static toAscii(e){if(hw.isHex(e)){let t=\"\",r=0;const n=e.length;for(\"0x\"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t}throw new Error(\"The passed value is not a valid hex string\")}fromAscii;static fromAscii(e,t){if(!hw.isString(e))throw new Error(\"The passed value is not a valid utf-8 string\");return\"0x\"+qm.from(e,\"ascii\").toString(\"hex\").padEnd(t,\"0\")}toDecimal;static toDecimal(e){return Jm.toBigNumber(e).toNumber()}fromDecimal;static fromDecimal(e){const t=Jm.toBigNumber(e),r=t.toString(16);return t.isLessThan(0)?\"-0x\"+r.substr(1):\"0x\"+r}fromSun;static fromSun(e){const t=Jm.toBigNumber(e).div(1e6);return hw.isBigNumber(e)?t:t.toString(10)}toSun;static toSun(e){const t=Jm.toBigNumber(e).times(1e6);return hw.isBigNumber(e)?t:t.toString(10)}toBigNumber;static toBigNumber(e=0){return hw.isBigNumber(e)?e:hw.isString(e)&&/^(-|)0x/.test(e)?new oh(e.replace(\"0x\",\"\"),16):new oh(e.toString(10),10)}isAddress;static isAddress(e=\"\"){return Sh(e)}createAccount;static async createAccount(){return hw.accounts.generateAccount()}createRandom;static createRandom(...e){return hw.accounts.generateRandom(...e)}fromMnemonic;static fromMnemonic(...e){return hw.accounts.generateAccountWithMnemonic(...e)}async isConnected(){return{fullNode:await this.fullNode.isConnected(),solidityNode:await this.solidityNode.isConnected(),eventServer:this.eventServer&&await this.eventServer.isConnected()}}}const Xm=Jm;var Qm=r(1048).hp;const{Transaction:eb,Permission:tb,Key:rb}=globalThis.TronWebProto,{TransferContract:nb,FreezeBalanceContract:ob,UnfreezeBalanceContract:sb,WithdrawBalanceContract:ib,FreezeBalanceV2Contract:ab,UnfreezeBalanceV2Contract:cb,CancelAllUnfreezeV2Contract:ub,WithdrawExpireUnfreezeContract:lb,DelegateResourceContract:db,UnDelegateResourceContract:fb}=globalThis.TronWebProto,{TransferAssetContract:pb,ParticipateAssetIssueContract:hb,AssetIssueContract:gb,UpdateAssetContract:yb}=globalThis.TronWebProto,{TriggerSmartContract:mb,ClearABIContract:bb,UpdateEnergyLimitContract:wb,UpdateSettingContract:vb,CreateSmartContract:Tb,SmartContract:Ab}=globalThis.TronWebProto,{ResourceCode:Eb}=globalThis.TronWebProto,{WitnessCreateContract:Pb,VoteWitnessContract:Bb}=globalThis.TronWebProto,{UpdateBrokerageContract:Cb}=globalThis.TronWebProto,{AccountCreateContract:Ib,AccountUpdateContract:Sb,SetAccountIdContract:Wb,AccountPermissionUpdateContract:xb}=globalThis.TronWebProto,{ProposalCreateContract:_b,ProposalDeleteContract:Rb,ProposalApproveContract:kb}=globalThis.TronWebProto,{ExchangeCreateContract:Ob,ExchangeInjectContract:Fb,ExchangeWithdrawContract:Mb,ExchangeTransactionContract:Nb}=globalThis.TronWebProto,Ub=e=>e&&0!==e.length?new Uint8Array(Xm.address.toHex(e).match(/.{1,2}/g).map(e=>parseInt(e,16))):new Uint8Array([]),Db=e=>e&&0!==e.length?new Uint8Array((hh(e)?e:Xm.toHex(e)).replace(/^0x/,\"\").match(/.{1,2}/g).map(e=>parseInt(e,16))):new Uint8Array([]),Lb=(e,t)=>Db(t?Xm.fromUtf8(e).replace(/^0x/,\"\"):e.replace(/^0x/,\"\")),$b=(e,t,r,n)=>{const o=new ng.Any;o.pack(e.serializeBinary(),\"protocol.\"+r);const s=new eb.Contract;s.setType(t),s.setParameter(o),n&&s.setPermissionId(n);const i=new eb.raw;i.addContract(s);const a=new eb;return a.setRawData(i),a},zb=(e,t)=>{const r=new mb,{owner_address:n,contract_address:o,parameter:s=\"\",function_selector:i,call_value:a,call_token_value:c,token_id:u,data:l}=e;if(r.setOwnerAddress(Ub(n)),r.setContractAddress(Ub(o)),r.setCallValue(a),l)r.setData(Db(l));else if(i){const e=((e,t=!0)=>(t?\"0x\":\"\")+gs(Qm.from(e,\"utf-8\")).toString().substring(2))(i).substring(2,10)+s;r.setData(Db(e))}return u&&r.setTokenId(u),c&&r.setCallTokenValue(c),$b(r,eb.Contract.ContractType.TRIGGERSMARTCONTRACT,\"TriggerSmartContract\",t.Permission_id)},jb=(e,t)=>{const r=new xb,{owner_address:n,owner:o,witness:s,actives:i}=e;r.setOwnerAddress(Ub(n));const a=e=>{const t=new tb,{type:r,id:n,permission_name:o,threshold:s,parentId:i,operations:a,keys:c}=e;return t.setType((e=>isNaN(e)?\"Active\"===e?2:\"Witness\"===e?1:0:e)(r)),t.setId(n),t.setPermissionName(o),t.setThreshold(s),i&&t.setParentId(i),a&&t.setOperations(Db(a)),c&&t.setKeysList(c.map(e=>{const t=new rb;return t.setAddress(Ub(e.address)),t.setWeight(e.weight),t})),t};return o&&r.setOwner(a(o)),s&&r.setWitness(a(s)),i&&(Array.isArray(i)?r.setActivesList(i.map(e=>a(e))):r.setActivesList([a(i)])),$b(r,eb.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT,\"AccountPermissionUpdateContract\",t.Permission_id)},Vb=(e,t,r)=>{switch(e.type){case\"TransferContract\":return((e,t)=>{const{to_address:r,owner_address:n,amount:o}=e,s=new nb;return s.setToAddress(Ub(r)),s.setOwnerAddress(Ub(n)),s.setAmount(o),$b(s,eb.Contract.ContractType.TRANSFERCONTRACT,\"TransferContract\",t.Permission_id)})(t,r);case\"TransferAssetContract\":return((e,t)=>{const{to_address:r,owner_address:n,amount:o,asset_name:s}=e,i=new pb;return i.setToAddress(Ub(r)),i.setOwnerAddress(Ub(n)),i.setAssetName(Lb(s,t.visible)),i.setAmount(o),$b(i,eb.Contract.ContractType.TRANSFERASSETCONTRACT,\"TransferAssetContract\",t.Permission_id)})(t,r);case\"ParticipateAssetIssueContract\":return((e,t)=>{const r=new hb;return r.setToAddress(Ub(e.to_address)),r.setOwnerAddress(Ub(e.owner_address)),r.setAssetName(Lb(e.asset_name,t.visible)),r.setAmount(e.amount),$b(r,eb.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT,\"ParticipateAssetIssueContract\",t.Permission_id)})(t,r);case\"TriggerSmartContract\":return zb(t,r);case\"FreezeBalanceContract\":return((e,t)=>{const r=new ob,{owner_address:n,frozen_balance:o,frozen_duration:s,resource:i,receiver_address:a}=e;return r.setOwnerAddress(Ub(n)),r.setFrozenBalance(o),r.setFrozenDuration(s),i&&r.setResource(Eb[i]),a&&r.setReceiverAddress(Ub(a)),$b(r,eb.Contract.ContractType.FREEZEBALANCECONTRACT,\"FreezeBalanceContract\",t.Permission_id)})(t,r);case\"UnfreezeBalanceContract\":return((e,t)=>{const r=new sb,{owner_address:n,resource:o,receiver_address:s}=e;return r.setOwnerAddress(Ub(n)),o&&r.setResource(Eb[o]),s&&r.setReceiverAddress(Ub(s)),$b(r,eb.Contract.ContractType.UNFREEZEBALANCECONTRACT,\"UnfreezeBalanceContract\",t.Permission_id)})(t,r);case\"WithdrawBalanceContract\":return((e,t)=>{const r=new ib,{owner_address:n}=e;return r.setOwnerAddress(Ub(n)),$b(r,eb.Contract.ContractType.WITHDRAWBALANCECONTRACT,\"WithdrawBalanceContract\",t.Permission_id)})(t,r);case\"FreezeBalanceV2Contract\":return((e,t)=>{const r=new ab,{owner_address:n,frozen_balance:o,resource:s}=e;return r.setOwnerAddress(Ub(n)),r.setFrozenBalance(o),r.setResource(Eb[s]),$b(r,eb.Contract.ContractType.FREEZEBALANCEV2CONTRACT,\"FreezeBalanceV2Contract\",t.Permission_id)})(t,r);case\"CancelAllUnfreezeV2Contract\":return((e,t)=>{const r=new ub,{owner_address:n}=e;return r.setOwnerAddress(Ub(n)),$b(r,eb.Contract.ContractType.CANCELALLUNFREEZEV2CONTRACT,\"CancelAllUnfreezeV2Contract\",t.Permission_id)})(t,r);case\"UnfreezeBalanceV2Contract\":return((e,t)=>{const r=new cb,{owner_address:n,unfreeze_balance:o,resource:s}=e;return r.setOwnerAddress(Ub(n)),r.setUnfreezeBalance(o),r.setResource(Eb[s]),$b(r,eb.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT,\"UnfreezeBalanceV2Contract\",t.Permission_id)})(t,r);case\"DelegateResourceContract\":return((e,t)=>{const r=new db,{owner_address:n,receiver_address:o,balance:s,resource:i,lock:a=!1,lock_period:c}=e;return r.setOwnerAddress(Ub(n)),r.setBalance(s),r.setResource(Eb[i]),r.setLock(a),r.setLockPeriod(c),r.setReceiverAddress(Ub(o)),$b(r,eb.Contract.ContractType.DELEGATERESOURCECONTRACT,\"DelegateResourceContract\",t.Permission_id)})(t,r);case\"UnDelegateResourceContract\":return((e,t)=>{const r=new fb,{owner_address:n,receiver_address:o,balance:s,resource:i}=e;return r.setOwnerAddress(Ub(n)),r.setBalance(s),r.setResource(Eb[i]),r.setReceiverAddress(Ub(o)),$b(r,eb.Contract.ContractType.UNDELEGATERESOURCECONTRACT,\"UnDelegateResourceContract\",t.Permission_id)})(t,r);case\"WithdrawExpireUnfreezeContract\":return((e,t)=>{const r=new lb,{owner_address:n}=e;return r.setOwnerAddress(Ub(n)),$b(r,eb.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT,\"WithdrawExpireUnfreezeContract\",t.Permission_id)})(t,r);case\"WitnessCreateContract\":return((e,t)=>{const r=new Pb,{owner_address:n,url:o}=e;return r.setOwnerAddress(Ub(n)),r.setUrl(Db(o.replace(/^0x/,\"\"))),$b(r,eb.Contract.ContractType.WITNESSCREATECONTRACT,\"WitnessCreateContract\",t.Permission_id)})(t,r);case\"VoteWitnessContract\":return((e,t)=>{const r=new Bb,{owner_address:n,votes:o}=e;return r.setOwnerAddress(Ub(n)),o.forEach(e=>{const t=new Bb.Vote,{vote_address:n,vote_count:o}=e;t.setVoteAddress(Ub(n));const s=parseInt(o);t.setVoteCount(s),r.addVotes(t)}),$b(r,eb.Contract.ContractType.VOTEWITNESSCONTRACT,\"VoteWitnessContract\",t.Permission_id)})(t,r);case\"CreateSmartContract\":return((e,t)=>{const r=e?.new_contract?{owner_address:e.owner_address,call_token_value:e.call_token_value,token_id:e.token_id,...e.new_contract}:e,{owner_address:n,consume_user_resource_percent:o,origin_energy_limit:s,abi:i,bytecode:a=\"\",parameter:c=\"\",call_value:u,call_token_value:l,token_id:d,name:f}=r;let{origin_address:p}=r;const h=new Tb;h.setOwnerAddress(Ub(n)),d&&h.setTokenId(d),l&&h.setCallTokenValue(l);const g=new Ab;if(i){let e;e=\"string\"==typeof i?JSON.parse(i):i?.entrys||[];const t=new Ab.ABI,r=e=>{const t=new Ab.ABI.Entry.Param,{indexed:r,name:n,type:o}=e;return!0===r&&t.setIndexed(!0),t.setName(n),t.setType(o),t},n=e.map(e=>{const{anonymous:t,constant:n,name:o,inputs:s,outputs:i,type:a,payable:c,stateMutability:u}=e,l=new Ab.ABI.Entry;return l.setAnonymous(t),l.setConstant(n),l.setName(o),s&&l.setInputsList(s.map(e=>r(e))),i&&l.setOutputsList(i.map(e=>r(e))),a&&l.setType(Ab.ABI.Entry.EntryType[a.toUpperCase()]),l.setPayable(c),u&&l.setStatemutability(Ab.ABI.Entry.StateMutabilityType[u.toUpperCase()]),l});t.setEntrysList(n),g.setAbi(t)}if(u&&g.setCallValue(u),g.setConsumeUserResourcePercent(o),g.setOriginEnergyLimit(s),p||(p=n),g.setOriginAddress(Ub(p)),a){const e=a.replace(/^0x/,\"\")+c.replace(/^0x/,\"\");g.setBytecode(Db(e))}return g.setName(f),h.setNewContract(g),$b(h,eb.Contract.ContractType.CREATESMARTCONTRACT,\"CreateSmartContract\",t.Permission_id)})(t,r);case\"ClearABIContract\":return((e,t)=>{const{contract_address:r,owner_address:n}=e,o=new bb;return o.setOwnerAddress(Ub(n)),o.setContractAddress(Ub(r)),$b(o,eb.Contract.ContractType.CLEARABICONTRACT,\"ClearABIContract\",t.Permission_id)})(t,r);case\"UpdateBrokerageContract\":return((e,t)=>{const{brokerage:r,owner_address:n}=e,o=new Cb;return o.setOwnerAddress(Ub(n)),o.setBrokerage(r),$b(o,eb.Contract.ContractType.UPDATEBROKERAGECONTRACT,\"UpdateBrokerageContract\",t.Permission_id)})(t,r);case\"AssetIssueContract\":return((e,t)=>{const{owner_address:r,name:n,abbr:o,description:s,url:i,total_supply:a,trx_num:c,num:u,start_time:l,end_time:d,precision:f,free_asset_net_limit:p,public_free_asset_net_limit:h,public_free_asset_net_usage:g=0,public_latest_free_net_time:y=0,vote_score:m=0,frozen_supply:b}=e,w=new gb;if(w.setOwnerAddress(Ub(r)),n&&w.setName(Db(n.replace(/^0x/,\"\"))),o&&w.setAbbr(Db(o.replace(/^0x/,\"\"))),w.setTotalSupply(a),w.setNum(u),w.setEndTime(d),w.setStartTime(l),w.setTrxNum(c),w.setVoteScore(m),f&&w.setPrecision(f),y&&w.setPublicLatestFreeNetTime(y),s&&w.setDescription(Db(s.replace(/^0x/,\"\"))),i&&w.setUrl(Db(i.replace(/^0x/,\"\"))),w.setPublicFreeAssetNetUsage(g),w.setFreeAssetNetLimit(p),w.setPublicFreeAssetNetLimit(h),b){const e=new gb.FrozenSupply;e.setFrozenAmount(b.length?b[0].frozen_amount:b.frozen_amount),e.setFrozenDays(b.length?b[0].frozen_days:b.frozen_days),w.addFrozenSupply(e)}return $b(w,eb.Contract.ContractType.ASSETISSUECONTRACT,\"AssetIssueContract\",t.Permission_id)})(t,r);case\"AccountCreateContract\":return((e,t)=>{const r=new Ib,{account_address:n,owner_address:o}=e;return r.setOwnerAddress(Ub(o)),r.setAccountAddress(Ub(n.replace(/^0x/,\"\"))),$b(r,eb.Contract.ContractType.ACCOUNTCREATECONTRACT,\"AccountCreateContract\",t.Permission_id)})(t,r);case\"AccountUpdateContract\":return((e,t)=>{const r=new Sb,{account_name:n,owner_address:o}=e;return r.setOwnerAddress(Ub(o)),r.setAccountName(Db(n.replace(/^0x/,\"\"))),$b(r,eb.Contract.ContractType.ACCOUNTUPDATECONTRACT,\"AccountUpdateContract\",t.Permission_id)})(t,r);case\"SetAccountIdContract\":return((e,t)=>{const r=new Wb,{account_id:n,owner_address:o}=e;return r.setOwnerAddress(Ub(o)),r.setAccountId(Db(n.replace(/^0x/,\"\"))),$b(r,eb.Contract.ContractType.SETACCOUNTIDCONTRACT,\"SetAccountIdContract\",t.Permission_id)})(t,r);case\"ProposalCreateContract\":return((e,t)=>{const r=new _b,{owner_address:n,parameters:o}=e;return r.setOwnerAddress(Ub(n)),o.forEach(e=>{r.getParametersMap().set(e.key,e.value)}),$b(r,eb.Contract.ContractType.PROPOSALCREATECONTRACT,\"ProposalCreateContract\",t.Permission_id)})(t,r);case\"ProposalDeleteContract\":return((e,t)=>{const r=new Rb,{owner_address:n,proposal_id:o}=e;return r.setOwnerAddress(Ub(n)),r.setProposalId(o),$b(r,eb.Contract.ContractType.PROPOSALDELETECONTRACT,\"ProposalDeleteContract\",t.Permission_id)})(t,r);case\"ProposalApproveContract\":return((e,t)=>{const r=new kb,{owner_address:n,proposal_id:o,is_add_approval:s}=e;return r.setOwnerAddress(Ub(n)),r.setProposalId(o),r.setIsAddApproval(s),$b(r,eb.Contract.ContractType.PROPOSALAPPROVECONTRACT,\"ProposalApproveContract\",t.Permission_id)})(t,r);case\"ExchangeCreateContract\":return((e,t)=>{const r=new Ob,{owner_address:n,first_token_id:o,first_token_balance:s,second_token_id:i,second_token_balance:a}=e;return r.setOwnerAddress(Ub(n)),r.setFirstTokenId(Lb(o,t.visible)),r.setFirstTokenBalance(s),r.setSecondTokenId(Lb(i,t.visible)),r.setSecondTokenBalance(a),$b(r,eb.Contract.ContractType.EXCHANGECREATECONTRACT,\"ExchangeCreateContract\",t.Permission_id)})(t,r);case\"ExchangeInjectContract\":return((e,t)=>{const r=new Fb,{owner_address:n,exchange_id:o,token_id:s,quant:i}=e;return r.setOwnerAddress(Ub(n)),r.setExchangeId(o),r.setTokenId(Lb(s,t.visible)),r.setQuant(i),$b(r,eb.Contract.ContractType.EXCHANGEINJECTCONTRACT,\"ExchangeInjectContract\",t.Permission_id)})(t,r);case\"ExchangeWithdrawContract\":return((e,t)=>{const r=new Mb,{owner_address:n,exchange_id:o,token_id:s,quant:i}=e;return r.setOwnerAddress(Ub(n)),r.setExchangeId(o),r.setTokenId(Lb(s,t.visible)),r.setQuant(i),$b(r,eb.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT,\"ExchangeWithdrawContract\",t.Permission_id)})(t,r);case\"ExchangeTransactionContract\":return((e,t)=>{const r=new Nb,{owner_address:n,exchange_id:o,token_id:s,quant:i,expected:a}=e;return r.setOwnerAddress(Ub(n)),r.setExchangeId(o),r.setTokenId(Lb(s,t.visible)),r.setQuant(i),r.setExpected(a),$b(r,eb.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT,\"ExchangeTransactionContract\",t.Permission_id)})(t,r);case\"UpdateSettingContract\":return((e,t)=>{const r=new vb,{owner_address:n,contract_address:o,consume_user_resource_percent:s}=e;return r.setOwnerAddress(Ub(n)),r.setContractAddress(Ub(o)),r.setConsumeUserResourcePercent(s),$b(r,eb.Contract.ContractType.UPDATESETTINGCONTRACT,\"UpdateSettingContract\",t.Permission_id)})(t,r);case\"UpdateEnergyLimitContract\":return((e,t)=>{const r=new wb,{owner_address:n,contract_address:o,origin_energy_limit:s}=e;return r.setOwnerAddress(Ub(n)),r.setContractAddress(Ub(o)),r.setOriginEnergyLimit(s),$b(r,eb.Contract.ContractType.UPDATEENERGYLIMITCONTRACT,\"UpdateEnergyLimitContract\",t.Permission_id)})(t,r);case\"AccountPermissionUpdateContract\":return jb(t,r);case\"UpdateAssetContract\":return((e,t)=>{const r=new yb,{owner_address:n,description:o,url:s,new_limit:i,new_public_limit:a}=e;return r.setOwnerAddress(Ub(n)),o&&r.setDescription(Db(o.replace(/^0x/,\"\"))),s&&r.setUrl(Db(s.replace(/^0x/,\"\"))),i&&r.setNewLimit(i),a&&r.setNewPublicLimit(a),$b(r,eb.Contract.ContractType.UPDATEASSETCONTRACT,\"UpdateAssetContract\",t.Permission_id)})(t,r)}},Hb=e=>{const t=e.raw_data,r=t.contract[0],n=r.parameter.value,o={Permission_id:r.Permission_id,visible:e.visible},s=Vb(r,n,o),i=s.getRawData();return i.setRefBlockBytes(Db(t.ref_block_bytes)),i.setRefBlockHash(Db(t.ref_block_hash)),t.data&&i.setData(Db(t.data)),t.fee_limit&&i.setFeeLimit(t.fee_limit),t.expiration&&i.setExpiration(t.expiration),t.timestamp&&i.setTimestamp(t.timestamp),s.setRawData(i),s},Gb=(e,t={},r={})=>{const n=e.raw_data,o=n.contract[0],s=Vb(o,t,{Permission_id:t?.Permission_id}),i=s.getRawData();return i.setRefBlockBytes(Db(n.ref_block_bytes)),i.setRefBlockHash(Db(n.ref_block_hash)),r.data&&i.setData(Db(r.data.replace(/^0x/,\"\"))),(r.fee_limit||t.fee_limit)&&i.setFeeLimit(r.fee_limit||t.fee_limit),n.expiration&&i.setExpiration(n.expiration),n.timestamp&&i.setTimestamp(n.timestamp),s.setRawData(i),s},Kb=(e,t)=>{const r=t.getRawData().serializeBinary(),n=wr(r),o=Do(r);return n.toLowerCase()===e.raw_data_hex.toLowerCase()&&o.replace(/^0x/,\"\").toLowerCase()===e.txID.replace(/^0x/,\"\").toLowerCase()},qb=e=>wr(e.getRawData().serializeBinary()),Zb=e=>{const t=Hb(e);return Kb(e,t)},Yb=(e,t,r)=>{const n=Gb(e,t,r);return Kb(e,n)},Jb=e=>Do(e.getRawData().serializeBinary()),{Transaction:Xb}=globalThis.TronWebProto,{TransferContract:Qb,WithdrawBalanceContract:ew,WitnessCreateContract:tw,FreezeBalanceV2Contract:rw,UnfreezeBalanceV2Contract:nw,CancelAllUnfreezeV2Contract:ow,WithdrawExpireUnfreezeContract:sw,DelegateResourceContract:iw,UnDelegateResourceContract:aw}=globalThis.TronWebProto,{TriggerSmartContract:cw}=globalThis.TronWebProto,uw={0:\"AccountCreateContract\",1:\"TransferContract\",2:\"TransferAssetContract\",4:\"VoteWitnessContract\",5:\"WitnessCreateContract\",6:\"AssetIssueContract\",9:\"ParticipateAssetIssueContract\",10:\"AccountUpdateContract\",11:\"FreezeBalanceContract\",12:\"UnfreezeBalanceContract\",13:\"WithdrawBalanceContract\",15:\"UpdateAssetContract\",16:\"ProposalCreateContract\",17:\"ProposalApproveContract\",18:\"ProposalDeleteContract\",19:\"SetAccountIdContract\",30:\"CreateSmartContract\",31:\"TriggerSmartContract\",33:\"UpdateSettingContract\",41:\"ExchangeCreateContract\",42:\"ExchangeInjectContract\",43:\"ExchangeWithdrawContract\",44:\"ExchangeTransactionContract\",45:\"UpdateEnergyLimitContract\",46:\"AccountPermissionUpdateContract\",48:\"ClearABIContract\",49:\"UpdateBrokerageContract\",54:\"FreezeBalanceV2Contract\",55:\"UnfreezeBalanceV2Contract\",56:\"WithdrawExpireUnfreezeContract\",57:\"DelegateResourceContract\",58:\"UnDelegateResourceContract\",59:\"CancelAllUnfreezeV2Contract\"},lw=e=>e.getAuthsList().map(e=>{const t=wr(e.getPermissionName_asU8()),r=e.getAccount();return{permission_name:t,account:{name:wr(r.getName_asU8()),address:wr(r.getAddress_asU8())}}}),dw=(e,t)=>{const r=Xb.raw.deserializeBinary(kr(t)),n=r.getContractList()[0],o=n.getParameter().getValue(),s=uw[n.getType()];if(e!==s)throw new Error(`type ${e} dismatches with rawDataHex type ${s}`);return[{contract:[{parameter:{value:{},type_url:n.getParameter().getTypeUrl()},type:e,Permission_id:n.getPermissionId()}],data:wr(r.getData()),fee_limit:r.getFeeLimit(),ref_block_bytes:wr(r.getRefBlockBytes_asU8()),ref_block_hash:wr(r.getRefBlockHash_asU8()),expiration:r.getExpiration(),timestamp:r.getTimestamp(),scripts:wr(r.getScripts_asU8()),auths:lw(r)},o]},fw=e=>{switch(e){case 0:default:return\"BANDWIDTH\";case 1:return\"ENERGY\"}},pw=(e,t)=>{if(!t)throw new Error(\"rawDataHex cannot be empty\");if(!hh(t))throw new Error(\"rawDataHex is not a valid hex string\");switch(e){case\"TriggerSmartContract\":return((e,t)=>{const[r,n]=dw(e,t),o=cw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),contract_address:wr(o.getContractAddress_asU8()),call_value:o.getCallValue(),data:wr(o.getData_asU8()),call_token_value:o.getCallTokenValue(),token_id:o.getTokenId()},r})(e,t);case\"FreezeBalanceV2Contract\":return((e,t)=>{const[r,n]=dw(e,t),o=rw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),frozen_balance:o.getFrozenBalance(),resource:fw(o.getResource())},r})(e,t);case\"UnfreezeBalanceV2Contract\":return((e,t)=>{const[r,n]=dw(e,t),o=nw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),unfreeze_balance:o.getUnfreezeBalance(),resource:fw(o.getResource())},r})(e,t);case\"CancelAllUnfreezeV2Contract\":return((e,t)=>{const[r,n]=dw(e,t),o=ow.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8())},r})(e,t);case\"DelegateResourceContract\":return((e,t)=>{const[r,n]=dw(e,t),o=iw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),balance:o.getBalance(),lock:o.getLock(),lock_period:o.getLockPeriod(),receiver_address:wr(o.getReceiverAddress_asU8()),resource:fw(o.getResource())},r})(e,t);case\"UnDelegateResourceContract\":return((e,t)=>{const[r,n]=dw(e,t),o=aw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),balance:o.getBalance(),receiver_address:wr(o.getReceiverAddress_asU8()),resource:fw(o.getResource())},r})(e,t);case\"WithdrawExpireUnfreezeContract\":return((e,t)=>{const[r,n]=dw(e,t),o=sw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8())},r})(e,t);case\"TransferContract\":return((e,t)=>{const[r,n]=dw(e,t),o=Qb.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),to_address:wr(o.getToAddress_asU8()),amount:o.getAmount()},r})(e,t);case\"WithdrawBalanceContract\":return((e,t)=>{const[r,n]=dw(e,t),o=ew.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8())},r})(e,t);case\"WitnessCreateContract\":return((e,t)=>{const[r,n]=dw(e,t),o=tw.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:wr(o.getOwnerAddress_asU8()),url:String.fromCharCode(...o.getUrl_asU8())},r})(e,t);default:throw new Error(`trasaction ${e} not supported`)}},hw={...d,constants:t,address:f,code:o,accounts:l,base58:s,bytes:e,crypto:u,abi:p,message:h,_TypedDataEncoder:eg,typedData:g,transaction:m,ethersUtils:a,deserializeTx:b};var gw,yw,mw,bw;!function(e){e[e.BANDWIDTH=0]=\"BANDWIDTH\",e[e.ENERGY=1]=\"ENERGY\",e[e.TRON_POWER=2]=\"TRON_POWER\"}(gw||(gw={})),function(e){e.ENOUGH_PERMISSION=\"ENOUGH_PERMISSION\",e.NOT_ENOUGH_PERMISSION=\"NOT_ENOUGH_PERMISSION\",e.SIGNATURE_FORMAT_ERROR=\"SIGNATURE_FORMAT_ERROR\",e.COMPUTE_ADDRESS_ERROR=\"COMPUTE_ADDRESS_ERROR\",e.PERMISSION_ERROR=\"PERMISSION_ERROR\",e.OTHER_ERROR=\"OTHER_ERROR\"}(yw||(yw={})),function(e){e[e.SUCCESS=0]=\"SUCCESS\",e[e.SIGERROR=1]=\"SIGERROR\",e[e.CONTRACT_VALIDATE_ERROR=2]=\"CONTRACT_VALIDATE_ERROR\",e[e.CONTRACT_EXE_ERROR=3]=\"CONTRACT_EXE_ERROR\",e[e.BANDWITH_ERROR=4]=\"BANDWITH_ERROR\",e[e.DUP_TRANSACTION_ERROR=5]=\"DUP_TRANSACTION_ERROR\",e[e.TAPOS_ERROR=6]=\"TAPOS_ERROR\",e[e.TOO_BIG_TRANSACTION_ERROR=7]=\"TOO_BIG_TRANSACTION_ERROR\",e[e.TRANSACTION_EXPIRATION_ERROR=8]=\"TRANSACTION_EXPIRATION_ERROR\",e[e.SERVER_BUSY=9]=\"SERVER_BUSY\",e[e.NO_CONNECTION=10]=\"NO_CONNECTION\",e[e.NOT_ENOUGH_EFFECTIVE_CONNECTION=11]=\"NOT_ENOUGH_EFFECTIVE_CONNECTION\",e[e.OTHER_ERROR=20]=\"OTHER_ERROR\"}(mw||(mw={})),function(e){e[e.PENDING=0]=\"PENDING\",e[e.DISAPPROVED=1]=\"DISAPPROVED\",e[e.APPROVED=2]=\"APPROVED\",e[e.CANCELED=3]=\"CANCELED\"}(bw||(bw={}));function ww(e){return Boolean(e)&&\"object\"==typeof e&&!Array.isArray(e)}const vw=(e,t)=>Object.hasOwnProperty.call(e,t);var Tw;!function(e){e[e.Null=4]=\"Null\",e[e.Comma=1]=\"Comma\",e[e.Wrapper=1]=\"Wrapper\",e[e.True=4]=\"True\",e[e.False=5]=\"False\",e[e.Quote=1]=\"Quote\",e[e.Colon=1]=\"Colon\",e[e.Date=24]=\"Date\"}(Tw=Tw||(Tw={}));function Aw(e){if(\"object\"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}var Ew=r(282);const Pw=e=>be(e);function Bw({path:e,branch:t}){const r=e[e.length-1];return vw(t[t.length-2],r)}function Cw(e){return new j({...e,type:`optional ${e.type}`,validator:(t,r)=>!Bw(r)||e.validator(t,r),refiner:(t,r)=>!Bw(r)||e.refiner(t,r)})}function Iw(e){if(null===e||\"boolean\"==typeof e||\"string\"==typeof e)return!0;if(\"number\"==typeof e&&Number.isFinite(e))return!0;if(\"object\"==typeof e){let t=!0;if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(!Iw(e[r])){t=!1;break}return t}const r=Object.entries(e);for(let e=0;e<r.length;e++)if(\"string\"!=typeof r[e][0]||!Iw(r[e][1])){t=!1;break}return t}return!1}const Sw=ae(\"JSON\",e=>Iw(e)),Ww=ct(Sw,ee(ue(),\"JSON\",e=>q(e,Sw)),e=>JSON.parse(JSON.stringify(e,(e,t)=>{if(\"__proto__\"!==e&&\"constructor\"!==e)return t})));function xw(e){try{return function(e){K(e,Ww)}(e),!0}catch{return!1}}const _w=he(\"2.0\"),Rw=ye(Be([me(),Ae()])),kw=Pw({code:pe(),message:Ae(),data:Cw(Ww),stack:Cw(Ae())}),Ow=Be([Te(Ae(),Ww),le(Ww)]);Pw({id:Rw,jsonrpc:_w,method:Ae(),params:Cw(Ow)}),Pw({jsonrpc:_w,method:Ae(),params:Cw(Ow)});be({id:Rw,jsonrpc:_w,result:we(Ce()),error:we(kw)});const Fw=Pw({id:Rw,jsonrpc:_w,result:Ww}),Mw=Pw({id:Rw,jsonrpc:_w,error:kw});Be([Fw,Mw]);function Nw(e){return q(e,kw)}const Uw={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},Dw={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},Lw={\"-32700\":{standard:\"JSON RPC 2.0\",message:\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"},\"-32600\":{standard:\"JSON RPC 2.0\",message:\"The JSON sent is not a valid Request object.\"},\"-32601\":{standard:\"JSON RPC 2.0\",message:\"The method does not exist / is not available.\"},\"-32602\":{standard:\"JSON RPC 2.0\",message:\"Invalid method parameter(s).\"},\"-32603\":{standard:\"JSON RPC 2.0\",message:\"Internal JSON-RPC error.\"},\"-32000\":{standard:\"EIP-1474\",message:\"Invalid input.\"},\"-32001\":{standard:\"EIP-1474\",message:\"Resource not found.\"},\"-32002\":{standard:\"EIP-1474\",message:\"Resource unavailable.\"},\"-32003\":{standard:\"EIP-1474\",message:\"Transaction rejected.\"},\"-32004\":{standard:\"EIP-1474\",message:\"Method not supported.\"},\"-32005\":{standard:\"EIP-1474\",message:\"Request limit exceeded.\"},4001:{standard:\"EIP-1193\",message:\"User rejected the request.\"},4100:{standard:\"EIP-1193\",message:\"The requested account and/or method has not been authorized by the user.\"},4200:{standard:\"EIP-1193\",message:\"The requested method is not supported by this Ethereum provider.\"},4900:{standard:\"EIP-1193\",message:\"The provider is disconnected from all chains.\"},4901:{standard:\"EIP-1193\",message:\"The provider is disconnected from the specified chain.\"}};const $w=Uw.internal,zw=(jw($w),\"Unspecified server error.\");function jw(e,t=\"Unspecified error message. This is a bug, please report it.\"){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(vw(Lw,t))return Lw[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return zw}return t}function Vw(e){return Array.isArray(e)?e.map(e=>xw(e)?e:ww(e)?Hw(e):null):ww(e)?Hw(e):xw(e)?e:null}function Hw(e){return Object.getOwnPropertyNames(e).reduce((t,r)=>{const n=e[r];return xw(n)&&(t[r]=n),t},{})}const Gw=function(e){return e?.__esModule?e.default:e}(Ew);class Kw extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('\"code\" must be an integer.');if(!t||\"string\"!=typeof t)throw new Error('\"message\" must be a non-empty string.');!function(e){return ww(e)&&vw(e,\"cause\")&&ww(e.cause)}(r)?super(t):(super(t,{cause:r.cause}),vw(this,\"cause\")||Object.assign(this,{cause:r.cause})),void 0!==r&&(this.data=r),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,Aw(this.data)&&(e.data.cause=Vw(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return Gw(this.serialize(),Zw,2)}}class qw extends Kw{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}function Zw(e,t){if(\"[Circular]\"!==t)return t}const Yw=e=>fv(Uw.parse,e),Jw=e=>fv(Uw.invalidRequest,e),Xw=e=>fv(Uw.invalidParams,e),Qw=e=>fv(Uw.methodNotFound,e),ev=e=>fv(Uw.internal,e),tv=e=>fv(Uw.invalidInput,e),rv=e=>fv(Uw.resourceNotFound,e),nv=e=>fv(Uw.resourceUnavailable,e),ov=e=>fv(Uw.transactionRejected,e),sv=e=>fv(Uw.methodNotSupported,e),iv=e=>fv(Uw.limitExceeded,e),av=e=>pv(Dw.userRejectedRequest,e),cv=e=>pv(Dw.unauthorized,e),uv=e=>pv(Dw.unsupportedMethod,e),lv=e=>pv(Dw.disconnected,e),dv=e=>pv(Dw.chainDisconnected,e);function fv(e,t){const[r,n]=hv(t);return new Kw(e,r??jw(e),n)}function pv(e,t){const[r,n]=hv(t);return new qw(e,r??jw(e),n)}function hv(e){if(e){if(\"string\"==typeof e)return[e];if(\"object\"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&\"string\"!=typeof t)throw new Error(\"Must specify string message.\");return[t??void 0,r]}}return[]}const gv=-31002,yv=\"Snap Error\";function mv(e,t,r=null){return ww(e)&&vw(e,t)?e[t]:r}function bv(e,t,r=String(e)){const n=mv(e,t);return\"string\"==typeof n?n:r}function wv(e){return bv(e,\"message\")}function vv(e){return bv(e,\"stack\",null)}function Tv(e){return bv(e,\"name\",e instanceof Error?e.name:\"Error\")}function Av(e){const t=mv(e,\"data\");return null!==t&&xw(t)&&!Array.isArray(t)?t:{}}class Ev extends Error{#re;#ne;#a;#oe;constructor(e,t={}){const r=wv(e);super(r),this.#ne=r,this.#re=function(e){const t=mv(e,\"code\");return\"number\"==typeof t&&Number.isInteger(t)?t:-32603}(e);const n={...Av(e),...t};Object.keys(n).length>0&&(this.#a=n),this.#oe=super.stack}get name(){return\"SnapError\"}get code(){return this.#re}get message(){return this.#ne}get data(){return this.#a}get stack(){return this.#oe}toJSON(){return{code:gv,message:yv,data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}function Pv(e){if(\"string\"==typeof e)return{name:\"Error\",message:e,stack:null,cause:null};if(Nw(e))return{name:\"JsonRpcError\",message:wv(e),stack:vv(e)??vv(e.data)??null,cause:null};const t=function(e){return mv(e,\"cause\")}(e);return{name:Tv(e),message:wv(e),stack:vv(e)??null,cause:null===t?null:Pv(t)}}function Bv(e){return class extends Ev{constructor(t,r){if(\"object\"==typeof t){const r=e();return void super({code:r.code,message:r.message,data:t})}const n=e(t);super({code:n.code,message:n.message,data:r})}}}const Cv=Bv(ev),Iv=Bv(tv),Sv=Bv(Xw),Wv=Bv(Jw),xv=Bv(iv),_v=Bv(Qw),Rv=Bv(sv),kv=Bv(Yw),Ov=Bv(rv),Fv=Bv(nv),Mv=Bv(ov),Nv=Bv(dv),Uv=Bv(lv),Dv=Bv(cv),Lv=Bv(uv),$v=Bv(av),zv=e=>It(e.toString()).multipliedBy(xt).integerValue(It.ROUND_DOWN).toFixed(0),jv=e=>It(e.toString()).dividedBy(xt),Vv=(e,t)=>It(e.toString()).multipliedBy(It(10).pow(t)).integerValue(It.ROUND_DOWN).toFixed(0),Hv=(e,t)=>It(e.toString()).dividedBy(It(10).pow(t)),Gv=ae(\"TransactionRawData\",e=>{const t=e;if(1!==t?.contract?.length)return\"must contain exactly one contract\";const[r]=t.contract;return!!r?.parameter?.value||\"contract must have a non-empty parameter value\"});function Kv(e){return q(e,Gv)}function qv(e){try{G(e,Gv)}catch(e){const t=e instanceof Error?e.message:\"Unknown validation error\";throw new Sv(`Malformed transaction: ${t}`)}}function Zv(e,t){const r=function(e){const t=e.contract[0],r=t?.parameter?.value?.owner_address;if(!r)return null;try{return Jm.address.fromHex(r)}catch{return null}}(e);if(!r)throw new Sv(\"'Transaction is missing owner_address - cannot verify sender\");if(r!==t)throw new Sv(`Transaction owner_address (${r}) does not match derived signer address (${t})`)}const Yv=Be([Pe({usd_price:we(Ae()),summary:we(Ae()),value:we(Ae()),raw_value:Ae()}),Pe({summary:we(Ae()),token_id:Ae(),arbitrary_collection_token:de(),logo_url:we(ye(Ae())),usd_price:we(Ae())}),Pe({summary:we(Ae()),token_id:Ae(),value:Ae(),arbitrary_collection_token:de(),logo_url:we(ye(Ae())),usd_price:we(Ae())})]),Jv=Pe({type:Ae(),symbol:we(Ae()),name:we(Ae()),logo_url:we(ye(Ae())),address:we(Ae()),decimals:we(me())}),Xv=Pe({asset_type:Ae(),asset:Jv,in:le(Yv),out:le(Yv)}),Qv=Pe({assets_diffs:le(Xv)}),eT=Pe({code:Ae(),category:Ae()}),tT=Pe({type:Ae(),message:Ae(),transaction_index:me()}),rT=Pe({status:fe([\"Success\",\"Error\"]),error:we(Ae()),error_details:we(Be([eT,tT])),account_summary:we(Qv)}),nT=Pe({status:fe([\"Success\",\"Error\"]),result_type:fe([\"Benign\",\"Warning\",\"Malicious\",\"Error\"]),error:we(Ae()),description:we(Ae()),reason:we(Ae()),classification:we(Ae()),features:we(le(ue()))}),oT=Pe({validation:nT,simulation:rT}),sT=BigInt(2**32-1),iT=BigInt(32);function aT(e,t=!1){return t?{h:Number(e&sT),l:Number(e>>iT&sT)}:{h:0|Number(e>>iT&sT),l:0|Number(e&sT)}}function cT(e,t=!1){const r=e.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let s=0;s<r;s++){const{h:r,l:i}=aT(e[s],t);[n[s],o[s]]=[r,i]}return[n,o]}const uT=(e,t,r)=>e>>>r,lT=(e,t,r)=>e<<32-r|t>>>r,dT=(e,t,r)=>e>>>r|t<<32-r,fT=(e,t,r)=>e<<32-r|t>>>r,pT=(e,t,r)=>e<<64-r|t>>>r-32,hT=(e,t,r)=>e>>>r-32|t<<64-r,gT=(e,t,r)=>e<<r|t>>>32-r,yT=(e,t,r)=>t<<r|e>>>32-r,mT=(e,t,r)=>t<<r-32|e>>>64-r,bT=(e,t,r)=>e<<r-32|t>>>64-r;function wT(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}const vT=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),TT=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,AT=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),ET=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,PT=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),BT=(e,t,r,n,o,s)=>t+r+n+o+s+(e/2**32|0)|0,CT=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0;function IT(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&\"Uint8Array\"===e.constructor.name}function ST(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(\"positive integer expected, got \"+e)}function WT(e,...t){if(!IT(e))throw new Error(\"Uint8Array expected\");if(t.length>0&&!t.includes(e.length))throw new Error(\"Uint8Array expected of length \"+t+\", got length=\"+e.length)}function xT(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.createHasher\");ST(e.outputLen),ST(e.blockLen)}function _T(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function RT(e,t){WT(e);const r=t.outputLen;if(e.length<r)throw new Error(\"digestInto() expects output buffer of length at least \"+r)}function kT(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function OT(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function FT(e,t){return e<<32-t|e>>>t}function MT(e,t){return e<<t|e>>>32-t>>>0}const NT=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function UT(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const DT=NT?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=UT(e[t]);return e},LT=\"function\"==typeof Uint8Array.from([]).toHex&&\"function\"==typeof Uint8Array.fromHex,$T=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function zT(e){if(WT(e),LT)return e.toHex();let t=\"\";for(let r=0;r<e.length;r++)t+=$T[e[r]];return t}const jT=48,VT=57,HT=65,GT=70,KT=97,qT=102;function ZT(e){return e>=jT&&e<=VT?e-jT:e>=HT&&e<=GT?e-(HT-10):e>=KT&&e<=qT?e-(KT-10):void 0}function YT(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);if(LT)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error(\"hex string expected, got unpadded hex of length \"+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=ZT(e.charCodeAt(o)),s=ZT(e.charCodeAt(o+1));if(void 0===r||void 0===s){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character \"'+t+'\" at index '+o)}n[t]=16*r+s}return n}const JT=async()=>{};async function XT(e,t,r){let n=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-n;e>=0&&e<t||(await JT(),n+=e)}}function QT(e){if(\"string\"!=typeof e)throw new Error(\"string expected\");return new Uint8Array((new TextEncoder).encode(e))}function eA(e){return\"string\"==typeof e&&(e=QT(e)),WT(e),e}function tA(e){return\"string\"==typeof e&&(e=QT(e)),WT(e),e}function rA(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];WT(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}class nA{}function oA(e){const t=t=>e().update(eA(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function sA(e=32){if(CT&&\"function\"==typeof CT.getRandomValues)return CT.getRandomValues(new Uint8Array(e));if(CT&&\"function\"==typeof CT.randomBytes)return Uint8Array.from(CT.randomBytes(e));throw new Error(\"crypto.getRandomValues must be defined\")}const iA=BigInt(0),aA=BigInt(1),cA=BigInt(2),uA=BigInt(7),lA=BigInt(256),dA=BigInt(113),fA=[],pA=[],hA=[];for(let e=0,t=aA,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],fA.push(2*(5*n+r)),pA.push((e+1)*(e+2)/2%64);let o=iA;for(let e=0;e<7;e++)t=(t<<aA^(t>>uA)*dA)%lA,t&cA&&(o^=aA<<(aA<<BigInt(e))-aA);hA.push(o)}const gA=cT(hA,!0),yA=gA[0],mA=gA[1],bA=(e,t,r)=>r>32?mT(e,t,r):gT(e,t,r),wA=(e,t,r)=>r>32?bT(e,t,r):yT(e,t,r);class vA extends nA{constructor(e,t,r,n=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,ST(r),!(0<e&&e<200))throw new Error(\"only keccak-f1600 function is supported\");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}clone(){return this._cloneInto()}keccak(){DT(this.state32),function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],i=r[o+1],a=bA(s,i,1)^r[n],c=wA(s,i,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=pA[r],s=bA(t,o,n),i=wA(t,o,n),a=fA[r];t=e[a],o=e[a+1],e[a]=s,e[a+1]=i}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=yA[n],e[1]^=mA[n]}kT(r)}(this.state32,this.rounds),DT(this.state32),this.posOut=0,this.pos=0}update(e){_T(this),WT(e=eA(e));const{blockLen:t,state:r}=this,n=e.length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){_T(this,!1),WT(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(e)}xof(e){return ST(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(RT(e,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,kT(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new vA(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const TA=(e,t,r)=>oA(()=>new vA(t,e,r)),AA=TA(1,136,32);const{memoize:EA}=et,PA=/^(?:0x)?[0-9a-f]+$/iu,BA=/^0x[0-9a-f]+$/iu,CA=/^0x[0-9a-f]{40}$/u,IA=/^0x[0-9a-fA-F]{40}$/u,SA=(Q(Ae(),PA),Q(Ae(),BA),Q(Ae(),CA),Q(Ae(),IA),e=>\"string\"==typeof e);function WA(e){return SA(e)&&IA.test(e)}function xA(e){F(function(e){return SA(e)&&PA.test(e)}(e),\"Value must be a hexadecimal string.\")}const _A=EA(function(e){F(WA(e),\"Invalid hex address.\");const t=OA(e).toLowerCase(),r=AA(t),{length:n}=t,o=new Array(n);for(let e=0;e<n;e++){const n=1&e,s=r[e>>1],i=0===n?s>>4:15&s;o[e]=i>=8?t[e].toUpperCase():t[e]}return`0x${o.join(\"\")}`});const RA=EA(function(e){return!!WA(e)&&_A(e)===e});EA(function(e){return SA(t=e)&&CA.test(t)||RA(e);var t});function kA(e){return e.startsWith(\"0x\")?e:e.startsWith(\"0X\")?`0x${e.substring(2)}`:`0x${e}`}function OA(e){return e.startsWith(\"0x\")||e.startsWith(\"0X\")?e.substring(2):e}class FA{static SUPPORTED_CONTRACT_TYPES=[Im.TransferContract,Im.CreateSmartContract,Im.TriggerSmartContract];static isContractTypeSupported(e){const[t]=e.contract;return!!t&&FA.SUPPORTED_CONTRACT_TYPES.includes(t.type)}#se;#ie;#ae;constructor(e,t){this.#se=fetch,this.#ie=t.withPrefix(\"[🔒 SecurityAlertsApiClient]\"),this.#ae=e.get().securityAlertsApi.baseUrl}async scanTransaction({accountAddress:e,transactionRawData:t,origin:r,options:n=[\"simulation\",\"validation\"]}){if(this.#ie.info(\"Scanning Tron transaction with Security Alerts API\"),!Kv(t)||!FA.isContractTypeSupported(t))throw new Error(\"Transaction is not supported for scanning.\");const o=function(e){const t=e.contract[0]?.parameter.value;if(!t)return null;const r=Jm.address.fromHex(t.owner_address);let n=\"\";\"contract_address\"in t&&t.contract_address?n=Jm.address.fromHex(t.contract_address):\"to_address\"in t&&t.to_address&&(n=Jm.address.fromHex(t.to_address));let o=0;\"call_value\"in t&&t.call_value?o=t.call_value:\"amount\"in t&&t.amount&&(o=t.amount);let s=null;return\"data\"in t&&t.data&&(s=kA(t.data)),{from:r,to:n,data:s,value:o}}(t);if(!o)throw new Error(\"Could not extract scan parameters from transaction.\");const s=await this.#se(`${this.#ae}/tron/transaction/scan`,{headers:{\"Content-Type\":\"application/json\",accept:\"application/json\"},method:\"POST\",body:JSON.stringify({account_address:e,metadata:{domain:r},data:o,options:n})});if(!s.ok){const e=await s.text();throw this.#ie.error(`Security Alerts API error: ${s.status} - ${e}`),new Error(`Security Alerts API error: ${s.status} - ${e}`)}const i=await s.json();return G(i,oT),i}}const MA=\"Transaction Added\",NA=\"Transaction Rejected\",UA=\"Transaction Approved\",DA=\"Transaction Submitted\",LA=\"Transaction Finalized\",$A=\"Security Alert Detected\",zA=\"Security Scan Completed\";function jA(e){const t=e?.message?.toLowerCase()??\"\",r=e?.stack?.toLowerCase()??\"\";if([\"private\",\"key\",\"entropy\",\"mnemonic\",\"seed\",\"derivation\",\"bip32\",\"bip44\",\"secret\"].some(e=>t.includes(e)||r.includes(e))){const t=new Error(\"Key derivation failed. Please check your connection and try again.\");return VA(e)&&e.constructor?new e.constructor:t}return e}function VA(e){return[Ev,_v,$v,Rv,_v,kv,Ov,Fv,Mv,Nv,Uv,Dv,Lv,Cv,Iv,Sv,Wv,xv].some(t=>e instanceof t)}class HA{#ie;constructor({logger:e}){this.#ie=e.withPrefix(\"[📡 SnapClient]\")}async getBip32Entropy({entropySource:e,path:t,curve:r}){return snap.request({method:\"snap_getBip32Entropy\",params:{path:t,curve:r,...e?{source:e}:{}}})}async createInterface(e,t){return snap.request({method:\"snap_createInterface\",params:{ui:e,context:t}})}async updateInterface(e,t,r){return snap.request({method:\"snap_updateInterface\",params:{id:e,ui:t,context:r}})}async getInterfaceContext(e){const t=await snap.request({method:\"snap_getInterfaceContext\",params:{id:e}});return t||null}async resolveInterface(e,t){return snap.request({method:\"snap_resolveInterface\",params:{id:e,value:t}})}async showDialog(e){return snap.request({method:\"snap_dialog\",params:{id:e}})}async getPreferences(){return snap.request({method:\"snap_getPreferences\"})}async getClientStatus(){return snap.request({method:\"snap_getClientStatus\"})}async scheduleBackgroundEvent({method:e,params:t={},duration:r}){return snap.request({method:\"snap_scheduleBackgroundEvent\",params:{duration:r,request:{method:e,params:t}}})}async listEntropySources(){return snap.request({method:\"snap_listEntropySources\"})}async trackEvent(e,t){try{await snap.request({method:\"snap_trackEvent\",params:{event:{event:e,properties:t}}})}catch(e){await this.trackError(e)}}async trackError(e){try{return await snap.request({method:\"snap_trackError\",params:{error:Pv(jA(e))}})}catch(e){return void this.#ie.warn({rpcError:e},\"Failed to track error via snap_trackError\")}}async trackTransactionAdded(e){await this.trackEvent(MA,{message:\"Snap transaction added\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionRejected(e){await this.trackEvent(NA,{message:\"Snap transaction rejected\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionSubmitted(e){await this.trackEvent(DA,{message:\"Snap transaction submitted\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionApproved(e){await this.trackEvent(UA,{message:\"Snap transaction approved\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionFinalized(e){await this.trackEvent(LA,{message:\"Snap transaction finalized\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackSecurityAlertDetected(e){await this.trackEvent($A,{message:\"Snap security alert detected\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip,security_alert_response:e.securityAlertResponse,security_alert_reason:e.securityAlertReason,security_alert_description:e.securityAlertDescription})}async trackSecurityScanCompleted(e){await this.trackEvent(zA,{message:\"Snap security scan completed\",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip,scan_status:e.scanStatus,has_security_alerts:e.hasSecurityAlerts})}}function GA(e,t){if(t<1)throw new RangeError(\"chunkSize must be at least 1\");const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}const KA=Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:195$/u),qA=Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-staked-for-(energy|bandwidth)$/u),ZA=(Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-ready-for-withdrawal$/u),Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-staking-rewards$/u),Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:195-in-lock-period$/u),Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:(energy|bandwidth)$/u)),YA=Q(je,/^tron:(728126428|3448148188|2494104990)\\/slip44:maximum-(energy|bandwidth)$/u),JA=Q(je,/^tron:(728126428|3448148188|2494104990)\\/(trc10|trc20):[a-zA-Z0-9]+$/u),XA=Q(je,/^tron:(728126428|3448148188|2494104990)\\/trc721:[a-zA-Z0-9]+$/u),QA=le(be({decimals:pe(),assetId:JA,name:we(Ae()),symbol:we(Ae()),iconUrl:we(Ie)})),eE={name:\"UNKNOWN\",symbol:\"UNKNOWN\",fungible:!0,iconUrl:\"\",units:[{name:\"UNKNOWN\",symbol:\"UNKNOWN\",decimals:9}]};class tE{#se;#ie;#ae;#ce;#ue;static supportedNetworks=[Ft.Mainnet,Ft.Nile,Ft.Shasta];constructor(e,t=globalThis.fetch,r=or){this.#se=t,this.#ie=r;const{tokenApi:n,staticApi:o}=e.get(),{baseUrl:s,chunkSize:i}=n;G(s,Ie),this.#ae=s,this.#ce=i,this.#ue=o.baseUrl}async#le(e){G(e,le(JA));const t=We({baseUrl:this.#ae,path:\"/v3/assets\",queryParams:{assetIds:e.join(\",\")}}),r=await this.#se(t);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const n=await r.json();return G(n,QA),n}async getTokensMetadata(e){try{G(e,le(je));const t=e.filter(e=>{if(Zt.includes(e))return!1;const{chainId:t}=Ke(e);return tE.supportedNetworks.includes(t)});t.length!==e.length&&this.#ie.warn(`[TokenApiClient] Received some asset types that are either not supported by the Token API or are excluded resource/staked tokens. They will be ignored. Supported networks: ${tE.supportedNetworks.join(\", \")}`);const r=GA(t,this.#ce),n=(await Promise.all(r.map(async e=>this.#le(e)))).flat(),o=new Map;return e.forEach(e=>{const t=n.find(t=>t.assetId===e);if(!t)return this.#ie.warn(`No metadata for ${e}. Returning default values.`),void o.set(e,eE);const r=t.name??eE.name,s=t.symbol??eE.symbol,i=t.decimals??9,a={name:r,symbol:s,fungible:!0,iconUrl:t.iconUrl??We({baseUrl:this.#ue,path:\"/api/v2/tokenIcons/assets/{assetType}.png\",pathParams:{assetType:e.replace(/:/gu,\"/\")},encodePathParams:!1}),units:[{name:r,symbol:s,decimals:i}]};o.set(e,a)}),Object.fromEntries(o)}catch(e){throw this.#ie.error(e,\"Error fetching token metadata\"),e}}}function rE(e){const t=e.startsWith(\"0x\")?e.slice(2):e;if(0===t.length)return\"\";if(t.length%2!=0)throw new Error(\"Invalid hex string: odd length\");const r=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2){const n=parseInt(t.slice(e,e+2),16);if(Number.isNaN(n))throw new Error(\"Invalid hex string: contains non-hex characters\");r[e/2]=n}return(new TextDecoder).decode(r)}const nE=Pe({id:Ae(),owner_address:Ae(),name:Ae(),abbr:Ae(),total_supply:J(me(),0),trx_num:J(me(),0),num:J(me(),0),precision:J(me(),0),start_time:J(me(),0),end_time:J(me(),0),description:Ae(),url:Ae()}),oE=Pe({freeNetUsed:we(J(me(),0)),freeNetLimit:we(J(me(),0)),NetUsed:we(J(me(),0)),NetLimit:we(J(me(),0)),TotalNetLimit:we(J(me(),0)),TotalNetWeight:we(J(me(),0)),tronPowerUsed:we(J(me(),0)),tronPowerLimit:we(J(me(),0)),EnergyUsed:we(J(me(),0)),EnergyLimit:we(J(me(),0)),TotalEnergyLimit:we(J(me(),0)),TotalEnergyWeight:we(J(me(),0))}),sE=Pe({energy_usage:we(J(me(),0)),energy_fee:we(J(me(),0)),origin_energy_usage:we(J(me(),0)),energy_usage_total:we(J(me(),0)),net_usage:we(J(me(),0)),net_fee:we(J(me(),0)),result:we(Ae()),energy_penalty_total:we(J(me(),0))}),iE=Pe({address:Ae(),topics:le(Ae()),data:Ae()}),aE=Pe({hash:we(Ae()),caller_address:we(Ae()),transferTo_address:we(Ae()),callValueInfo:we(le(Pe({callValue:we(J(me(),0)),tokenId:we(Ae())}))),note:we(Ae()),rejected:we(de())}),cE=Pe({id:we(Ae()),fee:we(J(me(),0)),blockNumber:we(J(me(),0)),blockTimeStamp:we(J(me(),0)),contractResult:we(le(Ae())),contract_address:we(Ae()),receipt:we(sE),log:we(le(iE)),result:we(Ae()),resMessage:we(Ae()),withdraw_amount:we(J(me(),0)),unfreeze_amount:we(J(me(),0)),internal_transactions:we(le(aE)),withdraw_expire_amount:we(J(me(),0)),cancel_unfreezeV2_amount:we(Te(Ae(),me()))}),uE=Pe({num:J(me(),0)}),lE=Pe({key:Ae(),value:we(me())}),dE=Pe({chainParameter:le(lE)}),fE=Pe({result:de(),message:we(Ae())}),pE=Pe({contract:le(Pe({parameter:Pe({value:Pe({data:Ae(),owner_address:Ae(),contract_address:Ae()}),type_url:Ae()}),type:Ae()})),ref_block_bytes:Ae(),ref_block_hash:Ae(),expiration:J(me(),0),timestamp:J(me(),0)}),hE=Pe({ret:le(Pe({ret:we(Ae())})),visible:de(),txID:Ae(),raw_data:pE,raw_data_hex:Ae()}),gE=Pe({result:fE,energy_used:J(me(),0),constant_result:le(Ae()),energy_penalty:we(J(me(),0)),transaction:hE}),yE=Pe({origin_address:we(Ae()),consume_user_resource_percent:we(J(me(),0)),origin_energy_limit:we(J(me(),0))}),mE=Pe({reward:we(J(me(),0))});const bE=(e,t)=>`${e}:${t.map(e=>JSON.stringify(e)).join(\":\")}`;class wE extends Error{status;constructor(e){super(`HTTP error! status: ${e}`),this.name=\"TrongridHttpError\",this.status=e}}class vE extends wE{constructor(){super(429),this.name=\"TrongridRateLimitError\"}}const TE=e=>429===e.status?new vE:new wE(e.status);class AE extends Error{constructor(){super(\"Account not found or no data returned\"),this.name=\"TrongridAccountNotFoundError\"}}const EE=xe(\"UuidV4\",/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu),PE=EE,BE=(ae(\"Url\",e=>{try{const t=new URL(e);return\"http:\"===t.protocol||\"https:\"===t.protocol}catch{return!1}}),xe(\"StringNumber\",/^\\d+(\\.\\d+)?$/u));var CE;function IE(e){return new j({type:\"union\",schema:null,*entries(t,r){yield*e(t).entries(t,r)},*refiner(t,r){yield*e(t).refiner(t,r)},coercer:(t,r)=>e(t).coercer(t,r),validator:(t,r)=>e(t).validator(t,r)})}!function(e){e.Mnemonic=\"mnemonic\",e.PrivateKey=\"private-key\",e.Custom=\"custom\"}(CE||(CE={}));const SE=be({type:he(`${CE.Mnemonic}`),id:Ae(),derivationPath:Ae(),groupIndex:me()}),WE=be({type:he(`${CE.PrivateKey}`)}),xE=be({type:he(`${CE.Custom}`)}),_E=IE(e=>{if(!Aw(e))return SE;switch(e.type){case CE.PrivateKey:return WE;case CE.Custom:return xE;case CE.Mnemonic:default:return SE}}),RE=(kE=[Te(Ae(),Ww),Pe({entropy:ve(_E),exportable:ve(de())})],new j({type:\"intersection\",schema:null,*entries(e,t){for(const{entries:r}of kE)yield*r(e,t)},*validator(e,t){for(const{validator:r}of kE)yield*r(e,t)},*refiner(e,t){for(const{refiner:r}of kE)yield*r(e,t)}}));var kE,OE,FE,ME,NE,UE,DE;!function(e){e.Eoa=\"eip155:eoa\",e.Erc4337=\"eip155:erc4337\"}(OE||(OE={})),function(e){e.P2pkh=\"bip122:p2pkh\",e.P2sh=\"bip122:p2sh\",e.P2wpkh=\"bip122:p2wpkh\",e.P2tr=\"bip122:p2tr\"}(FE||(FE={})),function(e){e.DataAccount=\"solana:data-account\"}(ME||(ME={})),function(e){e.Eoa=\"tron:eoa\"}(NE||(NE={})),function(e){e.Account=\"stellar:account\"}(UE||(UE={})),function(e){e.Account=\"any:account\"}(DE||(DE={}));const LE=fe([`${OE.Eoa}`,`${OE.Erc4337}`,`${FE.P2pkh}`,`${FE.P2sh}`,`${FE.P2wpkh}`,`${FE.P2tr}`,`${ME.DataAccount}`,`${NE.Eoa}`,`${UE.Account}`,`${DE.Account}`]),$E=be({id:PE,type:fe([`${OE.Eoa}`,`${OE.Erc4337}`,`${FE.P2pkh}`,`${FE.P2sh}`,`${FE.P2wpkh}`,`${FE.P2tr}`,`${ME.DataAccount}`,`${NE.Eoa}`,`${UE.Account}`,`${DE.Account}`]),address:Ae(),scopes:X(le($e)),options:RE,methods:le(Ae())}),zE=xe(\"SolAddress\",/^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);var jE;!function(e){e.SendAndConfirmTransaction=\"sendAndConfirmTransaction\",e.SignAndSendTransaction=\"signAndSendTransaction\",e.SignTransaction=\"signTransaction\",e.SignMessage=\"signMessage\",e.SignIn=\"signIn\"}(jE||(jE={}));be({...$E.schema,address:zE,type:he(`${ME.DataAccount}`),scopes:X(le($e)),methods:le(fe(Object.values(jE)))});const VE=be({id:EE,scope:Ae(),account:EE,origin:Ae(),request:be({method:Ae(),params:ve(Be([le(Ww),Te(Ae(),Ww)]))})});var HE;!function(e){e.Hexadecimal=\"hexadecimal\",e.Base58=\"base58\",e.Base32=\"base32\"}(HE||(HE={}));const GE=fe([`${HE.Hexadecimal}`,`${HE.Base58}`,`${HE.Base32}`]),KE=(be({encoding:GE,type:ve(LE)}),be({encoding:GE}),be({type:he(\"private-key\"),privateKey:ie(Ae()),encoding:GE}),be({type:he(\"private-key\"),encoding:GE}));var qE;!function(e){e.PrivateKey=\"private-key\"}(qE||(qE={}));const ZE=KE,YE={SignMessage:\"signMessage\",SignTransaction:\"signTransaction\"},JE={code:4001,message:\"Invalid method parameters\"},XE={code:4002,message:\"Invalid transaction format\"},QE={code:4100,message:\"User rejected the request\"},eP={code:5e3,message:\"Unknown error with request\"},tP=Q(Ae(),/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u),rP=Q(Ae(),/^(?!0\\d)(\\d+(\\.\\d+)?)$/u),nP=be({accountId:tP}),oP=be({accountId:tP}),sP=be({accountId:tP}),iP=be({accountId:tP,assets:le(je)}),aP=be({accountId:tP,pagination:be({limit:pe(),next:we(ye(Ae()))})}),cP=be({accountId:tP,options:we(ZE)}),uP=fe(Object.values(Ft)),lP=(we(be({entropySource:we(Ae()),index:we(pe()),addressType:we(fe([NE.Eoa])),scope:we(uP),metamask:we(be({correlationId:we(Ae())}))})),Te(je,be({amount:rP,unit:Ae()}))),dP=(le(je),fe(Object.values(jE)),fe([\"btc\",\"eth\",\"ltc\",\"bch\",\"bnb\",\"eos\",\"xrp\",\"xlm\",\"link\",\"dot\",\"yfi\",\"usd\",\"aed\",\"ars\",\"aud\",\"bdt\",\"bhd\",\"bmd\",\"brl\",\"cad\",\"chf\",\"clp\",\"cny\",\"czk\",\"dkk\",\"eur\",\"gbp\",\"gel\",\"hkd\",\"huf\",\"idr\",\"ils\",\"inr\",\"jpy\",\"krw\",\"kwd\",\"lkr\",\"mmk\",\"mxn\",\"myr\",\"ngn\",\"nok\",\"nzd\",\"php\",\"pkr\",\"pln\",\"rub\",\"sar\",\"sek\",\"sgd\",\"thb\",\"try\",\"twd\",\"uah\",\"vef\",\"vnd\",\"zar\",\"xdr\",\"xag\",\"xau\",\"bits\",\"sats\"]),be({transaction:Ae(),scope:fe(Object.values(Ft))}),be({value:ye(rP)}),ae(\"PrivateKeyHex\",e=>\"string\"!=typeof e?\"Expected a string, but received: \"+typeof e:!!/^[0-9a-f]{64}$/u.test(e)||\"Expected a 64-character lowercase hexadecimal private key\")),fP=(ae(\"Base58\",e=>\"string\"!=typeof e?\"Expected a string, but received: \"+typeof e:!!/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(e)||\"Expected a Base58 encoded string, but received a string with invalid characters\"),Q(Ae(),/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$/u)),pP=fe(Object.values(Ft)),hP=Q(Ae(),/^m\\/44'\\/195'/u),gP=(Q(Ae(),/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$/u),ae(\"TronAddress\",e=>{if(\"string\"!=typeof e)return\"Expected a string, but received: \"+typeof e;return!!Jm.isAddress(e)||\"Invalid Tron address format\"})),yP=(Be([KA,qA,JA,XA,ZA,YA]),be({address:gP,message:fP})),mP=be({signature:Ae()}),bP=be({address:gP,transaction:be({rawDataHex:Ae(),type:Ae()})}),wP=be({method:he(YE.SignMessage),params:yP}),vP=be({method:he(YE.SignTransaction),params:bP}),TP=be({...VE.schema,scope:pP,request:Be([wP,vP])}),AP=Pe({method:fe(Object.values(YE)),params:Te(Ae(),Ce())}),EP=Q(Ae(),/^[a-zA-Z0-9]+:[a-zA-Z0-9]+:[a-zA-Z0-9]+$/u),PP=Pe({address:Ae(),weight:me()}),BP=Pe({keys:le(PP),threshold:me(),permission_name:Ae(),operations:we(Ae()),id:we(me()),type:we(Ae())}),CP=Pe({energy_window_optimized:we(de()),energy_window_size:we(me()),delegated_frozenV2_balance_for_energy:we(J(me(),0)),delegated_frozenV2_balance_for_bandwidth:we(J(me(),0))}),IP=Pe({amount:we(J(me(),0)),type:we(Ae())}),SP=Pe({unfreeze_amount:J(me(),0),unfreeze_expire_time:J(me(),0),type:we(Ae())}),WP=Pe({vote_address:Ae(),vote_count:J(me(),0)}),xP=Pe({key:Ae(),value:me()}),_P=Pe({owner_permission:we(BP),account_resource:we(CP),active_permission:we(le(BP)),address:gP,create_time:we(J(me(),0)),latest_opration_time:we(J(me(),0)),frozenV2:we(le(IP)),unfrozenV2:we(le(SP)),balance:we(J(me(),0)),assetV2:we(le(xP)),trc20:we(le(Te(Ae(),Ae()))),latest_consume_free_time:we(J(me(),0)),votes:we(le(WP)),latest_withdraw_time:we(J(me(),0)),net_window_size:we(J(me(),0)),net_window_optimized:we(de())}),RP=Pe({contractRet:we(Ae()),fee:we(J(me(),0))}),kP=Pe({vote_address:Ae(),vote_count:J(me(),0)}),OP=Pe({owner_address:we(Ae()),to_address:we(Ae()),unfreeze_balance:we(J(me(),0)),votes:we(le(kP)),frozen_balance:we(J(me(),0)),data:we(Ae()),contract_address:we(Ae()),call_value:we(J(me(),0)),amount:we(J(me(),0)),asset_name:we(Ae())}),FP=Pe({value:OP,type_url:Ae()}),MP=Pe({parameter:FP,type:Ae()}),NP=Pe({_:we(me()),callValue:we(J(me(),0)),tokenId:we(Ae())}),UP=Pe({note:we(Ae()),rejected:we(de()),call_value:we(NP)}),DP=Pe({internal_tx_id:we(Ae()),data:we(UP),to_address:we(Ae()),from_address:we(Ae())}),LP=Pe({contract:le(MP),ref_block_bytes:Ae(),ref_block_hash:Ae(),expiration:J(me(),0),timestamp:we(J(me(),0)),fee_limit:we(J(me(),0))}),$P=Pe({ret:we(le(RP)),signature:we(le(Ae())),txID:Ae(),net_usage:we(J(me(),0)),raw_data_hex:we(Ae()),net_fee:we(J(me(),0)),energy_usage:we(J(me(),0)),blockNumber:we(J(me(),0)),block_timestamp:we(J(me(),0)),energy_fee:we(J(me(),0)),energy_usage_total:we(J(me(),0)),raw_data:LP,internal_transactions:we(le(DP))}),zP=Pe({symbol:Ae(),address:Ae(),decimals:J(me(),0),name:Ae()}),jP=Pe({transaction_id:Ae(),token_info:zP,block_timestamp:J(me(),0),from:Ae(),to:Ae(),type:Ae(),value:Ae()}),VP=Pe({at:J(me(),0),page_size:J(me(),0)}),HP=(Pe({data:le(_P),success:de(),meta:VP}),Pe({data:le($P),success:de(),meta:VP}),Pe({data:le(jP),success:de(),meta:VP}),Te(Ae(),Ae())),GP=(Pe({data:le(HP),success:de(),meta:VP}),\"TrongridApiClient:getChainParameters\");const KP=be({amount:BE,unit:Ae(),metadata:ve(Te(Ae(),Ww))}),qP=be({...KP.schema}),ZP=be({fungible:he(!0),type:je,...qP.schema}),YP=be({fungible:he(!1),id:Ve}),JP=IE(e=>Aw(e)&&!e.fungible?YP:ZP),XP=be({address:Ae(),asset:ye(JP)});var QP;!function(e){e.Base=\"base\",e.Priority=\"priority\"}(QP||(QP={}));const eB=be({type:fe([`${QP.Base}`,`${QP.Priority}`]),asset:JP});var tB,rB,nB;!function(e){e.Submitted=\"submitted\",e.Unconfirmed=\"unconfirmed\",e.Confirmed=\"confirmed\",e.Failed=\"failed\"}(tB||(tB={})),function(e){e.Send=\"send\",e.Receive=\"receive\",e.Swap=\"swap\",e.BridgeSend=\"bridge:send\",e.BridgeReceive=\"bridge:receive\",e.StakeDeposit=\"stake:deposit\",e.StakeWithdraw=\"stake:withdraw\",e.TokenApprove=\"token:approve\",e.TokenDisapprove=\"token:disapprove\",e.Unknown=\"unknown\"}(rB||(rB={})),function(e){e.Benign=\"Benign\",e.Warning=\"Warning\",e.Malicious=\"Malicious\"}(nB||(nB={}));const oB=be({origin:ve(Ae()),securityAlertResponse:ve(fe([`${nB.Benign}`,`${nB.Warning}`,`${nB.Malicious}`])),typeLabel:ve(Ae())}),sB=be({status:fe([`${tB.Submitted}`,`${tB.Unconfirmed}`,`${tB.Confirmed}`,`${tB.Failed}`]),timestamp:ye(me())}),iB=be({id:Ae(),chain:$e,account:EE,status:fe([`${tB.Submitted}`,`${tB.Unconfirmed}`,`${tB.Confirmed}`,`${tB.Failed}`]),timestamp:ye(me()),type:fe([`${rB.Send}`,`${rB.Receive}`,`${rB.Swap}`,`${rB.BridgeSend}`,`${rB.BridgeReceive}`,`${rB.StakeDeposit}`,`${rB.StakeWithdraw}`,`${rB.TokenApprove}`,`${rB.TokenDisapprove}`,`${rB.Unknown}`]),from:le(XP),to:le(XP),fees:le(eB),events:le(sB),details:ve(oB)});be({data:le(iB),next:ye(Ae())});var aB=r(1048).hp;const cB=48,uB=58,lB=87;const dB=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,\"0\"));return e}}();function fB(e){return e instanceof Uint8Array}function pB(e){F(fB(e),\"Value must be a Uint8Array.\")}function hB(e){if(pB(e),0===e.length)return\"0x\";const t=dB(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return kA(r.join(\"\"))}function gB(e){pB(e);const t=hB(e);return BigInt(t)}function yB(e){if(\"0x\"===e?.toLowerCase?.())return new Uint8Array;xA(e);const t=OA(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),o=r.charCodeAt(2*e+1),s=t-(t<uB?cB:lB),i=o-(o<uB?cB:lB);n[e]=16*s+i}return n}function mB(e){return F(\"string\"==typeof e,\"Value must be a string.\"),(new TextEncoder).encode(e)}function bB(e){if(\"bigint\"==typeof e)return function(e){return F(\"bigint\"==typeof e,\"Value must be a bigint.\"),F(e>=BigInt(0),\"Value must be a non-negative bigint.\"),yB(e.toString(16))}(e);if(\"number\"==typeof e)return function(e){return F(\"number\"==typeof e,\"Value must be a number.\"),F(e>=0,\"Value must be a non-negative number.\"),F(Number.isSafeInteger(e),\"Value is not a safe integer. Use `bigIntToBytes` instead.\"),yB(e.toString(16))}(e);if(\"string\"==typeof e)return e.startsWith(\"0x\")?yB(e):mB(e);if(fB(e))return e;throw new TypeError(`Unsupported value type: \"${typeof e}\".`)}function wB(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const o=bB(e[n]);t[n]=o,r+=o.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n}function vB(e){if(void 0!==aB&&e instanceof aB){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}function TB(e,t,r){return e&t^~e&r}function AB(e,t,r){return e&t^e&r^t&r}class EB extends nA{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=OT(this.buffer)}update(e){_T(this),WT(e=eA(e));const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);if(i===n){const t=OT(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){_T(this),RT(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,kT(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const i=OT(e),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=a/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)i.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:i}=this;return e.destroyed=s,e.finished=o,e.length=n,e.pos=i,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const PB=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),BB=(Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]));const CB=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),IB=new Uint32Array(64);class SB extends EB{constructor(e=32){super(64,e,8,!1),this.A=0|PB[0],this.B=0|PB[1],this.C=0|PB[2],this.D=0|PB[3],this.E=0|PB[4],this.F=0|PB[5],this.G=0|PB[6],this.H=0|PB[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)IB[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=IB[e-15],r=IB[e-2],n=FT(t,7)^FT(t,18)^t>>>3,o=FT(r,17)^FT(r,19)^r>>>10;IB[e]=o+IB[e-7]+n+IB[e-16]|0}let{A:r,B:n,C:o,D:s,E:i,F:a,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(FT(i,6)^FT(i,11)^FT(i,25))+TB(i,a,c)+CB[e]+IB[e]|0,l=(FT(r,2)^FT(r,13)^FT(r,22))+AB(r,n,o)|0;u=c,c=a,a=i,i=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,i=i+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,i,a,c,u)}roundClean(){kT(IB)}destroy(){this.set(0,0,0,0,0,0,0,0),kT(this.buffer)}}const WB=cT([\"0x428a2f98d728ae22\",\"0x7137449123ef65cd\",\"0xb5c0fbcfec4d3b2f\",\"0xe9b5dba58189dbbc\",\"0x3956c25bf348b538\",\"0x59f111f1b605d019\",\"0x923f82a4af194f9b\",\"0xab1c5ed5da6d8118\",\"0xd807aa98a3030242\",\"0x12835b0145706fbe\",\"0x243185be4ee4b28c\",\"0x550c7dc3d5ffb4e2\",\"0x72be5d74f27b896f\",\"0x80deb1fe3b1696b1\",\"0x9bdc06a725c71235\",\"0xc19bf174cf692694\",\"0xe49b69c19ef14ad2\",\"0xefbe4786384f25e3\",\"0x0fc19dc68b8cd5b5\",\"0x240ca1cc77ac9c65\",\"0x2de92c6f592b0275\",\"0x4a7484aa6ea6e483\",\"0x5cb0a9dcbd41fbd4\",\"0x76f988da831153b5\",\"0x983e5152ee66dfab\",\"0xa831c66d2db43210\",\"0xb00327c898fb213f\",\"0xbf597fc7beef0ee4\",\"0xc6e00bf33da88fc2\",\"0xd5a79147930aa725\",\"0x06ca6351e003826f\",\"0x142929670a0e6e70\",\"0x27b70a8546d22ffc\",\"0x2e1b21385c26c926\",\"0x4d2c6dfc5ac42aed\",\"0x53380d139d95b3df\",\"0x650a73548baf63de\",\"0x766a0abb3c77b2a8\",\"0x81c2c92e47edaee6\",\"0x92722c851482353b\",\"0xa2bfe8a14cf10364\",\"0xa81a664bbc423001\",\"0xc24b8b70d0f89791\",\"0xc76c51a30654be30\",\"0xd192e819d6ef5218\",\"0xd69906245565a910\",\"0xf40e35855771202a\",\"0x106aa07032bbd1b8\",\"0x19a4c116b8d2d0c8\",\"0x1e376c085141ab53\",\"0x2748774cdf8eeb99\",\"0x34b0bcb5e19b48a8\",\"0x391c0cb3c5c95a63\",\"0x4ed8aa4ae3418acb\",\"0x5b9cca4f7763e373\",\"0x682e6ff3d6b2b8a3\",\"0x748f82ee5defb2fc\",\"0x78a5636f43172f60\",\"0x84c87814a1f0ab72\",\"0x8cc702081a6439ec\",\"0x90befffa23631e28\",\"0xa4506cebde82bde9\",\"0xbef9a3f7b2c67915\",\"0xc67178f2e372532b\",\"0xca273eceea26619c\",\"0xd186b8c721c0c207\",\"0xeada7dd6cde0eb1e\",\"0xf57d4f7fee6ed178\",\"0x06f067aa72176fba\",\"0x0a637dc5a2c898a6\",\"0x113f9804bef90dae\",\"0x1b710b35131c471b\",\"0x28db77f523047d84\",\"0x32caab7b40c72493\",\"0x3c9ebe0a15c9bebc\",\"0x431d67c49c100d4c\",\"0x4cc5d4becb3e42b6\",\"0x597f299cfc657e2a\",\"0x5fcb6fab3ad6faec\",\"0x6c44198c4a475817\"].map(e=>BigInt(e))),xB=WB[0],_B=WB[1],RB=new Uint32Array(80),kB=new Uint32Array(80);class OB extends EB{constructor(e=64){super(128,e,16,!1),this.Ah=0|BB[0],this.Al=0|BB[1],this.Bh=0|BB[2],this.Bl=0|BB[3],this.Ch=0|BB[4],this.Cl=0|BB[5],this.Dh=0|BB[6],this.Dl=0|BB[7],this.Eh=0|BB[8],this.El=0|BB[9],this.Fh=0|BB[10],this.Fl=0|BB[11],this.Gh=0|BB[12],this.Gl=0|BB[13],this.Hh=0|BB[14],this.Hl=0|BB[15]}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:s,Dh:i,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:h,Hl:g}=this;return[e,t,r,n,o,s,i,a,c,u,l,d,f,p,h,g]}set(e,t,r,n,o,s,i,a,c,u,l,d,f,p,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|i,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)RB[r]=e.getUint32(t),kB[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|RB[e-15],r=0|kB[e-15],n=dT(t,r,1)^dT(t,r,8)^uT(t,0,7),o=fT(t,r,1)^fT(t,r,8)^lT(t,r,7),s=0|RB[e-2],i=0|kB[e-2],a=dT(s,i,19)^pT(s,i,61)^uT(s,0,6),c=fT(s,i,19)^hT(s,i,61)^lT(s,i,6),u=AT(o,c,kB[e-7],kB[e-16]),l=ET(u,n,a,RB[e-7],RB[e-16]);RB[e]=0|l,kB[e]=0|u}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:i,Cl:a,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:p,Gh:h,Gl:g,Hh:y,Hl:m}=this;for(let e=0;e<80;e++){const t=dT(l,d,14)^dT(l,d,18)^pT(l,d,41),b=fT(l,d,14)^fT(l,d,18)^hT(l,d,41),w=l&f^~l&h,v=PT(m,b,d&p^~d&g,_B[e],kB[e]),T=BT(v,y,t,w,xB[e],RB[e]),A=0|v,E=dT(r,n,28)^pT(r,n,34)^pT(r,n,39),P=fT(r,n,28)^hT(r,n,34)^hT(r,n,39),B=r&o^r&i^o&i,C=n&s^n&a^s&a;y=0|h,m=0|g,h=0|f,g=0|p,f=0|l,p=0|d,({h:l,l:d}=wT(0|c,0|u,0|T,0|A)),c=0|i,u=0|a,i=0|o,a=0|s,o=0|r,s=0|n;const I=vT(A,P,C);r=TT(I,T,E,B),n=0|I}({h:r,l:n}=wT(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=wT(0|this.Bh,0|this.Bl,0|o,0|s)),({h:i,l:a}=wT(0|this.Ch,0|this.Cl,0|i,0|a)),({h:c,l:u}=wT(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=wT(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:p}=wT(0|this.Fh,0|this.Fl,0|f,0|p)),({h,l:g}=wT(0|this.Gh,0|this.Gl,0|h,0|g)),({h:y,l:m}=wT(0|this.Hh,0|this.Hl,0|y,0|m)),this.set(r,n,o,s,i,a,c,u,l,d,f,p,h,g,y,m)}roundClean(){kT(RB,kB)}destroy(){kT(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);const FB=oA(()=>new SB),MB=oA(()=>new OB);const NB=FB;async function UB(e){return\"crypto\"in globalThis&&\"object\"==typeof globalThis.crypto&&globalThis.crypto.subtle?.digest?new Uint8Array(await globalThis.crypto.subtle.digest(\"SHA-256\",e)):NB(e)}const DB=\"Transfer\";class LB{static createPendingTransaction({txId:e,account:t,scope:r}){const n=Math.floor(Date.now()/1e3);return{type:rB.Unknown,id:e,from:[{address:t.address,asset:{unit:\"TRX\",type:`${r}/slip44:195`,amount:\"0\",fungible:!0}}],to:[{address:t.address,asset:{unit:\"TRX\",type:`${r}/slip44:195`,amount:\"0\",fungible:!0}}],events:[{status:tB.Unconfirmed,timestamp:n}],chain:r,status:tB.Unconfirmed,account:t.id,timestamp:n,fees:[]}}static createPendingSendTransaction({txId:e,account:t,scope:r,toAddress:n,amount:o,assetType:s,assetSymbol:i}){const a=Math.floor(Date.now()/1e3);return{type:rB.Send,id:e,from:[{address:t.address,asset:{unit:i,type:s,amount:o,fungible:!0}}],to:[{address:n,asset:{unit:i,type:s,amount:o,fungible:!0}}],events:[{status:tB.Unconfirmed,timestamp:a}],chain:r,status:tB.Unconfirmed,account:t.id,timestamp:a,fees:[]}}static#de(e,t){const r=[],{nativeToken:n,bandwidth:o,energy:s}=qt[e],i=t.ret.reduce((e,t)=>e+(t.fee||0),0),a=(e,t)=>{e>0&&r.push({type:\"base\",asset:{type:t.id,unit:t.symbol,amount:e.toString(),fungible:!0}})};return a(jv(i).toNumber(),n),a(t.net_usage,o),a(t.energy_usage,s),r}static#fe(e){const t=!e.blockNumber,r=e.ret?.[0]?.contractRet,n=r&&\"SUCCESS\"!==r;return t?tB.Unconfirmed:n?tB.Failed:tB.Confirmed}static#pe({accountAddress:e,from:t,to:r,trc20Type:n}){return\"Approval\"===n?rB.TokenApprove:t===e&&r===e?rB.Swap:t===e?rB.Send:r===e?rB.Receive:rB.Unknown}static#he(e){return Jm.address.fromHex(e)}static#ge(e,t){const r=e.internal_transactions;if(!r||0===r.length)return!1;const n=Jm.address.toHex(t).toLowerCase();return r.some(e=>{const t=e.caller_address?.toLowerCase(),r=e.transferTo_address?.toLowerCase(),o=e.callValueInfo?.some(e=>(e.callValue??0)>0);return o&&(t===n||r===n)})}static#ye({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0].parameter.value,o=this.#he(n.owner_address),s=this.#he(n.to_address),i=this.#fe(r),a=i===tB.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),c=n.amount,u=jv(c).toString(),l=LB.#de(e,r),d=this.#pe({accountAddress:t.address,from:o,to:s}),f=qt[e].nativeToken;return{type:d,id:r.txID,from:[{address:o,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],to:[{address:s,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],events:[{status:i,timestamp:a}],chain:e,status:i,account:t.id,timestamp:a,fees:l}}static#me({scope:e,account:t,trongridTransaction:r,trc10TokenMetadata:n}){const o=r.raw_data.contract[0].parameter.value,s=this.#he(o.owner_address),i=this.#he(o.to_address),a=this.#fe(r),c=a===tB.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),u=o.asset_name,l=n?.get(u),d=l?.decimals??6,f=l?.symbol??\"UNKNOWN\",p=o.amount,h=Hv(p,d).toFixed(),g=LB.#de(e,r);return{type:this.#pe({accountAddress:t.address,from:s,to:i}),id:r.txID,from:[{address:s,asset:{unit:f,type:`${e}/trc10:${u}`,amount:h,fungible:!0}}],to:[{address:i,asset:{unit:f,type:`${e}/trc10:${u}`,amount:h,fungible:!0}}],events:[{status:a,timestamp:c}],chain:e,status:a,account:t.id,timestamp:c,fees:g}}static#be({scope:e,account:t,trc20Transfer:r}){const{from:n,to:o,value:s,token_info:i,block_timestamp:a,transaction_id:c}=r,u=Hv(s,i.decimals).toFixed(),l=this.#pe({accountAddress:t.address,from:n,to:o,trc20Type:r.type}),d=tB.Confirmed;return{type:l,id:c,from:[{address:n,asset:{unit:i.symbol,type:`${e}/trc20:${i.address}`,amount:u,fungible:!0}}],to:[{address:o,asset:{unit:i.symbol,type:`${e}/trc20:${i.address}`,amount:u,fungible:!0}}],events:[{status:d,timestamp:Math.floor(a/1e3)}],chain:e,status:d,account:t.id,timestamp:Math.floor(a/1e3),fees:[]}}static#we({scope:e,account:t,trongridTransaction:r,sentTransfer:n,receivedTransfer:o}){const s=this.#fe(r),i=s===tB.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),a=Hv(n.value,n.token_info.decimals).toFixed(),c=Hv(o.value,o.token_info.decimals).toFixed(),u=LB.#de(e,r);return{type:rB.Swap,id:r.txID,from:[{address:n.from,asset:{unit:n.token_info.symbol,type:`${e}/trc20:${n.token_info.address}`,amount:a,fungible:!0}}],to:[{address:o.to,asset:{unit:o.token_info.symbol,type:`${e}/trc20:${o.token_info.address}`,amount:c,fungible:!0}}],events:[{status:s,timestamp:i}],chain:e,status:s,account:t.id,timestamp:i,fees:u}}static#ve({scope:e,account:t,trongridTransaction:r,trc20Transfer:n}){const o=this.#fe(r),s=o===tB.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),i=Hv(n.value,n.token_info.decimals).toFixed(),a=r.raw_data.contract?.[0],c=a?.parameter?.value?.call_value;let u=\"0\";if(c&&c>0)u=jv(c).toString();else{const e=r.internal_transactions??[],n=Jm.address.toHex(t.address).toLowerCase();for(const t of e){const e=t.caller_address?.toLowerCase();if(e===n){const e=t.callValueInfo?.find(e=>e.callValue)?.callValue??0;if(e>0){u=jv(e).toString();break}}}if(\"0\"===u&&e.length>0){let t=0;for(const r of e){t+=r.callValueInfo?.find(e=>e.callValue)?.callValue??0}t>0&&(u=jv(t).toString())}}const l=qt[e].nativeToken,d=LB.#de(e,r);return{type:rB.Swap,id:r.txID,from:[{address:t.address,asset:{unit:l.symbol,type:l.id,amount:u,fungible:!0}}],to:[{address:t.address,asset:{unit:n.token_info.symbol,type:`${e}/trc20:${n.token_info.address}`,amount:i,fungible:!0}}],events:[{status:o,timestamp:s}],chain:e,status:o,account:t.id,timestamp:s,fees:d}}static#Te({scope:e,account:t,trongridTransaction:r,trc20Transfers:n=[]}){const o=this.#fe(r),s=r.raw_data.contract?.[0],i=s?.parameter?.value?.owner_address,a=s?.parameter?.value?.contract_address,c=s?.parameter?.value?.call_value;if(o===tB.Failed){if(!i)return null;const n=Math.floor(r.block_timestamp/1e3),s=LB.#de(e,r);return{type:rB.Unknown,id:r.txID,from:[],to:[],events:[{status:o,timestamp:n}],chain:e,status:o,account:t.id,timestamp:n,fees:s}}if(0===n.length&&c&&c>0){if(!i||!a)return null;const n=Math.floor(r.block_timestamp/1e3),s=jv(c).toString(),u=LB.#de(e,r),l=qt[e].nativeToken;return{type:rB.Send,id:r.txID,from:[{address:this.#he(i),asset:{unit:l.symbol,type:l.id,amount:s,fungible:!0}}],to:[{address:this.#he(a),asset:{unit:l.symbol,type:l.id,amount:s,fungible:!0}}],events:[{status:o,timestamp:n}],chain:e,status:o,account:t.id,timestamp:n,fees:u}}if(0===n.length&&(!c||0===c))return null;const u=n.find(e=>e.type===DB&&e.from===t.address),l=n.find(e=>e.type===DB&&e.to===t.address),d=u&&l&&u.token_info.address!==l.token_info.address;if(u&&l&&n.length>=2&&d)return this.#we({scope:e,account:t,trongridTransaction:r,sentTransfer:u,receivedTransfer:l});const f=this.#ge(r,t.address),p=c&&c>0,h=r.internal_transactions&&r.internal_transactions.length>0&&r.internal_transactions.some(e=>e.callValueInfo?.some(e=>(e.callValue??0)>0));if(l&&!u&&(f||p||h))return this.#ve({scope:e,account:t,trongridTransaction:r,trc20Transfer:l});const g=n[0];if(!g)return null;const{from:y,to:m}=g,b=g.value,{decimals:w,address:v,symbol:T}=g.token_info,A=o===tB.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(g.block_timestamp/1e3),E=Hv(b,w).toFixed(),P=this.#pe({accountAddress:t.address,from:y,to:m,trc20Type:g.type}),B=LB.#de(e,r);return{type:P,id:g.transaction_id,from:[{address:y,asset:{unit:T,type:`${e}/trc20:${v}`,amount:E,fungible:!0}}],to:[{address:m,asset:{unit:T,type:`${e}/trc20:${v}`,amount:E,fungible:!0}}],events:[{status:o,timestamp:A}],chain:e,status:o,account:t.id,timestamp:A,fees:B}}static#Ae({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0],o=n?.parameter?.value;if(!o)return null;const s=o.owner_address;if(!s)return null;const i=Jm.address.fromHex(s),a=Math.floor(r.block_timestamp/1e3),c=Number(o.frozen_balance??o.frozen_balance_v2)||0,u=jv(c).toString(),{resource:l}=o,d=\"ENERGY\"===l;if(!d&&!(\"BANDWIDTH\"===l))return null;const f=qt[e].nativeToken,p=d?qt[e].stakedForEnergy:qt[e].stakedForBandwidth,h=LB.#de(e,r);return{type:rB.StakeDeposit,id:r.txID,from:[{address:i,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],to:[{address:i,asset:{unit:p.symbol,type:p.id,amount:u,fungible:!0}}],events:[{status:tB.Confirmed,timestamp:a}],chain:e,status:tB.Confirmed,account:t.id,timestamp:a,fees:h}}static#Ee({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0],o=n?.parameter?.value;if(!o)return null;const s=o.owner_address;if(!s)return null;const i=Jm.address.fromHex(s),a=Math.floor(r.block_timestamp/1e3),c=Number(o.unfreeze_balance)||0,u=jv(c).toString(),{resource:l}=o,d=\"ENERGY\"===l;if(!d&&!(\"BANDWIDTH\"===l))return null;const f=qt[e].nativeToken,p=d?qt[e].stakedForEnergy:qt[e].stakedForBandwidth,h=LB.#de(e,r);return{type:rB.StakeWithdraw,id:r.txID,from:[{address:i,asset:{unit:p.symbol,type:p.id,amount:u,fungible:!0}}],to:[{address:i,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],events:[{status:tB.Confirmed,timestamp:a}],chain:e,status:tB.Confirmed,account:t.id,timestamp:a,fees:h}}static mapTransaction({scope:e,account:t,trongridTransaction:r,trc20Transfers:n=[],trc10TokenMetadata:o}){const s=r.raw_data.contract?.[0],i=s?.type;if(!s||!i)return null;switch(i){case\"TransferContract\":return this.#ye({scope:e,account:t,trongridTransaction:r});case\"TransferAssetContract\":return this.#me({scope:e,account:t,trongridTransaction:r,trc10TokenMetadata:o});case\"FreezeBalanceV2Contract\":case\"FreezeBalanceContract\":return this.#Ae({scope:e,account:t,trongridTransaction:r});case\"UnfreezeBalanceV2Contract\":case\"UnfreezeBalanceContract\":return this.#Ee({scope:e,account:t,trongridTransaction:r});case\"TriggerSmartContract\":return this.#Te({scope:e,account:t,trongridTransaction:r,trc20Transfers:n});default:return null}}static mapTransactions({scope:e,account:t,rawTransactions:r,trc20Transactions:n,trc10TokenMetadata:o}){const s=[],i=new Set,a=new Map;for(const e of n){const t=a.get(e.transaction_id)??[];t.push(e),a.set(e.transaction_id,t)}for(const n of r){const r=a.get(n.txID)??[],c=this.mapTransaction({scope:e,account:t,trongridTransaction:n,trc20Transfers:r,trc10TokenMetadata:o});c&&(s.push(c),i.add(n.txID))}for(const r of n)if(!i.has(r.transaction_id)){const n=this.#be({scope:e,account:t,trc20Transfer:r});n&&(s.push(n),i.add(r.transaction_id))}return s}}function $B(e,t,r){try{G(e,t)}catch(e){throw r.cause=e,r}}function zB(e,t,r){if(\"string\"==typeof e)throw new Error(`An HTML element (\"${String(e)}\") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error(\"A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.\");return e({...t,key:r})}function jB(e,t,r){return zB(e,t,r)}const VB=\"TransactionDeadlinePassed\",HB=\"TransactionTaposExpired\";const GB=\"COMPLETED\",KB=\"SKIPPED\",qB=\"FAILED\",ZB={Benign:\"Benign\",Warning:\"Warning\",Malicious:\"Malicious\"},YB={SUCCESS:\"SUCCESS\",ERROR:\"ERROR\"},JB={status:\"ERROR\",simulationStatus:qB,estimatedChanges:{assets:[]},validation:{type:\"Benign\",reason:null},error:{type:HB,code:null,message:null}},XB=\"initial\",QB=\"loading\",eC=\"fetching\",tC=\"fetched\",rC=\"error\";function nC(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}function oC(e){return t=>{const{key:r=null,...n}=t;return{type:e,props:nC(n),key:r}}}const sC=oC(\"Section\"),iC=oC(\"Box\"),aC=oC(\"Text\"),cC=oC(\"Tooltip\");var uC;!function(e){e.Accessibility=\"accessibility\",e.Activity=\"activity\",e.AddCard=\"add-card\",e.AddCircle=\"add-circle\",e.AddSquare=\"add-square\",e.Add=\"add\",e.Ai=\"ai\",e.AlternateEmail=\"alternate-email\",e.Apple=\"apple\",e.Apps=\"apps\",e.Arrow2Down=\"arrow-2-down\",e.Arrow2Left=\"arrow-2-left\",e.Arrow2Right=\"arrow-2-right\",e.Arrow2UpRight=\"arrow-2-up-right\",e.Arrow2Up=\"arrow-2-up\",e.ArrowCircleDown=\"arrow-circle-down\",e.ArrowCircleUp=\"arrow-circle-up\",e.ArrowDoubleLeft=\"arrow-double-left\",e.ArrowDoubleRight=\"arrow-double-right\",e.ArrowDown=\"arrow-down\",e.ArrowDropDownCircle=\"arrow-drop-down-circle\",e.ArrowLeft=\"arrow-left\",e.ArrowRight=\"arrow-right\",e.ArrowUp=\"arrow-up\",e.Attachment=\"attachment\",e.Ban=\"ban\",e.BankAssured=\"bank-assured\",e.Bank=\"bank\",e.Bold=\"bold\",e.Book=\"book\",e.Bookmark=\"bookmark\",e.Bridge=\"bridge\",e.Briefcase=\"briefcase\",e.Bulb=\"bulb\",e.BuySell=\"buy-sell\",e.Cake=\"cake\",e.Calculator=\"calculator\",e.Calendar=\"calendar\",e.Call=\"call\",e.Camera=\"camera\",e.Campaign=\"campaign\",e.CardPos=\"card-pos\",e.Card=\"card\",e.Cash=\"cash\",e.Category=\"category\",e.Chart=\"chart\",e.CheckBold=\"check-bold\",e.Check=\"check\",e.CircleX=\"circle-x\",e.ClockFilled=\"clock-filled\",e.Clock=\"clock\",e.Close=\"close\",e.CloudDownload=\"cloud-download\",e.CloudUpload=\"cloud-upload\",e.Cloud=\"cloud\",e.CodeCircle=\"code-circle\",e.Code=\"code\",e.Coin=\"coin\",e.Collapse=\"collapse\",e.Confirmation=\"confirmation\",e.Connect=\"connect\",e.CopySuccess=\"copy-success\",e.Copy=\"copy\",e.CreditCheck=\"credit-check\",e.CurrencyFranc=\"currency-franc\",e.CurrencyLira=\"currency-lira\",e.CurrencyPound=\"currency-pound\",e.CurrencyYuan=\"currency-yuan\",e.Customize=\"customize\",e.Danger=\"danger\",e.DarkFilled=\"dark-filled\",e.Dark=\"dark\",e.Data=\"data\",e.Description=\"description\",e.Details=\"details\",e.Diagram=\"diagram\",e.DocumentCode=\"document-code\",e.Download=\"download\",e.Draft=\"draft\",e.EcoLeaf=\"eco-leaf\",e.EditSquare=\"edit-square\",e.Edit=\"edit\",e.EncryptedAdd=\"encrypted-add\",e.Eraser=\"eraser\",e.Error=\"error\",e.Ethereum=\"ethereum\",e.Exchange=\"exchange\",e.ExpandVertical=\"expand-vertical\",e.Expand=\"expand\",e.ExploreFilled=\"explore-filled\",e.Explore=\"explore\",e.Export=\"export\",e.Extension=\"extension\",e.EyeSlash=\"eye-slash\",e.Eye=\"eye\",e.FaceId=\"face-id\",e.Feedback=\"feedback\",e.File=\"file\",e.Filter=\"filter\",e.Fingerprint=\"fingerprint\",e.Fire=\"fire\",e.FirstPage=\"first-page\",e.Flag=\"flag\",e.FlashSlash=\"flash-slash\",e.Flash=\"flash\",e.Flask=\"flask\",e.Flower=\"flower\",e.Folder=\"folder\",e.Forest=\"forest\",e.FullCircle=\"full-circle\",e.Gas=\"gas\",e.Gift=\"gift\",e.GlobalSearch=\"global-search\",e.Global=\"global\",e.Graph=\"graph\",e.Hardware=\"hardware\",e.HashTag=\"hash-tag\",e.HeartFilled=\"heart-filled\",e.Heart=\"heart\",e.Hierarchy=\"hierarchy\",e.HomeFilled=\"home-filled\",e.Home=\"home\",e.Image=\"image\",e.Info=\"info\",e.Inventory=\"inventory\",e.Joystick=\"joystick\",e.KeepFilled=\"keep-filled\",e.Keep=\"keep\",e.Key=\"key\",e.LastPage=\"last-page\",e.LightFilled=\"light-filled\",e.Light=\"light\",e.Link=\"link\",e.Loading=\"loading\",e.Location=\"location\",e.LockSlash=\"lock-slash\",e.Lock=\"lock\",e.LockedFilled=\"locked-filled\",e.Login=\"login\",e.Logout=\"logout\",e.Mail=\"mail\",e.Map=\"map\",e.Menu=\"menu\",e.MessageQuestion=\"message-question\",e.Messages=\"messages\",e.Mic=\"mic\",e.MinusBold=\"minus-bold\",e.MinusSquare=\"minus-square\",e.Minus=\"minus\",e.Mobile=\"mobile\",e.MoneyBag=\"money-bag\",e.Money=\"money\",e.Monitor=\"monitor\",e.MoreHorizontal=\"more-horizontal\",e.MoreVertical=\"more-vertical\",e.MountainFlag=\"mountain-flag\",e.MusicNote=\"music-note\",e.Notification=\"notification\",e.PageInfo=\"page-info\",e.Palette=\"palette\",e.PasswordCheck=\"password-check\",e.Pending=\"pending\",e.People=\"people\",e.PersonCancel=\"person-cancel\",e.Pin=\"pin\",e.Plant=\"plant\",e.Plug=\"plug\",e.PlusAndMinus=\"plus-and-minus\",e.PolicyAlert=\"policy-alert\",e.Print=\"print\",e.PriorityHigh=\"priority-high\",e.PrivacyTip=\"privacy-tip\",e.ProgrammingArrows=\"programming-arrows\",e.Publish=\"publish\",e.QrCode=\"qr-code\",e.Question=\"question\",e.Receive=\"receive\",e.Received=\"received\",e.Refresh=\"refresh\",e.RemoveMinus=\"remove-minus\",e.Report=\"report\",e.Rocket=\"rocket\",e.SaveFilled=\"save-filled\",e.Save=\"save\",e.Saving=\"saving\",e.ScanBarcode=\"scan-barcode\",e.ScanFocus=\"scan-focus\",e.Scan=\"scan\",e.Search=\"search\",e.SecurityAlert=\"security-alert\",e.SecurityCross=\"security-cross\",e.SecurityKey=\"security-key\",e.SecuritySearch=\"security-search\",e.SecuritySlash=\"security-slash\",e.SecurityTick=\"security-tick\",e.SecurityTime=\"security-time\",e.SecurityUser=\"security-user\",e.Security=\"security\",e.Send=\"send\",e.SentimentDissatisfied=\"sentiment-dissatisfied\",e.SentimentNeutral=\"sentiment-neutral\",e.SentimentSatisfied=\"sentiment-satisfied\",e.SentimentVerySatisfied=\"sentiment-very-satisfied\",e.SettingFilled=\"setting-filled\",e.Setting=\"setting\",e.Share=\"share\",e.ShieldLock=\"shield-lock\",e.ShoppingBag=\"shopping-bag\",e.ShoppingCart=\"shopping-cart\",e.SignalCellular=\"signal-cellular\",e.Slash=\"slash\",e.Sms=\"sms\",e.SnapsMobile=\"snaps-mobile\",e.SnapsPlus=\"snaps-plus\",e.SnapsRound=\"snaps-round\",e.Snaps=\"snaps\",e.SortByAlpha=\"sort-by-alpha\",e.Sort=\"sort\",e.Sparkle=\"sparkle\",e.Speed=\"speed\",e.Speedometer=\"speedometer\",e.Square=\"square\",e.Stake=\"stake\",e.StarFilled=\"star-filled\",e.Star=\"star\",e.Start=\"start\",e.Storefront=\"storefront\",e.Student=\"student\",e.SwapHorizontal=\"swap-horizontal\",e.SwapVertical=\"swap-vertical\",e.TabClose=\"tab-close\",e.TableRow=\"table-row\",e.Tablet=\"tablet\",e.Tag=\"tag\",e.ThumbDownFilled=\"thumb-down-filled\",e.ThumbDown=\"thumb-down\",e.ThumbUpFilled=\"thumb-up-filled\",e.ThumbUp=\"thumb-up\",e.Tint=\"tint\",e.Tooltip=\"tooltip\",e.Translate=\"translate\",e.Trash=\"trash\",e.TrendDown=\"trend-down\",e.TrendUp=\"trend-up\",e.TriangleUp=\"triangle-up\",e.TriangleDown=\"triangle-down\",e.Undo=\"undo\",e.Unfold=\"unfold\",e.UnlockedFilled=\"unlocked-filled\",e.Unpin=\"unpin\",e.UploadFile=\"upload-file\",e.Upload=\"upload\",e.Usb=\"usb\",e.UserCheck=\"user-check\",e.UserCircleAdd=\"user-circle-add\",e.UserCircleRemove=\"user-circle-remove\",e.UserCircle=\"user-circle\",e.User=\"user\",e.VerifiedFilled=\"verified-filled\",e.Verified=\"verified\",e.Videocam=\"videocam\",e.ViewColumn=\"view-column\",e.ViewInAr=\"view-in-ar\",e.VolumeOff=\"volume-off\",e.VolumeUp=\"volume-up\",e.WalletFilled=\"wallet-filled\",e.Wallet=\"wallet\",e.Warning=\"warning\",e.WebTraffic=\"web-traffic\",e.Widgets=\"widgets\",e.WifiOff=\"wifi-off\",e.Wifi=\"wifi\",e.X=\"x\"}(uC||(uC={}));const lC=oC(\"Icon\"),dC=oC(\"Container\"),fC=oC(\"Banner\"),pC=oC(\"Heading\"),hC=oC(\"Address\"),gC=oC(\"Image\"),yC=oC(\"Footer\"),mC=oC(\"Button\"),bC='<svg width=\"16\" height=\"16\" viewBox=\"0 0 96 96\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"96\" height=\"96\" fill=\"#FF060A\"/><g clip-path=\"url(#clip0_7875_4963)\"><path d=\"M75.7883 36.0541C72.9706 33.4525 69.0729 29.4796 65.8984 26.662L65.7105 26.5305C65.398 26.2795 65.0456 26.0827 64.668 25.9482C57.0134 24.5206 21.3891 17.8616 20.6941 17.9461C20.4993 17.9734 20.3132 18.044 20.1493 18.1527L19.9709 18.2936C19.7512 18.5168 19.5843 18.7864 19.4825 19.0826L19.4355 19.2047V19.8715V19.9748C23.446 31.142 39.2811 67.7243 42.3993 76.3087C42.5871 76.891 42.944 77.9993 43.6109 78.0557H43.7611C44.118 78.0557 45.6396 76.0457 45.6396 76.0457C45.6396 76.0457 72.8391 43.0606 75.591 39.548C75.9472 39.1153 76.2617 38.6499 76.5302 38.1579C76.5988 37.7731 76.5665 37.377 76.4364 37.0083C76.3064 36.6396 76.0831 36.3109 75.7883 36.0541ZM52.6179 39.8955L64.2266 30.2686L71.0358 36.5425L52.6179 39.8955ZM48.1097 39.2662L28.1233 22.8864L60.4603 28.8504L48.1097 39.2662ZM49.913 43.5584L70.369 40.2618L46.9826 68.4381L49.913 43.5584ZM25.4089 24.5206L46.4379 42.3656L43.3948 68.4569L25.4089 24.5206Z\" fill=\"white\"/></g><defs><clipPath id=\"clip0_7875_4963\"><rect width=\"60.1096\" height=\"60.1096\" fill=\"white\" transform=\"translate(17.9453 17.9453)\"/></clipPath></defs></svg>';function wC(e){if(!e)return\"Unknown\";if(\"metamask\"===e.toLowerCase())return\"MetaMask\";try{return new URL(e).hostname}catch{return e}}const vC=JSON.parse('{\"D\":{\"confirmation.transaction.title\":{\"message\":\"Transaction request\"},\"confirmation.estimatedChanges.title\":{\"message\":\"Estimated changes\"},\"confirmation.estimatedChanges.tooltip\":{\"message\":\"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee.\"},\"confirmation.estimatedChanges.send\":{\"message\":\"You send\"},\"confirmation.bandwidthConsumed\":{\"message\":\"Bandwidth consumed\"},\"confirmation.estimatedChanges.receive\":{\"message\":\"You receive\"},\"confirmation.origin\":{\"message\":\"Request from\"},\"confirmation.origin.tooltip\":{\"message\":\"This is the site asking for your confirmation.\"},\"confirmation.from\":{\"message\":\"From\"},\"confirmation.to\":{\"message\":\"To\"},\"confirmation.network\":{\"message\":\"Network\"},\"confirmation.transactionFee\":{\"message\":\"Network fee\"},\"confirmation.confirmButton\":{\"message\":\"Confirm\"},\"confirmation.cancelButton\":{\"message\":\"Cancel\"},\"confirmation.signMessage.title\":{\"message\":\"Sign message\"},\"confirmation.signMessage.message\":{\"message\":\"Message\"},\"confirmation.account\":{\"message\":\"Account\"},\"confirmation.signTransaction.title\":{\"message\":\"Sign transaction\"},\"confirmation.estimatedChanges.notAvailable\":{\"message\":\"Estimated changes are not available\"},\"confirmation.estimatedChanges.noChanges\":{\"message\":\"No estimated changes\"},\"confirmation.estimatedChanges.unsupportedContract\":{\"message\":\"Unsupported contract for simulation\"},\"confirmation.estimatedChanges.witnessCreate\":{\"message\":\"Registers your account as a Super Representative candidate and permanently burns 9,999 TRX.\"},\"confirmation.simulationTitleAPIError\":{\"message\":\"Because of an error, we couldn\\'t check for security alerts.\"},\"confirmation.simulationMessageAPIError\":{\"message\":\"Only continue if you trust every address involved.\"},\"confirmation.simulationErrorTitle\":{\"message\":\"This transaction was reverted during simulation.\"},\"confirmation.simulationErrorSubtitle\":{\"message\":\"{reason}\"},\"confirmation.validationErrorTitle\":{\"message\":\"This is a deceptive request\"},\"confirmation.validationErrorSubtitle\":{\"message\":\"If you approve this request, a third party known for scams will take all your assets.\"},\"confirmation.validationErrorLearnMore\":{\"message\":\"Learn more\"},\"confirmation.validationErrorSecurityAdviced\":{\"message\":\"Security advice by\"},\"transactionScan.errors.unknownError\":{\"message\":\"An unknown error occurred\"},\"transactionScan.errors.insufficientBalance\":{\"message\":\"Insufficient balance\"},\"transactionScan.errors.invalidTransaction\":{\"message\":\"Invalid transaction\"},\"transactionScan.errors.insufficientFunds\":{\"message\":\"Insufficient funds\"},\"transactionScan.errors.invalidAddress\":{\"message\":\"Invalid address\"},\"transactionScan.errors.unsupportedEIP712Message\":{\"message\":\"Unsupported method\"},\"transactionScan.errors.transactionDeadlinePassed\":{\"message\":\"Please go back and try again\"}}}'),TC=JSON.parse('{\"D\":{\"confirmation.transaction.title\":{\"message\":\"Solicitud de transacción\"},\"confirmation.estimatedChanges.title\":{\"message\":\"Cambios estimados\"},\"confirmation.estimatedChanges.tooltip\":{\"message\":\"Los cambios estimados son los que podrían producirse si sigue adelante con esta transacción. Esto es solo una predicción, no una garantía.\"},\"confirmation.estimatedChanges.send\":{\"message\":\"Usted envía\"},\"confirmation.bandwidthConsumed\":{\"message\":\"Ancho de banda consumido\"},\"confirmation.estimatedChanges.receive\":{\"message\":\"Usted recibe\"},\"confirmation.origin\":{\"message\":\"Solicitud de\"},\"confirmation.origin.tooltip\":{\"message\":\"Este es el sitio que solicita su confirmación.\"},\"confirmation.from\":{\"message\":\"De\"},\"confirmation.to\":{\"message\":\"A\"},\"confirmation.network\":{\"message\":\"Red\"},\"confirmation.transactionFee\":{\"message\":\"Tarifa de red\"},\"confirmation.confirmButton\":{\"message\":\"Confirmar\"},\"confirmation.cancelButton\":{\"message\":\"Cancelar\"},\"confirmation.signMessage.title\":{\"message\":\"Firmar mensaje\"},\"confirmation.signMessage.message\":{\"message\":\"Mensaje\"},\"confirmation.account\":{\"message\":\"Cuenta\"},\"confirmation.signTransaction.title\":{\"message\":\"Firmar transacción\"},\"confirmation.estimatedChanges.notAvailable\":{\"message\":\"Los cambios estimados no están disponibles\"},\"confirmation.estimatedChanges.noChanges\":{\"message\":\"Sin cambios estimados\"},\"confirmation.estimatedChanges.unsupportedContract\":{\"message\":\"Contrato no compatible con simulación\"},\"confirmation.estimatedChanges.witnessCreate\":{\"message\":\"Registra tu cuenta como candidato a Super Representante y quema permanentemente 9999 TRX.\"},\"confirmation.simulationTitleAPIError\":{\"message\":\"Debido a un error, no pudimos verificar alertas de seguridad.\"},\"confirmation.simulationMessageAPIError\":{\"message\":\"Solo continúe si confía en cada dirección involucrada.\"},\"confirmation.simulationErrorTitle\":{\"message\":\"Esta transacción se revirtió durante la simulación.\"},\"confirmation.simulationErrorSubtitle\":{\"message\":\"{reason}\"},\"confirmation.validationErrorTitle\":{\"message\":\"Esta es una solicitud engañosa\"},\"confirmation.validationErrorSubtitle\":{\"message\":\"Si aprueba esta solicitud, un tercero conocido por estafas tomará todos sus activos.\"},\"confirmation.validationErrorLearnMore\":{\"message\":\"Más información\"},\"confirmation.validationErrorSecurityAdviced\":{\"message\":\"Asesoramiento de seguridad por\"},\"transactionScan.errors.unknownError\":{\"message\":\"Ocurrió un error desconocido\"},\"transactionScan.errors.insufficientBalance\":{\"message\":\"Saldo insuficiente\"},\"transactionScan.errors.invalidTransaction\":{\"message\":\"Transacción inválida\"},\"transactionScan.errors.insufficientFunds\":{\"message\":\"Fondos insuficientes\"},\"transactionScan.errors.invalidAddress\":{\"message\":\"Dirección inválida\"},\"transactionScan.errors.unsupportedEIP712Message\":{\"message\":\"Método no compatible\"},\"transactionScan.errors.transactionDeadlinePassed\":{\"message\":\"Por favor, vuelva atrás e inténtelo de nuevo\"}}}'),AC={en:vC.D,es:TC.D};function EC(e){const t=AC[e]??AC.en;return(e,r)=>{let n=t?.[e]?.message??e;return r&&n&&Object.keys(r).forEach(e=>{const t=new RegExp(`\\\\{${e}\\\\}`,\"gu\");n=n.replace(t,r[e]??\"\")}),n}}const PC=oC(\"Skeleton\");function BC(e){return e===QB||e===eC}const CC=({preferences:e})=>{const t=EC(e.locale);return jB(sC,{direction:\"vertical\",children:[jB(iC,{direction:\"horizontal\",alignment:\"start\",children:[zB(aC,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges.title\")}),zB(cC,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:zB(lC,{name:\"info\"})})]}),jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(PC,{width:60}),zB(PC,{width:100})]})]})},IC=({preferences:e})=>{const t=EC(e.locale);return jB(iC,{direction:\"horizontal\",alignment:\"start\",children:[zB(aC,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges.title\")}),zB(cC,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:zB(lC,{name:\"info\"})})]})},SC=({asset:e})=>{const t=function(e){const t=new It(e);return t.isFinite()?t.toFormat({groupSize:3,groupSeparator:\",\",decimalSeparator:\".\"}):\"0\"}(e.value),r=\"out\"===e.type;return jB(iC,{direction:\"horizontal\",alignment:\"end\",children:[e.logo?zB(iC,{alignment:\"center\",center:!0,children:zB(gC,{src:e.logo,borderRadius:\"full\",height:16,width:16})}):null,jB(aC,{color:r?\"error\":\"success\",children:[r?\"-\":\"+\",t,\" \",e.symbol]})]})},WC=({changes:e,preferences:t,scanFetchStatus:r})=>{const n=EC(t.locale),o=BC(r),s=r===tC,i=r===rC;if(o)return zB(CC,{preferences:t});if(i)return jB(sC,{direction:\"vertical\",children:[zB(IC,{preferences:t}),zB(aC,{color:\"alternative\",children:n(\"confirmation.estimatedChanges.notAvailable\")})]});const a=e?.assets.filter(e=>\"out\"===e.type)??[],c=e?.assets.filter(e=>\"in\"===e.type)??[],u=a.length>0||c.length>0;return jB(sC,s&&!u?{direction:\"vertical\",children:[zB(IC,{preferences:t}),zB(aC,{color:\"alternative\",children:n(\"confirmation.estimatedChanges.noChanges\")})]}:{children:[zB(IC,{preferences:t}),a?.length>0?jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:n(\"confirmation.estimatedChanges.send\")}),zB(iC,{children:a?.map(e=>zB(SC,{asset:e}))})]}):null,c?.length>0?jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:n(\"confirmation.estimatedChanges.receive\")}),zB(iC,{children:c?.map(e=>zB(SC,{asset:e}))})]}):null]})};const xC=e=>{const{caipId:t,symbol:r,amount:n,iconUrl:o,price:s,preferences:i,priceLoading:a}=e,c=i&&s?function(e,t,r){const n=new It(e).toNumber(),[o]=r.split(\"_\");return n.toLocaleString(o,{style:\"currency\",currency:t,maximumFractionDigits:2,minimumFractionDigits:2})}((u=s,new It(n).multipliedBy(u).toString()),i.currency,i.locale):\"\";var u;const l=void 0!==i,d=l&&a,f=l&&!a&&c,p=t===Mt.BandwidthMainnet||t===Mt.BandwidthNile||t===Mt.BandwidthShasta,h=t===Mt.EnergyMainnet||t===Mt.EnergyNile||t===Mt.EnergyShasta,g=!p&&!h,y=o??'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\" width=\"16\" height=\"16\">\\n  <path fill=\"#999999\" d=\"M42.75 24c0 10.59375-8.53125 19.21875-19.125 19.21875-10.6875 0-19.21875-8.625-19.21875-19.21875 0-10.59375 8.53125-19.21875 19.21875-19.21875 10.59375 0 19.125 8.625 19.125 19.21875zM23.625 14.0625c-3.09375 0-5.90625 2.25-5.90625 5.4375 0 0.84375 0.75 1.59375 1.59375 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375 0-1.125 1.03125-2.25 2.71875-2.25 1.59375 0 2.625 1.125 2.625 2.25 0 0.5625-0.375 1.03125-1.3125 1.59375l0 0c-1.125 0.75-3 1.96875-3 4.5l0 0.46875c0 0.84375 0.75 1.59375 1.6875 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375l0-0.46875c0-0.65625 0.28125-1.125 1.40625-1.78125 1.03125-0.65625 2.8125-1.875 2.8125-4.3125 0-3.1875-2.8125-5.4375-5.8125-5.4375zM23.53125 31.875c-0.84375 0-1.59375 0.65625-1.59375 1.59375 0 0.84375 0.75 1.59375 1.59375 1.59375l0.09375 0c0.84375 0 1.59375-0.75 1.59375-1.59375 0-0.9375-0.75-1.59375-1.59375-1.59375z\"/>\\n</svg>';return jB(iC,{direction:\"horizontal\",alignment:\"center\",children:[d?zB(PC,{width:80}):null,f?zB(aC,{color:\"muted\",children:c}):null,jB(iC,{alignment:\"center\",center:!0,children:[p?zB(lC,{name:\"connect\",size:\"md\"}):null,h?zB(lC,{name:\"flash\",size:\"md\"}):null,g?zB(gC,{borderRadius:\"full\",src:y,height:16,width:16}):null]}),zB(aC,{children:`${n} ${r}`})]})},_C=({fees:e,preferences:t,tokenPrices:r={},tokenPricesFetchStatus:n=XB})=>{const o=EC(t.locale),s=BC(n),i=[...e].sort((e,t)=>{const r=\"TRX\"===e.asset.unit,n=\"TRX\"===t.asset.unit;return r&&!n?-1:!r&&n?1:0});return zB(iC,{children:i.map((e,n)=>{const i=r[e.asset.type]?.price??null;return jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[0===n?zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:o(\"confirmation.transactionFee\")}):zB(iC,{children:null}),zB(xC,{caipId:e.asset.type,amount:e.asset.amount,symbol:e.asset.unit,iconUrl:e.asset.iconUrl,price:i,preferences:t,priceLoading:s})]},`${e.asset.type}-${e.asset.unit}-${n}`)})})},RC=oC(\"Link\"),kC={GENERAL_INSUFFICIENT_FUNDS:\"transactionScan.errors.insufficientFunds\",GENERAL_INVALID_ADDRESS:\"transactionScan.errors.invalidAddress\",UNSUPPORTED_EIP712_MESSAGE:\"transactionScan.errors.unsupportedEIP712Message\"};function OC(e,t){const r=EC(t.locale);if(function(e){return!!e&&(e.type===VB||e.type===HB||Boolean(e.message?.includes(VB)))}(e))return r(\"transactionScan.errors.transactionDeadlinePassed\");const{code:n,type:o,message:s}=e,i=(n&&kC[n])??\"transactionScan.errors.unknownError\";if(s&&\"transactionScan.errors.unknownError\"===i)return s;try{return r(i)}catch{return o??n??\"Unknown error\"}}const FC={Malicious:\"danger\",Warning:\"warning\"},MC=({preferences:e,validation:t,error:r,scanFetchStatus:n})=>{const o=EC(e.locale);if(BC(n))return zB(iC,{children:zB(PC,{height:\"40px\"})});if(n===rC)return zB(fC,{title:o(\"confirmation.simulationTitleAPIError\"),severity:\"danger\",children:zB(aC,{children:o(\"confirmation.simulationMessageAPIError\")})});if(!r&&!t)return zB(iC,{children:null});if(r)return zB(fC,{title:o(\"confirmation.simulationErrorTitle\"),severity:\"warning\",children:zB(aC,{children:o(\"confirmation.simulationErrorSubtitle\",{reason:OC(r,e)})})});if(!t)return zB(iC,{children:null});const s=t?.type?FC[t.type]:void 0;return s?jB(fC,{title:o(\"confirmation.validationErrorTitle\"),severity:s,children:[zB(aC,{children:o(\"confirmation.validationErrorSubtitle\")}),zB(aC,{size:\"sm\",children:zB(RC,{href:\"https://support.metamask.io/configure/wallet/how-to-turn-on-security-alerts/\",children:o(\"confirmation.validationErrorLearnMore\")})}),jB(aC,{size:\"sm\",children:[zB(lC,{color:\"primary\",name:\"security-tick\"}),\" \",o(\"confirmation.validationErrorSecurityAdviced\"),\" \",zB(RC,{href:\"https://www.blockaid.io\",children:\"Blockaid\"})]})]}):zB(iC,{children:null})};const NC=\"confirm-sign-transaction-cancel\",UC=\"confirm-sign-transaction-confirm\";function DC(e){return{[NC]:async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),[UC]:async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}const LC=({context:e})=>{const t=EC(e.preferences.locale),{account:r,scope:n,origin:o,networkImage:s,preferences:i,scan:a,scanFetchStatus:c,fees:u,tokenPrices:l,tokenPricesFetchStatus:d,isInsufficientBalance:f}=e,p=c===QB||a?.simulationStatus===qB||f,h=r?`${n}:${r.address}`:null;let g=null;if(i.simulateOnChainActions)if(a?.simulationStatus===KB){const r=\"WitnessCreateContract\"===e.transaction.type?t(\"confirmation.estimatedChanges.witnessCreate\"):t(\"confirmation.estimatedChanges.unsupportedContract\");g=jB(sC,{direction:\"vertical\",children:[jB(iC,{direction:\"horizontal\",alignment:\"start\",children:[zB(aC,{fontWeight:\"medium\",children:t(\"confirmation.estimatedChanges.title\")}),zB(cC,{content:t(\"confirmation.estimatedChanges.tooltip\"),children:zB(lC,{name:\"info\"})})]}),zB(aC,{color:\"alternative\",children:r})]})}else g=zB(WC,{scanFetchStatus:c,changes:a?.estimatedChanges??null,preferences:i});return jB(dC,{children:[jB(iC,{children:[f?zB(fC,{title:t(\"transactionScan.errors.insufficientFunds\"),severity:\"danger\",children:zB(aC,{children:null})}):null,i.useSecurityAlerts||a?.error?zB(MC,{scanFetchStatus:c,validation:a?.validation??null,error:a?.error??null,preferences:i}):null,jB(iC,{alignment:\"center\",center:!0,children:[zB(iC,{children:null}),zB(pC,{size:\"lg\",children:t(\"confirmation.signTransaction.title\")}),zB(iC,{children:null})]}),g,jB(sC,{children:[o?jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[jB(iC,{direction:\"horizontal\",alignment:\"start\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.origin\")}),zB(cC,{content:t(\"confirmation.origin.tooltip\"),children:zB(lC,{name:\"question\",color:\"muted\"})})]}),zB(aC,{children:wC(o)})]}):null,jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.account\")}),h?zB(hC,{address:h,truncate:!0,displayName:!0,avatar:!0}):null]}),jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:t(\"confirmation.network\")}),jB(iC,{direction:\"horizontal\",alignment:\"end\",children:[zB(gC,{borderRadius:\"medium\",src:s??bC,height:16,width:16}),zB(aC,{children:qt[n].name})]})]}),zB(iC,{children:null}),zB(_C,{fees:u,preferences:i,tokenPrices:l,tokenPricesFetchStatus:d})]})]}),jB(yC,{children:[zB(mC,{name:NC,children:t(\"confirmation.cancelButton\")}),zB(mC,{name:UC,disabled:p,children:t(\"confirmation.confirmButton\")})]})]})},$C=\"confirmSignTransaction\";function zC(e,t,r){return We({baseUrl:{[Ft.Mainnet]:\"https://tronscan.org\",[Ft.Nile]:\"https://nile.tronscan.org\",[Ft.Shasta]:\"https://shasta.tronscan.org\"}[e],path:`/#/${t}/${r}`})}const jC=\"confirm-sign-and-send-transaction-cancel\",VC=\"confirm-sign-and-send-transaction-confirm\";function HC(e){return{[jC]:async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),[VC]:async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}const GC=({context:{origin:e,scope:t,fromAddress:r,toAddress:n,fees:o,preferences:s,networkImage:i,tokenPrices:a,tokenPricesFetchStatus:c,scan:u,scanFetchStatus:l}})=>{const d=EC(s.locale),f=l===QB||u?.simulationStatus===qB;let p=null;return s.simulateOnChainActions&&(p=u?.simulationStatus===KB?jB(sC,{direction:\"vertical\",children:[jB(iC,{direction:\"horizontal\",alignment:\"start\",children:[zB(aC,{fontWeight:\"medium\",children:d(\"confirmation.estimatedChanges.title\")}),zB(cC,{content:d(\"confirmation.estimatedChanges.tooltip\"),children:zB(lC,{name:\"info\"})})]}),zB(aC,{color:\"alternative\",children:d(\"confirmation.estimatedChanges.unsupportedContract\")})]}):zB(WC,{scanFetchStatus:l,changes:u?.estimatedChanges??null,preferences:s})),jB(dC,{children:[jB(iC,{children:[s.useSecurityAlerts?zB(MC,{scanFetchStatus:l,validation:u?.validation??null,error:u?.error??null,preferences:s}):null,jB(iC,{alignment:\"center\",center:!0,children:[zB(iC,{children:null}),zB(pC,{size:\"lg\",children:d(\"confirmation.transaction.title\")}),zB(iC,{children:null})]}),p,jB(sC,{children:[jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[jB(iC,{alignment:\"space-between\",direction:\"horizontal\",center:!0,children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.origin\")}),zB(cC,{content:d(\"confirmation.origin.tooltip\"),children:zB(lC,{name:\"question\",color:\"muted\"})})]}),zB(aC,{children:e})]}),zB(iC,{children:null}),jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.from\")}),zB(RC,{href:zC(t,\"address\",r??\"\"),children:zB(hC,{address:`${t}:${r}`,truncate:!0,displayName:!0,avatar:!0})})]}),zB(iC,{children:null}),n&&jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.to\")}),zB(RC,{href:zC(t,\"address\",n??\"\"),children:zB(hC,{address:`${t}:${n}`,truncate:!0,displayName:!0,avatar:!0})})]}),zB(iC,{children:null}),jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:d(\"confirmation.network\")}),jB(iC,{direction:\"horizontal\",alignment:\"center\",children:[zB(iC,{alignment:\"center\",center:!0,children:zB(gC,{borderRadius:\"medium\",src:i??bC,height:16,width:16})}),zB(aC,{children:qt[t].name})]})]}),zB(iC,{children:null}),zB(_C,{fees:o,preferences:s,tokenPrices:a,tokenPricesFetchStatus:c})]})]}),jB(yC,{children:[zB(mC,{name:jC,children:d(\"confirmation.cancelButton\")}),zB(mC,{name:VC,disabled:f,children:d(\"confirmation.confirmButton\")})]})]})},KC=\"confirmTransaction\",qC=\"onSynchronizeSelectedAccountsCronjob\",ZC=\"onSynchronizeSelectedAccounts\",YC=\"onSynchronizeAccounts\",JC=\"onSynchronizeAccount\",XC=\"onSynchronizeAccountTransactions\",QC=\"refreshConfirmationPrices\",eI=\"refreshConfirmationSend\",tI=\"refreshSignTransaction\",rI=\"onTrackTransaction\";const nI=\"signAndSendTransaction\",oI=\"confirmSend\",sI=\"computeFee\",iI=\"onAddressInput\",aI=\"onAmountInput\",cI=\"computeStakeFee\",uI=\"onStakeAmountInput\",lI=\"confirmStake\",dI=\"onUnstakeAmountInput\",fI=\"confirmUnstake\",pI=\"claimUnstakedTrx\",hI=\"claimTrxStakingRewards\",gI=\"signRewardsMessage\",yI=\"signProofOfOwnership\",mI={Required:\"Required\",Invalid:\"Invalid\",InsufficientBalance:\"InsufficientBalance\",InsufficientBalanceToCoverFee:\"InsufficientBalanceToCoverFee\"};function bI(e){return ae(JSON.stringify(e),he(e).validator)}var wI=r(1048).hp;const vI=be({transaction:fP,accountId:tP,scope:pP,options:be({visible:we(de()),type:Ae()})}),TI=be({jsonrpc:_w,id:Rw,method:bI(nI),params:vI}),AI=be({fromAccountId:tP,toAddress:gP,amount:rP,assetId:je}),EI=be({jsonrpc:_w,id:Rw,method:bI(oI),params:AI}),PI=be({value:gP}),BI=be({jsonrpc:_w,id:Rw,method:bI(iI),params:PI}),CI=be({accountId:tP,assetId:je,value:rP,toAddress:we(Ae())}),II=be({jsonrpc:_w,id:Rw,method:bI(aI),params:CI}),SI=(be({valid:de(),errors:le(be({code:fe(Object.values(mI))}))}),be({transaction:fP,accountId:tP,scope:pP,options:be({visible:we(de()),type:Ae(),feeLimit:we(me())})})),WI=be({accountId:tP,assetId:KA,value:rP}),xI=be({jsonrpc:_w,id:Rw,method:bI(uI),params:WI}),_I=be({fromAccountId:tP,assetId:KA,value:rP,options:be({purpose:fe([\"ENERGY\",\"BANDWIDTH\"]),srNodeAddress:we(gP)})}),RI=be({jsonrpc:_w,id:Rw,method:bI(lI),params:_I}),kI=be({jsonrpc:_w,id:Rw,method:bI(sI),params:SI}),OI=le(be({type:fe(Object.values(QP)),asset:JP})),FI=be({fromAccountId:tP,value:rP,options:be({purpose:fe([\"ENERGY\",\"BANDWIDTH\"])})}),MI=be({jsonrpc:_w,id:Rw,method:bI(cI),params:FI}),NI=be({accountId:tP,assetId:KA,options:be({purpose:fe([\"ENERGY\",\"BANDWIDTH\"])}),value:rP}),UI=be({jsonrpc:_w,id:Rw,method:bI(dI),params:NI}),DI=be({accountId:tP,assetId:KA,options:be({purpose:fe([\"ENERGY\",\"BANDWIDTH\"])}),value:rP}),LI=be({jsonrpc:_w,id:Rw,method:bI(fI),params:DI}),$I=be({fromAccountId:tP,assetId:KA}),zI=be({jsonrpc:_w,id:Rw,method:bI(pI),params:$I}),jI=be({fromAccountId:tP,assetId:KA}),VI=be({jsonrpc:_w,id:Rw,method:bI(hI),params:jI});function HI(e){const t=wI.from(e,\"base64\").toString(\"utf8\");if(!t.startsWith(\"rewards,\"))throw new Error('Message must start with \"rewards,\"');const r=t.split(\",\");if(3!==r.length)throw new Error(\"Message must have exactly 3 parts: rewards,{address},{timestamp}\");const[n,o,s]=r;if(\"rewards\"!==n)throw new Error('Message must start with \"rewards\"');if(!q(o,gP))throw new Error(\"Invalid Tron address\");if(!q(s,rP))throw new Error(\"Invalid timestamp format\");if(s.includes(\".\"))throw new Error(\"Invalid timestamp\");const i=parseInt(s,10);if(i<=0)throw new Error(\"Invalid timestamp\");return{address:o,timestamp:i}}const GI=ee(fP,\"RewardsMessage\",e=>{try{return HI(e),!0}catch(e){return e instanceof Error?e.message:\"Invalid rewards message\"}}),KI=be({accountId:tP,message:GI}),qI=be({jsonrpc:_w,id:Rw,method:bI(gI),params:KI}),ZI=\"metamask:proof-of-ownership:\";function YI(e){if(!e.startsWith(ZI))throw new Error(`Message must start with \"${ZI}\"`);const t=e.slice(28),r=t.lastIndexOf(\":\");if(-1===r)throw new Error('Message must follow the format \"metamask:proof-of-ownership:{nonce}:{address}\"');const n=t.slice(0,r),o=t.slice(r+1);if(\"\"===n)throw new Error(\"Proof-of-ownership message must contain a non-empty nonce\");if(!q(o,gP))throw new Error(\"Invalid Tron address in proof-of-ownership message\");return{nonce:n,address:o}}const JI=ee(Ae(),\"ProofOfOwnershipMessage\",e=>{try{return YI(e),!0}catch(e){return e instanceof Error?e.message:\"Invalid proof-of-ownership message\"}}),XI=be({accountId:tP,message:JI}),QI=be({jsonrpc:_w,id:Rw,method:bI(yI),params:XI});var eS=r(1048).hp;const tS=be({jsonrpc:he(\"2.0\"),id:Be([Ae(),me(),he(null)]),method:Ae(),params:ve(Be([le(Ww),Te(Ae(),Ww)]))}),rS=xe(\"DerivationPath\",/^m(?:\\/\\d+'?)+$/u);var nS;!function(e){e.Bip44=\"bip44\"}(nS||(nS={}));const oS=be({type:he(`${nS.Bip44}`),scopes:le($e),derivationPath:rS}),sS=be({limit:me(),next:ve(ye(Ae()))}),iS=be({type:he(\"bip44:derive-path\"),entropySource:Ae(),derivationPath:rS}),aS=be({type:he(\"bip44:derive-index\"),entropySource:Ae(),groupIndex:me()}),cS=be({type:he(\"bip44:discover\"),entropySource:Ae(),groupIndex:me()}),uS=be({type:he(\"bip44:derive-index-range\"),entropySource:Ae(),range:be({from:me(),to:me()})}),lS=Pe({type:he(\"custom\")}),dS=be({type:he(\"private-key:import\"),privateKey:ie(Ae()),encoding:GE,accountType:ve(LE)});var fS;!function(e){e.Bip44DerivePath=\"bip44:derive-path\",e.Bip44DeriveIndex=\"bip44:derive-index\",e.Bip44DeriveIndexRange=\"bip44:derive-index-range\",e.Bip44Discover=\"bip44:discover\",e.PrivateKeyImport=\"private-key:import\",e.Custom=\"custom\"}(fS||(fS={}));const pS=IE(e=>{const t=e?.type;switch(t){case fS.Bip44DerivePath:return iS;case fS.Bip44DeriveIndex:return aS;case fS.Bip44DeriveIndexRange:return uS;case fS.Bip44Discover:return cS;case fS.PrivateKeyImport:return dS;case fS.Custom:return lS;default:return iS}});var hS;!function(e){e.CreateAccount=\"keyring_createAccount\",e.CreateAccounts=\"keyring_createAccounts\",e.DeleteAccount=\"keyring_deleteAccount\",e.DiscoverAccounts=\"keyring_discoverAccounts\",e.ExportAccount=\"keyring_exportAccount\",e.FilterAccountChains=\"keyring_filterAccountChains\",e.GetAccount=\"keyring_getAccount\",e.ListAccounts=\"keyring_listAccounts\",e.UpdateAccount=\"keyring_updateAccount\",e.ApproveRequest=\"keyring_approveRequest\",e.GetRequest=\"keyring_getRequest\",e.ListRequests=\"keyring_listRequests\",e.RejectRequest=\"keyring_rejectRequest\",e.SubmitRequest=\"keyring_submitRequest\",e.GetAccountBalances=\"keyring_getAccountBalances\",e.ListAccountAssets=\"keyring_listAccountAssets\",e.ListAccountTransactions=\"keyring_listAccountTransactions\",e.SetSelectedAccounts=\"keyring_setSelectedAccounts\",e.ResolveAccountAddress=\"keyring_resolveAccountAddress\"}(hS||(hS={}));const gS={jsonrpc:he(\"2.0\"),id:Be([Ae(),me(),he(null)])},yS=(be({...gS,method:he(\"keyring_listAccounts\")}),le($E),be({...gS,method:he(\"keyring_getAccount\"),params:be({id:EE})}),be({...gS,method:he(\"keyring_createAccount\"),params:be({options:Te(Ae(),Ww)})}),be({...gS,method:he(\"keyring_createAccounts\"),params:be({options:pS})}),le($E),be({...gS,method:he(\"keyring_setSelectedAccounts\"),params:be({accounts:le(Ae())})}),he(null),be({...gS,method:he(\"keyring_discoverAccounts\"),params:be({scopes:le($e),entropySource:Ae(),groupIndex:me()})}),le(oS),be({...gS,method:he(\"keyring_listAccountTransactions\"),params:be({id:EE,pagination:sS})})),mS=be({...gS,method:he(\"keyring_listAccountAssets\"),params:be({id:EE})}),bS=le(He);be({...gS,method:he(`${hS.GetAccountBalances}`),params:be({id:EE,assets:le(je)})}),Te(je,KP),be({...gS,method:he(\"keyring_resolveAccountAddress\"),params:be({scope:$e,request:tS})}),ye(be({address:ze})),be({...gS,method:he(\"keyring_filterAccountChains\"),params:be({id:EE,chains:le(Ae())})}),le(Ae()),be({...gS,method:he(\"keyring_updateAccount\"),params:be({account:$E})}),he(null),be({...gS,method:he(\"keyring_deleteAccount\"),params:be({id:EE})}),he(null),be({...gS,method:he(\"keyring_exportAccount\"),params:be({id:EE})}),be({...gS,method:he(\"keyring_listRequests\")}),le(VE),be({...gS,method:he(\"keyring_getRequest\"),params:be({id:EE})}),be({...gS,method:he(\"keyring_submitRequest\"),params:VE}),be({...gS,method:he(\"keyring_approveRequest\"),params:be({id:EE,data:Te(Ae(),Ww)})}),he(null),be({...gS,method:he(\"keyring_rejectRequest\"),params:be({id:EE})}),he(null);const wS={GetAccounts:\"keyring_getAccounts\",CreateAccounts:\"keyring_createAccounts\",GetAccount:\"keyring_getAccount\",DeleteAccount:\"keyring_deleteAccount\",ExportAccount:\"keyring_exportAccount\",SubmitRequest:\"keyring_submitRequest\"};const vS={jsonrpc:he(\"2.0\"),id:Be([Ae(),me(),he(null)])},TS=be({...vS,method:he(`${wS.GetAccounts}`)}),AS=(le($E),be({...vS,method:he(`${wS.GetAccount}`),params:be({id:EE})})),ES=be({...vS,method:he(`${wS.CreateAccounts}`),params:pS}),PS=(le($E),be({...vS,method:he(`${wS.DeleteAccount}`),params:be({id:EE})})),BS=(he(null),be({...vS,method:he(`${wS.ExportAccount}`),params:be({id:EE,options:ve(ZE)})})),CS=be({...vS,method:he(`${wS.SubmitRequest}`),params:VE}),IS=be({address:ze});const SS={...wS,SetSelectedAccounts:\"keyring_setSelectedAccounts\",GetAccountTransactions:\"keyring_getAccountTransactions\",GetAccountAssets:\"keyring_getAccountAssets\",GetAccountBalances:\"keyring_getAccountBalances\",ResolveAccountAddress:\"keyring_resolveAccountAddress\"};const WS={jsonrpc:he(\"2.0\"),id:Be([Ae(),me(),he(null)])},xS=be({...WS,method:he(`${SS.SetSelectedAccounts}`),params:be({accounts:le(Ae())})}),_S=(he(null),be({...WS,method:he(`${SS.GetAccountTransactions}`),params:be({id:EE,pagination:sS})})),RS=be({...WS,method:he(`${SS.GetAccountAssets}`),params:be({id:EE})}),kS=(le(He),be({...WS,method:he(`${SS.GetAccountBalances}`),params:be({id:EE,assets:le(je)})})),OS=(Te(je,KP),be({...WS,method:he(`${SS.ResolveAccountAddress}`),params:be({scope:$e,request:tS})}));ye(IS);function FS(e){if(ww(e)&&\"serialize\"in e&&\"function\"==typeof e.serialize){const t=e.serialize();return Nw(t)&&function(e){return e.code===gv&&e.message===yv}(t)}return!1}class MS extends Rv{constructor(e){super(`Method not supported: ${e}`)}}async function NS(e,t){try{return await async function(e,t){switch(G(t,tS),t.method){case`${wS.GetAccounts}`:return G(t,TS),e.getAccounts();case`${wS.GetAccount}`:return G(t,AS),e.getAccount(t.params.id);case`${wS.CreateAccounts}`:return G(t,ES),e.createAccounts(t.params);case`${wS.DeleteAccount}`:return G(t,PS),e.deleteAccount(t.params.id);case`${wS.ExportAccount}`:if(void 0===e.exportAccount)throw new MS(t.method);return G(t,BS),e.exportAccount(t.params.id,t.params.options);case`${wS.SubmitRequest}`:return G(t,CS),e.submitRequest(t.params);case`${SS.SetSelectedAccounts}`:if(void 0===e.setSelectedAccounts)throw new MS(t.method);return G(t,xS),e.setSelectedAccounts(t.params.accounts);case`${hS.ListAccountTransactions}`:if(void 0===e.getAccountTransactions)throw new MS(t.method);return G(t,yS),e.getAccountTransactions(t.params.id,t.params.pagination);case`${SS.GetAccountTransactions}`:if(void 0===e.getAccountTransactions)throw new MS(t.method);return G(t,_S),e.getAccountTransactions(t.params.id,t.params.pagination);case`${hS.ListAccountAssets}`:if(void 0===e.getAccountAssets)throw new MS(t.method);return G(t,mS),e.getAccountAssets(t.params.id);case`${SS.GetAccountAssets}`:if(void 0===e.getAccountAssets)throw new MS(t.method);return G(t,RS),e.getAccountAssets(t.params.id);case`${SS.GetAccountBalances}`:if(void 0===e.getAccountBalances)throw new MS(t.method);return G(t,kS),e.getAccountBalances(t.params.id,t.params.assets);case`${SS.ResolveAccountAddress}`:if(void 0===e.resolveAccountAddress)throw new MS(t.method);return G(t,OS),e.resolveAccountAddress(t.params.scope,t.params.request);default:throw new MS(t.method)}}(e,t)}catch(e){if(FS(e))throw e;const t=e instanceof Error&&\"string\"==typeof e.message?e.message:\"An unknown error occurred while handling the keyring (v2) request\";throw new Error(t)}}const US=(e,t,r)=>{if(!e)throw new Dv(\"Origin not found\");if(!r.get(e)?.has(t))throw new Dv(\"Permission denied\")};function DS(e){const{id:t,address:r,type:n,options:o,methods:s,scopes:i}=e;return{id:t,address:r,type:n,options:o,methods:s,scopes:i}}const LS=[\"http://localhost:3000\"],$S=(hS.ListAccounts,hS.CreateAccount,hS.DiscoverAccounts,hS.ListAccountTransactions,hS.ListAccountAssets,(({dappMethods:e,metamaskMethods:t,origins:r=LS,metamaskOrigin:n=\"metamask\"})=>{const o=new Map,s=new Set(e);for(const e of r)o.set(e,s);return o.set(n,new Set(t)),o})({dappMethods:[],metamaskMethods:[SS.GetAccounts,SS.GetAccount,SS.CreateAccounts,SS.DeleteAccount,SS.GetAccountBalances,SS.SubmitRequest,SS.GetAccountTransactions,SS.GetAccountAssets,SS.ResolveAccountAddress,SS.SetSelectedAccounts,SS.ExportAccount,hS.ListAccounts,hS.CreateAccount,hS.DiscoverAccounts,hS.ListAccountTransactions,hS.ListAccountAssets],origins:[\"https://portfolio.metamask.io\"]})),zS=new HA({logger:or});const jS=async e=>{try{return await e()}catch(e){(function(e){return!(e instanceof $v)})(e)&&await zS.trackError(e);const t=VA(e)?e:new Ev(e);throw or.error({error:t},`[SnapError] ${JSON.stringify(t.toJSON(),null,2)}`),t}};function VS(e,t){try{G(e,t)}catch(e){throw new Sv(e.message)}}function HS(e,t){try{G(e,t)}catch(e){throw new Error(`Invalid Response: ${e.message}`,{cause:e})}}const GS=\"confirm-sign-message-cancel\",KS=\"confirm-sign-message-confirm\";function qS(e){return{[GS]:async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),[KS]:async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}function ZS(e){return`${e.entropySource}:${e.index}`}function YS(e,t){const r=new Set(Object.values(e).map(ZS)),n={};for(const[e,o]of Object.entries(t)){const t=ZS(o);r.has(t)||(n[e]=o,r.add(t))}return{merged:{...e,...n},added:n}}var JS;!function(e){e.GetSelectedAccounts=\"getSelectedAccounts\"}(JS||(JS={}));be({method:he(JS.GetSelectedAccounts)});const XS=le(Ae());async function QS(e,t,r){await e.request({method:\"snap_manageAccounts\",params:{method:t,params:{...r}}})}async function eW(e){const t=await e.request({method:\"snap_manageAccounts\",params:{method:JS.GetSelectedAccounts}});return G(t,XS),t}var tW,rW=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};class nW{constructor(){tW.set(this,new Map)}async run(e,t){const r=rW(this,tW,\"f\").get(e);if(r)return r;const n=Promise.resolve().then(t).finally(()=>{rW(this,tW,\"f\").delete(e)});return rW(this,tW,\"f\").set(e,n),n}}function oW(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function sW(e,...t){if(!(e instanceof Uint8Array))throw new Error(\"Expected Uint8Array\");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function iW(e){if(\"function\"!=typeof e||\"function\"!=typeof e.create)throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");oW(e.outputLen),oW(e.blockLen)}function aW(e,t=!0){if(e.destroyed)throw new Error(\"Hash instance has been destroyed\");if(t&&e.finished)throw new Error(\"Hash#digest() has already been called\")}function cW(e,t){sW(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}tW=new WeakMap;const uW=BigInt(2**32-1),lW=BigInt(32);function dW(e,t=!1){return t?{h:Number(e&uW),l:Number(e>>lW&uW)}:{h:0|Number(e>>lW&uW),l:0|Number(e&uW)}}function fW(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:i}=dW(e[o],t);[r[o],n[o]]=[s,i]}return[r,n]}const pW=(e,t,r)=>e<<r|t>>>32-r,hW=(e,t,r)=>t<<r|e>>>32-r,gW=(e,t,r)=>t<<r-32|e>>>64-r,yW=(e,t,r)=>e<<r-32|t>>>64-r;const mW=\"object\"==typeof globalThis&&\"crypto\"in globalThis?globalThis.crypto:void 0,bW=e=>e instanceof Uint8Array,wW=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),vW=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error(\"Non little-endian hardware is not supported\");function TW(e){if(\"string\"==typeof e&&(e=function(e){if(\"string\"!=typeof e)throw new Error(\"utf8ToBytes expected string, got \"+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!bW(e))throw new Error(\"expected Uint8Array, got \"+typeof e);return e}class AW{clone(){return this._cloneInto()}}function EW(e){const t=t=>e().update(TW(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function PW(e=32){if(mW&&\"function\"==typeof mW.getRandomValues)return mW.getRandomValues(new Uint8Array(e));throw new Error(\"crypto.getRandomValues must be defined\")}const[BW,CW,IW]=[[],[],[]],SW=BigInt(0),WW=BigInt(1),xW=BigInt(2),_W=BigInt(7),RW=BigInt(256),kW=BigInt(113);for(let e=0,t=WW,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],BW.push(2*(5*n+r)),CW.push((e+1)*(e+2)/2%64);let o=SW;for(let e=0;e<7;e++)t=(t<<WW^(t>>_W)*kW)%RW,t&xW&&(o^=WW<<(WW<<BigInt(e))-WW);IW.push(o)}const[OW,FW]=fW(IW,!0),MW=(e,t,r)=>r>32?gW(e,t,r):pW(e,t,r),NW=(e,t,r)=>r>32?yW(e,t,r):hW(e,t,r);class UW extends AW{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,oW(r),0>=this.blockLen||this.blockLen>=200)throw new Error(\"Sha3 supports only keccak-f1600 function\");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],i=r[o+1],a=MW(s,i,1)^r[n],c=NW(s,i,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=CW[r],s=MW(t,o,n),i=NW(t,o,n),a=BW[r];t=e[a],o=e[a+1],e[a]=s,e[a+1]=i}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=OW[n],e[1]^=FW[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){aW(this);const{blockLen:t,state:r}=this,n=(e=TW(e)).length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){aW(this,!1),sW(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error(\"XOF is not possible for this instance\");return this.writeInto(e)}xof(e){return oW(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(cW(e,this),this.finished)throw new Error(\"digest() was already called\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new UW(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const DW=(e,t,r)=>EW(()=>new UW(t,e,r)),LW=DW(1,136,32);function $W(e,t,r){const n=t.split(\"|\").map(e=>e.trim());for(let r=0;r<n.length;r++)switch(t){case\"any\":return;case\"bigint\":case\"boolean\":case\"number\":case\"string\":if(typeof e===t)return}const o=new Error(`invalid value for type ${t}`);throw o.code=\"INVALID_ARGUMENT\",o.argument=`value.${r}`,o.value=e,o}function zW(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&$W(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function jW(e,t){if(null==e)return\"null\";if(null==t&&(t=new Set),\"object\"==typeof e){if(t.has(e))return\"[Circular]\";t.add(e)}if(Array.isArray(e))return\"[ \"+e.map(e=>jW(e,t)).join(\", \")+\" ]\";if(e instanceof Uint8Array){const t=\"0123456789abcdef\";let r=\"0x\";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if(\"object\"==typeof e&&\"function\"==typeof e.toJSON)return jW(e.toJSON(),t);switch(typeof e){case\"boolean\":case\"number\":case\"symbol\":return e.toString();case\"bigint\":return BigInt(e).toString();case\"string\":return JSON.stringify(e);case\"object\":{const r=Object.keys(e);return r.sort(),\"{ \"+r.map(r=>`${jW(r,t)}: ${jW(e[r],t)}`).join(\", \")+\" }\"}}return\"[ COULD NOT SERIALIZE ]\"}function VW(e,t,r,n){if(!e)throw function(e,t,r){let n,o=e;{const n=[];if(r){if(\"message\"in r||\"code\"in r||\"name\"in r)throw new Error(`value will overwrite populated values: ${jW(r)}`);for(const e in r){if(\"shortMessage\"===e)continue;const t=r[e];n.push(e+\"=\"+jW(t))}}n.push(`code=${t}`),n.push(\"version=6.17.0\"),n.length&&(e+=\" (\"+n.join(\", \")+\")\")}switch(t){case\"INVALID_ARGUMENT\":n=new TypeError(e);break;case\"NUMERIC_FAULT\":case\"BUFFER_OVERRUN\":n=new RangeError(e);break;default:n=new Error(e)}return zW(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&zW(n,{shortMessage:o}),n}(t,r,n)}function HW(e,t,r,n){VW(e,t,\"INVALID_ARGUMENT\",{argument:r,value:n})}[\"NFD\",\"NFC\",\"NFKD\",\"NFKC\"].reduce((e,t)=>{try{if(\"test\"!==\"test\".normalize(t))throw new Error(\"bad\");if(\"NFD\"===t){const e=String.fromCharCode(233).normalize(\"NFD\");if(e!==String.fromCharCode(101,769))throw new Error(\"broken\")}e.push(t)}catch(e){}return e},[]);function GW(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if(\"string\"==typeof e&&e.length%2==0&&e.match(/^0x[0-9a-f]*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}HW(!1,\"invalid BytesLike value\",t||\"value\",e)}function KW(e,t){return GW(e,t,!1)}function qW(e,t){return GW(e,t,!0)}function ZW(e,t){return!(\"string\"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&((\"number\"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}const YW=\"0123456789abcdef\";function JW(e){const t=KW(e);let r=\"0x\";for(let e=0;e<t.length;e++){const n=t[e];r+=YW[(240&n)>>4]+YW[15&n]}return r}function XW(e){return\"0x\"+e.map(e=>JW(e).substring(2)).join(\"\")}function QW(e){return ZW(e,!0)?(e.length-2)/2:KW(e).length}function ex(e,t,r){const n=KW(e);VW(t>=n.length,\"padding exceeds data length\",\"BUFFER_OVERRUN\",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),JW(o)}let tx=!1;const rx=function(e){return LW(e)};let nx=rx;function ox(e){const t=KW(e,\"data\");return JW(nx(t))}ox._=rx,ox.lock=function(){tx=!0},ox.register=function(e){if(tx)throw new TypeError(\"keccak256 is locked\");nx=e},Object.freeze(ox);const sx=BigInt(0),ix=BigInt(36);function ax(e){const t=(e=e.toLowerCase()).substring(2).split(\"\"),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=KW(ox(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return\"0x\"+t.join(\"\")}const cx={};for(let e=0;e<10;e++)cx[String(e)]=String(e);for(let e=0;e<26;e++)cx[String.fromCharCode(65+e)]=String(10+e);function ux(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+\"00\").split(\"\").map(e=>cx[e]).join(\"\");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r=\"0\"+r;return r}const lx=function(){const e={};for(let t=0;t<36;t++){e[\"0123456789abcdefghijklmnopqrstuvwxyz\"[t]]=BigInt(t)}return e}();function dx(e){if(HW(\"string\"==typeof e,\"invalid address\",\"address\",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith(\"0x\")||(e=\"0x\"+e);const t=ax(e);return HW(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,\"bad address checksum\",\"address\",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){HW(e.substring(2,4)===ux(e),\"bad icap checksum\",\"address\",e);let t=function(e){e=e.toLowerCase();let t=sx;for(let r=0;r<e.length;r++)t=t*ix+lx[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t=\"0\"+t;return ax(\"0x\"+t)}HW(!1,\"invalid address\",\"address\",e)}class fx extends AW{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=wW(this.buffer)}update(e){aW(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=TW(e)).length;for(let s=0;s<o;){const i=Math.min(n-this.pos,o-s);if(i===n){const t=wW(e);for(;n<=o-s;s+=n)this.process(t,s);continue}r.set(e.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){aW(this),cW(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if(\"function\"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),i=Number(r>>o&s),a=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,i,n),e.setUint32(t+u,a,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const i=wW(e),a=this.outputLen;if(a%4)throw new Error(\"_sha2: outputLen should be aligned to 32bit\");const c=a/4,u=this.get();if(c>u.length)throw new Error(\"_sha2: outputLen bigger than state\");for(let e=0;e<c;e++)i.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:i}=this;return e.length=n,e.pos=i,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const px=(e,t,r)=>e&t^~e&r,hx=(e,t,r)=>e&t^e&r^t&r,gx=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),yx=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),mx=new Uint32Array(64);class bx extends fx{constructor(){super(64,32,8,!1),this.A=0|yx[0],this.B=0|yx[1],this.C=0|yx[2],this.D=0|yx[3],this.E=0|yx[4],this.F=0|yx[5],this.G=0|yx[6],this.H=0|yx[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)mx[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=mx[e-15],r=mx[e-2],n=vW(t,7)^vW(t,18)^t>>>3,o=vW(r,17)^vW(r,19)^r>>>10;mx[e]=o+mx[e-7]+n+mx[e-16]|0}let{A:r,B:n,C:o,D:s,E:i,F:a,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(vW(i,6)^vW(i,11)^vW(i,25))+px(i,a,c)+gx[e]+mx[e]|0,l=(vW(r,2)^vW(r,13)^vW(r,22))+hx(r,n,o)|0;u=c,c=a,a=i,i=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,i=i+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,i,a,c,u)}roundClean(){mx.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const wx=EW(()=>new bx),vx=(BigInt(0),BigInt(1)),Tx=BigInt(2),Ax=e=>e instanceof Uint8Array,Ex=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,\"0\"));function Px(e){if(!Ax(e))throw new Error(\"Uint8Array expected\");let t=\"\";for(let r=0;r<e.length;r++)t+=Ex[e[r]];return t}function Bx(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return BigInt(\"\"===e?\"0\":`0x${e}`)}function Cx(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);const t=e.length;if(t%2)throw new Error(\"padded hex string expected, got unpadded hex of length \"+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),s=Number.parseInt(o,16);if(Number.isNaN(s)||s<0)throw new Error(\"Invalid byte sequence\");r[t]=s}return r}function Ix(e){return Bx(Px(e))}function Sx(e){if(!Ax(e))throw new Error(\"Uint8Array expected\");return Bx(Px(Uint8Array.from(e).reverse()))}function Wx(e,t){return Cx(e.toString(16).padStart(2*t,\"0\"))}function xx(e,t){return Wx(e,t).reverse()}function _x(e,t,r){let n;if(\"string\"==typeof t)try{n=Cx(t)}catch(r){throw new Error(`${e} must be valid hex string, got \"${t}\". Cause: ${r}`)}else{if(!Ax(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function Rx(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!Ax(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}const kx=e=>(Tx<<BigInt(e-1))-vx,Ox=e=>new Uint8Array(e),Fx=e=>Uint8Array.from(e);function Mx(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");let n=Ox(e),o=Ox(e),s=0;const i=()=>{n.fill(1),o.fill(0),s=0},a=(...e)=>r(o,n,...e),c=(e=Ox())=>{o=a(Fx([0]),e),n=a(),0!==e.length&&(o=a(Fx([1]),e),n=a())},u=()=>{if(s++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return Rx(...r)};return(e,t)=>{let r;for(i(),c(e);!(r=t(u()));)c();return i(),r}}const Nx={bigint:e=>\"bigint\"==typeof e,function:e=>\"function\"==typeof e,boolean:e=>\"boolean\"==typeof e,string:e=>\"string\"==typeof e,stringOrUint8Array:e=>\"string\"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>\"function\"==typeof e&&Number.isSafeInteger(e.outputLen)};function Ux(e,t,r={}){const n=(t,r,n)=>{const o=Nx[r];if(\"function\"!=typeof o)throw new Error(`Invalid validator \"${r}\", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const Dx=BigInt(0),Lx=BigInt(1),$x=BigInt(2),zx=BigInt(3),jx=BigInt(4),Vx=BigInt(5),Hx=BigInt(8);BigInt(9),BigInt(16);function Gx(e,t){const r=e%t;return r>=Dx?r:t+r}function Kx(e,t,r){if(r<=Dx||t<Dx)throw new Error(\"Expected power/modulo > 0\");if(r===Lx)return Dx;let n=Lx;for(;t>Dx;)t&Lx&&(n=n*e%r),e=e*e%r,t>>=Lx;return n}function qx(e,t,r){let n=e;for(;t-- >Dx;)n*=n,n%=r;return n}function Zx(e,t){if(e===Dx||t<=Dx)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Gx(e,t),n=t,o=Dx,s=Lx,i=Lx,a=Dx;for(;r!==Dx;){const e=n/r,t=n%r,c=o-i*e,u=s-a*e;n=r,r=t,o=i,s=a,i=c,a=u}if(n!==Lx)throw new Error(\"invert: does not exist\");return Gx(o,t)}function Yx(e){if(e%jx===zx){const t=(e+Lx)/jx;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}if(e%Hx===Vx){const t=(e-Vx)/Hx;return function(e,r){const n=e.mul(r,$x),o=e.pow(n,t),s=e.mul(r,o),i=e.mul(e.mul(s,$x),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error(\"Cannot find square root\");return a}}return function(e){const t=(e-Lx)/$x;let r,n,o;for(r=e-Lx,n=0;r%$x===Dx;r/=$x,n++);for(o=$x;o<e&&Kx(o,t,e)!==e-Lx;o++);if(1===n){const t=(e+Lx)/jx;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error(\"Cannot find square root\");return n}}const s=(r+Lx)/$x;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error(\"Cannot find square root\");let a=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(i,s),l=e.pow(i,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,Lx<<BigInt(a-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),a=t}return u}}(e)}const Jx=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function Xx(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Qx(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function e_(e){const t=Qx(e);return t+Math.ceil(t/2)}class t_ extends AW{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,iW(e);const r=TW(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return aW(this),this.iHash.update(e),this}digestInto(e){aW(this),sW(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:i}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=i,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const r_=(e,t,r)=>new t_(e,t).update(r).digest();r_.create=(e,t)=>new t_(e,t);const n_=BigInt(0),o_=BigInt(1);function s_(e){return function(e){const t=Jx.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"isSafeInteger\",BITS:\"isSafeInteger\"});Ux(e,t)}(e.Fp),Ux(e,{n:\"bigint\",h:\"bigint\",Gx:\"field\",Gy:\"field\"},{nBitLength:\"isSafeInteger\",nByteLength:\"isSafeInteger\"}),Object.freeze({...Xx(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:i_,aT:a_}=w,c_={Err:class extends Error{constructor(e=\"\"){super(e)}},_parseInt(e){const{Err:t}=c_;if(e.length<2||2!==e[0])throw new t(\"Invalid signature integer tag\");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t(\"Invalid signature integer: wrong length\");if(128&n[0])throw new t(\"Invalid signature integer: negative\");if(0===n[0]&&!(128&n[1]))throw new t(\"Invalid signature integer: unnecessary leading zero\");return{d:i_(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=c_,r=\"string\"==typeof e?a_(e):e;if(!(r instanceof Uint8Array))throw new Error(\"ui8a expected\");let n=r.length;if(n<2||48!=r[0])throw new t(\"Invalid signature tag\");if(r[1]!==n-2)throw new t(\"Invalid signature: incorrect length\");const{d:o,l:s}=c_._parseInt(r.subarray(2)),{d:i,l:a}=c_._parseInt(s);if(a.length)throw new t(\"Invalid signature: left bytes after parsing\");return{r:o,s:i}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?\"00\"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,i=o.length/2,a=r(s),c=r(i);return`30${r(i+s+4)}02${c}${o}02${a}${n}`}},u_=BigInt(0),l_=BigInt(1),d_=(BigInt(2),BigInt(3));BigInt(4);function f_(e){const t=function(e){const t=s_(e);Ux(t,{a:\"field\",b:\"field\"},{allowedPrivateKeyLengths:\"array\",wrapPrivateKey:\"boolean\",isTorsionFree:\"function\",clearCofactor:\"function\",allowInfinityPoint:\"boolean\",fromBytes:\"function\",toBytes:\"function\"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");if(\"object\"!=typeof r||\"bigint\"!=typeof r.beta||\"function\"!=typeof r.splitScalar)throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return Rx(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),i=r.mul(s,e);return r.add(r.add(i,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error(\"bad generator point: equation left != right\");function i(e){return\"bigint\"==typeof e&&u_<e&&e<t.n}function a(e){if(!i(e))throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&\"bigint\"!=typeof e){if(e instanceof Uint8Array&&(e=Px(e)),\"string\"!=typeof e||!r.includes(e.length))throw new Error(\"Invalid key\");e=e.padStart(2*n,\"0\")}let i;try{i=\"bigint\"==typeof e?e:Ix(_x(\"private key\",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(i=Gx(i,s)),a(i),i}const u=new Map;function l(e){if(!(e instanceof d))throw new Error(\"ProjectivePoint expected\")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error(\"x required\");if(null==t||!r.isValid(t))throw new Error(\"y required\");if(null==n||!r.isValid(n))throw new Error(\"z required\")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error(\"invalid affine point\");if(e instanceof d)throw new Error(\"projective point not allowed\");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(_x(\"pointHex\",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error(\"bad point: ZERO\")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error(\"bad point: x or y not FE\");const o=r.sqr(n),i=s(e);if(!r.eql(o,i))throw new Error(\"bad point: equation left != right\");if(!this.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error(\"Field doesn't support isOdd\")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:i,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(s,o)),u=r.eql(r.mul(n,a),r.mul(i,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,d_),{px:s,py:i,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(i,i),h=r.mul(a,a),g=r.mul(s,i);return g=r.add(g,g),l=r.mul(s,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(i,a),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:i,py:a,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,d_);let y=r.mul(n,i),m=r.mul(o,a),b=r.mul(s,c),w=r.add(n,o),v=r.add(i,a);w=r.mul(w,v),v=r.add(y,m),w=r.sub(w,v),v=r.add(n,s);let T=r.add(i,c);return v=r.mul(v,T),T=r.add(y,b),v=r.sub(v,T),T=r.add(o,s),u=r.add(a,c),T=r.mul(T,u),u=r.add(m,b),T=r.sub(T,u),p=r.mul(h,v),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),v=r.mul(g,v),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),v=r.add(v,b),y=r.mul(m,v),f=r.add(f,y),y=r.mul(T,v),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(T,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,e=>{const t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)})}multiplyUnsafe(e){const n=d.ZERO;if(e===u_)return n;if(a(e),e===l_)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:i,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;i>u_||u>u_;)i&l_&&(l=l.add(h)),u&l_&&(f=f.add(h)),h=h.double(),i>>=l_,u>>=l_;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){a(e);let n,o,s=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:a,k2:c}=i.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(a,f),f=new d(r.mul(f.px,i.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==u_&&t!==l_&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const i=r.mul(t,e),a=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error(\"invZ was invalid\");return{x:i,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l_)return!0;if(r)return r(d,this);throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l_?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return Px(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>n_;)r&o_&&(n=n.add(o)),o=o.double(),r>>=o_;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let i=e,a=i;for(let e=0;e<r;e++){a=i,s.push(a);for(let e=1;e<o;e++)a=a.add(i),s.push(a);i=a.double()}return s},wNAF(t,o,s){const{windows:i,windowSize:a}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<i;e++){const t=e*a;let n=Number(s&l);s>>=f,n>a&&(n-=d,s+=o_);const i=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[i])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:i}}function p_(e){const t=function(e){const t=s_(e);return Ux(t,{hash:\"hash\",hmac:\"function\",randomBytes:\"function\"},{bits2int:\"function\",bits2int_modN:\"function\",lowS:\"boolean\"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function i(e){return Gx(e,n)}function a(e){return Zx(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=f_({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),i=Rx;return n?i(Uint8Array.from([t.hasEvenY()?2:3]),s):i(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],i=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=Ix(i);if(!function(e){return u_<e&&e<r.ORDER}(e))throw new Error(\"Point is not on curve\");const t=l(e);let o=r.sqrt(t);return!(1&~n)!==((o&l_)===l_)&&(o=r.neg(o)),{x:e,y:o}}}}),f=e=>Px(Wx(e,t.nByteLength));function p(e){return e>n>>l_}const h=(e,t,r)=>Ix(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=_x(\"compactSignature\",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=c_.toSig(_x(\"DER\",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error(\"r must be 0 < r < CURVE.n\");if(!d(this.s))throw new Error(\"s must be 0 < s < CURVE.n\")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(_x(\"msgHash\",e));if(null==s||![0,1,2,3].includes(s))throw new Error(\"recovery id invalid\");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error(\"recovery id 2 or 3 invalid\");const d=1&s?\"03\":\"02\",p=c.fromHex(d+f(l)),h=a(l),g=i(-u*h),y=i(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error(\"point at infinify\");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Cx(this.toDERHex())}toDERHex(){return c_.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Cx(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=e_(t.n);return function(e,t,r=!1){const n=e.length,o=Qx(t),s=e_(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const i=Gx(r?Ix(e):Sx(e),t-Lx)+Lx;return r?xx(i,o):Wx(i,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=e instanceof Uint8Array,r=\"string\"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=Ix(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return i(b(e))},v=kx(t.nBitLength);function T(e){if(\"bigint\"!=typeof e)throw new Error(\"bigint expected\");if(!(u_<=e&&e<v))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Wx(e,t.nByteLength)}function A(e,n,o=E){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=_x(\"msgHash\",e),h&&(e=_x(\"prehashed msgHash\",s(e)));const m=w(e),v=u(n),A=[T(v),T(m)];if(null!=y){const e=!0===y?l(r.BYTES):y;A.push(_x(\"extraEntropy\",e))}const P=Rx(...A),B=m;return{seed:P,k2sig:function(e){const t=b(e);if(!d(t))return;const r=a(t),n=c.BASE.multiply(t).toAffine(),o=i(n.x);if(o===u_)return;const s=i(r*i(B+o*v));if(s===u_)return;let u=(n.x===o?0:2)|Number(n.y&l_),l=s;return f&&p(s)&&(l=function(e){return p(e)?i(-e):e}(s),u^=1),new g(o,l,u)}}}const E={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error(\"first arg must be private key\");if(!m(t))throw new Error(\"second arg must be public key\");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=E){const{seed:o,k2sig:s}=A(e,r,n),i=t;return Mx(i.hash.outputLen,i.nByteLength,i.hmac)(o,s)},verify:function(e,r,n,o=P){const s=e;if(r=_x(\"msgHash\",r),n=_x(\"publicKey\",n),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const{lowS:u,prehash:l}=o;let d,f;try{if(\"string\"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof c_.Err))throw e;d=g.fromCompact(s)}else{if(\"object\"!=typeof s||\"bigint\"!=typeof s.r||\"bigint\"!=typeof s.s)throw new Error(\"PARSE\");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if(\"PARSE\"===e.message)throw new Error(\"signature must be Signature instance, Uint8Array or hex string\");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=a(h),b=i(y*m),v=i(p*m),T=c.BASE.multiplyAndAddUnsafe(f,b,v)?.toAffine();return!!T&&i(T.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function h_(e){return{hash:e,hmac:(t,...r)=>r_(e,t,function(...e){const t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));let r=0;return e.forEach(e=>{if(!bW(e))throw new Error(\"Uint8Array expected\");t.set(e,r),r+=e.length}),t}(...r)),randomBytes:PW}}const g_=BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),y_=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),m_=BigInt(1),b_=BigInt(2),w_=(e,t)=>(e+t/b_)/t;function v_(e){const t=g_,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=qx(l,r,t)*l%t,f=qx(d,r,t)*l%t,p=qx(f,b_,t)*u%t,h=qx(p,o,t)*p%t,g=qx(h,s,t)*h%t,y=qx(g,a,t)*g%t,m=qx(y,c,t)*y%t,b=qx(m,a,t)*g%t,w=qx(b,r,t)*l%t,v=qx(w,i,t)*h%t,T=qx(v,n,t)*u%t,A=qx(T,b_,t);if(!T_.eql(T_.sqr(A),e))throw new Error(\"Cannot find square root\");return A}const T_=function(e,t,r=!1,n={}){if(e<=Dx)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=Xx(e,t);if(s>2048)throw new Error(\"Field lengths over 2048 bytes are not supported\");const i=Yx(e),a=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:kx(o),ZERO:Dx,ONE:Lx,create:t=>Gx(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"Invalid field element: expected bigint, got \"+typeof t);return Dx<=t&&t<e},is0:e=>e===Dx,isOdd:e=>(e&Lx)===Lx,neg:t=>Gx(-t,e),eql:(e,t)=>e===t,sqr:t=>Gx(t*t,e),add:(t,r)=>Gx(t+r,e),sub:(t,r)=>Gx(t-r,e),mul:(t,r)=>Gx(t*r,e),pow:(e,t)=>function(e,t,r){if(r<Dx)throw new Error(\"Expected power > 0\");if(r===Dx)return e.ONE;if(r===Lx)return t;let n=e.ONE,o=t;for(;r>Dx;)r&Lx&&(n=e.mul(n,o)),o=e.sqr(o),r>>=Lx;return n}(a,e,t),div:(t,r)=>Gx(t*Zx(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Zx(t,e),sqrt:n.sqrt||(e=>i(a,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n)),e.ONE),o=e.inv(n);return t.reduceRight((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n)),o),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?xx(e,s):Wx(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Sx(e):Ix(e)}});return Object.freeze(a)}(g_,void 0,void 0,{sqrt:v_}),A_=function(e,t){const r=t=>p_({...e,...h_(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:T_,n:y_,Gx:BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),Gy:BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),splitScalar:e=>{const t=y_,r=BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),n=-m_*BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\"),o=BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),s=r,i=BigInt(\"0x100000000000000000000000000000000\"),a=w_(s*e,t),c=w_(-n*e,t);let u=Gx(e-a*r-c*o,t),l=Gx(-a*n-c*s,t);const d=u>i,f=l>i;if(d&&(u=t-u),f&&(l=t-l),u>i||l>i)throw new Error(\"splitScalar: Endomorphism failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},wx);BigInt(0);A_.ProjectivePoint;const E_=BigInt(0),P_=(BigInt(1),9007199254740991);function B_(e,t){switch(typeof e){case\"bigint\":return e;case\"number\":return HW(Number.isInteger(e),\"underflow\",t||\"value\",e),HW(e>=-P_&&e<=P_,\"overflow\",t||\"value\",e),BigInt(e);case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return\"-\"===e[0]&&\"-\"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){HW(!1,`invalid BigNumberish string: ${r.message}`,t||\"value\",e)}}HW(!1,\"invalid BigNumberish value\",t||\"value\",e)}function C_(e,t){const r=B_(e,t);return VW(r>=E_,\"unsigned value cannot be negative\",\"NUMERIC_FAULT\",{fault:\"overflow\",operation:\"getUint\",value:e}),r}function I_(e,t){switch(typeof e){case\"bigint\":return HW(e>=-P_&&e<=P_,\"overflow\",t||\"value\",e),Number(e);case\"number\":return HW(Number.isInteger(e),\"underflow\",t||\"value\",e),HW(e>=-P_&&e<=P_,\"overflow\",t||\"value\",e),e;case\"string\":try{if(\"\"===e)throw new Error(\"empty string\");return I_(BigInt(e),t)}catch(r){HW(!1,`invalid numeric string: ${r.message}`,t||\"value\",e)}}HW(!1,\"invalid numeric value\",t||\"value\",e)}function S_(e,t){const r=C_(e,\"value\");let n=r.toString(16);if(null==t)n.length%2&&(n=\"0\"+n);else{const o=I_(t,\"width\");if(0===o&&r===E_)return\"0x\";for(VW(2*o>=n.length,`value exceeds width (${o} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeHex\",fault:\"overflow\",value:e});n.length<2*o;)n=\"0\"+n}return\"0x\"+n}function W_(e,t){const r=C_(e,\"value\");if(r===E_){const e=null!=t?I_(t,\"width\"):0;return new Uint8Array(e)}let n=r.toString(16);if(n.length%2&&(n=\"0\"+n),null!=t){const r=I_(t,\"width\");for(;n.length<2*r;)n=\"00\"+n;VW(2*r===n.length,`value exceeds width (${r} bytes)`,\"NUMERIC_FAULT\",{operation:\"toBeArray\",fault:\"overflow\",value:e})}const o=new Uint8Array(n.length/2);for(let e=0;e<o.length;e++){const t=2*e;o[e]=parseInt(n.substring(t,t+2),16)}return o}const x_=\"0x0000000000000000000000000000000000000000000000000000000000000000\",__=BigInt(0),R_=BigInt(1),k_=BigInt(2),O_=BigInt(27),F_=BigInt(28),M_=BigInt(35),N_=BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),U_=N_/k_,D_=Symbol.for(\"nodejs.util.inspect.custom\"),L_={};function $_(e){return ex(W_(e),32,!0)}class z_{#n;#o;#s;#i;get r(){return this.#n}set r(e){HW(32===QW(e),\"invalid r\",\"value\",e),this.#n=JW(e)}get s(){return HW(parseInt(this.#o.substring(0,3))<8,\"non-canonical s; use ._s\",\"s\",this.#o),this.#o}set s(e){HW(32===QW(e),\"invalid s\",\"value\",e),this.#o=JW(e)}get _s(){return this.#o}isValid(){return BigInt(this.#o)<=U_}get v(){return this.#s}set v(e){const t=I_(e,\"value\");HW(27===t||28===t,\"invalid v\",\"v\",e),this.#s=t}get networkV(){return this.#i}get legacyChainId(){const e=this.networkV;return null==e?null:z_.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=KW(this.s);return this.yParity&&(e[0]|=128),JW(e)}get compactSerialized(){return XW([this.r,this.yParityAndS])}get serialized(){return XW([this.r,this.s,this.yParity?\"0x1c\":\"0x1b\"])}constructor(e,t,r,n){!function(e,t,r){if(null==r&&(r=\"\"),e!==t){let e=r,t=\"new\";r&&(e+=\".\",t+=\" \"+r),VW(!1,`private constructor; use ${e}from* methods`,\"UNSUPPORTED_OPERATION\",{operation:t})}}(e,L_,\"Signature\"),this.#n=t,this.#o=r,this.#s=n,this.#i=null}getCanonical(){if(this.isValid())return this;const e=N_-BigInt(this._s),t=55-this.v,r=new z_(L_,this.r,$_(e),t);return this.networkV&&(r.#i=this.networkV),r}clone(){const e=new z_(L_,this.r,this._s,this.v);return this.networkV&&(e.#i=this.networkV),e}toJSON(){const e=this.networkV;return{_type:\"signature\",networkV:null!=e?e.toString():null,r:this.r,s:this._s,v:this.v}}[D_](){return this.toString()}toString(){return this.isValid()?`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v} }`:`Signature { r: ${this.r}, s: ${this._s}, v: ${this.v}, valid: false }`}static getChainId(e){const t=B_(e,\"v\");return t==O_||t==F_?__:(HW(t>=M_,\"invalid EIP-155 v\",\"v\",e),(t-M_)/k_)}static getChainIdV(e,t){return B_(e)*k_+BigInt(35+t-27)}static getNormalizedV(e){const t=B_(e);return t===__||t===O_?27:t===R_||t===F_?28:(HW(t>=M_,\"invalid v\",\"v\",e),t&R_?27:28)}static from(e){function t(t,r){HW(t,r,\"signature\",e)}if(null==e)return new z_(L_,x_,x_,27);if(\"string\"==typeof e){const r=KW(e,\"signature\");if(64===r.length){const e=JW(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new z_(L_,e,JW(t),n)}if(65===r.length){const e=JW(r.slice(0,32)),t=JW(r.slice(32,64)),n=z_.getNormalizedV(r[64]);return new z_(L_,e,t,n)}t(!1,\"invalid raw signature length\")}if(e instanceof z_)return e.clone();const r=e.r;t(null!=r,\"missing r\");const n=$_(r),o=function(e,r){if(null!=e)return $_(e);if(null!=r){t(ZW(r,32),\"invalid yParityAndS\");const e=KW(r);return e[0]&=127,JW(e)}t(!1,\"missing s\")}(e.s,e.yParityAndS),{networkV:s,v:i}=function(e,r,n){if(null!=e){const t=B_(e);return{networkV:t>=M_?t:void 0,v:z_.getNormalizedV(t)}}if(null!=r)return t(ZW(r,32),\"invalid yParityAndS\"),{v:128&KW(r)[0]?28:27};if(null!=n){switch(I_(n,\"sig.yParity\")){case 0:return{v:27};case 1:return{v:28}}t(!1,\"invalid yParity\")}t(!1,\"missing v\")}(e.v,e.yParityAndS,e.yParity),a=new z_(L_,n,o,i);return s&&(a.#i=s),t(null==e.yParity||I_(e.yParity,\"sig.yParity\")===a.yParity,\"yParity mismatch\"),t(null==e.yParityAndS||e.yParityAndS===a.yParityAndS,\"yParityAndS mismatch\"),a}}class j_{#d;constructor(e){HW(32===QW(e),\"invalid private key\",\"privateKey\",\"[REDACTED]\"),this.#d=JW(e)}get privateKey(){return this.#d}get publicKey(){return j_.computePublicKey(this.#d)}get compressedPublicKey(){return j_.computePublicKey(this.#d,!0)}sign(e){HW(32===QW(e),\"invalid digest length\",\"digest\",e);const t=A_.sign(qW(e),qW(this.#d),{lowS:!0});return z_.from({r:S_(t.r,32),s:S_(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=j_.computePublicKey(e);return JW(A_.getSharedSecret(qW(this.#d),KW(t),!1))}static computePublicKey(e,t){let r=KW(e,\"key\");if(32===r.length){return JW(A_.getPublicKey(r,!!t))}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return JW(A_.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){HW(32===QW(e),\"invalid digest length\",\"digest\",e);const r=z_.from(t);let n=A_.Signature.fromCompact(qW(XW([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(qW(e));return HW(null!=o,\"invalid signature for digest\",\"signature\",t),\"0x\"+o.toHex(!1)}static addPoints(e,t,r){const n=A_.ProjectivePoint.fromHex(j_.computePublicKey(e).substring(2)),o=A_.ProjectivePoint.fromHex(j_.computePublicKey(t).substring(2));return\"0x\"+n.add(o).toHex(!!r)}}function V_(e){let t;return t=\"string\"==typeof e?j_.computePublicKey(e,!1):e.publicKey,dx(ox(\"0x\"+t.substring(4)).substring(26))}const H_=JSON.parse('{\"J6\":{\"t$\":{\"R\":{\"Wu\":[\"tron:728126428\"]}}}}'),G_=32,K_=4294967295,q_=\"bip32:44'\",Z_=/^\\d+$/u,Y_=/^bip32:\\d+'?$/u,J_=/^slip10:\\d+'?$/u,X_=/^cip3:\\d+'?$/u,Q_=/^bip39:([a-z]+){1}( [a-z]+){11,23}$/u,eR=2147483648;class tR extends nA{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,xT(e);const r=eA(t);if(this.iHash=e.create(),\"function\"!=typeof this.iHash.update)throw new Error(\"Expected instance of class which extends utils.Hash\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),kT(o)}update(e){return _T(this),this.iHash.update(e),this}digestInto(e){_T(this),WT(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:i}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=i,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const rR=(e,t,r)=>new tR(e,t).update(r).digest();rR.create=(e,t)=>new tR(e,t);const nR=BigInt(0),oR=BigInt(1);function sR(e,t=\"\"){if(\"boolean\"!=typeof e){throw new Error((t&&`\"${t}\"`)+\"expected boolean, got type=\"+typeof e)}return e}function iR(e,t,r=\"\"){const n=IT(e),o=e?.length,s=void 0!==t;if(!n||s&&o!==t){throw new Error((r&&`\"${r}\" `)+\"expected Uint8Array\"+(s?` of length ${t}`:\"\")+\", got \"+(n?`length=${o}`:\"type=\"+typeof e))}return e}function aR(e){const t=e.toString(16);return 1&t.length?\"0\"+t:t}function cR(e){if(\"string\"!=typeof e)throw new Error(\"hex string expected, got \"+typeof e);return\"\"===e?nR:BigInt(\"0x\"+e)}function uR(e){return cR(zT(e))}function lR(e){return WT(e),cR(zT(Uint8Array.from(e).reverse()))}function dR(e,t){return YT(e.toString(16).padStart(2*t,\"0\"))}function fR(e,t){return dR(e,t).reverse()}function pR(e,t,r){let n;if(\"string\"==typeof t)try{n=YT(t)}catch(t){throw new Error(e+\" must be hex string or Uint8Array, cause: \"+t)}else{if(!IT(t))throw new Error(e+\" must be hex string or Uint8Array\");n=Uint8Array.from(t)}const o=n.length;if(\"number\"==typeof r&&o!==r)throw new Error(e+\" of length \"+r+\" expected, got \"+o);return n}function hR(e){return Uint8Array.from(e)}const gR=e=>\"bigint\"==typeof e&&nR<=e;function yR(e,t,r,n){if(!function(e,t,r){return gR(e)&&gR(t)&&gR(r)&&t<=e&&e<r}(t,r,n))throw new Error(\"expected valid \"+e+\": \"+r+\" <= n < \"+n+\", got \"+t)}function mR(e){let t;for(t=0;e>nR;e>>=oR,t+=1);return t}const bR=e=>(oR<<BigInt(e))-oR;function wR(e,t,r={}){if(!e||\"object\"!=typeof e)throw new Error(\"expected valid options object\");function n(t,r,n){const o=e[t];if(n&&void 0===o)return;const s=typeof o;if(s!==r||null===o)throw new Error(`param \"${t}\" is invalid: expected ${r}, got ${s}`)}Object.entries(t).forEach(([e,t])=>n(e,t,!1)),Object.entries(r).forEach(([e,t])=>n(e,t,!0))}const vR=()=>{throw new Error(\"not implemented\")};function TR(e){const t=new WeakMap;return(r,...n)=>{const o=t.get(r);if(void 0!==o)return o;const s=e(r,...n);return t.set(r,s),s}}const AR=BigInt(0),ER=BigInt(1),PR=BigInt(2),BR=BigInt(3),CR=BigInt(4),IR=BigInt(5),SR=BigInt(7),WR=BigInt(8),xR=BigInt(9),_R=BigInt(16);function RR(e,t){const r=e%t;return r>=AR?r:t+r}function kR(e,t,r){let n=e;for(;t-- >AR;)n*=n,n%=r;return n}function OR(e,t){if(e===AR)throw new Error(\"invert: expected non-zero number\");if(t<=AR)throw new Error(\"invert: expected positive modulus, got \"+t);let r=RR(e,t),n=t,o=AR,s=ER,i=ER,a=AR;for(;r!==AR;){const e=n/r,t=n%r,c=o-i*e,u=s-a*e;n=r,r=t,o=i,s=a,i=c,a=u}if(n!==ER)throw new Error(\"invert: does not exist\");return RR(o,t)}function FR(e,t,r){if(!e.eql(e.sqr(t),r))throw new Error(\"Cannot find square root\")}function MR(e,t){const r=(e.ORDER+ER)/CR,n=e.pow(t,r);return FR(e,n,t),n}function NR(e,t){const r=(e.ORDER-IR)/WR,n=e.mul(t,PR),o=e.pow(n,r),s=e.mul(t,o),i=e.mul(e.mul(s,PR),o),a=e.mul(s,e.sub(i,e.ONE));return FR(e,a,t),a}function UR(e){if(e<BR)throw new Error(\"sqrt is not defined for small field\");let t=e-ER,r=0;for(;t%PR===AR;)t/=PR,r++;let n=PR;const o=GR(e);for(;1===VR(o,n);)if(n++>1e3)throw new Error(\"Cannot find square root: probably non-prime P\");if(1===r)return MR;let s=o.pow(n,t);const i=(t+ER)/PR;return function(e,n){if(e.is0(n))return n;if(1!==VR(e,n))throw new Error(\"Cannot find square root\");let o=r,a=e.mul(e.ONE,s),c=e.pow(n,t),u=e.pow(n,i);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,r=e.sqr(c);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===o)throw new Error(\"Cannot find square root\");const n=ER<<BigInt(o-t-1),s=e.pow(a,n);o=t,a=e.sqr(s),c=e.mul(c,a),u=e.mul(u,s)}return u}}function DR(e){return e%CR===BR?MR:e%WR===IR?NR:e%_R===xR?function(e){const t=GR(e),r=UR(e),n=r(t,t.neg(t.ONE)),o=r(t,n),s=r(t,t.neg(n)),i=(e+SR)/_R;return(e,t)=>{let r=e.pow(t,i),a=e.mul(r,n);const c=e.mul(r,o),u=e.mul(r,s),l=e.eql(e.sqr(a),t),d=e.eql(e.sqr(c),t);r=e.cmov(r,a,l),a=e.cmov(u,c,d);const f=e.eql(e.sqr(a),t),p=e.cmov(r,a,f);return FR(e,p,t),p}}(e):UR(e)}const LR=(e,t)=>(RR(e,t)&ER)===ER,$R=[\"create\",\"isValid\",\"is0\",\"neg\",\"inv\",\"sqrt\",\"sqr\",\"eql\",\"add\",\"sub\",\"mul\",\"pow\",\"div\",\"addN\",\"subN\",\"mulN\",\"sqrN\"];function zR(e,t,r){if(r<AR)throw new Error(\"invalid exponent, negatives unsupported\");if(r===AR)return e.ONE;if(r===ER)return t;let n=e.ONE,o=t;for(;r>AR;)r&ER&&(n=e.mul(n,o)),o=e.sqr(o),r>>=ER;return n}function jR(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),o=t.reduce((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r)),e.ONE),s=e.inv(o);return t.reduceRight((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r)),s),n}function VR(e,t){const r=(e.ORDER-ER)/PR,n=e.pow(t,r),o=e.eql(n,e.ONE),s=e.eql(n,e.ZERO),i=e.eql(n,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error(\"invalid Legendre symbol result\");return o?1:s?0:-1}function HR(e,t){void 0!==t&&ST(t);const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function GR(e,t,r=!1,n={}){if(e<=AR)throw new Error(\"invalid field: expected ORDER > 0, got \"+e);let o,s,i,a=!1;if(\"object\"==typeof t&&null!=t){if(n.sqrt||r)throw new Error(\"cannot specify opts in two arguments\");const e=t;e.BITS&&(o=e.BITS),e.sqrt&&(s=e.sqrt),\"boolean\"==typeof e.isLE&&(r=e.isLE),\"boolean\"==typeof e.modFromBytes&&(a=e.modFromBytes),i=e.allowedLengths}else\"number\"==typeof t&&(o=t),n.sqrt&&(s=n.sqrt);const{nBitLength:c,nByteLength:u}=HR(e,o);if(u>2048)throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");let l;const d=Object.freeze({ORDER:e,isLE:r,BITS:c,BYTES:u,MASK:bR(c),ZERO:AR,ONE:ER,allowedLengths:i,create:t=>RR(t,e),isValid:t=>{if(\"bigint\"!=typeof t)throw new Error(\"invalid field element: expected bigint, got \"+typeof t);return AR<=t&&t<e},is0:e=>e===AR,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&ER)===ER,neg:t=>RR(-t,e),eql:(e,t)=>e===t,sqr:t=>RR(t*t,e),add:(t,r)=>RR(t+r,e),sub:(t,r)=>RR(t-r,e),mul:(t,r)=>RR(t*r,e),pow:(e,t)=>zR(d,e,t),div:(t,r)=>RR(t*OR(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>OR(t,e),sqrt:s||(t=>(l||(l=DR(e)),l(d,t))),toBytes:e=>r?fR(e,u):dR(e,u),fromBytes:(t,n=!0)=>{if(i){if(!i.includes(t.length)||t.length>u)throw new Error(\"Field.fromBytes: expected \"+i+\" bytes, got \"+t.length);const e=new Uint8Array(u);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==u)throw new Error(\"Field.fromBytes: expected \"+u+\" bytes, got \"+t.length);let o=r?lR(t):uR(t);if(a&&(o=RR(o,e)),!n&&!d.isValid(o))throw new Error(\"invalid field element: outside of range 0..ORDER\");return o},invertBatch:e=>jR(d,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(d)}function KR(e){if(\"bigint\"!=typeof e)throw new Error(\"field order must be bigint\");const t=e.toString(2).length;return Math.ceil(t/8)}function qR(e){const t=KR(e);return t+Math.ceil(t/2)}const ZR=BigInt(0),YR=BigInt(1);function JR(e,t){const r=t.negate();return e?r:t}function XR(e,t){const r=jR(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))}function QR(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error(\"invalid window size, expected [1..\"+t+\"], got W=\"+e)}function ek(e,t){QR(e,t);const r=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:bR(e),maxNumber:r,shiftBy:BigInt(e)}}function tk(e,t,r){const{windowSize:n,mask:o,maxNumber:s,shiftBy:i}=r;let a=Number(e&o),c=e>>i;a>n&&(a-=s,c+=YR);const u=t*n;return{nextN:c,offset:u+Math.abs(a)-1,isZero:0===a,isNeg:a<0,isNegF:t%2!=0,offsetF:u}}function rk(e,t){if(!Array.isArray(e))throw new Error(\"array expected\");e.forEach((e,r)=>{if(!(e instanceof t))throw new Error(\"invalid point at index \"+r)})}function nk(e,t){if(!Array.isArray(e))throw new Error(\"array of scalars expected\");e.forEach((e,r)=>{if(!t.isValid(e))throw new Error(\"invalid scalar at index \"+r)})}const ok=new WeakMap,sk=new WeakMap;function ik(e){return sk.get(e)||1}function ak(e){if(e!==ZR)throw new Error(\"invalid wNAF\")}class ck{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>ZR;)t&YR&&(r=r.add(n)),n=n.double(),t>>=YR;return r}precomputeWindow(e,t){const{windows:r,windowSize:n}=ek(t,this.bits),o=[];let s=e,i=s;for(let e=0;e<r;e++){i=s,o.push(i);for(let e=1;e<n;e++)i=i.add(s),o.push(i);s=i.double()}return o}wNAF(e,t,r){if(!this.Fn.isValid(r))throw new Error(\"invalid scalar\");let n=this.ZERO,o=this.BASE;const s=ek(e,this.bits);for(let e=0;e<s.windows;e++){const{nextN:i,offset:a,isZero:c,isNeg:u,isNegF:l,offsetF:d}=tk(r,e,s);r=i,c?o=o.add(JR(l,t[d])):n=n.add(JR(u,t[a]))}return ak(r),{p:n,f:o}}wNAFUnsafe(e,t,r,n=this.ZERO){const o=ek(e,this.bits);for(let e=0;e<o.windows&&r!==ZR;e++){const{nextN:s,offset:i,isZero:a,isNeg:c}=tk(r,e,o);if(r=s,!a){const e=t[i];n=n.add(c?e.negate():e)}}return ak(r),n}getPrecomputes(e,t,r){let n=ok.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&(\"function\"==typeof r&&(n=r(n)),ok.set(t,n))),n}cached(e,t,r){const n=ik(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){const o=ik(e);return 1===o?this._unsafeLadder(e,t,n):this.wNAFUnsafe(o,this.getPrecomputes(o,e,r),t,n)}createCache(e,t){QR(t,this.bits),sk.set(e,t),ok.delete(e)}hasCache(e){return 1!==ik(e)}}function uk(e,t,r,n){rk(r,e),nk(n,t);const o=r.length,s=n.length;if(o!==s)throw new Error(\"arrays of points and scalars must have equal length\");const i=e.ZERO,a=mR(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const u=bR(c),l=new Array(Number(u)+1).fill(i);let d=i;for(let e=Math.floor((t.BITS-1)/c)*c;e>=0;e-=c){l.fill(i);for(let t=0;t<s;t++){const o=n[t],s=Number(o>>BigInt(e)&u);l[s]=l[s].add(r[t])}let t=i;for(let e=l.length-1,r=i;e>0;e--)r=r.add(l[e]),t=t.add(r);if(d=d.add(t),0!==e)for(let e=0;e<c;e++)d=d.double()}return d}function lk(e,t,r){if(t){if(t.ORDER!==e)throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");return function(e){const t=$R.reduce((e,t)=>(e[t]=\"function\",e),{ORDER:\"bigint\",MASK:\"bigint\",BYTES:\"number\",BITS:\"number\"});wR(e,t)}(t),t}return GR(e,{isLE:r})}function dk(e,t,r={},n){if(void 0===n&&(n=\"edwards\"===e),!t||\"object\"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of[\"p\",\"n\",\"h\"]){const r=t[e];if(!(\"bigint\"==typeof r&&r>ZR))throw new Error(`CURVE.${e} must be positive bigint`)}const o=lk(t.p,r.Fp,n),s=lk(t.n,r.Fn,n),i=[\"Gx\",\"Gy\",\"a\",\"weierstrass\"===e?\"b\":\"d\"];for(const e of i)if(!o.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:o,Fn:s}}const fk=(e,t)=>(e+(e>=0?t:-t)/wk)/t;function pk(e){if(![\"compact\",\"recovered\",\"der\"].includes(e))throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');return e}function hk(e,t){const r={};for(let n of Object.keys(t))r[n]=void 0===e[n]?t[n]:e[n];return sR(r.lowS,\"lowS\"),sR(r.prehash,\"prehash\"),void 0!==r.format&&pk(r.format),r}class gk extends Error{constructor(e=\"\"){super(e)}}const yk={Err:gk,_tlv:{encode:(e,t)=>{const{Err:r}=yk;if(e<0||e>256)throw new r(\"tlv.encode: wrong tag\");if(1&t.length)throw new r(\"tlv.encode: unpadded data\");const n=t.length/2,o=aR(n);if(o.length/2&128)throw new r(\"tlv.encode: long form length too big\");const s=n>127?aR(o.length/2|128):\"\";return aR(e)+s+o+t},decode(e,t){const{Err:r}=yk;let n=0;if(e<0||e>256)throw new r(\"tlv.encode: wrong tag\");if(t.length<2||t[n++]!==e)throw new r(\"tlv.decode: wrong tlv\");const o=t[n++];let s=0;if(!!(128&o)){const e=127&o;if(!e)throw new r(\"tlv.decode(long): indefinite length not supported\");if(e>4)throw new r(\"tlv.decode(long): byte length is too big\");const i=t.subarray(n,n+e);if(i.length!==e)throw new r(\"tlv.decode: length bytes not complete\");if(0===i[0])throw new r(\"tlv.decode(long): zero leftmost byte\");for(const e of i)s=s<<8|e;if(n+=e,s<128)throw new r(\"tlv.decode(long): not minimal encoding\")}else s=o;const i=t.subarray(n,n+s);if(i.length!==s)throw new r(\"tlv.decode: wrong value length\");return{v:i,l:t.subarray(n+s)}}},_int:{encode(e){const{Err:t}=yk;if(e<mk)throw new t(\"integer: negative integers are not allowed\");let r=aR(e);if(8&Number.parseInt(r[0],16)&&(r=\"00\"+r),1&r.length)throw new t(\"unexpected DER parsing assertion: unpadded hex\");return r},decode(e){const{Err:t}=yk;if(128&e[0])throw new t(\"invalid signature integer: negative\");if(0===e[0]&&!(128&e[1]))throw new t(\"invalid signature integer: unnecessary leading zero\");return uR(e)}},toSig(e){const{Err:t,_int:r,_tlv:n}=yk,o=pR(\"signature\",e),{v:s,l:i}=n.decode(48,o);if(i.length)throw new t(\"invalid signature: left bytes after parsing\");const{v:a,l:c}=n.decode(2,s),{v:u,l}=n.decode(2,c);if(l.length)throw new t(\"invalid signature: left bytes after parsing\");return{r:r.decode(a),s:r.decode(u)}},hexFromSig(e){const{_tlv:t,_int:r}=yk,n=t.encode(2,r.encode(e.r))+t.encode(2,r.encode(e.s));return t.encode(48,n)}},mk=BigInt(0),bk=BigInt(1),wk=BigInt(2),vk=BigInt(3),Tk=BigInt(4);function Ak(e,t){const{BYTES:r}=e;let n;if(\"bigint\"==typeof t)n=t;else{let o=pR(\"private key\",t);try{n=e.fromBytes(o)}catch(e){throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof t}`)}}if(!e.isValidNot0(n))throw new Error(\"invalid private key: out of range [1..N-1]\");return n}function Ek(e,t={}){const r=dk(\"weierstrass\",e,t),{Fp:n,Fn:o}=r;let s=r.CURVE;const{h:i,n:a}=s;wR(t,{},{allowInfinityPoint:\"boolean\",clearCofactor:\"function\",isTorsionFree:\"function\",fromBytes:\"function\",toBytes:\"function\",endo:\"object\",wrapPrivateKey:\"boolean\"});const{endo:c}=t;if(c&&(!n.is0(s.a)||\"bigint\"!=typeof c.beta||!Array.isArray(c.basises)))throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');const u=Bk(n,o);function l(){if(!n.isOdd)throw new Error(\"compression is not supported: Field does not have .isOdd()\")}const d=t.toBytes||function(e,t,r){const{x:o,y:s}=t.toAffine(),i=n.toBytes(o);if(sR(r,\"isCompressed\"),r){l();return rA(Pk(!n.isOdd(s)),i)}return rA(Uint8Array.of(4),i,n.toBytes(s))},f=t.fromBytes||function(e){iR(e,void 0,\"Point\");const{publicKey:t,publicKeyUncompressed:r}=u,o=e.length,s=e[0],i=e.subarray(1);if(o!==t||2!==s&&3!==s){if(o===r&&4===s){const e=n.BYTES,t=n.fromBytes(i.subarray(0,e)),r=n.fromBytes(i.subarray(e,2*e));if(!h(t,r))throw new Error(\"bad point: is not on curve\");return{x:t,y:r}}throw new Error(`bad point: got length ${o}, expected compressed=${t} or uncompressed=${r}`)}{const e=n.fromBytes(i);if(!n.isValid(e))throw new Error(\"bad point: is not on curve, wrong x\");const t=p(e);let r;try{r=n.sqrt(t)}catch(e){const t=e instanceof Error?\": \"+e.message:\"\";throw new Error(\"bad point: is not on curve, sqrt error\"+t)}l();return!(1&~s)!==n.isOdd(r)&&(r=n.neg(r)),{x:e,y:r}}};function p(e){const t=n.sqr(e),r=n.mul(t,e);return n.add(n.add(r,n.mul(e,s.a)),s.b)}function h(e,t){const r=n.sqr(t),o=p(e);return n.eql(r,o)}if(!h(s.Gx,s.Gy))throw new Error(\"bad curve params: generator point\");const g=n.mul(n.pow(s.a,vk),Tk),y=n.mul(n.sqr(s.b),BigInt(27));if(n.is0(n.add(g,y)))throw new Error(\"bad curve params: a or b\");function m(e,t,r=!1){if(!n.isValid(t)||r&&n.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function b(e){if(!(e instanceof E))throw new Error(\"ProjectivePoint expected\")}function w(e){if(!c||!c.basises)throw new Error(\"no endo\");return function(e,t,r){const[[n,o],[s,i]]=t,a=fk(i*e,r),c=fk(-o*e,r);let u=e-a*n-c*s,l=-a*o-c*i;const d=u<mk,f=l<mk;d&&(u=-u),f&&(l=-l);const p=bR(Math.ceil(mR(r)/2))+bk;if(u<mk||u>=p||l<mk||l>=p)throw new Error(\"splitScalar (endomorphism): failed, k=\"+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}(e,c.basises,o.ORDER)}const v=TR((e,t)=>{const{X:r,Y:o,Z:s}=e;if(n.eql(s,n.ONE))return{x:r,y:o};const i=e.is0();null==t&&(t=i?n.ONE:n.inv(s));const a=n.mul(r,t),c=n.mul(o,t),u=n.mul(s,t);if(i)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw new Error(\"invZ was invalid\");return{x:a,y:c}}),T=TR(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.Y))return;throw new Error(\"bad point: ZERO\")}const{x:r,y:o}=e.toAffine();if(!n.isValid(r)||!n.isValid(o))throw new Error(\"bad point: x or y not field elements\");if(!h(r,o))throw new Error(\"bad point: equation left != right\");if(!e.isTorsionFree())throw new Error(\"bad point: not in prime-order subgroup\");return!0});function A(e,t,r,o,s){return r=new E(n.mul(r.X,e),r.Y,r.Z),t=JR(o,t),r=JR(s,r),t.add(r)}class E{constructor(e,t,r){this.X=m(\"x\",e),this.Y=m(\"y\",t,!0),this.Z=m(\"z\",r),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){const{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw new Error(\"invalid affine point\");if(e instanceof E)throw new Error(\"projective point not allowed\");return n.is0(t)&&n.is0(r)?E.ZERO:new E(t,r,n.ONE)}static fromBytes(e){const t=E.fromAffine(f(iR(e,void 0,\"point\")));return t.assertValidity(),t}static fromHex(e){return E.fromBytes(pR(\"pointHex\",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return B.createCache(this,e),t||this.multiply(vk),this}assertValidity(){T(this)}hasEvenY(){const{y:e}=this.toAffine();if(!n.isOdd)throw new Error(\"Field doesn't support isOdd\");return!n.isOdd(e)}equals(e){b(e);const{X:t,Y:r,Z:o}=this,{X:s,Y:i,Z:a}=e,c=n.eql(n.mul(t,a),n.mul(s,o)),u=n.eql(n.mul(r,a),n.mul(i,o));return c&&u}negate(){return new E(this.X,n.neg(this.Y),this.Z)}double(){const{a:e,b:t}=s,r=n.mul(t,vk),{X:o,Y:i,Z:a}=this;let c=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(o,o),f=n.mul(i,i),p=n.mul(a,a),h=n.mul(o,i);return h=n.add(h,h),l=n.mul(o,a),l=n.add(l,l),c=n.mul(e,l),u=n.mul(r,p),u=n.add(c,u),c=n.sub(f,u),u=n.add(f,u),u=n.mul(c,u),c=n.mul(h,c),l=n.mul(r,l),p=n.mul(e,p),h=n.sub(d,p),h=n.mul(e,h),h=n.add(h,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,p),d=n.mul(d,h),u=n.add(u,d),p=n.mul(i,a),p=n.add(p,p),d=n.mul(p,h),c=n.sub(c,d),l=n.mul(p,f),l=n.add(l,l),l=n.add(l,l),new E(c,u,l)}add(e){b(e);const{X:t,Y:r,Z:o}=this,{X:i,Y:a,Z:c}=e;let u=n.ZERO,l=n.ZERO,d=n.ZERO;const f=s.a,p=n.mul(s.b,vk);let h=n.mul(t,i),g=n.mul(r,a),y=n.mul(o,c),m=n.add(t,r),w=n.add(i,a);m=n.mul(m,w),w=n.add(h,g),m=n.sub(m,w),w=n.add(t,o);let v=n.add(i,c);return w=n.mul(w,v),v=n.add(h,y),w=n.sub(w,v),v=n.add(r,o),u=n.add(a,c),v=n.mul(v,u),u=n.add(g,y),v=n.sub(v,u),d=n.mul(f,w),u=n.mul(p,y),d=n.add(u,d),u=n.sub(g,d),d=n.add(g,d),l=n.mul(u,d),g=n.add(h,h),g=n.add(g,h),y=n.mul(f,y),w=n.mul(p,w),g=n.add(g,y),y=n.sub(h,y),y=n.mul(f,y),w=n.add(w,y),h=n.mul(g,w),l=n.add(l,h),h=n.mul(v,w),u=n.mul(m,u),u=n.sub(u,h),h=n.mul(m,g),d=n.mul(v,d),d=n.add(d,h),new E(u,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(E.ZERO)}multiply(e){const{endo:r}=t;if(!o.isValidNot0(e))throw new Error(\"invalid scalar: out of range\");let n,s;const i=e=>B.cached(this,e,e=>XR(E,e));if(r){const{k1neg:t,k1:o,k2neg:a,k2:c}=w(e),{p:u,f:l}=i(o),{p:d,f}=i(c);s=l.add(f),n=A(r.beta,u,d,t,a)}else{const{p:t,f:r}=i(e);n=t,s=r}return XR(E,[n,s])[0]}multiplyUnsafe(e){const{endo:r}=t,n=this;if(!o.isValid(e))throw new Error(\"invalid scalar: out of range\");if(e===mk||n.is0())return E.ZERO;if(e===bk)return n;if(B.hasCache(this))return this.multiply(e);if(r){const{k1neg:t,k1:o,k2neg:s,k2:i}=w(e),{p1:a,p2:c}=function(e,t,r,n){let o=t,s=e.ZERO,i=e.ZERO;for(;r>ZR||n>ZR;)r&YR&&(s=s.add(o)),n&YR&&(i=i.add(o)),o=o.double(),r>>=YR,n>>=YR;return{p1:s,p2:i}}(E,n,o,i);return A(r.beta,a,c,t,s)}return B.unsafe(n,e)}multiplyAndAddUnsafe(e,t,r){const n=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(e){return v(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return i===bk||(e?e(E,this):B.unsafe(this,a).is0())}clearCofactor(){const{clearCofactor:e}=t;return i===bk?this:e?e(E,this):this.multiplyUnsafe(i)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}toBytes(e=!0){return sR(e,\"isCompressed\"),this.assertValidity(),d(E,this,e)}toHex(e=!0){return zT(this.toBytes(e))}toString(){return`<Point ${this.is0()?\"ZERO\":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return XR(E,e)}static msm(e,t){return uk(E,o,e,t)}static fromPrivateKey(e){return E.BASE.multiply(Ak(o,e))}}E.BASE=new E(s.Gx,s.Gy,n.ONE),E.ZERO=new E(n.ZERO,n.ONE,n.ZERO),E.Fp=n,E.Fn=o;const P=o.BITS,B=new ck(E,t.endo?Math.ceil(P/2):P);return E.BASE.precompute(8),E}function Pk(e){return Uint8Array.of(e?2:3)}function Bk(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Ck(e,t={}){const{Fn:r}=e,n=t.randomBytes||sA,o=Object.assign(Bk(e.Fp,r),{seed:qR(r.ORDER)});function s(e){try{return!!Ak(r,e)}catch(e){return!1}}function i(e=n(o.seed)){return function(e,t,r=!1){const n=e.length,o=KR(t),s=qR(t);if(n<16||n<s||n>1024)throw new Error(\"expected \"+s+\"-1024 bytes of input, got \"+n);const i=RR(r?lR(e):uR(e),t-ER)+ER;return r?fR(i,o):dR(i,o)}(iR(e,o.seed,\"seed\"),r.ORDER)}function a(t,n=!0){return e.BASE.multiply(Ak(r,t)).toBytes(n)}function c(t){if(\"bigint\"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:n,publicKey:s,publicKeyUncompressed:i}=o;if(r.allowedLengths||n===s)return;const a=pR(\"key\",t).length;return a===s||a===i}const u={isValidSecretKey:s,isValidPublicKey:function(t,r){const{publicKey:n,publicKeyUncompressed:s}=o;try{const o=t.length;return(!0!==r||o===n)&&((!1!==r||o===s)&&!!e.fromBytes(t))}catch(e){return!1}},randomSecretKey:i,isValidPrivateKey:s,randomPrivateKey:i,normPrivateKeyToScalar:e=>Ak(r,e),precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};return Object.freeze({getPublicKey:a,getSharedSecret:function(t,n,o=!0){if(!0===c(t))throw new Error(\"first arg must be private key\");if(!1===c(n))throw new Error(\"second arg must be public key\");const s=Ak(r,t);return e.fromHex(n).multiply(s).toBytes(o)},keygen:function(e){const t=i(e);return{secretKey:t,publicKey:a(t)}},Point:e,utils:u,lengths:o})}function Ik(e,t,r={}){xT(t),wR(r,{},{hmac:\"function\",lowS:\"boolean\",randomBytes:\"function\",bits2int:\"function\",bits2int_modN:\"function\"});const n=r.randomBytes||sA,o=r.hmac||((e,...r)=>rR(t,e,rA(...r))),{Fp:s,Fn:i}=e,{ORDER:a,BITS:c}=i,{keygen:u,getPublicKey:l,getSharedSecret:d,utils:f,lengths:p}=Ck(e,r),h={prehash:!1,lowS:\"boolean\"==typeof r.lowS&&r.lowS,format:void 0,extraEntropy:!1},g=\"compact\";function y(e){return e>a>>bk}function m(e,t){if(!i.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class b{constructor(e,t,r){this.r=m(\"r\",e),this.s=m(\"s\",t),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(e,t=g){let r;if(function(e,t){pk(t);const r=p.signature;iR(e,\"compact\"===t?r:\"recovered\"===t?r+1:void 0,`${t} signature`)}(e,t),\"der\"===t){const{r:t,s:r}=yk.toSig(iR(e));return new b(t,r)}\"recovered\"===t&&(r=e[0],t=\"compact\",e=e.subarray(1));const n=i.BYTES,o=e.subarray(0,n),s=e.subarray(n,2*n);return new b(i.fromBytes(o),i.fromBytes(s),r)}static fromHex(e,t){return this.fromBytes(YT(e),t)}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(t){const r=s.ORDER,{r:n,s:o,recovery:c}=this;if(null==c||![0,1,2,3].includes(c))throw new Error(\"recovery id invalid\");if(a*wk<r&&c>1)throw new Error(\"recovery id is ambiguous for h>1 curve\");const u=2===c||3===c?n+a:n;if(!s.isValid(u))throw new Error(\"recovery id 2 or 3 invalid\");const l=s.toBytes(u),d=e.fromBytes(rA(Pk(!(1&c)),l)),f=i.inv(u),p=v(pR(\"msgHash\",t)),h=i.create(-p*f),g=i.create(o*f),y=e.BASE.multiplyUnsafe(h).add(d.multiplyUnsafe(g));if(y.is0())throw new Error(\"point at infinify\");return y.assertValidity(),y}hasHighS(){return y(this.s)}toBytes(e=g){if(pk(e),\"der\"===e)return YT(yk.hexFromSig(this));const t=i.toBytes(this.r),r=i.toBytes(this.s);if(\"recovered\"===e){if(null==this.recovery)throw new Error(\"recovery bit must be present\");return rA(Uint8Array.of(this.recovery),t,r)}return rA(t,r)}toHex(e){return zT(this.toBytes(e))}assertValidity(){}static fromCompact(e){return b.fromBytes(pR(\"sig\",e),\"compact\")}static fromDER(e){return b.fromBytes(pR(\"sig\",e),\"der\")}normalizeS(){return this.hasHighS()?new b(this.r,i.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes(\"der\")}toDERHex(){return zT(this.toBytes(\"der\"))}toCompactRawBytes(){return this.toBytes(\"compact\")}toCompactHex(){return zT(this.toBytes(\"compact\"))}}const w=r.bits2int||function(e){if(e.length>8192)throw new Error(\"input is too large\");const t=uR(e),r=8*e.length-c;return r>0?t>>BigInt(r):t},v=r.bits2int_modN||function(e){return i.create(w(e))},T=bR(c);function A(e){return yR(\"num < 2^\"+c,e,mk,T),i.toBytes(e)}function E(e,r){return iR(e,void 0,\"message\"),r?iR(t(e),void 0,\"prehashed message\"):e}return Object.freeze({keygen:u,getPublicKey:l,getSharedSecret:d,utils:f,lengths:p,Point:e,sign:function(r,s,a={}){r=pR(\"message\",r);const{seed:c,k2sig:u}=function(t,r,o){if([\"recovered\",\"canonical\"].some(e=>e in o))throw new Error(\"sign() legacy options not supported\");const{lowS:s,prehash:a,extraEntropy:c}=hk(o,h);t=E(t,a);const u=v(t),l=Ak(i,r),d=[A(l),A(u)];if(null!=c&&!1!==c){const e=!0===c?n(p.secretKey):c;d.push(pR(\"extraEntropy\",e))}const f=rA(...d),g=u;return{seed:f,k2sig:function(t){const r=w(t);if(!i.isValidNot0(r))return;const n=i.inv(r),o=e.BASE.multiply(r).toAffine(),a=i.create(o.x);if(a===mk)return;const c=i.create(n*i.create(g+a*l));if(c===mk)return;let u=(o.x===a?0:2)|Number(o.y&bk),d=c;return s&&y(c)&&(d=i.neg(c),u^=1),new b(a,d,u)}}}(r,s,a),l=function(e,t,r){if(\"number\"!=typeof e||e<2)throw new Error(\"hashLen must be a number\");if(\"number\"!=typeof t||t<2)throw new Error(\"qByteLen must be a number\");if(\"function\"!=typeof r)throw new Error(\"hmacFn must be a function\");const n=e=>new Uint8Array(e),o=e=>Uint8Array.of(e);let s=n(e),i=n(e),a=0;const c=()=>{s.fill(1),i.fill(0),a=0},u=(...e)=>r(i,s,...e),l=(e=n(0))=>{i=u(o(0),e),s=u(),0!==e.length&&(i=u(o(1),e),s=u())},d=()=>{if(a++>=1e3)throw new Error(\"drbg: tried 1000 values\");let e=0;const r=[];for(;e<t;){s=u();const t=s.slice();r.push(t),e+=s.length}return rA(...r)};return(e,t)=>{let r;for(c(),l(e);!(r=t(d()));)l();return c(),r}}(t.outputLen,i.BYTES,o);return l(c,u)},verify:function(t,r,n,o={}){const{lowS:s,prehash:a,format:c}=hk(o,h);if(n=pR(\"publicKey\",n),r=E(pR(\"message\",r),a),\"strict\"in o)throw new Error(\"options.strict was renamed to lowS\");const u=void 0===c?function(e){let t;const r=\"string\"==typeof e||IT(e),n=!r&&null!==e&&\"object\"==typeof e&&\"bigint\"==typeof e.r&&\"bigint\"==typeof e.s;if(!r&&!n)throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");if(n)t=new b(e.r,e.s);else if(r){try{t=b.fromBytes(pR(\"sig\",e),\"der\")}catch(e){if(!(e instanceof yk.Err))throw e}if(!t)try{t=b.fromBytes(pR(\"sig\",e),\"compact\")}catch(e){return!1}}return t||!1}(t):b.fromBytes(pR(\"sig\",t),c);if(!1===u)return!1;try{const t=e.fromBytes(n);if(s&&u.hasHighS())return!1;const{r:o,s:a}=u,c=v(r),l=i.inv(a),d=i.create(c*l),f=i.create(o*l),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(f));if(p.is0())return!1;return i.create(p.x)===o}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){const{prehash:n}=hk(r,h);return t=E(t,n),b.fromBytes(e,\"recovered\").recoverPublicKey(t).toBytes()},Signature:b,hash:t})}function Sk(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp;let n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:r,Fn:GR(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function Wk(e){const{CURVE:t,curveOpts:r,hash:n,ecdsaOpts:o}=function(e){const{CURVE:t,curveOpts:r}=Sk(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}(e);return function(e,t){const r=t.Point;return Object.assign({},t,{ProjectivePoint:r,CURVE:Object.assign({},e,HR(r.Fn.ORDER,r.Fn.BITS))})}(e,Ik(Ek(t,r),n,o))}const xk={p:BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),n:BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),Gy:BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")},_k={beta:BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),basises:[[BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"),-BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],[BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"),BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]]},Rk=BigInt(2);const kk=GR(xk.p,{sqrt:function(e){const t=xk.p,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=kR(l,r,t)*l%t,f=kR(d,r,t)*l%t,p=kR(f,Rk,t)*u%t,h=kR(p,o,t)*p%t,g=kR(h,s,t)*h%t,y=kR(g,a,t)*g%t,m=kR(y,c,t)*y%t,b=kR(m,a,t)*g%t,w=kR(b,r,t)*l%t,v=kR(w,i,t)*h%t,T=kR(v,n,t)*u%t,A=kR(T,Rk,t);if(!kk.eql(kk.sqr(A),e))throw new Error(\"Cannot find square root\");return A}}),Ok=function(e,t){const r=t=>Wk({...e,hash:t});return{...r(t),create:r}}({...xk,Fp:kk,lowS:!0,endo:_k},FB);var Fk=r(6925);function Mk(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&\"Uint8Array\"===e.constructor.name}function Nk(e,...t){if(!Mk(e))throw new Error(\"Uint8Array expected\");if(t.length>0&&!t.includes(e.length))throw new Error(\"Uint8Array expected of length \"+t+\", got length=\"+e.length)}function Uk(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every(e=>\"string\"==typeof e):t.every(e=>Number.isSafeInteger(e))))}function Dk(e){if(\"function\"!=typeof e)throw new Error(\"function expected\");return!0}function Lk(e,t){if(\"string\"!=typeof t)throw new Error(`${e}: string expected`);return!0}function $k(e){if(!Number.isSafeInteger(e))throw new Error(`invalid integer: ${e}`)}function zk(e){if(!Array.isArray(e))throw new Error(\"array expected\")}function jk(e,t){if(!Uk(!0,t))throw new Error(`${e}: array of strings expected`)}function Vk(e,t){if(!Uk(!1,t))throw new Error(`${e}: array of numbers expected`)}function Hk(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map(e=>e.encode).reduceRight(r,t),decode:e.map(e=>e.decode).reduce(r,t)}}function Gk(e){const t=\"string\"==typeof e?e.split(\"\"):e,r=t.length;jk(\"alphabet\",t);const n=new Map(t.map((e,t)=>[e,t]));return{encode:n=>(zk(n),n.map(n=>{if(!Number.isSafeInteger(n)||n<0||n>=r)throw new Error(`alphabet.encode: digit index outside alphabet \"${n}\". Allowed: ${e}`);return t[n]})),decode:t=>(zk(t),t.map(t=>{Lk(\"alphabet.decode\",t);const r=n.get(t);if(void 0===r)throw new Error(`Unknown letter: \"${t}\". Allowed: ${e}`);return r}))}}function Kk(e=\"\"){return Lk(\"join\",e),{encode:t=>(jk(\"join.decode\",t),t.join(e)),decode:t=>(Lk(\"join.decode\",t),t.split(e))}}function qk(e,t=\"=\"){return $k(e),Lk(\"padding\",t),{encode(r){for(jk(\"padding.encode\",r);r.length*e%8;)r.push(t);return r},decode(r){jk(\"padding.decode\",r);let n=r.length;if(n*e%8)throw new Error(\"padding: invalid, string should have whole number of bytes\");for(;n>0&&r[n-1]===t;n--){if((n-1)*e%8==0)throw new Error(\"padding: invalid, string has too much padding\")}return r.slice(0,n)}}}function Zk(e){return Dk(e),{encode:e=>e,decode:t=>e(t)}}function Yk(e,t,r){if(t<2)throw new Error(`convertRadix: invalid from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: invalid to=${r}, base cannot be less than 2`);if(zk(e),!e.length)return[];let n=0;const o=[],s=Array.from(e,e=>{if($k(e),e<0||e>=t)throw new Error(`invalid integer: ${e}`);return e}),i=s.length;for(;;){let e=0,a=!0;for(let o=n;o<i;o++){const i=s[o],c=t*e,u=c+i;if(!Number.isSafeInteger(u)||c/t!==e||u-i!==c)throw new Error(\"convertRadix: carry overflow\");const l=u/r;e=u%r;const d=Math.floor(l);if(s[o]=d,!Number.isSafeInteger(d)||d*r+e!==u)throw new Error(\"convertRadix: carry overflow\");a&&(d?a=!1:n=o)}if(o.push(e),a)break}for(let t=0;t<e.length-1&&0===e[t];t++)o.push(0);return o.reverse()}const Jk=(e,t)=>0===t?e:Jk(t,e%t),Xk=(e,t)=>e+(t-Jk(e,t)),Qk=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function eO(e,t,r,n){if(zk(e),t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(Xk(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${Xk(t,r)}`);let o=0,s=0;const i=Qk[t],a=Qk[r]-1,c=[];for(const n of e){if($k(n),n>=i)throw new Error(`convertRadix2: invalid data word=${n} from=${t}`);if(o=o<<t|n,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=r;s-=r)c.push((o>>s-r&a)>>>0);const e=Qk[s];if(void 0===e)throw new Error(\"invalid carry\");o&=e-1}if(o=o<<r-s&a,!n&&s>=t)throw new Error(\"Excess padding\");if(!n&&o>0)throw new Error(`Non-zero padding: ${o}`);return n&&s>0&&c.push(o>>>0),c}function tO(e){$k(e);return{encode:t=>{if(!Mk(t))throw new Error(\"radix.encode input should be Uint8Array\");return Yk(Array.from(t),256,e)},decode:t=>(Vk(\"radix.decode\",t),Uint8Array.from(Yk(t,e,256)))}}function rO(e,t=!1){if($k(e),e<=0||e>32)throw new Error(\"radix2: bits should be in (0..32]\");if(Xk(8,e)>32||Xk(e,8)>32)throw new Error(\"radix2: carry overflow\");return{encode:r=>{if(!Mk(r))throw new Error(\"radix2.encode input should be Uint8Array\");return eO(Array.from(r),8,e,!t)},decode:r=>(Vk(\"radix2.decode\",r),Uint8Array.from(eO(r,e,8,t)))}}function nO(e){return Dk(e),function(...t){try{return e.apply(null,t)}catch(e){}}}function oO(e,t){return $k(e),Dk(t),{encode(r){if(!Mk(r))throw new Error(\"checksum.encode: input should be Uint8Array\");const n=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(n,r.length),o},decode(r){if(!Mk(r))throw new Error(\"checksum.decode: input should be Uint8Array\");const n=r.slice(0,-e),o=r.slice(-e),s=t(n).slice(0,e);for(let t=0;t<e;t++)if(s[t]!==o[t])throw new Error(\"Invalid checksum\");return n}}}Hk(rO(4),Gk(\"0123456789ABCDEF\"),Kk(\"\")),Hk(rO(5),Gk(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),qk(5),Kk(\"\")),Hk(rO(5),Gk(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"),Kk(\"\")),Hk(rO(5),Gk(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),qk(5),Kk(\"\")),Hk(rO(5),Gk(\"0123456789ABCDEFGHIJKLMNOPQRSTUV\"),Kk(\"\")),Hk(rO(5),Gk(\"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"),Kk(\"\"),Zk(e=>e.toUpperCase().replace(/O/g,\"0\").replace(/[IL]/g,\"1\")));const sO=\"function\"==typeof Uint8Array.from([]).toBase64&&\"function\"==typeof Uint8Array.fromBase64,iO=(e,t)=>{Lk(\"base64\",e);const r=t?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,n=t?\"base64url\":\"base64\";if(e.length>0&&!r.test(e))throw new Error(\"invalid base64\");return Uint8Array.fromBase64(e,{alphabet:n,lastChunkHandling:\"strict\"})},aO=(sO||Hk(rO(6),Gk(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),qk(6),Kk(\"\")),Hk(rO(6),Gk(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"),Kk(\"\")),sO||Hk(rO(6),Gk(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),qk(6),Kk(\"\")),Hk(rO(6),Gk(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\"),Kk(\"\")),e=>Hk(tO(58),Gk(e),Kk(\"\"))),cO=aO(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\"),uO=e=>Hk(oO(4,t=>e(e(t))),cO),lO=Hk(Gk(\"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"),Kk(\"\")),dO=[996825010,642813549,513874426,1027748829,705979059];function fO(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<dO.length;e++)1==(t>>e&1)&&(r^=dO[e]);return r}function pO(e,t,r=1){const n=e.length;let o=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);o=fO(o)^r>>5}o=fO(o);for(let t=0;t<n;t++)o=fO(o)^31&e.charCodeAt(t);for(let e of t)o=fO(o)^e;for(let e=0;e<6;e++)o=fO(o);return o^=r,lO.encode(eO([o%Qk[30]],30,5,!1))}function hO(e){const t=\"bech32\"===e?1:734539939,r=rO(5),n=r.decode,o=r.encode,s=nO(n);function i(e,r,n=90){Lk(\"bech32.encode prefix\",e),Mk(r)&&(r=Array.from(r)),Vk(\"bech32.encode\",r);const o=e.length;if(0===o)throw new TypeError(`Invalid prefix length ${o}`);const s=o+7+r.length;if(!1!==n&&s>n)throw new TypeError(`Length ${s} exceeds limit ${n}`);const i=e.toLowerCase(),a=pO(i,r,t);return`${i}1${lO.encode(r)}${a}`}function a(e,r=90){Lk(\"bech32.decode input\",e);const n=e.length;if(n<8||!1!==r&&n>r)throw new TypeError(`invalid string length: ${n} (${e}). Expected (8..${r})`);const o=e.toLowerCase();if(e!==o&&e!==e.toUpperCase())throw new Error(\"String must be lowercase or uppercase\");const s=o.lastIndexOf(\"1\");if(0===s||-1===s)throw new Error('Letter \"1\" must be present between prefix and data only');const i=o.slice(0,s),a=o.slice(s+1);if(a.length<6)throw new Error(\"Data must be at least 6 characters long\");const c=lO.decode(a).slice(0,-6),u=pO(i,c,t);if(!a.endsWith(u))throw new Error(`Invalid checksum in ${e}: expected \"${u}\"`);return{prefix:i,words:c}}return{encode:i,decode:a,encodeFromBytes:function(e,t){return i(e,o(t))},decodeToBytes:function(e){const{prefix:t,words:r}=a(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:nO(a),fromWords:n,fromWordsUnsafe:s,toWords:o}}hO(\"bech32\"),hO(\"bech32m\"),\"function\"==typeof Uint8Array.from([]).toHex&&\"function\"==typeof Uint8Array.fromHex||Hk(rO(4),Gk(\"0123456789abcdef\"),Kk(\"\"),Zk(e=>{if(\"string\"!=typeof e||e.length%2!=0)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));const gO=BigInt(0),yO=BigInt(1),mO=BigInt(2),bO=BigInt(8);class wO{constructor(e){this.ep=e}static fromBytes(e){vR()}static fromHex(e){vR()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return zT(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.init(this.ep.precompute(e,t))}toRawBytes(){return this.toBytes()}}function vO(e,t,r={}){if(\"function\"!=typeof t)throw new Error('\"hash\" function param is required');wR(r,{},{adjustScalarBytes:\"function\",randomBytes:\"function\",domain:\"function\",prehash:\"function\",mapToCurve:\"function\"});const{prehash:n}=r,{BASE:o,Fp:s,Fn:i}=e,a=r.randomBytes||sA,c=r.adjustScalarBytes||(e=>e),u=r.domain||((e,t,r)=>{if(sR(r,\"phflag\"),t.length||r)throw new Error(\"Contexts/pre-hash are not supported\");return e});function l(e){return i.create(lR(e))}function d(e){const{head:r,prefix:n,scalar:s}=function(e){const r=y.secretKey;e=pR(\"private key\",e,r);const n=pR(\"hashed private key\",t(e),2*r),o=c(n.slice(0,r));return{head:o,prefix:n.slice(r,2*r),scalar:l(o)}}(e),i=o.multiply(s),a=i.toBytes();return{head:r,prefix:n,scalar:s,point:i,pointBytes:a}}function f(e){return d(e).pointBytes}function p(e=Uint8Array.of(),...r){const o=rA(...r);return l(t(u(o,pR(\"context\",e),!!n)))}const h={zip215:!0};const g=s.BYTES,y={secretKey:g,publicKey:g,signature:2*g,seed:g};function m(e=a(y.seed)){return iR(e,y.seed,\"seed\")}const b={getExtendedPublicKey:d,randomSecretKey:m,isValidSecretKey:function(e){return IT(e)&&e.length===i.BYTES},isValidPublicKey:function(t,r){try{return!!e.fromBytes(t,r)}catch(e){return!1}},toMontgomery(t){const{y:r}=e.fromBytes(t),n=y.publicKey,o=32===n;if(!o&&57!==n)throw new Error(\"only defined for 25519 and 448\");const i=o?s.div(yO+r,yO-r):s.div(r-yO,r+yO);return s.toBytes(i)},toMontgomerySecret(e){const r=y.secretKey;iR(e,r);const n=t(e.subarray(0,r));return c(n).subarray(0,r)},randomPrivateKey:m,precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};return Object.freeze({keygen:function(e){const t=b.randomSecretKey(e);return{secretKey:t,publicKey:f(t)}},getPublicKey:f,sign:function(e,t,r={}){e=pR(\"message\",e),n&&(e=n(e));const{prefix:s,scalar:a,pointBytes:c}=d(t),u=p(r.context,s,e),l=o.multiply(u).toBytes(),f=p(r.context,l,c,e),h=i.create(u+f*a);if(!i.isValid(h))throw new Error(\"sign failed: invalid s\");return iR(rA(l,i.toBytes(h)),y.signature,\"result\")},verify:function(t,r,s,i=h){const{context:a,zip215:c}=i,u=y.signature;t=pR(\"signature\",t,u),r=pR(\"message\",r),s=pR(\"publicKey\",s,y.publicKey),void 0!==c&&sR(c,\"zip215\"),n&&(r=n(r));const l=u/2,d=t.subarray(0,l),f=lR(t.subarray(l,u));let g,m,b;try{g=e.fromBytes(s,c),m=e.fromBytes(d,c),b=o.multiplyUnsafe(f)}catch(e){return!1}if(!c&&g.isSmallOrder())return!1;const w=p(a,m.toBytes(),g.toBytes(),r);return m.add(g.multiplyUnsafe(w)).subtract(b).clearCofactor().is0()},utils:b,Point:e,lengths:y})}function TO(e){const{CURVE:t,curveOpts:r,hash:n,eddsaOpts:o}=function(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r={Fp:e.Fp,Fn:GR(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},n={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:r,hash:e.hash,eddsaOpts:n}}(e),s=function(e,t={}){const r=dk(\"edwards\",e,t,t.FpFnLE),{Fp:n,Fn:o}=r;let s=r.CURVE;const{h:i}=s;wR(t,{},{uvRatio:\"function\"});const a=mO<<BigInt(8*o.BYTES)-yO,c=e=>n.create(e),u=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(n.div(e,t))}}catch(e){return{isValid:!1,value:gO}}});if(!function(e,t,r,n){const o=e.sqr(r),s=e.sqr(n),i=e.add(e.mul(t.a,o),s),a=e.add(e.ONE,e.mul(t.d,e.mul(o,s)));return e.eql(i,a)}(n,s,s.Gx,s.Gy))throw new Error(\"bad curve params: generator point\");function l(e,t,r=!1){return yR(\"coordinate \"+e,t,r?yO:gO,a),t}function d(e){if(!(e instanceof h))throw new Error(\"ExtendedPoint expected\")}const f=TR((e,t)=>{const{X:r,Y:o,Z:s}=e,i=e.is0();null==t&&(t=i?bO:n.inv(s));const a=c(r*t),u=c(o*t),l=n.mul(s,t);if(i)return{x:gO,y:yO};if(l!==yO)throw new Error(\"invZ was invalid\");return{x:a,y:u}}),p=TR(e=>{const{a:t,d:r}=s;if(e.is0())throw new Error(\"bad point: ZERO\");const{X:n,Y:o,Z:i,T:a}=e,u=c(n*n),l=c(o*o),d=c(i*i),f=c(d*d),p=c(u*t);if(c(d*c(p+l))!==c(f+c(r*c(u*l))))throw new Error(\"bad point: equation left != right (1)\");if(c(n*o)!==c(i*a))throw new Error(\"bad point: equation left != right (2)\");return!0});class h{constructor(e,t,r,n){this.X=l(\"x\",e),this.Y=l(\"y\",t),this.Z=l(\"z\",r,!0),this.T=l(\"t\",n),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){if(e instanceof h)throw new Error(\"extended point not allowed\");const{x:t,y:r}=e||{};return l(\"x\",t),l(\"y\",r),new h(t,r,yO,c(t*r))}static fromBytes(e,t=!1){const r=n.BYTES,{a:o,d:i}=s;e=hR(iR(e,r,\"point\")),sR(t,\"zip215\");const l=hR(e),d=e[r-1];l[r-1]=-129&d;const f=lR(l),p=t?a:n.ORDER;yR(\"point.y\",f,gO,p);const g=c(f*f),y=c(g-yO),m=c(i*g-o);let{isValid:b,value:w}=u(y,m);if(!b)throw new Error(\"bad point: invalid y coordinate\");const v=(w&yO)===yO,T=!!(128&d);if(!t&&w===gO&&T)throw new Error(\"bad point: x=0 and x_0=1\");return T!==v&&(w=c(-w)),h.fromAffine({x:w,y:f})}static fromHex(e,t=!1){return h.fromBytes(pR(\"point\",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return g.createCache(this,e),t||this.multiply(mO),this}assertValidity(){p(this)}equals(e){d(e);const{X:t,Y:r,Z:n}=this,{X:o,Y:s,Z:i}=e,a=c(t*i),u=c(o*n),l=c(r*i),f=c(s*n);return a===u&&l===f}is0(){return this.equals(h.ZERO)}negate(){return new h(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:e}=s,{X:t,Y:r,Z:n}=this,o=c(t*t),i=c(r*r),a=c(mO*c(n*n)),u=c(e*o),l=t+r,d=c(c(l*l)-o-i),f=u+i,p=f-a,g=u-i,y=c(d*p),m=c(f*g),b=c(d*g),w=c(p*f);return new h(y,m,w,b)}add(e){d(e);const{a:t,d:r}=s,{X:n,Y:o,Z:i,T:a}=this,{X:u,Y:l,Z:f,T:p}=e,g=c(n*u),y=c(o*l),m=c(a*r*p),b=c(i*f),w=c((n+o)*(u+l)-g-y),v=b-m,T=b+m,A=c(y-t*g),E=c(w*v),P=c(T*A),B=c(w*A),C=c(v*T);return new h(E,P,C,B)}subtract(e){return this.add(e.negate())}multiply(e){if(!o.isValidNot0(e))throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");const{p:t,f:r}=g.cached(this,e,e=>XR(h,e));return XR(h,[t,r])[0]}multiplyUnsafe(e,t=h.ZERO){if(!o.isValid(e))throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");return e===gO?h.ZERO:this.is0()||e===yO?this:g.unsafe(this,e,e=>XR(h,e),t)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}isTorsionFree(){return g.unsafe(this,s.n).is0()}toAffine(e){return f(this,e)}clearCofactor(){return i===yO?this:this.multiplyUnsafe(i)}toBytes(){const{x:e,y:t}=this.toAffine(),r=n.toBytes(t);return r[r.length-1]|=e&yO?128:0,r}toHex(){return zT(this.toBytes())}toString(){return`<Point ${this.is0()?\"ZERO\":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return XR(h,e)}static msm(e,t){return uk(h,o,e,t)}_setWindowSize(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}h.BASE=new h(s.Gx,s.Gy,yO,c(s.Gx*s.Gy)),h.ZERO=new h(gO,yO,yO,gO),h.Fp=n,h.Fn=o;const g=new ck(h,o.BITS);return h.BASE.precompute(8),h}(t,r);return function(e,t){const r=t.Point;return Object.assign({},t,{ExtendedPoint:r,CURVE:e,nBitLength:r.Fn.BITS,nByteLength:r.Fn.BYTES})}(e,vO(s,n,o))}const AO=BigInt(0),EO=BigInt(1),PO=BigInt(2),BO=(BigInt(3),BigInt(5)),CO=BigInt(8),IO=BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\"),SO={p:IO,n:BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),h:CO,a:BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),d:BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),Gx:BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),Gy:BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")};function WO(e){const t=BigInt(10),r=BigInt(20),n=BigInt(40),o=BigInt(80),s=IO,i=e*e%s*e%s,a=kR(i,PO,s)*i%s,c=kR(a,EO,s)*e%s,u=kR(c,BO,s)*c%s,l=kR(u,t,s)*u%s,d=kR(l,r,s)*l%s,f=kR(d,n,s)*d%s,p=kR(f,o,s)*f%s,h=kR(p,o,s)*f%s,g=kR(h,t,s)*u%s;return{pow_p_5_8:kR(g,PO,s)*e%s,b2:i}}function xO(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const _O=BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");function RO(e,t){const r=IO,n=RR(t*t*t,r),o=RR(n*n*t,r);let s=RR(e*n*WO(e*o).pow_p_5_8,r);const i=RR(t*s*s,r),a=s,c=RR(s*_O,r),u=i===e,l=i===RR(-e,r),d=i===RR(-e*_O,r);return u&&(s=a),(l||d)&&(s=c),LR(s,r)&&(s=RR(-s,r)),{isValid:u||l,value:s}}const kO=GR(SO.p,{isLE:!0}),OO=GR(SO.n,{isLE:!0}),FO={...SO,Fp:kO,hash:MB,adjustScalarBytes:xO,uvRatio:RO},MO=TO(FO);const NO=_O,UO=BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\"),DO=BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\"),LO=BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\"),$O=BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\"),zO=e=>RO(EO,e),jO=BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),VO=e=>MO.Point.Fp.create(lR(e)&jO);function HO(e){const{d:t}=SO,r=IO,n=e=>kO.create(e),o=n(NO*e*e),s=n((o+EO)*LO);let i=BigInt(-1);const a=n((i-t*o)*n(o+t));let{isValid:c,value:u}=RO(s,a),l=n(u*e);LR(l,r)||(l=n(-l)),c||(u=l),c||(i=o);const d=n(i*(o-EO)*$O-a),f=u*u,p=n((u+u)*a),h=n(d*UO),g=n(EO-f),y=n(EO+f);return new MO.Point(n(p*y),n(g*h),n(h*y),n(p*g))}function GO(e){WT(e,64);const t=HO(VO(e.subarray(0,32))),r=HO(VO(e.subarray(32,64)));return new KO(t.add(r))}class KO extends wO{constructor(e){super(e)}static fromAffine(e){return new KO(MO.Point.fromAffine(e))}assertSame(e){if(!(e instanceof KO))throw new Error(\"RistrettoPoint expected\")}init(e){return new KO(e)}static hashToCurve(e){return GO(pR(\"ristrettoHash\",e,64))}static fromBytes(e){WT(e,32);const{a:t,d:r}=SO,n=IO,o=e=>kO.create(e),s=VO(e);if(!function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(kO.toBytes(s),e)||LR(s,n))throw new Error(\"invalid ristretto255 encoding 1\");const i=o(s*s),a=o(EO+t*i),c=o(EO-t*i),u=o(a*a),l=o(c*c),d=o(t*r*u-l),{isValid:f,value:p}=zO(o(d*l)),h=o(p*c),g=o(p*h*d);let y=o((s+s)*h);LR(y,n)&&(y=o(-y));const m=o(a*g),b=o(y*m);if(!f||LR(b,n)||m===AO)throw new Error(\"invalid ristretto255 encoding 2\");return new KO(new MO.Point(y,m,EO,b))}static fromHex(e){return KO.fromBytes(pR(\"ristrettoHex\",e,32))}static msm(e,t){return uk(KO,MO.Point.Fn,e,t)}toBytes(){let{X:e,Y:t,Z:r,T:n}=this.ep;const o=IO,s=e=>kO.create(e),i=s(s(r+t)*s(r-t)),a=s(e*t),c=s(a*a),{value:u}=zO(s(i*c)),l=s(u*i),d=s(u*a),f=s(l*d*n);let p;if(LR(n*f,o)){let r=s(t*NO),n=s(e*NO);e=r,t=n,p=s(l*DO)}else p=d;LR(e*f,o)&&(t=s(-t));let h=s((r-t)*p);return LR(h,o)&&(h=s(-h)),kO.toBytes(h)}equals(e){this.assertSame(e);const{X:t,Y:r}=this.ep,{X:n,Y:o}=e.ep,s=e=>kO.create(e),i=s(t*o)===s(r*n),a=s(r*o)===s(t*n);return i||a}is0(){return this.equals(KO.ZERO)}}KO.BASE=new KO(MO.Point.BASE),KO.ZERO=new KO(MO.Point.ZERO),KO.Fp=kO,KO.Fn=OO;const qO=MO.CURVE,ZO=\"ed25519\",YO=mB(\"ed25519 seed\"),JO=e=>!0,XO=!1,QO=33,eF=(()=>{let e=!1;return(t,r)=>{e||(MO.ExtendedPoint.BASE._setWindowSize(4),e=!0);const n=MO.getPublicKey(t);return wB([new Uint8Array([0]),n])}})(),tF=(e,t)=>{throw new Error(\"Ed25519 does not support public key derivation.\")},rF=e=>e,nF=e=>e,oF=32,sF=\"slip10\",iF=33;const aF=MO.CURVE,cF=\"ed25519Bip32\",uF=mB(\"\");function lF(e,t){const r=e[t];return F(void 0!==r,\"Private key is too short.\"),r}const dF=e=>!(7&lF(e,0))&&(!(128&lF(e,31))&&!(64&~lF(e,31))),fF=!0,pF=32,hF=e=>{return xA(t=hB(Uint8Array.from(e).reverse())),BigInt(kA(t));var t},gF=e=>{const t=RR(hF(e),aF.n);return MO.ExtendedPoint.BASE.multiply(t).toRawBytes()},yF=(e,t)=>gF(e.slice(0,32)),mF=(e,t)=>MO.ExtendedPoint.fromHex(OA(hB(e))).add(MO.ExtendedPoint.fromHex(OA(hB(t)))).toRawBytes(),bF=e=>e,wF=e=>e,vF=64,TF=\"cip3\",AF=32,EF={secp256k1:C,ed25519:v,ed25519Bip32:T};function PF(e){return EF[e]}function BF(e,t,r,n){xT(e);const o=function(e,t){if(void 0!==t&&\"[object Object]\"!=={}.toString.call(t))throw new Error(\"options should be object or undefined\");return Object.assign(e,t)}({dkLen:32,asyncTick:10},n),{c:s,dkLen:i,asyncTick:a}=o;if(ST(s),ST(i),ST(a),s<1)throw new Error(\"iterations (c) should be >= 1\");const c=tA(t),u=tA(r),l=new Uint8Array(i),d=rR.create(e,c),f=d._cloneInto().update(u);return{c:s,dkLen:i,asyncTick:a,DK:l,PRF:d,PRFSalt:f}}function CF(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),kT(o),r}const IF=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]);new Uint32Array(80);const SF=Math.pow(2,32);Array.from({length:64},(e,t)=>Math.floor(SF*Math.abs(Math.sin(t+1)))),IF.slice(0,4),new Uint32Array(16);const WF=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),xF=Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)),_F=xF.map(e=>(9*e+5)%16),RF=(()=>{const e=[[xF],[_F]];for(let t=0;t<4;t++)for(let r of e)r.push(r[t].map(e=>WF[e]));return e})(),kF=RF[0],OF=RF[1],FF=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),MF=kF.map((e,t)=>e.map(e=>FF[t][e])),NF=OF.map((e,t)=>e.map(e=>FF[t][e])),UF=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),DF=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function LF(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const $F=new Uint32Array(16);class zF extends EB{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)$F[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,o=0|this.h1,s=o,i=0|this.h2,a=i,c=0|this.h3,u=c,l=0|this.h4,d=l;for(let e=0;e<5;e++){const t=4-e,f=UF[e],p=DF[e],h=kF[e],g=OF[e],y=MF[e],m=NF[e];for(let t=0;t<16;t++){const n=MT(r+LF(e,o,i,c)+$F[h[t]]+f,y[t])+l|0;r=l,l=c,c=0|MT(i,10),i=o,o=n}for(let e=0;e<16;e++){const r=MT(n+LF(t,s,a,u)+$F[g[e]]+p,m[e])+d|0;n=d,d=u,u=0|MT(a,10),a=s,s=r}}this.set(this.h1+i+u|0,this.h2+c+d|0,this.h3+l+n|0,this.h4+r+s|0,this.h0+o+a|0)}roundClean(){kT($F)}destroy(){this.destroyed=!0,kT(this.buffer),this.set(0,0,0,0,0)}}const jF=oA(()=>new zF);const VF=MB;async function HF(e,t,r={}){if(r.hmacSha512)return await r.hmacSha512(e,t);if(pN()){const r=await crypto.subtle.importKey(\"raw\",e,{name:\"HMAC\",hash:\"SHA-512\"},!1,[\"sign\"]),n=await crypto.subtle.sign(\"HMAC\",r,t);return new Uint8Array(n)}return rR(VF,e,t)}async function GF(e,t,r,n,o={}){if(o.pbkdf2Sha512)return await o.pbkdf2Sha512(e,t,r,n);if(pN()){const o=await crypto.subtle.importKey(\"raw\",e,{name:\"PBKDF2\"},!1,[\"deriveBits\"]),s=await crypto.subtle.deriveBits({name:\"PBKDF2\",salt:t,iterations:r,hash:{name:\"SHA-512\"}},o,8*n);return new Uint8Array(s)}return await async function(e,t,r,n){const{c:o,dkLen:s,asyncTick:i,DK:a,PRF:c,PRFSalt:u}=BF(e,t,r,n);let l;const d=new Uint8Array(4),f=OT(d),p=new Uint8Array(c.outputLen);for(let e=1,t=0;t<s;e++,t+=c.outputLen){const r=a.subarray(t,t+c.outputLen);f.setInt32(0,e,!1),(l=u._cloneInto(l)).update(d).digestInto(p),r.set(p.subarray(0,r.length)),await XT(o-1,i,()=>{c._cloneInto(l).update(p).digestInto(p);for(let e=0;e<r.length;e++)r[e]^=p[e]})}return CF(c,u,a,l,p)}(VF,e,t,{c:r,dkLen:n})}function KF(e){return NB(e)}const qF=Symbol(\"Public key guard. Do not export this from the module.\");async function ZF({path:e,node:t,curve:r,network:n},o,s){eM(t);const{childIndex:i,isHardened:a}=tM(e,t,r),c={chainCode:t.chainCodeBytes,childIndex:i,isHardened:a,depth:t.depth,parentFingerprint:t.fingerprint,masterFingerprint:t.masterFingerprint,curve:r,network:n};if(t.privateKeyBytes){const e=await JF({privateKey:t.privateKeyBytes,get publicKey(){return t.compressedPublicKeyBytes},childIndex:i,isHardened:a,curve:r}),n=await QF({chainCode:t.chainCodeBytes,extension:e},s);return await YF({privateKey:t.privateKeyBytes,get publicKey(){return t.publicKeyBytes},entropy:n,...c},o,s)}const u=XF({parentPublicKey:t.compressedPublicKeyBytes,childIndex:i}),l=await QF({chainCode:t.chainCodeBytes,extension:u},s);return await YF({publicKey:t.compressedPublicKeyBytes,entropy:l,...c},o,s)}async function YF(e,t,r){const{privateKey:n,publicKey:o,entropy:s,childIndex:i,isHardened:a,depth:c,parentFingerprint:u,masterFingerprint:l,curve:d,network:f}=e;try{return n?await async function({entropy:e,privateKey:t,depth:r,masterFingerprint:n,parentFingerprint:o,childIndex:s,isHardened:i,curve:a,network:c},u){const l=s+(i?eR:0),{privateKey:d,chainCode:f}=function({privateKey:e,entropy:t,curve:r}){const n=t.slice(0,32),o=t.slice(32);if(\"ed25519\"===r.name)return{privateKey:n,chainCode:o};const s=function(e,t,r){F(sN(t,32),\"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.\");const n=gB(e),o=gB(t);if(o>=r.curve.n)throw new Error(\"Invalid tweak: Tweak is larger than the curve order.\");const s=RR(n+o,r.curve.n),i=yB(s.toString(16).padStart(64,\"0\"));if(!r.isValidPrivateKey(i))throw new Error(\"Invalid private key or tweak: The resulting private key is invalid.\");return i}(e,n,r);return{privateKey:s,chainCode:o}}({privateKey:t,entropy:e,curve:a});return await VM.fromExtendedKey({privateKey:d,chainCode:f,depth:r+1,masterFingerprint:n,parentFingerprint:o,index:l,curve:a.name,network:c,guard:qF},u)}({entropy:s,privateKey:n,depth:c,masterFingerprint:l,parentFingerprint:u,childIndex:i,isHardened:a,curve:d,network:f},r):await async function({entropy:e,publicKey:t,depth:r,masterFingerprint:n,parentFingerprint:o,childIndex:s,curve:i,network:a},c){const{publicKey:u,chainCode:l}=function({publicKey:e,entropy:t,curve:r}){const n=t.slice(0,32),o=t.slice(32),s=r.publicAdd(e,n);return{publicKey:s,chainCode:o}}({publicKey:t,entropy:e,curve:i});return await VM.fromExtendedKey({publicKey:u,chainCode:l,depth:r+1,masterFingerprint:n,parentFingerprint:o,index:s,curve:i.name,network:a},c)}({entropy:s,publicKey:o,depth:c,masterFingerprint:l,parentFingerprint:u,childIndex:i,curve:d,network:f},r)}catch(n){return await YF(await t(n,e,r),t,r)}}async function JF({privateKey:e,publicKey:t,childIndex:r,isHardened:n,curve:o}){return n?wB([new Uint8Array([0]),e,fN(r+eR)]):(uN(t,o.compressedPublicKeyLength),XF({parentPublicKey:t,childIndex:r}))}function XF({parentPublicKey:e,childIndex:t}){return wB([e,fN(t)])}async function QF({chainCode:e,extension:t},r){return await HF(e,t,r)}function eM(e){F(e,\"Invalid parameters: Must specify a node to derive from.\")}function tM(e,t,r){!function(e,t,r){F(\"string\"==typeof e,\"Invalid path: Must be a string.\");const n=e.endsWith(\"'\");F(!n||t.privateKey,\"Invalid parameters: Cannot derive hardened child keys without a private key.\"),F(n||r.deriveUnhardenedKeys,`Invalid path: Cannot derive unhardened child keys with ${r.name}.`)}(e,t,r);const n=e.split(\"'\")[0];F(n);const o=parseInt(n,10);if(!Z_.test(n)||!Number.isInteger(o)||o<0||o>=eR)throw new Error(`Invalid path: The index must be a non-negative decimal integer less than ${eR}.`);return{childIndex:o,isHardened:e.includes(\"'\")}}function rM(e){F(e instanceof Uint8Array&&sN(e,G_),\"Invalid key: The key must be a 32-byte, non-zero Uint8Array.\");return nM(TN(e,!1))}function nM(e){return F(e instanceof Uint8Array&&sN(e,wN),\"Invalid key: The key must be a 65-byte, non-zero Uint8Array.\"),(t=e.slice(1),AA(t)).slice(-20);var t}async function oM(e,t){return F(\"secp256k1\"===e.curve.name,\"Invalid curve: Only secp256k1 is supported by BIP-32.\"),ZF(e,sM,t)}async function sM(e,t,r){const{childIndex:n,privateKey:o,publicKey:s,isHardened:i,chainCode:a,curve:c}=t;if(tN(n+1),o){const e=await JF({privateKey:o,publicKey:c.compressPublicKey(s),childIndex:n+1,isHardened:i,curve:c}),u=await QF({chainCode:a,extension:e},r);return{...t,childIndex:n+1,entropy:u}}const u=XF({parentPublicKey:s,childIndex:n+1}),l=await QF({chainCode:a,extension:u});return{...t,childIndex:n+1,entropy:l}}var iM=r(2091);const aM=[12,15,18,21,24];function cM(e){const t=e.split(\" \");F(aM.includes(t.length),\"Invalid mnemonic phrase: The mnemonic phrase must consist of 12, 15, 18, 21, or 24 words.\"),F(t.every(e=>Fk.p.includes(e)),\"Invalid mnemonic phrase: The mnemonic phrase contains an unknown word.\")}async function uM(e,t=\"\",r){const n=`mnemonic${t}`.normalize(\"NFKD\");return await GF(function(e,t){if(\"string\"==typeof e)return cM(e),mB(e.normalize(\"NFKD\"));const r=Array.from(new Uint16Array(e.buffer)).map(e=>t[e]).join(\" \");return cM(r),mB(r)}(e,Fk.p),mB(n),2048,64,r)}function lM(e){return`bip39:${e.toLowerCase().trim()}`}function dM(e){return e instanceof Uint8Array?e:(F(e.startsWith(\"bip39:\"),'Invalid HD path segment: The BIP-39 path must start with \"bip39:\".'),e.slice(6))}async function fM({path:e,curve:t},r){const[n,...o]=e,s=dM(n),i=PF(t);switch(i.masterNodeGenerationSpec){case\"slip10\":return[await uM(s,\"\",r),...o];case\"cip3\":return[(0,iM.x2)(s,Fk.p),...o];default:return M()}}async function pM({path:e,curve:t,network:r},n){switch(F(e instanceof Uint8Array,\"Invalid path: The path must be a Uint8Array.\"),t.masterNodeGenerationSpec){case\"slip10\":return hM(e,t,r,n);case\"cip3\":return gM(e,t,r,n);default:throw new Error(\"Unsupported master node generation spec.\")}}async function hM(e,t,r,n){F(e.length>=16&&e.length<=64,\"Invalid seed: The seed must be between 16 and 64 bytes long.\");const o=await HF(t.secret,e,n),s=o.slice(0,G_),i=o.slice(G_);F(t.isValidPrivateKey(s),\"Invalid private key: The private key must greater than 0 and less than the curve order.\");const a=t.getPublicKey(s,!1),c=lN(t.compressPublicKey(a),t.compressedPublicKeyLength);return VM.fromExtendedKey({privateKey:s,publicKey:a,chainCode:i,masterFingerprint:c,network:r,depth:0,parentFingerprint:0,index:0,curve:t.name,guard:qF},n)}async function gM(e,t,r,n){F(e.length>=16&&e.length<=64,\"Invalid entropy: The entropy must be between 16 and 64 bytes long.\");const o=await GF(t.secret,e,4096,96,n);o[0]&=248,o[31]&=31,o[31]|=64;const s=o.slice(0,t.privateKeyLength),i=o.slice(t.privateKeyLength);F(t.isValidPrivateKey(s),\"Invalid private key.\");const a=t.getPublicKey(s,!1),c=lN(t.compressPublicKey(a),t.compressedPublicKeyLength);return VM.fromExtendedKey({privateKey:s,publicKey:a,chainCode:i,masterFingerprint:c,network:r,depth:0,parentFingerprint:0,index:0,curve:t.name,guard:qF},n)}const yM=e=>e.slice().reverse(),mM=e=>{const t=hB(yM(e));return BigInt(t)},bM=e=>{const t=e.toString(16);return yM(yB(t))},wM=e=>wB([e,new Uint8Array(Math.max(32-e.length,0)).fill(0)]),vM=e=>{const t=mM(e.slice(0,28))*BigInt(8);return wM(bM(t))},TM=e=>wM(bM(RR(mM(e),BigInt(2)**BigInt(256)))),AM=(e,t)=>{const r=mM(e)+mM(t);return wM(bM(r)).slice(0,32)},EM=(e,t,r)=>wB([new Uint8Array([e]),t,fN(r,!0)]),PM=2,BM=0,CM=async({parentNode:e,childIndex:t,isHardened:r},n)=>{const o=r?EM(BM,e.privateKeyBytes,t+eR):EM(PM,e.publicKeyBytes,t),s=await QF({chainCode:e.chainCodeBytes,extension:o},n),i=s.subarray(0,32),a=s.subarray(32),c=e.privateKeyBytes.subarray(0,32),u=e.privateKeyBytes.subarray(32);return wB([AM(vM(i),c),AM(a,u)])},IM=3,SM=1,WM=async({parentNode:e,childIndex:t,isHardened:r},n)=>{const o=r?EM(SM,e.privateKeyBytes,t+eR):EM(IM,e.publicKeyBytes,t);return(await QF({chainCode:e.chainCodeBytes,extension:o},n)).subarray(32)},xM=2,_M=async({parentNode:e,childIndex:t,curve:r},n)=>{const o=EM(xM,e.publicKeyBytes,t),s=(await QF({chainCode:e.chainCodeBytes,extension:o},n)).slice(0,32),i=r.getPublicKey(vM(s));return r.publicAdd(e.publicKeyBytes,i)};async function RM(e,t){const{curve:r,node:n,path:o}=e;eM(n);const{childIndex:s,isHardened:i}=tM(o,n,r);if(\"ed25519Bip32\"!==r.name||!n)throw new Error(\"Unsupported curve: Only ed25519Bip32 is supported by CIP3.\");const a=s+(i?eR:0),{privateKeyBytes:c,chainCodeBytes:u,publicKeyBytes:l,masterFingerprint:d,depth:f,fingerprint:p}=n;if(c){const e={privateKeyBytes:c,chainCodeBytes:u,publicKeyBytes:l},n=await CM({parentNode:e,childIndex:s,isHardened:i},t),o=await WM({parentNode:e,childIndex:s,isHardened:i},t);return VM.fromExtendedKey({privateKey:hB(n),chainCode:hB(o),masterFingerprint:d,depth:f+1,parentFingerprint:p,index:a,curve:r.name},t)}F(!i,\"Invalid parameters: Cannot derive hardened child keys without a private key.\");const h={chainCodeBytes:u,publicKeyBytes:l},g=await _M({parentNode:h,childIndex:s,isHardened:!1,curve:r},t),y=await WM({parentNode:h,childIndex:s,isHardened:!1},t);return VM.fromExtendedKey({publicKey:hB(g),chainCode:hB(y),masterFingerprint:d,depth:f+1,parentFingerprint:p,index:a,curve:r.name},t)}async function kM(e,t){return await ZF(e,OM,t)}async function OM(e,t,r){const{curve:n,isHardened:o,childIndex:s,entropy:i,chainCode:a}=t;if(\"ed25519\"===n.name)throw e;const c=o?s+eR:s,u=await QF({chainCode:a,extension:wB([1,i.slice(32,64),fN(c)])},r);return{...t,entropy:u}}const FM={bip32:A,bip39:E,slip10:B,cip3:P};async function MM(e,t){const{path:r,depth:n=r.length}=e,o=\"node\"in e?e.node:void 0,s=\"network\"in e?e.network:o?.network,i=\"curve\"in e?e.curve:o?.curve;if(o&&!(o instanceof VM)&&!(o instanceof NN)&&!(o instanceof ZM))throw new Error(\"Invalid arguments: Node must be a SLIP-10 node or a BIP-44 node when provided.\");if(!i)throw new Error(\"Invalid arguments: Must specify either a parent node or curve.\");return function(e,t,r){if(0===e.length)throw new Error(\"Invalid HD path segment: The segment must not be empty.\");let n=!1;if(e.forEach((e,t)=>{if(0===t){if(n=e instanceof Uint8Array||Q_.test(e),!(e instanceof Uint8Array||n||Y_.test(e)||J_.test(e)||X_.test(e)))throw NM()}else if(e instanceof Uint8Array||!Y_.test(e)&&!J_.test(e)&&!X_.test(e))throw NM()}),0===r&&(!n||1!==e.length))throw new Error(`Invalid HD path segment: The segment must consist of a single BIP-39 node for depths of 0. Received: \"${String(e)}\".`);if(!t&&!n)throw new Error(\"Invalid derivation parameters: Must specify parent key if the first node of the path segment is not a BIP-39 node.\");if(t&&n)throw new Error(\"Invalid derivation parameters: May not specify parent key if the path segment starts with a BIP-39 node.\");const o=n?e.slice(1):e;if(o.length>0){const e=o[0]?.split(\":\")[0];F(e),F(o.every(t=>t.startsWith(`${e}:`)),\"Invalid HD path segment: Cannot mix 'bip32' and 'slip10' path segments.\")}}(r,Boolean(o?.privateKey)||Boolean(o?.publicKey),n),await r.reduce(async(e,r,n)=>{const o=await e;if(\"string\"==typeof r){const[e,n]=r.split(\":\");F(e),F(n),F(function(e){return e in FM}(e),`Unknown derivation type: \"${e}\".`);const a=FM[e];return await a.deriveChildKey({path:n,node:o,curve:PF(i),network:s},t)}return F(0===n,NM()),await FM.bip39.deriveChildKey({path:r,node:o,curve:PF(i),network:s},t)},Promise.resolve(o))}function NM(){return new Error(\"Invalid HD path segment: The path segment is malformed.\")}var UM,DM,LM,$M,zM=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)},jM=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};class VM{static async fromJSON(e,t){return UM.fromExtendedKey(e,t)}static async fromExtendedKey(e,t){if(\"string\"==typeof e){const r=RN(e),{chainCode:n,depth:o,parentFingerprint:s,index:i}=r;if(\"private\"===r.type){const{privateKey:e}=r;return UM.fromExtendedKey({depth:o,parentFingerprint:s,index:i,privateKey:e,chainCode:n,curve:\"secp256k1\"},t)}const{publicKey:a}=r;return UM.fromExtendedKey({depth:o,parentFingerprint:s,index:i,publicKey:a,chainCode:n,curve:\"secp256k1\"},t)}const{depth:r,masterFingerprint:n,parentFingerprint:o,index:s,network:i,privateKey:a,publicKey:c,chainCode:u,curve:l,guard:d}=e,f=aN(u,G_);dN(l),HM(r),tN(s),function(e,t){if(0===t&&0!==e)throw new Error(`Invalid index: The index of the root node must be 0. Received: \"${String(e)}\".`)}(s,r),function(e){if(void 0===e)return;if(\"string\"!=typeof e)throw new Error(\"Invalid network: Must be a string if specified.\");if(![\"mainnet\",\"testnet\"].includes(e))throw new Error('Invalid network: Must be either \"mainnet\" or \"testnet\" if specified.')}(i),function(e,t){if(!iN(e))throw new Error(`Invalid parent fingerprint: The fingerprint must be a positive integer. Received: \"${String(e)}\".`);if(0===t&&0!==e)throw new Error(`Invalid parent fingerprint: The fingerprint of the root node must be 0. Received: \"${String(e)}\".`);if(t>0&&0===e)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node must not be 0. Received: \"${String(e)}\".`)}(o,r),function(e,t,r){if(!e)return;if(r>=2&&e===t)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node cannot be equal to the master fingerprint. Received: \"${String(t)}\".`)}(n,o,r);const p=PF(l);if(a){const e=cN(a,p.privateKeyLength);F(p.isValidPrivateKey(e),`Invalid private key: Value is not a valid ${l} private key.`);const u=d===qF&&c?aN(c,p.publicKeyLength):void 0;return new UM({depth:r,masterFingerprint:n,parentFingerprint:o,index:s,network:i,chainCode:f,privateKey:e,publicKey:u,curve:l},t,zM(this,UM,\"f\",DM))}if(c){const e=aN(c,p.publicKeyLength);return new UM({depth:r,masterFingerprint:n,parentFingerprint:o,index:s,network:i,chainCode:f,publicKey:e,curve:l},t,zM(this,UM,\"f\",DM))}throw new Error(\"Invalid options: Must provide either a private key or a public key.\")}static async fromDerivationPath({derivationPath:e,network:t,curve:r},n){if(dN(r),!e)throw new Error(\"Invalid options: Must provide a derivation path.\");if(0===e.length)throw new Error(\"Invalid derivation path: May not specify an empty derivation path.\");const o=await fM({path:e,curve:r},n);return await MM({path:o,depth:e.length-1,network:t,curve:r},n)}static async fromSeed({derivationPath:e,network:t,curve:r},n){if(dN(r),\"ed25519Bip32\"===r)throw new Error('Invalid curve: The curve \"ed25519Bip32\" is not supported by the `fromSeed` function.');if(!e)throw new Error(\"Invalid options: Must provide a derivation path.\");if(0===e.length)throw new Error(\"Invalid derivation path: May not specify an empty derivation path.\");return await MM({path:e,depth:e.length-1,network:t,curve:r},n)}constructor({depth:e,masterFingerprint:t,parentFingerprint:r,index:n,network:o=\"mainnet\",chainCode:s,privateKey:i,publicKey:a,curve:c},u={},l){LM.set(this,void 0),$M.set(this,void 0),F(l===zM(UM,UM,\"f\",DM),\"SLIP10Node can only be constructed using `SLIP10Node.fromJSON`, `SLIP10Node.fromExtendedKey`, `SLIP10Node.fromDerivationPath`, or `SLIP10Node.fromSeed`.\"),F(void 0!==i||void 0!==a,\"SLIP10Node requires either a private key or a public key to be set.\"),this.depth=e,this.masterFingerprint=t,this.parentFingerprint=r,this.index=n,this.network=o,this.chainCodeBytes=s,this.privateKeyBytes=i,this.curve=c,jM(this,LM,a,\"f\"),jM(this,$M,u,\"f\"),Object.freeze(this)}get chainCode(){return hB(this.chainCodeBytes)}get privateKey(){if(this.privateKeyBytes)return hB(this.privateKeyBytes)}get publicKey(){return hB(this.publicKeyBytes)}get publicKeyBytes(){return void 0!==zM(this,LM,\"f\")||(F(this.privateKeyBytes,\"Either a private key or public key is required.\"),jM(this,LM,PF(this.curve).getPublicKey(this.privateKeyBytes),\"f\")),zM(this,LM,\"f\")}get compressedPublicKeyBytes(){return PF(this.curve).compressPublicKey(this.publicKeyBytes)}get compressedPublicKey(){return hB(this.compressedPublicKeyBytes)}get address(){if(\"secp256k1\"!==this.curve)throw new Error(\"Unable to get address for this node: Only secp256k1 is supported.\");return hB(nM(this.publicKeyBytes))}get fingerprint(){return lN(this.compressedPublicKeyBytes,PF(this.curve).compressedPublicKeyLength)}get extendedKey(){F(\"secp256k1\"===this.curve,\"Unable to get extended key for this node: Only secp256k1 is supported.\");const e={depth:this.depth,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,chainCode:this.chainCodeBytes};return this.privateKeyBytes?kN({...e,type:\"private\",privateKey:this.privateKeyBytes}):kN({...e,type:\"public\",publicKey:this.publicKeyBytes})}neuter(){return new UM({depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes,publicKey:this.publicKeyBytes,curve:this.curve,network:this.network},zM(this,$M,\"f\"),zM(UM,UM,\"f\",DM))}async derive(e){return await async function({path:e,node:t},r){if(0===e.length)throw new Error(\"Invalid HD tree derivation path: Deriving a path of length 0 is not defined.\");const n=t.depth+e.length;return HM(n),await MM({path:e,node:t,depth:n},r)}({path:e,node:this},zM(this,$M,\"f\"))}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,curve:this.curve,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function HM(e){if(!iN(e))throw new Error(`Invalid HD tree path depth: The depth must be a positive integer. Received: \"${String(e)}\".`)}UM=VM,LM=new WeakMap,$M=new WeakMap,DM={value:Symbol(\"SLIP10Node.constructor\")};var GM,KM=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},qM=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)};class ZM{static async fromJSON(e,t,r){JM(t),YM(e.depth);const n=await NN.fromExtendedKey({depth:e.depth,index:e.index,network:e.network,parentFingerprint:e.parentFingerprint,chainCode:nN(e.chainCode),privateKey:oN(e.privateKey),publicKey:nN(e.publicKey)},r);return new ZM(n,t)}static async fromDerivationPath(e,t,r){YM(e.length-1);const n=await NN.fromDerivationPath({derivationPath:e,network:t},r),o=hN(e);return new ZM(n,o)}static async fromSeed({derivationPath:e,network:t},r){YM(e.length-1);const n=await NN.fromSeed({derivationPath:e,network:t},r),o=hN(e);return new ZM(n,o)}static async fromNode(e,t){if(!(e instanceof NN))throw new Error(\"Invalid node: Expected an instance of BIP44Node.\");return JM(t),YM(e.depth),Promise.resolve(new ZM(e,t))}constructor(e,t){GM.set(this,void 0),KM(this,GM,e,\"f\"),this.coin_type=t,this.path=function(e){return`m / ${q_} / ${XM(e)}`}(t),Object.freeze(this)}get depth(){return qM(this,GM,\"f\").depth}get privateKeyBytes(){return qM(this,GM,\"f\").privateKeyBytes}get publicKeyBytes(){return qM(this,GM,\"f\").publicKeyBytes}get chainCodeBytes(){return qM(this,GM,\"f\").chainCodeBytes}get privateKey(){return qM(this,GM,\"f\").privateKey}get publicKey(){return qM(this,GM,\"f\").publicKey}get compressedPublicKey(){return qM(this,GM,\"f\").compressedPublicKey}get compressedPublicKeyBytes(){return qM(this,GM,\"f\").compressedPublicKeyBytes}get chainCode(){return qM(this,GM,\"f\").chainCode}get address(){return qM(this,GM,\"f\").address}get masterFingerprint(){return qM(this,GM,\"f\").masterFingerprint}get parentFingerprint(){return qM(this,GM,\"f\").parentFingerprint}get fingerprint(){return qM(this,GM,\"f\").fingerprint}get index(){return qM(this,GM,\"f\").index}get network(){return qM(this,GM,\"f\").network}get curve(){return qM(this,GM,\"f\").curve}get extendedKey(){return qM(this,GM,\"f\").extendedKey}async deriveBIP44AddressKey({account:e=0,change:t=0,address_index:r}){return await qM(this,GM,\"f\").derive(function({account:e=0,change:t=0,address_index:r}){return[XM(e),eN(t),eN(r)]}({account:e,change:t,address_index:r}))}toJSON(){return{...qM(this,GM,\"f\").toJSON(),coin_type:this.coin_type,path:this.path}}}function YM(e){if(2!==e)throw new Error(`Invalid depth: Coin type nodes must be of depth 2. Received: \"${e}\"`)}function JM(e){if(\"number\"!=typeof e||!Number.isInteger(e)||e<0)throw new Error(\"Invalid coin type: The specified coin type must be a non-negative integer number.\")}function XM(e){return tN(e),`${QM(e)}'`}function QM(e){return tN(e),`bip32:${e}`}function eN(e){if(\"number\"==typeof e)return QM(e);if(!e||!Number.isInteger(e.index)||\"boolean\"!=typeof e.hardened)throw new Error(\"Invalid BIP-32 index: Must be an object containing the index and whether it is hardened.\");return e.hardened?XM(e.index):QM(e.index)}function tN(e){if(!(iN(t=e)&&t<=K_))throw new Error(\"Invalid BIP-32 index: Must be a non-negative integer.\");var t}function rN(e){return e.endsWith(\"'\")}function nN(e){return e instanceof Uint8Array?e:yB(e)}function oN(e){if(void 0!==e)return nN(e)}function sN(e,t){if(e.length!==t)return!1;for(const t of e)if(0!==t)return!0;return!1}function iN(e){return\"number\"==typeof e&&Number.isInteger(e)&&e>=0}function aN(e,t){if(e instanceof Uint8Array)return uN(e,t),e;if(\"string\"==typeof e){const r=yB(e);return uN(r,t),r}throw new Error(\"Invalid value: Expected an instance of Uint8Array or hexadecimal string.\")}function cN(e,t){if(e instanceof Uint8Array)return F(e.length===t,`Invalid value: Must be a ${t}-byte byte array.`),e;if(\"string\"==typeof e)return cN(yB(e),t);throw new Error(\"Invalid value: Expected an instance of Uint8Array or hexadecimal string.\")}function uN(e,t){if(!sN(e,t))throw new Error(`Invalid value: Must be a non-zero ${t}-byte byte array.`)}GM=new WeakMap;const lN=(e,t)=>{if(!sN(e,t))throw new Error(`Invalid public key: The key must be a ${t}-byte, non-zero byte array.`);var r;return vB((r=KF(e),jF(r))).getUint32(0,!1)};function dN(e){if(!e||\"string\"!=typeof e)throw new Error(\"Invalid curve: Must specify a curve.\");if(!Object.keys(EF).includes(e))throw new Error(`Invalid curve: Only the following curves are supported: ${Object.keys(EF).join(\", \")}.`)}function fN(e,t=!1){const r=new Uint8Array(4);return vB(r).setUint32(0,e,t),r}function pN(){return Boolean(globalThis.crypto?.subtle)}function hN(e){const t=e[2].split(\":\")[1]?.replace(\"'\",\"\");F(t,\"Invalid derivation path: Coin type is not specified.\");const r=Number.parseInt(t,10);return F(iN(r),\"Invalid derivation path: Coin type is not a valid integer.\"),r}const gN=Ok.CURVE,yN=\"secp256k1\",mN=mB(\"Bitcoin seed\"),bN=!0,wN=65,vN=e=>Ok.utils.isValidPrivateKey(e),TN=(()=>{let e=!1;return(t,r=!1)=>(e||(Ok.ProjectivePoint.BASE._setWindowSize(4),e=!0),Ok.getPublicKey(t,r))})(),AN=(e,t)=>{F(sN(t,32),\"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.\");const r=Ok.ProjectivePoint.fromHex(e).add(Ok.ProjectivePoint.fromPrivateKey(t));return r.assertValidity(),r.toRawBytes(!1)},EN=e=>Ok.ProjectivePoint.fromHex(e).toRawBytes(!0),PN=e=>Ok.ProjectivePoint.fromHex(e).toRawBytes(!1),BN=32,CN=\"slip10\",IN=33,SN=76067358,WN=76066276,xN=70617039,_N=70615956;const RN=e=>{const t=(e=>{const t=uO(KF);try{return t.decode(e)}catch{throw new Error(\"Invalid extended key: Value is not base58-encoded, or the checksum is invalid.\")}})(e);if(78!==t.length)throw new Error(`Invalid extended key: Expected a length of 78, got ${t.length}.`);const r=vB(t),n=r.getUint32(0,!1),{network:o,type:s}=function(e){switch(e){case SN:return{type:\"public\",network:\"mainnet\"};case xN:return{type:\"public\",network:\"testnet\"};case WN:return{type:\"private\",network:\"mainnet\"};case _N:return{type:\"private\",network:\"testnet\"};default:throw new Error(\"Invalid extended key: Expected a public (xpub) or private key (xprv) version.\")}}(n),i=r.getUint8(4);UN(i);const a=r.getUint32(5,!1),c=r.getUint32(9,!1),u=t.slice(13,45);if(!sN(u,32))throw new Error(\"Invalid extended key: Chain code must be a 32-byte non-zero byte array.\");const l=t.slice(45,78);if(!sN(l,33))throw new Error(\"Invalid extended key: Key must be a 33-byte non-zero byte array.\");const d=vB(l);if(\"public\"===s){if(2!==d.getUint8(0)&&3!==d.getUint8(0))throw new Error(\"Invalid extended key: Public key must start with 0x02 or 0x03.\");return{type:s,depth:i,parentFingerprint:a,index:c,network:o,chainCode:u,publicKey:PN(l)}}if(0!==d.getUint8(0))throw new Error(\"Invalid extended key: Private key must start with 0x00.\");return{type:s,depth:i,parentFingerprint:a,index:c,network:o,chainCode:u,privateKey:l.slice(1)}},kN=e=>{const{type:t,depth:r,parentFingerprint:n,index:o,network:s,chainCode:i}=e,a=new Uint8Array(78),c=vB(a),u=function(e,t){switch(e){case\"mainnet\":return\"public\"===t?SN:WN;case\"testnet\":return\"public\"===t?xN:_N;default:return M()}}(s,t);if(c.setUint32(0,u,!1),c.setUint8(4,r),c.setUint32(5,n,!1),c.setUint32(9,o,!1),a.set(i,13),\"public\"===t){const{publicKey:t}=e,r=EN(t);a.set(r,45)}if(\"private\"===t){const{privateKey:t}=e;a.set(t,46)}return l=a,uO(KF).encode(l);var l};var ON,FN=function(e,t,r,n){if(\"a\"===r&&!n)throw new TypeError(\"Private accessor was defined without a getter\");if(\"function\"==typeof t?e!==t||!n:!t.has(e))throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");return\"m\"===r?n:\"a\"===r?n.call(e):n?n.value:t.get(e)},MN=function(e,t,r,n,o){if(\"m\"===n)throw new TypeError(\"Private method is not writable\");if(\"a\"===n&&!o)throw new TypeError(\"Private accessor was defined without a setter\");if(\"function\"==typeof t?e!==t||!o:!t.has(e))throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");return\"a\"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};class NN{static async fromJSON(e,t){return NN.fromExtendedKey(e,t)}static async fromExtendedKey(e,t){if(\"string\"==typeof e){const r=RN(e),{type:n,chainCode:o,depth:s,parentFingerprint:i,index:a,network:c}=r;if(\"private\"===n){const{privateKey:e}=r;return NN.fromExtendedKey({depth:s,parentFingerprint:i,index:a,network:c,privateKey:e,chainCode:o},t)}const{publicKey:u}=r;return NN.fromExtendedKey({depth:s,parentFingerprint:i,index:a,network:c,publicKey:u,chainCode:o},t)}const{privateKey:r,publicKey:n,chainCode:o,depth:s,parentFingerprint:i,index:a,network:c}=e;UN(s);const u=await VM.fromExtendedKey({privateKey:r,publicKey:n,chainCode:o,depth:s,parentFingerprint:i,index:a,network:c,curve:\"secp256k1\"},t);return new NN(u)}static async fromDerivationPath({derivationPath:e,network:t},r){UN(e.length-1),DN(e,0);const n=await VM.fromDerivationPath({derivationPath:e,network:t,curve:\"secp256k1\"},r);return new NN(n)}static async fromSeed({derivationPath:e,network:t},r){UN(e.length-1),DN(e,0);const n=await VM.fromSeed({derivationPath:e,network:t,curve:\"secp256k1\"},r);return new NN(n)}get depth(){return FN(this,ON,\"f\").depth}get privateKeyBytes(){return FN(this,ON,\"f\").privateKeyBytes}get publicKeyBytes(){return FN(this,ON,\"f\").publicKeyBytes}get chainCodeBytes(){return FN(this,ON,\"f\").chainCodeBytes}get privateKey(){return FN(this,ON,\"f\").privateKey}get publicKey(){return FN(this,ON,\"f\").publicKey}get compressedPublicKey(){return FN(this,ON,\"f\").compressedPublicKey}get compressedPublicKeyBytes(){return FN(this,ON,\"f\").compressedPublicKeyBytes}get chainCode(){return FN(this,ON,\"f\").chainCode}get address(){return FN(this,ON,\"f\").address}get masterFingerprint(){return FN(this,ON,\"f\").masterFingerprint}get parentFingerprint(){return FN(this,ON,\"f\").parentFingerprint}get fingerprint(){return FN(this,ON,\"f\").fingerprint}get index(){return FN(this,ON,\"f\").index}get network(){return FN(this,ON,\"f\").network}get extendedKey(){return FN(this,ON,\"f\").extendedKey}get curve(){return FN(this,ON,\"f\").curve}constructor(e){ON.set(this,void 0),MN(this,ON,e,\"f\"),Object.freeze(this)}neuter(){const e=FN(this,ON,\"f\").neuter();return new NN(e)}async derive(e){if(5===this.depth)throw new Error(\"Illegal operation: This HD tree node is already a leaf node.\");UN(this.depth+e.length),DN(e,this.depth+1);const t=await FN(this,ON,\"f\").derive(e);return new NN(t)}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function UN(e){if(HM(e),e<0||e>5)throw new Error(`Invalid HD tree path depth: The depth must be a positive integer N such that 0 <= N <= 5. Received: \"${e}\"`)}function DN(e,t){e.forEach((e,r)=>{const n=t+r;if(0!==n)switch(F(\"string\"==typeof e),n){case 1:if(e!==q_)throw new Error(`Invalid derivation path: The \"purpose\" node (depth 1) must be the string \"${q_}\".`);break;case 2:if(!Y_.test(e)||!rN(e))throw new Error('Invalid derivation path: The \"coin_type\" node (depth 2) must be a hardened BIP-32 node.');break;case 3:if(!Y_.test(e)||!rN(e))throw new Error('Invalid derivation path: The \"account\" node (depth 3) must be a hardened BIP-32 node.');break;case 4:if(!Y_.test(e))throw new Error('Invalid derivation path: The \"change\" node (depth 4) must be a BIP-32 node.');break;case 5:if(!Y_.test(e))throw new Error('Invalid derivation path: The \"address_index\" node (depth 5) must be a BIP-32 node.')}else if(!(e instanceof Uint8Array||Q_.test(e)))throw new Error('Invalid derivation path: The \"m\" / seed node (depth 0) must be a BIP-39 node.')})}ON=new WeakMap;const LN=[\"bip32:0'\",\"bip32:0\"];async function $N(e){try{const t=await NN.fromJSON(e),r=await t.derive(LN);return async e=>{try{const t=await r.derive(function(e){return[`bip32:${e}`]}(e));if(!t.publicKey)throw new Error(\"Unable to derive public key\");return function(e){const t=yB(e),r=V_(e),n=Jm.address.fromHex(r);if(!n)throw new Error(\"Unable to derive address\");return{address:n,publicKeyBytes:t}}(t.publicKey)}catch(e){throw jA(e)}}}catch(e){throw jA(e)}}const zN=\"secp256k1\",jN=2147483647,VN=H_.J6.t$.R.Wu;class HN{#Pe;#Be;#ie;#Ce;#Ie;#Se;#We=new nW;constructor({accountsRepository:e,configProvider:t,logger:r,assetsService:n,snapClient:o,transactionsService:s}){this.#ie=r.withPrefix(\"[🔑 AccountsService]\"),this.#Be=t,this.#Pe=e,this.#Ce=n,this.#Ie=s,this.#Se=o}async deriveTronKeypair({entropySource:e,derivationPath:t}){try{this.#ie.log({derivationPath:t},\"Generating TRON wallet\"),G(t,hP);const r=t.split(\"/\"),n=await this.#Se.getBip32Entropy({entropySource:e,path:r,curve:zN});if(!n.privateKey||!n.publicKey)throw new Error(\"Unable to derive private key\");const o=yB(n.privateKey),s=yB(n.publicKey),i=n.privateKey.slice(2),a=V_(n.publicKey),c=Jm.address.fromHex(a);if(!c)throw new Error(\"Unable to derive address\");return{privateKeyBytes:o,publicKeyBytes:s,privateKeyHex:i,address:c}}catch(e){throw jA(e)}}async createAccounts(e){!function(e,t){const{type:r}=e;if(!t.includes(r))throw new Error(`Unsupported create account option type: ${r}`)}(e,[`${fS.Bip44DeriveIndex}`,`${fS.Bip44DeriveIndexRange}`,`${fS.Bip44Discover}`]);const{entropySource:t}=e;let r,n;if(e.type===fS.Bip44Discover){const{groupIndex:n}=e;r=await this.#xe(t);const{address:o}=await r(n);if(!(await Promise.all(VN.map(e=>this.#Ie.checkAddressActivity(e,o)))).some(Boolean))return[]}n=e.type===fS.Bip44DeriveIndexRange?e.range:{from:e.groupIndex,to:e.groupIndex},function(e){if(!Number.isSafeInteger(e.from)||!Number.isSafeInteger(e.to))throw new Error(\"Invalid account creation range: bounds must be integers\");if(e.from<0||e.to<0)throw new Error(\"Invalid account creation range: bounds must be non-negative\");if(e.from>jN||e.to>jN)throw new Error(\"Invalid account creation range: bounds must be at most 2147483647\");if(e.from>e.to)throw new Error('Invalid account creation range: \"from\" must be less than or equal to \"to\"')}(n);const o=Date.now(),[s,i]=await Promise.all([this.#Pe.findByEntropySourceAndRange(t,n),r??this.#xe(t)]),a=Date.now()-o,c=new Map;for(const e of s)c.set(e.index,e);const u=[];for(let e=n.from;e<=n.to;e+=1)c.has(e)||u.push(e);const l={};let d=0,f=0,p=0;if(u.length>0){const e=Date.now();for(const e of u){const r=globalThis.crypto.randomUUID(),n=HN.getDefaultDerivationPath(e),{address:o}=await i(e),s={id:r,entropySource:t,derivationPath:n,index:e,type:NE.Eoa,address:o,scopes:VN,options:{entropy:{type:\"mnemonic\",id:t,derivationPath:n,groupIndex:e},exportable:!0},methods:[\"signMessage\",\"signTransaction\"]};c.set(e,s),l[r]=s}f=Date.now()-e;const r=Date.now(),{merged:o,added:s}=await this.#Pe.mergeKeyringAccounts(l);p=Date.now()-r,d=Object.keys(s).length;for(const e of Object.values(o))e.entropySource===t&&e.index>=n.from&&e.index<=n.to&&c.set(e.index,e)}this.#ie.log(`[createAccounts] Phase timings ${JSON.stringify({range:n,created:d,readAndEntropyMs:a,deriveMs:f,mergeMs:p,totalMs:Date.now()-o})}`);const h=[];for(let e=n.from;e<=n.to;e+=1){const t=c.get(e);t&&h.push(DS(t))}return h}async getAll(){return this.#Pe.getAll()}async getAllSelected(){const[e,t]=await Promise.all([this.#Pe.getAll(),eW(snap)]);return e.filter(e=>t.includes(e.id))}async findById(e){return this.#Pe.findById(e)}async findByIdOrThrow(e){const t=await this.#Pe.findById(e);if(!t)throw new Error(`Account with ID ${e} not found`);return t}async findByIds(e){const t=await this.#Pe.findByIds(e);return e.length!==t.length&&this.#ie.error(\"[findByIds] Some accounts not found\"),t}async findByAddress(e){return this.#Pe.findByAddress(e)}async delete(e){return this.#Pe.delete(e)}async synchronizeAssets(e){const t=this.#Be.get().activeNetworks,r=e.flatMap(e=>t.map(t=>({account:e,scope:t}))),n=(await Promise.allSettled(r.map(async({account:e,scope:t})=>this.#Ce.fetchAssetsAndBalancesForAccount(t,e)))).flatMap(e=>\"fulfilled\"===e.status?e.value:[]);await this.#Ce.saveMany(n)}async synchronizeTransactions(e){const t=this.#Be.get().activeNetworks,r=e.flatMap(e=>t.map(t=>({account:e,scope:t}))),n=(await Promise.allSettled(r.map(async({account:e,scope:t})=>this.#Ie.fetchNewTransactionsForAccount(t,e)))).flatMap(e=>\"fulfilled\"===e.status?e.value:[]);await this.#Ie.saveMany(n)}async synchronize(e){const t=e.map(({id:e})=>e).sort().join(\",\");await this.#We.run(t,async()=>{await Promise.allSettled([this.synchronizeAssets(e),this.synchronizeTransactions(e)])})}async#xe(e){return $N(await this.#Se.getBip32Entropy({entropySource:e,path:[\"m\",\"44'\",\"195'\"],curve:zN}))}static getDefaultDerivationPath(e){return`m/44'/195'/0'/0/${e}`}}const GN=be({metamask:ve(be({correlationId:EE}))});var KN;!function(e){e.AccountCreated=\"notify:accountCreated\",e.AccountUpdated=\"notify:accountUpdated\",e.AccountDeleted=\"notify:accountDeleted\",e.RequestApproved=\"notify:requestApproved\",e.RequestRejected=\"notify:requestRejected\",e.AccountBalancesUpdated=\"notify:accountBalancesUpdated\",e.AccountAssetListUpdated=\"notify:accountAssetListUpdated\",e.AccountTransactionsUpdated=\"notify:accountTransactionsUpdated\"}(KN||(KN={}));be({method:he(`${KN.AccountCreated}`),params:be({account:$E,accountNameSuggestion:ve(Ae()),displayConfirmation:ve(de()),displayAccountNameSuggestion:ve(de()),...GN.schema})}),be({method:he(`${KN.AccountUpdated}`),params:be({account:$E})}),be({method:he(`${KN.AccountDeleted}`),params:be({id:EE})}),be({method:he(`${KN.RequestApproved}`),params:be({id:EE,result:Ww})}),be({method:he(`${KN.RequestRejected}`),params:be({id:EE})}),be({method:he(`${KN.AccountBalancesUpdated}`),params:be({balances:Te(PE,Te(je,qP))})}),be({method:he(`${KN.AccountTransactionsUpdated}`),params:be({transactions:Te(PE,le(iB))})}),be({method:he(`${KN.AccountAssetListUpdated}`),params:be({assets:Te(PE,be({added:le(He),removed:le(He)}))})});function qN(e){if(\"rejected\"===e.status)return{frozenV2:[],unfrozenV2:[],accountResource:void 0};const t=e.value;return{frozenV2:t.frozenV2??[],unfrozenV2:t.unfrozenV2??[],accountResource:t.account_resource}}function ZN({account:e,scope:t,tronAccountResources:r}){const n=(r?.freeNetLimit??0)+(r?.NetLimit??0),o=(r?.freeNetUsed??0)+(r?.NetUsed??0),s=Math.max(0,n-o);return[{assetType:qt[t].bandwidth.id,keyringAccountId:e.id,network:t,symbol:qt[t].bandwidth.symbol,decimals:qt[t].bandwidth.decimals,rawAmount:s.toString(),uiAmount:s.toString(),iconUrl:qt[t].bandwidth.iconUrl},{assetType:qt[t].maximumBandwidth.id,keyringAccountId:e.id,network:t,symbol:qt[t].maximumBandwidth.symbol,decimals:qt[t].maximumBandwidth.decimals,rawAmount:n.toString(),uiAmount:n.toString(),iconUrl:qt[t].maximumBandwidth.iconUrl}]}function YN({account:e,scope:t,tronAccountResources:r}){const n=r?.EnergyLimit??0,o=r?.EnergyUsed??0,s=Math.max(0,n-o);return[{assetType:qt[t].energy.id,keyringAccountId:e.id,network:t,symbol:qt[t].energy.symbol,decimals:qt[t].energy.decimals,rawAmount:s.toString(),uiAmount:s.toString(),iconUrl:qt[t].energy.iconUrl},{assetType:qt[t].maximumEnergy.id,keyringAccountId:e.id,network:t,symbol:qt[t].maximumEnergy.symbol,decimals:qt[t].maximumEnergy.decimals,rawAmount:n.toString(),uiAmount:n.toString(),iconUrl:qt[t].maximumEnergy.iconUrl}]}function JN(e,t,r){const n=Date.now();let o=0;r.unfrozenV2?.forEach(e=>{const t=e.unfreeze_expire_time??0,r=e.unfreeze_amount??0;t>n&&r>0&&(o+=r)});const{id:s,symbol:i,decimals:a,iconUrl:c}=qt[t].inLockPeriod;return{assetType:s,keyringAccountId:e.id,network:t,symbol:i,decimals:a,rawAmount:o.toString(),uiAmount:Hv(o,a).toString(),iconUrl:c}}function XN(e,t,r){const n=Date.now();let o=0;r.unfrozenV2?.forEach(e=>{const t=e.unfreeze_expire_time??0,r=e.unfreeze_amount??0;t<=n&&r>0&&(o+=r)});const{id:s,symbol:i,decimals:a,iconUrl:c}=qt[t].readyForWithdrawal;return{assetType:s,keyringAccountId:e.id,network:t,symbol:i,decimals:a,rawAmount:o.toString(),uiAmount:Hv(o,a).toString(),iconUrl:c}}function QN(e,t,r){let n=0,o=0;r.frozenV2?.forEach(e=>{const t=e.amount??0;\"ENERGY\"===e.type?o+=t:e.type||(n+=t)});const s=r.accountResource?.delegated_frozenV2_balance_for_bandwidth??0,i=r.accountResource?.delegated_frozenV2_balance_for_energy??0;return n+=s,o+=i,[{assetType:qt[t].stakedForBandwidth.id,keyringAccountId:e.id,network:t,symbol:qt[t].stakedForBandwidth.symbol,decimals:qt[t].stakedForBandwidth.decimals,rawAmount:n.toString(),uiAmount:Hv(n,qt[t].stakedForBandwidth.decimals).toString(),iconUrl:qt[t].stakedForBandwidth.iconUrl},{assetType:qt[t].stakedForEnergy.id,keyringAccountId:e.id,network:t,symbol:qt[t].stakedForEnergy.symbol,decimals:qt[t].stakedForEnergy.decimals,rawAmount:o.toString(),uiAmount:Hv(o,qt[t].stakedForEnergy.decimals).toString(),iconUrl:qt[t].stakedForEnergy.iconUrl}]}function eU(e,t,r){return{assetType:qt[t].stakingRewards.id,keyringAccountId:e.id,network:t,symbol:qt[t].stakingRewards.symbol,decimals:qt[t].stakingRewards.decimals,rawAmount:r.toString(),uiAmount:Hv(r,qt[t].stakingRewards.decimals).toString(),iconUrl:qt[t].stakingRewards.iconUrl}}const tU=new Set(Zt);function rU(e,t){const r=t.id,n=t.metadata.decimals??0,o=t.metadata.symbol??\"\",s=t.metadata.image??\"\",{amount:i}=t.balance;return{assetType:r,keyringAccountId:e,network:t.chainId,symbol:o,decimals:n,rawAmount:Vv(i,n),uiAmount:i,iconUrl:s}}class nU{#ie;#_e;#Re;#ke;#Oe;#Fe;#Me;#Se;#Be;cacheTtlsMilliseconds;constructor({logger:e,assetsRepository:t,state:r,trongridApiClient:n,tronHttpClient:o,priceApiClient:s,tokenApiClient:i,snapClient:a,configProvider:c}){this.#ie=e.withPrefix(\"[🪙 SnapAssetsAdapter]\"),this.#_e=t,this.#Re=r,this.#ke=n,this.#Oe=o,this.#Fe=s,this.#Me=i,this.#Se=a,this.#Be=c;const{cacheTtlsMilliseconds:u}=this.#Be.get().priceApi;this.cacheTtlsMilliseconds=u}static isFiat(e){return e.includes(\"swift:0/iso4217:\")}async getAccountAssetsByIDs(e,t){return this.#_e.getByAccountIdAndAssetTypes(e,t)}async getAccountAssetByID(e,t){return this.#_e.getByAccountIdAndAssetType(e,t)}async fetchAssetsAndBalancesForAccount(e,t){this.#ie.info(\"Fetching assets and balances by account\",{account:t,scope:e});const[r,n,o]=await Promise.allSettled([this.#ke.getAccountInfoByAddress(e,t.address),this.#Oe.getAccountResources(e,t.address),this.#Oe.getReward(e,t.address)]),s=\"rejected\"===r.status;s&&this.#ie.info(\"Account info request failed, treating as inactive account\",{account:t,scope:e});const i=s?await this.#ke.getTrc20BalancesByAddress(e,t.address).catch(async r=>(await this.#Se.trackError(r),this.#ie.warn(\"Failed to fetch TRC20 balances for inactive account\",{error:r,account:t,scope:e}),[])):[],a=this.#Ne({tronAccountInfoRequest:r,tronAccountResourcesRequest:n,trc20BalancesFallback:i,stakingRewardsRequest:o}),c=this.#Ue(t,e,a),u=c.map(e=>e.assetType),l=this.#De(c),[d,f]=await Promise.all([this.getAssetsMetadata(u),this.#Fe.getMultipleSpotPrices(l,\"usd\").catch(async e=>(await this.#Se.trackError(e),{}))]),p=this.#Le(c,d);return this.#$e(p,f)}#$e(e,t){return e.filter(e=>{if(Yt.includes(e.assetType))return!0;const r=t[e.assetType];return\"number\"==typeof r?.price})}#Ne({tronAccountInfoRequest:e,tronAccountResourcesRequest:t,trc20BalancesFallback:r,stakingRewardsRequest:n}){const o=\"rejected\"===e.status,s=function(e){return\"fulfilled\"===e.status?e.value:{}}(t),i=qN(e),a=\"fulfilled\"===n.status?Math.max(0,n.value):0;if(o)return{nativeBalance:0,trc10Balances:[],trc20Balances:r,stakedData:i,resources:s,stakingRewards:a};const c=e.value;return{nativeBalance:c.balance??0,trc10Balances:c.assetV2??[],trc20Balances:c.trc20??[],stakedData:i,resources:s,stakingRewards:a}}#Ue(e,t,r){return[this.#ze(e,t,r.nativeBalance),...QN(e,t,r.stakedData),XN(e,t,r.stakedData),JN(e,t,r.stakedData),eU(e,t,r.stakingRewards),...this.#je(e,t,r.trc10Balances),...this.#Ve(e,t,r.trc20Balances),...ZN({account:e,scope:t,tronAccountResources:r.resources}),...YN({account:e,scope:t,tronAccountResources:r.resources})]}#De(e){return e.filter(e=>e.assetType.includes(\"/slip44:\")||e.assetType.includes(\"/trc10:\")||e.assetType.includes(\"/trc20:\")).map(e=>e.assetType)}#Le(e,t){return e.map(e=>{const r=t[e.assetType],{symbol:n,decimals:o=0,iconUrl:s}=e;let i=n,a=o,c=s;if(r?.fungible){const e=r.units?.[0];e?(i=e.symbol??r.symbol??i,a=e.decimals??a):i=r?.symbol??i,c=r.iconUrl??c}const u=Hv(e.rawAmount,a).toString();return{...e,symbol:i,decimals:a,uiAmount:u,iconUrl:c}})}#ze(e,t,r){return{assetType:qt[t].nativeToken.id,keyringAccountId:e.id,network:t,symbol:qt[t].nativeToken.symbol,decimals:qt[t].nativeToken.decimals,rawAmount:r.toString(),uiAmount:Hv(r,qt[t].nativeToken.decimals).toString(),iconUrl:qt[t].nativeToken.iconUrl}}#je(e,t,r){return r?.flatMap(r=>({assetType:`${t}/trc10:${r.key}`,keyringAccountId:e.id,network:t,symbol:\"\",decimals:0,rawAmount:r.value?.toString()??\"0\",uiAmount:\"0\",iconUrl:\"\"}))??[]}#Ve(e,t,r){return r.flatMap(r=>Object.entries(r).map(([r,n])=>({assetType:`${t}/trc20:${r}`,keyringAccountId:e.id,network:t,symbol:\"\",decimals:0,rawAmount:n,uiAmount:\"0\",iconUrl:\"\"})))}async getAssetsMetadata(e){this.#ie.info(\"Fetching metadata for assets\",e);const{nativeAssetTypes:t,stakedNativeAssetTypes:r,readyForWithdrawalAssetTypes:n,inLockPeriodAssetTypes:o,stakingRewardsAssetTypes:s,energyAssetTypes:i,maximunEnergyAssetTypes:a,bandwidthAssetTypes:c,maximunBandwidthAssetTypes:u,tokenTrc10AssetTypes:l,tokenTrc20AssetTypes:d}=this.#He(e),f={...this.#Ge(t),...this.#Ke(r),...this.#qe(n),...this.#Ze(o),...this.#Ye(s),...this.#Je(i),...this.#Xe(a),...this.#Qe(c),...this.#et(u),...await this.#tt([...l,...d])};return this.#ie.info(\"Resolved assets metadata\",{assetTypes:e,result:f}),f}#He(e){return{nativeAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195\")),stakedNativeAssetTypes:e.filter(e=>e.includes(\"/slip44:195-staked-for-\")),readyForWithdrawalAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195-ready-for-withdrawal\")),inLockPeriodAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195-in-lock-period\")),stakingRewardsAssetTypes:e.filter(e=>e.endsWith(\"/slip44:195-staking-rewards\")),energyAssetTypes:e.filter(e=>e.endsWith(\"/slip44:energy\")),maximunEnergyAssetTypes:e.filter(e=>e.endsWith(\"/slip44:maximum-energy\")),bandwidthAssetTypes:e.filter(e=>e.endsWith(\"/slip44:bandwidth\")),maximunBandwidthAssetTypes:e.filter(e=>e.endsWith(\"/slip44:maximum-bandwidth\")),tokenTrc10AssetTypes:e.filter(e=>e.includes(\"/trc10:\")),tokenTrc20AssetTypes:e.filter(e=>e.includes(\"/trc20:\")),nftAssetTypes:e.filter(e=>e.includes(\"/trc721:\"))}}#Ge(e){const t={};for(const r of e)t[r]={fungible:Nt.fungible,name:Nt.name,symbol:Nt.symbol,iconUrl:Nt.iconUrl,units:[{decimals:Nt.decimals,symbol:Nt.symbol,name:Nt.name}]};return t}#Ke(e){const t={};for(const r of e){r.endsWith(\"staked-for-bandwidth\")&&(t[r]={fungible:Ut.fungible,name:Ut.name,symbol:Ut.symbol,iconUrl:Ut.iconUrl,units:[{decimals:Ut.decimals,symbol:Ut.symbol,name:Ut.name}]});r.endsWith(\"staked-for-energy\")&&(t[r]={fungible:Dt.fungible,name:Dt.name,symbol:Dt.symbol,iconUrl:Dt.iconUrl,units:[{decimals:Dt.decimals,symbol:Dt.symbol,name:Dt.name}]})}return t}#qe(e){const t={};for(const r of e)t[r]={fungible:Lt.fungible,name:Lt.name,symbol:Lt.symbol,iconUrl:Lt.iconUrl,units:[{decimals:Lt.decimals,symbol:Lt.symbol,name:Lt.name}]};return t}#Ye(e){const t={};for(const r of e)t[r]={fungible:$t.fungible,name:$t.name,symbol:$t.symbol,iconUrl:$t.iconUrl,units:[{decimals:$t.decimals,symbol:$t.symbol,name:$t.name}]};return t}#Ze(e){const t={};for(const r of e)t[r]={fungible:zt.fungible,name:zt.name,symbol:zt.symbol,iconUrl:zt.iconUrl,units:[{decimals:zt.decimals,symbol:zt.symbol,name:zt.name}]};return t}#Qe(e){const t={};for(const r of e)t[r]={fungible:jt.fungible,name:jt.name,symbol:jt.symbol,iconUrl:jt.iconUrl,units:[{decimals:jt.decimals,symbol:jt.symbol,name:jt.name}]};return t}#et(e){const t={};for(const r of e)t[r]={fungible:Vt.fungible,name:Vt.name,symbol:Vt.symbol,iconUrl:Vt.iconUrl,units:[{decimals:Vt.decimals,symbol:Vt.symbol,name:Vt.name}]};return t}#Je(e){const t={};for(const r of e)t[r]={fungible:Ht.fungible,name:Ht.name,symbol:Ht.symbol,iconUrl:Ht.iconUrl,units:[{decimals:Ht.decimals,symbol:Ht.symbol,name:Ht.name}]};return t}#Xe(e){const t={};for(const r of e)t[r]={fungible:Gt.fungible,name:Gt.name,symbol:Gt.symbol,iconUrl:Gt.iconUrl,units:[{decimals:Gt.decimals,symbol:Gt.symbol,name:Gt.name}]};return t}async#tt(e){return this.#Me.getTokensMetadata(e)}static hasChanged(e,t){const r=t.find(t=>t.keyringAccountId===e.keyringAccountId&&t.assetType===e.assetType);return!r||r.rawAmount!==e.rawAmount}async saveMany(e){this.#ie.info(\"Saving assets\",e);const t=await this.getAll(),r=e=>Yt.includes(e.assetType),n=e.reduce((e,t)=>(e[t.keyringAccountId]??=new Set,e[t.keyringAccountId]?.add(t.network),e),{}),o=new Set(e.map(e=>`${e.keyringAccountId}:${e.assetType}`)),s=t.filter(e=>{const t=n[e.keyringAccountId];return!(!t?.has(e.network)||r(e))&&!o.has(`${e.keyringAccountId}:${e.assetType}`)}),i=e=>(e=>\"0\"===e.rawAmount||\"0\"===e.uiAmount)(e)&&!r(e),a=e=>!i(e),c=s.reduce((e,t)=>({...e,[t.keyringAccountId]:{added:[...e[t.keyringAccountId]?.added??[]],removed:[...e[t.keyringAccountId]?.removed??[],t.assetType]}}),{});for(const t of e)c[t.keyringAccountId]={added:[...c[t.keyringAccountId]?.added??[],...a(t)?[t.assetType]:[]],removed:[...c[t.keyringAccountId]?.removed??[],...i(t)?[t.assetType]:[]]};Object.values(c).map(e=>e.added.length+e.removed.length).every(e=>0===e)||await QS(snap,KN.AccountAssetListUpdated,{assets:c});const u=s.map(e=>({...e,rawAmount:\"0\",uiAmount:\"0\"})),l=[...e,...u];await this.#_e.saveMany(l);const d=l.reduce((e,t)=>({...e,[t.keyringAccountId]:{...e[t.keyringAccountId]??{},[t.assetType]:{unit:t.symbol,amount:t.uiAmount}}}),{});Object.values(d).map(e=>Object.keys(e).length).some(e=>e>0)&&await QS(snap,KN.AccountBalancesUpdated,{balances:d})}async getAll(){const e=await this.#Re.getKey(\"assets\")??{};return Object.values(e).flat()}#rt(e,t){const r=Kt[e],{chainId:n}=Ke(e);return{assetType:r.id,keyringAccountId:t,network:n,symbol:r.symbol,decimals:r.decimals,rawAmount:\"0\",uiAmount:\"0\"}}async getAccountAssets(e){const t=await this.#_e.getByAccountId(e),r=[];for(const n of Yt){if(!t.find(e=>e.assetType===n)){const t=this.#rt(n,e);r.push(t)}}return[...t,...r]}#nt(e){if(!nU.isFiat(e))throw new Error(\"Passed caipAssetType is not a fiat asset\");return Ke(e).assetReference.toLowerCase()}async#ot(e){const t=e.filter(e=>!nU.isFiat(e)),[r,n]=await Promise.all([this.#Fe.getFiatExchangeRates(),this.#Fe.getMultipleSpotPrices(t,\"usd\")]);return{fiatExchangeRates:r,cryptoPrices:n}}async getMultipleTokenConversions(e){if(0===e.length)return{};const t=e.flatMap(e=>[e.from,e.to]),{fiatExchangeRates:r,cryptoPrices:n}=await this.#ot(t),o={};return e.forEach(e=>{const{from:t,to:s}=e;let i,a;if(o[t]??={},nU.isFiat(t)){const e=r[this.#nt(t)]?.value;if(!e)return void(o[t][s]=null);i=new It(1).dividedBy(e)}else i=new It(n[t]?.price??0);if(nU.isFiat(s)){const e=r[this.#nt(s)]?.value;if(!e)return void(o[t][s]=null);a=new It(1).dividedBy(e)}else a=new It(n[s]?.price??0);if(i.isZero()||a.isZero())return void(o[t][s]=null);const c=i.dividedBy(a).toString(),u=Date.now();o[t][s]={rate:c,conversionTime:u,expirationTime:u+this.cacheTtlsMilliseconds.historicalPrices}}),o}#st(e,t){const r=(0,et.pick)(e,[\"marketCap\",\"totalVolume\",\"circulatingSupply\",\"allTimeHigh\",\"allTimeLow\",\"pricePercentChange1h\",\"pricePercentChange1d\",\"pricePercentChange7d\",\"pricePercentChange14d\",\"pricePercentChange30d\",\"pricePercentChange200d\",\"pricePercentChange1y\"]),n=e=>null==e?\"\":new It(e).dividedBy(t).toString(),o=(e,t)=>null==t?{}:{[e]:t},s={...o(\"PT1H\",r.pricePercentChange1h),...o(\"P1D\",r.pricePercentChange1d),...o(\"P7D\",r.pricePercentChange7d),...o(\"P14D\",r.pricePercentChange14d),...o(\"P30D\",r.pricePercentChange30d),...o(\"P200D\",r.pricePercentChange200d),...o(\"P1Y\",r.pricePercentChange1y)};return{fungible:!0,marketCap:n(r.marketCap),totalVolume:n(r.totalVolume),circulatingSupply:(r.circulatingSupply??0).toString(),allTimeHigh:n(r.allTimeHigh),allTimeLow:n(r.allTimeLow),...Object.keys(s).length>0?{pricePercentChange:s}:{}}}async getMultipleTokensMarketData(e){if(0===e.length)return{};const t=e.flatMap(e=>[e.asset,e.unit]),{fiatExchangeRates:r,cryptoPrices:n}=await this.#ot(t),o={};return e.forEach(e=>{const{asset:t,unit:s}=e;if(!n[t])return;let i;if(nU.isFiat(s)){const e=r[this.#nt(s)]?.value;if(!e)return;i=new It(1).dividedBy(e)}else i=new It(n[s]?.price??0);i.isZero()||(o[t]??={},o[t][s]=this.#st(n[t],i))}),o}async getHistoricalPrice(e,t){G(e,je),G(t,je);const r=Ke(t).assetReference.toLowerCase();G(r,lr);const n=[\"1d\",\"7d\",\"1m\",\"3m\",\"1y\",\"1000y\"].map(async n=>this.#Fe.getHistoricalPrices({assetType:e,timePeriod:n,vsCurrency:r}).then(e=>({timePeriod:n,response:e})).catch(async r=>(await this.#Se.trackError(r),this.#ie.warn(`Error fetching historical prices for ${e} to ${t} with time period ${n}. Returning null object.`,r),{timePeriod:n,response:pr}))),o=(await Promise.all(n)).reduce((e,{timePeriod:t,response:r})=>(e[`P${t.toUpperCase()}`]=r.prices.map(e=>[e[0],e[1].toString()]),e),{}),s=Date.now();return{intervals:o,updateTime:s,expirationTime:s+this.cacheTtlsMilliseconds.historicalPrices}}}var oU;!function(e){e[e.Off=0]=\"Off\",e[e.ReadAssetsControllerWithFallback=1]=\"ReadAssetsControllerWithFallback\",e[e.ReadAssetsControllerWithoutFallback=2]=\"ReadAssetsControllerWithoutFallback\",e[e.ReadAssetsControllerOnly=3]=\"ReadAssetsControllerOnly\"}(oU||(oU={}));const sU={solana:\"networkAssetsSnapsMigrationSolana\",stellar:\"networkAssetsSnapsMigrationStellar\",tron:\"networkAssetsSnapsMigrationTron\"};function iU(e){if(\"object\"!=typeof e||null===e||Array.isArray(e))return oU.Off;const{value:t}=e,r=\"object\"!=typeof t||null===t||Array.isArray(t)?e:t,{stage:n}=r;switch(n){case oU.ReadAssetsControllerWithFallback:case oU.ReadAssetsControllerWithoutFallback:case oU.ReadAssetsControllerOnly:return n;default:return oU.Off}}const aU=e=>{if(e in Kt)return Kt[e].iconUrl},cU=({message:e,account:t,scope:r,locale:n,networkImage:o,origin:s})=>{const i=EC(n),{address:a}=t,c=`${r}:${a}`;return jB(dC,{children:[jB(iC,{children:[jB(iC,{alignment:\"center\",center:!0,children:[zB(iC,{children:null}),zB(pC,{size:\"lg\",children:i(\"confirmation.signMessage.title\")}),zB(iC,{children:null})]}),jB(sC,{children:[zB(aC,{fontWeight:\"medium\",children:i(\"confirmation.signMessage.message\")}),zB(aC,{children:e})]}),jB(sC,{children:[s?jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[jB(iC,{direction:\"horizontal\",alignment:\"start\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:i(\"confirmation.origin\")}),zB(cC,{content:i(\"confirmation.origin.tooltip\"),children:zB(lC,{name:\"question\",color:\"muted\"})})]}),zB(aC,{children:s})]}):null,jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:i(\"confirmation.account\")}),zB(hC,{address:c,truncate:!0,displayName:!0,avatar:!0})]}),jB(iC,{alignment:\"space-between\",direction:\"horizontal\",children:[zB(aC,{fontWeight:\"medium\",color:\"alternative\",children:i(\"confirmation.network\")}),jB(iC,{direction:\"horizontal\",alignment:\"end\",children:[zB(gC,{borderRadius:\"medium\",src:o??bC,height:16,width:16}),zB(aC,{children:qt[r].name})]})]})]})]}),jB(yC,{children:[zB(mC,{name:GS,children:i(\"confirmation.cancelButton\")}),zB(mC,{name:KS,children:i(\"confirmation.confirmButton\")})]})]})};var uU=r(1048).hp;const lU={scope:Ft.Mainnet,account:null,transaction:{rawDataHex:\"\",type:\"\"},origin:\"\",networkImage:bC,scan:null,scanFetchStatus:XB,tokenPrices:{},tokenPricesFetchStatus:XB,fees:[],feesFetchStatus:XB,isInsufficientBalance:!1,preferences:{locale:\"en\",currency:\"usd\",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!1,useNftDetection:!1}};async function dU(e,t,r){const{snapClient:n,transactionScanService:o}=TD;G(e.request.params,bP);const{request:{params:{transaction:s}},scope:i,origin:a}=e,c={...lU,scope:i,account:t,transaction:s,origin:a??\"Unknown\",scanFetchStatus:QB,tokenPricesFetchStatus:XB,feesFetchStatus:XB},{assetsService:u,feeCalculatorService:l,priceApiClient:d}=TD,[f,p]=await Promise.all([n.getPreferences().catch(()=>lU.preferences),u.getAccountAssetsByIDs(t.id,[qt[i].nativeToken.id,qt[i].bandwidth.id,qt[i].energy.id])]);c.preferences=f;const{useSecurityAlerts:h,simulateOnChainActions:g,useExternalPricingData:y}=c.preferences;try{const[e,t,n]=p,o=n?new It(n.rawAmount):St,a=t?new It(t.rawAmount):St,u={visible:!0,txID:hB(await UB(yB(s.rawDataHex))).slice(2),raw_data:r,raw_data_hex:s.rawDataHex},f=await l.computeFee({scope:i,transaction:u,availableEnergy:o,availableBandwidth:a});f.forEach(e=>{e.asset.iconUrl=aU(e.asset.type)});const h=y?await d.getMultipleSpotPrices([`${i}/slip44:195`],c.preferences.currency).catch(()=>({})):{};c.fees=f,c.feesFetchStatus=tC;const g=new It(f.find(e=>e.asset.type===qt[i].nativeToken.id)?.asset.amount??\"0\"),m=e?jv(e.rawAmount):St;c.isInsufficientBalance=function(e){const t=e.contract[0],r=t?.parameter?.value;return t&&r?t.type===Im.TransferContract?jv(\"amount\"in r?r.amount??0:0):t.type===Im.TriggerSmartContract?jv(\"call_value\"in r?r.call_value??0:0):St:St}(r).plus(g).isGreaterThan(m),c.tokenPrices=h,c.tokenPricesFetchStatus=tC}catch{c.fees=[],c.feesFetchStatus=rC,c.isInsufficientBalance=!1,c.tokenPrices={},c.tokenPricesFetchStatus=rC}const m=await n.createInterface(zB(LC,{context:c}),c),b=n.showDialog(m),w=TD.state.setKey(`mapInterfaceNameToId.${$C}`,m),v=Boolean(o)&&(h||g);try{let e=null;if(v){const n=[];g&&n.push(\"simulation\"),h&&n.push(\"validation\");try{e=await o.scanTransaction({accountAddress:t.address,transactionRawData:r,origin:a,scope:i,options:n})}catch{e=null}}try{await TD.transactionExpirationRefresherService.isTransactionExpired({scope:i,rawData:r})&&(e=JB)}catch(e){or.error(\"Error checking transaction expiration:\",e),await n.trackError(e)}c.scan=e,c.scanFetchStatus=e?tC:v?rC:tC,await w,await n.updateInterface(m,zB(LC,{context:c}),c)}catch{c.scan=null,c.scanFetchStatus=rC,await w,await n.updateInterface(m,zB(LC,{context:c}),c)}try{await n.scheduleBackgroundEvent({method:tI,duration:\"PT20S\"})}catch(e){or.error(\"Error scheduling background refresh event:\",e),await n.trackError(e)}return b}const fU={scope:Ft.Mainnet,fromAddress:null,toAddress:null,amount:null,fees:[],asset:{assetType:`${Ft.Mainnet}/slip44:195`,keyringAccountId:\"\",network:Ft.Mainnet,symbol:\"TRX\",decimals:6,rawAmount:\"0\",uiAmount:\"0\",iconUrl:\"\"},origin:\"MetaMask\",networkImage:bC,tokenPrices:{},tokenPricesFetchStatus:XB,scan:null,scanFetchStatus:XB,transactionRawData:null,accountType:\"\",preferences:{locale:\"en\",currency:\"usd\",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!1,useNftDetection:!1}};class pU extends Error{constructor(){super(\"Could not estimate Tron network fees: TronGrid is unavailable and no cached fee data is available.\"),this.name=\"FeeUnavailableError\"}}var hU=r(1048).hp;const gU=new Set([\"FreezeBalanceContract\",\"FreezeBalanceV2Contract\",\"UnfreezeBalanceContract\",\"UnfreezeBalanceV2Contract\",\"WithdrawExpireUnfreezeContract\",\"CancelAllUnfreezeV2Contract\",\"DelegateResourceContract\",\"UnDelegateResourceContract\",\"VoteWitnessContract\",\"AccountCreateContract\",\"AccountUpdateContract\",\"AccountPermissionUpdateContract\",\"SetAccountIdContract\",\"WitnessCreateContract\",\"WitnessUpdateContract\",\"UpdateBrokerageContract\",\"AssetIssueContract\",\"ParticipateAssetIssueContract\",\"UnfreezeAssetContract\",\"UpdateAssetContract\",\"ProposalCreateContract\",\"ProposalApproveContract\",\"ProposalDeleteContract\",\"ExchangeCreateContract\",\"ExchangeInjectContract\",\"ExchangeWithdrawContract\",\"ExchangeTransactionContract\",\"ClearABIContract\",\"UpdateSettingContract\",\"UpdateEnergyLimitContract\",\"WithdrawBalanceContract\",\"ShieldedTransferContract\"]);async function yU({accountsService:e,tronWebFactory:t,snapClient:r,account:n,scope:o,buildTransactions:s}){const{privateKeyHex:i}=await e.deriveTronKeypair({entropySource:n.entropySource,derivationPath:n.derivationPath}),a=t.createClient(o,i),c=await s(a);for(const e of c){const t=await a.trx.sign(e);await a.trx.sendRawTransaction(t)}await r.scheduleBackgroundEvent({method:JC,params:{accountId:n.id},duration:\"PT5S\"})}const{cloneDeepWith:mU}=et,bU=e=>mU(e,e=>{if(void 0===e)return{__type:\"undefined\"};if(e instanceof It)return{__type:\"BigNumber\",value:e.toString()};if(\"bigint\"==typeof e)return{__type:\"bigint\",value:e.toString()};if(e instanceof Uint8Array){const t=Array.from(e,e=>String.fromCharCode(e)).join(\"\");return{__type:\"Uint8Array\",value:btoa(t)}}}),wU=e=>JSON.parse(JSON.stringify(e),(e,t)=>{if(!t)return t;if(\"undefined\"!==t.__type){if(\"BigNumber\"===t.__type)return new It(t.value);if(\"bigint\"===t.__type)return BigInt(t.value);if(\"Uint8Array\"===t.__type){const e=atob(t.value),r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}return t}}),vU=(new Error(\"timeout while waiting for mutex to become available\"),new Error(\"mutex already locked\"),new Error(\"request for lock canceled\"));var TU=function(e,t,r,n){return new(r||(r=Promise))(function(o,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}c((n=n.apply(e,t||[])).next())})};class AU{constructor(e,t=vU){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((r,n)=>{const o={resolve:r,reject:n,weight:e,priority:t},s=EU(this._queue,e=>t<=e.priority);-1===s&&e<=this._value?this._dispatchItem(o):this._queue.splice(s+1,0,o)})}runExclusive(e){return TU(this,arguments,void 0,function*(e,t=1,r=0){const[n,o]=yield this.acquire(t,r);try{return yield e(n)}finally{o()}})}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){const r=EU(e,e=>t.priority<=e.priority);e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];if(!r)continue;const n=r.findIndex(t=>t.priority<=e);(-1===n?r:r.splice(0,n)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function EU(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}var PU=function(e,t,r,n){return new(r||(r=Promise))(function(o,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}c((n=n.apply(e,t||[])).next())})};class BU{constructor(e){this._semaphore=new AU(1,e)}acquire(){return PU(this,arguments,void 0,function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t})}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}class CU{#it=new BU;#at=new BU;#ct=new BU;#ut=0;#lt=null;async#dt(){this.#at.isLocked()||(this.#lt=await this.#at.acquire())}async wrapRegularStateOperation(e){await Promise.all([this.#it.waitForUnlock(),this.#dt()]);try{return this.#ut+=1,await e()}finally{this.#ut-=1,0===this.#ut&&this.#lt&&this.#lt()}}async wrapRegularStateWriteOperation(e){return await this.#ct.runExclusive(async()=>this.wrapRegularStateOperation(e))}async wrapManageStateOperation(e){return await this.#at.waitForUnlock(),await this.#it.runExclusive(e)}}const IU=\"Unable to refresh transaction metadata before signing. Please rebuild the transaction and try again.\",SU=65536,WU=864e5;function xU(e,t){const{number:r,timestamp:n}=t.block_header.raw_data;return{...e,ref_block_bytes:FU(r),ref_block_hash:MU(t),expiration:n+6e4,timestamp:n}}function _U(e){return\"string\"==typeof(t=e.rawData).ref_block_bytes&&\"string\"==typeof t.ref_block_hash&&\"number\"==typeof t.expiration&&function({currentBlock:e,now:t,rawData:r}){const n=e.block_header.raw_data.timestamp;return r.expiration>Math.max(t,n)+9e3}({currentBlock:e.currentBlock,now:e.now,rawData:e.rawData})&&function({currentBlock:e,rawData:t}){const r=e.block_header.raw_data.timestamp;return t.expiration<r+WU}({currentBlock:e.currentBlock,rawData:e.rawData});var t}function RU({currentBlockNumber:e,refBlockBytes:t}){const r=Number.parseInt(t,16),n=Math.floor(e/SU)*SU+r;return n>e?n-SU:n}function kU({currentBlock:e,referenceBlockNumber:t}){const r=e.block_header.raw_data.number;return Number.isFinite(t)&&t>=0&&t<=r&&r-t<SU}function OU({rawData:e,referencedBlock:t}){return!!t&&(FU(t.block_header.raw_data.number)===e.ref_block_bytes.toLowerCase()&&MU(t)===e.ref_block_hash.toLowerCase())}function FU(e){return e.toString(16).slice(-4).padStart(4,\"0\")}function MU(e){return e.blockID.slice(16,32).toLowerCase()}const NU=(e,t)=>{const{to:r,type:n}=e,{address:o}=t;if(!(n===rB.Receive))return!1;const{hasReceivedTRX:s,receivedTRXAmount:i}=r.reduce((e,t)=>t.address!==o||!t.asset?.fungible||t.asset.type!==String(Mt.TrxMainnet)&&t.asset.type!==String(Mt.TrxNile)&&t.asset.type!==String(Mt.TrxShasta)?e:{hasReceivedTRX:!0,receivedTRXAmount:e.receivedTRXAmount.plus(t.asset.amount)},{hasReceivedTRX:!1,receivedTRXAmount:new It(0)});return s&&i.isLessThan(.001)},UU=(e,t,r)=>{if(!r.spotPrices||e.type!==rB.Receive)return!1;const n=e.to.filter(e=>{return e.address===t.address&&e.asset?.fungible&&((r=e.asset.type).includes(\"/trc10:\")||r.includes(\"/trc20:\"));var r});if(0===n.length)return!1;const{spotPrices:o}=r;return!n.some(e=>!0===e.asset?.fungible&&\"number\"==typeof o[e.asset.type]?.price)};var DU=r(1048).hp;const LU=new er,$U=new class{#ft=new CU;#e;constructor(e){this.#e=e}async#pt(){const e=await snap.request({method:\"snap_getState\",params:{encrypted:this.#e.encrypted}}),t=wU(e??{});var r,n;return r=this.#e.defaultState,n=t,{...r,...Object.fromEntries(Object.entries(n).filter(([e,t])=>null!=t&&(!t||\"object\"!=typeof t||Object.keys(t).length>0)))}}async get(){return this.#ft.wrapRegularStateOperation(async()=>this.#pt())}async getKey(e){return this.#ft.wrapRegularStateOperation(async()=>{const t=await snap.request({method:\"snap_getState\",params:{key:e,encrypted:this.#e.encrypted}});if(null!==t)return wU(t)})}async setKey(e,t){await this.#ft.wrapRegularStateWriteOperation(async()=>{const r=bU(t);await snap.request({method:\"snap_setState\",params:{key:e,value:r,encrypted:this.#e.encrypted}})})}async setKeyWith(e,t){await this.#ft.wrapRegularStateWriteOperation(async()=>{const r=await snap.request({method:\"snap_getState\",params:{key:e,encrypted:this.#e.encrypted}}),n=null===r?void 0:wU(r),o=t(n),s=bU(o);await snap.request({method:\"snap_setState\",params:{key:e,value:s,encrypted:this.#e.encrypted}})})}async update(e){return await this.#ft.wrapManageStateOperation(async()=>{const t=await this.#pt(),r=e(t);return await snap.request({method:\"snap_manageState\",params:{operation:\"update\",newState:bU(r),encrypted:this.#e.encrypted}}),r})}async deleteKey(e){await this.update(t=>((0,et.unset)(t,e),t))}async deleteKeys(e){await this.update(t=>(e.forEach(e=>{(0,et.unset)(t,e)}),t))}}({encrypted:!1,defaultState:{keyringAccounts:{},assets:{},tokenPrices:{},transactions:{},mapInterfaceNameToId:{}}}),zU=new HA({logger:or}),jU=new class{#ht=\"keyringAccounts\";#Re;constructor(e){this.#Re=e}async getAll(){const e=await this.#Re.getKey(this.#ht);return Object.values(e??{})}async findByEntropySourceAndRange(e,t){return(await this.getAll()).filter(r=>r.entropySource===e&&r.index>=t.from&&r.index<=t.to).sort((e,t)=>e.index-t.index)}async findById(e){return(await this.getAll()).find(t=>t.id===e)??null}async findByIds(e){return(await this.getAll()).filter(t=>e.includes(t.id))}async findByAddress(e){return(await this.getAll()).find(t=>t.address===e)??null}async create(e){let t=e;return await this.#Re.setKeyWith(this.#ht,r=>{const n=r??{},{merged:o,added:s}=YS(n,{[e.id]:e});var i,a;return e.id in s||(i=n,a=ZS(e),t=Object.values(i).find(e=>ZS(e)===a)??e),o}),t}async mergeKeyringAccounts(e){let t={merged:{},added:{}};return await this.#Re.setKeyWith(this.#ht,r=>(t=YS(r??{},e),t.merged)),t}async delete(e){await Promise.all([this.#Re.deleteKey(`${this.#ht}.${e}`),this.#Re.deleteKey(`assets.${e}`),this.#Re.deleteKey(`transactions.${e}`)])}}($U),VU=new class{#Re;constructor(e){this.#Re=e}async getByAccountId(e){return await this.#Re.getKey(`assets.${e}`)??[]}async getByAccountIdAndAssetType(e,t){return(await this.getByAccountId(e)).find(e=>e.assetType===t)??null}async getByAccountIdAndAssetTypes(e,t){const r=await this.getByAccountId(e),n=[];for(const e of t){const t=r.find(t=>t.assetType===e);n.push(t??null)}return n}async getAll(){const e=await this.#Re.getKey(\"assets\")??{};return Object.values(e).flat()}async saveMany(e){await this.#Re.update(t=>{const r=(0,et.cloneDeep)(t);for(const t of e){const{keyringAccountId:e}=t,n=(0,et.cloneDeep)(r.assets[e]??[]),o=n.findIndex(e=>e.assetType===t.assetType&&e.keyringAccountId===t.keyringAccountId);-1===o?n.push(t):n[o]=t,r.assets[e]=n}return r})}}($U),HU=new class{#Re;#gt=\"transactions\";constructor(e){this.#Re=e}async getAll(){const e=await this.#Re.getKey(this.#gt);return Object.values(e??{}).flat()}async findByAccountId(e){return await this.#Re.getKey(`${this.#gt}.${e}`)??[]}async getTransactionIdsByAccountId(e){const t=await this.#Re.getKey(`${this.#gt}.${e}`);return new Set((t??[]).map(e=>e.id))}async getConfirmedTransactionIds(e){const t=await this.#Re.getKey(`${this.#gt}.${e}`);return new Set((t??[]).filter(e=>e.status!==tB.Unconfirmed).map(e=>e.id))}async save(e){await this.saveMany([e])}async saveMany(e){await this.#Re.update(t=>{const r=t[this.#gt];return e.forEach(e=>{const n=e.id,o=e.account,s=r[o]??[],i=s.findIndex(e=>e.id===n);-1!==i&&(s[i]=e);const a=(0,et.chain)([...s,e]).uniqBy(\"id\").sortBy(e=>-(e.timestamp??0)).value();t[this.#gt][o]=a}),t})}}($U),GU=new class{#yt=new Map;constructor({configProvider:e}){const{baseUrls:t}=e.get().tronHttpApi;Object.entries(t).forEach(([e,t])=>{this.#yt.set(e,{baseUrl:t,headers:{\"Content-Type\":\"application/json\",\"Access-Control-Allow-Headers\":\"*\",\"Access-Control-Allow-Origin\":\"*\"}})})}async getTRC10TokenById(e,t){const r=this.#yt.get(t);if(!r)throw new Error(`No client configured for network: ${t}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/wallet/getassetissuebyid\"}),i=JSON.stringify({value:e}),a=await fetch(s,{method:\"POST\",headers:o,body:i});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const c=await a.json();return G(c,nE),c}async getTRC10TokenMetadata(e,t){const r=await this.getTRC10TokenById(e,t);return{name:rE(r.name),symbol:rE(r.abbr),decimals:r.precision}}async getAccountResources(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/wallet/getaccountresource\"}),i=JSON.stringify({address:t,visible:!0}),a=await fetch(s,{method:\"POST\",headers:o,body:i});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const c=await a.json();return G(c,oE),c}async getTransactionInfoById(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/wallet/gettransactioninfobyid\"}),i=JSON.stringify({value:t}),a=await fetch(s,{method:\"POST\",headers:o,body:i});if(!a.ok){if(404===a.status)return null;throw new Error(`HTTP error! status: ${a.status}`)}const c=await a.json();return c?.id&&c?.blockNumber?(G(c,cE),c):null}async getNextMaintenanceTime(e){const t=this.#yt.get(e);if(!t)throw new Error(`No client configured for network: ${e}`);const{baseUrl:r,headers:n}=t,o=We({baseUrl:r,path:\"/wallet/getnextmaintenancetime\"}),s=await fetch(o,{method:\"POST\",headers:n});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const i=await s.json();return G(i,uE),i.num}async getChainParameters(e){const t=this.#yt.get(e);if(!t)throw new Error(`No client configured for network: ${e}`);const{baseUrl:r,headers:n}=t,o=We({baseUrl:r,path:\"/wallet/getchainparameters\"}),s=await fetch(o,{headers:n});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const i=await s.json();if(G(i,dE),!i.chainParameter)throw new Error(\"No chain parameters found\");for(const e of i.chainParameter)G(e,lE);return i.chainParameter}async triggerConstantContract(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/wallet/triggerconstantcontract\"}),i=await fetch(s,{method:\"POST\",headers:o,body:JSON.stringify(Object.fromEntries(Object.entries(t).filter(([e,t])=>null!=t)))});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const a=await i.json();return G(a,gE),a}async getContract(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/wallet/getcontract\"}),i=JSON.stringify({value:t,visible:!1}),a=await fetch(s,{method:\"POST\",headers:o,body:i});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const c=await a.json();return c&&0!==Object.keys(c).length?(G(c,yE),c):null}async getReward(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/wallet/getReward\"}),i=JSON.stringify({address:t,visible:!0}),a=await fetch(s,{method:\"POST\",headers:o,body:i});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const c=await a.json();return G(c,mE),c.reward??0}}({configProvider:LU}),KU=new class{#Re;prefix;logger;constructor(e,t,r=\"__cache__default\"){this.#Re=e,this.logger=t,this.prefix=r}async get(e){return(await this.mget([e]))[e]}async set(e,t,r=Number.MAX_SAFE_INTEGER){this.#mt(r),await this.#Re.setKey(`${this.prefix}.${e}`,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}#mt(e){if(void 0!==e){if(\"number\"!=typeof e)throw new Error(\"TTL must be a number\");if(e<0)throw new Error(\"TTL must be positive\");if(e>Number.MAX_SAFE_INTEGER)throw new Error(\"TTL must be less than 2^53 - 1\")}}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){await this.#Re.setKey(this.prefix,{})}async has(e){return void 0!==await this.get(e)}async keys(){const e=await this.#Re.getKey(this.prefix);return Object.keys(e??{})}async size(){const e=await this.#Re.getKey(this.prefix);return Object.keys(e??{}).length}async peek(e){const t=await this.#Re.getKey(this.prefix),r=t?.[e];return r?.value}async mget(e){const t=await this.#Re.getKey(this.prefix);if(!t)return{};const r=Object.entries(t).filter(([t])=>e.includes(t)),n=r.filter(([e,t])=>t&&t.expiresAt<=Date.now());await this.mdelete(n.map(([e])=>e));const o={};return r.forEach(([e,t])=>{if(void 0===t)return this.logger.info(`[StateCache] ❌ Cache miss for key \"${e}\"`),void(o[e]=void 0);t.expiresAt<=Date.now()?(this.logger.info(`[StateCache] ⌛ Cache expired for key \"${e}\"`),o[e]=void 0):(this.logger.info(`[StateCache] 🎉 Cache hit for key \"${e}\"`),o[e]=t.value)}),e.forEach(e=>{e in o||(this.logger.info(`[StateCache] ❌ Cache miss for key \"${e}\"`),o[e]=void 0)}),o}async mset(e){if(0!==e.length){if(1===e.length){F(e[0]);const{key:t,value:r,ttlMilliseconds:n}=e[0];return void await this.set(t,r,n)}e.forEach(({ttlMilliseconds:e})=>{this.#mt(e)}),await this.#Re.update(t=>{const r=t[this.prefix]??{};return e.forEach(({key:e,value:t,ttlMilliseconds:n})=>{void 0!==t&&(r[e]={value:t,expiresAt:Math.min(Date.now()+(n??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}),t[this.prefix]=r,t})}}async mdelete(e){const t={};return await this.#Re.update(r=>{const n=r[this.prefix]??{};return e.forEach(e=>{void 0===n[e]?t[e]=!1:(delete n[e],t[e]=!0)}),r[this.prefix]=n,r}),t}}($U,nr,\"__cache__trongrid\"),qU=new class{#yt=new Map;#Oe;#bt;#wt;constructor({configProvider:e,tronHttpClient:t,cache:r}){const{baseUrls:n}=e.get().trongridApi;Object.entries(n).forEach(([e,t])=>{this.#yt.set(e,{baseUrl:t,headers:{\"Content-Type\":\"application/json\",\"Access-Control-Allow-Headers\":\"*\",\"Access-Control-Allow-Origin\":\"*\"}})}),this.#Oe=t,this.#bt=r,this.#wt=((e,t,{functionName:r,generateCacheKey:n})=>{const o=n??bE,s=r??e.name??\"anonymousFunction\",i=new Map;return async(...r)=>{const n=o(s,r),a=Date.now(),c=i.get(n);if(void 0===c||a<c)try{const e=await t.get(n);if(void 0!==e)return e}catch(e){or.error(`Cache get error for key \"${n}\":`,e)}const{result:u,expiresAt:l}=await e(...r),d=Math.max(0,l-a);return await t.set(n,u,d).catch(e=>{or.error(`Cache set error for key \"${n}\":`,e)}),i.set(n,l),u}})(this.#vt.bind(this),this.#bt,{functionName:GP})}async peekCachedChainParameters(e){const t=await this.#bt.peek((e=>`${GP}:${JSON.stringify(e)}`)(e));return t}async getAccountInfoByAddress(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/v1/accounts/{address}\",pathParams:{address:t}}),i=await fetch(s,{headers:o});if(!i.ok)throw TE(i);const a=await i.json();if(\"boolean\"!=typeof a.success||!a.success)throw new Error(\"API request failed\");G(a.meta,VP);const c=a?.data?.[0];if(!c)throw new AE;return G(c,_P),c}async getTransactionInfoByAddress(e,t,r){const n=this.#yt.get(e);if(!n)throw new Error(`No client configured for network: ${e}`);const{baseUrl:o,headers:s}=n,i=void 0===r?.limit?void 0:{limit:String(r.limit)},a=We({baseUrl:o,path:\"/v1/accounts/{address}/transactions\",pathParams:{address:t},...i?{queryParams:i}:{}}),c=await fetch(a,{headers:s});if(!c.ok)throw TE(c);const u=await c.json();if(\"boolean\"!=typeof u.success||!u.success)throw new Error(\"API request failed\");if(G(u.meta,VP),!u.data)throw new Error(\"API request failed\");for(const e of u.data)G(e,$P);return u.data}async getContractTransactionInfoByAddress(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/v1/accounts/{address}/transactions/trc20\",pathParams:{address:t}}),i=await fetch(s,{headers:o});if(!i.ok)throw TE(i);const a=await i.json();if(\"boolean\"!=typeof a.success||!a.success)throw new Error(\"API request failed\");if(G(a.meta,VP),!a.data)throw new Error(\"API request failed\");for(const e of a.data)G(e,jP);return a.data}async getTrc20BalancesByAddress(e,t){const r=this.#yt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=We({baseUrl:n,path:\"/v1/accounts/{address}/trc20/balance\",pathParams:{address:t}}),i=await fetch(s,{headers:o});if(!i.ok)throw TE(i);const a=await i.json();if(\"boolean\"!=typeof a.success||!a.success)throw new Error(\"API request failed\");if(G(a.meta,VP),!a.data)return[];for(const e of a.data)G(e,HP);return a.data}async getChainParameters(e){return this.#wt(e)}async#vt(e){const[t,r]=await Promise.all([this.#Oe.getChainParameters(e),this.#Oe.getNextMaintenanceTime(e)]);return{result:t,expiresAt:r}}}({configProvider:LU,tronHttpClient:GU,cache:KU}),ZU=new class{#Be;constructor({configProvider:e}){this.#Be=e}createClient(e,t){const r=this.#Be.get(),{baseUrls:n}=r.trongridApi,o=n[e];if(!o)throw new Error(`No configuration found for network: ${e}`);const s={fullHost:o,...t&&{privateKey:t}};return new Jm(s)}}({configProvider:LU}),YU=new class{#bt=new Map;logger;constructor(e){this.logger=e}#mt(e){if(void 0!==e){if(\"number\"!=typeof e)throw new Error(\"TTL must be a number\");if(e<0)throw new Error(\"TTL must be positive\");if(e>Number.MAX_SAFE_INTEGER)throw new Error(\"TTL must be less than 2^53 - 1\")}}#Tt(e){return e.expiresAt<Date.now()}async#At(){const e=[];for(const[t,r]of this.#bt.entries())this.#Tt(r)&&e.push(t);await this.mdelete(e)}async get(e){return(await this.mget([e]))[e]}async set(e,t,r=Number.MAX_SAFE_INTEGER){this.#mt(r),this.#bt.set(e,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){this.#bt.clear()}async has(e){const t=this.#bt.get(e);return!!t&&(!this.#Tt(t)||(this.#bt.delete(e),!1))}async keys(){return await this.#At(),Array.from(this.#bt.keys())}async size(){return await this.#At(),this.#bt.size}async peek(e){const t=this.#bt.get(e);if(t){if(!this.#Tt(t))return t.value;this.#bt.delete(e)}}async mget(e){await this.#At();const t={};for(const r of e){const e=this.#bt.get(r);e?(this.logger.info(`[InMemoryCache] 🎉 Cache hit for key \"${r}\"`),t[r]=e.value):(this.logger.info(`[InMemoryCache] ❌ Cache miss for key \"${r}\"`),t[r]=void 0)}return t}async mset(e){if(0!==e.length){if(1===e.length){F(e[0]);const{key:t,value:r,ttlMilliseconds:n}=e[0];return void await this.set(t,r,n)}e.forEach(({ttlMilliseconds:e})=>{this.#mt(e)}),e.forEach(({key:e,value:t,ttlMilliseconds:r})=>{void 0!==t&&this.#bt.set(e,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})})}}async mdelete(e){return Object.fromEntries(e.map(e=>[e,this.#bt.delete(e)]))}}(nr),JU=new class{#se;#ie;#ae;#ce;#bt;cacheTtlsMilliseconds;constructor(e,t,r=globalThis.fetch,n=or){const{baseUrl:o,chunkSize:s,cacheTtlsMilliseconds:i}=e.get().priceApi;G(o,Ie),this.#se=r,this.#ie=n,this.#ae=o,this.#ce=s,this.cacheTtlsMilliseconds=i,this.#bt=t}async getFiatExchangeRates(){try{const e=We({baseUrl:this.#ae,path:\"/v1/exchange-rates/fiat\"}),t=await this.#se(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=await t.json();return G(r,ar),r}catch(e){throw this.#ie.error(e,\"Error fetching fiat exchange rates\"),e}}async#Et(e,t){try{const r=[...new Set(e)],n=[];for(let e=0;e<r.length;e+=this.#ce)n.push(r.slice(e,e+this.#ce));const o=await Promise.all(n.map(async e=>{const r=We({baseUrl:this.#ae,path:\"/v3/spot-prices\",queryParams:{vsCurrency:t,assetIds:e.join(\",\"),includeMarketData:\"true\"}}),n=await this.#se(r);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const o=await n.json();return G(o,ur),o})),s=o.reduce((e,t)=>({...e,...t}),{});return await this.#bt.mset(e.map(e=>({key:`PriceApiClient:getMultipleSpotPrices:${e}:${t}`,value:s[e],ttlMilliseconds:this.cacheTtlsMilliseconds.spotPrices}))),s}catch(e){throw this.#ie.error(e,\"Error fetching spot prices\"),e}}async#Pt(e,t){const r=[...new Set(e)],n=\"PriceApiClient:getMultipleSpotPrices\",o=e=>`${n}:${e}:${t}`,s=await this.#bt.mget(r.map(o)),i=(0,et.mapKeys)(s,(e,t)=>(e=>{const t=new RegExp(`^${n}:(.+):(.+)$`,\"u\"),r=e.match(t);if(!r)throw new Error(\"Invalid cache key\");return r})(t)[1]),a=r.filter(e=>void 0===i[e]);if(0===a.length)return i;const c=await this.#Et(a,t);return await this.#bt.mset(Object.entries(c).map(([e,t])=>({key:o(e),value:t,ttlMilliseconds:this.cacheTtlsMilliseconds.spotPrices}))),{...i,...c}}async getMultipleSpotPrices(e,t=\"usd\"){G(e,le(je)),G(t,lr);const r=e.filter(e=>!Zt.includes(e));return this.#Pt(r,t)}async#Bt(e){const t=We({baseUrl:this.#ae,path:\"/v3/historical-prices/{assetType}\",pathParams:{assetType:e.assetType},queryParams:{...e.timePeriod&&{timePeriod:e.timePeriod},...e.from&&{from:e.from.toString()},...e.to&&{to:e.to.toString()},...e.vsCurrency&&{vsCurrency:e.vsCurrency}},encodePathParams:!1}),r=await this.#se(t),n=await r.json();return G(n,fr),n}async getHistoricalPrices(e){return G(e,dr),((e,t,{ttlMilliseconds:r,functionName:n,generateCacheKey:o})=>{const s=o??sr,i=n??e.name??\"anonymousFunction\";return async(...n)=>{const o=s(i,n);try{const e=await t.get(o);if(void 0!==e)return e}catch(e){or.error(`Cache get error for key \"${o}\":`,e)}const a=await e(...n);return t.set(o,a,r).catch(e=>{or.error(`Cache set error for key \"${o}\":`,e)}),a}})(this.#Bt.bind(this),this.#bt,{functionName:\"PriceApiClient:getHistoricalPrices\",ttlMilliseconds:this.cacheTtlsMilliseconds.historicalPrices})(e)}}(LU,YU),XU=new tE(LU),QU={call:async(e,...t)=>snap.request({method:\"snap_messengerCall\",params:{action:e,params:t}})},eD=new class{constructor({messenger:e}){I.set(this,void 0),S(this,I,e,\"f\")}async getFeatureFlag(e){const{remoteFeatureFlags:t}=await W(this,I,\"f\").call(\"RemoteFeatureFlagController:getState\");return t[e]}async getFeatureFlags(e){const{remoteFeatureFlags:t}=await W(this,I,\"f\").call(\"RemoteFeatureFlagController:getState\");return e.reduce((e,r)=>(e[r]=t[r],e),{})}}({messenger:QU}),tD=new class{constructor({messenger:e}){x.set(this,void 0),_(this,x,e,\"f\")}async getAccountAssetByID(e,t){return R(this,x,\"f\").call(\"AssetsController:getAccountAssetByID\",e,t)}async getAccountAssetsByIDs(e,t){return R(this,x,\"f\").call(\"AssetsController:getAccountAssetsByIDs\",e,t)}async getAccountAssetsByScope(e,t){return R(this,x,\"f\").call(\"AssetsController:getAccountAssetsByScope\",t,e)}}({messenger:QU}),rD=new FA(LU,or),nD=new nU({logger:or,state:$U,assetsRepository:VU,trongridApiClient:qU,tronHttpClient:GU,priceApiClient:JU,tokenApiClient:XU,snapClient:zU,configProvider:LU}),oD=new class{#ie;#Ct;#It;#St;#Wt;#xt;#_t;constructor(e){const{getAccountAssetByID:t,getAccountAssetsByIDs:r,getAccountAssetsByScope:n,getAddressInfo:o,getAddressResources:s,getAddressStakingRewards:i}=e;this.#ie=or.withPrefix(\"[CoreAssetsAdapter]\"),this.#Ct=t,this.#It=r,this.#St=n,this.#Wt=o,this.#xt=s,this.#_t=i}async getAccountAssetByID(e,t){this.#ie.info(\"Getting account asset by ID\",{accountId:e,assetId:t});const r=await this.#Ct(e,t);return r?rU(e,r):null}async getAccountAssetsByIDs(e,t){this.#ie.info(\"Getting account assets by IDs\",{accountId:e,assetIds:t});const r=await this.#It(e,t);return t.map(t=>{const n=r[t];return n?rU(e,n):null})}async getAccountAssetsByScope(e,t){this.#ie.info(\"Getting account assets by scope\",{scope:e,accountId:t});const r=await this.#St(e,t);return Object.values(r).map(e=>rU(t,e))}async getAccountAssets(e){const[t,r,n]=await Promise.all([this.#St(Ft.Mainnet,e),this.#St(Ft.Nile,e),this.#St(Ft.Shasta,e)]);return[...Object.values(t),...Object.values(r),...Object.values(n)].map(t=>rU(e,t))}async fetchAssetsAndBalancesForAccount(e,t){this.#ie.info(\"Fetching assets and balances for account\",{scope:e,account:t});const[r,n,o]=await Promise.allSettled([this.#Wt(e,t.address),this.#xt(e,t.address),this.#_t(e,t.address)]);if(\"rejected\"===r.status&&!(r.reason instanceof AE))throw r.reason;if(\"rejected\"===n.status)throw n.reason;if(\"rejected\"===o.status)throw o.reason;const s=qN(r),i=n.value,a=Math.max(0,o.value);return[...QN(t,e,s),XN(t,e,s),JN(t,e,s),eU(t,e,a),...ZN({account:t,scope:e,tronAccountResources:i}),...YN({account:t,scope:e,tronAccountResources:i})]}async saveMany(e){this.#ie.info(\"Publishing snap-owned assets\",e);const t=e.filter(e=>{return t=e.assetType,tU.has(t);var t});if(0===t.length)return;const r=t.reduce((e,t)=>({...e,[t.keyringAccountId]:{added:[...e[t.keyringAccountId]?.added??[],t.assetType],removed:[]}}),{});await QS(snap,KN.AccountAssetListUpdated,{assets:r});const n=t.reduce((e,t)=>({...e,[t.keyringAccountId]:{...e[t.keyringAccountId]??{},[t.assetType]:{unit:t.symbol,amount:t.uiAmount}}}),{});await QS(snap,KN.AccountBalancesUpdated,{balances:n})}}({getAccountAssetByID:tD.getAccountAssetByID.bind(tD),getAccountAssetsByIDs:tD.getAccountAssetsByIDs.bind(tD),getAccountAssetsByScope:tD.getAccountAssetsByScope.bind(tD),getAddressInfo:qU.getAccountInfoByAddress.bind(qU),getAddressResources:GU.getAccountResources.bind(GU),getAddressStakingRewards:GU.getReward.bind(GU)}),sD=new class{#Rt;#kt;#Ot;cacheTtlsMilliseconds;constructor({snapAdapter:e,coreAdapter:t,remoteFeatureFlagsProvider:r}){this.#Rt=e,this.#kt=t,this.#Ot=r,this.cacheTtlsMilliseconds=this.#Rt.cacheTtlsMilliseconds}async#Ft(){return iU(await this.#Ot.getFeatureFlag(sU.tron))!==oU.Off}static isFiat(e){return nU.isFiat(e)}static hasChanged(e,t){return nU.hasChanged(e,t)}async getAccountAssetsByIDs(e,t){if(0===t.length)return[];if(await this.#Ft()){return await this.#kt.getAccountAssetsByIDs(e,t)}return this.#Rt.getAccountAssetsByIDs(e,t)}async getAccountAssetByID(e,t){if(await this.#Ft()){return await this.#kt.getAccountAssetByID(e,t)}return this.#Rt.getAccountAssetByID(e,t)}async fetchAssetsAndBalancesForAccount(e,t){if(await this.#Ft()){return await this.#kt.fetchAssetsAndBalancesForAccount(e,t)}return this.#Rt.fetchAssetsAndBalancesForAccount(e,t)}async getAssetsMetadata(e){return this.#Rt.getAssetsMetadata(e)}async saveMany(e){return await this.#Ft()?this.#kt.saveMany(e):this.#Rt.saveMany(e)}async getAll(){return this.#Rt.getAll()}async getAccountAssets(e){return await this.#Ft()?this.#kt.getAccountAssets(e):this.#Rt.getAccountAssets(e)}async getMultipleTokenConversions(e){return this.#Rt.getMultipleTokenConversions(e)}async getMultipleTokensMarketData(e){return this.#Rt.getMultipleTokensMarketData(e)}async getHistoricalPrice(e,t){return this.#Rt.getHistoricalPrice(e,t)}}({snapAdapter:nD,coreAdapter:oD,remoteFeatureFlagsProvider:eD}),iD=new class{#ie;#Mt;#ke;#Oe;#Fe;#Se;constructor({logger:e,transactionsRepository:t,trongridApiClient:r,tronHttpClient:n,priceApiClient:o,snapClient:s}){this.#ie=e.withPrefix(\"[🧾 TransactionsService]\"),this.#Mt=t,this.#ke=r,this.#Oe=n,this.#Fe=o,this.#Se=s}async#Nt(e,t){const r=t.map(async t=>{const r=\"TriggerSmartContract\"===t.raw_data.contract?.[0]?.type,n=!t.internal_transactions||0===t.internal_transactions.length,o=t.raw_data.contract?.[0]?.parameter?.value?.call_value>0;if(r&&n&&o){this.#ie.debug(`Attempting to enrich transaction ${t.txID} with full details for swap detection.`);try{const r=await this.#Oe.getTransactionInfoById(e,t.txID);if(r)return{...t,internal_transactions:r.internal_transactions??[]}}catch(e){this.#ie.warn({txId:t.txID,error:e},`Failed to enrich transaction ${t.txID}`)}}return t});return(await Promise.allSettled(r)).map(e=>\"fulfilled\"===e.status?e.value:null).filter(Boolean)}async#Ut(e,t){const r=new Map,n=new Set;for(const e of t){const t=e.raw_data.contract?.[0];if(\"TransferAssetContract\"===t?.type){const e=t.parameter.value.asset_name;n.add(e)}}if(0===n.size)return r;this.#ie.debug(`Fetching metadata for ${n.size} TRC10 tokens...`);const o=Array.from(n).map(async t=>{try{return{tokenId:t,metadata:await this.#Oe.getTRC10TokenMetadata(t,e)}}catch(e){return this.#ie.warn({tokenId:t,error:e},`Failed to fetch TRC10 token metadata for ${t}, will use default decimals`),null}}),s=await Promise.allSettled(o);for(const e of s)\"fulfilled\"===e.status&&e.value&&r.set(e.value.tokenId,e.value.metadata);return this.#ie.debug(`Successfully fetched metadata for ${r.size}/${n.size} TRC10 tokens.`),r}async fetchNewTransactionsForAccount(e,t){this.#ie.info(`Fetching new transactions for account ${t.address} on network ${e}...`);const r=await this.#Mt.getConfirmedTransactionIds(t.id);this.#ie.debug(`Found ${r.size} confirmed transactions in state for account ${t.id}.`);const{rawTransactions:n,trc20Transactions:o}=await this.#Dt(e,t.address);this.#ie.info(`Fetched ${n.length} raw transactions and ${o.length} TRC20 assistance data for account ${t.address} on network ${e}.`);const s=n.filter(e=>!r.has(e.txID));if(this.#ie.info(`Found ${s.length} transactions to process (${n.length-s.length} already confirmed in state).`),0===s.length)return this.#ie.info(\"No transactions to process.\"),[];const{enrichedRawTransactions:i,trc10TokenMetadata:a}=await this.#Lt(e,s);this.#ie.info(`Enriched ${i.length} transactions, fetched metadata for ${a.size} TRC10 tokens.`);const c=new Set(s.map(e=>e.txID)),u=o.filter(e=>c.has(e.transaction_id)),l=LB.mapTransactions({scope:e,account:t,rawTransactions:i,trc20Transactions:u,trc10TokenMetadata:a}),d=await this.#$t(l,t),f=l.filter(e=>!function(e,t,r={}){return[NU,UU].some(n=>n(e,t,r))}(e,t,{spotPrices:d}));return this.#ie.info(`Returning ${f.length} transactions for account ${t.address} on network ${e}.`),f}async checkAddressActivity(e,t){return(await this.#ke.getTransactionInfoByAddress(e,t,{limit:1})).length>0}async#Dt(e,t){const[r,n]=await Promise.allSettled([this.#ke.getTransactionInfoByAddress(e,t),this.#ke.getContractTransactionInfoByAddress(e,t)]);let o=[],s=[];return\"rejected\"===r.status?this.#ie.error(`Failed to fetch raw transactions for address ${t} on network ${e}`):o=r.value,\"rejected\"===n.status?this.#ie.error(`Failed to fetch TRC20 transactions for address ${t} on network ${e}`):s=n.value,{rawTransactions:o,trc20Transactions:s}}async#Lt(e,t){const[r,n]=await Promise.all([this.#Nt(e,t),this.#Ut(e,t)]);return{enrichedRawTransactions:r,trc10TokenMetadata:n}}async#$t(e,t){const r=new Set;for(const n of e)if(n.type===rB.Receive)for(const e of n.to)e.address===t.address&&e.asset?.fungible&&(e.asset.type.includes(\"/trc10:\")||e.asset.type.includes(\"/trc20:\"))&&r.add(e.asset.type);if(0===r.size)return{};try{return await this.#Fe.getMultipleSpotPrices([...r])}catch(e){return this.#ie.warn({error:e},\"Failed to fetch spot prices for spam filtering, keeping all transactions\"),void await this.#Se.trackError(e)}}async findByAccounts(e){return(await Promise.all(e.map(async e=>this.#Mt.findByAccountId(e.id)))).flat()}async save(e){await this.saveMany([e])}async saveMany(e){await this.#Mt.saveMany(e);const t=(0,et.groupBy)(e,\"account\");await QS(snap,KN.AccountTransactionsUpdated,{transactions:t})}}({logger:or,transactionsRepository:HU,trongridApiClient:qU,tronHttpClient:GU,priceApiClient:JU,snapClient:zU}),aD=new HN({logger:or,snapClient:zU,accountsRepository:jU,configProvider:LU,assetsService:sD,transactionsService:iD}),cD=new class{#ie;#ke;#Oe;#Se;constructor({logger:e,trongridApiClient:t,tronHttpClient:r,snapClient:n}){this.#ie=e.withPrefix(\"[💸 FeeCalculatorService]\"),this.#ke=t,this.#Oe=r,this.#Se=n}#zt(e){const t=hU.from(e.raw_data_hex,\"hex\").byteLength,r=e;if(r.signature&&Array.isArray(r.signature)){const e=r.signature.reduce((e,t)=>e+t.length/2,0);return It(t+e+64+5)}return It(t+134)}async#jt(e,t,r){const n=t.raw_data.contract;if(!n||0===n.length)return this.#ie.log(\"No contracts found in transaction, assuming zero energy usage\"),St;let o=St;for(const t of n){const n=t.type;let s;this.#ie.log(`Calculating energy for contract type: ${n}`),\"TransferContract\"===n||\"TransferAssetContract\"===n?s=St:\"TriggerSmartContract\"===n?s=It(await this.#Vt(e,t,r)):gU.has(n)?(this.#ie.log(`System contract ${n} detected, zero energy consumption`),s=St):(this.#ie.warn(`Unknown contract type: ${n}, using conservative estimate`),s=It(13e4)),this.#ie.log(`Contract ${n} energy: ${s.toString()}`),o=o.plus(s)}return this.#ie.log(`Total energy for transaction: ${o.toString()}`),o}async#Ht(e,t){try{return await this.#ke.getAccountInfoByAddress(e,t),!0}catch(r){return r instanceof AE||await this.#Se.trackError(r),this.#ie.log(`Account ${t} is not activated on ${e}`),!1}}async#Gt(e){try{return await this.#ke.getChainParameters(e)}catch(t){await this.#Se.trackError(t),this.#ie.warn({error:t},\"Failed to fetch chain parameters, attempting cached fallback\");try{const t=await this.#ke.peekCachedChainParameters(e);if(t&&t.length>0)return this.#ie.log(\"Using last-known cached chain parameters as fee floor\"),t}catch(e){this.#ie.warn({error:e},\"Failed to read cached chain parameters for fee floor\")}throw this.#ie.log(\"No cached chain parameters available\"),new pU}}async#Kt(e,t){const r=await this.#Gt(e),n=r.find(e=>\"getEnergyFee\"===e.key)?.value??420,o=Math.floor(t/n);return this.#ie.log({feeLimit:t,energyPrice:n,maxEnergyFromFeeLimit:o},\"Calculated fallback energy from fee limit\"),o}async#qt(e,t){return void 0!==t&&t>0?this.#Kt(e,t):13e4}#Zt(e,t,r){if(!t)return{userEnergy:e};const n=t.consume_user_resource_percent??100,o=t.origin_energy_limit??0;if(n>=100||o<=0)return{userEnergy:e};const s=Math.ceil(e*(n/100)),i=e-s;let a=Math.min(i,o);a=null===r?0:Math.min(a,r);const c=e-a;return this.#ie.log({totalEnergy:e,userPercent:n,maxDeployerSubsidy:o,deployerAvailableEnergy:r,userTheoretical:s,deployerTheoretical:i,deployerActual:a,userActual:c},\"Energy sharing calculation\"),{userEnergy:c}}async#Yt(e,t){if(!t)return null;try{const r=await this.#Oe.getAccountResources(e,t),n=r.EnergyLimit??0,o=r.EnergyUsed??0,s=Math.max(0,n-o);return this.#ie.log({deployerAddress:t,energyLimit:n,energyUsed:o,availableEnergy:s},\"Fetched deployer available energy\"),s}catch(e){return await this.#Se.trackError(e),this.#ie.warn({error:e,deployerAddress:t},\"Failed to fetch deployer energy\"),null}}async#Vt(e,t,r){try{const{data:n,owner_address:o,contract_address:s,call_value:i,token_id:a,call_token_id:c,call_token_value:u}=t.parameter.value;if(!n)throw this.#ie.warn(\"No data field found in contract, using fallback\"),new Error(\"No data field found in contract\");this.#ie.log({contractAddress:s,ownerAddress:o,callValue:i,tokenId:a,callTokenId:c,callTokenValue:u},\"Estimating energy\");const[l,d]=await Promise.all([this.#Oe.triggerConstantContract(e,{owner_address:o,contract_address:s,data:n,call_value:i,token_id:a,call_token_id:c,call_token_value:u}),this.#Oe.getContract(e,s).catch(async e=>(await this.#Se.trackError(e),this.#ie.warn(\"Failed to fetch contract info for energy sharing, assuming user pays all\"),null))]);if(\"FAILED\"===l.transaction.ret[0]?.ret)throw new Error(\"Simulation yields failed result\");if(\"energy_used\"in l){const t=l.energy_used,r=await this.#Yt(e,d?.origin_address),{userEnergy:o}=this.#Zt(t,d,r);return this.#ie.log({data:n.slice(0,8),totalEnergy:t,userEnergy:o,energyPenalty:l.energy_penalty,hasEnergySharing:null!==d,deployerAvailableEnergy:r},`Energy estimate for ${n.slice(0,8)}: user pays ${o} of ${t} units`),o}return this.#ie.warn(\"No energy_used in result, using fallback\"),this.#qt(e,r)}catch(t){return await this.#Se.trackError(t),this.#ie.error({error:t},\"Failed to estimate smart contract energy, using fallback\"),this.#qt(e,r)}}#Jt(e){const t=e.raw_data.contract;if(!t||0===t.length)return[];const r=[];for(const e of t){const t=e.type;if(\"TransferContract\"!==t&&\"TransferAssetContract\"!==t)continue;const{amount:n,to_address:o,owner_address:s}=e.parameter.value;n>0&&o&&r.push({toAddress:o,ownerAddress:s})}return r}#Xt(e){if(e.startsWith(\"T\"))return e;try{return Jm.address.fromHex(e)}catch{return e}}async#Qt(e,t){if(!t)return St;try{const r=await this.#Oe.getAccountResources(e,this.#Xt(t)),n=r.NetLimit??0,o=r.NetUsed??0;return It.max(0,n-o)}catch(e){return await this.#Se.trackError(e),this.#ie.warn({error:e,ownerAddress:t},\"Failed to fetch sender staked Bandwidth for account activation\"),St}}async#er({scope:e,transaction:t}){const r=this.#Jt(t);if(0===r.length)return{isActivatingAccount:!1,ownerAddress:void 0};const n=(await Promise.all(r.map(async({toAddress:t,ownerAddress:r})=>({toAddress:t,ownerAddress:r,isActivated:await this.#Ht(e,t)})))).filter(({toAddress:e,isActivated:t})=>!t&&(this.#ie.log(`Account ${e} is not activated, activation fee required`),!0));return{isActivatingAccount:n.length>0,ownerAddress:n[0]?.ownerAddress}}#tr(e){const t=e.find(e=>\"getCreateNewAccountFeeInSystemContract\"===e.key)?.value??1e6,r=e.find(e=>\"getCreateAccountFee\"===e.key)?.value??1e5,n=e.find(e=>\"getTransactionFee\"===e.key)?.value??_t,o=n>0?It(r).dividedToIntegerBy(n):It(r).dividedToIntegerBy(_t);return{activationFeeTrx:It(t).div(xt),createAccountFeeTrx:It(r).div(xt),createAccountBandwidth:o}}#rr(e){const t=e.raw_data.data;return t&&t.length>0?(this.#ie.log(\"Transaction contains memo, adding 1 TRX memo fee\"),Wt):St}async#nr({scope:e,transaction:t}){const r=t.raw_data.contract;if(!r||0===r.length)return St;if(!r.some(e=>\"WitnessCreateContract\"===e.type))return St;let n=Rt;try{const t=await this.#Gt(e);n=t.find(e=>\"getAccountUpgradeCost\"===e.key)?.value??Rt}catch(e){this.#ie.warn({error:e},\"Failed to fetch account upgrade cost, using fallback 9999 TRX\")}const o=It(n).div(xt);return this.#ie.log(`WitnessCreateContract detected, adding ${o.toString()} TRX account upgrade fee`),o}async computeFee({scope:e,transaction:t,availableEnergy:r,availableBandwidth:n,feeLimit:o}){this.#ie.log(\"Calculating fee for transaction \",JSON.stringify(t));const s=await this.#jt(e,t,o),i=await this.#er({scope:e,transaction:t}),{isActivatingAccount:a}=i;let c,u=St,l=St,d=St;if(a){const t=await this.#Gt(e),{activationFeeTrx:r,createAccountFeeTrx:n,createAccountBandwidth:o}=this.#tr(t);l=r;const s=await this.#Qt(e,i.ownerAddress);s.isGreaterThanOrEqualTo(o)?(c=o,this.#ie.log({createAccountBandwidth:o.toString(),stakedBandwidth:s.toString()},\"Account activation covered by staked Bandwidth\")):(c=St,d=n,this.#ie.log({createAccountFeeTrx:n.toString(),stakedBandwidth:s.toString()},\"Account activation Bandwidth shortfall paid in TRX\"))}else{c=this.#zt(t);u=n.isGreaterThanOrEqualTo(c)?St:c}const f=It.max(s.minus(r),St);let p=St;if(u.isGreaterThan(0)||f.isGreaterThan(0)){const t=await this.#Gt(e),r=t.find(e=>\"getTransactionFee\"===e.key)?.value??_t,n=t.find(e=>\"getEnergyFee\"===e.key)?.value??100,o=u.multipliedBy(r).div(xt),s=f.multipliedBy(n).div(xt);p=p.plus(o).plus(s)}l.isGreaterThan(0)&&(p=p.plus(l)),d.isGreaterThan(0)&&(p=p.plus(d));const h=this.#rr(t);h.isGreaterThan(0)&&(p=p.plus(h));const g=await this.#nr({scope:e,transaction:t});g.isGreaterThan(0)&&(p=p.plus(g));const y=[{type:QP.Base,asset:{unit:qt[e].nativeToken.symbol,type:qt[e].nativeToken.id,amount:Number(p.toFixed(6)).toString(),fungible:!0}}];return s.isGreaterThan(0)&&y.push({type:QP.Base,asset:{unit:qt[e].energy.symbol,type:qt[e].energy.id,amount:s.toString(),fungible:!0}}),c.isGreaterThan(0)&&y.push({type:QP.Base,asset:{unit:qt[e].bandwidth.symbol,type:qt[e].bandwidth.id,amount:c.toString(),fungible:!0}}),y}}({logger:or,trongridApiClient:qU,tronHttpClient:GU,snapClient:zU}),uD=new class{#or;constructor({tronWebFactory:e}){this.#or=e}async deserializeTransaction({scope:e,type:t,rawDataHex:r}){const n=this.#or.createClient(e).utils.deserializeTx.deserializeTransaction(t,r);return{txID:hB(await UB(yB(r))).slice(2),raw_data:n,raw_data_hex:r}}async isTransactionExpired({scope:e,rawData:t}){const r=this.#or.createClient(e),n=Date.now(),o=await r.trx.getCurrentBlock();if(!_U({currentBlock:o,now:n,rawData:t}))return!0;const s=RU({currentBlockNumber:o.block_header.raw_data.number,refBlockBytes:t.ref_block_bytes});if(!kU({currentBlock:o,referenceBlockNumber:s}))return!0;return!OU({rawData:t,referencedBlock:await this.#sr({tronWeb:r,currentBlock:o,referenceBlockNumber:s})})}async ensureFreshMetadata({scope:e,transaction:t}){try{const r=this.#or.createClient(e),n=await this.#ir(r,t.raw_data);return n===t.raw_data?t:this.#ar(r,t,n)}catch{throw new Error(IU)}}async ensureFreshRawData({scope:e,rawData:t}){try{return await this.#ir(this.#or.createClient(e),t)}catch{throw new Error(IU)}}async#ir(e,t){try{const r=Date.now(),n=await e.trx.getCurrentBlock(),o={currentBlock:n,now:r,rawData:t};if(!_U(o))return xU(t,n);const s=RU({currentBlockNumber:n.block_header.raw_data.number,refBlockBytes:o.rawData.ref_block_bytes});if(!kU({currentBlock:n,referenceBlockNumber:s}))return xU(t,n);const i=await this.#sr({tronWeb:e,currentBlock:n,referenceBlockNumber:s});return OU({rawData:o.rawData,referencedBlock:i})?t:xU(t,n)}catch{throw new Error(IU)}}async#sr({tronWeb:e,currentBlock:t,referenceBlockNumber:r}){if(r===t.block_header.raw_data.number)return t;try{return await e.trx.getBlockByNumber(r)}catch{return}}#ar(e,t,r){const n={...t,raw_data:r},o=e.utils.transaction.txJsonToPb(n);return{...n,raw_data_hex:e.utils.transaction.txPbToRawDataHex(o),txID:e.utils.transaction.txPbToTxID(o).replace(/^0x/u,\"\")}}}({tronWebFactory:ZU}),lD=new class{#cr;#Ce;#or;#ur;#ie;#Se;#lr;constructor({accountsService:e,assetsService:t,tronWebFactory:r,feeCalculatorService:n,logger:o,snapClient:s,transactionExpirationRefresherService:i}){this.#cr=e,this.#Ce=t,this.#or=r,this.#ur=n,this.#ie=o.withPrefix(\"[💸 SendService]\"),this.#Se=s,this.#lr=i}async validateSend({scope:e,fromAccountId:t,toAddress:r,asset:n,amount:o,feeLimit:s}){this.#ie.log(\"Validating send\",{scope:e,fromAccountId:t,toAddress:r,assetType:n.assetType,amount:o.toString()});const i=qt[e].nativeToken.id,a=n.assetType===i,[c,u,l,d]=await this.#Ce.getAccountAssetsByIDs(t,[n.assetType,i,qt[e].bandwidth.id,qt[e].energy.id]),f=c?new It(c.uiAmount):St,p=u?new It(u.uiAmount):St,h=l?new It(l.rawAmount):St,g=d?new It(d.rawAmount):St;if(o.isGreaterThan(f))return this.#ie.log(\"Insufficient balance for asset being sent\",{amount:o.toString(),assetBalance:f.toString()}),{valid:!1,errorCode:mI.InsufficientBalance};const y=await this.buildTransaction({fromAccountId:t,toAddress:r,asset:n,amount:o,feeLimit:s}),m=await this.#ur.computeFee({scope:e,transaction:y,availableEnergy:g,availableBandwidth:h,feeLimit:s}),b=new It(m.find(e=>e.asset.type===i)?.asset.amount??\"0\"),w=a?o.plus(b):b;return this.#ie.log(\"Validation calculation\",{isNativeToken:a,amount:o.toString(),trxFee:b.toString(),totalTrxNeeded:w.toString(),nativeTokenBalance:p.toString()}),w.isGreaterThan(p)?(this.#ie.log(\"Insufficient TRX balance to cover fees\",{totalTrxNeeded:w.toString(),nativeTokenBalance:p.toString()}),{valid:!1,errorCode:mI.InsufficientBalanceToCoverFee}):{valid:!0}}async buildTransaction({fromAccountId:e,toAddress:t,asset:r,amount:n,feeLimit:o}){const{chainId:s,assetNamespace:i,assetReference:a}=Ke(r.assetType);try{switch(i){case\"slip44\":return this.#ie.log(\"Sending TRX transaction\"),this.buildSendTrxTransaction({scope:s,fromAccountId:e,toAddress:t,amount:n,feeLimit:o});case\"trc10\":return this.#ie.log(`Sending TRC10 token: ${a}`),this.buildSendTrc10Transaction({scope:s,fromAccountId:e,toAddress:t,amount:n,tokenId:a,decimals:r.decimals,feeLimit:o});case\"trc20\":return this.#ie.log(`Sending TRC20 token: ${a}`),this.buildSendTrc20Transaction({scope:s,fromAccountId:e,toAddress:t,contractAddress:a,amount:n,decimals:r.decimals,feeLimit:o});default:throw new Error(`Unsupported asset namespace: ${i}`)}}catch(e){throw this.#ie.error({error:e},\"Failed to send asset\"),new Error(`Failed to send asset: ${e instanceof Error?e.message:\"Unknown error\"}`)}}async buildSendTrxTransaction({scope:e,fromAccountId:t,toAddress:r,amount:n,feeLimit:o}){const s=await this.#cr.findByIdOrThrow(t),i=this.#or.createClient(e),a=Number(zv(n)),c=await i.transactionBuilder.sendTrx(r,a,s.address);return this.#dr(i,c,o),c}async buildSendTrc10Transaction({scope:e,fromAccountId:t,toAddress:r,amount:n,tokenId:o,decimals:s,feeLimit:i}){const a=await this.#cr.findByIdOrThrow(t),c=this.#or.createClient(e),u=Number(Vv(n,s)),l=await c.transactionBuilder.sendToken(r,u,o,a.address);return this.#dr(c,l,i),l}async buildSendTrc20Transaction({scope:e,fromAccountId:t,toAddress:r,contractAddress:n,amount:o,decimals:s,feeLimit:i}){const a=await this.#cr.findByIdOrThrow(t),c=this.#or.createClient(e),u=[{type:\"address\",value:r},{type:\"uint256\",value:Vv(o,s)}];return(await c.transactionBuilder.triggerSmartContract(n,\"transfer(address,uint256)\",i?{feeLimit:i}:{},u,a.address)).transaction}async signAndSendTransaction({scope:e,fromAccountId:t,transaction:r,origin:n=\"MetaMask\"}){const o=await this.#cr.findByIdOrThrow(t),{privateKeyHex:s,address:i}=await this.#cr.deriveTronKeypair({entropySource:o.entropySource,derivationPath:o.derivationPath});Zv(r.raw_data,i);const a=this.#or.createClient(e,s),c=await this.#lr.ensureFreshMetadata({scope:e,transaction:r}),u=await a.trx.sign(c),l=await a.trx.sendRawTransaction(u);if(!l.result)throw new Error(`Failed to send transaction: ${l.message}`);return await this.#Se.trackTransactionSubmitted({origin:n,accountType:o.type,chainIdCaip:e}),await this.#Se.scheduleBackgroundEvent({method:rI,params:{txId:l.txid,scope:e,accountIds:[t],attempt:0},duration:Ot}),l}#dr(e,t,r){if(void 0!==r){t.raw_data.fee_limit=r;const n=e.utils.transaction.txJsonToPb(t);t.raw_data_hex=e.utils.transaction.txPbToRawDataHex(n),t.txID=e.utils.transaction.txPbToTxID(n).slice(2)}}}({logger:or,snapClient:zU,accountsService:aD,assetsService:sD,tronWebFactory:ZU,feeCalculatorService:cD,transactionExpirationRefresherService:uD}),dD=new class{#ie;#cr;#or;#Se;constructor({logger:e,accountsService:t,tronWebFactory:r,snapClient:n}){this.#ie=e.withPrefix(\"[💸 StakingService]\"),this.#cr=t,this.#or=r,this.#Se=n}async stake({account:e,assetId:t,amount:r,purpose:n,srNodeAddress:o}){const{chainId:s}=Ke(t),i=Number(zv(r)),a=r.integerValue(It.ROUND_DOWN).toNumber(),c=o??\"TVMwGfdDz58VvM7yTzGMWWSHsmofSxa9jH\";this.#ie.info(`Staking ${r.toString()} ${t} for ${n} for ${e.address} on ${s}...`),await yU({accountsService:this.#cr,tronWebFactory:this.#or,snapClient:this.#Se,account:e,scope:s,buildTransactions:async t=>[await t.transactionBuilder.freezeBalanceV2(i,n,e.address),await t.transactionBuilder.vote({[c]:a},e.address)]})}async unstake({account:e,assetId:t,amount:r}){const{chainId:n}=Ke(t);let o;if([Mt.TrxStakedForBandwidthMainnet,Mt.TrxStakedForBandwidthNile,Mt.TrxStakedForBandwidthShasta].includes(t)&&(o=\"BANDWIDTH\"),[Mt.TrxStakedForEnergyMainnet,Mt.TrxStakedForEnergyNile,Mt.TrxStakedForEnergyShasta].includes(t)&&(o=\"ENERGY\"),!o)throw new Error(\"Invalid asset ID\");const s=Number(zv(r));this.#ie.info(`Unstaking ${r.toString()} ${t} for ${e.address} on ${n}...`),await yU({accountsService:this.#cr,tronWebFactory:this.#or,snapClient:this.#Se,account:e,scope:n,buildTransactions:async t=>[await t.transactionBuilder.unfreezeBalanceV2(s,o,e.address)]})}async claimUnstakedTrx({account:e,scope:t}){this.#ie.info(`Claiming unstaked TRX for ${e.address} on ${t}...`),await yU({accountsService:this.#cr,tronWebFactory:this.#or,snapClient:this.#Se,account:e,scope:t,buildTransactions:async t=>[await t.transactionBuilder.withdrawExpireUnfreeze(e.address)]})}async claimTrxStakingRewards({account:e,scope:t}){this.#ie.info(`Claiming staking rewards for ${e.address} on ${t}...`),await yU({accountsService:this.#cr,tronWebFactory:this.#or,snapClient:this.#Se,account:e,scope:t,buildTransactions:async t=>[await t.transactionBuilder.withdrawBlockRewards(e.address)]})}}({logger:or,snapClient:zU,accountsService:aD,tronWebFactory:ZU}),fD=new class{#ie;#cr;#or;constructor({logger:e,accountsService:t,tronWebFactory:r}){this.#ie=e.withPrefix(\"[💼 WalletService]\"),this.#cr=t,this.#or=r}async handleKeyringRequest({account:e,scope:t,method:r,params:n}){this.#ie.log(\"Handling wallet request\",{method:r,accountId:e.id,scope:t,params:n});try{switch(r){case YE.SignMessage:return await this.signMessage({account:e,scope:t,params:n});case YE.SignTransaction:return await this.signTransaction({account:e,scope:t,params:n});default:throw new Ev(\"Unsupported wallet method\",JE)}}catch(e){if(this.#ie.error({error:e},\"Error handling wallet request\"),4100===e.code||e.message?.includes(\"rejected\"))throw new Ev(QE.message,QE);if(4001===e.code||e.message?.includes(\"Invalid\"))throw new Ev(e.message??JE.message,JE);throw new Ev(e.message??eP.message,eP)}}async signMessage({account:e,scope:t,params:r}){try{VS(r,yP);const{address:n,message:o}=r,{privateKeyHex:s}=await this.#cr.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),i=this.#or.createClient(t,s),a=DU.from(o,\"base64\").toString(\"utf8\"),c={signature:i.trx.signMessageV2(a,s)};return HS(c,mP),this.#ie.log(\"Message signed successfully\",{address:n}),c}catch(e){throw this.#ie.error({error:e},\"Error signing message\"),e}}async signTransaction({account:e,scope:t,params:r}){try{VS(r,bP);const{address:n,transaction:{rawDataHex:o,type:s}}=r,{privateKeyHex:i,address:a}=await this.#cr.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),c=this.#or.createClient(t,i),u=c.utils.deserializeTx.deserializeTransaction(s,o);qv(u),Zv(u,a);const l={visible:!1,txID:hB(await UB(yB(o))).slice(2),raw_data:u,raw_data_hex:o},d=(await c.trx.sign(l,i)).signature,f={signature:`0x${d?.[0]??\"\"}`};return this.#ie.log(\"Transaction signed successfully\",{address:n,scope:t}),f}catch(e){if(this.#ie.error({error:e},\"Error signing transaction\"),e.message?.includes(\"deserialize\")||e.message?.includes(\"parse\")||e.message?.includes(\"invalid\"))throw new Ev(`Invalid transaction format: ${e.message}`,XE);throw e}}async resolveAccountAddress(e,t,r){this.#ie.log(\"Resolving account address\",{accountCount:e.length,scope:t,request:r});const n=e.filter(e=>e.scopes.includes(t));if(0===n.length)throw new Error(`No accounts with scope: ${t}`);VS(r,AP);const{params:o}=r,{address:s}=o;if(!s||\"string\"!=typeof s)throw new Error(\"Address parameter is required and must be a string\");const i=s;if(!this.#or.createClient(t).isAddress(i))throw new Error(`Invalid Tron address: ${i}`);const a=n.find(e=>e.address===i);if(!a)throw new Error(`Account not found in keyring for address: ${i}`);const c=`${t}:${i}`;return HS(c,EP),this.#ie.log(\"Address resolved successfully\",{address:i,caip10Address:c,accountId:a.id}),{address:c}}}({logger:or,accountsService:aD,tronWebFactory:ZU}),pD=new class{#fr;#Se;#ie;constructor(e,t,r){this.#fr=e,this.#Se=t,this.#ie=r}async scanTransaction({accountAddress:e,transactionRawData:t,origin:r,scope:n,options:o=[\"simulation\",\"validation\"],account:s}){if(!Kv(t))return this.#ie.warn(\"Malformed transaction: Tron transactions must contain exactly one contract\"),{status:\"ERROR\",estimatedChanges:{assets:[]},validation:{type:null,reason:null},error:{type:\"MALFORMED_TRANSACTION\",code:null,message:\"Tron transactions must contain exactly one contract entry.\"},simulationStatus:qB};if(!FA.isContractTypeSupported(t))return this.#ie.info(\"Transaction contract type is not supported for simulation, skipping scan\"),{status:\"SUCCESS\",estimatedChanges:{assets:[]},validation:{type:null,reason:null},error:null,simulationStatus:KB};try{const i=await this.#fr.scanTransaction({accountAddress:e,transactionRawData:t,origin:\"metamask\"===r?\"https://metamask.io\":r,options:o}),a=this.#pr(i);if(!a?.status)return this.#ie.warn(\"Invalid scan result received from security alerts API\"),s&&await this.#Se.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:YB.ERROR,hasSecurityAlerts:!1}),null;if(s){const e=Object.values(YB).includes(a.status)?a.status:YB.ERROR,t=Boolean(a.validation?.type&&a.validation.type!==ZB.Benign);if(await this.#Se.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:e,hasSecurityAlerts:t}),t){const e=Object.values(ZB).includes(a.validation.type)?a.validation.type:ZB.Warning;await this.#Se.trackSecurityAlertDetected({origin:r,accountType:s.type,chainIdCaip:n,securityAlertResponse:e,securityAlertReason:a.validation.reason??null,securityAlertDescription:this.getSecurityAlertDescription(a.validation)})}}return a}catch(e){return await this.#Se.trackError(e),this.#ie.error(e),s&&await this.#Se.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:YB.ERROR,hasSecurityAlerts:!1}),null}}getSecurityAlertDescription(e){if(!e?.reason)return\"Security alert: Unknown reason\";return{unfair_trade:\"Unfair trade of assets, without adequate compensation to the owner's account\",transfer_farming:\"Substantial transfer of the account's assets to untrusted entities\",known_attacker:\"A known attacker's account is involved in the transaction\",other:\"The transaction was marked as malicious for other reason, further details would be described in features field\"}[e.reason]??`Security alert: ${e.reason}`}#pr(e){if(!e)return null;const t=this.#hr(e);return{status:t,estimatedChanges:{assets:this.#gr(e.simulation?.account_summary?.assets_diffs)},validation:{type:e.validation?.result_type??null,reason:e.validation?.reason??null},error:this.#yr(e.simulation),simulationStatus:\"ERROR\"===t?qB:GB}}#hr(e){return\"Error\"===e.simulation?.status||\"Error\"===e.validation?.status?\"ERROR\":\"SUCCESS\"}#gr(e){return e?e.filter(e=>this.#mr(e)).map(e=>this.#br(e)):[]}#mr(e){const t=e.in?.[0]??e.out?.[0];return!!t&&(\"token_id\"in t||void 0!==t?.value)}#br(e){const t=e.in?.[0],r=e.out?.[0],n=t??r;return{type:t?\"in\":\"out\",symbol:e.asset.symbol??e.asset_type,name:e.asset.name??e.asset_type,logo:e.asset.logo_url??null,value:this.#wr(n,e.asset.decimals),price:n?.usd_price??null,assetType:e.asset_type}}#wr(e,t){return e?\"token_id\"in e?\"value\"in e&&\"string\"==typeof e.value?e.value:\"1\":e.raw_value&&void 0!==t?new It(e.raw_value).dividedBy(new It(10).pow(t)).toFixed():\"0\":\"0\"}#yr(e){return e?.error||e?.error_details?{type:e.error_details&&\"type\"in e.error_details?e.error_details.type:null,code:e.error_details&&\"code\"in e.error_details?e.error_details.code:null,message:e.error??null}:null}}(rD,zU,or),hD=new class{#ie;#Se;#Re;#or;#Ce;#ur;constructor({snapClient:e,state:t,tronWebFactory:r,assetsService:n,feeCalculatorService:o,logger:s}){this.#ie=s.withPrefix(\"[🔑 ConfirmationHandler]\"),this.#Se=e,this.#Re=t,this.#or=r,this.#Ce=n,this.#ur=o}async#vr(e){try{await this.#Re.setKey(`mapInterfaceNameToId.${e}`,null)}catch(e){await this.#Se.trackError(e),this.#ie.error({error:e},\"Failed to clear interface ID\")}}async handleKeyringRequest({request:e,account:t}){this.#ie.info(\"Handling keyring request\",{request:e,account:t});const{method:r}=e.request;switch(r){case YE.SignMessage:return this.#Tr(e,t);case YE.SignTransaction:return this.#Ar(e,t);default:throw this.#ie.warn(\"Unhandled keyring request method\",{method:r}),new Error(`Unhandled keyring request method: ${r}`)}}async#Tr(e,t){const r=await async function(e,t){G(e.request.params,yP);const{request:{params:{message:r}},scope:n,origin:o}=e,s=uU.from(r,\"base64\").toString(\"utf8\"),i=await TD.snapClient.getPreferences().then(e=>e.locale).catch(()=>\"en\"),a=await TD.snapClient.createInterface(zB(cU,{message:s,account:t,scope:n,locale:i,networkImage:bC,origin:wC(o)}),{});return TD.snapClient.showDialog(a)}(e,t);return!0===r}async#Ar(e,t){G(e.request.params,bP);const{scope:r,request:{params:{transaction:{rawDataHex:n,type:o}}}}=e,s=this.#or.createClient(r).utils.deserializeTx.deserializeTransaction(o,n);qv(s);const i=await dU(e,t,s);return await this.#vr($C),!0===i}async confirmTransactionRequest({scope:e,fromAddress:t,toAddress:r,amount:n,fees:o,asset:s,accountType:i,origin:a,transactionRawData:c}){await this.#Se.trackTransactionAdded({origin:a,accountType:i,chainIdCaip:e});const u=await async function(e,t,r){const{transactionScanService:n}=TD,{transactionRawData:o}=r,s={...fU,...r,transactionRawData:o,tokenPricesFetchStatus:QB,scanFetchStatus:QB};try{s.preferences=await e.getPreferences()}catch{}const{useSecurityAlerts:i}=s.preferences;s.fees.forEach(e=>{e.asset.iconUrl=aU(e.asset.type)});const a=await e.createInterface(zB(GC,{context:s}),s),c=e.showDialog(a),u=t.setKey(`mapInterfaceNameToId.${KC}`,a);if(n){const e=[\"simulation\"];i&&e.push(\"validation\");const t={type:r.accountType,address:r.fromAddress};try{const i=await n.scanTransaction({accountAddress:r.fromAddress,transactionRawData:o,origin:r.origin,scope:r.scope,options:e,account:t});s.scan=i,s.scanFetchStatus=i?tC:rC}catch{s.scan=null,s.scanFetchStatus=rC}}else s.scanFetchStatus=tC;return await u,s.preferences.useExternalPricingData||(s.tokenPricesFetchStatus=tC),await e.updateInterface(a,zB(GC,{context:s}),s),s.preferences.useExternalPricingData&&await e.scheduleBackgroundEvent({method:QC,duration:\"PT1S\"}),n&&await e.scheduleBackgroundEvent({method:eI,duration:\"PT20S\"}),c}(this.#Se,this.#Re,{scope:e,fromAddress:t,toAddress:r,amount:n,fees:o,asset:s,origin:wC(a),accountType:i,transactionRawData:c});return await this.#vr(KC),!0===u?await this.#Se.trackTransactionApproved({origin:a,accountType:i,chainIdCaip:e}):await this.#Se.trackTransactionRejected({origin:a,accountType:i,chainIdCaip:e}),!0===u}async confirmClaimUnstakedTrx({account:e,scope:t}){const r=this.#or.createClient(t),n=await r.transactionBuilder.withdrawExpireUnfreeze(e.address),[o,s]=await this.#Ce.getAccountAssetsByIDs(e.id,[qt[t].bandwidth.id,qt[t].energy.id]),i=s?new It(s.rawAmount):St,a=o?new It(o.rawAmount):St,c=await this.#ur.computeFee({scope:t,transaction:n,availableEnergy:i,availableBandwidth:a});let u;c.forEach(e=>{e.asset.iconUrl=aU(e.asset.type)});try{u=await this.#Se.getPreferences()}catch(e){throw new Cv(`Failed to retrieve Snap preferences: ${e.message}`)}const l={scope:t,account:e,transaction:{rawDataHex:\"\",type:\"\"},origin:\"MetaMask\",preferences:u,networkImage:bC,scan:null,scanFetchStatus:tC,tokenPrices:{},tokenPricesFetchStatus:tC,fees:c,feesFetchStatus:tC,isInsufficientBalance:!1},d=LC({context:l}),f=await this.#Se.createInterface(d,l);return!0===await this.#Se.showDialog(f)}}({snapClient:zU,state:$U,tronWebFactory:ZU,assetsService:sD,feeCalculatorService:cD,logger:or}),gD=new class{#ie;#Ce;constructor({logger:e,assetsService:t}){this.#ie=e.withPrefix(\"[🪙 AssetsHandler]\"),this.#Ce=t}async onAssetHistoricalPrice(e){this.#ie.log(\"[📈 onAssetHistoricalPrice]\",e);const{from:t,to:r}=e;return{historicalPrice:await this.#Ce.getHistoricalPrice(t,r)}}async onAssetsConversion(e){this.#ie.log(\"[💱 onAssetsConversion]\");const{conversions:t}=e;return{conversionRates:await this.#Ce.getMultipleTokenConversions(t)}}async onAssetsLookup(e){return{assets:await this.#Ce.getAssetsMetadata(e.assets)}}async onAssetsMarketData(e){return{marketData:await this.#Ce.getMultipleTokensMarketData(e.assets)}}}({logger:or,assetsService:sD}),yD=new class{#ie;#cr;#Ce;#Er;#or;#ur;#Se;#Pr;#Br;#Ie;#lr;constructor({logger:e,accountsService:t,assetsService:r,sendService:n,feeCalculatorService:o,tronWebFactory:s,snapClient:i,stakingService:a,confirmationHandler:c,transactionsService:u,transactionExpirationRefresherService:l}){this.#ie=e.withPrefix(\"[👋 ClientRequestHandler]\"),this.#cr=t,this.#Ce=r,this.#Er=n,this.#ur=o,this.#or=s,this.#Se=i,this.#Pr=a,this.#Br=c,this.#Ie=u,this.#lr=l}async handle(e){this.#ie.log(\"Handling client request\",e);const{method:t}=e;switch(t){case nI:return this.#Cr(e);case iI:return this.#Ir(e);case aI:return this.#Sr(e);case oI:return this.#Wr(e);case sI:return this.#xr(e);case cI:return this.#_r(e);case uI:return this.#Rr(e);case lI:return this.#kr(e);case dI:return this.#Or(e);case fI:return this.#Fr(e);case pI:return this.#Mr(e);case hI:return this.#Nr(e);case gI:return this.#Ur(e);case yI:return this.#Dr(e);default:throw new _v}}async#Cr(e){$B(e,TI,new Sv);const{transaction:t,accountId:r,scope:n,options:{type:o}}=e.params,s=await this.#cr.findByIdOrThrow(r),{privateKeyHex:i,address:a}=await this.#cr.deriveTronKeypair({entropySource:s.entropySource,derivationPath:s.derivationPath}),c=this.#or.createClient(n,i);let u=eS.from(t,\"base64\").toString(\"hex\");const l=c.utils.deserializeTx.deserializeTransaction(o,u);u=this.#Lr(c,l),qv(l),Zv(l,a);const d={visible:!1,txID:hB(await UB(yB(u))).slice(2),raw_data:l,raw_data_hex:u},f=await this.#lr.ensureFreshMetadata({scope:n,transaction:d}),p=await c.trx.sign(f),h=await c.trx.sendRawTransaction(p);if(!h.result)throw new Error(`Failed to send transaction: ${h.message}`);const g=LB.createPendingTransaction({txId:h.txid,account:s,scope:n});return await this.#Ie.save(g),await this.#Se.scheduleBackgroundEvent({method:rI,params:{txId:h.txid,scope:n,accountIds:[r],attempt:0},duration:Ot}),{transactionId:h.txid}}async#Ir(e){try{return G(e,BI),{valid:!0,errors:[]}}catch(e){return await this.#Se.trackError(e),{valid:!1,errors:[{code:mI.Invalid}]}}}async#Sr(e){try{G(e,II);const{accountId:t,assetId:r,value:n,toAddress:o}=e.params;if(!await this.#cr.findById(t))return{valid:!1,errors:[{code:mI.Required}]};const{chainId:s}=Ke(r),i=s,[a,c,u,l]=await this.#Ce.getAccountAssetsByIDs(t,[r,qt[i].nativeToken.id,qt[i].bandwidth.id,qt[i].energy.id]),d=new It(n),f=a?new It(a.uiAmount):St,p=c?new It(c.uiAmount):St,h=u?new It(u.uiAmount):St,g=l?new It(l.uiAmount):St;if(!a||d.isGreaterThan(f))return{valid:!1,errors:[{code:mI.InsufficientBalance}]};if(!o)return{valid:!0,errors:[]};const y=await this.#Er.buildTransaction({fromAccountId:t,toAddress:o,asset:a,amount:d,feeLimit:kt}),m=await this.#ur.computeFee({scope:i,transaction:y,availableEnergy:g,availableBandwidth:h,feeLimit:kt}),b=qt[i].nativeToken.id,w=new It(m.find(e=>e.asset.type===b)?.asset.amount??\"0\");return(r===b?d.plus(w):w).isGreaterThan(p)?{valid:!1,errors:[{code:mI.InsufficientBalanceToCoverFee}]}:{valid:!0,errors:[]}}catch(e){return await this.#Se.trackError(e),this.#ie.error(\"Error in #handleOnAmountInput:\",e),{valid:!1,errors:[{code:mI.Invalid}]}}}async#Wr(e){$B(e,EI,new Sv);const{fromAccountId:t,toAddress:r,amount:n,assetId:o}=e.params,s=await this.#cr.findById(t);if(!s)return{valid:!1,errors:[{code:mI.Invalid}]};const i=await this.#Ce.getAccountAssetByID(t,o);if(!i)return{valid:!1,errors:[{code:mI.InsufficientBalance}]};const{chainId:a}=Ke(o),c=a,u=new It(n),l=await this.#Er.validateSend({scope:c,fromAccountId:t,toAddress:r,asset:i,amount:u,feeLimit:kt});if(!l.valid)return{valid:!1,errors:[{code:l.errorCode??mI.InsufficientBalance}]};const[[d,f],p]=await Promise.all([this.#Ce.getAccountAssetsByIDs(t,[qt[c].bandwidth.id,qt[c].energy.id]),this.#Er.buildTransaction({fromAccountId:t,toAddress:r,asset:i,amount:u,feeLimit:kt})]),h=f?new It(f.rawAmount):St,g=d?new It(d.rawAmount):St,y=await this.#ur.computeFee({scope:c,transaction:p,availableEnergy:h,availableBandwidth:g,feeLimit:kt}),m=await this.#lr.ensureFreshRawData({scope:c,rawData:p.raw_data});if(!await this.#Br.confirmTransactionRequest({scope:c,fromAddress:s.address,toAddress:r,amount:n,fees:y,asset:i,accountType:s.type,origin:\"MetaMask\",transactionRawData:m}))throw new $v;const b=await this.#Er.signAndSendTransaction({scope:c,fromAccountId:t,transaction:p}),w=LB.createPendingSendTransaction({txId:b.txid,account:s,scope:c,toAddress:r,amount:n,assetType:o,assetSymbol:i.symbol});return await this.#Ie.save(w),this.#ie.log(`Created pending Send transaction ${b.txid} for account ${s.id}`),{transactionId:b.txid,status:tB.Submitted}}async#xr(e){$B(e,kI,new Sv);const{params:{scope:t,transaction:r,accountId:n,options:{type:o,feeLimit:s}}}=e;await this.#cr.findByIdOrThrow(n);const i=this.#or.createClient(t);let a=eS.from(r,\"base64\").toString(\"hex\");const c=i.utils.deserializeTx.deserializeTransaction(o,a);a=this.#Lr(i,c,s),qv(c);const u={visible:!1,txID:hB(await UB(yB(a))).slice(2),raw_data:c,raw_data_hex:a},[l,d]=await this.#Ce.getAccountAssetsByIDs(n,[qt[t].bandwidth.id,qt[t].energy.id]),f=d?new It(d.rawAmount):St,p=l?new It(l.rawAmount):St,h=await this.#ur.computeFee({scope:t,transaction:u,availableEnergy:f,availableBandwidth:p,feeLimit:37e6});return G(h,OI),h}async#_r(e){$B(e,MI,new Sv);const{fromAccountId:t,value:r,options:{purpose:n}}=e.params,o=await this.#cr.findByIdOrThrow(t),s=Ft.Mainnet,i=await this.#Ce.getAccountAssetByID(t,qt[s].nativeToken.id),a=i?new It(i.uiAmount):St,c=It(r);if(c.isGreaterThan(a))return{valid:!1,errors:[mI.InsufficientBalance]};const u=this.#or.createClient(s),l=Number(zv(c)),d=await u.transactionBuilder.freezeBalanceV2(l,n,o.address),[f,p]=await this.#Ce.getAccountAssetsByIDs(t,[qt[s].bandwidth.id,qt[s].energy.id]),h=p?It(p.rawAmount):St,g=f?It(f.rawAmount):St,y=await this.#ur.computeFee({scope:s,transaction:d,availableEnergy:h,availableBandwidth:g});return G(y,OI),y}async#Rr(e){$B(e,xI,new Sv);const{accountId:t,assetId:r,value:n}=e.params;await this.#cr.findByIdOrThrow(t);const o=await this.#Ce.getAccountAssetByID(t,r),s=o?new It(o.uiAmount):St;return new It(n).isGreaterThan(s)?{valid:!1,errors:[{code:mI.InsufficientBalance}]}:{valid:!0,errors:[]}}async#kr(e){$B(e,RI,new Sv);const{fromAccountId:t,assetId:r,value:n,options:{purpose:o,srNodeAddress:s}}=e.params,i=await this.#cr.findByIdOrThrow(t),a=await this.#Ce.getAccountAssetByID(t,r),c=a?new It(a.uiAmount):St,u=new It(n);return u.isGreaterThan(c)?{valid:!1,errors:[{code:mI.InsufficientBalance}]}:(await this.#Pr.stake({account:i,assetId:r,amount:u,purpose:o,srNodeAddress:s}),{valid:!0,errors:[]})}async#Or(e){$B(e,UI,new Sv);const{accountId:t,assetId:r,value:n,options:{purpose:o}}=e.params,s=`${r}-staked-for-${o.toLowerCase()}`;await this.#cr.findByIdOrThrow(t);const i=await this.#Ce.getAccountAssetByID(t,s),a=i?new It(i.uiAmount):St;return new It(n).isGreaterThan(a)?{valid:!1,errors:[{code:mI.InsufficientBalance}]}:{valid:!0,errors:[]}}async#Fr(e){$B(e,LI,new Sv);const{accountId:t,assetId:r,value:n,options:{purpose:o}}=e.params,s=`${r}-staked-for-${o.toLowerCase()}`,i=await this.#cr.findByIdOrThrow(t),a=await this.#Ce.getAccountAssetByID(t,s),c=a?new It(a.uiAmount):St,u=new It(n);return u.isGreaterThan(c)?{valid:!1,errors:[{code:mI.InsufficientBalance}]}:(await this.#Pr.unstake({account:i,assetId:s,amount:u}),{valid:!0,errors:[]})}async#Mr(e){$B(e,zI,new Sv);const{fromAccountId:t,assetId:r}=e.params,n=await this.#cr.findByIdOrThrow(t),{chainId:o}=Ke(r),s=o;if(!await this.#Br.confirmClaimUnstakedTrx({account:n,scope:s}))throw new $v;return await this.#Pr.claimUnstakedTrx({account:n,scope:s}),{valid:!0,errors:[]}}async#Nr(e){$B(e,VI,new Sv);const{fromAccountId:t,assetId:r}=e.params,n=await this.#cr.findByIdOrThrow(t),{chainId:o}=Ke(r),s=o;return await this.#Pr.claimTrxStakingRewards({account:n,scope:s}),{valid:!0,errors:[]}}async#Ur(e){$B(e,qI,new Sv);const{params:{accountId:t,message:r}}=e,n=await this.#cr.findById(t);if(!n)throw new Sv(`Account not found: ${t}`);const{address:o}=HI(r);if(o!==n.address)throw new Sv(`Address in rewards message (${o}) does not match signing account address (${n.address})`);const{privateKeyHex:s}=await this.#cr.deriveTronKeypair({entropySource:n.entropySource,derivationPath:n.derivationPath}),i=this.#or.createClient(Ft.Mainnet,s),a=eS.from(r,\"base64\").toString(\"utf8\");return{signature:i.trx.signMessageV2(a,s),signedMessage:r,signatureType:\"secp256k1\"}}async#Dr(e){$B(e,QI,new Sv);const{params:{accountId:t,message:r}}=e,n=await this.#cr.findById(t);if(!n)throw new Sv(`Account not found: ${t}`);const{address:o}=YI(r);if(o!==n.address)throw new Sv(`Address in proof-of-ownership message (${o}) does not match signing account address (${n.address})`);const{privateKeyHex:s}=await this.#cr.deriveTronKeypair({entropySource:n.entropySource,derivationPath:n.derivationPath});return{signature:this.#or.createClient(Ft.Mainnet,s).trx.signMessageV2(r,s)}}#Lr(e,t,r=101e6){t.fee_limit=r;const n=e.utils.transaction.txJsonToPb({raw_data:t});return e.utils.transaction.txPbToRawDataHex(n)}}({logger:or,snapClient:zU,accountsService:aD,assetsService:sD,sendService:lD,tronWebFactory:ZU,feeCalculatorService:cD,stakingService:dD,confirmationHandler:hD,transactionsService:iD,transactionExpirationRefresherService:uD}),mD=new class{#ie;#cr;#Se;#Re;#Fe;#Oe;#$r;#lr;constructor({logger:e,accountsService:t,snapClient:r,state:n,priceApiClient:o,tronHttpClient:s,transactionScanService:i,transactionExpirationRefresherService:a}){this.#ie=e.withPrefix(\"[⏰ CronHandler]\"),this.#cr=t,this.#Se=r,this.#Re=n,this.#Fe=o,this.#Oe=s,this.#$r=i,this.#lr=a}async handle(e){const{method:t,params:r}=e,{active:n,locked:o}=await this.#Se.getClientStatus();if(n&&!o)switch(t){case qC:case ZC:await this.synchronizeSelectedAccounts();break;case YC:await this.synchronizeAccounts(r);break;case JC:await this.synchronizeAccount(r);break;case XC:await this.synchronizeAccountTransactions(r);break;case QC:await this.refreshConfirmationPrices();break;case eI:await this.refreshConfirmationSend();break;case tI:await this.refreshSignTransaction();break;case rI:await this.trackTransaction(r);break;default:throw new Error(`Unknown cronjob method: ${t}`)}}async synchronizeSelectedAccounts(){this.#ie.info(\"Synchronizing selected accounts...\");const e=await this.#cr.getAllSelected();await this.#cr.synchronize(e)}async synchronizeAccounts({accountIds:e}){this.#ie.info(`Synchronizing accounts ${e.join(\", \")}...`);const t=await this.#cr.findByIds(e);0!==t.length&&await this.#cr.synchronize(t)}async synchronizeAccount({accountId:e}){this.#ie.info(`Synchronizing account ${e}...`);const t=await this.#cr.findById(e);t&&await this.#cr.synchronize([t])}async synchronizeAccountTransactions({accountId:e}){this.#ie.info(`Synchronizing account transactions ${e}...`);const t=await this.#cr.findById(e);t&&await this.#cr.synchronizeTransactions([t])}async refreshConfirmationPrices(){this.#ie.info(\"Background price refresh triggered for confirmation...\");const e=(await this.#Re.getKey(\"mapInterfaceNameToId\")??{})[KC];e?await this.#zr(e):this.#ie.info(\"No active transaction request interface found\")}async#zr(e){const t=await this.#Se.getInterfaceContext(e);if(t)try{const r=[t.asset.assetType,...t.fees.map(e=>e.asset.type)],n=[...new Set(r)],o={...t,tokenPricesFetchStatus:eC};await this.#Se.updateInterface(e,zB(GC,{context:o}),o),this.#ie.info(`Fetching fresh prices for ${n.length} assets`);const s=await this.#Fe.getMultipleSpotPrices(n,t.preferences.currency),i=await this.#Se.getInterfaceContext(e);if(!i)return void this.#ie.info(\"Interface context no longer exists after fetch, skipping update\");const a={...i,tokenPrices:s,tokenPricesFetchStatus:tC};await this.#Se.updateInterface(e,zB(GC,{context:a}),a),this.#ie.info(\"Successfully refreshed confirmation prices\"),await this.#Se.scheduleBackgroundEvent({method:QC,duration:\"PT20S\"})}catch(e){this.#ie.warn({error:e},\"Could not refresh confirmation prices\")}else this.#ie.info(\"Interface context no longer exists, skipping refresh\")}async refreshConfirmationSend(){this.#ie.info(\"Background scan refresh triggered for send confirmation...\");const e=(await this.#Re.getKey(\"mapInterfaceNameToId\")??{})[KC];if(!e)return void this.#ie.info(\"No active send confirmation interface found\");const t=await this.#Se.getInterfaceContext(e);if(!t)return void this.#ie.info(\"Interface context no longer exists, skipping refresh\");if(!t.fromAddress||!t.scope)return void this.#ie.info(\"Context is missing required fields for scan refresh\");const{preferences:r,scope:n,fromAddress:o,origin:s}=t,i=t.transactionRawData;if(i)try{const a={...t,scanFetchStatus:eC};await this.#Se.updateInterface(e,zB(GC,{context:a}),a);const c=[\"simulation\"];r.useSecurityAlerts&&c.push(\"validation\");const u={type:t.accountType,address:o};let{scan:l}=t,{scanFetchStatus:d}=t,f=i;try{f=await this.#lr.ensureFreshRawData({scope:n,rawData:i}),l=await this.#$r.scanTransaction({accountAddress:o,transactionRawData:f,origin:s,scope:n,options:c,account:u}),d=l?tC:rC,this.#ie.info(\"Successfully refreshed send confirmation scan\")}catch(e){this.#ie.error(\"Error refreshing send confirmation scan:\",e),l=null,d=rC}const p=await this.#Se.getInterfaceContext(e);if(!p)return void this.#ie.info(\"Interface context no longer exists after scan, skipping update\");const h={...p,scan:l,scanFetchStatus:d,transactionRawData:f};await this.#Se.updateInterface(e,zB(GC,{context:h}),h),this.#ie.info(\"Successfully refreshed send confirmation\"),await this.#Se.scheduleBackgroundEvent({method:eI,duration:\"PT20S\"})}catch(e){this.#ie.warn({error:e},\"Could not refresh send confirmation\")}else this.#ie.info(\"Context is missing transactionRawData for scan refresh\")}async refreshSignTransaction(){this.#ie.info(\"Background refresh triggered for signTransaction confirmation...\");const e=(await this.#Re.getKey(\"mapInterfaceNameToId\")??{})[$C];if(!e)return void this.#ie.info(\"No active signTransaction confirmation interface found\");const t=await this.#Se.getInterfaceContext(e);if(!t)return void this.#ie.info(\"Interface context no longer exists, skipping refresh\");if(!t.account?.address||!t.transaction||!t.scope)return void this.#ie.info(\"Context is missing required fields\");const{preferences:r,scope:n,account:o,origin:s,transaction:i}=t,a=r.simulateOnChainActions||r.useSecurityAlerts;try{const c={...t,scanFetchStatus:a?eC:t.scanFetchStatus};await this.#Se.updateInterface(e,zB(LC,{context:c}),c);let{scan:u,scanFetchStatus:l}=t,d=null;try{d=(await this.#lr.deserializeTransaction({scope:n,type:i.type,rawDataHex:i.rawDataHex})).raw_data}catch(e){this.#ie.error(\"Error deserializing transaction for signTransaction refresh:\",e),await this.#Se.trackError(e)}if(a&&d){const e=[];r.simulateOnChainActions&&e.push(\"simulation\"),r.useSecurityAlerts&&e.push(\"validation\");try{u=await this.#$r.scanTransaction({accountAddress:o.address,transactionRawData:d,origin:s,scope:n,options:e,account:o}),l=u?tC:rC,this.#ie.info(\"Successfully refreshed signTransaction scan\")}catch(e){this.#ie.error(\"Error refreshing signTransaction scan:\",e),u=null,l=rC}}if(d)try{await this.#lr.isTransactionExpired({scope:n,rawData:d})&&(u=JB,l=tC)}catch(e){this.#ie.error(\"Error checking transaction expiration:\",e),await this.#Se.trackError(e)}const f=await this.#Se.getInterfaceContext(e);if(!f)return void this.#ie.info(\"Interface context no longer exists after scan, skipping update\");const p={...f,scan:u,scanFetchStatus:l};await this.#Se.updateInterface(e,zB(LC,{context:p}),p),this.#ie.info(\"Successfully refreshed signTransaction confirmation\"),await this.#Se.scheduleBackgroundEvent({method:tI,duration:\"PT20S\"})}catch(e){this.#ie.warn({error:e},\"Could not refresh signTransaction\")}}async#jr({txId:e,scope:t,accountIds:r,attempt:n}){this.#ie.warn({txId:e,scope:t,attempt:n},\"Transaction tracking timed out - syncing accounts\");const o=await this.#cr.findByIds(r);o.length>0&&await this.#cr.synchronize(o)}async trackTransaction({txId:e,scope:t,accountIds:r,attempt:n=0}){this.#ie.info(`[Attempt ${n+1}] Tracking transaction ${e} on ${t}...`);try{const o=await this.#Oe.getTransactionInfoById(t,e);if(!o)return n>=4?void await this.#jr({txId:e,scope:t,accountIds:r,attempt:n}):(this.#ie.info({txId:e,attempt:n},\"Transaction not confirmed yet, scheduling next check...\"),void await this.#Se.scheduleBackgroundEvent({method:rI,params:{txId:e,scope:t,accountIds:r,attempt:n+1},duration:Ot}));this.#ie.log({txId:e,blockNumber:o.blockNumber,scope:t},\"✅ Transaction confirmed on-chain\");const s=(await this.#cr.findByIds(r))[0];if(!s)return void this.#ie.error({txId:e},\"Sender account not found\");await this.#Se.scheduleBackgroundEvent({method:ZC,duration:\"PT1S\"}),await this.#Se.trackTransactionFinalized({origin:\"MetaMask\",accountType:s.type,chainIdCaip:t})}catch(o){if(this.#ie.error({error:o,txId:e,scope:t,attempt:n},\"Error tracking transaction\"),n>=4)return void await this.#jr({txId:e,scope:t,accountIds:r,attempt:n});await this.#Se.scheduleBackgroundEvent({method:rI,params:{txId:e,scope:t,accountIds:r,attempt:n+1},duration:Ot})}}}({logger:or,snapClient:zU,accountsService:aD,state:$U,priceApiClient:JU,tronHttpClient:GU,transactionScanService:pD,transactionExpirationRefresherService:uD}),bD=new class{#ie;#Se;#cr;#Ce;#Ie;#Vr;#Br;constructor({logger:e,snapClient:t,accountsService:r,assetsService:n,transactionsService:o,walletService:s,confirmationHandler:i}){this.#ie=e.withPrefix(\"[🔑 KeyringHandler]\"),this.#Se=t,this.#cr=r,this.#Ce=n,this.#Ie=o,this.#Vr=s,this.#Br=i}async handle(e,t){US(e,t.method,$S);return await NS(this,t)??null}async#Hr(){try{const e=await this.#cr.getAll();return(0,et.sortBy)(e,[\"entropySource\",\"index\"])}catch(e){throw this.#ie.error({error:e},\"Error listing accounts\"),new Error(\"Error listing accounts\",{cause:e})}}async getAccounts(){try{return(await this.#Hr()).map(DS)}catch(e){throw this.#ie.error({error:e},\"Error listing accounts\"),new Ev(e)}}async#Gr(e){try{return await this.#cr.findById(e)??void 0}catch(e){throw this.#ie.error({error:e},\"Error getting account\"),new Ev(e)}}async getAccount(e){try{VS({accountId:e},nP);return DS(await this.#Kr(e))}catch(e){throw this.#ie.error({error:e},\"Error getting account\"),new Ev(e)}}async#Kr(e){const t=await this.#Gr(e);if(!t)throw new Error(`Account \"${e}\" not found`);return t}async createAccounts(e){try{return await this.#cr.createAccounts(e)}catch(e){throw this.#ie.error({error:e},\"Error creating accounts\"),jA(e)}}async getAccountAssets(e){try{VS({accountId:e},sP),await this.#Kr(e),this.#ie.info(\"Listing account assets\",{accountId:e});const t=(await this.#Ce.getAccountAssets(e)).filter(e=>Yt.includes(e.assetType)||Number(e.rawAmount)>0).map(e=>e.assetType);return this.#ie.info(\"Account assets\",{accountId:e,result:t}),HS(t,bS),t}catch(e){throw this.#ie.error({error:e},\"Error listing account assets\"),e}}async getAccountTransactions(e,t){try{VS({accountId:e,pagination:t},aP),this.#ie.info(\"Listing account transactions...\");const{limit:r,next:n}=t,o=await this.#Gr(e);if(!o)throw new Error(\"Account not found\");const s=await this.#Ie.findByAccounts([o]),i=n?s.findIndex(e=>e.id===n):0,a=s.slice(i,i+r),c=i+t.limit<s.length;return{data:a,next:c?s[i+t.limit]?.id??null:null}}catch(e){throw this.#ie.error({error:e},\"Error listing account transactions\"),e}}async getAccountBalances(e,t){try{VS({accountId:e,assets:t},iP),this.#ie.info(\"Getting account balances\",{accountId:e,assets:t}),await this.#Kr(e);const r=await this.#Ce.getAccountAssets(e),n=r.filter(e=>t.includes(e.assetType)).filter(e=>Yt.includes(e.assetType)||Number(e.rawAmount)>0).reduce((e,t)=>(e[t.assetType]={unit:t.symbol,amount:t.uiAmount},e),{});return this.#ie.info(\"Account balances\",{accountId:e,result:n}),HS(n,lP),n}catch(e){throw this.#ie.error({error:e},\"Error getting account balances\"),e}}async resolveAccountAddress(e,t){this.#ie.info(\"Resolving account address\",{scope:e,request:t});const r=await this.#Hr();return await this.#Vr.resolveAccountAddress(r,e,t)}async exportAccount(e,t){VS({accountId:e,options:t},cP);const r=await this.#Kr(e),n=t?.encoding??\"hexadecimal\";if(\"hexadecimal\"!==n)throw new Error(\"Only hexadecimal private key export is supported\");try{const{privateKeyHex:e}=await this.#cr.deriveTronKeypair({entropySource:r.entropySource,derivationPath:r.derivationPath});if(!q(e,ie(dP)))throw new Error(\"Derived private key failed encoding validation\");return{type:\"private-key\",encoding:n,privateKey:e}}catch{const e=\"Error exporting account\";throw this.#ie.error(e),new Ev(e)}}async deleteAccount(e){try{VS({accountId:e},oP),await this.#Kr(e),await this.#cr.delete(e)}catch(e){throw this.#ie.error({error:e},\"Error deleting account\"),e}}async submitRequest(e){return this.#qr(e)}#Zr(e){return e.request.method!==YE.SignTransaction||G(e.request.params,bP),e}async#qr(e){G(e,TP),this.#ie.log(\"Handling submitRequest\",{method:e.request.method});const{request:{method:t,params:r={}},scope:n,account:o}=e,s=await this.#Kr(o);if(n&&!s.scopes.includes(n))throw new Error(`Scope \"${n}\" is not allowed for this account`);if(!s.methods.includes(t))throw new Error(`Method \"${t}\" is not allowed for this account`);const i=this.#Zr(e);if(!await this.#Br.handleKeyringRequest({request:i,account:s}))throw new $v;return await this.#Vr.handleKeyringRequest({account:s,scope:i.scope,method:i.request.method,params:i.request.params??r})}async setSelectedAccounts(e){VS(e,le(tP));const t=new Set((await this.#Hr()).map(e=>e.id));if(!e.every(e=>t.has(e)))throw new Sv(\"Account IDs were not part of existing accounts.\");await this.#Se.scheduleBackgroundEvent({method:ZC,params:{accountIds:e},duration:\"PT1S\"})}}({logger:or,snapClient:zU,accountsService:aD,assetsService:sD,transactionsService:iD,walletService:fD,confirmationHandler:hD}),wD=new class{#ie;constructor({logger:e}){this.#ie=e.withPrefix(\"[👋 RpcHandler]\")}async handle(e,t){US(e,t.method,$S),this.#ie.log(\"Handling RPC request\",t);const{method:r}=t;throw new _v}}({logger:or}),vD=new class{#ie;#Se;constructor({logger:e,snapClient:t}){this.#ie=e.withPrefix(\"[👵 LifecycleHandler]\"),this.#Se=t}async handle({id:e,event:t,context:r}){if(this.#ie.log(\"[👇 onUserInput]\",e,t),!t.name)return;const n={...HC(this.#Se),...qS(this.#Se),...DC(this.#Se)}[t.name];n&&await n({id:e,event:t,context:r})}}({logger:or,snapClient:zU}),TD={snapClient:zU,state:$U,priceApiClient:JU,feeCalculatorService:cD,assetsService:sD,accountsService:aD,transactionsService:iD,sendService:lD,walletService:fD,tronHttpClient:GU,tronWebFactory:ZU,confirmationHandler:hD,transactionScanService:pD,transactionExpirationRefresherService:uD,coreMessenger:QU,remoteFeatureFlagsProvider:eD,assetsProvider:tD,assetsHandler:gD,clientRequestHandler:yD,cronHandler:mD,keyringHandler:bD,rpcHandler:wD,userInputHandler:vD},AD=async e=>jS(async()=>gD.onAssetHistoricalPrice(e)),ED=async e=>jS(async()=>gD.onAssetsConversion(e)),PD=async e=>jS(async()=>gD.onAssetsLookup(e)),BD=async e=>jS(async()=>gD.onAssetsMarketData(e)),CD=async({request:e})=>jS(async()=>yD.handle(e)),ID=async({request:e})=>jS(async()=>mD.handle(e)),SD=async({origin:e,request:t})=>jS(async()=>bD.handle(e,t)),WD=async({origin:e,request:t})=>jS(async()=>wD.handle(e,t)),xD=async e=>jS(async()=>vD.handle(e))})(),module.exports=n})();"},{"path":"locales/en.json","value":"{\n  \"locale\": \"en\",\n  \"messages\": {\n    \"confirmation.transaction.title\": {\n      \"message\": \"Transaction request\"\n    },\n    \"confirmation.estimatedChanges.title\": {\n      \"message\": \"Estimated changes\"\n    },\n    \"confirmation.estimatedChanges.tooltip\": {\n      \"message\": \"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee.\"\n    },\n    \"confirmation.estimatedChanges.send\": {\n      \"message\": \"You send\"\n    },\n    \"confirmation.bandwidthConsumed\": {\n      \"message\": \"Bandwidth consumed\"\n    },\n    \"confirmation.estimatedChanges.receive\": {\n      \"message\": \"You receive\"\n    },\n    \"confirmation.origin\": {\n      \"message\": \"Request from\"\n    },\n    \"confirmation.origin.tooltip\": {\n      \"message\": \"This is the site asking for your confirmation.\"\n    },\n    \"confirmation.from\": {\n      \"message\": \"From\"\n    },\n    \"confirmation.to\": {\n      \"message\": \"To\"\n    },\n    \"confirmation.network\": {\n      \"message\": \"Network\"\n    },\n    \"confirmation.transactionFee\": {\n      \"message\": \"Network fee\"\n    },\n    \"confirmation.confirmButton\": {\n      \"message\": \"Confirm\"\n    },\n    \"confirmation.cancelButton\": {\n      \"message\": \"Cancel\"\n    },\n    \"confirmation.signMessage.title\": {\n      \"message\": \"Sign message\"\n    },\n    \"confirmation.signMessage.message\": {\n      \"message\": \"Message\"\n    },\n    \"confirmation.account\": {\n      \"message\": \"Account\"\n    },\n    \"confirmation.signTransaction.title\": {\n      \"message\": \"Sign transaction\"\n    },\n    \"confirmation.estimatedChanges.notAvailable\": {\n      \"message\": \"Estimated changes are not available\"\n    },\n    \"confirmation.estimatedChanges.noChanges\": {\n      \"message\": \"No estimated changes\"\n    },\n    \"confirmation.estimatedChanges.unsupportedContract\": {\n      \"message\": \"Unsupported contract for simulation\"\n    },\n    \"confirmation.estimatedChanges.witnessCreate\": {\n      \"message\": \"Registers your account as a Super Representative candidate and permanently burns 9,999 TRX.\"\n    },\n    \"confirmation.simulationTitleAPIError\": {\n      \"message\": \"Because of an error, we couldn't check for security alerts.\"\n    },\n    \"confirmation.simulationMessageAPIError\": {\n      \"message\": \"Only continue if you trust every address involved.\"\n    },\n    \"confirmation.simulationErrorTitle\": {\n      \"message\": \"This transaction was reverted during simulation.\"\n    },\n    \"confirmation.simulationErrorSubtitle\": {\n      \"message\": \"{reason}\"\n    },\n    \"confirmation.validationErrorTitle\": {\n      \"message\": \"This is a deceptive request\"\n    },\n    \"confirmation.validationErrorSubtitle\": {\n      \"message\": \"If you approve this request, a third party known for scams will take all your assets.\"\n    },\n    \"confirmation.validationErrorLearnMore\": {\n      \"message\": \"Learn more\"\n    },\n    \"confirmation.validationErrorSecurityAdviced\": {\n      \"message\": \"Security advice by\"\n    },\n    \"transactionScan.errors.unknownError\": {\n      \"message\": \"An unknown error occurred\"\n    },\n    \"transactionScan.errors.insufficientBalance\": {\n      \"message\": \"Insufficient balance\"\n    },\n    \"transactionScan.errors.invalidTransaction\": {\n      \"message\": \"Invalid transaction\"\n    },\n    \"transactionScan.errors.insufficientFunds\": {\n      \"message\": \"Insufficient funds\"\n    },\n    \"transactionScan.errors.invalidAddress\": {\n      \"message\": \"Invalid address\"\n    },\n    \"transactionScan.errors.unsupportedEIP712Message\": {\n      \"message\": \"Unsupported method\"\n    },\n    \"transactionScan.errors.transactionDeadlinePassed\": {\n      \"message\": \"Please go back and try again\"\n    }\n  }\n}\n"}],"removable":false,"hideSnapBranding":true}