@seams/wallet 0.24.0 → 0.27.0

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 (543) hide show
  1. package/dist/.build-inputs.sha256 +1 -1
  2. package/dist/esm/SeamsWeb/operations/tempo/executeEvmFamilyTransaction.js +1 -0
  3. package/dist/esm/SeamsWeb/publicApi/near.js +22 -11
  4. package/dist/esm/SeamsWeb/walletIframe/client/evmFamilyCommands.js +1 -0
  5. package/dist/esm/SeamsWeb/walletIframe/client/nearCommands.js +9 -10
  6. package/dist/esm/SeamsWeb/walletIframe/client/overlay/overlay-styles.js +73 -39
  7. package/dist/esm/SeamsWeb/walletIframe/client/router.js +61 -38
  8. package/dist/esm/SeamsWeb/walletIframe/host/auth-menu/domain.js +1 -0
  9. package/dist/esm/SeamsWeb/walletIframe/host/surface-measurement-reporter.js +1 -0
  10. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +1 -1
  11. package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +28 -0
  12. package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +6 -0
  13. package/dist/esm/core/indexedDB/seamsWalletDB/repositories.js +8 -1
  14. package/dist/esm/core/rpcClients/near/NearClient.js +7 -0
  15. package/dist/esm/core/rpcClients/relayer/walletSessionAuthorizationStatus.js +7 -0
  16. package/dist/esm/core/signingEngine/flows/signNear/signTransactions.js +3 -0
  17. package/dist/esm/core/signingEngine/nearTransactionSubmission.js +89 -0
  18. package/dist/esm/core/signingEngine/uiConfirm/ui/confirm-surface-resize.js +2 -2
  19. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +7 -1
  20. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +123 -14
  21. package/dist/esm/core/ui/messages.js +12 -0
  22. package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonMock.js +5 -7
  23. package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +21 -5
  24. package/dist/esm/react/components/AccountMenuButton/AccountMenuModal.js +66 -0
  25. package/dist/esm/react/components/AccountMenuButton/AccountsSection.css +18 -11
  26. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodRow.js +5 -11
  27. package/dist/esm/react/components/AccountMenuButton/ExportKeysSection.css +17 -15
  28. package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.css +156 -106
  29. package/dist/esm/react/components/AccountMenuButton/MenuItem.css +37 -29
  30. package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.css +53 -21
  31. package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.css +124 -82
  32. package/dist/esm/react/components/AccountMenuButton/UserAccountButton.css +45 -27
  33. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.css +115 -93
  34. package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +179 -92
  35. package/dist/esm/react/components/AccountMenuButton/hooks/useProfileState.js +62 -49
  36. package/dist/esm/react/components/AccountMenuButton/icons/HoverArrowIcon.css +36 -12
  37. package/dist/esm/react/components/AccountMenuButton/icons/HoverArrowIcon.js +10 -2
  38. package/dist/esm/react/components/AccountMenuButton/icons/Icon.css +10 -0
  39. package/dist/esm/react/components/AccountMenuButton/icons/LogOutIcon2.js +15 -16
  40. package/dist/esm/react/components/AccountMenuButton/icons/SpinnerIcon.js +12 -18
  41. package/dist/esm/react/components/AccountMenuButton/icons/TouchIcon.css +3 -3
  42. package/dist/esm/react/components/AccountMenuButton/icons/TouchIcon.js +11 -5
  43. package/dist/esm/react/components/AccountMenuButton/icons/lucideIcon.js +20 -6
  44. package/dist/esm/react/components/AccountMenuButton/index.js +18 -42
  45. package/dist/esm/react/components/ExternalNearWalletIcon.js +32 -0
  46. package/dist/esm/react/components/FingerprintIcon.js +13 -19
  47. package/dist/esm/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.js +13 -2
  48. package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.css +182 -0
  49. package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.js +315 -0
  50. package/dist/esm/react/components/HostedSeamsAuthMenu/shell.js +20 -5
  51. package/dist/esm/react/components/QRCodeIcon.js +37 -43
  52. package/dist/esm/react/components/QRCodeScanner.css +65 -60
  53. package/dist/esm/react/components/ShowQRCode.css +145 -40
  54. package/dist/esm/react/components/ShowQRCode.js +27 -37
  55. package/dist/esm/react/components/externalWalletBrandImages.js +7 -0
  56. package/dist/esm/react/components/theme/Theme.css +67 -0
  57. package/dist/esm/react/components/theme/ThemeProvider.js +6 -6
  58. package/dist/esm/react/externalEvm.js +11 -4
  59. package/dist/esm/react/externalNear.js +15 -10
  60. package/dist/esm/react/externalWalletPicker.css +117 -0
  61. package/dist/esm/react/index.js +3 -2
  62. package/dist/esm/react/styles/styles.css +2148 -550
  63. package/dist/esm/react/styles.css +7 -1
  64. package/dist/esm/react/transactionReview/TransactionReviewHost.js +3 -0
  65. package/dist/esm/react/transactionReview/boundCalls.js +31 -26
  66. package/dist/esm/sdk/{ConfirmationDrawer-CTaGM1AE.js → ConfirmationDrawer-AZruQmhP.js} +1 -1
  67. package/dist/esm/sdk/NonceCoordinator-3YhmDTS5.js +1 -0
  68. package/dist/{public/sdk/SeamsWordmark-CFpsGoLw.js → esm/sdk/SeamsWordmark-DwvPx2UA.js} +1 -1
  69. package/dist/esm/sdk/accountLifecycle-6DHYWf0v.js +1 -0
  70. package/dist/esm/sdk/actions-DrtSTGus.js +1 -0
  71. package/dist/esm/sdk/activeWalletSession-BJ4B-nJo.js +1 -0
  72. package/dist/esm/sdk/adapters-d9yh1bdC.js +1 -0
  73. package/dist/esm/sdk/appearance-DL7c6bML.js +1 -0
  74. package/dist/esm/sdk/appearance-token-vars-BJydfWT_.js +1 -0
  75. package/dist/esm/sdk/canonicalPrimitives-Jd3i_Ngz.js +1 -0
  76. package/dist/esm/sdk/chains-B72I4PDH.js +1 -0
  77. package/dist/esm/sdk/challengeDelivery-Dj9HrjW9.js +1 -0
  78. package/dist/esm/sdk/clientSessionPersistenceState-BCkJAYSz.js +1 -0
  79. package/dist/esm/sdk/{collectAuthenticationCredentialForChallengeB64u-kLIxmw3V.js → collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js} +1 -1
  80. package/dist/esm/sdk/{commitQueue-Bs23Rs57.js → commitQueue-CYruPlkm.js} +1 -1
  81. package/dist/esm/sdk/configBuilder-CSwJrmcR.js +1 -0
  82. package/dist/esm/sdk/configuration-DBEc3bsj.js +1 -0
  83. package/dist/esm/sdk/confirm-ui-nU6ymgiv.js +2 -0
  84. package/dist/esm/sdk/confirmTypes-BvVtQs-M.js +1 -0
  85. package/dist/esm/sdk/device-linking-DiCNt3iA.js +1 -0
  86. package/dist/esm/sdk/deviceLinkApproval-CfEiotVt.js +2 -0
  87. package/dist/esm/sdk/digestEncoding-CqNXPZY9.js +1 -0
  88. package/dist/esm/sdk/{chains-gV2K9gA4.js → digests-BIaE0DMd.js} +1 -1
  89. package/dist/esm/sdk/{display-BXjW58UF.js → display-D0EPmU4w.js} +1 -1
  90. package/dist/esm/sdk/ecdsaCapabilityManifest-DAJEVjlP.js +1 -0
  91. package/dist/esm/sdk/{ecdsaChainTarget-DbLthshF.js → ecdsaChainTarget-Bm5X4k-V.js} +1 -1
  92. package/dist/esm/sdk/ecdsaDerivationClientWasm-AYOJgTJm.js +1 -0
  93. package/dist/esm/sdk/ecdsaDerivationExport-DJKOzDbS.js +1 -0
  94. package/dist/esm/sdk/{ecdsaWalletRecords-BgcXXCZy.js → ecdsaWalletRecords-WLyq414E.js} +1 -1
  95. package/dist/esm/sdk/emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js +1 -0
  96. package/dist/esm/sdk/{enrichDisplayModelWithAbi-CudPUW0T.js → enrichDisplayModelWithAbi-O6Mw4i2E.js} +1 -1
  97. package/dist/esm/sdk/errors-BJBDbwHk.js +1 -0
  98. package/dist/esm/sdk/{evmCryptoWasm-DacbCVNM.js → evmCryptoWasm-BUPb4hBH.js} +1 -1
  99. package/dist/esm/sdk/{export-viewer-host-DsWOvc0t.js → export-viewer-host-BtrKVXxu.js} +1 -1
  100. package/dist/esm/sdk/exportKeypairOperation-CGE9ZU1m.js +1 -0
  101. package/dist/esm/sdk/helpers-Dubwo5uK.js +1 -0
  102. package/dist/esm/sdk/host-DayrOrgm.js +1 -0
  103. package/dist/esm/sdk/icons-BlMXolHv.js +1 -0
  104. package/dist/esm/sdk/indexedDB-C4SDsyOG.js +1 -0
  105. package/dist/esm/sdk/intentDigest-HvRsBQ1z.js +1 -0
  106. package/dist/esm/sdk/keyMaterialEnvelope-Dm2ZEilb.js +1 -0
  107. package/dist/esm/sdk/{lanes-C7OvAK_L.js → lanes-BU-fGqY4.js} +1 -1
  108. package/dist/esm/sdk/localOnly-BATWJj78.js +1 -0
  109. package/dist/{public/sdk/mountExportPrivateKeySurface-CV1KrFWg.js → esm/sdk/mountExportPrivateKeySurface-CyHU8bVc.js} +1 -1
  110. package/dist/esm/sdk/{mountRecoveryCodeBackupSurface-CVXU1zzl.js → mountRecoveryCodeBackupSurface-C7aglQxf.js} +1 -1
  111. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-BfXmy3Jr.js +1 -0
  112. package/dist/esm/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js +1 -0
  113. package/dist/esm/sdk/nearRpcResults-CeHdqaS4.js +1 -0
  114. package/dist/esm/sdk/{nonceLaneKeys-BS4fek17.js → nonceLaneKeys-BF_UpvIy.js} +1 -1
  115. package/dist/esm/sdk/{normalization-BN-2VWZf.js → normalization-Df9fZWJC.js} +1 -1
  116. package/dist/esm/sdk/operationFingerprint-Bas59T7L.js +1 -0
  117. package/dist/esm/sdk/participants-BXdREC5k.js +1 -0
  118. package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-lr1oISjL.js → esm/sdk/pendingWalletRecoveryCodeBackup-Cjx-X-pP.js} +1 -1
  119. package/dist/esm/sdk/presignaturePool-BbvqRWYw.js +1 -0
  120. package/dist/{public/sdk/presignatures-B9GrGx0L.js → esm/sdk/presignatures-BCeq56DG.js} +1 -1
  121. package/dist/esm/sdk/recovery-entrypoint-DJbMDC_m.js +1 -0
  122. package/dist/esm/sdk/recoveryAuthorization-CQsjb8Tm.js +1 -0
  123. package/dist/esm/sdk/registration-CNLUYN-p.js +1 -0
  124. package/dist/esm/sdk/registration-HSwOHZOo.js +1 -0
  125. package/dist/esm/sdk/{registrationAccounts-BHikxS5q.js → registrationAccounts-4r74gX1l.js} +1 -1
  126. package/dist/esm/sdk/registrationIntent-Do1tD1V7.js +1 -0
  127. package/dist/esm/sdk/registrationSignerPlan-DK2b3N_p.js +1 -0
  128. package/dist/esm/sdk/requireStepUpAuth-COqCGb1i.js +1 -0
  129. package/dist/esm/sdk/resealedEnvelopeResult-B1p5UkYg.js +1 -0
  130. package/dist/esm/sdk/routerAbNormalSigning-D-UZmCBS.js +1 -0
  131. package/dist/esm/sdk/runtime-auth-BCoj7_-G.js +1 -0
  132. package/dist/esm/sdk/runtime-device-link-DAsq5tGT.js +1 -0
  133. package/dist/esm/sdk/runtime-ecdsa-tempo-CVh_Vwl6.js +1 -0
  134. package/dist/esm/sdk/runtime-email-otp-BxSKK9AG.js +1 -0
  135. package/dist/esm/sdk/runtime-export-BWnQXMzT.js +1 -0
  136. package/dist/esm/sdk/runtime-near-CuzPZrDS.js +1 -0
  137. package/dist/esm/sdk/runtime-preferences-B-nDWlm3.js +1 -0
  138. package/dist/esm/sdk/runtime-recovery-DpOdEJ8N.js +1 -0
  139. package/dist/esm/sdk/runtime-recovery-codes-DeUjQsxZ.js +1 -0
  140. package/dist/esm/sdk/runtimeContext-5JcewRo3.js +6 -0
  141. package/dist/esm/sdk/secp256k1-CE7-q9Sn.js +1 -0
  142. package/dist/esm/sdk/sessionObservationRevision-JOvVF4Hf.js +1 -0
  143. package/dist/esm/sdk/signEvmFamily-BY5jlZEG.js +1 -0
  144. package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-BMfC2sc2.js → signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js} +1 -1
  145. package/dist/esm/sdk/{signEvmWithUiConfirm-BNkupz3z.js → signEvmWithUiConfirm-CGrLtMV6.js} +1 -1
  146. package/dist/esm/sdk/signNear-DMpJFkwF.js +1 -0
  147. package/dist/esm/sdk/{signatureUses-DrqCoN12.js → signatureUses-kSrUHSSH.js} +1 -1
  148. package/dist/esm/sdk/signerSlot-D2RZnb27.js +1 -0
  149. package/dist/esm/sdk/{signingFlow-BVvteILM.js → signingFlow-BcetvUeS.js} +2 -2
  150. package/dist/esm/sdk/signingQueue-dMFOFOP5.js +1 -0
  151. package/dist/esm/sdk/surface-measurement-reporter-DXsvq401.js +1 -0
  152. package/dist/esm/sdk/thresholdEcdsa-CqR1fFA-.js +1 -0
  153. package/dist/esm/sdk/{trace-CGNqO1FV.js → trace--mRP2OQc.js} +1 -1
  154. package/dist/esm/sdk/{transaction-activity-DPq9RTh5.js → transaction-activity-DCzHGg3b.js} +1 -1
  155. package/dist/esm/sdk/transactionReview-CGIlI835.js +1 -0
  156. package/dist/esm/sdk/{transactionReviewAdmission--8tDis7M.js → transactionReviewAdmission-Cf_qUZJt.js} +1 -1
  157. package/dist/{public/sdk/transactionState-BS1VLT7B.js → esm/sdk/transactionState-29T9xfvL.js} +1 -1
  158. package/dist/esm/sdk/tx-confirm-ui.js +173 -18
  159. package/dist/esm/sdk/{types-DdzuHlAQ.js → types-f7dyj5N6.js} +1 -1
  160. package/dist/esm/sdk/unlockedEd25519ExportRootCapability-yzxQjIFd.js +1 -0
  161. package/dist/esm/sdk/voiceid-host.js +1 -1
  162. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  163. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  164. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  165. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  166. package/dist/esm/sdk/wallet-recovery-BZB2Vu3X.js +1 -0
  167. package/dist/esm/sdk/wallet-ui.css +1 -1
  168. package/dist/esm/sdk/walletAuthMethodRecord-DLBB5fez.js +1 -0
  169. package/dist/esm/sdk/walletAuthority-BTGAuOi8.js +1 -0
  170. package/dist/esm/sdk/walletCapabilityBindings-D5YYB7nN.js +1 -0
  171. package/dist/esm/sdk/walletCustodyEcdsaContinuity-C31YQ9av.js +1 -0
  172. package/dist/esm/sdk/walletCustodyOperation-DimzAbCB.js +1 -0
  173. package/dist/esm/sdk/walletDbName-Ca0rCq5r.js +1 -0
  174. package/dist/esm/sdk/walletOwnershipGeneration-CgjCtPrV.js +1 -0
  175. package/dist/esm/sdk/walletRecoveryAdminProof-CvSYbyg5.js +1 -0
  176. package/dist/esm/sdk/walletRecoveryCommit-Cc2LAkCS.js +1 -0
  177. package/dist/esm/sdk/walletRegistrationSetupPrewarm-CEvGKQSg.js +1 -0
  178. package/dist/esm/sdk/{walletSessionAuthorizationProjection-BJgnZaBc.js → walletSessionAuthorizationProjection-BzUH6gHV.js} +1 -1
  179. package/dist/esm/sdk/walletSessionAuthorizationStatus-DG7DPcgR.js +1 -0
  180. package/dist/esm/sdk/{walletSessionAuthorizationStore-zkxcMdSp.js → walletSessionAuthorizationStore-B9Vwkshr.js} +1 -1
  181. package/dist/esm/sdk/warmSessionHydration-B-A5Tdx7.js +1 -0
  182. package/dist/{public/sdk/webauthnP256-BvTL8nq4.js → esm/sdk/webauthnP256-BsQQPurm.js} +1 -1
  183. package/dist/esm/shared-ts/src/near/nearClient.js +1 -1
  184. package/dist/esm/shared-ts/src/utils/errors.js +56 -3
  185. package/dist/esm/shared-ts/src/utils/index.js +1 -1
  186. package/dist/esm/voiceid-host.js +1 -1
  187. package/dist/public/headers.manifest.json +1 -1
  188. package/dist/public/sdk/{ConfirmationDrawer-CTaGM1AE.js → ConfirmationDrawer-AZruQmhP.js} +1 -1
  189. package/dist/public/sdk/NonceCoordinator-3YhmDTS5.js +1 -0
  190. package/dist/{esm/sdk/SeamsWordmark-CFpsGoLw.js → public/sdk/SeamsWordmark-DwvPx2UA.js} +1 -1
  191. package/dist/public/sdk/accountLifecycle-6DHYWf0v.js +1 -0
  192. package/dist/public/sdk/actions-DrtSTGus.js +1 -0
  193. package/dist/public/sdk/activeWalletSession-BJ4B-nJo.js +1 -0
  194. package/dist/public/sdk/adapters-d9yh1bdC.js +1 -0
  195. package/dist/public/sdk/appearance-DL7c6bML.js +1 -0
  196. package/dist/public/sdk/appearance-token-vars-BJydfWT_.js +1 -0
  197. package/dist/public/sdk/canonicalPrimitives-Jd3i_Ngz.js +1 -0
  198. package/dist/public/sdk/chains-B72I4PDH.js +1 -0
  199. package/dist/public/sdk/challengeDelivery-Dj9HrjW9.js +1 -0
  200. package/dist/public/sdk/clientSessionPersistenceState-BCkJAYSz.js +1 -0
  201. package/dist/public/sdk/{collectAuthenticationCredentialForChallengeB64u-kLIxmw3V.js → collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js} +1 -1
  202. package/dist/public/sdk/{commitQueue-Bs23Rs57.js → commitQueue-CYruPlkm.js} +1 -1
  203. package/dist/public/sdk/configBuilder-CSwJrmcR.js +1 -0
  204. package/dist/public/sdk/configuration-DBEc3bsj.js +1 -0
  205. package/dist/public/sdk/confirm-ui-nU6ymgiv.js +2 -0
  206. package/dist/public/sdk/confirmTypes-BvVtQs-M.js +1 -0
  207. package/dist/public/sdk/device-linking-DiCNt3iA.js +1 -0
  208. package/dist/public/sdk/deviceLinkApproval-CfEiotVt.js +2 -0
  209. package/dist/public/sdk/digestEncoding-CqNXPZY9.js +1 -0
  210. package/dist/public/sdk/{chains-gV2K9gA4.js → digests-BIaE0DMd.js} +1 -1
  211. package/dist/public/sdk/{display-BXjW58UF.js → display-D0EPmU4w.js} +1 -1
  212. package/dist/public/sdk/ecdsaCapabilityManifest-DAJEVjlP.js +1 -0
  213. package/dist/public/sdk/{ecdsaChainTarget-DbLthshF.js → ecdsaChainTarget-Bm5X4k-V.js} +1 -1
  214. package/dist/public/sdk/ecdsaDerivationClientWasm-AYOJgTJm.js +1 -0
  215. package/dist/public/sdk/ecdsaDerivationExport-DJKOzDbS.js +1 -0
  216. package/dist/public/sdk/{ecdsaWalletRecords-BgcXXCZy.js → ecdsaWalletRecords-WLyq414E.js} +1 -1
  217. package/dist/public/sdk/emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js +1 -0
  218. package/dist/public/sdk/{enrichDisplayModelWithAbi-CudPUW0T.js → enrichDisplayModelWithAbi-O6Mw4i2E.js} +1 -1
  219. package/dist/public/sdk/errors-BJBDbwHk.js +1 -0
  220. package/dist/public/sdk/{evmCryptoWasm-DacbCVNM.js → evmCryptoWasm-BUPb4hBH.js} +1 -1
  221. package/dist/public/sdk/{export-viewer-host-DsWOvc0t.js → export-viewer-host-BtrKVXxu.js} +1 -1
  222. package/dist/public/sdk/exportKeypairOperation-CGE9ZU1m.js +1 -0
  223. package/dist/public/sdk/helpers-Dubwo5uK.js +1 -0
  224. package/dist/public/sdk/host-DayrOrgm.js +1 -0
  225. package/dist/public/sdk/icons-BlMXolHv.js +1 -0
  226. package/dist/public/sdk/indexedDB-C4SDsyOG.js +1 -0
  227. package/dist/public/sdk/intentDigest-HvRsBQ1z.js +1 -0
  228. package/dist/public/sdk/keyMaterialEnvelope-Dm2ZEilb.js +1 -0
  229. package/dist/public/sdk/{lanes-C7OvAK_L.js → lanes-BU-fGqY4.js} +1 -1
  230. package/dist/public/sdk/localOnly-BATWJj78.js +1 -0
  231. package/dist/{esm/sdk/mountExportPrivateKeySurface-CV1KrFWg.js → public/sdk/mountExportPrivateKeySurface-CyHU8bVc.js} +1 -1
  232. package/dist/public/sdk/{mountRecoveryCodeBackupSurface-CVXU1zzl.js → mountRecoveryCodeBackupSurface-C7aglQxf.js} +1 -1
  233. package/dist/public/sdk/nearEd25519YaoMaterialActivation-BfXmy3Jr.js +1 -0
  234. package/dist/public/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js +1 -0
  235. package/dist/public/sdk/nearRpcResults-CeHdqaS4.js +1 -0
  236. package/dist/public/sdk/{nonceLaneKeys-BS4fek17.js → nonceLaneKeys-BF_UpvIy.js} +1 -1
  237. package/dist/public/sdk/{normalization-BN-2VWZf.js → normalization-Df9fZWJC.js} +1 -1
  238. package/dist/public/sdk/operationFingerprint-Bas59T7L.js +1 -0
  239. package/dist/public/sdk/participants-BXdREC5k.js +1 -0
  240. package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-lr1oISjL.js → public/sdk/pendingWalletRecoveryCodeBackup-Cjx-X-pP.js} +1 -1
  241. package/dist/public/sdk/presignaturePool-BbvqRWYw.js +1 -0
  242. package/dist/{esm/sdk/presignatures-B9GrGx0L.js → public/sdk/presignatures-BCeq56DG.js} +1 -1
  243. package/dist/public/sdk/recovery-entrypoint-DJbMDC_m.js +1 -0
  244. package/dist/public/sdk/recoveryAuthorization-CQsjb8Tm.js +1 -0
  245. package/dist/public/sdk/registration-CNLUYN-p.js +1 -0
  246. package/dist/public/sdk/registration-HSwOHZOo.js +1 -0
  247. package/dist/public/sdk/{registrationAccounts-BHikxS5q.js → registrationAccounts-4r74gX1l.js} +1 -1
  248. package/dist/public/sdk/registrationIntent-Do1tD1V7.js +1 -0
  249. package/dist/public/sdk/registrationSignerPlan-DK2b3N_p.js +1 -0
  250. package/dist/public/sdk/requireStepUpAuth-COqCGb1i.js +1 -0
  251. package/dist/public/sdk/resealedEnvelopeResult-B1p5UkYg.js +1 -0
  252. package/dist/public/sdk/routerAbNormalSigning-D-UZmCBS.js +1 -0
  253. package/dist/public/sdk/runtime-auth-BCoj7_-G.js +1 -0
  254. package/dist/public/sdk/runtime-device-link-DAsq5tGT.js +1 -0
  255. package/dist/public/sdk/runtime-ecdsa-tempo-CVh_Vwl6.js +1 -0
  256. package/dist/public/sdk/runtime-email-otp-BxSKK9AG.js +1 -0
  257. package/dist/public/sdk/runtime-export-BWnQXMzT.js +1 -0
  258. package/dist/public/sdk/runtime-near-CuzPZrDS.js +1 -0
  259. package/dist/public/sdk/runtime-preferences-B-nDWlm3.js +1 -0
  260. package/dist/public/sdk/runtime-recovery-DpOdEJ8N.js +1 -0
  261. package/dist/public/sdk/runtime-recovery-codes-DeUjQsxZ.js +1 -0
  262. package/dist/public/sdk/runtimeContext-5JcewRo3.js +6 -0
  263. package/dist/public/sdk/secp256k1-CE7-q9Sn.js +1 -0
  264. package/dist/public/sdk/sessionObservationRevision-JOvVF4Hf.js +1 -0
  265. package/dist/public/sdk/signEvmFamily-BY5jlZEG.js +1 -0
  266. package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-BMfC2sc2.js → signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js} +1 -1
  267. package/dist/public/sdk/{signEvmWithUiConfirm-BNkupz3z.js → signEvmWithUiConfirm-CGrLtMV6.js} +1 -1
  268. package/dist/public/sdk/signNear-DMpJFkwF.js +1 -0
  269. package/dist/public/sdk/{signatureUses-DrqCoN12.js → signatureUses-kSrUHSSH.js} +1 -1
  270. package/dist/public/sdk/signerSlot-D2RZnb27.js +1 -0
  271. package/dist/public/sdk/{signingFlow-BVvteILM.js → signingFlow-BcetvUeS.js} +2 -2
  272. package/dist/public/sdk/signingQueue-dMFOFOP5.js +1 -0
  273. package/dist/public/sdk/surface-measurement-reporter-DXsvq401.js +1 -0
  274. package/dist/public/sdk/thresholdEcdsa-CqR1fFA-.js +1 -0
  275. package/dist/public/sdk/{trace-CGNqO1FV.js → trace--mRP2OQc.js} +1 -1
  276. package/dist/public/sdk/{transaction-activity-DPq9RTh5.js → transaction-activity-DCzHGg3b.js} +1 -1
  277. package/dist/public/sdk/transactionReview-CGIlI835.js +1 -0
  278. package/dist/public/sdk/{transactionReviewAdmission--8tDis7M.js → transactionReviewAdmission-Cf_qUZJt.js} +1 -1
  279. package/dist/{esm/sdk/transactionState-BS1VLT7B.js → public/sdk/transactionState-29T9xfvL.js} +1 -1
  280. package/dist/public/sdk/tx-confirm-ui.js +173 -18
  281. package/dist/public/sdk/{types-DdzuHlAQ.js → types-f7dyj5N6.js} +1 -1
  282. package/dist/public/sdk/unlockedEd25519ExportRootCapability-yzxQjIFd.js +1 -0
  283. package/dist/public/sdk/voiceid-host.js +1 -1
  284. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  285. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  286. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  287. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  288. package/dist/public/sdk/wallet-recovery-BZB2Vu3X.js +1 -0
  289. package/dist/public/sdk/wallet-ui.css +1 -1
  290. package/dist/public/sdk/walletAuthMethodRecord-DLBB5fez.js +1 -0
  291. package/dist/public/sdk/walletAuthority-BTGAuOi8.js +1 -0
  292. package/dist/public/sdk/walletCapabilityBindings-D5YYB7nN.js +1 -0
  293. package/dist/public/sdk/walletCustodyEcdsaContinuity-C31YQ9av.js +1 -0
  294. package/dist/public/sdk/walletCustodyOperation-DimzAbCB.js +1 -0
  295. package/dist/public/sdk/walletDbName-Ca0rCq5r.js +1 -0
  296. package/dist/public/sdk/walletOwnershipGeneration-CgjCtPrV.js +1 -0
  297. package/dist/public/sdk/walletRecoveryAdminProof-CvSYbyg5.js +1 -0
  298. package/dist/public/sdk/walletRecoveryCommit-Cc2LAkCS.js +1 -0
  299. package/dist/public/sdk/walletRegistrationSetupPrewarm-CEvGKQSg.js +1 -0
  300. package/dist/public/sdk/{walletSessionAuthorizationProjection-BJgnZaBc.js → walletSessionAuthorizationProjection-BzUH6gHV.js} +1 -1
  301. package/dist/public/sdk/walletSessionAuthorizationStatus-DG7DPcgR.js +1 -0
  302. package/dist/public/sdk/{walletSessionAuthorizationStore-zkxcMdSp.js → walletSessionAuthorizationStore-B9Vwkshr.js} +1 -1
  303. package/dist/public/sdk/warmSessionHydration-B-A5Tdx7.js +1 -0
  304. package/dist/{esm/sdk/webauthnP256-BvTL8nq4.js → public/sdk/webauthnP256-BsQQPurm.js} +1 -1
  305. package/dist/public/wallet-assets.manifest.json +476 -260
  306. package/dist/public/wallet-service/index.html +4 -4
  307. package/dist/types/shared-ts/src/utils/errors.d.ts +1 -0
  308. package/dist/types/wallet/src/SeamsWeb/operations/authMethods/passkey/exactPasskeyAuthority.d.ts +24 -0
  309. package/dist/types/wallet/src/SeamsWeb/operations/devices/walletHostOwnerAuthority.d.ts +2 -0
  310. package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +3 -0
  311. package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +2 -0
  312. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/WalletHostRuntime.d.ts +1 -0
  313. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createDeviceDomain.d.ts +2 -1
  314. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/deviceLinkApproval.d.ts +27 -0
  315. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.d.ts +1 -0
  316. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +4 -1
  317. package/dist/types/wallet/src/core/authMethods/hostPlugin.d.ts +1 -0
  318. package/dist/types/wallet/src/core/authMethods/plugins.d.ts +4 -0
  319. package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/recoveredEd25519Authority.d.ts +8 -0
  320. package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/repositories.d.ts +1 -0
  321. package/dist/types/wallet/src/core/rpcClients/near/NearClient.d.ts +13 -0
  322. package/dist/types/wallet/src/core/rpcClients/relayer/walletSessionAuthorizationStatus.d.ts +2 -0
  323. package/dist/types/wallet/src/core/signingEngine/nearTransactionSubmission.d.ts +24 -0
  324. package/dist/types/wallet/src/core/signingEngine/session/persistence/walletSessionAuthorizationProjection.d.ts +1 -0
  325. package/dist/types/wallet/src/core/signingEngine/uiConfirm/transactionReviewAdmission.d.ts +2 -0
  326. package/dist/types/wallet/src/core/types/linkDevice.d.ts +4 -5
  327. package/dist/types/wallet/src/core/types/sdkSentEvents.d.ts +2 -0
  328. package/dist/types/wallet/src/core/types/seams.d.ts +15 -3
  329. package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
  330. package/dist/types/wallet/src/index.d.ts +1 -1
  331. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonMock.d.ts +11 -2
  332. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonView.d.ts +2 -1
  333. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuModal.d.ts +9 -0
  334. package/dist/types/wallet/src/react/components/AccountMenuButton/hooks/useProfileState.d.ts +13 -5
  335. package/dist/types/wallet/src/react/components/AccountMenuButton/icons/HoverArrowIcon.d.ts +2 -1
  336. package/dist/types/wallet/src/react/components/AccountMenuButton/icons/lucideIcon.d.ts +1 -1
  337. package/dist/types/wallet/src/react/components/AccountMenuButton/types.d.ts +19 -3
  338. package/dist/types/wallet/src/react/components/ExternalNearWalletIcon.d.ts +5 -0
  339. package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.d.ts +31 -0
  340. package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/types.d.ts +4 -0
  341. package/dist/types/wallet/src/react/components/ShowQRCode.d.ts +1 -1
  342. package/dist/types/wallet/src/react/components/externalWalletBrandImages.d.ts +3 -0
  343. package/dist/types/wallet/src/react/components/theme/design-tokens.d.ts +2 -0
  344. package/dist/types/wallet/src/react/externalNear.d.ts +3 -23
  345. package/dist/types/wallet/src/react/index.d.ts +3 -1
  346. package/dist/types/wallet/src/react/transactionReview/boundCalls.d.ts +7 -0
  347. package/dist/types/wallet/src/voiceid-host.d.ts +1 -1
  348. package/package.json +1 -1
  349. package/dist/esm/react/externalNear.css +0 -90
  350. package/dist/esm/sdk/NonceCoordinator-Bti1HQPo.js +0 -1
  351. package/dist/esm/sdk/accountLifecycle-B98g9zN9.js +0 -1
  352. package/dist/esm/sdk/actions-GYsSR2Q2.js +0 -1
  353. package/dist/esm/sdk/activeWalletSession-H9JBdHyQ.js +0 -1
  354. package/dist/esm/sdk/adapters-D5MZ5NG5.js +0 -2
  355. package/dist/esm/sdk/appearance-DVFno9Tv.js +0 -1
  356. package/dist/esm/sdk/appearance-token-vars-CgYTfCKg.js +0 -1
  357. package/dist/esm/sdk/canonicalPrimitives-B6YMrI3W.js +0 -1
  358. package/dist/esm/sdk/challengeDelivery-FW9gYyr0.js +0 -1
  359. package/dist/esm/sdk/clientSessionPersistenceState-BPYK9PYV.js +0 -1
  360. package/dist/esm/sdk/configBuilder-DrxXNUpV.js +0 -1
  361. package/dist/esm/sdk/configuration-CAqANpTI.js +0 -1
  362. package/dist/esm/sdk/ecdsaCapabilityManifest--FjbES8k.js +0 -1
  363. package/dist/esm/sdk/ecdsaDerivationClientWasm-7Rp4TmYE.js +0 -1
  364. package/dist/esm/sdk/ecdsaDerivationExport-dInN7N6e.js +0 -1
  365. package/dist/esm/sdk/emailOtpEcdsaDerivationIdentity-CIh9IPai.js +0 -1
  366. package/dist/esm/sdk/errors-ADOZT8oV.js +0 -1
  367. package/dist/esm/sdk/exportKeypairOperation-BazJvSov.js +0 -1
  368. package/dist/esm/sdk/helpers-CXqXyyCU.js +0 -1
  369. package/dist/esm/sdk/host-C0Is56lU.js +0 -1
  370. package/dist/esm/sdk/icons-DyndJzSh.js +0 -1
  371. package/dist/esm/sdk/indexedDB-C1odKEC6.js +0 -1
  372. package/dist/esm/sdk/intentDigest-BMXki7yB.js +0 -1
  373. package/dist/esm/sdk/keyMaterialEnvelope-B-Q5KTJC.js +0 -1
  374. package/dist/esm/sdk/localOnly-BB3Rx3J6.js +0 -1
  375. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-D9cdMKIZ.js +0 -1
  376. package/dist/esm/sdk/nearEd25519YaoSigningPreparation-D_Jvj7ht.js +0 -1
  377. package/dist/esm/sdk/operationFingerprint-Bn0lUYlm.js +0 -1
  378. package/dist/esm/sdk/presignaturePool-CultzkOG.js +0 -1
  379. package/dist/esm/sdk/recovery-entrypoint-QBvJBngm.js +0 -1
  380. package/dist/esm/sdk/recoveryAuthorization-DB-zxeHq.js +0 -1
  381. package/dist/esm/sdk/registration-CM5a7WYO.js +0 -1
  382. package/dist/esm/sdk/registration-Hv0xi7-L.js +0 -1
  383. package/dist/esm/sdk/registrationIntent-DTs2SR9E.js +0 -1
  384. package/dist/esm/sdk/registrationSignerPlan-CgbFVsAp.js +0 -1
  385. package/dist/esm/sdk/requireStepUpAuth-B7tC4MrA.js +0 -1
  386. package/dist/esm/sdk/resealedEnvelopeResult--iCVt_Bh.js +0 -1
  387. package/dist/esm/sdk/routerAbNormalSigning-Div3lZWV.js +0 -1
  388. package/dist/esm/sdk/runtime-auth-CVw1KoVD.js +0 -1
  389. package/dist/esm/sdk/runtime-device-link-Dp0YMZTQ.js +0 -1
  390. package/dist/esm/sdk/runtime-ecdsa-tempo-DEIjIgEO.js +0 -1
  391. package/dist/esm/sdk/runtime-email-otp-gsr_FsQn.js +0 -1
  392. package/dist/esm/sdk/runtime-export-upMPrZ4V.js +0 -1
  393. package/dist/esm/sdk/runtime-near-B64Hn3nc.js +0 -1
  394. package/dist/esm/sdk/runtime-preferences-CULdHkbg.js +0 -1
  395. package/dist/esm/sdk/runtime-recovery-D2saBaJy.js +0 -1
  396. package/dist/esm/sdk/runtime-recovery-codes-Bvc0IXMJ.js +0 -1
  397. package/dist/esm/sdk/runtimeContext-CNFJjcns.js +0 -6
  398. package/dist/esm/sdk/secp256k1-BGVlx50C.js +0 -1
  399. package/dist/esm/sdk/sessionObservationRevision-84ZzJ-fC.js +0 -1
  400. package/dist/esm/sdk/signEvmFamily-PjwUc5MT.js +0 -1
  401. package/dist/esm/sdk/signNear-r8VCOoTh.js +0 -1
  402. package/dist/esm/sdk/signerSlot-D4ZOuK7e.js +0 -1
  403. package/dist/esm/sdk/signingQueue-BJzOrwDq.js +0 -1
  404. package/dist/esm/sdk/surface-measurement-reporter-NUm_54LH.js +0 -1
  405. package/dist/esm/sdk/thresholdEcdsa-tnY83qyG.js +0 -1
  406. package/dist/esm/sdk/transactionReview-DSGnpreN.js +0 -1
  407. package/dist/esm/sdk/unlockedEd25519ExportRootCapability-D43rvO9a.js +0 -1
  408. package/dist/esm/sdk/wallet-recovery-BjIQdOha.js +0 -1
  409. package/dist/esm/sdk/walletAuthMethodRecord-yIqCeE-o.js +0 -1
  410. package/dist/esm/sdk/walletCapabilityBindings-CUPk3mVH.js +0 -1
  411. package/dist/esm/sdk/walletCustodyEcdsaContinuity-DlOBCmwb.js +0 -1
  412. package/dist/esm/sdk/walletCustodyOperation-DzPcxEBS.js +0 -1
  413. package/dist/esm/sdk/walletDbName-DDJXrgA5.js +0 -1
  414. package/dist/esm/sdk/walletOwnershipGeneration-DI9ogcXF.js +0 -1
  415. package/dist/esm/sdk/walletRecoveryAdminProof-BJxmg3f7.js +0 -1
  416. package/dist/esm/sdk/walletRecoveryCommit-B7WsdR7y.js +0 -1
  417. package/dist/esm/sdk/walletRegistrationSetupPrewarm-CEJCj78c.js +0 -1
  418. package/dist/esm/sdk/walletSessionAuthorizationStatus-98G3Qji8.js +0 -1
  419. package/dist/esm/sdk/warmSessionHydration-DqZyfi1h.js +0 -1
  420. package/dist/public/sdk/NonceCoordinator-Bti1HQPo.js +0 -1
  421. package/dist/public/sdk/accountLifecycle-B98g9zN9.js +0 -1
  422. package/dist/public/sdk/actions-GYsSR2Q2.js +0 -1
  423. package/dist/public/sdk/activeWalletSession-H9JBdHyQ.js +0 -1
  424. package/dist/public/sdk/adapters-D5MZ5NG5.js +0 -2
  425. package/dist/public/sdk/appearance-DVFno9Tv.js +0 -1
  426. package/dist/public/sdk/appearance-token-vars-CgYTfCKg.js +0 -1
  427. package/dist/public/sdk/canonicalPrimitives-B6YMrI3W.js +0 -1
  428. package/dist/public/sdk/challengeDelivery-FW9gYyr0.js +0 -1
  429. package/dist/public/sdk/clientSessionPersistenceState-BPYK9PYV.js +0 -1
  430. package/dist/public/sdk/configBuilder-DrxXNUpV.js +0 -1
  431. package/dist/public/sdk/configuration-CAqANpTI.js +0 -1
  432. package/dist/public/sdk/ecdsaCapabilityManifest--FjbES8k.js +0 -1
  433. package/dist/public/sdk/ecdsaDerivationClientWasm-7Rp4TmYE.js +0 -1
  434. package/dist/public/sdk/ecdsaDerivationExport-dInN7N6e.js +0 -1
  435. package/dist/public/sdk/emailOtpEcdsaDerivationIdentity-CIh9IPai.js +0 -1
  436. package/dist/public/sdk/errors-ADOZT8oV.js +0 -1
  437. package/dist/public/sdk/exportKeypairOperation-BazJvSov.js +0 -1
  438. package/dist/public/sdk/helpers-CXqXyyCU.js +0 -1
  439. package/dist/public/sdk/host-C0Is56lU.js +0 -1
  440. package/dist/public/sdk/icons-DyndJzSh.js +0 -1
  441. package/dist/public/sdk/indexedDB-C1odKEC6.js +0 -1
  442. package/dist/public/sdk/intentDigest-BMXki7yB.js +0 -1
  443. package/dist/public/sdk/keyMaterialEnvelope-B-Q5KTJC.js +0 -1
  444. package/dist/public/sdk/localOnly-BB3Rx3J6.js +0 -1
  445. package/dist/public/sdk/nearEd25519YaoMaterialActivation-D9cdMKIZ.js +0 -1
  446. package/dist/public/sdk/nearEd25519YaoSigningPreparation-D_Jvj7ht.js +0 -1
  447. package/dist/public/sdk/operationFingerprint-Bn0lUYlm.js +0 -1
  448. package/dist/public/sdk/presignaturePool-CultzkOG.js +0 -1
  449. package/dist/public/sdk/recovery-entrypoint-QBvJBngm.js +0 -1
  450. package/dist/public/sdk/recoveryAuthorization-DB-zxeHq.js +0 -1
  451. package/dist/public/sdk/registration-CM5a7WYO.js +0 -1
  452. package/dist/public/sdk/registration-Hv0xi7-L.js +0 -1
  453. package/dist/public/sdk/registrationIntent-DTs2SR9E.js +0 -1
  454. package/dist/public/sdk/registrationSignerPlan-CgbFVsAp.js +0 -1
  455. package/dist/public/sdk/requireStepUpAuth-B7tC4MrA.js +0 -1
  456. package/dist/public/sdk/resealedEnvelopeResult--iCVt_Bh.js +0 -1
  457. package/dist/public/sdk/routerAbNormalSigning-Div3lZWV.js +0 -1
  458. package/dist/public/sdk/runtime-auth-CVw1KoVD.js +0 -1
  459. package/dist/public/sdk/runtime-device-link-Dp0YMZTQ.js +0 -1
  460. package/dist/public/sdk/runtime-ecdsa-tempo-DEIjIgEO.js +0 -1
  461. package/dist/public/sdk/runtime-email-otp-gsr_FsQn.js +0 -1
  462. package/dist/public/sdk/runtime-export-upMPrZ4V.js +0 -1
  463. package/dist/public/sdk/runtime-near-B64Hn3nc.js +0 -1
  464. package/dist/public/sdk/runtime-preferences-CULdHkbg.js +0 -1
  465. package/dist/public/sdk/runtime-recovery-D2saBaJy.js +0 -1
  466. package/dist/public/sdk/runtime-recovery-codes-Bvc0IXMJ.js +0 -1
  467. package/dist/public/sdk/runtimeContext-CNFJjcns.js +0 -6
  468. package/dist/public/sdk/secp256k1-BGVlx50C.js +0 -1
  469. package/dist/public/sdk/sessionObservationRevision-84ZzJ-fC.js +0 -1
  470. package/dist/public/sdk/signEvmFamily-PjwUc5MT.js +0 -1
  471. package/dist/public/sdk/signNear-r8VCOoTh.js +0 -1
  472. package/dist/public/sdk/signerSlot-D4ZOuK7e.js +0 -1
  473. package/dist/public/sdk/signingQueue-BJzOrwDq.js +0 -1
  474. package/dist/public/sdk/surface-measurement-reporter-NUm_54LH.js +0 -1
  475. package/dist/public/sdk/thresholdEcdsa-tnY83qyG.js +0 -1
  476. package/dist/public/sdk/transactionReview-DSGnpreN.js +0 -1
  477. package/dist/public/sdk/unlockedEd25519ExportRootCapability-D43rvO9a.js +0 -1
  478. package/dist/public/sdk/wallet-recovery-BjIQdOha.js +0 -1
  479. package/dist/public/sdk/walletAuthMethodRecord-yIqCeE-o.js +0 -1
  480. package/dist/public/sdk/walletCapabilityBindings-CUPk3mVH.js +0 -1
  481. package/dist/public/sdk/walletCustodyEcdsaContinuity-DlOBCmwb.js +0 -1
  482. package/dist/public/sdk/walletCustodyOperation-DzPcxEBS.js +0 -1
  483. package/dist/public/sdk/walletDbName-DDJXrgA5.js +0 -1
  484. package/dist/public/sdk/walletOwnershipGeneration-DI9ogcXF.js +0 -1
  485. package/dist/public/sdk/walletRecoveryAdminProof-BJxmg3f7.js +0 -1
  486. package/dist/public/sdk/walletRecoveryCommit-B7WsdR7y.js +0 -1
  487. package/dist/public/sdk/walletRegistrationSetupPrewarm-CEJCj78c.js +0 -1
  488. package/dist/public/sdk/walletSessionAuthorizationStatus-98G3Qji8.js +0 -1
  489. package/dist/public/sdk/warmSessionHydration-DqZyfi1h.js +0 -1
  490. /package/dist/esm/sdk/{accountIds-D5NI31F2.js → accountIds-CW2BP-d9.js} +0 -0
  491. /package/dist/esm/sdk/{authenticatorOptions-EF_Rps52.js → authenticatorOptions-WCDKYRux.js} +0 -0
  492. /package/dist/esm/sdk/{authorizationAdmission-DbhNiY3X.js → authorizationAdmission-28jo_IVJ.js} +0 -0
  493. /package/dist/esm/sdk/{browser-B2RI00tM.js → browser-CKS7Tq2r.js} +0 -0
  494. /package/dist/esm/sdk/{bytes-DVe42j_r.js → bytes-DXo6uALR.js} +0 -0
  495. /package/dist/esm/sdk/{canonicalSignerErrorCode-AwNMAn8S.js → canonicalSignerErrorCode-CX5PBpkt.js} +0 -0
  496. /package/dist/esm/sdk/{capabilityKinds-BzrNeEyO.js → capabilityKinds-DVlGMspk.js} +0 -0
  497. /package/dist/esm/sdk/{configHelpers-BNqoU2cv.js → configHelpers-CXDY3bKC.js} +0 -0
  498. /package/dist/esm/sdk/{csp-stylesheet-DeuiM0Mo.js → csp-stylesheet-DUSqfXvZ.js} +0 -0
  499. /package/dist/esm/sdk/{events-1dzC4Ocx.js → events-D6l0_ugy.js} +0 -0
  500. /package/dist/esm/sdk/{executeWorkerOperation-B-9JuL55.js → executeWorkerOperation-C9FOCCR7.js} +0 -0
  501. /package/dist/esm/sdk/{jsonRpc-CHutSlC9.js → jsonRpc-BVDv1wfm.js} +0 -0
  502. /package/dist/esm/sdk/{keccak-C9kCkZem.js → keccak-mS0Mejjx.js} +0 -0
  503. /package/dist/esm/sdk/{normalization-DtruiNPw.js → normalization-B3i1-rPQ.js} +0 -0
  504. /package/dist/esm/sdk/{prfCache-8Wm3etlV.js → prfCache-DEHaUPSW.js} +0 -0
  505. /package/dist/esm/sdk/{profileAccountProjection-D01e10UY.js → profileAccountProjection-C5sNt-s2.js} +0 -0
  506. /package/dist/esm/sdk/{promptText-Bz3YRl9D.js → promptText-bcKcsSka.js} +0 -0
  507. /package/dist/esm/sdk/{registrationAuthMethodInput-BvbWl0y_.js → registrationAuthMethodInput-BR1WVbK3.js} +0 -0
  508. /package/dist/esm/sdk/{sdkSentEvents-DUht3AOD.js → sdkSentEvents-DjOlKtdW.js} +0 -0
  509. /package/dist/esm/sdk/{shared-DcHtE-D-.js → shared-CkHhXgFB.js} +0 -0
  510. /package/dist/esm/sdk/{signer-worker-DlK58rEA.js → signer-worker-BNodGJKY.js} +0 -0
  511. /package/dist/esm/sdk/{signerDomain-D-EUTlLK.js → signerDomain-BAsLT3XN.js} +0 -0
  512. /package/dist/esm/sdk/{signingSessionSeal-DqbjG8c8.js → signingSessionSeal-BFOBKj-J.js} +0 -0
  513. /package/dist/esm/sdk/{types-fJKfUgTi.js → types-C4OErbBf.js} +0 -0
  514. /package/dist/esm/sdk/{walletIframeIdentity-Cz82I_Uh.js → walletIframeIdentity-CpgyEnKg.js} +0 -0
  515. /package/dist/esm/sdk/{walletSessionFailure-CLUIF3Eh.js → walletSessionFailure-CxsVtroW.js} +0 -0
  516. /package/dist/esm/sdk/{webauthnPromptCoordinator-CU9ag7vz.js → webauthnPromptCoordinator-npsSRD51.js} +0 -0
  517. /package/dist/public/sdk/{accountIds-D5NI31F2.js → accountIds-CW2BP-d9.js} +0 -0
  518. /package/dist/public/sdk/{authenticatorOptions-EF_Rps52.js → authenticatorOptions-WCDKYRux.js} +0 -0
  519. /package/dist/public/sdk/{authorizationAdmission-DbhNiY3X.js → authorizationAdmission-28jo_IVJ.js} +0 -0
  520. /package/dist/public/sdk/{browser-B2RI00tM.js → browser-CKS7Tq2r.js} +0 -0
  521. /package/dist/public/sdk/{bytes-DVe42j_r.js → bytes-DXo6uALR.js} +0 -0
  522. /package/dist/public/sdk/{canonicalSignerErrorCode-AwNMAn8S.js → canonicalSignerErrorCode-CX5PBpkt.js} +0 -0
  523. /package/dist/public/sdk/{capabilityKinds-BzrNeEyO.js → capabilityKinds-DVlGMspk.js} +0 -0
  524. /package/dist/public/sdk/{configHelpers-BNqoU2cv.js → configHelpers-CXDY3bKC.js} +0 -0
  525. /package/dist/public/sdk/{csp-stylesheet-DeuiM0Mo.js → csp-stylesheet-DUSqfXvZ.js} +0 -0
  526. /package/dist/public/sdk/{events-1dzC4Ocx.js → events-D6l0_ugy.js} +0 -0
  527. /package/dist/public/sdk/{executeWorkerOperation-B-9JuL55.js → executeWorkerOperation-C9FOCCR7.js} +0 -0
  528. /package/dist/public/sdk/{jsonRpc-CHutSlC9.js → jsonRpc-BVDv1wfm.js} +0 -0
  529. /package/dist/public/sdk/{keccak-C9kCkZem.js → keccak-mS0Mejjx.js} +0 -0
  530. /package/dist/public/sdk/{normalization-DtruiNPw.js → normalization-B3i1-rPQ.js} +0 -0
  531. /package/dist/public/sdk/{prfCache-8Wm3etlV.js → prfCache-DEHaUPSW.js} +0 -0
  532. /package/dist/public/sdk/{profileAccountProjection-D01e10UY.js → profileAccountProjection-C5sNt-s2.js} +0 -0
  533. /package/dist/public/sdk/{promptText-Bz3YRl9D.js → promptText-bcKcsSka.js} +0 -0
  534. /package/dist/public/sdk/{registrationAuthMethodInput-BvbWl0y_.js → registrationAuthMethodInput-BR1WVbK3.js} +0 -0
  535. /package/dist/public/sdk/{sdkSentEvents-DUht3AOD.js → sdkSentEvents-DjOlKtdW.js} +0 -0
  536. /package/dist/public/sdk/{shared-DcHtE-D-.js → shared-CkHhXgFB.js} +0 -0
  537. /package/dist/public/sdk/{signer-worker-DlK58rEA.js → signer-worker-BNodGJKY.js} +0 -0
  538. /package/dist/public/sdk/{signerDomain-D-EUTlLK.js → signerDomain-BAsLT3XN.js} +0 -0
  539. /package/dist/public/sdk/{signingSessionSeal-DqbjG8c8.js → signingSessionSeal-BFOBKj-J.js} +0 -0
  540. /package/dist/public/sdk/{types-fJKfUgTi.js → types-C4OErbBf.js} +0 -0
  541. /package/dist/public/sdk/{walletIframeIdentity-Cz82I_Uh.js → walletIframeIdentity-CpgyEnKg.js} +0 -0
  542. /package/dist/public/sdk/{walletSessionFailure-CLUIF3Eh.js → walletSessionFailure-CxsVtroW.js} +0 -0
  543. /package/dist/public/sdk/{webauthnPromptCoordinator-CU9ag7vz.js → webauthnPromptCoordinator-npsSRD51.js} +0 -0
@@ -1,2 +0,0 @@
1
- import{z as e}from"./domainIds-t1lp25yU.js";import{S as t,T as n,i as r,x as i}from"./chains-gV2K9gA4.js";import{r as a}from"./transactionReviewAdmission--8tDis7M.js";import{a as o,o as s,r as c,t as l}from"./errors-ADOZT8oV.js";import{t as u}from"./surface-measurement-reporter-NUm_54LH.js";import{a as d,i as f,o as p,r as m,s as h}from"./csp-stylesheet-DeuiM0Mo.js";import{p as g}from"./nonceLaneKeys-BS4fek17.js";import{t as _}from"./SeamsWordmark-CFpsGoLw.js";import{a as ee,i as v,r as y,t as b}from"./actions-GYsSR2Q2.js";import{u as x}from"./trace-CGNqO1FV.js";import{i as S,r as te}from"./intentDigest-BMXki7yB.js";import{n as ne}from"./NonceCoordinator-Bti1HQPo.js";import{t as re}from"./collectAuthenticationCredentialForChallengeB64u-kLIxmw3V.js";import{o as ie,t as ae}from"./types-fJKfUgTi.js";import{t as oe}from"./promptText-Bz3YRl9D.js";import{i as C,n as se,r as ce,t as le}from"./appearance-DVFno9Tv.js";import{a as ue}from"./transaction-activity-DPq9RTh5.js";import{a as w,c as T,i as E,n as D,o as de,r as O,s as k,t as fe}from"./appearance-token-vars-CgYTfCKg.js";import{i as pe,n as me,r as he,t as ge}from"./ConfirmationDrawer-CTaGM1AE.js";function _e(e){return e===`drawer`?`drawer`:`modal`}function ve(e){return typeof e!=`number`||!Number.isFinite(e)?0:Math.max(0,Math.floor(e))}function ye(e){if(e?.uiMode===`none`)return{kind:`silent`,uiMode:`none`};let t=_e(e?.uiMode);return e?.behavior===`skipClick`?{kind:`auto_proceed`,uiMode:t,behavior:`skipClick`,autoProceedDelay:ve(e.autoProceedDelay)}:{kind:`interactive`,uiMode:t,behavior:`requireClick`}}function be(){return{kind:`silent`,uiMode:`none`}}function xe(e){throw Error(`Unsupported confirmation config: ${String(e.kind)}`)}function Se(e){if(e.type!==C.SIGN_TRANSACTION)return;let t=e.payload;if(t.signingKind!==`transaction`)return;let{subject:n,operation:r,signatureUses:i}=t.nearFundingRequest;if(n.walletId!==t.walletId||n.nearAccountId!==t.rpcCall.nearAccountId||n.nearPublicKeyStr!==t.nearPublicKeyStr)throw Error(`Invalid secure confirm request: NEAR funding subject mismatch`);if(r.accountId!==n.nearAccountId)throw Error(`Invalid secure confirm request: NEAR funding operation account mismatch`);if(!Number.isInteger(i)||i<1)throw Error(`Invalid secure confirm request: invalid NEAR funding signature use count`)}function Ce(e){if(e.type!==C.SIGN_TRANSACTION&&e.type!==C.SIGN_NEP413_MESSAGE)return;let t=e.payload;if(t.prfOutput!==void 0)throw Error(`Invalid secure confirm request: forbidden signing payload field prfOutput`);if(t.wrapKeySeed!==void 0)throw Error(`Invalid secure confirm request: forbidden signing payload field wrapKeySeed`);if(t.wrapKeySalt!==void 0)throw Error(`Invalid secure confirm request: forbidden signing payload field wrapKeySalt`)}function we(e){switch(e.type){case C.SIGN_TRANSACTION:return A(e).rpcCall.nearAccountId;case C.SIGN_NEP413_MESSAGE:return e.payload.nearAccountId;case C.SIGN_INTENT_DIGEST:{let t=De(e);return t.kind===`near_wallet`?t.nearAccountId:``}case C.REGISTER_ACCOUNT:case C.LINK_DEVICE:return String(Pe(e).nearAccountId||``).trim();case C.AUTHORIZE_KEY_EXPORT:{let t=Te(e);return t.kind===`near_wallet`?t.nearAccountId:``}case C.SHOW_SECURE_PRIVATE_KEY_UI:{let t=Te(e);return t.kind===`near_wallet`?t.nearAccountId:``}default:return``}}function Te(e){if(e.type!==C.AUTHORIZE_KEY_EXPORT&&e.type!==C.SHOW_SECURE_PRIVATE_KEY_UI)throw Error(`Expected local key export request, got ${e.type}`);return e.payload.subject}function Ee(e){let t=Te(e);switch(t.kind){case`near_wallet`:return t.nearAccountId;case`evm_wallet`:return t.walletId;default:{let e=t;throw Error(`Unsupported local key export subject: ${String(e)}`)}}}function De(e){if(e.type!==C.SIGN_INTENT_DIGEST)throw Error(`Expected SIGN_INTENT_DIGEST request, got ${e.type}`);return e.payload.signingSubject}function Oe(e){switch(e.type){case C.SIGN_TRANSACTION:return String(A(e).walletId||``).trim();case C.SIGN_NEP413_MESSAGE:return String(e.payload.walletId||``).trim();case C.REGISTER_ACCOUNT:case C.LINK_DEVICE:return String(Pe(e).walletId||``).trim();case C.SIGN_INTENT_DIGEST:return De(e).walletId;case C.AUTHORIZE_KEY_EXPORT:case C.SHOW_SECURE_PRIVATE_KEY_UI:return Ee(e);default:return we(e)}}function ke(e){return e.type===C.SIGN_TRANSACTION&&A(e).txSigningRequests?.length||1}function Ae(e){return e.type===C.SIGN_TRANSACTION?e.payload.intentDigest:e?.intentDigest}function A(e){if(e.type!==C.SIGN_TRANSACTION)throw Error(`Expected SIGN_TRANSACTION request, got ${e.type}`);return e.payload}function je(e){if(e.type===C.SIGN_TRANSACTION)return A(e).displayModel;if(e.type===C.SIGN_NEP413_MESSAGE||e.type===C.SIGN_INTENT_DIGEST)return e.payload.displayModel}function Me(e){if(e.type===C.SIGN_TRANSACTION)return ie(A(e).signingAuthPlan);if(e.type===C.SIGN_NEP413_MESSAGE){let t=e.payload;return ie(t.signingAuthPlan)}if(e.type===C.SIGN_INTENT_DIGEST){let t=e.payload;return ie(t.signingAuthPlan)}}function Ne(e){if(e.type===C.SIGN_TRANSACTION){let t=A(e);return t.signingAuthPlan?.kind===ae.EmailOtpReauth?t.signingAuthPlan.emailOtpPrompt:t.emailOtpPrompt}if(e.type===C.SIGN_NEP413_MESSAGE){let t=e.payload;return t.signingAuthPlan?.kind===ae.EmailOtpReauth?t.signingAuthPlan.emailOtpPrompt:t.emailOtpPrompt}if(e.type===C.SIGN_INTENT_DIGEST){let t=e.payload;return t.signingAuthPlan?.kind===ae.EmailOtpReauth?t.signingAuthPlan.emailOtpPrompt:t.emailOtpPrompt}}function Pe(e){if(e.type!==C.REGISTER_ACCOUNT&&e.type!==C.LINK_DEVICE)throw Error(`Expected REGISTER_ACCOUNT or LINK_DEVICE request, got ${e.type}`);return e.payload}function Fe(e){if(typeof e==`string`){let n=e.trim();if(!n)return{};try{let e=JSON.parse(n);return t(e)&&!Array.isArray(e)?e:{}}catch{return{}}}if(!t(e)||Array.isArray(e))throw Error(`Invalid secure confirm request summary: expected an object`);return e}function Ie(e){if(e==null)return e;if(Array.isArray(e))return e.map(e=>e);if(t(e)){let t=e,n={};for(let e of Object.keys(t)){if(e===`_confirmHandle`)continue;let r=t[e];i(r)||(n[e]=r)}return n}return e}const Le={cancelled:`User cancelled secure confirm request`,collectCredentialsFailed:`Failed to collect credentials`,nearRpcFailed:`Failed to fetch NEAR data`};function Re(t){return e(t.channelToken)}function ze(t,n){let r=e(n?.channelToken);return!r&&!n?.onDecision?t:{postMessage:t.postMessage.bind(t),...r?{channelToken:r}:{},...n?.onDecision?{onDecision:n.onDecision}:{}}}function Be(t,r,i){let{_confirmHandle:a,...o}=r,s=n(o.requestId)?o.requestId:r.requestId,c=e(i?.channelToken)??Re(t),l={type:ce.USER_PASSKEY_CONFIRM_RESPONSE,requestId:s,data:o,...c?{channelToken:c}:{}};t.onDecision?.(o),t.postMessage(l)}function Ve(t,r,i){let a=Ie(r),o=n(a?.requestId)?a.requestId:r.requestId,s=e(i?.channelToken)??Re(t),c={type:ce.USER_PASSKEY_CONFIRM_PROGRESS,requestId:o,data:a,...s?{channelToken:s}:{}};t.postMessage(c)}function He(e){return o(e)?!1:c(e)||(()=>{let t=s(e);return t?.name===`NotAllowedError`||t?.name===`AbortError`})()}let Ue=!1;function We(e=!0){Ue=!!e}function Ge(){return Ue}function Ke(e){if(!e)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t,2)}catch{return String(e)}}function j(e){if(!e||e===`0`)return`0 NEAR`;try{let t=BigInt(e),n=BigInt(`1000000000000000000000000`),r=t/n,i=t%n;if(i===BigInt(0))return`${r.toString()} NEAR`;let a=i.toString().padStart(24,`0`).slice(0,5);return a=a.replace(/0+$/g,``),a.length===0?`${r.toString()} NEAR`:`${r.toString()}.${a} NEAR`}catch{return e}}function qe(e){if(!e)return``;try{return`${BigInt(e)/BigInt(`1000000000000`)} Tgas`}catch{return e}}function M(e,t={}){if(!e||typeof e!=`string`)return``;let{prefix:n=12,suffix:r=6}=t;return e.length<=n+r+3?e:`${e.slice(0,n)}...${e.slice(-r)}`}function N(e){return e?e instanceof Uint8Array?`${e.byteLength} bytes`:Array.isArray(e)||typeof e==`string`?`${e.length} bytes`:`unknown`:`0 bytes`}function Je(e){if(!e)return;let t=String(e.decoded||``),n=String(e.raw||``);if(!(!t||!n)&&t!==n)return{decoded:t,raw:n,defaultMode:e.defaultMode===`raw`?`raw`:`decoded`}}function Ye(e,t){if(!/Value \(wei\)$/i.test(e.trim()))return!1;let n=t.trim();if(!n)return!1;if(n===`0`||/^0x0+$/i.test(n))return!0;try{return BigInt(n)===0n}catch{return!1}}function Xe(e,t){return!Array.isArray(t)||t.length===0?[]:t.flatMap((t,n)=>{let r=String(t.label||``).trim(),i=String(t.value||``),a=t.renderAs||`inline`;if(Ye(r,i))return[];if(a===`file-content`){let a=Je(t.contentVariants),o=a?.defaultMode===`raw`?a.raw:a?.decoded||i;return[{id:`${e}-field-${n}`,label:r?`${r}:`:``,fieldLabel:r?`${r}:`:void 0,type:`file`,open:!1,content:o,...a?{contentVariants:a}:{},copyValue:typeof t.copyValue==`string`?t.copyValue:void 0,hideLabel:!!t.hideLabel,hideChevron:typeof t.hideChevron==`boolean`?t.hideChevron:!0}]}return[{id:`${e}-field-${n}`,label:r?`${r}: ${i}`:i,fieldLabel:r?`${r}:`:void 0,type:`file`,open:!1,copyValue:typeof t.copyValue==`string`?t.copyValue:void 0}]})}const Ze=({operation:e,depth:t,path:n,renderChild:r})=>{let i=String(e.id||``).trim()||`op-${n}`,a=(()=>{let t=String(e.to||``).trim();return/^0x[0-9a-fA-F]{40}$/.test(t)?t:void 0})(),o=String(e.description||``).trim(),s=Array.isArray(e.children)?e.children.map((e,i)=>r(e,t+1,`${n}.${i}`)):[],c=Xe(i,e.fields),l=o?[{id:`${i}-description`,label:o,type:`file`,open:!1}]:[];if(e.kind===`raw.fallback`){let t=String(e.raw||``).trim();t&&l.push({id:`${i}-raw`,label:`Raw payload`,type:`file`,open:!1,content:t})}let u=[...l,...c,...s];return u.length===0?{id:i,label:String(e.label||e.kind),type:`file`,open:!1,contractAddress:a}:{id:i,label:String(e.label||e.kind),type:`folder`,open:t<1,contractAddress:a,children:u}};function Qe(e){switch(e){case`near`:return`NEAR`;case`evm`:return`EVM`;case`tempo`:return`Tempo`;default:return`Unknown`}}function $e(e){return!Array.isArray(e)||e.length===0?[]:[{id:`warnings-root`,label:`Warnings`,type:`folder`,open:!0,children:e.map((e,t)=>({id:`warning-${t}`,label:`[${String(e.severity||`warning`).toUpperCase()}] ${String(e.message||``)}`,type:`file`,open:!1}))}]}function et(e,t,n){return Ze({operation:e,depth:t,path:n,renderChild:(e,t,n)=>et(e,t,n)})}function P(e){let t=Array.isArray(e.children)?e.children.map(e=>P(e)):void 0;return e.type===`folder`?{...e,hideChevron:!0,children:t}:t?{...e,children:t}:e}function F(e,t){let n=Array.isArray(e.children)?e.children.map(e=>F(e,t)):void 0;return{...e,chain:t,...n?{children:n}:{}}}function tt(e){let t=e.chain===`evm`||e.chain===`tempo`,n=(Array.isArray(e.operations)?e.operations:[]).map((e,t)=>et(e,0,String(t))).map(t=>F(t,e.chain)).map(e=>t?P(e):e),r=[...$e(e.warnings).map(t=>F(t,e.chain)).map(e=>t?P(e):e),...n];r.length===0&&r.push({id:`no-operations`,label:`No operations`,type:`file`,open:!1});let i=Qe(e.chain);return{id:`display-root`,label:String(e.title||``).trim()||`${i} Transaction`,type:`folder`,open:!0,children:r}}function nt(e,t){let r;switch(e.type){case`FunctionCall`:r=[{id:`a${t}-args`,label:`using args:`,type:`file`,open:!1,hideChevron:!0,hideLabel:!0,content:Ke(e.args)}];break;case`Transfer`:r=[];break;case`CreateAccount`:r=[];break;case`DeployContract`:{let n=N(e.code);r=[{id:`a${t}-code-size`,label:`WASM contract code size: ${n}`,type:`file`,open:!1}];break}case`DeployGlobalContract`:{let n=e.code,i=e.deployMode,a=N(n);r=[{id:`a${t}-deploy-mode`,label:`mode: ${String(i||``)}`,type:`file`,open:!1},{id:`a${t}-code-size`,label:`WASM global contract code size: ${a}`,type:`file`,open:!1}];break}case`UseGlobalContract`:{let n=e.accountId,i=e.codeHash,a;a=n?`by account: ${String(n)}`:i?`by hash: ${M(String(i),{prefix:10,suffix:6})}`:`by global contract identifier`,r=[{id:`a${t}-identifier`,label:a,type:`file`,open:!1}];break}case`Stake`:r=[{id:`a${t}-publicKey`,label:`validator: ${M(e.publicKey)}`,type:`file`,open:!0,copyValue:e.publicKey}];break;case`AddKey`:{let i=e.accessKey,a=``;try{a=(n(i)?JSON.parse(i):i).permission===`FullAccess`?`Full Access`:`Function Call`}catch{a=`Unknown`}r=[{id:`a${t}-publicKey`,label:`key: ${M(e.publicKey)}`,open:!1,type:`file`,copyValue:e.publicKey},{id:`a${t}-permissions`,label:`permissions: ${a}`,open:!1,type:`file`}];break}case`DeleteKey`:r=[{id:`a${t}-publicKey`,label:`key: ${M(e.publicKey)}`,open:!1,type:`file`,copyValue:e.publicKey}];break;case`DeleteAccount`:r=[{id:`a${t}-beneficiaryId`,label:`sending balance to: ${e.beneficiaryId}`,open:!1,type:`file`}];break;default:return rt(e)}return{id:`action-${t}`,label:``,type:`folder`,open:!1,hideChevron:!0,action:e,actionIndex:t,children:r}}function rt(e){throw Error(`Unsupported NEAR action: ${String(e)}`)}function it(e,t,n){let r=e.actions.map((e,t)=>nt(e,t));return{id:`tx-${t}`,label:``,type:`folder`,open:!0,hideChevron:!0,transaction:e,transactionIndex:t,totalTransactions:n,children:[...r]}}function at(e){let t=e.length,n=e.map((e,n)=>it(e,n,t));return{id:`txs-root`,label:t>1?`Transactions`:`Transaction`,type:`folder`,open:!0,children:n}}function ot(e){let t=e.abiDecodeHint;if(t&&Array.isArray(t.abi)&&t.abi.length>0){let e=String(t.dataHex||``).trim();if(e&&e!==`0x`)return!0}return(Array.isArray(e.children)?e.children:[]).some(ot)}function st(e){return(Array.isArray(e.operations)?e.operations:[]).some(ot)}function I(e){let t=Array.isArray(e.txSigningRequests)?e.txSigningRequests:[];if(t.length>0)return at(y(t));let n=e.model;if(!n)return null;let r=Array.isArray(n.operations)?n.operations:[],i=Array.isArray(n.warnings)?n.warnings:[];return r.length>0||i.length>0?tt(n):null}const ct=/^NEAR account ([^\s]+) needs funding before signing\.$/;function lt(e){let t=String(e||``).trim();return t.length<=8?t:`${t.slice(0,4)}...${t.slice(-4)}`}function ut(e){let t=String(e||``).trim();return t?`NEAR account ${t} needs funding before signing.`:`NEAR account needs funding before signing.`}function dt(e){let t=String(e||``).trim(),n=ct.exec(t);if(!n)return null;let r=String(n[1]||``).trim();return r?{accountId:r,shortAccountId:lt(r)}:null}function ft(e){return String(e||``).trim()===`Topping up account...`}function pt(e){let t=lt(e);return t?`Funding NEAR account ${t}...`:`Funding NEAR account...`}function mt(e){let t=String(e||``).trim();return t.startsWith(`Funding NEAR account`)&&t.endsWith(`...`)}function ht(e){return ft(e)||mt(e)}function gt(e){let t=e.trim();if(!t)return{kind:`empty`};if(ht(t))return{kind:`status`,text:t};let n=dt(t);return n?{kind:`funding`,accountId:n.accountId,shortAccountId:n.shortAccountId}:{kind:`text`,text:t}}function _t(e){let t=e.presentation,n=t.errorMessage??``,r=t.cancelText??`Cancel`,i=t.securityContext?.passkeyRegistration;if(i?.kind===`passkey_registration_confirm_display_v1`)return{ok:!0,model:{appearance:e.appearance,content:{kind:`registration`,registration:{display:i,heading:t.title?.trim()||`Create your passkey`,body:t.body?.trim()||`Use Touch ID or your device passkey to create credentials for this account.`,cancelText:r,errorMessage:n,decision:t.loading?{kind:`creating`}:{kind:`ready`,onConfirm:e.callbacks.confirm},onCancel:e.callbacks.cancel}}}};let a;switch(t.signingAuthMode){case`emailOtp`:{let r=t.emailOtpPrompt,i=r?.challengeId.trim();if(!r||!i)return{ok:!1,error:`missing_email_challenge`};a={kind:`email`,email:{prompt:{challengeId:i,title:r.title,body:r.body,helperText:r.helperText,emailHint:r.emailHint,resendDebounceMs:r.resendDebounceMs,onResend:r.onResend},verification:vt(t.loading===!0,n),onSubmit:e.callbacks.submitEmail}};break}case`warmSession`:a={kind:`session`};break;case`webauthn`:case void 0:a={kind:`passkey`};break;default:return L(t.signingAuthMode)}let o=gt(t.body??``);return{ok:!0,model:{appearance:e.appearance,content:{kind:`transaction`,capture:t.authMethodCapture??null,review:{model:t.model??null,tree:e.tree},header:{heading:yt(t),website:bt(t.securityContext?.rpId?.trim()??``),chainDetails:xt(t,t.loading===!0||o.kind===`status`),errorMessage:n},body:o,prompt:a,transaction:{tree:e.tree,theme:e.appearance.theme.mode,explorers:{near:t.nearExplorerUrl||`https://testnet.nearblocks.io`,tempo:t.tempoExplorerUrl,evm:t.evmExplorerUrl},decision:t.loading||t.preparing?{kind:`preparing`}:{kind:`ready`,onConfirm:e.callbacks.confirm},confirmText:t.signingAuthMode===`emailOtp`?`Confirm Code`:t.confirmText??`Confirm`,cancelText:r,errorMessage:n,onCancel:e.callbacks.cancel,onBack:t.onBack,authMethodApprovalMessage:t.authMethodApprovalMessage}}}}}function vt(e,t){return e?{kind:`pending`}:t?{kind:`rejected`,message:t}:{kind:`ready`}}function yt(e){let t=(e.model?.operations.length??0)===0?`Register with Passkey`:`Confirm with Passkey`;switch(e.signingAuthMode){case`emailOtp`:return e.emailOtpPrompt?.title?.trim()||`Enter email code to sign`;case`warmSession`:return`Review transaction`;case`webauthn`:return t;case void 0:return e.title?.trim()||t;default:return L(e.signingAuthMode)}}function bt(e){return e?{kind:`ready`,text:e}:{kind:`loading`}}function xt(e,t){let n=e.model;if(n?.chainId)return{kind:`ready`,text:`${St(n.chain)} | ChainID: ${n.chainId}`};let r=String(e.securityContext?.blockHeight||``).trim();return r?{kind:`ready`,text:`block ${r}`}:t?{kind:`loading`}:{kind:`ready`,text:`block`}}function St(e){switch(e){case`near`:return`NEAR`;case`evm`:return`EVM`;case`tempo`:return`Tempo`;case`unknown`:return`Unknown`;default:return L(e)}}function L(e){throw Error(`Unexpected confirmation presentation: ${String(e)}`)}const R=`seams-surface-resize-begin`;function Ct(e,t){return e.dispatchEvent(new CustomEvent(R,{bubbles:!0,composed:!0,detail:t}))}function wt(e,t,n){let r=t;return e.addEventListener(R,r,n),()=>e.removeEventListener(R,r,n)}const Tt=`data-seams-confirm-surface`,z=`seams-confirm-surface-pinned`,B=`seams-confirm-surface-pinned-root`,V=`seams-surface-height-driven`,Et=`--seams-surface-height-driven-target`;function Dt(e,t){let{fromCssPx:n,toCssPx:r}=t;if(!Number.isFinite(n)||!Number.isFinite(r))return!1;let i=r-n;if(Math.abs(i)<1)return!1;let a=Math.min(n,r),o=Math.max(n,r),s=null,c=!1,l=null,u=e=>{if(c)return;let r=n+(Number.isFinite(e)?Math.min(Math.max(e,0),1):0)*i;t.setHeightCssPx(Math.min(Math.max(r,a),o))},d=()=>{c||(c=!0,l!==null&&window.clearTimeout(l),t.finish())},f=()=>s||c?null:(t.onClaimed?.(),u(0),l=window.setTimeout(()=>{u(1),d()},1500),s={setProgress:u,finish:d},s);return Ct(e,{...t.reason?{reason:t.reason}:{},deltaCssPx:i,claim:f}),s!==null}function Ot(e){let t=null,n=null,r=()=>{let e=n;n=null,e&&e.classList.remove(V)};return{capture(){let n=e.element();t=n?n.getBoundingClientRect().height:null},commit(){let i=t;t=null;let a=e.element();!a||i===null||document.documentElement.classList.contains(B)||a.parentElement?.closest(`.${V}`)||(n=a,a.classList.add(V),e.setHeightCssPx(i),Promise.resolve(e.settled?.()).then(()=>new Promise(e=>requestAnimationFrame(()=>e()))).then(()=>{if(n!==a)return;if(document.documentElement.classList.contains(B)){r();return}a.classList.remove(V);let t=a.getBoundingClientRect().height;a.classList.add(V),!H({...e.reason?{reason:e.reason}:{},element:a,fromCssPx:i,toCssPx:t,setHeightCssPx:t=>e.setHeightCssPx(t),onSettled:()=>{n=null}})&&(r(),kt(a,i,t))}))},dispose:r}}function kt(e,t,n){Math.abs(n-t)<1||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||e.animate([{height:`${t}px`},{height:`${n}px`}],{duration:200,easing:`cubic-bezier(0.32, 0.72, 0, 1)`})}function H(e){let{element:t,fromCssPx:n,toCssPx:r}=e;if(!Number.isFinite(n)||!Number.isFinite(r)||Math.abs(r-n)<1)return!1;let i=e.drivenClasses??[V],a=i.filter(e=>!t.classList.contains(e));t.classList.add(...a),e.setHeightCssPx(n);let o=Dt(t,{...e.reason?{reason:e.reason}:{},fromCssPx:n,toCssPx:r,setHeightCssPx:e.setHeightCssPx,finish:()=>{t.classList.remove(...i),e.onSettled?.()}});return o||t.classList.remove(...a),o}let At=null;const jt={blipFrames:0,trace(e=2e3){return new Promise(t=>{let n=[],r=performance.now(),i=()=>{let a=At,o=a?.classList.contains(z)?`*`:``;n.push(`${Math.round(performance.now()-r)}: box=${document.documentElement.clientHeight} content=${a?Math.round(a.getBoundingClientRect().height):`-`}${o}`),performance.now()-r<e?requestAnimationFrame(i):t(n)};requestAnimationFrame(i)})}};function Mt(e){At=e;try{window.__seamsSurfaceMotion=jt}catch{}}function Nt(){let e=document.documentElement?.clientHeight??0;return e>0?e:window.innerHeight}function Pt(e,t,n){return Math.min(Math.max(e,t),n)}function Ft(e){return e.getAttribute(Tt)===`wallet-iframe`}function It(e){if(typeof CSSStyleSheet!=`function`||!(`adoptedStyleSheets`in document))return null;let t=null,n=()=>{e.classList.remove(z),document.documentElement.classList.remove(B)};return{set(n){try{t||=new CSSStyleSheet,t.replaceSync(`.${z}{height:${Math.max(0,Math.round(n))}px}.${B}{overflow:hidden}`),document.adoptedStyleSheets.includes(t)||(document.adoptedStyleSheets=[...document.adoptedStyleSheets,t])}catch{return!1}return e.classList.add(z),document.documentElement.classList.add(B),!0},release:n,dispose(){if(n(),!t)return;let e=t;t=null;try{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==e)}catch{}}}}function Lt(e,t={}){let n=t.viewportHeightCssPx??Nt,r=It(e);Mt(e);let i=null,a=()=>{let e=i;e&&(i=null,e.frame!==null&&cancelAnimationFrame(e.frame),e.driver.setProgress(1),e.driver.finish(),r?.release())},o=()=>{let e=i;if(!e)return;e.frame=null;let t=n();t===e.lastViewportPx?e.framesSinceChange+=1:(e.lastViewportPx=t,e.framesSinceChange=0,e.moved=!0);let r=Pt((t-e.originHostPx)/e.deltaCssPx,0,1);if(r>=1){if(e.framesAtTarget+=1,e.sawIntermediate||e.framesAtTarget>=3){a();return}e.frame=requestAnimationFrame(o);return}e.framesAtTarget>0&&(jt.blipFrames+=1),e.framesAtTarget=0,r>0&&(e.sawIntermediate=!0),e.driver.setProgress(r);let s=e.moved?8:20;if(e.framesSinceChange>=s){a();return}e.frame=requestAnimationFrame(o)},s=wt(e,t=>{let s=t.detail;if(!r||!s||!Ft(e))return;let c=s.deltaCssPx;if(!Number.isFinite(c)||Math.abs(c)<1)return;a();let l=n(),u=e.getBoundingClientRect().height;if(!(l>0)||!(u>0)||Math.abs(l-u)>1)return;let d=Math.round(u),f=d+c;if(!(f>0)||!r.set(f))return;let p=s.claim();if(!p){r.release();return}i={driver:p,originHostPx:d,deltaCssPx:c,lastViewportPx:l,framesSinceChange:0,moved:!1,sawIntermediate:!1,framesAtTarget:0,frame:null},i.frame=requestAnimationFrame(o)});return{dispose(){s(),a(),r?.dispose()}}}function Rt(e){let t=e.size??`100%`,n=e.strokeWidth??2;return m(`svg`,{class:`padlock-icon seams-padlock-icon`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":n,"stroke-linecap":`round`,"stroke-linejoin":`round`,width:t,height:t,"aria-hidden":`true`,focusable:`false`,children:[m(`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}),m(`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`})]})}let zt=0;var Bt=class extends f{id=`seams-halo-${++zt}`;element=d();motion=null;frame=null;startedAt=null;angle=null;componentDidMount(){this.motion=this.element.current.ownerDocument.defaultView.matchMedia(`(prefers-reduced-motion: no-preference)`),this.motion.addEventListener(`change`,this.updateAnimation),this.syncDynamicStyles(),this.updateAnimation()}componentDidUpdate(e){e.styles!==this.props.styles&&e.styles.deleteDynamicRule(this.id),e.innerPadding!==this.props.innerPadding&&this.syncDynamicStyles(),(e.animated!==this.props.animated||e.durationMs!==this.props.durationMs||e.styles!==this.props.styles)&&this.updateAnimation()}componentWillUnmount(){this.cancelFrame(),this.motion?.removeEventListener(`change`,this.updateAnimation),this.motion=null,this.props.styles.deleteDynamicRule(this.id)}cancelFrame(){let e=this.element.current?.ownerDocument.defaultView;this.frame!==null&&e?.cancelAnimationFrame(this.frame),this.frame=null,this.startedAt=null}updateAnimation=()=>{this.cancelFrame(),this.angle=null,this.syncDynamicStyles(),this.props.animated&&this.motion?.matches&&(this.frame=this.element.current.ownerDocument.defaultView.requestAnimationFrame(this.tick))};tick=e=>{if(!this.element.current||!this.props.animated||!this.motion?.matches)return;this.startedAt??=e;let t=this.props.durationMs,n=t&&Number.isFinite(t)&&t>0?t:1150;this.angle=`${(e-this.startedAt)%n/n*360}deg`,this.syncDynamicStyles(),this.frame=this.element.current.ownerDocument.defaultView.requestAnimationFrame(this.tick)};syncDynamicStyles(){let e={};if(this.props.innerPadding&&(e[`--inner-padding`]=this.props.innerPadding),this.angle&&(e[`--halo-angle`]=this.angle),Object.keys(e).length===0){this.props.styles.deleteDynamicRule(this.id);return}this.props.styles.setDynamicDeclarations(this.id,`#${this.id}`,e)}render(){return m(`div`,{id:this.id,ref:this.element,class:`seams-halo-border`,children:m(`div`,{class:`halo-root${this.props.animated?` animated`:``}`,children:m(`div`,{class:`halo-inner`,children:m(`div`,{class:`halo-outer`,children:[this.props.animated&&m(`div`,{class:`halo-ring`,"aria-hidden":`true`}),m(`div`,{class:`halo-content`,children:this.props.children})]})})})})}};function Vt(e){return m(`div`,{class:`seams-passkey-halo-loading`,"aria-hidden":`true`,children:m(`div`,{class:`seams-passkey-loading-root`,children:m(Bt,{animated:e.animated,innerPadding:e.innerPadding,styles:e.styles,children:m(`div`,{class:`seams-passkey-loading-touch-icon-container`,children:m(`svg`,{class:`seams-passkey-loading-touch-icon`,"data-icon":e.icon,width:e.size??36,height:e.size??36,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,focusable:`false`,children:e.icon===`mail`?m(Ht,{}):m(Ut,{})})})})})})}function Ht(){return m(h,{children:[m(`path`,{d:`M4.5 6.5H19.5C20.0523 6.5 20.5 6.94772 20.5 7.5V16.5C20.5 17.0523 20.0523 17.5 19.5 17.5H4.5C3.94772 17.5 3.5 17.0523 3.5 16.5V7.5C3.5 6.94772 3.94772 6.5 4.5 6.5Z`,stroke:`currentColor`,"stroke-width":`var(--seams-modal__passkey-halo-loading-touch-icon__stroke-width, 3)`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"vector-effect":`non-scaling-stroke`}),m(`path`,{d:`M4.25 7.25L12 12.75L19.75 7.25`,stroke:`currentColor`,"stroke-width":`var(--seams-modal__passkey-halo-loading-touch-icon__stroke-width, 3)`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"vector-effect":`non-scaling-stroke`})]})}function Ut(){return m(`path`,{d:`M6.40519 19.0481C6.58912 18.6051 6.75832 18.1545 6.91219 17.6969M14.3433 20.6926C14.6095 19.9418 14.8456 19.1768 15.0502 18.399C15.2359 17.6934 15.3956 16.9772 15.5283 16.2516M19.4477 17.0583C19.8121 15.0944 20.0026 13.0694 20.0026 11C20.0026 6.58172 16.4209 3 12.0026 3C10.7472 3 9.55932 3.28918 8.50195 3.80456M3.52344 15.0245C3.83663 13.7343 4.00262 12.3865 4.00262 11C4.00262 9.25969 4.55832 7.64917 5.50195 6.33621M12.003 11C12.003 13.7604 11.5557 16.4163 10.7295 18.8992C10.5169 19.5381 10.2792 20.1655 10.0176 20.7803M7.71227 14.5C7.90323 13.3618 8.00262 12.1925 8.00262 11C8.00262 8.79086 9.79348 7 12.0026 7C14.2118 7 16.0026 8.79086 16.0026 11C16.0026 11.6166 15.9834 12.2287 15.9455 12.8357`,stroke:`currentColor`,"stroke-width":`var(--seams-modal__passkey-halo-loading-touch-icon__stroke-width, 3)`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"vector-effect":`non-scaling-stroke`,pathLength:`1`})}function Wt(e){return m(h,{children:[m(`span`,{class:`loading-ellipsis`,"aria-hidden":`true`,children:[m(`span`,{class:`loading-ellipsis__dot`,children:`.`}),m(`span`,{class:`loading-ellipsis__dot`,children:`.`}),m(`span`,{class:`loading-ellipsis__dot`,children:`.`})]}),m(`span`,{class:`sr-only`,children:m(E,{copy:e.label})})]})}function Gt(e,t){return`${e.trim().replace(/\/$/,``)}/address/${encodeURIComponent(t)}`}function Kt(e){return m(`a`,{class:`highlight-receiver-id`,href:Gt(e.base,e.address),target:`_blank`,rel:`noopener noreferrer`,children:e.children})}function qt(e){let t=e.trim();return/^0x[0-9a-fA-F]{40}$/.test(t)?`${t.slice(0,8)}...${t.slice(-4)}`:t}function Jt(e){let t=e.label.trim().match(/^(Transaction(?:\s+\d+)?\s+to contract)\b/i);return t?`${t[1]} `:void 0}function Yt(e){throw Error(`Unsupported transaction action: ${String(e)}`)}function Xt(e){let t=e.action;if(t)switch(t.type){case b.FunctionCall:return`Calling ${t.methodName} with ${j(t.deposit)} using ${qe(t.gas)}`;case b.Transfer:return`Transfer ${j(t.amount)}`;case b.CreateAccount:return`Creating Account`;case b.DeleteAccount:return`Deleting Account`;case b.Stake:return`Staking ${j(t.stake)}`;case b.AddKey:return`Adding Key`;case b.DeleteKey:return`Deleting Key`;case b.DeployContract:return`Deploying WASM contract`;case b.DeployGlobalContract:return`Deploy global WASM contract (mode: ${t.deployMode}, size ${N(t.code)})`;case b.UseGlobalContract:return t.accountId?`Use global contract by account ${t.accountId}`:t.codeHash?`Use global contract by hash ${t.codeHash}`:`Use global contract`;default:return Yt(t)}if(e.transaction)return((e.totalTransactions??1)>1?`Transaction ${(e.transactionIndex??0)+1}: to `:`Transaction to `)+e.transaction.receiverId;let n=Jt(e);return e.contractAddress?.trim()&&n?n+qt(e.contractAddress):e.label}function Zt({node:e,explorers:t}){let n=e.action;if(n)switch(n.type){case b.FunctionCall:{let e=qe(n.gas),t=j(n.deposit);return m(h,{children:[m(E,{message:`Calling`}),` `,m(`span`,{class:`highlight-method-name`,children:n.methodName}),t!==`0 NEAR`&&m(h,{children:[` `,m(E,{message:`with`}),` `,m(`span`,{class:`highlight-method-name`,children:t})]}),e&&m(h,{children:[` `,m(E,{message:`using`}),` `,m(`span`,{class:`highlight-method-name`,children:e})]})]})}case b.Transfer:return m(h,{children:[m(E,{message:`Transfer`}),` `,m(`span`,{class:`highlight-amount`,children:j(n.amount)})]});case b.CreateAccount:return m(E,{message:`Creating Account`});case b.DeleteAccount:return m(E,{message:`Deleting Account`});case b.Stake:return m(E,{message:`Staking {value0}`,values:{value0:j(n.stake)}});case b.AddKey:return m(E,{message:`Adding Key`});case b.DeleteKey:return m(E,{message:`Deleting Key`});case b.DeployContract:return m(E,{message:`Deploying WASM contract ({value0})`,values:{value0:N(n.code)}});case b.DeployGlobalContract:return m(E,{copy:Xt(e)});case b.UseGlobalContract:return n.accountId?m(h,{children:[m(E,{message:`Use global contract`}),` `,m(Kt,{base:t.near,address:n.accountId,children:n.accountId})]}):n.codeHash?m(h,{children:[m(E,{message:`Use global contract by hash`}),` `,m(`span`,{class:`highlight-method-name`,children:M(n.codeHash,{prefix:10,suffix:6})})]}):m(E,{message:`Use global contract`});default:return Yt(n)}if(e.transaction)return m(h,{children:[m(E,{copy:(e.totalTransactions??1)>1?`Transaction ${(e.transactionIndex??0)+1}: to `:`Transaction to `}),m(Kt,{base:t.near,address:e.transaction.receiverId,children:e.transaction.receiverId})]});let r=Jt(e),i=e.contractAddress?.trim();if(i&&r){let n=e.chain&&e.chain!==`unknown`?t[e.chain]:void 0;return m(h,{children:[m(E,{copy:r}),n?m(Kt,{base:n,address:i,children:qt(i)}):m(`span`,{class:`highlight-receiver-id`,children:qt(i)})]})}let a=e.label.trim();if(a.toLowerCase().startsWith(`calling `)){let e=a.slice(8).trim(),t=e.toLowerCase().indexOf(` using `);if(t<0&&e)return m(h,{children:[m(E,{message:`Calling`}),` `,m(`span`,{class:`highlight-method-name`,children:e})]});let n=e.slice(0,t).trim(),r=e.slice(t+7).trim();if(t>=0&&n)return m(h,{children:[m(E,{message:`Calling`}),` `,m(`span`,{class:`highlight-method-name`,children:n}),r&&m(h,{children:[m(E,{message:`using`}),` `,r]})]})}return e.fieldLabel?m(h,{children:[m(E,{copy:e.fieldLabel}),e.label.slice(e.fieldLabel.length)]}):m(E,{copy:e.label})}const U=[`anim-h`,`anim-h-active`,`anim-h-driven`],Qt=[...U,`anim-h-hold`];let $t=0;function en(){return m(`svg`,{class:`chevron`,viewBox:`0 0 16 16`,"aria-hidden":`true`,children:m(`path`,{fill:`currentColor`,d:`M6 3l5 5-5 5z`})})}function tn(e){return!!e.contentVariants?.decoded&&!!e.contentVariants.raw&&e.contentVariants.decoded!==e.contentVariants.raw}function nn(e,t,n){return m(an,{node:n,depth:t,styles:e.styles,explorers:e.explorers,onToggle:e.onToggle,onCopy:e.onCopy},n.id)}function rn(e){if(!e.node.children?.length)return null;let t=m(`div`,{class:`tooltip-tree-root`,children:m(`div`,{class:`tooltip-tree-children`,children:e.node.children.map(nn.bind(null,e,1))})});return m(`div`,{class:`seams-tx-tree`,"data-theme":e.theme,children:e.showShadow?m(`div`,{class:`tooltip-border-outer`,children:t}):t})}var an=class extends f{static contextType=O;state={mode:this.props.node.contentVariants?.defaultMode===`raw`?`raw`:`decoded`,copied:!1};id=`seams-tree-node-${++$t}`;details=d();shell=d();disposed=!1;copiedTimer=null;frame=null;motionTimer=null;motion=null;modeHeight=null;componentDidUpdate(e){if(e.styles!==this.props.styles&&e.styles.deleteDynamicRule(this.id),this.modeHeight!==null&&this.shell.current){let e=this.shell.current,t=this.modeHeight;this.modeHeight=null,e.classList.remove(...U);let n=e.getBoundingClientRect().height;e.classList.add(...U),H({reason:`${this.props.node.id}:file-content-mode`,element:e,drivenClasses:U,fromCssPx:t,toCssPx:n,setHeightCssPx:this.setHeight,onSettled:this.releaseHeight})||(e.classList.remove(...U),this.releaseHeight())}}componentWillUnmount(){this.disposed=!0,this.copiedTimer!==null&&clearTimeout(this.copiedTimer),this.motionTimer!==null&&clearTimeout(this.motionTimer),this.frame!==null&&this.details.current?.ownerDocument.defaultView?.cancelAnimationFrame(this.frame),this.motion?.body.removeEventListener(`transitionend`,this.onTransitionEnd),this.motion=null,this.releaseHeight()}setHeight=e=>{this.disposed||this.props.styles.setDynamicDeclarations(this.id,`#${this.id}`,{"--seams-tree__anim-target":`${e}px`})};releaseHeight=()=>{this.props.styles.deleteDynamicRule(this.id)};clearCopied=()=>{this.copiedTimer=null,this.disposed||this.setState({copied:!1})};copy=async e=>{e.preventDefault(),e.stopPropagation();let t=this.props.node.copyValue;if(!t)return;let n=e.currentTarget.closest(`.seams-tx-tree`);if(n)try{if(!await pe(n,t)||this.disposed)return;this.copiedTimer!==null&&clearTimeout(this.copiedTimer),this.setState({copied:!0}),this.copiedTimer=setTimeout(this.clearCopied,2e3),this.props.onCopy?.(t)}catch{}};toggleMode=e=>{e.preventDefault(),e.stopPropagation(),tn(this.props.node)&&(this.shell.current&&(this.modeHeight=this.shell.current.getBoundingClientRect().height,this.setHeight(this.modeHeight),this.shell.current.classList.add(...U)),this.setState({mode:this.state.mode===`decoded`?`raw`:`decoded`}))};toggle=e=>{if(e.target.closest(`a, button`)){e.stopPropagation();return}e.preventDefault(),e.stopPropagation();let t=this.details.current;if(!t||this.motion)return;let n=t.querySelector(`:scope > .folder-children`),r=!t.open,i=t.ownerDocument.defaultView.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(!n||i){t.open=r,this.props.onToggle?.(this.props.node.id,r);return}this.motion={body:n,open:r};let a=r?0:n.getBoundingClientRect().height;this.setHeight(a),n.classList.add(`anim-h`,`anim-h-active`,`anim-h-hold`),t.open=!0,n.offsetHeight,this.frame=t.ownerDocument.defaultView.requestAnimationFrame(this.startMotion)};startMotion=()=>{if(this.frame=null,!this.motion||this.disposed)return;let{body:e,open:t}=this.motion,n=e.getBoundingClientRect().height,r=t?e.scrollHeight:0;H({reason:this.props.node.id,element:e,drivenClasses:U,fromCssPx:n,toCssPx:r,setHeightCssPx:this.setHeight,onSettled:this.finishMotion})||(e.addEventListener(`transitionend`,this.onTransitionEnd),e.classList.remove(`anim-h-hold`),this.setHeight(r),this.motionTimer=setTimeout(this.finishMotion,t?200:250))};onTransitionEnd=e=>{e.target===this.motion?.body&&e.propertyName===`height`&&this.finishMotion()};finishMotion=()=>{if(this.disposed||!this.motion)return;let{body:e,open:t}=this.motion;this.motion=null,this.motionTimer!==null&&clearTimeout(this.motionTimer),this.motionTimer=null,e.removeEventListener(`transitionend`,this.onTransitionEnd),e.classList.remove(...Qt),this.details.current&&(this.details.current.open=t),this.releaseHeight(),this.props.onToggle?.(this.props.node.id,t)};label(e){let t=this.props.node;return m(`span`,{class:`label${t.type===`file`?` label-action-node`:``}`,hidden:t.hideLabel,children:[e&&!t.hideChevron&&m(en,{}),m(`span`,{class:`label-text`,title:k(this.context,Xt(t)),children:m(Zt,{node:t,explorers:this.props.explorers})}),t.type===`file`&&t.copyValue&&m(`button`,{type:`button`,class:`copy-badge`,"data-copied":String(this.state.copied),onClick:this.copy,title:k(this.context,this.state.copied?`Copied`:`Copy`),children:this.state.copied?`copied`:`copy`})]})}render(){let{node:e,depth:t}=this.props,n=`row summary-row depth-${Math.max(0,t-1)}`;if(e.type===`file`&&!e.content)return m(`div`,{id:this.id,class:`row file-row depth-${Math.max(0,t-1)}`,"data-no-elbow":String(!!e.hideLabel),children:[m(`span`,{class:`indent`}),this.label(!1)]});let r=tn(e),i=r&&e.contentVariants?e.contentVariants[this.state.mode]:e.content,a=this.state.mode===`decoded`?`bytes`:`decoded`;return m(`details`,{id:this.id,ref:this.details,class:`tree-node ${e.type}`,open:!!e.open,"data-node-id":e.id,children:[m(`summary`,{class:n,"data-no-elbow":String(!!e.hideLabel),onClick:this.toggle,children:[m(`span`,{class:`indent`}),this.label(!0),e.type===`file`&&m(`div`,{ref:this.shell,class:`file-content-shell${r?` has-mode-toggle`:``}`,children:[r&&m(`button`,{type:`button`,class:`file-content-mode-toggle`,title:k(this.context,`Show ${a}`),"aria-label":k(this.context,`Show ${a}`),onClick:this.toggleMode,children:m(E,{copy:a})}),m(`div`,{class:`file-content`,children:i})]})]}),e.type===`folder`&&!!e.children?.length&&m(`div`,{class:`folder-children`,children:e.children.map(nn.bind(null,this.props,t+1))})]})}};let on=0;function sn(e){e.stopPropagation()}var cn=class extends f{static contextType=O;state={armed:!1};id=`seams-confirm-content-${++on}`;root=d();reflow;frame=null;capturedBeforeUpdate=!1;reflowEnabled=!0;constructor(e){super(e),this.reflow=Ot({reason:`tx-body`,element:this.getReflowElement,setHeightCssPx:this.setHeight})}getReflowElement=()=>{let e=this.root.current;return e?.closest(`.modal-container-root, .seams-confirmation-drawer`)??e};setHeight=e=>{let t=this.getReflowElement(),n=t?.id?`#${t.id}`:`#${this.id}`;this.props.styles.setDynamicDeclarations(this.id,n,{[Et]:`${e}px`})};componentDidMount(){this.reflowEnabled=this.getReflowElement()===this.root.current,this.frame=this.root.current.ownerDocument.defaultView.requestAnimationFrame(this.afterFirstPaint)}afterFirstPaint=()=>{this.frame=this.root.current.ownerDocument.defaultView.requestAnimationFrame(this.arm)};arm=()=>{this.frame=null,this.setState({armed:!0})};componentWillReceiveProps(){this.reflowEnabled&&(this.reflow.capture(),this.capturedBeforeUpdate=!0)}componentWillUpdate(){this.reflowEnabled&&(this.capturedBeforeUpdate||this.reflow.capture())}componentDidUpdate(e){this.reflowEnabled&&(this.capturedBeforeUpdate=!1,e.styles!==this.props.styles&&e.styles.deleteDynamicRule(this.id),this.reflow.commit())}componentWillUnmount(){this.frame!==null&&this.root.current?.ownerDocument.defaultView?.cancelAnimationFrame(this.frame),this.frame=null,this.reflow.dispose(),this.props.styles.deleteDynamicRule(this.id)}confirm=()=>{this.state.armed&&this.props.decision.kind===`ready`&&this.props.decision.onConfirm()};cancel=()=>{this.props.onCancel()};render(){let e=this.props.decision.kind===`preparing`;return m(`div`,{class:`seams-tx-confirm-content`,onPointerDown:sn,onMouseDown:sn,onTouchStart:sn,children:m(`div`,{id:this.id,ref:this.root,class:`txc-root`,children:[this.props.errorMessage&&m(`div`,{class:`error`,role:`alert`,children:m(E,{copy:this.props.errorMessage})}),this.props.tree&&m(`div`,{class:`tooltip-width`,children:m(rn,{node:this.props.tree,theme:this.props.theme,explorers:this.props.explorers,styles:this.props.styles,showShadow:!1,onToggle:this.props.onTreeToggle,onCopy:this.props.onCopy})}),this.props.authMethodApprovalMessage&&m(`p`,{class:`seams-voiceid-instructions`,"data-seams-voice-id":`required`,role:`status`,children:this.props.authMethodApprovalMessage}),m(`div`,{class:`actions`,children:[!this.props.cancelInHeader&&m(`button`,{type:`button`,class:`cancel`,onClick:this.cancel,children:m(E,{copy:this.props.cancelText})}),m(`button`,{type:this.props.decision.kind===`form`?`submit`:`button`,form:this.props.decision.kind===`form`?this.props.decision.formId:void 0,class:`confirm${e?` loading`:``}`,onClick:this.confirm,disabled:e||!this.state.armed,children:e?m(h,{children:[m(`span`,{class:`loading-indicator`,role:`progressbar`,"aria-label":T(this.context,`Loading`)}),m(`span`,{children:m(E,{message:`Loading...`})})]}):m(h,{children:[this.props.confirmIcon,m(E,{copy:this.props.confirmText})]})})]})]})})}};function ln(e){throw Error(`Unexpected confirmation body: ${String(e)}`)}var un=class extends f{static contextType=O;copy=()=>{this.props.model.kind===`funding`&&this.props.onCopyAccount(this.props.model.accountId)};render(){let e=this.props.model;switch(e.kind){case`empty`:return null;case`text`:return m(`div`,{class:`confirmation-body`,children:m(E,{copy:e.text})});case`status`:return m(`div`,{class:`confirmation-body confirmation-body--status`,children:m(E,{copy:e.text})});case`funding`:return m(`div`,{class:`confirmation-body confirmation-body--funding`,children:[m(E,{message:`NEAR account`}),m(`button`,{type:`button`,class:`confirmation-body__copy-target`,title:k(this.context,`Copy ${e.accountId}`),"aria-label":k(this.context,`Copy NEAR account ${e.accountId}`),onClick:this.copy,children:e.shortAccountId}),m(E,{message:`needs funding`})]});default:return ln(e)}}};function dn(e){let t=w();return m(`div`,{class:`passkey-registration-confirm__identity`,"aria-label":T(t,`Passkey registration details`),children:[m(`div`,{class:`passkey-registration-confirm__row`,children:[m(`span`,{class:`passkey-registration-confirm__label`,children:m(E,{message:`Account`})}),m(`span`,{class:`passkey-registration-confirm__value`,title:k(t,e.display.intendedUserName),children:e.display.intendedUserName})]}),m(`div`,{class:`passkey-registration-confirm__row`,children:[m(`span`,{class:`passkey-registration-confirm__label`,children:m(E,{message:`Website`})}),m(`span`,{class:`passkey-registration-confirm__value`,title:k(t,e.display.rpId),children:e.display.rpId})]})]})}var fn=class extends f{static contextType=O;confirm=()=>{this.props.decision.kind===`ready`&&this.props.decision.onConfirm()};cancel=()=>{this.props.onCancel()};render(){let e=this.props.decision.kind===`creating`;return m(`div`,{ref:this.props.root,class:`passkey-registration-confirm`,children:[m(`div`,{class:`hero passkey-registration-confirm__hero`,children:[m(Vt,{animated:!this.props.errorMessage,icon:`fingerprint`,size:44,styles:this.props.styles}),m(`div`,{class:`hero-container passkey-registration-confirm__hero-copy`,children:[m(`h2`,{class:`hero-heading`,children:m(E,{copy:this.props.heading})}),m(`p`,{class:`passkey-registration-confirm__body`,children:m(E,{copy:this.props.body})})]})]}),this.props.errorMessage&&m(`div`,{class:`error-banner`,children:m(E,{copy:this.props.errorMessage})}),m(dn,{display:this.props.display}),m(`div`,{class:`passkey-registration-confirm__actions`,children:[m(`button`,{type:`button`,class:`btn btn-cancel`,onClick:this.cancel,children:m(E,{copy:this.props.cancelText})}),m(`button`,{type:`button`,class:`btn btn-confirm`,disabled:e,onClick:this.confirm,children:e?m(h,{children:[m(`span`,{class:`loading-indicator passkey-registration-confirm__spinner`,role:`progressbar`,"aria-label":T(this.context,`Creating passkey`)}),m(`span`,{class:`passkey-registration-confirm__busy-label`,children:m(E,{message:`Creating passkey...`})})]}):m(E,{message:`Create passkey`})})]})]})}};let pn=0;var mn=class extends f{id=`seams-email-code-${++pn}`;input=e=>{this.props.state.kind===`editing`&&this.props.state.onInput(e.currentTarget.value)};resend=()=>{this.props.resend?.kind===`available`&&this.props.resend.onResend()};renderDigit=e=>{let t=this.props.code[e]||``;return m(`span`,{class:`email-otp-confirm__slot${t?` is-filled`:``}`,children:t},e)};render(){let e=this.props.state.kind!==`editing`,t=`${this.id}-helper`,n=`${this.id}-error`;return m(`div`,{class:`email-otp-confirm`,children:[m(`label`,{class:`email-otp-confirm__label`,for:this.id,children:m(E,{message:`Email code`})}),m(`div`,{class:`email-otp-confirm__code-field`,"data-disabled":e?`true`:`false`,children:[m(`input`,{id:this.id,name:`email-code`,type:`text`,class:`email-otp-confirm__input`,inputMode:`numeric`,autoComplete:`one-time-code`,"data-email-otp-challenge-id":this.props.challengeId,pattern:`[0-9]*`,maxLength:6,spellcheck:!1,value:this.props.code,disabled:e,onInput:this.input,"aria-invalid":this.props.errorMessage?`true`:void 0,"aria-describedby":this.props.errorMessage?`${t} ${n}`:t}),m(`div`,{class:`email-otp-confirm__slots${e?` is-submitting`:``}`,"aria-hidden":`true`,children:[0,1,2,3,4,5].map(this.renderDigit)})]}),m(`div`,{id:t,class:`email-otp-confirm__helper`,children:m(E,{copy:this.props.helperText})}),this.props.errorMessage&&m(`div`,{id:n,class:`email-otp-confirm__error`,children:m(E,{copy:this.props.errorMessage})}),this.props.resend&&m(`button`,{type:`button`,class:`email-otp-confirm__resend`,disabled:this.props.resend.kind===`unavailable`,onClick:this.resend,children:m(E,{copy:this.props.resend.label})})]})}},hn=class{codeState={kind:`editing`,code:``};resendState={kind:`available`,label:`Resend code`};error=``;countdown=null;options;constructor(e){this.options=e}input=e=>{if(this.codeState.kind!==`editing`)return;let t=e.replace(/\D/g,``).slice(0,6);this.error=``,this.codeState={kind:`editing`,code:t},t.length===6?this.confirm():this.publish()};confirm(){if(this.codeState.kind!==`editing`)return`ignored`;let e=this.codeState.code;return e.length===6?(this.error=``,this.codeState={kind:`fading`,code:e,timer:setTimeout(this.submit,150)},this.publish(),`accepted`):(this.error=`Enter the 6-digit Email OTP code.`,this.publish(),`invalid`)}submit=()=>{if(this.codeState.kind!==`fading`)return;let e=this.codeState.code;this.codeState={kind:`submitting`,code:e},this.publish(),this.isDisposed()||this.options.onSubmit(e)};retry(e){this.codeState.kind!==`disposed`&&(this.cancelFade(),this.codeState={kind:`editing`,code:this.codeState.code},this.error=e,this.publish())}setVerification(e){if(this.codeState.kind!==`disposed`)switch(e.kind){case`ready`:this.codeState.kind===`submitting`&&this.retry(``);return;case`pending`:this.cancelFade(),this.codeState={kind:`submitting`,code:this.codeState.code},this.publish();return;case`rejected`:this.retry(e.message);return}}resend=async()=>{if(this.codeState.kind!==`editing`||this.resendState.kind!==`available`)return;let e=this.options.resend;if(!e)return;let t=Date.now()+e.cooldownMs,n={kind:`sending`,until:t};if(this.resendState=n,this.error=``,this.publish(),this.isDisposed())return;let r;try{r=await e.send()}catch{r={kind:`failed`,message:`Could not send code.`}}if(this.isDisposed()||this.resendState!==n)return;let i=r.kind===`sent`?`Code sent`:`Resend code`;r.kind===`failed`&&(this.error=r.message),Date.now()>=t?this.resendState={kind:`available`,label:i}:(this.resendState={kind:`cooldown`,until:t,label:i},this.countdown=setInterval(this.tick,250)),this.publish()};tick=()=>{this.resendState.kind===`cooldown`&&(Date.now()>=this.resendState.until&&(this.resendState={kind:`available`,label:this.resendState.label},this.clearCountdown()),this.publish())};isDisposed(){return this.codeState.kind===`disposed`}publish(){this.codeState.kind!==`disposed`&&this.options.onChange({code:this.codeState.code,phase:this.codeState.kind,error:this.error,resend:this.options.resend?this.resendSnapshot():null})}resendSnapshot(){switch(this.resendState.kind){case`available`:return{available:this.codeState.kind===`editing`,label:this.resendState.label};case`sending`:return{available:!1,label:`Sending...`};case`cooldown`:return{available:!1,label:`Resend in ${Math.max(1,Math.ceil((this.resendState.until-Date.now())/1e3))}s`}}}cancelFade(){this.codeState.kind===`fading`&&clearTimeout(this.codeState.timer)}clearCountdown(){this.countdown!==null&&clearInterval(this.countdown),this.countdown=null}dispose(){this.cancelFade(),this.clearCountdown(),this.codeState={kind:`disposed`},this.error=``}};function gn(e){return m(_n,{...e},e.prompt.challengeId)}var _n=class extends f{static contextType=O;session;form=d();lifetime;constructor(e){super(e),this.lifetime={kind:`active`,challengeId:e.prompt.challengeId,emailHint:e.prompt.emailHint?.trim()||``},this.state={code:``,phase:`editing`,error:``,resend:e.prompt.onResend?{available:!0,label:`Resend code`}:null},this.session=new hn({onSubmit:this.submit,onChange:this.change,resend:e.prompt.onResend?{send:this.send,cooldownMs:Math.max(1e3,Math.floor(Number(e.prompt.resendDebounceMs)||1e4))}:null})}submit=e=>{this.lifetime.kind===`active`&&this.props.onSubmit(e,this.lifetime.challengeId)};send=async()=>{let e=this.props.prompt.onResend;if(!e)return{kind:`failed`,message:`Could not send code.`};try{let t=await e();if(this.lifetime.kind===`disposed`)return{kind:`sent`};let n=String(t?.challengeId||``).trim(),r=String(t?.emailHint||``).trim();return n&&(this.lifetime={kind:`active`,challengeId:n,emailHint:r||this.lifetime.emailHint}),{kind:`sent`}}catch(e){return{kind:`failed`,message:yn(e)}}};change=e=>{this.setState(e)};confirm=e=>{e.preventDefault(),e.stopPropagation(),this.session.confirm()===`invalid`&&this.setState({},this.focusCode)};focusCode=()=>{this.form.current?.querySelector(`input`)?.focus({preventScroll:!0})};componentDidMount(){this.session.setVerification(this.props.verification)}componentDidUpdate(e){vn(e.verification,this.props.verification)&&this.session.setVerification(this.props.verification)}componentWillUnmount(){this.lifetime={kind:`disposed`},this.session.dispose()}inputState(){switch(this.state.phase){case`editing`:return{kind:`editing`,onInput:this.session.input};case`fading`:return{kind:`fading`};case`submitting`:return{kind:`submitting`}}}resendAction(){let e=this.state.resend;return e?e.available?{kind:`available`,label:e.label,onResend:this.session.resend}:{kind:`unavailable`,label:e.label}:null}render(){return m(`form`,{ref:this.form,id:this.props.formId,onSubmit:this.confirm,noValidate:!0,children:m(mn,{challengeId:this.lifetime.kind===`active`?this.lifetime.challengeId:``,code:this.state.code,helperText:this.props.prompt.helperText?.trim()||oe(this.lifetime.kind===`active`?this.lifetime.emailHint:``),errorMessage:k(this.context,this.state.error||void 0),state:this.inputState(),resend:this.resendAction()})})}};function vn(e,t){return e.kind===t.kind?e.kind===`rejected`&&t.kind===`rejected`&&e.message!==t.message:!0}function yn(e){if(e&&typeof e==`object`&&`code`in e&&e.code===`rate_limited`){let t=`retryAfterMs`in e?Number(e.retryAfterMs):NaN;return Number.isFinite(t)&&t>0?`Too many requests. Try again in ${Math.max(1,Math.ceil(t/1e3))}s.`:`Too many requests. Try again shortly.`}return e instanceof Error&&e.message?e.message:`Could not send code.`}let bn=0;var xn=class extends f{root=d();id=`seams-review-disclosure-${++bn}`;componentDidMount(){this.root.current&&(this.root.current.open=this.props.initiallyOpen??!1)}motion=null;componentWillUnmount(){this.clearMotion(),this.root.current&&D(this.root.current.ownerDocument).deleteDynamicRule(this.id)}clearMotion(){this.motion&&(this.motion.kind===`local`&&(this.motion.size.onfinish=null,this.motion.size.cancel(),this.motion.fade.cancel()),this.motion=null,this.root.current?.removeAttribute(`data-resizing`))}setHeight=e=>{let t=this.root.current;t&&D(t.ownerDocument).setDynamicDeclarations(this.id,`#${this.id}`,{"--seams-review-disclosure-height":`${e}px`})};finish=()=>{let e=this.motion?.kind===`local`;if(this.root.current&&this.motion&&(this.root.current.open=this.motion.opening,this.root.current.removeAttribute(`data-closing`)),this.clearMotion(),e){let e=this.root.current?.closest(`.seams-confirmation-surface`),t=e?.ownerDocument.activeElement;if(t instanceof HTMLElement&&t.tabIndex>=0&&e?.contains(t)){let e=t.getBoundingClientRect(),n=t.ownerDocument.documentElement.clientHeight;(e.top<0||e.bottom>n)&&t.scrollIntoView({block:`center`,inline:`nearest`})}}};toggle=e=>{let t=this.root.current;if(!t||(e.preventDefault(),this.motion?.kind===`hosted`))return;let n=this.motion?!this.motion.opening:!t.open,r=t.lastElementChild;if(!(r instanceof HTMLElement))return;let i=t.open?r.getBoundingClientRect().height:0;if(this.clearMotion(),t.toggleAttribute(`data-closing`,!n),window.matchMedia(`(prefers-reduced-motion: reduce)`).matches||!t.animate){t.open=n,t.removeAttribute(`data-closing`);return}t.open=!0,t.setAttribute(`data-resizing`,``);let a=n?r.scrollHeight:0;if(this.motion={kind:`hosted`,opening:n},H({element:r,reason:`review-details`,fromCssPx:i,toCssPx:a,drivenClasses:[`seams-review-disclosure-driven`],setHeightCssPx:this.setHeight,onSettled:this.finish}))return;let o=r.animate([{height:`${i}px`,overflow:`hidden`},{height:`${a}px`,overflow:`hidden`}],{duration:n?220:180,easing:`cubic-bezier(.2,0,0,1)`,fill:`both`});this.motion={kind:`local`,opening:n,size:o,fade:r.animate(n?[{opacity:0},{opacity:1}]:[{opacity:1},{opacity:0}],{duration:n?180:100,easing:`ease-out`,fill:`both`})},o.onfinish=this.finish};render(){return m(`details`,{ref:this.root,class:`seams-review-${this.props.kind??`technical`}`,children:[m(`summary`,{onClick:this.toggle,children:[m(E,{copy:this.props.label}),m(`svg`,{class:`seams-review-caret`,viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:m(`path`,{d:`m5 7.5 5 5 5-5`})})]}),m(`div`,{id:this.id,children:this.props.children})]})}};function W({kind:e}){let t={back:`m15 6-6 6 6 6`,close:`M6 6l12 12M6 18L18 6`,minimize:`M5 12h14`,check:`m5 12 4 4L19 6`,arrow:`M7 17 17 7M7 7h10v10`,copy:`M8 8h12v12H8ZM4 16V4h12`,loader:`M12 3a9 9 0 1 1-9 9`,alert:`M12 8v5m0 3v.1M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0`,fingerprint:`M6.405 19.048c.184-.443.353-.894.507-1.351M14.343 20.693c.266-.751.502-1.516.707-2.294.186-.706.346-1.422.478-2.147M19.448 17.058c.364-1.964.555-3.989.555-6.058 0-4.418-3.582-8-8-8-1.255 0-2.443.289-3.501.805M3.523 15.025c.314-1.29.48-2.638.48-4.025 0-1.74.556-3.351 1.499-4.664M12.003 11c0 2.76-.447 5.416-1.273 7.899-.213.639-.451 1.266-.712 1.881M7.712 14.5c.191-1.138.291-2.308.291-3.5 0-2.209 1.791-4 4-4s4 1.791 4 4c0 .617-.02 1.229-.058 1.836`};return m(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:m(`path`,{d:t[e]})})}function Sn(e){return e?e.chain===`evm`&&e.chainId===5042?`Arc`:e.chain===`evm`&&e.chainId===5042002?`Arc Testnet`:e.chain===`evm`&&e.chainId===8453?`Base`:e.chain===`evm`&&e.chainId===84532?`Base Sepolia`:e.chain===`evm`&&e.chainId===1?`Ethereum`:e.chain===`evm`&&e.chainId===11155111?`Ethereum Sepolia`:`${e.chain.toUpperCase()}${e.chainId?` · ${e.chainId}`:``}`:`Wallet transaction`}function Cn(e){if(e?.operations.length!==1)return null;let t=e.operations[0];return t.kind===`generic.contractCall`||t.kind===`tempo.eip2718`?t.to??null:null}function wn({value:e,class:t}){let n=w();return m(`bdi`,{class:`seams-review-middle ${t}`,dir:`ltr`,title:k(n,e),children:[m(`span`,{children:e.slice(0,-8)}),m(`span`,{children:e.slice(-8)})]})}function Tn({symbol:e}){return e===`NEAR`?m(`svg`,{class:`seams-review-token`,viewBox:`0 0 48 48`,"aria-hidden":`true`,children:[m(`circle`,{cx:`24`,cy:`24`,r:`24`,fill:`#000`}),m(`svg`,{x:`9`,y:`9`,width:`30`,height:`30`,viewBox:`108 108 351 351`,children:m(`path`,{d:`m421.61,108c-13,0-25.07,6.74-31.88,17.82l-73.37,108.93c-2.39,3.59-1.42,8.43,2.17,10.82,2.91,1.94,6.76,1.7,9.41-.58l72.22-62.64c1.2-1.08,3.05-.97,4.13.23.49.55.75,1.26.75,1.99v196.12c0,1.62-1.31,2.92-2.93,2.92-.87,0-1.69-.38-2.24-1.05L181.56,121.24c-7.11-8.39-17.55-13.23-28.54-13.24h-7.63c-20.65,0-37.39,16.74-37.39,37.39v276.22c0,20.65,16.74,37.39,37.39,37.39,13,0,25.07-6.74,31.88-17.82l73.37-108.93c2.39-3.59,1.42-8.43-2.17-10.82-2.91-1.94-6.76-1.7-9.41.58l-72.22,62.64c-1.2,1.08-3.05.97-4.13-.23-.49-.55-.75-1.26-.74-1.99v-196.17c0-1.62,1.31-2.92,2.93-2.92.86,0,1.69.38,2.24,1.05l218.28,261.37c7.11,8.39,17.55,13.23,28.54,13.24h7.63c20.65.01,37.4-16.72,37.42-37.37V145.39c0-20.65-16.74-37.39-37.39-37.39Z`,fill:`#fff`})})]}):e===`ETH`?m(`svg`,{class:`seams-review-token`,viewBox:`0 0 42 42`,"aria-hidden":`true`,children:[m(`circle`,{cx:`21`,cy:`21`,r:`21`,fill:`#eef0fb`}),m(`path`,{d:`m21 6-9 15 9 5 9-5Z`,fill:`#627eea`}),m(`path`,{d:`m21 6 9 15-9 5Z`,fill:`#465da9`}),m(`path`,{d:`m12 23 9 13 9-13-9 5Z`,fill:`#627eea`})]}):e===`USDC`?m(`svg`,{class:`seams-review-token`,viewBox:`0 0 96 96`,fill:`none`,"aria-hidden":`true`,children:[m(`path`,{d:`M48 95C73.9574 95 95 73.9574 95 48C95 22.0426 73.9574 1 48 1C22.0426 1 1 22.0426 1 48C1 73.9574 22.0426 95 48 95Z`,fill:`#0B53BF`}),m(`path`,{d:`M56.4609 13.7778V19.8291C68.5341 23.4716 77.3759 34.6928 77.3759 47.9997C77.3759 61.3066 68.5341 72.5278 56.4609 76.1703V82.2216C71.8534 78.4616 83.2509 64.5672 83.2509 47.9997C83.2509 31.4322 71.8534 17.5378 56.4609 13.7778Z`,fill:`white`}),m(`path`,{d:`M18.625 47.9997C18.625 34.6928 27.4669 23.4716 39.54 19.8291V13.7778C24.1475 17.5378 12.75 31.4322 12.75 47.9997C12.75 64.5672 24.1475 78.4616 39.54 82.2216V76.1703C27.4669 72.5572 18.625 61.3066 18.625 47.9997Z`,fill:`white`}),m(`path`,{d:`M60.6319 54.5506C60.6319 42.5362 41.8025 47.4713 41.8025 40.8325C41.8025 38.4531 43.7119 36.9256 47.3544 36.9256C51.7019 36.9256 53.2 39.0406 53.67 41.89H59.6625C59.1279 36.5426 56.0588 33.1662 50.9382 32.1604V27.4375H45.0632V31.9918C39.4534 32.7062 35.9275 35.973 35.9275 40.8325C35.9275 52.9056 54.7863 48.3819 54.7863 54.9031C54.7863 57.3706 52.4069 59.0156 48.3825 59.0156C43.1244 59.0156 41.3913 56.695 40.745 53.4931H34.8994C35.2781 59.3502 38.8897 63.0159 45.0632 63.9307V68.5625H50.9382V63.9923C56.9633 63.2139 60.6319 59.7089 60.6319 54.5506Z`,fill:`white`})]}):m(`span`,{class:`seams-review-token seams-review-token-fallback`,"aria-hidden":`true`,children:e.slice(0,1)})}function En({model:e,compact:t=!1}){let n=kn(e);return n?m(`div`,{class:`seams-review-amount${t?` seams-review-amount--compact`:``}`,children:[m(Tn,{symbol:n.symbol}),m(`div`,{children:[m(`span`,{children:n.value}),` `,m(`small`,{children:n.symbol})]})]}):null}function Dn(){return m(`div`,{class:`seams-receipt-footer`,children:[m(`span`,{children:m(E,{message:`Secured by`})}),` `,m(_,{})]})}function On(e,t){if(!/^\d+$/.test(e))return e;let n=e.padStart(t+1,`0`),r=n.slice(-t).replace(/0+$/,``);return`${n.slice(0,-t)}${r?`.${r}`:``}`}function kn(e){let t=e?.totals;return t?.nativeValue?t.nativeSymbol===`yoctoNEAR`?{value:On(t.nativeValue,24),symbol:`NEAR`}:e?.chain===`evm`&&(e.chainId===5042||e.chainId===5042002)&&t.nativeSymbol===`wei`?{value:On(t.nativeValue,18),symbol:`USDC`}:{value:t.nativeValue,symbol:t.nativeSymbol??``}:null}var G=class extends f{static contextType=O;state={copied:!1};lifetime=new AbortController;timer=null;resetCopied=()=>{this.setState({copied:!1})};componentWillUnmount(){this.lifetime.abort(),this.timer!==null&&clearTimeout(this.timer)}componentDidUpdate(e){e.value!==this.props.value&&(this.lifetime.abort(),this.lifetime=new AbortController,this.timer!==null&&clearTimeout(this.timer),this.resetCopied())}copy=async e=>{let t=e.currentTarget;if(!(t instanceof HTMLElement))return;let n=this.lifetime.signal;try{if(!await pe(t,this.props.value,n)||n.aborted)return;this.setState({copied:!0}),this.timer!==null&&clearTimeout(this.timer),this.timer=setTimeout(this.resetCopied,3e3)}catch{n.aborted||this.setState({copied:!1})}};render(){return m(`button`,{type:`button`,class:`seams-review-copy${this.props.address?` seams-review-copy-address`:``}${this.state.copied?` copied`:``}`,onClick:this.copy,"aria-label":k(this.context,this.state.copied?`Copied`:this.props.label??`Copy value`),children:[this.props.address&&m(`bdi`,{class:`seams-review-full-address`,dir:`ltr`,children:this.props.value}),m(he,{})]})}};function An({node:e}){let t=w();if(e.action||e.transaction)return m(h,{children:m(E,{copy:Xt(e)})});let n=Jt(e);if(n&&e.contractAddress){let r=e.contractAddress;return m(`span`,{class:`seams-review-contract`,children:[m(E,{copy:n.trim()}),m(`span`,{class:`seams-review-contract-value`,children:[m(wn,{value:r,class:`seams-review-contract-address`}),m(G,{value:r,label:k(t,`Copy contract address ${r}`)})]})]})}if(e.fieldLabel){let t=e.label.slice(e.fieldLabel.length);return m(h,{children:[m(E,{copy:e.fieldLabel}),e.fieldLabel===`Method:`?m(`span`,{class:`seams-review-function`,children:t}):t]})}let r=/^(Call(?:ing)? )([^\s]+)(.*)$/.exec(e.label);return r?m(h,{children:[m(E,{copy:r[1]}),m(`span`,{class:`seams-review-function`,children:r[2]}),r[3]]}):m(h,{children:m(E,{copy:e.label})})}function jn({node:e}){let t=w(),n=e.contentVariants?.decoded??e.content,r=!!(e.contentVariants||n?.includes(`
2
- `));return m(`div`,{class:`seams-review-detail`,children:[m(`div`,{class:n?`seams-review-detail-row${r?` seams-review-detail-row--block`:``}`:`seams-review-detail-label`,children:[m(`span`,{children:m(An,{node:e})}),n&&m(`pre`,{children:n}),e.copyValue&&m(G,{value:e.copyValue})]}),e.contentVariants&&m(xn,{label:T(t,`Raw data`),kind:`raw`,children:m(`pre`,{children:e.contentVariants.raw})}),!!e.children?.length&&m(`div`,{class:`seams-review-detail-children`,children:e.children?.map(e=>m(jn,{node:e},e.id))})]})}function Mn({data:e,details:t=!0}){let n=w(),r=e.model,i=r?.operations[0],a=Cn(r);return m(`div`,{class:`seams-transaction-review`,children:[m(En,{model:r}),r?.warnings?.map(e=>m(`div`,{class:`seams-review-warning`,role:`alert`,children:m(E,{copy:e.message})},e.code)),m(`dl`,{class:`seams-review-fields`,children:[a&&m(`div`,{children:[m(`dt`,{children:m(E,{message:`To`})}),m(`dd`,{class:`seams-review-recipient`,children:m(G,{value:a,address:!0,label:k(n,`Copy recipient address ${a}`)})})]}),r&&m(`div`,{children:[m(`dt`,{children:m(E,{message:`Network`})}),m(`dd`,{children:[m(`span`,{class:`seams-review-network-dot`}),Sn(r)]})]}),r?.totals?.estimatedFee&&m(`div`,{children:[m(`dt`,{children:m(E,{message:`Estimated network fee`})}),m(`dd`,{children:[r.totals.estimatedFee,` `,r.totals.feeSymbol]})]})]}),t&&e.tree&&m(xn,{initiallyOpen:e.detailsInitiallyOpen,label:k(n,i?.kind===`near.message`?`Message details`:`Transaction details`),children:m(jn,{node:e.tree})}),r?.signerAccount&&m(`div`,{class:`seams-review-account`,children:[m(`span`,{class:`seams-review-avatar`,"aria-hidden":`true`,children:`S`}),m(`div`,{children:[m(E,{message:`Signing account`}),m(`small`,{children:m(G,{value:r.signerAccount,address:!0,label:k(n,`Copy signing account address ${r.signerAccount}`)})})]})]})]})}let Nn=0;var Pn=class extends f{static contextType=O;root=d();otpFormId=`seams-confirmation-email-${++Nn}`;reflowId=`seams-confirmation-content-surface-${Nn}`;getReflowElement=()=>this.root.current?.closest(`.modal-container-root, .seams-confirmation-drawer`)??null;setHeight=e=>{let t=this.getReflowElement();t?.id&&this.props.styles.setDynamicDeclarations(this.reflowId,`#${t.id}`,{[Et]:`${e}px`})};reflow=Ot({reason:`confirm-body`,element:this.getReflowElement,setHeightCssPx:this.setHeight});copyAccount=e=>{let t=this.root.current;t&&pe(t,e).catch(Fn)};componentWillReceiveProps(){this.reflow.capture()}componentDidUpdate(e){e.styles!==this.props.styles&&e.styles.deleteDynamicRule(this.reflowId),this.reflow.commit()}componentWillUnmount(){this.reflow.dispose(),this.props.styles.deleteDynamicRule(this.reflowId)}render(){let e=this.props.model;switch(e.kind){case`registration`:return m(fn,{...e.registration,root:this.root,styles:this.props.styles});case`transaction`:return this.renderTransaction(e);default:return In(e)}}renderTransaction(e){let t=this.props.variant===`drawer`?`seams-confirmation-content seams-confirmation-content--drawer`:`seams-confirmation-content`,n=e.prompt.kind===`email`&&e.transaction.decision.kind===`ready`?{kind:`form`,formId:this.otpFormId}:e.transaction.decision;return e.capture?m(`div`,{ref:this.root,class:t,children:m(`div`,{class:`seams-review-content seams-review-content--capture`,children:[this.props.variant!==`drawer`&&this.renderToolbar(e,n),m(Ln,{element:e.capture}),m(Dn,{})]})}):m(`div`,{ref:this.root,class:t,children:m(`div`,{class:`seams-review-content`,children:[this.props.variant!==`drawer`&&this.renderToolbar(e,n),e.review.model&&m(`div`,{class:`seams-review-eyebrow`,children:e.review.model.operations.length===1?m(E,{copy:e.review.model.operations[0].label.replace(/\s+using\s+[\d,.]+\s+gas$/i,``)}):m(E,{message:`Transaction`})}),m(`h2`,{class:`seams-review-title`,children:m(E,{copy:e.header.heading})}),m(Mn,{data:e.review}),m(`div`,{class:`seams-review-context`,children:[m(un,{model:e.body,onCopyAccount:this.copyAccount}),e.prompt.kind===`email`&&m(gn,{...e.prompt.email,formId:this.otpFormId})]}),m(cn,{...e.transaction,tree:null,styles:this.props.styles,decision:n,cancelInHeader:!0,confirmIcon:e.prompt.kind===`passkey`?m(W,{kind:`fingerprint`}):void 0}),m(Dn,{})]})})}renderToolbar(e,t){return m(`div`,{class:`seams-review-toolbar`,children:[m(`div`,{class:`seams-review-origin`,children:[e.transaction.onBack&&m(`button`,{type:`button`,"aria-label":T(this.context,`Back to review`),title:T(this.context,`Back to review`),disabled:t.kind===`preparing`,onClick:e.transaction.onBack,children:m(W,{kind:`back`})}),m(Rt,{}),e.header.website.kind===`ready`?e.header.website.text:m(Wt,{label:T(this.context,`Loading website`)})]}),m(`button`,{type:`button`,"aria-label":k(this.context,e.transaction.cancelText),onClick:e.transaction.onCancel,children:m(W,{kind:`close`})})]})}};function Fn(){}function In(e){throw Error(`Unexpected confirmation content: ${String(e)}`)}var Ln=class extends f{container=d();componentDidMount(){this.container.current?.append(this.props.element),this.props.element.querySelector(`button`)?.focus()}componentDidUpdate(e){e.element!==this.props.element&&this.container.current?.replaceChildren(this.props.element)}componentWillUnmount(){this.props.element.remove()}render(){return m(`div`,{ref:this.container,class:`seams-auth-method-capture`})}};function Rn(e){let{kind:t}=e.state;return t===`signing`||t===`broadcasting`||t===`submitted`}function zn(e){return e.state.kind===`confirmed`||e.state.kind===`signed`}function Bn(e){if(e.subject===`message`)return e.state.kind===`signed`?3:0;let{state:t}=e;switch(t.kind){case`signing`:return 0;case`signed`:case`broadcasting`:return 1;case`submitted`:case`reverted`:return 2;case`confirmed`:return 3;case`failed`:case`unknown`:return t.hash?2:0;default:return K(t)}}function Vn(e){return e.subject===`message`?`Message signature`:`Transaction receipt`}function Hn(e){if(e.subject===`message`)return Wn(e.state);let{state:t}=e;switch(t.kind){case`signing`:return`Signing transaction`;case`signed`:return`Signature ready`;case`broadcasting`:return`Broadcasting transaction`;case`submitted`:return`Waiting for confirmation`;case`confirmed`:return`Transaction complete`;case`failed`:return`Transaction failed`;case`reverted`:return`Transaction reverted`;case`unknown`:return`Confirmation unavailable`;default:return K(t)}}function Un(e){if(e.subject===`message`)return Gn(e.state);let{state:t}=e;switch(t.kind){case`signing`:return`Preparing your signed transaction.`;case`signed`:return`Signature created, ready to broadcast.`;case`broadcasting`:return`Submitting your signed transaction to the network.`;case`submitted`:return`Submitted to the network. Waiting for the receipt.`;case`confirmed`:return`The network confirmed your transaction.`;case`failed`:case`reverted`:case`unknown`:return t.message;default:return K(t)}}function Wn(e){switch(e.kind){case`signing`:return`Signing message`;case`signed`:return`Message signed`;case`failed`:return`Signature failed`;default:return K(e)}}function Gn(e){switch(e.kind){case`signing`:return`Preparing your message signature.`;case`signed`:return`Signed off-chain. Nothing was sent to the network.`;case`failed`:return e.message;default:return K(e)}}function K(e){throw Error(`Unexpected transaction receipt state: ${String(e)}`)}const Kn=`cubic-bezier(0.22, 1, 0.36, 1)`;let qn=0;var Jn=class extends f{static contextType=O;explorerRow=d();explorerRowId=`seams-receipt-explorer-row-${++qn}`;minimize=()=>{this.props.receipt.onView(`toast`)};expand=()=>{this.props.receipt.onView(`expanded`)};close=()=>{Rn(this.props.receipt)?this.minimize():this.props.receipt.onDismiss()};componentDidUpdate(e){let{receipt:t}=this.props;t.view===`expanded`&&e.receipt.view===`expanded`&&t.subject===`transaction`&&t.state.kind===`confirmed`&&e.receipt.state.kind!==`confirmed`&&this.revealExplorerLink()}componentWillUnmount(){this.releaseExplorerRow()}setExplorerRowHeight=e=>{let t=this.explorerRow.current;t&&D(t.ownerDocument).setDynamicDeclarations(this.explorerRowId,`#${this.explorerRowId}`,{"--seams-receipt-explorer-height":`${e}px`})};releaseExplorerRow=()=>{let e=this.explorerRow.current;e&&(delete e.dataset.opening,D(e.ownerDocument).deleteDynamicRule(this.explorerRowId))};revealExplorerLink(){let e=this.explorerRow.current,t=e?.firstElementChild;if(!e||!t||e.ownerDocument.defaultView?.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let n=e.getBoundingClientRect().height;e.dataset.opening=``;let r=()=>{this.releaseExplorerRow(),t.animate([{opacity:0,filter:`blur(4px)`,transform:`translateY(6px)`},{opacity:1,filter:`blur(0)`,transform:`translateY(0)`}],{duration:240,easing:Kn})};if(!H({reason:`receipt-explorer`,element:e,fromCssPx:0,toCssPx:n,drivenClasses:[`seams-receipt-explorer-driven`],setHeightCssPx:this.setExplorerRowHeight,onSettled:r})){let t=e.animate([{height:`0px`},{height:`${n}px`}],{duration:240,easing:Kn});t.onfinish=r,t.oncancel=this.releaseExplorerRow}}render(){let{receipt:e,data:t}=this.props,n=Hn(e),r=zn(e),i=Rn(e),a=Bn(e),o=Cn(t.model),s=e.subject===`transaction`?e.state:null,c=s?.kind===`confirmed`&&s.hash?Yn(t.model,this.props.explorers,s.hash):null;return e.view===`toast`?m(`div`,{class:`seams-transaction-toast`,"data-completed-stages":a,"data-stage":e.state.kind,"data-pending":i,children:[m(`div`,{class:`seams-toast-progress`,"aria-hidden":`true`,children:m(`span`,{class:`seams-toast-progress-fill`,children:i&&m(`span`,{class:`seams-toast-progress-active`})})}),m(`span`,{class:`seams-receipt-symbol`,"data-pending":i,children:m(W,{kind:i?`loader`:r?`check`:`alert`})}),m(`div`,{class:`seams-transaction-toast-text`,children:[m(`strong`,{role:`status`,children:m(E,{copy:n})}),m(`span`,{children:Sn(t.model)})]}),m(`button`,{type:`button`,class:`seams-receipt-open`,onClick:this.expand,children:[m(E,{message:`Open`}),` `,m(W,{kind:`arrow`})]}),!i&&m(`button`,{type:`button`,class:`seams-receipt-dismiss`,"aria-label":T(this.context,`Close transaction`),onClick:e.onDismiss,children:m(W,{kind:`close`})})]}):m(`div`,{class:`seams-transaction-receipt`,children:[m(`div`,{class:`seams-review-toolbar`,children:[m(`span`,{children:m(E,{copy:Vn(e)})}),m(`button`,{type:`button`,"aria-label":T(this.context,`Minimize transaction`),onClick:this.minimize,children:m(W,{kind:`minimize`})})]}),m(`div`,{class:`seams-receipt-heading`,children:[m(`span`,{class:`seams-receipt-symbol`,"data-pending":i,children:m(W,{kind:i?`loader`:r?`check`:`alert`})}),m(`div`,{children:[m(`h2`,{role:`status`,children:m(E,{copy:n})}),m(`p`,{children:m(E,{copy:Un(e)})})]})]}),m(En,{model:t.model,compact:!0}),m(`div`,{class:`seams-receipt-destination`,children:[o&&m(h,{children:[m(E,{message:`To`}),` `,m(G,{value:o,address:!0,label:k(this.context,`Copy recipient address ${o}`)})]}),!o&&Sn(t.model)]}),t.model?.totals?.estimatedFee&&m(`dl`,{class:`seams-review-fields`,children:m(`div`,{children:[m(`dt`,{children:m(E,{message:`Estimated network fee`})}),m(`dd`,{children:[t.model.totals.estimatedFee,` `,t.model.totals.feeSymbol]})]})}),s?m(Zn,{state:s}):e.subject===`message`&&m(Qn,{state:e.state}),m(xn,{label:T(this.context,`Receipt details`),children:m(`dl`,{class:`seams-review-fields`,children:[s&&t.model?.signerAccount&&m(`div`,{children:[m(`dt`,{children:m(E,{message:`From`})}),m(`dd`,{class:`seams-review-recipient`,children:m(G,{value:t.model.signerAccount,address:!0,label:k(this.context,`Copy signer address ${t.model.signerAccount}`)})})]}),o&&m(`div`,{children:[m(`dt`,{children:[m(E,{message:`To`}),` `]}),m(`dd`,{class:`seams-review-recipient`,children:m(G,{value:o,address:!0,label:k(this.context,`Copy recipient address ${o}`)})})]}),s?.hash&&m(`div`,{children:[m(`dt`,{children:m(E,{message:`Transaction`})}),m(`dd`,{children:[m(wn,{value:s.hash,class:`seams-review-hash`}),m(G,{value:s.hash})]})]}),e.subject===`message`&&m($n,{model:t.model}),m(`div`,{children:[m(`dt`,{children:m(E,{message:`Status`})}),m(`dd`,{children:m(E,{copy:n})})]})]})}),m(`button`,{type:`button`,class:`seams-receipt-primary`,onClick:this.close,children:i?m(E,{message:`Continue in background`}):m(E,{message:`Done`})}),c&&m(`div`,{id:this.explorerRowId,class:`seams-receipt-explorer-row`,ref:this.explorerRow,children:m(`a`,{class:`seams-receipt-explorer`,href:c,target:`_blank`,rel:`noopener noreferrer`,children:[m(E,{message:`View transaction`}),` `,m(W,{kind:`arrow`})]})}),m(Dn,{})]})}};function Yn(e,t,n){if(!e)return null;let r;switch(e.chain){case`near`:r=t.near;break;case`evm`:r=t.evm;break;case`tempo`:r=t.tempo;break;case`unknown`:return null;default:return Xn(e.chain)}if(!r)return null;let i=e.chain===`near`?`txns`:`tx`;return`${r.trim().replace(/\/$/,``)}/${i}/${encodeURIComponent(n)}`}function Xn(e){throw Error(`Unexpected display chain: ${String(e)}`)}function Zn({state:e}){let t=w(),n=Bn({subject:`transaction`,state:e});return m(`div`,{class:`seams-receipt-steps`,"aria-label":T(t,`Transaction progress`),children:[m(q,{stage:`signing`,label:T(t,`Signed`),activeLabel:`Signing`,complete:n>=1,active:e.kind===`signing`}),m(q,{stage:`broadcast`,label:T(t,`Broadcast`),activeLabel:`Broadcasting`,complete:n>=2,active:e.kind===`broadcasting`}),m(q,{stage:`confirming`,label:k(t,e.kind===`reverted`?`Reverted`:`Confirmed`),activeLabel:`Confirming`,complete:n===3,active:e.kind===`submitted`})]})}function Qn({state:e}){let t=w(),n=e.kind===`signed`,r=e.kind===`signing`;return m(`div`,{class:`seams-receipt-steps`,"aria-label":T(t,`Transaction progress`),children:[m(q,{stage:`signing`,label:T(t,`Signed`),activeLabel:`Signing`,complete:n,active:r}),m(q,{stage:`signed`,label:``,activeLabel:``,complete:n,active:!1}),m(q,{stage:`signed`,label:``,activeLabel:``,complete:n,active:!1})]})}function $n({model:e}){let t=w(),n=e?.operations.length===1?e.operations[0]:null;return n?.kind===`near.message`?m(h,{children:n.fields?.map(e=>m(`div`,{children:[m(`dt`,{children:m(E,{copy:e.label})}),e.renderAs===`file-content`?m(`dd`,{children:[m(`span`,{class:`seams-receipt-message`,children:e.value}),m(G,{value:e.copyValue??e.value})]}):m(`dd`,{class:`seams-review-recipient`,children:m(G,{value:e.copyValue??e.value,address:!0,label:k(t,`Copy ${e.label.toLowerCase()} address ${e.value}`)})})]},e.label))}):null}function q(e){let t=e.complete?`complete`:e.active?`active`:`waiting`;return m(`span`,{class:`seams-receipt-step`,"data-stage":e.stage,"data-state":t,"aria-current":e.active?`step`:void 0,children:[m(`span`,{class:`seams-receipt-track`,"aria-hidden":`true`}),m(E,{copy:e.active?e.activeLabel:e.label})]})}const er=`cubic-bezier(0.22, 1, 0.36, 1)`,tr=[`.seams-receipt-symbol`,`[role="status"]`,`.seams-review-amount`,`.seams-receipt-footer`];function nr(e){let t=[];for(let n of tr){let r=e.querySelector(n);r&&t.push({selector:n,text:r.textContent,bounds:r.getBoundingClientRect(),fontSize:getComputedStyle(r).fontSize})}return t}function rr(e){let t=e.querySelector(`[data-seams-progress-line]`);if(!t)return[];let n=getComputedStyle(t).color,r=Array.from(t.querySelectorAll(`[data-seams-progress-segment]`));if(r.length===3&&r.every(ar))return r.map(e=>({bounds:e.getBoundingClientRect(),opacity:e.getAttribute(`opacity`)??`1`,color:n})).sort((e,t)=>e.bounds.left-t.bounds.left);let i=t.getBoundingClientRect(),a=i.width/3;return[0,1,2].map(e=>({bounds:new DOMRect(i.left+e*a,i.top+i.height/2,a,0),opacity:`0.55`,color:n}))}function ir(){}function ar(e){return e.getAttribute(`opacity`)!==`0`}let or=0;var sr=class{element;styles;presentation;state;receipt=null;receiptMotion=[];receiptShell=null;receiptGhost=null;receiptSegments=[];clearReceiptMotion=()=>{for(let e of this.receiptMotion)e.cancel();this.receiptMotion=[],this.receiptShell?.remove(),this.receiptShell=null,this.receiptGhost?.remove(),this.receiptGhost=null;for(let e of this.receiptSegments)e.remove();this.receiptSegments=[],this.element.removeAttribute(`data-receipt-segments`),this.element.removeAttribute(`data-receipt-morphing`)};constructor(e){let t=e.parent.ownerDocument;this.styles=D(t),this.presentation={variant:e.presentation.variant,context:e.presentation.context},this.state={kind:`mounted`,model:e.model,onClosed:e.onClosed},this.element=t.createElement(`div`),this.element.id=`seams-confirmation-surface-${++or}`,this.element.className=`seams-wallet-ui seams-confirmation-surface`,this.element.dataset.seamsConfirmSurface=e.presentation.context,this.element.dataset.seamsConfirmVariant=e.presentation.variant,this.element.addEventListener(`cancel`,this.cancel),e.parent.appendChild(this.element);try{this.update(e.model)}catch(e){throw this.remove(),e}}update(e){this.state.kind===`mounted`&&(this.state.model=e,this.element.dataset.confirmationKind=e.content.kind,this.element.dataset.seamsConfirmReady=String(e.content.kind===`transaction`&&e.content.transaction.decision.kind===`ready`),this.element.lang=e.appearance.locale??`en`,this.element.dataset.theme=e.appearance.theme.mode,this.styles.setDynamicRule(this.element.id,fe(this.element.id,e.appearance)),this.renderSurface())}close(){this.state.kind===`mounted`&&(this.state={kind:`closing`,model:this.state.model,onClosed:this.state.onClosed},this.presentation.variant===`modal`?this.dispose():this.renderSurface())}showReceipt(e){if(this.state.kind!==`mounted`||this.state.model.content.kind!==`transaction`)return;let t=this.receipt?.view!==e.view,n=this.receiptShell??this.element.querySelector(`.modal-container-root`),r=n?.getBoundingClientRect(),i=t?nr(this.element):[],a=t?this.liveCapture():null,o=n?getComputedStyle(n).borderRadius:`26px`;t&&this.clearReceiptMotion(),this.receipt=e,this.element.dataset.receiptView=e.view,this.element.dataset.seamsConfirmSurface=`wallet-iframe`,this.element.dataset.seamsConfirmVariant=`modal`,this.renderSurface();let s=this.element.querySelector(`.modal-container-root`);if(t&&r&&s&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){let t=s.getBoundingClientRect(),n=this.element.ownerDocument.createElement(`div`);n.className=`seams-receipt-morph-shell`,n.setAttribute(`aria-hidden`,`true`),this.element.appendChild(n),this.receiptShell=n,this.element.setAttribute(`data-receipt-morphing`,``),this.receiptMotion=[n.animate([{left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,borderRadius:o},{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,borderRadius:getComputedStyle(s).borderRadius}],{duration:640,easing:er,fill:`both`})];let c=a?this.handOverCapture(a,s):!1,l=new Set;for(let e of i){let t=s.querySelector(e.selector);if(!t||t.textContent!==e.text)continue;let n=t.getBoundingClientRect();l.add(t);let r=parseFloat(e.fontSize)/parseFloat(getComputedStyle(t).fontSize);this.receiptMotion.push(t.animate([{transform:`translate(${e.bounds.left-n.left}px, ${e.bounds.top-n.top}px) scale(${r})`,transformOrigin:`top left`},{transform:`translate(0, 0) scale(1)`,transformOrigin:`top left`}],{duration:640,easing:er}))}let u=s.querySelectorAll(`.seams-transaction-receipt > :not(.seams-receipt-heading), .seams-receipt-heading > .seams-receipt-symbol, .seams-receipt-heading h2, .seams-receipt-heading p, .seams-transaction-toast > :not(.seams-transaction-toast-text, .seams-toast-progress), .seams-transaction-toast-text > *`),d=0;for(let t of u){if(l.has(t))continue;let n=a!==null&&t.matches(`.seams-review-toolbar`);this.receiptMotion.push(t.animate(n?[{opacity:0},{opacity:1}]:[{opacity:0,transform:`translateY(8px)`},{opacity:1,transform:`translateY(0)`}],a?{duration:360,delay:n?0:c&&t.matches(`.seams-receipt-steps`)?560:200+Math.min(d,6)*40,fill:`backwards`,easing:`cubic-bezier(0.2, 0, 0, 1)`}:{duration:120,delay:e.view===`toast`?240:180+Math.min(d,4)*15,fill:`backwards`,easing:`ease-out`})),n||(d+=1)}let f=this.receiptMotion;Promise.all(f.map(e=>e.finished)).then(()=>{this.receiptMotion===f&&this.clearReceiptMotion()},ir)}}liveCapture(){if(this.state.kind!==`mounted`||this.state.model.content.kind!==`transaction`)return null;let e=this.state.model.content.capture;return e?.isConnected?{element:e,bounds:e.getBoundingClientRect(),segments:rr(e)}:null}handOverCapture(e,t){let n=this.element.ownerDocument.createElement(`div`);n.className=`seams-receipt-capture-ghost`,n.setAttribute(`aria-hidden`,`true`),n.append(e.element),this.element.appendChild(n),this.receiptGhost=n;let r={left:`${e.bounds.left}px`,top:`${e.bounds.top}px`,width:`${e.bounds.width}px`,height:`${e.bounds.height}px`};this.receiptMotion.push(n.animate([{...r,opacity:1},{...r,opacity:0}],{duration:160,easing:`ease-out`,fill:`both`}));let i=t.querySelectorAll(`.seams-receipt-track`);if(e.segments.length===0||i.length!==e.segments.length)return!1;this.element.setAttribute(`data-receipt-segments`,``);for(let[t,n]of i.entries()){let r=e.segments[t],i=n.getBoundingClientRect(),a=n.closest(`.seams-receipt-step`)?.dataset.state===`complete`,o=this.element.ownerDocument.createElement(`div`);o.className=`seams-receipt-segment`,o.setAttribute(`aria-hidden`,`true`),this.element.appendChild(o),this.receiptSegments.push(o),this.receiptMotion.push(o.animate([{left:`${r.bounds.left}px`,top:`${r.bounds.top+r.bounds.height/2-.5}px`,width:`${r.bounds.width}px`,height:`1px`,borderRadius:`1px`,opacity:r.opacity,backgroundColor:r.color},{left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:`${i.height}px`,borderRadius:getComputedStyle(n).borderRadius,opacity:1,backgroundColor:getComputedStyle(n,a?`::after`:null).backgroundColor}],{duration:800,delay:120,easing:`cubic-bezier(0.65, 0, 0.35, 1)`,fill:`both`}))}return!0}dispose=()=>{if(this.state.kind===`disposed`)return;let e=this.state.onClosed;this.remove(),e()};remove(){this.clearReceiptMotion(),this.state={kind:`disposed`},this.element.removeEventListener(`cancel`,this.cancel),p(null,this.element),this.styles.deleteDynamicRule(this.element.id),this.element.remove()}cancel=()=>{if(this.state.kind!==`mounted`)return;if(this.receipt){Rn(this.receipt)?this.receipt.onView(`toast`):this.receipt.onDismiss();return}let e=this.state.model.content;e.kind===`registration`?e.registration.onCancel():e.transaction.onCancel()};confirm=()=>{if(this.state.kind!==`mounted`)return;let e=this.state.model.content,t=e.kind===`registration`?e.registration.decision:e.transaction.decision;t.kind===`ready`&&t.onConfirm()};submitOtp=(e,t)=>{if(this.state.kind!==`mounted`)return;let n=this.state.model.content;n.kind===`transaction`&&n.prompt.kind===`email`&&n.prompt.email.onSubmit(e,t)};renderSurface(){let e=this.state;if(e.kind===`disposed`)return;let t=e.model.content,n=this.contentModel(t,e.kind===`closing`),r=this.receipt&&t.kind===`transaction`?m(Jn,{receipt:this.receipt,data:t.review,explorers:t.transaction.explorers}):m(Pn,{model:n,styles:this.styles,variant:this.presentation.variant}),i=t.kind===`registration`?t.registration.heading:t.header.heading;if(this.receipt||this.presentation.variant===`modal`){p(de(e.model.appearance.locale??`en`,m(me,{context:this.receipt?`wallet-iframe`:this.presentation.context,label:i,onCancel:this.cancel,children:r})),this.element);return}let a=t.kind===`registration`?t.registration.decision:t.transaction.decision;p(de(e.model.appearance.locale??`en`,m(ge,{context:this.presentation.context,label:i,origin:t.kind===`transaction`&&t.header.website.kind===`ready`?m(h,{children:[m(Rt,{}),t.header.website.text]}):void 0,errorMessage:t.kind===`registration`?t.registration.errorMessage:t.transaction.errorMessage,styles:this.styles,state:e.kind===`closing`?{kind:`closing`,onClosed:this.dispose}:{kind:`open`,interaction:a.kind===`ready`?`ready`:`busy`},onCancel:this.cancel,children:r})),this.element)}contentModel(e,t){switch(e.kind){case`registration`:return{kind:`registration`,registration:{...e.registration,decision:!t&&e.registration.decision.kind===`ready`?{kind:`ready`,onConfirm:this.confirm}:{kind:`creating`},onCancel:this.cancel}};case`transaction`:return{kind:`transaction`,capture:e.capture,header:e.header,body:e.body,review:e.review,prompt:e.prompt.kind===`email`?{kind:`email`,email:{prompt:e.prompt.email.prompt,verification:t?{kind:`pending`}:e.prompt.email.verification,onSubmit:this.submitOtp}}:e.prompt,transaction:{...e.transaction,decision:!t&&e.transaction.decision.kind===`ready`?{kind:`ready`,onConfirm:this.confirm}:{kind:`preparing`},onCancel:this.cancel}};default:return cr(e)}}};function cr(e){throw Error(`Unexpected confirmation content: ${String(e)}`)}function lr(e){return new sr(e)}var ur=class{element;surface;callbacks;appearance;presentation;tree;currentModel;constructor(e){this.callbacks=e.callbacks,this.appearance=e.appearance,this.presentation=e.presentation,this.tree=e.tree,this.currentModel=this.normalize(),this.surface=lr({parent:e.parent,presentation:{variant:e.variant,context:e.context},model:this.currentModel,onClosed:e.onClosed}),this.element=this.surface.element}update(e){this.presentation=dr(this.presentation,e),e.appearance&&(this.appearance=e.appearance),Object.hasOwn(e,`model`)&&(this.tree=I({model:e.model})),this.currentModel=this.normalize(),this.surface.update(this.currentModel)}setTree(e){this.tree=e,this.currentModel=this.normalize(),this.surface.update(this.currentModel)}close(){this.surface.close()}showReceipt(e){this.surface.showReceipt(e)}dispose(){this.surface.dispose()}normalize(){let e=_t({presentation:this.presentation,appearance:this.appearance,tree:this.tree,callbacks:this.callbacks});if(!e.ok)throw Error(`Cannot render confirmation surface: ${e.error}`);return e.model}};function dr(e,t){return{model:Object.hasOwn(t,`model`)?t.model:e.model,securityContext:Object.hasOwn(t,`securityContext`)?t.securityContext:e.securityContext,loading:Object.hasOwn(t,`loading`)?t.loading:e.loading,preparing:Object.hasOwn(t,`preparing`)?t.preparing:e.preparing,title:Object.hasOwn(t,`title`)?t.title:e.title,body:Object.hasOwn(t,`body`)?t.body:e.body,authMethodCapture:Object.hasOwn(t,`authMethodCapture`)?t.authMethodCapture:e.authMethodCapture,authMethodApprovalMessage:Object.hasOwn(t,`authMethodApprovalMessage`)?t.authMethodApprovalMessage:e.authMethodApprovalMessage,errorMessage:Object.hasOwn(t,`errorMessage`)?t.errorMessage:e.errorMessage,confirmText:Object.hasOwn(t,`confirmText`)?t.confirmText:e.confirmText,cancelText:Object.hasOwn(t,`cancelText`)?t.cancelText:e.cancelText,onBack:Object.hasOwn(t,`onBack`)?t.onBack:e.onBack,signingAuthMode:Object.hasOwn(t,`signingAuthMode`)?t.signingAuthMode:e.signingAuthMode,emailOtpPrompt:Object.hasOwn(t,`emailOtpPrompt`)?t.emailOtpPrompt:e.emailOtpPrompt,nearExplorerUrl:Object.hasOwn(t,`nearExplorerUrl`)?t.nearExplorerUrl:e.nearExplorerUrl,tempoExplorerUrl:Object.hasOwn(t,`tempoExplorerUrl`)?t.tempoExplorerUrl:e.tempoExplorerUrl,evmExplorerUrl:Object.hasOwn(t,`evmExplorerUrl`)?t.evmExplorerUrl:e.evmExplorerUrl}}function fr(e){return new ur(e)}const J=`seams-confirm-portal`;function Y(e){return Math.max(0,Math.round(performance.now()-e))}const pr=new WeakMap,mr=new WeakMap,hr=new WeakMap,X=new WeakMap,gr=new WeakMap,Z=new WeakMap;function _r(e){try{if(!Ge()||typeof window>`u`||window.parent===window)return;window.parent?.postMessage({type:e},`*`)}catch{}}function vr(e){return e===`drawer`?`drawer`:`modal`}function yr(e){return(e||[]).map(e=>({receiverId:e.receiverId,actions:(e.actions||[]).map(e=>v(e)?e:ee(e)).map(e=>S(e))}))}async function br(e,t){if(!(!((t?.length||0)>0)||!e))try{return await te(yr(t))===e?void 0:`INTENT_DIGEST_MISMATCH`}catch{return`UI_DIGEST_VALIDATION_FAILED`}}function xr(e){e.childElementCount>0?e.classList.add(`seams-portal--visible`):e.classList.remove(`seams-portal--visible`)}function Sr(){let e=[];for(let t of document.querySelectorAll(`.seams-confirmation-surface`))t.parentElement?.closest(`.seams-confirmation-surface`)||e.push(t);return e}function Cr(){for(let e of Sr())gr.get(e)?.callbacks.cancel(),X.get(e)?.dispose(),Z.delete(e),Q(e),e.remove();let e=document.getElementById(J);e&&xr(e)}function wr(){let e=document.getElementById(J);if(!e){e=document.createElement(`div`),e.id=J,e.classList.add(`seams-portal`);let t=document.body??document.documentElement;t&&t.appendChild(e)}return e}function Tr(e){X.delete(e),Z.delete(e),Q(e),e.remove();let t=document.getElementById(J);t&&xr(t)}function Er(){(document.getElementById(J)?.childElementCount??0)>0||_r(`WALLET_UI_CLOSED`)}function Dr(e,t){let n=t?.chain;if(n!==`near`&&n!==`tempo`&&n!==`evm`)return{};let i=r({chains:e.chains,family:n,chainId:t?.chainId});return i?n===`near`?{nearExplorerUrl:i}:n===`tempo`?{tempoExplorerUrl:i}:{evmExplorerUrl:i}:{}}function Or(e,t){t&&(e.update(t),Object.hasOwn(t,`model`)&&kr(e.element,e,t.model))}function kr(e,t,n){let r=(Z.get(e)??0)+1;Z.set(e,r),!(!n||!st(n))&&import(`./enrichDisplayModelWithAbi-CudPUW0T.js`).then(i=>{if(Z.get(e)!==r||!e.isConnected||X.get(e)!==t)return;let a=i.enrichDisplayModelWithAbi(n);Z.get(e)===r&&t.setTree(I({model:a}))}).catch(e=>{console.warn(`[ConfirmUI] failed to lazy-load ABI display enrichment`,e)})}function Q(e){pr.get(e)?.disconnect(),pr.delete(e),mr.get(e)?.dispose(),mr.delete(e),hr.delete(e)}function Ar(e,t){switch(e.kind){case`disabled`:return null;case`wallet_iframe`:return u({kind:`request_surface`,element:t,requestId:e.requestId,postMeasurement:e.postMeasurement});default:{let t=e;throw Error(`Unhandled confirmation measurement binding: ${String(t)}`)}}}function jr(e,t,n){e.setAttribute(Tt,Ur(n,t)),e.setAttribute(`data-seams-confirm-variant`,t),e.toggleAttribute(`data-seams-review-frame`,!!a(n))}function Mr(e,t,n){if(a(n)?.attach(e),jr(e,t,n),se(hr.get(e),n))return;Q(e),hr.set(e,n);let r=Ar(n,e);r&&(pr.set(e,r),mr.set(e,Lt(e)))}function Nr(e,t){t.kind===`review_available`&&e.returnToReview()}var Pr=class{view=null;navigation={kind:`review_available`};queuedDecisions=[];decisionWaiters=[];phase=`pending`;cancelListeners=new Set;onBack;callbacks={confirm:this.confirm.bind(this),cancel:this.cancel.bind(this),submitEmail:this.submitEmail.bind(this)};constructor(e){this.admission=e,this.onBack=e?this.back.bind(this):void 0}attachView(e){this.view=e}publishDecision(e){if(this.phase===`published`)return;this.phase=`published`,this.navigation.kind=`decision_published`;let t=this.decisionWaiters.shift();if(t){t(e);return}this.queuedDecisions.push(e)}back(){this.phase===`checking`?this.cancel(`Voice approval was cancelled.`):this.admission&&Nr(this.admission,this.navigation)}cancel(e){if(this.phase!==`published`){this.publishDecision({kind:`cancelled`,error:e??null}),this.admission?.cancel(Error(e??`Wallet approval was cancelled.`));for(let t of this.cancelListeners)t({...e?{error:e}:{}})}}confirm(){this.approve({kind:`confirmed`,emailOtp:{kind:`absent`}})}submitEmail(e,t){let n=e.trim(),r=t.trim();if(!n||!r){this.cancel(`Email OTP challenge is missing.`);return}this.approve({kind:`confirmed`,emailOtp:{kind:`provided`,code:n,challengeId:r}})}async approve(e){if(!(this.phase!==`pending`||this.admission&&!this.admission.allowInteraction())){this.phase=`checking`;try{this.admission?.authMethodApprovalMessages&&this.view?.update({preparing:!0,authMethodCapture:this.admission.authMethodApprovalSurface});let t=await this.admission?.approveAuthMethod();if(t?.kind===`retry`){this.phase=`pending`,this.view?.update({preparing:!1,authMethodCapture:null,authMethodApprovalMessage:t.message});return}this.admission?.authMethodApprovalMessages&&this.view?.update({preparing:!1,authMethodApprovalMessage:this.admission.authMethodApprovalMessages.approved}),this.publishDecision(e)}catch(e){this.cancel(e instanceof Error?e.message:`Authentication method approval failed.`)}}}async takeDecision(){return this.queuedDecisions.shift()||(this.phase===`published`&&(this.phase=`pending`),await new Promise(this.waitForDecision))}waitForDecision=e=>{this.decisionWaiters.push(e)}};function Fr(e,t,n){let r=!1;return{element:e.element,close:i=>{r||(r=!0,i||t.callbacks.cancel(),t.cancelListeners.clear(),!(i&&n.kind===`wallet_iframe`&&ue(n.requestId,e))&&(Q(e.element),e.close()))},update:t=>Or(e,t),onCancel:e=>(t.cancelListeners.add(e),()=>t.cancelListeners.delete(e)),takeDecision:()=>t.takeDecision()}}async function Ir({ctx:e,summary:t,txSigningRequests:n,model:r,securityContext:i,loading:a,theme:o,appearance:s,uiMode:c,signingAuthMode:l,emailOtpPrompt:u}){return Hr({ctx:e,summary:t,txSigningRequests:n,model:r,securityContext:i,loading:a,theme:o,appearance:s,variant:vr(c),signingAuthMode:l,emailOtpPrompt:u})}function Lr(e){let t=e.surface.handle,n=t.element;if(!n.isConnected)throw Error(`Cannot reuse a detached confirmation surface`);let r=X.get(n);if(!r)throw Error(`Cannot reuse an unmanaged confirmation surface`);Mr(n,e.variant,e.ctx.surfaceMeasurementBinding);let i=le({getAppearance:e.ctx.getAppearance,requestedAppearance:e.appearance,requestedMode:e.theme}),a=Dr(e.ctx,e.model);return r.update({model:e.model,securityContext:e.securityContext,loading:e.loading??!1,appearance:i,title:e.summary.title??``,body:e.summary.body??``,signingAuthMode:e.signingAuthMode,emailOtpPrompt:e.emailOtpPrompt,errorMessage:``,...a}),r.setTree(I({txSigningRequests:e.txSigningRequests,model:e.model})),kr(n,r,e.model),{handle:t,reused:!0}}function Rr(e){throw Error(`Unhandled confirmation surface: ${JSON.stringify(e)}`)}function zr(e){switch(e.surface.kind){case`mount_new`:return{handle:Hr({ctx:e.ctx,summary:e.summary,txSigningRequests:e.txSigningRequests,model:e.model,securityContext:e.securityContext,loading:e.loading,theme:e.theme,appearance:e.appearance,variant:e.variant,signingAuthMode:e.signingAuthMode,emailOtpPrompt:e.emailOtpPrompt}),reused:!1};case`reuse_mounted`:return Lr({...e,surface:e.surface});case`preparation_cancelled`:throw Error(`A cancelled preparation surface cannot be mounted`);default:return Rr(e.surface)}}async function Br(e){return zr({ctx:e.ctx,summary:e.summary,txSigningRequests:e.txSigningRequests,model:e.model,securityContext:e.securityContext,loading:e.loading,theme:e.theme,appearance:e.appearance,variant:vr(e.uiMode),signingAuthMode:e.signingAuthMode,emailOtpPrompt:e.emailOtpPrompt,surface:e.surface}).handle}async function Vr({ctx:e,summary:t,txSigningRequests:n,model:r,securityContext:i,loading:a,theme:o,appearance:s,uiMode:c,onMounted:l,signingAuthMode:u,emailOtpPrompt:d,surface:f}){let p=vr(c);return new Promise(c=>{let m=performance.now(),{handle:h,reused:g}=zr({ctx:e,summary:t,txSigningRequests:n,model:r,securityContext:i,loading:a,theme:o,appearance:s,variant:p,signingAuthMode:u,emailOtpPrompt:d,surface:f}),_=Y(m),ee=performance.now(),v=0,y=g?_:0,b=0,x=e=>e>0?e:Y(ee);Promise.resolve().then(()=>{v=x(v),g||(y=x(y))});try{l?.(h)}catch{}let S=e=>{let t={kind:`confirm_ui_prompt_diagnostics_v1`,elementDefineMs:0,mountMs:_,hostFirstUpdateMs:v,hostInteractiveMs:y,confirmEventMs:b,decisionWaitMs:Y(ee)};ne(),c({...e,handle:h,diagnostics:t})},te=async e=>{if(b=x(b),e.kind===`cancelled`){let t=e.error||void 0;h.update({...t?{errorMessage:t}:{},loading:!1}),S({confirmed:!1,error:t});return}let i,a=await br(String(r?.intentDigest||t?.intentDigest||``).trim(),n);if(a&&(i=a),i){h.update({errorMessage:i,loading:!1}),S({confirmed:!1,error:i});return}S({confirmed:!0,...e.emailOtp.kind===`provided`?{otpCode:e.emailOtp.code,emailOtpChallengeId:e.emailOtp.challengeId}:{}})},ne=()=>{v=Math.max(v,0)};(async()=>{let e=await h.takeDecision();u===`emailOtp`&&e.kind===`confirmed`&&e.emailOtp.kind===`absent`&&(h.update({loading:!1}),e=await h.takeDecision()),await te(e)})()})}function Hr({ctx:e,summary:t,txSigningRequests:n,model:r,securityContext:i,loading:o,theme:s,appearance:c,variant:l,signingAuthMode:u,emailOtpPrompt:d}){a(e.surfaceMeasurementBinding)?.assertPending(),Cr();let f=le({getAppearance:e.getAppearance,requestedAppearance:c,requestedMode:s}),p=wr(),m=Dr(e,r),h=new Pr(a(e.surfaceMeasurementBinding)),g;return g=fr({parent:p,variant:l,context:Ur(e.surfaceMeasurementBinding,l),appearance:f,presentation:{onBack:h.onBack,model:r,securityContext:i,loading:o,title:t?.title??(t?.delegate?`Sign Delegate Action`:void 0),body:t?.body,confirmText:a(e.surfaceMeasurementBinding)?.authMethodApprovalMessages?.confirm,signingAuthMode:u,emailOtpPrompt:d,nearExplorerUrl:e.nearExplorerUrl??m.nearExplorerUrl,tempoExplorerUrl:e.tempoExplorerUrl??m.tempoExplorerUrl,evmExplorerUrl:e.evmExplorerUrl??m.evmExplorerUrl},tree:I({txSigningRequests:n,model:r}),callbacks:h.callbacks,onClosed:()=>{Tr(g.element),Er()}}),h.attachView(g),X.set(g.element,g),gr.set(g.element,h),xr(p),Mr(g.element,l,e.surfaceMeasurementBinding),kr(g.element,g,r),p.classList.remove(`seams-portal--visible`),requestAnimationFrame(()=>{p.classList.add(`seams-portal--visible`)}),_r(`WALLET_UI_OPENED`),Fr(g,h,e.surfaceMeasurementBinding)}function Ur(e,t){let n=e.kind===`wallet_iframe`?e.hostSurfaceVariant??t:t;return e.kind===`wallet_iframe`&&n===`modal`?`wallet-iframe`:`standalone`}function Wr(e,t){if(typeof e==`bigint`)return e;let n=String(e??t??`0`).trim();if(!n)return 0n;try{return BigInt(n)}catch{return 0n}}function Gr(e){if(!t(e))return null;let n=String(e.kind||``).trim(),r=String(e.walletId||``).trim(),i=String(e.nearAccountId||``).trim(),a=String(e.nearPublicKeyStr||``).trim();if(!r||!i||!a)return null;switch(n){case`implicit_unfunded`:return{kind:n,walletId:r,nearAccountId:i,nearPublicKeyStr:a};case`access_key_available`:case`sponsored_named_ready`:return{kind:n,walletId:r,nearAccountId:i,nearPublicKeyStr:a,nonce:Wr(e.nonce,e.nextNonce),accessKeyNonce:String(e.accessKeyNonce||``).trim(),nextNonce:String(e.nextNonce||``).trim(),txBlockHeight:String(e.txBlockHeight||``).trim(),txBlockHash:String(e.txBlockHash||``).trim()};case`account_lookup_failed`:return{kind:n,walletId:r,nearAccountId:i,nearPublicKeyStr:a,message:String(e.message||``).trim()};default:return null}}function Kr(e){return t(e)?Gr(e.readiness):null}function qr(e,t){return e.walletId===String(t.subject.walletId)&&e.nearAccountId===String(t.subject.nearAccountId)&&e.nearPublicKeyStr===t.subject.nearPublicKeyStr}async function Jr(e,t){try{let{context:n,leases:r}=await e.nonceCoordinator.reserveNearContext({lane:ne({chains:e.chains,walletId:String(t.subject.walletId),nearAccountId:String(t.subject.nearAccountId),nearPublicKeyStr:t.subject.nearPublicKeyStr}),operation:t.operation,count:t.signatureUses,nearClient:e.nearClient});return{kind:`readiness`,readiness:{kind:`context_ready`,transactionContext:{...n},nonceLeases:r.map(g)},reservedNonceLeases:r}}catch(e){let n=Kr(e);return n?.kind===`implicit_unfunded`&&qr(n,t)?{kind:`readiness`,readiness:{kind:`funding_required`,request:t},reservedNonceLeases:[]}:{kind:`failed`,error:n?.kind===`account_lookup_failed`?`NEAR_ACCOUNT_LOOKUP_FAILED`:`NEAR_CONTEXT_UNAVAILABLE`,details:l(e)}}}async function Yr(e,t){t?.length&&await Promise.all(t.map(t=>e.nonceCoordinator.release({leaseId:t.leaseId,operationId:t.operationId,operationFingerprint:t.operationFingerprint,reason:`cancelled`})))}async function Xr({ctx:e,nearAccountId:t,challengeB64u:n,onBeforePrompt:r,includeSecondPrfOutput:i=!1}){return re({credentialStore:e.webauthnCredentialStore,touchIdPrompt:e.touchIdPrompt,nearAccountId:t,challengeB64u:n,includeSecondPrfOutput:i,onBeforePrompt:r})}function Zr(e,t){t?.close?.(e)}function Qr(e){return{chains:e.chains,getAppearance:e.getAppearance,nearExplorerUrl:e.nearExplorerUrl,tempoExplorerUrl:e.tempoExplorerUrl,evmExplorerUrl:e.evmExplorerUrl,surfaceMeasurementBinding:e.surfaceMeasurementBinding}}function $(){return{kind:`confirm_ui_prompt_diagnostics_v1`,elementDefineMs:0,mountMs:0,hostFirstUpdateMs:0,hostInteractiveMs:0,confirmEventMs:0,decisionWaitMs:0}}async function $r(e){let t=performance.now(),n=await Br({ctx:Qr(e.ctx),summary:e.transactionSummary,txSigningRequests:e.txSigningRequests,model:e.model,securityContext:e.securityContext,loading:e.loading??!0,theme:e.theme,uiMode:e.confirmationConfig.uiMode,signingAuthMode:e.signingAuthMode,emailOtpPrompt:e.emailOtpPrompt,surface:e.surface}),r=Math.max(0,Math.round(performance.now()-t));e.onMounted?.(n);let i=performance.now();await new Promise(t=>setTimeout(t,e.confirmationConfig.autoProceedDelay));let a=Math.max(0,Math.round(performance.now()-i));return{confirmed:!0,confirmHandle:n,diagnostics:{...$(),mountMs:r,decisionWaitMs:a}}}async function ei(e){let{confirmed:t,handle:n,error:r,otpCode:i,emailOtpChallengeId:a,diagnostics:o}=await Vr({ctx:Qr(e.ctx),summary:e.transactionSummary,txSigningRequests:e.txSigningRequests,model:e.model,securityContext:e.securityContext,loading:e.loading,theme:e.theme,uiMode:e.confirmationConfig.uiMode,onMounted:e.onMounted,signingAuthMode:e.signingAuthMode,emailOtpPrompt:e.emailOtpPrompt,surface:e.surface});return e.request.type===C.SIGN_TRANSACTION&&A(e.request).signingKind===`transaction`&&x(`near`,{event:`near_confirmation_prompt_timing`,mountMs:o.mountMs,decisionWaitMs:o.decisionWaitMs,confirmed:t}),{confirmed:t,confirmHandle:n,error:r,otpCode:i,emailOtpChallengeId:a,diagnostics:o}}async function ti({ctx:e,request:t,confirmationConfig:n,transactionSummary:r,securityContext:i,loading:a,theme:o,surface:s,onMounted:c}){if(s.kind===`preparation_cancelled`)return{confirmed:!1,confirmHandle:void 0,diagnostics:$()};let l=t.type===C.SIGN_TRANSACTION?A(t).txSigningRequests:[],u=je(t),d=Me(t),f=Ne(t);switch(n.kind){case`silent`:return s.kind===`reuse_mounted`&&s.handle.close(!0),{confirmed:!0,confirmHandle:void 0,diagnostics:$()};case`auto_proceed`:return await $r({ctx:e,request:t,confirmationConfig:n,transactionSummary:r,securityContext:i,loading:a,theme:o,surface:s,onMounted:c,txSigningRequests:l,model:u,signingAuthMode:d,emailOtpPrompt:f});case`interactive`:return await ei({ctx:e,request:t,confirmationConfig:n,transactionSummary:r,securityContext:i,loading:a,theme:o,surface:s,onMounted:c,txSigningRequests:l,model:u,signingAuthMode:d,emailOtpPrompt:f});default:return xe(n)}}function ni(e){return{near:{fetchNearContext:t=>Jr(e,t),releaseReservedNonces:t=>Yr(e,t)},security:{getRpId:()=>e.touchIdPrompt.getRpId()},webauthn:{collectAuthenticationCredentialWithPRF:t=>Xr({ctx:e,...t}),createRegistrationCredential:t=>e.touchIdPrompt.generateRegistrationCredentialsInternal(t)},ui:{renderConfirmUI:t=>ti({ctx:e,...t}),closeModalSafely:Zr}}}function ri({adapters:e,worker:t,request:n,confirmationConfig:r,transactionSummary:i,theme:a,surface:o}){let s,c;return{setNonceLeases:e=>{s=e},updateUI:e=>{c?.update?.(e)},promptUser:async({securityContext:t,loading:s,onMounted:l})=>{let{confirmed:u,confirmHandle:d,error:f,otpCode:p,emailOtpChallengeId:m,diagnostics:h}=await e.ui.renderConfirmUI({request:n,confirmationConfig:r,transactionSummary:i,securityContext:t,loading:s,theme:a,surface:o,onMounted:e=>{c=e,l?.(e)}});return c=d,{confirmed:u,error:f,otpCode:p,emailOtpChallengeId:m,diagnostics:h}},dismissReviewSurface:()=>{e.ui.closeModalSafely(!0,c),c=void 0},confirmAndCloseModal:n=>{try{Be(t,n)}finally{n.confirmed||e.near.releaseReservedNonces(s),e.ui.closeModalSafely(!!n.confirmed,c)}}}}export{ke as C,be as E,Me as S,ye as T,Se as _,ut as a,De as b,We as c,He as d,Fe as f,Ce as g,Be as h,Rt as i,Le as l,Ve as m,ni as n,pt as o,Ie as p,Ir as r,Ge as s,ri as t,ze as u,Ae as v,Oe as w,A as x,we as y};
@@ -1 +0,0 @@
1
- let e=function(e){return e.SIGN_TRANSACTION=`signTransaction`,e.REGISTER_ACCOUNT=`registerAccount`,e.LINK_DEVICE=`linkDevice`,e.AUTHORIZE_KEY_EXPORT=`authorizeKeyExport`,e.SIGN_NEP413_MESSAGE=`signNep413Message`,e.SHOW_SECURE_PRIVATE_KEY_UI=`showSecurePrivateKeyUi`,e.SIGN_INTENT_DIGEST=`signIntentDigest`,e}({}),t=function(e){return e.PROMPT_USER_CONFIRM_IN_JS_MAIN_THREAD=`PROMPT_USER_CONFIRM_IN_JS_MAIN_THREAD`,e.USER_PASSKEY_CONFIRM_RESPONSE=`USER_PASSKEY_CONFIRM_RESPONSE`,e.USER_PASSKEY_CONFIRM_PROGRESS=`USER_PASSKEY_CONFIRM_PROGRESS`,e}({});function n(e,t){if(!e||e.kind!==t.kind)return!1;switch(e.kind){case`disabled`:return t.kind===`disabled`;case`wallet_iframe`:return t.kind===`wallet_iframe`&&e.requestId===t.requestId&&e.postMeasurement===t.postMeasurement&&e.hostSurfaceVariant===t.hostSurfaceVariant}}const r={theme:{id:`default`,mode:`dark`,colors:{}},palette:`default`};function i(e){return e===`light`||e===`dark`}function a(e){let t=e.requestedAppearance??e.getAppearance?.()??r;return!i(e.requestedMode)||e.requestedMode===t.theme.mode?t:{...t,theme:{...t.theme,mode:e.requestedMode}}}export{e as i,n,t as r,a as t};
@@ -1 +0,0 @@
1
- import{c as e,l as t,n,r,t as i}from"./csp-stylesheet-DeuiM0Mo.js";var a,o,s,c,l=0,u=[],d=t,f=d.__b,p=d.__r,m=d.diffed,h=d.__c,g=d.unmount,_=d.__;function v(e,t){d.__h&&d.__h(o,e,l||t),l=0;var n=o.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){var t=o.context[e.__c],n=v(a++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(o)),t.props.value):e.__}function b(){for(var e;e=u.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(C),t.__h.some(w),t.__h=[]}catch(n){t.__h=[],d.__e(n,e.__v)}}}d.__b=function(e){o=null,f&&f(e)},d.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},d.__r=function(e){p&&p(e),a=0;var t=(o=e.__c).__H;t&&(s===o?(t.__h=[],o.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(C),t.__h.some(w),t.__h=[],a=0)),s=o},d.diffed=function(e){m&&m(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(u.push(t)!==1&&c===d.requestAnimationFrame||((c=d.requestAnimationFrame)||S)(b)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),s=o=null},d.__c=function(e,t){t.some(function(e){try{e.__h.some(C),e.__h=e.__h.filter(function(e){return!e.__||w(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],d.__e(n,e.__v)}}),h&&h(e,t)},d.unmount=function(e){g&&g(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{C(e)}catch(e){t=e}}),n.__H=void 0,t&&d.__e(t,n.__v))};var x=typeof requestAnimationFrame==`function`;function S(e){var t,n=function(){clearTimeout(r),x&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);x&&(t=requestAnimationFrame(n))}function C(e){var t=o,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),o=t}function w(e){var t=o;e.__c=e.__(),o=t}const T=[[`Verify`,`確認`],[`block {value0}`,`ブロック {value0}`],[`active`,`有効`],[`provisioning`,`設定中`],[`suspended`,`一時停止中`],[`expired`,`期限切れ`],[`revoked`,`削除済み`],[`Today, 09:41`,`今日 09:41`],[`Wallet`,`ウォレット`],[`Passkey authentication`,`パスキー認証`],[`Complete the prompt on your device.`,`デバイスに表示された操作を完了してください。`],[`Google sign-in`,`Google ログイン`],[`Choose your Google account.`,`Google アカウントを選択してください。`],[`Creating passkey wallet…`,`パスキーでウォレットを作成中…`],[`Unlocking wallet…`,`ウォレットのロックを解除中…`],[`Wallet created`,`ウォレットを作成しました`],[`Your wallet is ready on this device.`,`このデバイスでウォレットを利用できます。`],[`You’re in`,`サインインしました`],[`Your wallet is unlocked.`,`ウォレットのロックを解除しました。`],[`Too many attempts. Wait a moment.`,`試行回数が多すぎます。しばらくお待ちください。`],[`Can’t reach Seams right now.`,`現在 Seams に接続できません。`],[`That took too long.`,`時間がかかりすぎたため、操作を終了しました。`],[`Something went wrong.`,`エラーが発生しました。`],[`That recovery code can’t be used. Check the code and try again.`,`このリカバリーコードは使用できません。コードを確認して、もう一度お試しください。`],[`That recovery code has already been used. Use another code.`,`このリカバリーコードは使用済みです。別のコードを使用してください。`],[`Enter a recovery code.`,`リカバリーコードを入力してください。`],[`Google sign-in was cancelled.`,`Google ログインがキャンセルされました。`],[`Google sign-in was cancelled`,`Google ログインがキャンセルされました`],[`Scan and link device`,`スキャンしてデバイスを連携`],[`Scan this code with your other device.`,`別のデバイスでこのコードをスキャンしてください。`],[`Recover wallet`,`ウォレットを復元`],[`Your Google account is ready to unlock your wallet.`,`Google アカウントでウォレットのロックを解除できます。`],[`Your wallet is ready. Unlock it with your passkey.`,`ウォレットの準備ができました。パスキーでロックを解除してください。`],[`Choose how you will sign in to this wallet from now on.`,`今後このウォレットで使用するログイン方法を選択してください。`],[`Enter a recovery code to recover your wallet.`,`リカバリーコードを入力してウォレットを復元してください。`],[`Create new passkey`,`新しいパスキーを作成`],[`Continue with Google`,`Google で続ける`],[`Verify email code`,`メールのコードを確認`],[`Unlock with Google`,`Google でロック解除`],[`Unlock with new passkey`,`新しいパスキーでロック解除`],[`Create a passkey`,`パスキーを作成`],[`Continue`,`続ける`],[`Recovery couldn’t be completed. Try again.`,`復元を完了できませんでした。もう一度お試しください。`],[`A passkey couldn’t be created. Try again.`,`パスキーを作成できませんでした。もう一度お試しください。`],[`Passkey preparation expired. Retry to continue.`,`パスキーの準備が期限切れになりました。もう一度お試しください。`],[`Waiting for Google login…`,`Google ログインを待機中…`],[`Starting Google sign-in`,`Google ログインを開始中`],[`Waiting for Google sign-in`,`Google ログインを待機中`],[`Checking recovery code…`,`リカバリーコードを確認中…`],[`Google sign-in is unavailable. Try again.`,`Google ログインを利用できません。もう一度お試しください。`],[`Verifying email code…`,`メールのコードを確認中…`],[`Creating new passkey…`,`新しいパスキーを作成中…`],[`Finishing recovery…`,`復元を完了中…`],[`Preparing to unlock…`,`ロック解除を準備中…`],[`Your wallet was recovered. Unlock it again to continue.`,`ウォレットを復元しました。再度ロックを解除して続けてください。`],[`Generating QR code...`,`QR コードを生成中…`],[`This linking request expired. Start again to link this device.`,`この連携リクエストは期限切れです。最初からやり直してください。`],[`Go back and unlock the new linked method to finish setup.`,`前の画面に戻り、新しく連携した方法でロックを解除して設定を完了してください。`],[`The other device cancelled this linking request. Go back to try again.`,`別のデバイスが連携をキャンセルしました。前の画面に戻ってもう一度お試しください。`],[`Create a passkey to finish linking this device`,`パスキーを作成してデバイスの連携を完了してください`],[`Waiting for device to scan`,`別のデバイスでのスキャンを待機中`],[`Follow the passkey prompt on your screen`,`画面に表示されたパスキーの操作を完了してください`],[`Sending a new email code`,`新しいメールのコードを送信中`],[`Enter the 6-digit code from your email.`,`メールに記載された6桁のコードを入力してください。`],[`Verifying your email code`,`メールのコードを確認中`],[`Generating another wallet name`,`別のウォレット名を生成中`],[`Creating your wallet`,`ウォレットを作成中`],[`Continue with your passkey`,`パスキーで続ける`],[`Accounts`,`アカウント`],[`View or add accounts`,`アカウントの表示・追加`],[`Add EVM account`,`EVM アカウントを追加`],[`Adding EVM account…`,`EVM アカウントを追加中…`],[`EVM account added.`,`EVM アカウントを追加しました。`],[`Account added. Open this wallet again to finish setup.`,`アカウントを追加しました。このウォレットを開き直して設定を完了してください。`],[`Enable this app’s EVM networks with your passkey.`,`パスキーでこのアプリの EVM ネットワークを有効にします。`],[`Add a passkey in Authentication methods first.`,`先に「認証方法」でパスキーを追加してください。`],[`The account could not be added. Try again.`,`アカウントを追加できませんでした。もう一度お試しください。`],[`View accounts on block explorers`,`ブロックエクスプローラーでアカウントを表示`],[`Export keys`,`鍵をエクスポート`],[`Export wallet signing keys`,`ウォレットの署名鍵をエクスポート`],[`Recovery codes`,`リカバリーコード`],[`Back up wallet recovery codes`,`ウォレットのリカバリーコードを保存`],[`Authentication methods`,`認証方法`],[`Add or remove ways to unlock this device`,`このデバイスのロック解除方法を追加・削除`],[`Scan QR to link a device`,`QR コードをスキャンしてデバイスを連携`],[`Linked devices`,`連携済みデバイス`],[`See devices using this wallet`,`このウォレットを使用するデバイスを表示`],[`Transaction settings`,`トランザクション設定`],[`Customize confirmation behavior`,`確認操作をカスタマイズ`],[`Logged out`,`ログアウト済み`],[`Settings`,`設定`],[`Back`,`戻る`],[`Unlock this wallet with a sibling authentication method first.`,`先に別の認証方法でこのウォレットのロックを解除してください。`],[`Unlock with the sibling authentication method before removing this one.`,`この認証方法を削除する前に、別の認証方法でロックを解除してください。`],[`In use now`,`現在使用中`],[`Finishing setup`,`設定を完了中`],[`Paused`,`一時停止中`],[`Expired`,`期限切れ`],[`Removed`,`削除済み`],[`Email code`,`メールのコード`],[`your email code`,`メールのコード`],[`another sign-in method`,`別のログイン方法`],[`this passkey`,`このパスキー`],[`Synced passkey`,`同期済みパスキー`],[`Passkey`,`パスキー`],[`Try again.`,`もう一度お試しください。`],[`Loading your devices timed out. Try again.`,`デバイスの読み込みが時間切れになりました。もう一度お試しください。`],[`Wallet identity is unavailable. Try again.`,`ウォレット情報を取得できません。もう一度お試しください。`],[`Device details`,`デバイスの詳細`],[`Status`,`状態`],[`Anything listed here can unlock this wallet.`,`ここに表示されるすべてのデバイスで、このウォレットのロックを解除できます。`],[`Checking your devices…`,`デバイスを確認中…`],[`Unable to load your devices:`,`デバイスを読み込めません:`],[`Try again`,`再試行`],[`Try Again`,`再試行`],[`No other devices are using this wallet.`,`このウォレットを使用する別のデバイスはありません。`],[`Remove`,`削除`],[`Keep it`,`削除しない`],[`Yes, remove`,`削除する`],[`Removing…`,`削除中…`],[`Review appearance`,`確認画面の表示`],[`Review before signing`,`署名前に確認`],[`Show the transaction details, then click Continue to sign.`,`トランザクションの詳細を表示し、「続ける」をクリックして署名します。`],[`Passkey authentication starts as soon as the details appear.`,`詳細が表示されると同時にパスキー認証を開始します。`],[`On phones, in Safari and for Email OTP sign-in, the wallet always waits for Continue.`,`スマートフォン、Safari、メールOTPでのサインインでは、常に「続ける」のクリックを待ちます。`],[`Choose where transaction details appear before signing.`,`署名前にトランザクションの詳細を表示する場所を選択してください。`],[`none`,`表示なし`],[`modal`,`モーダル`],[`drawer`,`ドロワー`],[`Modal`,`モーダル`],[`Review the transaction in a centered dialog.`,`画面中央のダイアログでトランザクションを確認します。`],[`Drawer`,`ドロワー`],[`Review the transaction in a slide-out panel.`,`スライド式パネルでトランザクションを確認します。`],[`Unable to refresh your wallet. Try again.`,`ウォレットを更新できません。もう一度お試しください。`],[`Key export is unavailable for this wallet.`,`このウォレットでは鍵をエクスポートできません。`],[`NEAR signer provisioning is still in progress. Try again shortly.`,`NEAR 署名機能を準備中です。しばらくしてからもう一度お試しください。`],[`Ed25519 export requires an active NEAR signer.`,`Ed25519 のエクスポートには有効な NEAR 署名機能が必要です。`],[`User`,`ユーザー`],[`Key export requires an unlocked wallet.`,`鍵をエクスポートするにはウォレットのロックを解除してください。`],[`Owner key export is not available on this device yet`,`このデバイスでは、まだ所有者の鍵をエクスポートできません`],[`Wallet region`,`ウォレットのリージョン`],[`Choose where your wallet runs`,`ウォレットを実行するリージョンを選択`],[`Loading transaction settings…`,`トランザクション設定を読み込み中…`],[`Your addresses across networks.`,`各ネットワークのアドレスです。`],[`Keep a recovery code somewhere safe. Use it to restore access to your wallet.`,`リカバリーコードを安全な場所に保管してください。ウォレットへのアクセスを復元する際に使用します。`],[`Only you should have this code. Anyone with it can start recovering your wallet.`,`このコードを他人に渡さないでください。コードを持つ人は、ウォレットの復元を開始できます。`],[`Opening recovery codes…`,`リカバリーコードを開いています…`],[`View recovery codes`,`リカバリーコードを表示`],[`Scan QR code`,`QR コードをスキャン`],[`Wallet settings`,`ウォレット設定`],[`Unlock your wallet to manage your accounts, security, and devices.`,`ウォレットのロックを解除すると、アカウント、セキュリティ、デバイスを管理できます。`],[`Now`,`現在`],[`Yesterday`,`昨日`],[`Email OTP`,`メールのワンタイムコード`],[`Passkey + Email OTP`,`パスキー + メールのワンタイムコード`],[`Touch ID · This device`,`Touch ID · このデバイス`],[`Export NEAR key`,`NEAR の鍵をエクスポート`],[`Export EVM keys`,`EVM の鍵をエクスポート`],[`Your wallet requires authentication before revealing this signing key.`,`この署名鍵を表示するには認証が必要です。`],[`Key type`,`鍵の種類`],[`Protection`,`保護`],[`Authentication required`,`認証が必要`],[`Active`,`有効`],[`Manage how your devices unlock your wallet.`,`デバイスでウォレットのロックを解除する方法を管理します。`],[`Link a device`,`デバイスを連携`],[`Last used`,`最終使用`],[`Open your wallet on the other device, then scan its pairing code.`,`別のデバイスでウォレットを開き、ペアリングコードをスキャンしてください。`],[`Position the QR code inside the frame.`,`QR コードを枠内に合わせてください。`],[`Your recovery codes`,`リカバリーコード`],[`Save these codes in your password manager or another secure place.`,`パスワードマネージャーなどの安全な場所にコードを保存してください。`],[`Keep your recovery codes somewhere safe. Use a code to restore access to your wallet.`,`リカバリーコードを安全な場所に保管してください。ウォレットへのアクセスを復元する際に使用します。`],[`Keep these codes private. Anyone with a code can start recovering your wallet.`,`コードを他人に渡さないでください。コードを持つ人は、ウォレットの復元を開始できます。`],[`Reveal with passkey`,`パスキーで表示`],[`View on explorer`,`エクスプローラーで表示`],[`This wallet`,`このウォレット`],[`Security & devices`,`セキュリティとデバイス`],[`Close wallet settings`,`ウォレット設定を閉じる`],[`Wallet account`,`ウォレットアカウント`],[`Secured by`,`セキュリティ提供:`],[`Copied all codes.`,`すべてのコードをコピーしました。`],[`Unable to copy. Download the codes instead.`,`コピーできません。コードをダウンロードしてください。`],[`Downloaded all codes.`,`すべてのコードをダウンロードしました。`],[`Unable to download. Copy the codes instead.`,`ダウンロードできません。コードをコピーしてください。`],[`Copy all`,`すべてコピー`],[`Download all`,`すべてダウンロード`],[`Cancel`,`キャンセル`],[`Create your passkey`,`パスキーを作成`],[`Use Touch ID or your device passkey to create credentials for this account.`,`Touch ID またはデバイスのパスキーで、このアカウントの認証情報を作成してください。`],[`Confirm Code`,`コードを確認`],[`Confirm`,`確認`],[`Register with Passkey`,`パスキーで登録`],[`Confirm with Passkey`,`パスキーで確認`],[`Enter email code to sign`,`メールのコードを入力して署名`],[`Review transaction`,`トランザクションを確認`],[`Unknown`,`不明`],[`The operation did not complete.`,`操作を完了できませんでした。`],[`The network reverted this transaction. Network fees may still apply.`,`ネットワークがこのトランザクションを取り消しました。ネットワーク手数料が発生する場合があります。`],[`The network could not execute this transaction. Network fees may still apply.`,`ネットワークがこのトランザクションを実行できませんでした。ネットワーク手数料が発生する場合があります。`],[`Submitted to the network. The response did not include a final execution outcome.`,`ネットワークに送信しました。応答には最終的な実行結果が含まれていません。`],[`The network response did not include an execution status.`,`ネットワークの応答には実行状態が含まれていません。`],[`The transaction did not complete as expected. Check its network status before retrying.`,`トランザクションが正常に完了しませんでした。再試行前にネットワークで状態を確認してください。`],[`Signing transaction`,`トランザクションに署名中`],[`Signature ready`,`署名の準備完了`],[`Broadcasting transaction`,`トランザクションを送信中`],[`Waiting for confirmation`,`承認を待機中`],[`Transaction complete`,`トランザクション完了`],[`Transaction failed`,`トランザクション失敗`],[`Transaction reverted`,`トランザクションが取り消されました`],[`Confirmation unavailable`,`承認状態を取得できません`],[`Preparing your signed transaction.`,`署名済みトランザクションを準備中です。`],[`Signature created, ready to broadcast.`,`署名を作成しました。送信する準備ができました。`],[`Signing message`,`メッセージに署名中`],[`Message signed`,`メッセージに署名しました`],[`Signature failed`,`署名に失敗しました`],[`Preparing your message signature.`,`メッセージへの署名を準備中です。`],[`Signed off-chain. Nothing was sent to the network.`,`オフチェーンで署名しました。ネットワークには何も送信していません。`],[`Submitting your signed transaction to the network.`,`署名済みトランザクションをネットワークに送信中です。`],[`Submitted to the network. Waiting for the receipt.`,`ネットワークに送信しました。レシートを待機中です。`],[`The network confirmed your transaction.`,`ネットワークがトランザクションを承認しました。`],[`Email OTP challenge is missing.`,`メール認証のリクエストが見つかりません。`],[`Sign Delegate Action`,`委任アクションに署名`],[`Demo email code:`,`デモ用メールコード:`],[`Recovery code accepted.`,`リカバリーコードを確認しました。`],[`Wallet recovered. Unlock it to continue.`,`ウォレットを復元しました。ロックを解除して続けてください。`],[`Back to recovery code`,`リカバリーコードに戻る`],[`Back to unlock wallet`,`ウォレットのロック解除に戻る`],[`Already have a wallet?`,`すでにウォレットをお持ちですか?`],[`Unlock wallet`,`ウォレットのロックを解除`],[`Don't have a wallet?`,`ウォレットをお持ちでないですか?`],[`Create a wallet`,`ウォレットを作成`],[`Create wallet with passkey`,`パスキーでウォレットを作成`],[`Unlock with passkey`,`パスキーでロック解除`],[`Saved wallets`,`保存済みウォレット`],[`Generate another name`,`別の名前を生成`],[`Other options`,`その他の方法`],[`Link this device`,`このデバイスを連携`],[`Scan a code with your other device`,`別のデバイスでコードをスキャン`],[`Use your recovery code`,`リカバリーコードを使用`],[`Recovery code`,`リカバリーコード`],[`You can paste the whole code.`,`コード全体を貼り付けできます。`],[`This adds a new sign-in method to your wallet.`,`ウォレットに新しいログイン方法を追加します。`],[`Continue with Google, then verify the code sent to your email.`,`Google で続けてから、メールに届いたコードを確認してください。`],[`Finishing recovery with Google…`,`Google での復元を完了中…`],[`Create a new passkey to finish recovering this wallet.`,`新しいパスキーを作成して、ウォレットの復元を完了してください。`],[`Retry finalization`,`完了処理を再試行`],[`Loading`,`読み込み中`],[`Linking expired`,`連携の有効期限切れ`],[`Linking cancelled`,`連携をキャンセルしました`],[`Return to unlock wallet`,`ウォレットのロック解除に戻る`],[`QR code to link this device`,`このデバイスを連携する QR コード`],[`Preparing a one-time code for your other device.`,`別のデバイス用のワンタイムコードを準備中です。`],[`Generating QR code`,`QR コードを生成中`],[`Match your other device`,`別のデバイスと同じ方法を選択`],[`Choose the unlock method for Device 2. Email code sends a one-time code to the address you enter.`,`2台目のデバイスのロック解除方法を選択してください。メールのコードを選ぶと、入力したアドレスにワンタイムコードを送信します。`],[`Wallet unlock method`,`ウォレットのロック解除方法`],[`Email address`,`メールアドレス`],[`Email verification code`,`メール認証コード`],[`Send a new code`,`新しいコードを送信`],[`Verifying`,`確認中`],[`Verify code`,`コードを確認`],[`Send another code`,`別のコードを送信`],[`Device linked`,`デバイスを連携しました`],[`Couldn't link device`,`デバイスを連携できませんでした`],[`Unable to open the wallet. Go back and try again.`,`ウォレットを開けません。前の画面に戻ってもう一度お試しください。`],[`Opening linked wallet`,`連携したウォレットを開いています`],[`Waiting for passkey`,`パスキーを待機中`],[`Create passkey`,`パスキーを作成`],[`Unlocking…`,`ロックを解除中…`],[`Sending…`,`送信中…`],[`Resend Code`,`コードを再送信`],[`Generating…`,`生成中…`],[`Creating...`,`作成中…`],[`Sending your code`,`コードを送信中`],[`Emailing a 6-digit code`,`6桁のコードをメールで送信中`],[`Sending a new code`,`新しいコードを送信中`],[`Emailing a fresh 6-digit code`,`新しい6桁のコードをメールで送信中`],[`Checking your code`,`コードを確認中`],[`Verifying the code you entered`,`入力したコードを確認中`],[`Verify your email`,`メールを確認`],[`Enter the 6-digit code we just sent.`,`送信した6桁のコードを入力してください。`],[`That code expired`,`コードの有効期限が切れました`],[`Email code unavailable`,`メールのコードを利用できません`],[`Email verified`,`メールを確認しました`],[`Finishing linking this device`,`デバイスの連携を完了中`],[`Choose the signing key to export. Your wallet will ask you to authenticate.`,`エクスポートする署名鍵を選択してください。ウォレットで認証が必要です。`],[`Keep exported keys private. Anyone with a signing key can control its accounts.`,`エクスポートした鍵を他人に渡さないでください。署名鍵を持つ人は、そのアカウントを操作できます。`],[`Back up your wallet recovery codes`,`ウォレットのリカバリーコードを保存`],[`Choose how you unlock this device`,`このデバイスのロック解除方法を選択`],[`Scan a QR code to link a device`,`QR コードをスキャンしてデバイスを連携`],[`Light mode`,`ライトモード`],[`Dark mode`,`ダークモード`],[`Unable to lock your wallet. Try again.`,`ウォレットをロックできません。もう一度お試しください。`],[`Unlocked on this device`,`このデバイスでロック解除済み`],[`All settings`,`すべての設定`],[`Locking…`,`ロック中…`],[`Lock wallet`,`ウォレットをロック`],[`Lock Wallet`,`ウォレットをロック`],[`This setting is unavailable for the current wallet or device.`,`このウォレットまたはデバイスでは、この設定を利用できません。`],[`Your wallet. Your control.`,`ウォレットの管理は、あなたの手に。`],[`I’ve saved these codes. They won’t be shown again.`,`コードを保存しました。この後は再表示できません。`],[`Done`,`完了`],[`Export NEAR Key`,`NEAR の鍵をエクスポート`],[`Ed25519 signing key`,`Ed25519 署名鍵`],[`Export EVM Keys`,`EVM の鍵をエクスポート`],[`ECDSA threshold key set`,`ECDSA しきい値署名の鍵セット`],[`Preparing export…`,`エクスポートを準備中…`],[`Export key`,`鍵をエクスポート`],[`United States`,`米国`],[`Western Europe`,`西ヨーロッパ`],[`Asia Pacific`,`アジア太平洋`],[`Oceania`,`オセアニア`],[`Your wallet is in the new region.`,`ウォレットは新しいリージョンにあります。`],[`The move needs service recovery. Your wallet data remains preserved. You can lock this wallet while recovery continues.`,`移動にはサービスの復旧が必要です。ウォレットのデータは保持されています。復旧中もウォレットをロックできます。`],[`The service will retry this stage. Closing or locking this wallet does not cancel the move.`,`サービスがこの段階を再試行します。ウォレットを閉じたりロックしたりしても、移動はキャンセルされません。`],[`Preparing your wallet`,`ウォレットを準備中`],[`Transferring wallet data`,`ウォレットのデータを転送中`],[`Checking the new region`,`新しいリージョンを確認中`],[`Activating the new region`,`新しいリージョンを有効化中`],[`The new region is active. Source cleanup continues.`,`新しいリージョンが有効です。移動元のクリーンアップを継続中です。`],[`Checking wallet placement…`,`ウォレットの配置を確認中…`],[`Unable to check wallet placement. Unlock this wallet or reconnect to try again.`,`ウォレットの配置を確認できません。ロックを解除するか、再接続してお試しください。`],[`Reconnecting to check progress. The previous request may have been accepted.`,`進行状況を確認するため再接続しています。前のリクエストは受け付けられた可能性があります。`],[`Unable to check wallet placement. Reconnect to try again.`,`ウォレットの配置を確認できません。再接続してお試しください。`],[`Reconnecting to check progress. Retry this same request to continue.`,`進行状況を確認するため再接続しています。同じリクエストを再試行してください。`],[`Reconnecting to check progress. Unlock this wallet if authentication expired.`,`進行状況を確認するため再接続しています。認証が期限切れの場合は、ウォレットのロックを解除してください。`],[`You can lock this wallet. An accepted move continues on the server.`,`このウォレットをロックできます。受け付けられた移動はサーバーで継続します。`],[`Check again`,`再確認`],[`Retry same move`,`同じ移動を再試行`],[`Your wallet is active in the new region. Another move must wait until cleanup completes.`,`ウォレットは新しいリージョンで有効です。次の移動はクリーンアップ完了後に実行できます。`],[`Signing and wallet changes are paused. Closing or locking this wallet does not cancel the move.`,`署名とウォレットの変更を一時停止しています。ウォレットを閉じたりロックしたりしても、移動はキャンセルされません。`],[`Current region:`,`現在のリージョン:`],[`Destination region`,`移動先リージョン`],[`Moving your wallet ends signing sessions on all devices. After the move, unlock your wallet again to sign.`,`ウォレットを移動すると、すべてのデバイスの署名セッションが終了します。移動後に署名するには、再度ロックを解除してください。`],[`Another move is available after`,`次の移動が可能になる日時:`],[`Move wallet`,`ウォレットを移動`],[`Passkey on this device`,`このデバイスのパスキー`],[`Email OTP on this device`,`このデバイスのメール認証`],[`Checking methods…`,`認証方法を確認中…`],[`Unavailable`,`利用不可`],[`Unlock to manage`,`ロックを解除して管理`],[`Unlock this wallet to manage authentication.`,`認証を管理するには、このウォレットのロックを解除してください。`],[`Enter the email address to verify.`,`確認するメールアドレスを入力してください。`],[`Adding a passkey…`,`パスキーを追加中…`],[`Adding Email OTP…`,`メール認証を追加中…`],[`Passkey added.`,`パスキーを追加しました。`],[`Email OTP added.`,`メール認証を追加しました。`],[`Checking authentication methods…`,`認証方法を確認中…`],[`Unable to load authentication methods:`,`認証方法を読み込めません:`],[`Active authentication methods`,`有効な認証方法`],[`Remove method`,`認証方法を削除`],[`Add another method before removing this one.`,`この方法を削除する前に、別の認証方法を追加してください。`],[`Add a method`,`認証方法を追加`],[`Adding…`,`追加中…`],[`Add passkey`,`パスキーを追加`],[`Use a passkey from this device to unlock the wallet.`,`このデバイスのパスキーでウォレットのロックを解除します。`],[`Add Email OTP`,`メール認証を追加`],[`Add`,`追加`],[`Use a one-time code from your email to unlock the wallet.`,`メールに届くワンタイムコードでウォレットのロックを解除します。`],[`Next, confirm with your passkey. Then enter the code that we email to this address.`,`次にパスキーで確認します。その後、このアドレスに届くコードを入力してください。`],[`Send code`,`コードを送信`],[`Sending code…`,`コードを送信中…`],[`Enter a valid email address.`,`有効なメールアドレスを入力してください。`],[`Codes go to the email address you verified.`,`確認済みのメールアドレスにコードを送信します。`],[`Transfer`,`送金`],[`Warnings`,`警告`],[`No operations`,`操作なし`],[`using args:`,`引数:`],[`by global contract identifier`,`グローバルコントラクト識別子を使用`],[`Stake`,`ステーキング`],[`Full Access`,`フルアクセス`],[`Function Call`,`関数呼び出し`],[`Transactions`,`トランザクション`],[`Transaction`,`トランザクション`],[`Resend code`,`コードを再送信`],[`Enter the 6-digit Email OTP code.`,`メールの6桁のワンタイムコードを入力してください。`],[`Could not send code.`,`コードを送信できませんでした。`],[`Code sent`,`コードを送信しました`],[`Creating passkey`,`パスキーを作成中`],[`Creating passkey...`,`パスキーを作成中…`],[`Loading website`,`ウェブサイトを読み込み中`],[`Loading chain details`,`チェーンの詳細を読み込み中`],[`Exported Keys`,`エクスポートした鍵`],[`Close exported keys`,`エクスポートした鍵を閉じる`],[`Near Account ID`,`NEAR アカウント ID`],[`Preparing private key…`,`秘密鍵を準備中…`],[`No keys available`,`利用可能な鍵がありません`],[`Warning: your private keys grant full control of your account and funds. Keep it in a secret place.`,`警告:秘密鍵を持つ人は、アカウントと資金を完全に操作できます。秘密鍵を他人に知られない場所に保管してください。`],[`Next Steps`,`次の手順`],[`Address`,`アドレス`],[`Public key copied`,`公開鍵をコピーしました`],[`Copy public key`,`公開鍵をコピー`],[`Public Key`,`公開鍵`],[`Private key copied`,`秘密鍵をコピーしました`],[`Copy private key`,`秘密鍵をコピー`],[`Private Key`,`秘密鍵`],[`Decrypting private key`,`秘密鍵を復号中`],[`Private key ready`,`秘密鍵の準備完了`],[`Data`,`データ`],[`Copied`,`コピーしました`],[`Copy`,`コピー`],[`Passkey registration details`,`パスキー登録の詳細`],[`Account`,`アカウント`],[`Website`,`ウェブサイト`],[`Open`,`開く`],[`Close transaction`,`トランザクションを閉じる`],[`Transaction receipt`,`トランザクションのレシート`],[`Minimize transaction`,`トランザクションを最小化`],[`To`,`宛先`],[`Estimated network fee`,`推定ネットワーク手数料`],[`Transaction progress`,`トランザクションの進行状況`],[`Signed`,`署名済み`],[`Signing`,`署名中`],[`Broadcast`,`送信済み`],[`Broadcasting`,`送信中`],[`Reverted`,`取り消し済み`],[`Confirmed`,`承認済み`],[`Confirming`,`承認中`],[`Receipt details`,`レシートの詳細`],[`From`,`送信元`],[`Continue in background`,`バックグラウンドで続ける`],[`View transaction`,`トランザクションを表示`],[`Wallet transaction`,`ウォレットのトランザクション`],[`Copy value`,`値をコピー`],[`Method:`,`メソッド:`],[`Raw data`,`未加工データ`],[`Network`,`ネットワーク`],[`Message details`,`メッセージの詳細`],[`Transaction details`,`トランザクションの詳細`],[`Signing account`,`署名アカウント`],[`Raw payload`,`未加工ペイロード`],[`Dismiss confirmation`,`確認画面を閉じる`],[`Close`,`閉じる`],[`Creating Account`,`アカウントを作成`],[`Deleting Account`,`アカウントを削除`],[`Adding Key`,`鍵を追加`],[`Deleting Key`,`鍵を削除`],[`Deploying WASM contract`,`WASM コントラクトをデプロイ`],[`Use global contract`,`グローバルコントラクトを使用`],[`Transaction to`,`トランザクションの宛先`],[`Calling`,`呼び出し`],[`Use global contract by hash`,`ハッシュでグローバルコントラクトを使用`],[`Backup needed`,`バックアップが必要`],[`Backed up`,`バックアップ済み`],[`No recovery set`,`リカバリーコード未設定`],[`Authorization required`,`認証が必要`],[`Could not load`,`読み込めませんでした`],[`Checking your codes…`,`コードを確認中…`],[`Status unavailable`,`状態を取得できません`],[`Seams wallet recovery codes`,`Seams ウォレットのリカバリーコード`],[`Save these codes somewhere private. Each code can be used once.`,`他人に知られない場所にコードを保存してください。各コードは1回のみ使用できます。`],[`Finish backup`,`バックアップを完了`],[`Back up later`,`後でバックアップ`],[`Could not load recovery-code status`,`リカバリーコードの状態を読み込めませんでした`],[`Recovery codes are no longer available on this device.`,`このデバイスでは、リカバリーコードを表示できなくなりました。`],[`Could not open recovery codes`,`リカバリーコードを開けませんでした`],[`Recovery codes downloaded.`,`リカバリーコードをダウンロードしました。`],[`Unable to download the codes. Copy them or try again.`,`コードをダウンロードできません。コピーするか、もう一度お試しください。`],[`Recovery codes copied.`,`リカバリーコードをコピーしました。`],[`Unable to copy the codes. Download them or try again.`,`コードをコピーできません。ダウンロードするか、もう一度お試しください。`],[`Close recovery codes`,`リカバリーコードを閉じる`],[`Wallet recovery codes`,`ウォレットのリカバリーコード`],[`View and save the recovery codes retained by this wallet after registration.`,`登録後にウォレットが保持するリカバリーコードを表示・保存します。`],[`Security`,`セキュリティ`],[`Opening recovery codes`,`リカバリーコードを開いています`],[`Loading recovery-code status…`,`リカバリーコードの状態を読み込み中…`],[`Retry status`,`状態を再取得`],[`Each code can recover your wallet once. Save them now, or back them up later from Recovery Codes.`,`各コードでウォレットを1回復元できます。今すぐ保存するか、後で「リカバリーコード」から保存してください。`],[`Each code can recover your wallet once. Keep them somewhere private.`,`各コードでウォレットを1回復元できます。他人に知られない場所に保管してください。`],[`Save your recovery codes`,`リカバリーコードを保存`],[`{value0} single-use codes`,`1回限りのコード:{value0}個`],[`Download codes`,`コードをダウンロード`],[`Copy codes`,`コードをコピー`],[`I saved these recovery codes somewhere safe.`,`リカバリーコードを安全な場所に保存しました。`],[`They won’t be shown again after you finish.`,`完了後は再表示できません。`],[`Back to review`,`確認画面に戻る`],[`NEAR account`,`NEAR アカウント`],[`needs funding`,`への入金が必要です`],[`Too many requests. Try again shortly.`,`リクエストが多すぎます。しばらくしてからもう一度お試しください。`],[`Device linking expired`,`デバイス連携の有効期限が切れました`],[`Device linking was cancelled`,`デバイス連携がキャンセルされました`],[`Unable to scan a QR code`,`QR コードをスキャンできません`],[`Choose an Email OTP method`,`メール認証の方法を選択`],[`Select the masked address to authorize this linked device.`,`一部を伏せたアドレスを選択して、連携するデバイスを認証してください。`],[`Available methods`,`利用可能な方法`],[`Authorizing`,`認証中`],[`Close scanner`,`スキャナーを閉じる`],[`Scan and link a device`,`スキャンしてデバイスを連携`],[`This linking request expired. Scan the QR code again to retry.`,`この連携リクエストは期限切れです。QR コードを再度スキャンしてください。`],[`Linking device`,`デバイスを連携中`],[`Continue linking on your other device.`,`別のデバイスで連携を続けてください。`],[`Cancel linking`,`連携をキャンセル`],[`Position the QR code within the frame`,`QR コードを枠内に合わせてください`],[`Device linking failed`,`デバイスの連携に失敗しました`],[`The address is normalized before the QR code is created.`,`QR コードの作成前に、アドレスの表記を統一します。`],[`Device 2 will create a new passkey for this wallet.`,`2台目のデバイスで、このウォレット用の新しいパスキーを作成します。`],[`Device Linking QR Code`,`デバイス連携用 QR コード`],[`Scan and Link Device`,`スキャンしてデバイスを連携`],[`Scan to backup your other device.`,`スキャンして別のデバイスをバックアップしてください。`],[`Confirm on this device to finish linking it to your wallet.`,`このデバイスで確認し、ウォレットとの連携を完了してください。`],[`Creating passkey…`,`パスキーを作成中…`],[`Enter the 6-digit email code.`,`メールの6桁のコードを入力してください。`],[`Confirm with an email code`,`メールのコードで確認`],[`Use the code sent to`,`コードの送信先:`],[`Sending your email code…`,`メールのコードを送信中…`],[`Sending a new email code…`,`新しいメールのコードを送信中…`],[`Email code accepted. Finishing device activation…`,`メールのコードを確認しました。デバイスの有効化を完了中…`],[`Checking code…`,`コードを確認中…`],[`Confirm code`,`コードを確認`],[`Trying again…`,`再試行中…`],[`Send code again`,`コードを再送信`],[`Choose another factor`,`別の認証方法を選択`],[`Welcome back`,`おかえりなさい`],[`Wallet name`,`ウォレット名`],[`Sign in`,`ログイン`],[`Use your passkey to continue.`,`パスキーで続けてください。`],[`Continue with passkey`,`パスキーで続ける`],[`Close authentication menu`,`認証メニューを閉じる`],[`Passkey name`,`パスキー名`],[`Use a passkey to create your wallet.`,`パスキーでウォレットを作成します。`],[`Restore access to your wallet.`,`ウォレットへのアクセスを復元します。`],[`Preparing a one-time code…`,`ワンタイムコードを準備中…`],[`Create a passkey on this device.`,`このデバイスでパスキーを作成してください。`],[`Creating your passkey…`,`パスキーを作成中…`],[`This code has expired.`,`コードの有効期限が切れました。`],[`Device linking was cancelled.`,`デバイス連携がキャンセルされました。`],[`Unable to link this device.`,`このデバイスを連携できません。`],[`Switch to light mode`,`ライトモードに切り替え`],[`Switch to dark mode`,`ダークモードに切り替え`],[`Copy recipient address {value}`,`送信先アドレス {value} をコピー`],[`Copy signing account address {value}`,`署名アカウントのアドレス {value} をコピー`],[`Copy contract address {value}`,`コントラクトアドレス {value} をコピー`],[`Use the code already sent to {value}.`,`{value} に送信済みのコードを使用してください。`],[`A 6-digit code was sent to {value}.`,`{value} に6桁のコードを送信しました。`],[`Loading...`,`読み込み中…`],[`Scanning...`,`スキャン中…`],[`with`,`金額:`],[`using`,`使用量:`],[`(recommended)`,`(推奨)`],[`. The destination is managed by your wallet and cannot be changed here.`,`。送信先はウォレットが管理しており、ここでは変更できません。`],[`? It will lose access right away.`,`を削除しますか?このデバイスは直ちにアクセスできなくなります。`],[`from this device? You will need the other active method to unlock it.`,`をこのデバイスから削除しますか?ロック解除には別の有効な認証方法が必要です。`],[`Enter all {value0} characters of the recovery code.`,`リカバリーコードを{value0}文字すべて入力してください。`],[`{value0} days ago`,`{value0}日前`],[`Device {value0}`,`デバイス {value0}`],[`Added {value0}`,`追加日:{value0}`],[`Last used {value0}`,`最終使用:{value0}`],[`your "{value0}" passkey`,`「{value0}」のパスキー`],[`You're signed in with {value0}. To remove it, sign in with {value1} first.`,`{value0}でログインしています。削除するには、先に{value1}でログインしてください。`],[`Device {value0}, {value1} (ID {value2})`,`デバイス {value0}、{value1}(ID {value2})`],[`Removing {value0}…`,`{value0}を削除中…`],[`{value0} can no longer use this wallet.`,`{value0}は、このウォレットを使用できなくなりました。`],[`Remove {value0}`,`{value0}を削除`],[`NEAR signer provisioning must be retried ({value0}).`,`NEAR 署名機能の準備を再試行してください({value0})。`],[`Recovery code {value0}`,`リカバリーコード {value0}`],[`Saved wallets. Selected wallet ID {value0}, email {value1}`,`保存済みウォレット。選択中のウォレット ID:{value0}、メール:{value1}`],[`Saved wallets. Selected {value0}`,`保存済みウォレット。選択中:{value0}`],[`Recovery codes don’t use {value0}.`,`リカバリーコードに{value0}は使用できません。`],[`WASM contract code size: {value0}`,`WASM コントラクトのコードサイズ:{value0}`],[`WASM global contract code size: {value0}`,`WASM グローバルコントラクトのコードサイズ:{value0}`],[`sending balance to: {value0}`,`残高の送信先:{value0}`],[`Calling {value0} using {value1}`,`{value0}を呼び出し、使用量:{value1}`],[`Resend in {value0}s`,`{value0}秒後に再送信`],[`Too many requests. Try again in {value0}s.`,`リクエストが多すぎます。{value0}秒後にもう一度お試しください。`],[`Copy {value0}`,`{value0}をコピー`],[`Copy NEAR account {value0}`,`NEAR アカウント {value0} をコピー`],[`Calling {value0} with {value1} using {value2}`,`{value0}を呼び出し、金額:{value1}、使用量:{value2}`],[`Transfer {value0}`,`{value0}を送金`],[`Staking {value0}`,`{value0}をステーキング`],[`Deploy global WASM contract (mode: {value0}, size {value1})`,`グローバル WASM コントラクトをデプロイ(モード:{value0}、サイズ:{value1})`],[`Use global contract by account {value0}`,`アカウント {value0} のグローバルコントラクトを使用`],[`Use global contract by hash {value0}`,`ハッシュ {value0} のグローバルコントラクトを使用`],[`Deploying WASM contract ({value0})`,`WASM コントラクトをデプロイ({value0})`],[`{value0} of {value1} codes left`,`コード残数:{value0}/{value1}`],[`Copy signer address {value0}`,`署名者のアドレス {value0} をコピー`],[`Show {value0}`,`{value0}を表示`],[`Camera {value0}...`,`カメラ {value0}…`],[`Remove {value0}? It will lose access right away.`,`{value0}を削除しますか?このデバイスは直ちにアクセスできなくなります。`],[`Remove {value0} from this device? You will need the other active method to unlock it.`,`このデバイスから{value0}を削除しますか?ロック解除には別の有効な認証方法が必要です。`],[`today`,`今日`],[`yesterday`,`昨日`],[`Message`,`メッセージ`],[`Signer`,`署名者`],[`Recipient`,`受信者`],[`Receiver`,`受信者`],[`Method`,`メソッド`],[`Value (wei)`,`金額(wei)`],[`Action Count`,`アクション数`],[`Amount (yoctoNEAR)`,`金額(yoctoNEAR)`],[`Beneficiary`,`残高の受取先`],[`By Account`,`アカウントで指定`],[`By Code Hash`,`コードハッシュで指定`],[`Code Bytes`,`コードサイズ(バイト)`],[`Deploy Mode`,`デプロイモード`],[`Deposit (yoctoNEAR)`,`付随する金額(yoctoNEAR)`],[`Gas`,`ガス`],[`Permission`,`権限`],[`Stake (yoctoNEAR)`,`ステーキング額(yoctoNEAR)`],[`Validator Key`,`バリデーターの鍵`],[`Valid After`,`有効期間の開始`],[`Valid Before`,`有効期間の終了`],[`EVM Transaction`,`EVM トランザクション`],[`NEAR Transaction`,`NEAR トランザクション`],[`Tempo Transaction`,`Tempo トランザクション`],[`Message signature`,`メッセージへの署名`],[`NEP-413 message`,`NEP-413 メッセージ`],[`Contract Call`,`コントラクト呼び出し`],[`Unsupported EVM Payload`,`未対応の EVM ペイロード`],[`Unsupported Tempo Payload`,`未対応の Tempo ペイロード`],[`Tempo Payload Missing Calls`,`Tempo ペイロードに呼び出しがありません`],[`Function Arguments`,`関数の引数`],[`Signed Delegate Payload`,`署名済み委任ペイロード`],[`Enter the 6-digit code sent to {value0}`,`{value0} に送信した6桁のコードを入力してください`],[`Transaction {value0}`,`トランザクション {value0}`],[`Transaction {value0}: to`,`トランザクション {value0} の宛先:`],[`Transaction to contract`,`コントラクトへのトランザクション`],[`Transaction {value0} to contract`,`コントラクトへのトランザクション {value0}`],[`Action {value0}: CreateAccount`,`アクション {value0}:アカウント作成`],[`Action {value0}: Transfer`,`アクション {value0}:送金`],[`Action {value0}: FunctionCall`,`アクション {value0}:関数呼び出し`],[`Action {value0}: Stake`,`アクション {value0}:ステーキング`],[`Action {value0}: AddKey`,`アクション {value0}:鍵の追加`],[`Action {value0}: DeleteKey`,`アクション {value0}:鍵の削除`],[`Action {value0}: DeployContract`,`アクション {value0}:コントラクトのデプロイ`],[`Action {value0}: DeployGlobalContract`,`アクション {value0}:グローバルコントラクトのデプロイ`],[`Action {value0}: UseGlobalContract`,`アクション {value0}:グローバルコントラクトの使用`],[`Action {value0}: DeleteAccount`,`アクション {value0}:アカウント削除`],[`Action {value0}: SignedDelegate`,`アクション {value0}:署名済み委任`],[`Action {value0}: Unsupported`,`アクション {value0}:未対応の操作`],[`mode: {value0}`,`モード:{value0}`],[`by account: {value0}`,`アカウント:{value0}`],[`by hash: {value0}`,`ハッシュ:{value0}`],[`validator: {value0}`,`バリデーター:{value0}`],[`key: {value0}`,`鍵:{value0}`],[`permissions: {value0}`,`権限:{value0}`],[`Your email`,`メールアドレス`],[`your email`,`メールアドレス`],[`Create your wallet`,`ウォレットを作成`],[`Continue with your Google account.`,`Google アカウントで続けてください。`],[`Create wallet`,`ウォレットを作成`],[`Check this recovery code and try again.`,`リカバリーコードを確認して、もう一度お試しください。`]];function E([e,t]){return[e,{en:e,ja:t}]}const D=new Map(T.map(E));function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function k([e,t]){let n=[],r=[],i=0;for(let t of e.matchAll(/\{(\w+)\}/g))r.push(O(e.slice(i,t.index)),`(.+?)`),n.push(t[1]),i=t.index+t[0].length;return r.push(O(e.slice(i))),{expression:RegExp(`^`+r.join(``)+`$`,`s`),parameters:n,japanese:t}}function A(e){return e[0].includes(`{`)}function j(e,t){return t[0].length-e[0].length}const M=T.filter(A).sort(j).map(k);function N(e,t,n={}){let r=D.get(t);if(!r)throw Error(`Unknown wallet message`);let i=r[e];for(let[e,t]of Object.entries(n))i=i.split(`{`+e+`}`).join(String(t));return i}function P(e,t){if(typeof t!=`string`||e===`en`)return t;let n=t.trim(),r=D.get(n);if(r)return r[e];let i=n.endsWith(`:`)?D.get(n.slice(0,-1)):void 0;if(i)return i[e]+`:`;for(let e of M){let t=e.expression.exec(n);if(!t)continue;let r=e.japanese;for(let[n,i]of e.parameters.entries())r=r.split(`{`+i+`}`).join(t[n+1]);return r}return t}const F=e(`en`);function I(){return y(F)}function L(e,t){return r(F.Provider,{value:e,children:t})}function R(e){let t=I();return e.message===void 0?P(t,e.copy):N(t,e.message,e.values)}const z=new WeakMap;function B(e){let t=z.get(e);return t||(t=i({doc:e,baseCss:``,dynamicStyleDataAttr:`data-seams-confirmation-dynamic`,nonce:n}),z.set(e,t)),t}function V(e){let t=e.trim();if(t)return/^[A-Za-z][A-Za-z0-9_-]*$/.test(t)?t:void 0}function H(e){let t=e.trim();if(!(!t||t.length>1024)&&!/[{};\n\r]/.test(t))return t}function U(e){let t={};for(let n of[`colors`,`shape`])for(let[r,i]of Object.entries(e?.theme[n]??{})){if(typeof i!=`string`)continue;let e=V(r);if(!e)continue;let a=H(i);a&&(t[`--seams-${n}-${e}`]=`${a} !important`)}return t}function W(e,t){return`:where(#${e}){${Object.entries(U(t)).map(([e,t])=>`${e}:${t};`).join(``)}}`}export{I as a,N as c,R as i,B as n,L as o,F as r,P as s,W as t};
@@ -1 +0,0 @@
1
- import{l as e,u as t}from"./chains-gV2K9gA4.js";import{i as n,r}from"./base64-BmKR3UqU.js";function i(e){if(typeof e!=`string`||e.trim()!==e||e.length===0)throw Error(`correlation id must be a non-empty canonical string`);return e}function a(e){if(typeof e!=`string`||!/^[A-Za-z0-9_-]+$/.test(e))throw Error(`digest must be unpadded base64url`);let t;try{t=r(e)}catch{throw Error(`digest must be valid base64url`)}if(t.length!==32||n(t)!==e)throw Error(`digest must be canonical base64url for 32 bytes`);return e}function o(e){if(typeof e!=`string`)throw Error(`timestamp must be an ISO timestamp`);let t=Date.parse(e);if(!Number.isFinite(t)||new Date(t).toISOString()!==e)throw Error(`timestamp must be canonical ISO-8601 UTC`);return e}function s(e){if(!Number.isSafeInteger(e)||Number(e)<=0)throw Error(`timestamp milliseconds must be a positive safe integer`);return o(new Date(Number(e)).toISOString())}async function c(t){return a(n(await e(t)))}async function l(e){return a(n(await t(e)))}export{c as a,o as i,i as n,l as o,a as r,s as t};
@@ -1 +0,0 @@
1
- import{j as e}from"./chains-gV2K9gA4.js";function t(e,t){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`${t} must be an object`);return e}function n(t,n){let r=e(t,n);switch(r){case`sent`:case`reused`:return r;default:throw Error(`${n} must be sent or reused`)}}function r(e,t){return{kind:`provider`,status:e,emailHint:t}}function i(i,a){let o=t(i,a),s=e(o.kind,`${a}.kind`),c=n(o.status,`${a}.status`),l=e(o.emailHint,`${a}.emailHint`);switch(s){case`provider`:case`development`:if(o.otpCode!==void 0)throw Error(`${a}.otpCode is only valid for code-bearing delivery`);return r(c,l);case`demo_code_response`:case`provider_and_demo_code`:{let t=e(o.otpCode,`${a}.otpCode`);if(!/^\d{6}$/.test(t))throw Error(`${a}.otpCode must be a 6-digit code`);return{kind:s,status:c,emailHint:l,otpCode:t}}default:throw Error(`${a}.kind is invalid`)}}function a(e){switch(e.kind){case`provider`:return null;case`demo_code_response`:case`provider_and_demo_code`:return e.otpCode}}export{i as n,a as t};
@@ -1 +0,0 @@
1
- import{F as e,i as t}from"./domainIds-t1lp25yU.js";import{c as n,o as r}from"./ecdsaChainTarget-DbLthshF.js";import{t as i}from"./accountIds-D5NI31F2.js";import{Ht as a,T as o,g as s}from"./emailOtpEcdsaDerivationIdentity-CIh9IPai.js";import{i as c,t as l}from"./signerSlot-D4ZOuK7e.js";import{c as u,s as d}from"./types-DdzuHlAQ.js";import{a as f,k as p}from"./nearEd25519YaoSigningPreparation-D_Jvj7ht.js";function m(e){let t=Math.floor(Number(e));return!Number.isFinite(t)||t<=0?null:t.toString(10).padStart(20,`0`)}function h(e,t){if(e.length===0)return{kind:`no_current_lane`,unusableFacts:[]};let n=_(e,t),r=v(n,t);if(r.length)return{kind:`conflicting_key_material`,conflicts:r};if(n.length!==1)return{kind:`ambiguous_material`,candidates:e};let i=n[0];return i?g(i,t.supersession):{kind:`no_current_lane`,unusableFacts:[]}}function g(e,t){let n=e.facts.filter(t.isOperationUsable);if(n.length===0)return{kind:`no_current_lane`,unusableFacts:e.facts};let r=y(n,t);return r.kind===`ambiguous`?{kind:`ambiguous_material`,candidates:r.candidates}:{kind:`selected`,selectedFact:r.fact,supersededFacts:e.facts.filter(e=>e!==r.fact)}}function _(e,t){let n=new Map;for(let r of e){let e=t.groupKey(r),i=t.groupKeyString(e),a=n.get(i);n.set(i,a?{groupKey:a.groupKey,facts:[...a.facts,r]}:{groupKey:e,facts:[r]})}return[...n.values()]}function v(e,t){return e.flatMap(e=>t.groupConflicts(e.facts))}function y(e,t){let n=e[0];if(n===void 0)return{kind:`ambiguous`,candidates:[]};let r=n;for(let n of e.slice(1)){let e=b(r,n,t);switch(e.kind){case`left`:break;case`right`:r=n;break;case`ambiguous`:return{kind:`ambiguous`,candidates:e.candidates};default:return e}}return{kind:`selected`,fact:r}}function b(e,t,n){let r=x(e,t,n);if(r.kind!==`equal`)return r;let i=S(e,t,n);if(i.kind!==`equal`)return i;let a=n.tieBreak(e,t);switch(a){case 1:return{kind:`left`};case-1:return{kind:`right`};case 0:return{kind:`ambiguous`,candidates:[e,t]};default:return a}}function x(e,t,n){let r=n.generation(e),i=n.generation(t);return!r||!i?{kind:`ambiguous`,candidates:[e,t]}:r>i?{kind:`left`}:i>r?{kind:`right`}:{kind:`equal`}}function S(e,t,n){let r=n.exactness(e);return r===n.exactness(t)?{kind:`equal`}:r===`exact_target`?{kind:`left`}:{kind:`right`}}function C(e){return{kind:`ed25519_durable_material`,authMethod:e.authMethod,materialActivation:e.materialActivation}}function w(e){return[e.activationId,e.capability,e.materialOwner,e.keyBinding,e.lifecycleBinding,e.signingWorker].map(e=>encodeURIComponent(String(e))).join(`:`)}function T(e){let t={source:e.source,runtime:e.runtime,key:e.key,materialActivation:e.materialActivation,publicFacts:e.publicFacts,curve:`ecdsa`,chainTarget:e.chainTarget,state:e.state,authorizationState:e.authorizationState};if(e.auth.kind===`passkey`){if(!e.resolvedKey)throw Error(`active Wallet Authority passkey lane is missing its resolved ECDSA key`);return{...t,auth:e.auth,resolvedKey:e.resolvedKey}}return{...t,auth:e.auth}}function ee(e){let t=e.authorization;return t?e.remainingUses===t.runtime.remainingUses&&e.expiresAtMs===t.runtime.expiresAtMs:!0}function E(e){return e.auth.kind}function D(e){return u(e.auth)}function O(e){let t=e.ed25519Restore;if(e.authMethod===`passkey`){if(!t.credentialIdB64u)return null;try{return{kind:`passkey`,rpId:o(t.rpId),credentialIdB64u:t.credentialIdB64u}}catch{return null}}return t.providerSubjectId?{kind:`email_otp`,providerSubjectId:t.providerSubjectId}:null}function k(e){let{authorization:t}=e;if(String(t.session.walletId)!==e.walletId||t.selectedAuthMethod.kind!==e.auth.kind||t.operationCredential.walletSessionId.length===0||t.session.quotaId.length===0||!f({session:t.session,materialActivation:e.materialActivation}))return!1;switch(e.auth.kind){case`passkey`:if(t.selectedAuthMethod.kind!==`passkey`||String(t.selectedAuthMethod.rpId)!==String(e.auth.rpId)||t.selectedAuthMethod.credentialIdB64u!==e.auth.credentialIdB64u)return!1;break;case`email_otp`:if(t.selectedAuthMethod.kind!==`email_otp`||t.selectedFactorAuthority.factor.kind!==`email_otp`||t.selectedFactorAuthority.factor.providerUserId!==e.auth.providerSubjectId)return!1;break;case`voiceid`:if(t.selectedAuthMethod.kind!==`voiceid`||t.selectedAuthMethod.walletAuthMethodId!==e.auth.walletAuthMethodId||t.selectedAuthMethod.deviceKeyId!==e.auth.deviceKeyId)return!1;break;default:return e.auth,!1}return!!(e.ownerScope&&d(e.auth)===d(e.ownerScope.auth))}function te(e,t,r){if(e.curve!==`ed25519`)return null;let a=String(e.thresholdSessionIds.ed25519||``).trim(),o=String(e.walletId||``).trim(),s=e.ed25519Restore,u=l(s.signerSlot),d=O(e);if(!a||!o||u===null||!d)return null;let f=Math.floor(Number(e.expiresAtMs)||0),p=Math.max(0,Math.floor(Number(e.remainingUses)||0)),m=f>0&&f<=Date.now()?`expired`:p===0?`exhausted`:`restorable`,h=t&&k({authorization:t,auth:d,walletId:o,materialActivation:s.materialActivation,ownerScope:r})?t:null;try{let t={auth:d,curve:`ed25519`,chain:`near`,materialActivation:s.materialActivation,walletId:n(o),nearAccountId:i(s.nearAccountId),nearEd25519SigningKeyId:c(s.nearEd25519SigningKeyId),signerSlot:u,source:`durable_sealed_record`,thresholdSessionId:a,remainingUses:p,...f>0?{expiresAtMs:f}:{},updatedAtMs:Math.floor(Number(e.updatedAtMs)||0),...P(e)?{policyHint:P(e)}:{}};return h?{...t,state:m,authorizationState:`authorized`,authorization:h}:{...t,state:`deferred`,authorizationState:`authorization_required`}}catch{return null}}function ne(e){return e.auth.kind===`email_otp`}function re(e,t,r){let a=String(e.walletId||``).trim(),o=String(e.nearAccountId||``).trim(),s=String(e.thresholdSessionId||``).trim();if(!a||!o||!s)return null;let c=t&&k({authorization:t,auth:e.auth,walletId:a,materialActivation:e.materialActivation,ownerScope:r})?t:null;try{let t={auth:e.auth,curve:`ed25519`,chain:`near`,materialActivation:e.materialActivation,walletId:n(a),nearAccountId:i(o),nearEd25519SigningKeyId:e.nearEd25519SigningKeyId,signerSlot:e.signerSlot,thresholdSessionId:s,source:`public_capability_reference`};if(!c)return{...t,state:`deferred`,authorizationState:`authorization_required`};let r=Math.floor(Number(c.status.expiresAtMs)||0),l=ne(e)?e:null,u=l?Math.min(l.expiresAtMs,r):r,d=u>0&&u<=Date.now()?`expired`:`ready`;return{...t,state:d,authorizationState:`authorized`,authorization:c,remainingUses:c.status.remainingUses,...u>0?{expiresAtMs:u}:{}}}catch{return null}}function A(e){if(e.state===`missing`)return!1;if(e.curve!==`ecdsa`){let t=String(e.thresholdSessionId||``).trim();return e.thresholdSessionId!==t||!t?!1:e.authorizationState===`authorization_required`?e.state===`deferred`:!(!e.authorization.operationCredential.walletSessionId||!e.authorization.session.quotaId||e.authorization.status.remainingUses<=0||e.authorization.status.expiresAtMs<=Date.now())}return e.source===`active_wallet_authority`&&(e.state!==`deferred`||e.authorizationState!==`authorization_required`||e.runtime.kind!==`active_wallet_authority_ecdsa_runtime_v1`||String(e.runtime.walletId)!==String(e.key.walletId)||!t(e.runtime.materialActivation,e.materialActivation)||e.runtime.publicFacts!==e.publicFacts)||!(e.key&&String(e.key.walletId||``).trim()&&String(e.key.ecdsaThresholdKeyId||``).trim()&&String(e.key.signingRootId||``).trim()&&String(e.key.signingRootVersion||``).trim()&&Array.isArray(e.key.participantIds)&&e.key.participantIds.length>0&&String(e.key.thresholdOwnerAddress||``).trim()&&`publicFacts`in e&&e.publicFacts&&e.publicFacts.keyHandle&&String(e.publicFacts.publicKeyB64u||``).trim()&&Array.isArray(e.publicFacts.participantIds)&&e.publicFacts.participantIds.length>0&&String(e.publicFacts.thresholdOwnerAddress||``).trim())||e.source===`canonical_capability`&&!ee(e)?!1:u(e.auth)===`passkey`?e.resolvedKey?.kind===`resolved_evm_family_ecdsa_key`&&e.resolvedKey.authBinding.kind===`passkey_ecdsa_auth_binding`&&String(e.resolvedKey.walletId)===String(e.key.walletId)&&e.resolvedKey.publicFacts===e.publicFacts:!(`resolvedKey`in e)}function j(e){return e===`missing`?null:e}function ie(e){return e||`unknown`}function ae(e){let t=Math.floor(Number(e));return Number.isFinite(t)&&t>0?t:null}function oe(e){let t=Math.max(0,Math.floor(Number(e)));return Number.isFinite(t)?t:null}function se(e){if(!A(e.lane)||e.lane.curve!==`ed25519`)return null;let t=j(e.lane.state);if(!t)return null;let n={kind:`lane_candidate`,walletId:e.lane.walletId,nearAccountId:e.lane.nearAccountId,nearEd25519SigningKeyId:e.lane.nearEd25519SigningKeyId,signerSlot:e.lane.signerSlot,materialActivation:e.lane.materialActivation,auth:e.lane.auth,curve:`ed25519`,chain:`near`,thresholdSessionId:e.lane.thresholdSessionId,state:t,remainingUses:oe(e.lane.remainingUses),expiresAtMs:ae(e.lane.expiresAtMs),updatedAtMs:ae(e.lane.updatedAtMs),source:ie(e.lane.source)};return e.lane.authorizationState===`authorization_required`?{...n,authorizationState:`authorization_required`,state:`deferred`}:{...n,authorizationState:`authorized`,authorization:e.lane.authorization}}function ce(e){if(!A(e.lane)||e.lane.curve!==`ecdsa`)return null;let t=j(e.lane.state);if(!t)return null;let r=u(e.lane.auth),i={kind:`lane_candidate`,walletId:n(e.walletId),auth:e.lane.auth,authMethod:r,curve:`ecdsa`,chain:e.lane.chainTarget.kind,key:e.lane.key,materialActivation:e.lane.materialActivation,...r===`passkey`?{resolvedKey:e.lane.resolvedKey}:{},keyHandle:e.lane.publicFacts.keyHandle,chainTarget:e.lane.chainTarget};switch(e.lane.source){case`active_wallet_authority`:return{...i,source:`active_wallet_authority`,runtime:e.lane.runtime,authorizationState:`authorization_required`,state:`deferred`};case`canonical_capability`:return e.lane.authorization?{...i,source:`canonical_capability`,authorizationState:`authorized`,authorization:e.lane.authorization,state:t}:{...i,source:`canonical_capability`,authorizationState:`authorization_required`,state:`deferred`};default:return e.lane}}function le(e){if(!e||e.curve!==`ecdsa`||!e.chainTarget||!(`key`in e)||!e.key||!(`auth`in e)||!e.auth)return null;let t=u(e.auth);try{let n=d(e.auth);return[t,`ecdsa`,r(e.chainTarget),n,ue(e),w(e.materialActivation)].join(`:`)}catch{return null}}function ue(e){return s({walletId:e.key.walletId,publicFacts:e.publicFacts})}function M(e){if(!e||e.curve!==`ed25519`||e.chain!==`near`||e.state===`missing`||!e.auth)return null;let t=u(e.auth),n=String(e.walletId||``).trim(),r=String(e.nearAccountId||``).trim(),i=String(e.nearEd25519SigningKeyId||``).trim(),a=String(e.signerSlot||``).trim(),o=String(e.thresholdSessionId||``).trim(),s=e.materialActivation?w(e.materialActivation):``;return!t||!n||!r||!i||!a||!o||!s?null:[n,r,i,a,t,`ed25519`,`near`,o,s].join(`:`)}function N(e){return{curve:`ecdsa`,chainTarget:e.chainTarget,state:`missing`}}function de(e,t){let n=r(t);return e.ecdsa.lanesByTarget[n]||N({chainTarget:t})}function fe(e,t){let n=r(t);return e.ecdsa.candidatesByTarget[n]||[]}function pe(){return{curve:`ed25519`,chain:`near`,state:`missing`}}function P(e){let t=Math.floor(Number(e.remainingUses)),n=Math.floor(Number(e.expiresAtMs)),r={};return Number.isFinite(t)&&t>=0&&(r.remainingUses=t),Number.isFinite(n)&&n>0&&(r.expiresAtMs=n),Object.keys(r).length?r:void 0}function F(e){return Math.floor(Number(`updatedAtMs`in e?e.updatedAtMs:0)||0)}function I(e){return m(e.expiresAtMs??e.policyHint?.expiresAtMs)}function L(e){switch(e.state){case`ready`:return 5;case`restorable`:return 4;case`deferred`:return 3;case`expired`:case`exhausted`:return 2;case`missing`:return 1}}function R(e){return!A(e)||e.curve===`ecdsa`?0:e.source===`durable_sealed_record`?1:0}function z(e,t){return L(e)-L(t)||R(e)-R(t)||F(e)-F(t)}function me(e,t){return z(e,t)}function he(e,t){return L(e)-L(t)||R(e)-R(t)||F(e)-F(t)}function B(e){let t=d(e.auth),n=String(e.walletId||``).trim(),r=String(e.nearAccountId||``).trim(),i=String(e.nearEd25519SigningKeyId||``).trim(),a=String(e.signerSlot||``).trim(),o=w(e.materialActivation);return!t||!n||!r||!i||!a||!o?null:{walletId:n,authKey:t,nearAccountId:r,nearEd25519SigningKeyId:i,signerSlot:a,materialActivationKey:o}}function V(e){return[e.walletId,e.authKey,e.nearAccountId,e.nearEd25519SigningKeyId,e.signerSlot,e.materialActivationKey].map(e=>encodeURIComponent(e)).join(`|`)}function ge(e){if(!A(e)||e.curve!==`ed25519`)return null;let t=B(e);return t?{groupKey:t,lane:e}:null}function H(e,t){return me(t,e)}function U(e,t){return e>t?1:t>e?-1:0}function W(e,t){let n=e.localeCompare(t);return n>0?1:n<0?-1:0}function G(e){for(let t of e)if(t!==0)return t;return 0}function _e(e){return[]}function ve(e){return!0}function ye(e){return I(e.lane)}function be(){return`exact_target`}function xe(e,t){return G([U(L(e.lane),L(t.lane)),U(R(e.lane),R(t.lane)),W(Se(e.lane),Se(t.lane))])}function Se(e){return[e.thresholdSessionId,e.authorizationState===`authorized`?e.authorization.operationCredential.walletSessionId:``,e.authorizationState===`authorized`?e.authorization.session.quotaId:``,e.source||`durable_sealed_record`].map(e=>String(e)).join(`|`)}const Ce={groupKey:we,groupKeyString:V,groupConflicts:_e,supersession:{isOperationUsable:ve,generation:ye,exactness:be,tieBreak:xe}};function we(e){return e.groupKey}function Te(e){let t=new Map;for(let n of e){let e=V(n.groupKey);t.set(e,[...t.get(e)||[],n])}return t}function Ee(e,t){let n=h(e,Ce);switch(n.kind){case`selected`:return[n.selectedFact.lane];case`no_current_lane`:return[];case`conflicting_key_material`:return t.push({curve:`ed25519`,source:`canonical_lane_inventory`,reason:`conflicting_key_material`,message:`Ed25519 canonical lane inventory has conflicting material facts`}),[];case`ambiguous_material`:return t.push({curve:`ed25519`,source:`canonical_lane_inventory`,reason:`ambiguous_material`,message:`Ed25519 canonical lane inventory has incomparable usable records`}),[];default:return n}}function De(e,t){let n=e.map(ge).filter(e=>e!==null),r=[];for(let e of Te(n).values())r.push(...Ee(e,t));return r.sort(H)}function Oe(e){if(!A(e)||e.curve!==`ed25519`)return null;let t=String(e.thresholdSessionId||``).trim();return e.authorizationState!==`authorized`||!t?null:`${e.authorization.operationCredential.walletSessionId}:${e.authorization.session.quotaId}:${t}`}function ke(e){if(!A(e.primaryLane)||e.primaryLane.curve!==`ed25519`||D(e.primaryLane)!==`passkey`)return e.primaryLane;let t=Oe(e.primaryLane);return t&&e.candidates.find(e=>A(e)&&e.curve===`ed25519`&&D(e)===`email_otp`&&Oe(e)===t)||e.primaryLane}function Ae(){try{return globalThis.localStorage?.getItem(`seams:debug:signing-session`)===`1`}catch{return!1}}function K(e){return e?A(e)?{present:!0,authMethod:u(e.auth),curve:e.curve,keyHandle:e.publicFacts.keyHandle,walletId:e.key.walletId,chainTarget:e.chainTarget,targetKey:r(e.chainTarget),state:e.state,source:e.source,evmFamilyKeyFingerprint:ue(e),ecdsaThresholdKeyId:e.key.ecdsaThresholdKeyId,participantIds:e.publicFacts.participantIds,thresholdOwnerAddress:e.publicFacts.thresholdOwnerAddress,remainingUses:e.remainingUses,expiresAtMs:e.expiresAtMs,updatedAtMs:e.updatedAtMs}:{present:!0,curve:e.curve,chainTarget:e.chainTarget,state:e.state}:{present:!1}}function je(e){switch(e.source){case`canonical_capability`:return`canonical_capability`;case`active_wallet_authority`:return`active_wallet_authority`;default:return e}}function Me(e){let t=d(e.auth);return{walletId:String(e.key.walletId),authKey:t,materialActivationKey:w(e.materialActivation),ecdsaThresholdKeyId:String(e.key.ecdsaThresholdKeyId),signingRootId:String(e.key.signingRootId),signingRootVersion:String(e.key.signingRootVersion||`default`)}}function Ne(e){return[e.walletId,e.authKey,e.materialActivationKey,e.ecdsaThresholdKeyId,e.signingRootId,e.signingRootVersion].map(e=>encodeURIComponent(e)).join(`|`)}function Pe(e){let t=Me(e);return t?{source:je(e),groupKey:t,chainTargetKey:r(e.chainTarget),lane:e}:null}function Fe(e){let t=d(e.auth);return[String(e.key.walletId),t,w(e.materialActivation),String(e.key.signingRootId),String(e.key.signingRootVersion||`default`)].map(e=>encodeURIComponent(e)).join(`|`)}function q(e,t){return[...new Set(e.map(e=>t(e.lane)).filter(Boolean))].sort()}function Ie(e){return[{field:`ecdsaThresholdKeyId`,values:q(e.facts,e=>String(e.key.ecdsaThresholdKeyId||``))},{field:`thresholdOwnerAddress`,values:q(e.facts,e=>String(e.publicFacts.thresholdOwnerAddress||``).toLowerCase())},{field:`keyHandle`,values:q(e.facts,e=>String(e.publicFacts.keyHandle||``))},{field:`publicKeyB64u`,values:q(e.facts,e=>String(e.publicFacts.publicKeyB64u||``))},{field:`participantIds`,values:q(e.facts,e=>e.publicFacts.participantIds.map(e=>Number(e)).join(`,`))}].filter(e=>e.values.length>1).map(t=>({groupKey:e.key,field:t.field,values:t.values}))}function Le(e){let t=new Map;for(let n of e){let e=Fe(n.lane);e&&t.set(e,[...t.get(e)||[],n])}let n=new Map;for(let[e,r]of t){let t=r[0];if(!t)continue;let i=Ie({key:t.groupKey,facts:r});i.length&&n.set(e,i)}return n}function Re(e){let t=Fe(e.fact.lane);return t&&e.conflictsByFamilyGroup.get(t)||[]}function ze(e){return e.filter(e=>A(e)&&e.curve===`ecdsa`).map(Pe).filter(e=>e!==null)}function Be(e){return e.source===`active_wallet_authority`?2:1}function Ve(e){return e.groupKey}function He(e){let t=e[0];return t?Ie({key:t.groupKey,facts:e}):[]}function Ue(e){return e.lane.source===`active_wallet_authority`?!0:e.lane.state!==`deferred`||!e.lane.authorization}function We(e){return I(e.lane)}function Ge(e){return`exact_target`}function J(e){return[w(e.materialActivation),e.source,r(e.chainTarget)].map(e=>String(e)).join(`|`)}function Ke(e,t){return G([U(L(e.lane),L(t.lane)),U(Be(e.lane),Be(t.lane)),W(J(e.lane),J(t.lane))])}const qe={groupKey:Ve,groupKeyString:Ne,groupConflicts:He,supersession:{isOperationUsable:Ue,generation:We,exactness:Ge,tieBreak:Ke}};function Je(e){let t=new Map;for(let n of e)t.set(Ne(n.groupKey),n.groupKey);return[...t.values()]}function Ye(e){let t=h(e,qe);switch(t.kind){case`selected`:return{kind:`selected`,selectedFact:t.selectedFact,supersededFacts:t.supersededFacts};case`no_current_lane`:return{kind:`no_current_lane`,unusableFacts:t.unusableFacts};case`conflicting_key_material`:return{kind:`conflicting_key_material`,conflicts:t.conflicts};case`ambiguous_material`:return{kind:`ambiguous_material`,candidates:Je(t.candidates),candidateFacts:t.candidates};default:return t}}function Xe(e){return A(e)?J(e):null}function Ze(e){let t={},n={},i=Object.fromEntries(Object.entries(e.candidatesByTarget).map(([e,t])=>[e,Qe(t,Xe)])),a=Le(Object.values(i).flatMap(ze));for(let o of e.targets){let s=r(o),c=ze(i[s]||[]),l=c.flatMap(e=>Re({fact:e,conflictsByFamilyGroup:a}));if(l.length){e.invalidLanes.push({curve:`ecdsa`,source:`canonical_lane_inventory`,reason:`conflicting_key_material`,targetKey:s,groupKey:l[0]?.groupKey,conflicts:l}),t[s]=[],n[s]=N({chainTarget:o});continue}let u=Ye(c);switch(u.kind){case`selected`:t[s]=[u.selectedFact.lane],n[s]=u.selectedFact.lane;break;case`no_current_lane`:t[s]=[],n[s]=N({chainTarget:o});break;case`conflicting_key_material`:e.invalidLanes.push({curve:`ecdsa`,source:`canonical_lane_inventory`,reason:`conflicting_key_material`,targetKey:s,groupKey:u.conflicts[0]?.groupKey,conflicts:u.conflicts}),t[s]=[],n[s]=N({chainTarget:o});break;case`ambiguous_material`:e.invalidLanes.push({curve:`ecdsa`,source:`canonical_lane_inventory`,reason:`ambiguous_material`,targetKey:s}),t[s]=[],n[s]=N({chainTarget:o});break}}return{lanesByTarget:n,candidatesByTarget:t}}function Qe(e,t,n=z){let r=new Map,i=[];for(let n of e){let e=t(n);if(!e){i.push(n);continue}r.set(e,[...r.get(e)||[],n])}return[...[...r.values()].map(e=>[...e].sort((e,t)=>n(t,e))[0]),...i]}function $e(e){let t=new Set(e.filter(e=>A(e)&&e.curve===`ed25519`&&e.source===`durable_sealed_record`&&(e.state===`ready`||e.state===`restorable`)).map(B).filter(e=>e!==null).map(V));return t.size?e.filter(e=>{if(!A(e)||e.curve!==`ed25519`||e.source!==`public_capability_reference`)return!0;let n=B(e);return!n||!t.has(V(n))}):[...e]}async function et(e,t){return e.state===`missing`||d(e.auth)!==d(t.auth)||!await rt(e,t)?!1:t.auth.kind===`passkey`?`keyFamily`in t&&t.keyFamily===`ecdsa`?!1:e.signerSlot===t.signerSlot:!0}function tt(e,t){return e.state===`missing`||d(e.auth)!==d(t.auth)?!1:nt(e,t)}function nt(e,t){let n=t.auth.kind===`passkey`?void 0:t.ownerAuthority;if(!n)return!0;if(e.curve===`ecdsa`&&e.source===`active_wallet_authority`)return e.runtime.factorAuthorityRef.walletAuthMethodId===n.walletAuthMethodId&&String(e.runtime.factorAuthorityRef.authorityDigest)===String(n.authorityDigest);if(e.curve===`ecdsa`&&e.source===`canonical_capability`){let t=e.capability.manifest.signer.authority;return t.walletAuthMethodId===n.walletAuthMethodId&&String(t.authorityDigest)===String(n.authorityDigest)}return!1}async function rt(e,t){let n=t.auth.kind===`passkey`?void 0:t.ownerAuthority;if(!n)return!0;if(e.state===`missing`||e.curve!==`ed25519`)return!1;if(e.authorizationState===`authorization_required`)return!0;try{let t=await a({authority:e.authorization.selectedFactorAuthority});return t.walletId===e.walletId&&t.walletAuthMethodId===n.walletAuthMethodId&&t.authorityDigest===n.authorityDigest}catch{return!1}}async function it(e,t){let n=[];for(let r of e)await et(r,t)&&n.push(r);return n}async function at(e,t){let i=n(e.walletId),a=new Map;for(let t of e.ecdsaChainTargets)a.set(r(t),t);let o=[...a.values()],[s,c,l,d]=await Promise.all([t.listSealedRecordsForWallet({walletId:i,filter:{...e.authMethod?{authMethod:e.authMethod}:{},curve:`ed25519`}}),t.listPublicCapabilityReferences?.()??[],t.readActiveWalletSessionAuthorization?.(i)??{kind:`missing`},o.length>0&&t.listCanonicalEcdsaLanesForWallet?t.listCanonicalEcdsaLanesForWallet({walletId:i}):[]]),f=l.kind===`found`?l.authorization:null,p=[...o],m={},h={},g={};for(let e of p){let t=r(e);m[t]=N({chainTarget:e}),h[t]=[],g[t]=0}let _=[],v=0,y=Ae(),b=[],x=[];for(let t of s){let n=te(t,f,e.ownerScope);if(!n)continue;_.push(n);let r=F(n);v=Math.max(v,r)}for(let n of c){if(String(n.walletId)!==String(i))continue;let r=l.kind===`exhausted`||l.kind===`expired`;if(!t.isPublicCapabilityActive?.(n)&&!r)continue;let a=re(n,f,e.ownerScope);a&&(e.authMethod&&u(a.auth)!==e.authMethod||_.push(a))}for(let t of d){let n=u(t.auth);if(e.authMethod&&n!==e.authMethod||String(t.key.walletId)!==String(i))continue;let o=r(t.chainTarget);if(!a.has(o))continue;h[o]||=[],h[o].push(t);let s=F(t);v=Math.max(v,s),b.push({result:`accepted`,targetKey:o,lane:K(t)})}let S=o.length>0&&t.listActiveWalletAuthorityEcdsaLanesForWallet?await t.listActiveWalletAuthorityEcdsaLanesForWallet({walletId:i,chainTargets:o}):[];for(let t of S){let n=u(t.auth);if(e.authMethod&&n!==e.authMethod||String(t.key.walletId)!==String(i))continue;let o=r(t.chainTarget);a.has(o)&&(h[o]||=[],h[o].push(t),b.push({result:`accepted`,targetKey:o,lane:K(t)}))}let C=e.ownerScope,w=C?await it(_,C):_;if(C)for(let e of Object.keys(h))h[e]=(h[e]||[]).filter(e=>tt(e,C));let T=De(Qe($e(w),M,he).sort(H),x),ee=ke({primaryLane:T[0]||pe(),candidates:T}),E=Ze({targets:p,candidatesByTarget:Ze({targets:p,candidatesByTarget:h,invalidLanes:x}).candidatesByTarget,invalidLanes:x}),D={walletId:i,generation:v,ecdsa:{targets:p,lanesByTarget:E.lanesByTarget,candidatesByTarget:E.candidatesByTarget},lanes:{ed25519:{near:ee}},candidates:{ed25519:{near:T}},diagnostics:{invalidLanes:x}},O=p.map(e=>{let t=r(e),n=D.ecdsa.candidatesByTarget[t]||[],i=D.ecdsa.lanesByTarget[t],a=i?.state||`missing`;return n.length>0&&a!==`missing`?null:{chainTarget:e,targetKey:t,candidateCount:n.length,selectedLane:K(i)}}).filter(e=>!!e),k={walletId:i,authMethod:e.authMethod||`any`,requestedTargets:p.map(e=>({chainTarget:e,targetKey:r(e)})),sealedRecordCount:0,runtimeRecordCount:d.length,durableDiscovery:[],runtimeDiscovery:b,resultSelectedLanesByTarget:Object.fromEntries(Object.entries(D.ecdsa.lanesByTarget).map(([e,t])=>[e,K(t)])),resultCandidatesByTarget:Object.fromEntries(Object.entries(D.ecdsa.candidatesByTarget).map(([e,t])=>[e,t.map(e=>K(e))]))};if(y&&O.length>0)try{console.warn(`[SigningLanes][available][ecdsa][missing-candidates]`,JSON.stringify({...k,missingEcdsaTargets:O}))}catch{}if(y)try{console.info(`[SigningLanes][available][ecdsa]`,JSON.stringify(k))}catch{}return D}function Y(t,n){return e(t,{fallback:n,min:1})}function X(e,t){let n=Error(`[SigningEngine] ${t}`);return n.code=e,n}function ot(e,t){let n=e.get(t);if(n)return n;let r={running:!1,items:[]};return e.set(t,r),r}function st(e){e.timeoutHandle&&=(clearTimeout(e.timeoutHandle),null)}async function ct(e,t){let n=e.get(t);if(!(!n||n.running)){n.running=!0;try{for(;n.items.length>0;){let e=n.items.shift();if(e&&!e.isSettled()){if(st(e),e.shouldAbort?.()){e.reject(e.makeCancelledError(`cancelled`));continue}if(Date.now()-e.enqueuedAtMs>e.timeoutMs){e.reject(e.makeTimeoutError(e.timeoutMs));continue}try{await e.run()}catch(t){e.reject(t)}}}}finally{n.running=!1,n.items.length===0&&e.get(t)===n?e.delete(t):n.items.length>0&&ct(e,t)}}}function lt(e){for(let t of e.values()){for(let e of t.items)st(e),e.reject(e.makeCancelledError(`queue_cleared`));t.items.length=0}e.clear()}function ut(e){return[`material`,encodeURIComponent(String(e.materialActivation.materialOwner)),encodeURIComponent(String(e.materialActivation.capability)),encodeURIComponent(String(e.materialActivation.activationId))].join(`:`)}async function dt(e){let{labels:t,owner:n}=e,r=String(e.queueKey||``).trim();if(!r)throw Error(`[SigningEngine] ${t.queue} requires non-empty queueKey`);if(!e.enabled)return await e.task();let i=Y(e.maxQueueLength,8),a=Y(e.queueTimeoutMs,45e3),o=ot(e.queueByKey,r);if(o.items.length+(o.running?1:0)>=i)throw X(`commit_queue_overflow`,`${t.queue} overflow for ${n} (queueKey=${r}, max=${i})`);return await new Promise((i,s)=>{let c=null,l=!1,u=()=>{c&&=(clearTimeout(c),null)},d=e=>{l||(l=!0,u(),s(e))},f=e=>{l||(l=!0,u(),i(e))},p=e=>X(`cancelled`,`${t.queuedOperation} cancelled for ${n} (queueKey=${r}${e===`queue_cleared`?`, queue_cleared`:``})`),m=e=>X(`commit_queue_timeout`,`${t.queue} timeout for ${n} (queueKey=${r}, waited>${e}ms before start)`),h={enqueuedAtMs:Date.now(),timeoutMs:a,shouldAbort:e.shouldAbort,timeoutHandle:null,isSettled:()=>l,reject:d,makeCancelledError:p,makeTimeoutError:m,run:async()=>{if(e.shouldAbort?.())throw p(`cancelled`);f(await e.task())}};c=setTimeout(()=>{if(h.isSettled())return;let t=o.items.indexOf(h);t>=0&&o.items.splice(t,1),d(m(a)),!o.running&&o.items.length===0&&e.queueByKey.get(r)===o&&e.queueByKey.delete(r)},a),h.timeoutHandle=c,o.items.push(h),ct(e.queueByKey,r)})}function Z(e){let t={walletId:p(e.laneIdentity),authMethod:u(e.laneIdentity.auth),laneIdentity:e.laneIdentity};return e.kind===`ecdsa`?{...t,walletSessionId:e.authorization.operationCredential.walletSessionId,quotaId:e.authorization.session.quotaId}:{...t,walletSessionId:e.laneIdentity.walletSessionId,quotaId:e.laneIdentity.quotaId}}function Q(e){return{kind:`invalid`,...Z(e.source)}}function $(e){let t=Number(e);return!Number.isSafeInteger(t)||t<0?null:t}function ft(e){let t=$(e.expiresAtMs),n=$(e.detectedAtMs);if(t===null||t===0)throw Error(`Authoritative expired Wallet Session expiresAtMs is invalid`);if(n===null||n===0)throw Error(`Authoritative expired Wallet Session detectedAtMs is invalid`);if(t>n)throw Error(`Authoritative expired Wallet Session timeline is invalid`);return{kind:`expired`,...Z(e.source),expiresAtMs:t,detectedAtMs:n}}function pt(e){let t=$(e.observation.expiresAtMs);if(t===null||t===0)return Q({source:e.observation.source});let n=Z(e.observation.source);return t<=e.nowMs?{kind:`expired`,...n,expiresAtMs:t,detectedAtMs:e.nowMs}:{kind:`active`,...n,expiresAtMs:t}}function mt(e){let t=$(e.nowMs);if(t===null)return Q({source:e.observation.source});switch(e.observation.kind){case`found`:return pt({observation:e.observation,nowMs:t});case`missing`:return{kind:`missing`,...Z(e.observation.source)};case`unavailable`:return{kind:`unavailable`,...Z(e.observation.source)};case`invalid`:return Q({source:e.observation.source});default:return e.observation}}export{C as _,dt as a,D as c,le as d,ce as f,at as g,A as h,ut as i,fe as l,se as m,ft as n,T as o,M as p,lt as r,E as s,mt as t,de as u,w as v};
@@ -1 +0,0 @@
1
- import{C as e}from"./chains-gV2K9gA4.js";function t(t){if(!Array.isArray(t))throw Error(`authMethods must be an array of wallet auth method plugins.`);let n=[],r=new Set;for(let i of t){if(!e(i)||Object.keys(i).length!==1||i.kind!==`voiceid`||r.has(i.kind))throw Error(`Unsupported or duplicate wallet auth method plugin.`);r.add(i.kind),n.push({kind:`voiceid`})}return n}function n(e,t){for(let n of e)if(n.kind===t)return!0;return!1}function r(e){return typeof e==`string`&&e.trim().toLowerCase().split(/[-_]/,1)[0]===`ja`?`ja`:`en`}const i={targetDepth:{min:1,max:64},maxRefillInFlight:{min:1,max:8},refillAttemptTimeoutMs:{min:5e3,max:12e4}};export{n as i,r as n,t as r,i as t};
@@ -1 +0,0 @@
1
- import{N as e}from"./domainIds-t1lp25yU.js";import{C as t,T as n,b as r,k as i,n as a,r as o}from"./chains-gV2K9gA4.js";import{n as s,r as c,t as l}from"./configBuilder-DrxXNUpV.js";import"./signingSessionSeal-DqbjG8c8.js";function u(e){return t(e)&&Object.values(e).every(n)}function d(e){if(!t(e)||e.palette!==`default`||!t(e.theme))return!1;let r=e.theme;return(e.locale===void 0||e.locale===`en`||e.locale===`ja`)&&n(r.id)&&r.id.trim().length>0&&(r.mode===`dark`||r.mode===`light`)&&u(r.colors)&&(r.shape===void 0||u(r.shape))}function f(e){return!t(e)||!o(e.network)?!1:n(e.rpcUrl)&&e.rpcUrl.trim().length>0&&n(e.explorerUrl)&&(a(e.network)||r(e.chainId)&&Number.isSafeInteger(e.chainId)&&e.chainId>0)}function p(e){if(!t(e)||!Array.isArray(e.chains)||!e.chains.every(f))return!1;let r=e.relayer;return t(r)&&n(r.accountId)&&n(r.url)&&r.url.trim().length>0&&t(r.routes)&&n(r.routes.delegateAction)}function m(e){if(!t(e)||e.mode!==`managed`)return!1;let r=e.nearAccountProvisioning;return n(e.publishableKey)&&n(e.projectEnvironmentId)&&(e.paymentMode===`disabled`||e.paymentMode===`quota_then_x402`||e.paymentMode===`always_x402`)&&t(r)&&(r.kind===`implicit_account`||r.kind===`relayer_named_subaccount`)}function h(e){return t(e)&&r(e.ttlMs)&&r(e.remainingUses)}function g(e){if(!t(e)||typeof e.enabled!=`boolean`||!h(e.signingSession))return!1;let n=i(e.signingSession,`signingSession`);return n.kind===`jwt`||n.kind===`cookie`}function _(e){return t(e)?e.mode===`disabled`?e.signingWorkerId===void 0:e.mode===`enabled`&&n(e.signingWorkerId)&&e.signingWorkerId.trim().length>0:!1}function v(e){return t(e)?typeof e.enabled==`boolean`&&r(e.targetDepth)&&Number.isInteger(e.targetDepth)&&e.targetDepth>=l.targetDepth.min&&e.targetDepth<=l.targetDepth.max&&r(e.lowWatermark)&&Number.isInteger(e.lowWatermark)&&e.lowWatermark>=0&&e.lowWatermark<=e.targetDepth&&r(e.maxRefillInFlight)&&Number.isInteger(e.maxRefillInFlight)&&e.maxRefillInFlight>=l.maxRefillInFlight.min&&e.maxRefillInFlight<=l.maxRefillInFlight.max&&r(e.refillAttemptTimeoutMs)&&Number.isInteger(e.refillAttemptTimeoutMs)&&e.refillAttemptTimeoutMs>=l.refillAttemptTimeoutMs.min&&e.refillAttemptTimeoutMs<=l.refillAttemptTimeoutMs.max:!1}function y(e){if(!t(e)||!h(e.sessionDefaults)||!t(e.emailOtp)||e.emailOtp.authPolicy!==`session`&&e.emailOtp.authPolicy!==`per_operation`||!t(e.routerAb)||!_(e.routerAb.normalSigning)||!t(e.routerAbEcdsaDerivation)||!v(e.routerAbEcdsaDerivation.presignaturePool)||!t(e.thresholdEcdsa)||!t(e.thresholdEcdsa.provisioningDefaults))return!1;let n=e.thresholdEcdsa.provisioningDefaults;if(!g(n.tempo)||!g(n.evm))return!1;let r=e.sessionSeal;return t(r)?e.sessionPersistenceMode===`none`?r.mode===`none`&&r.protocol===void 0:e.sessionPersistenceMode===`sealed_refresh_v1`&&r.mode===`sealed_refresh_v1`&&t(r.protocol)&&r.protocol.algorithm===`shamir3pass-v2`&&r.protocol.groupId===`rfc2409-group2`:!1}function b(e){if(!t(e)||!t(e.authenticatorOptions))return!1;let r=e.authenticatorOptions;if(r.userVerification!==`required`&&r.userVerification!==`preferred`&&r.userVerification!==`discouraged`)return!1;let i=r.originPolicy;return t(i)&&(i.single===void 0||typeof i.single==`boolean`)&&(i.all_subdomains===void 0||typeof i.all_subdomains==`boolean`)&&(i.multiple===void 0||Array.isArray(i.multiple)&&i.multiple.every(n))}function x(n){if(!t(n)||n.mode!==`direct`||n.iframe!==void 0)return!1;let r=e(n.rpId);return r.ok&&r.value===n.rpId}function S(e){if(!t(e))return!1;try{c(e.authMethods)}catch{return!1}return p(e.network)&&m(e.registration)&&y(e.signing)&&b(e.webauthn)&&x(e.wallet)&&t(e.ui)&&d(e.ui.appearance)}function C(e){if(!S(e))throw Error(`Invalid resolved wallet host configuration`);return T(e,w(e.ui.appearance))}function w(e){return{...e,locale:s(e.locale)}}function T(e,t){return{authMethods:e.authMethods,network:e.network,registration:e.registration,signing:e.signing,webauthn:e.webauthn,wallet:e.wallet,ui:{appearance:t}}}function E(e){let t=i(e,`wallet configuration update`);if(t.kind===`configure`&&n(t.assetsBaseUrl)&&t.assetsBaseUrl.length>0&&t.appearance===void 0)return{kind:`configure`,config:C(t.config),assetsBaseUrl:t.assetsBaseUrl};if(t.kind===`appearance`&&d(t.appearance)&&t.config===void 0&&t.assetsBaseUrl===void 0)return{kind:`appearance`,appearance:w(t.appearance)};throw Error(`Invalid wallet configuration update`)}function D(e,t){switch(t.kind){case`configure`:return{kind:`configured`,config:t.config,assetsBaseUrl:t.assetsBaseUrl};case`appearance`:if(e.kind!==`configured`)throw Error(`Wallet configuration is required before appearance updates`);return{kind:`configured`,config:T(e.config,t.appearance),assetsBaseUrl:e.assetsBaseUrl}}}function O(e){if(Array.isArray(e))return e.map(O);if(e&&typeof e==`object`){let t=e,n={};for(let e of Object.keys(t).sort())n[e]=O(t[e]);return n}return e}function k(e){return JSON.stringify(O({authMethods:e?.authMethods,network:e?.network,registration:e?.registration,signing:e?.signing,webauthn:e?.webauthn,rpId:e?.wallet.rpId}))}export{E as n,k as r,D as t};
@@ -1 +0,0 @@
1
- import{g as e,i as t}from"./domainIds-t1lp25yU.js";import{X as n,Y as r}from"./activeWalletSession-H9JBdHyQ.js";import{i,r as a}from"./base64-BmKR3UqU.js";import{t as o}from"./canonicalPrimitives-B6YMrI3W.js";import{a as s,c as ee,o as te,s as ne}from"./ecdsaChainTarget-DbLthshF.js";import{Dt as re,T as c,Wt as l,Xt as u,an as d,bt as f,ct as p,dn as m,et as h,fn as g,i as _,n as ie,pn as v,r as ae,t as oe,wt as y,yt as se}from"./emailOtpEcdsaDerivationIdentity-CIh9IPai.js";function b(e,t){let n=String(e??``).trim();if(!n)throw Error(`${t} must be a non-empty string`);return n}function ce(e){return b(e,`signing-session seal key version`)}function le(e){return b(e,`ECDSA client verifying share`)}function ue(e){return b(e,`ECDSA relayer key id`)}function de(e){return b(e,`ECDSA key handle`)}function fe(e){return e}function pe(e){if(typeof e!=`string`)throw Error(`ECDSA client verifying public key must be a string`);let t=e.trim();if(!/^[A-Za-z0-9_-]+$/.test(t))throw Error(`ECDSA client verifying public key must be unpadded base64url`);let n;try{n=a(t)}catch{throw Error(`ECDSA client verifying public key must be valid base64url`)}if(n.length!==33||i(n)!==t)throw Error(`ECDSA client verifying public key must be canonical base64url for 33 bytes`);if(n[0]!==2&&n[0]!==3)throw Error(`ECDSA client verifying public key must be compressed secp256k1`);return t}function x(e){return d(e)}function S(e){return b(e,`ECDSA role-local material handle`)}function C(e){return b(e,`ECDSA role-local binding digest`)}function w(e){return b(e,`ECDSA role-local durable material reference`)}function T(t){if(!t||typeof t!=`object`||Array.isArray(t))throw Error(`ECDSA role-local persisted material reference must be an object`);let n=t,r=Object.keys(n).sort(),i=[`bindingDigest`,`durableMaterialRef`,`kind`,`materialActivation`];if(r.length!==i.length||r.some((e,t)=>e!==i[t]))throw Error(`ECDSA role-local persisted material reference has unexpected fields`);if(n.kind!==`ecdsa_role_local_persisted_material_ref_v1`)throw Error(`ECDSA role-local persisted material reference kind is invalid`);let a=e(n.materialActivation);if(!a.ok)throw Error(a.error.message);return{kind:`ecdsa_role_local_persisted_material_ref_v1`,durableMaterialRef:w(n.durableMaterialRef),bindingDigest:C(n.bindingDigest),materialActivation:a.value}}function E(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`ECDSA role-local worker handle must be an object`);let t=e,n=Object.keys(t).sort(),r=[`bindingDigest`,`durableMaterialRef`,`kind`,`materialHandle`];if(n.length!==r.length||n.some((e,t)=>e!==r[t]))throw Error(`ECDSA role-local worker handle has unexpected fields`);if(t.kind!==`ecdsa_role_local_worker_handle_v1`)throw Error(`ECDSA role-local worker handle kind is invalid`);return{kind:`ecdsa_role_local_worker_handle_v1`,materialHandle:S(t.materialHandle),bindingDigest:C(t.bindingDigest),durableMaterialRef:w(t.durableMaterialRef)}}function D(e){throw Error(`Unhandled ECDSA role-local branch: ${String(e)}`)}function O(e,t){if(typeof e!=`string`||!e.trim())throw Error(`[platform][ecdsa-role-local] ${t} is required`);return e.trim()}function k(e,t,n){let r=O(e,t);if(a(r).length!==n)throw Error(`[platform][ecdsa-role-local] ${t} must decode to ${n} bytes`);return r}function A(e,t){let n=O(e,t),r=a(n);if(r.length!==33)throw Error(`[platform][ecdsa-role-local] ${t} must decode to 33 bytes`);if(r[0]!==2&&r[0]!==3)throw Error(`[platform][ecdsa-role-local] ${t} must be a compressed SEC1 key`);return n}function j(e){return A(e,`derivationClientSharePublicKey33B64u`)}function M(e){return A(e,`relayerPublicKey33B64u`)}function N(e){return A(e,`groupPublicKey33B64u`)}function P(e){let t=O(e,`ethereumAddress`).toLowerCase();if(!/^0x[0-9a-f]{40}$/.test(t))throw Error(`[platform][ecdsa-role-local] ethereumAddress must be an EVM address`);return t}function F(e){if(!Array.isArray(e)||e.length!==2||e[0]!==1||e[1]!==2)throw Error(`[platform][ecdsa-role-local] participantIds must be [1, 2]`);return[1,2]}function I(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`[platform][ecdsa-role-local] stateBlob must be an object`);if(Object.keys(e).sort().join(`,`)!==`curve,encoding,kind,producer,stateBlobB64u`)throw Error(`[platform][ecdsa-role-local] stateBlob envelope is invalid`);let t=O(Reflect.get(e,`kind`),`stateBlob.kind`),n=O(Reflect.get(e,`curve`),`stateBlob.curve`),r=O(Reflect.get(e,`encoding`),`stateBlob.encoding`),i=O(Reflect.get(e,`producer`),`stateBlob.producer`),o=O(Reflect.get(e,`stateBlobB64u`),`stateBlob.stateBlobB64u`);if(t!==`ecdsa_role_local_state_blob_v1`||n!==`secp256k1`||r!==`base64url`||i!==`signer_core`)throw Error(`[platform][ecdsa-role-local] stateBlob envelope is invalid`);try{a(o)}catch(e){throw Error(`[platform][ecdsa-role-local] stateBlob payload is not base64url`,{cause:e})}return{kind:`ecdsa_role_local_state_blob_v1`,curve:`secp256k1`,encoding:`base64url`,producer:`signer_core`,stateBlobB64u:o}}function L(e,t=`credentialIdB64u`){return O(e,t)}function R(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`[platform][ecdsa-role-local] authMethod must be an object`);switch(O(Reflect.get(e,`kind`),`authMethod.kind`)){case`passkey`:if(Object.keys(e).sort().join(`,`)!==`credentialIdB64u,kind,rpId`)throw Error(`[platform][ecdsa-role-local] passkey authMethod fields are invalid`);return{kind:`passkey`,credentialIdB64u:L(Reflect.get(e,`credentialIdB64u`)),rpId:c(Reflect.get(e,`rpId`))};case`email_otp`:if(Object.keys(e).sort().join(`,`)!==`authSubjectId,kind`)throw Error(`[platform][ecdsa-role-local] email OTP authMethod fields are invalid`);return{kind:`email_otp`,authSubjectId:_(Reflect.get(e,`authSubjectId`))};default:throw Error(`[platform][ecdsa-role-local] authMethod kind is invalid`)}}function z(e){return{kind:`passkey`,credentialIdB64u:L(e.credentialIdB64u),rpId:c(e.rpId)}}function B(e){return{kind:`email_otp`,authSubjectId:_(e.authSubjectId)}}function me(e,t){if(e.kind!==t.kind)return!1;switch(e.kind){case`passkey`:return t.kind===`passkey`?String(e.rpId)===String(t.rpId)&&String(e.credentialIdB64u)===String(t.credentialIdB64u):!1;case`email_otp`:return t.kind===`email_otp`?String(e.authSubjectId)===String(t.authSubjectId):!1;default:return D(e)}}function he(e){switch(e.authMethod.kind){case`passkey`:return{kind:`ecdsa_role_local_ready_passkey_v1`,stateBlob:e.stateBlob,publicFacts:e.publicFacts,authMethod:e.authMethod};case`email_otp`:return{kind:`ecdsa_role_local_ready_email_otp_v1`,stateBlob:e.stateBlob,publicFacts:e.publicFacts,authMethod:e.authMethod};default:return D(e.authMethod)}}function ge(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`[platform][ecdsa-role-local] chainTarget must be an object`);switch(O(Reflect.get(e,`kind`),`chainTarget.kind`).toLowerCase()){case`evm`:if(Object.keys(e).sort().join(`,`)!==`chainId,kind,namespace,networkSlug`)throw Error(`[platform][ecdsa-role-local] EVM chainTarget fields are invalid`);return s({kind:Reflect.get(e,`kind`),namespace:Reflect.get(e,`namespace`),chainId:Reflect.get(e,`chainId`),networkSlug:Reflect.get(e,`networkSlug`)});case`tempo`:if(Object.keys(e).sort().join(`,`)!==`chainId,kind,networkSlug`)throw Error(`[platform][ecdsa-role-local] Tempo chainTarget fields are invalid`);return s({kind:Reflect.get(e,`kind`),chainId:Reflect.get(e,`chainId`),networkSlug:Reflect.get(e,`networkSlug`)});default:throw Error(`[platform][ecdsa-role-local] chainTarget kind is invalid`)}}function V(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`[platform][ecdsa-role-local] publicFacts must be an object`);if(Object.keys(e).sort().join(`,`)!==`applicationBindingDigestB64u,chainTarget,clientParticipantId,contextBinding32B64u,derivationClientSharePublicKey33B64u,ecdsaThresholdKeyId,ethereumAddress,groupPublicKey33B64u,keyHandle,participantIds,publicCapability,relayerParticipantId,relayerPublicKey33B64u,signingRootId,signingRootVersion,walletId`)throw Error(`[platform][ecdsa-role-local] publicFacts fields are invalid`);if(Reflect.get(e,`clientParticipantId`)!==1)throw Error(`[platform][ecdsa-role-local] clientParticipantId must be 1`);if(Reflect.get(e,`relayerParticipantId`)!==2)throw Error(`[platform][ecdsa-role-local] relayerParticipantId must be 2`);let t=j(Reflect.get(e,`derivationClientSharePublicKey33B64u`)),n=M(Reflect.get(e,`relayerPublicKey33B64u`));if(String(t)===String(n))throw Error(`[platform][ecdsa-role-local] relayerPublicKey33B64u must differ from derivationClientSharePublicKey33B64u`);return{walletId:ee(Reflect.get(e,`walletId`)),chainTarget:ge(Reflect.get(e,`chainTarget`)),keyHandle:O(Reflect.get(e,`keyHandle`),`keyHandle`),ecdsaThresholdKeyId:ae(Reflect.get(e,`ecdsaThresholdKeyId`)),signingRootId:oe(Reflect.get(e,`signingRootId`)),signingRootVersion:ie(Reflect.get(e,`signingRootVersion`)),applicationBindingDigestB64u:k(Reflect.get(e,`applicationBindingDigestB64u`),`applicationBindingDigestB64u`,32),clientParticipantId:1,relayerParticipantId:2,participantIds:F(Reflect.get(e,`participantIds`)),contextBinding32B64u:k(Reflect.get(e,`contextBinding32B64u`),`contextBinding32B64u`,32),derivationClientSharePublicKey33B64u:t,relayerPublicKey33B64u:n,groupPublicKey33B64u:N(Reflect.get(e,`groupPublicKey33B64u`)),ethereumAddress:P(Reflect.get(e,`ethereumAddress`)),publicCapability:h(Reflect.get(e,`publicCapability`))}}function H(e){return V(e)}function _e(e){let t=e.publicFacts;return H({walletId:t.walletId,chainTarget:e.chainTarget,keyHandle:t.keyHandle,ecdsaThresholdKeyId:t.ecdsaThresholdKeyId,signingRootId:t.signingRootId,signingRootVersion:t.signingRootVersion,applicationBindingDigestB64u:t.applicationBindingDigestB64u,clientParticipantId:t.clientParticipantId,relayerParticipantId:t.relayerParticipantId,participantIds:t.participantIds,contextBinding32B64u:t.contextBinding32B64u,derivationClientSharePublicKey33B64u:t.derivationClientSharePublicKey33B64u,relayerPublicKey33B64u:t.relayerPublicKey33B64u,groupPublicKey33B64u:t.groupPublicKey33B64u,ethereumAddress:t.ethereumAddress,publicCapability:t.publicCapability})}function U(e){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`[platform][ecdsa-role-local] ready record must be an object`);if(Object.keys(e).sort().join(`,`)!==`authMethod,kind,publicFacts,stateBlob`)throw Error(`[platform][ecdsa-role-local] ready record fields are invalid`);let t=O(Reflect.get(e,`kind`),`readyRecord.kind`);if(t!==`ecdsa_role_local_ready_passkey_v1`&&t!==`ecdsa_role_local_ready_email_otp_v1`)throw Error(`[platform][ecdsa-role-local] ready record kind is invalid`);let n=V(Reflect.get(e,`publicFacts`)),r=he({stateBlob:I(Reflect.get(e,`stateBlob`)),publicFacts:n,authMethod:R(Reflect.get(e,`authMethod`))});if(t===`ecdsa_role_local_ready_passkey_v1`&&r.kind!==t||t===`ecdsa_role_local_ready_email_otp_v1`&&r.kind!==t)throw Error(`[platform][ecdsa-role-local] ready record authMethod branch mismatch`);return r}function ve(e){switch(e.kind){case`passkey`:return{kind:`passkey`,credentialIdB64u:e.credentialIdB64u,rpId:e.rpId};case`email_otp`:return{kind:`email_otp`,authSubjectId:e.authSubjectId};default:return D(e)}}function ye(e){return{walletId:e.walletId,chainTarget:e.chainTarget,keyHandle:e.keyHandle,ecdsaThresholdKeyId:e.ecdsaThresholdKeyId,signingRootId:e.signingRootId,signingRootVersion:e.signingRootVersion,applicationBindingDigestB64u:e.applicationBindingDigestB64u,clientParticipantId:1,relayerParticipantId:2,participantIds:[1,2],contextBinding32B64u:e.contextBinding32B64u,derivationClientSharePublicKey33B64u:e.derivationClientSharePublicKey33B64u,relayerPublicKey33B64u:e.relayerPublicKey33B64u,groupPublicKey33B64u:e.groupPublicKey33B64u,ethereumAddress:e.ethereumAddress,publicCapability:e.publicCapability}}function be(e){let t=U(e);return{kind:t.kind,stateBlob:{kind:t.stateBlob.kind,curve:t.stateBlob.curve,encoding:t.stateBlob.encoding,producer:t.stateBlob.producer,stateBlobB64u:t.stateBlob.stateBlobB64u},publicFacts:ye(t.publicFacts),authMethod:ve(t.authMethod)}}function W(e){return encodeURIComponent(O(e,`storage key part`))}function xe(e){return[`ecdsa_role_local_ready_v1`,W(e.walletId),W(te(e.chainTarget)),W(e.keyHandle),W(e.ecdsaThresholdKeyId),W(e.signingRootId),W(e.signingRootVersion),W(e.participantIds.join(`,`)),W(Ce(e.authMethod))].join(`:`)}function Se(e){let t=U(e),n=t.publicFacts;return{walletId:n.walletId,chainTarget:n.chainTarget,keyHandle:n.keyHandle,ecdsaThresholdKeyId:n.ecdsaThresholdKeyId,signingRootId:n.signingRootId,signingRootVersion:n.signingRootVersion,participantIds:n.participantIds,authMethod:t.authMethod}}function Ce(e){switch(e.kind){case`passkey`:return[`passkey`,e.rpId,e.credentialIdB64u].join(`:`);case`email_otp`:return[`email_otp`,e.authSubjectId].join(`:`);default:return D(e)}}function we(e){let t=e.record.publicFacts,n=e.input;return String(t.walletId)===String(n.walletId)&&ne(t.chainTarget,n.chainTarget)&&String(t.keyHandle)===String(n.keyHandle)&&String(t.ecdsaThresholdKeyId)===String(n.ecdsaThresholdKeyId)&&String(t.signingRootId)===String(n.signingRootId)&&String(t.signingRootVersion)===String(n.signingRootVersion)&&t.participantIds[0]===n.participantIds[0]&&t.participantIds[1]===n.participantIds[1]&&me(e.record.authMethod,n.authMethod)}var G=class{retainProof(){return!0}constructor(){this.retainProof()}},Te=class extends G{kind=`evm_family`;targetMemberships;constructor(e){super(),this.targetMemberships=e}},K=class extends G{manifestId;manifestRevision;constructor(e){super(),this.manifestId=e.manifestId,this.manifestRevision=e.manifestRevision}},Ee=class extends G{kind=`no_current_manifest`},De=class extends G{kind=`exact_manifest`;manifestId;manifestRevision;constructor(e){super(),this.manifestId=e.manifestId,this.manifestRevision=e.manifestRevision}},Oe=class extends G{kind=`no_current_generation`},ke=class extends G{kind=`exact_generation`;serverGeneration;constructor(e){super(),this.serverGeneration=e}},Ae=class extends G{kind=`ecdsa_role_local_material_binding`;keyHandle;ecdsaThresholdKeyId;clientVerifyingPublicKey33B64u;participantIds;relayerKeyId;constructor(e){super(),this.keyHandle=e.keyHandle,this.ecdsaThresholdKeyId=e.ecdsaThresholdKeyId,this.clientVerifyingPublicKey33B64u=e.clientVerifyingPublicKey33B64u,this.participantIds=e.participantIds,this.relayerKeyId=e.relayerKeyId}},je=class extends G{kind=`prepared_evm_family_signer`;capability;signerId;walletId;authority;scope;materialOwner;signingRootId;signingRootVersion;constructor(e){super(),this.capability=e.capability,this.signerId=e.signerId,this.walletId=e.authority.walletId,this.authority=e.authority,this.scope=e.scope,this.materialOwner=e.materialOwner,this.signingRootId=e.signingRootId,this.signingRootVersion=e.signingRootVersion}},Me=class extends G{kind=`registered_evm_family_signer`;capability;signerId;walletId;authority;scope;materialOwner;signingRootId;signingRootVersion;registeredPublicFacts;constructor(e){super(),this.capability=e.preparedSigner.capability,this.signerId=e.preparedSigner.signerId,this.walletId=e.preparedSigner.walletId,this.authority=e.preparedSigner.authority,this.scope=e.preparedSigner.scope,this.materialOwner=e.preparedSigner.materialOwner,this.signingRootId=e.preparedSigner.signingRootId,this.signingRootVersion=e.preparedSigner.signingRootVersion,this.registeredPublicFacts=e.registeredPublicFacts}},Ne=class extends G{kind=`encrypted_ecdsa_pending_candidate`;sealingKeyId;iv12B64u;ciphertextB64u;ciphertextDigest;constructor(e){super(),this.sealingKeyId=e.sealingKeyId,this.iv12B64u=e.iv12B64u,this.ciphertextB64u=e.ciphertextB64u,this.ciphertextDigest=e.ciphertextDigest}},Pe=class extends G{kind=`ecdsa_activation_binding`;targetManifest;signer;roleLocalBinding;bindingDigest;durableMaterialRef;constructor(e){super(),this.targetManifest=e.targetManifest,this.signer=e.signer,this.roleLocalBinding=e.roleLocalBinding,this.bindingDigest=e.bindingDigest,this.durableMaterialRef=e.durableMaterialRef}},Fe=class extends G{kind=`prepared_ecdsa_activation_candidate`;activationBinding;encryptedPending;constructor(e){super(),this.activationBinding=e.activationBinding,this.encryptedPending=e.encryptedPending}},Ie=class extends G{kind=`ecdsa_server_activation_command`;correlationId;expectedGeneration;requestDigest;canonicalRequest;constructor(e){super(),this.correlationId=e.correlationId,this.expectedGeneration=e.expectedGeneration,this.requestDigest=e.requestDigest,this.canonicalRequest=e.canonicalRequest}},Le=class extends G{kind=`ecdsa_server_activation_receipt`;lifecycleId;activationDigest;activatedAt;protocolReceipt;constructor(e){super(),this.lifecycleId=e.lifecycleId,this.activationDigest=e.activationDigest,this.activatedAt=e.activatedAt,this.protocolReceipt=e.protocolReceipt}},Re=class extends G{kind=`ecdsa_server_activation_commit`;correlationId;activationRequestDigest;serverGeneration;serverActivationReceipt;constructor(e){super(),this.correlationId=e.correlationId,this.activationRequestDigest=e.activationRequestDigest,this.serverGeneration=e.serverGeneration,this.serverActivationReceipt=e.serverActivationReceipt}},ze=class extends G{kind=`activation_prepared`;journalId;expectedManifest;activationCommand;candidate;createdAt;constructor(e){super(),this.journalId=e.journalId,this.expectedManifest=e.expectedManifest,this.activationCommand=e.activationCommand,this.candidate=e.candidate,this.createdAt=e.createdAt}},Be=class extends G{kind=`server_activation_committed`;journalId;expectedManifest;activationCommand;candidate;createdAt;serverActivation;constructor(e){super(),this.journalId=e.journalId,this.expectedManifest=e.expectedManifest,this.activationCommand=e.activationCommand,this.candidate=e.candidate,this.createdAt=e.createdAt,this.serverActivation=e.serverActivation}},Ve=class extends G{kind=`durable_ecdsa_material`;materialActivation;routerAbEcdsaDerivationNormalSigning;roleLocalPublicFacts;roleLocalBinding;durableMaterialRef;bindingDigest;lifecycleId;ciphertextDigest;activationDigest;activatedAt;runtimePolicyScope;constructor(e){super(),this.materialActivation=e.materialActivation,this.routerAbEcdsaDerivationNormalSigning=e.routerAbEcdsaDerivationNormalSigning,this.roleLocalPublicFacts=e.roleLocalPublicFacts,this.roleLocalBinding=e.roleLocalBinding,this.durableMaterialRef=e.durableMaterialRef,this.bindingDigest=e.bindingDigest,this.lifecycleId=e.lifecycleId,this.ciphertextDigest=e.ciphertextDigest,this.activationDigest=e.activationDigest,this.activatedAt=e.activatedAt,this.runtimePolicyScope=e.runtimePolicyScope}},He=class extends G{kind=`encrypted_ecdsa_ready_material`;binding;sealingKeyId;iv12B64u;ciphertextB64u;constructor(e){super(),this.binding=e.binding,this.sealingKeyId=e.sealingKeyId,this.iv12B64u=e.iv12B64u,this.ciphertextB64u=e.ciphertextB64u}},Ue=class extends G{kind=`active_ecdsa_capability_manifest`;identity;signer;activation;durableMaterial;committedAt;constructor(e){super(),this.identity=e.identity,this.signer=e.signer,this.activation=e.activation,this.durableMaterial=e.durableMaterial,this.committedAt=e.committedAt}},We=class extends G{kind=`replaced_ecdsa_capability_manifest`;identity;signer;retirement;constructor(e){super(),this.identity=e.identity,this.signer=e.signer,this.retirement=e.retirement}};function Ge(e){if(!e.ok)throw Error(e.error.message);return e.value}function Ke(e){return lt(e.targetMemberships),new Te([...e.targetMemberships])}function qe(e){return new K(e)}function Je(){return new Ee}function Ye(e){return new De(e)}function Xe(){return new Oe}function Ze(e){return new ke(e)}function Qe(e){return ut(e.participantIds),new Ae({keyHandle:e.keyHandle,ecdsaThresholdKeyId:e.ecdsaThresholdKeyId,clientVerifyingPublicKey33B64u:e.clientVerifyingPublicKey33B64u,participantIds:[...e.participantIds],relayerKeyId:e.relayerKeyId})}function $e(e){return new je(e)}function et(e){return new Ne(e)}function tt(e){return new Pe(e)}function nt(e){return new Fe(e)}function rt(e){dt(e.expectedManifest,e.candidate.activationBinding.targetManifest),ft(e.expectedManifest,e.expectedGeneration);let t=new Ie({correlationId:e.journalId,expectedGeneration:e.expectedGeneration,requestDigest:e.requestDigest,canonicalRequest:e.canonicalRequest});return new ze({journalId:e.journalId,expectedManifest:e.expectedManifest,activationCommand:t,candidate:e.candidate,createdAt:e.createdAt})}function q(e){let t=p(e.serverCommit.protocolReceipt);mt(t,e.serverCommit),Y(t,e.activationBinding);let n=new Le({lifecycleId:ht(t),activationDigest:gt(t),activatedAt:o(t.ecdsa_activation.activated_at_ms),protocolReceipt:t});return new Re({correlationId:e.serverCommit.correlationId,activationRequestDigest:e.serverCommit.activationRequestDigest,serverGeneration:e.serverCommit.serverGeneration,serverActivationReceipt:n})}function it(e){pt(e.serverCommit,e.preparedJournal);let t=q({activationBinding:e.preparedJournal.candidate.activationBinding,serverCommit:e.serverCommit});return new Be({journalId:e.preparedJournal.journalId,expectedManifest:e.preparedJournal.expectedManifest,activationCommand:e.preparedJournal.activationCommand,candidate:e.preparedJournal.candidate,createdAt:e.preparedJournal.createdAt,serverActivation:t})}function at(e){vt(e.serverActivation,e.activationBinding);let t=e.roleLocalPublicFacts,i=e.activationBinding,a=n(e.runtimePolicyScope);if(t.walletId!==i.signer.walletId||t.keyHandle!==i.roleLocalBinding.keyHandle||t.ecdsaThresholdKeyId!==i.roleLocalBinding.ecdsaThresholdKeyId||t.signingRootId!==i.signer.signingRootId||t.signingRootVersion!==i.signer.signingRootVersion||r(a)!==i.signer.signingRootId||a.signingRootVersion!==i.signer.signingRootVersion||t.contextBinding32B64u!==i.bindingDigest||!Z(t.participantIds,i.roleLocalBinding.participantIds)||!i.signer.scope.targetMemberships.some(e=>J(e)===J(t.chainTarget)))throw Error(`ECDSA role-local public facts do not match their activation`);let o=e.serverActivation.serverActivationReceipt;return Q({normalSigning:e.routerAbEcdsaDerivationNormalSigning,activationBinding:i,roleLocalPublicFacts:t,receipt:o.protocolReceipt}),new Ve({materialActivation:X(o.protocolReceipt),routerAbEcdsaDerivationNormalSigning:e.routerAbEcdsaDerivationNormalSigning,roleLocalPublicFacts:e.roleLocalPublicFacts,roleLocalBinding:e.activationBinding.roleLocalBinding,durableMaterialRef:e.activationBinding.durableMaterialRef,bindingDigest:e.activationBinding.bindingDigest,lifecycleId:o.lifecycleId,ciphertextDigest:e.ciphertextDigest,activationDigest:o.activationDigest,activatedAt:o.activatedAt,runtimePolicyScope:a})}function ot(e){return new He({binding:e.binding,sealingKeyId:e.sealingKeyId,iv12B64u:e.iv12B64u,ciphertextB64u:e.ciphertextB64u})}function st(e){_t(e.registeredPublicFacts,e.activationBinding.roleLocalBinding,e.serverActivation),yt(e.durableMaterial,e.activationBinding,e.serverActivation);let t=new Me({preparedSigner:e.activationBinding.signer,registeredPublicFacts:e.registeredPublicFacts}),n={kind:`active_ecdsa_material_activation`,materialActivation:e.durableMaterial.materialActivation,serverActivation:e.serverActivation,retention:`retained`};return new Ue({identity:e.activationBinding.targetManifest,signer:t,activation:n,durableMaterial:e.durableMaterial,committedAt:e.committedAt})}function ct(e){return xt(e.activeManifest,e.replacementManifest),new We({identity:e.activeManifest.identity,signer:e.activeManifest.signer,retirement:{kind:`replaced`,replacementManifest:e.replacementManifest.identity,replacementActivation:e.replacementManifest.activation.serverActivation}})}function lt(e){let t=e.map(J);if(new Set(t).size!==t.length)throw Error(`ECDSA capability target memberships must be unique`)}function J(e){switch(e.kind){case`evm`:return`evm:${e.namespace}:${e.chainId}:${e.networkSlug}`;case`tempo`:return`tempo:${e.chainId}:${e.networkSlug}`;default:return $(e)}}function ut(e){let t=e.map(Number);if(t.some(e=>!Number.isSafeInteger(e)||e<1)||new Set(t).size!==t.length)throw Error(`ECDSA participant ids must be unique positive integers`)}function dt(e,t){switch(e.kind){case`no_current_manifest`:if(Number(t.manifestRevision)!==1)throw Error(`Initial ECDSA manifest revision must be 1`);return;case`exact_manifest`:if(t.manifestId===e.manifestId||Number(t.manifestRevision)!==Number(e.manifestRevision)+1)throw Error(`Replacement ECDSA manifest must use a fresh id and next revision`);return;default:return $(e)}}function ft(e,t){switch(e.kind){case`no_current_manifest`:if(t.kind!==`no_current_generation`)throw Error(`Initial ECDSA activation cannot expect a server generation`);return;case`exact_manifest`:if(t.kind!==`exact_generation`)throw Error(`Replacement ECDSA activation requires an exact server generation`);return;default:return $(e)}}function pt(e,t){let n=JSON.parse(t.activationCommand.canonicalRequest).operation===`wallet_registration_activate_v2`;if(e.correlationId!==t.activationCommand.correlationId||!n&&e.activationRequestDigest!==t.activationCommand.requestDigest)throw Error(`ECDSA server activation commit does not match the prepared command`)}function Y(e,t){let n=e.ecdsa_activation.public_identity,r=e.ecdsa_activation.material_activation;if(X(e),n.context_binding_b64u!==String(t.bindingDigest)||n.derivation_client_share_public_key33_b64u!==String(t.roleLocalBinding.clientVerifyingPublicKey33B64u)||r.material_owner!==String(t.signer.materialOwner)||r.key_binding!==String(t.bindingDigest)||r.lifecycle_binding!==e.lifecycle_id||r.signing_worker!==e.ecdsa_activation.signing_worker.server_id)throw Error(`ECDSA activation receipt does not match the prepared material binding`)}function mt(e,t){let n=i(Uint8Array.from(e.activation_request_digest.bytes));if(e.activation_correlation_id!==t.correlationId||n!==t.activationRequestDigest||e.server_generation!==t.serverGeneration)throw Error(`ECDSA activation receipt does not match the server activation commit`)}function ht(e){return u(e.lifecycle_id)}function gt(e){return l(e.ecdsa_activation.activation_digest_b64u)}function X(e){return m(e.ecdsa_activation.material_activation)}function _t(e,t,n){let r=n.serverActivationReceipt.protocolReceipt.ecdsa_activation.public_identity;if(String(e.keyHandle)!==String(t.keyHandle)||String(e.publicKeyB64u)!==r.threshold_public_key33_b64u||String(t.clientVerifyingPublicKey33B64u)!==r.derivation_client_share_public_key33_b64u||!Z(e.participantIds,t.participantIds))throw Error(`Registered ECDSA public facts do not match role-local material`)}function Z(e,t){return e.length===t.length?e.every((e,n)=>Number(e)===Number(t[n])):!1}function vt(e,t){Y(e.serverActivationReceipt.protocolReceipt,t)}function yt(e,n,r){let i=r.serverActivationReceipt,a=X(i.protocolReceipt);if(!t(e.materialActivation,a)||e.roleLocalBinding!==n.roleLocalBinding||e.durableMaterialRef!==n.durableMaterialRef||e.bindingDigest!==n.bindingDigest||e.lifecycleId!==i.lifecycleId||e.activationDigest!==i.activationDigest||e.activatedAt!==i.activatedAt)throw Error(`Durable ECDSA material does not match its activation`);Q({normalSigning:e.routerAbEcdsaDerivationNormalSigning,activationBinding:n,roleLocalPublicFacts:e.roleLocalPublicFacts,receipt:i.protocolReceipt})}function bt(e,t){return e.kind===t.kind&&e.context.application_binding_digest_b64u===t.context.application_binding_digest_b64u&&y(e.public_identity,t.public_identity)&&v(e.material_activation,t.material_activation)&&f(e.signer_set,t.signer_set)&&se(e.deriver_recipient_keys,t.deriver_recipient_keys)&&e.router_id===t.router_id&&e.client_id===t.client_id&&e.activation_epoch===t.activation_epoch&&e.registration_request_digest_b64u===t.registration_request_digest_b64u&&e.proof_transcript_digest_b64u===t.proof_transcript_digest_b64u}function Q(e){let t=e.normalSigning.scope,n=e.roleLocalPublicFacts,r=X(e.receipt),i=g({kind:r.kind,activationId:r.activationId,capability:r.capability,materialOwner:r.materialOwner,keyBinding:r.keyBinding,lifecycleBinding:r.lifecycleBinding,signingWorker:r.signingWorker});if(t.wallet_id!==String(e.activationBinding.signer.walletId)||t.ecdsa_threshold_key_id!==String(e.activationBinding.roleLocalBinding.ecdsaThresholdKeyId)||t.signing_root_id!==String(e.activationBinding.signer.signingRootId)||t.signing_root_version!==String(e.activationBinding.signer.signingRootVersion)||t.context.application_binding_digest_b64u!==e.receipt.ecdsa_activation.context.application_binding_digest_b64u||!y(t.public_identity,e.receipt.ecdsa_activation.public_identity)||!re(t.signing_worker,e.receipt.ecdsa_activation.signing_worker)||t.activation_epoch!==e.receipt.ecdsa_activation.activation_epoch||t.public_identity.context_binding_b64u!==n.contextBinding32B64u||t.public_identity.derivation_client_share_public_key33_b64u!==n.derivationClientSharePublicKey33B64u||t.public_identity.server_public_key33_b64u!==n.relayerPublicKey33B64u||t.public_identity.threshold_public_key33_b64u!==n.groupPublicKey33B64u||!v(t.material_activation,i))throw Error(`ECDSA normal-signing runtime does not match its activation`)}function xt(e,t){if(e.identity.manifestId===t.identity.manifestId||Number(t.identity.manifestRevision)!==Number(e.identity.manifestRevision)+1||e.signer.capability!==t.signer.capability||e.signer.signerId!==t.signer.signerId||e.signer.walletId!==t.signer.walletId||e.signer.authority.authorityDigest!==t.signer.authority.authorityDigest||e.signer.materialOwner!==t.signer.materialOwner||e.durableMaterial.durableMaterialRef===t.durableMaterial.durableMaterialRef||e.activation.serverActivation.serverGeneration===t.activation.serverActivation.serverGeneration)throw Error(`ECDSA replacement manifest does not exactly replace the active manifest`)}function $(e){throw Error(`Unexpected ECDSA capability branch: ${String(e)}`)}export{pe as A,ue as B,H as C,U as D,Se as E,E as F,x as I,fe as L,w as M,S as N,_e as O,T as P,le as R,z as S,xe as T,ce as V,it as _,qe as a,Ge as b,et as c,Je as d,Xe as f,ct as g,$e as h,Ke as i,C as j,be as k,Ye as l,rt as m,at as n,Qe as o,nt as p,tt as r,q as s,st as t,Ze as u,ot as v,we as w,B as x,bt as y,de as z};