@abtnode/blocklet-services 1.16.37 → 1.16.38-beta-20250108-235929-17742885

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/api/index.js +24 -0
  2. package/api/services/static.js +11 -1
  3. package/dist/assets/{Add-WwBlcqNF.js → Add-C-URxBYZ.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-B6VSNrNX.js → ArrowDropDown-B5dD4c-M.js} +1 -1
  5. package/dist/assets/{CheckCircle-n23HoB1l.js → CheckCircle-DFjhK26A.js} +1 -1
  6. package/dist/assets/{ChevronLeft-DV-sPxhr.js → ChevronLeft-Xm2NBL45.js} +1 -1
  7. package/dist/assets/{ChevronRight-UF0hSKpL.js → ChevronRight-CzkyNvdA.js} +1 -1
  8. package/dist/assets/{DeleteOutline-1Utxk_IX.js → DeleteOutline-4lgH0LbY.js} +1 -1
  9. package/dist/assets/{Done-BbnQSLvu.js → Done-T3TzYqxC.js} +1 -1
  10. package/dist/assets/{Download-DRJvwpLt.js → Download-B6PKX3dE.js} +1 -1
  11. package/dist/assets/{Error-CL8m4Xu6.js → Error-DekEnOLE.js} +1 -1
  12. package/dist/assets/{Google-CSKRQW0F.js → Google-DA_i_nwC.js} +1 -1
  13. package/dist/assets/{InfoOutlined-7hC78o3_.js → InfoOutlined-km9KreMb.js} +1 -1
  14. package/dist/assets/{Launch-D9iyATKb.js → Launch-qc2jb0r6.js} +1 -1
  15. package/dist/assets/{LaunchOutlined-D37WOXmf.js → LaunchOutlined-ag_yx1i7.js} +1 -1
  16. package/dist/assets/{Loop-Clmz6DRv.js → Loop-BplVZPq5.js} +1 -1
  17. package/dist/assets/{MoreHoriz-CtnQ7uqf.js → MoreHoriz-BYKRz7TU.js} +1 -1
  18. package/dist/assets/{PlayArrow-IJdeSlbo.js → PlayArrow-6QIdLEKk.js} +1 -1
  19. package/dist/assets/{ViewList-B-HVv7GT.js → ViewList-D8kb7sjT.js} +1 -1
  20. package/dist/assets/{_createAggregator-BgG70oKG.js → _createAggregator-D9-KdLG0.js} +1 -1
  21. package/dist/assets/{access-control-BP0rhxZ_.js → access-control-D4_Kd2NT.js} +1 -1
  22. package/dist/assets/{actions-DsY16tuf.js → actions-CzkLtiJW.js} +1 -1
  23. package/dist/assets/add-component-core-DCR0q2Qz.js +716 -0
  24. package/dist/assets/{add-resource-DZFTdNIy.js → add-resource-b2lhaKca.js} +1 -1
  25. package/dist/assets/{addon-DUnQ9eC0.js → addon-CQcyeacY.js} +1 -1
  26. package/dist/assets/{analytics-Cym7YiQM.js → analytics-3FX5s3SN.js} +1 -1
  27. package/dist/assets/api-C0C4sDJA.js +1 -0
  28. package/dist/assets/ar-D1eBfeFS.js +3 -0
  29. package/dist/assets/{ar-BAnh0kq-.js → ar-hiIrGdss.js} +1 -1
  30. package/dist/assets/{audit-logs-DtJdynVz.js → audit-logs-myuUbkGZ.js} +1 -1
  31. package/dist/assets/{base32-DZ5GWnEl.js → base32-UbfRNFaN.js} +1 -1
  32. package/dist/assets/{branding-DEKXfpdd.js → branding-6vP84BKY.js} +2 -2
  33. package/dist/assets/{bundle-avatar-CtN88KlG.js → bundle-avatar-BTBz_Pqf.js} +1 -1
  34. package/dist/assets/{button-CPeDg26t.js → button-D1cs9pBE.js} +1 -1
  35. package/dist/assets/{click-to-copy-D-rDpTU1.js → click-to-copy-DrS_N9DU.js} +1 -1
  36. package/dist/assets/{complete-DfhluUOU.js → complete-BLSdiKxI.js} +1 -1
  37. package/dist/assets/{component-DET9TWBv.js → component-CPHPXAX6.js} +1 -1
  38. package/dist/assets/{config-Dx3rVqe3.js → config-CzVgjRZ_.js} +1 -1
  39. package/dist/assets/{config-Bh1NLHps.js → config-HnsEh8aW.js} +1 -1
  40. package/dist/assets/{config-navigation-Cn0fwBBG.js → config-navigation-CzSECc-Z.js} +3 -3
  41. package/dist/assets/{config-space-CT9a0s7Q.js → config-space-CjqqZzV5.js} +1 -1
  42. package/dist/assets/{confirm-DhCXP8vW.js → confirm-B1UPh8b1.js} +1 -1
  43. package/dist/assets/{connect-CA2-olTo.js → connect-0pVAiScb.js} +1 -1
  44. package/dist/assets/{connect-GHQ2pLWc.js → connect-B1sbs4Lv.js} +1 -1
  45. package/dist/assets/{connect-to-kYFiSkqc.js → connect-to-B9GXCpUo.js} +1 -1
  46. package/dist/assets/{dashboard-B3UhGh-u.js → dashboard-CQhncdAN.js} +3 -3
  47. package/dist/assets/de-DLEdTFEE.js +3 -0
  48. package/dist/assets/{de-CYAy3iib.js → de-D_LJn5nm.js} +1 -1
  49. package/dist/assets/{did-address-B-umhomj.js → did-address-DNmedlwf.js} +1 -1
  50. package/dist/assets/{domain-DzFcoe7i.js → domain--9MtiRJq.js} +1 -1
  51. package/dist/assets/{domain-list-C9eJrdcx.js → domain-list-DJLZrnnA.js} +1 -1
  52. package/dist/assets/{email-BEr-8TYu.js → email-BuZ4yEO9.js} +1 -1
  53. package/dist/assets/{es-Bn01DRSJ.js → es-B0ocJhTd.js} +1 -1
  54. package/dist/assets/es-DQkGXDIc.js +3 -0
  55. package/dist/assets/{exchange-passport-DGUT_ZCy.js → exchange-passport-DNpJ9JB9.js} +1 -1
  56. package/dist/assets/{form-text-input-E0Z0s35O.js → form-text-input-BTtPnofD.js} +1 -1
  57. package/dist/assets/fr-BDf4_iE6.js +3 -0
  58. package/dist/assets/{fr-D3J0B-tk.js → fr-eolYJCOV.js} +1 -1
  59. package/dist/assets/{fuel-alylOU0b.js → fuel-CXqiy86U.js} +1 -1
  60. package/dist/assets/{fullpage-DZPI7F_L.js → fullpage-DtjWPvRl.js} +1 -1
  61. package/dist/assets/{get-safe-url-ByH0hntp.js → get-safe-url-D5VSeW-v.js} +1 -1
  62. package/dist/assets/{get-safe-url-yHkHYeNB.js → get-safe-url-DE78Mect.js} +1 -1
  63. package/dist/assets/hi-D5STORpP.js +1 -0
  64. package/dist/assets/{hi-DdEYPkL3.js → hi-DSwvTH0x.js} +1 -1
  65. package/dist/assets/{home-DG81Vlwd.js → home-7IOB9WCB.js} +1 -1
  66. package/dist/assets/{id-C6kfQsmT.js → id-5G9oPRk4.js} +1 -1
  67. package/dist/assets/id-CmoeI1B_.js +3 -0
  68. package/dist/assets/{iframe-BB-pL0gd.js → iframe-DPxOsym4.js} +1 -1
  69. package/dist/assets/{index-jViTGvBx.js → index-AeDP48MI.js} +1 -1
  70. package/dist/assets/{index-DNd_40WG.js → index-BAJa93Dw.js} +1 -1
  71. package/dist/assets/{index-Cp3ZCh7o.js → index-BGO2DsWz.js} +1 -1
  72. package/dist/assets/{index-tDqjC_e2.js → index-BRl-r_bS.js} +6 -6
  73. package/dist/assets/{index-CU_Y2Ics.js → index-BeGh-9am.js} +1 -1
  74. package/dist/assets/{index-SrY9WLdy.js → index-BieJ1GrM.js} +1 -1
  75. package/dist/assets/{index-B-0OFwWF.js → index-C7idG6q6.js} +1 -1
  76. package/dist/assets/{index-CxWy6IEg.js → index-CaR-IQ2L.js} +1 -1
  77. package/dist/assets/{index-CYh2QqLk.js → index-CddW-CbI.js} +1 -1
  78. package/dist/assets/{index-Dk8-Ibsd.js → index-D5ANBLis.js} +1 -1
  79. package/dist/assets/{index-BaA1-UNL.js → index-DWJcLI9m.js} +1 -1
  80. package/dist/assets/{index-B8B9jSby.js → index-DeFZAVsR.js} +1 -1
  81. package/dist/assets/{index-e4kRKwa5.js → index-DgEJGn5a.js} +1 -1
  82. package/dist/assets/index-XtF68fdw.js +228 -0
  83. package/dist/assets/{index-DjDooCTg.js → index-sIK_Jo74.js} +3 -3
  84. package/dist/assets/{invitation-BNOVM03D.js → invitation-CR_XdrMI.js} +1 -1
  85. package/dist/assets/{invite-CDXZxcmB.js → invite-DuyCyxNr.js} +1 -1
  86. package/dist/assets/{issue-passport-1v1d15DW.js → issue-passport-C9FIXmGD.js} +1 -1
  87. package/dist/assets/item-C_mUt5fq.js +2 -0
  88. package/dist/assets/{ja-DN837plG.js → ja-B2h7onKc.js} +1 -1
  89. package/dist/assets/ja-CSR77kvS.js +3 -0
  90. package/dist/assets/{ko-LU148n3o.js → ko-B8lz4XE7.js} +1 -1
  91. package/dist/assets/ko-D9Ylfxhq.js +3 -0
  92. package/dist/assets/{layout-PlCf3Rtw.js → layout-BXVD4cds.js} +1 -1
  93. package/dist/assets/{list-header-DdT6PG1D.js → list-header-BkY1qjdh.js} +1 -1
  94. package/dist/assets/localization-McX1STW3.js +1 -0
  95. package/dist/assets/{log-B5iPDWZ_.js → log-BfDvSV0g.js} +1 -1
  96. package/dist/assets/{login-DvM79Mfd.js → login-C4e13O5i.js} +1 -1
  97. package/dist/assets/{login-oauth-callback-CO19RzCL.js → login-oauth-callback-CL25Yy86.js} +1 -1
  98. package/dist/assets/{logo-uploader-CNnYMPxh.js → logo-uploader-AKwqBqNX.js} +3 -3
  99. package/dist/assets/{lost-passport-DsG6aS5u.js → lost-passport-fncZaE5-.js} +1 -1
  100. package/dist/assets/{open-window-Km_9DMrz.js → open-window-BHLvwdfP.js} +1 -1
  101. package/dist/assets/{overview-Dc_26DuW.js → overview-xenjbl2B.js} +1 -1
  102. package/dist/assets/{page-header-B3m4UCOV.js → page-header-CQq_bs4X.js} +1 -1
  103. package/dist/assets/{permission-C7OYX2OJ.js → permission-BuIftQsH.js} +1 -1
  104. package/dist/assets/{preferences-Ci4dS6YC.js → preferences-BW3FiZN6.js} +1 -1
  105. package/dist/assets/pt-D_JnaXbr.js +1 -0
  106. package/dist/assets/{pt-CSZkEO8C.js → pt-JWdcQImo.js} +1 -1
  107. package/dist/assets/publish-resource-CHhCwXK2.js +1 -0
  108. package/dist/assets/{react-beautiful-dnd.esm-D6d5Zfr8.js → react-beautiful-dnd.esm-CrFJbONC.js} +1 -1
  109. package/dist/assets/{relative-time-BHAJs1ji.js → relative-time-C1g1Vfxc.js} +1 -1
  110. package/dist/assets/{ru-CPz1NiGU.js → ru-CWgdu04g.js} +1 -1
  111. package/dist/assets/ru-ChqWu3aW.js +1 -0
  112. package/dist/assets/sdk-CPqVwpXJ.js +1 -0
  113. package/dist/assets/{session-UImnJahL.js → session-HjowS1cG.js} +1 -1
  114. package/dist/assets/{setup-LHpIYQbe.js → setup-DHnZS-kZ.js} +3 -3
  115. package/dist/assets/{start-DxAs4dHz.js → start-DFVtRTdA.js} +1 -1
  116. package/dist/assets/{step-actions-FdD-71wr.js → step-actions-B9cbLMaF.js} +1 -1
  117. package/dist/assets/{studio-g2uaz9WG.js → studio-INpHiGzJ.js} +1 -1
  118. package/dist/assets/{switch-control-BMO1MVhi.js → switch-control-B8kEdKxJ.js} +1 -1
  119. package/dist/assets/{th-DN9Th20c.js → th-BnfuNX_7.js} +1 -1
  120. package/dist/assets/th-CNsPemHe.js +1 -0
  121. package/dist/assets/{toUpper-DUImrX4s.js → toUpper-B9VSiatb.js} +1 -1
  122. package/dist/assets/{transfer-Bq5kjW_S.js → transfer-Qm6ZpasS.js} +1 -1
  123. package/dist/assets/{unsubscribe-DUmfJRPR.js → unsubscribe-K1yXJU_T.js} +1 -1
  124. package/dist/assets/{useAsync-BfmmMB4I.js → useAsync-cdOzMWPw.js} +1 -1
  125. package/dist/assets/{useAsyncRetry-m5oMMmVh.js → useAsyncRetry-N9D8F6Du.js} +1 -1
  126. package/dist/assets/{useLocalStorage-ganqTrK6.js → useLocalStorage-C1COf2pr.js} +1 -1
  127. package/dist/assets/{user-center-CYnDNkIf.js → user-center-C4Xs8TiT.js} +1 -1
  128. package/dist/assets/{util-CmcVraD_.js → util-DVSj4yxe.js} +1 -1
  129. package/dist/assets/{vendor-arcblock-Dn16DH88.js → vendor-arcblock-BWyjBr-f.js} +3 -3
  130. package/dist/assets/{vendor-hooks-DzETutIU.js → vendor-hooks-CLzfFpO7.js} +1 -1
  131. package/dist/assets/{vendor-utils-CV7RLr7b.js → vendor-utils-DCpRgzMR.js} +4 -4
  132. package/dist/assets/{vi-ChReTICx.js → vi-D7HQHu1T.js} +1 -1
  133. package/dist/assets/vi-DV086e3Q.js +1 -0
  134. package/dist/assets/wrap-locale-BbVU1gQr.js +1 -0
  135. package/dist/assets/{zh-BJMvTFip.js → zh-C9f1h3Cw.js} +1 -1
  136. package/dist/assets/zh-tw-C3dB7r8C.js +3 -0
  137. package/dist/assets/{zh-tw-DkLkQUwb.js → zh-tw-jFbTVB_K.js} +1 -1
  138. package/dist/index.html +5 -5
  139. package/dist/manifest.webmanifest +1 -0
  140. package/dist/registerSW.js +1 -0
  141. package/dist/service-worker.js +1 -1
  142. package/dist/share/shared-service-worker.js +55 -26
  143. package/package.json +22 -21
  144. package/dist/assets/add-component-core-C8hvHJq0.js +0 -716
  145. package/dist/assets/api-C7qcY4XU.js +0 -1
  146. package/dist/assets/ar-DJ10cGfc.js +0 -3
  147. package/dist/assets/de-5ORoKwiw.js +0 -3
  148. package/dist/assets/es-CWClvbjs.js +0 -3
  149. package/dist/assets/fr-CE8mlhdK.js +0 -3
  150. package/dist/assets/hi-DVuJdQme.js +0 -1
  151. package/dist/assets/id-L6JUyxUh.js +0 -3
  152. package/dist/assets/index-DHmJ4NAw.js +0 -221
  153. package/dist/assets/item-DoetJFaA.js +0 -1
  154. package/dist/assets/ja-C5orBePq.js +0 -3
  155. package/dist/assets/ko-BeIurXFC.js +0 -3
  156. package/dist/assets/localization-Cm0dNj2B.js +0 -1
  157. package/dist/assets/pt-BED0VqHV.js +0 -1
  158. package/dist/assets/publish-resource-BumbS1yx.js +0 -1
  159. package/dist/assets/ru-B5wj2v7e.js +0 -1
  160. package/dist/assets/sdk-0UwYHc-i.js +0 -1
  161. package/dist/assets/th-CKxPcxWD.js +0 -1
  162. package/dist/assets/vi-DsheN6LQ.js +0 -1
  163. package/dist/assets/wrap-locale-DTO386nY.js +0 -1
  164. package/dist/assets/zh-tw-B_su4eMW.js +0 -3
@@ -1,4 +1,4 @@
1
- var ns=Object.defineProperty;var za=_=>{throw TypeError(_)};var is=(_,C,T)=>C in _?ns(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T;var ia=(_,C,T)=>is(_,typeof C!="symbol"?C+"":C,T),Ca=(_,C,T)=>C.has(_)||za("Cannot "+T);var hn=(_,C,T)=>(Ca(_,C,"read from private field"),T?T.call(_):C.get(_)),Li=(_,C,T)=>C.has(_)?za("Cannot add the same private member more than once"):C instanceof WeakSet?C.add(_):C.set(_,T),ni=(_,C,T,I)=>(Ca(_,C,"write to private field"),I?I.call(_,T):C.set(_,T),T),Nn=(_,C,T)=>(Ca(_,C,"access private method"),T);var Aa=(_,C,T,I)=>({set _(M){ni(_,C,M,T)},get _(){return hn(_,C,I)}});import{e as commonjsGlobal,g as getDefaultExportFromCjs,r as reactExports,b as React$1,d as reactDomExports,a as getAugmentedNamespace,u as useSearchParams,f as useLocation,L as Link$1,N as NavLink$1,m as matchPath$2}from"./vendor-react-D-afvo_7.js";import{g as global$1,r as require$$1$5,p as process$1,B as Buffer$3,b as bnExports$1,w as withQuery,j as joinURL,a as axios,c as Buffer$1$1,e as dayjs_minExports,d as defaultDayjs,f as browserExports$1,h as adapter,A as AxiosError,i as getQuery,k as withoutTrailingSlash}from"./vendor-utils-CV7RLr7b.js";import{i as isEqual$4,a as isSymbol_1,_ as _baseGetTag,b as isObject_1,c as _root,d as _Symbol,t as toNumber_1,C as Cookie,e as _getPrototype,f as isObjectLike_1,g as _freeGlobal,h as isPlainObject_1,j as _overArg,u as useMemoizedFn,k as useReactive,l as __decorate,m as copy,n as useSize,o as useCreation,p as isObject$u,q as useDebounceFn,r as _baseTrim,s as useInterval$1,v as useDebounce,w as useAsyncEffect,x as useLocalStorageState,y as useMount,z as usePrevious,A as useUpdateEffect,B as useRequest,D as useUnmount,E as useLatest,F as useThrottleFn}from"./vendor-hooks-DzETutIU.js";import{R as createTheme$1,S as responsiveFontSizes,E as PropTypes,j as jsxRuntimeExports,U as StyledEngineProvider,V as ThemeProvider$1,W as CssBaseline,s as styled$1,C as Collapse,X as Slide,Y as emphasize,Z as SvgIcon,$ as ClickAwayListener,a0 as utils$n,a1 as interopRequireDefaultExports,I as IconButton,a2 as CircularProgress,x as Button$1,e as useTheme,t as useMediaQuery,T as Typography$1,r as DialogContent,y as DialogActions,D as Dialog$1,a3 as Box,a4 as Tooltip,a5 as green,a6 as tooltipClasses,a7 as Check$1,a8 as CopyIcon,a9 as _inheritsLoose$3,aa as newStyled,ab as DialogTitle,ac as Stack$5,ad as Alert$2,M as TextField,ae as SwipeableDrawer,af as Backdrop,A as Chip,ag as LinearProgress,ah as Divider,ai as Icon$4,aj as Popover,ak as Menu$1,al as MenuItem$1,am as Card,an as CardHeader,ao as CardContent,ap as CardActions,aq as ImageListItem,P as Popper,F as Fade,v as Paper,ar as MenuList,as as Skeleton,at as AlertTitle,au as emotionReact_browser_esm,av as emotionCache_browser_esm,aw as propTypesExports,l as clsx$2,ax as ThemeProvider$2,ay as Hidden,az as Tab,aA as Tabs$1,aB as teal,aC as Toolbar,aD as AppBar,aE as Container$a,aF as Drawer,aG as MenuIcon,aH as MoreHorizIcon,aI as ExpandMoreIcon,L as List,z as ListItem,aJ as ListItemButton,aK as Badge,aL as blueGrey,aM as Avatar$1,aN as FormControlLabel,aO as Switch$1,aP as Select,K as InputAdornment,aQ as Link$2,aR as ButtonGroup,aS as DialogContentText,aT as Paper$1,aU as Table,aV as Tooltip$1,aW as styles,aX as emotionSerialize_esm,aY as emotionUtils_browser_esm,aZ as Typography$2,a_ as TableBody,a$ as TableCell,b0 as TableRow,b1 as Checkbox,b2 as IconButton$1,b3 as Button$2,b4 as FormControl,b5 as FormControlLabel$1,b6 as FormGroup,b7 as Grid$1,b8 as Input,b9 as InputLabel,ba as ListItemText,bb as MenuItem$2,bc as Select$1,bd as TextField$1,be as Chip$1,bf as TableFooter,bg as TablePagination,bh as InputBase,bi as Toolbar$1,bj as TableHead,bk as TableSortLabel,bl as toPropertyKey$5,bm as hoistStatics,bn as Popover$1,bo as Grow,bp as ListItemIcon,bq as ListItemText$1,br as css}from"./vendor-mui-core-COxJgW9_.js";const colors$2={common:{black:"#000",white:"#fff"},primary:{main:"#3773F2",contrastText:"#fff"},secondary:{main:"#16CED1",contrastText:"#fff"},error:{main:"#F16E6E",contrastText:"#fff"},warning:{main:"#DE9E37",contrastText:"#fff"},info:{main:"#0775F8",contrastText:"#fff"},success:{main:"#34BE74",contrastText:"#fff"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{default:"#fff"},did:{primary:"#4598FA",secondary:"#49C3AD"}},colors$1={textMuted:"rgba(18, 22, 24, 0.36)",textSubtitle:"rgba(18, 22, 24, 0.6)",textBase:"rgba(18, 22, 24, 1)",textPrimaryBase:"rgba(18, 22, 24, 1)",primaryBase:"rgba(19, 125, 250, 1)",primary100:"rgba(19, 125, 250, 1)",gray6:"rgba(17, 22, 24, 0.06)",surfaceBgSubtitle:"rgba(18, 22, 24, 0.03)",surfacePrimarySubtitle:"rgba(19, 125, 250, 0.06)",surfaceSuccess:"rgba(13, 202, 134, 1)",backgroundsBgSubtitle:"rgba(249, 250, 251, 1)",backgroundsBgComponent:"rgba(241, 243, 245, 1)",backgroundsBgField:"rgba(249, 250, 251, 1)",backgroundsBgSubtile:"rgba(249, 250, 251, 1)",backgroundsBgSubtileHover:"rgba(243, 244, 246, 1)",foregroundsFgBase:"rgba(3, 7, 18, 1)",foregroundsFgSubtile:"rgba(75, 85, 99, 1)",foregroundsFgMuted:"rgba(156, 163, 175, 1)",foregroundsFgInteractiveTransparent:"rgba(59, 130, 246, 0)",foregroundsFgInteractive:"rgba(59, 130, 246, 1)",strokeBorderBase:"rgba(229, 231, 235, 1)",strokeBorderStrong:"rgba(209, 213, 219, 1)",strokeSep:"rgba(229, 231, 235, 1)",lineStep:"rgba(18, 22, 24, 0.06)",lineBorderStrong:"rgba(18, 22, 24, 0.12)",lineBorderBase:"rgba(18, 22, 24, 0.06)",borderBase:"rgba(18, 22, 24, 0.06)",dividerColor:"rgba(239, 241, 245, 1)",buttonsButtonNeutral:"rgba(255, 255, 255, 1)",buttonsButtonNeutralHover:"rgba(243, 244, 246, 1)",buttonsButtonInverted:"rgba(3, 7, 18, 1)",buttonsButtonInvertedHover:"rgba(17, 24, 39, 1)",buttonsButtonDanger:"rgba(225, 29, 72, 1)",red:"#FF6369"},muiDarkTheme=createTheme$1({palette:{mode:"dark"}}),create$e=({mode:_="light",pageWidth:C="md",typography:T,overrides:I,palette:M,components:D,...L}={})=>{const B=_==="light"?Object.assign({...colors$2,background:{paper:colors$2.common.white,default:colors$2.background.default},mode:_},M||{}):Object.assign({...muiDarkTheme.palette,background:{paper:colors$2.grey[900],default:colors$2.grey[900]},mode:_},M||{}),N=createTheme$1({themeName:"ArcBlock",palette:B,typography:Object.assign({useNextVariants:!0,color:{main:_==="light"?"#222222":colors$2.common.white,gray:_==="light"?colors$2.grey[500]:colors$2.grey[300]},fontFamily:["Inter","Avenir","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),button:{fontWeight:700}},T),components:{MuiButton:{styleOverrides:{root:{boxShadow:"none"}}},MuiButtonGroup:{styleOverrides:{root:{boxShadow:"none"}}},MuiTableCell:{styleOverrides:{root:({ownerState:V})=>({...V.size==="small"?{borderBottomWidth:"0",paddingTop:"8px",paddingBottom:"8px",paddingLeft:0,paddingRight:"20px"}:{borderBottomWidth:"0",paddingTop:"14px",paddingBottom:"14px",paddingLeft:0,paddingRight:"30px"}}),head:{textTransform:"uppercase",color:_==="light"?colors$2.grey[900]:colors$2.grey[300]},body:{color:_==="light"?colors$2.grey[900]:colors$2.grey[300]}}},...I,...D},pageWidth:C,colors:{white:"#FFFFFF",dark:"#4A707C",gray:"#222222",minor:"#9B9B9B",darkText:"#DCDCDC",background:"#F7F8F8",yellow:"#FFCF71",green:"#44cdc6",red:"#D0021B",blue:"#4E6AF6",primary:"#222222",black:"#222222",secondary:"#44cdc6",mint:"#44cdc6",textSecondary:"#4A4A4A",active:"#5b9025",danger:"#D0021B",lightGrey:"#BCBCBC"},mode:_,...L});return responsiveFontSizes(N,{breakpoints:["xs","sm","md","lg"],disableAlign:!1,factor:3,variants:["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]})},createTheme=create$e,defaultTheme$1=createTheme();function ThemeProvider({children:_,theme:C,injectFirst:T}){return jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:T,children:jsxRuntimeExports.jsxs(ThemeProvider$1,{theme:C,children:[jsxRuntimeExports.jsx(CssBaseline,{}),_]})})}ThemeProvider.propTypes={children:PropTypes.any,theme:PropTypes.any,injectFirst:PropTypes.bool};ThemeProvider.defaultProps={children:null,theme:defaultTheme$1,injectFirst:!0};const isTransientProp=_=>_.startsWith("$"),styled=(_,C)=>styled$1(_,{...C,shouldForwardProp:T=>C!=null&&C.shouldForwardProp?C.shouldForwardProp(T)&&!isTransientProp(T):!isTransientProp(T)});function Center({children:_,relative:C="screen"}){let T={};return C==="parent"&&(T={width:"100%",height:"100%"}),jsxRuntimeExports.jsx(Div$3,{style:T,children:_})}const Div$3=styled("div")`
1
+ var ns=Object.defineProperty;var za=_=>{throw TypeError(_)};var is=(_,C,T)=>C in _?ns(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T;var ia=(_,C,T)=>is(_,typeof C!="symbol"?C+"":C,T),Ca=(_,C,T)=>C.has(_)||za("Cannot "+T);var hn=(_,C,T)=>(Ca(_,C,"read from private field"),T?T.call(_):C.get(_)),Li=(_,C,T)=>C.has(_)?za("Cannot add the same private member more than once"):C instanceof WeakSet?C.add(_):C.set(_,T),ni=(_,C,T,I)=>(Ca(_,C,"write to private field"),I?I.call(_,T):C.set(_,T),T),Nn=(_,C,T)=>(Ca(_,C,"access private method"),T);var Aa=(_,C,T,I)=>({set _(M){ni(_,C,M,T)},get _(){return hn(_,C,I)}});import{e as commonjsGlobal,g as getDefaultExportFromCjs,r as reactExports,b as React$1,d as reactDomExports,a as getAugmentedNamespace,u as useSearchParams,f as useLocation,L as Link$1,N as NavLink$1,m as matchPath$2}from"./vendor-react-D-afvo_7.js";import{g as global$1,r as require$$1$5,p as process$1,B as Buffer$3,b as bnExports$1,w as withQuery,j as joinURL,a as axios,c as Buffer$1$1,e as dayjs_minExports,d as defaultDayjs,f as browserExports$1,h as adapter,A as AxiosError,i as getQuery,k as withoutTrailingSlash}from"./vendor-utils-DCpRgzMR.js";import{i as isEqual$4,a as isSymbol_1,_ as _baseGetTag,b as isObject_1,c as _root,d as _Symbol,t as toNumber_1,C as Cookie,e as _getPrototype,f as isObjectLike_1,g as _freeGlobal,h as isPlainObject_1,j as _overArg,u as useMemoizedFn,k as useReactive,l as __decorate,m as copy,n as useSize,o as useCreation,p as isObject$u,q as useDebounceFn,r as _baseTrim,s as useInterval$1,v as useDebounce,w as useAsyncEffect,x as useLocalStorageState,y as useMount,z as usePrevious,A as useUpdateEffect,B as useRequest,D as useUnmount,E as useLatest,F as useThrottleFn}from"./vendor-hooks-CLzfFpO7.js";import{R as createTheme$1,S as responsiveFontSizes,E as PropTypes,j as jsxRuntimeExports,U as StyledEngineProvider,V as ThemeProvider$1,W as CssBaseline,s as styled$1,C as Collapse,X as Slide,Y as emphasize,Z as SvgIcon,$ as ClickAwayListener,a0 as utils$n,a1 as interopRequireDefaultExports,I as IconButton,a2 as CircularProgress,x as Button$1,e as useTheme,t as useMediaQuery,T as Typography$1,r as DialogContent,y as DialogActions,D as Dialog$1,a3 as Box,a4 as Tooltip,a5 as green,a6 as tooltipClasses,a7 as Check$1,a8 as CopyIcon,a9 as _inheritsLoose$3,aa as newStyled,ab as DialogTitle,ac as Stack$5,ad as Alert$2,M as TextField,ae as SwipeableDrawer,af as Backdrop,A as Chip,ag as LinearProgress,ah as Divider,ai as Icon$4,aj as Popover,ak as Menu$1,al as MenuItem$1,am as Card,an as CardHeader,ao as CardContent,ap as CardActions,aq as ImageListItem,P as Popper,F as Fade,v as Paper,ar as MenuList,as as Skeleton,at as AlertTitle,au as emotionReact_browser_esm,av as emotionCache_browser_esm,aw as propTypesExports,l as clsx$2,ax as ThemeProvider$2,ay as Hidden,az as Tab,aA as Tabs$1,aB as teal,aC as Toolbar,aD as AppBar,aE as Container$a,aF as Drawer,aG as MenuIcon,aH as MoreHorizIcon,aI as ExpandMoreIcon,L as List,z as ListItem,aJ as ListItemButton,aK as Badge,aL as blueGrey,aM as Avatar$1,aN as FormControlLabel,aO as Switch$1,aP as Select,K as InputAdornment,aQ as Link$2,aR as ButtonGroup,aS as DialogContentText,aT as Paper$1,aU as Table,aV as Tooltip$1,aW as styles,aX as emotionSerialize_esm,aY as emotionUtils_browser_esm,aZ as Typography$2,a_ as TableBody,a$ as TableCell,b0 as TableRow,b1 as Checkbox,b2 as IconButton$1,b3 as Button$2,b4 as FormControl,b5 as FormControlLabel$1,b6 as FormGroup,b7 as Grid$1,b8 as Input,b9 as InputLabel,ba as ListItemText,bb as MenuItem$2,bc as Select$1,bd as TextField$1,be as Chip$1,bf as TableFooter,bg as TablePagination,bh as InputBase,bi as Toolbar$1,bj as TableHead,bk as TableSortLabel,bl as toPropertyKey$5,bm as hoistStatics,bn as Popover$1,bo as Grow,bp as ListItemIcon,bq as ListItemText$1,br as css}from"./vendor-mui-core-COxJgW9_.js";const colors$2={common:{black:"#000",white:"#fff"},primary:{main:"#3773F2",contrastText:"#fff"},secondary:{main:"#16CED1",contrastText:"#fff"},error:{main:"#F16E6E",contrastText:"#fff"},warning:{main:"#DE9E37",contrastText:"#fff"},info:{main:"#0775F8",contrastText:"#fff"},success:{main:"#34BE74",contrastText:"#fff"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{default:"#fff"},did:{primary:"#4598FA",secondary:"#49C3AD"}},colors$1={textMuted:"rgba(18, 22, 24, 0.36)",textSubtitle:"rgba(18, 22, 24, 0.6)",textBase:"rgba(18, 22, 24, 1)",textPrimaryBase:"rgba(18, 22, 24, 1)",primaryBase:"rgba(19, 125, 250, 1)",primary100:"rgba(19, 125, 250, 1)",gray6:"rgba(17, 22, 24, 0.06)",surfaceBgSubtitle:"rgba(18, 22, 24, 0.03)",surfacePrimarySubtitle:"rgba(19, 125, 250, 0.06)",surfaceSuccess:"rgba(13, 202, 134, 1)",backgroundsBgSubtitle:"rgba(249, 250, 251, 1)",backgroundsBgComponent:"rgba(241, 243, 245, 1)",backgroundsBgField:"rgba(249, 250, 251, 1)",backgroundsBgSubtile:"rgba(249, 250, 251, 1)",backgroundsBgSubtileHover:"rgba(243, 244, 246, 1)",foregroundsFgBase:"rgba(3, 7, 18, 1)",foregroundsFgSubtile:"rgba(75, 85, 99, 1)",foregroundsFgMuted:"rgba(156, 163, 175, 1)",foregroundsFgInteractiveTransparent:"rgba(59, 130, 246, 0)",foregroundsFgInteractive:"rgba(59, 130, 246, 1)",strokeBorderBase:"rgba(229, 231, 235, 1)",strokeBorderStrong:"rgba(209, 213, 219, 1)",strokeSep:"rgba(229, 231, 235, 1)",lineStep:"rgba(18, 22, 24, 0.06)",lineBorderStrong:"rgba(18, 22, 24, 0.12)",lineBorderBase:"rgba(18, 22, 24, 0.06)",borderBase:"rgba(18, 22, 24, 0.06)",dividerColor:"rgba(239, 241, 245, 1)",buttonsButtonNeutral:"rgba(255, 255, 255, 1)",buttonsButtonNeutralHover:"rgba(243, 244, 246, 1)",buttonsButtonInverted:"rgba(3, 7, 18, 1)",buttonsButtonInvertedHover:"rgba(17, 24, 39, 1)",buttonsButtonDanger:"rgba(225, 29, 72, 1)",red:"#FF6369"},muiDarkTheme=createTheme$1({palette:{mode:"dark"}}),create$e=({mode:_="light",pageWidth:C="md",typography:T,overrides:I,palette:M,components:D,...L}={})=>{const B=_==="light"?Object.assign({...colors$2,background:{paper:colors$2.common.white,default:colors$2.background.default},mode:_},M||{}):Object.assign({...muiDarkTheme.palette,background:{paper:colors$2.grey[900],default:colors$2.grey[900]},mode:_},M||{}),N=createTheme$1({themeName:"ArcBlock",palette:B,typography:Object.assign({useNextVariants:!0,color:{main:_==="light"?"#222222":colors$2.common.white,gray:_==="light"?colors$2.grey[500]:colors$2.grey[300]},fontFamily:["Inter","Avenir","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),button:{fontWeight:700}},T),components:{MuiButton:{styleOverrides:{root:{boxShadow:"none"}}},MuiButtonGroup:{styleOverrides:{root:{boxShadow:"none"}}},MuiTableCell:{styleOverrides:{root:({ownerState:V})=>({...V.size==="small"?{borderBottomWidth:"0",paddingTop:"8px",paddingBottom:"8px",paddingLeft:0,paddingRight:"20px"}:{borderBottomWidth:"0",paddingTop:"14px",paddingBottom:"14px",paddingLeft:0,paddingRight:"30px"}}),head:{textTransform:"uppercase",color:_==="light"?colors$2.grey[900]:colors$2.grey[300]},body:{color:_==="light"?colors$2.grey[900]:colors$2.grey[300]}}},...I,...D},pageWidth:C,colors:{white:"#FFFFFF",dark:"#4A707C",gray:"#222222",minor:"#9B9B9B",darkText:"#DCDCDC",background:"#F7F8F8",yellow:"#FFCF71",green:"#44cdc6",red:"#D0021B",blue:"#4E6AF6",primary:"#222222",black:"#222222",secondary:"#44cdc6",mint:"#44cdc6",textSecondary:"#4A4A4A",active:"#5b9025",danger:"#D0021B",lightGrey:"#BCBCBC"},mode:_,...L});return responsiveFontSizes(N,{breakpoints:["xs","sm","md","lg"],disableAlign:!1,factor:3,variants:["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]})},createTheme=create$e,defaultTheme$1=createTheme();function ThemeProvider({children:_,theme:C,injectFirst:T}){return jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:T,children:jsxRuntimeExports.jsxs(ThemeProvider$1,{theme:C,children:[jsxRuntimeExports.jsx(CssBaseline,{}),_]})})}ThemeProvider.propTypes={children:PropTypes.any,theme:PropTypes.any,injectFirst:PropTypes.bool};ThemeProvider.defaultProps={children:null,theme:defaultTheme$1,injectFirst:!0};const isTransientProp=_=>_.startsWith("$"),styled=(_,C)=>styled$1(_,{...C,shouldForwardProp:T=>C!=null&&C.shouldForwardProp?C.shouldForwardProp(T)&&!isTransientProp(T):!isTransientProp(T)});function Center({children:_,relative:C="screen"}){let T={};return C==="parent"&&(T={width:"100%",height:"100%"}),jsxRuntimeExports.jsx(Div$3,{style:T,children:_})}const Div$3=styled("div")`
2
2
  flex: 1;
3
3
  width: 100vw;
4
4
  height: 100vh;
@@ -71,7 +71,7 @@ object-assign
71
71
  }
72
72
  }
73
73
  `;function Confirm({title:_,children:C,onConfirm:T,onCancel:I,showCloseButton:M,showCancelButton:D,fullScreen:L,confirmButton:B,cancelButton:N,PaperProps:F,...V}){F.style=Object.assign({minHeight:0},F.style);const U=useMemoizedFn((H,G)=>{["backdropClick","escapeKeyDown"].includes(G)||(H.stopPropagation(),I(H,G))});return jsxRuntimeExports.jsx(Dialog,{title:_,PaperProps:F,...V,onClose:U,showCloseButton:M,fullScreen:L,slotProps:{header:{sx:{".ux-dialog_title":{lineHeight:1}}},content:{sx:{paddingTop:"0!important",border:"none!important"}}},actions:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[D&&jsxRuntimeExports.jsx(ButtonComponent,{onClick:H=>{H.stopPropagation(),I(H,"closeButton")},color:"primary",...N.props,children:N.text}),jsxRuntimeExports.jsx(ButtonComponent,{onClick:H=>{H.stopPropagation(),T(H)},color:"primary",autoFocus:!0,...B.props,children:B.text})]}),children:C})}Confirm.propTypes={title:PropTypes.node.isRequired,open:PropTypes.bool.isRequired,onConfirm:PropTypes.func.isRequired,onCancel:PropTypes.func.isRequired,children:PropTypes.node,showCancelButton:PropTypes.bool,showCloseButton:PropTypes.bool,fullScreen:PropTypes.bool,confirmButton:PropTypes.shape({text:PropTypes.node.isRequired,props:PropTypes.object}),cancelButton:PropTypes.shape({text:PropTypes.node.isRequired,props:PropTypes.object}),PaperProps:PropTypes.object};Confirm.defaultProps={showCancelButton:!0,showCloseButton:!0,fullScreen:!1,confirmButton:{text:"Confirm"},cancelButton:{text:"Cancel"},PaperProps:{}};const ConfirmHolder=reactExports.forwardRef((_,C)=>{const[T,I]=reactExports.useState(""),[M,D]=reactExports.useState(""),L=useReactive({show:!1,title:"",content:"",onConfirm:noop$8,onCancel:noop$8,loading:!1,showCancelButton:!0,showCloseButton:!0,confirmButtonText:"Confirm",confirmButtonProps:{},cancelButtonText:"Cancel",cancelButtonProps:{}}),B=useMemoizedFn((Y={})=>{reactExports.isValidElement(Y.title)?(I(Y.title),L.title=""):(I(""),L.title=Y.title),reactExports.isValidElement(Y.content)?(D(Y.content),L.content=""):(D(""),L.content=Y.content),L.onConfirm=Y.onConfirm||noop$8,L.onCancel=Y.onCancel||noop$8,L.showCloseButton=Y.showCloseButton??!0,L.showCancelButton=Y.showCancelButton??!0,Y.confirmButtonText&&(L.confirmButtonText=Y.confirmButtonText),Y.confirmButtonProps&&(L.confirmButtonProps=Y.confirmButtonProps),Y.cancelButtonText&&(L.cancelButtonText=Y.cancelButtonText),Y.cancelButtonProps&&(L.cancelButtonProps=Y.cancelButtonProps),L.loading=!1,L.show=!0}),N=useMemoizedFn(()=>{I(""),D(""),L.title="",L.content="",L.onConfirm=noop$8,L.onCancel=noop$8,L.confirmButtonText="Confirm",L.confirmButtonProps={},L.cancelButtonText="Cancel",L.cancelButtonProps={}}),F=useMemoizedFn(()=>{L.show=!1,setTimeout(()=>{N()},300)}),V=useMemoizedFn(Y=>{Y.title&&(reactExports.isValidElement(Y.title)?(I(Y.title),L.title=""):(I(""),L.title=Y.title)),Y.content&&(reactExports.isValidElement(Y.content)?(D(Y.content),L.content=""):(D(""),L.content=Y.content))}),U=useMemoizedFn((Y,J)=>{F(),L==null||L.onCancel(Y,J)}),H=useMemoizedFn(async Y=>{L.loading=!0;try{await(L==null?void 0:L.onConfirm(F,Y))}finally{L.loading=!1}});reactExports.useImperativeHandle(C,()=>({open:B,close:F,update:V}),[B,F,V]);const G=T||L.title,Z=M||L.content;return jsxRuntimeExports.jsx(Confirm,{..._,open:L.show,title:G,onConfirm:H,onCancel:U,confirmButton:{text:L.confirmButtonText,props:{variant:"contained",color:"primary",loading:L.loading,...L.confirmButtonProps}},showCloseButton:L.showCloseButton,showCancelButton:L.showCancelButton,cancelButton:{text:L.cancelButtonText,props:{variant:"outlined",color:"primary",...L.cancelButtonProps}},children:Z instanceof Function?Z():Z})});function useConfirm(_={}){const C=reactExports.useRef(null),T=useMemoizedFn((...L)=>{var B;(B=C.current)==null||B.open(...L)}),I=useMemoizedFn((...L)=>{var B;(B=C.current)==null||B.close(...L)}),M=useMemoizedFn((...L)=>{var B;(B=C.current)==null||B.update(...L)}),D={open:T,close:I,update:M};return{confirmHolder:jsxRuntimeExports.jsx(ConfirmHolder,{..._,ref:C}),confirmApi:D}}var lib$7={},browser$d={exports:{}},safeBuffer$1={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(_,C){var T=require$$1$5,I=T.Buffer;function M(L,B){for(var N in L)B[N]=L[N]}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?_.exports=T:(M(T,C),C.Buffer=D);function D(L,B,N){return I(L,B,N)}D.prototype=Object.create(I.prototype),M(I,D),D.from=function(L,B,N){if(typeof L=="number")throw new TypeError("Argument must not be a number");return I(L,B,N)},D.alloc=function(L,B,N){if(typeof L!="number")throw new TypeError("Argument must be a number");var F=I(L);return B!==void 0?typeof N=="string"?F.fill(B,N):F.fill(B):F.fill(0),F},D.allocUnsafe=function(L){if(typeof L!="number")throw new TypeError("Argument must be a number");return I(L)},D.allocUnsafeSlow=function(L){if(typeof L!="number")throw new TypeError("Argument must be a number");return T.SlowBuffer(L)}})(safeBuffer$1,safeBuffer$1.exports);var safeBufferExports=safeBuffer$1.exports,MAX_BYTES=65536,MAX_UINT32=4294967295;function oldBrowser(){throw new Error(`Secure random number generation is not supported by this browser.
74
- Use Chrome, Firefox or Internet Explorer 11`)}var Buffer$2=safeBufferExports.Buffer,crypto=commonjsGlobal.crypto||commonjsGlobal.msCrypto;crypto&&crypto.getRandomValues?browser$d.exports=randomBytes:browser$d.exports=oldBrowser;function randomBytes(_,C){if(_>MAX_UINT32)throw new RangeError("requested too many random bytes");var T=Buffer$2.allocUnsafe(_);if(_>0)if(_>MAX_BYTES)for(var I=0;I<_;I+=MAX_BYTES)crypto.getRandomValues(T.slice(I,I+MAX_BYTES));else crypto.getRandomValues(T);return typeof C=="function"?process$1.nextTick(function(){C(null,T)}):T}var browserExports=browser$d.exports,encode$4={},lib$6={},baseGetTag$2=_baseGetTag,isObjectLike$5=isObjectLike_1,boolTag$1="[object Boolean]";function isBoolean(_){return _===!0||_===!1||isObjectLike$5(_)&&baseGetTag$2(_)==boolTag$1}var isBoolean_1=isBoolean,baseGetTag$1=_baseGetTag,isArray$j=isArray_1,isObjectLike$4=isObjectLike_1,stringTag$1="[object String]";function isString(_){return typeof _=="string"||!isArray$j(_)&&isObjectLike$4(_)&&baseGetTag$1(_)==stringTag$1}var isString_1=isString;const isString$1=getDefaultExportFromCjs(isString_1);var baseGetTag=_baseGetTag,isObjectLike$3=isObjectLike_1,numberTag$1="[object Number]";function isNumber(_){return typeof _=="number"||isObjectLike$3(_)&&baseGetTag(_)==numberTag$1}var isNumber_1=isNumber,castSlice$1=_castSlice,hasUnicode=_hasUnicode,stringToArray$1=_stringToArray,toString$r=toString_1;function createCaseFirst$1(_){return function(C){C=toString$r(C);var T=hasUnicode(C)?stringToArray$1(C):void 0,I=T?T[0]:C.charAt(0),M=T?castSlice$1(T,1).join(""):C.slice(1);return I[_]()+M}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$1=createCaseFirst("toUpperCase"),upperFirst_1$1=upperFirst$1;const upperFirst$2=getDefaultExportFromCjs(upperFirst_1$1);var toString$q=toString_1,upperFirst=upperFirst_1$1;function capitalize$3(_){return upperFirst(toString$q(_).toLowerCase())}var capitalize_1$1=capitalize$3;function arrayReduce$2(_,C,T,I){var M=-1,D=_==null?0:_.length;for(I&&D&&(T=_[++M]);++M<D;)T=C(T,_[M],M,_);return T}var _arrayReduce=arrayReduce$2;function basePropertyOf$1(_){return function(C){return _==null?void 0:_[C]}}var _basePropertyOf=basePropertyOf$1,basePropertyOf=_basePropertyOf,deburredLetters={À:"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",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter$1=basePropertyOf(deburredLetters),_deburrLetter=deburrLetter$1,deburrLetter=_deburrLetter,toString$p=toString_1,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsCombo$1="["+rsComboRange$1+"]",reComboMark=RegExp(rsCombo$1,"g");function deburr$1(_){return _=toString$p(_),_&&_.replace(reLatin,deburrLetter).replace(reComboMark,"")}var deburr_1=deburr$1,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(_){return _.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(_){return reHasUnicodeWord.test(_)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\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",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(_){return _.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$o=toString_1,unicodeWords=_unicodeWords;function words$1(_,C,T){return _=toString$o(_),C=T?void 0:C,C===void 0?hasUnicodeWord(_)?unicodeWords(_):asciiWords(_):_.match(C)||[]}var words_1=words$1,arrayReduce$1=_arrayReduce,deburr=deburr_1,words=words_1,rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder$1(_){return function(C){return arrayReduce$1(words(deburr(C).replace(reApos,"")),_,"")}}var _createCompounder=createCompounder$1,capitalize$2=capitalize_1$1,createCompounder=_createCompounder,camelCase=createCompounder(function(_,C,T){return C=C.toLowerCase(),_+(T?capitalize$2(C):C)}),camelCase_1=camelCase;const camelCase$1=getDefaultExportFromCjs(camelCase_1);function isNull(_){return _===null}var isNull_1=isNull;const isNull$1=getDefaultExportFromCjs(isNull_1);var createPadding=_createPadding,stringSize=_stringSize,toInteger$1=toInteger_1,toString$n=toString_1;function padEnd(_,C,T){_=toString$n(_),C=toInteger$1(C);var I=C?stringSize(_):0;return C&&I<C?_+createPadding(C-I,T):_}var padEnd_1=padEnd,base64Url={unescape:unescape$2,escape:escape$3,encode:encode$3,decode:decode$1};function unescape$2(_){return(_+"===".slice((_.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/")}function escape$3(_){return _.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function encode$3(_,C){return escape$3(Buffer$3.from(_,C||"utf8").toString("base64"))}function decode$1(_,C){return Buffer$3.from(unescape$2(_),"base64").toString(C||"utf8")}const base64$1=getDefaultExportFromCjs(base64Url);var bn$2={exports:{}};bn$2.exports;(function(_){(function(C,T){function I(fe,W){if(!fe)throw new Error(W||"Assertion failed")}function M(fe,W){fe.super_=W;var Q=function(){};Q.prototype=W.prototype,fe.prototype=new Q,fe.prototype.constructor=fe}function D(fe,W,Q){if(D.isBN(fe))return fe;this.negative=0,this.words=null,this.length=0,this.red=null,fe!==null&&((W==="le"||W==="be")&&(Q=W,W=10),this._init(fe||0,W||10,Q||"be"))}typeof C=="object"?C.exports=D:T.BN=D,D.BN=D,D.wordSize=26;var L;try{typeof window<"u"&&typeof window.Buffer<"u"?L=window.Buffer:L=require$$1$5.Buffer}catch{}D.isBN=function(W){return W instanceof D?!0:W!==null&&typeof W=="object"&&W.constructor.wordSize===D.wordSize&&Array.isArray(W.words)},D.max=function(W,Q){return W.cmp(Q)>0?W:Q},D.min=function(W,Q){return W.cmp(Q)<0?W:Q},D.prototype._init=function(W,Q,ne){if(typeof W=="number")return this._initNumber(W,Q,ne);if(typeof W=="object")return this._initArray(W,Q,ne);Q==="hex"&&(Q=16),I(Q===(Q|0)&&Q>=2&&Q<=36),W=W.toString().replace(/\s+/g,"");var ie=0;W[0]==="-"&&(ie++,this.negative=1),ie<W.length&&(Q===16?this._parseHex(W,ie,ne):(this._parseBase(W,Q,ie),ne==="le"&&this._initArray(this.toArray(),Q,ne)))},D.prototype._initNumber=function(W,Q,ne){W<0&&(this.negative=1,W=-W),W<67108864?(this.words=[W&67108863],this.length=1):W<4503599627370496?(this.words=[W&67108863,W/67108864&67108863],this.length=2):(I(W<9007199254740992),this.words=[W&67108863,W/67108864&67108863,1],this.length=3),ne==="le"&&this._initArray(this.toArray(),Q,ne)},D.prototype._initArray=function(W,Q,ne){if(I(typeof W.length=="number"),W.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(W.length/3),this.words=new Array(this.length);for(var ie=0;ie<this.length;ie++)this.words[ie]=0;var te,se,pe=0;if(ne==="be")for(ie=W.length-1,te=0;ie>=0;ie-=3)se=W[ie]|W[ie-1]<<8|W[ie-2]<<16,this.words[te]|=se<<pe&67108863,this.words[te+1]=se>>>26-pe&67108863,pe+=24,pe>=26&&(pe-=26,te++);else if(ne==="le")for(ie=0,te=0;ie<W.length;ie+=3)se=W[ie]|W[ie+1]<<8|W[ie+2]<<16,this.words[te]|=se<<pe&67108863,this.words[te+1]=se>>>26-pe&67108863,pe+=24,pe>=26&&(pe-=26,te++);return this._strip()};function B(fe,W){var Q=fe.charCodeAt(W);if(Q>=48&&Q<=57)return Q-48;if(Q>=65&&Q<=70)return Q-55;if(Q>=97&&Q<=102)return Q-87;I(!1,"Invalid character in "+fe)}function N(fe,W,Q){var ne=B(fe,Q);return Q-1>=W&&(ne|=B(fe,Q-1)<<4),ne}D.prototype._parseHex=function(W,Q,ne){this.length=Math.ceil((W.length-Q)/6),this.words=new Array(this.length);for(var ie=0;ie<this.length;ie++)this.words[ie]=0;var te=0,se=0,pe;if(ne==="be")for(ie=W.length-1;ie>=Q;ie-=2)pe=N(W,Q,ie)<<te,this.words[se]|=pe&67108863,te>=18?(te-=18,se+=1,this.words[se]|=pe>>>26):te+=8;else{var ce=W.length-Q;for(ie=ce%2===0?Q+1:Q;ie<W.length;ie+=2)pe=N(W,Q,ie)<<te,this.words[se]|=pe&67108863,te>=18?(te-=18,se+=1,this.words[se]|=pe>>>26):te+=8}this._strip()};function F(fe,W,Q,ne){for(var ie=0,te=0,se=Math.min(fe.length,Q),pe=W;pe<se;pe++){var ce=fe.charCodeAt(pe)-48;ie*=ne,ce>=49?te=ce-49+10:ce>=17?te=ce-17+10:te=ce,I(ce>=0&&te<ne,"Invalid character"),ie+=te}return ie}D.prototype._parseBase=function(W,Q,ne){this.words=[0],this.length=1;for(var ie=0,te=1;te<=67108863;te*=Q)ie++;ie--,te=te/Q|0;for(var se=W.length-ne,pe=se%ie,ce=Math.min(se,se-pe)+ne,ee=0,ue=ne;ue<ce;ue+=ie)ee=F(W,ue,ue+ie,Q),this.imuln(te),this.words[0]+ee<67108864?this.words[0]+=ee:this._iaddn(ee);if(pe!==0){var Oe=1;for(ee=F(W,ue,W.length,Q),ue=0;ue<pe;ue++)Oe*=Q;this.imuln(Oe),this.words[0]+ee<67108864?this.words[0]+=ee:this._iaddn(ee)}this._strip()},D.prototype.copy=function(W){W.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)W.words[Q]=this.words[Q];W.length=this.length,W.negative=this.negative,W.red=this.red};function V(fe,W){fe.words=W.words,fe.length=W.length,fe.negative=W.negative,fe.red=W.red}if(D.prototype._move=function(W){V(W,this)},D.prototype.clone=function(){var W=new D(null);return this.copy(W),W},D.prototype._expand=function(W){for(;this.length<W;)this.words[this.length++]=0;return this},D.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},D.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{D.prototype[Symbol.for("nodejs.util.inspect.custom")]=U}catch{D.prototype.inspect=U}else D.prototype.inspect=U;function U(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],G=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],Z=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];D.prototype.toString=function(W,Q){W=W||10,Q=Q|0||1;var ne;if(W===16||W==="hex"){ne="";for(var ie=0,te=0,se=0;se<this.length;se++){var pe=this.words[se],ce=((pe<<ie|te)&16777215).toString(16);te=pe>>>24-ie&16777215,ie+=2,ie>=26&&(ie-=26,se--),te!==0||se!==this.length-1?ne=H[6-ce.length]+ce+ne:ne=ce+ne}for(te!==0&&(ne=te.toString(16)+ne);ne.length%Q!==0;)ne="0"+ne;return this.negative!==0&&(ne="-"+ne),ne}if(W===(W|0)&&W>=2&&W<=36){var ee=G[W],ue=Z[W];ne="";var Oe=this.clone();for(Oe.negative=0;!Oe.isZero();){var ye=Oe.modrn(ue).toString(W);Oe=Oe.idivn(ue),Oe.isZero()?ne=ye+ne:ne=H[ee-ye.length]+ye+ne}for(this.isZero()&&(ne="0"+ne);ne.length%Q!==0;)ne="0"+ne;return this.negative!==0&&(ne="-"+ne),ne}I(!1,"Base should be between 2 and 36")},D.prototype.toNumber=function(){var W=this.words[0];return this.length===2?W+=this.words[1]*67108864:this.length===3&&this.words[2]===1?W+=4503599627370496+this.words[1]*67108864:this.length>2&&I(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-W:W},D.prototype.toJSON=function(){return this.toString(16,2)},L&&(D.prototype.toBuffer=function(W,Q){return this.toArrayLike(L,W,Q)}),D.prototype.toArray=function(W,Q){return this.toArrayLike(Array,W,Q)};var Y=function(W,Q){return W.allocUnsafe?W.allocUnsafe(Q):new W(Q)};D.prototype.toArrayLike=function(W,Q,ne){this._strip();var ie=this.byteLength(),te=ne||Math.max(1,ie);I(ie<=te,"byte array longer than desired length"),I(te>0,"Requested array length <= 0");var se=Y(W,te),pe=Q==="le"?"LE":"BE";return this["_toArrayLike"+pe](se,ie),se},D.prototype._toArrayLikeLE=function(W,Q){for(var ne=0,ie=0,te=0,se=0;te<this.length;te++){var pe=this.words[te]<<se|ie;W[ne++]=pe&255,ne<W.length&&(W[ne++]=pe>>8&255),ne<W.length&&(W[ne++]=pe>>16&255),se===6?(ne<W.length&&(W[ne++]=pe>>24&255),ie=0,se=0):(ie=pe>>>24,se+=2)}if(ne<W.length)for(W[ne++]=ie;ne<W.length;)W[ne++]=0},D.prototype._toArrayLikeBE=function(W,Q){for(var ne=W.length-1,ie=0,te=0,se=0;te<this.length;te++){var pe=this.words[te]<<se|ie;W[ne--]=pe&255,ne>=0&&(W[ne--]=pe>>8&255),ne>=0&&(W[ne--]=pe>>16&255),se===6?(ne>=0&&(W[ne--]=pe>>24&255),ie=0,se=0):(ie=pe>>>24,se+=2)}if(ne>=0)for(W[ne--]=ie;ne>=0;)W[ne--]=0},Math.clz32?D.prototype._countBits=function(W){return 32-Math.clz32(W)}:D.prototype._countBits=function(W){var Q=W,ne=0;return Q>=4096&&(ne+=13,Q>>>=13),Q>=64&&(ne+=7,Q>>>=7),Q>=8&&(ne+=4,Q>>>=4),Q>=2&&(ne+=2,Q>>>=2),ne+Q},D.prototype._zeroBits=function(W){if(W===0)return 26;var Q=W,ne=0;return Q&8191||(ne+=13,Q>>>=13),Q&127||(ne+=7,Q>>>=7),Q&15||(ne+=4,Q>>>=4),Q&3||(ne+=2,Q>>>=2),Q&1||ne++,ne},D.prototype.bitLength=function(){var W=this.words[this.length-1],Q=this._countBits(W);return(this.length-1)*26+Q};function J(fe){for(var W=new Array(fe.bitLength()),Q=0;Q<W.length;Q++){var ne=Q/26|0,ie=Q%26;W[Q]=fe.words[ne]>>>ie&1}return W}D.prototype.zeroBits=function(){if(this.isZero())return 0;for(var W=0,Q=0;Q<this.length;Q++){var ne=this._zeroBits(this.words[Q]);if(W+=ne,ne!==26)break}return W},D.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},D.prototype.toTwos=function(W){return this.negative!==0?this.abs().inotn(W).iaddn(1):this.clone()},D.prototype.fromTwos=function(W){return this.testn(W-1)?this.notn(W).iaddn(1).ineg():this.clone()},D.prototype.isNeg=function(){return this.negative!==0},D.prototype.neg=function(){return this.clone().ineg()},D.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},D.prototype.iuor=function(W){for(;this.length<W.length;)this.words[this.length++]=0;for(var Q=0;Q<W.length;Q++)this.words[Q]=this.words[Q]|W.words[Q];return this._strip()},D.prototype.ior=function(W){return I((this.negative|W.negative)===0),this.iuor(W)},D.prototype.or=function(W){return this.length>W.length?this.clone().ior(W):W.clone().ior(this)},D.prototype.uor=function(W){return this.length>W.length?this.clone().iuor(W):W.clone().iuor(this)},D.prototype.iuand=function(W){var Q;this.length>W.length?Q=W:Q=this;for(var ne=0;ne<Q.length;ne++)this.words[ne]=this.words[ne]&W.words[ne];return this.length=Q.length,this._strip()},D.prototype.iand=function(W){return I((this.negative|W.negative)===0),this.iuand(W)},D.prototype.and=function(W){return this.length>W.length?this.clone().iand(W):W.clone().iand(this)},D.prototype.uand=function(W){return this.length>W.length?this.clone().iuand(W):W.clone().iuand(this)},D.prototype.iuxor=function(W){var Q,ne;this.length>W.length?(Q=this,ne=W):(Q=W,ne=this);for(var ie=0;ie<ne.length;ie++)this.words[ie]=Q.words[ie]^ne.words[ie];if(this!==Q)for(;ie<Q.length;ie++)this.words[ie]=Q.words[ie];return this.length=Q.length,this._strip()},D.prototype.ixor=function(W){return I((this.negative|W.negative)===0),this.iuxor(W)},D.prototype.xor=function(W){return this.length>W.length?this.clone().ixor(W):W.clone().ixor(this)},D.prototype.uxor=function(W){return this.length>W.length?this.clone().iuxor(W):W.clone().iuxor(this)},D.prototype.inotn=function(W){I(typeof W=="number"&&W>=0);var Q=Math.ceil(W/26)|0,ne=W%26;this._expand(Q),ne>0&&Q--;for(var ie=0;ie<Q;ie++)this.words[ie]=~this.words[ie]&67108863;return ne>0&&(this.words[ie]=~this.words[ie]&67108863>>26-ne),this._strip()},D.prototype.notn=function(W){return this.clone().inotn(W)},D.prototype.setn=function(W,Q){I(typeof W=="number"&&W>=0);var ne=W/26|0,ie=W%26;return this._expand(ne+1),Q?this.words[ne]=this.words[ne]|1<<ie:this.words[ne]=this.words[ne]&~(1<<ie),this._strip()},D.prototype.iadd=function(W){var Q;if(this.negative!==0&&W.negative===0)return this.negative=0,Q=this.isub(W),this.negative^=1,this._normSign();if(this.negative===0&&W.negative!==0)return W.negative=0,Q=this.isub(W),W.negative=1,Q._normSign();var ne,ie;this.length>W.length?(ne=this,ie=W):(ne=W,ie=this);for(var te=0,se=0;se<ie.length;se++)Q=(ne.words[se]|0)+(ie.words[se]|0)+te,this.words[se]=Q&67108863,te=Q>>>26;for(;te!==0&&se<ne.length;se++)Q=(ne.words[se]|0)+te,this.words[se]=Q&67108863,te=Q>>>26;if(this.length=ne.length,te!==0)this.words[this.length]=te,this.length++;else if(ne!==this)for(;se<ne.length;se++)this.words[se]=ne.words[se];return this},D.prototype.add=function(W){var Q;return W.negative!==0&&this.negative===0?(W.negative=0,Q=this.sub(W),W.negative^=1,Q):W.negative===0&&this.negative!==0?(this.negative=0,Q=W.sub(this),this.negative=1,Q):this.length>W.length?this.clone().iadd(W):W.clone().iadd(this)},D.prototype.isub=function(W){if(W.negative!==0){W.negative=0;var Q=this.iadd(W);return W.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(W),this.negative=1,this._normSign();var ne=this.cmp(W);if(ne===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ie,te;ne>0?(ie=this,te=W):(ie=W,te=this);for(var se=0,pe=0;pe<te.length;pe++)Q=(ie.words[pe]|0)-(te.words[pe]|0)+se,se=Q>>26,this.words[pe]=Q&67108863;for(;se!==0&&pe<ie.length;pe++)Q=(ie.words[pe]|0)+se,se=Q>>26,this.words[pe]=Q&67108863;if(se===0&&pe<ie.length&&ie!==this)for(;pe<ie.length;pe++)this.words[pe]=ie.words[pe];return this.length=Math.max(this.length,pe),ie!==this&&(this.negative=1),this._strip()},D.prototype.sub=function(W){return this.clone().isub(W)};function X(fe,W,Q){Q.negative=W.negative^fe.negative;var ne=fe.length+W.length|0;Q.length=ne,ne=ne-1|0;var ie=fe.words[0]|0,te=W.words[0]|0,se=ie*te,pe=se&67108863,ce=se/67108864|0;Q.words[0]=pe;for(var ee=1;ee<ne;ee++){for(var ue=ce>>>26,Oe=ce&67108863,ye=Math.min(ee,W.length-1),we=Math.max(0,ee-fe.length+1);we<=ye;we++){var _e=ee-we|0;ie=fe.words[_e]|0,te=W.words[we]|0,se=ie*te+Oe,ue+=se/67108864|0,Oe=se&67108863}Q.words[ee]=Oe|0,ce=ue|0}return ce!==0?Q.words[ee]=ce|0:Q.length--,Q._strip()}var oe=function(W,Q,ne){var ie=W.words,te=Q.words,se=ne.words,pe=0,ce,ee,ue,Oe=ie[0]|0,ye=Oe&8191,we=Oe>>>13,_e=ie[1]|0,Ce=_e&8191,ke=_e>>>13,Le=ie[2]|0,ge=Le&8191,de=Le>>>13,Ee=ie[3]|0,xe=Ee&8191,Re=Ee>>>13,We=ie[4]|0,Fe=We&8191,Ie=We>>>13,De=ie[5]|0,Xe=De&8191,Ke=De>>>13,pt=ie[6]|0,Ct=pt&8191,yt=pt>>>13,bt=ie[7]|0,st=bt&8191,rt=bt>>>13,Pt=ie[8]|0,ht=Pt&8191,Et=Pt>>>13,Vt=ie[9]|0,$t=Vt&8191,Jt=Vt>>>13,Lr=te[0]|0,Gt=Lr&8191,ar=Lr>>>13,Qr=te[1]|0,lr=Qr&8191,ur=Qr>>>13,Jr=te[2]|0,pr=Jr&8191,xr=Jr>>>13,Xt=te[3]|0,At=Xt&8191,kt=Xt>>>13,wr=te[4]|0,rr=wr&8191,nr=wr>>>13,jr=te[5]|0,yr=jr&8191,er=jr>>>13,ln=te[6]|0,Te=ln&8191,je=ln>>>13,Ge=te[7]|0,be=Ge&8191,He=Ge>>>13,wt=te[8]|0,ut=wt&8191,tt=wt>>>13,Ft=te[9]|0,Nt=Ft&8191,jt=Ft>>>13;ne.negative=W.negative^Q.negative,ne.length=19,ce=Math.imul(ye,Gt),ee=Math.imul(ye,ar),ee=ee+Math.imul(we,Gt)|0,ue=Math.imul(we,ar);var Ir=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,ce=Math.imul(Ce,Gt),ee=Math.imul(Ce,ar),ee=ee+Math.imul(ke,Gt)|0,ue=Math.imul(ke,ar),ce=ce+Math.imul(ye,lr)|0,ee=ee+Math.imul(ye,ur)|0,ee=ee+Math.imul(we,lr)|0,ue=ue+Math.imul(we,ur)|0;var Ut=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,ce=Math.imul(ge,Gt),ee=Math.imul(ge,ar),ee=ee+Math.imul(de,Gt)|0,ue=Math.imul(de,ar),ce=ce+Math.imul(Ce,lr)|0,ee=ee+Math.imul(Ce,ur)|0,ee=ee+Math.imul(ke,lr)|0,ue=ue+Math.imul(ke,ur)|0,ce=ce+Math.imul(ye,pr)|0,ee=ee+Math.imul(ye,xr)|0,ee=ee+Math.imul(we,pr)|0,ue=ue+Math.imul(we,xr)|0;var ot=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(ot>>>26)|0,ot&=67108863,ce=Math.imul(xe,Gt),ee=Math.imul(xe,ar),ee=ee+Math.imul(Re,Gt)|0,ue=Math.imul(Re,ar),ce=ce+Math.imul(ge,lr)|0,ee=ee+Math.imul(ge,ur)|0,ee=ee+Math.imul(de,lr)|0,ue=ue+Math.imul(de,ur)|0,ce=ce+Math.imul(Ce,pr)|0,ee=ee+Math.imul(Ce,xr)|0,ee=ee+Math.imul(ke,pr)|0,ue=ue+Math.imul(ke,xr)|0,ce=ce+Math.imul(ye,At)|0,ee=ee+Math.imul(ye,kt)|0,ee=ee+Math.imul(we,At)|0,ue=ue+Math.imul(we,kt)|0;var Bt=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,ce=Math.imul(Fe,Gt),ee=Math.imul(Fe,ar),ee=ee+Math.imul(Ie,Gt)|0,ue=Math.imul(Ie,ar),ce=ce+Math.imul(xe,lr)|0,ee=ee+Math.imul(xe,ur)|0,ee=ee+Math.imul(Re,lr)|0,ue=ue+Math.imul(Re,ur)|0,ce=ce+Math.imul(ge,pr)|0,ee=ee+Math.imul(ge,xr)|0,ee=ee+Math.imul(de,pr)|0,ue=ue+Math.imul(de,xr)|0,ce=ce+Math.imul(Ce,At)|0,ee=ee+Math.imul(Ce,kt)|0,ee=ee+Math.imul(ke,At)|0,ue=ue+Math.imul(ke,kt)|0,ce=ce+Math.imul(ye,rr)|0,ee=ee+Math.imul(ye,nr)|0,ee=ee+Math.imul(we,rr)|0,ue=ue+Math.imul(we,nr)|0;var Ht=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,ce=Math.imul(Xe,Gt),ee=Math.imul(Xe,ar),ee=ee+Math.imul(Ke,Gt)|0,ue=Math.imul(Ke,ar),ce=ce+Math.imul(Fe,lr)|0,ee=ee+Math.imul(Fe,ur)|0,ee=ee+Math.imul(Ie,lr)|0,ue=ue+Math.imul(Ie,ur)|0,ce=ce+Math.imul(xe,pr)|0,ee=ee+Math.imul(xe,xr)|0,ee=ee+Math.imul(Re,pr)|0,ue=ue+Math.imul(Re,xr)|0,ce=ce+Math.imul(ge,At)|0,ee=ee+Math.imul(ge,kt)|0,ee=ee+Math.imul(de,At)|0,ue=ue+Math.imul(de,kt)|0,ce=ce+Math.imul(Ce,rr)|0,ee=ee+Math.imul(Ce,nr)|0,ee=ee+Math.imul(ke,rr)|0,ue=ue+Math.imul(ke,nr)|0,ce=ce+Math.imul(ye,yr)|0,ee=ee+Math.imul(ye,er)|0,ee=ee+Math.imul(we,yr)|0,ue=ue+Math.imul(we,er)|0;var _r=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(_r>>>26)|0,_r&=67108863,ce=Math.imul(Ct,Gt),ee=Math.imul(Ct,ar),ee=ee+Math.imul(yt,Gt)|0,ue=Math.imul(yt,ar),ce=ce+Math.imul(Xe,lr)|0,ee=ee+Math.imul(Xe,ur)|0,ee=ee+Math.imul(Ke,lr)|0,ue=ue+Math.imul(Ke,ur)|0,ce=ce+Math.imul(Fe,pr)|0,ee=ee+Math.imul(Fe,xr)|0,ee=ee+Math.imul(Ie,pr)|0,ue=ue+Math.imul(Ie,xr)|0,ce=ce+Math.imul(xe,At)|0,ee=ee+Math.imul(xe,kt)|0,ee=ee+Math.imul(Re,At)|0,ue=ue+Math.imul(Re,kt)|0,ce=ce+Math.imul(ge,rr)|0,ee=ee+Math.imul(ge,nr)|0,ee=ee+Math.imul(de,rr)|0,ue=ue+Math.imul(de,nr)|0,ce=ce+Math.imul(Ce,yr)|0,ee=ee+Math.imul(Ce,er)|0,ee=ee+Math.imul(ke,yr)|0,ue=ue+Math.imul(ke,er)|0,ce=ce+Math.imul(ye,Te)|0,ee=ee+Math.imul(ye,je)|0,ee=ee+Math.imul(we,Te)|0,ue=ue+Math.imul(we,je)|0;var Er=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Er>>>26)|0,Er&=67108863,ce=Math.imul(st,Gt),ee=Math.imul(st,ar),ee=ee+Math.imul(rt,Gt)|0,ue=Math.imul(rt,ar),ce=ce+Math.imul(Ct,lr)|0,ee=ee+Math.imul(Ct,ur)|0,ee=ee+Math.imul(yt,lr)|0,ue=ue+Math.imul(yt,ur)|0,ce=ce+Math.imul(Xe,pr)|0,ee=ee+Math.imul(Xe,xr)|0,ee=ee+Math.imul(Ke,pr)|0,ue=ue+Math.imul(Ke,xr)|0,ce=ce+Math.imul(Fe,At)|0,ee=ee+Math.imul(Fe,kt)|0,ee=ee+Math.imul(Ie,At)|0,ue=ue+Math.imul(Ie,kt)|0,ce=ce+Math.imul(xe,rr)|0,ee=ee+Math.imul(xe,nr)|0,ee=ee+Math.imul(Re,rr)|0,ue=ue+Math.imul(Re,nr)|0,ce=ce+Math.imul(ge,yr)|0,ee=ee+Math.imul(ge,er)|0,ee=ee+Math.imul(de,yr)|0,ue=ue+Math.imul(de,er)|0,ce=ce+Math.imul(Ce,Te)|0,ee=ee+Math.imul(Ce,je)|0,ee=ee+Math.imul(ke,Te)|0,ue=ue+Math.imul(ke,je)|0,ce=ce+Math.imul(ye,be)|0,ee=ee+Math.imul(ye,He)|0,ee=ee+Math.imul(we,be)|0,ue=ue+Math.imul(we,He)|0;var Cr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,ce=Math.imul(ht,Gt),ee=Math.imul(ht,ar),ee=ee+Math.imul(Et,Gt)|0,ue=Math.imul(Et,ar),ce=ce+Math.imul(st,lr)|0,ee=ee+Math.imul(st,ur)|0,ee=ee+Math.imul(rt,lr)|0,ue=ue+Math.imul(rt,ur)|0,ce=ce+Math.imul(Ct,pr)|0,ee=ee+Math.imul(Ct,xr)|0,ee=ee+Math.imul(yt,pr)|0,ue=ue+Math.imul(yt,xr)|0,ce=ce+Math.imul(Xe,At)|0,ee=ee+Math.imul(Xe,kt)|0,ee=ee+Math.imul(Ke,At)|0,ue=ue+Math.imul(Ke,kt)|0,ce=ce+Math.imul(Fe,rr)|0,ee=ee+Math.imul(Fe,nr)|0,ee=ee+Math.imul(Ie,rr)|0,ue=ue+Math.imul(Ie,nr)|0,ce=ce+Math.imul(xe,yr)|0,ee=ee+Math.imul(xe,er)|0,ee=ee+Math.imul(Re,yr)|0,ue=ue+Math.imul(Re,er)|0,ce=ce+Math.imul(ge,Te)|0,ee=ee+Math.imul(ge,je)|0,ee=ee+Math.imul(de,Te)|0,ue=ue+Math.imul(de,je)|0,ce=ce+Math.imul(Ce,be)|0,ee=ee+Math.imul(Ce,He)|0,ee=ee+Math.imul(ke,be)|0,ue=ue+Math.imul(ke,He)|0,ce=ce+Math.imul(ye,ut)|0,ee=ee+Math.imul(ye,tt)|0,ee=ee+Math.imul(we,ut)|0,ue=ue+Math.imul(we,tt)|0;var Ar=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,ce=Math.imul($t,Gt),ee=Math.imul($t,ar),ee=ee+Math.imul(Jt,Gt)|0,ue=Math.imul(Jt,ar),ce=ce+Math.imul(ht,lr)|0,ee=ee+Math.imul(ht,ur)|0,ee=ee+Math.imul(Et,lr)|0,ue=ue+Math.imul(Et,ur)|0,ce=ce+Math.imul(st,pr)|0,ee=ee+Math.imul(st,xr)|0,ee=ee+Math.imul(rt,pr)|0,ue=ue+Math.imul(rt,xr)|0,ce=ce+Math.imul(Ct,At)|0,ee=ee+Math.imul(Ct,kt)|0,ee=ee+Math.imul(yt,At)|0,ue=ue+Math.imul(yt,kt)|0,ce=ce+Math.imul(Xe,rr)|0,ee=ee+Math.imul(Xe,nr)|0,ee=ee+Math.imul(Ke,rr)|0,ue=ue+Math.imul(Ke,nr)|0,ce=ce+Math.imul(Fe,yr)|0,ee=ee+Math.imul(Fe,er)|0,ee=ee+Math.imul(Ie,yr)|0,ue=ue+Math.imul(Ie,er)|0,ce=ce+Math.imul(xe,Te)|0,ee=ee+Math.imul(xe,je)|0,ee=ee+Math.imul(Re,Te)|0,ue=ue+Math.imul(Re,je)|0,ce=ce+Math.imul(ge,be)|0,ee=ee+Math.imul(ge,He)|0,ee=ee+Math.imul(de,be)|0,ue=ue+Math.imul(de,He)|0,ce=ce+Math.imul(Ce,ut)|0,ee=ee+Math.imul(Ce,tt)|0,ee=ee+Math.imul(ke,ut)|0,ue=ue+Math.imul(ke,tt)|0,ce=ce+Math.imul(ye,Nt)|0,ee=ee+Math.imul(ye,jt)|0,ee=ee+Math.imul(we,Nt)|0,ue=ue+Math.imul(we,jt)|0;var vr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(vr>>>26)|0,vr&=67108863,ce=Math.imul($t,lr),ee=Math.imul($t,ur),ee=ee+Math.imul(Jt,lr)|0,ue=Math.imul(Jt,ur),ce=ce+Math.imul(ht,pr)|0,ee=ee+Math.imul(ht,xr)|0,ee=ee+Math.imul(Et,pr)|0,ue=ue+Math.imul(Et,xr)|0,ce=ce+Math.imul(st,At)|0,ee=ee+Math.imul(st,kt)|0,ee=ee+Math.imul(rt,At)|0,ue=ue+Math.imul(rt,kt)|0,ce=ce+Math.imul(Ct,rr)|0,ee=ee+Math.imul(Ct,nr)|0,ee=ee+Math.imul(yt,rr)|0,ue=ue+Math.imul(yt,nr)|0,ce=ce+Math.imul(Xe,yr)|0,ee=ee+Math.imul(Xe,er)|0,ee=ee+Math.imul(Ke,yr)|0,ue=ue+Math.imul(Ke,er)|0,ce=ce+Math.imul(Fe,Te)|0,ee=ee+Math.imul(Fe,je)|0,ee=ee+Math.imul(Ie,Te)|0,ue=ue+Math.imul(Ie,je)|0,ce=ce+Math.imul(xe,be)|0,ee=ee+Math.imul(xe,He)|0,ee=ee+Math.imul(Re,be)|0,ue=ue+Math.imul(Re,He)|0,ce=ce+Math.imul(ge,ut)|0,ee=ee+Math.imul(ge,tt)|0,ee=ee+Math.imul(de,ut)|0,ue=ue+Math.imul(de,tt)|0,ce=ce+Math.imul(Ce,Nt)|0,ee=ee+Math.imul(Ce,jt)|0,ee=ee+Math.imul(ke,Nt)|0,ue=ue+Math.imul(ke,jt)|0;var qt=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(qt>>>26)|0,qt&=67108863,ce=Math.imul($t,pr),ee=Math.imul($t,xr),ee=ee+Math.imul(Jt,pr)|0,ue=Math.imul(Jt,xr),ce=ce+Math.imul(ht,At)|0,ee=ee+Math.imul(ht,kt)|0,ee=ee+Math.imul(Et,At)|0,ue=ue+Math.imul(Et,kt)|0,ce=ce+Math.imul(st,rr)|0,ee=ee+Math.imul(st,nr)|0,ee=ee+Math.imul(rt,rr)|0,ue=ue+Math.imul(rt,nr)|0,ce=ce+Math.imul(Ct,yr)|0,ee=ee+Math.imul(Ct,er)|0,ee=ee+Math.imul(yt,yr)|0,ue=ue+Math.imul(yt,er)|0,ce=ce+Math.imul(Xe,Te)|0,ee=ee+Math.imul(Xe,je)|0,ee=ee+Math.imul(Ke,Te)|0,ue=ue+Math.imul(Ke,je)|0,ce=ce+Math.imul(Fe,be)|0,ee=ee+Math.imul(Fe,He)|0,ee=ee+Math.imul(Ie,be)|0,ue=ue+Math.imul(Ie,He)|0,ce=ce+Math.imul(xe,ut)|0,ee=ee+Math.imul(xe,tt)|0,ee=ee+Math.imul(Re,ut)|0,ue=ue+Math.imul(Re,tt)|0,ce=ce+Math.imul(ge,Nt)|0,ee=ee+Math.imul(ge,jt)|0,ee=ee+Math.imul(de,Nt)|0,ue=ue+Math.imul(de,jt)|0;var cr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(cr>>>26)|0,cr&=67108863,ce=Math.imul($t,At),ee=Math.imul($t,kt),ee=ee+Math.imul(Jt,At)|0,ue=Math.imul(Jt,kt),ce=ce+Math.imul(ht,rr)|0,ee=ee+Math.imul(ht,nr)|0,ee=ee+Math.imul(Et,rr)|0,ue=ue+Math.imul(Et,nr)|0,ce=ce+Math.imul(st,yr)|0,ee=ee+Math.imul(st,er)|0,ee=ee+Math.imul(rt,yr)|0,ue=ue+Math.imul(rt,er)|0,ce=ce+Math.imul(Ct,Te)|0,ee=ee+Math.imul(Ct,je)|0,ee=ee+Math.imul(yt,Te)|0,ue=ue+Math.imul(yt,je)|0,ce=ce+Math.imul(Xe,be)|0,ee=ee+Math.imul(Xe,He)|0,ee=ee+Math.imul(Ke,be)|0,ue=ue+Math.imul(Ke,He)|0,ce=ce+Math.imul(Fe,ut)|0,ee=ee+Math.imul(Fe,tt)|0,ee=ee+Math.imul(Ie,ut)|0,ue=ue+Math.imul(Ie,tt)|0,ce=ce+Math.imul(xe,Nt)|0,ee=ee+Math.imul(xe,jt)|0,ee=ee+Math.imul(Re,Nt)|0,ue=ue+Math.imul(Re,jt)|0;var br=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(br>>>26)|0,br&=67108863,ce=Math.imul($t,rr),ee=Math.imul($t,nr),ee=ee+Math.imul(Jt,rr)|0,ue=Math.imul(Jt,nr),ce=ce+Math.imul(ht,yr)|0,ee=ee+Math.imul(ht,er)|0,ee=ee+Math.imul(Et,yr)|0,ue=ue+Math.imul(Et,er)|0,ce=ce+Math.imul(st,Te)|0,ee=ee+Math.imul(st,je)|0,ee=ee+Math.imul(rt,Te)|0,ue=ue+Math.imul(rt,je)|0,ce=ce+Math.imul(Ct,be)|0,ee=ee+Math.imul(Ct,He)|0,ee=ee+Math.imul(yt,be)|0,ue=ue+Math.imul(yt,He)|0,ce=ce+Math.imul(Xe,ut)|0,ee=ee+Math.imul(Xe,tt)|0,ee=ee+Math.imul(Ke,ut)|0,ue=ue+Math.imul(Ke,tt)|0,ce=ce+Math.imul(Fe,Nt)|0,ee=ee+Math.imul(Fe,jt)|0,ee=ee+Math.imul(Ie,Nt)|0,ue=ue+Math.imul(Ie,jt)|0;var gr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(gr>>>26)|0,gr&=67108863,ce=Math.imul($t,yr),ee=Math.imul($t,er),ee=ee+Math.imul(Jt,yr)|0,ue=Math.imul(Jt,er),ce=ce+Math.imul(ht,Te)|0,ee=ee+Math.imul(ht,je)|0,ee=ee+Math.imul(Et,Te)|0,ue=ue+Math.imul(Et,je)|0,ce=ce+Math.imul(st,be)|0,ee=ee+Math.imul(st,He)|0,ee=ee+Math.imul(rt,be)|0,ue=ue+Math.imul(rt,He)|0,ce=ce+Math.imul(Ct,ut)|0,ee=ee+Math.imul(Ct,tt)|0,ee=ee+Math.imul(yt,ut)|0,ue=ue+Math.imul(yt,tt)|0,ce=ce+Math.imul(Xe,Nt)|0,ee=ee+Math.imul(Xe,jt)|0,ee=ee+Math.imul(Ke,Nt)|0,ue=ue+Math.imul(Ke,jt)|0;var dt=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(dt>>>26)|0,dt&=67108863,ce=Math.imul($t,Te),ee=Math.imul($t,je),ee=ee+Math.imul(Jt,Te)|0,ue=Math.imul(Jt,je),ce=ce+Math.imul(ht,be)|0,ee=ee+Math.imul(ht,He)|0,ee=ee+Math.imul(Et,be)|0,ue=ue+Math.imul(Et,He)|0,ce=ce+Math.imul(st,ut)|0,ee=ee+Math.imul(st,tt)|0,ee=ee+Math.imul(rt,ut)|0,ue=ue+Math.imul(rt,tt)|0,ce=ce+Math.imul(Ct,Nt)|0,ee=ee+Math.imul(Ct,jt)|0,ee=ee+Math.imul(yt,Nt)|0,ue=ue+Math.imul(yt,jt)|0;var It=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(It>>>26)|0,It&=67108863,ce=Math.imul($t,be),ee=Math.imul($t,He),ee=ee+Math.imul(Jt,be)|0,ue=Math.imul(Jt,He),ce=ce+Math.imul(ht,ut)|0,ee=ee+Math.imul(ht,tt)|0,ee=ee+Math.imul(Et,ut)|0,ue=ue+Math.imul(Et,tt)|0,ce=ce+Math.imul(st,Nt)|0,ee=ee+Math.imul(st,jt)|0,ee=ee+Math.imul(rt,Nt)|0,ue=ue+Math.imul(rt,jt)|0;var St=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(St>>>26)|0,St&=67108863,ce=Math.imul($t,ut),ee=Math.imul($t,tt),ee=ee+Math.imul(Jt,ut)|0,ue=Math.imul(Jt,tt),ce=ce+Math.imul(ht,Nt)|0,ee=ee+Math.imul(ht,jt)|0,ee=ee+Math.imul(Et,Nt)|0,ue=ue+Math.imul(Et,jt)|0;var tr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(tr>>>26)|0,tr&=67108863,ce=Math.imul($t,Nt),ee=Math.imul($t,jt),ee=ee+Math.imul(Jt,Nt)|0,ue=Math.imul(Jt,jt);var Lt=(pe+ce|0)+((ee&8191)<<13)|0;return pe=(ue+(ee>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,se[0]=Ir,se[1]=Ut,se[2]=ot,se[3]=Bt,se[4]=Ht,se[5]=_r,se[6]=Er,se[7]=Cr,se[8]=Ar,se[9]=vr,se[10]=qt,se[11]=cr,se[12]=br,se[13]=gr,se[14]=dt,se[15]=It,se[16]=St,se[17]=tr,se[18]=Lt,pe!==0&&(se[19]=pe,ne.length++),ne};Math.imul||(oe=X);function ae(fe,W,Q){Q.negative=W.negative^fe.negative,Q.length=fe.length+W.length;for(var ne=0,ie=0,te=0;te<Q.length-1;te++){var se=ie;ie=0;for(var pe=ne&67108863,ce=Math.min(te,W.length-1),ee=Math.max(0,te-fe.length+1);ee<=ce;ee++){var ue=te-ee,Oe=fe.words[ue]|0,ye=W.words[ee]|0,we=Oe*ye,_e=we&67108863;se=se+(we/67108864|0)|0,_e=_e+pe|0,pe=_e&67108863,se=se+(_e>>>26)|0,ie+=se>>>26,se&=67108863}Q.words[te]=pe,ne=se,se=ie}return ne!==0?Q.words[te]=ne:Q.length--,Q._strip()}function le(fe,W,Q){return ae(fe,W,Q)}D.prototype.mulTo=function(W,Q){var ne,ie=this.length+W.length;return this.length===10&&W.length===10?ne=oe(this,W,Q):ie<63?ne=X(this,W,Q):ie<1024?ne=ae(this,W,Q):ne=le(this,W,Q),ne},D.prototype.mul=function(W){var Q=new D(null);return Q.words=new Array(this.length+W.length),this.mulTo(W,Q)},D.prototype.mulf=function(W){var Q=new D(null);return Q.words=new Array(this.length+W.length),le(this,W,Q)},D.prototype.imul=function(W){return this.clone().mulTo(W,this)},D.prototype.imuln=function(W){var Q=W<0;Q&&(W=-W),I(typeof W=="number"),I(W<67108864);for(var ne=0,ie=0;ie<this.length;ie++){var te=(this.words[ie]|0)*W,se=(te&67108863)+(ne&67108863);ne>>=26,ne+=te/67108864|0,ne+=se>>>26,this.words[ie]=se&67108863}return ne!==0&&(this.words[ie]=ne,this.length++),Q?this.ineg():this},D.prototype.muln=function(W){return this.clone().imuln(W)},D.prototype.sqr=function(){return this.mul(this)},D.prototype.isqr=function(){return this.imul(this.clone())},D.prototype.pow=function(W){var Q=J(W);if(Q.length===0)return new D(1);for(var ne=this,ie=0;ie<Q.length&&Q[ie]===0;ie++,ne=ne.sqr());if(++ie<Q.length)for(var te=ne.sqr();ie<Q.length;ie++,te=te.sqr())Q[ie]!==0&&(ne=ne.mul(te));return ne},D.prototype.iushln=function(W){I(typeof W=="number"&&W>=0);var Q=W%26,ne=(W-Q)/26,ie=67108863>>>26-Q<<26-Q,te;if(Q!==0){var se=0;for(te=0;te<this.length;te++){var pe=this.words[te]&ie,ce=(this.words[te]|0)-pe<<Q;this.words[te]=ce|se,se=pe>>>26-Q}se&&(this.words[te]=se,this.length++)}if(ne!==0){for(te=this.length-1;te>=0;te--)this.words[te+ne]=this.words[te];for(te=0;te<ne;te++)this.words[te]=0;this.length+=ne}return this._strip()},D.prototype.ishln=function(W){return I(this.negative===0),this.iushln(W)},D.prototype.iushrn=function(W,Q,ne){I(typeof W=="number"&&W>=0);var ie;Q?ie=(Q-Q%26)/26:ie=0;var te=W%26,se=Math.min((W-te)/26,this.length),pe=67108863^67108863>>>te<<te,ce=ne;if(ie-=se,ie=Math.max(0,ie),ce){for(var ee=0;ee<se;ee++)ce.words[ee]=this.words[ee];ce.length=se}if(se!==0)if(this.length>se)for(this.length-=se,ee=0;ee<this.length;ee++)this.words[ee]=this.words[ee+se];else this.words[0]=0,this.length=1;var ue=0;for(ee=this.length-1;ee>=0&&(ue!==0||ee>=ie);ee--){var Oe=this.words[ee]|0;this.words[ee]=ue<<26-te|Oe>>>te,ue=Oe&pe}return ce&&ue!==0&&(ce.words[ce.length++]=ue),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},D.prototype.ishrn=function(W,Q,ne){return I(this.negative===0),this.iushrn(W,Q,ne)},D.prototype.shln=function(W){return this.clone().ishln(W)},D.prototype.ushln=function(W){return this.clone().iushln(W)},D.prototype.shrn=function(W){return this.clone().ishrn(W)},D.prototype.ushrn=function(W){return this.clone().iushrn(W)},D.prototype.testn=function(W){I(typeof W=="number"&&W>=0);var Q=W%26,ne=(W-Q)/26,ie=1<<Q;if(this.length<=ne)return!1;var te=this.words[ne];return!!(te&ie)},D.prototype.imaskn=function(W){I(typeof W=="number"&&W>=0);var Q=W%26,ne=(W-Q)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=ne)return this;if(Q!==0&&ne++,this.length=Math.min(ne,this.length),Q!==0){var ie=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=ie}return this._strip()},D.prototype.maskn=function(W){return this.clone().imaskn(W)},D.prototype.iaddn=function(W){return I(typeof W=="number"),I(W<67108864),W<0?this.isubn(-W):this.negative!==0?this.length===1&&(this.words[0]|0)<=W?(this.words[0]=W-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(W),this.negative=1,this):this._iaddn(W)},D.prototype._iaddn=function(W){this.words[0]+=W;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},D.prototype.isubn=function(W){if(I(typeof W=="number"),I(W<67108864),W<0)return this.iaddn(-W);if(this.negative!==0)return this.negative=0,this.iaddn(W),this.negative=1,this;if(this.words[0]-=W,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this._strip()},D.prototype.addn=function(W){return this.clone().iaddn(W)},D.prototype.subn=function(W){return this.clone().isubn(W)},D.prototype.iabs=function(){return this.negative=0,this},D.prototype.abs=function(){return this.clone().iabs()},D.prototype._ishlnsubmul=function(W,Q,ne){var ie=W.length+ne,te;this._expand(ie);var se,pe=0;for(te=0;te<W.length;te++){se=(this.words[te+ne]|0)+pe;var ce=(W.words[te]|0)*Q;se-=ce&67108863,pe=(se>>26)-(ce/67108864|0),this.words[te+ne]=se&67108863}for(;te<this.length-ne;te++)se=(this.words[te+ne]|0)+pe,pe=se>>26,this.words[te+ne]=se&67108863;if(pe===0)return this._strip();for(I(pe===-1),pe=0,te=0;te<this.length;te++)se=-(this.words[te]|0)+pe,pe=se>>26,this.words[te]=se&67108863;return this.negative=1,this._strip()},D.prototype._wordDiv=function(W,Q){var ne=this.length-W.length,ie=this.clone(),te=W,se=te.words[te.length-1]|0,pe=this._countBits(se);ne=26-pe,ne!==0&&(te=te.ushln(ne),ie.iushln(ne),se=te.words[te.length-1]|0);var ce=ie.length-te.length,ee;if(Q!=="mod"){ee=new D(null),ee.length=ce+1,ee.words=new Array(ee.length);for(var ue=0;ue<ee.length;ue++)ee.words[ue]=0}var Oe=ie.clone()._ishlnsubmul(te,1,ce);Oe.negative===0&&(ie=Oe,ee&&(ee.words[ce]=1));for(var ye=ce-1;ye>=0;ye--){var we=(ie.words[te.length+ye]|0)*67108864+(ie.words[te.length+ye-1]|0);for(we=Math.min(we/se|0,67108863),ie._ishlnsubmul(te,we,ye);ie.negative!==0;)we--,ie.negative=0,ie._ishlnsubmul(te,1,ye),ie.isZero()||(ie.negative^=1);ee&&(ee.words[ye]=we)}return ee&&ee._strip(),ie._strip(),Q!=="div"&&ne!==0&&ie.iushrn(ne),{div:ee||null,mod:ie}},D.prototype.divmod=function(W,Q,ne){if(I(!W.isZero()),this.isZero())return{div:new D(0),mod:new D(0)};var ie,te,se;return this.negative!==0&&W.negative===0?(se=this.neg().divmod(W,Q),Q!=="mod"&&(ie=se.div.neg()),Q!=="div"&&(te=se.mod.neg(),ne&&te.negative!==0&&te.iadd(W)),{div:ie,mod:te}):this.negative===0&&W.negative!==0?(se=this.divmod(W.neg(),Q),Q!=="mod"&&(ie=se.div.neg()),{div:ie,mod:se.mod}):this.negative&W.negative?(se=this.neg().divmod(W.neg(),Q),Q!=="div"&&(te=se.mod.neg(),ne&&te.negative!==0&&te.isub(W)),{div:se.div,mod:te}):W.length>this.length||this.cmp(W)<0?{div:new D(0),mod:this}:W.length===1?Q==="div"?{div:this.divn(W.words[0]),mod:null}:Q==="mod"?{div:null,mod:new D(this.modrn(W.words[0]))}:{div:this.divn(W.words[0]),mod:new D(this.modrn(W.words[0]))}:this._wordDiv(W,Q)},D.prototype.div=function(W){return this.divmod(W,"div",!1).div},D.prototype.mod=function(W){return this.divmod(W,"mod",!1).mod},D.prototype.umod=function(W){return this.divmod(W,"mod",!0).mod},D.prototype.divRound=function(W){var Q=this.divmod(W);if(Q.mod.isZero())return Q.div;var ne=Q.div.negative!==0?Q.mod.isub(W):Q.mod,ie=W.ushrn(1),te=W.andln(1),se=ne.cmp(ie);return se<0||te===1&&se===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},D.prototype.modrn=function(W){var Q=W<0;Q&&(W=-W),I(W<=67108863);for(var ne=(1<<26)%W,ie=0,te=this.length-1;te>=0;te--)ie=(ne*ie+(this.words[te]|0))%W;return Q?-ie:ie},D.prototype.modn=function(W){return this.modrn(W)},D.prototype.idivn=function(W){var Q=W<0;Q&&(W=-W),I(W<=67108863);for(var ne=0,ie=this.length-1;ie>=0;ie--){var te=(this.words[ie]|0)+ne*67108864;this.words[ie]=te/W|0,ne=te%W}return this._strip(),Q?this.ineg():this},D.prototype.divn=function(W){return this.clone().idivn(W)},D.prototype.egcd=function(W){I(W.negative===0),I(!W.isZero());var Q=this,ne=W.clone();Q.negative!==0?Q=Q.umod(W):Q=Q.clone();for(var ie=new D(1),te=new D(0),se=new D(0),pe=new D(1),ce=0;Q.isEven()&&ne.isEven();)Q.iushrn(1),ne.iushrn(1),++ce;for(var ee=ne.clone(),ue=Q.clone();!Q.isZero();){for(var Oe=0,ye=1;!(Q.words[0]&ye)&&Oe<26;++Oe,ye<<=1);if(Oe>0)for(Q.iushrn(Oe);Oe-- >0;)(ie.isOdd()||te.isOdd())&&(ie.iadd(ee),te.isub(ue)),ie.iushrn(1),te.iushrn(1);for(var we=0,_e=1;!(ne.words[0]&_e)&&we<26;++we,_e<<=1);if(we>0)for(ne.iushrn(we);we-- >0;)(se.isOdd()||pe.isOdd())&&(se.iadd(ee),pe.isub(ue)),se.iushrn(1),pe.iushrn(1);Q.cmp(ne)>=0?(Q.isub(ne),ie.isub(se),te.isub(pe)):(ne.isub(Q),se.isub(ie),pe.isub(te))}return{a:se,b:pe,gcd:ne.iushln(ce)}},D.prototype._invmp=function(W){I(W.negative===0),I(!W.isZero());var Q=this,ne=W.clone();Q.negative!==0?Q=Q.umod(W):Q=Q.clone();for(var ie=new D(1),te=new D(0),se=ne.clone();Q.cmpn(1)>0&&ne.cmpn(1)>0;){for(var pe=0,ce=1;!(Q.words[0]&ce)&&pe<26;++pe,ce<<=1);if(pe>0)for(Q.iushrn(pe);pe-- >0;)ie.isOdd()&&ie.iadd(se),ie.iushrn(1);for(var ee=0,ue=1;!(ne.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(ne.iushrn(ee);ee-- >0;)te.isOdd()&&te.iadd(se),te.iushrn(1);Q.cmp(ne)>=0?(Q.isub(ne),ie.isub(te)):(ne.isub(Q),te.isub(ie))}var Oe;return Q.cmpn(1)===0?Oe=ie:Oe=te,Oe.cmpn(0)<0&&Oe.iadd(W),Oe},D.prototype.gcd=function(W){if(this.isZero())return W.abs();if(W.isZero())return this.abs();var Q=this.clone(),ne=W.clone();Q.negative=0,ne.negative=0;for(var ie=0;Q.isEven()&&ne.isEven();ie++)Q.iushrn(1),ne.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;ne.isEven();)ne.iushrn(1);var te=Q.cmp(ne);if(te<0){var se=Q;Q=ne,ne=se}else if(te===0||ne.cmpn(1)===0)break;Q.isub(ne)}while(!0);return ne.iushln(ie)},D.prototype.invm=function(W){return this.egcd(W).a.umod(W)},D.prototype.isEven=function(){return(this.words[0]&1)===0},D.prototype.isOdd=function(){return(this.words[0]&1)===1},D.prototype.andln=function(W){return this.words[0]&W},D.prototype.bincn=function(W){I(typeof W=="number");var Q=W%26,ne=(W-Q)/26,ie=1<<Q;if(this.length<=ne)return this._expand(ne+1),this.words[ne]|=ie,this;for(var te=ie,se=ne;te!==0&&se<this.length;se++){var pe=this.words[se]|0;pe+=te,te=pe>>>26,pe&=67108863,this.words[se]=pe}return te!==0&&(this.words[se]=te,this.length++),this},D.prototype.isZero=function(){return this.length===1&&this.words[0]===0},D.prototype.cmpn=function(W){var Q=W<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this._strip();var ne;if(this.length>1)ne=1;else{Q&&(W=-W),I(W<=67108863,"Number is too big");var ie=this.words[0]|0;ne=ie===W?0:ie<W?-1:1}return this.negative!==0?-ne|0:ne},D.prototype.cmp=function(W){if(this.negative!==0&&W.negative===0)return-1;if(this.negative===0&&W.negative!==0)return 1;var Q=this.ucmp(W);return this.negative!==0?-Q|0:Q},D.prototype.ucmp=function(W){if(this.length>W.length)return 1;if(this.length<W.length)return-1;for(var Q=0,ne=this.length-1;ne>=0;ne--){var ie=this.words[ne]|0,te=W.words[ne]|0;if(ie!==te){ie<te?Q=-1:ie>te&&(Q=1);break}}return Q},D.prototype.gtn=function(W){return this.cmpn(W)===1},D.prototype.gt=function(W){return this.cmp(W)===1},D.prototype.gten=function(W){return this.cmpn(W)>=0},D.prototype.gte=function(W){return this.cmp(W)>=0},D.prototype.ltn=function(W){return this.cmpn(W)===-1},D.prototype.lt=function(W){return this.cmp(W)===-1},D.prototype.lten=function(W){return this.cmpn(W)<=0},D.prototype.lte=function(W){return this.cmp(W)<=0},D.prototype.eqn=function(W){return this.cmpn(W)===0},D.prototype.eq=function(W){return this.cmp(W)===0},D.red=function(W){return new Ne(W)},D.prototype.toRed=function(W){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),W.convertTo(this)._forceRed(W)},D.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},D.prototype._forceRed=function(W){return this.red=W,this},D.prototype.forceRed=function(W){return I(!this.red,"Already a number in reduction context"),this._forceRed(W)},D.prototype.redAdd=function(W){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,W)},D.prototype.redIAdd=function(W){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,W)},D.prototype.redSub=function(W){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,W)},D.prototype.redISub=function(W){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,W)},D.prototype.redShl=function(W){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,W)},D.prototype.redMul=function(W){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,W),this.red.mul(this,W)},D.prototype.redIMul=function(W){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,W),this.red.imul(this,W)},D.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},D.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},D.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},D.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},D.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},D.prototype.redPow=function(W){return I(this.red&&!W.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,W)};var he={k256:null,p224:null,p192:null,p25519:null};function me(fe,W){this.name=fe,this.p=new D(W,16),this.n=this.p.bitLength(),this.k=new D(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}me.prototype._tmp=function(){var W=new D(null);return W.words=new Array(Math.ceil(this.n/13)),W},me.prototype.ireduce=function(W){var Q=W,ne;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),ne=Q.bitLength();while(ne>this.n);var ie=ne<this.n?-1:Q.ucmp(this.p);return ie===0?(Q.words[0]=0,Q.length=1):ie>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},me.prototype.split=function(W,Q){W.iushrn(this.n,0,Q)},me.prototype.imulK=function(W){return W.imul(this.k)};function ve(){me.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(ve,me),ve.prototype.split=function(W,Q){for(var ne=4194303,ie=Math.min(W.length,9),te=0;te<ie;te++)Q.words[te]=W.words[te];if(Q.length=ie,W.length<=9){W.words[0]=0,W.length=1;return}var se=W.words[9];for(Q.words[Q.length++]=se&ne,te=10;te<W.length;te++){var pe=W.words[te]|0;W.words[te-10]=(pe&ne)<<4|se>>>22,se=pe}se>>>=22,W.words[te-10]=se,se===0&&W.length>10?W.length-=10:W.length-=9},ve.prototype.imulK=function(W){W.words[W.length]=0,W.words[W.length+1]=0,W.length+=2;for(var Q=0,ne=0;ne<W.length;ne++){var ie=W.words[ne]|0;Q+=ie*977,W.words[ne]=Q&67108863,Q=ie*64+(Q/67108864|0)}return W.words[W.length-1]===0&&(W.length--,W.words[W.length-1]===0&&W.length--),W};function Se(){me.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(Se,me);function Pe(){me.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(Pe,me);function Ve(){me.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(Ve,me),Ve.prototype.imulK=function(W){for(var Q=0,ne=0;ne<W.length;ne++){var ie=(W.words[ne]|0)*19+Q,te=ie&67108863;ie>>>=26,W.words[ne]=te,Q=ie}return Q!==0&&(W.words[W.length++]=Q),W},D._prime=function(W){if(he[W])return he[W];var Q;if(W==="k256")Q=new ve;else if(W==="p224")Q=new Se;else if(W==="p192")Q=new Pe;else if(W==="p25519")Q=new Ve;else throw new Error("Unknown prime "+W);return he[W]=Q,Q};function Ne(fe){if(typeof fe=="string"){var W=D._prime(fe);this.m=W.p,this.prime=W}else I(fe.gtn(1),"modulus must be greater than 1"),this.m=fe,this.prime=null}Ne.prototype._verify1=function(W){I(W.negative===0,"red works only with positives"),I(W.red,"red works only with red numbers")},Ne.prototype._verify2=function(W,Q){I((W.negative|Q.negative)===0,"red works only with positives"),I(W.red&&W.red===Q.red,"red works only with red numbers")},Ne.prototype.imod=function(W){return this.prime?this.prime.ireduce(W)._forceRed(this):(V(W,W.umod(this.m)._forceRed(this)),W)},Ne.prototype.neg=function(W){return W.isZero()?W.clone():this.m.sub(W)._forceRed(this)},Ne.prototype.add=function(W,Q){this._verify2(W,Q);var ne=W.add(Q);return ne.cmp(this.m)>=0&&ne.isub(this.m),ne._forceRed(this)},Ne.prototype.iadd=function(W,Q){this._verify2(W,Q);var ne=W.iadd(Q);return ne.cmp(this.m)>=0&&ne.isub(this.m),ne},Ne.prototype.sub=function(W,Q){this._verify2(W,Q);var ne=W.sub(Q);return ne.cmpn(0)<0&&ne.iadd(this.m),ne._forceRed(this)},Ne.prototype.isub=function(W,Q){this._verify2(W,Q);var ne=W.isub(Q);return ne.cmpn(0)<0&&ne.iadd(this.m),ne},Ne.prototype.shl=function(W,Q){return this._verify1(W),this.imod(W.ushln(Q))},Ne.prototype.imul=function(W,Q){return this._verify2(W,Q),this.imod(W.imul(Q))},Ne.prototype.mul=function(W,Q){return this._verify2(W,Q),this.imod(W.mul(Q))},Ne.prototype.isqr=function(W){return this.imul(W,W.clone())},Ne.prototype.sqr=function(W){return this.mul(W,W)},Ne.prototype.sqrt=function(W){if(W.isZero())return W.clone();var Q=this.m.andln(3);if(I(Q%2===1),Q===3){var ne=this.m.add(new D(1)).iushrn(2);return this.pow(W,ne)}for(var ie=this.m.subn(1),te=0;!ie.isZero()&&ie.andln(1)===0;)te++,ie.iushrn(1);I(!ie.isZero());var se=new D(1).toRed(this),pe=se.redNeg(),ce=this.m.subn(1).iushrn(1),ee=this.m.bitLength();for(ee=new D(2*ee*ee).toRed(this);this.pow(ee,ce).cmp(pe)!==0;)ee.redIAdd(pe);for(var ue=this.pow(ee,ie),Oe=this.pow(W,ie.addn(1).iushrn(1)),ye=this.pow(W,ie),we=te;ye.cmp(se)!==0;){for(var _e=ye,Ce=0;_e.cmp(se)!==0;Ce++)_e=_e.redSqr();I(Ce<we);var ke=this.pow(ue,new D(1).iushln(we-Ce-1));Oe=Oe.redMul(ke),ue=ke.redSqr(),ye=ye.redMul(ue),we=Ce}return Oe},Ne.prototype.invm=function(W){var Q=W._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},Ne.prototype.pow=function(W,Q){if(Q.isZero())return new D(1).toRed(this);if(Q.cmpn(1)===0)return W.clone();var ne=4,ie=new Array(1<<ne);ie[0]=new D(1).toRed(this),ie[1]=W;for(var te=2;te<ie.length;te++)ie[te]=this.mul(ie[te-1],W);var se=ie[0],pe=0,ce=0,ee=Q.bitLength()%26;for(ee===0&&(ee=26),te=Q.length-1;te>=0;te--){for(var ue=Q.words[te],Oe=ee-1;Oe>=0;Oe--){var ye=ue>>Oe&1;if(se!==ie[0]&&(se=this.sqr(se)),ye===0&&pe===0){ce=0;continue}pe<<=1,pe|=ye,ce++,!(ce!==ne&&(te!==0||Oe!==0))&&(se=this.mul(se,ie[pe]),ce=0,pe=0)}ee=26}return se},Ne.prototype.convertTo=function(W){var Q=W.umod(this.m);return Q===W?Q.clone():Q},Ne.prototype.convertFrom=function(W){var Q=W.clone();return Q.red=null,Q},D.mont=function(W){return new ze(W)};function ze(fe){Ne.call(this,fe),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new D(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(ze,Ne),ze.prototype.convertTo=function(W){return this.imod(W.ushln(this.shift))},ze.prototype.convertFrom=function(W){var Q=this.imod(W.mul(this.rinv));return Q.red=null,Q},ze.prototype.imul=function(W,Q){if(W.isZero()||Q.isZero())return W.words[0]=0,W.length=1,W;var ne=W.imul(Q),ie=ne.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=ne.isub(ie).iushrn(this.shift),se=te;return te.cmp(this.m)>=0?se=te.isub(this.m):te.cmpn(0)<0&&(se=te.iadd(this.m)),se._forceRed(this)},ze.prototype.mul=function(W,Q){if(W.isZero()||Q.isZero())return new D(0)._forceRed(this);var ne=W.mul(Q),ie=ne.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=ne.isub(ie).iushrn(this.shift),se=te;return te.cmp(this.m)>=0?se=te.isub(this.m):te.cmpn(0)<0&&(se=te.iadd(this.m)),se._forceRed(this)},ze.prototype.invm=function(W){var Q=this.imod(W._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(_,commonjsGlobal)})(bn$2);var bnExports=bn$2.exports,utf8={};/*! https://mths.be/utf8js v3.0.0 by @mathias */(function(_){(function(C){var T=String.fromCharCode;function I(Y){for(var J=[],X=0,oe=Y.length,ae,le;X<oe;)ae=Y.charCodeAt(X++),ae>=55296&&ae<=56319&&X<oe?(le=Y.charCodeAt(X++),(le&64512)==56320?J.push(((ae&1023)<<10)+(le&1023)+65536):(J.push(ae),X--)):J.push(ae);return J}function M(Y){for(var J=Y.length,X=-1,oe,ae="";++X<J;)oe=Y[X],oe>65535&&(oe-=65536,ae+=T(oe>>>10&1023|55296),oe=56320|oe&1023),ae+=T(oe);return ae}function D(Y){if(Y>=55296&&Y<=57343)throw Error("Lone surrogate U+"+Y.toString(16).toUpperCase()+" is not a scalar value")}function L(Y,J){return T(Y>>J&63|128)}function B(Y){if(!(Y&4294967168))return T(Y);var J="";return Y&4294965248?Y&4294901760?Y&4292870144||(J=T(Y>>18&7|240),J+=L(Y,12),J+=L(Y,6)):(D(Y),J=T(Y>>12&15|224),J+=L(Y,6)):J=T(Y>>6&31|192),J+=T(Y&63|128),J}function N(Y){for(var J=I(Y),X=J.length,oe=-1,ae,le="";++oe<X;)ae=J[oe],le+=B(ae);return le}function F(){if(G>=H)throw Error("Invalid byte index");var Y=U[G]&255;if(G++,(Y&192)==128)return Y&63;throw Error("Invalid continuation byte")}function V(){var Y,J,X,oe,ae;if(G>H)throw Error("Invalid byte index");if(G==H)return!1;if(Y=U[G]&255,G++,!(Y&128))return Y;if((Y&224)==192){if(J=F(),ae=(Y&31)<<6|J,ae>=128)return ae;throw Error("Invalid continuation byte")}if((Y&240)==224){if(J=F(),X=F(),ae=(Y&15)<<12|J<<6|X,ae>=2048)return D(ae),ae;throw Error("Invalid continuation byte")}if((Y&248)==240&&(J=F(),X=F(),oe=F(),ae=(Y&7)<<18|J<<12|X<<6|oe,ae>=65536&&ae<=1114111))return ae;throw Error("Invalid UTF-8 detected")}var U,H,G;function Z(Y){U=I(Y),H=U.length,G=0;for(var J=[],X;(X=V())!==!1;)J.push(X);return M(J)}C.version="3.0.0",C.encode=N,C.decode=Z})(_)})(utf8);(function(_){var C=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(Ie,De,Xe,Ke){Ke===void 0&&(Ke=Xe);var pt=Object.getOwnPropertyDescriptor(De,Xe);(!pt||("get"in pt?!De.__esModule:pt.writable||pt.configurable))&&(pt={enumerable:!0,get:function(){return De[Xe]}}),Object.defineProperty(Ie,Ke,pt)}:function(Ie,De,Xe,Ke){Ke===void 0&&(Ke=Xe),Ie[Ke]=De[Xe]}),T=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(Ie,De){Object.defineProperty(Ie,"default",{enumerable:!0,value:De})}:function(Ie,De){Ie.default=De}),I=commonjsGlobal&&commonjsGlobal.__importStar||function(Ie){if(Ie&&Ie.__esModule)return Ie;var De={};if(Ie!=null)for(var Xe in Ie)Xe!=="default"&&Object.prototype.hasOwnProperty.call(Ie,Xe)&&C(De,Ie,Xe);return T(De,Ie),De},M=commonjsGlobal&&commonjsGlobal.__importDefault||function(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}};Object.defineProperty(_,"__esModule",{value:!0}),_.fromTokenToUnit=_.fromUnitToToken=_.numberToString=_.toHex=_.hexToBytes=_.bytesToHex=_.numberToHex=_.hexToNumber=_.hexToUtf8=_.utf8ToHex=_.toBN=_.isHex=_.isHexStrict=_.isBigNumber=_.isBN=_.stripHexPrefix=_.isHexPrefixed=_.numberToBN=_.rightPad=_.leftPad=_.BN=_.isBase58btc=void 0,_.isUint8Array=ye,_.UUID=we,_.isUUID=_e,_.toUint8Array=Ce,_.toBuffer=ke,_.toBase58=Le,_.fromBase58=ge,_.toBase64=de,_.fromBase64=Ee,_.toAddress=xe,_.toDid=Re,_.isSameDid=We,_.formatTxType=Fe;const D=M(isBoolean_1),L=M(isString_1),B=M(isNumber_1),N=M(isObject_1),F=M(upperFirst_1$1),V=M(camelCase_1),U=M(isNull_1),H=M(padEnd_1);_.rightPad=H.default;const G=M(padStart_1$1);_.leftPad=G.default;const Z=M(bs58),Y=M(base64Url),J=M(bnExports);_.BN=J.default;const X=I(utf8),oe="did:abt:",ae=new J.default(0),le=new J.default(-1),he={encode:Ie=>`z${Z.default.encode(Ie)}`,decode:Ie=>Z.default.decode(Ie.slice(1))},me=Ie=>{if(typeof Ie!="string")return!1;if(Ie[0]==="z")try{return he.decode(Ie),!0}catch{return!1}return!1};_.isBase58btc=me;const ve=Ie=>{if(typeof Ie=="string"||typeof Ie=="number"){let De=new J.default(1);const Xe=String(Ie).toLowerCase().trim(),Ke=Xe.substr(0,2)==="0x"||Xe.substr(0,3)==="-0x";let pt=(0,_.stripHexPrefix)(Xe);if(pt.substr(0,1)==="-"&&(pt=(0,_.stripHexPrefix)(pt.slice(1)),De=new J.default(-1,10)),pt=pt===""?"0":pt,!pt.match(/^-?[0-9]+$/)&&pt.match(/^[0-9A-Fa-f]+$/)||pt.match(/^[a-fA-F]+$/)||Ke===!0&&pt.match(/^[0-9A-Fa-f]+$/))return new J.default(pt,16).mul(De);if((pt.match(/^-?[0-9]+$/)||pt==="")&&Ke===!1)return new J.default(pt,10).mul(De)}if((0,_.isBN)(Ie))return new J.default(Ie.toString(10),10);throw new Error(`[number-to-bn] while converting number ${JSON.stringify(Ie)} to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.`)};_.numberToBN=ve;const Se=Ie=>{if(typeof Ie!="string")throw new Error("[is-hex-prefixed] value must be type string");return Ie.slice(0,2).toLowerCase()==="0x"};_.isHexPrefixed=Se;const Pe=Ie=>typeof Ie=="string"&&(0,_.isHexPrefixed)(Ie)?Ie.slice(2):Ie;_.stripHexPrefix=Pe;const Ve=Ie=>Ie instanceof J.default||Ie&&Ie.constructor&&Ie.constructor.name==="BN";_.isBN=Ve;const Ne=Ie=>Ie&&Ie.constructor&&Ie.constructor.name==="BigNumber";_.isBigNumber=Ne;const ze=Ie=>((0,L.default)(Ie)||(0,B.default)(Ie))&&/^(-)?0x[0-9a-f]*$/i.test(Ie);_.isHexStrict=ze;const fe=Ie=>((0,L.default)(Ie)||(0,B.default)(Ie))&&/^(-0x|0x|0X|-0X)?[0-9a-f]*$/i.test(Ie);_.isHex=fe;const W=(Ie,De=10)=>{try{if(typeof Ie=="number"&&Ie>0){const Xe=Number(Ie).toLocaleString("fullwide",{useGrouping:!1});return new J.default(Xe,De)}return(0,_.numberToBN)(Ie)}catch(Xe){throw new Error(`${Xe} Given value: "${Ie}"`)}};_.toBN=W;const Q=Ie=>{Ie=X.encode(Ie);let De="";Ie=Ie.replace(/^(?:\u0000)*/,""),Ie=Ie.split("").reverse().join(""),Ie=Ie.replace(/^(?:\u0000)*/,""),Ie=Ie.split("").reverse().join("");for(let Xe=0;Xe<Ie.length;Xe++){const pt=Ie.charCodeAt(Xe).toString(16);De+=pt.length<2?`0${pt}`:pt}return`0x${De}`};_.utf8ToHex=Q;const ne=Ie=>{if(!(0,_.isHexStrict)(Ie))throw new Error(`The parameter "${Ie}" must be a valid HEX string.`);let De="",Xe=0;Ie=Ie.replace(/^0x/i,""),Ie=Ie.replace(/^(?:00)*/,""),Ie=Ie.split("").reverse().join(""),Ie=Ie.replace(/^(?:00)*/,""),Ie=Ie.split("").reverse().join("");const Ke=Ie.length;for(let pt=0;pt<Ke;pt+=2)Xe=parseInt(Ie.substr(pt,2),16),De+=String.fromCharCode(Xe);return X.decode(De)};_.hexToUtf8=ne;const ie=Ie=>Ie?(0,_.toBN)(Ie).toNumber():0;_.hexToNumber=ie;const te=Ie=>{if((0,U.default)(Ie)||typeof Ie>"u")return Ie;if(!isFinite(Ie)&&!(0,_.isHex)(Ie))throw new Error(`Given input "${Ie}" is not a number.`);const De=(0,_.toBN)(Ie),Xe=De.toString(16);return De.lt(new J.default(0))?`-0x${Xe.substr(1)}`:`0x${Xe}`};_.numberToHex=te;const se=Ie=>{const De=[];for(let Xe=0;Xe<Ie.length;Xe++)De.push((Ie[Xe]>>>4).toString(16)),De.push((Ie[Xe]&15).toString(16));return`0x${De.join("")}`};_.bytesToHex=se;const pe=Ie=>{if(Ie=Ie.toString(16),!(0,_.isHex)(Ie))throw new Error(`Given value "${Ie}" is not a valid hex string.`);Ie=Ie.replace(/^0x/i,""),Ie=Ie.length%2?`0${Ie}`:Ie;const De=[];for(let Xe=0;Xe<Ie.length;Xe+=2)De.push(parseInt(Ie.substr(Xe,2),16));return De};_.hexToBytes=pe;const ce=(Ie,De=!1)=>ye(Ie)||Buffer$3.isBuffer(Ie)?De?"bytes":(0,_.bytesToHex)(Ie):(0,_.isBase58btc)(Ie)?De?"bytes":(0,_.bytesToHex)(he.decode(Ie)):(0,D.default)(Ie)?De?"bool":Ie?"0x01":"0x00":(0,N.default)(Ie)&&!(0,_.isBigNumber)(Ie)&&!(0,_.isBN)(Ie)?De?"string":(0,_.utf8ToHex)(JSON.stringify(Ie)):typeof Ie=="string"?Ie.indexOf("-0x")===0||Ie.indexOf("-0X")===0?De?"int256":(0,_.numberToHex)(Ie):Ie.indexOf("0x")===0||Ie.indexOf("0X")===0?De?"bytes":Ie:De?"string":(0,_.utf8ToHex)(Ie):De?+Ie<0?"int256":"uint256":(0,_.numberToHex)(Ie);_.toHex=ce;const ee=Ie=>{if(typeof Ie=="string"){if(!Ie.match(/^-?[0-9.]+$/))throw new Error(`Invalid value '${Ie}' while converting to string, should be a number matching (^-?[0-9.]+).`);return Ie}if(typeof Ie=="number")return Number.isInteger(Ie)&&Ie>0?Number(Ie).toLocaleString("fullwide",{useGrouping:!1}):String(Ie);if(typeof Ie=="object"&&Ie.toString&&(Ie.toTwos||Ie.dividedToIntegerBy))return Ie.toPrecision?String(Ie.toPrecision()):Ie.toString(10);throw new Error(`while converting number to string, invalid number value '${Ie}' type ${typeof Ie}.`)};_.numberToString=ee;const ue=(Ie,De=18,Xe={})=>{let Ke=(0,_.toBN)(Ie);const pt=Ke.lt(ae),Ct=(0,_.toBN)(`1${"0".repeat(De)}`,10),yt=Ct.toString(10).length-1||1,bt=Xe||{};pt&&(Ke=Ke.mul(le));let st=Ke.mod(Ct).toString(10);for(;st.length<yt;)st=`0${st}`;bt.pad||(st=st.match(/^([0-9]*[1-9]|0)(0*)/)[1]);let rt=Ke.div(Ct).toString(10);bt.commify&&(rt=rt.replace(/\B(?=(\d{3})+(?!\d))/g,","));let Pt=`${rt}${st==="0"?"":`.${st}`}`;return pt&&(Pt=`-${Pt}`),Pt};_.fromUnitToToken=ue;const Oe=(Ie,De=18)=>{let Xe=(0,_.numberToString)(Ie);const Ke=(0,_.toBN)(`1${"0".repeat(De)}`,10),pt=Ke.toString(10).length-1||1,Ct=Xe.substring(0,1)==="-";if(Ct&&(Xe=Xe.substring(1)),Xe===".")throw new Error(`error converting token ${Ie} to unit, invalid value`);const yt=Xe.split(".");if(yt.length>2)throw new Error(`error converting token ${Ie} to unit, too many decimal points`);let bt=yt[0],st=yt[1];if(bt||(bt="0"),st||(st="0"),st.length>pt)throw new Error(`error converting token ${Ie} to unit, too many decimal places`);for(;st.length<pt;)st+="0";bt=new J.default(bt),st=new J.default(st);let rt=bt.mul(Ke).add(st);return Ct&&(rt=rt.mul(le)),new J.default(rt.toString(10),10)};_.fromTokenToUnit=Oe;function ye(Ie){return Object.prototype.toString.call(Ie)==="[object Uint8Array]"}function we(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Ie=>{const De=Math.random()*16|0;return(Ie==="x"?De:De&3|8).toString(16)})}function _e(Ie){return/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(Ie)}function Ce(Ie){let De=null;if([null,void 0,""].includes(Ie))De=new Uint8Array;else if(Buffer$3.isBuffer(Ie))De=new Uint8Array(Ie);else if((0,_.isHexStrict)(Ie))De=new Uint8Array((0,_.hexToBytes)(Ie));else if(ye(Ie))De=new Uint8Array(Ie);else if((0,_.isBase58btc)(Ie))De=new Uint8Array(he.decode(Ie));else if(typeof Ie=="string")De=new Uint8Array((0,_.hexToBytes)((0,_.toHex)(Ie)));else throw new Error(`Unsupported input type ${typeof Ie} detected for toBuffer, only Uint8Array/Buffer/Hex/Base58 are supported`);return De}function ke(Ie){return Buffer$3.from(Ce(Ie))}function Le(Ie){const De=he.encode(Ce(Ie));return Buffer$3.from(De).toString("utf-8")}function ge(Ie){if((0,_.isBase58btc)(Ie)===!1)throw new Error("fromBase58 expect strict base58 encoded string as input");return Buffer$3.from(he.decode(Ie))}function de(Ie,De=!0){const Xe=Y.default.encode(ke(Ie));return De?Y.default.escape(Xe):Xe}function Ee(Ie){if(typeof Ie!="string")throw new Error("fromBase64 requires input to be a string");return Buffer$3.from(Y.default.unescape(Ie),"base64")}function xe(Ie){return Ie.replace(oe,"")}function Re(Ie){return`${oe}${xe(Ie)}`}function We(Ie,De){return xe(Ie).toLowerCase()===xe(De).toLowerCase()}function Fe(Ie){return(0,F.default)((0,V.default)(Ie))}})(lib$6);Object.defineProperty(encode$4,"__esModule",{value:!0});encode$4.encode=encode$2;const util_1$a=lib$6;function encode$2(_,C="hex"){return["hex","base16"].includes(C)?(0,util_1$a.toHex)(_):C==="base58"?(0,util_1$a.toBase58)(_):C==="base64"?(0,util_1$a.toBase64)(_):C==="Uint8Array"?(0,util_1$a.toUint8Array)(_):C==="buffer"?(0,util_1$a.toBuffer)(_):_}var keccak$1={},sha3$1={exports:{}};(function(_){(function(){var C="input is invalid type",T="finalize already called",I=typeof window=="object",M=I?window:{};M.JS_SHA3_NO_WINDOW&&(I=!1);var D=!I&&typeof self=="object",L=!M.JS_SHA3_NO_NODE_JS&&typeof process$1=="object"&&process$1.versions&&process$1.versions.node;L?M=commonjsGlobal:D&&(M=self);var B=!M.JS_SHA3_NO_COMMON_JS&&!0&&_.exports,N=!M.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",F="0123456789abcdef".split(""),V=[31,7936,2031616,520093696],U=[4,1024,262144,67108864],H=[1,256,65536,16777216],G=[6,1536,393216,100663296],Z=[0,8,16,24],Y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],J=[224,256,384,512],X=[128,256],oe=["hex","buffer","arrayBuffer","array","digest"],ae={128:168,256:136};(M.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ye){return Object.prototype.toString.call(ye)==="[object Array]"}),N&&(M.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ye){return typeof ye=="object"&&ye.buffer&&ye.buffer.constructor===ArrayBuffer});for(var le=function(ye,we,_e){return function(Ce){return new ee(ye,we,ye).update(Ce)[_e]()}},he=function(ye,we,_e){return function(Ce,ke){return new ee(ye,we,ke).update(Ce)[_e]()}},me=function(ye,we,_e){return function(Ce,ke,Le,ge){return W["cshake"+ye].update(Ce,ke,Le,ge)[_e]()}},ve=function(ye,we,_e){return function(Ce,ke,Le,ge){return W["kmac"+ye].update(Ce,ke,Le,ge)[_e]()}},Se=function(ye,we,_e,Ce){for(var ke=0;ke<oe.length;++ke){var Le=oe[ke];ye[Le]=we(_e,Ce,Le)}return ye},Pe=function(ye,we){var _e=le(ye,we,"hex");return _e.create=function(){return new ee(ye,we,ye)},_e.update=function(Ce){return _e.create().update(Ce)},Se(_e,le,ye,we)},Ve=function(ye,we){var _e=he(ye,we,"hex");return _e.create=function(Ce){return new ee(ye,we,Ce)},_e.update=function(Ce,ke){return _e.create(ke).update(Ce)},Se(_e,he,ye,we)},Ne=function(ye,we){var _e=ae[ye],Ce=me(ye,we,"hex");return Ce.create=function(ke,Le,ge){return!Le&&!ge?W["shake"+ye].create(ke):new ee(ye,we,ke).bytepad([Le,ge],_e)},Ce.update=function(ke,Le,ge,de){return Ce.create(Le,ge,de).update(ke)},Se(Ce,me,ye,we)},ze=function(ye,we){var _e=ae[ye],Ce=ve(ye,we,"hex");return Ce.create=function(ke,Le,ge){return new ue(ye,we,Le).bytepad(["KMAC",ge],_e).bytepad([ke],_e)},Ce.update=function(ke,Le,ge,de){return Ce.create(ke,ge,de).update(Le)},Se(Ce,ve,ye,we)},fe=[{name:"keccak",padding:H,bits:J,createMethod:Pe},{name:"sha3",padding:G,bits:J,createMethod:Pe},{name:"shake",padding:V,bits:X,createMethod:Ve},{name:"cshake",padding:U,bits:X,createMethod:Ne},{name:"kmac",padding:U,bits:X,createMethod:ze}],W={},Q=[],ne=0;ne<fe.length;++ne)for(var ie=fe[ne],te=ie.bits,se=0;se<te.length;++se){var pe=ie.name+"_"+te[se];if(Q.push(pe),W[pe]=ie.createMethod(te[se],ie.padding),ie.name!=="sha3"){var ce=ie.name+te[se];Q.push(ce),W[ce]=W[pe]}}function ee(ye,we,_e){this.blocks=[],this.s=[],this.padding=we,this.outputBits=_e,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(ye<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=_e>>5,this.extraBytes=(_e&31)>>3;for(var Ce=0;Ce<50;++Ce)this.s[Ce]=0}ee.prototype.update=function(ye){if(this.finalized)throw new Error(T);var we,_e=typeof ye;if(_e!=="string"){if(_e==="object"){if(ye===null)throw new Error(C);if(N&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!Array.isArray(ye)&&(!N||!ArrayBuffer.isView(ye)))throw new Error(C)}else throw new Error(C);we=!0}for(var Ce=this.blocks,ke=this.byteCount,Le=ye.length,ge=this.blockCount,de=0,Ee=this.s,xe,Re;de<Le;){if(this.reset)for(this.reset=!1,Ce[0]=this.block,xe=1;xe<ge+1;++xe)Ce[xe]=0;if(we)for(xe=this.start;de<Le&&xe<ke;++de)Ce[xe>>2]|=ye[de]<<Z[xe++&3];else for(xe=this.start;de<Le&&xe<ke;++de)Re=ye.charCodeAt(de),Re<128?Ce[xe>>2]|=Re<<Z[xe++&3]:Re<2048?(Ce[xe>>2]|=(192|Re>>6)<<Z[xe++&3],Ce[xe>>2]|=(128|Re&63)<<Z[xe++&3]):Re<55296||Re>=57344?(Ce[xe>>2]|=(224|Re>>12)<<Z[xe++&3],Ce[xe>>2]|=(128|Re>>6&63)<<Z[xe++&3],Ce[xe>>2]|=(128|Re&63)<<Z[xe++&3]):(Re=65536+((Re&1023)<<10|ye.charCodeAt(++de)&1023),Ce[xe>>2]|=(240|Re>>18)<<Z[xe++&3],Ce[xe>>2]|=(128|Re>>12&63)<<Z[xe++&3],Ce[xe>>2]|=(128|Re>>6&63)<<Z[xe++&3],Ce[xe>>2]|=(128|Re&63)<<Z[xe++&3]);if(this.lastByteIndex=xe,xe>=ke){for(this.start=xe-ke,this.block=Ce[ge],xe=0;xe<ge;++xe)Ee[xe]^=Ce[xe];Oe(Ee),this.reset=!0}else this.start=xe}return this},ee.prototype.encode=function(ye,we){var _e=ye&255,Ce=1,ke=[_e];for(ye=ye>>8,_e=ye&255;_e>0;)ke.unshift(_e),ye=ye>>8,_e=ye&255,++Ce;return we?ke.push(Ce):ke.unshift(Ce),this.update(ke),ke.length},ee.prototype.encodeString=function(ye){var we,_e=typeof ye;if(_e!=="string"){if(_e==="object"){if(ye===null)throw new Error(C);if(N&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!Array.isArray(ye)&&(!N||!ArrayBuffer.isView(ye)))throw new Error(C)}else throw new Error(C);we=!0}var Ce=0,ke=ye.length;if(we)Ce=ke;else for(var Le=0;Le<ye.length;++Le){var ge=ye.charCodeAt(Le);ge<128?Ce+=1:ge<2048?Ce+=2:ge<55296||ge>=57344?Ce+=3:(ge=65536+((ge&1023)<<10|ye.charCodeAt(++Le)&1023),Ce+=4)}return Ce+=this.encode(Ce*8),this.update(ye),Ce},ee.prototype.bytepad=function(ye,we){for(var _e=this.encode(we),Ce=0;Ce<ye.length;++Ce)_e+=this.encodeString(ye[Ce]);var ke=we-_e%we,Le=[];return Le.length=ke,this.update(Le),this},ee.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ye=this.blocks,we=this.lastByteIndex,_e=this.blockCount,Ce=this.s;if(ye[we>>2]|=this.padding[we&3],this.lastByteIndex===this.byteCount)for(ye[0]=ye[_e],we=1;we<_e+1;++we)ye[we]=0;for(ye[_e-1]|=2147483648,we=0;we<_e;++we)Ce[we]^=ye[we];Oe(Ce)}},ee.prototype.toString=ee.prototype.hex=function(){this.finalize();for(var ye=this.blockCount,we=this.s,_e=this.outputBlocks,Ce=this.extraBytes,ke=0,Le=0,ge="",de;Le<_e;){for(ke=0;ke<ye&&Le<_e;++ke,++Le)de=we[ke],ge+=F[de>>4&15]+F[de&15]+F[de>>12&15]+F[de>>8&15]+F[de>>20&15]+F[de>>16&15]+F[de>>28&15]+F[de>>24&15];Le%ye===0&&(Oe(we),ke=0)}return Ce&&(de=we[ke],ge+=F[de>>4&15]+F[de&15],Ce>1&&(ge+=F[de>>12&15]+F[de>>8&15]),Ce>2&&(ge+=F[de>>20&15]+F[de>>16&15])),ge},ee.prototype.arrayBuffer=function(){this.finalize();var ye=this.blockCount,we=this.s,_e=this.outputBlocks,Ce=this.extraBytes,ke=0,Le=0,ge=this.outputBits>>3,de;Ce?de=new ArrayBuffer(_e+1<<2):de=new ArrayBuffer(ge);for(var Ee=new Uint32Array(de);Le<_e;){for(ke=0;ke<ye&&Le<_e;++ke,++Le)Ee[Le]=we[ke];Le%ye===0&&Oe(we)}return Ce&&(Ee[ke]=we[ke],de=de.slice(0,ge)),de},ee.prototype.buffer=ee.prototype.arrayBuffer,ee.prototype.digest=ee.prototype.array=function(){this.finalize();for(var ye=this.blockCount,we=this.s,_e=this.outputBlocks,Ce=this.extraBytes,ke=0,Le=0,ge=[],de,Ee;Le<_e;){for(ke=0;ke<ye&&Le<_e;++ke,++Le)de=Le<<2,Ee=we[ke],ge[de]=Ee&255,ge[de+1]=Ee>>8&255,ge[de+2]=Ee>>16&255,ge[de+3]=Ee>>24&255;Le%ye===0&&Oe(we)}return Ce&&(de=Le<<2,Ee=we[ke],ge[de]=Ee&255,Ce>1&&(ge[de+1]=Ee>>8&255),Ce>2&&(ge[de+2]=Ee>>16&255)),ge};function ue(ye,we,_e){ee.call(this,ye,we,_e)}ue.prototype=new ee,ue.prototype.finalize=function(){return this.encode(this.outputBits,!0),ee.prototype.finalize.call(this)};var Oe=function(ye){var we,_e,Ce,ke,Le,ge,de,Ee,xe,Re,We,Fe,Ie,De,Xe,Ke,pt,Ct,yt,bt,st,rt,Pt,ht,Et,Vt,$t,Jt,Lr,Gt,ar,Qr,lr,ur,Jr,pr,xr,Xt,At,kt,wr,rr,nr,jr,yr,er,ln,Te,je,Ge,be,He,wt,ut,tt,Ft,Nt,jt,Ir,Ut,ot,Bt,Ht;for(Ce=0;Ce<48;Ce+=2)ke=ye[0]^ye[10]^ye[20]^ye[30]^ye[40],Le=ye[1]^ye[11]^ye[21]^ye[31]^ye[41],ge=ye[2]^ye[12]^ye[22]^ye[32]^ye[42],de=ye[3]^ye[13]^ye[23]^ye[33]^ye[43],Ee=ye[4]^ye[14]^ye[24]^ye[34]^ye[44],xe=ye[5]^ye[15]^ye[25]^ye[35]^ye[45],Re=ye[6]^ye[16]^ye[26]^ye[36]^ye[46],We=ye[7]^ye[17]^ye[27]^ye[37]^ye[47],Fe=ye[8]^ye[18]^ye[28]^ye[38]^ye[48],Ie=ye[9]^ye[19]^ye[29]^ye[39]^ye[49],we=Fe^(ge<<1|de>>>31),_e=Ie^(de<<1|ge>>>31),ye[0]^=we,ye[1]^=_e,ye[10]^=we,ye[11]^=_e,ye[20]^=we,ye[21]^=_e,ye[30]^=we,ye[31]^=_e,ye[40]^=we,ye[41]^=_e,we=ke^(Ee<<1|xe>>>31),_e=Le^(xe<<1|Ee>>>31),ye[2]^=we,ye[3]^=_e,ye[12]^=we,ye[13]^=_e,ye[22]^=we,ye[23]^=_e,ye[32]^=we,ye[33]^=_e,ye[42]^=we,ye[43]^=_e,we=ge^(Re<<1|We>>>31),_e=de^(We<<1|Re>>>31),ye[4]^=we,ye[5]^=_e,ye[14]^=we,ye[15]^=_e,ye[24]^=we,ye[25]^=_e,ye[34]^=we,ye[35]^=_e,ye[44]^=we,ye[45]^=_e,we=Ee^(Fe<<1|Ie>>>31),_e=xe^(Ie<<1|Fe>>>31),ye[6]^=we,ye[7]^=_e,ye[16]^=we,ye[17]^=_e,ye[26]^=we,ye[27]^=_e,ye[36]^=we,ye[37]^=_e,ye[46]^=we,ye[47]^=_e,we=Re^(ke<<1|Le>>>31),_e=We^(Le<<1|ke>>>31),ye[8]^=we,ye[9]^=_e,ye[18]^=we,ye[19]^=_e,ye[28]^=we,ye[29]^=_e,ye[38]^=we,ye[39]^=_e,ye[48]^=we,ye[49]^=_e,De=ye[0],Xe=ye[1],er=ye[11]<<4|ye[10]>>>28,ln=ye[10]<<4|ye[11]>>>28,Jt=ye[20]<<3|ye[21]>>>29,Lr=ye[21]<<3|ye[20]>>>29,Ut=ye[31]<<9|ye[30]>>>23,ot=ye[30]<<9|ye[31]>>>23,rr=ye[40]<<18|ye[41]>>>14,nr=ye[41]<<18|ye[40]>>>14,ur=ye[2]<<1|ye[3]>>>31,Jr=ye[3]<<1|ye[2]>>>31,Ke=ye[13]<<12|ye[12]>>>20,pt=ye[12]<<12|ye[13]>>>20,Te=ye[22]<<10|ye[23]>>>22,je=ye[23]<<10|ye[22]>>>22,Gt=ye[33]<<13|ye[32]>>>19,ar=ye[32]<<13|ye[33]>>>19,Bt=ye[42]<<2|ye[43]>>>30,Ht=ye[43]<<2|ye[42]>>>30,ut=ye[5]<<30|ye[4]>>>2,tt=ye[4]<<30|ye[5]>>>2,pr=ye[14]<<6|ye[15]>>>26,xr=ye[15]<<6|ye[14]>>>26,Ct=ye[25]<<11|ye[24]>>>21,yt=ye[24]<<11|ye[25]>>>21,Ge=ye[34]<<15|ye[35]>>>17,be=ye[35]<<15|ye[34]>>>17,Qr=ye[45]<<29|ye[44]>>>3,lr=ye[44]<<29|ye[45]>>>3,ht=ye[6]<<28|ye[7]>>>4,Et=ye[7]<<28|ye[6]>>>4,Ft=ye[17]<<23|ye[16]>>>9,Nt=ye[16]<<23|ye[17]>>>9,Xt=ye[26]<<25|ye[27]>>>7,At=ye[27]<<25|ye[26]>>>7,bt=ye[36]<<21|ye[37]>>>11,st=ye[37]<<21|ye[36]>>>11,He=ye[47]<<24|ye[46]>>>8,wt=ye[46]<<24|ye[47]>>>8,jr=ye[8]<<27|ye[9]>>>5,yr=ye[9]<<27|ye[8]>>>5,Vt=ye[18]<<20|ye[19]>>>12,$t=ye[19]<<20|ye[18]>>>12,jt=ye[29]<<7|ye[28]>>>25,Ir=ye[28]<<7|ye[29]>>>25,kt=ye[38]<<8|ye[39]>>>24,wr=ye[39]<<8|ye[38]>>>24,rt=ye[48]<<14|ye[49]>>>18,Pt=ye[49]<<14|ye[48]>>>18,ye[0]=De^~Ke&Ct,ye[1]=Xe^~pt&yt,ye[10]=ht^~Vt&Jt,ye[11]=Et^~$t&Lr,ye[20]=ur^~pr&Xt,ye[21]=Jr^~xr&At,ye[30]=jr^~er&Te,ye[31]=yr^~ln&je,ye[40]=ut^~Ft&jt,ye[41]=tt^~Nt&Ir,ye[2]=Ke^~Ct&bt,ye[3]=pt^~yt&st,ye[12]=Vt^~Jt&Gt,ye[13]=$t^~Lr&ar,ye[22]=pr^~Xt&kt,ye[23]=xr^~At&wr,ye[32]=er^~Te&Ge,ye[33]=ln^~je&be,ye[42]=Ft^~jt&Ut,ye[43]=Nt^~Ir&ot,ye[4]=Ct^~bt&rt,ye[5]=yt^~st&Pt,ye[14]=Jt^~Gt&Qr,ye[15]=Lr^~ar&lr,ye[24]=Xt^~kt&rr,ye[25]=At^~wr&nr,ye[34]=Te^~Ge&He,ye[35]=je^~be&wt,ye[44]=jt^~Ut&Bt,ye[45]=Ir^~ot&Ht,ye[6]=bt^~rt&De,ye[7]=st^~Pt&Xe,ye[16]=Gt^~Qr&ht,ye[17]=ar^~lr&Et,ye[26]=kt^~rr&ur,ye[27]=wr^~nr&Jr,ye[36]=Ge^~He&jr,ye[37]=be^~wt&yr,ye[46]=Ut^~Bt&ut,ye[47]=ot^~Ht&tt,ye[8]=rt^~De&Ke,ye[9]=Pt^~Xe&pt,ye[18]=Qr^~ht&Vt,ye[19]=lr^~Et&$t,ye[28]=rr^~ur&pr,ye[29]=nr^~Jr&xr,ye[38]=He^~jr&er,ye[39]=wt^~yr&ln,ye[48]=Bt^~ut&Ft,ye[49]=Ht^~tt&Nt,ye[0]^=Y[Ce],ye[1]^=Y[Ce+1]};if(B)_.exports=W;else for(ne=0;ne<Q.length;++ne)M[Q[ne]]=W[Q[ne]]})()})(sha3$1);var sha3Exports=sha3$1.exports,__importDefault$b=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(keccak$1,"__esModule",{value:!0});keccak$1.KeccakHasher=void 0;const js_sha3_1$1=__importDefault$b(sha3Exports),util_1$9=lib$6,encode_1$4=encode$4;class KeccakHasher{constructor(){[224,256,384,512].forEach(C=>{const T=`hash${C}`,I=D=>js_sha3_1$1.default[`keccak${C}`](D),M=(D,L)=>L===1?I(D):M(I(D),L-1);this[T]=(D,L=1,B="hex")=>{let N=D;try{N=(0,util_1$9.toUint8Array)(D)}catch{}const F=M(N,L);return(0,encode_1$4.encode)(`0x${F}`,B)}})}}keccak$1.KeccakHasher=KeccakHasher;keccak$1.default=new KeccakHasher;var sha2={},hash$4={},utils$m={},minimalisticAssert=assert$g;function assert$g(_,C){if(!_)throw new Error(C||"Assertion failed")}assert$g.equal=function(C,T,I){if(C!=T)throw new Error(I||"Assertion failed: "+C+" != "+T)};var inherits_browser={exports:{}};typeof Object.create=="function"?inherits_browser.exports=function(C,T){T&&(C.super_=T,C.prototype=Object.create(T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(C,T){if(T){C.super_=T;var I=function(){};I.prototype=T.prototype,C.prototype=new I,C.prototype.constructor=C}};var inherits_browserExports=inherits_browser.exports,assert$f=minimalisticAssert,inherits$6=inherits_browserExports;utils$m.inherits=inherits$6;function isSurrogatePair(_,C){return(_.charCodeAt(C)&64512)!==55296||C<0||C+1>=_.length?!1:(_.charCodeAt(C+1)&64512)===56320}function toArray$1(_,C){if(Array.isArray(_))return _.slice();if(!_)return[];var T=[];if(typeof _=="string")if(C){if(C==="hex")for(_=_.replace(/[^a-z0-9]+/ig,""),_.length%2!==0&&(_="0"+_),M=0;M<_.length;M+=2)T.push(parseInt(_[M]+_[M+1],16))}else for(var I=0,M=0;M<_.length;M++){var D=_.charCodeAt(M);D<128?T[I++]=D:D<2048?(T[I++]=D>>6|192,T[I++]=D&63|128):isSurrogatePair(_,M)?(D=65536+((D&1023)<<10)+(_.charCodeAt(++M)&1023),T[I++]=D>>18|240,T[I++]=D>>12&63|128,T[I++]=D>>6&63|128,T[I++]=D&63|128):(T[I++]=D>>12|224,T[I++]=D>>6&63|128,T[I++]=D&63|128)}else for(M=0;M<_.length;M++)T[M]=_[M]|0;return T}utils$m.toArray=toArray$1;function toHex$2(_){for(var C="",T=0;T<_.length;T++)C+=zero2(_[T].toString(16));return C}utils$m.toHex=toHex$2;function htonl(_){var C=_>>>24|_>>>8&65280|_<<8&16711680|(_&255)<<24;return C>>>0}utils$m.htonl=htonl;function toHex32(_,C){for(var T="",I=0;I<_.length;I++){var M=_[I];C==="little"&&(M=htonl(M)),T+=zero8(M.toString(16))}return T}utils$m.toHex32=toHex32;function zero2(_){return _.length===1?"0"+_:_}utils$m.zero2=zero2;function zero8(_){return _.length===7?"0"+_:_.length===6?"00"+_:_.length===5?"000"+_:_.length===4?"0000"+_:_.length===3?"00000"+_:_.length===2?"000000"+_:_.length===1?"0000000"+_:_}utils$m.zero8=zero8;function join32(_,C,T,I){var M=T-C;assert$f(M%4===0);for(var D=new Array(M/4),L=0,B=C;L<D.length;L++,B+=4){var N;I==="big"?N=_[B]<<24|_[B+1]<<16|_[B+2]<<8|_[B+3]:N=_[B+3]<<24|_[B+2]<<16|_[B+1]<<8|_[B],D[L]=N>>>0}return D}utils$m.join32=join32;function split32(_,C){for(var T=new Array(_.length*4),I=0,M=0;I<_.length;I++,M+=4){var D=_[I];C==="big"?(T[M]=D>>>24,T[M+1]=D>>>16&255,T[M+2]=D>>>8&255,T[M+3]=D&255):(T[M+3]=D>>>24,T[M+2]=D>>>16&255,T[M+1]=D>>>8&255,T[M]=D&255)}return T}utils$m.split32=split32;function rotr32$1(_,C){return _>>>C|_<<32-C}utils$m.rotr32=rotr32$1;function rotl32$2(_,C){return _<<C|_>>>32-C}utils$m.rotl32=rotl32$2;function sum32$3(_,C){return _+C>>>0}utils$m.sum32=sum32$3;function sum32_3$1(_,C,T){return _+C+T>>>0}utils$m.sum32_3=sum32_3$1;function sum32_4$2(_,C,T,I){return _+C+T+I>>>0}utils$m.sum32_4=sum32_4$2;function sum32_5$2(_,C,T,I,M){return _+C+T+I+M>>>0}utils$m.sum32_5=sum32_5$2;function sum64$1(_,C,T,I){var M=_[C],D=_[C+1],L=I+D>>>0,B=(L<I?1:0)+T+M;_[C]=B>>>0,_[C+1]=L}utils$m.sum64=sum64$1;function sum64_hi$1(_,C,T,I){var M=C+I>>>0,D=(M<C?1:0)+_+T;return D>>>0}utils$m.sum64_hi=sum64_hi$1;function sum64_lo$1(_,C,T,I){var M=C+I;return M>>>0}utils$m.sum64_lo=sum64_lo$1;function sum64_4_hi$1(_,C,T,I,M,D,L,B){var N=0,F=C;F=F+I>>>0,N+=F<C?1:0,F=F+D>>>0,N+=F<D?1:0,F=F+B>>>0,N+=F<B?1:0;var V=_+T+M+L+N;return V>>>0}utils$m.sum64_4_hi=sum64_4_hi$1;function sum64_4_lo$1(_,C,T,I,M,D,L,B){var N=C+I+D+B;return N>>>0}utils$m.sum64_4_lo=sum64_4_lo$1;function sum64_5_hi$1(_,C,T,I,M,D,L,B,N,F){var V=0,U=C;U=U+I>>>0,V+=U<C?1:0,U=U+D>>>0,V+=U<D?1:0,U=U+B>>>0,V+=U<B?1:0,U=U+F>>>0,V+=U<F?1:0;var H=_+T+M+L+N+V;return H>>>0}utils$m.sum64_5_hi=sum64_5_hi$1;function sum64_5_lo$1(_,C,T,I,M,D,L,B,N,F){var V=C+I+D+B+F;return V>>>0}utils$m.sum64_5_lo=sum64_5_lo$1;function rotr64_hi$1(_,C,T){var I=C<<32-T|_>>>T;return I>>>0}utils$m.rotr64_hi=rotr64_hi$1;function rotr64_lo$1(_,C,T){var I=_<<32-T|C>>>T;return I>>>0}utils$m.rotr64_lo=rotr64_lo$1;function shr64_hi$1(_,C,T){return _>>>T}utils$m.shr64_hi=shr64_hi$1;function shr64_lo$1(_,C,T){var I=_<<32-T|C>>>T;return I>>>0}utils$m.shr64_lo=shr64_lo$1;var common$7={},utils$l=utils$m,assert$e=minimalisticAssert;function BlockHash$4(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}common$7.BlockHash=BlockHash$4;BlockHash$4.prototype.update=function(C,T){if(C=utils$l.toArray(C,T),this.pending?this.pending=this.pending.concat(C):this.pending=C,this.pendingTotal+=C.length,this.pending.length>=this._delta8){C=this.pending;var I=C.length%this._delta8;this.pending=C.slice(C.length-I,C.length),this.pending.length===0&&(this.pending=null),C=utils$l.join32(C,0,C.length-I,this.endian);for(var M=0;M<C.length;M+=this._delta32)this._update(C,M,M+this._delta32)}return this};BlockHash$4.prototype.digest=function(C){return this.update(this._pad()),assert$e(this.pending===null),this._digest(C)};BlockHash$4.prototype._pad=function(){var C=this.pendingTotal,T=this._delta8,I=T-(C+this.padLength)%T,M=new Array(I+this.padLength);M[0]=128;for(var D=1;D<I;D++)M[D]=0;if(C<<=3,this.endian==="big"){for(var L=8;L<this.padLength;L++)M[D++]=0;M[D++]=0,M[D++]=0,M[D++]=0,M[D++]=0,M[D++]=C>>>24&255,M[D++]=C>>>16&255,M[D++]=C>>>8&255,M[D++]=C&255}else for(M[D++]=C&255,M[D++]=C>>>8&255,M[D++]=C>>>16&255,M[D++]=C>>>24&255,M[D++]=0,M[D++]=0,M[D++]=0,M[D++]=0,L=8;L<this.padLength;L++)M[D++]=0;return M};var sha$1={},common$6={},utils$k=utils$m,rotr32=utils$k.rotr32;function ft_1$1(_,C,T,I){if(_===0)return ch32$1(C,T,I);if(_===1||_===3)return p32(C,T,I);if(_===2)return maj32$1(C,T,I)}common$6.ft_1=ft_1$1;function ch32$1(_,C,T){return _&C^~_&T}common$6.ch32=ch32$1;function maj32$1(_,C,T){return _&C^_&T^C&T}common$6.maj32=maj32$1;function p32(_,C,T){return _^C^T}common$6.p32=p32;function s0_256$1(_){return rotr32(_,2)^rotr32(_,13)^rotr32(_,22)}common$6.s0_256=s0_256$1;function s1_256$1(_){return rotr32(_,6)^rotr32(_,11)^rotr32(_,25)}common$6.s1_256=s1_256$1;function g0_256$1(_){return rotr32(_,7)^rotr32(_,18)^_>>>3}common$6.g0_256=g0_256$1;function g1_256$1(_){return rotr32(_,17)^rotr32(_,19)^_>>>10}common$6.g1_256=g1_256$1;var utils$j=utils$m,common$5=common$7,shaCommon$1=common$6,rotl32$1=utils$j.rotl32,sum32$2=utils$j.sum32,sum32_5$1=utils$j.sum32_5,ft_1=shaCommon$1.ft_1,BlockHash$3=common$5.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash$3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}utils$j.inherits(SHA1,BlockHash$3);var _1=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function(C,T){for(var I=this.W,M=0;M<16;M++)I[M]=C[T+M];for(;M<I.length;M++)I[M]=rotl32$1(I[M-3]^I[M-8]^I[M-14]^I[M-16],1);var D=this.h[0],L=this.h[1],B=this.h[2],N=this.h[3],F=this.h[4];for(M=0;M<I.length;M++){var V=~~(M/20),U=sum32_5$1(rotl32$1(D,5),ft_1(V,L,B,N),F,I[M],sha1_K[V]);F=N,N=B,B=rotl32$1(L,30),L=D,D=U}this.h[0]=sum32$2(this.h[0],D),this.h[1]=sum32$2(this.h[1],L),this.h[2]=sum32$2(this.h[2],B),this.h[3]=sum32$2(this.h[3],N),this.h[4]=sum32$2(this.h[4],F)};SHA1.prototype._digest=function(C){return C==="hex"?utils$j.toHex32(this.h,"big"):utils$j.split32(this.h,"big")};var utils$i=utils$m,common$4=common$7,shaCommon=common$6,assert$d=minimalisticAssert,sum32$1=utils$i.sum32,sum32_4$1=utils$i.sum32_4,sum32_5=utils$i.sum32_5,ch32=shaCommon.ch32,maj32=shaCommon.maj32,s0_256=shaCommon.s0_256,s1_256=shaCommon.s1_256,g0_256=shaCommon.g0_256,g1_256=shaCommon.g1_256,BlockHash$2=common$4.BlockHash,sha256_K=[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];function SHA256$1(){if(!(this instanceof SHA256$1))return new SHA256$1;BlockHash$2.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sha256_K,this.W=new Array(64)}utils$i.inherits(SHA256$1,BlockHash$2);var _256=SHA256$1;SHA256$1.blockSize=512;SHA256$1.outSize=256;SHA256$1.hmacStrength=192;SHA256$1.padLength=64;SHA256$1.prototype._update=function(C,T){for(var I=this.W,M=0;M<16;M++)I[M]=C[T+M];for(;M<I.length;M++)I[M]=sum32_4$1(g1_256(I[M-2]),I[M-7],g0_256(I[M-15]),I[M-16]);var D=this.h[0],L=this.h[1],B=this.h[2],N=this.h[3],F=this.h[4],V=this.h[5],U=this.h[6],H=this.h[7];for(assert$d(this.k.length===I.length),M=0;M<I.length;M++){var G=sum32_5(H,s1_256(F),ch32(F,V,U),this.k[M],I[M]),Z=sum32$1(s0_256(D),maj32(D,L,B));H=U,U=V,V=F,F=sum32$1(N,G),N=B,B=L,L=D,D=sum32$1(G,Z)}this.h[0]=sum32$1(this.h[0],D),this.h[1]=sum32$1(this.h[1],L),this.h[2]=sum32$1(this.h[2],B),this.h[3]=sum32$1(this.h[3],N),this.h[4]=sum32$1(this.h[4],F),this.h[5]=sum32$1(this.h[5],V),this.h[6]=sum32$1(this.h[6],U),this.h[7]=sum32$1(this.h[7],H)};SHA256$1.prototype._digest=function(C){return C==="hex"?utils$i.toHex32(this.h,"big"):utils$i.split32(this.h,"big")};var utils$h=utils$m,SHA256=_256;function SHA224(){if(!(this instanceof SHA224))return new SHA224;SHA256.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}utils$h.inherits(SHA224,SHA256);var _224=SHA224;SHA224.blockSize=512;SHA224.outSize=224;SHA224.hmacStrength=192;SHA224.padLength=64;SHA224.prototype._digest=function(C){return C==="hex"?utils$h.toHex32(this.h.slice(0,7),"big"):utils$h.split32(this.h.slice(0,7),"big")};var utils$g=utils$m,common$3=common$7,assert$c=minimalisticAssert,rotr64_hi=utils$g.rotr64_hi,rotr64_lo=utils$g.rotr64_lo,shr64_hi=utils$g.shr64_hi,shr64_lo=utils$g.shr64_lo,sum64=utils$g.sum64,sum64_hi=utils$g.sum64_hi,sum64_lo=utils$g.sum64_lo,sum64_4_hi=utils$g.sum64_4_hi,sum64_4_lo=utils$g.sum64_4_lo,sum64_5_hi=utils$g.sum64_5_hi,sum64_5_lo=utils$g.sum64_5_lo,BlockHash$1=common$3.BlockHash,sha512_K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function SHA512$1(){if(!(this instanceof SHA512$1))return new SHA512$1;BlockHash$1.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sha512_K,this.W=new Array(160)}utils$g.inherits(SHA512$1,BlockHash$1);var _512=SHA512$1;SHA512$1.blockSize=1024;SHA512$1.outSize=512;SHA512$1.hmacStrength=192;SHA512$1.padLength=128;SHA512$1.prototype._prepareBlock=function(C,T){for(var I=this.W,M=0;M<32;M++)I[M]=C[T+M];for(;M<I.length;M+=2){var D=g1_512_hi(I[M-4],I[M-3]),L=g1_512_lo(I[M-4],I[M-3]),B=I[M-14],N=I[M-13],F=g0_512_hi(I[M-30],I[M-29]),V=g0_512_lo(I[M-30],I[M-29]),U=I[M-32],H=I[M-31];I[M]=sum64_4_hi(D,L,B,N,F,V,U,H),I[M+1]=sum64_4_lo(D,L,B,N,F,V,U,H)}};SHA512$1.prototype._update=function(C,T){this._prepareBlock(C,T);var I=this.W,M=this.h[0],D=this.h[1],L=this.h[2],B=this.h[3],N=this.h[4],F=this.h[5],V=this.h[6],U=this.h[7],H=this.h[8],G=this.h[9],Z=this.h[10],Y=this.h[11],J=this.h[12],X=this.h[13],oe=this.h[14],ae=this.h[15];assert$c(this.k.length===I.length);for(var le=0;le<I.length;le+=2){var he=oe,me=ae,ve=s1_512_hi(H,G),Se=s1_512_lo(H,G),Pe=ch64_hi(H,G,Z,Y,J),Ve=ch64_lo(H,G,Z,Y,J,X),Ne=this.k[le],ze=this.k[le+1],fe=I[le],W=I[le+1],Q=sum64_5_hi(he,me,ve,Se,Pe,Ve,Ne,ze,fe,W),ne=sum64_5_lo(he,me,ve,Se,Pe,Ve,Ne,ze,fe,W);he=s0_512_hi(M,D),me=s0_512_lo(M,D),ve=maj64_hi(M,D,L,B,N),Se=maj64_lo(M,D,L,B,N,F);var ie=sum64_hi(he,me,ve,Se),te=sum64_lo(he,me,ve,Se);oe=J,ae=X,J=Z,X=Y,Z=H,Y=G,H=sum64_hi(V,U,Q,ne),G=sum64_lo(U,U,Q,ne),V=N,U=F,N=L,F=B,L=M,B=D,M=sum64_hi(Q,ne,ie,te),D=sum64_lo(Q,ne,ie,te)}sum64(this.h,0,M,D),sum64(this.h,2,L,B),sum64(this.h,4,N,F),sum64(this.h,6,V,U),sum64(this.h,8,H,G),sum64(this.h,10,Z,Y),sum64(this.h,12,J,X),sum64(this.h,14,oe,ae)};SHA512$1.prototype._digest=function(C){return C==="hex"?utils$g.toHex32(this.h,"big"):utils$g.split32(this.h,"big")};function ch64_hi(_,C,T,I,M){var D=_&T^~_&M;return D<0&&(D+=4294967296),D}function ch64_lo(_,C,T,I,M,D){var L=C&I^~C&D;return L<0&&(L+=4294967296),L}function maj64_hi(_,C,T,I,M){var D=_&T^_&M^T&M;return D<0&&(D+=4294967296),D}function maj64_lo(_,C,T,I,M,D){var L=C&I^C&D^I&D;return L<0&&(L+=4294967296),L}function s0_512_hi(_,C){var T=rotr64_hi(_,C,28),I=rotr64_hi(C,_,2),M=rotr64_hi(C,_,7),D=T^I^M;return D<0&&(D+=4294967296),D}function s0_512_lo(_,C){var T=rotr64_lo(_,C,28),I=rotr64_lo(C,_,2),M=rotr64_lo(C,_,7),D=T^I^M;return D<0&&(D+=4294967296),D}function s1_512_hi(_,C){var T=rotr64_hi(_,C,14),I=rotr64_hi(_,C,18),M=rotr64_hi(C,_,9),D=T^I^M;return D<0&&(D+=4294967296),D}function s1_512_lo(_,C){var T=rotr64_lo(_,C,14),I=rotr64_lo(_,C,18),M=rotr64_lo(C,_,9),D=T^I^M;return D<0&&(D+=4294967296),D}function g0_512_hi(_,C){var T=rotr64_hi(_,C,1),I=rotr64_hi(_,C,8),M=shr64_hi(_,C,7),D=T^I^M;return D<0&&(D+=4294967296),D}function g0_512_lo(_,C){var T=rotr64_lo(_,C,1),I=rotr64_lo(_,C,8),M=shr64_lo(_,C,7),D=T^I^M;return D<0&&(D+=4294967296),D}function g1_512_hi(_,C){var T=rotr64_hi(_,C,19),I=rotr64_hi(C,_,29),M=shr64_hi(_,C,6),D=T^I^M;return D<0&&(D+=4294967296),D}function g1_512_lo(_,C){var T=rotr64_lo(_,C,19),I=rotr64_lo(C,_,29),M=shr64_lo(_,C,6),D=T^I^M;return D<0&&(D+=4294967296),D}var utils$f=utils$m,SHA512=_512;function SHA384(){if(!(this instanceof SHA384))return new SHA384;SHA512.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}utils$f.inherits(SHA384,SHA512);var _384=SHA384;SHA384.blockSize=1024;SHA384.outSize=384;SHA384.hmacStrength=192;SHA384.padLength=128;SHA384.prototype._digest=function(C){return C==="hex"?utils$f.toHex32(this.h.slice(0,12),"big"):utils$f.split32(this.h.slice(0,12),"big")};sha$1.sha1=_1;sha$1.sha224=_224;sha$1.sha256=_256;sha$1.sha384=_384;sha$1.sha512=_512;var ripemd={},utils$e=utils$m,common$2=common$7,rotl32=utils$e.rotl32,sum32=utils$e.sum32,sum32_3=utils$e.sum32_3,sum32_4=utils$e.sum32_4,BlockHash=common$2.BlockHash;function RIPEMD160$1(){if(!(this instanceof RIPEMD160$1))return new RIPEMD160$1;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}utils$e.inherits(RIPEMD160$1,BlockHash);ripemd.ripemd160=RIPEMD160$1;RIPEMD160$1.blockSize=512;RIPEMD160$1.outSize=160;RIPEMD160$1.hmacStrength=192;RIPEMD160$1.padLength=64;RIPEMD160$1.prototype._update=function(C,T){for(var I=this.h[0],M=this.h[1],D=this.h[2],L=this.h[3],B=this.h[4],N=I,F=M,V=D,U=L,H=B,G=0;G<80;G++){var Z=sum32(rotl32(sum32_4(I,f$3(G,M,D,L),C[r$4[G]+T],K(G)),s$1[G]),B);I=B,B=L,L=rotl32(D,10),D=M,M=Z,Z=sum32(rotl32(sum32_4(N,f$3(79-G,F,V,U),C[rh[G]+T],Kh(G)),sh[G]),H),N=H,H=U,U=rotl32(V,10),V=F,F=Z}Z=sum32_3(this.h[1],D,U),this.h[1]=sum32_3(this.h[2],L,H),this.h[2]=sum32_3(this.h[3],B,N),this.h[3]=sum32_3(this.h[4],I,F),this.h[4]=sum32_3(this.h[0],M,V),this.h[0]=Z};RIPEMD160$1.prototype._digest=function(C){return C==="hex"?utils$e.toHex32(this.h,"little"):utils$e.split32(this.h,"little")};function f$3(_,C,T,I){return _<=15?C^T^I:_<=31?C&T|~C&I:_<=47?(C|~T)^I:_<=63?C&I|T&~I:C^(T|~I)}function K(_){return _<=15?0:_<=31?1518500249:_<=47?1859775393:_<=63?2400959708:2840853838}function Kh(_){return _<=15?1352829926:_<=31?1548603684:_<=47?1836072691:_<=63?2053994217:0}var r$4=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],rh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],s$1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],sh=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],utils$d=utils$m,assert$b=minimalisticAssert;function Hmac(_,C,T){if(!(this instanceof Hmac))return new Hmac(_,C,T);this.Hash=_,this.blockSize=_.blockSize/8,this.outSize=_.outSize/8,this.inner=null,this.outer=null,this._init(utils$d.toArray(C,T))}var hmac=Hmac;Hmac.prototype._init=function(C){C.length>this.blockSize&&(C=new this.Hash().update(C).digest()),assert$b(C.length<=this.blockSize);for(var T=C.length;T<this.blockSize;T++)C.push(0);for(T=0;T<C.length;T++)C[T]^=54;for(this.inner=new this.Hash().update(C),T=0;T<C.length;T++)C[T]^=106;this.outer=new this.Hash().update(C)};Hmac.prototype.update=function(C,T){return this.inner.update(C,T),this};Hmac.prototype.digest=function(C){return this.outer.update(this.inner.digest()),this.outer.digest(C)};(function(_){var C=_;C.utils=utils$m,C.common=common$7,C.sha=sha$1,C.ripemd=ripemd,C.hmac=hmac,C.sha1=C.sha.sha1,C.sha256=C.sha.sha256,C.sha224=C.sha.sha224,C.sha384=C.sha.sha384,C.sha512=C.sha.sha512,C.ripemd160=C.ripemd.ripemd160})(hash$4);Object.defineProperty(sha2,"__esModule",{value:!0});sha2.Sha2Hasher=void 0;const util_1$8=lib$6,hash_js_1=hash$4,encode_1$3=encode$4,hashFns={sha224:hash_js_1.sha224,sha256:hash_js_1.sha256,sha384:hash_js_1.sha384,sha512:hash_js_1.sha512};class Sha2Hasher{constructor(){[224,256,384,512].forEach(C=>{const T=`hash${C}`,I=hashFns[`sha${C}`],M=(D,L)=>{let B=D;try{B=(0,util_1$8.toUint8Array)(D)}catch{}return L===1?`0x${I().update(B).digest("hex")}`:M(M(B,1),L-1)};this[T]=(D,L=2,B="hex")=>{const N=M(D,L);return(0,encode_1$3.encode)(N,B)}})}}sha2.Sha2Hasher=Sha2Hasher;sha2.default=new Sha2Hasher;var sha3={},__importDefault$a=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(sha3,"__esModule",{value:!0});sha3.Sha3Hasher=void 0;const js_sha3_1=__importDefault$a(sha3Exports),util_1$7=lib$6,encode_1$2=encode$4;class Sha3Hasher{constructor(){[224,256,384,512].forEach(C=>{const T=`hash${C}`,I=js_sha3_1.default[`sha3_${C}`],M=(D,L)=>L===1?I(D):M(I(D),L-1);this[T]=(D,L=1,B="hex")=>{let N=D;try{N=(0,util_1$7.toUint8Array)(D)}catch{}const F=M(N,L);return(0,encode_1$2.encode)(`0x${F}`,B)}})}}sha3.Sha3Hasher=Sha3Hasher;sha3.default=new Sha3Hasher;var ed25519$1={};function commonjsRequire(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var naclFast={exports:{}},cryptoBrowserify={},readableBrowser$1={exports:{}},events={exports:{}},R=typeof Reflect=="object"?Reflect:null,ReflectApply=R&&typeof R.apply=="function"?R.apply:function(C,T,I){return Function.prototype.apply.call(C,T,I)},ReflectOwnKeys;R&&typeof R.ownKeys=="function"?ReflectOwnKeys=R.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:ReflectOwnKeys=function(C){return Object.getOwnPropertyNames(C)};function ProcessEmitWarning(_){console&&console.warn&&console.warn(_)}var NumberIsNaN=Number.isNaN||function(C){return C!==C};function EventEmitter$2(){EventEmitter$2.init.call(this)}events.exports=EventEmitter$2;events.exports.once=once$2;EventEmitter$2.EventEmitter=EventEmitter$2;EventEmitter$2.prototype._events=void 0;EventEmitter$2.prototype._eventsCount=0;EventEmitter$2.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(EventEmitter$2,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(_){if(typeof _!="number"||_<0||NumberIsNaN(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");defaultMaxListeners=_}});EventEmitter$2.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$2.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||NumberIsNaN(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function _getMaxListeners(_){return _._maxListeners===void 0?EventEmitter$2.defaultMaxListeners:_._maxListeners}EventEmitter$2.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$2.prototype.emit=function(C){for(var T=[],I=1;I<arguments.length;I++)T.push(arguments[I]);var M=C==="error",D=this._events;if(D!==void 0)M=M&&D.error===void 0;else if(!M)return!1;if(M){var L;if(T.length>0&&(L=T[0]),L instanceof Error)throw L;var B=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw B.context=L,B}var N=D[C];if(N===void 0)return!1;if(typeof N=="function")ReflectApply(N,this,T);else for(var F=N.length,V=arrayClone(N,F),I=0;I<F;++I)ReflectApply(V[I],this,T);return!0};function _addListener(_,C,T,I){var M,D,L;if(checkListener(T),D=_._events,D===void 0?(D=_._events=Object.create(null),_._eventsCount=0):(D.newListener!==void 0&&(_.emit("newListener",C,T.listener?T.listener:T),D=_._events),L=D[C]),L===void 0)L=D[C]=T,++_._eventsCount;else if(typeof L=="function"?L=D[C]=I?[T,L]:[L,T]:I?L.unshift(T):L.push(T),M=_getMaxListeners(_),M>0&&L.length>M&&!L.warned){L.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");B.name="MaxListenersExceededWarning",B.emitter=_,B.type=C,B.count=L.length,ProcessEmitWarning(B)}return _}EventEmitter$2.prototype.addListener=function(C,T){return _addListener(this,C,T,!1)};EventEmitter$2.prototype.on=EventEmitter$2.prototype.addListener;EventEmitter$2.prototype.prependListener=function(C,T){return _addListener(this,C,T,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(_,C,T){var I={fired:!1,wrapFn:void 0,target:_,type:C,listener:T},M=onceWrapper.bind(I);return M.listener=T,I.wrapFn=M,M}EventEmitter$2.prototype.once=function(C,T){return checkListener(T),this.on(C,_onceWrap(this,C,T)),this};EventEmitter$2.prototype.prependOnceListener=function(C,T){return checkListener(T),this.prependListener(C,_onceWrap(this,C,T)),this};EventEmitter$2.prototype.removeListener=function(C,T){var I,M,D,L,B;if(checkListener(T),M=this._events,M===void 0)return this;if(I=M[C],I===void 0)return this;if(I===T||I.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete M[C],M.removeListener&&this.emit("removeListener",C,I.listener||T));else if(typeof I!="function"){for(D=-1,L=I.length-1;L>=0;L--)if(I[L]===T||I[L].listener===T){B=I[L].listener,D=L;break}if(D<0)return this;D===0?I.shift():spliceOne(I,D),I.length===1&&(M[C]=I[0]),M.removeListener!==void 0&&this.emit("removeListener",C,B||T)}return this};EventEmitter$2.prototype.off=EventEmitter$2.prototype.removeListener;EventEmitter$2.prototype.removeAllListeners=function(C){var T,I,M;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[C]),this;if(arguments.length===0){var D=Object.keys(I),L;for(M=0;M<D.length;++M)L=D[M],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=I[C],typeof T=="function")this.removeListener(C,T);else if(T!==void 0)for(M=T.length-1;M>=0;M--)this.removeListener(C,T[M]);return this};function _listeners(_,C,T){var I=_._events;if(I===void 0)return[];var M=I[C];return M===void 0?[]:typeof M=="function"?T?[M.listener||M]:[M]:T?unwrapListeners(M):arrayClone(M,M.length)}EventEmitter$2.prototype.listeners=function(C){return _listeners(this,C,!0)};EventEmitter$2.prototype.rawListeners=function(C){return _listeners(this,C,!1)};EventEmitter$2.listenerCount=function(_,C){return typeof _.listenerCount=="function"?_.listenerCount(C):listenerCount.call(_,C)};EventEmitter$2.prototype.listenerCount=listenerCount;function listenerCount(_){var C=this._events;if(C!==void 0){var T=C[_];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}EventEmitter$2.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(_,C){for(var T=new Array(C),I=0;I<C;++I)T[I]=_[I];return T}function spliceOne(_,C){for(;C+1<_.length;C++)_[C]=_[C+1];_.pop()}function unwrapListeners(_){for(var C=new Array(_.length),T=0;T<C.length;++T)C[T]=_[T].listener||_[T];return C}function once$2(_,C){return new Promise(function(T,I){function M(L){_.removeListener(C,D),I(L)}function D(){typeof _.removeListener=="function"&&_.removeListener("error",M),T([].slice.call(arguments))}eventTargetAgnosticAddListener(_,C,D,{once:!0}),C!=="error"&&addErrorHandlerIfEventEmitter(_,M,{once:!0})})}function addErrorHandlerIfEventEmitter(_,C,T){typeof _.on=="function"&&eventTargetAgnosticAddListener(_,"error",C,T)}function eventTargetAgnosticAddListener(_,C,T,I){if(typeof _.on=="function")I.once?_.once(C,T):_.on(C,T);else if(typeof _.addEventListener=="function")_.addEventListener(C,function M(D){I.once&&_.removeEventListener(C,M),T(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _)}var eventsExports=events.exports,streamBrowser$1=eventsExports.EventEmitter,util$9={},types$3={},shams$1,hasRequiredShams;function requireShams(){return hasRequiredShams||(hasRequiredShams=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var C={},T=Symbol("test"),I=Object(T);if(typeof T=="string"||Object.prototype.toString.call(T)!=="[object Symbol]"||Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var M=42;C[T]=M;for(var D in C)return!1;if(typeof Object.keys=="function"&&Object.keys(C).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(C).length!==0)return!1;var L=Object.getOwnPropertySymbols(C);if(L.length!==1||L[0]!==T||!Object.prototype.propertyIsEnumerable.call(C,T))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var B=Object.getOwnPropertyDescriptor(C,T);if(B.value!==M||B.enumerable!==!0)return!1}return!0}),shams$1}var hasSymbols$2=requireShams(),shams=function(){return hasSymbols$2()&&!!Symbol.toStringTag},esObjectAtoms=Object,esErrors=Error,_eval=EvalError,range$1=RangeError,ref=ReferenceError,syntax=SyntaxError,type$1=TypeError,uri=URIError,abs$2=Math.abs,floor$5=Math.floor,max$5=Math.max,min$5=Math.min,pow$2=Math.pow,gOPD$2=Object.getOwnPropertyDescriptor,$gOPD$1=gOPD$2;if($gOPD$1)try{$gOPD$1([],"length")}catch{$gOPD$1=null}var gopd$1=$gOPD$1,$defineProperty$5=Object.defineProperty||!1;if($defineProperty$5)try{$defineProperty$5({},"a",{value:1})}catch{$defineProperty$5=!1}var esDefineProperty=$defineProperty$5,hasSymbols$1,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols$1;hasRequiredHasSymbols=1;var _=typeof Symbol<"u"&&Symbol,C=requireShams();return hasSymbols$1=function(){return typeof _!="function"||typeof Symbol!="function"||typeof _("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:C()},hasSymbols$1}var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr$4=Object.prototype.toString,max$4=Math.max,funcType="[object Function]",concatty=function(C,T){for(var I=[],M=0;M<C.length;M+=1)I[M]=C[M];for(var D=0;D<T.length;D+=1)I[D+C.length]=T[D];return I},slicy=function(C,T){for(var I=[],M=T,D=0;M<C.length;M+=1,D+=1)I[D]=C[M];return I},joiny=function(_,C){for(var T="",I=0;I<_.length;I+=1)T+=_[I],I+1<_.length&&(T+=C);return T},implementation$2=function(C){var T=this;if(typeof T!="function"||toStr$4.apply(T)!==funcType)throw new TypeError(ERROR_MESSAGE+T);for(var I=slicy(arguments,1),M,D=function(){if(this instanceof M){var V=T.apply(this,concatty(I,arguments));return Object(V)===V?V:this}return T.apply(C,concatty(I,arguments))},L=max$4(0,T.length-I.length),B=[],N=0;N<L;N++)B[N]="$"+N;if(M=Function("binder","return function ("+joiny(B,",")+"){ return binder.apply(this,arguments); }")(D),T.prototype){var F=function(){};F.prototype=T.prototype,M.prototype=new F,F.prototype=null}return M},implementation$1=implementation$2,functionBind$1=Function.prototype.bind||implementation$1,functionCall$1=Function.prototype.call,functionApply$1=Function.prototype.apply,reflectApply$1=typeof Reflect<"u"&&Reflect&&Reflect.apply,bind$i=functionBind$1,$apply$2=functionApply$1,$call$2=functionCall$1,$reflectApply=reflectApply$1,actualApply$1=$reflectApply||bind$i.call($call$2,$apply$2),bind$h=functionBind$1,$TypeError$j=type$1,$call$1=functionCall$1,$actualApply=actualApply$1,callBindApplyHelpers=function(C){if(C.length<1||typeof C[0]!="function")throw new $TypeError$j("a function is required");return $actualApply(bind$h,$call$1,C)},get$3,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get$3;hasRequiredGet=1;var _=callBindApplyHelpers,C=gopd$1,T;try{T=[].__proto__===Array.prototype}catch(L){if(!L||typeof L!="object"||!("code"in L)||L.code!=="ERR_PROTO_ACCESS")throw L}var I=!!T&&C&&C(Object.prototype,"__proto__"),M=Object,D=M.getPrototypeOf;return get$3=I&&typeof I.get=="function"?_([I.get]):typeof D=="function"?function(B){return D(B==null?B:M(B))}:!1,get$3}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var _=Function.prototype.call,C=Object.prototype.hasOwnProperty,T=functionBind$1;return hasown=T.call(_,C),hasown}var undefined$1,$Object$5=esObjectAtoms,$Error=esErrors,$EvalError=_eval,$RangeError$4=range$1,$ReferenceError=ref,$SyntaxError$1=syntax,$TypeError$i=type$1,$URIError=uri,abs$1=abs$2,floor$4=floor$5,max$3=max$5,min$4=min$5,pow$1=pow$2,$Function$1=Function,getEvalledConstructor=function(_){try{return $Function$1('"use strict"; return ('+_+").constructor;")()}catch{}},$gOPD=gopd$1,$defineProperty$4=esDefineProperty,throwTypeError=function(){throw new $TypeError$i},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=requireHasSymbols()(),getDunderProto=requireGet(),getProto$1=typeof Reflect=="function"&&Reflect.getPrototypeOf||$Object$5.getPrototypeOf||getDunderProto,$apply$1=functionApply$1,$call=functionCall$1,needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto$1?undefined$1:getProto$1(Uint8Array),INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto$1?getProto$1([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function$1,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols||!getProto$1?undefined$1:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object$5,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":$RangeError$4,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols||!getProto$1?undefined$1:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto$1?getProto$1(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError$1,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$i,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply$1,"%Object.defineProperty%":$defineProperty$4,"%Math.abs%":abs$1,"%Math.floor%":floor$4,"%Math.max%":max$3,"%Math.min%":min$4,"%Math.pow%":pow$1};if(getProto$1)try{null.error}catch(_){var errorProto=getProto$1(getProto$1(_));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function _(C){var T;if(C==="%AsyncFunction%")T=getEvalledConstructor("async function () {}");else if(C==="%GeneratorFunction%")T=getEvalledConstructor("function* () {}");else if(C==="%AsyncGeneratorFunction%")T=getEvalledConstructor("async function* () {}");else if(C==="%AsyncGenerator%"){var I=_("%AsyncGeneratorFunction%");I&&(T=I.prototype)}else if(C==="%AsyncIteratorPrototype%"){var M=_("%AsyncGenerator%");M&&getProto$1&&(T=getProto$1(M.prototype))}return INTRINSICS[C]=T,T},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind$g=functionBind$1,hasOwn$g=requireHasown(),$concat=bind$g.call($call,Array.prototype.concat),$spliceApply=bind$g.call($apply$1,Array.prototype.splice),$replace=bind$g.call($call,String.prototype.replace),$strSlice=bind$g.call($call,String.prototype.slice),$exec=bind$g.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(C){var T=$strSlice(C,0,1),I=$strSlice(C,-1);if(T==="%"&&I!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&T!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");var M=[];return $replace(C,rePropName,function(D,L,B,N){M[M.length]=B?$replace(N,reEscapeChar,"$1"):L||D}),M},getBaseIntrinsic=function(C,T){var I=C,M;if(hasOwn$g(LEGACY_ALIASES,I)&&(M=LEGACY_ALIASES[I],I="%"+M[0]+"%"),hasOwn$g(INTRINSICS,I)){var D=INTRINSICS[I];if(D===needsEval&&(D=doEval(I)),typeof D>"u"&&!T)throw new $TypeError$i("intrinsic "+C+" exists, but is not available. Please file an issue!");return{alias:M,name:I,value:D}}throw new $SyntaxError$1("intrinsic "+C+" does not exist!")},getIntrinsic=function(C,T){if(typeof C!="string"||C.length===0)throw new $TypeError$i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!="boolean")throw new $TypeError$i('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,C)===null)throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=stringToPath(C),M=I.length>0?I[0]:"",D=getBaseIntrinsic("%"+M+"%",T),L=D.name,B=D.value,N=!1,F=D.alias;F&&(M=F[0],$spliceApply(I,$concat([0,1],F)));for(var V=1,U=!0;V<I.length;V+=1){var H=I[V],G=$strSlice(H,0,1),Z=$strSlice(H,-1);if((G==='"'||G==="'"||G==="`"||Z==='"'||Z==="'"||Z==="`")&&G!==Z)throw new $SyntaxError$1("property names with quotes must have matching quotes");if((H==="constructor"||!U)&&(N=!0),M+="."+H,L="%"+M+"%",hasOwn$g(INTRINSICS,L))B=INTRINSICS[L];else if(B!=null){if(!(H in B)){if(!T)throw new $TypeError$i("base intrinsic for "+C+" exists, but the property is not available.");return}if($gOPD&&V+1>=I.length){var Y=$gOPD(B,H);U=!!Y,U&&"get"in Y&&!("originalValue"in Y.get)?B=Y.get:B=B[H]}else U=hasOwn$g(B,H),B=B[H];U&&!N&&(INTRINSICS[L]=B)}}return B},callBind$3={exports:{}},$defineProperty$3=esDefineProperty,$SyntaxError=syntax,$TypeError$h=type$1,gopd=gopd$1,defineDataProperty=function(C,T,I){if(!C||typeof C!="object"&&typeof C!="function")throw new $TypeError$h("`obj` must be an object or a function`");if(typeof T!="string"&&typeof T!="symbol")throw new $TypeError$h("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $TypeError$h("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $TypeError$h("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $TypeError$h("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $TypeError$h("`loose`, if provided, must be a boolean");var M=arguments.length>3?arguments[3]:null,D=arguments.length>4?arguments[4]:null,L=arguments.length>5?arguments[5]:null,B=arguments.length>6?arguments[6]:!1,N=!!gopd&&gopd(C,T);if($defineProperty$3)$defineProperty$3(C,T,{configurable:L===null&&N?N.configurable:!L,enumerable:M===null&&N?N.enumerable:!M,value:I,writable:D===null&&N?N.writable:!D});else if(B||!M&&!D&&!L)C[T]=I;else throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},$defineProperty$2=esDefineProperty,hasPropertyDescriptors=function(){return!!$defineProperty$2};hasPropertyDescriptors.hasArrayLengthDefineBug=function(){if(!$defineProperty$2)return null;try{return $defineProperty$2([],"length",{value:1}).length!==1}catch{return!0}};var hasPropertyDescriptors_1=hasPropertyDescriptors,GetIntrinsic$2=getIntrinsic,define=defineDataProperty,hasDescriptors=hasPropertyDescriptors_1(),gOPD$1=gopd$1,$TypeError$g=type$1,$floor=GetIntrinsic$2("%Math.floor%"),setFunctionLength=function(C,T){if(typeof C!="function")throw new $TypeError$g("`fn` is not a function");if(typeof T!="number"||T<0||T>4294967295||$floor(T)!==T)throw new $TypeError$g("`length` must be a positive 32-bit integer");var I=arguments.length>2&&!!arguments[2],M=!0,D=!0;if("length"in C&&gOPD$1){var L=gOPD$1(C,"length");L&&!L.configurable&&(M=!1),L&&!L.writable&&(D=!1)}return(M||D||!I)&&(hasDescriptors?define(C,"length",T,!0,!0):define(C,"length",T)),C},bind$f=functionBind$1,$apply=functionApply$1,actualApply=actualApply$1,applyBind=function(){return actualApply(bind$f,$apply,arguments)};(function(_){var C=setFunctionLength,T=esDefineProperty,I=callBindApplyHelpers,M=applyBind;_.exports=function(L){var B=I(arguments),N=L.length-(arguments.length-1);return C(B,1+(N>0?N:0),!0)},T?T(_.exports,"apply",{value:M}):_.exports.apply=M})(callBind$3);var callBindExports=callBind$3.exports,GetIntrinsic$1=getIntrinsic,callBind$2=callBindExports,$indexOf$4=callBind$2(GetIntrinsic$1("String.prototype.indexOf")),callBound$4=function(C,T){var I=GetIntrinsic$1(C,!!T);return typeof I=="function"&&$indexOf$4(C,".prototype.")>-1?callBind$2(I):I},hasToStringTag$3=shams(),callBound$3=callBound$4,$toString$4=callBound$3("Object.prototype.toString"),isStandardArguments=function(C){return hasToStringTag$3&&C&&typeof C=="object"&&Symbol.toStringTag in C?!1:$toString$4(C)==="[object Arguments]"},isLegacyArguments=function(C){return isStandardArguments(C)?!0:C!==null&&typeof C=="object"&&typeof C.length=="number"&&C.length>=0&&$toString$4(C)!=="[object Array]"&&$toString$4(C.callee)==="[object Function]"},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments;var isArguments$3=supportsStandardArguments?isStandardArguments:isLegacyArguments,toStr$3=Object.prototype.toString,fnToStr$1=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag$2=shams(),getProto=Object.getPrototypeOf,getGeneratorFunc=function(){if(!hasToStringTag$2)return!1;try{return Function("return function*() {}")()}catch{}},GeneratorFunction,isGeneratorFunction=function(C){if(typeof C!="function")return!1;if(isFnRegex.test(fnToStr$1.call(C)))return!0;if(!hasToStringTag$2){var T=toStr$3.call(C);return T==="[object GeneratorFunction]"}if(!getProto)return!1;if(typeof GeneratorFunction>"u"){var I=getGeneratorFunc();GeneratorFunction=I?getProto(I):!1}return getProto(C)===GeneratorFunction},fnToStr=Function.prototype.toString,reflectApply=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,badArrayLike,isCallableMarker;if(typeof reflectApply=="function"&&typeof Object.defineProperty=="function")try{badArrayLike=Object.defineProperty({},"length",{get:function(){throw isCallableMarker}}),isCallableMarker={},reflectApply(function(){throw 42},null,badArrayLike)}catch(_){_!==isCallableMarker&&(reflectApply=null)}else reflectApply=null;var constructorRegex=/^\s*class\b/,isES6ClassFn=function(C){try{var T=fnToStr.call(C);return constructorRegex.test(T)}catch{return!1}},tryFunctionObject=function(C){try{return isES6ClassFn(C)?!1:(fnToStr.call(C),!0)}catch{return!1}},toStr$2=Object.prototype.toString,objectClass="[object Object]",fnClass="[object Function]",genClass="[object GeneratorFunction]",ddaClass="[object HTMLAllCollection]",ddaClass2="[object HTML document.all class]",ddaClass3="[object HTMLCollection]",hasToStringTag$1=typeof Symbol=="function"&&!!Symbol.toStringTag,isIE68=!(0 in[,]),isDDA=function(){return!1};if(typeof document=="object"){var all=document.all;toStr$2.call(all)===toStr$2.call(document.all)&&(isDDA=function(C){if((isIE68||!C)&&(typeof C>"u"||typeof C=="object"))try{var T=toStr$2.call(C);return(T===ddaClass||T===ddaClass2||T===ddaClass3||T===objectClass)&&C("")==null}catch{}return!1})}var isCallable$j=reflectApply?function(C){if(isDDA(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;try{reflectApply(C,null,badArrayLike)}catch(T){if(T!==isCallableMarker)return!1}return!isES6ClassFn(C)&&tryFunctionObject(C)}:function(C){if(isDDA(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;if(hasToStringTag$1)return tryFunctionObject(C);if(isES6ClassFn(C))return!1;var T=toStr$2.call(C);return T!==fnClass&&T!==genClass&&!/^\[object HTML/.test(T)?!1:tryFunctionObject(C)},isCallable$i=isCallable$j,toStr$1=Object.prototype.toString,hasOwnProperty$6=Object.prototype.hasOwnProperty,forEachArray=function(C,T,I){for(var M=0,D=C.length;M<D;M++)hasOwnProperty$6.call(C,M)&&(I==null?T(C[M],M,C):T.call(I,C[M],M,C))},forEachString=function(C,T,I){for(var M=0,D=C.length;M<D;M++)I==null?T(C.charAt(M),M,C):T.call(I,C.charAt(M),M,C)},forEachObject=function(C,T,I){for(var M in C)hasOwnProperty$6.call(C,M)&&(I==null?T(C[M],M,C):T.call(I,C[M],M,C))},forEach$6=function(C,T,I){if(!isCallable$i(T))throw new TypeError("iterator must be a function");var M;arguments.length>=3&&(M=I),toStr$1.call(C)==="[object Array]"?forEachArray(C,T,M):typeof C=="string"?forEachString(C,T,M):forEachObject(C,T,M)},forEach_1=forEach$6,possibleTypedArrayNames=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],possibleNames=possibleTypedArrayNames,g$3=typeof globalThis>"u"?commonjsGlobal:globalThis,availableTypedArrays$1=function(){for(var C=[],T=0;T<possibleNames.length;T++)typeof g$3[possibleNames[T]]=="function"&&(C[C.length]=possibleNames[T]);return C},GetIntrinsic=getIntrinsic,callBindBasic=callBindApplyHelpers,$indexOf$3=callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]),callBound$2=function(C,T){var I=GetIntrinsic(C,!!T);return typeof I=="function"&&$indexOf$3(C,".prototype.")>-1?callBindBasic([I]):I},forEach$5=forEach_1,availableTypedArrays=availableTypedArrays$1,callBind$1=callBindExports,callBound$1=callBound$2,gOPD=gopd$1,$toString$3=callBound$1("Object.prototype.toString"),hasToStringTag=shams(),g$2=typeof globalThis>"u"?commonjsGlobal:globalThis,typedArrays=availableTypedArrays(),$slice=callBound$1("String.prototype.slice"),getPrototypeOf$9=Object.getPrototypeOf,$indexOf$2=callBound$1("Array.prototype.indexOf",!0)||function(C,T){for(var I=0;I<C.length;I+=1)if(C[I]===T)return I;return-1},cache$2={__proto__:null};hasToStringTag&&gOPD&&getPrototypeOf$9?forEach$5(typedArrays,function(_){var C=new g$2[_];if(Symbol.toStringTag in C){var T=getPrototypeOf$9(C),I=gOPD(T,Symbol.toStringTag);if(!I){var M=getPrototypeOf$9(T);I=gOPD(M,Symbol.toStringTag)}cache$2["$"+_]=callBind$1(I.get)}}):forEach$5(typedArrays,function(_){var C=new g$2[_],T=C.slice||C.set;T&&(cache$2["$"+_]=callBind$1(T))});var tryTypedArrays=function(C){var T=!1;return forEach$5(cache$2,function(I,M){if(!T)try{"$"+I(C)===M&&(T=$slice(M,1))}catch{}}),T},trySlices=function(C){var T=!1;return forEach$5(cache$2,function(I,M){if(!T)try{I(C),T=$slice(M,1)}catch{}}),T},whichTypedArray$1=function(C){if(!C||typeof C!="object")return!1;if(!hasToStringTag){var T=$slice($toString$3(C),8,-1);return $indexOf$2(typedArrays,T)>-1?T:T!=="Object"?!1:trySlices(C)}return gOPD?tryTypedArrays(C):null},whichTypedArray=whichTypedArray$1,isTypedArray$2=function(C){return!!whichTypedArray(C)};(function(_){var C=isArguments$3,T=isGeneratorFunction,I=whichTypedArray$1,M=isTypedArray$2;function D(De){return De.call.bind(De)}var L=typeof BigInt<"u",B=typeof Symbol<"u",N=D(Object.prototype.toString),F=D(Number.prototype.valueOf),V=D(String.prototype.valueOf),U=D(Boolean.prototype.valueOf);if(L)var H=D(BigInt.prototype.valueOf);if(B)var G=D(Symbol.prototype.valueOf);function Z(De,Xe){if(typeof De!="object")return!1;try{return Xe(De),!0}catch{return!1}}_.isArgumentsObject=C,_.isGeneratorFunction=T,_.isTypedArray=M;function Y(De){return typeof Promise<"u"&&De instanceof Promise||De!==null&&typeof De=="object"&&typeof De.then=="function"&&typeof De.catch=="function"}_.isPromise=Y;function J(De){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(De):M(De)||ue(De)}_.isArrayBufferView=J;function X(De){return I(De)==="Uint8Array"}_.isUint8Array=X;function oe(De){return I(De)==="Uint8ClampedArray"}_.isUint8ClampedArray=oe;function ae(De){return I(De)==="Uint16Array"}_.isUint16Array=ae;function le(De){return I(De)==="Uint32Array"}_.isUint32Array=le;function he(De){return I(De)==="Int8Array"}_.isInt8Array=he;function me(De){return I(De)==="Int16Array"}_.isInt16Array=me;function ve(De){return I(De)==="Int32Array"}_.isInt32Array=ve;function Se(De){return I(De)==="Float32Array"}_.isFloat32Array=Se;function Pe(De){return I(De)==="Float64Array"}_.isFloat64Array=Pe;function Ve(De){return I(De)==="BigInt64Array"}_.isBigInt64Array=Ve;function Ne(De){return I(De)==="BigUint64Array"}_.isBigUint64Array=Ne;function ze(De){return N(De)==="[object Map]"}ze.working=typeof Map<"u"&&ze(new Map);function fe(De){return typeof Map>"u"?!1:ze.working?ze(De):De instanceof Map}_.isMap=fe;function W(De){return N(De)==="[object Set]"}W.working=typeof Set<"u"&&W(new Set);function Q(De){return typeof Set>"u"?!1:W.working?W(De):De instanceof Set}_.isSet=Q;function ne(De){return N(De)==="[object WeakMap]"}ne.working=typeof WeakMap<"u"&&ne(new WeakMap);function ie(De){return typeof WeakMap>"u"?!1:ne.working?ne(De):De instanceof WeakMap}_.isWeakMap=ie;function te(De){return N(De)==="[object WeakSet]"}te.working=typeof WeakSet<"u"&&te(new WeakSet);function se(De){return te(De)}_.isWeakSet=se;function pe(De){return N(De)==="[object ArrayBuffer]"}pe.working=typeof ArrayBuffer<"u"&&pe(new ArrayBuffer);function ce(De){return typeof ArrayBuffer>"u"?!1:pe.working?pe(De):De instanceof ArrayBuffer}_.isArrayBuffer=ce;function ee(De){return N(De)==="[object DataView]"}ee.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ee(new DataView(new ArrayBuffer(1),0,1));function ue(De){return typeof DataView>"u"?!1:ee.working?ee(De):De instanceof DataView}_.isDataView=ue;var Oe=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ye(De){return N(De)==="[object SharedArrayBuffer]"}function we(De){return typeof Oe>"u"?!1:(typeof ye.working>"u"&&(ye.working=ye(new Oe)),ye.working?ye(De):De instanceof Oe)}_.isSharedArrayBuffer=we;function _e(De){return N(De)==="[object AsyncFunction]"}_.isAsyncFunction=_e;function Ce(De){return N(De)==="[object Map Iterator]"}_.isMapIterator=Ce;function ke(De){return N(De)==="[object Set Iterator]"}_.isSetIterator=ke;function Le(De){return N(De)==="[object Generator]"}_.isGeneratorObject=Le;function ge(De){return N(De)==="[object WebAssembly.Module]"}_.isWebAssemblyCompiledModule=ge;function de(De){return Z(De,F)}_.isNumberObject=de;function Ee(De){return Z(De,V)}_.isStringObject=Ee;function xe(De){return Z(De,U)}_.isBooleanObject=xe;function Re(De){return L&&Z(De,H)}_.isBigIntObject=Re;function We(De){return B&&Z(De,G)}_.isSymbolObject=We;function Fe(De){return de(De)||Ee(De)||xe(De)||Re(De)||We(De)}_.isBoxedPrimitive=Fe;function Ie(De){return typeof Uint8Array<"u"&&(ce(De)||we(De))}_.isAnyArrayBuffer=Ie,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(De){Object.defineProperty(_,De,{enumerable:!1,value:function(){throw new Error(De+" is not supported in userland")}})})})(types$3);var isBufferBrowser=function(C){return C&&typeof C=="object"&&typeof C.copy=="function"&&typeof C.fill=="function"&&typeof C.readUInt8=="function"};(function(_){var C={},T=Object.getOwnPropertyDescriptors||function(Oe){for(var ye=Object.keys(Oe),we={},_e=0;_e<ye.length;_e++)we[ye[_e]]=Object.getOwnPropertyDescriptor(Oe,ye[_e]);return we},I=/%[sdj%]/g;_.format=function(ue){if(!me(ue)){for(var Oe=[],ye=0;ye<arguments.length;ye++)Oe.push(B(arguments[ye]));return Oe.join(" ")}for(var ye=1,we=arguments,_e=we.length,Ce=String(ue).replace(I,function(Le){if(Le==="%%")return"%";if(ye>=_e)return Le;switch(Le){case"%s":return String(we[ye++]);case"%d":return Number(we[ye++]);case"%j":try{return JSON.stringify(we[ye++])}catch{return"[Circular]"}default:return Le}}),ke=we[ye];ye<_e;ke=we[++ye])ae(ke)||!Ve(ke)?Ce+=" "+ke:Ce+=" "+B(ke);return Ce},_.deprecate=function(ue,Oe){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return ue;if(typeof process$1>"u")return function(){return _.deprecate(ue,Oe).apply(this,arguments)};var ye=!1;function we(){if(!ye){if(process$1.throwDeprecation)throw new Error(Oe);process$1.traceDeprecation?console.trace(Oe):console.error(Oe),ye=!0}return ue.apply(this,arguments)}return we};var M={},D=/^$/;if(C.NODE_DEBUG){var L=C.NODE_DEBUG;L=L.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),D=new RegExp("^"+L+"$","i")}_.debuglog=function(ue){if(ue=ue.toUpperCase(),!M[ue])if(D.test(ue)){var Oe=process$1.pid;M[ue]=function(){var ye=_.format.apply(_,arguments);console.error("%s %d: %s",ue,Oe,ye)}}else M[ue]=function(){};return M[ue]};function B(ue,Oe){var ye={seen:[],stylize:F};return arguments.length>=3&&(ye.depth=arguments[2]),arguments.length>=4&&(ye.colors=arguments[3]),oe(Oe)?ye.showHidden=Oe:Oe&&_._extend(ye,Oe),Se(ye.showHidden)&&(ye.showHidden=!1),Se(ye.depth)&&(ye.depth=2),Se(ye.colors)&&(ye.colors=!1),Se(ye.customInspect)&&(ye.customInspect=!0),ye.colors&&(ye.stylize=N),U(ye,ue,ye.depth)}_.inspect=B,B.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},B.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function N(ue,Oe){var ye=B.styles[Oe];return ye?"\x1B["+B.colors[ye][0]+"m"+ue+"\x1B["+B.colors[ye][1]+"m":ue}function F(ue,Oe){return ue}function V(ue){var Oe={};return ue.forEach(function(ye,we){Oe[ye]=!0}),Oe}function U(ue,Oe,ye){if(ue.customInspect&&Oe&&fe(Oe.inspect)&&Oe.inspect!==_.inspect&&!(Oe.constructor&&Oe.constructor.prototype===Oe)){var we=Oe.inspect(ye,ue);return me(we)||(we=U(ue,we,ye)),we}var _e=H(ue,Oe);if(_e)return _e;var Ce=Object.keys(Oe),ke=V(Ce);if(ue.showHidden&&(Ce=Object.getOwnPropertyNames(Oe)),ze(Oe)&&(Ce.indexOf("message")>=0||Ce.indexOf("description")>=0))return G(Oe);if(Ce.length===0){if(fe(Oe)){var Le=Oe.name?": "+Oe.name:"";return ue.stylize("[Function"+Le+"]","special")}if(Pe(Oe))return ue.stylize(RegExp.prototype.toString.call(Oe),"regexp");if(Ne(Oe))return ue.stylize(Date.prototype.toString.call(Oe),"date");if(ze(Oe))return G(Oe)}var ge="",de=!1,Ee=["{","}"];if(X(Oe)&&(de=!0,Ee=["[","]"]),fe(Oe)){var xe=Oe.name?": "+Oe.name:"";ge=" [Function"+xe+"]"}if(Pe(Oe)&&(ge=" "+RegExp.prototype.toString.call(Oe)),Ne(Oe)&&(ge=" "+Date.prototype.toUTCString.call(Oe)),ze(Oe)&&(ge=" "+G(Oe)),Ce.length===0&&(!de||Oe.length==0))return Ee[0]+ge+Ee[1];if(ye<0)return Pe(Oe)?ue.stylize(RegExp.prototype.toString.call(Oe),"regexp"):ue.stylize("[Object]","special");ue.seen.push(Oe);var Re;return de?Re=Z(ue,Oe,ye,ke,Ce):Re=Ce.map(function(We){return Y(ue,Oe,ye,ke,We,de)}),ue.seen.pop(),J(Re,ge,Ee)}function H(ue,Oe){if(Se(Oe))return ue.stylize("undefined","undefined");if(me(Oe)){var ye="'"+JSON.stringify(Oe).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ue.stylize(ye,"string")}if(he(Oe))return ue.stylize(""+Oe,"number");if(oe(Oe))return ue.stylize(""+Oe,"boolean");if(ae(Oe))return ue.stylize("null","null")}function G(ue){return"["+Error.prototype.toString.call(ue)+"]"}function Z(ue,Oe,ye,we,_e){for(var Ce=[],ke=0,Le=Oe.length;ke<Le;++ke)se(Oe,String(ke))?Ce.push(Y(ue,Oe,ye,we,String(ke),!0)):Ce.push("");return _e.forEach(function(ge){ge.match(/^\d+$/)||Ce.push(Y(ue,Oe,ye,we,ge,!0))}),Ce}function Y(ue,Oe,ye,we,_e,Ce){var ke,Le,ge;if(ge=Object.getOwnPropertyDescriptor(Oe,_e)||{value:Oe[_e]},ge.get?ge.set?Le=ue.stylize("[Getter/Setter]","special"):Le=ue.stylize("[Getter]","special"):ge.set&&(Le=ue.stylize("[Setter]","special")),se(we,_e)||(ke="["+_e+"]"),Le||(ue.seen.indexOf(ge.value)<0?(ae(ye)?Le=U(ue,ge.value,null):Le=U(ue,ge.value,ye-1),Le.indexOf(`
74
+ Use Chrome, Firefox or Internet Explorer 11`)}var Buffer$2=safeBufferExports.Buffer,crypto=commonjsGlobal.crypto||commonjsGlobal.msCrypto;crypto&&crypto.getRandomValues?browser$d.exports=randomBytes:browser$d.exports=oldBrowser;function randomBytes(_,C){if(_>MAX_UINT32)throw new RangeError("requested too many random bytes");var T=Buffer$2.allocUnsafe(_);if(_>0)if(_>MAX_BYTES)for(var I=0;I<_;I+=MAX_BYTES)crypto.getRandomValues(T.slice(I,I+MAX_BYTES));else crypto.getRandomValues(T);return typeof C=="function"?process$1.nextTick(function(){C(null,T)}):T}var browserExports=browser$d.exports,encode$4={},lib$6={},baseGetTag$2=_baseGetTag,isObjectLike$5=isObjectLike_1,boolTag$1="[object Boolean]";function isBoolean(_){return _===!0||_===!1||isObjectLike$5(_)&&baseGetTag$2(_)==boolTag$1}var isBoolean_1=isBoolean,baseGetTag$1=_baseGetTag,isArray$j=isArray_1,isObjectLike$4=isObjectLike_1,stringTag$1="[object String]";function isString(_){return typeof _=="string"||!isArray$j(_)&&isObjectLike$4(_)&&baseGetTag$1(_)==stringTag$1}var isString_1=isString;const isString$1=getDefaultExportFromCjs(isString_1);var baseGetTag=_baseGetTag,isObjectLike$3=isObjectLike_1,numberTag$1="[object Number]";function isNumber(_){return typeof _=="number"||isObjectLike$3(_)&&baseGetTag(_)==numberTag$1}var isNumber_1=isNumber,castSlice$1=_castSlice,hasUnicode=_hasUnicode,stringToArray$1=_stringToArray,toString$r=toString_1;function createCaseFirst$1(_){return function(C){C=toString$r(C);var T=hasUnicode(C)?stringToArray$1(C):void 0,I=T?T[0]:C.charAt(0),M=T?castSlice$1(T,1).join(""):C.slice(1);return I[_]()+M}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst$1=createCaseFirst("toUpperCase"),upperFirst_1$1=upperFirst$1;const upperFirst$2=getDefaultExportFromCjs(upperFirst_1$1);var toString$q=toString_1,upperFirst=upperFirst_1$1;function capitalize$3(_){return upperFirst(toString$q(_).toLowerCase())}var capitalize_1$1=capitalize$3;function arrayReduce$2(_,C,T,I){var M=-1,D=_==null?0:_.length;for(I&&D&&(T=_[++M]);++M<D;)T=C(T,_[M],M,_);return T}var _arrayReduce=arrayReduce$2;function basePropertyOf$1(_){return function(C){return _==null?void 0:_[C]}}var _basePropertyOf=basePropertyOf$1,basePropertyOf=_basePropertyOf,deburredLetters={À:"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",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},deburrLetter$1=basePropertyOf(deburredLetters),_deburrLetter=deburrLetter$1,deburrLetter=_deburrLetter,toString$p=toString_1,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsCombo$1="["+rsComboRange$1+"]",reComboMark=RegExp(rsCombo$1,"g");function deburr$1(_){return _=toString$p(_),_&&_.replace(reLatin,deburrLetter).replace(reComboMark,"")}var deburr_1=deburr$1,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function asciiWords$1(_){return _.match(reAsciiWord)||[]}var _asciiWords=asciiWords$1,reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function hasUnicodeWord$1(_){return reHasUnicodeWord.test(_)}var _hasUnicodeWord=hasUnicodeWord$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\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",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos$1="['’]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos$1+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos$1+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g");function unicodeWords$1(_){return _.match(reUnicodeWord)||[]}var _unicodeWords=unicodeWords$1,asciiWords=_asciiWords,hasUnicodeWord=_hasUnicodeWord,toString$o=toString_1,unicodeWords=_unicodeWords;function words$1(_,C,T){return _=toString$o(_),C=T?void 0:C,C===void 0?hasUnicodeWord(_)?unicodeWords(_):asciiWords(_):_.match(C)||[]}var words_1=words$1,arrayReduce$1=_arrayReduce,deburr=deburr_1,words=words_1,rsApos="['’]",reApos=RegExp(rsApos,"g");function createCompounder$1(_){return function(C){return arrayReduce$1(words(deburr(C).replace(reApos,"")),_,"")}}var _createCompounder=createCompounder$1,capitalize$2=capitalize_1$1,createCompounder=_createCompounder,camelCase=createCompounder(function(_,C,T){return C=C.toLowerCase(),_+(T?capitalize$2(C):C)}),camelCase_1=camelCase;const camelCase$1=getDefaultExportFromCjs(camelCase_1);function isNull(_){return _===null}var isNull_1=isNull;const isNull$1=getDefaultExportFromCjs(isNull_1);var createPadding=_createPadding,stringSize=_stringSize,toInteger$1=toInteger_1,toString$n=toString_1;function padEnd(_,C,T){_=toString$n(_),C=toInteger$1(C);var I=C?stringSize(_):0;return C&&I<C?_+createPadding(C-I,T):_}var padEnd_1=padEnd,base64Url={unescape:unescape$2,escape:escape$3,encode:encode$3,decode:decode$1};function unescape$2(_){return(_+"===".slice((_.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/")}function escape$3(_){return _.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function encode$3(_,C){return escape$3(Buffer$3.from(_,C||"utf8").toString("base64"))}function decode$1(_,C){return Buffer$3.from(unescape$2(_),"base64").toString(C||"utf8")}const base64$1=getDefaultExportFromCjs(base64Url);var bn$2={exports:{}};bn$2.exports;(function(_){(function(C,T){function I(fe,W){if(!fe)throw new Error(W||"Assertion failed")}function M(fe,W){fe.super_=W;var Q=function(){};Q.prototype=W.prototype,fe.prototype=new Q,fe.prototype.constructor=fe}function D(fe,W,Q){if(D.isBN(fe))return fe;this.negative=0,this.words=null,this.length=0,this.red=null,fe!==null&&((W==="le"||W==="be")&&(Q=W,W=10),this._init(fe||0,W||10,Q||"be"))}typeof C=="object"?C.exports=D:T.BN=D,D.BN=D,D.wordSize=26;var L;try{typeof window<"u"&&typeof window.Buffer<"u"?L=window.Buffer:L=require$$1$5.Buffer}catch{}D.isBN=function(W){return W instanceof D?!0:W!==null&&typeof W=="object"&&W.constructor.wordSize===D.wordSize&&Array.isArray(W.words)},D.max=function(W,Q){return W.cmp(Q)>0?W:Q},D.min=function(W,Q){return W.cmp(Q)<0?W:Q},D.prototype._init=function(W,Q,ne){if(typeof W=="number")return this._initNumber(W,Q,ne);if(typeof W=="object")return this._initArray(W,Q,ne);Q==="hex"&&(Q=16),I(Q===(Q|0)&&Q>=2&&Q<=36),W=W.toString().replace(/\s+/g,"");var ie=0;W[0]==="-"&&(ie++,this.negative=1),ie<W.length&&(Q===16?this._parseHex(W,ie,ne):(this._parseBase(W,Q,ie),ne==="le"&&this._initArray(this.toArray(),Q,ne)))},D.prototype._initNumber=function(W,Q,ne){W<0&&(this.negative=1,W=-W),W<67108864?(this.words=[W&67108863],this.length=1):W<4503599627370496?(this.words=[W&67108863,W/67108864&67108863],this.length=2):(I(W<9007199254740992),this.words=[W&67108863,W/67108864&67108863,1],this.length=3),ne==="le"&&this._initArray(this.toArray(),Q,ne)},D.prototype._initArray=function(W,Q,ne){if(I(typeof W.length=="number"),W.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(W.length/3),this.words=new Array(this.length);for(var ie=0;ie<this.length;ie++)this.words[ie]=0;var te,se,pe=0;if(ne==="be")for(ie=W.length-1,te=0;ie>=0;ie-=3)se=W[ie]|W[ie-1]<<8|W[ie-2]<<16,this.words[te]|=se<<pe&67108863,this.words[te+1]=se>>>26-pe&67108863,pe+=24,pe>=26&&(pe-=26,te++);else if(ne==="le")for(ie=0,te=0;ie<W.length;ie+=3)se=W[ie]|W[ie+1]<<8|W[ie+2]<<16,this.words[te]|=se<<pe&67108863,this.words[te+1]=se>>>26-pe&67108863,pe+=24,pe>=26&&(pe-=26,te++);return this._strip()};function B(fe,W){var Q=fe.charCodeAt(W);if(Q>=48&&Q<=57)return Q-48;if(Q>=65&&Q<=70)return Q-55;if(Q>=97&&Q<=102)return Q-87;I(!1,"Invalid character in "+fe)}function N(fe,W,Q){var ne=B(fe,Q);return Q-1>=W&&(ne|=B(fe,Q-1)<<4),ne}D.prototype._parseHex=function(W,Q,ne){this.length=Math.ceil((W.length-Q)/6),this.words=new Array(this.length);for(var ie=0;ie<this.length;ie++)this.words[ie]=0;var te=0,se=0,pe;if(ne==="be")for(ie=W.length-1;ie>=Q;ie-=2)pe=N(W,Q,ie)<<te,this.words[se]|=pe&67108863,te>=18?(te-=18,se+=1,this.words[se]|=pe>>>26):te+=8;else{var ce=W.length-Q;for(ie=ce%2===0?Q+1:Q;ie<W.length;ie+=2)pe=N(W,Q,ie)<<te,this.words[se]|=pe&67108863,te>=18?(te-=18,se+=1,this.words[se]|=pe>>>26):te+=8}this._strip()};function F(fe,W,Q,ne){for(var ie=0,te=0,se=Math.min(fe.length,Q),pe=W;pe<se;pe++){var ce=fe.charCodeAt(pe)-48;ie*=ne,ce>=49?te=ce-49+10:ce>=17?te=ce-17+10:te=ce,I(ce>=0&&te<ne,"Invalid character"),ie+=te}return ie}D.prototype._parseBase=function(W,Q,ne){this.words=[0],this.length=1;for(var ie=0,te=1;te<=67108863;te*=Q)ie++;ie--,te=te/Q|0;for(var se=W.length-ne,pe=se%ie,ce=Math.min(se,se-pe)+ne,ee=0,ue=ne;ue<ce;ue+=ie)ee=F(W,ue,ue+ie,Q),this.imuln(te),this.words[0]+ee<67108864?this.words[0]+=ee:this._iaddn(ee);if(pe!==0){var Oe=1;for(ee=F(W,ue,W.length,Q),ue=0;ue<pe;ue++)Oe*=Q;this.imuln(Oe),this.words[0]+ee<67108864?this.words[0]+=ee:this._iaddn(ee)}this._strip()},D.prototype.copy=function(W){W.words=new Array(this.length);for(var Q=0;Q<this.length;Q++)W.words[Q]=this.words[Q];W.length=this.length,W.negative=this.negative,W.red=this.red};function V(fe,W){fe.words=W.words,fe.length=W.length,fe.negative=W.negative,fe.red=W.red}if(D.prototype._move=function(W){V(W,this)},D.prototype.clone=function(){var W=new D(null);return this.copy(W),W},D.prototype._expand=function(W){for(;this.length<W;)this.words[this.length++]=0;return this},D.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},D.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{D.prototype[Symbol.for("nodejs.util.inspect.custom")]=U}catch{D.prototype.inspect=U}else D.prototype.inspect=U;function U(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var H=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],G=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],Z=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];D.prototype.toString=function(W,Q){W=W||10,Q=Q|0||1;var ne;if(W===16||W==="hex"){ne="";for(var ie=0,te=0,se=0;se<this.length;se++){var pe=this.words[se],ce=((pe<<ie|te)&16777215).toString(16);te=pe>>>24-ie&16777215,ie+=2,ie>=26&&(ie-=26,se--),te!==0||se!==this.length-1?ne=H[6-ce.length]+ce+ne:ne=ce+ne}for(te!==0&&(ne=te.toString(16)+ne);ne.length%Q!==0;)ne="0"+ne;return this.negative!==0&&(ne="-"+ne),ne}if(W===(W|0)&&W>=2&&W<=36){var ee=G[W],ue=Z[W];ne="";var Oe=this.clone();for(Oe.negative=0;!Oe.isZero();){var ye=Oe.modrn(ue).toString(W);Oe=Oe.idivn(ue),Oe.isZero()?ne=ye+ne:ne=H[ee-ye.length]+ye+ne}for(this.isZero()&&(ne="0"+ne);ne.length%Q!==0;)ne="0"+ne;return this.negative!==0&&(ne="-"+ne),ne}I(!1,"Base should be between 2 and 36")},D.prototype.toNumber=function(){var W=this.words[0];return this.length===2?W+=this.words[1]*67108864:this.length===3&&this.words[2]===1?W+=4503599627370496+this.words[1]*67108864:this.length>2&&I(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-W:W},D.prototype.toJSON=function(){return this.toString(16,2)},L&&(D.prototype.toBuffer=function(W,Q){return this.toArrayLike(L,W,Q)}),D.prototype.toArray=function(W,Q){return this.toArrayLike(Array,W,Q)};var Y=function(W,Q){return W.allocUnsafe?W.allocUnsafe(Q):new W(Q)};D.prototype.toArrayLike=function(W,Q,ne){this._strip();var ie=this.byteLength(),te=ne||Math.max(1,ie);I(ie<=te,"byte array longer than desired length"),I(te>0,"Requested array length <= 0");var se=Y(W,te),pe=Q==="le"?"LE":"BE";return this["_toArrayLike"+pe](se,ie),se},D.prototype._toArrayLikeLE=function(W,Q){for(var ne=0,ie=0,te=0,se=0;te<this.length;te++){var pe=this.words[te]<<se|ie;W[ne++]=pe&255,ne<W.length&&(W[ne++]=pe>>8&255),ne<W.length&&(W[ne++]=pe>>16&255),se===6?(ne<W.length&&(W[ne++]=pe>>24&255),ie=0,se=0):(ie=pe>>>24,se+=2)}if(ne<W.length)for(W[ne++]=ie;ne<W.length;)W[ne++]=0},D.prototype._toArrayLikeBE=function(W,Q){for(var ne=W.length-1,ie=0,te=0,se=0;te<this.length;te++){var pe=this.words[te]<<se|ie;W[ne--]=pe&255,ne>=0&&(W[ne--]=pe>>8&255),ne>=0&&(W[ne--]=pe>>16&255),se===6?(ne>=0&&(W[ne--]=pe>>24&255),ie=0,se=0):(ie=pe>>>24,se+=2)}if(ne>=0)for(W[ne--]=ie;ne>=0;)W[ne--]=0},Math.clz32?D.prototype._countBits=function(W){return 32-Math.clz32(W)}:D.prototype._countBits=function(W){var Q=W,ne=0;return Q>=4096&&(ne+=13,Q>>>=13),Q>=64&&(ne+=7,Q>>>=7),Q>=8&&(ne+=4,Q>>>=4),Q>=2&&(ne+=2,Q>>>=2),ne+Q},D.prototype._zeroBits=function(W){if(W===0)return 26;var Q=W,ne=0;return Q&8191||(ne+=13,Q>>>=13),Q&127||(ne+=7,Q>>>=7),Q&15||(ne+=4,Q>>>=4),Q&3||(ne+=2,Q>>>=2),Q&1||ne++,ne},D.prototype.bitLength=function(){var W=this.words[this.length-1],Q=this._countBits(W);return(this.length-1)*26+Q};function J(fe){for(var W=new Array(fe.bitLength()),Q=0;Q<W.length;Q++){var ne=Q/26|0,ie=Q%26;W[Q]=fe.words[ne]>>>ie&1}return W}D.prototype.zeroBits=function(){if(this.isZero())return 0;for(var W=0,Q=0;Q<this.length;Q++){var ne=this._zeroBits(this.words[Q]);if(W+=ne,ne!==26)break}return W},D.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},D.prototype.toTwos=function(W){return this.negative!==0?this.abs().inotn(W).iaddn(1):this.clone()},D.prototype.fromTwos=function(W){return this.testn(W-1)?this.notn(W).iaddn(1).ineg():this.clone()},D.prototype.isNeg=function(){return this.negative!==0},D.prototype.neg=function(){return this.clone().ineg()},D.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},D.prototype.iuor=function(W){for(;this.length<W.length;)this.words[this.length++]=0;for(var Q=0;Q<W.length;Q++)this.words[Q]=this.words[Q]|W.words[Q];return this._strip()},D.prototype.ior=function(W){return I((this.negative|W.negative)===0),this.iuor(W)},D.prototype.or=function(W){return this.length>W.length?this.clone().ior(W):W.clone().ior(this)},D.prototype.uor=function(W){return this.length>W.length?this.clone().iuor(W):W.clone().iuor(this)},D.prototype.iuand=function(W){var Q;this.length>W.length?Q=W:Q=this;for(var ne=0;ne<Q.length;ne++)this.words[ne]=this.words[ne]&W.words[ne];return this.length=Q.length,this._strip()},D.prototype.iand=function(W){return I((this.negative|W.negative)===0),this.iuand(W)},D.prototype.and=function(W){return this.length>W.length?this.clone().iand(W):W.clone().iand(this)},D.prototype.uand=function(W){return this.length>W.length?this.clone().iuand(W):W.clone().iuand(this)},D.prototype.iuxor=function(W){var Q,ne;this.length>W.length?(Q=this,ne=W):(Q=W,ne=this);for(var ie=0;ie<ne.length;ie++)this.words[ie]=Q.words[ie]^ne.words[ie];if(this!==Q)for(;ie<Q.length;ie++)this.words[ie]=Q.words[ie];return this.length=Q.length,this._strip()},D.prototype.ixor=function(W){return I((this.negative|W.negative)===0),this.iuxor(W)},D.prototype.xor=function(W){return this.length>W.length?this.clone().ixor(W):W.clone().ixor(this)},D.prototype.uxor=function(W){return this.length>W.length?this.clone().iuxor(W):W.clone().iuxor(this)},D.prototype.inotn=function(W){I(typeof W=="number"&&W>=0);var Q=Math.ceil(W/26)|0,ne=W%26;this._expand(Q),ne>0&&Q--;for(var ie=0;ie<Q;ie++)this.words[ie]=~this.words[ie]&67108863;return ne>0&&(this.words[ie]=~this.words[ie]&67108863>>26-ne),this._strip()},D.prototype.notn=function(W){return this.clone().inotn(W)},D.prototype.setn=function(W,Q){I(typeof W=="number"&&W>=0);var ne=W/26|0,ie=W%26;return this._expand(ne+1),Q?this.words[ne]=this.words[ne]|1<<ie:this.words[ne]=this.words[ne]&~(1<<ie),this._strip()},D.prototype.iadd=function(W){var Q;if(this.negative!==0&&W.negative===0)return this.negative=0,Q=this.isub(W),this.negative^=1,this._normSign();if(this.negative===0&&W.negative!==0)return W.negative=0,Q=this.isub(W),W.negative=1,Q._normSign();var ne,ie;this.length>W.length?(ne=this,ie=W):(ne=W,ie=this);for(var te=0,se=0;se<ie.length;se++)Q=(ne.words[se]|0)+(ie.words[se]|0)+te,this.words[se]=Q&67108863,te=Q>>>26;for(;te!==0&&se<ne.length;se++)Q=(ne.words[se]|0)+te,this.words[se]=Q&67108863,te=Q>>>26;if(this.length=ne.length,te!==0)this.words[this.length]=te,this.length++;else if(ne!==this)for(;se<ne.length;se++)this.words[se]=ne.words[se];return this},D.prototype.add=function(W){var Q;return W.negative!==0&&this.negative===0?(W.negative=0,Q=this.sub(W),W.negative^=1,Q):W.negative===0&&this.negative!==0?(this.negative=0,Q=W.sub(this),this.negative=1,Q):this.length>W.length?this.clone().iadd(W):W.clone().iadd(this)},D.prototype.isub=function(W){if(W.negative!==0){W.negative=0;var Q=this.iadd(W);return W.negative=1,Q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(W),this.negative=1,this._normSign();var ne=this.cmp(W);if(ne===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ie,te;ne>0?(ie=this,te=W):(ie=W,te=this);for(var se=0,pe=0;pe<te.length;pe++)Q=(ie.words[pe]|0)-(te.words[pe]|0)+se,se=Q>>26,this.words[pe]=Q&67108863;for(;se!==0&&pe<ie.length;pe++)Q=(ie.words[pe]|0)+se,se=Q>>26,this.words[pe]=Q&67108863;if(se===0&&pe<ie.length&&ie!==this)for(;pe<ie.length;pe++)this.words[pe]=ie.words[pe];return this.length=Math.max(this.length,pe),ie!==this&&(this.negative=1),this._strip()},D.prototype.sub=function(W){return this.clone().isub(W)};function X(fe,W,Q){Q.negative=W.negative^fe.negative;var ne=fe.length+W.length|0;Q.length=ne,ne=ne-1|0;var ie=fe.words[0]|0,te=W.words[0]|0,se=ie*te,pe=se&67108863,ce=se/67108864|0;Q.words[0]=pe;for(var ee=1;ee<ne;ee++){for(var ue=ce>>>26,Oe=ce&67108863,ye=Math.min(ee,W.length-1),we=Math.max(0,ee-fe.length+1);we<=ye;we++){var _e=ee-we|0;ie=fe.words[_e]|0,te=W.words[we]|0,se=ie*te+Oe,ue+=se/67108864|0,Oe=se&67108863}Q.words[ee]=Oe|0,ce=ue|0}return ce!==0?Q.words[ee]=ce|0:Q.length--,Q._strip()}var oe=function(W,Q,ne){var ie=W.words,te=Q.words,se=ne.words,pe=0,ce,ee,ue,Oe=ie[0]|0,ye=Oe&8191,we=Oe>>>13,_e=ie[1]|0,Ce=_e&8191,ke=_e>>>13,Le=ie[2]|0,ge=Le&8191,de=Le>>>13,Ee=ie[3]|0,xe=Ee&8191,Re=Ee>>>13,We=ie[4]|0,Fe=We&8191,Ie=We>>>13,De=ie[5]|0,Xe=De&8191,Ke=De>>>13,pt=ie[6]|0,Ct=pt&8191,yt=pt>>>13,bt=ie[7]|0,st=bt&8191,rt=bt>>>13,Pt=ie[8]|0,ht=Pt&8191,Et=Pt>>>13,Vt=ie[9]|0,$t=Vt&8191,Jt=Vt>>>13,Lr=te[0]|0,Gt=Lr&8191,ar=Lr>>>13,Qr=te[1]|0,lr=Qr&8191,ur=Qr>>>13,Jr=te[2]|0,pr=Jr&8191,xr=Jr>>>13,Xt=te[3]|0,At=Xt&8191,kt=Xt>>>13,wr=te[4]|0,rr=wr&8191,nr=wr>>>13,jr=te[5]|0,yr=jr&8191,er=jr>>>13,ln=te[6]|0,Te=ln&8191,je=ln>>>13,Ge=te[7]|0,be=Ge&8191,He=Ge>>>13,wt=te[8]|0,ut=wt&8191,tt=wt>>>13,Ft=te[9]|0,Nt=Ft&8191,jt=Ft>>>13;ne.negative=W.negative^Q.negative,ne.length=19,ce=Math.imul(ye,Gt),ee=Math.imul(ye,ar),ee=ee+Math.imul(we,Gt)|0,ue=Math.imul(we,ar);var Ir=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,ce=Math.imul(Ce,Gt),ee=Math.imul(Ce,ar),ee=ee+Math.imul(ke,Gt)|0,ue=Math.imul(ke,ar),ce=ce+Math.imul(ye,lr)|0,ee=ee+Math.imul(ye,ur)|0,ee=ee+Math.imul(we,lr)|0,ue=ue+Math.imul(we,ur)|0;var Ut=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,ce=Math.imul(ge,Gt),ee=Math.imul(ge,ar),ee=ee+Math.imul(de,Gt)|0,ue=Math.imul(de,ar),ce=ce+Math.imul(Ce,lr)|0,ee=ee+Math.imul(Ce,ur)|0,ee=ee+Math.imul(ke,lr)|0,ue=ue+Math.imul(ke,ur)|0,ce=ce+Math.imul(ye,pr)|0,ee=ee+Math.imul(ye,xr)|0,ee=ee+Math.imul(we,pr)|0,ue=ue+Math.imul(we,xr)|0;var ot=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(ot>>>26)|0,ot&=67108863,ce=Math.imul(xe,Gt),ee=Math.imul(xe,ar),ee=ee+Math.imul(Re,Gt)|0,ue=Math.imul(Re,ar),ce=ce+Math.imul(ge,lr)|0,ee=ee+Math.imul(ge,ur)|0,ee=ee+Math.imul(de,lr)|0,ue=ue+Math.imul(de,ur)|0,ce=ce+Math.imul(Ce,pr)|0,ee=ee+Math.imul(Ce,xr)|0,ee=ee+Math.imul(ke,pr)|0,ue=ue+Math.imul(ke,xr)|0,ce=ce+Math.imul(ye,At)|0,ee=ee+Math.imul(ye,kt)|0,ee=ee+Math.imul(we,At)|0,ue=ue+Math.imul(we,kt)|0;var Bt=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,ce=Math.imul(Fe,Gt),ee=Math.imul(Fe,ar),ee=ee+Math.imul(Ie,Gt)|0,ue=Math.imul(Ie,ar),ce=ce+Math.imul(xe,lr)|0,ee=ee+Math.imul(xe,ur)|0,ee=ee+Math.imul(Re,lr)|0,ue=ue+Math.imul(Re,ur)|0,ce=ce+Math.imul(ge,pr)|0,ee=ee+Math.imul(ge,xr)|0,ee=ee+Math.imul(de,pr)|0,ue=ue+Math.imul(de,xr)|0,ce=ce+Math.imul(Ce,At)|0,ee=ee+Math.imul(Ce,kt)|0,ee=ee+Math.imul(ke,At)|0,ue=ue+Math.imul(ke,kt)|0,ce=ce+Math.imul(ye,rr)|0,ee=ee+Math.imul(ye,nr)|0,ee=ee+Math.imul(we,rr)|0,ue=ue+Math.imul(we,nr)|0;var Ht=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,ce=Math.imul(Xe,Gt),ee=Math.imul(Xe,ar),ee=ee+Math.imul(Ke,Gt)|0,ue=Math.imul(Ke,ar),ce=ce+Math.imul(Fe,lr)|0,ee=ee+Math.imul(Fe,ur)|0,ee=ee+Math.imul(Ie,lr)|0,ue=ue+Math.imul(Ie,ur)|0,ce=ce+Math.imul(xe,pr)|0,ee=ee+Math.imul(xe,xr)|0,ee=ee+Math.imul(Re,pr)|0,ue=ue+Math.imul(Re,xr)|0,ce=ce+Math.imul(ge,At)|0,ee=ee+Math.imul(ge,kt)|0,ee=ee+Math.imul(de,At)|0,ue=ue+Math.imul(de,kt)|0,ce=ce+Math.imul(Ce,rr)|0,ee=ee+Math.imul(Ce,nr)|0,ee=ee+Math.imul(ke,rr)|0,ue=ue+Math.imul(ke,nr)|0,ce=ce+Math.imul(ye,yr)|0,ee=ee+Math.imul(ye,er)|0,ee=ee+Math.imul(we,yr)|0,ue=ue+Math.imul(we,er)|0;var _r=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(_r>>>26)|0,_r&=67108863,ce=Math.imul(Ct,Gt),ee=Math.imul(Ct,ar),ee=ee+Math.imul(yt,Gt)|0,ue=Math.imul(yt,ar),ce=ce+Math.imul(Xe,lr)|0,ee=ee+Math.imul(Xe,ur)|0,ee=ee+Math.imul(Ke,lr)|0,ue=ue+Math.imul(Ke,ur)|0,ce=ce+Math.imul(Fe,pr)|0,ee=ee+Math.imul(Fe,xr)|0,ee=ee+Math.imul(Ie,pr)|0,ue=ue+Math.imul(Ie,xr)|0,ce=ce+Math.imul(xe,At)|0,ee=ee+Math.imul(xe,kt)|0,ee=ee+Math.imul(Re,At)|0,ue=ue+Math.imul(Re,kt)|0,ce=ce+Math.imul(ge,rr)|0,ee=ee+Math.imul(ge,nr)|0,ee=ee+Math.imul(de,rr)|0,ue=ue+Math.imul(de,nr)|0,ce=ce+Math.imul(Ce,yr)|0,ee=ee+Math.imul(Ce,er)|0,ee=ee+Math.imul(ke,yr)|0,ue=ue+Math.imul(ke,er)|0,ce=ce+Math.imul(ye,Te)|0,ee=ee+Math.imul(ye,je)|0,ee=ee+Math.imul(we,Te)|0,ue=ue+Math.imul(we,je)|0;var Er=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Er>>>26)|0,Er&=67108863,ce=Math.imul(st,Gt),ee=Math.imul(st,ar),ee=ee+Math.imul(rt,Gt)|0,ue=Math.imul(rt,ar),ce=ce+Math.imul(Ct,lr)|0,ee=ee+Math.imul(Ct,ur)|0,ee=ee+Math.imul(yt,lr)|0,ue=ue+Math.imul(yt,ur)|0,ce=ce+Math.imul(Xe,pr)|0,ee=ee+Math.imul(Xe,xr)|0,ee=ee+Math.imul(Ke,pr)|0,ue=ue+Math.imul(Ke,xr)|0,ce=ce+Math.imul(Fe,At)|0,ee=ee+Math.imul(Fe,kt)|0,ee=ee+Math.imul(Ie,At)|0,ue=ue+Math.imul(Ie,kt)|0,ce=ce+Math.imul(xe,rr)|0,ee=ee+Math.imul(xe,nr)|0,ee=ee+Math.imul(Re,rr)|0,ue=ue+Math.imul(Re,nr)|0,ce=ce+Math.imul(ge,yr)|0,ee=ee+Math.imul(ge,er)|0,ee=ee+Math.imul(de,yr)|0,ue=ue+Math.imul(de,er)|0,ce=ce+Math.imul(Ce,Te)|0,ee=ee+Math.imul(Ce,je)|0,ee=ee+Math.imul(ke,Te)|0,ue=ue+Math.imul(ke,je)|0,ce=ce+Math.imul(ye,be)|0,ee=ee+Math.imul(ye,He)|0,ee=ee+Math.imul(we,be)|0,ue=ue+Math.imul(we,He)|0;var Cr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,ce=Math.imul(ht,Gt),ee=Math.imul(ht,ar),ee=ee+Math.imul(Et,Gt)|0,ue=Math.imul(Et,ar),ce=ce+Math.imul(st,lr)|0,ee=ee+Math.imul(st,ur)|0,ee=ee+Math.imul(rt,lr)|0,ue=ue+Math.imul(rt,ur)|0,ce=ce+Math.imul(Ct,pr)|0,ee=ee+Math.imul(Ct,xr)|0,ee=ee+Math.imul(yt,pr)|0,ue=ue+Math.imul(yt,xr)|0,ce=ce+Math.imul(Xe,At)|0,ee=ee+Math.imul(Xe,kt)|0,ee=ee+Math.imul(Ke,At)|0,ue=ue+Math.imul(Ke,kt)|0,ce=ce+Math.imul(Fe,rr)|0,ee=ee+Math.imul(Fe,nr)|0,ee=ee+Math.imul(Ie,rr)|0,ue=ue+Math.imul(Ie,nr)|0,ce=ce+Math.imul(xe,yr)|0,ee=ee+Math.imul(xe,er)|0,ee=ee+Math.imul(Re,yr)|0,ue=ue+Math.imul(Re,er)|0,ce=ce+Math.imul(ge,Te)|0,ee=ee+Math.imul(ge,je)|0,ee=ee+Math.imul(de,Te)|0,ue=ue+Math.imul(de,je)|0,ce=ce+Math.imul(Ce,be)|0,ee=ee+Math.imul(Ce,He)|0,ee=ee+Math.imul(ke,be)|0,ue=ue+Math.imul(ke,He)|0,ce=ce+Math.imul(ye,ut)|0,ee=ee+Math.imul(ye,tt)|0,ee=ee+Math.imul(we,ut)|0,ue=ue+Math.imul(we,tt)|0;var Ar=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,ce=Math.imul($t,Gt),ee=Math.imul($t,ar),ee=ee+Math.imul(Jt,Gt)|0,ue=Math.imul(Jt,ar),ce=ce+Math.imul(ht,lr)|0,ee=ee+Math.imul(ht,ur)|0,ee=ee+Math.imul(Et,lr)|0,ue=ue+Math.imul(Et,ur)|0,ce=ce+Math.imul(st,pr)|0,ee=ee+Math.imul(st,xr)|0,ee=ee+Math.imul(rt,pr)|0,ue=ue+Math.imul(rt,xr)|0,ce=ce+Math.imul(Ct,At)|0,ee=ee+Math.imul(Ct,kt)|0,ee=ee+Math.imul(yt,At)|0,ue=ue+Math.imul(yt,kt)|0,ce=ce+Math.imul(Xe,rr)|0,ee=ee+Math.imul(Xe,nr)|0,ee=ee+Math.imul(Ke,rr)|0,ue=ue+Math.imul(Ke,nr)|0,ce=ce+Math.imul(Fe,yr)|0,ee=ee+Math.imul(Fe,er)|0,ee=ee+Math.imul(Ie,yr)|0,ue=ue+Math.imul(Ie,er)|0,ce=ce+Math.imul(xe,Te)|0,ee=ee+Math.imul(xe,je)|0,ee=ee+Math.imul(Re,Te)|0,ue=ue+Math.imul(Re,je)|0,ce=ce+Math.imul(ge,be)|0,ee=ee+Math.imul(ge,He)|0,ee=ee+Math.imul(de,be)|0,ue=ue+Math.imul(de,He)|0,ce=ce+Math.imul(Ce,ut)|0,ee=ee+Math.imul(Ce,tt)|0,ee=ee+Math.imul(ke,ut)|0,ue=ue+Math.imul(ke,tt)|0,ce=ce+Math.imul(ye,Nt)|0,ee=ee+Math.imul(ye,jt)|0,ee=ee+Math.imul(we,Nt)|0,ue=ue+Math.imul(we,jt)|0;var vr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(vr>>>26)|0,vr&=67108863,ce=Math.imul($t,lr),ee=Math.imul($t,ur),ee=ee+Math.imul(Jt,lr)|0,ue=Math.imul(Jt,ur),ce=ce+Math.imul(ht,pr)|0,ee=ee+Math.imul(ht,xr)|0,ee=ee+Math.imul(Et,pr)|0,ue=ue+Math.imul(Et,xr)|0,ce=ce+Math.imul(st,At)|0,ee=ee+Math.imul(st,kt)|0,ee=ee+Math.imul(rt,At)|0,ue=ue+Math.imul(rt,kt)|0,ce=ce+Math.imul(Ct,rr)|0,ee=ee+Math.imul(Ct,nr)|0,ee=ee+Math.imul(yt,rr)|0,ue=ue+Math.imul(yt,nr)|0,ce=ce+Math.imul(Xe,yr)|0,ee=ee+Math.imul(Xe,er)|0,ee=ee+Math.imul(Ke,yr)|0,ue=ue+Math.imul(Ke,er)|0,ce=ce+Math.imul(Fe,Te)|0,ee=ee+Math.imul(Fe,je)|0,ee=ee+Math.imul(Ie,Te)|0,ue=ue+Math.imul(Ie,je)|0,ce=ce+Math.imul(xe,be)|0,ee=ee+Math.imul(xe,He)|0,ee=ee+Math.imul(Re,be)|0,ue=ue+Math.imul(Re,He)|0,ce=ce+Math.imul(ge,ut)|0,ee=ee+Math.imul(ge,tt)|0,ee=ee+Math.imul(de,ut)|0,ue=ue+Math.imul(de,tt)|0,ce=ce+Math.imul(Ce,Nt)|0,ee=ee+Math.imul(Ce,jt)|0,ee=ee+Math.imul(ke,Nt)|0,ue=ue+Math.imul(ke,jt)|0;var qt=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(qt>>>26)|0,qt&=67108863,ce=Math.imul($t,pr),ee=Math.imul($t,xr),ee=ee+Math.imul(Jt,pr)|0,ue=Math.imul(Jt,xr),ce=ce+Math.imul(ht,At)|0,ee=ee+Math.imul(ht,kt)|0,ee=ee+Math.imul(Et,At)|0,ue=ue+Math.imul(Et,kt)|0,ce=ce+Math.imul(st,rr)|0,ee=ee+Math.imul(st,nr)|0,ee=ee+Math.imul(rt,rr)|0,ue=ue+Math.imul(rt,nr)|0,ce=ce+Math.imul(Ct,yr)|0,ee=ee+Math.imul(Ct,er)|0,ee=ee+Math.imul(yt,yr)|0,ue=ue+Math.imul(yt,er)|0,ce=ce+Math.imul(Xe,Te)|0,ee=ee+Math.imul(Xe,je)|0,ee=ee+Math.imul(Ke,Te)|0,ue=ue+Math.imul(Ke,je)|0,ce=ce+Math.imul(Fe,be)|0,ee=ee+Math.imul(Fe,He)|0,ee=ee+Math.imul(Ie,be)|0,ue=ue+Math.imul(Ie,He)|0,ce=ce+Math.imul(xe,ut)|0,ee=ee+Math.imul(xe,tt)|0,ee=ee+Math.imul(Re,ut)|0,ue=ue+Math.imul(Re,tt)|0,ce=ce+Math.imul(ge,Nt)|0,ee=ee+Math.imul(ge,jt)|0,ee=ee+Math.imul(de,Nt)|0,ue=ue+Math.imul(de,jt)|0;var cr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(cr>>>26)|0,cr&=67108863,ce=Math.imul($t,At),ee=Math.imul($t,kt),ee=ee+Math.imul(Jt,At)|0,ue=Math.imul(Jt,kt),ce=ce+Math.imul(ht,rr)|0,ee=ee+Math.imul(ht,nr)|0,ee=ee+Math.imul(Et,rr)|0,ue=ue+Math.imul(Et,nr)|0,ce=ce+Math.imul(st,yr)|0,ee=ee+Math.imul(st,er)|0,ee=ee+Math.imul(rt,yr)|0,ue=ue+Math.imul(rt,er)|0,ce=ce+Math.imul(Ct,Te)|0,ee=ee+Math.imul(Ct,je)|0,ee=ee+Math.imul(yt,Te)|0,ue=ue+Math.imul(yt,je)|0,ce=ce+Math.imul(Xe,be)|0,ee=ee+Math.imul(Xe,He)|0,ee=ee+Math.imul(Ke,be)|0,ue=ue+Math.imul(Ke,He)|0,ce=ce+Math.imul(Fe,ut)|0,ee=ee+Math.imul(Fe,tt)|0,ee=ee+Math.imul(Ie,ut)|0,ue=ue+Math.imul(Ie,tt)|0,ce=ce+Math.imul(xe,Nt)|0,ee=ee+Math.imul(xe,jt)|0,ee=ee+Math.imul(Re,Nt)|0,ue=ue+Math.imul(Re,jt)|0;var br=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(br>>>26)|0,br&=67108863,ce=Math.imul($t,rr),ee=Math.imul($t,nr),ee=ee+Math.imul(Jt,rr)|0,ue=Math.imul(Jt,nr),ce=ce+Math.imul(ht,yr)|0,ee=ee+Math.imul(ht,er)|0,ee=ee+Math.imul(Et,yr)|0,ue=ue+Math.imul(Et,er)|0,ce=ce+Math.imul(st,Te)|0,ee=ee+Math.imul(st,je)|0,ee=ee+Math.imul(rt,Te)|0,ue=ue+Math.imul(rt,je)|0,ce=ce+Math.imul(Ct,be)|0,ee=ee+Math.imul(Ct,He)|0,ee=ee+Math.imul(yt,be)|0,ue=ue+Math.imul(yt,He)|0,ce=ce+Math.imul(Xe,ut)|0,ee=ee+Math.imul(Xe,tt)|0,ee=ee+Math.imul(Ke,ut)|0,ue=ue+Math.imul(Ke,tt)|0,ce=ce+Math.imul(Fe,Nt)|0,ee=ee+Math.imul(Fe,jt)|0,ee=ee+Math.imul(Ie,Nt)|0,ue=ue+Math.imul(Ie,jt)|0;var gr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(gr>>>26)|0,gr&=67108863,ce=Math.imul($t,yr),ee=Math.imul($t,er),ee=ee+Math.imul(Jt,yr)|0,ue=Math.imul(Jt,er),ce=ce+Math.imul(ht,Te)|0,ee=ee+Math.imul(ht,je)|0,ee=ee+Math.imul(Et,Te)|0,ue=ue+Math.imul(Et,je)|0,ce=ce+Math.imul(st,be)|0,ee=ee+Math.imul(st,He)|0,ee=ee+Math.imul(rt,be)|0,ue=ue+Math.imul(rt,He)|0,ce=ce+Math.imul(Ct,ut)|0,ee=ee+Math.imul(Ct,tt)|0,ee=ee+Math.imul(yt,ut)|0,ue=ue+Math.imul(yt,tt)|0,ce=ce+Math.imul(Xe,Nt)|0,ee=ee+Math.imul(Xe,jt)|0,ee=ee+Math.imul(Ke,Nt)|0,ue=ue+Math.imul(Ke,jt)|0;var dt=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(dt>>>26)|0,dt&=67108863,ce=Math.imul($t,Te),ee=Math.imul($t,je),ee=ee+Math.imul(Jt,Te)|0,ue=Math.imul(Jt,je),ce=ce+Math.imul(ht,be)|0,ee=ee+Math.imul(ht,He)|0,ee=ee+Math.imul(Et,be)|0,ue=ue+Math.imul(Et,He)|0,ce=ce+Math.imul(st,ut)|0,ee=ee+Math.imul(st,tt)|0,ee=ee+Math.imul(rt,ut)|0,ue=ue+Math.imul(rt,tt)|0,ce=ce+Math.imul(Ct,Nt)|0,ee=ee+Math.imul(Ct,jt)|0,ee=ee+Math.imul(yt,Nt)|0,ue=ue+Math.imul(yt,jt)|0;var It=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(It>>>26)|0,It&=67108863,ce=Math.imul($t,be),ee=Math.imul($t,He),ee=ee+Math.imul(Jt,be)|0,ue=Math.imul(Jt,He),ce=ce+Math.imul(ht,ut)|0,ee=ee+Math.imul(ht,tt)|0,ee=ee+Math.imul(Et,ut)|0,ue=ue+Math.imul(Et,tt)|0,ce=ce+Math.imul(st,Nt)|0,ee=ee+Math.imul(st,jt)|0,ee=ee+Math.imul(rt,Nt)|0,ue=ue+Math.imul(rt,jt)|0;var St=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(St>>>26)|0,St&=67108863,ce=Math.imul($t,ut),ee=Math.imul($t,tt),ee=ee+Math.imul(Jt,ut)|0,ue=Math.imul(Jt,tt),ce=ce+Math.imul(ht,Nt)|0,ee=ee+Math.imul(ht,jt)|0,ee=ee+Math.imul(Et,Nt)|0,ue=ue+Math.imul(Et,jt)|0;var tr=(pe+ce|0)+((ee&8191)<<13)|0;pe=(ue+(ee>>>13)|0)+(tr>>>26)|0,tr&=67108863,ce=Math.imul($t,Nt),ee=Math.imul($t,jt),ee=ee+Math.imul(Jt,Nt)|0,ue=Math.imul(Jt,jt);var Lt=(pe+ce|0)+((ee&8191)<<13)|0;return pe=(ue+(ee>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,se[0]=Ir,se[1]=Ut,se[2]=ot,se[3]=Bt,se[4]=Ht,se[5]=_r,se[6]=Er,se[7]=Cr,se[8]=Ar,se[9]=vr,se[10]=qt,se[11]=cr,se[12]=br,se[13]=gr,se[14]=dt,se[15]=It,se[16]=St,se[17]=tr,se[18]=Lt,pe!==0&&(se[19]=pe,ne.length++),ne};Math.imul||(oe=X);function ae(fe,W,Q){Q.negative=W.negative^fe.negative,Q.length=fe.length+W.length;for(var ne=0,ie=0,te=0;te<Q.length-1;te++){var se=ie;ie=0;for(var pe=ne&67108863,ce=Math.min(te,W.length-1),ee=Math.max(0,te-fe.length+1);ee<=ce;ee++){var ue=te-ee,Oe=fe.words[ue]|0,ye=W.words[ee]|0,we=Oe*ye,_e=we&67108863;se=se+(we/67108864|0)|0,_e=_e+pe|0,pe=_e&67108863,se=se+(_e>>>26)|0,ie+=se>>>26,se&=67108863}Q.words[te]=pe,ne=se,se=ie}return ne!==0?Q.words[te]=ne:Q.length--,Q._strip()}function le(fe,W,Q){return ae(fe,W,Q)}D.prototype.mulTo=function(W,Q){var ne,ie=this.length+W.length;return this.length===10&&W.length===10?ne=oe(this,W,Q):ie<63?ne=X(this,W,Q):ie<1024?ne=ae(this,W,Q):ne=le(this,W,Q),ne},D.prototype.mul=function(W){var Q=new D(null);return Q.words=new Array(this.length+W.length),this.mulTo(W,Q)},D.prototype.mulf=function(W){var Q=new D(null);return Q.words=new Array(this.length+W.length),le(this,W,Q)},D.prototype.imul=function(W){return this.clone().mulTo(W,this)},D.prototype.imuln=function(W){var Q=W<0;Q&&(W=-W),I(typeof W=="number"),I(W<67108864);for(var ne=0,ie=0;ie<this.length;ie++){var te=(this.words[ie]|0)*W,se=(te&67108863)+(ne&67108863);ne>>=26,ne+=te/67108864|0,ne+=se>>>26,this.words[ie]=se&67108863}return ne!==0&&(this.words[ie]=ne,this.length++),Q?this.ineg():this},D.prototype.muln=function(W){return this.clone().imuln(W)},D.prototype.sqr=function(){return this.mul(this)},D.prototype.isqr=function(){return this.imul(this.clone())},D.prototype.pow=function(W){var Q=J(W);if(Q.length===0)return new D(1);for(var ne=this,ie=0;ie<Q.length&&Q[ie]===0;ie++,ne=ne.sqr());if(++ie<Q.length)for(var te=ne.sqr();ie<Q.length;ie++,te=te.sqr())Q[ie]!==0&&(ne=ne.mul(te));return ne},D.prototype.iushln=function(W){I(typeof W=="number"&&W>=0);var Q=W%26,ne=(W-Q)/26,ie=67108863>>>26-Q<<26-Q,te;if(Q!==0){var se=0;for(te=0;te<this.length;te++){var pe=this.words[te]&ie,ce=(this.words[te]|0)-pe<<Q;this.words[te]=ce|se,se=pe>>>26-Q}se&&(this.words[te]=se,this.length++)}if(ne!==0){for(te=this.length-1;te>=0;te--)this.words[te+ne]=this.words[te];for(te=0;te<ne;te++)this.words[te]=0;this.length+=ne}return this._strip()},D.prototype.ishln=function(W){return I(this.negative===0),this.iushln(W)},D.prototype.iushrn=function(W,Q,ne){I(typeof W=="number"&&W>=0);var ie;Q?ie=(Q-Q%26)/26:ie=0;var te=W%26,se=Math.min((W-te)/26,this.length),pe=67108863^67108863>>>te<<te,ce=ne;if(ie-=se,ie=Math.max(0,ie),ce){for(var ee=0;ee<se;ee++)ce.words[ee]=this.words[ee];ce.length=se}if(se!==0)if(this.length>se)for(this.length-=se,ee=0;ee<this.length;ee++)this.words[ee]=this.words[ee+se];else this.words[0]=0,this.length=1;var ue=0;for(ee=this.length-1;ee>=0&&(ue!==0||ee>=ie);ee--){var Oe=this.words[ee]|0;this.words[ee]=ue<<26-te|Oe>>>te,ue=Oe&pe}return ce&&ue!==0&&(ce.words[ce.length++]=ue),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},D.prototype.ishrn=function(W,Q,ne){return I(this.negative===0),this.iushrn(W,Q,ne)},D.prototype.shln=function(W){return this.clone().ishln(W)},D.prototype.ushln=function(W){return this.clone().iushln(W)},D.prototype.shrn=function(W){return this.clone().ishrn(W)},D.prototype.ushrn=function(W){return this.clone().iushrn(W)},D.prototype.testn=function(W){I(typeof W=="number"&&W>=0);var Q=W%26,ne=(W-Q)/26,ie=1<<Q;if(this.length<=ne)return!1;var te=this.words[ne];return!!(te&ie)},D.prototype.imaskn=function(W){I(typeof W=="number"&&W>=0);var Q=W%26,ne=(W-Q)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=ne)return this;if(Q!==0&&ne++,this.length=Math.min(ne,this.length),Q!==0){var ie=67108863^67108863>>>Q<<Q;this.words[this.length-1]&=ie}return this._strip()},D.prototype.maskn=function(W){return this.clone().imaskn(W)},D.prototype.iaddn=function(W){return I(typeof W=="number"),I(W<67108864),W<0?this.isubn(-W):this.negative!==0?this.length===1&&(this.words[0]|0)<=W?(this.words[0]=W-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(W),this.negative=1,this):this._iaddn(W)},D.prototype._iaddn=function(W){this.words[0]+=W;for(var Q=0;Q<this.length&&this.words[Q]>=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},D.prototype.isubn=function(W){if(I(typeof W=="number"),I(W<67108864),W<0)return this.iaddn(-W);if(this.negative!==0)return this.negative=0,this.iaddn(W),this.negative=1,this;if(this.words[0]-=W,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q<this.length&&this.words[Q]<0;Q++)this.words[Q]+=67108864,this.words[Q+1]-=1;return this._strip()},D.prototype.addn=function(W){return this.clone().iaddn(W)},D.prototype.subn=function(W){return this.clone().isubn(W)},D.prototype.iabs=function(){return this.negative=0,this},D.prototype.abs=function(){return this.clone().iabs()},D.prototype._ishlnsubmul=function(W,Q,ne){var ie=W.length+ne,te;this._expand(ie);var se,pe=0;for(te=0;te<W.length;te++){se=(this.words[te+ne]|0)+pe;var ce=(W.words[te]|0)*Q;se-=ce&67108863,pe=(se>>26)-(ce/67108864|0),this.words[te+ne]=se&67108863}for(;te<this.length-ne;te++)se=(this.words[te+ne]|0)+pe,pe=se>>26,this.words[te+ne]=se&67108863;if(pe===0)return this._strip();for(I(pe===-1),pe=0,te=0;te<this.length;te++)se=-(this.words[te]|0)+pe,pe=se>>26,this.words[te]=se&67108863;return this.negative=1,this._strip()},D.prototype._wordDiv=function(W,Q){var ne=this.length-W.length,ie=this.clone(),te=W,se=te.words[te.length-1]|0,pe=this._countBits(se);ne=26-pe,ne!==0&&(te=te.ushln(ne),ie.iushln(ne),se=te.words[te.length-1]|0);var ce=ie.length-te.length,ee;if(Q!=="mod"){ee=new D(null),ee.length=ce+1,ee.words=new Array(ee.length);for(var ue=0;ue<ee.length;ue++)ee.words[ue]=0}var Oe=ie.clone()._ishlnsubmul(te,1,ce);Oe.negative===0&&(ie=Oe,ee&&(ee.words[ce]=1));for(var ye=ce-1;ye>=0;ye--){var we=(ie.words[te.length+ye]|0)*67108864+(ie.words[te.length+ye-1]|0);for(we=Math.min(we/se|0,67108863),ie._ishlnsubmul(te,we,ye);ie.negative!==0;)we--,ie.negative=0,ie._ishlnsubmul(te,1,ye),ie.isZero()||(ie.negative^=1);ee&&(ee.words[ye]=we)}return ee&&ee._strip(),ie._strip(),Q!=="div"&&ne!==0&&ie.iushrn(ne),{div:ee||null,mod:ie}},D.prototype.divmod=function(W,Q,ne){if(I(!W.isZero()),this.isZero())return{div:new D(0),mod:new D(0)};var ie,te,se;return this.negative!==0&&W.negative===0?(se=this.neg().divmod(W,Q),Q!=="mod"&&(ie=se.div.neg()),Q!=="div"&&(te=se.mod.neg(),ne&&te.negative!==0&&te.iadd(W)),{div:ie,mod:te}):this.negative===0&&W.negative!==0?(se=this.divmod(W.neg(),Q),Q!=="mod"&&(ie=se.div.neg()),{div:ie,mod:se.mod}):this.negative&W.negative?(se=this.neg().divmod(W.neg(),Q),Q!=="div"&&(te=se.mod.neg(),ne&&te.negative!==0&&te.isub(W)),{div:se.div,mod:te}):W.length>this.length||this.cmp(W)<0?{div:new D(0),mod:this}:W.length===1?Q==="div"?{div:this.divn(W.words[0]),mod:null}:Q==="mod"?{div:null,mod:new D(this.modrn(W.words[0]))}:{div:this.divn(W.words[0]),mod:new D(this.modrn(W.words[0]))}:this._wordDiv(W,Q)},D.prototype.div=function(W){return this.divmod(W,"div",!1).div},D.prototype.mod=function(W){return this.divmod(W,"mod",!1).mod},D.prototype.umod=function(W){return this.divmod(W,"mod",!0).mod},D.prototype.divRound=function(W){var Q=this.divmod(W);if(Q.mod.isZero())return Q.div;var ne=Q.div.negative!==0?Q.mod.isub(W):Q.mod,ie=W.ushrn(1),te=W.andln(1),se=ne.cmp(ie);return se<0||te===1&&se===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},D.prototype.modrn=function(W){var Q=W<0;Q&&(W=-W),I(W<=67108863);for(var ne=(1<<26)%W,ie=0,te=this.length-1;te>=0;te--)ie=(ne*ie+(this.words[te]|0))%W;return Q?-ie:ie},D.prototype.modn=function(W){return this.modrn(W)},D.prototype.idivn=function(W){var Q=W<0;Q&&(W=-W),I(W<=67108863);for(var ne=0,ie=this.length-1;ie>=0;ie--){var te=(this.words[ie]|0)+ne*67108864;this.words[ie]=te/W|0,ne=te%W}return this._strip(),Q?this.ineg():this},D.prototype.divn=function(W){return this.clone().idivn(W)},D.prototype.egcd=function(W){I(W.negative===0),I(!W.isZero());var Q=this,ne=W.clone();Q.negative!==0?Q=Q.umod(W):Q=Q.clone();for(var ie=new D(1),te=new D(0),se=new D(0),pe=new D(1),ce=0;Q.isEven()&&ne.isEven();)Q.iushrn(1),ne.iushrn(1),++ce;for(var ee=ne.clone(),ue=Q.clone();!Q.isZero();){for(var Oe=0,ye=1;!(Q.words[0]&ye)&&Oe<26;++Oe,ye<<=1);if(Oe>0)for(Q.iushrn(Oe);Oe-- >0;)(ie.isOdd()||te.isOdd())&&(ie.iadd(ee),te.isub(ue)),ie.iushrn(1),te.iushrn(1);for(var we=0,_e=1;!(ne.words[0]&_e)&&we<26;++we,_e<<=1);if(we>0)for(ne.iushrn(we);we-- >0;)(se.isOdd()||pe.isOdd())&&(se.iadd(ee),pe.isub(ue)),se.iushrn(1),pe.iushrn(1);Q.cmp(ne)>=0?(Q.isub(ne),ie.isub(se),te.isub(pe)):(ne.isub(Q),se.isub(ie),pe.isub(te))}return{a:se,b:pe,gcd:ne.iushln(ce)}},D.prototype._invmp=function(W){I(W.negative===0),I(!W.isZero());var Q=this,ne=W.clone();Q.negative!==0?Q=Q.umod(W):Q=Q.clone();for(var ie=new D(1),te=new D(0),se=ne.clone();Q.cmpn(1)>0&&ne.cmpn(1)>0;){for(var pe=0,ce=1;!(Q.words[0]&ce)&&pe<26;++pe,ce<<=1);if(pe>0)for(Q.iushrn(pe);pe-- >0;)ie.isOdd()&&ie.iadd(se),ie.iushrn(1);for(var ee=0,ue=1;!(ne.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(ne.iushrn(ee);ee-- >0;)te.isOdd()&&te.iadd(se),te.iushrn(1);Q.cmp(ne)>=0?(Q.isub(ne),ie.isub(te)):(ne.isub(Q),te.isub(ie))}var Oe;return Q.cmpn(1)===0?Oe=ie:Oe=te,Oe.cmpn(0)<0&&Oe.iadd(W),Oe},D.prototype.gcd=function(W){if(this.isZero())return W.abs();if(W.isZero())return this.abs();var Q=this.clone(),ne=W.clone();Q.negative=0,ne.negative=0;for(var ie=0;Q.isEven()&&ne.isEven();ie++)Q.iushrn(1),ne.iushrn(1);do{for(;Q.isEven();)Q.iushrn(1);for(;ne.isEven();)ne.iushrn(1);var te=Q.cmp(ne);if(te<0){var se=Q;Q=ne,ne=se}else if(te===0||ne.cmpn(1)===0)break;Q.isub(ne)}while(!0);return ne.iushln(ie)},D.prototype.invm=function(W){return this.egcd(W).a.umod(W)},D.prototype.isEven=function(){return(this.words[0]&1)===0},D.prototype.isOdd=function(){return(this.words[0]&1)===1},D.prototype.andln=function(W){return this.words[0]&W},D.prototype.bincn=function(W){I(typeof W=="number");var Q=W%26,ne=(W-Q)/26,ie=1<<Q;if(this.length<=ne)return this._expand(ne+1),this.words[ne]|=ie,this;for(var te=ie,se=ne;te!==0&&se<this.length;se++){var pe=this.words[se]|0;pe+=te,te=pe>>>26,pe&=67108863,this.words[se]=pe}return te!==0&&(this.words[se]=te,this.length++),this},D.prototype.isZero=function(){return this.length===1&&this.words[0]===0},D.prototype.cmpn=function(W){var Q=W<0;if(this.negative!==0&&!Q)return-1;if(this.negative===0&&Q)return 1;this._strip();var ne;if(this.length>1)ne=1;else{Q&&(W=-W),I(W<=67108863,"Number is too big");var ie=this.words[0]|0;ne=ie===W?0:ie<W?-1:1}return this.negative!==0?-ne|0:ne},D.prototype.cmp=function(W){if(this.negative!==0&&W.negative===0)return-1;if(this.negative===0&&W.negative!==0)return 1;var Q=this.ucmp(W);return this.negative!==0?-Q|0:Q},D.prototype.ucmp=function(W){if(this.length>W.length)return 1;if(this.length<W.length)return-1;for(var Q=0,ne=this.length-1;ne>=0;ne--){var ie=this.words[ne]|0,te=W.words[ne]|0;if(ie!==te){ie<te?Q=-1:ie>te&&(Q=1);break}}return Q},D.prototype.gtn=function(W){return this.cmpn(W)===1},D.prototype.gt=function(W){return this.cmp(W)===1},D.prototype.gten=function(W){return this.cmpn(W)>=0},D.prototype.gte=function(W){return this.cmp(W)>=0},D.prototype.ltn=function(W){return this.cmpn(W)===-1},D.prototype.lt=function(W){return this.cmp(W)===-1},D.prototype.lten=function(W){return this.cmpn(W)<=0},D.prototype.lte=function(W){return this.cmp(W)<=0},D.prototype.eqn=function(W){return this.cmpn(W)===0},D.prototype.eq=function(W){return this.cmp(W)===0},D.red=function(W){return new Ne(W)},D.prototype.toRed=function(W){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),W.convertTo(this)._forceRed(W)},D.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},D.prototype._forceRed=function(W){return this.red=W,this},D.prototype.forceRed=function(W){return I(!this.red,"Already a number in reduction context"),this._forceRed(W)},D.prototype.redAdd=function(W){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,W)},D.prototype.redIAdd=function(W){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,W)},D.prototype.redSub=function(W){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,W)},D.prototype.redISub=function(W){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,W)},D.prototype.redShl=function(W){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,W)},D.prototype.redMul=function(W){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,W),this.red.mul(this,W)},D.prototype.redIMul=function(W){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,W),this.red.imul(this,W)},D.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},D.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},D.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},D.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},D.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},D.prototype.redPow=function(W){return I(this.red&&!W.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,W)};var he={k256:null,p224:null,p192:null,p25519:null};function me(fe,W){this.name=fe,this.p=new D(W,16),this.n=this.p.bitLength(),this.k=new D(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}me.prototype._tmp=function(){var W=new D(null);return W.words=new Array(Math.ceil(this.n/13)),W},me.prototype.ireduce=function(W){var Q=W,ne;do this.split(Q,this.tmp),Q=this.imulK(Q),Q=Q.iadd(this.tmp),ne=Q.bitLength();while(ne>this.n);var ie=ne<this.n?-1:Q.ucmp(this.p);return ie===0?(Q.words[0]=0,Q.length=1):ie>0?Q.isub(this.p):Q.strip!==void 0?Q.strip():Q._strip(),Q},me.prototype.split=function(W,Q){W.iushrn(this.n,0,Q)},me.prototype.imulK=function(W){return W.imul(this.k)};function ve(){me.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(ve,me),ve.prototype.split=function(W,Q){for(var ne=4194303,ie=Math.min(W.length,9),te=0;te<ie;te++)Q.words[te]=W.words[te];if(Q.length=ie,W.length<=9){W.words[0]=0,W.length=1;return}var se=W.words[9];for(Q.words[Q.length++]=se&ne,te=10;te<W.length;te++){var pe=W.words[te]|0;W.words[te-10]=(pe&ne)<<4|se>>>22,se=pe}se>>>=22,W.words[te-10]=se,se===0&&W.length>10?W.length-=10:W.length-=9},ve.prototype.imulK=function(W){W.words[W.length]=0,W.words[W.length+1]=0,W.length+=2;for(var Q=0,ne=0;ne<W.length;ne++){var ie=W.words[ne]|0;Q+=ie*977,W.words[ne]=Q&67108863,Q=ie*64+(Q/67108864|0)}return W.words[W.length-1]===0&&(W.length--,W.words[W.length-1]===0&&W.length--),W};function Se(){me.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(Se,me);function Pe(){me.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(Pe,me);function Ve(){me.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(Ve,me),Ve.prototype.imulK=function(W){for(var Q=0,ne=0;ne<W.length;ne++){var ie=(W.words[ne]|0)*19+Q,te=ie&67108863;ie>>>=26,W.words[ne]=te,Q=ie}return Q!==0&&(W.words[W.length++]=Q),W},D._prime=function(W){if(he[W])return he[W];var Q;if(W==="k256")Q=new ve;else if(W==="p224")Q=new Se;else if(W==="p192")Q=new Pe;else if(W==="p25519")Q=new Ve;else throw new Error("Unknown prime "+W);return he[W]=Q,Q};function Ne(fe){if(typeof fe=="string"){var W=D._prime(fe);this.m=W.p,this.prime=W}else I(fe.gtn(1),"modulus must be greater than 1"),this.m=fe,this.prime=null}Ne.prototype._verify1=function(W){I(W.negative===0,"red works only with positives"),I(W.red,"red works only with red numbers")},Ne.prototype._verify2=function(W,Q){I((W.negative|Q.negative)===0,"red works only with positives"),I(W.red&&W.red===Q.red,"red works only with red numbers")},Ne.prototype.imod=function(W){return this.prime?this.prime.ireduce(W)._forceRed(this):(V(W,W.umod(this.m)._forceRed(this)),W)},Ne.prototype.neg=function(W){return W.isZero()?W.clone():this.m.sub(W)._forceRed(this)},Ne.prototype.add=function(W,Q){this._verify2(W,Q);var ne=W.add(Q);return ne.cmp(this.m)>=0&&ne.isub(this.m),ne._forceRed(this)},Ne.prototype.iadd=function(W,Q){this._verify2(W,Q);var ne=W.iadd(Q);return ne.cmp(this.m)>=0&&ne.isub(this.m),ne},Ne.prototype.sub=function(W,Q){this._verify2(W,Q);var ne=W.sub(Q);return ne.cmpn(0)<0&&ne.iadd(this.m),ne._forceRed(this)},Ne.prototype.isub=function(W,Q){this._verify2(W,Q);var ne=W.isub(Q);return ne.cmpn(0)<0&&ne.iadd(this.m),ne},Ne.prototype.shl=function(W,Q){return this._verify1(W),this.imod(W.ushln(Q))},Ne.prototype.imul=function(W,Q){return this._verify2(W,Q),this.imod(W.imul(Q))},Ne.prototype.mul=function(W,Q){return this._verify2(W,Q),this.imod(W.mul(Q))},Ne.prototype.isqr=function(W){return this.imul(W,W.clone())},Ne.prototype.sqr=function(W){return this.mul(W,W)},Ne.prototype.sqrt=function(W){if(W.isZero())return W.clone();var Q=this.m.andln(3);if(I(Q%2===1),Q===3){var ne=this.m.add(new D(1)).iushrn(2);return this.pow(W,ne)}for(var ie=this.m.subn(1),te=0;!ie.isZero()&&ie.andln(1)===0;)te++,ie.iushrn(1);I(!ie.isZero());var se=new D(1).toRed(this),pe=se.redNeg(),ce=this.m.subn(1).iushrn(1),ee=this.m.bitLength();for(ee=new D(2*ee*ee).toRed(this);this.pow(ee,ce).cmp(pe)!==0;)ee.redIAdd(pe);for(var ue=this.pow(ee,ie),Oe=this.pow(W,ie.addn(1).iushrn(1)),ye=this.pow(W,ie),we=te;ye.cmp(se)!==0;){for(var _e=ye,Ce=0;_e.cmp(se)!==0;Ce++)_e=_e.redSqr();I(Ce<we);var ke=this.pow(ue,new D(1).iushln(we-Ce-1));Oe=Oe.redMul(ke),ue=ke.redSqr(),ye=ye.redMul(ue),we=Ce}return Oe},Ne.prototype.invm=function(W){var Q=W._invmp(this.m);return Q.negative!==0?(Q.negative=0,this.imod(Q).redNeg()):this.imod(Q)},Ne.prototype.pow=function(W,Q){if(Q.isZero())return new D(1).toRed(this);if(Q.cmpn(1)===0)return W.clone();var ne=4,ie=new Array(1<<ne);ie[0]=new D(1).toRed(this),ie[1]=W;for(var te=2;te<ie.length;te++)ie[te]=this.mul(ie[te-1],W);var se=ie[0],pe=0,ce=0,ee=Q.bitLength()%26;for(ee===0&&(ee=26),te=Q.length-1;te>=0;te--){for(var ue=Q.words[te],Oe=ee-1;Oe>=0;Oe--){var ye=ue>>Oe&1;if(se!==ie[0]&&(se=this.sqr(se)),ye===0&&pe===0){ce=0;continue}pe<<=1,pe|=ye,ce++,!(ce!==ne&&(te!==0||Oe!==0))&&(se=this.mul(se,ie[pe]),ce=0,pe=0)}ee=26}return se},Ne.prototype.convertTo=function(W){var Q=W.umod(this.m);return Q===W?Q.clone():Q},Ne.prototype.convertFrom=function(W){var Q=W.clone();return Q.red=null,Q},D.mont=function(W){return new ze(W)};function ze(fe){Ne.call(this,fe),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new D(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(ze,Ne),ze.prototype.convertTo=function(W){return this.imod(W.ushln(this.shift))},ze.prototype.convertFrom=function(W){var Q=this.imod(W.mul(this.rinv));return Q.red=null,Q},ze.prototype.imul=function(W,Q){if(W.isZero()||Q.isZero())return W.words[0]=0,W.length=1,W;var ne=W.imul(Q),ie=ne.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=ne.isub(ie).iushrn(this.shift),se=te;return te.cmp(this.m)>=0?se=te.isub(this.m):te.cmpn(0)<0&&(se=te.iadd(this.m)),se._forceRed(this)},ze.prototype.mul=function(W,Q){if(W.isZero()||Q.isZero())return new D(0)._forceRed(this);var ne=W.mul(Q),ie=ne.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=ne.isub(ie).iushrn(this.shift),se=te;return te.cmp(this.m)>=0?se=te.isub(this.m):te.cmpn(0)<0&&(se=te.iadd(this.m)),se._forceRed(this)},ze.prototype.invm=function(W){var Q=this.imod(W._invmp(this.m).mul(this.r2));return Q._forceRed(this)}})(_,commonjsGlobal)})(bn$2);var bnExports=bn$2.exports,utf8={};/*! https://mths.be/utf8js v3.0.0 by @mathias */(function(_){(function(C){var T=String.fromCharCode;function I(Y){for(var J=[],X=0,oe=Y.length,ae,le;X<oe;)ae=Y.charCodeAt(X++),ae>=55296&&ae<=56319&&X<oe?(le=Y.charCodeAt(X++),(le&64512)==56320?J.push(((ae&1023)<<10)+(le&1023)+65536):(J.push(ae),X--)):J.push(ae);return J}function M(Y){for(var J=Y.length,X=-1,oe,ae="";++X<J;)oe=Y[X],oe>65535&&(oe-=65536,ae+=T(oe>>>10&1023|55296),oe=56320|oe&1023),ae+=T(oe);return ae}function D(Y){if(Y>=55296&&Y<=57343)throw Error("Lone surrogate U+"+Y.toString(16).toUpperCase()+" is not a scalar value")}function L(Y,J){return T(Y>>J&63|128)}function B(Y){if(!(Y&4294967168))return T(Y);var J="";return Y&4294965248?Y&4294901760?Y&4292870144||(J=T(Y>>18&7|240),J+=L(Y,12),J+=L(Y,6)):(D(Y),J=T(Y>>12&15|224),J+=L(Y,6)):J=T(Y>>6&31|192),J+=T(Y&63|128),J}function N(Y){for(var J=I(Y),X=J.length,oe=-1,ae,le="";++oe<X;)ae=J[oe],le+=B(ae);return le}function F(){if(G>=H)throw Error("Invalid byte index");var Y=U[G]&255;if(G++,(Y&192)==128)return Y&63;throw Error("Invalid continuation byte")}function V(){var Y,J,X,oe,ae;if(G>H)throw Error("Invalid byte index");if(G==H)return!1;if(Y=U[G]&255,G++,!(Y&128))return Y;if((Y&224)==192){if(J=F(),ae=(Y&31)<<6|J,ae>=128)return ae;throw Error("Invalid continuation byte")}if((Y&240)==224){if(J=F(),X=F(),ae=(Y&15)<<12|J<<6|X,ae>=2048)return D(ae),ae;throw Error("Invalid continuation byte")}if((Y&248)==240&&(J=F(),X=F(),oe=F(),ae=(Y&7)<<18|J<<12|X<<6|oe,ae>=65536&&ae<=1114111))return ae;throw Error("Invalid UTF-8 detected")}var U,H,G;function Z(Y){U=I(Y),H=U.length,G=0;for(var J=[],X;(X=V())!==!1;)J.push(X);return M(J)}C.version="3.0.0",C.encode=N,C.decode=Z})(_)})(utf8);(function(_){var C=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(Ie,De,Xe,Ke){Ke===void 0&&(Ke=Xe);var pt=Object.getOwnPropertyDescriptor(De,Xe);(!pt||("get"in pt?!De.__esModule:pt.writable||pt.configurable))&&(pt={enumerable:!0,get:function(){return De[Xe]}}),Object.defineProperty(Ie,Ke,pt)}:function(Ie,De,Xe,Ke){Ke===void 0&&(Ke=Xe),Ie[Ke]=De[Xe]}),T=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(Ie,De){Object.defineProperty(Ie,"default",{enumerable:!0,value:De})}:function(Ie,De){Ie.default=De}),I=commonjsGlobal&&commonjsGlobal.__importStar||function(Ie){if(Ie&&Ie.__esModule)return Ie;var De={};if(Ie!=null)for(var Xe in Ie)Xe!=="default"&&Object.prototype.hasOwnProperty.call(Ie,Xe)&&C(De,Ie,Xe);return T(De,Ie),De},M=commonjsGlobal&&commonjsGlobal.__importDefault||function(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}};Object.defineProperty(_,"__esModule",{value:!0}),_.fromTokenToUnit=_.fromUnitToToken=_.numberToString=_.toHex=_.hexToBytes=_.bytesToHex=_.numberToHex=_.hexToNumber=_.hexToUtf8=_.utf8ToHex=_.toBN=_.isHex=_.isHexStrict=_.isBigNumber=_.isBN=_.stripHexPrefix=_.isHexPrefixed=_.numberToBN=_.rightPad=_.leftPad=_.BN=_.isBase58btc=void 0,_.isUint8Array=ye,_.UUID=we,_.isUUID=_e,_.toUint8Array=Ce,_.toBuffer=ke,_.toBase58=Le,_.fromBase58=ge,_.toBase64=de,_.fromBase64=Ee,_.toAddress=xe,_.toDid=Re,_.isSameDid=We,_.formatTxType=Fe;const D=M(isBoolean_1),L=M(isString_1),B=M(isNumber_1),N=M(isObject_1),F=M(upperFirst_1$1),V=M(camelCase_1),U=M(isNull_1),H=M(padEnd_1);_.rightPad=H.default;const G=M(padStart_1$1);_.leftPad=G.default;const Z=M(bs58),Y=M(base64Url),J=M(bnExports);_.BN=J.default;const X=I(utf8),oe="did:abt:",ae=new J.default(0),le=new J.default(-1),he={encode:Ie=>`z${Z.default.encode(Ie)}`,decode:Ie=>Z.default.decode(Ie.slice(1))},me=Ie=>{if(typeof Ie!="string")return!1;if(Ie[0]==="z")try{return he.decode(Ie),!0}catch{return!1}return!1};_.isBase58btc=me;const ve=Ie=>{if(typeof Ie=="string"||typeof Ie=="number"){let De=new J.default(1);const Xe=String(Ie).toLowerCase().trim(),Ke=Xe.substr(0,2)==="0x"||Xe.substr(0,3)==="-0x";let pt=(0,_.stripHexPrefix)(Xe);if(pt.substr(0,1)==="-"&&(pt=(0,_.stripHexPrefix)(pt.slice(1)),De=new J.default(-1,10)),pt=pt===""?"0":pt,!pt.match(/^-?[0-9]+$/)&&pt.match(/^[0-9A-Fa-f]+$/)||pt.match(/^[a-fA-F]+$/)||Ke===!0&&pt.match(/^[0-9A-Fa-f]+$/))return new J.default(pt,16).mul(De);if((pt.match(/^-?[0-9]+$/)||pt==="")&&Ke===!1)return new J.default(pt,10).mul(De)}if((0,_.isBN)(Ie))return new J.default(Ie.toString(10),10);throw new Error(`[number-to-bn] while converting number ${JSON.stringify(Ie)} to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.`)};_.numberToBN=ve;const Se=Ie=>{if(typeof Ie!="string")throw new Error("[is-hex-prefixed] value must be type string");return Ie.slice(0,2).toLowerCase()==="0x"};_.isHexPrefixed=Se;const Pe=Ie=>typeof Ie=="string"&&(0,_.isHexPrefixed)(Ie)?Ie.slice(2):Ie;_.stripHexPrefix=Pe;const Ve=Ie=>Ie instanceof J.default||Ie&&Ie.constructor&&Ie.constructor.name==="BN";_.isBN=Ve;const Ne=Ie=>Ie&&Ie.constructor&&Ie.constructor.name==="BigNumber";_.isBigNumber=Ne;const ze=Ie=>((0,L.default)(Ie)||(0,B.default)(Ie))&&/^(-)?0x[0-9a-f]*$/i.test(Ie);_.isHexStrict=ze;const fe=Ie=>((0,L.default)(Ie)||(0,B.default)(Ie))&&/^(-0x|0x|0X|-0X)?[0-9a-f]*$/i.test(Ie);_.isHex=fe;const W=(Ie,De=10)=>{try{if(typeof Ie=="number"&&Ie>0){const Xe=Number(Ie).toLocaleString("fullwide",{useGrouping:!1});return new J.default(Xe,De)}return(0,_.numberToBN)(Ie)}catch(Xe){throw new Error(`${Xe} Given value: "${Ie}"`)}};_.toBN=W;const Q=Ie=>{Ie=X.encode(Ie);let De="";Ie=Ie.replace(/^(?:\u0000)*/,""),Ie=Ie.split("").reverse().join(""),Ie=Ie.replace(/^(?:\u0000)*/,""),Ie=Ie.split("").reverse().join("");for(let Xe=0;Xe<Ie.length;Xe++){const pt=Ie.charCodeAt(Xe).toString(16);De+=pt.length<2?`0${pt}`:pt}return`0x${De}`};_.utf8ToHex=Q;const ne=Ie=>{if(!(0,_.isHexStrict)(Ie))throw new Error(`The parameter "${Ie}" must be a valid HEX string.`);let De="",Xe=0;Ie=Ie.replace(/^0x/i,""),Ie=Ie.replace(/^(?:00)*/,""),Ie=Ie.split("").reverse().join(""),Ie=Ie.replace(/^(?:00)*/,""),Ie=Ie.split("").reverse().join("");const Ke=Ie.length;for(let pt=0;pt<Ke;pt+=2)Xe=parseInt(Ie.substr(pt,2),16),De+=String.fromCharCode(Xe);return X.decode(De)};_.hexToUtf8=ne;const ie=Ie=>Ie?(0,_.toBN)(Ie).toNumber():0;_.hexToNumber=ie;const te=Ie=>{if((0,U.default)(Ie)||typeof Ie>"u")return Ie;if(!isFinite(Ie)&&!(0,_.isHex)(Ie))throw new Error(`Given input "${Ie}" is not a number.`);const De=(0,_.toBN)(Ie),Xe=De.toString(16);return De.lt(new J.default(0))?`-0x${Xe.substr(1)}`:`0x${Xe}`};_.numberToHex=te;const se=Ie=>{const De=[];for(let Xe=0;Xe<Ie.length;Xe++)De.push((Ie[Xe]>>>4).toString(16)),De.push((Ie[Xe]&15).toString(16));return`0x${De.join("")}`};_.bytesToHex=se;const pe=Ie=>{if(Ie=Ie.toString(16),!(0,_.isHex)(Ie))throw new Error(`Given value "${Ie}" is not a valid hex string.`);Ie=Ie.replace(/^0x/i,""),Ie=Ie.length%2?`0${Ie}`:Ie;const De=[];for(let Xe=0;Xe<Ie.length;Xe+=2)De.push(parseInt(Ie.substr(Xe,2),16));return De};_.hexToBytes=pe;const ce=(Ie,De=!1)=>ye(Ie)||Buffer$3.isBuffer(Ie)?De?"bytes":(0,_.bytesToHex)(Ie):(0,_.isBase58btc)(Ie)?De?"bytes":(0,_.bytesToHex)(he.decode(Ie)):(0,D.default)(Ie)?De?"bool":Ie?"0x01":"0x00":(0,N.default)(Ie)&&!(0,_.isBigNumber)(Ie)&&!(0,_.isBN)(Ie)?De?"string":(0,_.utf8ToHex)(JSON.stringify(Ie)):typeof Ie=="string"?Ie.indexOf("-0x")===0||Ie.indexOf("-0X")===0?De?"int256":(0,_.numberToHex)(Ie):Ie.indexOf("0x")===0||Ie.indexOf("0X")===0?De?"bytes":Ie:De?"string":(0,_.utf8ToHex)(Ie):De?+Ie<0?"int256":"uint256":(0,_.numberToHex)(Ie);_.toHex=ce;const ee=Ie=>{if(typeof Ie=="string"){if(!Ie.match(/^-?[0-9.]+$/))throw new Error(`Invalid value '${Ie}' while converting to string, should be a number matching (^-?[0-9.]+).`);return Ie}if(typeof Ie=="number")return Number.isInteger(Ie)&&Ie>0?Number(Ie).toLocaleString("fullwide",{useGrouping:!1}):String(Ie);if(typeof Ie=="object"&&Ie.toString&&(Ie.toTwos||Ie.dividedToIntegerBy))return Ie.toPrecision?String(Ie.toPrecision()):Ie.toString(10);throw new Error(`while converting number to string, invalid number value '${Ie}' type ${typeof Ie}.`)};_.numberToString=ee;const ue=(Ie,De=18,Xe={})=>{let Ke=(0,_.toBN)(Ie);const pt=Ke.lt(ae),Ct=(0,_.toBN)(`1${"0".repeat(De)}`,10),yt=Ct.toString(10).length-1||1,bt=Xe||{};pt&&(Ke=Ke.mul(le));let st=Ke.mod(Ct).toString(10);for(;st.length<yt;)st=`0${st}`;bt.pad||(st=st.match(/^([0-9]*[1-9]|0)(0*)/)[1]);let rt=Ke.div(Ct).toString(10);bt.commify&&(rt=rt.replace(/\B(?=(\d{3})+(?!\d))/g,","));let Pt=`${rt}${st==="0"?"":`.${st}`}`;return pt&&(Pt=`-${Pt}`),Pt};_.fromUnitToToken=ue;const Oe=(Ie,De=18)=>{let Xe=(0,_.numberToString)(Ie);const Ke=(0,_.toBN)(`1${"0".repeat(De)}`,10),pt=Ke.toString(10).length-1||1,Ct=Xe.substring(0,1)==="-";if(Ct&&(Xe=Xe.substring(1)),Xe===".")throw new Error(`error converting token ${Ie} to unit, invalid value`);const yt=Xe.split(".");if(yt.length>2)throw new Error(`error converting token ${Ie} to unit, too many decimal points`);let bt=yt[0],st=yt[1];if(bt||(bt="0"),st||(st="0"),st.length>pt)throw new Error(`error converting token ${Ie} to unit, too many decimal places`);for(;st.length<pt;)st+="0";bt=new J.default(bt),st=new J.default(st);let rt=bt.mul(Ke).add(st);return Ct&&(rt=rt.mul(le)),new J.default(rt.toString(10),10)};_.fromTokenToUnit=Oe;function ye(Ie){return Object.prototype.toString.call(Ie)==="[object Uint8Array]"}function we(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Ie=>{const De=Math.random()*16|0;return(Ie==="x"?De:De&3|8).toString(16)})}function _e(Ie){return/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(Ie)}function Ce(Ie){let De=null;if([null,void 0,""].includes(Ie))De=new Uint8Array;else if(Buffer$3.isBuffer(Ie))De=new Uint8Array(Ie);else if((0,_.isHexStrict)(Ie))De=new Uint8Array((0,_.hexToBytes)(Ie));else if(ye(Ie))De=new Uint8Array(Ie);else if((0,_.isBase58btc)(Ie))De=new Uint8Array(he.decode(Ie));else if(typeof Ie=="string")De=new Uint8Array((0,_.hexToBytes)((0,_.toHex)(Ie)));else throw new Error(`Unsupported input type ${typeof Ie} detected for toBuffer, only Uint8Array/Buffer/Hex/Base58 are supported`);return De}function ke(Ie){return Buffer$3.from(Ce(Ie))}function Le(Ie){const De=he.encode(Ce(Ie));return Buffer$3.from(De).toString("utf-8")}function ge(Ie){if((0,_.isBase58btc)(Ie)===!1)throw new Error("fromBase58 expect strict base58 encoded string as input");return Buffer$3.from(he.decode(Ie))}function de(Ie,De=!0){const Xe=Y.default.encode(ke(Ie));return De?Y.default.escape(Xe):Xe}function Ee(Ie){if(typeof Ie!="string")throw new Error("fromBase64 requires input to be a string");return Buffer$3.from(Y.default.unescape(Ie),"base64")}function xe(Ie){return Ie.replace(oe,"")}function Re(Ie){return`${oe}${xe(Ie)}`}function We(Ie,De){return xe(Ie).toLowerCase()===xe(De).toLowerCase()}function Fe(Ie){return(0,F.default)((0,V.default)(Ie))}})(lib$6);Object.defineProperty(encode$4,"__esModule",{value:!0});encode$4.encode=encode$2;const util_1$a=lib$6;function encode$2(_,C="hex"){return["hex","base16"].includes(C)?(0,util_1$a.toHex)(_):C==="base58"?(0,util_1$a.toBase58)(_):C==="base64"?(0,util_1$a.toBase64)(_):C==="Uint8Array"?(0,util_1$a.toUint8Array)(_):C==="buffer"?(0,util_1$a.toBuffer)(_):_}var keccak$1={},sha3$1={exports:{}};(function(_){(function(){var C="input is invalid type",T="finalize already called",I=typeof window=="object",M=I?window:{};M.JS_SHA3_NO_WINDOW&&(I=!1);var D=!I&&typeof self=="object",L=!M.JS_SHA3_NO_NODE_JS&&typeof process$1=="object"&&process$1.versions&&process$1.versions.node;L?M=commonjsGlobal:D&&(M=self);var B=!M.JS_SHA3_NO_COMMON_JS&&!0&&_.exports,N=!M.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",F="0123456789abcdef".split(""),V=[31,7936,2031616,520093696],U=[4,1024,262144,67108864],H=[1,256,65536,16777216],G=[6,1536,393216,100663296],Z=[0,8,16,24],Y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],J=[224,256,384,512],X=[128,256],oe=["hex","buffer","arrayBuffer","array","digest"],ae={128:168,256:136};(M.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ye){return Object.prototype.toString.call(ye)==="[object Array]"}),N&&(M.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ye){return typeof ye=="object"&&ye.buffer&&ye.buffer.constructor===ArrayBuffer});for(var le=function(ye,we,_e){return function(Ce){return new ee(ye,we,ye).update(Ce)[_e]()}},he=function(ye,we,_e){return function(Ce,ke){return new ee(ye,we,ke).update(Ce)[_e]()}},me=function(ye,we,_e){return function(Ce,ke,Le,ge){return W["cshake"+ye].update(Ce,ke,Le,ge)[_e]()}},ve=function(ye,we,_e){return function(Ce,ke,Le,ge){return W["kmac"+ye].update(Ce,ke,Le,ge)[_e]()}},Se=function(ye,we,_e,Ce){for(var ke=0;ke<oe.length;++ke){var Le=oe[ke];ye[Le]=we(_e,Ce,Le)}return ye},Pe=function(ye,we){var _e=le(ye,we,"hex");return _e.create=function(){return new ee(ye,we,ye)},_e.update=function(Ce){return _e.create().update(Ce)},Se(_e,le,ye,we)},Ve=function(ye,we){var _e=he(ye,we,"hex");return _e.create=function(Ce){return new ee(ye,we,Ce)},_e.update=function(Ce,ke){return _e.create(ke).update(Ce)},Se(_e,he,ye,we)},Ne=function(ye,we){var _e=ae[ye],Ce=me(ye,we,"hex");return Ce.create=function(ke,Le,ge){return!Le&&!ge?W["shake"+ye].create(ke):new ee(ye,we,ke).bytepad([Le,ge],_e)},Ce.update=function(ke,Le,ge,de){return Ce.create(Le,ge,de).update(ke)},Se(Ce,me,ye,we)},ze=function(ye,we){var _e=ae[ye],Ce=ve(ye,we,"hex");return Ce.create=function(ke,Le,ge){return new ue(ye,we,Le).bytepad(["KMAC",ge],_e).bytepad([ke],_e)},Ce.update=function(ke,Le,ge,de){return Ce.create(ke,ge,de).update(Le)},Se(Ce,ve,ye,we)},fe=[{name:"keccak",padding:H,bits:J,createMethod:Pe},{name:"sha3",padding:G,bits:J,createMethod:Pe},{name:"shake",padding:V,bits:X,createMethod:Ve},{name:"cshake",padding:U,bits:X,createMethod:Ne},{name:"kmac",padding:U,bits:X,createMethod:ze}],W={},Q=[],ne=0;ne<fe.length;++ne)for(var ie=fe[ne],te=ie.bits,se=0;se<te.length;++se){var pe=ie.name+"_"+te[se];if(Q.push(pe),W[pe]=ie.createMethod(te[se],ie.padding),ie.name!=="sha3"){var ce=ie.name+te[se];Q.push(ce),W[ce]=W[pe]}}function ee(ye,we,_e){this.blocks=[],this.s=[],this.padding=we,this.outputBits=_e,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(ye<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=_e>>5,this.extraBytes=(_e&31)>>3;for(var Ce=0;Ce<50;++Ce)this.s[Ce]=0}ee.prototype.update=function(ye){if(this.finalized)throw new Error(T);var we,_e=typeof ye;if(_e!=="string"){if(_e==="object"){if(ye===null)throw new Error(C);if(N&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!Array.isArray(ye)&&(!N||!ArrayBuffer.isView(ye)))throw new Error(C)}else throw new Error(C);we=!0}for(var Ce=this.blocks,ke=this.byteCount,Le=ye.length,ge=this.blockCount,de=0,Ee=this.s,xe,Re;de<Le;){if(this.reset)for(this.reset=!1,Ce[0]=this.block,xe=1;xe<ge+1;++xe)Ce[xe]=0;if(we)for(xe=this.start;de<Le&&xe<ke;++de)Ce[xe>>2]|=ye[de]<<Z[xe++&3];else for(xe=this.start;de<Le&&xe<ke;++de)Re=ye.charCodeAt(de),Re<128?Ce[xe>>2]|=Re<<Z[xe++&3]:Re<2048?(Ce[xe>>2]|=(192|Re>>6)<<Z[xe++&3],Ce[xe>>2]|=(128|Re&63)<<Z[xe++&3]):Re<55296||Re>=57344?(Ce[xe>>2]|=(224|Re>>12)<<Z[xe++&3],Ce[xe>>2]|=(128|Re>>6&63)<<Z[xe++&3],Ce[xe>>2]|=(128|Re&63)<<Z[xe++&3]):(Re=65536+((Re&1023)<<10|ye.charCodeAt(++de)&1023),Ce[xe>>2]|=(240|Re>>18)<<Z[xe++&3],Ce[xe>>2]|=(128|Re>>12&63)<<Z[xe++&3],Ce[xe>>2]|=(128|Re>>6&63)<<Z[xe++&3],Ce[xe>>2]|=(128|Re&63)<<Z[xe++&3]);if(this.lastByteIndex=xe,xe>=ke){for(this.start=xe-ke,this.block=Ce[ge],xe=0;xe<ge;++xe)Ee[xe]^=Ce[xe];Oe(Ee),this.reset=!0}else this.start=xe}return this},ee.prototype.encode=function(ye,we){var _e=ye&255,Ce=1,ke=[_e];for(ye=ye>>8,_e=ye&255;_e>0;)ke.unshift(_e),ye=ye>>8,_e=ye&255,++Ce;return we?ke.push(Ce):ke.unshift(Ce),this.update(ke),ke.length},ee.prototype.encodeString=function(ye){var we,_e=typeof ye;if(_e!=="string"){if(_e==="object"){if(ye===null)throw new Error(C);if(N&&ye.constructor===ArrayBuffer)ye=new Uint8Array(ye);else if(!Array.isArray(ye)&&(!N||!ArrayBuffer.isView(ye)))throw new Error(C)}else throw new Error(C);we=!0}var Ce=0,ke=ye.length;if(we)Ce=ke;else for(var Le=0;Le<ye.length;++Le){var ge=ye.charCodeAt(Le);ge<128?Ce+=1:ge<2048?Ce+=2:ge<55296||ge>=57344?Ce+=3:(ge=65536+((ge&1023)<<10|ye.charCodeAt(++Le)&1023),Ce+=4)}return Ce+=this.encode(Ce*8),this.update(ye),Ce},ee.prototype.bytepad=function(ye,we){for(var _e=this.encode(we),Ce=0;Ce<ye.length;++Ce)_e+=this.encodeString(ye[Ce]);var ke=we-_e%we,Le=[];return Le.length=ke,this.update(Le),this},ee.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ye=this.blocks,we=this.lastByteIndex,_e=this.blockCount,Ce=this.s;if(ye[we>>2]|=this.padding[we&3],this.lastByteIndex===this.byteCount)for(ye[0]=ye[_e],we=1;we<_e+1;++we)ye[we]=0;for(ye[_e-1]|=2147483648,we=0;we<_e;++we)Ce[we]^=ye[we];Oe(Ce)}},ee.prototype.toString=ee.prototype.hex=function(){this.finalize();for(var ye=this.blockCount,we=this.s,_e=this.outputBlocks,Ce=this.extraBytes,ke=0,Le=0,ge="",de;Le<_e;){for(ke=0;ke<ye&&Le<_e;++ke,++Le)de=we[ke],ge+=F[de>>4&15]+F[de&15]+F[de>>12&15]+F[de>>8&15]+F[de>>20&15]+F[de>>16&15]+F[de>>28&15]+F[de>>24&15];Le%ye===0&&(Oe(we),ke=0)}return Ce&&(de=we[ke],ge+=F[de>>4&15]+F[de&15],Ce>1&&(ge+=F[de>>12&15]+F[de>>8&15]),Ce>2&&(ge+=F[de>>20&15]+F[de>>16&15])),ge},ee.prototype.arrayBuffer=function(){this.finalize();var ye=this.blockCount,we=this.s,_e=this.outputBlocks,Ce=this.extraBytes,ke=0,Le=0,ge=this.outputBits>>3,de;Ce?de=new ArrayBuffer(_e+1<<2):de=new ArrayBuffer(ge);for(var Ee=new Uint32Array(de);Le<_e;){for(ke=0;ke<ye&&Le<_e;++ke,++Le)Ee[Le]=we[ke];Le%ye===0&&Oe(we)}return Ce&&(Ee[ke]=we[ke],de=de.slice(0,ge)),de},ee.prototype.buffer=ee.prototype.arrayBuffer,ee.prototype.digest=ee.prototype.array=function(){this.finalize();for(var ye=this.blockCount,we=this.s,_e=this.outputBlocks,Ce=this.extraBytes,ke=0,Le=0,ge=[],de,Ee;Le<_e;){for(ke=0;ke<ye&&Le<_e;++ke,++Le)de=Le<<2,Ee=we[ke],ge[de]=Ee&255,ge[de+1]=Ee>>8&255,ge[de+2]=Ee>>16&255,ge[de+3]=Ee>>24&255;Le%ye===0&&Oe(we)}return Ce&&(de=Le<<2,Ee=we[ke],ge[de]=Ee&255,Ce>1&&(ge[de+1]=Ee>>8&255),Ce>2&&(ge[de+2]=Ee>>16&255)),ge};function ue(ye,we,_e){ee.call(this,ye,we,_e)}ue.prototype=new ee,ue.prototype.finalize=function(){return this.encode(this.outputBits,!0),ee.prototype.finalize.call(this)};var Oe=function(ye){var we,_e,Ce,ke,Le,ge,de,Ee,xe,Re,We,Fe,Ie,De,Xe,Ke,pt,Ct,yt,bt,st,rt,Pt,ht,Et,Vt,$t,Jt,Lr,Gt,ar,Qr,lr,ur,Jr,pr,xr,Xt,At,kt,wr,rr,nr,jr,yr,er,ln,Te,je,Ge,be,He,wt,ut,tt,Ft,Nt,jt,Ir,Ut,ot,Bt,Ht;for(Ce=0;Ce<48;Ce+=2)ke=ye[0]^ye[10]^ye[20]^ye[30]^ye[40],Le=ye[1]^ye[11]^ye[21]^ye[31]^ye[41],ge=ye[2]^ye[12]^ye[22]^ye[32]^ye[42],de=ye[3]^ye[13]^ye[23]^ye[33]^ye[43],Ee=ye[4]^ye[14]^ye[24]^ye[34]^ye[44],xe=ye[5]^ye[15]^ye[25]^ye[35]^ye[45],Re=ye[6]^ye[16]^ye[26]^ye[36]^ye[46],We=ye[7]^ye[17]^ye[27]^ye[37]^ye[47],Fe=ye[8]^ye[18]^ye[28]^ye[38]^ye[48],Ie=ye[9]^ye[19]^ye[29]^ye[39]^ye[49],we=Fe^(ge<<1|de>>>31),_e=Ie^(de<<1|ge>>>31),ye[0]^=we,ye[1]^=_e,ye[10]^=we,ye[11]^=_e,ye[20]^=we,ye[21]^=_e,ye[30]^=we,ye[31]^=_e,ye[40]^=we,ye[41]^=_e,we=ke^(Ee<<1|xe>>>31),_e=Le^(xe<<1|Ee>>>31),ye[2]^=we,ye[3]^=_e,ye[12]^=we,ye[13]^=_e,ye[22]^=we,ye[23]^=_e,ye[32]^=we,ye[33]^=_e,ye[42]^=we,ye[43]^=_e,we=ge^(Re<<1|We>>>31),_e=de^(We<<1|Re>>>31),ye[4]^=we,ye[5]^=_e,ye[14]^=we,ye[15]^=_e,ye[24]^=we,ye[25]^=_e,ye[34]^=we,ye[35]^=_e,ye[44]^=we,ye[45]^=_e,we=Ee^(Fe<<1|Ie>>>31),_e=xe^(Ie<<1|Fe>>>31),ye[6]^=we,ye[7]^=_e,ye[16]^=we,ye[17]^=_e,ye[26]^=we,ye[27]^=_e,ye[36]^=we,ye[37]^=_e,ye[46]^=we,ye[47]^=_e,we=Re^(ke<<1|Le>>>31),_e=We^(Le<<1|ke>>>31),ye[8]^=we,ye[9]^=_e,ye[18]^=we,ye[19]^=_e,ye[28]^=we,ye[29]^=_e,ye[38]^=we,ye[39]^=_e,ye[48]^=we,ye[49]^=_e,De=ye[0],Xe=ye[1],er=ye[11]<<4|ye[10]>>>28,ln=ye[10]<<4|ye[11]>>>28,Jt=ye[20]<<3|ye[21]>>>29,Lr=ye[21]<<3|ye[20]>>>29,Ut=ye[31]<<9|ye[30]>>>23,ot=ye[30]<<9|ye[31]>>>23,rr=ye[40]<<18|ye[41]>>>14,nr=ye[41]<<18|ye[40]>>>14,ur=ye[2]<<1|ye[3]>>>31,Jr=ye[3]<<1|ye[2]>>>31,Ke=ye[13]<<12|ye[12]>>>20,pt=ye[12]<<12|ye[13]>>>20,Te=ye[22]<<10|ye[23]>>>22,je=ye[23]<<10|ye[22]>>>22,Gt=ye[33]<<13|ye[32]>>>19,ar=ye[32]<<13|ye[33]>>>19,Bt=ye[42]<<2|ye[43]>>>30,Ht=ye[43]<<2|ye[42]>>>30,ut=ye[5]<<30|ye[4]>>>2,tt=ye[4]<<30|ye[5]>>>2,pr=ye[14]<<6|ye[15]>>>26,xr=ye[15]<<6|ye[14]>>>26,Ct=ye[25]<<11|ye[24]>>>21,yt=ye[24]<<11|ye[25]>>>21,Ge=ye[34]<<15|ye[35]>>>17,be=ye[35]<<15|ye[34]>>>17,Qr=ye[45]<<29|ye[44]>>>3,lr=ye[44]<<29|ye[45]>>>3,ht=ye[6]<<28|ye[7]>>>4,Et=ye[7]<<28|ye[6]>>>4,Ft=ye[17]<<23|ye[16]>>>9,Nt=ye[16]<<23|ye[17]>>>9,Xt=ye[26]<<25|ye[27]>>>7,At=ye[27]<<25|ye[26]>>>7,bt=ye[36]<<21|ye[37]>>>11,st=ye[37]<<21|ye[36]>>>11,He=ye[47]<<24|ye[46]>>>8,wt=ye[46]<<24|ye[47]>>>8,jr=ye[8]<<27|ye[9]>>>5,yr=ye[9]<<27|ye[8]>>>5,Vt=ye[18]<<20|ye[19]>>>12,$t=ye[19]<<20|ye[18]>>>12,jt=ye[29]<<7|ye[28]>>>25,Ir=ye[28]<<7|ye[29]>>>25,kt=ye[38]<<8|ye[39]>>>24,wr=ye[39]<<8|ye[38]>>>24,rt=ye[48]<<14|ye[49]>>>18,Pt=ye[49]<<14|ye[48]>>>18,ye[0]=De^~Ke&Ct,ye[1]=Xe^~pt&yt,ye[10]=ht^~Vt&Jt,ye[11]=Et^~$t&Lr,ye[20]=ur^~pr&Xt,ye[21]=Jr^~xr&At,ye[30]=jr^~er&Te,ye[31]=yr^~ln&je,ye[40]=ut^~Ft&jt,ye[41]=tt^~Nt&Ir,ye[2]=Ke^~Ct&bt,ye[3]=pt^~yt&st,ye[12]=Vt^~Jt&Gt,ye[13]=$t^~Lr&ar,ye[22]=pr^~Xt&kt,ye[23]=xr^~At&wr,ye[32]=er^~Te&Ge,ye[33]=ln^~je&be,ye[42]=Ft^~jt&Ut,ye[43]=Nt^~Ir&ot,ye[4]=Ct^~bt&rt,ye[5]=yt^~st&Pt,ye[14]=Jt^~Gt&Qr,ye[15]=Lr^~ar&lr,ye[24]=Xt^~kt&rr,ye[25]=At^~wr&nr,ye[34]=Te^~Ge&He,ye[35]=je^~be&wt,ye[44]=jt^~Ut&Bt,ye[45]=Ir^~ot&Ht,ye[6]=bt^~rt&De,ye[7]=st^~Pt&Xe,ye[16]=Gt^~Qr&ht,ye[17]=ar^~lr&Et,ye[26]=kt^~rr&ur,ye[27]=wr^~nr&Jr,ye[36]=Ge^~He&jr,ye[37]=be^~wt&yr,ye[46]=Ut^~Bt&ut,ye[47]=ot^~Ht&tt,ye[8]=rt^~De&Ke,ye[9]=Pt^~Xe&pt,ye[18]=Qr^~ht&Vt,ye[19]=lr^~Et&$t,ye[28]=rr^~ur&pr,ye[29]=nr^~Jr&xr,ye[38]=He^~jr&er,ye[39]=wt^~yr&ln,ye[48]=Bt^~ut&Ft,ye[49]=Ht^~tt&Nt,ye[0]^=Y[Ce],ye[1]^=Y[Ce+1]};if(B)_.exports=W;else for(ne=0;ne<Q.length;++ne)M[Q[ne]]=W[Q[ne]]})()})(sha3$1);var sha3Exports=sha3$1.exports,__importDefault$b=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(keccak$1,"__esModule",{value:!0});keccak$1.KeccakHasher=void 0;const js_sha3_1$1=__importDefault$b(sha3Exports),util_1$9=lib$6,encode_1$4=encode$4;class KeccakHasher{constructor(){[224,256,384,512].forEach(C=>{const T=`hash${C}`,I=D=>js_sha3_1$1.default[`keccak${C}`](D),M=(D,L)=>L===1?I(D):M(I(D),L-1);this[T]=(D,L=1,B="hex")=>{let N=D;try{N=(0,util_1$9.toUint8Array)(D)}catch{}const F=M(N,L);return(0,encode_1$4.encode)(`0x${F}`,B)}})}}keccak$1.KeccakHasher=KeccakHasher;keccak$1.default=new KeccakHasher;var sha2={},hash$4={},utils$m={},minimalisticAssert=assert$g;function assert$g(_,C){if(!_)throw new Error(C||"Assertion failed")}assert$g.equal=function(C,T,I){if(C!=T)throw new Error(I||"Assertion failed: "+C+" != "+T)};var inherits_browser={exports:{}};typeof Object.create=="function"?inherits_browser.exports=function(C,T){T&&(C.super_=T,C.prototype=Object.create(T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(C,T){if(T){C.super_=T;var I=function(){};I.prototype=T.prototype,C.prototype=new I,C.prototype.constructor=C}};var inherits_browserExports=inherits_browser.exports,assert$f=minimalisticAssert,inherits$6=inherits_browserExports;utils$m.inherits=inherits$6;function isSurrogatePair(_,C){return(_.charCodeAt(C)&64512)!==55296||C<0||C+1>=_.length?!1:(_.charCodeAt(C+1)&64512)===56320}function toArray$1(_,C){if(Array.isArray(_))return _.slice();if(!_)return[];var T=[];if(typeof _=="string")if(C){if(C==="hex")for(_=_.replace(/[^a-z0-9]+/ig,""),_.length%2!==0&&(_="0"+_),M=0;M<_.length;M+=2)T.push(parseInt(_[M]+_[M+1],16))}else for(var I=0,M=0;M<_.length;M++){var D=_.charCodeAt(M);D<128?T[I++]=D:D<2048?(T[I++]=D>>6|192,T[I++]=D&63|128):isSurrogatePair(_,M)?(D=65536+((D&1023)<<10)+(_.charCodeAt(++M)&1023),T[I++]=D>>18|240,T[I++]=D>>12&63|128,T[I++]=D>>6&63|128,T[I++]=D&63|128):(T[I++]=D>>12|224,T[I++]=D>>6&63|128,T[I++]=D&63|128)}else for(M=0;M<_.length;M++)T[M]=_[M]|0;return T}utils$m.toArray=toArray$1;function toHex$2(_){for(var C="",T=0;T<_.length;T++)C+=zero2(_[T].toString(16));return C}utils$m.toHex=toHex$2;function htonl(_){var C=_>>>24|_>>>8&65280|_<<8&16711680|(_&255)<<24;return C>>>0}utils$m.htonl=htonl;function toHex32(_,C){for(var T="",I=0;I<_.length;I++){var M=_[I];C==="little"&&(M=htonl(M)),T+=zero8(M.toString(16))}return T}utils$m.toHex32=toHex32;function zero2(_){return _.length===1?"0"+_:_}utils$m.zero2=zero2;function zero8(_){return _.length===7?"0"+_:_.length===6?"00"+_:_.length===5?"000"+_:_.length===4?"0000"+_:_.length===3?"00000"+_:_.length===2?"000000"+_:_.length===1?"0000000"+_:_}utils$m.zero8=zero8;function join32(_,C,T,I){var M=T-C;assert$f(M%4===0);for(var D=new Array(M/4),L=0,B=C;L<D.length;L++,B+=4){var N;I==="big"?N=_[B]<<24|_[B+1]<<16|_[B+2]<<8|_[B+3]:N=_[B+3]<<24|_[B+2]<<16|_[B+1]<<8|_[B],D[L]=N>>>0}return D}utils$m.join32=join32;function split32(_,C){for(var T=new Array(_.length*4),I=0,M=0;I<_.length;I++,M+=4){var D=_[I];C==="big"?(T[M]=D>>>24,T[M+1]=D>>>16&255,T[M+2]=D>>>8&255,T[M+3]=D&255):(T[M+3]=D>>>24,T[M+2]=D>>>16&255,T[M+1]=D>>>8&255,T[M]=D&255)}return T}utils$m.split32=split32;function rotr32$1(_,C){return _>>>C|_<<32-C}utils$m.rotr32=rotr32$1;function rotl32$2(_,C){return _<<C|_>>>32-C}utils$m.rotl32=rotl32$2;function sum32$3(_,C){return _+C>>>0}utils$m.sum32=sum32$3;function sum32_3$1(_,C,T){return _+C+T>>>0}utils$m.sum32_3=sum32_3$1;function sum32_4$2(_,C,T,I){return _+C+T+I>>>0}utils$m.sum32_4=sum32_4$2;function sum32_5$2(_,C,T,I,M){return _+C+T+I+M>>>0}utils$m.sum32_5=sum32_5$2;function sum64$1(_,C,T,I){var M=_[C],D=_[C+1],L=I+D>>>0,B=(L<I?1:0)+T+M;_[C]=B>>>0,_[C+1]=L}utils$m.sum64=sum64$1;function sum64_hi$1(_,C,T,I){var M=C+I>>>0,D=(M<C?1:0)+_+T;return D>>>0}utils$m.sum64_hi=sum64_hi$1;function sum64_lo$1(_,C,T,I){var M=C+I;return M>>>0}utils$m.sum64_lo=sum64_lo$1;function sum64_4_hi$1(_,C,T,I,M,D,L,B){var N=0,F=C;F=F+I>>>0,N+=F<C?1:0,F=F+D>>>0,N+=F<D?1:0,F=F+B>>>0,N+=F<B?1:0;var V=_+T+M+L+N;return V>>>0}utils$m.sum64_4_hi=sum64_4_hi$1;function sum64_4_lo$1(_,C,T,I,M,D,L,B){var N=C+I+D+B;return N>>>0}utils$m.sum64_4_lo=sum64_4_lo$1;function sum64_5_hi$1(_,C,T,I,M,D,L,B,N,F){var V=0,U=C;U=U+I>>>0,V+=U<C?1:0,U=U+D>>>0,V+=U<D?1:0,U=U+B>>>0,V+=U<B?1:0,U=U+F>>>0,V+=U<F?1:0;var H=_+T+M+L+N+V;return H>>>0}utils$m.sum64_5_hi=sum64_5_hi$1;function sum64_5_lo$1(_,C,T,I,M,D,L,B,N,F){var V=C+I+D+B+F;return V>>>0}utils$m.sum64_5_lo=sum64_5_lo$1;function rotr64_hi$1(_,C,T){var I=C<<32-T|_>>>T;return I>>>0}utils$m.rotr64_hi=rotr64_hi$1;function rotr64_lo$1(_,C,T){var I=_<<32-T|C>>>T;return I>>>0}utils$m.rotr64_lo=rotr64_lo$1;function shr64_hi$1(_,C,T){return _>>>T}utils$m.shr64_hi=shr64_hi$1;function shr64_lo$1(_,C,T){var I=_<<32-T|C>>>T;return I>>>0}utils$m.shr64_lo=shr64_lo$1;var common$7={},utils$l=utils$m,assert$e=minimalisticAssert;function BlockHash$4(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}common$7.BlockHash=BlockHash$4;BlockHash$4.prototype.update=function(C,T){if(C=utils$l.toArray(C,T),this.pending?this.pending=this.pending.concat(C):this.pending=C,this.pendingTotal+=C.length,this.pending.length>=this._delta8){C=this.pending;var I=C.length%this._delta8;this.pending=C.slice(C.length-I,C.length),this.pending.length===0&&(this.pending=null),C=utils$l.join32(C,0,C.length-I,this.endian);for(var M=0;M<C.length;M+=this._delta32)this._update(C,M,M+this._delta32)}return this};BlockHash$4.prototype.digest=function(C){return this.update(this._pad()),assert$e(this.pending===null),this._digest(C)};BlockHash$4.prototype._pad=function(){var C=this.pendingTotal,T=this._delta8,I=T-(C+this.padLength)%T,M=new Array(I+this.padLength);M[0]=128;for(var D=1;D<I;D++)M[D]=0;if(C<<=3,this.endian==="big"){for(var L=8;L<this.padLength;L++)M[D++]=0;M[D++]=0,M[D++]=0,M[D++]=0,M[D++]=0,M[D++]=C>>>24&255,M[D++]=C>>>16&255,M[D++]=C>>>8&255,M[D++]=C&255}else for(M[D++]=C&255,M[D++]=C>>>8&255,M[D++]=C>>>16&255,M[D++]=C>>>24&255,M[D++]=0,M[D++]=0,M[D++]=0,M[D++]=0,L=8;L<this.padLength;L++)M[D++]=0;return M};var sha$1={},common$6={},utils$k=utils$m,rotr32=utils$k.rotr32;function ft_1$1(_,C,T,I){if(_===0)return ch32$1(C,T,I);if(_===1||_===3)return p32(C,T,I);if(_===2)return maj32$1(C,T,I)}common$6.ft_1=ft_1$1;function ch32$1(_,C,T){return _&C^~_&T}common$6.ch32=ch32$1;function maj32$1(_,C,T){return _&C^_&T^C&T}common$6.maj32=maj32$1;function p32(_,C,T){return _^C^T}common$6.p32=p32;function s0_256$1(_){return rotr32(_,2)^rotr32(_,13)^rotr32(_,22)}common$6.s0_256=s0_256$1;function s1_256$1(_){return rotr32(_,6)^rotr32(_,11)^rotr32(_,25)}common$6.s1_256=s1_256$1;function g0_256$1(_){return rotr32(_,7)^rotr32(_,18)^_>>>3}common$6.g0_256=g0_256$1;function g1_256$1(_){return rotr32(_,17)^rotr32(_,19)^_>>>10}common$6.g1_256=g1_256$1;var utils$j=utils$m,common$5=common$7,shaCommon$1=common$6,rotl32$1=utils$j.rotl32,sum32$2=utils$j.sum32,sum32_5$1=utils$j.sum32_5,ft_1=shaCommon$1.ft_1,BlockHash$3=common$5.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash$3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}utils$j.inherits(SHA1,BlockHash$3);var _1=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function(C,T){for(var I=this.W,M=0;M<16;M++)I[M]=C[T+M];for(;M<I.length;M++)I[M]=rotl32$1(I[M-3]^I[M-8]^I[M-14]^I[M-16],1);var D=this.h[0],L=this.h[1],B=this.h[2],N=this.h[3],F=this.h[4];for(M=0;M<I.length;M++){var V=~~(M/20),U=sum32_5$1(rotl32$1(D,5),ft_1(V,L,B,N),F,I[M],sha1_K[V]);F=N,N=B,B=rotl32$1(L,30),L=D,D=U}this.h[0]=sum32$2(this.h[0],D),this.h[1]=sum32$2(this.h[1],L),this.h[2]=sum32$2(this.h[2],B),this.h[3]=sum32$2(this.h[3],N),this.h[4]=sum32$2(this.h[4],F)};SHA1.prototype._digest=function(C){return C==="hex"?utils$j.toHex32(this.h,"big"):utils$j.split32(this.h,"big")};var utils$i=utils$m,common$4=common$7,shaCommon=common$6,assert$d=minimalisticAssert,sum32$1=utils$i.sum32,sum32_4$1=utils$i.sum32_4,sum32_5=utils$i.sum32_5,ch32=shaCommon.ch32,maj32=shaCommon.maj32,s0_256=shaCommon.s0_256,s1_256=shaCommon.s1_256,g0_256=shaCommon.g0_256,g1_256=shaCommon.g1_256,BlockHash$2=common$4.BlockHash,sha256_K=[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];function SHA256$1(){if(!(this instanceof SHA256$1))return new SHA256$1;BlockHash$2.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sha256_K,this.W=new Array(64)}utils$i.inherits(SHA256$1,BlockHash$2);var _256=SHA256$1;SHA256$1.blockSize=512;SHA256$1.outSize=256;SHA256$1.hmacStrength=192;SHA256$1.padLength=64;SHA256$1.prototype._update=function(C,T){for(var I=this.W,M=0;M<16;M++)I[M]=C[T+M];for(;M<I.length;M++)I[M]=sum32_4$1(g1_256(I[M-2]),I[M-7],g0_256(I[M-15]),I[M-16]);var D=this.h[0],L=this.h[1],B=this.h[2],N=this.h[3],F=this.h[4],V=this.h[5],U=this.h[6],H=this.h[7];for(assert$d(this.k.length===I.length),M=0;M<I.length;M++){var G=sum32_5(H,s1_256(F),ch32(F,V,U),this.k[M],I[M]),Z=sum32$1(s0_256(D),maj32(D,L,B));H=U,U=V,V=F,F=sum32$1(N,G),N=B,B=L,L=D,D=sum32$1(G,Z)}this.h[0]=sum32$1(this.h[0],D),this.h[1]=sum32$1(this.h[1],L),this.h[2]=sum32$1(this.h[2],B),this.h[3]=sum32$1(this.h[3],N),this.h[4]=sum32$1(this.h[4],F),this.h[5]=sum32$1(this.h[5],V),this.h[6]=sum32$1(this.h[6],U),this.h[7]=sum32$1(this.h[7],H)};SHA256$1.prototype._digest=function(C){return C==="hex"?utils$i.toHex32(this.h,"big"):utils$i.split32(this.h,"big")};var utils$h=utils$m,SHA256=_256;function SHA224(){if(!(this instanceof SHA224))return new SHA224;SHA256.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}utils$h.inherits(SHA224,SHA256);var _224=SHA224;SHA224.blockSize=512;SHA224.outSize=224;SHA224.hmacStrength=192;SHA224.padLength=64;SHA224.prototype._digest=function(C){return C==="hex"?utils$h.toHex32(this.h.slice(0,7),"big"):utils$h.split32(this.h.slice(0,7),"big")};var utils$g=utils$m,common$3=common$7,assert$c=minimalisticAssert,rotr64_hi=utils$g.rotr64_hi,rotr64_lo=utils$g.rotr64_lo,shr64_hi=utils$g.shr64_hi,shr64_lo=utils$g.shr64_lo,sum64=utils$g.sum64,sum64_hi=utils$g.sum64_hi,sum64_lo=utils$g.sum64_lo,sum64_4_hi=utils$g.sum64_4_hi,sum64_4_lo=utils$g.sum64_4_lo,sum64_5_hi=utils$g.sum64_5_hi,sum64_5_lo=utils$g.sum64_5_lo,BlockHash$1=common$3.BlockHash,sha512_K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function SHA512$1(){if(!(this instanceof SHA512$1))return new SHA512$1;BlockHash$1.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sha512_K,this.W=new Array(160)}utils$g.inherits(SHA512$1,BlockHash$1);var _512=SHA512$1;SHA512$1.blockSize=1024;SHA512$1.outSize=512;SHA512$1.hmacStrength=192;SHA512$1.padLength=128;SHA512$1.prototype._prepareBlock=function(C,T){for(var I=this.W,M=0;M<32;M++)I[M]=C[T+M];for(;M<I.length;M+=2){var D=g1_512_hi(I[M-4],I[M-3]),L=g1_512_lo(I[M-4],I[M-3]),B=I[M-14],N=I[M-13],F=g0_512_hi(I[M-30],I[M-29]),V=g0_512_lo(I[M-30],I[M-29]),U=I[M-32],H=I[M-31];I[M]=sum64_4_hi(D,L,B,N,F,V,U,H),I[M+1]=sum64_4_lo(D,L,B,N,F,V,U,H)}};SHA512$1.prototype._update=function(C,T){this._prepareBlock(C,T);var I=this.W,M=this.h[0],D=this.h[1],L=this.h[2],B=this.h[3],N=this.h[4],F=this.h[5],V=this.h[6],U=this.h[7],H=this.h[8],G=this.h[9],Z=this.h[10],Y=this.h[11],J=this.h[12],X=this.h[13],oe=this.h[14],ae=this.h[15];assert$c(this.k.length===I.length);for(var le=0;le<I.length;le+=2){var he=oe,me=ae,ve=s1_512_hi(H,G),Se=s1_512_lo(H,G),Pe=ch64_hi(H,G,Z,Y,J),Ve=ch64_lo(H,G,Z,Y,J,X),Ne=this.k[le],ze=this.k[le+1],fe=I[le],W=I[le+1],Q=sum64_5_hi(he,me,ve,Se,Pe,Ve,Ne,ze,fe,W),ne=sum64_5_lo(he,me,ve,Se,Pe,Ve,Ne,ze,fe,W);he=s0_512_hi(M,D),me=s0_512_lo(M,D),ve=maj64_hi(M,D,L,B,N),Se=maj64_lo(M,D,L,B,N,F);var ie=sum64_hi(he,me,ve,Se),te=sum64_lo(he,me,ve,Se);oe=J,ae=X,J=Z,X=Y,Z=H,Y=G,H=sum64_hi(V,U,Q,ne),G=sum64_lo(U,U,Q,ne),V=N,U=F,N=L,F=B,L=M,B=D,M=sum64_hi(Q,ne,ie,te),D=sum64_lo(Q,ne,ie,te)}sum64(this.h,0,M,D),sum64(this.h,2,L,B),sum64(this.h,4,N,F),sum64(this.h,6,V,U),sum64(this.h,8,H,G),sum64(this.h,10,Z,Y),sum64(this.h,12,J,X),sum64(this.h,14,oe,ae)};SHA512$1.prototype._digest=function(C){return C==="hex"?utils$g.toHex32(this.h,"big"):utils$g.split32(this.h,"big")};function ch64_hi(_,C,T,I,M){var D=_&T^~_&M;return D<0&&(D+=4294967296),D}function ch64_lo(_,C,T,I,M,D){var L=C&I^~C&D;return L<0&&(L+=4294967296),L}function maj64_hi(_,C,T,I,M){var D=_&T^_&M^T&M;return D<0&&(D+=4294967296),D}function maj64_lo(_,C,T,I,M,D){var L=C&I^C&D^I&D;return L<0&&(L+=4294967296),L}function s0_512_hi(_,C){var T=rotr64_hi(_,C,28),I=rotr64_hi(C,_,2),M=rotr64_hi(C,_,7),D=T^I^M;return D<0&&(D+=4294967296),D}function s0_512_lo(_,C){var T=rotr64_lo(_,C,28),I=rotr64_lo(C,_,2),M=rotr64_lo(C,_,7),D=T^I^M;return D<0&&(D+=4294967296),D}function s1_512_hi(_,C){var T=rotr64_hi(_,C,14),I=rotr64_hi(_,C,18),M=rotr64_hi(C,_,9),D=T^I^M;return D<0&&(D+=4294967296),D}function s1_512_lo(_,C){var T=rotr64_lo(_,C,14),I=rotr64_lo(_,C,18),M=rotr64_lo(C,_,9),D=T^I^M;return D<0&&(D+=4294967296),D}function g0_512_hi(_,C){var T=rotr64_hi(_,C,1),I=rotr64_hi(_,C,8),M=shr64_hi(_,C,7),D=T^I^M;return D<0&&(D+=4294967296),D}function g0_512_lo(_,C){var T=rotr64_lo(_,C,1),I=rotr64_lo(_,C,8),M=shr64_lo(_,C,7),D=T^I^M;return D<0&&(D+=4294967296),D}function g1_512_hi(_,C){var T=rotr64_hi(_,C,19),I=rotr64_hi(C,_,29),M=shr64_hi(_,C,6),D=T^I^M;return D<0&&(D+=4294967296),D}function g1_512_lo(_,C){var T=rotr64_lo(_,C,19),I=rotr64_lo(C,_,29),M=shr64_lo(_,C,6),D=T^I^M;return D<0&&(D+=4294967296),D}var utils$f=utils$m,SHA512=_512;function SHA384(){if(!(this instanceof SHA384))return new SHA384;SHA512.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}utils$f.inherits(SHA384,SHA512);var _384=SHA384;SHA384.blockSize=1024;SHA384.outSize=384;SHA384.hmacStrength=192;SHA384.padLength=128;SHA384.prototype._digest=function(C){return C==="hex"?utils$f.toHex32(this.h.slice(0,12),"big"):utils$f.split32(this.h.slice(0,12),"big")};sha$1.sha1=_1;sha$1.sha224=_224;sha$1.sha256=_256;sha$1.sha384=_384;sha$1.sha512=_512;var ripemd={},utils$e=utils$m,common$2=common$7,rotl32=utils$e.rotl32,sum32=utils$e.sum32,sum32_3=utils$e.sum32_3,sum32_4=utils$e.sum32_4,BlockHash=common$2.BlockHash;function RIPEMD160$1(){if(!(this instanceof RIPEMD160$1))return new RIPEMD160$1;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}utils$e.inherits(RIPEMD160$1,BlockHash);ripemd.ripemd160=RIPEMD160$1;RIPEMD160$1.blockSize=512;RIPEMD160$1.outSize=160;RIPEMD160$1.hmacStrength=192;RIPEMD160$1.padLength=64;RIPEMD160$1.prototype._update=function(C,T){for(var I=this.h[0],M=this.h[1],D=this.h[2],L=this.h[3],B=this.h[4],N=I,F=M,V=D,U=L,H=B,G=0;G<80;G++){var Z=sum32(rotl32(sum32_4(I,f$3(G,M,D,L),C[r$4[G]+T],K(G)),s$1[G]),B);I=B,B=L,L=rotl32(D,10),D=M,M=Z,Z=sum32(rotl32(sum32_4(N,f$3(79-G,F,V,U),C[rh[G]+T],Kh(G)),sh[G]),H),N=H,H=U,U=rotl32(V,10),V=F,F=Z}Z=sum32_3(this.h[1],D,U),this.h[1]=sum32_3(this.h[2],L,H),this.h[2]=sum32_3(this.h[3],B,N),this.h[3]=sum32_3(this.h[4],I,F),this.h[4]=sum32_3(this.h[0],M,V),this.h[0]=Z};RIPEMD160$1.prototype._digest=function(C){return C==="hex"?utils$e.toHex32(this.h,"little"):utils$e.split32(this.h,"little")};function f$3(_,C,T,I){return _<=15?C^T^I:_<=31?C&T|~C&I:_<=47?(C|~T)^I:_<=63?C&I|T&~I:C^(T|~I)}function K(_){return _<=15?0:_<=31?1518500249:_<=47?1859775393:_<=63?2400959708:2840853838}function Kh(_){return _<=15?1352829926:_<=31?1548603684:_<=47?1836072691:_<=63?2053994217:0}var r$4=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],rh=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],s$1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],sh=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],utils$d=utils$m,assert$b=minimalisticAssert;function Hmac(_,C,T){if(!(this instanceof Hmac))return new Hmac(_,C,T);this.Hash=_,this.blockSize=_.blockSize/8,this.outSize=_.outSize/8,this.inner=null,this.outer=null,this._init(utils$d.toArray(C,T))}var hmac=Hmac;Hmac.prototype._init=function(C){C.length>this.blockSize&&(C=new this.Hash().update(C).digest()),assert$b(C.length<=this.blockSize);for(var T=C.length;T<this.blockSize;T++)C.push(0);for(T=0;T<C.length;T++)C[T]^=54;for(this.inner=new this.Hash().update(C),T=0;T<C.length;T++)C[T]^=106;this.outer=new this.Hash().update(C)};Hmac.prototype.update=function(C,T){return this.inner.update(C,T),this};Hmac.prototype.digest=function(C){return this.outer.update(this.inner.digest()),this.outer.digest(C)};(function(_){var C=_;C.utils=utils$m,C.common=common$7,C.sha=sha$1,C.ripemd=ripemd,C.hmac=hmac,C.sha1=C.sha.sha1,C.sha256=C.sha.sha256,C.sha224=C.sha.sha224,C.sha384=C.sha.sha384,C.sha512=C.sha.sha512,C.ripemd160=C.ripemd.ripemd160})(hash$4);Object.defineProperty(sha2,"__esModule",{value:!0});sha2.Sha2Hasher=void 0;const util_1$8=lib$6,hash_js_1=hash$4,encode_1$3=encode$4,hashFns={sha224:hash_js_1.sha224,sha256:hash_js_1.sha256,sha384:hash_js_1.sha384,sha512:hash_js_1.sha512};class Sha2Hasher{constructor(){[224,256,384,512].forEach(C=>{const T=`hash${C}`,I=hashFns[`sha${C}`],M=(D,L)=>{let B=D;try{B=(0,util_1$8.toUint8Array)(D)}catch{}return L===1?`0x${I().update(B).digest("hex")}`:M(M(B,1),L-1)};this[T]=(D,L=2,B="hex")=>{const N=M(D,L);return(0,encode_1$3.encode)(N,B)}})}}sha2.Sha2Hasher=Sha2Hasher;sha2.default=new Sha2Hasher;var sha3={},__importDefault$a=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(sha3,"__esModule",{value:!0});sha3.Sha3Hasher=void 0;const js_sha3_1=__importDefault$a(sha3Exports),util_1$7=lib$6,encode_1$2=encode$4;class Sha3Hasher{constructor(){[224,256,384,512].forEach(C=>{const T=`hash${C}`,I=js_sha3_1.default[`sha3_${C}`],M=(D,L)=>L===1?I(D):M(I(D),L-1);this[T]=(D,L=1,B="hex")=>{let N=D;try{N=(0,util_1$7.toUint8Array)(D)}catch{}const F=M(N,L);return(0,encode_1$2.encode)(`0x${F}`,B)}})}}sha3.Sha3Hasher=Sha3Hasher;sha3.default=new Sha3Hasher;var ed25519$1={};function commonjsRequire(_){throw new Error('Could not dynamically require "'+_+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var naclFast={exports:{}},cryptoBrowserify={},readableBrowser$1={exports:{}},events={exports:{}},R=typeof Reflect=="object"?Reflect:null,ReflectApply=R&&typeof R.apply=="function"?R.apply:function(C,T,I){return Function.prototype.apply.call(C,T,I)},ReflectOwnKeys;R&&typeof R.ownKeys=="function"?ReflectOwnKeys=R.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:ReflectOwnKeys=function(C){return Object.getOwnPropertyNames(C)};function ProcessEmitWarning(_){console&&console.warn&&console.warn(_)}var NumberIsNaN=Number.isNaN||function(C){return C!==C};function EventEmitter$2(){EventEmitter$2.init.call(this)}events.exports=EventEmitter$2;events.exports.once=once$2;EventEmitter$2.EventEmitter=EventEmitter$2;EventEmitter$2.prototype._events=void 0;EventEmitter$2.prototype._eventsCount=0;EventEmitter$2.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(EventEmitter$2,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(_){if(typeof _!="number"||_<0||NumberIsNaN(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");defaultMaxListeners=_}});EventEmitter$2.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$2.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||NumberIsNaN(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function _getMaxListeners(_){return _._maxListeners===void 0?EventEmitter$2.defaultMaxListeners:_._maxListeners}EventEmitter$2.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$2.prototype.emit=function(C){for(var T=[],I=1;I<arguments.length;I++)T.push(arguments[I]);var M=C==="error",D=this._events;if(D!==void 0)M=M&&D.error===void 0;else if(!M)return!1;if(M){var L;if(T.length>0&&(L=T[0]),L instanceof Error)throw L;var B=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw B.context=L,B}var N=D[C];if(N===void 0)return!1;if(typeof N=="function")ReflectApply(N,this,T);else for(var F=N.length,V=arrayClone(N,F),I=0;I<F;++I)ReflectApply(V[I],this,T);return!0};function _addListener(_,C,T,I){var M,D,L;if(checkListener(T),D=_._events,D===void 0?(D=_._events=Object.create(null),_._eventsCount=0):(D.newListener!==void 0&&(_.emit("newListener",C,T.listener?T.listener:T),D=_._events),L=D[C]),L===void 0)L=D[C]=T,++_._eventsCount;else if(typeof L=="function"?L=D[C]=I?[T,L]:[L,T]:I?L.unshift(T):L.push(T),M=_getMaxListeners(_),M>0&&L.length>M&&!L.warned){L.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");B.name="MaxListenersExceededWarning",B.emitter=_,B.type=C,B.count=L.length,ProcessEmitWarning(B)}return _}EventEmitter$2.prototype.addListener=function(C,T){return _addListener(this,C,T,!1)};EventEmitter$2.prototype.on=EventEmitter$2.prototype.addListener;EventEmitter$2.prototype.prependListener=function(C,T){return _addListener(this,C,T,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(_,C,T){var I={fired:!1,wrapFn:void 0,target:_,type:C,listener:T},M=onceWrapper.bind(I);return M.listener=T,I.wrapFn=M,M}EventEmitter$2.prototype.once=function(C,T){return checkListener(T),this.on(C,_onceWrap(this,C,T)),this};EventEmitter$2.prototype.prependOnceListener=function(C,T){return checkListener(T),this.prependListener(C,_onceWrap(this,C,T)),this};EventEmitter$2.prototype.removeListener=function(C,T){var I,M,D,L,B;if(checkListener(T),M=this._events,M===void 0)return this;if(I=M[C],I===void 0)return this;if(I===T||I.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete M[C],M.removeListener&&this.emit("removeListener",C,I.listener||T));else if(typeof I!="function"){for(D=-1,L=I.length-1;L>=0;L--)if(I[L]===T||I[L].listener===T){B=I[L].listener,D=L;break}if(D<0)return this;D===0?I.shift():spliceOne(I,D),I.length===1&&(M[C]=I[0]),M.removeListener!==void 0&&this.emit("removeListener",C,B||T)}return this};EventEmitter$2.prototype.off=EventEmitter$2.prototype.removeListener;EventEmitter$2.prototype.removeAllListeners=function(C){var T,I,M;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[C]),this;if(arguments.length===0){var D=Object.keys(I),L;for(M=0;M<D.length;++M)L=D[M],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=I[C],typeof T=="function")this.removeListener(C,T);else if(T!==void 0)for(M=T.length-1;M>=0;M--)this.removeListener(C,T[M]);return this};function _listeners(_,C,T){var I=_._events;if(I===void 0)return[];var M=I[C];return M===void 0?[]:typeof M=="function"?T?[M.listener||M]:[M]:T?unwrapListeners(M):arrayClone(M,M.length)}EventEmitter$2.prototype.listeners=function(C){return _listeners(this,C,!0)};EventEmitter$2.prototype.rawListeners=function(C){return _listeners(this,C,!1)};EventEmitter$2.listenerCount=function(_,C){return typeof _.listenerCount=="function"?_.listenerCount(C):listenerCount.call(_,C)};EventEmitter$2.prototype.listenerCount=listenerCount;function listenerCount(_){var C=this._events;if(C!==void 0){var T=C[_];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}EventEmitter$2.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(_,C){for(var T=new Array(C),I=0;I<C;++I)T[I]=_[I];return T}function spliceOne(_,C){for(;C+1<_.length;C++)_[C]=_[C+1];_.pop()}function unwrapListeners(_){for(var C=new Array(_.length),T=0;T<C.length;++T)C[T]=_[T].listener||_[T];return C}function once$2(_,C){return new Promise(function(T,I){function M(L){_.removeListener(C,D),I(L)}function D(){typeof _.removeListener=="function"&&_.removeListener("error",M),T([].slice.call(arguments))}eventTargetAgnosticAddListener(_,C,D,{once:!0}),C!=="error"&&addErrorHandlerIfEventEmitter(_,M,{once:!0})})}function addErrorHandlerIfEventEmitter(_,C,T){typeof _.on=="function"&&eventTargetAgnosticAddListener(_,"error",C,T)}function eventTargetAgnosticAddListener(_,C,T,I){if(typeof _.on=="function")I.once?_.once(C,T):_.on(C,T);else if(typeof _.addEventListener=="function")_.addEventListener(C,function M(D){I.once&&_.removeEventListener(C,M),T(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _)}var eventsExports=events.exports,streamBrowser$1=eventsExports.EventEmitter,util$9={},types$3={},shams$1,hasRequiredShams;function requireShams(){return hasRequiredShams||(hasRequiredShams=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var C={},T=Symbol("test"),I=Object(T);if(typeof T=="string"||Object.prototype.toString.call(T)!=="[object Symbol]"||Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var M=42;C[T]=M;for(var D in C)return!1;if(typeof Object.keys=="function"&&Object.keys(C).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(C).length!==0)return!1;var L=Object.getOwnPropertySymbols(C);if(L.length!==1||L[0]!==T||!Object.prototype.propertyIsEnumerable.call(C,T))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var B=Object.getOwnPropertyDescriptor(C,T);if(B.value!==M||B.enumerable!==!0)return!1}return!0}),shams$1}var hasSymbols$2=requireShams(),shams=function(){return hasSymbols$2()&&!!Symbol.toStringTag},esObjectAtoms=Object,esErrors=Error,_eval=EvalError,range$1=RangeError,ref=ReferenceError,syntax=SyntaxError,type$1=TypeError,uri=URIError,abs$2=Math.abs,floor$5=Math.floor,max$5=Math.max,min$5=Math.min,pow$2=Math.pow,round$1=Math.round,_isNaN=Number.isNaN||function(C){return C!==C},$isNaN=_isNaN,sign$3=function(C){return $isNaN(C)||C===0?C:C<0?-1:1},gOPD$2=Object.getOwnPropertyDescriptor,$gOPD$1=gOPD$2;if($gOPD$1)try{$gOPD$1([],"length")}catch{$gOPD$1=null}var gopd$1=$gOPD$1,$defineProperty$5=Object.defineProperty||!1;if($defineProperty$5)try{$defineProperty$5({},"a",{value:1})}catch{$defineProperty$5=!1}var esDefineProperty=$defineProperty$5,hasSymbols$1,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols$1;hasRequiredHasSymbols=1;var _=typeof Symbol<"u"&&Symbol,C=requireShams();return hasSymbols$1=function(){return typeof _!="function"||typeof Symbol!="function"||typeof _("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:C()},hasSymbols$1}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var _=esObjectAtoms;return Object_getPrototypeOf=_.getPrototypeOf||null,Object_getPrototypeOf}var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr$4=Object.prototype.toString,max$4=Math.max,funcType="[object Function]",concatty=function(C,T){for(var I=[],M=0;M<C.length;M+=1)I[M]=C[M];for(var D=0;D<T.length;D+=1)I[D+C.length]=T[D];return I},slicy=function(C,T){for(var I=[],M=T,D=0;M<C.length;M+=1,D+=1)I[D]=C[M];return I},joiny=function(_,C){for(var T="",I=0;I<_.length;I+=1)T+=_[I],I+1<_.length&&(T+=C);return T},implementation$2=function(C){var T=this;if(typeof T!="function"||toStr$4.apply(T)!==funcType)throw new TypeError(ERROR_MESSAGE+T);for(var I=slicy(arguments,1),M,D=function(){if(this instanceof M){var V=T.apply(this,concatty(I,arguments));return Object(V)===V?V:this}return T.apply(C,concatty(I,arguments))},L=max$4(0,T.length-I.length),B=[],N=0;N<L;N++)B[N]="$"+N;if(M=Function("binder","return function ("+joiny(B,",")+"){ return binder.apply(this,arguments); }")(D),T.prototype){var F=function(){};F.prototype=T.prototype,M.prototype=new F,F.prototype=null}return M},implementation$1=implementation$2,functionBind$1=Function.prototype.bind||implementation$1,functionCall$1=Function.prototype.call,functionApply$1=Function.prototype.apply,reflectApply$1=typeof Reflect<"u"&&Reflect&&Reflect.apply,bind$i=functionBind$1,$apply$2=functionApply$1,$call$2=functionCall$1,$reflectApply=reflectApply$1,actualApply$1=$reflectApply||bind$i.call($call$2,$apply$2),bind$h=functionBind$1,$TypeError$j=type$1,$call$1=functionCall$1,$actualApply=actualApply$1,callBindApplyHelpers=function(C){if(C.length<1||typeof C[0]!="function")throw new $TypeError$j("a function is required");return $actualApply(bind$h,$call$1,C)},get$3,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get$3;hasRequiredGet=1;var _=callBindApplyHelpers,C=gopd$1,T;try{T=[].__proto__===Array.prototype}catch(L){if(!L||typeof L!="object"||!("code"in L)||L.code!=="ERR_PROTO_ACCESS")throw L}var I=!!T&&C&&C(Object.prototype,"__proto__"),M=Object,D=M.getPrototypeOf;return get$3=I&&typeof I.get=="function"?_([I.get]):typeof D=="function"?function(B){return D(B==null?B:M(B))}:!1,get$3}var getProto$2,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto$2;hasRequiredGetProto=1;var _=requireReflect_getPrototypeOf(),C=requireObject_getPrototypeOf(),T=requireGet();return getProto$2=_?function(M){return _(M)}:C||(T?function(M){return T(M)}:null),getProto$2}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var _=Function.prototype.call,C=Object.prototype.hasOwnProperty,T=functionBind$1;return hasown=T.call(_,C),hasown}var undefined$1,$Object$5=esObjectAtoms,$Error=esErrors,$EvalError=_eval,$RangeError$4=range$1,$ReferenceError=ref,$SyntaxError$1=syntax,$TypeError$i=type$1,$URIError=uri,abs$1=abs$2,floor$4=floor$5,max$3=max$5,min$4=min$5,pow$1=pow$2,round=round$1,sign$2=sign$3,$Function$1=Function,getEvalledConstructor=function(_){try{return $Function$1('"use strict"; return ('+_+").constructor;")()}catch{}},$gOPD=gopd$1,$defineProperty$4=esDefineProperty,throwTypeError=function(){throw new $TypeError$i},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=requireHasSymbols()(),getProto$1=requireGetProto(),$ObjectGPO=requireObject_getPrototypeOf(),$ReflectGPO=requireReflect_getPrototypeOf(),$apply$1=functionApply$1,$call=functionCall$1,needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto$1?undefined$1:getProto$1(Uint8Array),INTRINSICS={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto$1?getProto$1([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function$1,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols||!getProto$1?undefined$1:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$Object$5,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":$RangeError$4,"%ReferenceError%":$ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols||!getProto$1?undefined$1:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto$1?getProto$1(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError$1,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$i,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":$URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply$1,"%Object.defineProperty%":$defineProperty$4,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs$1,"%Math.floor%":floor$4,"%Math.max%":max$3,"%Math.min%":min$4,"%Math.pow%":pow$1,"%Math.round%":round,"%Math.sign%":sign$2,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto$1)try{null.error}catch(_){var errorProto=getProto$1(getProto$1(_));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function _(C){var T;if(C==="%AsyncFunction%")T=getEvalledConstructor("async function () {}");else if(C==="%GeneratorFunction%")T=getEvalledConstructor("function* () {}");else if(C==="%AsyncGeneratorFunction%")T=getEvalledConstructor("async function* () {}");else if(C==="%AsyncGenerator%"){var I=_("%AsyncGeneratorFunction%");I&&(T=I.prototype)}else if(C==="%AsyncIteratorPrototype%"){var M=_("%AsyncGenerator%");M&&getProto$1&&(T=getProto$1(M.prototype))}return INTRINSICS[C]=T,T},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind$g=functionBind$1,hasOwn$g=requireHasown(),$concat=bind$g.call($call,Array.prototype.concat),$spliceApply=bind$g.call($apply$1,Array.prototype.splice),$replace=bind$g.call($call,String.prototype.replace),$strSlice=bind$g.call($call,String.prototype.slice),$exec=bind$g.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(C){var T=$strSlice(C,0,1),I=$strSlice(C,-1);if(T==="%"&&I!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&T!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");var M=[];return $replace(C,rePropName,function(D,L,B,N){M[M.length]=B?$replace(N,reEscapeChar,"$1"):L||D}),M},getBaseIntrinsic=function(C,T){var I=C,M;if(hasOwn$g(LEGACY_ALIASES,I)&&(M=LEGACY_ALIASES[I],I="%"+M[0]+"%"),hasOwn$g(INTRINSICS,I)){var D=INTRINSICS[I];if(D===needsEval&&(D=doEval(I)),typeof D>"u"&&!T)throw new $TypeError$i("intrinsic "+C+" exists, but is not available. Please file an issue!");return{alias:M,name:I,value:D}}throw new $SyntaxError$1("intrinsic "+C+" does not exist!")},getIntrinsic=function(C,T){if(typeof C!="string"||C.length===0)throw new $TypeError$i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof T!="boolean")throw new $TypeError$i('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,C)===null)throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=stringToPath(C),M=I.length>0?I[0]:"",D=getBaseIntrinsic("%"+M+"%",T),L=D.name,B=D.value,N=!1,F=D.alias;F&&(M=F[0],$spliceApply(I,$concat([0,1],F)));for(var V=1,U=!0;V<I.length;V+=1){var H=I[V],G=$strSlice(H,0,1),Z=$strSlice(H,-1);if((G==='"'||G==="'"||G==="`"||Z==='"'||Z==="'"||Z==="`")&&G!==Z)throw new $SyntaxError$1("property names with quotes must have matching quotes");if((H==="constructor"||!U)&&(N=!0),M+="."+H,L="%"+M+"%",hasOwn$g(INTRINSICS,L))B=INTRINSICS[L];else if(B!=null){if(!(H in B)){if(!T)throw new $TypeError$i("base intrinsic for "+C+" exists, but the property is not available.");return}if($gOPD&&V+1>=I.length){var Y=$gOPD(B,H);U=!!Y,U&&"get"in Y&&!("originalValue"in Y.get)?B=Y.get:B=B[H]}else U=hasOwn$g(B,H),B=B[H];U&&!N&&(INTRINSICS[L]=B)}}return B},callBind$3={exports:{}},$defineProperty$3=esDefineProperty,$SyntaxError=syntax,$TypeError$h=type$1,gopd=gopd$1,defineDataProperty=function(C,T,I){if(!C||typeof C!="object"&&typeof C!="function")throw new $TypeError$h("`obj` must be an object or a function`");if(typeof T!="string"&&typeof T!="symbol")throw new $TypeError$h("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new $TypeError$h("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new $TypeError$h("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new $TypeError$h("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new $TypeError$h("`loose`, if provided, must be a boolean");var M=arguments.length>3?arguments[3]:null,D=arguments.length>4?arguments[4]:null,L=arguments.length>5?arguments[5]:null,B=arguments.length>6?arguments[6]:!1,N=!!gopd&&gopd(C,T);if($defineProperty$3)$defineProperty$3(C,T,{configurable:L===null&&N?N.configurable:!L,enumerable:M===null&&N?N.enumerable:!M,value:I,writable:D===null&&N?N.writable:!D});else if(B||!M&&!D&&!L)C[T]=I;else throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},$defineProperty$2=esDefineProperty,hasPropertyDescriptors=function(){return!!$defineProperty$2};hasPropertyDescriptors.hasArrayLengthDefineBug=function(){if(!$defineProperty$2)return null;try{return $defineProperty$2([],"length",{value:1}).length!==1}catch{return!0}};var hasPropertyDescriptors_1=hasPropertyDescriptors,GetIntrinsic$2=getIntrinsic,define=defineDataProperty,hasDescriptors=hasPropertyDescriptors_1(),gOPD$1=gopd$1,$TypeError$g=type$1,$floor=GetIntrinsic$2("%Math.floor%"),setFunctionLength=function(C,T){if(typeof C!="function")throw new $TypeError$g("`fn` is not a function");if(typeof T!="number"||T<0||T>4294967295||$floor(T)!==T)throw new $TypeError$g("`length` must be a positive 32-bit integer");var I=arguments.length>2&&!!arguments[2],M=!0,D=!0;if("length"in C&&gOPD$1){var L=gOPD$1(C,"length");L&&!L.configurable&&(M=!1),L&&!L.writable&&(D=!1)}return(M||D||!I)&&(hasDescriptors?define(C,"length",T,!0,!0):define(C,"length",T)),C},bind$f=functionBind$1,$apply=functionApply$1,actualApply=actualApply$1,applyBind=function(){return actualApply(bind$f,$apply,arguments)};(function(_){var C=setFunctionLength,T=esDefineProperty,I=callBindApplyHelpers,M=applyBind;_.exports=function(L){var B=I(arguments),N=L.length-(arguments.length-1);return C(B,1+(N>0?N:0),!0)},T?T(_.exports,"apply",{value:M}):_.exports.apply=M})(callBind$3);var callBindExports=callBind$3.exports,GetIntrinsic$1=getIntrinsic,callBind$2=callBindExports,$indexOf$4=callBind$2(GetIntrinsic$1("String.prototype.indexOf")),callBound$4=function(C,T){var I=GetIntrinsic$1(C,!!T);return typeof I=="function"&&$indexOf$4(C,".prototype.")>-1?callBind$2(I):I},hasToStringTag$3=shams(),callBound$3=callBound$4,$toString$4=callBound$3("Object.prototype.toString"),isStandardArguments=function(C){return hasToStringTag$3&&C&&typeof C=="object"&&Symbol.toStringTag in C?!1:$toString$4(C)==="[object Arguments]"},isLegacyArguments=function(C){return isStandardArguments(C)?!0:C!==null&&typeof C=="object"&&typeof C.length=="number"&&C.length>=0&&$toString$4(C)!=="[object Array]"&&$toString$4(C.callee)==="[object Function]"},supportsStandardArguments=function(){return isStandardArguments(arguments)}();isStandardArguments.isLegacyArguments=isLegacyArguments;var isArguments$3=supportsStandardArguments?isStandardArguments:isLegacyArguments,toStr$3=Object.prototype.toString,fnToStr$1=Function.prototype.toString,isFnRegex=/^\s*(?:function)?\*/,hasToStringTag$2=shams(),getProto=Object.getPrototypeOf,getGeneratorFunc=function(){if(!hasToStringTag$2)return!1;try{return Function("return function*() {}")()}catch{}},GeneratorFunction,isGeneratorFunction=function(C){if(typeof C!="function")return!1;if(isFnRegex.test(fnToStr$1.call(C)))return!0;if(!hasToStringTag$2){var T=toStr$3.call(C);return T==="[object GeneratorFunction]"}if(!getProto)return!1;if(typeof GeneratorFunction>"u"){var I=getGeneratorFunc();GeneratorFunction=I?getProto(I):!1}return getProto(C)===GeneratorFunction},fnToStr=Function.prototype.toString,reflectApply=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,badArrayLike,isCallableMarker;if(typeof reflectApply=="function"&&typeof Object.defineProperty=="function")try{badArrayLike=Object.defineProperty({},"length",{get:function(){throw isCallableMarker}}),isCallableMarker={},reflectApply(function(){throw 42},null,badArrayLike)}catch(_){_!==isCallableMarker&&(reflectApply=null)}else reflectApply=null;var constructorRegex=/^\s*class\b/,isES6ClassFn=function(C){try{var T=fnToStr.call(C);return constructorRegex.test(T)}catch{return!1}},tryFunctionObject=function(C){try{return isES6ClassFn(C)?!1:(fnToStr.call(C),!0)}catch{return!1}},toStr$2=Object.prototype.toString,objectClass="[object Object]",fnClass="[object Function]",genClass="[object GeneratorFunction]",ddaClass="[object HTMLAllCollection]",ddaClass2="[object HTML document.all class]",ddaClass3="[object HTMLCollection]",hasToStringTag$1=typeof Symbol=="function"&&!!Symbol.toStringTag,isIE68=!(0 in[,]),isDDA=function(){return!1};if(typeof document=="object"){var all=document.all;toStr$2.call(all)===toStr$2.call(document.all)&&(isDDA=function(C){if((isIE68||!C)&&(typeof C>"u"||typeof C=="object"))try{var T=toStr$2.call(C);return(T===ddaClass||T===ddaClass2||T===ddaClass3||T===objectClass)&&C("")==null}catch{}return!1})}var isCallable$j=reflectApply?function(C){if(isDDA(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;try{reflectApply(C,null,badArrayLike)}catch(T){if(T!==isCallableMarker)return!1}return!isES6ClassFn(C)&&tryFunctionObject(C)}:function(C){if(isDDA(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;if(hasToStringTag$1)return tryFunctionObject(C);if(isES6ClassFn(C))return!1;var T=toStr$2.call(C);return T!==fnClass&&T!==genClass&&!/^\[object HTML/.test(T)?!1:tryFunctionObject(C)},isCallable$i=isCallable$j,toStr$1=Object.prototype.toString,hasOwnProperty$6=Object.prototype.hasOwnProperty,forEachArray=function(C,T,I){for(var M=0,D=C.length;M<D;M++)hasOwnProperty$6.call(C,M)&&(I==null?T(C[M],M,C):T.call(I,C[M],M,C))},forEachString=function(C,T,I){for(var M=0,D=C.length;M<D;M++)I==null?T(C.charAt(M),M,C):T.call(I,C.charAt(M),M,C)},forEachObject=function(C,T,I){for(var M in C)hasOwnProperty$6.call(C,M)&&(I==null?T(C[M],M,C):T.call(I,C[M],M,C))},forEach$6=function(C,T,I){if(!isCallable$i(T))throw new TypeError("iterator must be a function");var M;arguments.length>=3&&(M=I),toStr$1.call(C)==="[object Array]"?forEachArray(C,T,M):typeof C=="string"?forEachString(C,T,M):forEachObject(C,T,M)},forEach_1=forEach$6,possibleTypedArrayNames=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],possibleNames=possibleTypedArrayNames,g$3=typeof globalThis>"u"?commonjsGlobal:globalThis,availableTypedArrays$1=function(){for(var C=[],T=0;T<possibleNames.length;T++)typeof g$3[possibleNames[T]]=="function"&&(C[C.length]=possibleNames[T]);return C},GetIntrinsic=getIntrinsic,callBindBasic=callBindApplyHelpers,$indexOf$3=callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]),callBound$2=function(C,T){var I=GetIntrinsic(C,!!T);return typeof I=="function"&&$indexOf$3(C,".prototype.")>-1?callBindBasic([I]):I},forEach$5=forEach_1,availableTypedArrays=availableTypedArrays$1,callBind$1=callBindExports,callBound$1=callBound$2,gOPD=gopd$1,$toString$3=callBound$1("Object.prototype.toString"),hasToStringTag=shams(),g$2=typeof globalThis>"u"?commonjsGlobal:globalThis,typedArrays=availableTypedArrays(),$slice=callBound$1("String.prototype.slice"),getPrototypeOf$9=Object.getPrototypeOf,$indexOf$2=callBound$1("Array.prototype.indexOf",!0)||function(C,T){for(var I=0;I<C.length;I+=1)if(C[I]===T)return I;return-1},cache$2={__proto__:null};hasToStringTag&&gOPD&&getPrototypeOf$9?forEach$5(typedArrays,function(_){var C=new g$2[_];if(Symbol.toStringTag in C){var T=getPrototypeOf$9(C),I=gOPD(T,Symbol.toStringTag);if(!I){var M=getPrototypeOf$9(T);I=gOPD(M,Symbol.toStringTag)}cache$2["$"+_]=callBind$1(I.get)}}):forEach$5(typedArrays,function(_){var C=new g$2[_],T=C.slice||C.set;T&&(cache$2["$"+_]=callBind$1(T))});var tryTypedArrays=function(C){var T=!1;return forEach$5(cache$2,function(I,M){if(!T)try{"$"+I(C)===M&&(T=$slice(M,1))}catch{}}),T},trySlices=function(C){var T=!1;return forEach$5(cache$2,function(I,M){if(!T)try{I(C),T=$slice(M,1)}catch{}}),T},whichTypedArray$1=function(C){if(!C||typeof C!="object")return!1;if(!hasToStringTag){var T=$slice($toString$3(C),8,-1);return $indexOf$2(typedArrays,T)>-1?T:T!=="Object"?!1:trySlices(C)}return gOPD?tryTypedArrays(C):null},whichTypedArray=whichTypedArray$1,isTypedArray$2=function(C){return!!whichTypedArray(C)};(function(_){var C=isArguments$3,T=isGeneratorFunction,I=whichTypedArray$1,M=isTypedArray$2;function D(De){return De.call.bind(De)}var L=typeof BigInt<"u",B=typeof Symbol<"u",N=D(Object.prototype.toString),F=D(Number.prototype.valueOf),V=D(String.prototype.valueOf),U=D(Boolean.prototype.valueOf);if(L)var H=D(BigInt.prototype.valueOf);if(B)var G=D(Symbol.prototype.valueOf);function Z(De,Xe){if(typeof De!="object")return!1;try{return Xe(De),!0}catch{return!1}}_.isArgumentsObject=C,_.isGeneratorFunction=T,_.isTypedArray=M;function Y(De){return typeof Promise<"u"&&De instanceof Promise||De!==null&&typeof De=="object"&&typeof De.then=="function"&&typeof De.catch=="function"}_.isPromise=Y;function J(De){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(De):M(De)||ue(De)}_.isArrayBufferView=J;function X(De){return I(De)==="Uint8Array"}_.isUint8Array=X;function oe(De){return I(De)==="Uint8ClampedArray"}_.isUint8ClampedArray=oe;function ae(De){return I(De)==="Uint16Array"}_.isUint16Array=ae;function le(De){return I(De)==="Uint32Array"}_.isUint32Array=le;function he(De){return I(De)==="Int8Array"}_.isInt8Array=he;function me(De){return I(De)==="Int16Array"}_.isInt16Array=me;function ve(De){return I(De)==="Int32Array"}_.isInt32Array=ve;function Se(De){return I(De)==="Float32Array"}_.isFloat32Array=Se;function Pe(De){return I(De)==="Float64Array"}_.isFloat64Array=Pe;function Ve(De){return I(De)==="BigInt64Array"}_.isBigInt64Array=Ve;function Ne(De){return I(De)==="BigUint64Array"}_.isBigUint64Array=Ne;function ze(De){return N(De)==="[object Map]"}ze.working=typeof Map<"u"&&ze(new Map);function fe(De){return typeof Map>"u"?!1:ze.working?ze(De):De instanceof Map}_.isMap=fe;function W(De){return N(De)==="[object Set]"}W.working=typeof Set<"u"&&W(new Set);function Q(De){return typeof Set>"u"?!1:W.working?W(De):De instanceof Set}_.isSet=Q;function ne(De){return N(De)==="[object WeakMap]"}ne.working=typeof WeakMap<"u"&&ne(new WeakMap);function ie(De){return typeof WeakMap>"u"?!1:ne.working?ne(De):De instanceof WeakMap}_.isWeakMap=ie;function te(De){return N(De)==="[object WeakSet]"}te.working=typeof WeakSet<"u"&&te(new WeakSet);function se(De){return te(De)}_.isWeakSet=se;function pe(De){return N(De)==="[object ArrayBuffer]"}pe.working=typeof ArrayBuffer<"u"&&pe(new ArrayBuffer);function ce(De){return typeof ArrayBuffer>"u"?!1:pe.working?pe(De):De instanceof ArrayBuffer}_.isArrayBuffer=ce;function ee(De){return N(De)==="[object DataView]"}ee.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ee(new DataView(new ArrayBuffer(1),0,1));function ue(De){return typeof DataView>"u"?!1:ee.working?ee(De):De instanceof DataView}_.isDataView=ue;var Oe=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ye(De){return N(De)==="[object SharedArrayBuffer]"}function we(De){return typeof Oe>"u"?!1:(typeof ye.working>"u"&&(ye.working=ye(new Oe)),ye.working?ye(De):De instanceof Oe)}_.isSharedArrayBuffer=we;function _e(De){return N(De)==="[object AsyncFunction]"}_.isAsyncFunction=_e;function Ce(De){return N(De)==="[object Map Iterator]"}_.isMapIterator=Ce;function ke(De){return N(De)==="[object Set Iterator]"}_.isSetIterator=ke;function Le(De){return N(De)==="[object Generator]"}_.isGeneratorObject=Le;function ge(De){return N(De)==="[object WebAssembly.Module]"}_.isWebAssemblyCompiledModule=ge;function de(De){return Z(De,F)}_.isNumberObject=de;function Ee(De){return Z(De,V)}_.isStringObject=Ee;function xe(De){return Z(De,U)}_.isBooleanObject=xe;function Re(De){return L&&Z(De,H)}_.isBigIntObject=Re;function We(De){return B&&Z(De,G)}_.isSymbolObject=We;function Fe(De){return de(De)||Ee(De)||xe(De)||Re(De)||We(De)}_.isBoxedPrimitive=Fe;function Ie(De){return typeof Uint8Array<"u"&&(ce(De)||we(De))}_.isAnyArrayBuffer=Ie,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(De){Object.defineProperty(_,De,{enumerable:!1,value:function(){throw new Error(De+" is not supported in userland")}})})})(types$3);var isBufferBrowser=function(C){return C&&typeof C=="object"&&typeof C.copy=="function"&&typeof C.fill=="function"&&typeof C.readUInt8=="function"};(function(_){var C={},T=Object.getOwnPropertyDescriptors||function(Oe){for(var ye=Object.keys(Oe),we={},_e=0;_e<ye.length;_e++)we[ye[_e]]=Object.getOwnPropertyDescriptor(Oe,ye[_e]);return we},I=/%[sdj%]/g;_.format=function(ue){if(!me(ue)){for(var Oe=[],ye=0;ye<arguments.length;ye++)Oe.push(B(arguments[ye]));return Oe.join(" ")}for(var ye=1,we=arguments,_e=we.length,Ce=String(ue).replace(I,function(Le){if(Le==="%%")return"%";if(ye>=_e)return Le;switch(Le){case"%s":return String(we[ye++]);case"%d":return Number(we[ye++]);case"%j":try{return JSON.stringify(we[ye++])}catch{return"[Circular]"}default:return Le}}),ke=we[ye];ye<_e;ke=we[++ye])ae(ke)||!Ve(ke)?Ce+=" "+ke:Ce+=" "+B(ke);return Ce},_.deprecate=function(ue,Oe){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return ue;if(typeof process$1>"u")return function(){return _.deprecate(ue,Oe).apply(this,arguments)};var ye=!1;function we(){if(!ye){if(process$1.throwDeprecation)throw new Error(Oe);process$1.traceDeprecation?console.trace(Oe):console.error(Oe),ye=!0}return ue.apply(this,arguments)}return we};var M={},D=/^$/;if(C.NODE_DEBUG){var L=C.NODE_DEBUG;L=L.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),D=new RegExp("^"+L+"$","i")}_.debuglog=function(ue){if(ue=ue.toUpperCase(),!M[ue])if(D.test(ue)){var Oe=process$1.pid;M[ue]=function(){var ye=_.format.apply(_,arguments);console.error("%s %d: %s",ue,Oe,ye)}}else M[ue]=function(){};return M[ue]};function B(ue,Oe){var ye={seen:[],stylize:F};return arguments.length>=3&&(ye.depth=arguments[2]),arguments.length>=4&&(ye.colors=arguments[3]),oe(Oe)?ye.showHidden=Oe:Oe&&_._extend(ye,Oe),Se(ye.showHidden)&&(ye.showHidden=!1),Se(ye.depth)&&(ye.depth=2),Se(ye.colors)&&(ye.colors=!1),Se(ye.customInspect)&&(ye.customInspect=!0),ye.colors&&(ye.stylize=N),U(ye,ue,ye.depth)}_.inspect=B,B.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},B.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function N(ue,Oe){var ye=B.styles[Oe];return ye?"\x1B["+B.colors[ye][0]+"m"+ue+"\x1B["+B.colors[ye][1]+"m":ue}function F(ue,Oe){return ue}function V(ue){var Oe={};return ue.forEach(function(ye,we){Oe[ye]=!0}),Oe}function U(ue,Oe,ye){if(ue.customInspect&&Oe&&fe(Oe.inspect)&&Oe.inspect!==_.inspect&&!(Oe.constructor&&Oe.constructor.prototype===Oe)){var we=Oe.inspect(ye,ue);return me(we)||(we=U(ue,we,ye)),we}var _e=H(ue,Oe);if(_e)return _e;var Ce=Object.keys(Oe),ke=V(Ce);if(ue.showHidden&&(Ce=Object.getOwnPropertyNames(Oe)),ze(Oe)&&(Ce.indexOf("message")>=0||Ce.indexOf("description")>=0))return G(Oe);if(Ce.length===0){if(fe(Oe)){var Le=Oe.name?": "+Oe.name:"";return ue.stylize("[Function"+Le+"]","special")}if(Pe(Oe))return ue.stylize(RegExp.prototype.toString.call(Oe),"regexp");if(Ne(Oe))return ue.stylize(Date.prototype.toString.call(Oe),"date");if(ze(Oe))return G(Oe)}var ge="",de=!1,Ee=["{","}"];if(X(Oe)&&(de=!0,Ee=["[","]"]),fe(Oe)){var xe=Oe.name?": "+Oe.name:"";ge=" [Function"+xe+"]"}if(Pe(Oe)&&(ge=" "+RegExp.prototype.toString.call(Oe)),Ne(Oe)&&(ge=" "+Date.prototype.toUTCString.call(Oe)),ze(Oe)&&(ge=" "+G(Oe)),Ce.length===0&&(!de||Oe.length==0))return Ee[0]+ge+Ee[1];if(ye<0)return Pe(Oe)?ue.stylize(RegExp.prototype.toString.call(Oe),"regexp"):ue.stylize("[Object]","special");ue.seen.push(Oe);var Re;return de?Re=Z(ue,Oe,ye,ke,Ce):Re=Ce.map(function(We){return Y(ue,Oe,ye,ke,We,de)}),ue.seen.pop(),J(Re,ge,Ee)}function H(ue,Oe){if(Se(Oe))return ue.stylize("undefined","undefined");if(me(Oe)){var ye="'"+JSON.stringify(Oe).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ue.stylize(ye,"string")}if(he(Oe))return ue.stylize(""+Oe,"number");if(oe(Oe))return ue.stylize(""+Oe,"boolean");if(ae(Oe))return ue.stylize("null","null")}function G(ue){return"["+Error.prototype.toString.call(ue)+"]"}function Z(ue,Oe,ye,we,_e){for(var Ce=[],ke=0,Le=Oe.length;ke<Le;++ke)se(Oe,String(ke))?Ce.push(Y(ue,Oe,ye,we,String(ke),!0)):Ce.push("");return _e.forEach(function(ge){ge.match(/^\d+$/)||Ce.push(Y(ue,Oe,ye,we,ge,!0))}),Ce}function Y(ue,Oe,ye,we,_e,Ce){var ke,Le,ge;if(ge=Object.getOwnPropertyDescriptor(Oe,_e)||{value:Oe[_e]},ge.get?ge.set?Le=ue.stylize("[Getter/Setter]","special"):Le=ue.stylize("[Getter]","special"):ge.set&&(Le=ue.stylize("[Setter]","special")),se(we,_e)||(ke="["+_e+"]"),Le||(ue.seen.indexOf(ge.value)<0?(ae(ye)?Le=U(ue,ge.value,null):Le=U(ue,ge.value,ye-1),Le.indexOf(`
75
75
  `)>-1&&(Ce?Le=Le.split(`
76
76
  `).map(function(de){return" "+de}).join(`
77
77
  `).slice(2):Le=`
@@ -246,7 +246,7 @@ ${M}-----END CERTIFICATE-----
246
246
  `+C+Z.join(`,
247
247
  `+C)+`
248
248
  `+G+"}":"{"+Z.join(",")+"}",C=G,U}}return stringify$3=function(B,N,F){var V;if(C="",T="",typeof F=="number")for(V=0;V<F;V+=1)T+=" ";else typeof F=="string"&&(T=F);if(M=N,N&&typeof N!="function"&&(typeof N!="object"||typeof N.length!="number"))throw new Error("JSON.stringify");return L("",{"":B})},stringify$3}var hasRequiredJsonify;function requireJsonify(){return hasRequiredJsonify||(hasRequiredJsonify=1,jsonify.parse=requireParse(),jsonify.stringify=requireStringify()),jsonify}var toString$k={}.toString,isarray$2=Array.isArray||function(_){return toString$k.call(_)=="[object Array]"},toStr=Object.prototype.toString,isArguments$1=function _(C){var T=toStr.call(C),I=T==="[object Arguments]";return I||(I=T!=="[object Array]"&&C!==null&&typeof C=="object"&&typeof C.length=="number"&&C.length>=0&&toStr.call(C.callee)==="[object Function]"),I},implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var _;if(!Object.keys){var C=Object.prototype.hasOwnProperty,T=Object.prototype.toString,I=isArguments$1,M=Object.prototype.propertyIsEnumerable,D=!M.call({toString:null},"toString"),L=M.call(function(){},"prototype"),B=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],N=function(H){var G=H.constructor;return G&&G.prototype===H},F={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},V=function(){if(typeof window>"u")return!1;for(var H in window)try{if(!F["$"+H]&&C.call(window,H)&&window[H]!==null&&typeof window[H]=="object")try{N(window[H])}catch{return!0}}catch{return!0}return!1}(),U=function(H){if(typeof window>"u"||!V)return N(H);try{return N(H)}catch{return!1}};_=function(G){var Z=G!==null&&typeof G=="object",Y=T.call(G)==="[object Function]",J=I(G),X=Z&&T.call(G)==="[object String]",oe=[];if(!Z&&!Y&&!J)throw new TypeError("Object.keys called on a non-object");var ae=L&&Y;if(X&&G.length>0&&!C.call(G,0))for(var le=0;le<G.length;++le)oe.push(String(le));if(J&&G.length>0)for(var he=0;he<G.length;++he)oe.push(String(he));else for(var me in G)!(ae&&me==="prototype")&&C.call(G,me)&&oe.push(String(me));if(D)for(var ve=U(G),Se=0;Se<B.length;++Se)!(ve&&B[Se]==="constructor")&&C.call(G,B[Se])&&oe.push(B[Se]);return oe}}return implementation=_,implementation}var slice$7=Array.prototype.slice,isArgs=isArguments$1,origKeys=Object.keys,keysShim=origKeys?function _(C){return origKeys(C)}:requireImplementation(),originalKeys=Object.keys;keysShim.shim=function _(){if(Object.keys){var C=function(){var T=Object.keys(arguments);return T&&T.length===arguments.length}(1,2);C||(Object.keys=function(I){return isArgs(I)?originalKeys(slice$7.call(I)):originalKeys(I)})}else Object.keys=keysShim;return Object.keys||keysShim};var objectKeys$8=keysShim,jsonStringify=(typeof JSON<"u"?JSON:requireJsonify()).stringify,isArray$h=isarray$2,objectKeys$7=objectKeys$8,callBind=callBindExports,callBound=callBound$2,$join=callBound("Array.prototype.join"),$indexOf$1=callBound("Array.prototype.indexOf"),$splice=callBound("Array.prototype.splice"),$sort=callBound("Array.prototype.sort"),strRepeat=function _(C,T){for(var I="",M=0;M<C;M+=1)I+=T;return I},defaultReplacer=function(_,C,T){return T},jsonStableStringify=function _(C){var T=arguments.length>1?arguments[1]:void 0,I=T&&T.space||"";typeof I=="number"&&(I=strRepeat(I," "));var M=!!T&&typeof T.cycles=="boolean"&&T.cycles,D=T&&T.replacer?callBind(T.replacer):defaultReplacer,L=typeof T=="function"?T:T&&T.cmp,B=L&&function(F){var V=L.length>2&&function(H){return F[H]};return function(U,H){return L({key:U,value:F[U]},{key:H,value:F[H]},V?{__proto__:null,get:V}:void 0)}},N=[];return function F(V,U,H,G){var Z=I?`
249
- `+strRepeat(G,I):"",Y=I?": ":":";if(H&&H.toJSON&&typeof H.toJSON=="function"&&(H=H.toJSON()),H=D(V,U,H),H!==void 0){if(typeof H!="object"||H===null)return jsonStringify(H);if(isArray$h(H)){for(var ae=[],J=0;J<H.length;J++){var X=F(H,J,H[J],G+1)||jsonStringify(null);ae[ae.length]=Z+I+X}return"["+$join(ae,",")+Z+"]"}if($indexOf$1(N,H)!==-1){if(M)return jsonStringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}else N[N.length]=H;for(var oe=$sort(objectKeys$7(H),B&&B(H)),ae=[],J=0;J<oe.length;J++){var U=oe[J],le=F(H,U,H[U],G+1);if(le){var he=jsonStringify(U)+Y+le;ae[ae.length]=Z+I+he}}return $splice(N,$indexOf$1(N,H),1),"{"+$join(ae,",")+Z+"}"}}({"":C},"",C,0)};const _t=getDefaultExportFromCjs(jsonStableStringify);var lib$5={},lib$4={},type={},HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(_){return this.__data__.set(_,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(_){return this.__data__.has(_)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$3(_){var C=-1,T=_==null?0:_.length;for(this.__data__=new MapCache;++C<T;)this.add(_[C])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd;SetCache$3.prototype.has=setCacheHas;var _SetCache=SetCache$3;function arraySome$1(_,C){for(var T=-1,I=_==null?0:_.length;++T<I;)if(C(_[T],T,_))return!0;return!1}var _arraySome=arraySome$1;function cacheHas$3(_,C){return _.has(C)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(_,C,T,I,M,D){var L=T&COMPARE_PARTIAL_FLAG$5,B=_.length,N=C.length;if(B!=N&&!(L&&N>B))return!1;var F=D.get(_),V=D.get(C);if(F&&V)return F==C&&V==_;var U=-1,H=!0,G=T&COMPARE_UNORDERED_FLAG$3?new SetCache$2:void 0;for(D.set(_,C),D.set(C,_);++U<B;){var Z=_[U],Y=C[U];if(I)var J=L?I(Y,Z,U,C,_,D):I(Z,Y,U,_,C,D);if(J!==void 0){if(J)continue;H=!1;break}if(G){if(!arraySome(C,function(X,oe){if(!cacheHas$2(G,oe)&&(Z===X||M(Z,X,T,I,D)))return G.push(oe)})){H=!1;break}}else if(!(Z===Y||M(Z,Y,T,I,D))){H=!1;break}}return D.delete(_),D.delete(C),H}var _equalArrays=equalArrays$2;function mapToArray$1(_){var C=-1,T=Array(_.size);return _.forEach(function(I,M){T[++C]=[M,I]}),T}var _mapToArray=mapToArray$1;function setToArray$3(_){var C=-1,T=Array(_.size);return _.forEach(function(I){T[++C]=I}),T}var _setToArray=setToArray$3,Symbol$5=_Symbol,Uint8Array$1=_Uint8Array,eq$4=eq_1$1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray$2=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag$1(_,C,T,I,M,D,L){switch(T){case dataViewTag:if(_.byteLength!=C.byteLength||_.byteOffset!=C.byteOffset)return!1;_=_.buffer,C=C.buffer;case arrayBufferTag:return!(_.byteLength!=C.byteLength||!D(new Uint8Array$1(_),new Uint8Array$1(C)));case boolTag:case dateTag:case numberTag:return eq$4(+_,+C);case errorTag:return _.name==C.name&&_.message==C.message;case regexpTag:case stringTag:return _==C+"";case mapTag:var B=mapToArray;case setTag:var N=I&COMPARE_PARTIAL_FLAG$4;if(B||(B=setToArray$2),_.size!=C.size&&!N)return!1;var F=L.get(_);if(F)return F==C;I|=COMPARE_UNORDERED_FLAG$2,L.set(_,C);var V=equalArrays$1(B(_),B(C),I,M,D,L);return L.delete(_),V;case symbolTag:if(symbolValueOf)return symbolValueOf.call(_)==symbolValueOf.call(C)}return!1}var _equalByTag=equalByTag$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$2=Object.prototype,hasOwnProperty$4=objectProto$2.hasOwnProperty;function equalObjects$1(_,C,T,I,M,D){var L=T&COMPARE_PARTIAL_FLAG$3,B=getAllKeys(_),N=B.length,F=getAllKeys(C),V=F.length;if(N!=V&&!L)return!1;for(var U=N;U--;){var H=B[U];if(!(L?H in C:hasOwnProperty$4.call(C,H)))return!1}var G=D.get(_),Z=D.get(C);if(G&&Z)return G==C&&Z==_;var Y=!0;D.set(_,C),D.set(C,_);for(var J=L;++U<N;){H=B[U];var X=_[H],oe=C[H];if(I)var ae=L?I(oe,X,H,C,_,D):I(X,oe,H,_,C,D);if(!(ae===void 0?X===oe||M(X,oe,T,I,D):ae)){Y=!1;break}J||(J=H=="constructor")}if(Y&&!J){var le=_.constructor,he=C.constructor;le!=he&&"constructor"in _&&"constructor"in C&&!(typeof le=="function"&&le instanceof le&&typeof he=="function"&&he instanceof he)&&(Y=!1)}return D.delete(_),D.delete(C),Y}var _equalObjects=equalObjects$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$g=isArray_1,isBuffer=isBufferExports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag$1="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$1=Object.prototype,hasOwnProperty$3=objectProto$1.hasOwnProperty;function baseIsEqualDeep$1(_,C,T,I,M,D){var L=isArray$g(_),B=isArray$g(C),N=L?arrayTag:getTag(_),F=B?arrayTag:getTag(C);N=N==argsTag$1?objectTag:N,F=F==argsTag$1?objectTag:F;var V=N==objectTag,U=F==objectTag,H=N==F;if(H&&isBuffer(_)){if(!isBuffer(C))return!1;L=!0,V=!1}if(H&&!V)return D||(D=new Stack$1),L||isTypedArray(_)?equalArrays(_,C,T,I,M,D):equalByTag(_,C,N,T,I,M,D);if(!(T&COMPARE_PARTIAL_FLAG$2)){var G=V&&hasOwnProperty$3.call(_,"__wrapped__"),Z=U&&hasOwnProperty$3.call(C,"__wrapped__");if(G||Z){var Y=G?_.value():_,J=Z?C.value():C;return D||(D=new Stack$1),M(Y,J,T,I,D)}}return H?(D||(D=new Stack$1),equalObjects(_,C,T,I,M,D)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$2=isObjectLike_1;function baseIsEqual$3(_,C,T,I,M){return _===C?!0:_==null||C==null||!isObjectLike$2(_)&&!isObjectLike$2(C)?_!==_&&C!==C:baseIsEqualDeep(_,C,T,I,baseIsEqual$3,M)}var _baseIsEqual=baseIsEqual$3,baseIsEqual$2=_baseIsEqual;function isEqual$1(_,C){return baseIsEqual$2(_,C)}var isEqual_1$1=isEqual$1;const isEqual$2=getDefaultExportFromCjs(isEqual_1$1);var util$7={},__importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(util$7,"__esModule",{value:!0});util$7.toStrictHex=util$7.toBytes=util$7.toBits=util$7.DID_PREFIX=void 0;const padStart_1=__importDefault$3(padStart_1$1),util_1$2=lib$6,DID_PREFIX="did:abt:";util$7.DID_PREFIX=DID_PREFIX;const toBytes=_=>{try{if((0,util_1$2.isHexStrict)(_))return Buffer$3.from((0,util_1$2.stripHexPrefix)(_),"hex");let C=(0,util_1$2.fromBase58)(_.replace(DID_PREFIX,""));for(;C.length<26;)C=Buffer$3.concat([Buffer$3.from([0]),C]);return C}catch(C){throw new Error(`Cannot convert DID string to byte array: ${C.message}`)}};util$7.toBytes=toBytes;const toBits=(_,C)=>(0,padStart_1.default)((0,util_1$2.toBN)(_).toString(2),C,"0");util$7.toBits=toBits;const toStrictHex=(_,C)=>{const T=_.replace(/^0x/i,"");return typeof C=="number"&&C%2===0?(0,padStart_1.default)(_,C,"0"):T.length%2===0?T:`0${T}`};util$7.toStrictHex=toStrictHex;var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(type,"__esModule",{value:!0});type.toChecksumAddress=type.isEthereumDid=type.isEthereumType=type.toTypeInfoStr=type.toTypeInfo=type.fromTypeInfo=type.DID_TYPE_PASSKEY=type.DID_TYPE_ETHEREUM=type.DID_TYPE_ARCBLOCK=void 0;type.DidType=DidType;const util_1$1=lib$6,upperFirst_1=__importDefault$2(upperFirst_1$1),isEqual_1=__importDefault$2(isEqual_1$1),pick_1=__importDefault$2(pick_1$1),mcrypto_1$1=lib$7,util_2=util$7,mapping={pk:"key",address:"encoding"},DID_TYPE_ARCBLOCK={role:mcrypto_1$1.types.RoleType.ROLE_ACCOUNT,pk:mcrypto_1$1.types.KeyType.ED25519,hash:mcrypto_1$1.types.HashType.SHA3,address:mcrypto_1$1.types.EncodingType.BASE58};type.DID_TYPE_ARCBLOCK=DID_TYPE_ARCBLOCK;const DID_TYPE_PASSKEY={role:mcrypto_1$1.types.RoleType.ROLE_PASSKEY,pk:mcrypto_1$1.types.KeyType.PASSKEY,hash:mcrypto_1$1.types.HashType.SHA2,address:mcrypto_1$1.types.EncodingType.BASE58};type.DID_TYPE_PASSKEY=DID_TYPE_PASSKEY;const DID_TYPE_ETHEREUM={role:mcrypto_1$1.types.RoleType.ROLE_ACCOUNT,pk:mcrypto_1$1.types.KeyType.ETHEREUM,hash:mcrypto_1$1.types.HashType.KECCAK,address:mcrypto_1$1.types.EncodingType.BASE16};type.DID_TYPE_ETHEREUM=DID_TYPE_ETHEREUM;const isEthereumType=_=>{const C=["pk","hash","address"];return(0,isEqual_1.default)((0,pick_1.default)(_,C),(0,pick_1.default)(DID_TYPE_ETHEREUM,C))};type.isEthereumType=isEthereumType;const isEthereumDid=_=>{const C=(0,util_1$1.toAddress)(_);return/^(0x)?[0-9a-f]{40}$/i.test(C)?/^(0x|0X)?[0-9a-f]{40}$/.test(C)||/^(0x|0X)?[0-9A-F]{40}$/.test(C)?!0:checkAddressChecksum(C):!1};type.isEthereumDid=isEthereumDid;const checkAddressChecksum=_=>{const C=_.replace(/^0x/i,""),T=mcrypto_1$1.Hasher.Keccak.hash256(C.toLowerCase()).replace(/^0x/i,"");for(let I=0;I<40;I++)if(parseInt(T[I],16)>7&&C[I].toUpperCase()!==C[I]||parseInt(T[I],16)<=7&&C[I].toLowerCase()!==C[I])return!1;return!0},toChecksumAddress=_=>{if(typeof _>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(_))throw new Error(`Given address "${_}" is not a valid Ethereum address.`);const C=_.toLowerCase().replace(/^0x/i,""),T=mcrypto_1$1.Hasher.Keccak.hash256(C).replace(/^0x/i,"");let I="0x";for(let M=0;M<C.length;M++)parseInt(T[M],16)>7?I+=C[M].toUpperCase():I+=C[M];return I};type.toChecksumAddress=toChecksumAddress;function DidType(_={}){let C={};["default","arcblock"].includes(_)?C=DID_TYPE_ARCBLOCK:["eth","ethereum"].includes(_)?C=DID_TYPE_ETHEREUM:["passkey"].includes(_)?C=DID_TYPE_PASSKEY:C={...DID_TYPE_ARCBLOCK,..._};const{role:T,pk:I,hash:M,address:D}=C;Object.keys(C).forEach(B=>{const N=(0,upperFirst_1.default)(`${mapping[B]||B}Type`);if(Object.values(mcrypto_1$1.types[N]).includes(C[B])===!1)throw new Error(`Unsupported ${B} type: ${C[B]}`)});const L={role:T,pk:I,hash:M,address:D};return isEthereumType(L)===!1&&[mcrypto_1$1.types.RoleType.ROLE_NODE,mcrypto_1$1.types.RoleType.ROLE_VALIDATOR,mcrypto_1$1.types.RoleType.ROLE_TETHER,mcrypto_1$1.types.RoleType.ROLE_SWAP].includes(L.role)&&(L.hash=mcrypto_1$1.types.HashType.SHA2),L}DidType.toJSON=_=>Object.keys(_).reduce((C,T)=>{const I=(0,upperFirst_1.default)(`${mapping[T]||T}Type`),M=Object.keys(mcrypto_1$1.types[I]),D=Object.values(mcrypto_1$1.types[I]);return C[T]=M[D.indexOf(_[T])],C},{});DidType.fromJSON=_=>Object.keys(_).reduce((C,T)=>{const I=(0,upperFirst_1.default)(`${mapping[T]||T}Type`),M=Object.keys(mcrypto_1$1.types[I]),D=Object.values(mcrypto_1$1.types[I]);return C[T]=D[M.indexOf(_[T])],C},{});const fromTypeInfo=_=>{const C=DidType(_),T=(0,util_2.toBits)(C.role,6),I=(0,util_2.toBits)(C.pk,5),M=(0,util_2.toBits)(C.hash,5),D=`${T}${I}${M}`,L=(0,util_1$1.stripHexPrefix)((0,util_1$1.numberToHex)(parseInt(D,2)));return(0,util_2.toStrictHex)(L,4)};type.fromTypeInfo=fromTypeInfo;const toTypeInfo=_=>{let C={};try{if(isEthereumDid(_))C=DID_TYPE_ETHEREUM;else{const I=(0,util_2.toBytes)(_).slice(0,2),M=(0,util_2.toStrictHex)(Buffer$3.from(I).toString("hex")),D=(0,util_2.toBits)(new util_1$1.BN(M,16),16),L=D.slice(0,6),B=D.slice(6,11),N=D.slice(11,16);C={role:parseInt(L,2),pk:parseInt(B,2),hash:parseInt(N,2),address:(0,util_1$1.isHex)((0,util_1$1.toAddress)(_))?mcrypto_1$1.types.EncodingType.BASE16:mcrypto_1$1.types.EncodingType.BASE58}}return Object.keys(C).forEach(T=>{Object.values(mcrypto_1$1.types[`${(0,upperFirst_1.default)(mapping[T]||T)}Type`]).includes(C[T])===!1&&delete C[T]}),C}catch{return C}};type.toTypeInfo=toTypeInfo;const toTypeInfoStr=_=>{const C=toTypeInfo(_);return Object.keys(C).reduce((T,I)=>{const M=mcrypto_1$1.types[`${(0,upperFirst_1.default)(mapping[I]||I)}Type`];return T[I]=Object.keys(M).find(D=>M[D]===C[I]),T},{})};type.toTypeInfoStr=toTypeInfoStr;(function(_){Object.defineProperty(_,"__esModule",{value:!0}),_.DID_TYPE_PASSKEY=_.DID_TYPE_ETHEREUM=_.DID_TYPE_ARCBLOCK=_.DID_PREFIX=_.DidType=_.fromTypeInfo=_.toTypeInfoStr=_.toTypeInfo=_.isEthereumType=_.isEthereumDid=_.isValid=_.isFromPublicKey=_.toDid=_.toAddress=_.fromHash=_.fromPublicKeyHash=_.fromPublicKey=_.fromSecretKey=_.toStrictHex=_.types=void 0;const C=lib$7;Object.defineProperty(_,"types",{enumerable:!0,get:function(){return C.types}});const T=lib$6;Object.defineProperty(_,"toAddress",{enumerable:!0,get:function(){return T.toAddress}}),Object.defineProperty(_,"toDid",{enumerable:!0,get:function(){return T.toDid}});const I=type;Object.defineProperty(_,"DidType",{enumerable:!0,get:function(){return I.DidType}}),Object.defineProperty(_,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return I.DID_TYPE_ARCBLOCK}}),Object.defineProperty(_,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return I.DID_TYPE_ETHEREUM}}),Object.defineProperty(_,"DID_TYPE_PASSKEY",{enumerable:!0,get:function(){return I.DID_TYPE_PASSKEY}}),Object.defineProperty(_,"fromTypeInfo",{enumerable:!0,get:function(){return I.fromTypeInfo}}),Object.defineProperty(_,"isEthereumDid",{enumerable:!0,get:function(){return I.isEthereumDid}}),Object.defineProperty(_,"isEthereumType",{enumerable:!0,get:function(){return I.isEthereumType}}),Object.defineProperty(_,"toTypeInfo",{enumerable:!0,get:function(){return I.toTypeInfo}}),Object.defineProperty(_,"toTypeInfoStr",{enumerable:!0,get:function(){return I.toTypeInfoStr}});const M=util$7;Object.defineProperty(_,"DID_PREFIX",{enumerable:!0,get:function(){return M.DID_PREFIX}}),Object.defineProperty(_,"toStrictHex",{enumerable:!0,get:function(){return M.toStrictHex}});const D=(U,H)=>{const G=(0,I.DidType)(H),Z=(0,C.getSigner)(G.pk).getPublicKey(U);return L(Z.indexOf("0x")===0?Z:`0x${Z}`,G)};_.fromSecretKey=D;const L=(U,H)=>{const G=(0,I.DidType)(H),Y=(0,C.getHasher)(G.hash)(U,1);return B(Y,G)};_.fromPublicKey=L;const B=(U,H)=>{const G=(0,I.DidType)(H),Z=(0,T.stripHexPrefix)(U).slice(0,40),Y=(0,C.getHasher)(G.hash),J=(0,I.fromTypeInfo)(G),X=(0,T.stripHexPrefix)(Y(`0x${J}${Z}`,1)).slice(0,8),oe=`0x${J}${Z}${X}`;return(0,I.isEthereumType)(G)?(0,I.toChecksumAddress)(`0x${U.slice(-40)}`):G.address===C.types.EncodingType.BASE58?(0,T.toBase58)(oe):oe};_.fromPublicKeyHash=B;const N=(U,H=C.types.RoleType.ROLE_ACCOUNT)=>{const G=Object.keys(C.types.RoleType),Z=Object.values(C.types.RoleType);if(Z.indexOf(H)===-1)throw new Error(`Unsupported role type ${H} when gen ddi from hash`);const Y=(0,I.DidType)({role:C.types.RoleType[G[Z.indexOf(H)]]});return B(U,Y)};_.fromHash=N;const F=(U,H)=>{if(V(U)===!1)return!1;const G=(0,I.toTypeInfo)(U),Z=L(H,G),Y=U.replace(M.DID_PREFIX,"");return Z===Y};_.isFromPublicKey=F;const V=U=>{if(!U)return!1;const H=(0,T.toAddress)(String(U)),{hash:G}=(0,I.toTypeInfo)(H);if(typeof G>"u")return!1;if((0,I.isEthereumDid)(H))return!0;const Z=(0,C.getHasher)(G),Y=(0,M.toBytes)(H),J=(0,M.toStrictHex)(Buffer$3.from(Y.slice(0,22)).toString("hex")),X=(0,M.toStrictHex)(Buffer$3.from(Y.slice(22,26)).toString("hex")),oe=(0,T.stripHexPrefix)(Z(`0x${J}`,1)).slice(0,8);return X===oe};_.isValid=V})(lib$4);Object.defineProperty(lib$5,"__esModule",{value:!0});lib$5.WalletType=void 0;lib$5.Wallet=Wallet;lib$5.fromSecretKey=fromSecretKey;var fromPublicKey_1=lib$5.fromPublicKey=fromPublicKey;lib$5.fromAddress=fromAddress;lib$5.fromRandom=fromRandom;lib$5.fromJSON=fromJSON;lib$5.isValid=isValid;const util_1=lib$6,mcrypto_1=lib$7,did_1=lib$4;lib$5.WalletType=did_1.DidType;function Wallet(_,C="default"){const T=(0,did_1.DidType)(C),I=(0,mcrypto_1.getSigner)(T.pk),M=(0,mcrypto_1.getHasher)(T.hash);return{type:T,secretKey:_.sk,publicKey:_.pk,address:_.pk?(0,did_1.fromPublicKey)(_.pk,T):_.address,hash(D,L=1,B="hex"){return M(D,L,B)},sign(D,L=!0,B="hex"){if(!_.sk)throw new Error("Cannot sign data without a secretKey");if(L){const N=M(D,1);return I.sign(N,_.sk,B)}return I.sign(D,_.sk,B)},async verify(D,L,B=!0,N){if(!_.pk)throw new Error("Cannot verify data without a publicKey");const F=B?M(D,1):D;return I.verify(F,L,_.pk,N)},ethHash(D){if(typeof I.ethHash!="function")throw new Error("ethHash is not supported by signer");return I.ethHash(D)},ethSign(D,L=!0){if(!_.sk)throw new Error("Cannot sign data without a secretKey");if(typeof I.ethHash!="function")throw new Error("ethSign is not supported by signer");return L?I.ethSign(I.ethHash(D),(0,util_1.toHex)(_.sk)):I.ethSign(D,(0,util_1.toHex)(_.sk))},ethVerify(D,L,B=!0){if(typeof I.ethHash!="function")throw new Error("ethVerify is not supported by signer");const N=B?I.ethHash(D):D;return I.ethRecover(N,L)===this.address},toAddress(){return _.pk?(0,did_1.fromPublicKey)(_.pk,T):_.address},toJSON(){return{type:did_1.DidType.toJSON(T),sk:(0,util_1.toHex)(_.sk),pk:(0,util_1.toHex)(_.pk),address:this.address}}}}function fromSecretKey(_,C="default"){const T=(0,did_1.DidType)(C),I={sk:_,pk:(0,mcrypto_1.getSigner)(T.pk).getPublicKey(_)};return Wallet(I,T)}function fromPublicKey(_,C="default"){return Wallet({pk:_},(0,did_1.DidType)(C))}function fromAddress(_){return Wallet({address:(0,did_1.toAddress)(_)},(0,did_1.toTypeInfo)(_))}function fromRandom(_="default"){const C=(0,did_1.DidType)(_),I=(0,mcrypto_1.getSigner)(C.pk).genKeyPair();return Wallet({sk:I.secretKey,pk:I.publicKey},C)}function fromJSON(_){const C=did_1.DidType.fromJSON(_.type);return Wallet(_,C)}function isValid(_,C=!0){return!(!_||typeof _!="object"||typeof _.verify!="function"||typeof _.toAddress!="function"||typeof _.toJSON!="function"||!_.type||!_.publicKey||C&&(!_.secretKey||typeof _.sign!="function"))}var isUrl_1=isUrl$1,protocolAndDomainRE=/^(?:\w+:)?\/\/(\S+)$/,localhostDomainRE=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,nonLocalhostDomainRE=/^[^\s\.]+\.\S{2,}$/;function isUrl$1(_){if(typeof _!="string")return!1;var C=_.match(protocolAndDomainRE);if(!C)return!1;var T=C[1];return T?!!(localhostDomainRE.test(T)||nonLocalhostDomainRE.test(T)):!1}const isUrl$2=getDefaultExportFromCjs(isUrl_1);var __defProp$4=Object.defineProperty,__defNormalProp$4=(_,C,T)=>C in _?__defProp$4(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$4=(_,C,T)=>(__defNormalProp$4(_,C+"",T),T);class AuthService{constructor({api:C}){__publicField$4(this,"api"),this.api=C}async getUserPublicInfo({did:C}){const{data:T}=await this.api.get("/api/user",{params:{did:C}});return T}async getUserPrivacyConfig({did:C}){const{data:T}=await this.api.get("/api/user/privacy/config",{params:{did:C}});return T}async saveUserPrivacyConfig(C){const{data:T}=await this.api.post("/api/user/privacy/config",C);return T}async getUserNotificationConfig(){const{data:C}=await this.api.get("/api/user/notification/config");return C}async saveUserNotificationConfig(C){const{data:T}=await this.api.post("/api/user/notification/config",C);return T}async testNotificationWebhook(C){const{data:T}=await this.api.put("/api/user/notification/webhook",C);return T}async getProfileUrl({did:C,locale:T}){const I=`${constant$2.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(I,{did:C,locale:T})}async getProfile(){const{data:C}=await this.api.get("/api/user/profile");return C}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:C,inviter:T}){const{data:I}=await this.api.put("/api/user/profile",{locale:C,inviter:T});return I}async updateDidSpace({spaceGateway:C}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:C})}async logout({visitorId:C}){const{data:T}=await this.api.post("/api/user/logout",{visitorId:C});return T}}class TokenService{getSessionToken(C){return api$2.get(constant$2.SESSION_TOKEN_STORAGE_KEY)?api$2.get(constant$2.SESSION_TOKEN_STORAGE_KEY):C.sessionTokenKey?window.localStorage.getItem(C.sessionTokenKey):""}setSessionToken(C){api$2.set(constant$2.SESSION_TOKEN_STORAGE_KEY,C)}removeSessionToken(){api$2.remove(constant$2.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constant$2.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(C){localStorage.setItem(constant$2.REFRESH_TOKEN_STORAGE_KEY,C)}removeRefreshToken(){localStorage.removeItem(constant$2.REFRESH_TOKEN_STORAGE_KEY)}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{getBlocklet(C,T=!1){if(!C){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!T&&blockletCache.has(C))return blockletCache.get(C);const I=withQuery(joinURL(C,"__blocklet__.js"),{type:"json",t:Date.now()});return new Promise(async M=>{const L=await(await fetch(I)).json();blockletCache.set(C,L),M(L)})}loadBlocklet(){return new Promise((C,T)=>{if(typeof window>"u"||typeof document>"u"){T();return}const I=document.createElement("script");let M="/";window.blocklet&&window.blocklet.prefix&&(M=window.blocklet.prefix),I.src=withQuery(joinURL(M,"__blocklet__.js"),{t:Date.now()}),I.onload=()=>{C()},I.onerror=()=>{T()},document.head.append(I)})}getPrefix(C){var T;return C?(C==null?void 0:C.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((T=window.blocklet)==null?void 0:T.prefix)||"/"}}var __defProp$3=Object.defineProperty,__defNormalProp$3=(_,C,T)=>C in _?__defProp$3(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$3=(_,C,T)=>(__defNormalProp$3(_,typeof C!="symbol"?C+"":C,T),T);class UserSessionService{constructor({api:C,blocklet:T}){__publicField$3(this,"api"),__publicField$3(this,"blocklet"),this.api=C,this.blocklet=T||new BlockletService}getBaseUrl(C){return C?joinURL(C,constant$2.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:C,appUrl:T}){const I=this.getBaseUrl(T),M=await this.blocklet.getBlocklet(),{data:D}=await this.api.get("/api/user-session",{baseURL:I,params:{userDid:C,appPid:M.appPid}});return D}async getMyLoginSessions({appUrl:C}={}){const T=this.getBaseUrl(C),{data:I}=await this.api.get("/api/user-session/myself",{baseURL:T});return I}async loginByUserSession({id:C,appPid:T,userDid:I,passportId:M,appUrl:D}){const L=this.getBaseUrl(D),{data:B}=await this.api.post("/api/user-session/login",{id:C,appPid:T,userDid:I,passportId:M},{baseURL:L});return B}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(_,C,T)=>C in _?__defProp$2(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$2=(_,C,T)=>(__defNormalProp$2(_,C+"",T),T);class ComponentService{constructor({blocklet:C=window.blocklet}={}){__publicField$2(this,"blocklet"),this.blocklet=C}getComponent(C){var M;return(((M=this.blocklet)==null?void 0:M.componentMountPoints)||[]).find(D=>[D.title,D.name,D.did].includes(C))}getComponentMountPoint(C){const T=this.getComponent(C);return(T==null?void 0:T.mountPoint)||""}getUrl(C,...T){var D;const I=this.getComponentMountPoint(C),M=((D=this.blocklet)==null?void 0:D.appUrl)||"";return joinURL(M,I,...T)}}var __defProp$1=Object.defineProperty,__defNormalProp$1=(_,C,T)=>C in _?__defProp$1(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$1=(_,C,T)=>(__defNormalProp$1(_,typeof C!="symbol"?C+"":C,T),T);class FederatedService{constructor({api:C,blocklet:T}){__publicField$1(this,"api"),__publicField$1(this,"blocklet"),this.api=C,this.blocklet=T||new BlockletService}async getTrustedDomains(){const{data:C}=await this.api.get("/api/federated/getTrustedDomains");return C}getMaster(C=this.blocklet.getBlocklet()){var I;const T=(I=C==null?void 0:C.settings)==null?void 0:I.federated;return T==null?void 0:T.master}getConfig(C=this.blocklet.getBlocklet()){var I;const T=(I=C==null?void 0:C.settings)==null?void 0:I.federated;return T==null?void 0:T.config}getFederatedEnabled(C=this.blocklet.getBlocklet()){const T=this.getConfig(C);return(T==null?void 0:T.status)==="approved"}getSourceAppPid(C=this.blocklet.getBlocklet()){const T=this.getMaster(C);return T==null?void 0:T.appPid}getFederatedApp(C=this.blocklet.getBlocklet()){const T=this.getMaster(C);return isEmpty$3(T)?null:{appId:T.appId,appName:T.appName,appDescription:T.appDescription,appLogo:T.appLogo,appPid:T.appPid,appUrl:T.appUrl,version:T.version,sourceAppPid:T.appPid,provider:"wallet"}}getCurrentApp(C=this.blocklet.getBlocklet()){if(C)return{appId:C.appId,appName:C.appName,appDescription:C.appDescription,appLogo:C.appLogo,appPid:C.appPid,appUrl:C.appUrl,version:C.version,sourceAppPid:null,provider:"wallet"};if(window.env){const T=window.env;return{appId:T.appId,appName:T.appName,appDescription:T.appDescription,appUrl:T.baseUrl,sourceAppPid:null,provider:"wallet",type:"server"}}return null}getApps(C=this.blocklet.getBlocklet()){const T=[],I=this.getFederatedApp(C),M=this.getCurrentApp(C),D=this.getFederatedEnabled(C);return M&&T.push(M),I&&(I==null?void 0:I.appId)!==(M==null?void 0:M.appId)&&D&&T.push(I),T.reverse()}async getBlockletData(C){try{const T=new URL("__blocklet__.js",C);return T.searchParams.set("type","json"),await(await fetch(T.href)).json()}catch(T){return console.error(`Failed to get blocklet data: ${C}`,T),null}}}const version$5="1.16.36",sleep$1=(_=0)=>new Promise(C=>{setTimeout(()=>{C()},_)}),getBearerToken=_=>`Bearer ${encodeURIComponent(_)}`,visitorIdKey="__visitor_id",getVisitorId$1=()=>localStorage.getItem(visitorIdKey),verifyResponse=(_,C)=>{if(isObject$u(_.data)&&_.status>=200&&_.status<300&&window.blocklet&&window.blocklet.appId&&window.blocklet.appPk){if(!_.data.$signature)throw C(),new Error("Invalid response");const{appId:T,appPk:I}=window.blocklet;if(fromPublicKey_1(I,lib$4.toTypeInfo(T)).verify(_t(omit$1(_.data,["$signature"])),_.data.$signature)===!1)throw C(),new Error("Invalid response")}return _};function getCSRFToken(){return api$2.get("x-csrf-token")}async function sleepForLoading(_,C=300){_.metaData.endTime=+new Date;const{startTime:T,endTime:I}=_.metaData,M=I-T;M<C&&await sleep$1(C-M),delete _.metaData}const createAxios$1=(_,C)=>{const T={..._==null?void 0:_.headers,"x-blocklet-js-sdk-version":version$5},I=new ComponentService,M=getVisitorId$1();[void 0,null].includes(M)||(T["x-blocklet-visitor-id"]=M);const D=axios.create({..._,headers:T});return C!=null&&C.lazy&&(D.interceptors.request.use(L=>(L.metaData={startTime:+new Date},L),L=>Promise.reject(L)),D.interceptors.response.use(async L=>(L.config&&await sleepForLoading(L.config,C==null?void 0:C.lazyTime),L),async L=>(L.response&&await sleepForLoading(L.response.config,C==null?void 0:C.lazyTime),Promise.reject(L)))),D.interceptors.request.use(L=>{var N,F;const B=(C==null?void 0:C.componentDid)??((F=(N=window.blocklet)==null?void 0:N.componentId)==null?void 0:F.split("/").pop());return L.baseURL=L.baseURL||I.getComponentMountPoint(B),L.timeout=L.timeout||20*1e3,L.headers["x-csrf-token"]=getCSRFToken(),L},L=>Promise.reject(L)),D};async function renewRefreshToken$1(_){if(!_)throw new Error("Refresh token not found");const C=createAxios$1({baseURL:constant$2.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,secure:!0,headers:{authorization:getBearerToken(_)}}),{data:T}=await C.post("/api/did/refreshSession");return T}function createRequest$1({getSessionToken:_,setSessionToken:C,removeSessionToken:T,getRefreshToken:I,setRefreshToken:M,removeRefreshToken:D,onRefreshTokenError:L,onRefreshTokenSuccess:B},N,F){let V=null;const U=createAxios$1({timeout:30*1e3,...N},F);return U.interceptors.request.use(async H=>{if(!api$2.get(constant$2.SESSION_TOKEN_STORAGE_KEY)){const G=_(H);G&&(H.headers.authorization=getBearerToken(G))}return V&&await V,H},H=>Promise.reject(H)),U.interceptors.response.use(H=>{var G;return(G=H.config)!=null&&G.secure?verifyResponse(H,()=>{T(),D()}):H},async H=>{var Z;const G=H.config;if(G&&(G.headers=G!=null&&G.headers?{...G.headers}:{},((Z=H==null?void 0:H.response)==null?void 0:Z.status)===401&&!G._retry)){G._retry=!0;try{V||(V=renewRefreshToken$1(I()));const Y=await V;return C(Y.nextToken),M(Y.nextRefreshToken),typeof B=="function"&&B(Y),U(G)}catch(Y){return T(),D(),typeof L=="function"&&L(Y),Promise.reject(H)}finally{V=null}}return Promise.reject(H)}),U}var __defProp$5=Object.defineProperty,__defNormalProp=(_,C,T)=>C in _?__defProp$5(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField=(_,C,T)=>(__defNormalProp(_,typeof C!="symbol"?C+"":C,T),T);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet"),__publicField(this,"federated");const C=new TokenService,T=createRequest$1({getSessionToken:C.getSessionToken,setSessionToken:C.setSessionToken,removeSessionToken:C.removeSessionToken,getRefreshToken:C.getRefreshToken,setRefreshToken:C.setRefreshToken,removeRefreshToken:C.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constant$2.WELLKNOWN_SERVICE_PATH_PREFIX}),I=new BlockletService;this.user=new AuthService({api:T}),this.federated=new FederatedService({api:T,blocklet:I}),this.userSession=new UserSessionService({api:T,blocklet:I}),this.token=C,this.blocklet=I,this.api=T}}function createAxios$2(_={},C={}){const T=new TokenService;return createRequest$1({getSessionToken:T.getSessionToken,setSessionToken:T.setSessionToken,removeSessionToken:T.removeSessionToken,getRefreshToken:T.getRefreshToken,setRefreshToken:T.setRefreshToken,removeRefreshToken:T.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},_,C)}const getBlockletSDK=(()=>{let _;return()=>(_||(_=new BlockletSDK),_)})();var lib$3={},dsbridge={};Object.defineProperty(dsbridge,"__esModule",{value:!0});dsbridge.default=void 0;var bridge={call:function _(C,T,I){var M="";typeof T=="function"&&(I=T,T={});var D={data:T===void 0?null:T};if(typeof I=="function"){var L="dscb"+window.dscb++;window[L]=I,D._dscbstub=L}return D=JSON.stringify(D),window._dsbridge?M=_dsbridge.call(C,D):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(M=prompt("_dsbridge="+C,D)),JSON.parse(M||"{}").data},register:function _(C,T,I){var M=I?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){bridge.call("_dsb.dsinit")},0)),typeof T=="object"?M._obs[C]=T:M[C]=T},registerAsyn:function _(C,T){this.register(C,T,!0)},hasNativeMethod:function _(C,T){return this.call("_dsb.hasNativeMethod",{name:C,type:T||"all"})},disableJavascriptDialogBlock:function _(C){this.call("_dsb.disableJavascriptDialogBlock",{disable:C!==!1})},canUseBridge(){return!!(window._dsbridge||window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)}};(function(){if(!bridge.canUseBridge()||window._dsf)return;const _=window.close;var C={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:bridge,close:function(){bridge.call("_dsb.closePage"),_()},_handleMessageFromNative:function(M){var D=JSON.parse(M.data),L={id:M.callbackId,complete:!0},B=this._dsf[M.method],N=this._dsaf[M.method],F=function(oe,ae){L.data=oe.apply(ae,D),bridge.call("_dsb.returnValue",L)},V=function(oe,ae){D.push(function(le,he){L.data=le,L.complete=he!==!1,bridge.call("_dsb.returnValue",L)}),oe.apply(ae,D)};if(B)F(B,this._dsf);else if(N)V(N,this._dsaf);else{var U=M.method.split(".");if(U.length<2)return;var H=U.pop(),G=U.join("."),Z=this._dsf._obs,Y=Z[G]||{},J=Y[H];if(J&&typeof J=="function"){F(J,Y);return}if(Z=this._dsaf._obs,Y=Z[G]||{},J=Y[H],J&&typeof J=="function"){V(J,Y);return}}}};for(var T in C)window[T]=C[T];bridge.register("_hasJavascriptMethod",function(I,M){var D=I.split(".");if(D.length<2)return!!(_dsf[D]||_dsaf[D]);var I=D.pop(),L=D.join("."),B=_dsf._obs[L]||_dsaf._obs[L];return B&&!!B[I]})})();dsbridge.default=bridge;Object.defineProperty(lib$3,"__esModule",{value:!0});var default_1$r=lib$3.default=void 0,_dsbridge$1=_interopRequireDefault$u(dsbridge);function _interopRequireDefault$u(_){return _&&_.__esModule?_:{default:_}}default_1$r=lib$3.default={register(){_dsbridge$1.default.canUseBridge()?_dsbridge$1.default.register(...arguments):console.warn("dsbridge is not available")},registerAsyn(){_dsbridge$1.default.canUseBridge()?_dsbridge$1.default.registerAsyn(...arguments):console.warn("dsbridge is not available")},call(){_dsbridge$1.default.call(...arguments)},asyncCall(){for(var _=arguments.length,C=new Array(_),T=0;T<_;T++)C[T]=arguments[T];return new Promise((I,M)=>{_dsbridge$1.default.call(...C,D=>{try{const L=JSON.parse(D);if(L.code===0){const B=JSON.parse(L.data);I(B)}else M(new Error(L.error))}catch{I(D)}})})},shareMessage(_){const{content:C,imgUrl:T,success:I,fail:M}=_;if(!C&&!T){M("params error");return}_dsbridge$1.default.call("arcShare",JSON.stringify({content:C,imgUrl:T}),D=>{const L=JSON.parse(D);L&&L.code===0?typeof I=="function"&&I(D):typeof M=="function"&&M(D)})},showLoading(){_dsbridge$1.default.call("arcShowLoading")},hideLoading(){_dsbridge$1.default.call("arcHideLoading")},showToast(_){_&&typeof _=="string"&&_dsbridge$1.default.call("arcToast",_)},chooseImgs(_){const{limit:C,success:T,fail:I}=_;_dsbridge$1.default.call("arcChooseImgs",JSON.stringify({limit:C}),M=>{const D=JSON.parse(M);D&&D.code===0?typeof T=="function"&&T(M):typeof I=="function"&&I(M)})},previewImgs(_){const{imgs:C}=_;!C||C.length===0||_dsbridge$1.default.call("arcPreviewImgs",JSON.stringify(_))},isSetPWD(_){const{success:C,fail:T}=_;_dsbridge$1.default.call("arcIsSetPWD","",I=>{const M=JSON.parse(I);M&&M.code===0?typeof C=="function"&&C(I):typeof T=="function"&&T(I)})},isCodeABOk(_){const{success:C,fail:T}=_;_dsbridge$1.default.call("arcIsCodeABOk","",I=>{const M=JSON.parse(I);M&&M.code===0?typeof C=="function"&&C(I):typeof T=="function"&&T(I)})}};class CookieStorageEngine{constructor(C,T){this.storageKey=C,this.options=T||{}}setToken(C){return Cookie.set(this.storageKey,C,{...getCookieOptions(this.options)})}getToken(){return Cookie.get(this.storageKey)}removeToken(){return Cookie.remove(this.storageKey,getCookieOptions(this.options))}}function e$2(_){this.message=_}e$2.prototype=new Error,e$2.prototype.name="InvalidCharacterError";var r$3=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(_){var C=String(_).replace(/=+$/,"");if(C.length%4==1)throw new e$2("'atob' failed: The string to be decoded is not correctly encoded.");for(var T,I,M=0,D=0,L="";I=C.charAt(D++);~I&&(T=M%4?64*T+I:I,M++%4)?L+=String.fromCharCode(255&T>>(-2*M&6)):0)I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(I);return L};function t$6(_){var C=_.replace(/-/g,"+").replace(/_/g,"/");switch(C.length%4){case 0:break;case 2:C+="==";break;case 3:C+="=";break;default:throw"Illegal base64url string!"}try{return function(T){return decodeURIComponent(r$3(T).replace(/(.)/g,function(I,M){var D=M.charCodeAt(0).toString(16).toUpperCase();return D.length<2&&(D="0"+D),"%"+D}))}(C)}catch{return r$3(C)}}function n$2(_){this.message=_}function o$1(_,C){if(typeof _!="string")throw new n$2("Invalid token specified");var T=(C=C||{}).header===!0?0:1;try{return JSON.parse(t$6(_.split(".")[T]))}catch(I){throw new n$2("Invalid token specified: "+I.message)}}n$2.prototype=new Error,n$2.prototype.name="InvalidTokenError";class LocalStorageEngine{constructor(C){this.storageKey=C}setToken(C){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.setItem(this.storageKey,C)}getToken(){if(typeof window>"u"||typeof window.localStorage>"u")return;const C=localStorage.getItem(this.storageKey);let T,I;try{if({value:T,exp:I}=JSON.parse(C),I===void 0||T===void 0)return C}catch{T=C}try{I=o$1(T).exp}catch{return}if(!(new Date().getTime()>I*1e3))return T}removeToken(){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.removeItem(this.storageKey)}}function createStorage(_="did.auth.token",C="ls",T={}){if(!_)throw new Error("storageKey must be specified to create a storage");let I=null;if(C==="ls")I=new LocalStorageEngine(_);else if(C==="cookie")I=new CookieStorageEngine(_,T);else throw new Error("storageEngine must be ls or cookie");return{getToken:I.getToken.bind(I),setToken:I.setToken.bind(I),removeToken:I.removeToken.bind(I),engine:C,key:_}}const overheadLength=tweetnacl.box.publicKeyLength+tweetnacl.box.overheadLength,ERROR_MSG_INPUT="Input must be an string, Buffer or Uint8Array";function normalizeInput(_){let C;if(_ instanceof Uint8Array)C=_;else if(typeof _=="string")C=new TextEncoder().encode(_);else throw new Error(ERROR_MSG_INPUT);return C}function toHex(_){return Array.prototype.map.call(_,function(C){return(C<16?"0":"")+C.toString(16)}).join("")}function uint32ToHex(_){return(4294967296+_).toString(16).substring(1)}function debugPrint(_,C,T){let I=`
249
+ `+strRepeat(G,I):"",Y=I?": ":":";if(H&&H.toJSON&&typeof H.toJSON=="function"&&(H=H.toJSON()),H=D(V,U,H),H!==void 0){if(typeof H!="object"||H===null)return jsonStringify(H);if(isArray$h(H)){for(var ae=[],J=0;J<H.length;J++){var X=F(H,J,H[J],G+1)||jsonStringify(null);ae[ae.length]=Z+I+X}return"["+$join(ae,",")+Z+"]"}if($indexOf$1(N,H)!==-1){if(M)return jsonStringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}else N[N.length]=H;for(var oe=$sort(objectKeys$7(H),B&&B(H)),ae=[],J=0;J<oe.length;J++){var U=oe[J],le=F(H,U,H[U],G+1);if(le){var he=jsonStringify(U)+Y+le;ae[ae.length]=Z+I+he}}return $splice(N,$indexOf$1(N,H),1),"{"+$join(ae,",")+Z+"}"}}({"":C},"",C,0)};const _t=getDefaultExportFromCjs(jsonStableStringify);var lib$5={},lib$4={},type={},HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(_){return this.__data__.set(_,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(_){return this.__data__.has(_)}var _setCacheHas=setCacheHas$1,MapCache=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$3(_){var C=-1,T=_==null?0:_.length;for(this.__data__=new MapCache;++C<T;)this.add(_[C])}SetCache$3.prototype.add=SetCache$3.prototype.push=setCacheAdd;SetCache$3.prototype.has=setCacheHas;var _SetCache=SetCache$3;function arraySome$1(_,C){for(var T=-1,I=_==null?0:_.length;++T<I;)if(C(_[T],T,_))return!0;return!1}var _arraySome=arraySome$1;function cacheHas$3(_,C){return _.has(C)}var _cacheHas=cacheHas$3,SetCache$2=_SetCache,arraySome=_arraySome,cacheHas$2=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(_,C,T,I,M,D){var L=T&COMPARE_PARTIAL_FLAG$5,B=_.length,N=C.length;if(B!=N&&!(L&&N>B))return!1;var F=D.get(_),V=D.get(C);if(F&&V)return F==C&&V==_;var U=-1,H=!0,G=T&COMPARE_UNORDERED_FLAG$3?new SetCache$2:void 0;for(D.set(_,C),D.set(C,_);++U<B;){var Z=_[U],Y=C[U];if(I)var J=L?I(Y,Z,U,C,_,D):I(Z,Y,U,_,C,D);if(J!==void 0){if(J)continue;H=!1;break}if(G){if(!arraySome(C,function(X,oe){if(!cacheHas$2(G,oe)&&(Z===X||M(Z,X,T,I,D)))return G.push(oe)})){H=!1;break}}else if(!(Z===Y||M(Z,Y,T,I,D))){H=!1;break}}return D.delete(_),D.delete(C),H}var _equalArrays=equalArrays$2;function mapToArray$1(_){var C=-1,T=Array(_.size);return _.forEach(function(I,M){T[++C]=[M,I]}),T}var _mapToArray=mapToArray$1;function setToArray$3(_){var C=-1,T=Array(_.size);return _.forEach(function(I){T[++C]=I}),T}var _setToArray=setToArray$3,Symbol$5=_Symbol,Uint8Array$1=_Uint8Array,eq$4=eq_1$1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray$2=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$5?Symbol$5.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag$1(_,C,T,I,M,D,L){switch(T){case dataViewTag:if(_.byteLength!=C.byteLength||_.byteOffset!=C.byteOffset)return!1;_=_.buffer,C=C.buffer;case arrayBufferTag:return!(_.byteLength!=C.byteLength||!D(new Uint8Array$1(_),new Uint8Array$1(C)));case boolTag:case dateTag:case numberTag:return eq$4(+_,+C);case errorTag:return _.name==C.name&&_.message==C.message;case regexpTag:case stringTag:return _==C+"";case mapTag:var B=mapToArray;case setTag:var N=I&COMPARE_PARTIAL_FLAG$4;if(B||(B=setToArray$2),_.size!=C.size&&!N)return!1;var F=L.get(_);if(F)return F==C;I|=COMPARE_UNORDERED_FLAG$2,L.set(_,C);var V=equalArrays$1(B(_),B(C),I,M,D,L);return L.delete(_),V;case symbolTag:if(symbolValueOf)return symbolValueOf.call(_)==symbolValueOf.call(C)}return!1}var _equalByTag=equalByTag$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$2=Object.prototype,hasOwnProperty$4=objectProto$2.hasOwnProperty;function equalObjects$1(_,C,T,I,M,D){var L=T&COMPARE_PARTIAL_FLAG$3,B=getAllKeys(_),N=B.length,F=getAllKeys(C),V=F.length;if(N!=V&&!L)return!1;for(var U=N;U--;){var H=B[U];if(!(L?H in C:hasOwnProperty$4.call(C,H)))return!1}var G=D.get(_),Z=D.get(C);if(G&&Z)return G==C&&Z==_;var Y=!0;D.set(_,C),D.set(C,_);for(var J=L;++U<N;){H=B[U];var X=_[H],oe=C[H];if(I)var ae=L?I(oe,X,H,C,_,D):I(X,oe,H,_,C,D);if(!(ae===void 0?X===oe||M(X,oe,T,I,D):ae)){Y=!1;break}J||(J=H=="constructor")}if(Y&&!J){var le=_.constructor,he=C.constructor;le!=he&&"constructor"in _&&"constructor"in C&&!(typeof le=="function"&&le instanceof le&&typeof he=="function"&&he instanceof he)&&(Y=!1)}return D.delete(_),D.delete(C),Y}var _equalObjects=equalObjects$1,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag=_getTag,isArray$g=isArray_1,isBuffer=isBufferExports,isTypedArray=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag$1="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$1=Object.prototype,hasOwnProperty$3=objectProto$1.hasOwnProperty;function baseIsEqualDeep$1(_,C,T,I,M,D){var L=isArray$g(_),B=isArray$g(C),N=L?arrayTag:getTag(_),F=B?arrayTag:getTag(C);N=N==argsTag$1?objectTag:N,F=F==argsTag$1?objectTag:F;var V=N==objectTag,U=F==objectTag,H=N==F;if(H&&isBuffer(_)){if(!isBuffer(C))return!1;L=!0,V=!1}if(H&&!V)return D||(D=new Stack$1),L||isTypedArray(_)?equalArrays(_,C,T,I,M,D):equalByTag(_,C,N,T,I,M,D);if(!(T&COMPARE_PARTIAL_FLAG$2)){var G=V&&hasOwnProperty$3.call(_,"__wrapped__"),Z=U&&hasOwnProperty$3.call(C,"__wrapped__");if(G||Z){var Y=G?_.value():_,J=Z?C.value():C;return D||(D=new Stack$1),M(Y,J,T,I,D)}}return H?(D||(D=new Stack$1),equalObjects(_,C,T,I,M,D)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$2=isObjectLike_1;function baseIsEqual$3(_,C,T,I,M){return _===C?!0:_==null||C==null||!isObjectLike$2(_)&&!isObjectLike$2(C)?_!==_&&C!==C:baseIsEqualDeep(_,C,T,I,baseIsEqual$3,M)}var _baseIsEqual=baseIsEqual$3,baseIsEqual$2=_baseIsEqual;function isEqual$1(_,C){return baseIsEqual$2(_,C)}var isEqual_1$1=isEqual$1;const isEqual$2=getDefaultExportFromCjs(isEqual_1$1);var util$7={},__importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(util$7,"__esModule",{value:!0});util$7.toStrictHex=util$7.toBytes=util$7.toBits=util$7.DID_PREFIX=void 0;const padStart_1=__importDefault$3(padStart_1$1),util_1$2=lib$6,DID_PREFIX="did:abt:";util$7.DID_PREFIX=DID_PREFIX;const toBytes=_=>{try{if((0,util_1$2.isHexStrict)(_))return Buffer$3.from((0,util_1$2.stripHexPrefix)(_),"hex");let C=(0,util_1$2.fromBase58)(_.replace(DID_PREFIX,""));for(;C.length<26;)C=Buffer$3.concat([Buffer$3.from([0]),C]);return C}catch(C){throw new Error(`Cannot convert DID string to byte array: ${C.message}`)}};util$7.toBytes=toBytes;const toBits=(_,C)=>(0,padStart_1.default)((0,util_1$2.toBN)(_).toString(2),C,"0");util$7.toBits=toBits;const toStrictHex=(_,C)=>{const T=_.replace(/^0x/i,"");return typeof C=="number"&&C%2===0?(0,padStart_1.default)(_,C,"0"):T.length%2===0?T:`0${T}`};util$7.toStrictHex=toStrictHex;var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(type,"__esModule",{value:!0});type.toChecksumAddress=type.isEthereumDid=type.isEthereumType=type.toTypeInfoStr=type.toTypeInfo=type.fromTypeInfo=type.DID_TYPE_PASSKEY=type.DID_TYPE_ETHEREUM=type.DID_TYPE_ARCBLOCK=void 0;type.DidType=DidType;const util_1$1=lib$6,upperFirst_1=__importDefault$2(upperFirst_1$1),isEqual_1=__importDefault$2(isEqual_1$1),pick_1=__importDefault$2(pick_1$1),mcrypto_1$1=lib$7,util_2=util$7,mapping={pk:"key",address:"encoding"},DID_TYPE_ARCBLOCK={role:mcrypto_1$1.types.RoleType.ROLE_ACCOUNT,pk:mcrypto_1$1.types.KeyType.ED25519,hash:mcrypto_1$1.types.HashType.SHA3,address:mcrypto_1$1.types.EncodingType.BASE58};type.DID_TYPE_ARCBLOCK=DID_TYPE_ARCBLOCK;const DID_TYPE_PASSKEY={role:mcrypto_1$1.types.RoleType.ROLE_PASSKEY,pk:mcrypto_1$1.types.KeyType.PASSKEY,hash:mcrypto_1$1.types.HashType.SHA2,address:mcrypto_1$1.types.EncodingType.BASE58};type.DID_TYPE_PASSKEY=DID_TYPE_PASSKEY;const DID_TYPE_ETHEREUM={role:mcrypto_1$1.types.RoleType.ROLE_ACCOUNT,pk:mcrypto_1$1.types.KeyType.ETHEREUM,hash:mcrypto_1$1.types.HashType.KECCAK,address:mcrypto_1$1.types.EncodingType.BASE16};type.DID_TYPE_ETHEREUM=DID_TYPE_ETHEREUM;const isEthereumType=_=>{const C=["pk","hash","address"];return(0,isEqual_1.default)((0,pick_1.default)(_,C),(0,pick_1.default)(DID_TYPE_ETHEREUM,C))};type.isEthereumType=isEthereumType;const isEthereumDid=_=>{const C=(0,util_1$1.toAddress)(_);return/^(0x)?[0-9a-f]{40}$/i.test(C)?/^(0x|0X)?[0-9a-f]{40}$/.test(C)||/^(0x|0X)?[0-9A-F]{40}$/.test(C)?!0:checkAddressChecksum(C):!1};type.isEthereumDid=isEthereumDid;const checkAddressChecksum=_=>{const C=_.replace(/^0x/i,""),T=mcrypto_1$1.Hasher.Keccak.hash256(C.toLowerCase()).replace(/^0x/i,"");for(let I=0;I<40;I++)if(parseInt(T[I],16)>7&&C[I].toUpperCase()!==C[I]||parseInt(T[I],16)<=7&&C[I].toLowerCase()!==C[I])return!1;return!0},toChecksumAddress=_=>{if(typeof _>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(_))throw new Error(`Given address "${_}" is not a valid Ethereum address.`);const C=_.toLowerCase().replace(/^0x/i,""),T=mcrypto_1$1.Hasher.Keccak.hash256(C).replace(/^0x/i,"");let I="0x";for(let M=0;M<C.length;M++)parseInt(T[M],16)>7?I+=C[M].toUpperCase():I+=C[M];return I};type.toChecksumAddress=toChecksumAddress;function DidType(_={}){let C={};["default","arcblock"].includes(_)?C=DID_TYPE_ARCBLOCK:["eth","ethereum"].includes(_)?C=DID_TYPE_ETHEREUM:["passkey"].includes(_)?C=DID_TYPE_PASSKEY:C={...DID_TYPE_ARCBLOCK,..._};const{role:T,pk:I,hash:M,address:D}=C;Object.keys(C).forEach(B=>{const N=(0,upperFirst_1.default)(`${mapping[B]||B}Type`);if(Object.values(mcrypto_1$1.types[N]).includes(C[B])===!1)throw new Error(`Unsupported ${B} type: ${C[B]}`)});const L={role:T,pk:I,hash:M,address:D};return isEthereumType(L)===!1&&[mcrypto_1$1.types.RoleType.ROLE_NODE,mcrypto_1$1.types.RoleType.ROLE_VALIDATOR,mcrypto_1$1.types.RoleType.ROLE_TETHER,mcrypto_1$1.types.RoleType.ROLE_SWAP].includes(L.role)&&(L.hash=mcrypto_1$1.types.HashType.SHA2),L}DidType.toJSON=_=>Object.keys(_).reduce((C,T)=>{const I=(0,upperFirst_1.default)(`${mapping[T]||T}Type`),M=Object.keys(mcrypto_1$1.types[I]),D=Object.values(mcrypto_1$1.types[I]);return C[T]=M[D.indexOf(_[T])],C},{});DidType.fromJSON=_=>Object.keys(_).reduce((C,T)=>{const I=(0,upperFirst_1.default)(`${mapping[T]||T}Type`),M=Object.keys(mcrypto_1$1.types[I]),D=Object.values(mcrypto_1$1.types[I]);return C[T]=D[M.indexOf(_[T])],C},{});const fromTypeInfo=_=>{const C=DidType(_),T=(0,util_2.toBits)(C.role,6),I=(0,util_2.toBits)(C.pk,5),M=(0,util_2.toBits)(C.hash,5),D=`${T}${I}${M}`,L=(0,util_1$1.stripHexPrefix)((0,util_1$1.numberToHex)(parseInt(D,2)));return(0,util_2.toStrictHex)(L,4)};type.fromTypeInfo=fromTypeInfo;const toTypeInfo=_=>{let C={};try{if(isEthereumDid(_))C=DID_TYPE_ETHEREUM;else{const I=(0,util_2.toBytes)(_).slice(0,2),M=(0,util_2.toStrictHex)(Buffer$3.from(I).toString("hex")),D=(0,util_2.toBits)(new util_1$1.BN(M,16),16),L=D.slice(0,6),B=D.slice(6,11),N=D.slice(11,16);C={role:parseInt(L,2),pk:parseInt(B,2),hash:parseInt(N,2),address:(0,util_1$1.isHex)((0,util_1$1.toAddress)(_))?mcrypto_1$1.types.EncodingType.BASE16:mcrypto_1$1.types.EncodingType.BASE58}}return Object.keys(C).forEach(T=>{Object.values(mcrypto_1$1.types[`${(0,upperFirst_1.default)(mapping[T]||T)}Type`]).includes(C[T])===!1&&delete C[T]}),C}catch{return C}};type.toTypeInfo=toTypeInfo;const toTypeInfoStr=_=>{const C=toTypeInfo(_);return Object.keys(C).reduce((T,I)=>{const M=mcrypto_1$1.types[`${(0,upperFirst_1.default)(mapping[I]||I)}Type`];return T[I]=Object.keys(M).find(D=>M[D]===C[I]),T},{})};type.toTypeInfoStr=toTypeInfoStr;(function(_){Object.defineProperty(_,"__esModule",{value:!0}),_.DID_TYPE_PASSKEY=_.DID_TYPE_ETHEREUM=_.DID_TYPE_ARCBLOCK=_.DID_PREFIX=_.DidType=_.fromTypeInfo=_.toTypeInfoStr=_.toTypeInfo=_.isEthereumType=_.isEthereumDid=_.isValid=_.isFromPublicKey=_.toDid=_.toAddress=_.fromHash=_.fromPublicKeyHash=_.fromPublicKey=_.fromSecretKey=_.toStrictHex=_.types=void 0;const C=lib$7;Object.defineProperty(_,"types",{enumerable:!0,get:function(){return C.types}});const T=lib$6;Object.defineProperty(_,"toAddress",{enumerable:!0,get:function(){return T.toAddress}}),Object.defineProperty(_,"toDid",{enumerable:!0,get:function(){return T.toDid}});const I=type;Object.defineProperty(_,"DidType",{enumerable:!0,get:function(){return I.DidType}}),Object.defineProperty(_,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return I.DID_TYPE_ARCBLOCK}}),Object.defineProperty(_,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return I.DID_TYPE_ETHEREUM}}),Object.defineProperty(_,"DID_TYPE_PASSKEY",{enumerable:!0,get:function(){return I.DID_TYPE_PASSKEY}}),Object.defineProperty(_,"fromTypeInfo",{enumerable:!0,get:function(){return I.fromTypeInfo}}),Object.defineProperty(_,"isEthereumDid",{enumerable:!0,get:function(){return I.isEthereumDid}}),Object.defineProperty(_,"isEthereumType",{enumerable:!0,get:function(){return I.isEthereumType}}),Object.defineProperty(_,"toTypeInfo",{enumerable:!0,get:function(){return I.toTypeInfo}}),Object.defineProperty(_,"toTypeInfoStr",{enumerable:!0,get:function(){return I.toTypeInfoStr}});const M=util$7;Object.defineProperty(_,"DID_PREFIX",{enumerable:!0,get:function(){return M.DID_PREFIX}}),Object.defineProperty(_,"toStrictHex",{enumerable:!0,get:function(){return M.toStrictHex}});const D=(U,H)=>{const G=(0,I.DidType)(H),Z=(0,C.getSigner)(G.pk).getPublicKey(U);return L(Z.indexOf("0x")===0?Z:`0x${Z}`,G)};_.fromSecretKey=D;const L=(U,H)=>{const G=(0,I.DidType)(H),Y=(0,C.getHasher)(G.hash)(U,1);return B(Y,G)};_.fromPublicKey=L;const B=(U,H)=>{const G=(0,I.DidType)(H),Z=(0,T.stripHexPrefix)(U).slice(0,40),Y=(0,C.getHasher)(G.hash),J=(0,I.fromTypeInfo)(G),X=(0,T.stripHexPrefix)(Y(`0x${J}${Z}`,1)).slice(0,8),oe=`0x${J}${Z}${X}`;return(0,I.isEthereumType)(G)?(0,I.toChecksumAddress)(`0x${U.slice(-40)}`):G.address===C.types.EncodingType.BASE58?(0,T.toBase58)(oe):oe};_.fromPublicKeyHash=B;const N=(U,H=C.types.RoleType.ROLE_ACCOUNT)=>{const G=Object.keys(C.types.RoleType),Z=Object.values(C.types.RoleType);if(Z.indexOf(H)===-1)throw new Error(`Unsupported role type ${H} when gen ddi from hash`);const Y=(0,I.DidType)({role:C.types.RoleType[G[Z.indexOf(H)]]});return B(U,Y)};_.fromHash=N;const F=(U,H)=>{if(V(U)===!1)return!1;const G=(0,I.toTypeInfo)(U),Z=L(H,G),Y=U.replace(M.DID_PREFIX,"");return Z===Y};_.isFromPublicKey=F;const V=U=>{if(!U)return!1;const H=(0,T.toAddress)(String(U)),{hash:G}=(0,I.toTypeInfo)(H);if(typeof G>"u")return!1;if((0,I.isEthereumDid)(H))return!0;const Z=(0,C.getHasher)(G),Y=(0,M.toBytes)(H),J=(0,M.toStrictHex)(Buffer$3.from(Y.slice(0,22)).toString("hex")),X=(0,M.toStrictHex)(Buffer$3.from(Y.slice(22,26)).toString("hex")),oe=(0,T.stripHexPrefix)(Z(`0x${J}`,1)).slice(0,8);return X===oe};_.isValid=V})(lib$4);Object.defineProperty(lib$5,"__esModule",{value:!0});lib$5.WalletType=void 0;lib$5.Wallet=Wallet;lib$5.fromSecretKey=fromSecretKey;var fromPublicKey_1=lib$5.fromPublicKey=fromPublicKey;lib$5.fromAddress=fromAddress;lib$5.fromRandom=fromRandom;lib$5.fromJSON=fromJSON;lib$5.isValid=isValid;const util_1=lib$6,mcrypto_1=lib$7,did_1=lib$4;lib$5.WalletType=did_1.DidType;function Wallet(_,C="default"){const T=(0,did_1.DidType)(C),I=(0,mcrypto_1.getSigner)(T.pk),M=(0,mcrypto_1.getHasher)(T.hash);return{type:T,secretKey:_.sk,publicKey:_.pk,address:_.pk?(0,did_1.fromPublicKey)(_.pk,T):_.address,hash(D,L=1,B="hex"){return M(D,L,B)},sign(D,L=!0,B="hex"){if(!_.sk)throw new Error("Cannot sign data without a secretKey");if(L){const N=M(D,1);return I.sign(N,_.sk,B)}return I.sign(D,_.sk,B)},async verify(D,L,B=!0,N){if(!_.pk)throw new Error("Cannot verify data without a publicKey");const F=B?M(D,1):D;return I.verify(F,L,_.pk,N)},ethHash(D){if(typeof I.ethHash!="function")throw new Error("ethHash is not supported by signer");return I.ethHash(D)},ethSign(D,L=!0){if(!_.sk)throw new Error("Cannot sign data without a secretKey");if(typeof I.ethHash!="function")throw new Error("ethSign is not supported by signer");return L?I.ethSign(I.ethHash(D),(0,util_1.toHex)(_.sk)):I.ethSign(D,(0,util_1.toHex)(_.sk))},ethVerify(D,L,B=!0){if(typeof I.ethHash!="function")throw new Error("ethVerify is not supported by signer");const N=B?I.ethHash(D):D;return I.ethRecover(N,L)===this.address},toAddress(){return _.pk?(0,did_1.fromPublicKey)(_.pk,T):_.address},toJSON(){return{type:did_1.DidType.toJSON(T),sk:(0,util_1.toHex)(_.sk),pk:(0,util_1.toHex)(_.pk),address:this.address}}}}function fromSecretKey(_,C="default"){const T=(0,did_1.DidType)(C),I={sk:_,pk:(0,mcrypto_1.getSigner)(T.pk).getPublicKey(_)};return Wallet(I,T)}function fromPublicKey(_,C="default"){return Wallet({pk:_},(0,did_1.DidType)(C))}function fromAddress(_){return Wallet({address:(0,did_1.toAddress)(_)},(0,did_1.toTypeInfo)(_))}function fromRandom(_="default"){const C=(0,did_1.DidType)(_),I=(0,mcrypto_1.getSigner)(C.pk).genKeyPair();return Wallet({sk:I.secretKey,pk:I.publicKey},C)}function fromJSON(_){const C=did_1.DidType.fromJSON(_.type);return Wallet(_,C)}function isValid(_,C=!0){return!(!_||typeof _!="object"||typeof _.verify!="function"||typeof _.toAddress!="function"||typeof _.toJSON!="function"||!_.type||!_.publicKey||C&&(!_.secretKey||typeof _.sign!="function"))}var isUrl_1=isUrl$1,protocolAndDomainRE=/^(?:\w+:)?\/\/(\S+)$/,localhostDomainRE=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,nonLocalhostDomainRE=/^[^\s\.]+\.\S{2,}$/;function isUrl$1(_){if(typeof _!="string")return!1;var C=_.match(protocolAndDomainRE);if(!C)return!1;var T=C[1];return T?!!(localhostDomainRE.test(T)||nonLocalhostDomainRE.test(T)):!1}const isUrl$2=getDefaultExportFromCjs(isUrl_1);var __defProp$4=Object.defineProperty,__defNormalProp$4=(_,C,T)=>C in _?__defProp$4(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$4=(_,C,T)=>(__defNormalProp$4(_,C+"",T),T);class AuthService{constructor({api:C}){__publicField$4(this,"api"),this.api=C}async getUserPublicInfo({did:C}){const{data:T}=await this.api.get("/api/user",{params:{did:C}});return T}async getUserPrivacyConfig({did:C}){const{data:T}=await this.api.get("/api/user/privacy/config",{params:{did:C}});return T}async saveUserPrivacyConfig(C){const{data:T}=await this.api.post("/api/user/privacy/config",C);return T}async getUserNotificationConfig(){const{data:C}=await this.api.get("/api/user/notification/config");return C}async saveUserNotificationConfig(C){const{data:T}=await this.api.post("/api/user/notification/config",C);return T}async testNotificationWebhook(C){const{data:T}=await this.api.put("/api/user/notification/webhook",C);return T}async getProfileUrl({did:C,locale:T}){const I=`${constant$2.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(I,{did:C,locale:T})}async getProfile(){const{data:C}=await this.api.get("/api/user/profile");return C}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:C,inviter:T}){const{data:I}=await this.api.put("/api/user/profile",{locale:C,inviter:T});return I}async updateDidSpace({spaceGateway:C}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:C})}async logout({visitorId:C}){const{data:T}=await this.api.post("/api/user/logout",{visitorId:C});return T}}class TokenService{getSessionToken(C){return api$2.get(constant$2.SESSION_TOKEN_STORAGE_KEY)?api$2.get(constant$2.SESSION_TOKEN_STORAGE_KEY):C.sessionTokenKey?window.localStorage.getItem(C.sessionTokenKey):""}setSessionToken(C){api$2.set(constant$2.SESSION_TOKEN_STORAGE_KEY,C)}removeSessionToken(){api$2.remove(constant$2.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constant$2.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(C){localStorage.setItem(constant$2.REFRESH_TOKEN_STORAGE_KEY,C)}removeRefreshToken(){localStorage.removeItem(constant$2.REFRESH_TOKEN_STORAGE_KEY)}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{getBlocklet(C,T=!1){if(!C){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!T&&blockletCache.has(C))return blockletCache.get(C);const I=withQuery(joinURL(C,"__blocklet__.js"),{type:"json",t:Date.now()});return new Promise(async M=>{const L=await(await fetch(I)).json();blockletCache.set(C,L),M(L)})}loadBlocklet(){return new Promise((C,T)=>{if(typeof window>"u"||typeof document>"u"){T();return}const I=document.createElement("script");let M="/";window.blocklet&&window.blocklet.prefix&&(M=window.blocklet.prefix),I.src=withQuery(joinURL(M,"__blocklet__.js"),{t:Date.now()}),I.onload=()=>{C()},I.onerror=()=>{T()},document.head.append(I)})}getPrefix(C){var T;return C?(C==null?void 0:C.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((T=window.blocklet)==null?void 0:T.prefix)||"/"}}var __defProp$3=Object.defineProperty,__defNormalProp$3=(_,C,T)=>C in _?__defProp$3(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$3=(_,C,T)=>(__defNormalProp$3(_,typeof C!="symbol"?C+"":C,T),T);class UserSessionService{constructor({api:C,blocklet:T}){__publicField$3(this,"api"),__publicField$3(this,"blocklet"),this.api=C,this.blocklet=T||new BlockletService}getBaseUrl(C){return C?joinURL(C,constant$2.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:C,appUrl:T}){const I=this.getBaseUrl(T),M=await this.blocklet.getBlocklet(),{data:D}=await this.api.get("/api/user-session",{baseURL:I,params:{userDid:C,appPid:M.appPid}});return D}async getMyLoginSessions({appUrl:C}={}){const T=this.getBaseUrl(C),{data:I}=await this.api.get("/api/user-session/myself",{baseURL:T});return I}async loginByUserSession({id:C,appPid:T,userDid:I,passportId:M,appUrl:D}){const L=this.getBaseUrl(D),{data:B}=await this.api.post("/api/user-session/login",{id:C,appPid:T,userDid:I,passportId:M},{baseURL:L});return B}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(_,C,T)=>C in _?__defProp$2(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$2=(_,C,T)=>(__defNormalProp$2(_,C+"",T),T);class ComponentService{constructor({blocklet:C=window.blocklet}={}){__publicField$2(this,"blocklet"),this.blocklet=C}getComponent(C){var M;return(((M=this.blocklet)==null?void 0:M.componentMountPoints)||[]).find(D=>[D.title,D.name,D.did].includes(C))}getComponentMountPoint(C){const T=this.getComponent(C);return(T==null?void 0:T.mountPoint)||""}getUrl(C,...T){var D;const I=this.getComponentMountPoint(C),M=((D=this.blocklet)==null?void 0:D.appUrl)||"";return joinURL(M,I,...T)}}var __defProp$1=Object.defineProperty,__defNormalProp$1=(_,C,T)=>C in _?__defProp$1(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField$1=(_,C,T)=>(__defNormalProp$1(_,typeof C!="symbol"?C+"":C,T),T);class FederatedService{constructor({api:C,blocklet:T}){__publicField$1(this,"api"),__publicField$1(this,"blocklet"),this.api=C,this.blocklet=T||new BlockletService}async getTrustedDomains(){const{data:C}=await this.api.get("/api/federated/getTrustedDomains");return C}getMaster(C=this.blocklet.getBlocklet()){var I;const T=(I=C==null?void 0:C.settings)==null?void 0:I.federated;return T==null?void 0:T.master}getConfig(C=this.blocklet.getBlocklet()){var I;const T=(I=C==null?void 0:C.settings)==null?void 0:I.federated;return T==null?void 0:T.config}getFederatedEnabled(C=this.blocklet.getBlocklet()){const T=this.getConfig(C);return(T==null?void 0:T.status)==="approved"}getSourceAppPid(C=this.blocklet.getBlocklet()){const T=this.getMaster(C);return T==null?void 0:T.appPid}getFederatedApp(C=this.blocklet.getBlocklet()){const T=this.getMaster(C);return isEmpty$3(T)?null:{appId:T.appId,appName:T.appName,appDescription:T.appDescription,appLogo:T.appLogo,appPid:T.appPid,appUrl:T.appUrl,version:T.version,sourceAppPid:T.appPid,provider:"wallet"}}getCurrentApp(C=this.blocklet.getBlocklet()){if(C)return{appId:C.appId,appName:C.appName,appDescription:C.appDescription,appLogo:C.appLogo,appPid:C.appPid,appUrl:C.appUrl,version:C.version,sourceAppPid:null,provider:"wallet"};if(window.env){const T=window.env;return{appId:T.appId,appName:T.appName,appDescription:T.appDescription,appUrl:T.baseUrl,sourceAppPid:null,provider:"wallet",type:"server"}}return null}getApps(C=this.blocklet.getBlocklet()){const T=[],I=this.getFederatedApp(C),M=this.getCurrentApp(C),D=this.getFederatedEnabled(C);return M&&T.push(M),I&&(I==null?void 0:I.appId)!==(M==null?void 0:M.appId)&&D&&T.push(I),T.reverse()}async getBlockletData(C){try{const T=new URL("__blocklet__.js",C);return T.searchParams.set("type","json"),await(await fetch(T.href)).json()}catch(T){return console.error(`Failed to get blocklet data: ${C}`,T),null}}}const version$5="1.16.37",sleep$1=(_=0)=>new Promise(C=>{setTimeout(()=>{C()},_)}),getBearerToken=_=>`Bearer ${encodeURIComponent(_)}`,visitorIdKey="__visitor_id",getVisitorId$1=()=>localStorage.getItem(visitorIdKey),verifyResponse=(_,C)=>{if(isObject$u(_.data)&&_.status>=200&&_.status<300&&window.blocklet&&window.blocklet.appId&&window.blocklet.appPk){if(!_.data.$signature)throw C(),new Error("Invalid response");const{appId:T,appPk:I}=window.blocklet;if(fromPublicKey_1(I,lib$4.toTypeInfo(T)).verify(_t(omit$1(_.data,["$signature"])),_.data.$signature)===!1)throw C(),new Error("Invalid response")}return _};function getCSRFToken(){return api$2.get("x-csrf-token")}async function sleepForLoading(_,C=300){_.metaData.endTime=+new Date;const{startTime:T,endTime:I}=_.metaData,M=I-T;M<C&&await sleep$1(C-M),delete _.metaData}const createAxios$1=(_,C)=>{const T={..._==null?void 0:_.headers,"x-blocklet-js-sdk-version":version$5},I=new ComponentService,M=getVisitorId$1();[void 0,null].includes(M)||(T["x-blocklet-visitor-id"]=M);const D=axios.create({..._,headers:T});return C!=null&&C.lazy&&(D.interceptors.request.use(L=>(L.metaData={startTime:+new Date},L),L=>Promise.reject(L)),D.interceptors.response.use(async L=>(L.config&&await sleepForLoading(L.config,C==null?void 0:C.lazyTime),L),async L=>(L.response&&await sleepForLoading(L.response.config,C==null?void 0:C.lazyTime),Promise.reject(L)))),D.interceptors.request.use(L=>{var N,F;const B=(C==null?void 0:C.componentDid)??((F=(N=window.blocklet)==null?void 0:N.componentId)==null?void 0:F.split("/").pop());return L.baseURL=L.baseURL||I.getComponentMountPoint(B),L.timeout=L.timeout||20*1e3,L.headers["x-csrf-token"]=getCSRFToken(),L},L=>Promise.reject(L)),D};async function renewRefreshToken$1(_){if(!_)throw new Error("Refresh token not found");const C=createAxios$1({baseURL:constant$2.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,secure:!0,headers:{authorization:getBearerToken(_)}}),{data:T}=await C.post("/api/did/refreshSession");return T}function createRequest$1({getSessionToken:_,setSessionToken:C,removeSessionToken:T,getRefreshToken:I,setRefreshToken:M,removeRefreshToken:D,onRefreshTokenError:L,onRefreshTokenSuccess:B},N,F){let V=null;const U=createAxios$1({timeout:30*1e3,...N},F);return U.interceptors.request.use(async H=>{if(!api$2.get(constant$2.SESSION_TOKEN_STORAGE_KEY)){const G=_(H);G&&(H.headers.authorization=getBearerToken(G))}return V&&await V,H},H=>Promise.reject(H)),U.interceptors.response.use(H=>{var G;return(G=H.config)!=null&&G.secure?verifyResponse(H,()=>{T(),D()}):H},async H=>{var Z;const G=H.config;if(G&&(G.headers=G!=null&&G.headers?{...G.headers}:{},((Z=H==null?void 0:H.response)==null?void 0:Z.status)===401&&!G._retry)){G._retry=!0;try{V||(V=renewRefreshToken$1(I()));const Y=await V;return C(Y.nextToken),M(Y.nextRefreshToken),typeof B=="function"&&B(Y),U(G)}catch(Y){return T(),D(),typeof L=="function"&&L(Y),Promise.reject(H)}finally{V=null}}return Promise.reject(H)}),U}var __defProp$5=Object.defineProperty,__defNormalProp=(_,C,T)=>C in _?__defProp$5(_,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):_[C]=T,__publicField=(_,C,T)=>(__defNormalProp(_,typeof C!="symbol"?C+"":C,T),T);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet"),__publicField(this,"federated");const C=new TokenService,T=createRequest$1({getSessionToken:C.getSessionToken,setSessionToken:C.setSessionToken,removeSessionToken:C.removeSessionToken,getRefreshToken:C.getRefreshToken,setRefreshToken:C.setRefreshToken,removeRefreshToken:C.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constant$2.WELLKNOWN_SERVICE_PATH_PREFIX}),I=new BlockletService;this.user=new AuthService({api:T}),this.federated=new FederatedService({api:T,blocklet:I}),this.userSession=new UserSessionService({api:T,blocklet:I}),this.token=C,this.blocklet=I,this.api=T}}function createAxios$2(_={},C={}){const T=new TokenService;return createRequest$1({getSessionToken:T.getSessionToken,setSessionToken:T.setSessionToken,removeSessionToken:T.removeSessionToken,getRefreshToken:T.getRefreshToken,setRefreshToken:T.setRefreshToken,removeRefreshToken:T.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},_,C)}const getBlockletSDK=(()=>{let _;return()=>(_||(_=new BlockletSDK),_)})();var lib$3={},dsbridge={};Object.defineProperty(dsbridge,"__esModule",{value:!0});dsbridge.default=void 0;var bridge={call:function _(C,T,I){var M="";typeof T=="function"&&(I=T,T={});var D={data:T===void 0?null:T};if(typeof I=="function"){var L="dscb"+window.dscb++;window[L]=I,D._dscbstub=L}return D=JSON.stringify(D),window._dsbridge?M=_dsbridge.call(C,D):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(M=prompt("_dsbridge="+C,D)),JSON.parse(M||"{}").data},register:function _(C,T,I){var M=I?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){bridge.call("_dsb.dsinit")},0)),typeof T=="object"?M._obs[C]=T:M[C]=T},registerAsyn:function _(C,T){this.register(C,T,!0)},hasNativeMethod:function _(C,T){return this.call("_dsb.hasNativeMethod",{name:C,type:T||"all"})},disableJavascriptDialogBlock:function _(C){this.call("_dsb.disableJavascriptDialogBlock",{disable:C!==!1})},canUseBridge(){return!!(window._dsbridge||window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)}};(function(){if(!bridge.canUseBridge()||window._dsf)return;const _=window.close;var C={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:bridge,close:function(){bridge.call("_dsb.closePage"),_()},_handleMessageFromNative:function(M){var D=JSON.parse(M.data),L={id:M.callbackId,complete:!0},B=this._dsf[M.method],N=this._dsaf[M.method],F=function(oe,ae){L.data=oe.apply(ae,D),bridge.call("_dsb.returnValue",L)},V=function(oe,ae){D.push(function(le,he){L.data=le,L.complete=he!==!1,bridge.call("_dsb.returnValue",L)}),oe.apply(ae,D)};if(B)F(B,this._dsf);else if(N)V(N,this._dsaf);else{var U=M.method.split(".");if(U.length<2)return;var H=U.pop(),G=U.join("."),Z=this._dsf._obs,Y=Z[G]||{},J=Y[H];if(J&&typeof J=="function"){F(J,Y);return}if(Z=this._dsaf._obs,Y=Z[G]||{},J=Y[H],J&&typeof J=="function"){V(J,Y);return}}}};for(var T in C)window[T]=C[T];bridge.register("_hasJavascriptMethod",function(I,M){var D=I.split(".");if(D.length<2)return!!(_dsf[D]||_dsaf[D]);var I=D.pop(),L=D.join("."),B=_dsf._obs[L]||_dsaf._obs[L];return B&&!!B[I]})})();dsbridge.default=bridge;Object.defineProperty(lib$3,"__esModule",{value:!0});var default_1$r=lib$3.default=void 0,_dsbridge$1=_interopRequireDefault$u(dsbridge);function _interopRequireDefault$u(_){return _&&_.__esModule?_:{default:_}}default_1$r=lib$3.default={register(){_dsbridge$1.default.canUseBridge()?_dsbridge$1.default.register(...arguments):console.warn("dsbridge is not available")},registerAsyn(){_dsbridge$1.default.canUseBridge()?_dsbridge$1.default.registerAsyn(...arguments):console.warn("dsbridge is not available")},call(){_dsbridge$1.default.call(...arguments)},asyncCall(){for(var _=arguments.length,C=new Array(_),T=0;T<_;T++)C[T]=arguments[T];return new Promise((I,M)=>{_dsbridge$1.default.call(...C,D=>{try{const L=JSON.parse(D);if(L.code===0){const B=JSON.parse(L.data);I(B)}else M(new Error(L.error))}catch{I(D)}})})},shareMessage(_){const{content:C,imgUrl:T,success:I,fail:M}=_;if(!C&&!T){M("params error");return}_dsbridge$1.default.call("arcShare",JSON.stringify({content:C,imgUrl:T}),D=>{const L=JSON.parse(D);L&&L.code===0?typeof I=="function"&&I(D):typeof M=="function"&&M(D)})},showLoading(){_dsbridge$1.default.call("arcShowLoading")},hideLoading(){_dsbridge$1.default.call("arcHideLoading")},showToast(_){_&&typeof _=="string"&&_dsbridge$1.default.call("arcToast",_)},chooseImgs(_){const{limit:C,success:T,fail:I}=_;_dsbridge$1.default.call("arcChooseImgs",JSON.stringify({limit:C}),M=>{const D=JSON.parse(M);D&&D.code===0?typeof T=="function"&&T(M):typeof I=="function"&&I(M)})},previewImgs(_){const{imgs:C}=_;!C||C.length===0||_dsbridge$1.default.call("arcPreviewImgs",JSON.stringify(_))},isSetPWD(_){const{success:C,fail:T}=_;_dsbridge$1.default.call("arcIsSetPWD","",I=>{const M=JSON.parse(I);M&&M.code===0?typeof C=="function"&&C(I):typeof T=="function"&&T(I)})},isCodeABOk(_){const{success:C,fail:T}=_;_dsbridge$1.default.call("arcIsCodeABOk","",I=>{const M=JSON.parse(I);M&&M.code===0?typeof C=="function"&&C(I):typeof T=="function"&&T(I)})}};class CookieStorageEngine{constructor(C,T){this.storageKey=C,this.options=T||{}}setToken(C){return Cookie.set(this.storageKey,C,{...getCookieOptions(this.options)})}getToken(){return Cookie.get(this.storageKey)}removeToken(){return Cookie.remove(this.storageKey,getCookieOptions(this.options))}}function e$2(_){this.message=_}e$2.prototype=new Error,e$2.prototype.name="InvalidCharacterError";var r$3=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(_){var C=String(_).replace(/=+$/,"");if(C.length%4==1)throw new e$2("'atob' failed: The string to be decoded is not correctly encoded.");for(var T,I,M=0,D=0,L="";I=C.charAt(D++);~I&&(T=M%4?64*T+I:I,M++%4)?L+=String.fromCharCode(255&T>>(-2*M&6)):0)I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(I);return L};function t$6(_){var C=_.replace(/-/g,"+").replace(/_/g,"/");switch(C.length%4){case 0:break;case 2:C+="==";break;case 3:C+="=";break;default:throw"Illegal base64url string!"}try{return function(T){return decodeURIComponent(r$3(T).replace(/(.)/g,function(I,M){var D=M.charCodeAt(0).toString(16).toUpperCase();return D.length<2&&(D="0"+D),"%"+D}))}(C)}catch{return r$3(C)}}function n$2(_){this.message=_}function o$1(_,C){if(typeof _!="string")throw new n$2("Invalid token specified");var T=(C=C||{}).header===!0?0:1;try{return JSON.parse(t$6(_.split(".")[T]))}catch(I){throw new n$2("Invalid token specified: "+I.message)}}n$2.prototype=new Error,n$2.prototype.name="InvalidTokenError";class LocalStorageEngine{constructor(C){this.storageKey=C}setToken(C){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.setItem(this.storageKey,C)}getToken(){if(typeof window>"u"||typeof window.localStorage>"u")return;const C=localStorage.getItem(this.storageKey);let T,I;try{if({value:T,exp:I}=JSON.parse(C),I===void 0||T===void 0)return C}catch{T=C}try{I=o$1(T).exp}catch{return}if(!(new Date().getTime()>I*1e3))return T}removeToken(){if(!(typeof window>"u"||typeof window.localStorage>"u"))return localStorage.removeItem(this.storageKey)}}function createStorage(_="did.auth.token",C="ls",T={}){if(!_)throw new Error("storageKey must be specified to create a storage");let I=null;if(C==="ls")I=new LocalStorageEngine(_);else if(C==="cookie")I=new CookieStorageEngine(_,T);else throw new Error("storageEngine must be ls or cookie");return{getToken:I.getToken.bind(I),setToken:I.setToken.bind(I),removeToken:I.removeToken.bind(I),engine:C,key:_}}const overheadLength=tweetnacl.box.publicKeyLength+tweetnacl.box.overheadLength,ERROR_MSG_INPUT="Input must be an string, Buffer or Uint8Array";function normalizeInput(_){let C;if(_ instanceof Uint8Array)C=_;else if(typeof _=="string")C=new TextEncoder().encode(_);else throw new Error(ERROR_MSG_INPUT);return C}function toHex(_){return Array.prototype.map.call(_,function(C){return(C<16?"0":"")+C.toString(16)}).join("")}function uint32ToHex(_){return(4294967296+_).toString(16).substring(1)}function debugPrint(_,C,T){let I=`
250
250
  `+_+" = ";for(let M=0;M<C.length;M+=2){if(T===32)I+=uint32ToHex(C[M]).toUpperCase(),I+=" ",I+=uint32ToHex(C[M+1]).toUpperCase();else if(T===64)I+=uint32ToHex(C[M+1]).toUpperCase(),I+=uint32ToHex(C[M]).toUpperCase();else throw new Error("Invalid size "+T);M%6===4?I+=`
251
251
  `+new Array(_.length+4).join(" "):M<C.length-2&&(I+=" ")}console.log(I)}function testSpeed(_,C,T){let I=new Date().getTime();const M=new Uint8Array(C);for(let L=0;L<C;L++)M[L]=L%256;const D=new Date().getTime();console.log("Generated random input in "+(D-I)+"ms"),I=D;for(let L=0;L<T;L++){const B=_(M),N=new Date().getTime(),F=N-I;I=N,console.log("Hashed in "+F+"ms: "+B.substring(0,20)+"..."),console.log(Math.round(C/(1<<20)/(F/1e3)*100)/100+" MB PER SECOND")}}var util$6={normalizeInput,toHex,debugPrint,testSpeed};const util$5=util$6;function ADD64AA(_,C,T){const I=_[C]+_[T];let M=_[C+1]+_[T+1];I>=4294967296&&M++,_[C]=I,_[C+1]=M}function ADD64AC(_,C,T,I){let M=_[C]+T;T<0&&(M+=4294967296);let D=_[C+1]+I;M>=4294967296&&D++,_[C]=M,_[C+1]=D}function B2B_GET32(_,C){return _[C]^_[C+1]<<8^_[C+2]<<16^_[C+3]<<24}function B2B_G(_,C,T,I,M,D){const L=m$2[M],B=m$2[M+1],N=m$2[D],F=m$2[D+1];ADD64AA(v$3,_,C),ADD64AC(v$3,_,L,B);let V=v$3[I]^v$3[_],U=v$3[I+1]^v$3[_+1];v$3[I]=U,v$3[I+1]=V,ADD64AA(v$3,T,I),V=v$3[C]^v$3[T],U=v$3[C+1]^v$3[T+1],v$3[C]=V>>>24^U<<8,v$3[C+1]=U>>>24^V<<8,ADD64AA(v$3,_,C),ADD64AC(v$3,_,N,F),V=v$3[I]^v$3[_],U=v$3[I+1]^v$3[_+1],v$3[I]=V>>>16^U<<16,v$3[I+1]=U>>>16^V<<16,ADD64AA(v$3,T,I),V=v$3[C]^v$3[T],U=v$3[C+1]^v$3[T+1],v$3[C]=U>>>31^V<<1,v$3[C+1]=V>>>31^U<<1}const BLAKE2B_IV32=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),SIGMA8=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],SIGMA82=new Uint8Array(SIGMA8.map(function(_){return _*2})),v$3=new Uint32Array(32),m$2=new Uint32Array(32);function blake2bCompress(_,C){let T=0;for(T=0;T<16;T++)v$3[T]=_.h[T],v$3[T+16]=BLAKE2B_IV32[T];for(v$3[24]=v$3[24]^_.t,v$3[25]=v$3[25]^_.t/4294967296,C&&(v$3[28]=~v$3[28],v$3[29]=~v$3[29]),T=0;T<32;T++)m$2[T]=B2B_GET32(_.b,4*T);for(T=0;T<12;T++)B2B_G(0,8,16,24,SIGMA82[T*16+0],SIGMA82[T*16+1]),B2B_G(2,10,18,26,SIGMA82[T*16+2],SIGMA82[T*16+3]),B2B_G(4,12,20,28,SIGMA82[T*16+4],SIGMA82[T*16+5]),B2B_G(6,14,22,30,SIGMA82[T*16+6],SIGMA82[T*16+7]),B2B_G(0,10,20,30,SIGMA82[T*16+8],SIGMA82[T*16+9]),B2B_G(2,12,22,24,SIGMA82[T*16+10],SIGMA82[T*16+11]),B2B_G(4,14,16,26,SIGMA82[T*16+12],SIGMA82[T*16+13]),B2B_G(6,8,18,28,SIGMA82[T*16+14],SIGMA82[T*16+15]);for(T=0;T<16;T++)_.h[T]=_.h[T]^v$3[T]^v$3[T+16]}const parameterBlock=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function blake2bInit(_,C,T,I){if(_===0||_>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(C&&C.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(T&&T.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(I&&I.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const M={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:_};parameterBlock.fill(0),parameterBlock[0]=_,C&&(parameterBlock[1]=C.length),parameterBlock[2]=1,parameterBlock[3]=1,T&&parameterBlock.set(T,32),I&&parameterBlock.set(I,48);for(let D=0;D<16;D++)M.h[D]=BLAKE2B_IV32[D]^B2B_GET32(parameterBlock,D*4);return C&&(blake2bUpdate(M,C),M.c=128),M}function blake2bUpdate(_,C){for(let T=0;T<C.length;T++)_.c===128&&(_.t+=_.c,blake2bCompress(_,!1),_.c=0),_.b[_.c++]=C[T]}function blake2bFinal(_){for(_.t+=_.c;_.c<128;)_.b[_.c++]=0;blake2bCompress(_,!0);const C=new Uint8Array(_.outlen);for(let T=0;T<_.outlen;T++)C[T]=_.h[T>>2]>>8*(T&3);return C}function blake2b(_,C,T,I,M){T=T||64,_=util$5.normalizeInput(_),I&&(I=util$5.normalizeInput(I)),M&&(M=util$5.normalizeInput(M));const D=blake2bInit(T,C,I,M);return blake2bUpdate(D,_),blake2bFinal(D)}function blake2bHex(_,C,T,I,M){const D=blake2b(_,C,T,I,M);return util$5.toHex(D)}var blake2b_1={blake2b,blake2bHex,blake2bInit,blake2bUpdate,blake2bFinal};const blake=getDefaultExportFromCjs(blake2b_1);function nonce(_,C){var T=blake.blake2bInit(tweetnacl.box.nonceLength,null);return blake.blake2bUpdate(T,_),blake.blake2bUpdate(T,C),blake.blake2bFinal(T)}function zero$2(_){for(var C=0;C<_.length;C++)_[C]=0}function seal$1(_,C){var T=new Uint8Array(overheadLength+_.length),I=tweetnacl.box.keyPair();T.set(I.publicKey);var M=nonce(I.publicKey,C),D=tweetnacl.box(_,M,C,I.secretKey);return T.set(D,I.publicKey.length),zero$2(I.secretKey),T}function open(_,C,T){var I=_.subarray(0,tweetnacl.box.publicKeyLength),M=nonce(I,C),D=_.subarray(tweetnacl.box.publicKeyLength);return tweetnacl.box.open(D,M,I,T)}const SealedBox={seal:seal$1,open};class CustomError extends Error{}function getSafeUrl(_,{throwOnError:C=!0,returnRaw:T=!1,allowProtocols:I=["https:","http:"],allowDomains:M=void 0}={}){var D;M===void 0&&(M=((D=window.blocklet)==null?void 0:D.domainAliases)||[],M.push(window.location.href));try{let L;_.startsWith("/")?L=window.location.origin:_.startsWith("./")&&(L=window.location.href);const B=new URL(_,L),N=M&&M.map(F=>{try{return new URL(F).hostname}catch{return new URL(`https://${F}`).hostname}});if(I!==null&&!I.includes(B.protocol)){if(console.error(`Invalid protocol: ${B.protocol}`),C)throw new CustomError(`Invalid protocol: ${B.protocol}`);return null}if(N!==null&&!N.includes(B.hostname)){if(console.error(`Invalid host: ${B.hostname}`),C)throw new CustomError(`Invalid host: ${B.hostname}`);return null}return T?_:B.href}catch(L){if(L instanceof CustomError){if(C)throw L;return null}if(console.error(`Failed to convert url: ${_}`),C)throw new Error(`Failed to convert url: ${_}`);return null}}const LogLevels={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},LogTypes={silent:{level:-1},fatal:{level:LogLevels.fatal},error:{level:LogLevels.error},warn:{level:LogLevels.warn},log:{level:LogLevels.log},info:{level:LogLevels.info},success:{level:LogLevels.success},fail:{level:LogLevels.fail},ready:{level:LogLevels.info},start:{level:LogLevels.info},box:{level:LogLevels.info},debug:{level:LogLevels.debug},trace:{level:LogLevels.trace},verbose:{level:LogLevels.verbose}};function isObject$j(_){return _!==null&&typeof _=="object"}function _defu(_,C,T=".",I){if(!isObject$j(C))return _defu(_,{},T);const M=Object.assign({},C);for(const D in _){if(D==="__proto__"||D==="constructor")continue;const L=_[D];L!=null&&(Array.isArray(L)&&Array.isArray(M[D])?M[D]=[...L,...M[D]]:isObject$j(L)&&isObject$j(M[D])?M[D]=_defu(L,M[D],(T?`${T}.`:"")+D.toString()):M[D]=L)}return M}function createDefu(_){return(...C)=>C.reduce((T,I)=>_defu(T,I,""),{})}const defu=createDefu();function isPlainObject$2(_){return Object.prototype.toString.call(_)==="[object Object]"}function isLogObj(_){return!(!isPlainObject$2(_)||!_.message&&!_.args||_.stack)}let paused=!1;const queue$1=[];class Consola{constructor(C={}){const T=C.types||LogTypes;this.options=defu({...C,defaults:{...C.defaults},level:_normalizeLogLevel(C.level,T),reporters:[...C.reporters||[]]},{types:LogTypes,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const I in T){const M={type:I,...this.options.defaults,...T[I]};this[I]=this._wrapLogFn(M),this[I].raw=this._wrapLogFn(M,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(C){this.options.level=_normalizeLogLevel(C,this.options.types,this.options.level)}prompt(C,T){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(C,T)}create(C){const T=new Consola({...this.options,...C});return this._mockFn&&T.mockTypes(this._mockFn),T}withDefaults(C){return this.create({...this.options,defaults:{...this.options.defaults,...C}})}withTag(C){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+C:C})}addReporter(C){return this.options.reporters.push(C),this}removeReporter(C){if(C){const T=this.options.reporters.indexOf(C);if(T>=0)return this.options.reporters.splice(T,1)}else this.options.reporters.splice(0);return this}setReporters(C){return this.options.reporters=Array.isArray(C)?C:[C],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const C in this.options.types)console["__"+C]||(console["__"+C]=console[C]),console[C]=this[C].raw}restoreConsole(){for(const C in this.options.types)console["__"+C]&&(console[C]=console["__"+C],delete console["__"+C])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(C,T){C&&(C.__write||(C.__write=C.write),C.write=I=>{this[T].raw(String(I).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(C){C&&C.__write&&(C.write=C.__write,delete C.__write)}pauseLogs(){paused=!0}resumeLogs(){paused=!1;const C=queue$1.splice(0);for(const T of C)T[0]._logFn(T[1],T[2])}mockTypes(C){const T=C||this.options.mockFn;if(this._mockFn=T,typeof T=="function")for(const I in this.options.types)this[I]=T(I,this.options.types[I])||this[I],this[I].raw=this[I]}_wrapLogFn(C,T){return(...I)=>{if(paused){queue$1.push([this,C,I,T]);return}return this._logFn(C,I,T)}}_logFn(C,T,I){if((C.level||0)>this.level)return!1;const M={date:new Date,args:[],...C,level:_normalizeLogLevel(C.level,this.options.types)};!I&&T.length===1&&isLogObj(T[0])?Object.assign(M,T[0]):M.args=[...T],M.message&&(M.args.unshift(M.message),delete M.message),M.additional&&(Array.isArray(M.additional)||(M.additional=M.additional.split(`
252
252
  `)),M.args.push(`