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A0B,EACA,MAAA1B,EAAAmB,CAAA,CAAAnB,EAAA,CAAAumB,CAAA,CAAAvmB,EAAA,GAKA8zF,UAAAA,GACAX,EAAAhyF,IAAA,qCAAAiyF,EAAAjyF,EAGA,EACA,CACA,SAAA+Z,EAAAi6E,CAAA,EACA,IAAAR,EAAAQ,EAAAjuE,GAAA,CAAApX,GAAAA,EAAAxG,IAAA,EAAAya,IAAA,QACA,WAAAiwE,EAAA,CACA1qF,KAAA,QACAid,OAAA,KAEAutE,UAAA3yF,CAAA,CAAAoT,CAAA,EACA,IAAAy+E,EAAA,GAEA,QAAAjiC,KAAAokC,EAAA,CACA,OAAAhB,EAAA,CAAAT,EAAAvyF,EAAA4vD,EAAAx8C,GACA,CAAA6gF,EAAA,CAAAjB,EAEA,IAAAiB,CAAA,IACA,SAEA,QAAArC,EAAA,GAAAoB,EACApB,GACAC,EAAAvxF,IAAA,CAAAsxF,EAIA,CAEA,oDAAA4B,EAAA,oBAAAvB,EAAAjyF,MAAA6xF,EAAA,CAGA,EACA,CAKA,SAAAqC,IACA,OAAA1/D,EAAA,iBACA,CAaA,SAAAg+D,EAAAL,CAAA,CAAArnC,CAAA,CAAA2nC,CAAA,EACA,WAAAI,EAAA,CAAsB,GAAAV,CAAA,CACtBM,QAAA,CAAAzyF,EAAAoT,IACA07D,EAAA9uE,EAAA8qD,EArlBA,IAqlBAqnC,EAAAM,OAAA,CAAAzyF,EAAAoT,GAAA++E,EAAAM,OAAA,CAAAA,EAAAzyF,EAAAoT,GAAAA,EAEA,EACA","sources":["webpack://_N_E/../../node_modules/@ledgerhq/errors/lib-es/helpers.js","webpack://_N_E/../../node_modules/@ledgerhq/errors/lib-es/index.js","webpack://_N_E/../../node_modules/@ledgerhq/hw-transport/lib-es/Transport.js","webpack://_N_E/../../node_modules/@solana/buffer-layout/lib/Layout.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/node_modules/eventemitter3/index.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/bs58/index.js","webpack://_N_E/../../node_modules/base-x/src/index.js","webpack://_N_E/../../node_modules/bigint-buffer/dist/browser.js","webpack://_N_E/../../node_modules/borsh/lib/index.js","webpack://_N_E/../../node_modules/borsh/node_modules/bs58/index.js","webpack://_N_E/../../node_modules/bs58/index.js","webpack://_N_E/../../node_modules/bs58/node_modules/base-x/src/index.js","webpack://_N_E/../../node_modules/deepmerge/dist/cjs.js","webpack://_N_E/../../node_modules/jayson/lib/client/browser/index.js","webpack://_N_E/../../node_modules/jayson/lib/generateRequest.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/rng.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/regex.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/validate.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/stringify.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/v4.js","webpack://_N_E/../../node_modules/jayson/node_modules/uuid/dist/esm-browser/index.js","webpack://_N_E/../../node_modules/rpc-websockets/dist/lib/client.js","webpack://_N_E/../../node_modules/rpc-websockets/dist/lib/client/websocket.browser.js","webpack://_N_E/../../node_modules/rpc-websockets/dist/lib/utils.js","webpack://_N_E/../../node_modules/rpc-websockets/node_modules/eventemitter3/index.js","webpack://_N_E/../../node_modules/text-encoding-utf-8/lib/encoding.lib.js","webpack://_N_E/../../node_modules/tweetnacl-util/nacl-util.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/createClass.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/inherits.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/toPrimitive.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack://_N_E/../../node_modules/@babel/runtime/helpers/typeof.js","webpack://_N_E/../../node_modules/@babel/runtime/regenerator/index.js","webpack://_N_E/../../node_modules/@hookform/resolvers/dist/resolvers.mjs","webpack://_N_E/../../node_modules/@hookform/resolvers/zod/dist/zod.mjs","webpack://_N_E/../src/switch.tsx","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/errors.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/signer.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/transaction.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/types.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-ledger/lib/esm/util.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-ledger/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-phantom/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/Button.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletIcon.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/Collapse.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletListItem.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletSVG.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModal.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletModalProvider.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base-ui/lib/esm/useWalletMultiButton.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/BaseWalletConnectionButton.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/BaseWalletMultiButton.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/WalletMultiButton.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react-ui/lib/esm/useWalletModal.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/ConnectionProvider.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-util/lib/esm/signIn.js","webpack://_N_E/../../node_modules/@solana-mobile/mobile-wallet-adapter-protocol/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana-mobile/mobile-wallet-adapter-protocol-web3js/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana-mobile/wallet-adapter-mobile/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-base/lib/esm/standard.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/types.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signIn.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-util/lib/esm/endpoint.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-util/lib/esm/commitment.js","webpack://_N_E/../../node_modules/@wallet-standard/wallet/lib/esm/util.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@wallet-standard/app/lib/esm/wallets.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-wallet-adapter-react/lib/esm/useStandardWalletAdapters.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/getEnvironment.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/getInferredClusterFromEndpoint.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/useLocalStorage.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/errors.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/WalletProviderBase.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/WalletProvider.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/useConnection.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-react/lib/esm/useWallet.js","webpack://_N_E/../../node_modules/@wallet-standard/wallet/lib/esm/register.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/icon.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/wallet.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/metamask/detect.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-solflare/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-adapter-torus/lib/esm/adapter.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-chains/lib/esm/index.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signAndSendTransaction.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signMessage.js","webpack://_N_E/../../node_modules/@solana/wallet-standard-features/lib/esm/signTransaction.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/curve.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/modular.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/utils.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/sha512.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/edwards.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/ed25519.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/hmac.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/abstract/weierstrass.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/_shortw_utils.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/curves/esm/secp256k1.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/_assert.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/_md.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/_u64.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/sha256.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/sha3.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/crypto.js","webpack://_N_E/../../node_modules/@solana/web3.js/node_modules/@noble/hashes/esm/utils.js","webpack://_N_E/../../node_modules/@tonconnect/protocol/lib/esm/index.mjs","webpack://_N_E/../../node_modules/@tonconnect/sdk/lib/esm/index.mjs","webpack://_N_E/../../node_modules/@tonconnect/ui-react/lib/index.mjs","webpack://_N_E/../../node_modules/@wallet-standard/features/lib/esm/connect.js","webpack://_N_E/../../node_modules/@wallet-standard/features/lib/esm/disconnect.js","webpack://_N_E/../../node_modules/@wallet-standard/features/lib/esm/events.js","webpack://_N_E/../../node_modules/superstruct/lib/index.es.js"],"sourcesContent":["/* eslint-disable no-continue */\n/* eslint-disable no-unused-vars */\n/* eslint-disable no-param-reassign */\n/* eslint-disable no-prototype-builtins */\nconst errorClasses = {};\nconst deserializers = {};\nexport const addCustomErrorDeserializer = (name, deserializer) => {\n deserializers[name] = deserializer;\n};\nexport const createCustomErrorClass = (name) => {\n class CustomErrorClass extends Error {\n constructor(message, fields, options) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n super(message || name, options);\n // Set the prototype explicitly. See https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, CustomErrorClass.prototype);\n this.name = name;\n if (fields) {\n for (const k in fields) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[k] = fields[k];\n }\n }\n if (options && isObject(options) && \"cause\" in options && !(\"cause\" in this)) {\n // .cause was specified but the superconstructor\n // did not create an instance property.\n const cause = options.cause;\n this.cause = cause;\n if (\"stack\" in cause) {\n this.stack = this.stack + \"\\nCAUSE: \" + cause.stack;\n }\n }\n }\n }\n errorClasses[name] = CustomErrorClass;\n return CustomErrorClass;\n};\nfunction isObject(value) {\n return typeof value === \"object\";\n}\n// inspired from https://github.com/programble/errio/blob/master/index.js\nexport const deserializeError = (object) => {\n if (object && typeof object === \"object\") {\n try {\n if (typeof object.message === \"string\") {\n const msg = JSON.parse(object.message);\n if (msg.message && msg.name) {\n object = msg;\n }\n }\n }\n catch (e) {\n // nothing\n }\n let error;\n if (typeof object.name === \"string\") {\n const { name } = object;\n const des = deserializers[name];\n if (des) {\n error = des(object);\n }\n else {\n let constructor = name === \"Error\" ? Error : errorClasses[name];\n if (!constructor) {\n console.warn(\"deserializing an unknown class '\" + name + \"'\");\n constructor = createCustomErrorClass(name);\n }\n error = Object.create(constructor.prototype);\n try {\n for (const prop in object) {\n if (object.hasOwnProperty(prop)) {\n error[prop] = object[prop];\n }\n }\n }\n catch (e) {\n // sometimes setting a property can fail (e.g. .name)\n }\n }\n }\n else {\n if (typeof object.message === \"string\") {\n error = new Error(object.message);\n }\n }\n if (error && !error.stack && Error.captureStackTrace) {\n Error.captureStackTrace(error, deserializeError);\n }\n return error;\n }\n return new Error(String(object));\n};\n// inspired from https://github.com/sindresorhus/serialize-error/blob/master/index.js\nexport const serializeError = (value) => {\n if (!value)\n return value;\n if (typeof value === \"object\") {\n return destroyCircular(value, []);\n }\n if (typeof value === \"function\") {\n return `[Function: ${value.name || \"anonymous\"}]`;\n }\n return value;\n};\n// https://www.npmjs.com/package/destroy-circular\nfunction destroyCircular(from, seen) {\n const to = {};\n seen.push(from);\n for (const key of Object.keys(from)) {\n const value = from[key];\n if (typeof value === \"function\") {\n continue;\n }\n if (!value || typeof value !== \"object\") {\n to[key] = value;\n continue;\n }\n if (seen.indexOf(from[key]) === -1) {\n to[key] = destroyCircular(from[key], seen.slice(0));\n continue;\n }\n to[key] = \"[Circular]\";\n }\n if (typeof from.name === \"string\") {\n to.name = from.name;\n }\n if (typeof from.message === \"string\") {\n to.message = from.message;\n }\n if (typeof from.stack === \"string\") {\n to.stack = from.stack;\n }\n return to;\n}\n//# sourceMappingURL=helpers.js.map","import { serializeError, deserializeError, createCustomErrorClass, addCustomErrorDeserializer, } from \"./helpers\";\nexport { serializeError, deserializeError, createCustomErrorClass, addCustomErrorDeserializer };\nexport const AccountNameRequiredError = createCustomErrorClass(\"AccountNameRequired\");\nexport const AccountNotSupported = createCustomErrorClass(\"AccountNotSupported\");\nexport const AmountRequired = createCustomErrorClass(\"AmountRequired\");\nexport const BluetoothRequired = createCustomErrorClass(\"BluetoothRequired\");\nexport const BtcUnmatchedApp = createCustomErrorClass(\"BtcUnmatchedApp\");\nexport const CantOpenDevice = createCustomErrorClass(\"CantOpenDevice\");\nexport const CashAddrNotSupported = createCustomErrorClass(\"CashAddrNotSupported\");\nexport const ClaimRewardsFeesWarning = createCustomErrorClass(\"ClaimRewardsFeesWarning\");\nexport const CurrencyNotSupported = createCustomErrorClass(\"CurrencyNotSupported\");\nexport const DeviceAppVerifyNotSupported = createCustomErrorClass(\"DeviceAppVerifyNotSupported\");\nexport const DeviceGenuineSocketEarlyClose = createCustomErrorClass(\"DeviceGenuineSocketEarlyClose\");\nexport const DeviceNotGenuineError = createCustomErrorClass(\"DeviceNotGenuine\");\nexport const DeviceOnDashboardExpected = createCustomErrorClass(\"DeviceOnDashboardExpected\");\nexport const DeviceOnDashboardUnexpected = createCustomErrorClass(\"DeviceOnDashboardUnexpected\");\nexport const DeviceInOSUExpected = createCustomErrorClass(\"DeviceInOSUExpected\");\nexport const DeviceHalted = createCustomErrorClass(\"DeviceHalted\");\nexport const DeviceNameInvalid = createCustomErrorClass(\"DeviceNameInvalid\");\nexport const DeviceSocketFail = createCustomErrorClass(\"DeviceSocketFail\");\nexport const DeviceSocketNoBulkStatus = createCustomErrorClass(\"DeviceSocketNoBulkStatus\");\nexport const DeviceNeedsRestart = createCustomErrorClass(\"DeviceSocketNoBulkStatus\");\nexport const UnresponsiveDeviceError = createCustomErrorClass(\"UnresponsiveDeviceError\");\nexport const DisconnectedDevice = createCustomErrorClass(\"DisconnectedDevice\");\nexport const DisconnectedDeviceDuringOperation = createCustomErrorClass(\"DisconnectedDeviceDuringOperation\");\nexport const DeviceExtractOnboardingStateError = createCustomErrorClass(\"DeviceExtractOnboardingStateError\");\nexport const DeviceOnboardingStatePollingError = createCustomErrorClass(\"DeviceOnboardingStatePollingError\");\nexport const EnpointConfigError = createCustomErrorClass(\"EnpointConfig\");\nexport const EthAppPleaseEnableContractData = createCustomErrorClass(\"EthAppPleaseEnableContractData\");\nexport const FeeEstimationFailed = createCustomErrorClass(\"FeeEstimationFailed\");\nexport const FirmwareNotRecognized = createCustomErrorClass(\"FirmwareNotRecognized\");\nexport const HardResetFail = createCustomErrorClass(\"HardResetFail\");\nexport const InvalidXRPTag = createCustomErrorClass(\"InvalidXRPTag\");\nexport const InvalidAddress = createCustomErrorClass(\"InvalidAddress\");\nexport const InvalidNonce = createCustomErrorClass(\"InvalidNonce\");\nexport const InvalidAddressBecauseDestinationIsAlsoSource = createCustomErrorClass(\"InvalidAddressBecauseDestinationIsAlsoSource\");\nexport const LatestMCUInstalledError = createCustomErrorClass(\"LatestMCUInstalledError\");\nexport const UnknownMCU = createCustomErrorClass(\"UnknownMCU\");\nexport const LedgerAPIError = createCustomErrorClass(\"LedgerAPIError\");\nexport const LedgerAPIErrorWithMessage = createCustomErrorClass(\"LedgerAPIErrorWithMessage\");\nexport const LedgerAPINotAvailable = createCustomErrorClass(\"LedgerAPINotAvailable\");\nexport const ManagerAppAlreadyInstalledError = createCustomErrorClass(\"ManagerAppAlreadyInstalled\");\nexport const ManagerAppRelyOnBTCError = createCustomErrorClass(\"ManagerAppRelyOnBTC\");\nexport const ManagerAppDepInstallRequired = createCustomErrorClass(\"ManagerAppDepInstallRequired\");\nexport const ManagerAppDepUninstallRequired = createCustomErrorClass(\"ManagerAppDepUninstallRequired\");\nexport const ManagerDeviceLockedError = createCustomErrorClass(\"ManagerDeviceLocked\");\nexport const ManagerFirmwareNotEnoughSpaceError = createCustomErrorClass(\"ManagerFirmwareNotEnoughSpace\");\nexport const ManagerNotEnoughSpaceError = createCustomErrorClass(\"ManagerNotEnoughSpace\");\nexport const ManagerUninstallBTCDep = createCustomErrorClass(\"ManagerUninstallBTCDep\");\nexport const NetworkDown = createCustomErrorClass(\"NetworkDown\");\nexport const NetworkError = createCustomErrorClass(\"NetworkError\");\nexport const NoAddressesFound = createCustomErrorClass(\"NoAddressesFound\");\nexport const NotEnoughBalance = createCustomErrorClass(\"NotEnoughBalance\");\nexport const NotEnoughBalanceToDelegate = createCustomErrorClass(\"NotEnoughBalanceToDelegate\");\nexport const NotEnoughBalanceInParentAccount = createCustomErrorClass(\"NotEnoughBalanceInParentAccount\");\nexport const NotEnoughSpendableBalance = createCustomErrorClass(\"NotEnoughSpendableBalance\");\nexport const NotEnoughBalanceBecauseDestinationNotCreated = createCustomErrorClass(\"NotEnoughBalanceBecauseDestinationNotCreated\");\nexport const NoAccessToCamera = createCustomErrorClass(\"NoAccessToCamera\");\nexport const NotEnoughGas = createCustomErrorClass(\"NotEnoughGas\");\n// Error message specifically for the PTX swap flow\nexport const NotEnoughGasSwap = createCustomErrorClass(\"NotEnoughGasSwap\");\nexport const NotSupportedLegacyAddress = createCustomErrorClass(\"NotSupportedLegacyAddress\");\nexport const GasLessThanEstimate = createCustomErrorClass(\"GasLessThanEstimate\");\nexport const PriorityFeeTooLow = createCustomErrorClass(\"PriorityFeeTooLow\");\nexport const PriorityFeeTooHigh = createCustomErrorClass(\"PriorityFeeTooHigh\");\nexport const PriorityFeeHigherThanMaxFee = createCustomErrorClass(\"PriorityFeeHigherThanMaxFee\");\nexport const MaxFeeTooLow = createCustomErrorClass(\"MaxFeeTooLow\");\nexport const PasswordsDontMatchError = createCustomErrorClass(\"PasswordsDontMatch\");\nexport const PasswordIncorrectError = createCustomErrorClass(\"PasswordIncorrect\");\nexport const RecommendSubAccountsToEmpty = createCustomErrorClass(\"RecommendSubAccountsToEmpty\");\nexport const RecommendUndelegation = createCustomErrorClass(\"RecommendUndelegation\");\nexport const TimeoutTagged = createCustomErrorClass(\"TimeoutTagged\");\nexport const UnexpectedBootloader = createCustomErrorClass(\"UnexpectedBootloader\");\nexport const MCUNotGenuineToDashboard = createCustomErrorClass(\"MCUNotGenuineToDashboard\");\nexport const RecipientRequired = createCustomErrorClass(\"RecipientRequired\");\nexport const UnavailableTezosOriginatedAccountReceive = createCustomErrorClass(\"UnavailableTezosOriginatedAccountReceive\");\nexport const UnavailableTezosOriginatedAccountSend = createCustomErrorClass(\"UnavailableTezosOriginatedAccountSend\");\nexport const UpdateFetchFileFail = createCustomErrorClass(\"UpdateFetchFileFail\");\nexport const UpdateIncorrectHash = createCustomErrorClass(\"UpdateIncorrectHash\");\nexport const UpdateIncorrectSig = createCustomErrorClass(\"UpdateIncorrectSig\");\nexport const UpdateYourApp = createCustomErrorClass(\"UpdateYourApp\");\nexport const UserRefusedDeviceNameChange = createCustomErrorClass(\"UserRefusedDeviceNameChange\");\nexport const UserRefusedAddress = createCustomErrorClass(\"UserRefusedAddress\");\nexport const UserRefusedFirmwareUpdate = createCustomErrorClass(\"UserRefusedFirmwareUpdate\");\nexport const UserRefusedAllowManager = createCustomErrorClass(\"UserRefusedAllowManager\");\nexport const UserRefusedOnDevice = createCustomErrorClass(\"UserRefusedOnDevice\"); // TODO rename because it's just for transaction refusal\nexport const ExpertModeRequired = createCustomErrorClass(\"ExpertModeRequired\");\nexport const TransportOpenUserCancelled = createCustomErrorClass(\"TransportOpenUserCancelled\");\nexport const TransportInterfaceNotAvailable = createCustomErrorClass(\"TransportInterfaceNotAvailable\");\nexport const TransportPendingOperation = createCustomErrorClass(\"TransportPendingOperation\");\nexport const TransportWebUSBGestureRequired = createCustomErrorClass(\"TransportWebUSBGestureRequired\");\nexport const TransactionHasBeenValidatedError = createCustomErrorClass(\"TransactionHasBeenValidatedError\");\nexport const TransportExchangeTimeoutError = createCustomErrorClass(\"TransportExchangeTimeoutError\");\nexport const DeviceShouldStayInApp = createCustomErrorClass(\"DeviceShouldStayInApp\");\nexport const WebsocketConnectionError = createCustomErrorClass(\"WebsocketConnectionError\");\nexport const WebsocketConnectionFailed = createCustomErrorClass(\"WebsocketConnectionFailed\");\nexport const WrongDeviceForAccount = createCustomErrorClass(\"WrongDeviceForAccount\");\nexport const WrongDeviceForAccountPayout = createCustomErrorClass(\"WrongDeviceForAccountPayout\");\nexport const WrongDeviceForAccountRefund = createCustomErrorClass(\"WrongDeviceForAccountRefund\");\nexport const WrongAppForCurrency = createCustomErrorClass(\"WrongAppForCurrency\");\nexport const ETHAddressNonEIP = createCustomErrorClass(\"ETHAddressNonEIP\");\nexport const CantScanQRCode = createCustomErrorClass(\"CantScanQRCode\");\nexport const FeeNotLoaded = createCustomErrorClass(\"FeeNotLoaded\");\nexport const FeeNotLoadedSwap = createCustomErrorClass(\"FeeNotLoadedSwap\");\nexport const FeeRequired = createCustomErrorClass(\"FeeRequired\");\nexport const FeeTooHigh = createCustomErrorClass(\"FeeTooHigh\");\nexport const PendingOperation = createCustomErrorClass(\"PendingOperation\");\nexport const SyncError = createCustomErrorClass(\"SyncError\");\nexport const PairingFailed = createCustomErrorClass(\"PairingFailed\");\nexport const PeerRemovedPairing = createCustomErrorClass(\"PeerRemovedPairing\");\nexport const GenuineCheckFailed = createCustomErrorClass(\"GenuineCheckFailed\");\nexport const LedgerAPI4xx = createCustomErrorClass(\"LedgerAPI4xx\");\nexport const LedgerAPI5xx = createCustomErrorClass(\"LedgerAPI5xx\");\nexport const FirmwareOrAppUpdateRequired = createCustomErrorClass(\"FirmwareOrAppUpdateRequired\");\n// SpeedUp / Cancel EVM tx\nexport const ReplacementTransactionUnderpriced = createCustomErrorClass(\"ReplacementTransactionUnderpriced\");\n// Bitcoin family\nexport const OpReturnDataSizeLimit = createCustomErrorClass(\"OpReturnSizeLimit\");\nexport const DustLimit = createCustomErrorClass(\"DustLimit\");\n// Language\nexport const LanguageNotFound = createCustomErrorClass(\"LanguageNotFound\");\n// db stuff, no need to translate\nexport const NoDBPathGiven = createCustomErrorClass(\"NoDBPathGiven\");\nexport const DBWrongPassword = createCustomErrorClass(\"DBWrongPassword\");\nexport const DBNotReset = createCustomErrorClass(\"DBNotReset\");\nexport const SequenceNumberError = createCustomErrorClass(\"SequenceNumberError\");\nexport const DisabledTransactionBroadcastError = createCustomErrorClass(\"DisabledTransactionBroadcastError\");\n/**\n * Type of a Transport error used to represent all equivalent errors coming from all possible implementation of Transport\n */\nexport var HwTransportErrorType;\n(function (HwTransportErrorType) {\n HwTransportErrorType[\"Unknown\"] = \"Unknown\";\n HwTransportErrorType[\"LocationServicesDisabled\"] = \"LocationServicesDisabled\";\n HwTransportErrorType[\"LocationServicesUnauthorized\"] = \"LocationServicesUnauthorized\";\n HwTransportErrorType[\"BluetoothScanStartFailed\"] = \"BluetoothScanStartFailed\";\n})(HwTransportErrorType || (HwTransportErrorType = {}));\n/**\n * Represents an error coming from the usage of any Transport implementation.\n *\n * Needed to map a specific implementation error into an error that\n * can be managed by any code unaware of the specific Transport implementation\n * that was used.\n */\nexport class HwTransportError extends Error {\n constructor(type, message) {\n super(message);\n this.name = \"HwTransportError\";\n this.type = type;\n // Needed as long as we target < ES6\n Object.setPrototypeOf(this, HwTransportError.prototype);\n }\n}\n/**\n * TransportError is used for any generic transport errors.\n * e.g. Error thrown when data received by exchanges are incorrect or if exchanged failed to communicate with the device for various reason.\n */\nexport class TransportError extends Error {\n constructor(message, id) {\n const name = \"TransportError\";\n super(message || name);\n this.name = name;\n this.message = message;\n this.stack = new Error(message).stack;\n this.id = id;\n }\n}\naddCustomErrorDeserializer(\"TransportError\", e => new TransportError(e.message, e.id));\nexport const StatusCodes = {\n ACCESS_CONDITION_NOT_FULFILLED: 0x9804,\n ALGORITHM_NOT_SUPPORTED: 0x9484,\n CLA_NOT_SUPPORTED: 0x6e00,\n CODE_BLOCKED: 0x9840,\n CODE_NOT_INITIALIZED: 0x9802,\n COMMAND_INCOMPATIBLE_FILE_STRUCTURE: 0x6981,\n CONDITIONS_OF_USE_NOT_SATISFIED: 0x6985,\n CONTRADICTION_INVALIDATION: 0x9810,\n CONTRADICTION_SECRET_CODE_STATUS: 0x9808,\n CUSTOM_IMAGE_BOOTLOADER: 0x662f,\n CUSTOM_IMAGE_EMPTY: 0x662e,\n FILE_ALREADY_EXISTS: 0x6a89,\n FILE_NOT_FOUND: 0x9404,\n GP_AUTH_FAILED: 0x6300,\n HALTED: 0x6faa,\n INCONSISTENT_FILE: 0x9408,\n INCORRECT_DATA: 0x6a80,\n INCORRECT_LENGTH: 0x6700,\n INCORRECT_P1_P2: 0x6b00,\n INS_NOT_SUPPORTED: 0x6d00,\n DEVICE_NOT_ONBOARDED: 0x6d07,\n DEVICE_NOT_ONBOARDED_2: 0x6611,\n INVALID_KCV: 0x9485,\n INVALID_OFFSET: 0x9402,\n LICENSING: 0x6f42,\n LOCKED_DEVICE: 0x5515,\n MAX_VALUE_REACHED: 0x9850,\n MEMORY_PROBLEM: 0x9240,\n MISSING_CRITICAL_PARAMETER: 0x6800,\n NO_EF_SELECTED: 0x9400,\n NOT_ENOUGH_MEMORY_SPACE: 0x6a84,\n OK: 0x9000,\n PIN_REMAINING_ATTEMPTS: 0x63c0,\n REFERENCED_DATA_NOT_FOUND: 0x6a88,\n SECURITY_STATUS_NOT_SATISFIED: 0x6982,\n TECHNICAL_PROBLEM: 0x6f00,\n UNKNOWN_APDU: 0x6d02,\n USER_REFUSED_ON_DEVICE: 0x5501,\n NOT_ENOUGH_SPACE: 0x5102,\n};\nexport function getAltStatusMessage(code) {\n switch (code) {\n // improve text of most common errors\n case 0x6700:\n return \"Incorrect length\";\n case 0x6800:\n return \"Missing critical parameter\";\n case 0x6982:\n return \"Security not satisfied (dongle locked or have invalid access rights)\";\n case 0x6985:\n return \"Condition of use not satisfied (denied by the user?)\";\n case 0x6a80:\n return \"Invalid data received\";\n case 0x6b00:\n return \"Invalid parameter received\";\n case 0x5515:\n return \"Locked device\";\n }\n if (0x6f00 <= code && code <= 0x6fff) {\n return \"Internal error, please report\";\n }\n}\n/**\n * Error thrown when a device returned a non success status.\n * the error.statusCode is one of the `StatusCodes` exported by this library.\n */\nexport class TransportStatusError extends Error {\n /**\n * @param statusCode The error status code coming from a Transport implementation\n * @param options containing:\n * - canBeMappedToChildError: enable the mapping of TransportStatusError to an error extending/inheriting from it\n * . Ex: LockedDeviceError. Default to true.\n */\n constructor(statusCode, { canBeMappedToChildError = true } = {}) {\n const statusText = Object.keys(StatusCodes).find(k => StatusCodes[k] === statusCode) || \"UNKNOWN_ERROR\";\n const smsg = getAltStatusMessage(statusCode) || statusText;\n const statusCodeStr = statusCode.toString(16);\n const message = `Ledger device: ${smsg} (0x${statusCodeStr})`;\n super(message);\n this.name = \"TransportStatusError\";\n this.statusCode = statusCode;\n this.statusText = statusText;\n Object.setPrototypeOf(this, TransportStatusError.prototype);\n // Maps to a LockedDeviceError\n if (canBeMappedToChildError && statusCode === StatusCodes.LOCKED_DEVICE) {\n return new LockedDeviceError(message);\n }\n }\n}\nexport class LockedDeviceError extends TransportStatusError {\n constructor(message) {\n super(StatusCodes.LOCKED_DEVICE, { canBeMappedToChildError: false });\n if (message) {\n this.message = message;\n }\n this.name = \"LockedDeviceError\";\n Object.setPrototypeOf(this, LockedDeviceError.prototype);\n }\n}\naddCustomErrorDeserializer(\"TransportStatusError\", e => new TransportStatusError(e.statusCode));\n//# sourceMappingURL=index.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport EventEmitter from \"events\";\nimport { TransportRaceCondition, TransportError, StatusCodes, getAltStatusMessage, TransportStatusError, } from \"@ledgerhq/errors\";\nexport { TransportError, TransportStatusError, StatusCodes, getAltStatusMessage, };\n/**\n * Transport defines the generic interface to share between node/u2f impl\n * A **Descriptor** is a parametric type that is up to be determined for the implementation.\n * it can be for instance an ID, an file path, a URL,...\n */\nvar Transport = /** @class */ (function () {\n function Transport() {\n var _this = this;\n this.exchangeTimeout = 30000;\n this.unresponsiveTimeout = 15000;\n this.deviceModel = null;\n this._events = new EventEmitter();\n /**\n * wrapper on top of exchange to simplify work of the implementation.\n * @param cla\n * @param ins\n * @param p1\n * @param p2\n * @param data\n * @param statusList is a list of accepted status code (shorts). [0x9000] by default\n * @return a Promise of response buffer\n */\n this.send = function (cla, ins, p1, p2, data, statusList) {\n if (data === void 0) { data = Buffer.alloc(0); }\n if (statusList === void 0) { statusList = [StatusCodes.OK]; }\n return __awaiter(_this, void 0, void 0, function () {\n var response, sw;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (data.length >= 256) {\n throw new TransportError(\"data.length exceed 256 bytes limit. Got: \" + data.length, \"DataLengthTooBig\");\n }\n return [4 /*yield*/, this.exchange(Buffer.concat([\n Buffer.from([cla, ins, p1, p2]),\n Buffer.from([data.length]),\n data,\n ]))];\n case 1:\n response = _a.sent();\n sw = response.readUInt16BE(response.length - 2);\n if (!statusList.some(function (s) { return s === sw; })) {\n throw new TransportStatusError(sw);\n }\n return [2 /*return*/, response];\n }\n });\n });\n };\n this.exchangeAtomicImpl = function (f) { return __awaiter(_this, void 0, void 0, function () {\n var resolveBusy, busyPromise, unresponsiveReached, timeout, res;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.exchangeBusyPromise) {\n throw new TransportRaceCondition(\"An action was already pending on the Ledger device. Please deny or reconnect.\");\n }\n busyPromise = new Promise(function (r) {\n resolveBusy = r;\n });\n this.exchangeBusyPromise = busyPromise;\n unresponsiveReached = false;\n timeout = setTimeout(function () {\n unresponsiveReached = true;\n _this.emit(\"unresponsive\");\n }, this.unresponsiveTimeout);\n _a.label = 1;\n case 1:\n _a.trys.push([1, , 3, 4]);\n return [4 /*yield*/, f()];\n case 2:\n res = _a.sent();\n if (unresponsiveReached) {\n this.emit(\"responsive\");\n }\n return [2 /*return*/, res];\n case 3:\n clearTimeout(timeout);\n if (resolveBusy)\n resolveBusy();\n this.exchangeBusyPromise = null;\n return [7 /*endfinally*/];\n case 4: return [2 /*return*/];\n }\n });\n }); };\n this._appAPIlock = null;\n }\n /**\n * low level api to communicate with the device\n * This method is for implementations to implement but should not be directly called.\n * Instead, the recommanded way is to use send() method\n * @param apdu the data to send\n * @return a Promise of response data\n */\n Transport.prototype.exchange = function (_apdu) {\n throw new Error(\"exchange not implemented\");\n };\n /**\n * set the \"scramble key\" for the next exchanges with the device.\n * Each App can have a different scramble key and they internally will set it at instanciation.\n * @param key the scramble key\n */\n Transport.prototype.setScrambleKey = function (_key) { };\n /**\n * close the exchange with the device.\n * @return a Promise that ends when the transport is closed.\n */\n Transport.prototype.close = function () {\n return Promise.resolve();\n };\n /**\n * Listen to an event on an instance of transport.\n * Transport implementation can have specific events. Here is the common events:\n * * `\"disconnect\"` : triggered if Transport is disconnected\n */\n Transport.prototype.on = function (eventName, cb) {\n this._events.on(eventName, cb);\n };\n /**\n * Stop listening to an event on an instance of transport.\n */\n Transport.prototype.off = function (eventName, cb) {\n this._events.removeListener(eventName, cb);\n };\n Transport.prototype.emit = function (event) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n (_a = this._events).emit.apply(_a, __spreadArray([event], __read(args), false));\n };\n /**\n * Enable or not logs of the binary exchange\n */\n Transport.prototype.setDebugMode = function () {\n console.warn(\"setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.\");\n };\n /**\n * Set a timeout (in milliseconds) for the exchange call. Only some transport might implement it. (e.g. U2F)\n */\n Transport.prototype.setExchangeTimeout = function (exchangeTimeout) {\n this.exchangeTimeout = exchangeTimeout;\n };\n /**\n * Define the delay before emitting \"unresponsive\" on an exchange that does not respond\n */\n Transport.prototype.setExchangeUnresponsiveTimeout = function (unresponsiveTimeout) {\n this.unresponsiveTimeout = unresponsiveTimeout;\n };\n /**\n * create() allows to open the first descriptor available or\n * throw if there is none or if timeout is reached.\n * This is a light helper, alternative to using listen() and open() (that you may need for any more advanced usecase)\n * @example\n TransportFoo.create().then(transport => ...)\n */\n Transport.create = function (openTimeout, listenTimeout) {\n var _this = this;\n if (openTimeout === void 0) { openTimeout = 3000; }\n return new Promise(function (resolve, reject) {\n var found = false;\n var sub = _this.listen({\n next: function (e) {\n found = true;\n if (sub)\n sub.unsubscribe();\n if (listenTimeoutId)\n clearTimeout(listenTimeoutId);\n _this.open(e.descriptor, openTimeout).then(resolve, reject);\n },\n error: function (e) {\n if (listenTimeoutId)\n clearTimeout(listenTimeoutId);\n reject(e);\n },\n complete: function () {\n if (listenTimeoutId)\n clearTimeout(listenTimeoutId);\n if (!found) {\n reject(new TransportError(_this.ErrorMessage_NoDeviceFound, \"NoDeviceFound\"));\n }\n }\n });\n var listenTimeoutId = listenTimeout\n ? setTimeout(function () {\n sub.unsubscribe();\n reject(new TransportError(_this.ErrorMessage_ListenTimeout, \"ListenTimeout\"));\n }, listenTimeout)\n : null;\n });\n };\n Transport.prototype.decorateAppAPIMethods = function (self, methods, scrambleKey) {\n var e_1, _a;\n try {\n for (var methods_1 = __values(methods), methods_1_1 = methods_1.next(); !methods_1_1.done; methods_1_1 = methods_1.next()) {\n var methodName = methods_1_1.value;\n self[methodName] = this.decorateAppAPIMethod(methodName, self[methodName], self, scrambleKey);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (methods_1_1 && !methods_1_1.done && (_a = methods_1[\"return\"])) _a.call(methods_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n Transport.prototype.decorateAppAPIMethod = function (methodName, f, ctx, scrambleKey) {\n var _this = this;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(_this, void 0, void 0, function () {\n var _appAPIlock;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _appAPIlock = this._appAPIlock;\n if (_appAPIlock) {\n return [2 /*return*/, Promise.reject(new TransportError(\"Ledger Device is busy (lock \" + _appAPIlock + \")\", \"TransportLocked\"))];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, , 3, 4]);\n this._appAPIlock = methodName;\n this.setScrambleKey(scrambleKey);\n return [4 /*yield*/, f.apply(ctx, args)];\n case 2: return [2 /*return*/, _a.sent()];\n case 3:\n this._appAPIlock = null;\n return [7 /*endfinally*/];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n };\n Transport.ErrorMessage_ListenTimeout = \"No Ledger device found (timeout)\";\n Transport.ErrorMessage_NoDeviceFound = \"No Ledger device found\";\n return Transport;\n}());\nexport default Transport;\n//# sourceMappingURL=Transport.js.map","/* The MIT License (MIT)\n *\n * Copyright 2015-2018 Peter A. Bigot\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.s16 = exports.s8 = exports.nu64be = exports.u48be = exports.u40be = exports.u32be = exports.u24be = exports.u16be = exports.nu64 = exports.u48 = exports.u40 = exports.u32 = exports.u24 = exports.u16 = exports.u8 = exports.offset = exports.greedy = exports.Constant = exports.UTF8 = exports.CString = exports.Blob = exports.Boolean = exports.BitField = exports.BitStructure = exports.VariantLayout = exports.Union = exports.UnionLayoutDiscriminator = exports.UnionDiscriminator = exports.Structure = exports.Sequence = exports.DoubleBE = exports.Double = exports.FloatBE = exports.Float = exports.NearInt64BE = exports.NearInt64 = exports.NearUInt64BE = exports.NearUInt64 = exports.IntBE = exports.Int = exports.UIntBE = exports.UInt = exports.OffsetLayout = exports.GreedyCount = exports.ExternalLayout = exports.bindConstructorLayout = exports.nameWithProperty = exports.Layout = exports.uint8ArrayToBuffer = exports.checkUint8Array = void 0;\nexports.constant = exports.utf8 = exports.cstr = exports.blob = exports.unionLayoutDiscriminator = exports.union = exports.seq = exports.bits = exports.struct = exports.f64be = exports.f64 = exports.f32be = exports.f32 = exports.ns64be = exports.s48be = exports.s40be = exports.s32be = exports.s24be = exports.s16be = exports.ns64 = exports.s48 = exports.s40 = exports.s32 = exports.s24 = void 0;\nconst buffer_1 = require(\"buffer\");\n/* Check if a value is a Uint8Array.\n *\n * @ignore */\nfunction checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError('b must be a Uint8Array');\n }\n}\nexports.checkUint8Array = checkUint8Array;\n/* Create a Buffer instance from a Uint8Array.\n *\n * @ignore */\nfunction uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n}\nexports.uint8ArrayToBuffer = uint8ArrayToBuffer;\n/**\n * Base class for layout objects.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * Layout#encode|encode} or {@link Layout#decode|decode} functions.\n *\n * @param {Number} span - Initializer for {@link Layout#span|span}. The\n * parameter must be an integer; a negative value signifies that the\n * span is {@link Layout#getSpan|value-specific}.\n *\n * @param {string} [property] - Initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n */\nclass Layout {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError('span must be an integer');\n }\n /** The span of the layout in bytes.\n *\n * Positive values are generally expected.\n *\n * Zero will only appear in {@link Constant}s and in {@link\n * Sequence}s where the {@link Sequence#count|count} is zero.\n *\n * A negative value indicates that the span is value-specific, and\n * must be obtained using {@link Layout#getSpan|getSpan}. */\n this.span = span;\n /** The property name used when this layout is represented in an\n * Object.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances. If left undefined the span of the unnamed layout will\n * be treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset) {\n if (0 > this.span) {\n throw new RangeError('indeterminate span');\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return undefined;\n }\n}\nexports.Layout = Layout;\n/* Provide text that carries a name (such as for a function that will\n * be throwing an error) annotated with the property of a given layout\n * (such as one for which the value was unacceptable).\n *\n * @ignore */\nfunction nameWithProperty(name, lo) {\n if (lo.property) {\n return name + '[' + lo.property + ']';\n }\n return name;\n}\nexports.nameWithProperty = nameWithProperty;\n/**\n * Augment a class so that instances can be encoded/decoded using a\n * given layout.\n *\n * Calling this function couples `Class` with `layout` in several ways:\n *\n * * `Class.layout_` becomes a static member property equal to `layout`;\n * * `layout.boundConstructor_` becomes a static member property equal\n * to `Class`;\n * * The {@link Layout#makeDestinationObject|makeDestinationObject()}\n * property of `layout` is set to a function that returns a `new\n * Class()`;\n * * `Class.decode(b, offset)` becomes a static member function that\n * delegates to {@link Layout#decode|layout.decode}. The\n * synthesized function may be captured and extended.\n * * `Class.prototype.encode(b, offset)` provides an instance member\n * function that delegates to {@link Layout#encode|layout.encode}\n * with `src` set to `this`. The synthesized function may be\n * captured and extended, but when the extension is invoked `this`\n * must be explicitly bound to the instance.\n *\n * @param {class} Class - a JavaScript class with a nullary\n * constructor.\n *\n * @param {Layout} layout - the {@link Layout} instance used to encode\n * instances of `Class`.\n */\n// `Class` must be a constructor Function, but the assignment of a `layout_` property to it makes it difficult to type\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction bindConstructorLayout(Class, layout) {\n if ('function' !== typeof Class) {\n throw new TypeError('Class must be constructor');\n }\n if (Object.prototype.hasOwnProperty.call(Class, 'layout_')) {\n throw new Error('Class is already bound to a layout');\n }\n if (!(layout && (layout instanceof Layout))) {\n throw new TypeError('layout must be a Layout');\n }\n if (Object.prototype.hasOwnProperty.call(layout, 'boundConstructor_')) {\n throw new Error('layout is already bound to a constructor');\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = (() => new Class());\n Object.defineProperty(Class.prototype, 'encode', {\n value(b, offset) {\n return layout.encode(this, b, offset);\n },\n writable: true,\n });\n Object.defineProperty(Class, 'decode', {\n value(b, offset) {\n return layout.decode(b, offset);\n },\n writable: true,\n });\n}\nexports.bindConstructorLayout = bindConstructorLayout;\n/**\n * An object that behaves like a layout but does not consume space\n * within its containing layout.\n *\n * This is primarily used to obtain metadata about a member, such as a\n * {@link OffsetLayout} that can provide data about a {@link\n * Layout#getSpan|value-specific span}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support {@link\n * ExternalLayout#isCount|isCount} or other {@link Layout} functions.\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @abstract\n * @augments {Layout}\n */\nclass ExternalLayout extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error('ExternalLayout is abstract');\n }\n}\nexports.ExternalLayout = ExternalLayout;\n/**\n * An {@link ExternalLayout} that determines its {@link\n * Layout#decode|value} based on offset into and length of the buffer\n * on which it is invoked.\n *\n * *Factory*: {@link module:Layout.greedy|greedy}\n *\n * @param {Number} [elementSpan] - initializer for {@link\n * GreedyCount#elementSpan|elementSpan}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {ExternalLayout}\n */\nclass GreedyCount extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if ((!Number.isInteger(elementSpan)) || (0 >= elementSpan)) {\n throw new TypeError('elementSpan must be a (positive) integer');\n }\n super(-1, property);\n /** The layout for individual elements of the sequence. The value\n * must be a positive integer. If not provided, the value will be\n * 1. */\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const rem = b.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset) {\n return 0;\n }\n}\nexports.GreedyCount = GreedyCount;\n/**\n * An {@link ExternalLayout} that supports accessing a {@link Layout}\n * at a fixed offset from the start of another Layout. The offset may\n * be before, within, or after the base layout.\n *\n * *Factory*: {@link module:Layout.offset|offset}\n *\n * @param {Layout} layout - initializer for {@link\n * OffsetLayout#layout|layout}, modulo `property`.\n *\n * @param {Number} [offset] - Initializes {@link\n * OffsetLayout#offset|offset}. Defaults to zero.\n *\n * @param {string} [property] - Optional new property name for a\n * {@link Layout#replicate| replica} of `layout` to be used as {@link\n * OffsetLayout#layout|layout}. If not provided the `layout` is used\n * unchanged.\n *\n * @augments {Layout}\n */\nclass OffsetLayout extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError('offset must be integer or undefined');\n }\n super(layout.span, property || layout.property);\n /** The subordinated layout. */\n this.layout = layout;\n /** The location of {@link OffsetLayout#layout} relative to the\n * start of another layout.\n *\n * The value may be positive or negative, but an error will thrown\n * if at the point of use it goes outside the span of the Uint8Array\n * being accessed. */\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return ((this.layout instanceof UInt)\n || (this.layout instanceof UIntBE));\n }\n /** @override */\n decode(b, offset = 0) {\n return this.layout.decode(b, offset + this.offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n return this.layout.encode(src, b, offset + this.offset);\n }\n}\nexports.OffsetLayout = OffsetLayout;\n/**\n * Represent an unsigned integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.u8|u8}, {@link\n * module:Layout.u16|u16}, {@link module:Layout.u24|u24}, {@link\n * module:Layout.u32|u32}, {@link module:Layout.u40|u40}, {@link\n * module:Layout.u48|u48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UInt extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UInt = UInt;\n/**\n * Represent an unsigned integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.u8be|u8be}, {@link\n * module:Layout.u16be|u16be}, {@link module:Layout.u24be|u24be},\n * {@link module:Layout.u32be|u32be}, {@link\n * module:Layout.u40be|u40be}, {@link module:Layout.u48be|u48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UIntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.UIntBE = UIntBE;\n/**\n * Represent a signed integer in little-endian format.\n *\n * *Factory*: {@link module:Layout.s8|s8}, {@link\n * module:Layout.s16|s16}, {@link module:Layout.s24|s24}, {@link\n * module:Layout.s32|s32}, {@link module:Layout.s40|s40}, {@link\n * module:Layout.s48|s48}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Int extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset, this.span);\n return this.span;\n }\n}\nexports.Int = Int;\n/**\n * Represent a signed integer in big-endian format.\n *\n * *Factory*: {@link module:Layout.s8be|s8be}, {@link\n * module:Layout.s16be|s16be}, {@link module:Layout.s24be|s24be},\n * {@link module:Layout.s32be|s32be}, {@link\n * module:Layout.s40be|s40be}, {@link module:Layout.s48be|s48be}\n *\n * @param {Number} span - initializer for {@link Layout#span|span}.\n * The parameter can range from 1 through 6.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass IntBE extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError('span must not exceed 6 bytes');\n }\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset, this.span);\n return this.span;\n }\n}\nexports.IntBE = IntBE;\nconst V2E32 = Math.pow(2, 32);\n/* True modulus high and low 32-bit words, where low word is always\n * non-negative. */\nfunction divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - (hi32 * V2E32);\n return { hi32, lo32 };\n}\n/* Reconstruct Number from quotient and non-negative remainder */\nfunction roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n}\n/**\n * Represent an unsigned 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64|nu64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeUInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64 = NearUInt64;\n/**\n * Represent an unsigned 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.nu64be|nu64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearUInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearUInt64BE = NearUInt64BE;\n/**\n * Represent a signed 64-bit integer in little-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64|ns64}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64 extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset);\n const hi32 = buffer.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split.lo32, offset);\n buffer.writeInt32LE(split.hi32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64 = NearInt64;\n/**\n * Represent a signed 64-bit integer in big-endian format when\n * encoded and as a near integral JavaScript Number when decoded.\n *\n * *Factory*: {@link module:Layout.ns64be|ns64be}\n *\n * **NOTE** Values with magnitude greater than 2^52 may not decode to\n * the exact value of the encoded representation.\n *\n * @augments {Layout}\n */\nclass NearInt64BE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset);\n const lo32 = buffer.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset = 0) {\n const split = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split.hi32, offset);\n buffer.writeUInt32BE(split.lo32, offset + 4);\n return 8;\n }\n}\nexports.NearInt64BE = NearInt64BE;\n/**\n * Represent a 32-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f32|f32}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Float extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset);\n return 4;\n }\n}\nexports.Float = Float;\n/**\n * Represent a 32-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f32be|f32be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass FloatBE extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset);\n return 4;\n }\n}\nexports.FloatBE = FloatBE;\n/**\n * Represent a 64-bit floating point number in little-endian format.\n *\n * *Factory*: {@link module:Layout.f64|f64}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Double extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset);\n return 8;\n }\n}\nexports.Double = Double;\n/**\n * Represent a 64-bit floating point number in big-endian format.\n *\n * *Factory*: {@link module:Layout.f64be|f64be}\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass DoubleBE extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b, offset = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset);\n return 8;\n }\n}\nexports.DoubleBE = DoubleBE;\n/**\n * Represent a contiguous sequence of a specific layout as an Array.\n *\n * *Factory*: {@link module:Layout.seq|seq}\n *\n * @param {Layout} elementLayout - initializer for {@link\n * Sequence#elementLayout|elementLayout}.\n *\n * @param {(Number|ExternalLayout)} count - initializer for {@link\n * Sequence#count|count}. The parameter must be either a positive\n * integer or an instance of {@link ExternalLayout}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Sequence extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError('elementLayout must be a Layout');\n }\n if (!(((count instanceof ExternalLayout) && count.isCount())\n || (Number.isInteger(count) && (0 <= count)))) {\n throw new TypeError('count must be non-negative integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if ((!(count instanceof ExternalLayout))\n && (0 < elementLayout.span)) {\n span = count * elementLayout.span;\n }\n super(span, property);\n /** The layout for individual elements of the sequence. */\n this.elementLayout = elementLayout;\n /** The number of elements in the sequence.\n *\n * This will be either a non-negative integer or an instance of\n * {@link ExternalLayout} for which {@link\n * ExternalLayout#isCount|isCount()} is `true`. */\n this.count = count;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n }\n else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset));\n offset += this.elementLayout.getSpan(b, offset);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span, v) => {\n return span + elo.encode(v, b, offset + span);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset);\n }\n return span;\n }\n}\nexports.Sequence = Sequence;\n/**\n * Represent a contiguous sequence of arbitrary layout elements as an\n * Object.\n *\n * *Factory*: {@link module:Layout.struct|struct}\n *\n * **NOTE** The {@link Layout#span|span} of the structure is variable\n * if any layout in {@link Structure#fields|fields} has a variable\n * span. When {@link Layout#encode|encoding} we must have a value for\n * all variable-length fields, or we wouldn't be able to figure out\n * how much space to use for storage. We can only identify the value\n * for a field when it has a {@link Layout#property|property}. As\n * such, although a structure may contain both unnamed fields and\n * variable-length fields, it cannot contain an unnamed\n * variable-length field.\n *\n * @param {Layout[]} fields - initializer for {@link\n * Structure#fields|fields}. An error is raised if this contains a\n * variable-length field for which a {@link Layout#property|property}\n * is not defined.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @param {Boolean} [decodePrefixes] - initializer for {@link\n * Structure#decodePrefixes|property}.\n *\n * @throws {Error} - if `fields` contains an unnamed variable-length\n * layout.\n *\n * @augments {Layout}\n */\nclass Structure extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields)\n && fields.reduce((acc, v) => acc && (v instanceof Layout), true))) {\n throw new TypeError('fields must be array of Layout instances');\n }\n if (('boolean' === typeof property)\n && (undefined === decodePrefixes)) {\n decodePrefixes = property;\n property = undefined;\n }\n /* Verify absence of unnamed variable-length fields. */\n for (const fd of fields) {\n if ((0 > fd.span)\n && (undefined === fd.property)) {\n throw new Error('fields cannot contain unnamed variable-length layout');\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span, fd) => span + fd.getSpan(), 0);\n }\n catch (e) {\n // ignore error\n }\n super(span, property);\n /** The sequence of {@link Layout} values that comprise the\n * structure.\n *\n * The individual elements need not be the same type, and may be\n * either scalar or aggregate layouts. If a member layout leaves\n * its {@link Layout#property|property} undefined the\n * corresponding region of the buffer associated with the element\n * will not be mutated.\n *\n * @type {Layout[]} */\n this.fields = fields;\n /** Control behavior of {@link Layout#decode|decode()} given short\n * buffers.\n *\n * In some situations a structure many be extended with additional\n * fields over time, with older installations providing only a\n * prefix of the full structure. If this property is `true`\n * decoding will accept those buffers and leave subsequent fields\n * undefined, as long as the buffer ends at a field boundary.\n * Defaults to `false`. */\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span, fd) => {\n const fsp = fd.getSpan(b, offset);\n offset += fsp;\n return span + fsp;\n }, 0);\n }\n catch (e) {\n throw new RangeError('indeterminate span');\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b, offset);\n }\n offset += fd.getSpan(b, offset);\n if (this.decodePrefixes\n && (b.length === offset)) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = (0 < span) ? span : 0;\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n lastWrote = fd.encode(fv, b, offset);\n if (0 > span) {\n /* Read the as-encoded span, which is not necessarily the\n * same as what we wrote. */\n span = fd.getSpan(b, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n /* Use (lastOffset + lastWrote) instead of offset because the last\n * item may have had a dynamic length and we don't want to include\n * the padding between it and the end of the space reserved for\n * it. */\n return (lastOffset + lastWrote) - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if ((undefined !== fd.property)\n && (0 < values.length)) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n }\n else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return undefined;\n }\n}\nexports.Structure = Structure;\n/**\n * An object that can provide a {@link\n * Union#discriminator|discriminator} API for {@link Union}.\n *\n * **NOTE** This is an abstract base class; you can create instances\n * if it amuses you, but they won't support the {@link\n * UnionDiscriminator#encode|encode} or {@link\n * UnionDiscriminator#decode|decode} functions.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}.\n *\n * @abstract\n */\nclass UnionDiscriminator {\n constructor(property) {\n /** The {@link Layout#property|property} to be used when the\n * discriminator is referenced in isolation (generally when {@link\n * Union#decode|Union decode} cannot delegate to a specific\n * variant). */\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset) {\n throw new Error('UnionDiscriminator is abstract');\n }\n}\nexports.UnionDiscriminator = UnionDiscriminator;\n/**\n * An object that can provide a {@link\n * UnionDiscriminator|discriminator API} for {@link Union} using an\n * unsigned integral {@link Layout} instance located either inside or\n * outside the union.\n *\n * @param {ExternalLayout} layout - initializes {@link\n * UnionLayoutDiscriminator#layout|layout}. Must satisfy {@link\n * ExternalLayout#isCount|isCount()}.\n *\n * @param {string} [property] - Default for {@link\n * UnionDiscriminator#property|property}, superseding the property\n * from `layout`, but defaulting to `variant` if neither `property`\n * nor layout provide a property name.\n *\n * @augments {UnionDiscriminator}\n */\nclass UnionLayoutDiscriminator extends UnionDiscriminator {\n constructor(layout, property) {\n if (!((layout instanceof ExternalLayout)\n && layout.isCount())) {\n throw new TypeError('layout must be an unsigned integer ExternalLayout');\n }\n super(property || layout.property || 'variant');\n /** The {@link ExternalLayout} used to access the discriminator\n * value. */\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset) {\n return this.layout.decode(b, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset) {\n return this.layout.encode(src, b, offset);\n }\n}\nexports.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n/**\n * Represent any number of span-compatible layouts.\n *\n * *Factory*: {@link module:Layout.union|union}\n *\n * If the union has a {@link Union#defaultLayout|default layout} that\n * layout must have a non-negative {@link Layout#span|span}. The span\n * of a fixed-span union includes its {@link\n * Union#discriminator|discriminator} if the variant is a {@link\n * Union#usesPrefixDiscriminator|prefix of the union}, plus the span\n * of its {@link Union#defaultLayout|default layout}.\n *\n * If the union does not have a default layout then the encoded span\n * of the union depends on the encoded span of its variant (which may\n * be fixed or variable).\n *\n * {@link VariantLayout#layout|Variant layout}s are added through\n * {@link Union#addVariant|addVariant}. If the union has a default\n * layout, the span of the {@link VariantLayout#layout|layout\n * contained by the variant} must not exceed the span of the {@link\n * Union#defaultLayout|default layout} (minus the span of a {@link\n * Union#usesPrefixDiscriminator|prefix disriminator}, if used). The\n * span of the variant will equal the span of the union itself.\n *\n * The variant for a buffer can only be identified from the {@link\n * Union#discriminator|discriminator} {@link\n * UnionDiscriminator#property|property} (in the case of the {@link\n * Union#defaultLayout|default layout}), or by using {@link\n * Union#getVariant|getVariant} and examining the resulting {@link\n * VariantLayout} instance.\n *\n * A variant compatible with a JavaScript object can be identified\n * using {@link Union#getSourceVariant|getSourceVariant}.\n *\n * @param {(UnionDiscriminator|ExternalLayout|Layout)} discr - How to\n * identify the layout used to interpret the union contents. The\n * parameter must be an instance of {@link UnionDiscriminator}, an\n * {@link ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}, or {@link UInt} (or {@link\n * UIntBE}). When a non-external layout element is passed the layout\n * appears at the start of the union. In all cases the (synthesized)\n * {@link UnionDiscriminator} instance is recorded as {@link\n * Union#discriminator|discriminator}.\n *\n * @param {(Layout|null)} defaultLayout - initializer for {@link\n * Union#defaultLayout|defaultLayout}. If absent defaults to `null`.\n * If `null` there is no default layout: the union has data-dependent\n * length and attempts to decode or encode unrecognized variants will\n * throw an exception. A {@link Layout} instance must have a\n * non-negative {@link Layout#span|span}, and if it lacks a {@link\n * Layout#property|property} the {@link\n * Union#defaultLayout|defaultLayout} will be a {@link\n * Layout#replicate|replica} with property `content`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Union extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if ((discr instanceof UInt)\n || (discr instanceof UIntBE)) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n }\n else if ((discr instanceof ExternalLayout)\n && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n }\n else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError('discr must be a UnionDiscriminator '\n + 'or an unsigned integer layout');\n }\n else {\n discriminator = discr;\n }\n if (undefined === defaultLayout) {\n defaultLayout = null;\n }\n if (!((null === defaultLayout)\n || (defaultLayout instanceof Layout))) {\n throw new TypeError('defaultLayout must be null or a Layout');\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error('defaultLayout must have constant span');\n }\n if (undefined === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate('content');\n }\n }\n /* The union span can be estimated only if there's a default\n * layout. The union spans its default layout, plus any prefix\n * variant layout. By construction both layouts, if present, have\n * non-negative span. */\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if ((0 <= span) && ((discr instanceof UInt)\n || (discr instanceof UIntBE))) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n /** The interface for the discriminator value in isolation.\n *\n * This a {@link UnionDiscriminator} either passed to the\n * constructor or synthesized from the `discr` constructor\n * argument. {@link\n * Union#usesPrefixDiscriminator|usesPrefixDiscriminator} will be\n * `true` iff the `discr` parameter was a non-offset {@link\n * Layout} instance. */\n this.discriminator = discriminator;\n /** `true` if the {@link Union#discriminator|discriminator} is the\n * first field in the union.\n *\n * If `false` the discriminator is obtained from somewhere\n * else. */\n this.usesPrefixDiscriminator = (discr instanceof UInt)\n || (discr instanceof UIntBE);\n /** The layout for non-discriminator content when the value of the\n * discriminator is not recognized.\n *\n * This is the value passed to the constructor. It is\n * structurally equivalent to the second component of {@link\n * Union#layout|layout} but may have a different property\n * name. */\n this.defaultLayout = defaultLayout;\n /** A registry of allowed variants.\n *\n * The keys are unsigned integers which should be compatible with\n * {@link Union.discriminator|discriminator}. The property value\n * is the corresponding {@link VariantLayout} instances assigned\n * to this union by {@link Union#addVariant|addVariant}.\n *\n * **NOTE** The registry remains mutable so that variants can be\n * {@link Union#addVariant|added} at any time. Users should not\n * manipulate the content of this property. */\n this.registry = {};\n /* Private variable used when invoking getSourceVariant */\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n /** Function to infer the variant selected by a source object.\n *\n * Defaults to {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant} but may\n * be overridden using {@link\n * Union#configGetSourceVariant|configGetSourceVariant}.\n *\n * @param {Object} src - as with {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * @returns {(undefined|VariantLayout)} The default variant\n * (`undefined`) or first registered variant that uses a property\n * available in `src`. */\n this.getSourceVariant = function (src) {\n return boundGetSourceVariant(src);\n };\n /** Function to override the implementation of {@link\n * Union#getSourceVariant|getSourceVariant}.\n *\n * Use this if the desired variant cannot be identified using the\n * algorithm of {@link\n * Union#defaultGetSourceVariant|defaultGetSourceVariant}.\n *\n * **NOTE** The provided function will be invoked bound to this\n * Union instance, providing local access to {@link\n * Union#registry|registry}.\n *\n * @param {Function} gsv - a function that follows the API of\n * {@link Union#defaultGetSourceVariant|defaultGetSourceVariant}. */\n this.configGetSourceVariant = function (gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n /* Default layouts always have non-negative span, so we don't have\n * one and we have to recognize the variant which will in turn\n * determine the span. */\n const vlo = this.getVariant(b, offset);\n if (!vlo) {\n throw new Error('unable to determine span for unrecognized variant');\n }\n return vlo.getSpan(b, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property\n && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return undefined;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo\n && ((!vlo.layout)\n || (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)))) {\n return vlo;\n }\n }\n else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error('unable to infer src variant');\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset);\n const clo = this.registry[discr];\n if (undefined === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n // defaultLayout.property can be undefined, but this is allowed by buffer-layout\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n dest[defaultLayout.property] = defaultLayout.decode(b, offset + contentOffset);\n }\n else {\n dest = clo.decode(b, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (undefined === vlo) {\n const dlo = this.discriminator;\n // this.defaultLayout is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset);\n // clo.property is not undefined when vlo is undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return contentOffset + clo.encode(src[clo.property], b, offset + contentOffset);\n }\n return vlo.encode(src, b, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n }\n else {\n variant = vb;\n }\n return this.registry[variant];\n }\n}\nexports.Union = Union;\n/**\n * Represent a specific variant within a containing union.\n *\n * **NOTE** The {@link Layout#span|span} of the variant may include\n * the span of the {@link Union#discriminator|discriminator} used to\n * identify it, but values read and written using the variant strictly\n * conform to the content of {@link VariantLayout#layout|layout}.\n *\n * **NOTE** User code should not invoke this constructor directly. Use\n * the union {@link Union#addVariant|addVariant} helper method.\n *\n * @param {Union} union - initializer for {@link\n * VariantLayout#union|union}.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} [layout] - initializer for {@link\n * VariantLayout#layout|layout}. If absent the variant carries no\n * data.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}. Unlike many other layouts, variant\n * layouts normally include a property name so they can be identified\n * within their containing {@link Union}. The property identifier may\n * be absent only if `layout` is is absent.\n *\n * @augments {Layout}\n */\nclass VariantLayout extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError('union must be a Union');\n }\n if ((!Number.isInteger(variant)) || (0 > variant)) {\n throw new TypeError('variant must be a (non-negative) integer');\n }\n if (('string' === typeof layout)\n && (undefined === property)) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError('layout must be a Layout');\n }\n if ((null !== union.defaultLayout)\n && (0 <= layout.span)\n && (layout.span > union.defaultLayout.span)) {\n throw new Error('variant span exceeds span of containing union');\n }\n if ('string' !== typeof property) {\n throw new TypeError('variant must have a String property');\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if ((0 <= span) && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n /** The {@link Union} to which this variant belongs. */\n this.union = union;\n /** The unsigned integral value identifying this variant within\n * the {@link Union#discriminator|discriminator} of the containing\n * union. */\n this.variant = variant;\n /** The {@link Layout} to be used when reading/writing the\n * non-discriminator part of the {@link\n * VariantLayout#union|union}. If `null` the variant carries no\n * data. */\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset = 0) {\n if (0 <= this.span) {\n /* Will be equal to the containing union span if that is not\n * variable. */\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n /* Span is defined solely by the variant (and prefix discriminator) */\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset)) {\n throw new Error('variant mismatch');\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset + contentOffset);\n }\n else if (this.property) {\n dest[this.property] = true;\n }\n else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout\n && (!Object.prototype.hasOwnProperty.call(src, this.property))) {\n throw new TypeError('variant lacks property ' + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset + contentOffset);\n span += this.layout.getSpan(b, offset + contentOffset);\n if ((0 <= this.union.span)\n && (span > this.union.span)) {\n throw new Error('encoded variant overruns containing union');\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return undefined;\n }\n}\nexports.VariantLayout = VariantLayout;\n/** JavaScript chose to define bitwise operations as operating on\n * signed 32-bit values in 2's complement form, meaning any integer\n * with bit 31 set is going to look negative. For right shifts that's\n * not a problem, because `>>>` is a logical shift, but for every\n * other bitwise operator we have to compensate for possible negative\n * results. */\nfunction fixBitwiseResult(v) {\n if (0 > v) {\n v += 0x100000000;\n }\n return v;\n}\n/**\n * Contain a sequence of bit fields as an unsigned integer.\n *\n * *Factory*: {@link module:Layout.bits|bits}\n *\n * This is a container element; within it there are {@link BitField}\n * instances that provide the extracted properties. The container\n * simply defines the aggregate representation and its bit ordering.\n * The representation is an object containing properties with numeric\n * or {@link Boolean} values.\n *\n * {@link BitField}s are added with the {@link\n * BitStructure#addField|addField} and {@link\n * BitStructure#addBoolean|addBoolean} methods.\n\n * @param {Layout} word - initializer for {@link\n * BitStructure#word|word}. The parameter must be an instance of\n * {@link UInt} (or {@link UIntBE}) that is no more than 4 bytes wide.\n *\n * @param {bool} [msb] - `true` if the bit numbering starts at the\n * most significant bit of the containing word; `false` (default) if\n * it starts at the least significant bit of the containing word. If\n * the parameter at this position is a string and `property` is\n * `undefined` the value of this argument will instead be used as the\n * value of `property`.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass BitStructure extends Layout {\n constructor(word, msb, property) {\n if (!((word instanceof UInt)\n || (word instanceof UIntBE))) {\n throw new TypeError('word must be a UInt or UIntBE layout');\n }\n if (('string' === typeof msb)\n && (undefined === property)) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError('word cannot exceed 32 bits');\n }\n super(word.span, property);\n /** The layout used for the packed value. {@link BitField}\n * instances are packed sequentially depending on {@link\n * BitStructure#msb|msb}. */\n this.word = word;\n /** Whether the bit sequences are packed starting at the most\n * significant bit growing down (`true`), or the least significant\n * bit growing up (`false`).\n *\n * **NOTE** Regardless of this value, the least significant bit of\n * any {@link BitField} value is the least significant bit of the\n * corresponding section of the packed value. */\n this.msb = !!msb;\n /** The sequence of {@link BitField} layouts that comprise the\n * packed structure.\n *\n * **NOTE** The array remains mutable to allow fields to be {@link\n * BitStructure#addField|added} after construction. Users should\n * not manipulate the content of this property.*/\n this.fields = [];\n /* Storage for the value. Capture a variable instead of using an\n * instance property because we don't want anything to change the\n * value without going through the mutator. */\n let value = 0;\n this._packedSetValue = function (v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function () {\n return value;\n };\n }\n /** @override */\n decode(b, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset = 0) {\n const value = this.word.decode(b, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (undefined !== fd.property) {\n const fv = src[fd.property];\n if (undefined !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n // This is my Boolean, not the Javascript one.\n const bf = new Boolean(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if ('string' !== typeof property) {\n throw new TypeError('property must be string');\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return undefined;\n }\n}\nexports.BitStructure = BitStructure;\n/**\n * Represent a sequence of bits within a {@link BitStructure}.\n *\n * All bit field values are represented as unsigned integers.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addField|addField} helper\n * method.\n *\n * **NOTE** BitField instances are not instances of {@link Layout}\n * since {@link Layout#span|span} measures 8-bit units.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n */\nclass BitField {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError('container must be a BitStructure');\n }\n if ((!Number.isInteger(bits)) || (0 >= bits)) {\n throw new TypeError('bits must be positive integer');\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if ((bits + usedBits) > totalBits) {\n throw new Error('bits too long for span remainder ('\n + (totalBits - usedBits) + ' of '\n + totalBits + ' remain)');\n }\n /** The {@link BitStructure} instance to which this bit field\n * belongs. */\n this.container = container;\n /** The span of this value in bits. */\n this.bits = bits;\n /** A mask of {@link BitField#bits|bits} bits isolating value bits\n * that fit within the field.\n *\n * That is, it masks a value that has not yet been shifted into\n * position within its containing packed integer. */\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) { // shifted value out of range\n this.valueMask = 0xFFFFFFFF;\n }\n /** The offset of the value within the containing packed unsigned\n * integer. The least significant bit of the packed value is at\n * offset zero, regardless of bit ordering used. */\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n /** A mask of {@link BitField#bits|bits} isolating the field value\n * within the containing packed unsigned integer. */\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n /** The property name used when this bitfield is represented in an\n * Object.\n *\n * Intended to be functionally equivalent to {@link\n * Layout#property}.\n *\n * If left undefined the corresponding span of bits will be\n * treated as padding: it will not be mutated by {@link\n * Layout#encode|encode} nor represented as a property in the\n * decoded Object. */\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if ('number' !== typeof value\n || !Number.isInteger(value)\n || (value !== fixBitwiseResult(value & this.valueMask))) {\n throw new TypeError(nameWithProperty('BitField.encode', this)\n + ' value must be integer not exceeding ' + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask)\n | wordValue);\n }\n}\nexports.BitField = BitField;\n/**\n * Represent a single bit within a {@link BitStructure} as a\n * JavaScript boolean.\n *\n * **NOTE** User code should not invoke this constructor directly.\n * Use the container {@link BitStructure#addBoolean|addBoolean} helper\n * method.\n *\n * @param {BitStructure} container - initializer for {@link\n * BitField#container|container}.\n *\n * @param {string} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {BitField}\n */\n/* eslint-disable no-extend-native */\nclass Boolean extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset) {\n return !!super.decode(b, offset);\n }\n /** @override */\n encode(value) {\n if ('boolean' === typeof value) {\n // BitField requires integer values\n value = +value;\n }\n super.encode(value);\n }\n}\nexports.Boolean = Boolean;\n/* eslint-enable no-extend-native */\n/**\n * Contain a fixed-length block of arbitrary data, represented as a\n * Uint8Array.\n *\n * *Factory*: {@link module:Layout.blob|blob}\n *\n * @param {(Number|ExternalLayout)} length - initializes {@link\n * Blob#length|length}.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Blob extends Layout {\n constructor(length, property) {\n if (!(((length instanceof ExternalLayout) && length.isCount())\n || (Number.isInteger(length) && (0 <= length)))) {\n throw new TypeError('length must be positive integer '\n + 'or an unsigned integer ExternalLayout');\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n /** The number of bytes in the blob.\n *\n * This may be a non-negative integer, or an instance of {@link\n * ExternalLayout} that satisfies {@link\n * ExternalLayout#isCount|isCount()}. */\n this.length = length;\n }\n /** @override */\n getSpan(b, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return span;\n }\n /** @override */\n decode(b, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset);\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty('Blob.encode', this)\n + ' requires (length ' + span + ') Uint8Array as src');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Uint8Array');\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString('hex'), offset, span, 'hex');\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset);\n }\n return span;\n }\n}\nexports.Blob = Blob;\n/**\n * Contain a `NUL`-terminated UTF8 string.\n *\n * *Factory*: {@link module:Layout.cstr|cstr}\n *\n * **NOTE** Any UTF8 string that incorporates a zero-valued byte will\n * not be correctly decoded by this layout.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass CString extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n let idx = offset;\n while ((idx < b.length) && (0 !== b[idx])) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n return uint8ArrayToBuffer(b).slice(offset, offset + span - 1).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset);\n buffer[offset + span] = 0;\n return span + 1;\n }\n}\nexports.CString = CString;\n/**\n * Contain a UTF8 string with implicit length.\n *\n * *Factory*: {@link module:Layout.utf8|utf8}\n *\n * **NOTE** Because the length is implicit in the size of the buffer\n * this layout should be used only in isolation, or in a situation\n * where the length can be expressed by operating on a slice of the\n * containing buffer.\n *\n * @param {Number} [maxSpan] - the maximum length allowed for encoded\n * string content. If not provided there is no bound on the allowed\n * content.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass UTF8 extends Layout {\n constructor(maxSpan, property) {\n if (('string' === typeof maxSpan) && (undefined === property)) {\n property = maxSpan;\n maxSpan = undefined;\n }\n if (undefined === maxSpan) {\n maxSpan = -1;\n }\n else if (!Number.isInteger(maxSpan)) {\n throw new TypeError('maxSpan must be an integer');\n }\n super(-1, property);\n /** The maximum span of the layout in bytes.\n *\n * Positive values are generally expected. Zero is abnormal.\n * Attempts to encode or decode a value that exceeds this length\n * will throw a `RangeError`.\n *\n * A negative value indicates that there is no bound on the length\n * of the content. */\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset = 0) {\n checkUint8Array(b);\n return b.length - offset;\n }\n /** @override */\n decode(b, offset = 0) {\n const span = this.getSpan(b, offset);\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n return uint8ArrayToBuffer(b).slice(offset, offset + span).toString('utf-8');\n }\n /** @override */\n encode(src, b, offset = 0) {\n /* Must force this to a string, lest it be a number and the\n * \"utf8-encoding\" below actually allocate a buffer of length\n * src */\n if ('string' !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, 'utf8');\n const span = srcb.length;\n if ((0 <= this.maxSpan)\n && (this.maxSpan < span)) {\n throw new RangeError('text length exceeds maxSpan');\n }\n if ((offset + span) > b.length) {\n throw new RangeError('encoding overruns Buffer');\n }\n srcb.copy(uint8ArrayToBuffer(b), offset);\n return span;\n }\n}\nexports.UTF8 = UTF8;\n/**\n * Contain a constant value.\n *\n * This layout may be used in cases where a JavaScript value can be\n * inferred without an expression in the binary encoding. An example\n * would be a {@link VariantLayout|variant layout} where the content\n * is implied by the union {@link Union#discriminator|discriminator}.\n *\n * @param {Object|Number|String} value - initializer for {@link\n * Constant#value|value}. If the value is an object (or array) and\n * the application intends the object to remain unchanged regardless\n * of what is done to values decoded by this layout, the value should\n * be frozen prior passing it to this constructor.\n *\n * @param {String} [property] - initializer for {@link\n * Layout#property|property}.\n *\n * @augments {Layout}\n */\nclass Constant extends Layout {\n constructor(value, property) {\n super(0, property);\n /** The value produced by this constant when the layout is {@link\n * Constant#decode|decoded}.\n *\n * Any JavaScript value including `null` and `undefined` is\n * permitted.\n *\n * **WARNING** If `value` passed in the constructor was not\n * frozen, it is possible for users of decoded values to change\n * the content of the value. */\n this.value = value;\n }\n /** @override */\n decode(b, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset) {\n /* Constants take no space */\n return 0;\n }\n}\nexports.Constant = Constant;\n/** Factory for {@link GreedyCount}. */\nexports.greedy = ((elementSpan, property) => new GreedyCount(elementSpan, property));\n/** Factory for {@link OffsetLayout}. */\nexports.offset = ((layout, offset, property) => new OffsetLayout(layout, offset, property));\n/** Factory for {@link UInt|unsigned int layouts} spanning one\n * byte. */\nexports.u8 = ((property) => new UInt(1, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16 = ((property) => new UInt(2, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24 = ((property) => new UInt(3, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32 = ((property) => new UInt(4, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40 = ((property) => new UInt(5, property));\n/** Factory for {@link UInt|little-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48 = ((property) => new UInt(6, property));\n/** Factory for {@link NearUInt64|little-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64 = ((property) => new NearUInt64(property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning two bytes. */\nexports.u16be = ((property) => new UIntBE(2, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning three bytes. */\nexports.u24be = ((property) => new UIntBE(3, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning four bytes. */\nexports.u32be = ((property) => new UIntBE(4, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning five bytes. */\nexports.u40be = ((property) => new UIntBE(5, property));\n/** Factory for {@link UInt|big-endian unsigned int layouts}\n * spanning six bytes. */\nexports.u48be = ((property) => new UIntBE(6, property));\n/** Factory for {@link NearUInt64BE|big-endian unsigned int\n * layouts} interpreted as Numbers. */\nexports.nu64be = ((property) => new NearUInt64BE(property));\n/** Factory for {@link Int|signed int layouts} spanning one\n * byte. */\nexports.s8 = ((property) => new Int(1, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning two bytes. */\nexports.s16 = ((property) => new Int(2, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning three bytes. */\nexports.s24 = ((property) => new Int(3, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning four bytes. */\nexports.s32 = ((property) => new Int(4, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning five bytes. */\nexports.s40 = ((property) => new Int(5, property));\n/** Factory for {@link Int|little-endian signed int layouts}\n * spanning six bytes. */\nexports.s48 = ((property) => new Int(6, property));\n/** Factory for {@link NearInt64|little-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64 = ((property) => new NearInt64(property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning two bytes. */\nexports.s16be = ((property) => new IntBE(2, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning three bytes. */\nexports.s24be = ((property) => new IntBE(3, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning four bytes. */\nexports.s32be = ((property) => new IntBE(4, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning five bytes. */\nexports.s40be = ((property) => new IntBE(5, property));\n/** Factory for {@link Int|big-endian signed int layouts}\n * spanning six bytes. */\nexports.s48be = ((property) => new IntBE(6, property));\n/** Factory for {@link NearInt64BE|big-endian signed int layouts}\n * interpreted as Numbers. */\nexports.ns64be = ((property) => new NearInt64BE(property));\n/** Factory for {@link Float|little-endian 32-bit floating point} values. */\nexports.f32 = ((property) => new Float(property));\n/** Factory for {@link FloatBE|big-endian 32-bit floating point} values. */\nexports.f32be = ((property) => new FloatBE(property));\n/** Factory for {@link Double|little-endian 64-bit floating point} values. */\nexports.f64 = ((property) => new Double(property));\n/** Factory for {@link DoubleBE|big-endian 64-bit floating point} values. */\nexports.f64be = ((property) => new DoubleBE(property));\n/** Factory for {@link Structure} values. */\nexports.struct = ((fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes));\n/** Factory for {@link BitStructure} values. */\nexports.bits = ((word, msb, property) => new BitStructure(word, msb, property));\n/** Factory for {@link Sequence} values. */\nexports.seq = ((elementLayout, count, property) => new Sequence(elementLayout, count, property));\n/** Factory for {@link Union} values. */\nexports.union = ((discr, defaultLayout, property) => new Union(discr, defaultLayout, property));\n/** Factory for {@link UnionLayoutDiscriminator} values. */\nexports.unionLayoutDiscriminator = ((layout, property) => new UnionLayoutDiscriminator(layout, property));\n/** Factory for {@link Blob} values. */\nexports.blob = ((length, property) => new Blob(length, property));\n/** Factory for {@link CString} values. */\nexports.cstr = ((property) => new CString(property));\n/** Factory for {@link UTF8} values. */\nexports.utf8 = ((maxSpan, property) => new UTF8(maxSpan, property));\n/** Factory for {@link Constant} values. */\nexports.constant = ((value, property) => new Constant(value, property));\n//# sourceMappingURL=Layout.js.map","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\n// @ts-ignore\nvar _Buffer = require('safe-buffer').Buffer\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source) }\n if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return _Buffer.alloc(0) }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4))\n vch.fill(0x00, 0, zeroes)\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet converter;\n/**\n * Convert a little-endian buffer into a BigInt.\n * @param buf The little-endian buffer to convert\n * @returns A BigInt with the little-endian representation of buf.\n */\nfunction toBigIntLE(buf) {\n {\n const reversed = Buffer.from(buf);\n reversed.reverse();\n const hex = reversed.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, false);\n}\nexports.toBigIntLE = toBigIntLE;\n/**\n * Convert a big-endian buffer into a BigInt\n * @param buf The big-endian buffer to convert.\n * @returns A BigInt with the big-endian representation of buf.\n */\nfunction toBigIntBE(buf) {\n {\n const hex = buf.toString('hex');\n if (hex.length === 0) {\n return BigInt(0);\n }\n return BigInt(`0x${hex}`);\n }\n return converter.toBigInt(buf, true);\n}\nexports.toBigIntBE = toBigIntBE;\n/**\n * Convert a BigInt to a little-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A little-endian buffer representation of num.\n */\nfunction toBufferLE(num, width) {\n {\n const hex = num.toString(16);\n const buffer = Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n buffer.reverse();\n return buffer;\n }\n // Allocation is done here, since it is slower using napi in C\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);\n}\nexports.toBufferLE = toBufferLE;\n/**\n * Convert a BigInt to a big-endian buffer.\n * @param num The BigInt to convert.\n * @param width The number of bytes that the resulting buffer should be.\n * @returns A big-endian buffer representation of num.\n */\nfunction toBufferBE(num, width) {\n {\n const hex = num.toString(16);\n return Buffer.from(hex.padStart(width * 2, '0').slice(0, width * 2), 'hex');\n }\n return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);\n}\nexports.toBufferBE = toBufferBE;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deserializeUnchecked = exports.deserialize = exports.serialize = exports.BinaryReader = exports.BinaryWriter = exports.BorshError = exports.baseDecode = exports.baseEncode = void 0;\nconst bn_js_1 = __importDefault(require(\"bn.js\"));\nconst bs58_1 = __importDefault(require(\"bs58\"));\n// TODO: Make sure this polyfill not included when not required\nconst encoding = __importStar(require(\"text-encoding-utf-8\"));\nconst ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\nconst textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\nfunction baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer.from(value));\n}\nexports.baseEncode = baseEncode;\nfunction baseDecode(value) {\n return Buffer.from(bs58_1.default.decode(value));\n}\nexports.baseDecode = baseDecode;\nconst INITIAL_LENGTH = 1024;\nclass BorshError extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n // NOTE: Modifying message directly as jest doesn't use .toString()\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n}\nexports.BorshError = BorshError;\n/// Binary encoder.\nclass BinaryWriter {\n constructor() {\n this.buf = Buffer.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer.concat([this.buf, Buffer.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n // Buffer.from is needed as this.buf.subarray can return plain Uint8Array in browser\n this.buf = Buffer.concat([\n Buffer.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer.alloc(INITIAL_LENGTH),\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n}\nexports.BinaryWriter = BinaryWriter;\nfunction handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function (...args) {\n try {\n return originalMethod.apply(this, args);\n }\n catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n}\nclass BinaryReader {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n // NOTE: Using TextDecoder to fail on invalid UTF-8\n return textDecoder.decode(buf);\n }\n catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n}\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU8\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU16\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU32\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU64\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU128\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU256\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readU512\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readString\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readFixedArray\", null);\n__decorate([\n handlingRangeError\n], BinaryReader.prototype, \"readArray\", null);\nexports.BinaryReader = BinaryReader;\nfunction capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nfunction serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n // TODO: Handle missing values properly (make sure they never result in just skipped write)\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n }\n else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n }\n else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n }\n else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n }\n else if (fieldType.kind !== undefined) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === undefined) {\n writer.writeU8(0);\n }\n else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n }\n else {\n serializeStruct(schema, value, writer);\n }\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n }\n else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n }\n else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n}\n/// Serialize given object using schema of the form:\n/// { class_name -> [ [field_name, field_type], .. ], .. }\nfunction serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n}\nexports.serialize = serialize;\nfunction deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n }\n else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n }\n else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return undefined;\n }\n if (fieldType.kind === \"map\") {\n let map = new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n }\n catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n}\nfunction deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n}\n/// Deserializes object from bytes using schema.\nfunction deserialize(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n}\nexports.deserialize = deserialize;\n/// Deserializes object from bytes using schema, without checking the length read\nfunction deserializeUnchecked(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n}\nexports.deserializeUnchecked = deserializeUnchecked;\n","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","const basex = require('base-x')\nconst ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n var BASE_MAP = new Uint8Array(256)\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i)\n var xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n var BASE = ALPHABET.length\n var LEADER = ALPHABET.charAt(0)\n var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n if (source instanceof Uint8Array) {\n } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n var zeroes = 0\n var length = 0\n var pbegin = 0\n var pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n var b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n var carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n var i = 0\n for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n var it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n var str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n var psz = 0\n // Skip and count leading '1's.\n var zeroes = 0\n var length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n var b256 = new Uint8Array(size)\n // Process the characters.\n while (source[psz]) {\n // Decode character\n var carry = BASE_MAP[source.charCodeAt(psz)]\n // Invalid character\n if (carry === 255) { return }\n var i = 0\n for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n var it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n var vch = new Uint8Array(zeroes + (size - it4))\n var j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n var buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode: encode,\n decodeUnsafe: decodeUnsafe,\n decode: decode\n }\n}\nmodule.exports = base\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\nconst uuid = require('uuid').v4;\nconst generateRequest = require('../../generateRequest');\n\n/**\n * Constructor for a Jayson Browser Client that does not depend any node.js core libraries\n * @class ClientBrowser\n * @param {Function} callServer Method that calls the server, receives the stringified request and a regular node-style callback\n * @param {Object} [options]\n * @param {Function} [options.reviver] Reviver function for JSON\n * @param {Function} [options.replacer] Replacer function for JSON\n * @param {Number} [options.version=2] JSON-RPC version to use (1|2)\n * @param {Function} [options.generator] Function to use for generating request IDs\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @return {ClientBrowser}\n */\nconst ClientBrowser = function(callServer, options) {\n if(!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n\n if (!options) {\n options = {};\n }\n\n this.options = {\n reviver: typeof options.reviver !== 'undefined' ? options.reviver : null,\n replacer: typeof options.replacer !== 'undefined' ? options.replacer : null,\n generator: typeof options.generator !== 'undefined' ? options.generator : function() { return uuid(); },\n version: typeof options.version !== 'undefined' ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === 'boolean' ? options.notificationIdNull : false,\n };\n\n this.callServer = callServer;\n};\n\nmodule.exports = ClientBrowser;\n\n/**\n * Creates a request and dispatches it if given a callback.\n * @param {String|Array} method A batch request if passed an Array, or a method name if passed a String\n * @param {Array|Object} [params] Parameters for the method\n * @param {String|Number} [id] Optional id. If undefined an id will be generated. If null it creates a notification request\n * @param {Function} [callback] Request callback. If specified, executes the request rather than only returning it.\n * @throws {TypeError} Invalid parameters\n * @return {Object} JSON-RPC 1.0 or 2.0 compatible request\n */\nClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n\n // is this a batch request?\n const isBatch = Array.isArray(method) && typeof params === 'function';\n\n if (this.options.version === 1 && isBatch) {\n throw new TypeError('JSON-RPC 1.0 does not support batching');\n }\n\n // is this a raw request?\n const isRaw = !isBatch && method && typeof method === 'object' && typeof params === 'function';\n\n if(isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if(typeof id === 'function') {\n callback = id;\n // specifically undefined because \"null\" is a notification request\n id = undefined;\n }\n\n const hasCallback = typeof callback === 'function';\n\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull,\n });\n } catch(err) {\n if(hasCallback) {\n return callback(err);\n }\n throw err;\n }\n\n // no callback means we should just return a raw request\n if(!hasCallback) {\n return request;\n }\n\n }\n\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch(err) {\n return callback(err);\n }\n\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n\n // always return the raw request\n return request;\n};\n\n/**\n * Parses a response from a server\n * @param {Object} err Error to pass on that is unrelated to the actual response\n * @param {String} responseText JSON-RPC 1.0 or 2.0 response\n * @param {Function} callback Callback that will receive different arguments depending on the amount of parameters\n * @private\n */\nClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if(err) {\n callback(err);\n return;\n }\n\n if(!responseText) {\n // empty response text, assume that is correct because it could be a\n // notification which jayson does not give any body for\n return callback();\n }\n\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch(err) {\n return callback(err);\n }\n\n if(callback.length === 3) {\n // if callback length is 3, we split callback arguments on error and response\n\n // is batch response?\n if(Array.isArray(response)) {\n\n // neccesary to split strictly on validity according to spec here\n const isError = function(res) {\n return typeof res.error !== 'undefined';\n };\n\n const isNotError = function (res) {\n return !isError(res);\n };\n\n return callback(null, response.filter(isError), response.filter(isNotError));\n \n } else {\n\n // split regardless of validity\n return callback(null, response.error, response.result);\n \n }\n \n }\n\n callback(null, response);\n};\n","'use strict';\n\nconst uuid = require('uuid').v4;\n\n/**\n * Generates a JSON-RPC 1.0 or 2.0 request\n * @param {String} method Name of method to call\n * @param {Array|Object} params Array of parameters passed to the method as specified, or an object of parameter names and corresponding value\n * @param {String|Number|null} [id] Request ID can be a string, number, null for explicit notification or left out for automatic generation\n * @param {Object} [options]\n * @param {Number} [options.version=2] JSON-RPC version to use (1 or 2)\n * @param {Boolean} [options.notificationIdNull=false] When true, version 2 requests will set id to null instead of omitting it\n * @param {Function} [options.generator] Passed the request, and the options object and is expected to return a request ID\n * @throws {TypeError} If any of the parameters are invalid\n * @return {Object} A JSON-RPC 1.0 or 2.0 request\n * @memberOf Utils\n */\nconst generateRequest = function(method, params, id, options) {\n if(typeof method !== 'string') {\n throw new TypeError(method + ' must be a string');\n }\n\n options = options || {};\n\n // check valid version provided\n const version = typeof options.version === 'number' ? options.version : 2;\n if (version !== 1 && version !== 2) {\n throw new TypeError(version + ' must be 1 or 2');\n }\n\n const request = {\n method: method\n };\n\n if(version === 2) {\n request.jsonrpc = '2.0';\n }\n\n if(params) {\n // params given, but invalid?\n if(typeof params !== 'object' && !Array.isArray(params)) {\n throw new TypeError(params + ' must be an object, array or omitted');\n }\n request.params = params;\n }\n\n // if id was left out, generate one (null means explicit notification)\n if(typeof(id) === 'undefined') {\n const generator = typeof options.generator === 'function' ? options.generator : function() { return uuid(); };\n request.id = generator(request, options);\n } else if (version === 2 && id === null) {\n // we have a version 2 notification\n if (options.notificationIdNull) {\n request.id = null; // id will not be set at all unless option provided\n }\n } else {\n request.id = id;\n }\n\n return request;\n};\n\nmodule.exports = generateRequest;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","/**\n * \"Client\" wraps \"ws\" or a browser-implemented \"WebSocket\" library\n * according to the environment providing JSON RPC 2.0 support on top.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime/regenerator\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime/helpers/asyncToGenerator\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\nvar _eventemitter = require(\"eventemitter3\");\nvar _utils = require(\"./utils\");\nfunction _callSuper(t, o, e) { return o = (0, _getPrototypeOf2[\"default\"])(o), (0, _possibleConstructorReturn2[\"default\"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2[\"default\"])(t).constructor) : o.apply(t, e)); }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nvar __rest = void 0 && (void 0).__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n// @ts-ignore\nvar CommonClient = exports[\"default\"] = /*#__PURE__*/function (_EventEmitter) {\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @param {DataPack} dataPack - data pack contains encoder and decoder\n * @return {CommonClient}\n */\n function CommonClient(webSocketFactory) {\n var _this;\n var address = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"ws://localhost:8080\";\n var _a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var generate_request_id = arguments.length > 3 ? arguments[3] : undefined;\n var dataPack = arguments.length > 4 ? arguments[4] : undefined;\n (0, _classCallCheck2[\"default\"])(this, CommonClient);\n var _a$autoconnect = _a.autoconnect,\n autoconnect = _a$autoconnect === void 0 ? true : _a$autoconnect,\n _a$reconnect = _a.reconnect,\n reconnect = _a$reconnect === void 0 ? true : _a$reconnect,\n _a$reconnect_interval = _a.reconnect_interval,\n reconnect_interval = _a$reconnect_interval === void 0 ? 1000 : _a$reconnect_interval,\n _a$max_reconnects = _a.max_reconnects,\n max_reconnects = _a$max_reconnects === void 0 ? 5 : _a$max_reconnects,\n rest_options = __rest(_a, [\"autoconnect\", \"reconnect\", \"reconnect_interval\", \"max_reconnects\"]);\n _this = _callSuper(this, CommonClient);\n _this.webSocketFactory = webSocketFactory;\n _this.queue = {};\n _this.rpc_id = 0;\n _this.address = address;\n _this.autoconnect = autoconnect;\n _this.ready = false;\n _this.reconnect = reconnect;\n _this.reconnect_timer_id = undefined;\n _this.reconnect_interval = reconnect_interval;\n _this.max_reconnects = max_reconnects;\n _this.rest_options = rest_options;\n _this.current_reconnects = 0;\n _this.generate_request_id = generate_request_id || function () {\n return ++_this.rpc_id;\n };\n if (!dataPack) _this.dataPack = new _utils.DefaultDataPack();else _this.dataPack = dataPack;\n if (_this.autoconnect) _this._connect(_this.address, Object.assign({\n autoconnect: _this.autoconnect,\n reconnect: _this.reconnect,\n reconnect_interval: _this.reconnect_interval,\n max_reconnects: _this.max_reconnects\n }, _this.rest_options));\n return _this;\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n (0, _inherits2[\"default\"])(CommonClient, _EventEmitter);\n return (0, _createClass2[\"default\"])(CommonClient, [{\n key: \"connect\",\n value: function connect() {\n if (this.socket) return;\n this._connect(this.address, Object.assign({\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects\n }, this.rest_options));\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n }, {\n key: \"call\",\n value: function call(method, params, timeout, ws_opts) {\n var _this2 = this;\n if (!ws_opts && \"object\" === (0, _typeof2[\"default\"])(timeout)) {\n ws_opts = timeout;\n timeout = null;\n }\n return new Promise(function (resolve, reject) {\n if (!_this2.ready) return reject(new Error(\"socket not ready\"));\n var rpc_id = _this2.generate_request_id(method, params);\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params || undefined,\n id: rpc_id\n };\n _this2.socket.send(_this2.dataPack.encode(message), ws_opts, function (error) {\n if (error) return reject(error);\n _this2.queue[rpc_id] = {\n promise: [resolve, reject]\n };\n if (timeout) {\n _this2.queue[rpc_id].timeout = setTimeout(function () {\n delete _this2.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n }, {\n key: \"login\",\n value: (function () {\n var _login = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee(params) {\n var resp;\n return _regenerator[\"default\"].wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.call(\"rpc.login\", params);\n case 2:\n resp = _context.sent;\n if (resp) {\n _context.next = 5;\n break;\n }\n throw new Error(\"authentication failed\");\n case 5:\n return _context.abrupt(\"return\", resp);\n case 6:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function login(_x) {\n return _login.apply(this, arguments);\n }\n return login;\n }()\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n )\n }, {\n key: \"listMethods\",\n value: (function () {\n var _listMethods = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee2() {\n return _regenerator[\"default\"].wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.call(\"__listMethods\");\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, this);\n }));\n function listMethods() {\n return _listMethods.apply(this, arguments);\n }\n return listMethods;\n }()\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n )\n }, {\n key: \"notify\",\n value: function notify(method, params) {\n var _this3 = this;\n return new Promise(function (resolve, reject) {\n if (!_this3.ready) return reject(new Error(\"socket not ready\"));\n var message = {\n jsonrpc: \"2.0\",\n method: method,\n params: params\n };\n _this3.socket.send(_this3.dataPack.encode(message), function (error) {\n if (error) return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n }, {\n key: \"subscribe\",\n value: (function () {\n var _subscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee3(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context3.next = 3;\n return this.call(\"rpc.on\", event);\n case 3:\n result = _context3.sent;\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context3.next = 6;\n break;\n }\n throw new Error(\"Failed subscribing to an event '\" + event + \"' with: \" + result[event]);\n case 6:\n return _context3.abrupt(\"return\", result);\n case 7:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3, this);\n }));\n function subscribe(_x2) {\n return _subscribe.apply(this, arguments);\n }\n return subscribe;\n }()\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n )\n }, {\n key: \"unsubscribe\",\n value: (function () {\n var _unsubscribe = (0, _asyncToGenerator2[\"default\"])( /*#__PURE__*/_regenerator[\"default\"].mark(function _callee4(event) {\n var result;\n return _regenerator[\"default\"].wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n if (typeof event === \"string\") event = [event];\n _context4.next = 3;\n return this.call(\"rpc.off\", event);\n case 3:\n result = _context4.sent;\n if (!(typeof event === \"string\" && result[event] !== \"ok\")) {\n _context4.next = 6;\n break;\n }\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n case 6:\n return _context4.abrupt(\"return\", result);\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4, this);\n }));\n function unsubscribe(_x3) {\n return _unsubscribe.apply(this, arguments);\n }\n return unsubscribe;\n }()\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n )\n }, {\n key: \"close\",\n value: function close(code, data) {\n this.socket.close(code || 1000, data);\n }\n /**\n * Enable / disable automatic reconnection.\n * @method\n * @param {Boolean} reconnect - enable / disable reconnection\n * @return {Undefined}\n */\n }, {\n key: \"setAutoReconnect\",\n value: function setAutoReconnect(reconnect) {\n this.reconnect = reconnect;\n }\n /**\n * Set the interval between reconnection attempts.\n * @method\n * @param {Number} interval - reconnection interval in milliseconds\n * @return {Undefined}\n */\n }, {\n key: \"setReconnectInterval\",\n value: function setReconnectInterval(interval) {\n this.reconnect_interval = interval;\n }\n /**\n * Set the maximum number of reconnection attempts.\n * @method\n * @param {Number} max_reconnects - maximum reconnection attempts\n * @return {Undefined}\n */\n }, {\n key: \"setMaxReconnects\",\n value: function setMaxReconnects(max_reconnects) {\n this.max_reconnects = max_reconnects;\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n }, {\n key: \"_connect\",\n value: function _connect(address, options) {\n var _this4 = this;\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", function () {\n _this4.ready = true;\n _this4.emit(\"open\");\n _this4.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", function (_ref) {\n var message = _ref.data;\n if (message instanceof ArrayBuffer) message = Buffer.from(message).toString();\n try {\n message = _this4.dataPack.decode(message);\n } catch (error) {\n return;\n }\n // check if any listeners are attached and forward event\n if (message.notification && _this4.listeners(message.notification).length) {\n if (!Object.keys(message.params).length) return _this4.emit(message.notification);\n var args = [message.notification];\n if (message.params.constructor === Object) args.push(message.params);else\n // using for-loop instead of unshift/spread because performance is better\n for (var i = 0; i < message.params.length; i++) args.push(message.params[i]);\n // run as microtask so that pending queue messages are resolved first\n // eslint-disable-next-line prefer-spread\n return Promise.resolve().then(function () {\n _this4.emit.apply(_this4, args);\n });\n }\n if (!_this4.queue[message.id]) {\n // general JSON RPC 2.0 events\n if (message.method) {\n // run as microtask so that pending queue messages are resolved first\n return Promise.resolve().then(function () {\n _this4.emit(message.method, message === null || message === void 0 ? void 0 : message.params);\n });\n }\n return;\n }\n // reject early since server's response is invalid\n if (\"error\" in message === \"result\" in message) _this4.queue[message.id].promise[1](new Error(\"Server response malformed. Response must include either \\\"result\\\"\" + \" or \\\"error\\\", but not both.\"));\n if (_this4.queue[message.id].timeout) clearTimeout(_this4.queue[message.id].timeout);\n if (message.error) _this4.queue[message.id].promise[1](message.error);else _this4.queue[message.id].promise[0](message.result);\n delete _this4.queue[message.id];\n });\n this.socket.addEventListener(\"error\", function (error) {\n return _this4.emit(\"error\", error);\n });\n this.socket.addEventListener(\"close\", function (_ref2) {\n var code = _ref2.code,\n reason = _ref2.reason;\n if (_this4.ready)\n // Delay close event until internal state is updated\n setTimeout(function () {\n return _this4.emit(\"close\", code, reason);\n }, 0);\n _this4.ready = false;\n _this4.socket = undefined;\n if (code === 1000) return;\n _this4.current_reconnects++;\n if (_this4.reconnect && (_this4.max_reconnects > _this4.current_reconnects || _this4.max_reconnects === 0)) _this4.reconnect_timer_id = setTimeout(function () {\n return _this4._connect(address, options);\n }, _this4.reconnect_interval);\n });\n }\n }]);\n}(_eventemitter.EventEmitter);","/**\n * WebSocket implements a browser-side WebSocket specification.\n * @module Client\n */\n\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\nvar _eventemitter = require(\"eventemitter3\");\nfunction _callSuper(t, o, e) { return o = (0, _getPrototypeOf2[\"default\"])(o), (0, _possibleConstructorReturn2[\"default\"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2[\"default\"])(t).constructor) : o.apply(t, e)); }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nvar WebSocketBrowserImpl = /*#__PURE__*/function (_EventEmitter) {\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n function WebSocketBrowserImpl(address, options, protocols) {\n var _this;\n (0, _classCallCheck2[\"default\"])(this, WebSocketBrowserImpl);\n _this = _callSuper(this, WebSocketBrowserImpl);\n _this.socket = new window.WebSocket(address, protocols);\n _this.socket.onopen = function () {\n return _this.emit(\"open\");\n };\n _this.socket.onmessage = function (event) {\n return _this.emit(\"message\", event.data);\n };\n _this.socket.onerror = function (error) {\n return _this.emit(\"error\", error);\n };\n _this.socket.onclose = function (event) {\n _this.emit(\"close\", event.code, event.reason);\n };\n return _this;\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n (0, _inherits2[\"default\"])(WebSocketBrowserImpl, _EventEmitter);\n return (0, _createClass2[\"default\"])(WebSocketBrowserImpl, [{\n key: \"send\",\n value: function send(data, optionsOrCallback, callback) {\n var cb = callback || optionsOrCallback;\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n }, {\n key: \"close\",\n value: function close(code, reason) {\n this.socket.close(code, reason);\n }\n }, {\n key: \"addEventListener\",\n value: function addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n }]);\n}(_eventemitter.EventEmitter);\n/**\n * factory method for common WebSocket instance\n * @method\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @return {Undefined}\n */\nfunction _default(address, options) {\n return new WebSocketBrowserImpl(address, options);\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DefaultDataPack = void 0;\nexports.createError = createError;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\nvar errors = new Map([[-32000, \"Event not provided\"], [-32600, \"Invalid Request\"], [-32601, \"Method not found\"], [-32602, \"Invalid params\"], [-32603, \"Internal error\"], [-32604, \"Params not found\"], [-32605, \"Method forbidden\"], [-32606, \"Event forbidden\"], [-32700, \"Parse error\"]]);\nvar DefaultDataPack = exports.DefaultDataPack = /*#__PURE__*/function () {\n function DefaultDataPack() {\n (0, _classCallCheck2[\"default\"])(this, DefaultDataPack);\n }\n return (0, _createClass2[\"default\"])(DefaultDataPack, [{\n key: \"encode\",\n value: function encode(value) {\n return JSON.stringify(value);\n }\n }, {\n key: \"decode\",\n value: function decode(value) {\n return JSON.parse(value);\n }\n }]);\n}();\n/**\n * Creates a JSON-RPC 2.0-compliant error.\n * @param {Number} code - error code\n * @param {String} details - error details\n * @return {Object}\n */\nfunction createError(code, details) {\n var error = {\n code: code,\n message: errors.get(code) || \"Internal Server Error\"\n };\n if (details) error[\"data\"] = details;\n return error;\n}","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexports.TextEncoder = TextEncoder;\nexports.TextDecoder = TextDecoder;","// Written in 2014-2016 by Dmitry Chestnykh and Devi Mandiri.\n// Public domain.\n(function(root, f) {\n 'use strict';\n if (typeof module !== 'undefined' && module.exports) module.exports = f();\n else if (root.nacl) root.nacl.util = f();\n else {\n root.nacl = {};\n root.nacl.util = f();\n }\n}(this, function() {\n 'use strict';\n\n var util = {};\n\n function validateBase64(s) {\n if (!(/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$/.test(s))) {\n throw new TypeError('invalid encoding');\n }\n }\n\n util.decodeUTF8 = function(s) {\n if (typeof s !== 'string') throw new TypeError('expected string');\n var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);\n for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);\n return b;\n };\n\n util.encodeUTF8 = function(arr) {\n var i, s = [];\n for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i]));\n return decodeURIComponent(escape(s.join('')));\n };\n\n if (typeof atob === 'undefined') {\n // Node.js\n\n if (typeof Buffer.from !== 'undefined') {\n // Node v6 and later\n util.encodeBase64 = function (arr) { // v6 and later\n return Buffer.from(arr).toString('base64');\n };\n\n util.decodeBase64 = function (s) {\n validateBase64(s);\n return new Uint8Array(Array.prototype.slice.call(Buffer.from(s, 'base64'), 0));\n };\n\n } else {\n // Node earlier than v6\n util.encodeBase64 = function (arr) { // v6 and later\n return (new Buffer(arr)).toString('base64');\n };\n\n util.decodeBase64 = function(s) {\n validateBase64(s);\n return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0));\n };\n }\n\n } else {\n // Browsers\n\n util.encodeBase64 = function(arr) {\n var i, s = [], len = arr.length;\n for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i]));\n return btoa(s.join(''));\n };\n\n util.decodeBase64 = function(s) {\n validateBase64(s);\n var i, d = atob(s), b = new Uint8Array(d.length);\n for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);\n return b;\n };\n\n }\n\n return util;\n\n}));\n","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(t) {\n return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _getPrototypeOf(t);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(t, e) {\n return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","import{get as r,set as e}from\"react-hook-form\";var t=function(e,t,i){if(e&&\"reportValidity\"in e){var n=r(i,t);e.setCustomValidity(n&&n.message||\"\"),e.reportValidity()}},i=function(r,e){var i=function(i){var n=e.fields[i];n&&n.ref&&\"reportValidity\"in n.ref?t(n.ref,i,r):n.refs&&n.refs.forEach(function(e){return t(e,i,r)})};for(var n in e.fields)i(n)},n=function(t,n){n.shouldUseNativeValidation&&i(t,n);var f={};for(var s in t){var u=r(n.fields,s),c=Object.assign(t[s]||{},{ref:u&&u.ref});if(a(n.names||Object.keys(t),s)){var l=Object.assign({},o(r(f,s)));e(l,\"root\",c),e(f,s,l)}else e(f,s,c)}return f},o=function(r){return Array.isArray(r)?r.filter(Boolean):[]},a=function(r,e){return r.some(function(r){return r.startsWith(e+\".\")})};export{n as toNestErrors,i as validateFieldsNatively};\n//# sourceMappingURL=resolvers.module.js.map\n","import{appendErrors as r}from\"react-hook-form\";import{validateFieldsNatively as e,toNestErrors as o}from\"@hookform/resolvers\";var n=function(e,o){for(var n={};e.length;){var t=e[0],s=t.code,i=t.message,a=t.path.join(\".\");if(!n[a])if(\"unionErrors\"in t){var u=t.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:i,type:s};if(\"unionErrors\"in t&&t.unionErrors.forEach(function(r){return r.errors.forEach(function(r){return e.push(r)})}),o){var c=n[a].types,f=c&&c[t.code];n[a]=r(a,o,n,s,f?[].concat(f,t.message):t.message)}e.shift()}return n},t=function(r,t,s){return void 0===s&&(s={}),function(i,a,u){try{return Promise.resolve(function(o,n){try{var a=Promise.resolve(r[\"sync\"===s.mode?\"parse\":\"parseAsync\"](i,t)).then(function(r){return u.shouldUseNativeValidation&&e({},u),{errors:{},values:s.raw?i:r}})}catch(r){return n(r)}return a&&a.then?a.then(void 0,n):a}(0,function(r){if(function(r){return null!=r.errors}(r))return{values:{},errors:o(n(r.errors,!u.shouldUseNativeValidation&&\"all\"===u.criteriaMode),u)};throw r}))}catch(r){return Promise.reject(r)}}};export{t as zodResolver};\n//# sourceMappingURL=zod.module.js.map\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Switch\n * -----------------------------------------------------------------------------------------------*/\n\nconst SWITCH_NAME = 'Switch';\n\ntype ScopedProps

= P & { __scopeSwitch?: Scope };\nconst [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\n\ntype SwitchContextValue = { checked: boolean; disabled?: boolean };\nconst [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\n\ntype SwitchElement = React.ElementRef;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef;\ninterface SwitchProps extends PrimitiveButtonProps {\n checked?: boolean;\n defaultChecked?: boolean;\n required?: boolean;\n onCheckedChange?(checked: boolean): void;\n}\n\nconst Switch = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = 'on',\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = button ? form || !!button.closest('form') : true;\n const [checked = false, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked,\n onChange: onCheckedChange,\n });\n\n return (\n \n {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n // if switch is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect switch updates.\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })}\n />\n {isFormControl && (\n \n )}\n \n );\n }\n);\n\nSwitch.displayName = SWITCH_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SwitchThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'SwitchThumb';\n\ntype SwitchThumbElement = React.ElementRef;\ntype PrimitiveSpanProps = React.ComponentPropsWithoutRef;\ninterface SwitchThumbProps extends PrimitiveSpanProps {}\n\nconst SwitchThumb = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return (\n \n );\n }\n);\n\nSwitchThumb.displayName = THUMB_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype InputProps = React.ComponentPropsWithoutRef<'input'>;\ninterface BubbleInputProps extends Omit {\n checked: boolean;\n control: HTMLElement | null;\n bubbles: boolean;\n}\n\nconst BubbleInput = (props: BubbleInputProps) => {\n const { control, checked, bubbles = true, ...inputProps } = props;\n const ref = React.useRef(null);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n\n // Bubble checked change to parents (e.g form change event)\n React.useEffect(() => {\n const input = ref.current!;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'checked') as PropertyDescriptor;\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event('click', { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n\n return (\n \n );\n};\n\nfunction getState(checked: boolean) {\n return checked ? 'checked' : 'unchecked';\n}\n\nconst Root = Switch;\nconst Thumb = SwitchThumb;\n\nexport {\n createSwitchScope,\n //\n Switch,\n SwitchThumb,\n //\n Root,\n Thumb,\n};\nexport type { SwitchProps, SwitchThumbProps };\n","import EventEmitter from 'eventemitter3';\nimport { WalletNotConnectedError } from './errors.js';\nexport { EventEmitter };\n/**\n * A wallet's readiness describes a series of states that the wallet can be in,\n * depending on what kind of wallet it is. An installable wallet (eg. a browser\n * extension like Phantom) might be `Installed` if we've found the Phantom API\n * in the global scope, or `NotDetected` otherwise. A loadable, zero-install\n * runtime (eg. Torus Wallet) might simply signal that it's `Loadable`. Use this\n * metadata to personalize the wallet list for each user (eg. to show their\n * installed wallets first).\n */\nexport var WalletReadyState;\n(function (WalletReadyState) {\n /**\n * User-installable wallets can typically be detected by scanning for an API\n * that they've injected into the global context. If such an API is present,\n * we consider the wallet to have been installed.\n */\n WalletReadyState[\"Installed\"] = \"Installed\";\n WalletReadyState[\"NotDetected\"] = \"NotDetected\";\n /**\n * Loadable wallets are always available to you. Since you can load them at\n * any time, it's meaningless to say that they have been detected.\n */\n WalletReadyState[\"Loadable\"] = \"Loadable\";\n /**\n * If a wallet is not supported on a given platform (eg. server-rendering, or\n * mobile) then it will stay in the `Unsupported` state.\n */\n WalletReadyState[\"Unsupported\"] = \"Unsupported\";\n})(WalletReadyState || (WalletReadyState = {}));\nexport class BaseWalletAdapter extends EventEmitter {\n get connected() {\n return !!this.publicKey;\n }\n async autoConnect() {\n await this.connect();\n }\n async prepareTransaction(transaction, connection, options = {}) {\n const publicKey = this.publicKey;\n if (!publicKey)\n throw new WalletNotConnectedError();\n transaction.feePayer = transaction.feePayer || publicKey;\n transaction.recentBlockhash =\n transaction.recentBlockhash ||\n (await connection.getLatestBlockhash({\n commitment: options.preflightCommitment,\n minContextSlot: options.minContextSlot,\n })).blockhash;\n return transaction;\n }\n}\nexport function scopePollingDetectionStrategy(detect) {\n // Early return when server-side rendering\n if (typeof window === 'undefined' || typeof document === 'undefined')\n return;\n const disposers = [];\n function detectAndDispose() {\n const detected = detect();\n if (detected) {\n for (const dispose of disposers) {\n dispose();\n }\n }\n }\n // Strategy #1: Try detecting every second.\n const interval = \n // TODO: #334 Replace with idle callback strategy.\n setInterval(detectAndDispose, 1000);\n disposers.push(() => clearInterval(interval));\n // Strategy #2: Detect as soon as the DOM becomes 'ready'/'interactive'.\n if (\n // Implies that `DOMContentLoaded` has not yet fired.\n document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', detectAndDispose, { once: true });\n disposers.push(() => document.removeEventListener('DOMContentLoaded', detectAndDispose));\n }\n // Strategy #3: Detect after the `window` has fully loaded.\n if (\n // If the `complete` state has been reached, we're too late.\n document.readyState !== 'complete') {\n window.addEventListener('load', detectAndDispose, { once: true });\n disposers.push(() => window.removeEventListener('load', detectAndDispose));\n }\n // Strategy #4: Detect synchronously, now.\n detectAndDispose();\n}\n/**\n * Users on iOS can be redirected into a wallet's in-app browser automatically,\n * if that wallet has a universal link configured to do so\n * But should not be redirected from within a webview, eg. if they're already\n * inside a wallet's browser\n * This function can be used to identify users who are on iOS and can be redirected\n *\n * @returns true if the user can be redirected\n */\nexport function isIosAndRedirectable() {\n // SSR: return false\n if (!navigator)\n return false;\n const userAgent = navigator.userAgent.toLowerCase();\n // if on iOS the user agent will contain either iPhone or iPad\n // caveat: if requesting desktop site then this won't work\n const isIos = userAgent.includes('iphone') || userAgent.includes('ipad');\n // if in a webview then it will not include Safari\n // note that other iOS browsers also include Safari\n // so we will redirect only if Safari is also included\n const isSafari = userAgent.includes('safari');\n return isIos && isSafari;\n}\n//# sourceMappingURL=adapter.js.map","export class WalletError extends Error {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(message, error) {\n super(message);\n this.error = error;\n }\n}\nexport class WalletNotReadyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotReadyError';\n }\n}\nexport class WalletLoadError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletLoadError';\n }\n}\nexport class WalletConfigError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConfigError';\n }\n}\nexport class WalletConnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletConnectionError';\n }\n}\nexport class WalletDisconnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectedError';\n }\n}\nexport class WalletDisconnectionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletDisconnectionError';\n }\n}\nexport class WalletAccountError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletAccountError';\n }\n}\nexport class WalletPublicKeyError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletPublicKeyError';\n }\n}\nexport class WalletKeypairError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletKeypairError';\n }\n}\nexport class WalletNotConnectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotConnectedError';\n }\n}\nexport class WalletSendTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSendTransactionError';\n }\n}\nexport class WalletSignTransactionError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignTransactionError';\n }\n}\nexport class WalletSignMessageError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignMessageError';\n }\n}\nexport class WalletSignInError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletSignInError';\n }\n}\nexport class WalletTimeoutError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletTimeoutError';\n }\n}\nexport class WalletWindowBlockedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowBlockedError';\n }\n}\nexport class WalletWindowClosedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletWindowClosedError';\n }\n}\n//# sourceMappingURL=errors.js.map","import { BaseWalletAdapter, } from './adapter.js';\nimport { WalletSendTransactionError, WalletSignTransactionError } from './errors.js';\nimport { isVersionedTransaction } from './transaction.js';\nexport class BaseSignerWalletAdapter extends BaseWalletAdapter {\n async sendTransaction(transaction, connection, options = {}) {\n let emit = true;\n try {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSendTransactionError(`Sending transaction version ${transaction.version} isn't supported by this wallet`);\n try {\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, options);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n else {\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n transaction = await this.signTransaction(transaction);\n const rawTransaction = transaction.serialize();\n return await connection.sendRawTransaction(rawTransaction, sendOptions);\n }\n catch (error) {\n // If the error was thrown by `signTransaction`, rethrow it and don't emit a duplicate event\n if (error instanceof WalletSignTransactionError) {\n emit = false;\n throw error;\n }\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n }\n catch (error) {\n if (emit) {\n this.emit('error', error);\n }\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n for (const transaction of transactions) {\n if (isVersionedTransaction(transaction)) {\n if (!this.supportedTransactionVersions)\n throw new WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);\n if (!this.supportedTransactionVersions.has(transaction.version))\n throw new WalletSignTransactionError(`Signing transaction version ${transaction.version} isn't supported by this wallet`);\n }\n }\n const signedTransactions = [];\n for (const transaction of transactions) {\n signedTransactions.push(await this.signTransaction(transaction));\n }\n return signedTransactions;\n }\n}\nexport class BaseMessageSignerWalletAdapter extends BaseSignerWalletAdapter {\n}\nexport class BaseSignInMessageSignerWalletAdapter extends BaseMessageSignerWalletAdapter {\n}\n//# sourceMappingURL=signer.js.map","export function isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\n//# sourceMappingURL=transaction.js.map","export var WalletAdapterNetwork;\n(function (WalletAdapterNetwork) {\n WalletAdapterNetwork[\"Mainnet\"] = \"mainnet-beta\";\n WalletAdapterNetwork[\"Testnet\"] = \"testnet\";\n WalletAdapterNetwork[\"Devnet\"] = \"devnet\";\n})(WalletAdapterNetwork || (WalletAdapterNetwork = {}));\n//# sourceMappingURL=types.js.map","import { StatusCodes, TransportStatusError } from '@ledgerhq/hw-transport';\nimport { isVersionedTransaction } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport './polyfills/index.js';\nexport function getDerivationPath(account, change) {\n const length = account !== undefined ? (change === undefined ? 3 : 4) : 2;\n const derivationPath = Buffer.alloc(1 + length * 4);\n let offset = derivationPath.writeUInt8(length, 0);\n offset = derivationPath.writeUInt32BE(harden(44), offset); // Using BIP44\n offset = derivationPath.writeUInt32BE(harden(501), offset); // Solana's BIP44 path\n if (account !== undefined) {\n offset = derivationPath.writeUInt32BE(harden(account), offset);\n if (change !== undefined) {\n derivationPath.writeUInt32BE(harden(change), offset);\n }\n }\n return derivationPath;\n}\nconst BIP32_HARDENED_BIT = (1 << 31) >>> 0;\nfunction harden(n) {\n return (n | BIP32_HARDENED_BIT) >>> 0;\n}\nconst INS_GET_PUBKEY = 0x05;\nconst INS_SIGN_MESSAGE = 0x06;\nconst P1_NON_CONFIRM = 0x00;\nconst P1_CONFIRM = 0x01;\nconst P2_EXTEND = 0x01;\nconst P2_MORE = 0x02;\nconst MAX_PAYLOAD = 255;\nconst LEDGER_CLA = 0xe0;\n/** @internal */\nexport async function getPublicKey(transport, derivationPath) {\n const bytes = await send(transport, INS_GET_PUBKEY, P1_NON_CONFIRM, derivationPath);\n return new PublicKey(bytes);\n}\n/** @internal */\nexport async function signTransaction(transport, transaction, derivationPath) {\n const paths = Buffer.alloc(1);\n paths.writeUInt8(1, 0);\n const message = isVersionedTransaction(transaction)\n ? transaction.message.serialize()\n : transaction.serializeMessage();\n const data = Buffer.concat([paths, derivationPath, message]);\n return await send(transport, INS_SIGN_MESSAGE, P1_CONFIRM, data);\n}\nasync function send(transport, instruction, p1, data) {\n let p2 = 0;\n let offset = 0;\n if (data.length > MAX_PAYLOAD) {\n while (data.length - offset > MAX_PAYLOAD) {\n const buffer = data.slice(offset, offset + MAX_PAYLOAD);\n const response = await transport.send(LEDGER_CLA, instruction, p1, p2 | P2_MORE, buffer);\n // @ts-ignore -- TransportStatusError is a constructor Function, not a Class\n if (response.length !== 2)\n throw new TransportStatusError(StatusCodes.INCORRECT_DATA);\n p2 |= P2_EXTEND;\n offset += MAX_PAYLOAD;\n }\n }\n const buffer = data.slice(offset);\n const response = await transport.send(LEDGER_CLA, instruction, p1, p2, buffer);\n return response.slice(0, response.length - 2);\n}\n//# sourceMappingURL=util.js.map","import { BaseSignerWalletAdapter, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletLoadError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport './polyfills/index.js';\nimport { getDerivationPath, getPublicKey, signTransaction } from './util.js';\nexport const LedgerWalletName = 'Ledger';\nexport class LedgerWalletAdapter extends BaseSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = LedgerWalletName;\n this.url = 'https://ledger.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzUgMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0ibTIzLjU4OCAwaC0xNnYyMS41ODNoMjEuNnYtMTZhNS41ODUgNS41ODUgMCAwIDAgLTUuNi01LjU4M3oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5KSIvPjxwYXRoIGQ9Im04LjM0MiAwaC0yLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCAtNS41ODUgNS41ODV2Mi43NTdoOC4zNDJ6Ii8+PHBhdGggZD0ibTAgNy41OWg4LjM0MnY4LjM0MmgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUuNzM5KSIvPjxwYXRoIGQ9Im0xNS4xOCAyMy40NTFoMi43NTdhNS41ODUgNS41ODUgMCAwIDAgNS41ODUtNS42di0yLjY3MWgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMS40NzggMTEuNDc4KSIvPjxwYXRoIGQ9Im03LjU5IDE1LjE4aDguMzQydjguMzQyaC04LjM0MnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5IDExLjQ3OCkiLz48cGF0aCBkPSJtMCAxNS4xOHYyLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCA1LjU4NSA1LjU4NWgyLjc1N3YtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDExLjQ3OCkiLz48L2c+PC9zdmc+';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' ||\n typeof document === 'undefined' ||\n typeof navigator === 'undefined' ||\n !navigator.hid\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._disconnected = () => {\n const transport = this._transport;\n if (transport) {\n transport.off('disconnect', this._disconnected);\n this._transport = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._derivationPath = config.derivationPath || getDerivationPath(0, 0);\n this._connecting = false;\n this._transport = null;\n this._publicKey = null;\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable)\n throw new WalletNotReadyError();\n this._connecting = true;\n let TransportWebHIDClass;\n try {\n TransportWebHIDClass = (await import('@ledgerhq/hw-transport-webhid')).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let transport;\n try {\n transport = await TransportWebHIDClass.create();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n let publicKey;\n try {\n publicKey = await getPublicKey(transport, this._derivationPath);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n transport.on('disconnect', this._disconnected);\n this._transport = transport;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const transport = this._transport;\n if (transport) {\n transport.off('disconnect', this._disconnected);\n this._transport = null;\n this._publicKey = null;\n try {\n await transport.close();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async signTransaction(transaction) {\n try {\n const transport = this._transport;\n const publicKey = this._publicKey;\n if (!transport || !publicKey)\n throw new WalletNotConnectedError();\n try {\n const signature = await signTransaction(transport, transaction, this._derivationPath);\n transaction.addSignature(publicKey, signature);\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n return transaction;\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseMessageSignerWalletAdapter, isIosAndRedirectable, isVersionedTransaction, scopePollingDetectionStrategy, WalletAccountError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const PhantomWalletName = 'Phantom';\nexport class PhantomWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = PhantomWalletName;\n this.url = 'https://phantom.app';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgZmlsbD0ibm9uZSI+CjxyZWN0IHdpZHRoPSIxMDgiIGhlaWdodD0iMTA4IiByeD0iMjYiIGZpbGw9IiNBQjlGRjIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00Ni41MjY3IDY5LjkyMjlDNDIuMDA1NCA3Ni44NTA5IDM0LjQyOTIgODUuNjE4MiAyNC4zNDggODUuNjE4MkMxOS41ODI0IDg1LjYxODIgMTUgODMuNjU2MyAxNSA3NS4xMzQyQzE1IDUzLjQzMDUgNDQuNjMyNiAxOS44MzI3IDcyLjEyNjggMTkuODMyN0M4Ny43NjggMTkuODMyNyA5NCAzMC42ODQ2IDk0IDQzLjAwNzlDOTQgNTguODI1OCA4My43MzU1IDc2LjkxMjIgNzMuNTMyMSA3Ni45MTIyQzcwLjI5MzkgNzYuOTEyMiA2OC43MDUzIDc1LjEzNDIgNjguNzA1MyA3Mi4zMTRDNjguNzA1MyA3MS41NzgzIDY4LjgyNzUgNzAuNzgxMiA2OS4wNzE5IDY5LjkyMjlDNjUuNTg5MyA3NS44Njk5IDU4Ljg2ODUgODEuMzg3OCA1Mi41NzU0IDgxLjM4NzhDNDcuOTkzIDgxLjM4NzggNDUuNjcxMyA3OC41MDYzIDQ1LjY3MTMgNzQuNDU5OEM0NS42NzEzIDcyLjk4ODQgNDUuOTc2OCA3MS40NTU2IDQ2LjUyNjcgNjkuOTIyOVpNODMuNjc2MSA0Mi41Nzk0QzgzLjY3NjEgNDYuMTcwNCA4MS41NTc1IDQ3Ljk2NTggNzkuMTg3NSA0Ny45NjU4Qzc2Ljc4MTYgNDcuOTY1OCA3NC42OTg5IDQ2LjE3MDQgNzQuNjk4OSA0Mi41Nzk0Qzc0LjY5ODkgMzguOTg4NSA3Ni43ODE2IDM3LjE5MzEgNzkuMTg3NSAzNy4xOTMxQzgxLjU1NzUgMzcuMTkzMSA4My42NzYxIDM4Ljk4ODUgODMuNjc2MSA0Mi41Nzk0Wk03MC4yMTAzIDQyLjU3OTVDNzAuMjEwMyA0Ni4xNzA0IDY4LjA5MTYgNDcuOTY1OCA2NS43MjE2IDQ3Ljk2NThDNjMuMzE1NyA0Ny45NjU4IDYxLjIzMyA0Ni4xNzA0IDYxLjIzMyA0Mi41Nzk1QzYxLjIzMyAzOC45ODg1IDYzLjMxNTcgMzcuMTkzMSA2NS43MjE2IDM3LjE5MzFDNjguMDkxNiAzNy4xOTMxIDcwLjIxMDMgMzguOTg4NSA3MC4yMTAzIDQyLjU3OTVaIiBmaWxsPSIjRkZGREY4Ii8+Cjwvc3ZnPg==';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.NotDetected;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n if (this._readyState !== WalletReadyState.Unsupported) {\n if (isIosAndRedirectable()) {\n // when in iOS (not webview), set Phantom as loadable instead of checking for install\n this._readyState = WalletReadyState.Loadable;\n this.emit('readyStateChange', this._readyState);\n }\n else {\n scopePollingDetectionStrategy(() => {\n if (window.phantom?.solana?.isPhantom || window.solana?.isPhantom) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n }\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state\n // We can't redirect to a universal link without user input\n if (this.readyState === WalletReadyState.Installed) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this.readyState === WalletReadyState.Loadable) {\n // redirect to the Phantom /browse universal link\n // this will open the current URL in the Phantom in-wallet browser\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://phantom.app/ul/browse/${url}?ref=${ref}`;\n return;\n }\n if (this.readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n this._connecting = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const wallet = window.phantom?.solana || window.solana;\n if (!wallet.isConnected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletAccountError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signature } = await wallet.signMessage(message);\n return signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import React from 'react';\nexport const Button = (props) => {\n return (React.createElement(\"button\", { className: `wallet-adapter-button ${props.className || ''}`, disabled: props.disabled, style: props.style, onClick: props.onClick, tabIndex: props.tabIndex || 0, type: \"button\" },\n props.startIcon && React.createElement(\"i\", { className: \"wallet-adapter-button-start-icon\" }, props.startIcon),\n props.children,\n props.endIcon && React.createElement(\"i\", { className: \"wallet-adapter-button-end-icon\" }, props.endIcon)));\n};\n//# sourceMappingURL=Button.js.map","import React from 'react';\nexport const WalletIcon = ({ wallet, ...props }) => {\n return wallet && React.createElement(\"img\", { src: wallet.adapter.icon, alt: `${wallet.adapter.name} icon`, ...props });\n};\n//# sourceMappingURL=WalletIcon.js.map","import React, { useLayoutEffect, useRef } from 'react';\nexport const Collapse = ({ id, children, expanded = false }) => {\n const ref = useRef(null);\n const instant = useRef(true);\n const transition = 'height 250ms ease-out';\n const openCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.scrollHeight + 'px';\n });\n };\n const closeCollapse = () => {\n const node = ref.current;\n if (!node)\n return;\n requestAnimationFrame(() => {\n node.style.height = node.offsetHeight + 'px';\n node.style.overflow = 'hidden';\n requestAnimationFrame(() => {\n node.style.height = '0';\n });\n });\n };\n useLayoutEffect(() => {\n if (expanded) {\n openCollapse();\n }\n else {\n closeCollapse();\n }\n }, [expanded]);\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node)\n return;\n function handleComplete() {\n if (!node)\n return;\n node.style.overflow = expanded ? 'initial' : 'hidden';\n if (expanded) {\n node.style.height = 'auto';\n }\n }\n function handleTransitionEnd(event) {\n if (node && event.target === node && event.propertyName === 'height') {\n handleComplete();\n }\n }\n if (instant.current) {\n handleComplete();\n instant.current = false;\n }\n node.addEventListener('transitionend', handleTransitionEnd);\n return () => node.removeEventListener('transitionend', handleTransitionEnd);\n }, [expanded]);\n return (React.createElement(\"div\", { className: \"wallet-adapter-collapse\", id: id, ref: ref, role: \"region\", style: { height: 0, transition: instant.current ? undefined : transition } }, children));\n};\n//# sourceMappingURL=Collapse.js.map","import { WalletReadyState } from '@solana/wallet-adapter-base';\nimport React from 'react';\nimport { Button } from './Button.js';\nimport { WalletIcon } from './WalletIcon.js';\nexport const WalletListItem = ({ handleClick, tabIndex, wallet }) => {\n return (React.createElement(\"li\", null,\n React.createElement(Button, { onClick: handleClick, startIcon: React.createElement(WalletIcon, { wallet: wallet }), tabIndex: tabIndex },\n wallet.adapter.name,\n wallet.readyState === WalletReadyState.Installed && React.createElement(\"span\", null, \"Detected\"))));\n};\n//# sourceMappingURL=WalletListItem.js.map","import React from 'react';\nexport const WalletSVG = () => {\n return (React.createElement(\"svg\", { width: \"97\", height: \"96\", viewBox: \"0 0 97 96\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n React.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"48\", fill: \"url(#paint0_linear_880_5115)\", fillOpacity: \"0.1\" }),\n React.createElement(\"circle\", { cx: \"48.5\", cy: \"48\", r: \"47\", stroke: \"url(#paint1_linear_880_5115)\", strokeOpacity: \"0.4\", strokeWidth: \"2\" }),\n React.createElement(\"g\", { clipPath: \"url(#clip0_880_5115)\" },\n React.createElement(\"path\", { d: \"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z\", fill: \"url(#paint2_linear_880_5115)\" }),\n React.createElement(\"path\", { d: \"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z\", fill: \"url(#paint3_linear_880_5115)\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"linearGradient\", { id: \"paint0_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint1_linear_880_5115\", x1: \"3.41664\", y1: \"98.0933\", x2: \"103.05\", y2: \"8.42498\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint2_linear_880_5115\", x1: \"25.9583\", y1: \"68.7101\", x2: \"67.2337\", y2: \"23.7879\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"linearGradient\", { id: \"paint3_linear_880_5115\", x1: \"58.3326\", y1: \"49.4467\", x2: \"61.0002\", y2: \"45.4453\", gradientUnits: \"userSpaceOnUse\" },\n React.createElement(\"stop\", { stopColor: \"#9945FF\" }),\n React.createElement(\"stop\", { offset: \"0.14\", stopColor: \"#8A53F4\" }),\n React.createElement(\"stop\", { offset: \"0.42\", stopColor: \"#6377D6\" }),\n React.createElement(\"stop\", { offset: \"0.79\", stopColor: \"#24B0A7\" }),\n React.createElement(\"stop\", { offset: \"0.99\", stopColor: \"#00D18C\" }),\n React.createElement(\"stop\", { offset: \"1\", stopColor: \"#00D18C\" })),\n React.createElement(\"clipPath\", { id: \"clip0_880_5115\" },\n React.createElement(\"rect\", { width: \"48\", height: \"48\", fill: \"white\", transform: \"translate(24.5 24)\" })))));\n};\n//# sourceMappingURL=WalletSVG.js.map","import { WalletReadyState } from '@solana/wallet-adapter-base';\nimport { useWallet } from '@solana/wallet-adapter-react';\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Collapse } from './Collapse.js';\nimport { WalletListItem } from './WalletListItem.js';\nimport { WalletSVG } from './WalletSVG.js';\nimport { useWalletModal } from './useWalletModal.js';\nexport const WalletModal = ({ className = '', container = 'body' }) => {\n const ref = useRef(null);\n const { wallets, select } = useWallet();\n const { setVisible } = useWalletModal();\n const [expanded, setExpanded] = useState(false);\n const [fadeIn, setFadeIn] = useState(false);\n const [portal, setPortal] = useState(null);\n const [listedWallets, collapsedWallets] = useMemo(() => {\n const installed = [];\n const notInstalled = [];\n for (const wallet of wallets) {\n if (wallet.readyState === WalletReadyState.Installed) {\n installed.push(wallet);\n }\n else {\n notInstalled.push(wallet);\n }\n }\n return installed.length ? [installed, notInstalled] : [notInstalled, []];\n }, [wallets]);\n const hideModal = useCallback(() => {\n setFadeIn(false);\n setTimeout(() => setVisible(false), 150);\n }, [setVisible]);\n const handleClose = useCallback((event) => {\n event.preventDefault();\n hideModal();\n }, [hideModal]);\n const handleWalletClick = useCallback((event, walletName) => {\n select(walletName);\n handleClose(event);\n }, [select, handleClose]);\n const handleCollapseClick = useCallback(() => setExpanded(!expanded), [expanded]);\n const handleTabKey = useCallback((event) => {\n const node = ref.current;\n if (!node)\n return;\n // here we query all focusable elements\n const focusableElements = node.querySelectorAll('button');\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const firstElement = focusableElements[0];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const lastElement = focusableElements[focusableElements.length - 1];\n if (event.shiftKey) {\n // if going backward by pressing tab and firstElement is active, shift focus to last focusable element\n if (document.activeElement === firstElement) {\n lastElement.focus();\n event.preventDefault();\n }\n }\n else {\n // if going forward by pressing tab and lastElement is active, shift focus to first focusable element\n if (document.activeElement === lastElement) {\n firstElement.focus();\n event.preventDefault();\n }\n }\n }, [ref]);\n useLayoutEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === 'Escape') {\n hideModal();\n }\n else if (event.key === 'Tab') {\n handleTabKey(event);\n }\n };\n // Get original overflow\n const { overflow } = window.getComputedStyle(document.body);\n // Hack to enable fade in animation after mount\n setTimeout(() => setFadeIn(true), 0);\n // Prevent scrolling on mount\n document.body.style.overflow = 'hidden';\n // Listen for keydown events\n window.addEventListener('keydown', handleKeyDown, false);\n return () => {\n // Re-enable scrolling when component unmounts\n document.body.style.overflow = overflow;\n window.removeEventListener('keydown', handleKeyDown, false);\n };\n }, [hideModal, handleTabKey]);\n useLayoutEffect(() => setPortal(document.querySelector(container)), [container]);\n return (portal &&\n createPortal(React.createElement(\"div\", { \"aria-labelledby\": \"wallet-adapter-modal-title\", \"aria-modal\": \"true\", className: `wallet-adapter-modal ${fadeIn && 'wallet-adapter-modal-fade-in'} ${className}`, ref: ref, role: \"dialog\" },\n React.createElement(\"div\", { className: \"wallet-adapter-modal-container\" },\n React.createElement(\"div\", { className: \"wallet-adapter-modal-wrapper\" },\n React.createElement(\"button\", { onClick: handleClose, className: \"wallet-adapter-modal-button-close\" },\n React.createElement(\"svg\", { width: \"14\", height: \"14\" },\n React.createElement(\"path\", { d: \"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z\" }))),\n listedWallets.length ? (React.createElement(React.Fragment, null,\n React.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"Connect a wallet on Solana to continue\"),\n React.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" },\n listedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), wallet: wallet }))),\n collapsedWallets.length ? (React.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" }, collapsedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))) : null),\n collapsedWallets.length ? (React.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n React.createElement(\"span\", null,\n expanded ? 'Less ' : 'More ',\n \"options\"),\n React.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n React.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" })))) : null)) : (React.createElement(React.Fragment, null,\n React.createElement(\"h1\", { className: \"wallet-adapter-modal-title\" }, \"You'll need a wallet on Solana to continue\"),\n React.createElement(\"div\", { className: \"wallet-adapter-modal-middle\" },\n React.createElement(WalletSVG, null)),\n collapsedWallets.length ? (React.createElement(React.Fragment, null,\n React.createElement(\"button\", { className: \"wallet-adapter-modal-list-more\", onClick: handleCollapseClick, tabIndex: 0 },\n React.createElement(\"span\", null,\n expanded ? 'Hide ' : 'Already have a wallet? View ',\n \"options\"),\n React.createElement(\"svg\", { width: \"13\", height: \"7\", viewBox: \"0 0 13 7\", xmlns: \"http://www.w3.org/2000/svg\", className: `${expanded ? 'wallet-adapter-modal-list-more-icon-rotate' : ''}` },\n React.createElement(\"path\", { d: \"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z\" }))),\n React.createElement(Collapse, { expanded: expanded, id: \"wallet-adapter-modal-collapse\" },\n React.createElement(\"ul\", { className: \"wallet-adapter-modal-list\" }, collapsedWallets.map((wallet) => (React.createElement(WalletListItem, { key: wallet.adapter.name, handleClick: (event) => handleWalletClick(event, wallet.adapter.name), tabIndex: expanded ? 0 : -1, wallet: wallet }))))))) : null)))),\n React.createElement(\"div\", { className: \"wallet-adapter-modal-overlay\", onMouseDown: handleClose })), portal));\n};\n//# sourceMappingURL=WalletModal.js.map","import React, { useState } from 'react';\nimport { WalletModalContext } from './useWalletModal.js';\nimport { WalletModal } from './WalletModal.js';\nexport const WalletModalProvider = ({ children, ...props }) => {\n const [visible, setVisible] = useState(false);\n return (React.createElement(WalletModalContext.Provider, { value: {\n visible,\n setVisible,\n } },\n children,\n visible && React.createElement(WalletModal, { ...props })));\n};\n//# sourceMappingURL=WalletModalProvider.js.map","import { useWallet } from '@solana/wallet-adapter-react';\nimport { useCallback } from 'react';\nexport function useWalletMultiButton({ onSelectWallet }) {\n const { connect, connected, connecting, disconnect, disconnecting, publicKey, select, wallet, wallets } = useWallet();\n let buttonState;\n if (connecting) {\n buttonState = 'connecting';\n }\n else if (connected) {\n buttonState = 'connected';\n }\n else if (disconnecting) {\n buttonState = 'disconnecting';\n }\n else if (wallet) {\n buttonState = 'has-wallet';\n }\n else {\n buttonState = 'no-wallet';\n }\n const handleConnect = useCallback(() => {\n connect().catch(() => {\n // Silently catch because any errors are caught by the context `onError` handler\n });\n }, [connect]);\n const handleDisconnect = useCallback(() => {\n disconnect().catch(() => {\n // Silently catch because any errors are caught by the context `onError` handler\n });\n }, [disconnect]);\n const handleSelectWallet = useCallback(() => {\n onSelectWallet({ onSelectWallet: select, wallets });\n }, [onSelectWallet, select, wallets]);\n return {\n buttonState,\n onConnect: buttonState === 'has-wallet' ? handleConnect : undefined,\n onDisconnect: buttonState !== 'disconnecting' && buttonState !== 'no-wallet' ? handleDisconnect : undefined,\n onSelectWallet: handleSelectWallet,\n publicKey: publicKey ?? undefined,\n walletIcon: wallet?.adapter.icon,\n walletName: wallet?.adapter.name,\n };\n}\n//# sourceMappingURL=useWalletMultiButton.js.map","import React from 'react';\nimport { Button } from './Button.js';\nimport { WalletIcon } from './WalletIcon.js';\nexport function BaseWalletConnectionButton({ walletIcon, walletName, ...props }) {\n return (React.createElement(Button, { ...props, className: \"wallet-adapter-button-trigger\", startIcon: walletIcon && walletName ? (React.createElement(WalletIcon, { wallet: { adapter: { icon: walletIcon, name: walletName } } })) : undefined }));\n}\n//# sourceMappingURL=BaseWalletConnectionButton.js.map","import { useWalletMultiButton } from '@solana/wallet-adapter-base-ui';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { BaseWalletConnectionButton } from './BaseWalletConnectionButton.js';\nimport { useWalletModal } from './useWalletModal.js';\nexport function BaseWalletMultiButton({ children, labels, ...props }) {\n const { setVisible: setModalVisible } = useWalletModal();\n const { buttonState, onConnect, onDisconnect, publicKey, walletIcon, walletName } = useWalletMultiButton({\n onSelectWallet() {\n setModalVisible(true);\n },\n });\n const [copied, setCopied] = useState(false);\n const [menuOpen, setMenuOpen] = useState(false);\n const ref = useRef(null);\n useEffect(() => {\n const listener = (event) => {\n const node = ref.current;\n // Do nothing if clicking dropdown or its descendants\n if (!node || node.contains(event.target))\n return;\n setMenuOpen(false);\n };\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, []);\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n else if (publicKey) {\n const base58 = publicKey.toBase58();\n return base58.slice(0, 4) + '..' + base58.slice(-4);\n }\n else if (buttonState === 'connecting' || buttonState === 'has-wallet') {\n return labels[buttonState];\n }\n else {\n return labels['no-wallet'];\n }\n }, [buttonState, children, labels, publicKey]);\n return (React.createElement(\"div\", { className: \"wallet-adapter-dropdown\" },\n React.createElement(BaseWalletConnectionButton, { ...props, \"aria-expanded\": menuOpen, style: { pointerEvents: menuOpen ? 'none' : 'auto', ...props.style }, onClick: () => {\n switch (buttonState) {\n case 'no-wallet':\n setModalVisible(true);\n break;\n case 'has-wallet':\n if (onConnect) {\n onConnect();\n }\n break;\n case 'connected':\n setMenuOpen(true);\n break;\n }\n }, walletIcon: walletIcon, walletName: walletName }, content),\n React.createElement(\"ul\", { \"aria-label\": \"dropdown-list\", className: `wallet-adapter-dropdown-list ${menuOpen && 'wallet-adapter-dropdown-list-active'}`, ref: ref, role: \"menu\" },\n publicKey ? (React.createElement(\"li\", { className: \"wallet-adapter-dropdown-list-item\", onClick: async () => {\n await navigator.clipboard.writeText(publicKey.toBase58());\n setCopied(true);\n setTimeout(() => setCopied(false), 400);\n }, role: \"menuitem\" }, copied ? labels['copied'] : labels['copy-address'])) : null,\n React.createElement(\"li\", { className: \"wallet-adapter-dropdown-list-item\", onClick: () => {\n setModalVisible(true);\n setMenuOpen(false);\n }, role: \"menuitem\" }, labels['change-wallet']),\n onDisconnect ? (React.createElement(\"li\", { className: \"wallet-adapter-dropdown-list-item\", onClick: () => {\n onDisconnect();\n setMenuOpen(false);\n }, role: \"menuitem\" }, labels['disconnect'])) : null)));\n}\n//# sourceMappingURL=BaseWalletMultiButton.js.map","import React from 'react';\nimport { BaseWalletMultiButton } from './BaseWalletMultiButton.js';\nconst LABELS = {\n 'change-wallet': 'Change wallet',\n connecting: 'Connecting ...',\n 'copy-address': 'Copy address',\n copied: 'Copied',\n disconnect: 'Disconnect',\n 'has-wallet': 'Connect',\n 'no-wallet': 'Select Wallet',\n};\nexport function WalletMultiButton(props) {\n return React.createElement(BaseWalletMultiButton, { ...props, labels: LABELS });\n}\n//# sourceMappingURL=WalletMultiButton.js.map","import { createContext, useContext } from 'react';\nconst DEFAULT_CONTEXT = {\n setVisible(_open) {\n console.error(constructMissingProviderErrorMessage('call', 'setVisible'));\n },\n visible: false,\n};\nObject.defineProperty(DEFAULT_CONTEXT, 'visible', {\n get() {\n console.error(constructMissingProviderErrorMessage('read', 'visible'));\n return false;\n },\n});\nfunction constructMissingProviderErrorMessage(action, valueName) {\n return ('You have tried to ' +\n ` ${action} \"${valueName}\"` +\n ' on a WalletModalContext without providing one.' +\n ' Make sure to render a WalletModalProvider' +\n ' as an ancestor of the component that uses ' +\n 'WalletModalContext');\n}\nexport const WalletModalContext = createContext(DEFAULT_CONTEXT);\nexport function useWalletModal() {\n return useContext(WalletModalContext);\n}\n//# sourceMappingURL=useWalletModal.js.map","import { Connection } from '@solana/web3.js';\nimport React, { useMemo } from 'react';\nimport { ConnectionContext } from './useConnection.js';\nexport const ConnectionProvider = ({ children, endpoint, config = { commitment: 'confirmed' }, }) => {\n const connection = useMemo(() => new Connection(endpoint, config), [endpoint, config]);\n return React.createElement(ConnectionContext.Provider, { value: { connection } }, children);\n};\n//# sourceMappingURL=ConnectionProvider.js.map","import { verifyMessageSignature } from './signMessage.js';\nimport { arraysEqual } from './util.js';\n/**\n * TODO: docs\n */\nexport function verifySignIn(input, output) {\n const { signedMessage, signature, account: { publicKey }, } = output;\n const message = deriveSignInMessage(input, output);\n return !!message && verifyMessageSignature({ message, signedMessage, signature, publicKey });\n}\n/**\n * TODO: docs\n */\nexport function deriveSignInMessage(input, output) {\n const text = deriveSignInMessageText(input, output);\n if (!text)\n return null;\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nexport function deriveSignInMessageText(input, output) {\n const parsed = parseSignInMessage(output.signedMessage);\n if (!parsed)\n return null;\n if (input.domain && input.domain !== parsed.domain)\n return null;\n if (input.address && input.address !== parsed.address)\n return null;\n if (input.statement !== parsed.statement)\n return null;\n if (input.uri !== parsed.uri)\n return null;\n if (input.version !== parsed.version)\n return null;\n if (input.chainId !== parsed.chainId)\n return null;\n if (input.nonce !== parsed.nonce)\n return null;\n if (input.issuedAt !== parsed.issuedAt)\n return null;\n if (input.expirationTime !== parsed.expirationTime)\n return null;\n if (input.notBefore !== parsed.notBefore)\n return null;\n if (input.requestId !== parsed.requestId)\n return null;\n if (input.resources) {\n if (!parsed.resources)\n return null;\n if (!arraysEqual(input.resources, parsed.resources))\n return null;\n }\n else if (parsed.resources)\n return null;\n return createSignInMessageText(parsed);\n}\n/**\n * TODO: docs\n */\nexport function parseSignInMessage(message) {\n const text = new TextDecoder().decode(message);\n return parseSignInMessageText(text);\n}\n// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md\nconst DOMAIN = '(?[^\\\\n]+?) wants you to sign in with your Solana account:\\\\n';\nconst ADDRESS = '(?

[^\\\\n]+)(?:\\\\n|$)';\nconst STATEMENT = '(?:\\\\n(?[\\\\S\\\\s]*?)(?:\\\\n|$))??';\nconst URI = '(?:\\\\nURI: (?[^\\\\n]+))?';\nconst VERSION = '(?:\\\\nVersion: (?[^\\\\n]+))?';\nconst CHAIN_ID = '(?:\\\\nChain ID: (?[^\\\\n]+))?';\nconst NONCE = '(?:\\\\nNonce: (?[^\\\\n]+))?';\nconst ISSUED_AT = '(?:\\\\nIssued At: (?[^\\\\n]+))?';\nconst EXPIRATION_TIME = '(?:\\\\nExpiration Time: (?[^\\\\n]+))?';\nconst NOT_BEFORE = '(?:\\\\nNot Before: (?[^\\\\n]+))?';\nconst REQUEST_ID = '(?:\\\\nRequest ID: (?[^\\\\n]+))?';\nconst RESOURCES = '(?:\\\\nResources:(?(?:\\\\n- [^\\\\n]+)*))?';\nconst FIELDS = `${URI}${VERSION}${CHAIN_ID}${NONCE}${ISSUED_AT}${EXPIRATION_TIME}${NOT_BEFORE}${REQUEST_ID}${RESOURCES}`;\nconst MESSAGE = new RegExp(`^${DOMAIN}${ADDRESS}${STATEMENT}${FIELDS}\\\\n*$`);\n/**\n * TODO: docs\n */\nexport function parseSignInMessageText(text) {\n const match = MESSAGE.exec(text);\n if (!match)\n return null;\n const groups = match.groups;\n if (!groups)\n return null;\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n domain: groups.domain,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n address: groups.address,\n statement: groups.statement,\n uri: groups.uri,\n version: groups.version,\n nonce: groups.nonce,\n chainId: groups.chainId,\n issuedAt: groups.issuedAt,\n expirationTime: groups.expirationTime,\n notBefore: groups.notBefore,\n requestId: groups.requestId,\n resources: groups.resources?.split('\\n- ').slice(1),\n };\n}\n/**\n * TODO: docs\n */\nexport function createSignInMessage(input) {\n const text = createSignInMessageText(input);\n return new TextEncoder().encode(text);\n}\n/**\n * TODO: docs\n */\nexport function createSignInMessageText(input) {\n // ${domain} wants you to sign in with your Solana account:\n // ${address}\n //\n // ${statement}\n //\n // URI: ${uri}\n // Version: ${version}\n // Chain ID: ${chain}\n // Nonce: ${nonce}\n // Issued At: ${issued-at}\n // Expiration Time: ${expiration-time}\n // Not Before: ${not-before}\n // Request ID: ${request-id}\n // Resources:\n // - ${resources[0]}\n // - ${resources[1]}\n // ...\n // - ${resources[n]}\n let message = `${input.domain} wants you to sign in with your Solana account:\\n`;\n message += `${input.address}`;\n if (input.statement) {\n message += `\\n\\n${input.statement}`;\n }\n const fields = [];\n if (input.uri) {\n fields.push(`URI: ${input.uri}`);\n }\n if (input.version) {\n fields.push(`Version: ${input.version}`);\n }\n if (input.chainId) {\n fields.push(`Chain ID: ${input.chainId}`);\n }\n if (input.nonce) {\n fields.push(`Nonce: ${input.nonce}`);\n }\n if (input.issuedAt) {\n fields.push(`Issued At: ${input.issuedAt}`);\n }\n if (input.expirationTime) {\n fields.push(`Expiration Time: ${input.expirationTime}`);\n }\n if (input.notBefore) {\n fields.push(`Not Before: ${input.notBefore}`);\n }\n if (input.requestId) {\n fields.push(`Request ID: ${input.requestId}`);\n }\n if (input.resources) {\n fields.push(`Resources:`);\n for (const resource of input.resources) {\n fields.push(`- ${resource}`);\n }\n }\n if (fields.length) {\n message += `\\n\\n${fields.join('\\n')}`;\n }\n return message;\n}\n//# sourceMappingURL=signIn.js.map","import { createSignInMessageText } from '@solana/wallet-standard-util';\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterErrorCode = {\n ERROR_ASSOCIATION_PORT_OUT_OF_RANGE: 'ERROR_ASSOCIATION_PORT_OUT_OF_RANGE',\n ERROR_FORBIDDEN_WALLET_BASE_URL: 'ERROR_FORBIDDEN_WALLET_BASE_URL',\n ERROR_SECURE_CONTEXT_REQUIRED: 'ERROR_SECURE_CONTEXT_REQUIRED',\n ERROR_SESSION_CLOSED: 'ERROR_SESSION_CLOSED',\n ERROR_SESSION_TIMEOUT: 'ERROR_SESSION_TIMEOUT',\n ERROR_WALLET_NOT_FOUND: 'ERROR_WALLET_NOT_FOUND',\n ERROR_INVALID_PROTOCOL_VERSION: 'ERROR_INVALID_PROTOCOL_VERSION',\n};\nclass SolanaMobileWalletAdapterError extends Error {\n constructor(...args) {\n const [code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaMobileWalletAdapterError';\n }\n}\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst SolanaMobileWalletAdapterProtocolErrorCode = {\n // Keep these in sync with `mobilewalletadapter/common/ProtocolContract.java`.\n ERROR_AUTHORIZATION_FAILED: -1,\n ERROR_INVALID_PAYLOADS: -2,\n ERROR_NOT_SIGNED: -3,\n ERROR_NOT_SUBMITTED: -4,\n ERROR_TOO_MANY_PAYLOADS: -5,\n ERROR_ATTEST_ORIGIN_ANDROID: -100,\n};\nclass SolanaMobileWalletAdapterProtocolError extends Error {\n constructor(...args) {\n const [jsonRpcMessageId, code, message, data] = args;\n super(message);\n this.code = code;\n this.data = data;\n this.jsonRpcMessageId = jsonRpcMessageId;\n this.name = 'SolanaMobileWalletAdapterProtocolError';\n }\n}\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction createHelloReq(ecdhPublicKey, associationKeypairPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const publicKeyBuffer = yield crypto.subtle.exportKey('raw', ecdhPublicKey);\n const signatureBuffer = yield crypto.subtle.sign({ hash: 'SHA-256', name: 'ECDSA' }, associationKeypairPrivateKey, publicKeyBuffer);\n const response = new Uint8Array(publicKeyBuffer.byteLength + signatureBuffer.byteLength);\n response.set(new Uint8Array(publicKeyBuffer), 0);\n response.set(new Uint8Array(signatureBuffer), publicKeyBuffer.byteLength);\n return response;\n });\n}\n\nfunction encode(input) {\n return window.btoa(input);\n}\n\nfunction createSIWSMessage(payload) {\n return createSignInMessageText(payload);\n}\nfunction createSIWSMessageBase64(payload) {\n return encode(createSIWSMessage(payload));\n}\n\n// optional features\nconst SolanaSignTransactions = 'solana:signTransactions';\nconst SolanaCloneAuthorization = 'solana:cloneAuthorization';\nconst SolanaSignInWithSolana = 'solana:signInWithSolana';\n\n/**\n * Creates a {@link MobileWallet} proxy that handles backwards compatibility and API to RPC conversion.\n *\n * @param protocolVersion the protocol version in use for this session/request\n * @param protocolRequestHandler callback function that handles sending the RPC request to the wallet endpoint.\n * @returns a {@link MobileWallet} proxy\n */\nfunction createMobileWalletProxy(protocolVersion, protocolRequestHandler) {\n return new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n target[p] = function (inputParams) {\n return __awaiter(this, void 0, void 0, function* () {\n const { method, params } = handleMobileWalletRequest(p, inputParams, protocolVersion);\n const result = yield protocolRequestHandler(method, params);\n // if the request tried to sign in but the wallet did not return a sign in result, fallback on message signing\n if (method === 'authorize' && params.sign_in_payload && !result.sign_in_result) {\n result['sign_in_result'] = yield signInFallback(params.sign_in_payload, result, protocolRequestHandler);\n }\n return handleMobileWalletResponse(p, result, protocolVersion);\n });\n };\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n}\n/**\n * Handles all {@link MobileWallet} API requests and determines the correct MWA RPC method and params to call.\n * This handles backwards compatibility, based on the provided @protocolVersion.\n *\n * @param methodName the name of {@link MobileWallet} method that was called\n * @param methodParams the parameters that were passed to the method\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the RPC request method and params that should be sent to the wallet endpoint\n */\nfunction handleMobileWalletRequest(methodName, methodParams, protocolVersion) {\n let params = methodParams;\n let method = methodName\n .toString()\n .replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)\n .toLowerCase();\n switch (methodName) {\n case 'authorize': {\n let { chain } = params;\n if (protocolVersion === 'legacy') {\n switch (chain) {\n case 'solana:testnet': {\n chain = 'testnet';\n break;\n }\n case 'solana:devnet': {\n chain = 'devnet';\n break;\n }\n case 'solana:mainnet': {\n chain = 'mainnet-beta';\n break;\n }\n default: {\n chain = params.cluster;\n }\n }\n params.cluster = chain;\n }\n else {\n switch (chain) {\n case 'testnet':\n case 'devnet': {\n chain = `solana:${chain}`;\n break;\n }\n case 'mainnet-beta': {\n chain = 'solana:mainnet';\n break;\n }\n }\n params.chain = chain;\n }\n }\n case 'reauthorize': {\n const { auth_token, identity } = params;\n if (auth_token) {\n switch (protocolVersion) {\n case 'legacy': {\n method = 'reauthorize';\n params = { auth_token: auth_token, identity: identity };\n break;\n }\n default: {\n method = 'authorize';\n break;\n }\n }\n }\n break;\n }\n }\n return { method, params };\n}\n/**\n * Handles all {@link MobileWallet} API responses and modifies the response for backwards compatibility, if needed\n *\n * @param method the {@link MobileWallet} method that was called\n * @param response the original response that was returned by the method call\n * @param protocolVersion the protocol version in use for this session/request\n * @returns the possibly modified response\n */\nfunction handleMobileWalletResponse(method, response, protocolVersion) {\n switch (method) {\n case 'getCapabilities': {\n const capabilities = response;\n switch (protocolVersion) {\n case 'legacy': {\n const features = [SolanaSignTransactions];\n if (capabilities.supports_clone_authorization === true) {\n features.push(SolanaCloneAuthorization);\n }\n return Object.assign(Object.assign({}, capabilities), { features: features });\n }\n case 'v1': {\n return Object.assign(Object.assign({}, capabilities), { supports_sign_and_send_transactions: true, supports_clone_authorization: capabilities.features.includes(SolanaCloneAuthorization) });\n }\n }\n }\n }\n return response;\n}\nfunction signInFallback(signInPayload, authorizationResult, protocolRequestHandler) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const domain = (_a = signInPayload.domain) !== null && _a !== void 0 ? _a : window.location.host;\n const address = authorizationResult.accounts[0].address;\n const siwsMessage = createSIWSMessageBase64(Object.assign(Object.assign({}, signInPayload), { domain, address }));\n const signMessageResult = yield protocolRequestHandler('sign_messages', {\n addresses: [address],\n payloads: [siwsMessage]\n });\n const signInResult = {\n address: address,\n signed_message: siwsMessage,\n signature: signMessageResult.signed_payloads[0].slice(siwsMessage.length)\n };\n return signInResult;\n });\n}\n\nconst SEQUENCE_NUMBER_BYTES = 4;\nfunction createSequenceNumberVector(sequenceNumber) {\n if (sequenceNumber >= 4294967296) {\n throw new Error('Outbound sequence number overflow. The maximum sequence number is 32-bytes.');\n }\n const byteArray = new ArrayBuffer(SEQUENCE_NUMBER_BYTES);\n const view = new DataView(byteArray);\n view.setUint32(0, sequenceNumber, /* littleEndian */ false);\n return new Uint8Array(byteArray);\n}\n\nconst INITIALIZATION_VECTOR_BYTES = 12;\nconst ENCODED_PUBLIC_KEY_LENGTH_BYTES = 65;\nfunction encryptMessage(plaintext, sequenceNumber, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = createSequenceNumberVector(sequenceNumber);\n const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);\n crypto.getRandomValues(initializationVector);\n const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));\n const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);\n response.set(new Uint8Array(sequenceNumberVector), 0);\n response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);\n response.set(new Uint8Array(ciphertext), sequenceNumberVector.byteLength + initializationVector.byteLength);\n return response;\n });\n}\nfunction decryptMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = message.slice(0, SEQUENCE_NUMBER_BYTES);\n const initializationVector = message.slice(SEQUENCE_NUMBER_BYTES, SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const ciphertext = message.slice(SEQUENCE_NUMBER_BYTES + INITIALIZATION_VECTOR_BYTES);\n const plaintextBuffer = yield crypto.subtle.decrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, ciphertext);\n const plaintext = getUtf8Decoder().decode(plaintextBuffer);\n return plaintext;\n });\n}\nfunction getAlgorithmParams(sequenceNumber, initializationVector) {\n return {\n additionalData: sequenceNumber,\n iv: initializationVector,\n name: 'AES-GCM',\n tagLength: 128, // 16 byte tag => 128 bits\n };\n}\nlet _utf8Decoder;\nfunction getUtf8Decoder() {\n if (_utf8Decoder === undefined) {\n _utf8Decoder = new TextDecoder('utf-8');\n }\n return _utf8Decoder;\n}\n\nfunction generateAssociationKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDSA',\n namedCurve: 'P-256',\n }, false /* extractable */, ['sign'] /* keyUsages */);\n });\n}\n\nfunction generateECDHKeypair() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield crypto.subtle.generateKey({\n name: 'ECDH',\n namedCurve: 'P-256',\n }, false /* extractable */, ['deriveKey', 'deriveBits'] /* keyUsages */);\n });\n}\n\nfunction encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = JSON.stringify(jsonRpcMessage);\n const sequenceNumber = jsonRpcMessage.id;\n return encryptMessage(plaintext, sequenceNumber, sharedSecret);\n });\n}\nfunction decryptJsonRpcMessage(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonRpcMessage = JSON.parse(plaintext);\n if (Object.hasOwnProperty.call(jsonRpcMessage, 'error')) {\n throw new SolanaMobileWalletAdapterProtocolError(jsonRpcMessage.id, jsonRpcMessage.error.code, jsonRpcMessage.error.message);\n }\n return jsonRpcMessage;\n });\n}\n\nfunction parseHelloRsp(payloadBuffer, // The X9.62-encoded wallet endpoint ephemeral ECDH public keypoint.\nassociationPublicKey, ecdhPrivateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const [associationPublicKeyBuffer, walletPublicKey] = yield Promise.all([\n crypto.subtle.exportKey('raw', associationPublicKey),\n crypto.subtle.importKey('raw', payloadBuffer.slice(0, ENCODED_PUBLIC_KEY_LENGTH_BYTES), { name: 'ECDH', namedCurve: 'P-256' }, false /* extractable */, [] /* keyUsages */),\n ]);\n const sharedSecret = yield crypto.subtle.deriveBits({ name: 'ECDH', public: walletPublicKey }, ecdhPrivateKey, 256);\n const ecdhSecretKey = yield crypto.subtle.importKey('raw', sharedSecret, 'HKDF', false /* extractable */, ['deriveKey'] /* keyUsages */);\n const aesKeyMaterialVal = yield crypto.subtle.deriveKey({\n name: 'HKDF',\n hash: 'SHA-256',\n salt: new Uint8Array(associationPublicKeyBuffer),\n info: new Uint8Array(),\n }, ecdhSecretKey, { name: 'AES-GCM', length: 128 }, false /* extractable */, ['encrypt', 'decrypt']);\n return aesKeyMaterialVal;\n });\n}\n\nfunction parseSessionProps(message, sharedSecret) {\n return __awaiter(this, void 0, void 0, function* () {\n const plaintext = yield decryptMessage(message, sharedSecret);\n const jsonProperties = JSON.parse(plaintext);\n let protocolVersion = 'legacy';\n if (Object.hasOwnProperty.call(jsonProperties, 'v')) {\n switch (jsonProperties.v) {\n case 1:\n case '1':\n case 'v1':\n protocolVersion = 'v1';\n break;\n case 'legacy':\n protocolVersion = 'legacy';\n break;\n default:\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION, `Unknown/unsupported protocol version: ${jsonProperties.v}`);\n }\n }\n return ({\n protocol_version: protocolVersion\n });\n });\n}\n\nfunction getRandomAssociationPort() {\n return assertAssociationPort(49152 + Math.floor(Math.random() * (65535 - 49152 + 1)));\n}\nfunction assertAssociationPort(port) {\n if (port < 49152 || port > 65535) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_PORT_OUT_OF_RANGE, `Association port number must be between 49152 and 65535. ${port} given.`, { port });\n }\n return port;\n}\n\n// https://stackoverflow.com/a/9458996/802047\nfunction arrayBufferToBase64String(buffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\n for (let ii = 0; ii < len; ii++) {\n binary += String.fromCharCode(bytes[ii]);\n }\n return window.btoa(binary);\n}\n\nfunction getStringWithURLUnsafeCharactersReplaced(unsafeBase64EncodedString) {\n return unsafeBase64EncodedString.replace(/[/+=]/g, (m) => ({\n '/': '_',\n '+': '-',\n '=': '.',\n }[m]));\n}\n\nconst INTENT_NAME = 'solana-wallet';\nfunction getPathParts(pathString) {\n return (pathString\n // Strip leading and trailing slashes\n .replace(/(^\\/+|\\/+$)/g, '')\n // Return an array of directories\n .split('/'));\n}\nfunction getIntentURL(methodPathname, intentUrlBase) {\n let baseUrl = null;\n if (intentUrlBase) {\n try {\n baseUrl = new URL(intentUrlBase);\n }\n catch (_a) { } // eslint-disable-line no-empty\n if ((baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.protocol) !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n }\n baseUrl || (baseUrl = new URL(`${INTENT_NAME}:/`));\n const pathname = methodPathname.startsWith('/')\n ? // Method is an absolute path. Replace it wholesale.\n methodPathname\n : // Method is a relative path. Merge it with the existing one.\n [...getPathParts(baseUrl.pathname), ...getPathParts(methodPathname)].join('/');\n return new URL(pathname, baseUrl);\n}\nfunction getAssociateAndroidIntentURL(associationPublicKey, putativePort, associationURLBase, protocolVersions = ['v1']) {\n return __awaiter(this, void 0, void 0, function* () {\n const associationPort = assertAssociationPort(putativePort);\n const exportedKey = yield crypto.subtle.exportKey('raw', associationPublicKey);\n const encodedKey = arrayBufferToBase64String(exportedKey);\n const url = getIntentURL('v1/associate/local', associationURLBase);\n url.searchParams.set('association', getStringWithURLUnsafeCharactersReplaced(encodedKey));\n url.searchParams.set('port', `${associationPort}`);\n protocolVersions.forEach((version) => {\n url.searchParams.set('v', version);\n });\n return url;\n });\n}\n\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nconst Browser = {\n Firefox: 0,\n Other: 1,\n};\nfunction assertUnreachable(x) {\n return x;\n}\nfunction getBrowser() {\n return navigator.userAgent.indexOf('Firefox/') !== -1 ? Browser.Firefox : Browser.Other;\n}\nfunction getDetectionPromise() {\n // Chrome and others silently fail if a custom protocol is not supported.\n // For these, we wait to see if the browser is navigated away from in\n // a reasonable amount of time (ie. the native wallet opened).\n return new Promise((resolve, reject) => {\n function cleanup() {\n clearTimeout(timeoutId);\n window.removeEventListener('blur', handleBlur);\n }\n function handleBlur() {\n cleanup();\n resolve();\n }\n window.addEventListener('blur', handleBlur);\n const timeoutId = setTimeout(() => {\n cleanup();\n reject();\n }, 2000);\n });\n}\nlet _frame = null;\nfunction launchUrlThroughHiddenFrame(url) {\n if (_frame == null) {\n _frame = document.createElement('iframe');\n _frame.style.display = 'none';\n document.body.appendChild(_frame);\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _frame.contentWindow.location.href = url.toString();\n}\nfunction startSession(associationPublicKey, associationURLBase) {\n return __awaiter(this, void 0, void 0, function* () {\n const randomAssociationPort = getRandomAssociationPort();\n const associationUrl = yield getAssociateAndroidIntentURL(associationPublicKey, randomAssociationPort, associationURLBase);\n if (associationUrl.protocol === 'https:') {\n // The association URL is an Android 'App Link' or iOS 'Universal Link'.\n // These are regular web URLs that are designed to launch an app if it\n // is installed or load the actual target webpage if not.\n window.location.assign(associationUrl);\n }\n else {\n // The association URL has a custom protocol (eg. `solana-wallet:`)\n try {\n const browser = getBrowser();\n switch (browser) {\n case Browser.Firefox:\n // If a custom protocol is not supported in Firefox, it throws.\n launchUrlThroughHiddenFrame(associationUrl);\n // If we reached this line, it's supported.\n break;\n case Browser.Other: {\n const detectionPromise = getDetectionPromise();\n window.location.assign(associationUrl);\n yield detectionPromise;\n break;\n }\n default:\n assertUnreachable(browser);\n }\n }\n catch (e) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND, 'Found no installed wallet that supports the mobile wallet protocol.');\n }\n }\n return randomAssociationPort;\n });\n}\n\nconst WEBSOCKET_CONNECTION_CONFIG = {\n /**\n * 300 milliseconds is a generally accepted threshold for what someone\n * would consider an acceptable response time for a user interface\n * after having performed a low-attention tapping task. We set the initial\n * interval at which we wait for the wallet to set up the websocket at\n * half this, as per the Nyquist frequency, with a progressive backoff\n * sequence from there. The total wait time is 30s, which allows for the\n * user to be presented with a disambiguation dialog, select a wallet, and\n * for the wallet app to subsequently start.\n */\n retryDelayScheduleMs: [150, 150, 200, 500, 500, 750, 750, 1000],\n timeoutMs: 30000,\n};\nconst WEBSOCKET_PROTOCOL = 'com.solana.mobilewalletadapter.v1';\nfunction assertSecureContext() {\n if (typeof window === 'undefined' || window.isSecureContext !== true) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SECURE_CONTEXT_REQUIRED, 'The mobile wallet adapter protocol must be used in a secure context (`https`).');\n }\n}\nfunction assertSecureEndpointSpecificURI(walletUriBase) {\n let url;\n try {\n url = new URL(walletUriBase);\n }\n catch (_a) {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Invalid base URL supplied by wallet');\n }\n if (url.protocol !== 'https:') {\n throw new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_FORBIDDEN_WALLET_BASE_URL, 'Base URLs supplied by wallets must be valid `https` URLs');\n }\n}\nfunction getSequenceNumberFromByteArray(byteArray) {\n const view = new DataView(byteArray);\n return view.getUint32(0, /* littleEndian */ false);\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n assertSecureContext();\n const associationKeypair = yield generateAssociationKeypair();\n const sessionPort = yield startSession(associationKeypair.publicKey, config === null || config === void 0 ? void 0 : config.baseUri);\n const websocketURL = `ws://localhost:${sessionPort}/solana-wallet`;\n let connectionStartTime;\n const getNextRetryDelayMs = (() => {\n const schedule = [...WEBSOCKET_CONNECTION_CONFIG.retryDelayScheduleMs];\n return () => (schedule.length > 1 ? schedule.shift() : schedule[0]);\n })();\n let nextJsonRpcMessageId = 1;\n let lastKnownInboundSequenceNumber = 0;\n let state = { __type: 'disconnected' };\n return new Promise((resolve, reject) => {\n let socket;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const jsonRpcResponsePromises = {};\n const handleOpen = () => __awaiter(this, void 0, void 0, function* () {\n if (state.__type !== 'connecting') {\n console.warn('Expected adapter state to be `connecting` at the moment the websocket opens. ' +\n `Got \\`${state.__type}\\`.`);\n return;\n }\n const { associationKeypair } = state;\n socket.removeEventListener('open', handleOpen);\n const ecdhKeypair = yield generateECDHKeypair();\n socket.send(yield createHelloReq(ecdhKeypair.publicKey, associationKeypair.privateKey));\n state = {\n __type: 'hello_req_sent',\n associationPublicKey: associationKeypair.publicKey,\n ecdhPrivateKey: ecdhKeypair.privateKey,\n };\n });\n const handleClose = (evt) => {\n if (evt.wasClean) {\n state = { __type: 'disconnected' };\n }\n else {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_CLOSED, `The wallet session dropped unexpectedly (${evt.code}: ${evt.reason}).`, { closeEvent: evt }));\n }\n disposeSocket();\n };\n const handleError = (_evt) => __awaiter(this, void 0, void 0, function* () {\n disposeSocket();\n if (Date.now() - connectionStartTime >= WEBSOCKET_CONNECTION_CONFIG.timeoutMs) {\n reject(new SolanaMobileWalletAdapterError(SolanaMobileWalletAdapterErrorCode.ERROR_SESSION_TIMEOUT, `Failed to connect to the wallet websocket on port ${sessionPort}.`));\n }\n else {\n yield new Promise((resolve) => {\n const retryDelayMs = getNextRetryDelayMs();\n retryWaitTimeoutId = window.setTimeout(resolve, retryDelayMs);\n });\n attemptSocketConnection();\n }\n });\n const handleMessage = (evt) => __awaiter(this, void 0, void 0, function* () {\n const responseBuffer = yield evt.data.arrayBuffer();\n switch (state.__type) {\n case 'connected':\n try {\n const sequenceNumberVector = responseBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n const jsonRpcMessage = yield decryptJsonRpcMessage(responseBuffer, state.sharedSecret);\n const responsePromise = jsonRpcResponsePromises[jsonRpcMessage.id];\n delete jsonRpcResponsePromises[jsonRpcMessage.id];\n responsePromise.resolve(jsonRpcMessage.result);\n }\n catch (e) {\n if (e instanceof SolanaMobileWalletAdapterProtocolError) {\n const responsePromise = jsonRpcResponsePromises[e.jsonRpcMessageId];\n delete jsonRpcResponsePromises[e.jsonRpcMessageId];\n responsePromise.reject(e);\n }\n else {\n throw e;\n }\n }\n break;\n case 'hello_req_sent': {\n const sharedSecret = yield parseHelloRsp(responseBuffer, state.associationPublicKey, state.ecdhPrivateKey);\n const sessionPropertiesBuffer = responseBuffer.slice(ENCODED_PUBLIC_KEY_LENGTH_BYTES);\n const sessionProperties = sessionPropertiesBuffer.byteLength !== 0\n ? yield (() => __awaiter(this, void 0, void 0, function* () {\n const sequenceNumberVector = sessionPropertiesBuffer.slice(0, SEQUENCE_NUMBER_BYTES);\n const sequenceNumber = getSequenceNumberFromByteArray(sequenceNumberVector);\n if (sequenceNumber !== (lastKnownInboundSequenceNumber + 1)) {\n throw new Error('Encrypted message has invalid sequence number');\n }\n lastKnownInboundSequenceNumber = sequenceNumber;\n return parseSessionProps(sessionPropertiesBuffer, sharedSecret);\n }))() : { protocol_version: 'legacy' };\n state = { __type: 'connected', sharedSecret, sessionProperties };\n const wallet = createMobileWalletProxy(sessionProperties.protocol_version, (method, params) => __awaiter(this, void 0, void 0, function* () {\n const id = nextJsonRpcMessageId++;\n socket.send(yield encryptJsonRpcMessage({\n id,\n jsonrpc: '2.0',\n method,\n params: params !== null && params !== void 0 ? params : {},\n }, sharedSecret));\n return new Promise((resolve, reject) => {\n jsonRpcResponsePromises[id] = {\n resolve(result) {\n switch (method) {\n case 'authorize':\n case 'reauthorize': {\n const { wallet_uri_base } = result;\n if (wallet_uri_base != null) {\n try {\n assertSecureEndpointSpecificURI(wallet_uri_base);\n }\n catch (e) {\n reject(e);\n return;\n }\n }\n break;\n }\n }\n resolve(result);\n },\n reject,\n };\n });\n }));\n try {\n resolve(yield callback(wallet));\n }\n catch (e) {\n reject(e);\n }\n finally {\n disposeSocket();\n socket.close();\n }\n break;\n }\n }\n });\n let disposeSocket;\n let retryWaitTimeoutId;\n const attemptSocketConnection = () => {\n if (disposeSocket) {\n disposeSocket();\n }\n state = { __type: 'connecting', associationKeypair };\n if (connectionStartTime === undefined) {\n connectionStartTime = Date.now();\n }\n socket = new WebSocket(websocketURL, [WEBSOCKET_PROTOCOL]);\n socket.addEventListener('open', handleOpen);\n socket.addEventListener('close', handleClose);\n socket.addEventListener('error', handleError);\n socket.addEventListener('message', handleMessage);\n disposeSocket = () => {\n window.clearTimeout(retryWaitTimeoutId);\n socket.removeEventListener('open', handleOpen);\n socket.removeEventListener('close', handleClose);\n socket.removeEventListener('error', handleError);\n socket.removeEventListener('message', handleMessage);\n };\n };\n attemptSocketConnection();\n });\n });\n}\n\nexport { SolanaCloneAuthorization, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterProtocolError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaSignInWithSolana, SolanaSignTransactions, transact };\n","import { VersionedMessage, Transaction, VersionedTransaction, SIGNATURE_LENGTH_IN_BYTES } from '@solana/web3.js';\nimport { transact as transact$1 } from '@solana-mobile/mobile-wallet-adapter-protocol';\nimport bs58 from 'bs58';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction fromUint8Array(byteArray) {\n return window.btoa(String.fromCharCode.call(null, ...byteArray));\n}\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getPayloadFromTransaction(transaction) {\n const serializedTransaction = 'version' in transaction\n ? transaction.serialize()\n : transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n });\n const payload = fromUint8Array(serializedTransaction);\n return payload;\n}\nfunction getTransactionFromWireMessage(byteArray) {\n const numSignatures = byteArray[0];\n const messageOffset = numSignatures * SIGNATURE_LENGTH_IN_BYTES + 1;\n const version = VersionedMessage.deserializeMessageVersion(byteArray.slice(messageOffset, byteArray.length));\n if (version === 'legacy') {\n return Transaction.from(byteArray);\n }\n else {\n return VersionedTransaction.deserialize(byteArray);\n }\n}\nfunction transact(callback, config) {\n return __awaiter(this, void 0, void 0, function* () {\n const augmentedCallback = (wallet) => {\n const augmentedAPI = new Proxy({}, {\n get(target, p) {\n if (target[p] == null) {\n switch (p) {\n case 'signAndSendTransactions':\n target[p] = function (_a) {\n var { minContextSlot, commitment, skipPreflight, maxRetries, waitForCommitmentToSendNextTransaction, transactions } = _a, rest = __rest(_a, [\"minContextSlot\", \"commitment\", \"skipPreflight\", \"maxRetries\", \"waitForCommitmentToSendNextTransaction\", \"transactions\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const options = {\n min_context_slot: minContextSlot,\n commitment: commitment,\n skip_preflight: skipPreflight,\n max_retries: maxRetries,\n wait_for_commitment_to_send_next_transaction: waitForCommitmentToSendNextTransaction\n };\n const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (Object.values(options).some(element => element != null)\n ? { options: options }\n : null)), { payloads }));\n const signatures = base64EncodedSignatures.map(toUint8Array).map(bs58.encode);\n return signatures;\n });\n };\n break;\n case 'signMessages':\n target[p] = function (_a) {\n var { payloads } = _a, rest = __rest(_a, [\"payloads\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const base64EncodedPayloads = payloads.map(fromUint8Array);\n const { signed_payloads: base64EncodedSignedMessages } = yield wallet.signMessages(Object.assign(Object.assign({}, rest), { payloads: base64EncodedPayloads }));\n const signedMessages = base64EncodedSignedMessages.map(toUint8Array);\n return signedMessages;\n });\n };\n break;\n case 'signTransactions':\n target[p] = function (_a) {\n var { transactions } = _a, rest = __rest(_a, [\"transactions\"]);\n return __awaiter(this, void 0, void 0, function* () {\n const payloads = transactions.map(getPayloadFromTransaction);\n const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));\n const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);\n const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);\n return signedTransactions;\n });\n };\n break;\n default: {\n target[p] = wallet[p];\n break;\n }\n }\n }\n return target[p];\n },\n defineProperty() {\n return false;\n },\n deleteProperty() {\n return false;\n },\n });\n return callback(augmentedAPI);\n };\n return yield transact$1(augmentedCallback, config);\n });\n}\n\nexport { transact };\n","import { BaseSignInMessageSignerWalletAdapter, WalletReadyState, WalletPublicKeyError, WalletNotReadyError, WalletConnectionError, WalletDisconnectedError, WalletNotConnectedError, WalletSignTransactionError, WalletSendTransactionError, WalletSignMessageError } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction toUint8Array(base64EncodedByteArray) {\n return new Uint8Array(window\n .atob(base64EncodedByteArray)\n .split('')\n .map((c) => c.charCodeAt(0)));\n}\n\nfunction getIsSupported() {\n return (typeof window !== 'undefined' &&\n window.isSecureContext &&\n typeof document !== 'undefined' &&\n /android/i.test(navigator.userAgent));\n}\n\nconst SolanaMobileWalletAdapterWalletName = 'Mobile Wallet Adapter';\nconst SIGNATURE_LENGTH_IN_BYTES = 64;\nfunction getPublicKeyFromAddress(address) {\n const publicKeyByteArray = toUint8Array(address);\n return new PublicKey(publicKeyByteArray);\n}\nfunction isVersionedTransaction(transaction) {\n return 'version' in transaction;\n}\nclass SolanaMobileWalletAdapter extends BaseSignInMessageSignerWalletAdapter {\n constructor(config) {\n var _a;\n super();\n this.supportedTransactionVersions = new Set(\n // FIXME(#244): We can't actually know what versions are supported until we know which wallet we're talking to.\n ['legacy', 0]);\n this.name = SolanaMobileWalletAdapterWalletName;\n this.url = 'https://solanamobile.com/wallets';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI4IiB3aWR0aD0iMjgiIHZpZXdCb3g9Ii0zIDAgMjggMjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI0RDQjhGRiI+PHBhdGggZD0iTTE3LjQgMTcuNEgxNXYyLjRoMi40di0yLjRabTEuMi05LjZoLTIuNHYyLjRoMi40VjcuOFoiLz48cGF0aCBkPSJNMjEuNiAzVjBoLTIuNHYzaC0zLjZWMGgtMi40djNoLTIuNHY2LjZINC41YTIuMSAyLjEgMCAxIDEgMC00LjJoMi43VjNINC41QTQuNSA0LjUgMCAwIDAgMCA3LjVWMjRoMjEuNnYtNi42aC0yLjR2NC4ySDIuNFYxMS41Yy41LjMgMS4yLjQgMS44LjVoNy41QTYuNiA2LjYgMCAwIDAgMjQgOVYzaC0yLjRabTAgNS43YTQuMiA0LjIgMCAxIDEtOC40IDBWNS40aDguNHYzLjNaIi8+PC9nPjwvc3ZnPg==';\n this._connecting = false;\n /**\n * Every time the connection is recycled in some way (eg. `disconnect()` is called)\n * increment this and use it to make sure that `transact` calls from the previous\n * 'generation' don't continue to do work and throw exceptions.\n */\n this._connectionGeneration = 0;\n this._readyState = getIsSupported() ? WalletReadyState.Loadable : WalletReadyState.Unsupported;\n this._authorizationResultCache = config.authorizationResultCache;\n this._addressSelector = config.addressSelector;\n this._appIdentity = config.appIdentity;\n this._chain = (_a = config.chain) !== null && _a !== void 0 ? _a : config.cluster;\n this._onWalletNotFound = config.onWalletNotFound;\n if (this._readyState !== WalletReadyState.Unsupported) {\n this._authorizationResultCache.get().then((authorizationResult) => {\n if (authorizationResult) {\n // Having a prior authorization result is, right now, the best\n // indication that a mobile wallet is installed. There is no API\n // we can use to test for whether the association URI is supported.\n this.declareWalletAsInstalled();\n }\n });\n }\n }\n get publicKey() {\n if (this._publicKey == null && this._selectedAddress != null) {\n try {\n this._publicKey = getPublicKeyFromAddress(this._selectedAddress);\n }\n catch (e) {\n throw new WalletPublicKeyError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n }\n return this._publicKey ? this._publicKey : null;\n }\n get connected() {\n return !!this._authorizationResult;\n }\n get connecting() {\n return this._connecting;\n }\n get readyState() {\n return this._readyState;\n }\n declareWalletAsInstalled() {\n if (this._readyState !== WalletReadyState.Installed) {\n this.emit('readyStateChange', (this._readyState = WalletReadyState.Installed));\n }\n }\n runWithGuard(callback) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n return yield callback();\n }\n catch (e) {\n this.emit('error', e);\n throw e;\n }\n });\n }\n /** @deprecated Use `autoConnect()` instead. */\n autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED() {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.autoConnect();\n });\n }\n autoConnect() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n }\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n connect() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.connecting || this.connected) {\n return;\n }\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n yield this.performAuthorization();\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n performAuthorization(signInPayload) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const cachedAuthorizationResult = yield this._authorizationResultCache.get();\n if (cachedAuthorizationResult) {\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this.handleAuthorizationResult(cachedAuthorizationResult);\n return cachedAuthorizationResult;\n }\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n const authorizationResult = yield wallet.authorize({\n chain: this._chain,\n identity: this._appIdentity,\n sign_in_payload: signInPayload,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n return authorizationResult;\n }));\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n });\n }\n handleAuthorizationResult(authorizationResult) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const didPublicKeysChange = \n // Case 1: We started from having no authorization.\n this._authorizationResult == null ||\n // Case 2: The number of authorized accounts changed.\n ((_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.accounts.length) !== authorizationResult.accounts.length ||\n // Case 3: The new list of addresses isn't exactly the same as the old list, in the same order.\n this._authorizationResult.accounts.some((account, ii) => account.address !== authorizationResult.accounts[ii].address);\n this._authorizationResult = authorizationResult;\n this.declareWalletAsInstalled();\n if (didPublicKeysChange) {\n const nextSelectedAddress = yield this._addressSelector.select(authorizationResult.accounts.map(({ address }) => address));\n if (nextSelectedAddress !== this._selectedAddress) {\n this._selectedAddress = nextSelectedAddress;\n delete this._publicKey;\n this.emit('connect', \n // Having just set `this._selectedAddress`, `this.publicKey` is definitely non-null\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.publicKey);\n }\n }\n });\n }\n performReauthorization(wallet, authToken) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const authorizationResult = yield wallet.authorize({\n auth_token: authToken,\n identity: this._appIdentity,\n });\n // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n Promise.all([\n this._authorizationResultCache.set(authorizationResult),\n this.handleAuthorizationResult(authorizationResult),\n ]);\n }\n catch (e) {\n this.disconnect();\n throw new WalletDisconnectedError((e instanceof Error && (e === null || e === void 0 ? void 0 : e.message)) || 'Unknown error', e);\n }\n });\n }\n disconnect() {\n return __awaiter(this, void 0, void 0, function* () {\n this._authorizationResultCache.clear(); // TODO: Evaluate whether there's any threat to not `awaiting` this expression\n this._connecting = false;\n this._connectionGeneration++;\n delete this._authorizationResult;\n delete this._publicKey;\n delete this._selectedAddress;\n this.emit('disconnect');\n });\n }\n transact(callback) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const walletUriBase = (_a = this._authorizationResult) === null || _a === void 0 ? void 0 : _a.wallet_uri_base;\n const config = walletUriBase ? { baseUri: walletUriBase } : undefined;\n const currentConnectionGeneration = this._connectionGeneration;\n try {\n return yield transact(callback, config);\n }\n catch (e) {\n if (this._connectionGeneration !== currentConnectionGeneration) {\n yield new Promise(() => { }); // Never resolve.\n }\n if (e instanceof Error &&\n e.name === 'SolanaMobileWalletAdapterError' &&\n e.code === 'ERROR_WALLET_NOT_FOUND') {\n yield this._onWalletNotFound(this);\n }\n throw e;\n }\n });\n }\n assertIsAuthorized() {\n if (!this._authorizationResult || !this._selectedAddress)\n throw new WalletNotConnectedError();\n return {\n authToken: this._authorizationResult.auth_token,\n selectedAddress: this._selectedAddress,\n };\n }\n performSignTransactions(transactions) {\n return __awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const signedTransactions = yield wallet.signTransactions({\n transactions,\n });\n return signedTransactions;\n }));\n }\n catch (error) {\n throw new WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n });\n }\n sendTransaction(transaction, connection, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const { authToken } = this.assertIsAuthorized();\n const minContextSlot = options === null || options === void 0 ? void 0 : options.minContextSlot;\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n function getTargetCommitment() {\n let targetCommitment;\n switch (connection.commitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetCommitment = connection.commitment;\n break;\n default:\n targetCommitment = 'finalized';\n }\n let targetPreflightCommitment;\n switch (options === null || options === void 0 ? void 0 : options.preflightCommitment) {\n case 'confirmed':\n case 'finalized':\n case 'processed':\n targetPreflightCommitment = options.preflightCommitment;\n break;\n case undefined:\n targetPreflightCommitment = targetCommitment;\n break;\n default:\n targetPreflightCommitment = 'finalized';\n }\n const preflightCommitmentScore = targetPreflightCommitment === 'finalized'\n ? 2\n : targetPreflightCommitment === 'confirmed'\n ? 1\n : 0;\n const targetCommitmentScore = targetCommitment === 'finalized' ? 2 : targetCommitment === 'confirmed' ? 1 : 0;\n return preflightCommitmentScore < targetCommitmentScore\n ? targetPreflightCommitment\n : targetCommitment;\n }\n const [capabilities, _1, _2] = yield Promise.all([\n wallet.getCapabilities(),\n this.performReauthorization(wallet, authToken),\n isVersionedTransaction(transaction)\n ? null\n : /**\n * Unlike versioned transactions, legacy `Transaction` objects\n * may not have an associated `feePayer` or `recentBlockhash`.\n * This code exists to patch them up in case they are missing.\n */\n (() => __awaiter(this, void 0, void 0, function* () {\n var _a;\n transaction.feePayer || (transaction.feePayer = (_a = this.publicKey) !== null && _a !== void 0 ? _a : undefined);\n if (transaction.recentBlockhash == null) {\n const { blockhash } = yield connection.getLatestBlockhash({\n commitment: getTargetCommitment(),\n });\n transaction.recentBlockhash = blockhash;\n }\n }))(),\n ]);\n if (capabilities.supports_sign_and_send_transactions) {\n const signatures = yield wallet.signAndSendTransactions({\n minContextSlot,\n transactions: [transaction],\n });\n return signatures[0];\n }\n else {\n const [signedTransaction] = yield wallet.signTransactions({\n transactions: [transaction],\n });\n if (isVersionedTransaction(signedTransaction)) {\n return yield connection.sendTransaction(signedTransaction);\n }\n else {\n const serializedTransaction = signedTransaction.serialize();\n return yield connection.sendRawTransaction(serializedTransaction, Object.assign(Object.assign({}, options), { preflightCommitment: getTargetCommitment() }));\n }\n }\n }));\n }\n catch (error) {\n throw new WalletSendTransactionError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const [signedTransaction] = yield this.performSignTransactions([transaction]);\n return signedTransaction;\n }));\n });\n }\n signAllTransactions(transactions) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const signedTransactions = yield this.performSignTransactions(transactions);\n return signedTransactions;\n }));\n });\n }\n signMessage(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n const { authToken, selectedAddress } = this.assertIsAuthorized();\n try {\n return yield this.transact((wallet) => __awaiter(this, void 0, void 0, function* () {\n yield this.performReauthorization(wallet, authToken);\n const [signedMessage] = yield wallet.signMessages({\n addresses: [selectedAddress],\n payloads: [message],\n });\n const signature = signedMessage.slice(-SIGNATURE_LENGTH_IN_BYTES);\n return signature;\n }));\n }\n catch (error) {\n throw new WalletSignMessageError(error === null || error === void 0 ? void 0 : error.message, error);\n }\n }));\n });\n }\n signIn(input) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield this.runWithGuard(() => __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (this._readyState !== WalletReadyState.Installed && this._readyState !== WalletReadyState.Loadable) {\n throw new WalletNotReadyError();\n }\n this._connecting = true;\n try {\n const authorizationResult = yield this.performAuthorization(Object.assign(Object.assign({}, input), { domain: (_a = input === null || input === void 0 ? void 0 : input.domain) !== null && _a !== void 0 ? _a : window.location.host }));\n if (!authorizationResult.sign_in_result) {\n throw new Error(\"Sign in failed, no sign in result returned by wallet\");\n }\n const signedInAddress = authorizationResult.sign_in_result.address;\n const signedInAccount = Object.assign(Object.assign({}, (_b = authorizationResult.accounts.find(acc => acc.address == signedInAddress)) !== null && _b !== void 0 ? _b : {\n address: signedInAddress\n }), { publicKey: toUint8Array(signedInAddress) });\n return {\n account: signedInAccount,\n signedMessage: toUint8Array(authorizationResult.sign_in_result.signed_message),\n signature: toUint8Array(authorizationResult.sign_in_result.signature)\n };\n }\n catch (e) {\n throw new WalletConnectionError((e instanceof Error && e.message) || 'Unknown error', e);\n }\n finally {\n this._connecting = false;\n }\n }));\n });\n }\n}\n\nfunction createDefaultAddressSelector() {\n return {\n select(addresses) {\n return __awaiter(this, void 0, void 0, function* () {\n return addresses[0];\n });\n },\n };\n}\n\nconst CACHE_KEY = 'SolanaMobileWalletAdapterDefaultAuthorizationCache';\nfunction createDefaultAuthorizationResultCache() {\n let storage;\n try {\n storage = window.localStorage;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n return {\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.removeItem(CACHE_KEY);\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n get() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n return JSON.parse(storage.getItem(CACHE_KEY)) || undefined;\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n set(authorizationResult) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!storage) {\n return;\n }\n try {\n storage.setItem(CACHE_KEY, JSON.stringify(authorizationResult));\n // eslint-disable-next-line no-empty\n }\n catch (_a) { }\n });\n },\n };\n}\n\nfunction defaultWalletNotFoundHandler(mobileWalletAdapter) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof window !== 'undefined') {\n window.location.assign(mobileWalletAdapter.url);\n }\n });\n}\nfunction createDefaultWalletNotFoundHandler() {\n return defaultWalletNotFoundHandler;\n}\n\nexport { SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler };\n","import { SolanaSignAndSendTransaction, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { StandardConnect, StandardEvents, } from '@wallet-standard/features';\nexport function isWalletAdapterCompatibleStandardWallet(wallet) {\n return (StandardConnect in wallet.features &&\n StandardEvents in wallet.features &&\n (SolanaSignAndSendTransaction in wallet.features || SolanaSignTransaction in wallet.features));\n}\n//# sourceMappingURL=standard.js.map","import { isWalletAdapterCompatibleStandardWallet, } from '@solana/wallet-adapter-base';\n/**\n * @deprecated Use `isWalletAdapterCompatibleStandardWallet` from `@solana/wallet-adapter-base` instead.\n *\n * @group Deprecated\n */\nexport const isWalletAdapterCompatibleWallet = isWalletAdapterCompatibleStandardWallet;\n//# sourceMappingURL=types.js.map","/** Name of the feature. */\nexport const SolanaSignIn = 'solana:signIn';\n//# sourceMappingURL=signIn.js.map","import { SOLANA_DEVNET_CHAIN, SOLANA_LOCALNET_CHAIN, SOLANA_MAINNET_CHAIN, SOLANA_TESTNET_CHAIN, } from '@solana/wallet-standard-chains';\n/** TODO: docs */\nexport const MAINNET_ENDPOINT = 'https://api.mainnet-beta.solana.com';\n/** TODO: docs */\nexport const DEVNET_ENDPOINT = 'https://api.devnet.solana.com';\n/** TODO: docs */\nexport const TESTNET_ENDPOINT = 'https://api.testnet.solana.com';\n/** TODO: docs */\nexport const LOCALNET_ENDPOINT = 'http://localhost:8899';\n/**\n * TODO: docs\n */\nexport function getChainForEndpoint(endpoint) {\n if (endpoint.includes(MAINNET_ENDPOINT))\n return SOLANA_MAINNET_CHAIN;\n if (/\\bdevnet\\b/i.test(endpoint))\n return SOLANA_DEVNET_CHAIN;\n if (/\\btestnet\\b/i.test(endpoint))\n return SOLANA_TESTNET_CHAIN;\n if (/\\blocalhost\\b/i.test(endpoint) || /\\b127\\.0\\.0\\.1\\b/.test(endpoint))\n return SOLANA_LOCALNET_CHAIN;\n return SOLANA_MAINNET_CHAIN;\n}\n/**\n * TODO: docs\n */\nexport function getEndpointForChain(chain, endpoint) {\n if (endpoint)\n return endpoint;\n if (chain === SOLANA_MAINNET_CHAIN)\n return MAINNET_ENDPOINT;\n if (chain === SOLANA_DEVNET_CHAIN)\n return DEVNET_ENDPOINT;\n if (chain === SOLANA_TESTNET_CHAIN)\n return TESTNET_ENDPOINT;\n if (chain === SOLANA_LOCALNET_CHAIN)\n return LOCALNET_ENDPOINT;\n return MAINNET_ENDPOINT;\n}\n//# sourceMappingURL=endpoint.js.map","/**\n * TODO: docs\n */\nexport function getCommitment(commitment) {\n switch (commitment) {\n case 'processed':\n case 'confirmed':\n case 'finalized':\n case undefined:\n return commitment;\n case 'recent':\n return 'processed';\n case 'single':\n case 'singleGossip':\n return 'confirmed';\n case 'max':\n case 'root':\n return 'finalized';\n default:\n return undefined;\n }\n}\n//# sourceMappingURL=commitment.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _ReadonlyWalletAccount_address, _ReadonlyWalletAccount_publicKey, _ReadonlyWalletAccount_chains, _ReadonlyWalletAccount_features, _ReadonlyWalletAccount_label, _ReadonlyWalletAccount_icon;\n/**\n * Base implementation of a {@link \"@wallet-standard/base\".WalletAccount} to be used or extended by a\n * {@link \"@wallet-standard/base\".Wallet}.\n *\n * `WalletAccount` properties must be read-only. This class enforces this by making all properties\n * [truly private](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields) and\n * read-only, using getters for access, returning copies instead of references, and calling\n * [Object.freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)\n * on the instance.\n *\n * @group Account\n */\nexport class ReadonlyWalletAccount {\n /**\n * Create and freeze a read-only account.\n *\n * @param account Account to copy properties from.\n */\n constructor(account) {\n _ReadonlyWalletAccount_address.set(this, void 0);\n _ReadonlyWalletAccount_publicKey.set(this, void 0);\n _ReadonlyWalletAccount_chains.set(this, void 0);\n _ReadonlyWalletAccount_features.set(this, void 0);\n _ReadonlyWalletAccount_label.set(this, void 0);\n _ReadonlyWalletAccount_icon.set(this, void 0);\n if (new.target === ReadonlyWalletAccount) {\n Object.freeze(this);\n }\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_address, account.address, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_publicKey, account.publicKey.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_chains, account.chains.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_features, account.features.slice(), \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_label, account.label, \"f\");\n __classPrivateFieldSet(this, _ReadonlyWalletAccount_icon, account.icon, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.address | WalletAccount::address} */\n get address() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_address, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.publicKey | WalletAccount::publicKey} */\n get publicKey() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_publicKey, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.chains | WalletAccount::chains} */\n get chains() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_chains, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.features | WalletAccount::features} */\n get features() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_features, \"f\").slice();\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.label | WalletAccount::label} */\n get label() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_label, \"f\");\n }\n /** Implementation of {@link \"@wallet-standard/base\".WalletAccount.icon | WalletAccount::icon} */\n get icon() {\n return __classPrivateFieldGet(this, _ReadonlyWalletAccount_icon, \"f\");\n }\n}\n_ReadonlyWalletAccount_address = new WeakMap(), _ReadonlyWalletAccount_publicKey = new WeakMap(), _ReadonlyWalletAccount_chains = new WeakMap(), _ReadonlyWalletAccount_features = new WeakMap(), _ReadonlyWalletAccount_label = new WeakMap(), _ReadonlyWalletAccount_icon = new WeakMap();\n/**\n * Efficiently compare {@link Indexed} arrays (e.g. `Array` and `Uint8Array`).\n *\n * @param a An array.\n * @param b Another array.\n *\n * @return `true` if the arrays have the same length and elements, `false` otherwise.\n *\n * @group Util\n */\nexport function arraysEqual(a, b) {\n if (a === b)\n return true;\n const length = a.length;\n if (length !== b.length)\n return false;\n for (let i = 0; i < length; i++) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\n/**\n * Efficiently compare byte arrays, using {@link arraysEqual}.\n *\n * @param a A byte array.\n * @param b Another byte array.\n *\n * @return `true` if the byte arrays have the same length and bytes, `false` otherwise.\n *\n * @group Util\n */\nexport function bytesEqual(a, b) {\n return arraysEqual(a, b);\n}\n/**\n * Efficiently concatenate byte arrays without modifying them.\n *\n * @param first A byte array.\n * @param others Additional byte arrays.\n *\n * @return New byte array containing the concatenation of all the byte arrays.\n *\n * @group Util\n */\nexport function concatBytes(first, ...others) {\n const length = others.reduce((length, bytes) => length + bytes.length, first.length);\n const bytes = new Uint8Array(length);\n bytes.set(first, 0);\n for (const other of others) {\n bytes.set(other, bytes.length);\n }\n return bytes;\n}\n/**\n * Create a new object with a subset of fields from a source object.\n *\n * @param source Object to pick fields from.\n * @param keys Names of fields to pick.\n *\n * @return New object with only the picked fields.\n *\n * @group Util\n */\nexport function pick(source, ...keys) {\n const picked = {};\n for (const key of keys) {\n picked[key] = source[key];\n }\n return picked;\n}\n/**\n * Call a callback function, catch an error if it throws, and log the error without rethrowing.\n *\n * @param callback Function to call.\n *\n * @group Util\n */\nexport function guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\n//# sourceMappingURL=util.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _StandardWalletAdapter_instances, _StandardWalletAdapter_account, _StandardWalletAdapter_publicKey, _StandardWalletAdapter_connecting, _StandardWalletAdapter_disconnecting, _StandardWalletAdapter_off, _StandardWalletAdapter_supportedTransactionVersions, _StandardWalletAdapter_wallet, _StandardWalletAdapter_readyState, _StandardWalletAdapter_connect, _StandardWalletAdapter_connected, _StandardWalletAdapter_disconnected, _StandardWalletAdapter_reset, _StandardWalletAdapter_changed, _StandardWalletAdapter_signTransaction, _StandardWalletAdapter_signAllTransactions, _StandardWalletAdapter_signMessage, _StandardWalletAdapter_signIn;\nimport { BaseWalletAdapter, isVersionedTransaction, WalletAccountError, WalletConfigError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignInError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { SolanaSignAndSendTransaction, SolanaSignIn, SolanaSignMessage, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { getChainForEndpoint, getCommitment } from '@solana/wallet-standard-util';\nimport { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';\nimport { StandardConnect, StandardDisconnect, StandardEvents, } from '@wallet-standard/features';\nimport { arraysEqual } from '@wallet-standard/wallet';\nimport bs58 from 'bs58';\n/** TODO: docs */\nexport class StandardWalletAdapter extends BaseWalletAdapter {\n constructor({ wallet }) {\n super();\n _StandardWalletAdapter_instances.add(this);\n _StandardWalletAdapter_account.set(this, void 0);\n _StandardWalletAdapter_publicKey.set(this, void 0);\n _StandardWalletAdapter_connecting.set(this, void 0);\n _StandardWalletAdapter_disconnecting.set(this, void 0);\n _StandardWalletAdapter_off.set(this, void 0);\n _StandardWalletAdapter_supportedTransactionVersions.set(this, void 0);\n _StandardWalletAdapter_wallet.set(this, void 0);\n _StandardWalletAdapter_readyState.set(this, typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Installed);\n _StandardWalletAdapter_changed.set(this, (properties) => {\n // If accounts have changed on the wallet, reflect this on the adapter.\n if ('accounts' in properties) {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n // If the adapter isn't connected, or is disconnecting, or the first account hasn't changed, do nothing.\n if (__classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\") && !__classPrivateFieldGet(this, _StandardWalletAdapter_disconnecting, \"f\") && account !== __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")) {\n // If there's a connected account, connect the adapter. Otherwise, disconnect it.\n if (account) {\n // Connect the adapter.\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n else {\n // Emit an error because the wallet spontaneously disconnected.\n this.emit('error', new WalletDisconnectedError());\n // Disconnect the adapter.\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n }\n }\n // After reflecting account changes, if features have changed on the wallet, reflect this on the adapter.\n if ('features' in properties) {\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n });\n __classPrivateFieldSet(this, _StandardWalletAdapter_wallet, wallet, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_off, __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardEvents].on('change', __classPrivateFieldGet(this, _StandardWalletAdapter_changed, \"f\")), \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n }\n get name() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").name;\n }\n get url() {\n return 'https://github.com/solana-labs/wallet-standard';\n }\n get icon() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").icon;\n }\n get readyState() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\");\n }\n get publicKey() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_publicKey, \"f\");\n }\n get connecting() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_connecting, \"f\");\n }\n get supportedTransactionVersions() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_supportedTransactionVersions, \"f\");\n }\n get wallet() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\");\n }\n get standard() {\n return true;\n }\n destroy() {\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n const off = __classPrivateFieldGet(this, _StandardWalletAdapter_off, \"f\");\n if (off) {\n __classPrivateFieldSet(this, _StandardWalletAdapter_off, null, \"f\");\n off();\n }\n }\n async autoConnect() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this, { silent: true });\n }\n async connect() {\n return __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connect).call(this);\n }\n async disconnect() {\n if (StandardDisconnect in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n try {\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, true, \"f\");\n await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardDisconnect].disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n finally {\n __classPrivateFieldSet(this, _StandardWalletAdapter_disconnecting, false, \"f\");\n }\n }\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_disconnected).call(this);\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n let feature;\n if (SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (account.features.includes(SolanaSignAndSendTransaction)) {\n feature = SolanaSignAndSendTransaction;\n }\n else if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features &&\n account.features.includes(SolanaSignTransaction)) {\n feature = SolanaSignTransaction;\n }\n else {\n throw new WalletAccountError();\n }\n }\n else if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n feature = SolanaSignTransaction;\n }\n else {\n throw new WalletConfigError();\n }\n const chain = getChainForEndpoint(connection.rpcEndpoint);\n if (!account.chains.includes(chain))\n throw new WalletSendTransactionError();\n try {\n const { signers, ...sendOptions } = options;\n let serializedTransaction;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n serializedTransaction = transaction.serialize();\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n serializedTransaction = new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n }));\n }\n if (feature === SolanaSignAndSendTransaction) {\n const [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignAndSendTransaction].signAndSendTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n skipPreflight: sendOptions.skipPreflight,\n maxRetries: sendOptions.maxRetries,\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return bs58.encode(output.signature);\n }\n else {\n const [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction({\n account,\n chain,\n transaction: serializedTransaction,\n options: {\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n minContextSlot: sendOptions.minContextSlot,\n },\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return await connection.sendRawTransaction(output.signedTransaction, {\n ...sendOptions,\n preflightCommitment: getCommitment(sendOptions.preflightCommitment || connection.commitment),\n });\n }\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n_StandardWalletAdapter_account = new WeakMap(), _StandardWalletAdapter_publicKey = new WeakMap(), _StandardWalletAdapter_connecting = new WeakMap(), _StandardWalletAdapter_disconnecting = new WeakMap(), _StandardWalletAdapter_off = new WeakMap(), _StandardWalletAdapter_supportedTransactionVersions = new WeakMap(), _StandardWalletAdapter_wallet = new WeakMap(), _StandardWalletAdapter_readyState = new WeakMap(), _StandardWalletAdapter_changed = new WeakMap(), _StandardWalletAdapter_instances = new WeakSet(), _StandardWalletAdapter_connect = async function _StandardWalletAdapter_connect(input) {\n try {\n if (this.connected || this.connecting)\n return;\n if (__classPrivateFieldGet(this, _StandardWalletAdapter_readyState, \"f\") !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, true, \"f\");\n if (!__classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts.length) {\n try {\n await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[StandardConnect].connect(input);\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").accounts[0];\n if (!account)\n throw new WalletAccountError();\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, account);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n __classPrivateFieldSet(this, _StandardWalletAdapter_connecting, false, \"f\");\n }\n}, _StandardWalletAdapter_connected = function _StandardWalletAdapter_connected(account) {\n let publicKey;\n try {\n // Use account.address instead of account.publicKey since address could be a PDA\n publicKey = new PublicKey(account.address);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, account, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, publicKey, \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('connect', publicKey);\n}, _StandardWalletAdapter_disconnected = function _StandardWalletAdapter_disconnected() {\n __classPrivateFieldSet(this, _StandardWalletAdapter_account, null, \"f\");\n __classPrivateFieldSet(this, _StandardWalletAdapter_publicKey, null, \"f\");\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_reset).call(this);\n this.emit('disconnect');\n}, _StandardWalletAdapter_reset = function _StandardWalletAdapter_reset() {\n const supportedTransactionVersions = SolanaSignAndSendTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features\n ? __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignAndSendTransaction].supportedTransactionVersions\n : __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].supportedTransactionVersions;\n __classPrivateFieldSet(this, _StandardWalletAdapter_supportedTransactionVersions, arraysEqual(supportedTransactionVersions, ['legacy'])\n ? null\n : new Set(supportedTransactionVersions), \"f\");\n if (SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(SolanaSignTransaction)) {\n this.signTransaction = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signTransaction);\n this.signAllTransactions = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signAllTransactions);\n }\n else {\n delete this.signTransaction;\n delete this.signAllTransactions;\n }\n if (SolanaSignMessage in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features && __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\")?.features.includes(SolanaSignMessage)) {\n this.signMessage = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signMessage);\n }\n else {\n delete this.signMessage;\n }\n if (SolanaSignIn in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features) {\n this.signIn = __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_signIn);\n }\n else {\n delete this.signIn;\n }\n}, _StandardWalletAdapter_signTransaction = async function _StandardWalletAdapter_signTransaction(transaction) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n try {\n const signedTransactions = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const serializedTransaction = signedTransactions[0].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? VersionedTransaction.deserialize(serializedTransaction)\n : Transaction.from(serializedTransaction));\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signAllTransactions = async function _StandardWalletAdapter_signAllTransactions(transactions) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignTransaction in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignTransaction))\n throw new WalletAccountError();\n try {\n const signedTransactions = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignTransaction].signTransaction(...transactions.map((transaction) => ({\n account,\n transaction: isVersionedTransaction(transaction)\n ? transaction.serialize()\n : new Uint8Array(transaction.serialize({\n requireAllSignatures: false,\n verifySignatures: false,\n })),\n })));\n return transactions.map((transaction, index) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const signedTransaction = signedTransactions[index].signedTransaction;\n return (isVersionedTransaction(transaction)\n ? VersionedTransaction.deserialize(signedTransaction)\n : Transaction.from(signedTransaction));\n });\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signMessage = async function _StandardWalletAdapter_signMessage(message) {\n try {\n const account = __classPrivateFieldGet(this, _StandardWalletAdapter_account, \"f\");\n if (!account)\n throw new WalletNotConnectedError();\n if (!(SolanaSignMessage in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n if (!account.features.includes(SolanaSignMessage))\n throw new WalletAccountError();\n try {\n const signedMessages = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignMessage].signMessage({\n account,\n message,\n });\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return signedMessages[0].signature;\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n}, _StandardWalletAdapter_signIn = async function _StandardWalletAdapter_signIn(input = {}) {\n try {\n if (!(SolanaSignIn in __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features))\n throw new WalletConfigError();\n let output;\n try {\n [output] = await __classPrivateFieldGet(this, _StandardWalletAdapter_wallet, \"f\").features[SolanaSignIn].signIn(input);\n }\n catch (error) {\n throw new WalletSignInError(error?.message, error);\n }\n if (!output)\n throw new WalletSignInError();\n __classPrivateFieldGet(this, _StandardWalletAdapter_instances, \"m\", _StandardWalletAdapter_connected).call(this, output.account);\n return output;\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n};\n//# sourceMappingURL=adapter.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _AppReadyEvent_detail;\nlet wallets = undefined;\nconst registered = new Set();\nconst listeners = {};\n/**\n * Get an API for {@link Wallets.get | getting}, {@link Wallets.on | listening for}, and\n * {@link Wallets.register | registering} {@link \"@wallet-standard/base\".Wallet | Wallets}.\n *\n * When called for the first time --\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowAppReadyEvent} to notify each Wallet that the app is ready\n * to register it.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to listen for a notification\n * from each Wallet that the Wallet is ready to be registered by the app.\n *\n * This combination of event dispatch and listener guarantees that each Wallet will be registered synchronously as soon\n * as the app is ready whether the app loads before or after each Wallet.\n *\n * @return API for getting, listening for, and registering Wallets.\n *\n * @group App\n */\nexport function getWallets() {\n if (wallets)\n return wallets;\n wallets = Object.freeze({ register, get, on });\n if (typeof window === 'undefined')\n return wallets;\n const api = Object.freeze({ register });\n try {\n window.addEventListener('wallet-standard:register-wallet', ({ detail: callback }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event listener could not be added\\n', error);\n }\n try {\n window.dispatchEvent(new AppReadyEvent(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event could not be dispatched\\n', error);\n }\n return wallets;\n}\nfunction register(...wallets) {\n // Filter out wallets that have already been registered.\n // This prevents the same wallet from being registered twice, but it also prevents wallets from being\n // unregistered by reusing a reference to the wallet to obtain the unregister function for it.\n wallets = wallets.filter((wallet) => !registered.has(wallet));\n // If there are no new wallets to register, just return a no-op unregister function.\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n if (!wallets.length)\n return () => { };\n wallets.forEach((wallet) => registered.add(wallet));\n listeners['register']?.forEach((listener) => guard(() => listener(...wallets)));\n // Return a function that unregisters the registered wallets.\n return function unregister() {\n wallets.forEach((wallet) => registered.delete(wallet));\n listeners['unregister']?.forEach((listener) => guard(() => listener(...wallets)));\n };\n}\nfunction get() {\n return [...registered];\n}\nfunction on(event, listener) {\n listeners[event]?.push(listener) || (listeners[event] = [listener]);\n // Return a function that removes the event listener.\n return function off() {\n listeners[event] = listeners[event]?.filter((existingListener) => listener !== existingListener);\n };\n}\nfunction guard(callback) {\n try {\n callback();\n }\n catch (error) {\n console.error(error);\n }\n}\nclass AppReadyEvent extends Event {\n constructor(api) {\n super('wallet-standard:app-ready', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _AppReadyEvent_detail.set(this, void 0);\n __classPrivateFieldSet(this, _AppReadyEvent_detail, api, \"f\");\n }\n get detail() {\n return __classPrivateFieldGet(this, _AppReadyEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:app-ready';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_AppReadyEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link getWallets} instead.\n *\n * @group Deprecated\n */\nexport function DEPRECATED_getWallets() {\n if (wallets)\n return wallets;\n wallets = getWallets();\n if (typeof window === 'undefined')\n return wallets;\n const callbacks = window.navigator.wallets || [];\n if (!Array.isArray(callbacks)) {\n console.error('window.navigator.wallets is not an array');\n return wallets;\n }\n const { register } = wallets;\n const push = (...callbacks) => callbacks.forEach((callback) => guard(() => callback({ register })));\n try {\n Object.defineProperty(window.navigator, 'wallets', {\n value: Object.freeze({ push }),\n });\n }\n catch (error) {\n console.error('window.navigator.wallets could not be set');\n return wallets;\n }\n push(...callbacks);\n return wallets;\n}\n//# sourceMappingURL=wallets.js.map","import { isWalletAdapterCompatibleWallet, StandardWalletAdapter } from '@solana/wallet-standard-wallet-adapter-base';\nimport { DEPRECATED_getWallets } from '@wallet-standard/app';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nexport function useStandardWalletAdapters(adapters) {\n const warnings = useConstant(() => new Set());\n const { get, on } = useConstant(() => DEPRECATED_getWallets());\n const [standardAdapters, setStandardAdapters] = useState(() => wrapWalletsWithAdapters(get()));\n useEffect(() => {\n const listeners = [\n on('register', (...wallets) => setStandardAdapters((standardAdapters) => [...standardAdapters, ...wrapWalletsWithAdapters(wallets)])),\n on('unregister', (...wallets) => setStandardAdapters((standardAdapters) => standardAdapters.filter((standardAdapter) => wallets.some((wallet) => wallet === standardAdapter.wallet)))),\n ];\n return () => listeners.forEach((off) => off());\n }, [on]);\n const prevStandardAdapters = usePrevious(standardAdapters);\n useEffect(() => {\n if (!prevStandardAdapters)\n return;\n const currentAdapters = new Set(standardAdapters);\n const removedAdapters = new Set(prevStandardAdapters.filter((previousAdapter) => !currentAdapters.has(previousAdapter)));\n removedAdapters.forEach((adapter) => adapter.destroy());\n }, [prevStandardAdapters, standardAdapters]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => () => standardAdapters.forEach((adapter) => adapter.destroy()), []);\n return useMemo(() => [\n ...standardAdapters,\n ...adapters.filter(({ name }) => {\n if (standardAdapters.some((standardAdapter) => standardAdapter.name === name)) {\n if (!warnings.has(name)) {\n warnings.add(name);\n console.warn(`${name} was registered as a Standard Wallet. The Wallet Adapter for ${name} can be removed from your app.`);\n }\n return false;\n }\n return true;\n }),\n ], [standardAdapters, adapters, warnings]);\n}\nfunction useConstant(fn) {\n const ref = useRef();\n if (!ref.current) {\n ref.current = { value: fn() };\n }\n return ref.current.value;\n}\nfunction usePrevious(state) {\n const ref = useRef();\n useEffect(() => {\n ref.current = state;\n });\n return ref.current;\n}\nfunction wrapWalletsWithAdapters(wallets) {\n return wallets.filter(isWalletAdapterCompatibleWallet).map((wallet) => new StandardWalletAdapter({ wallet }));\n}\n//# sourceMappingURL=useStandardWalletAdapters.js.map","import { SolanaMobileWalletAdapterWalletName } from '@solana-mobile/wallet-adapter-mobile';\nimport { WalletReadyState } from '@solana/wallet-adapter-base';\nexport var Environment;\n(function (Environment) {\n Environment[Environment[\"DESKTOP_WEB\"] = 0] = \"DESKTOP_WEB\";\n Environment[Environment[\"MOBILE_WEB\"] = 1] = \"MOBILE_WEB\";\n})(Environment || (Environment = {}));\nfunction isWebView(userAgentString) {\n return /(WebView|Version\\/.+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)|; wv\\).+(Chrome)\\/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+))/i.test(userAgentString);\n}\nexport default function getEnvironment({ adapters, userAgentString }) {\n if (adapters.some((adapter) => adapter.name !== SolanaMobileWalletAdapterWalletName &&\n adapter.readyState === WalletReadyState.Installed)) {\n /**\n * There are only two ways a browser extension adapter should be able to reach `Installed` status:\n *\n * 1. Its browser extension is installed.\n * 2. The app is running on a mobile wallet's in-app browser.\n *\n * In either case, we consider the environment to be desktop-like.\n */\n return Environment.DESKTOP_WEB;\n }\n if (userAgentString &&\n // Step 1: Check whether we're on a platform that supports MWA at all.\n /android/i.test(userAgentString) &&\n // Step 2: Determine that we are *not* running in a WebView.\n !isWebView(userAgentString)) {\n return Environment.MOBILE_WEB;\n }\n else {\n return Environment.DESKTOP_WEB;\n }\n}\n//# sourceMappingURL=getEnvironment.js.map","export default function getInferredClusterFromEndpoint(endpoint) {\n if (!endpoint) {\n return 'mainnet-beta';\n }\n if (/devnet/i.test(endpoint)) {\n return 'devnet';\n }\n else if (/testnet/i.test(endpoint)) {\n return 'testnet';\n }\n else {\n return 'mainnet-beta';\n }\n}\n//# sourceMappingURL=getInferredClusterFromEndpoint.js.map","import { useEffect, useRef, useState } from 'react';\nexport function useLocalStorage(key, defaultState) {\n const state = useState(() => {\n try {\n const value = localStorage.getItem(key);\n if (value)\n return JSON.parse(value);\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n return defaultState;\n });\n const value = state[0];\n const isFirstRenderRef = useRef(true);\n useEffect(() => {\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false;\n return;\n }\n try {\n if (value === null) {\n localStorage.removeItem(key);\n }\n else {\n localStorage.setItem(key, JSON.stringify(value));\n }\n }\n catch (error) {\n if (typeof window !== 'undefined') {\n console.error(error);\n }\n }\n }, [value, key]);\n return state;\n}\n//# sourceMappingURL=useLocalStorage.js.map","import { WalletError } from '@solana/wallet-adapter-base';\nexport class WalletNotSelectedError extends WalletError {\n constructor() {\n super(...arguments);\n this.name = 'WalletNotSelectedError';\n }\n}\n//# sourceMappingURL=errors.js.map","import { WalletNotConnectedError, WalletNotReadyError, WalletReadyState, } from '@solana/wallet-adapter-base';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { WalletNotSelectedError } from './errors.js';\nimport { WalletContext } from './useWallet.js';\nexport function WalletProviderBase({ children, wallets: adapters, adapter, isUnloadingRef, onAutoConnectRequest, onConnectError, onError, onSelectWallet, }) {\n const isConnectingRef = useRef(false);\n const [connecting, setConnecting] = useState(false);\n const isDisconnectingRef = useRef(false);\n const [disconnecting, setDisconnecting] = useState(false);\n const [publicKey, setPublicKey] = useState(() => adapter?.publicKey ?? null);\n const [connected, setConnected] = useState(() => adapter?.connected ?? false);\n /**\n * Store the error handlers as refs so that a change in the\n * custom error handler does not recompute other dependencies.\n */\n const onErrorRef = useRef(onError);\n useEffect(() => {\n onErrorRef.current = onError;\n return () => {\n onErrorRef.current = undefined;\n };\n }, [onError]);\n const handleErrorRef = useRef((error, adapter) => {\n if (!isUnloadingRef.current) {\n if (onErrorRef.current) {\n onErrorRef.current(error, adapter);\n }\n else {\n console.error(error, adapter);\n if (error instanceof WalletNotReadyError && typeof window !== 'undefined' && adapter) {\n window.open(adapter.url, '_blank');\n }\n }\n }\n return error;\n });\n // Wrap adapters to conform to the `Wallet` interface\n const [wallets, setWallets] = useState(() => adapters\n .map((adapter) => ({\n adapter,\n readyState: adapter.readyState,\n }))\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n // When the adapters change, start to listen for changes to their `readyState`\n useEffect(() => {\n // When the adapters change, wrap them to conform to the `Wallet` interface\n setWallets((wallets) => adapters\n .map((adapter, index) => {\n const wallet = wallets[index];\n // If the wallet hasn't changed, return the same instance\n return wallet && wallet.adapter === adapter && wallet.readyState === adapter.readyState\n ? wallet\n : {\n adapter: adapter,\n readyState: adapter.readyState,\n };\n })\n .filter(({ readyState }) => readyState !== WalletReadyState.Unsupported));\n function handleReadyStateChange(readyState) {\n setWallets((prevWallets) => {\n const index = prevWallets.findIndex(({ adapter }) => adapter === this);\n if (index === -1)\n return prevWallets;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const { adapter } = prevWallets[index];\n return [\n ...prevWallets.slice(0, index),\n { adapter, readyState },\n ...prevWallets.slice(index + 1),\n ].filter(({ readyState }) => readyState !== WalletReadyState.Unsupported);\n });\n }\n adapters.forEach((adapter) => adapter.on('readyStateChange', handleReadyStateChange, adapter));\n return () => {\n adapters.forEach((adapter) => adapter.off('readyStateChange', handleReadyStateChange, adapter));\n };\n }, [adapter, adapters]);\n const wallet = useMemo(() => wallets.find((wallet) => wallet.adapter === adapter) ?? null, [adapter, wallets]);\n // Setup and teardown event listeners when the adapter changes\n useEffect(() => {\n if (!adapter)\n return;\n const handleConnect = (publicKey) => {\n setPublicKey(publicKey);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(true);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleDisconnect = () => {\n if (isUnloadingRef.current)\n return;\n setPublicKey(null);\n isConnectingRef.current = false;\n setConnecting(false);\n setConnected(false);\n isDisconnectingRef.current = false;\n setDisconnecting(false);\n };\n const handleError = (error) => {\n handleErrorRef.current(error, adapter);\n };\n adapter.on('connect', handleConnect);\n adapter.on('disconnect', handleDisconnect);\n adapter.on('error', handleError);\n return () => {\n adapter.off('connect', handleConnect);\n adapter.off('disconnect', handleDisconnect);\n adapter.off('error', handleError);\n handleDisconnect();\n };\n }, [adapter, isUnloadingRef]);\n // When the adapter changes, clear the `autoConnect` tracking flag\n const didAttemptAutoConnectRef = useRef(false);\n useEffect(() => {\n return () => {\n didAttemptAutoConnectRef.current = false;\n };\n }, [adapter]);\n // If auto-connect is enabled, request to connect when the adapter changes and is ready\n useEffect(() => {\n if (didAttemptAutoConnectRef.current ||\n isConnectingRef.current ||\n connected ||\n !onAutoConnectRequest ||\n !(wallet?.readyState === WalletReadyState.Installed || wallet?.readyState === WalletReadyState.Loadable))\n return;\n isConnectingRef.current = true;\n setConnecting(true);\n didAttemptAutoConnectRef.current = true;\n (async function () {\n try {\n await onAutoConnectRequest();\n }\n catch {\n onConnectError();\n // Drop the error. It will be caught by `handleError` anyway.\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n })();\n }, [connected, onAutoConnectRequest, onConnectError, wallet]);\n // Send a transaction using the provided connection\n const sendTransaction = useCallback(async (transaction, connection, options) => {\n if (!adapter)\n throw handleErrorRef.current(new WalletNotSelectedError());\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.sendTransaction(transaction, connection, options);\n }, [adapter, connected]);\n // Sign a transaction if the wallet supports it\n const signTransaction = useMemo(() => adapter && 'signTransaction' in adapter\n ? async (transaction) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signTransaction(transaction);\n }\n : undefined, [adapter, connected]);\n // Sign multiple transactions if the wallet supports it\n const signAllTransactions = useMemo(() => adapter && 'signAllTransactions' in adapter\n ? async (transactions) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signAllTransactions(transactions);\n }\n : undefined, [adapter, connected]);\n // Sign an arbitrary message if the wallet supports it\n const signMessage = useMemo(() => adapter && 'signMessage' in adapter\n ? async (message) => {\n if (!connected)\n throw handleErrorRef.current(new WalletNotConnectedError(), adapter);\n return await adapter.signMessage(message);\n }\n : undefined, [adapter, connected]);\n // Sign in if the wallet supports it\n const signIn = useMemo(() => adapter && 'signIn' in adapter\n ? async (input) => {\n return await adapter.signIn(input);\n }\n : undefined, [adapter]);\n const handleConnect = useCallback(async () => {\n if (isConnectingRef.current || isDisconnectingRef.current || wallet?.adapter.connected)\n return;\n if (!wallet)\n throw handleErrorRef.current(new WalletNotSelectedError());\n const { adapter, readyState } = wallet;\n if (!(readyState === WalletReadyState.Installed || readyState === WalletReadyState.Loadable))\n throw handleErrorRef.current(new WalletNotReadyError(), adapter);\n isConnectingRef.current = true;\n setConnecting(true);\n try {\n await adapter.connect();\n }\n catch (e) {\n onConnectError();\n throw e;\n }\n finally {\n setConnecting(false);\n isConnectingRef.current = false;\n }\n }, [onConnectError, wallet]);\n const handleDisconnect = useCallback(async () => {\n if (isDisconnectingRef.current)\n return;\n if (!adapter)\n return;\n isDisconnectingRef.current = true;\n setDisconnecting(true);\n try {\n await adapter.disconnect();\n }\n finally {\n setDisconnecting(false);\n isDisconnectingRef.current = false;\n }\n }, [adapter]);\n return (React.createElement(WalletContext.Provider, { value: {\n autoConnect: !!onAutoConnectRequest,\n wallets,\n wallet,\n publicKey,\n connected,\n connecting,\n disconnecting,\n select: onSelectWallet,\n connect: handleConnect,\n disconnect: handleDisconnect,\n sendTransaction,\n signTransaction,\n signAllTransactions,\n signMessage,\n signIn,\n } }, children));\n}\n//# sourceMappingURL=WalletProviderBase.js.map","import { createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler, SolanaMobileWalletAdapter, SolanaMobileWalletAdapterWalletName, } from '@solana-mobile/wallet-adapter-mobile';\nimport { useStandardWalletAdapters } from '@solana/wallet-standard-wallet-adapter-react';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport getEnvironment, { Environment } from './getEnvironment.js';\nimport getInferredClusterFromEndpoint from './getInferredClusterFromEndpoint.js';\nimport { useConnection } from './useConnection.js';\nimport { useLocalStorage } from './useLocalStorage.js';\nimport { WalletProviderBase } from './WalletProviderBase.js';\nlet _userAgent;\nfunction getUserAgent() {\n if (_userAgent === undefined) {\n _userAgent = globalThis.navigator?.userAgent ?? null;\n }\n return _userAgent;\n}\nfunction getIsMobile(adapters) {\n const userAgentString = getUserAgent();\n return getEnvironment({ adapters, userAgentString }) === Environment.MOBILE_WEB;\n}\nfunction getUriForAppIdentity() {\n const location = globalThis.location;\n if (!location)\n return;\n return `${location.protocol}//${location.host}`;\n}\nexport function WalletProvider({ children, wallets: adapters, autoConnect, localStorageKey = 'walletName', onError, }) {\n const { connection } = useConnection();\n const adaptersWithStandardAdapters = useStandardWalletAdapters(adapters);\n const mobileWalletAdapter = useMemo(() => {\n if (!getIsMobile(adaptersWithStandardAdapters)) {\n return null;\n }\n const existingMobileWalletAdapter = adaptersWithStandardAdapters.find((adapter) => adapter.name === SolanaMobileWalletAdapterWalletName);\n if (existingMobileWalletAdapter) {\n return existingMobileWalletAdapter;\n }\n return new SolanaMobileWalletAdapter({\n addressSelector: createDefaultAddressSelector(),\n appIdentity: {\n uri: getUriForAppIdentity(),\n },\n authorizationResultCache: createDefaultAuthorizationResultCache(),\n cluster: getInferredClusterFromEndpoint(connection?.rpcEndpoint),\n onWalletNotFound: createDefaultWalletNotFoundHandler(),\n });\n }, [adaptersWithStandardAdapters, connection?.rpcEndpoint]);\n const adaptersWithMobileWalletAdapter = useMemo(() => {\n if (mobileWalletAdapter == null || adaptersWithStandardAdapters.indexOf(mobileWalletAdapter) !== -1) {\n return adaptersWithStandardAdapters;\n }\n return [mobileWalletAdapter, ...adaptersWithStandardAdapters];\n }, [adaptersWithStandardAdapters, mobileWalletAdapter]);\n const [walletName, setWalletName] = useLocalStorage(localStorageKey, getIsMobile(adaptersWithStandardAdapters) ? SolanaMobileWalletAdapterWalletName : null);\n const adapter = useMemo(() => adaptersWithMobileWalletAdapter.find((a) => a.name === walletName) ?? null, [adaptersWithMobileWalletAdapter, walletName]);\n const changeWallet = useCallback((nextWalletName) => {\n if (walletName === nextWalletName)\n return;\n if (adapter &&\n // Selecting a wallet other than the mobile wallet adapter is not\n // sufficient reason to call `disconnect` on the mobile wallet adapter.\n // Calling `disconnect` on the mobile wallet adapter causes the entire\n // authorization store to be wiped.\n adapter.name !== SolanaMobileWalletAdapterWalletName) {\n adapter.disconnect();\n }\n setWalletName(nextWalletName);\n }, [adapter, setWalletName, walletName]);\n useEffect(() => {\n if (!adapter)\n return;\n function handleDisconnect() {\n if (isUnloadingRef.current)\n return;\n // Leave the adapter selected in the event of a disconnection.\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters))\n return;\n setWalletName(null);\n }\n adapter.on('disconnect', handleDisconnect);\n return () => {\n adapter.off('disconnect', handleDisconnect);\n };\n }, [adapter, adaptersWithStandardAdapters, setWalletName, walletName]);\n const hasUserSelectedAWallet = useRef(false);\n const handleAutoConnectRequest = useMemo(() => {\n if (!autoConnect || !adapter)\n return;\n return async () => {\n // If autoConnect is true or returns true, use the default autoConnect behavior.\n if (autoConnect === true || (await autoConnect(adapter))) {\n if (hasUserSelectedAWallet.current) {\n await adapter.connect();\n }\n else {\n await adapter.autoConnect();\n }\n }\n };\n }, [autoConnect, adapter]);\n const isUnloadingRef = useRef(false);\n useEffect(() => {\n if (walletName === SolanaMobileWalletAdapterWalletName && getIsMobile(adaptersWithStandardAdapters)) {\n isUnloadingRef.current = false;\n return;\n }\n function handleBeforeUnload() {\n isUnloadingRef.current = true;\n }\n /**\n * Some wallets fire disconnection events when the window unloads. Since there's no way to\n * distinguish between a disconnection event received because a user initiated it, and one\n * that was received because they've closed the window, we have to track window unload\n * events themselves. Downstream components use this information to decide whether to act\n * upon or drop wallet events and errors.\n */\n window.addEventListener('beforeunload', handleBeforeUnload);\n return () => {\n window.removeEventListener('beforeunload', handleBeforeUnload);\n };\n }, [adaptersWithStandardAdapters, walletName]);\n const handleConnectError = useCallback(() => {\n if (adapter && adapter.name !== SolanaMobileWalletAdapterWalletName) {\n // If any error happens while connecting, unset the adapter.\n changeWallet(null);\n }\n }, [adapter, changeWallet]);\n const selectWallet = useCallback((walletName) => {\n hasUserSelectedAWallet.current = true;\n changeWallet(walletName);\n }, [changeWallet]);\n return (React.createElement(WalletProviderBase, { wallets: adaptersWithMobileWalletAdapter, adapter: adapter, isUnloadingRef: isUnloadingRef, onAutoConnectRequest: handleAutoConnectRequest, onConnectError: handleConnectError, onError: onError, onSelectWallet: selectWallet }, children));\n}\n//# sourceMappingURL=WalletProvider.js.map","import { createContext, useContext } from 'react';\nexport const ConnectionContext = createContext({});\nexport function useConnection() {\n return useContext(ConnectionContext);\n}\n//# sourceMappingURL=useConnection.js.map","import { createContext, useContext } from 'react';\nconst EMPTY_ARRAY = [];\nconst DEFAULT_CONTEXT = {\n autoConnect: false,\n connecting: false,\n connected: false,\n disconnecting: false,\n select() {\n logMissingProviderError('call', 'select');\n },\n connect() {\n return Promise.reject(logMissingProviderError('call', 'connect'));\n },\n disconnect() {\n return Promise.reject(logMissingProviderError('call', 'disconnect'));\n },\n sendTransaction() {\n return Promise.reject(logMissingProviderError('call', 'sendTransaction'));\n },\n signTransaction() {\n return Promise.reject(logMissingProviderError('call', 'signTransaction'));\n },\n signAllTransactions() {\n return Promise.reject(logMissingProviderError('call', 'signAllTransactions'));\n },\n signMessage() {\n return Promise.reject(logMissingProviderError('call', 'signMessage'));\n },\n signIn() {\n return Promise.reject(logMissingProviderError('call', 'signIn'));\n },\n};\nObject.defineProperty(DEFAULT_CONTEXT, 'wallets', {\n get() {\n logMissingProviderError('read', 'wallets');\n return EMPTY_ARRAY;\n },\n});\nObject.defineProperty(DEFAULT_CONTEXT, 'wallet', {\n get() {\n logMissingProviderError('read', 'wallet');\n return null;\n },\n});\nObject.defineProperty(DEFAULT_CONTEXT, 'publicKey', {\n get() {\n logMissingProviderError('read', 'publicKey');\n return null;\n },\n});\nfunction logMissingProviderError(action, property) {\n const error = new Error(`You have tried to ${action} \"${property}\" on a WalletContext without providing one. ` +\n 'Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.');\n console.error(error);\n return error;\n}\nexport const WalletContext = createContext(DEFAULT_CONTEXT);\nexport function useWallet() {\n return useContext(WalletContext);\n}\n//# sourceMappingURL=useWallet.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _RegisterWalletEvent_detail;\n/**\n * Register a {@link \"@wallet-standard/base\".Wallet} as a Standard Wallet with the app.\n *\n * This dispatches a {@link \"@wallet-standard/base\".WindowRegisterWalletEvent} to notify the app that the Wallet is\n * ready to be registered.\n *\n * This also adds a listener for {@link \"@wallet-standard/base\".WindowAppReadyEvent} to listen for a notification from\n * the app that the app is ready to register the Wallet.\n *\n * This combination of event dispatch and listener guarantees that the Wallet will be registered synchronously as soon\n * as the app is ready whether the Wallet loads before or after the app.\n *\n * @param wallet Wallet to register.\n *\n * @group Wallet\n */\nexport function registerWallet(wallet) {\n const callback = ({ register }) => register(wallet);\n try {\n window.dispatchEvent(new RegisterWalletEvent(callback));\n }\n catch (error) {\n console.error('wallet-standard:register-wallet event could not be dispatched\\n', error);\n }\n try {\n window.addEventListener('wallet-standard:app-ready', ({ detail: api }) => callback(api));\n }\n catch (error) {\n console.error('wallet-standard:app-ready event listener could not be added\\n', error);\n }\n}\nclass RegisterWalletEvent extends Event {\n constructor(callback) {\n super('wallet-standard:register-wallet', {\n bubbles: false,\n cancelable: false,\n composed: false,\n });\n _RegisterWalletEvent_detail.set(this, void 0);\n __classPrivateFieldSet(this, _RegisterWalletEvent_detail, callback, \"f\");\n }\n get detail() {\n return __classPrivateFieldGet(this, _RegisterWalletEvent_detail, \"f\");\n }\n get type() {\n return 'wallet-standard:register-wallet';\n }\n /** @deprecated */\n preventDefault() {\n throw new Error('preventDefault cannot be called');\n }\n /** @deprecated */\n stopImmediatePropagation() {\n throw new Error('stopImmediatePropagation cannot be called');\n }\n /** @deprecated */\n stopPropagation() {\n throw new Error('stopPropagation cannot be called');\n }\n}\n_RegisterWalletEvent_detail = new WeakMap();\n/**\n * @deprecated Use {@link registerWallet} instead.\n *\n * @group Deprecated\n */\nexport function DEPRECATED_registerWallet(wallet) {\n var _a;\n registerWallet(wallet);\n try {\n ((_a = window.navigator).wallets || (_a.wallets = [])).push(({ register }) => register(wallet));\n }\n catch (error) {\n console.error('window.navigator.wallets could not be pushed\\n', error);\n }\n}\n//# sourceMappingURL=register.js.map","/** @internal */\nexport const icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMxIiB2aWV3Qm94PSIwIDAgMzEgMzEiIHdpZHRoPSIzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiBncmFkaWVudFVuaX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MzgtLjA1Ni4wNjUtLjAxNS4wNTYtLjAxLjA4NC4wMTguMDU1LjAzOS4wNzZsMS4zMTEgMS4zNjhjLjAyOC4wMy4wNjMuMDUzLjEwMS4wNjlhLjMxLjMxIDAgMCAwIC4xMjEuMDI1aDYuMjA4Yy4wMyAwIC4wNTktLjAwOC4wODMtLjAyNGEuMTUuMTUgMCAwIDAgLjA1Ni0uMDY1Yy4wMTItLjAyNi4wMTUtLjA1Ni4wMS0uMDg0cy0uMDE4LS4wNTUtLjAzOS0uMDc2em0tNi40MzEtLjk4M2g2LjIwOWEuMzEuMzEgMCAwIDAgLjEyMS0uMDI0Yy4wMzgtLjAxNi4wNzMtLjA0LjEwMS0uMDdsMS4zMS0xLjM2OGMuMDItLjAyMS4wMzQtLjA0Ny4wMzktLjA3NnMuMDAxLS4wNTgtLjAxLS4wODRhLjE1LjE1IDAgMCAwIC0uMDU2LS4wNjVjLS4wMjUtLjAxNi0uMDU0LS4wMjQtLjA4My0uMDI0aC02LjIwOGEuMzEuMzEgMCAwIDAgLS4xMjEuMDI1Yy0uMDM4LjAxNi0uMDcyLjA0LS4xMDEuMDY5bC0xLjMxIDEuMzY4Yy0uMDIuMDIxLS4wMzQuMDQ3LS4wMzkuMDc2cy0uMDAxLjA1OC4wMS4wODQuMDMxLjA0OS4wNTYuMDY1LjA1NC4wMjQuMDgzLjAyNHoiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=';\n//# sourceMappingURL=icon.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _SolflareMetaMaskWallet_instances, _SolflareMetaMaskWallet_listeners, _SolflareMetaMaskWallet_version, _SolflareMetaMaskWallet_name, _SolflareMetaMaskWallet_icon, _SolflareMetaMaskWallet_solflareMetaMask, _SolflareMetaMaskWallet_on, _SolflareMetaMaskWallet_emit, _SolflareMetaMaskWallet_off, _SolflareMetaMaskWallet_connect, _SolflareMetaMaskWallet_disconnect, _SolflareMetaMaskWallet_signAndSendTransaction, _SolflareMetaMaskWallet_signTransaction, _SolflareMetaMaskWallet_signMessage;\nimport { WalletNotConnectedError } from '@solana/wallet-adapter-base';\nimport { SOLANA_DEVNET_CHAIN, SOLANA_MAINNET_CHAIN, SOLANA_TESTNET_CHAIN } from '@solana/wallet-standard-chains';\nimport { SolanaSignAndSendTransaction, SolanaSignMessage, SolanaSignTransaction, } from '@solana/wallet-standard-features';\nimport { StandardConnect, StandardDisconnect, StandardEvents, } from '@wallet-standard/features';\nimport { icon } from './icon.js';\nexport class SolflareMetaMaskWallet {\n constructor() {\n _SolflareMetaMaskWallet_instances.add(this);\n _SolflareMetaMaskWallet_listeners.set(this, {});\n _SolflareMetaMaskWallet_version.set(this, '1.0.0');\n _SolflareMetaMaskWallet_name.set(this, 'MetaMask');\n _SolflareMetaMaskWallet_icon.set(this, icon);\n _SolflareMetaMaskWallet_solflareMetaMask.set(this, null);\n _SolflareMetaMaskWallet_on.set(this, (event, listener) => {\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.push(listener) || (__classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = [listener]);\n return () => __classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_off).call(this, event, listener);\n });\n _SolflareMetaMaskWallet_connect.set(this, async () => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\")) {\n let SolflareMetaMaskClass;\n try {\n SolflareMetaMaskClass = (await import('@solflare-wallet/metamask-sdk')).default;\n }\n catch (error) {\n throw new Error('Unable to load Solflare MetaMask SDK');\n }\n __classPrivateFieldSet(this, _SolflareMetaMaskWallet_solflareMetaMask, new SolflareMetaMaskClass(), \"f\");\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").on('standard_change', (properties) => __classPrivateFieldGet(this, _SolflareMetaMaskWallet_instances, \"m\", _SolflareMetaMaskWallet_emit).call(this, 'change', properties));\n }\n if (!this.accounts.length) {\n await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").connect();\n }\n return { accounts: this.accounts };\n });\n _SolflareMetaMaskWallet_disconnect.set(this, async () => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n return;\n await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").disconnect();\n });\n _SolflareMetaMaskWallet_signAndSendTransaction.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignAndSendTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signTransaction.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignTransaction(...inputs);\n });\n _SolflareMetaMaskWallet_signMessage.set(this, async (...inputs) => {\n if (!__classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\"))\n throw new WalletNotConnectedError();\n return await __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardSignMessage(...inputs);\n });\n }\n get version() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_version, \"f\");\n }\n get name() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_name, \"f\");\n }\n get icon() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_icon, \"f\");\n }\n get chains() {\n return [SOLANA_MAINNET_CHAIN, SOLANA_DEVNET_CHAIN, SOLANA_TESTNET_CHAIN];\n }\n get features() {\n return {\n [StandardConnect]: {\n version: '1.0.0',\n connect: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_connect, \"f\"),\n },\n [StandardDisconnect]: {\n version: '1.0.0',\n disconnect: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_disconnect, \"f\"),\n },\n [StandardEvents]: {\n version: '1.0.0',\n on: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_on, \"f\"),\n },\n [SolanaSignAndSendTransaction]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signAndSendTransaction: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signAndSendTransaction, \"f\"),\n },\n [SolanaSignTransaction]: {\n version: '1.0.0',\n supportedTransactionVersions: ['legacy', 0],\n signTransaction: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signTransaction, \"f\"),\n },\n [SolanaSignMessage]: {\n version: '1.0.0',\n signMessage: __classPrivateFieldGet(this, _SolflareMetaMaskWallet_signMessage, \"f\"),\n },\n };\n }\n get accounts() {\n return __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\") ? __classPrivateFieldGet(this, _SolflareMetaMaskWallet_solflareMetaMask, \"f\").standardAccounts : [];\n }\n}\n_SolflareMetaMaskWallet_listeners = new WeakMap(), _SolflareMetaMaskWallet_version = new WeakMap(), _SolflareMetaMaskWallet_name = new WeakMap(), _SolflareMetaMaskWallet_icon = new WeakMap(), _SolflareMetaMaskWallet_solflareMetaMask = new WeakMap(), _SolflareMetaMaskWallet_on = new WeakMap(), _SolflareMetaMaskWallet_connect = new WeakMap(), _SolflareMetaMaskWallet_disconnect = new WeakMap(), _SolflareMetaMaskWallet_signAndSendTransaction = new WeakMap(), _SolflareMetaMaskWallet_signTransaction = new WeakMap(), _SolflareMetaMaskWallet_signMessage = new WeakMap(), _SolflareMetaMaskWallet_instances = new WeakSet(), _SolflareMetaMaskWallet_emit = function _SolflareMetaMaskWallet_emit(event, ...args) {\n // eslint-disable-next-line prefer-spread\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.forEach((listener) => listener.apply(null, args));\n}, _SolflareMetaMaskWallet_off = function _SolflareMetaMaskWallet_off(event, listener) {\n __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event] = __classPrivateFieldGet(this, _SolflareMetaMaskWallet_listeners, \"f\")[event]?.filter((existingListener) => listener !== existingListener);\n};\n//# sourceMappingURL=wallet.js.map","import { registerWallet } from '@wallet-standard/wallet';\nimport { SolflareMetaMaskWallet } from './wallet.js';\nlet registered = false;\nfunction register() {\n if (registered)\n return;\n registerWallet(new SolflareMetaMaskWallet());\n registered = true;\n}\n/** @internal */\nexport async function detectAndRegisterSolflareMetaMaskWallet() {\n const id = 'solflare-detect-metamask';\n function postMessage() {\n window.postMessage({\n target: 'metamask-contentscript',\n data: {\n name: 'metamask-provider',\n data: {\n id,\n jsonrpc: '2.0',\n method: 'wallet_getSnaps',\n },\n },\n }, window.location.origin);\n }\n function onMessage(event) {\n const message = event.data;\n if (message?.target === 'metamask-inpage' && message.data?.name === 'metamask-provider') {\n if (message.data.data?.id === id) {\n window.removeEventListener('message', onMessage);\n if (!message.data.data.error) {\n register();\n }\n }\n else {\n postMessage();\n }\n }\n }\n window.addEventListener('message', onMessage);\n window.setTimeout(() => window.removeEventListener('message', onMessage), 5000);\n postMessage();\n}\n//# sourceMappingURL=detect.js.map","import { BaseMessageSignerWalletAdapter, WalletConfigError, WalletConnectionError, WalletDisconnectedError, WalletDisconnectionError, WalletError, WalletLoadError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, isIosAndRedirectable, isVersionedTransaction, scopePollingDetectionStrategy, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nimport { detectAndRegisterSolflareMetaMaskWallet } from './metamask/detect.js';\nexport const SolflareWalletName = 'Solflare';\nexport class SolflareWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor(config = {}) {\n super();\n this.name = SolflareWalletName;\n this.url = 'https://solflare.com';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjUwIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHdpZHRoPSI1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGxpbmVhckdyYWRpZW50IGlkPSJhIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmMxMGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmYjNmMmUiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSI2LjQ3ODM1IiB4Mj0iMzQuOTEwNyIgeGxpbms6aHJlZj0iI2EiIHkxPSI3LjkyIiB5Mj0iMzMuNjU5MyIvPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDQuOTkyMTg4MzIgMTIuMDYzODc5NjMgLTEyLjE4MTEzNjU1IDUuMDQwNzEwNz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5Ni0yMi40Nzk3Yy41MjUgMCAuOTUwNi40MjA5NzMuOTUwNi45NDAyNyAwIC41MTkzLS40MjU2Ljk0MDI3LS45NTA2Ljk0MDI3LS41MjUxIDAtLjk1MDctLjQyMDk3LS45NTA3LS45NDAyNyAwLS41MTkyOTcuNDI1Ni0uOTQwMjcuOTUwNy0uOTQwMjd6IiBmaWxsPSJ1cmwoI2IpIi8+PHBhdGggZD0ibTI0LjU3MSAzMi43NzkyYzQuOTU5NiAwIDguOTgwMi0zLjk3NjUgOC45ODAyLTguODgxOSAwLTQuOTA1My00LjAyMDYtOC44ODE5LTguOTgwMi04Ljg4MTlzLTguOTgwMiAzLjk3NjYtOC45ODAyIDguODgxOWMwIDQuOTA1NCA0LjAyMDYgOC44ODE5IDguOTgwMiA4Ljg4MTl6IiBmaWxsPSJ1cmwoI2MpIi8+PC9zdmc+';\n this.supportedTransactionVersions = new Set(['legacy', 0]);\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._disconnected = () => {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n this._wallet = null;\n this._publicKey = null;\n this.emit('error', new WalletDisconnectedError());\n this.emit('disconnect');\n }\n };\n this._accountChanged = (newPublicKey) => {\n if (!newPublicKey)\n return;\n const publicKey = this._publicKey;\n if (!publicKey)\n return;\n try {\n newPublicKey = new PublicKey(newPublicKey.toBytes());\n }\n catch (error) {\n this.emit('error', new WalletPublicKeyError(error?.message, error));\n return;\n }\n if (publicKey.equals(newPublicKey))\n return;\n this._publicKey = newPublicKey;\n this.emit('connect', newPublicKey);\n };\n this._connecting = false;\n this._publicKey = null;\n this._wallet = null;\n this._config = config;\n if (this._readyState !== WalletReadyState.Unsupported) {\n scopePollingDetectionStrategy(() => {\n if (window.solflare?.isSolflare || window.SolflareApp) {\n this._readyState = WalletReadyState.Installed;\n this.emit('readyStateChange', this._readyState);\n return true;\n }\n return false;\n });\n detectAndRegisterSolflareMetaMaskWallet();\n }\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.connected;\n }\n get readyState() {\n return this._readyState;\n }\n async autoConnect() {\n // Skip autoconnect in the Loadable state on iOS\n // We can't redirect to a universal link without user input\n if (!(this.readyState === WalletReadyState.Loadable && isIosAndRedirectable())) {\n await this.connect();\n }\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable && this._readyState !== WalletReadyState.Installed)\n throw new WalletNotReadyError();\n // redirect to the Solflare /browse universal link\n // this will open the current URL in the Solflare in-wallet browser\n if (this.readyState === WalletReadyState.Loadable && isIosAndRedirectable()) {\n const url = encodeURIComponent(window.location.href);\n const ref = encodeURIComponent(window.location.origin);\n window.location.href = `https://solflare.com/ul/v1/browse/${url}?ref=${ref}`;\n return;\n }\n let SolflareClass;\n try {\n SolflareClass = (await import('@solflare-wallet/sdk')).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let wallet;\n try {\n wallet = new SolflareClass({ network: this._config.network });\n }\n catch (error) {\n throw new WalletConfigError(error?.message, error);\n }\n this._connecting = true;\n if (!wallet.connected) {\n try {\n await wallet.connect();\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n if (!wallet.publicKey)\n throw new WalletConnectionError();\n let publicKey;\n try {\n publicKey = new PublicKey(wallet.publicKey.toBytes());\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n wallet.on('disconnect', this._disconnected);\n wallet.on('accountChanged', this._accountChanged);\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n wallet.off('disconnect', this._disconnected);\n wallet.off('accountChanged', this._accountChanged);\n this._wallet = null;\n this._publicKey = null;\n try {\n await wallet.disconnect();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n if (isVersionedTransaction(transaction)) {\n signers?.length && transaction.sign(signers);\n }\n else {\n transaction = (await this.prepareTransaction(transaction, connection, sendOptions));\n signers?.length && transaction.partialSign(...signers);\n }\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n return await wallet.signAndSendTransaction(transaction, sendOptions);\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return await wallet.signMessage(message, 'utf8');\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","import { BaseMessageSignerWalletAdapter, WalletAccountError, WalletConfigError, WalletConnectionError, WalletDisconnectionError, WalletError, WalletLoadError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSendTransactionError, WalletSignMessageError, WalletSignTransactionError, } from '@solana/wallet-adapter-base';\nimport { PublicKey } from '@solana/web3.js';\nexport const TorusWalletName = 'Torus';\nexport class TorusWalletAdapter extends BaseMessageSignerWalletAdapter {\n constructor({ params = { showTorusButton: false } } = { params: { showTorusButton: false } }) {\n super();\n this.name = TorusWalletName;\n this.url = 'https://tor.us';\n this.icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzMiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMyAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTYuNSIgY3k9IjE2IiByPSIxNiIgZmlsbD0iIzAzNjRGRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjIxODYgOS40OTIxOUMxMC40NTM5IDkuNDkyMTkgOS44MzM5OCAxMC4xMTIxIDkuODMzOTggMTAuODc2OFYxMi40ODk4QzkuODMzOTggMTMuMjU0NSAxMC40NTM5IDEzLjg3NDQgMTEuMjE4NiAxMy44NzQ0SDEzLjY2ODRWMjIuODk3NkMxMy42Njg0IDIzLjY2MjMgMTQuMjg4MyAyNC4yODIyIDE1LjA1MyAyNC4yODIySDE2LjY2NkMxNy40MzA3IDI0LjI4MjIgMTguMDUwNiAyMy42NjIzIDE4LjA1MDYgMjIuODk3NlYxMi41MDE1QzE4LjA1MDYgMTIuNDk3NiAxOC4wNTA2IDEyLjQ5MzcgMTguMDUwNiAxMi40ODk4VjEwLjg3NjhDMTguMDUwNiAxMC4xMTIxIDE3LjQzMDcgOS40OTIxOSAxNi42NjYgOS40OTIxOUgxNS4wNTNIMTEuMjE4NloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yMS4zMzc2IDEzLjg3NDRDMjIuNTQ3NyAxMy44NzQ0IDIzLjUyODcgMTIuODkzNCAyMy41Mjg3IDExLjY4MzNDMjMuNTI4NyAxMC40NzMyIDIyLjU0NzcgOS40OTIxOSAyMS4zMzc2IDkuNDkyMTlDMjAuMTI3NSA5LjQ5MjE5IDE5LjE0NjUgMTAuNDczMiAxOS4xNDY1IDExLjY4MzNDMTkuMTQ2NSAxMi44OTM0IDIwLjEyNzUgMTMuODc0NCAyMS4zMzc2IDEzLjg3NDRaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';\n this.supportedTransactionVersions = null;\n this._readyState = typeof window === 'undefined' || typeof document === 'undefined'\n ? WalletReadyState.Unsupported\n : WalletReadyState.Loadable;\n this._connecting = false;\n this._wallet = null;\n this._publicKey = null;\n this._params = params;\n }\n get publicKey() {\n return this._publicKey;\n }\n get connecting() {\n return this._connecting;\n }\n get connected() {\n return !!this._wallet?.isLoggedIn;\n }\n get readyState() {\n return this._readyState;\n }\n async connect() {\n try {\n if (this.connected || this.connecting)\n return;\n if (this._readyState !== WalletReadyState.Loadable)\n throw new WalletNotReadyError();\n this._connecting = true;\n let TorusClass;\n try {\n TorusClass = (await import('@toruslabs/solana-embed')).default;\n }\n catch (error) {\n throw new WalletLoadError(error?.message, error);\n }\n let wallet;\n try {\n wallet = window.torus || new TorusClass();\n }\n catch (error) {\n throw new WalletConfigError(error?.message, error);\n }\n if (!wallet.isInitialized) {\n try {\n await wallet.init(this._params);\n }\n catch (error) {\n throw new WalletConnectionError(error?.message, error);\n }\n }\n let accounts;\n try {\n accounts = await wallet.login();\n }\n catch (error) {\n throw new WalletAccountError(error?.message, error);\n }\n let publicKey;\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n publicKey = new PublicKey(accounts[0]);\n }\n catch (error) {\n throw new WalletPublicKeyError(error?.message, error);\n }\n this._wallet = wallet;\n this._publicKey = publicKey;\n this.emit('connect', publicKey);\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n finally {\n this._connecting = false;\n }\n }\n async disconnect() {\n const wallet = this._wallet;\n if (wallet) {\n this._wallet = null;\n this._publicKey = null;\n try {\n if (wallet.isLoggedIn)\n await wallet.cleanUp();\n }\n catch (error) {\n this.emit('error', new WalletDisconnectionError(error?.message, error));\n }\n }\n this.emit('disconnect');\n }\n async sendTransaction(transaction, connection, options = {}) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n const { signers, ...sendOptions } = options;\n transaction = await this.prepareTransaction(transaction, connection, sendOptions);\n signers?.length && transaction.partialSign(...signers);\n sendOptions.preflightCommitment = sendOptions.preflightCommitment || connection.commitment;\n const { signature } = await wallet.signAndSendTransaction(transaction, sendOptions);\n return signature;\n }\n catch (error) {\n if (error instanceof WalletError)\n throw error;\n throw new WalletSendTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signTransaction(transaction) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signTransaction(transaction)) || transaction;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signAllTransactions(transactions) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return (await wallet.signAllTransactions(transactions)) || transactions;\n }\n catch (error) {\n throw new WalletSignTransactionError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n async signMessage(message) {\n try {\n const wallet = this._wallet;\n if (!wallet)\n throw new WalletNotConnectedError();\n try {\n return await wallet.signMessage(message);\n }\n catch (error) {\n throw new WalletSignMessageError(error?.message, error);\n }\n }\n catch (error) {\n this.emit('error', error);\n throw error;\n }\n }\n}\n//# sourceMappingURL=adapter.js.map","/** Solana Mainnet (beta) cluster, e.g. https://api.mainnet-beta.solana.com */\nexport const SOLANA_MAINNET_CHAIN = 'solana:mainnet';\n/** Solana Devnet cluster, e.g. https://api.devnet.solana.com */\nexport const SOLANA_DEVNET_CHAIN = 'solana:devnet';\n/** Solana Testnet cluster, e.g. https://api.testnet.solana.com */\nexport const SOLANA_TESTNET_CHAIN = 'solana:testnet';\n/** Solana Localnet cluster, e.g. http://localhost:8899 */\nexport const SOLANA_LOCALNET_CHAIN = 'solana:localnet';\n/** Array of all Solana clusters */\nexport const SOLANA_CHAINS = [\n SOLANA_MAINNET_CHAIN,\n SOLANA_DEVNET_CHAIN,\n SOLANA_TESTNET_CHAIN,\n SOLANA_LOCALNET_CHAIN,\n];\n/**\n * Check if a chain corresponds with one of the Solana clusters.\n */\nexport function isSolanaChain(chain) {\n return SOLANA_CHAINS.includes(chain);\n}\n//# sourceMappingURL=index.js.map","/** Name of the feature. */\nexport const SolanaSignAndSendTransaction = 'solana:signAndSendTransaction';\n//# sourceMappingURL=signAndSendTransaction.js.map","/** Name of the feature. */\nexport const SolanaSignMessage = 'solana:signMessage';\n//# sourceMappingURL=signMessage.js.map","/** Name of the feature. */\nexport const SolanaSignTransaction = 'solana:signTransaction';\n//# sourceMappingURL=signTransaction.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * Will start an infinite loop if field order P is not prime.\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * `inv(0)` will return `undefined` here: make sure to throw an error.\n */\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a finite field over prime. **Non-primes are not supported.**\n * Do not init in loop: slow. Very fragile: always run a benchmark on a change.\n * Major performance optimizations:\n * * a) denormalized operations like mulN instead of mul\n * * b) same object shape: never add or remove keys\n * * c) Object.freeze\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use mapKeyToField instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== 'bigint')\n throw new Error('field order must be bigint');\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key);\n // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n const reduced = mod(num, fieldOrder - _1n) + _1n;\n return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nexport function abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (isBytes(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","import { HashMD } from './_md.js';\nimport u64 from './_u64.js';\nimport { wrapConstructor } from './utils.js';\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => u64.split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nexport class SHA512 extends HashMD {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nexport const sha512 = /* @__PURE__ */ wrapConstructor(() => new SHA512());\nexport const sha512_224 = /* @__PURE__ */ wrapConstructor(() => new SHA512_224());\nexport const sha512_256 = /* @__PURE__ */ wrapConstructor(() => new SHA512_256());\nexport const sha384 = /* @__PURE__ */ wrapConstructor(() => new SHA384());\n//# sourceMappingURL=sha512.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { mod } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _8n = BigInt(8);\n// verification rule is either zip215 or rfc8032 / nist186-5. Consult fromHex:\nconst VERIFY_DEFAULT = { zip215: true };\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(curve, {\n hash: 'function',\n a: 'bigint',\n d: 'bigint',\n randomBytes: 'function',\n }, {\n adjustScalarBytes: 'function',\n domain: 'function',\n uvRatio: 'function',\n mapToCurve: 'function',\n });\n // Set defaults\n return Object.freeze({ ...opts });\n}\n// It is not generic twisted curve for now, but ed25519/ed448 generic implementation\nexport function twistedEdwards(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, prehash: prehash, hash: cHash, randomBytes, nByteLength, h: cofactor, } = CURVE;\n const MASK = _2n << (BigInt(nByteLength * 8) - _1n);\n const modP = Fp.create; // Function overrides\n // sqrt(u/v)\n const uvRatio = CURVE.uvRatio ||\n ((u, v) => {\n try {\n return { isValid: true, value: Fp.sqrt(u * Fp.inv(v)) };\n }\n catch (e) {\n return { isValid: false, value: _0n };\n }\n });\n const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes); // NOOP\n const domain = CURVE.domain ||\n ((data, ctx, phflag) => {\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n const inBig = (n) => typeof n === 'bigint' && _0n < n; // n in [1..]\n const inRange = (n, max) => inBig(n) && inBig(max) && n < max; // n in [1..max-1]\n const in0MaskRange = (n) => n === _0n || inRange(n, MASK); // n in [0..MASK-1]\n function assertInRange(n, max) {\n // n in [1..max-1]\n if (inRange(n, max))\n return n;\n throw new Error(`Expected valid scalar < ${max}, got ${typeof n} ${n}`);\n }\n function assertGE0(n) {\n // n in [0..CURVE_ORDER-1]\n return n === _0n ? n : assertInRange(n, CURVE_ORDER); // GE = prime subgroup, not full group\n }\n const pointPrecomputes = new Map();\n function isPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Extended Point works in extended coordinates: (x, y, z, t) ∋ (x=x/z, y=y/z, t=xy).\n // https://en.wikipedia.org/wiki/Twisted_Edwards_curve#Extended_coordinates\n class Point {\n constructor(ex, ey, ez, et) {\n this.ex = ex;\n this.ey = ey;\n this.ez = ez;\n this.et = et;\n if (!in0MaskRange(ex))\n throw new Error('x required');\n if (!in0MaskRange(ey))\n throw new Error('y required');\n if (!in0MaskRange(ez))\n throw new Error('z required');\n if (!in0MaskRange(et))\n throw new Error('t required');\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error('extended point not allowed');\n const { x, y } = p || {};\n if (!in0MaskRange(x) || !in0MaskRange(y))\n throw new Error('invalid affine point');\n return new Point(x, y, _1n, modP(x * y));\n }\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.ez));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n const { a, d } = CURVE;\n if (this.is0())\n throw new Error('bad point: ZERO'); // TODO: optimize, with vars below?\n // Equation in affine coordinates: ax² + y² = 1 + dx²y²\n // Equation in projective coordinates (X/Z, Y/Z, Z): (aX² + Y²)Z² = Z⁴ + dX²Y²\n const { ex: X, ey: Y, ez: Z, et: T } = this;\n const X2 = modP(X * X); // X²\n const Y2 = modP(Y * Y); // Y²\n const Z2 = modP(Z * Z); // Z²\n const Z4 = modP(Z2 * Z2); // Z⁴\n const aX2 = modP(X2 * a); // aX²\n const left = modP(Z2 * modP(aX2 + Y2)); // (aX² + Y²)Z²\n const right = modP(Z4 + modP(d * modP(X2 * Y2))); // Z⁴ + dX²Y²\n if (left !== right)\n throw new Error('bad point: equation left != right (1)');\n // In Extended coordinates we also have T, which is x*y=T/Z: check X*Y == Z*T\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error('bad point: equation left != right (2)');\n }\n // Compare one point to another.\n equals(other) {\n isPoint(other);\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const { ex: X2, ey: Y2, ez: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n // Flips point sign to a negative one (-x, y in affine coords)\n return new Point(modP(-this.ex), this.ey, this.ez, modP(-this.et));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1 } = this;\n const A = modP(X1 * X1); // A = X12\n const B = modP(Y1 * Y1); // B = Y12\n const C = modP(_2n * modP(Z1 * Z1)); // C = 2*Z12\n const D = modP(a * A); // D = a*A\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B); // E = (X1+Y1)2-A-B\n const G = D + B; // G = D+B\n const F = G - C; // F = G-C\n const H = D - B; // H = D-B\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n isPoint(other);\n const { a, d } = CURVE;\n const { ex: X1, ey: Y1, ez: Z1, et: T1 } = this;\n const { ex: X2, ey: Y2, ez: Z2, et: T2 } = other;\n // Faster algo for adding 2 Extended Points when curve's a=-1.\n // http://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html#addition-add-2008-hwcd-4\n // Cost: 8M + 8add + 2*2.\n // Note: It does not check whether the `other` point is valid.\n if (a === BigInt(-1)) {\n const A = modP((Y1 - X1) * (Y2 + X2));\n const B = modP((Y1 + X1) * (Y2 - X2));\n const F = modP(B - A);\n if (F === _0n)\n return this.double(); // Same point. Tests say it doesn't affect timing\n const C = modP(Z1 * _2n * T2);\n const D = modP(T1 * _2n * Z2);\n const E = D + C;\n const G = B + A;\n const H = D - C;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n const A = modP(X1 * X2); // A = X1*X2\n const B = modP(Y1 * Y2); // B = Y1*Y2\n const C = modP(T1 * d * T2); // C = T1*d*T2\n const D = modP(Z1 * Z2); // D = Z1*Z2\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B); // E = (X1+Y1)*(X2+Y2)-A-B\n const F = D - C; // F = D-C\n const G = D + C; // G = D+C\n const H = modP(B - a * A); // H = B-a*A\n const X3 = modP(E * F); // X3 = E*F\n const Y3 = modP(G * H); // Y3 = G*H\n const T3 = modP(E * H); // T3 = E*H\n const Z3 = modP(F * G); // Z3 = F*G\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const { p, f } = this.wNAF(assertInRange(scalar, CURVE_ORDER));\n return Point.normalizeZ([p, f])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n multiplyUnsafe(scalar) {\n let n = assertGE0(scalar); // 0 <= scalar < CURVE.n\n if (n === _0n)\n return I;\n if (this.equals(I) || n === _1n)\n return this;\n if (this.equals(G))\n return this.wNAF(n).p;\n return wnaf.unsafeLadder(this, n);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafeLadder(this, CURVE_ORDER).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(iz) {\n const { ex: x, ey: y, ez: z } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? _8n : Fp.inv(z); // 8 was chosen arbitrarily\n const ax = modP(x * iz);\n const ay = modP(y * iz);\n const zz = modP(z * iz);\n if (is0)\n return { x: _0n, y: _1n };\n if (zz !== _1n)\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n clearCofactor() {\n const { h: cofactor } = CURVE;\n if (cofactor === _1n)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n // Converts hash string or Uint8Array to Point.\n // Uses algo from RFC8032 5.1.3.\n static fromHex(hex, zip215 = false) {\n const { d, a } = CURVE;\n const len = Fp.BYTES;\n hex = ensureBytes('pointHex', hex, len); // copy hex to a new array\n const normed = hex.slice(); // copy again, we'll manipulate it\n const lastByte = hex[len - 1]; // select last byte\n normed[len - 1] = lastByte & ~0x80; // clear last bit\n const y = ut.bytesToNumberLE(normed);\n if (y === _0n) {\n // y=0 is allowed\n }\n else {\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n if (zip215)\n assertInRange(y, MASK); // zip215=true [1..P-1] (2^255-19-1 for ed25519)\n else\n assertInRange(y, Fp.ORDER); // zip215=false [1..MASK-1] (2^256-1 for ed25519)\n }\n // Ed25519: x² = (y²-1)/(dy²+1) mod p. Ed448: x² = (y²-1)/(dy²-1) mod p. Generic case:\n // ax²+y²=1+dx²y² => y²-1=dx²y²-ax² => y²-1=x²(dy²-a) => x²=(y²-1)/(dy²-a)\n const y2 = modP(y * y); // denominator is always non-0 mod p.\n const u = modP(y2 - _1n); // u = y² - 1\n const v = modP(d * y2 - a); // v = d y² + 1.\n let { isValid, value: x } = uvRatio(u, v); // √(u/v)\n if (!isValid)\n throw new Error('Point.fromHex: invalid y coordinate');\n const isXOdd = (x & _1n) === _1n; // There are 2 square roots. Use x_0 bit to select proper\n const isLastByteOdd = (lastByte & 0x80) !== 0; // x_0, last bit\n if (!zip215 && x === _0n && isLastByteOdd)\n // if x=0 and x_0 = 1, fail\n throw new Error('Point.fromHex: x=0 and x_0=1');\n if (isLastByteOdd !== isXOdd)\n x = modP(-x); // if x_0 != x mod 2, set x = p-x\n return Point.fromAffine({ x, y });\n }\n static fromPrivateKey(privKey) {\n return getExtendedPublicKey(privKey).point;\n }\n toRawBytes() {\n const { x, y } = this.toAffine();\n const bytes = ut.numberToBytesLE(y, Fp.BYTES); // each y has 2 x values (x, -y)\n bytes[bytes.length - 1] |= x & _1n ? 0x80 : 0; // when compressing, it's enough to store y\n return bytes; // and use the last byte to encode sign of x\n }\n toHex() {\n return ut.bytesToHex(this.toRawBytes()); // Same as toRawBytes, but returns string.\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n, _1n, _1n, _0n); // 0, 1, 1, 0\n const { BASE: G, ZERO: I } = Point;\n const wnaf = wNAF(Point, nByteLength * 8);\n function modN(a) {\n return mod(a, CURVE_ORDER);\n }\n // Little-endian SHA512 with modulo n\n function modN_LE(hash) {\n return modN(ut.bytesToNumberLE(hash));\n }\n /** Convenience method that creates public key and other stuff. RFC8032 5.1.5 */\n function getExtendedPublicKey(key) {\n const len = nByteLength;\n key = ensureBytes('private key', key, len);\n // Hash private key with curve's hash function to produce uniformingly random input\n // Check byte lengths: ensure(64, h(ensure(32, key)))\n const hashed = ensureBytes('hashed private key', cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len)); // clear first half bits, produce FE\n const prefix = hashed.slice(len, 2 * len); // second half is called key prefix (5.1.6)\n const scalar = modN_LE(head); // The actual private scalar\n const point = G.multiply(scalar); // Point on Edwards curve aka public key\n const pointBytes = point.toRawBytes(); // Uint8Array representation\n return { head, prefix, scalar, point, pointBytes };\n }\n // Calculates EdDSA pub key. RFC8032 5.1.5. Privkey is hashed. Use first half with 3 bits cleared\n function getPublicKey(privKey) {\n return getExtendedPublicKey(privKey).pointBytes;\n }\n // int('LE', SHA512(dom2(F, C) || msgs)) mod N\n function hashDomainToScalar(context = new Uint8Array(), ...msgs) {\n const msg = ut.concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes('context', context), !!prehash)));\n }\n /** Signs message with privateKey. RFC8032 5.1.6 */\n function sign(msg, privKey, options = {}) {\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph etc.\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(privKey);\n const r = hashDomainToScalar(options.context, prefix, msg); // r = dom2(F, C) || prefix || PH(M)\n const R = G.multiply(r).toRawBytes(); // R = rG\n const k = hashDomainToScalar(options.context, R, pointBytes, msg); // R || A || PH(M)\n const s = modN(r + k * scalar); // S = (r + k * s) mod L\n assertGE0(s); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, nByteLength * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = Fp.BYTES; // Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n sig = ensureBytes('signature', sig, 2 * len); // An extended group equation is checked.\n msg = ensureBytes('message', msg);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n // zip215: true is good for consensus-critical apps and allows points < 2^256\n // zip215: false follows RFC8032 / NIST186-5 and restricts points to CURVE.p\n let A, R, SB;\n try {\n A = Point.fromHex(publicKey, zip215);\n R = Point.fromHex(sig.slice(0, len), zip215);\n SB = G.multiplyUnsafe(s); // 0 <= s < l is done inside\n }\n catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toRawBytes(), A.toRawBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n // [8][S]B = [8]R + [8][k]A'\n return RkA.subtract(SB).clearCofactor().equals(Point.ZERO);\n }\n G._setWindowSize(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n const utils = {\n getExtendedPublicKey,\n // ed25519 private keys are uniform 32b. No need to check for modulo bias, like in secp256k1.\n randomPrivateKey: () => randomBytes(Fp.BYTES),\n /**\n * We're doing scalar multiplication (used in getPublicKey etc) with precomputed BASE_POINT\n * values. This slows down first getPublicKey() by milliseconds (see Speed section),\n * but allows to speed-up subsequent getPublicKey() calls up to 20x.\n * @param windowSize 2, 4, 8, 16\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n },\n };\n return {\n CURVE,\n getPublicKey,\n sign,\n verify,\n ExtendedPoint: Point,\n utils,\n };\n}\n//# sourceMappingURL=edwards.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha512 } from '@noble/hashes/sha512';\nimport { concatBytes, randomBytes, utf8ToBytes } from '@noble/hashes/utils';\nimport { twistedEdwards } from './abstract/edwards.js';\nimport { montgomery } from './abstract/montgomery.js';\nimport { Field, FpSqrtEven, isNegativeLE, mod, pow2 } from './abstract/modular.js';\nimport { bytesToHex, bytesToNumberLE, ensureBytes, equalBytes, numberToBytesLE, } from './abstract/utils.js';\nimport { createHasher, expand_message_xmd } from './abstract/hash-to-curve.js';\n/**\n * ed25519 Twisted Edwards curve with following addons:\n * - X25519 ECDH\n * - Ristretto cofactor elimination\n * - Elligator hash-to-group / point indistinguishability\n */\nconst ED25519_P = BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819949');\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst ED25519_SQRT_M1 = BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _5n = BigInt(5);\n// prettier-ignore\nconst _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\nfunction ed25519_pow_2_252_3(x) {\n const P = ED25519_P;\n const x2 = (x * x) % P;\n const b2 = (x2 * x) % P; // x^3, 11\n const b4 = (pow2(b2, _2n, P) * b2) % P; // x^15, 1111\n const b5 = (pow2(b4, _1n, P) * x) % P; // x^31\n const b10 = (pow2(b5, _5n, P) * b5) % P;\n const b20 = (pow2(b10, _10n, P) * b10) % P;\n const b40 = (pow2(b20, _20n, P) * b20) % P;\n const b80 = (pow2(b40, _40n, P) * b40) % P;\n const b160 = (pow2(b80, _80n, P) * b80) % P;\n const b240 = (pow2(b160, _80n, P) * b80) % P;\n const b250 = (pow2(b240, _10n, P) * b10) % P;\n const pow_p_5_8 = (pow2(b250, _2n, P) * x) % P;\n // ^ To pow to (p+3)/8, multiply it by x.\n return { pow_p_5_8, b2 };\n}\nfunction adjustScalarBytes(bytes) {\n // Section 5: For X25519, in order to decode 32 random bytes as an integer scalar,\n // set the three least significant bits of the first byte\n bytes[0] &= 248; // 0b1111_1000\n // and the most significant bit of the last to zero,\n bytes[31] &= 127; // 0b0111_1111\n // set the second most significant bit of the last byte to 1\n bytes[31] |= 64; // 0b0100_0000\n return bytes;\n}\n// sqrt(u/v)\nfunction uvRatio(u, v) {\n const P = ED25519_P;\n const v3 = mod(v * v * v, P); // v³\n const v7 = mod(v3 * v3 * v, P); // v⁷\n // (p+3)/8 and (p-5)/8\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8\n const vx2 = mod(v * x * x, P); // vx²\n const root1 = x; // First root candidate\n const root2 = mod(x * ED25519_SQRT_M1, P); // Second root candidate\n const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root\n const useRoot2 = vx2 === mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2; // We return root2 anyway, for const-time\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n}\n// Just in case\nexport const ED25519_TORSION_SUBGROUP = [\n '0100000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a',\n '0000000000000000000000000000000000000000000000000000000000000080',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05',\n 'ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f',\n '26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85',\n '0000000000000000000000000000000000000000000000000000000000000000',\n 'c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa',\n];\nconst Fp = Field(ED25519_P, undefined, true);\nconst ed25519Defaults = {\n // Param: a\n a: BigInt(-1), // Fp.create(-1) is proper; our way still works and is faster\n // d is equal to -121665/121666 over finite field.\n // Negative number is P - number, and division is invert(number, P)\n d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),\n // Finite field 𝔽p over which we'll do calculations; 2n**255n - 19n\n Fp,\n // Subgroup order: how many points curve has\n // 2n**252n + 27742317777372353535851937790883648493n;\n n: BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'),\n // Cofactor\n h: BigInt(8),\n // Base point (x, y) aka generator point\n Gx: BigInt('15112221349535400772501151409588531511454012693041857206046113283949847762202'),\n Gy: BigInt('46316835694926478169428394003475163141307993866256225615783033603165251855960'),\n hash: sha512,\n randomBytes,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio,\n};\nexport const ed25519 = /* @__PURE__ */ twistedEdwards(ed25519Defaults);\nfunction ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error('Context is too big');\n return concatBytes(utf8ToBytes('SigEd25519 no Ed25519 collisions'), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n}\nexport const ed25519ctx = /* @__PURE__ */ twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n});\nexport const ed25519ph = /* @__PURE__ */ twistedEdwards({\n ...ed25519Defaults,\n domain: ed25519_domain,\n prehash: sha512,\n});\nexport const x25519 = /* @__PURE__ */ (() => montgomery({\n P: ED25519_P,\n a: BigInt(486662),\n montgomeryBits: 255, // n is 253 bits\n nByteLength: 32,\n Gu: BigInt(9),\n powPminus2: (x) => {\n const P = ED25519_P;\n // x^(p-2) aka x^(2^255-21)\n const { pow_p_5_8, b2 } = ed25519_pow_2_252_3(x);\n return mod(pow2(pow_p_5_8, BigInt(3), P) * b2, P);\n },\n adjustScalarBytes,\n randomBytes,\n}))();\n/**\n * Converts ed25519 public key to x25519 public key. Uses formula:\n * * `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * * `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * @example\n * const someonesPub = ed25519.getPublicKey(ed25519.utils.randomPrivateKey());\n * const aPriv = x25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(aPriv, edwardsToMontgomeryPub(someonesPub))\n */\nexport function edwardsToMontgomeryPub(edwardsPub) {\n const { y } = ed25519.ExtendedPoint.fromHex(edwardsPub);\n const _1n = BigInt(1);\n return Fp.toBytes(Fp.create((_1n + y) * Fp.inv(_1n - y)));\n}\nexport const edwardsToMontgomery = edwardsToMontgomeryPub; // deprecated\n/**\n * Converts ed25519 secret key to x25519 secret key.\n * @example\n * const someonesPub = x25519.getPublicKey(x25519.utils.randomPrivateKey());\n * const aPriv = ed25519.utils.randomPrivateKey();\n * x25519.getSharedSecret(edwardsToMontgomeryPriv(aPriv), someonesPub)\n */\nexport function edwardsToMontgomeryPriv(edwardsPriv) {\n const hashed = ed25519Defaults.hash(edwardsPriv.subarray(0, 32));\n return ed25519Defaults.adjustScalarBytes(hashed).subarray(0, 32);\n}\n// Hash To Curve Elligator2 Map (NOTE: different from ristretto255 elligator)\n// NOTE: very important part is usage of FpSqrtEven for ELL2_C1_EDWARDS, since\n// SageMath returns different root first and everything falls apart\nconst ELL2_C1 = (Fp.ORDER + BigInt(3)) / BigInt(8); // 1. c1 = (q + 3) / 8 # Integer arithmetic\nconst ELL2_C2 = Fp.pow(_2n, ELL2_C1); // 2. c2 = 2^c1\nconst ELL2_C3 = Fp.sqrt(Fp.neg(Fp.ONE)); // 3. c3 = sqrt(-1)\nconst ELL2_C4 = (Fp.ORDER - BigInt(5)) / BigInt(8); // 4. c4 = (q - 5) / 8 # Integer arithmetic\nconst ELL2_J = BigInt(486662);\n// prettier-ignore\nfunction map_to_curve_elligator2_curve25519(u) {\n let tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, _2n); // 2. tv1 = 2 * tv1\n let xd = Fp.add(tv1, Fp.ONE); // 3. xd = tv1 + 1 # Nonzero: -1 is square (mod p), tv1 is not\n let x1n = Fp.neg(ELL2_J); // 4. x1n = -J # x1 = x1n / xd = -J / (1 + 2 * u^2)\n let tv2 = Fp.sqr(xd); // 5. tv2 = xd^2\n let gxd = Fp.mul(tv2, xd); // 6. gxd = tv2 * xd # gxd = xd^3\n let gx1 = Fp.mul(tv1, ELL2_J); // 7. gx1 = J * tv1 # x1n + J * xd\n gx1 = Fp.mul(gx1, x1n); // 8. gx1 = gx1 * x1n # x1n^2 + J * x1n * xd\n gx1 = Fp.add(gx1, tv2); // 9. gx1 = gx1 + tv2 # x1n^2 + J * x1n * xd + xd^2\n gx1 = Fp.mul(gx1, x1n); // 10. gx1 = gx1 * x1n # x1n^3 + J * x1n^2 * xd + x1n * xd^2\n let tv3 = Fp.sqr(gxd); // 11. tv3 = gxd^2\n tv2 = Fp.sqr(tv3); // 12. tv2 = tv3^2 # gxd^4\n tv3 = Fp.mul(tv3, gxd); // 13. tv3 = tv3 * gxd # gxd^3\n tv3 = Fp.mul(tv3, gx1); // 14. tv3 = tv3 * gx1 # gx1 * gxd^3\n tv2 = Fp.mul(tv2, tv3); // 15. tv2 = tv2 * tv3 # gx1 * gxd^7\n let y11 = Fp.pow(tv2, ELL2_C4); // 16. y11 = tv2^c4 # (gx1 * gxd^7)^((p - 5) / 8)\n y11 = Fp.mul(y11, tv3); // 17. y11 = y11 * tv3 # gx1*gxd^3*(gx1*gxd^7)^((p-5)/8)\n let y12 = Fp.mul(y11, ELL2_C3); // 18. y12 = y11 * c3\n tv2 = Fp.sqr(y11); // 19. tv2 = y11^2\n tv2 = Fp.mul(tv2, gxd); // 20. tv2 = tv2 * gxd\n let e1 = Fp.eql(tv2, gx1); // 21. e1 = tv2 == gx1\n let y1 = Fp.cmov(y12, y11, e1); // 22. y1 = CMOV(y12, y11, e1) # If g(x1) is square, this is its sqrt\n let x2n = Fp.mul(x1n, tv1); // 23. x2n = x1n * tv1 # x2 = x2n / xd = 2 * u^2 * x1n / xd\n let y21 = Fp.mul(y11, u); // 24. y21 = y11 * u\n y21 = Fp.mul(y21, ELL2_C2); // 25. y21 = y21 * c2\n let y22 = Fp.mul(y21, ELL2_C3); // 26. y22 = y21 * c3\n let gx2 = Fp.mul(gx1, tv1); // 27. gx2 = gx1 * tv1 # g(x2) = gx2 / gxd = 2 * u^2 * g(x1)\n tv2 = Fp.sqr(y21); // 28. tv2 = y21^2\n tv2 = Fp.mul(tv2, gxd); // 29. tv2 = tv2 * gxd\n let e2 = Fp.eql(tv2, gx2); // 30. e2 = tv2 == gx2\n let y2 = Fp.cmov(y22, y21, e2); // 31. y2 = CMOV(y22, y21, e2) # If g(x2) is square, this is its sqrt\n tv2 = Fp.sqr(y1); // 32. tv2 = y1^2\n tv2 = Fp.mul(tv2, gxd); // 33. tv2 = tv2 * gxd\n let e3 = Fp.eql(tv2, gx1); // 34. e3 = tv2 == gx1\n let xn = Fp.cmov(x2n, x1n, e3); // 35. xn = CMOV(x2n, x1n, e3) # If e3, x = x1, else x = x2\n let y = Fp.cmov(y2, y1, e3); // 36. y = CMOV(y2, y1, e3) # If e3, y = y1, else y = y2\n let e4 = Fp.isOdd(y); // 37. e4 = sgn0(y) == 1 # Fix sign of y\n y = Fp.cmov(y, Fp.neg(y), e3 !== e4); // 38. y = CMOV(y, -y, e3 XOR e4)\n return { xMn: xn, xMd: xd, yMn: y, yMd: _1n }; // 39. return (xn, xd, y, 1)\n}\nconst ELL2_C1_EDWARDS = FpSqrtEven(Fp, Fp.neg(BigInt(486664))); // sgn0(c1) MUST equal 0\nfunction map_to_curve_elligator2_edwards25519(u) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u); // 1. (xMn, xMd, yMn, yMd) =\n // map_to_curve_elligator2_curve25519(u)\n let xn = Fp.mul(xMn, yMd); // 2. xn = xMn * yMd\n xn = Fp.mul(xn, ELL2_C1_EDWARDS); // 3. xn = xn * c1\n let xd = Fp.mul(xMd, yMn); // 4. xd = xMd * yMn # xn / xd = c1 * xM / yM\n let yn = Fp.sub(xMn, xMd); // 5. yn = xMn - xMd\n let yd = Fp.add(xMn, xMd); // 6. yd = xMn + xMd # (n / d - 1) / (n / d + 1) = (n - d) / (n + d)\n let tv1 = Fp.mul(xd, yd); // 7. tv1 = xd * yd\n let e = Fp.eql(tv1, Fp.ZERO); // 8. e = tv1 == 0\n xn = Fp.cmov(xn, Fp.ZERO, e); // 9. xn = CMOV(xn, 0, e)\n xd = Fp.cmov(xd, Fp.ONE, e); // 10. xd = CMOV(xd, 1, e)\n yn = Fp.cmov(yn, Fp.ONE, e); // 11. yn = CMOV(yn, 1, e)\n yd = Fp.cmov(yd, Fp.ONE, e); // 12. yd = CMOV(yd, 1, e)\n const inv = Fp.invertBatch([xd, yd]); // batch division\n return { x: Fp.mul(xn, inv[0]), y: Fp.mul(yn, inv[1]) }; // 13. return (xn, xd, yn, yd)\n}\nconst htf = /* @__PURE__ */ (() => createHasher(ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: 'edwards25519_XMD:SHA-512_ELL2_RO_',\n encodeDST: 'edwards25519_XMD:SHA-512_ELL2_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha512,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\nfunction assertRstPoint(other) {\n if (!(other instanceof RistPoint))\n throw new Error('RistrettoPoint expected');\n}\n// √(-1) aka √(a) aka 2^((p-1)/4)\nconst SQRT_M1 = ED25519_SQRT_M1;\n// √(ad - 1)\nconst SQRT_AD_MINUS_ONE = BigInt('25063068953384623474111414158702152701244531502492656460079210482610430750235');\n// 1 / √(a-d)\nconst INVSQRT_A_MINUS_D = BigInt('54469307008909316920995813868745141605393597292927456921205312896311721017578');\n// 1-d²\nconst ONE_MINUS_D_SQ = BigInt('1159843021668779879193775521855586647937357759715417654439879720876111806838');\n// (d-1)²\nconst D_MINUS_ONE_SQ = BigInt('40440834346308536858101042469323190826248399146238708352240133220865137265952');\n// Calculates 1/√(number)\nconst invertSqrt = (number) => uvRatio(_1n, number);\nconst MAX_255B = BigInt('0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');\nconst bytes255ToNumberLE = (bytes) => ed25519.CURVE.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n// Computes Elligator map for Ristretto\n// https://ristretto.group/formulas/elligator.html\nfunction calcElligatorRistrettoMap(r0) {\n const { d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const r = mod(SQRT_M1 * r0 * r0); // 1\n const Ns = mod((r + _1n) * ONE_MINUS_D_SQ); // 2\n let c = BigInt(-1); // 3\n const D = mod((c - d * r) * mod(r + d)); // 4\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D); // 5\n let s_ = mod(s * r0); // 6\n if (!isNegativeLE(s_, P))\n s_ = mod(-s_);\n if (!Ns_D_is_sq)\n s = s_; // 7\n if (!Ns_D_is_sq)\n c = r; // 8\n const Nt = mod(c * (r - _1n) * D_MINUS_ONE_SQ - D); // 9\n const s2 = s * s;\n const W0 = mod((s + s) * D); // 10\n const W1 = mod(Nt * SQRT_AD_MINUS_ONE); // 11\n const W2 = mod(_1n - s2); // 12\n const W3 = mod(_1n + s2); // 13\n return new ed25519.ExtendedPoint(mod(W0 * W3), mod(W2 * W1), mod(W1 * W3), mod(W0 * W2));\n}\n/**\n * Each ed25519/ExtendedPoint has 8 different equivalent points. This can be\n * a source of bugs for protocols like ring signatures. Ristretto was created to solve this.\n * Ristretto point operates in X:Y:Z:T extended coordinates like ExtendedPoint,\n * but it should work in its own namespace: do not combine those two.\n * https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ristretto255-decaf448\n */\nclass RistPoint {\n // Private property to discourage combining ExtendedPoint + RistrettoPoint\n // Always use Ristretto encoding/decoding instead.\n constructor(ep) {\n this.ep = ep;\n }\n static fromAffine(ap) {\n return new RistPoint(ed25519.ExtendedPoint.fromAffine(ap));\n }\n /**\n * Takes uniform output of 64-byte hash function like sha512 and converts it to `RistrettoPoint`.\n * The hash-to-group operation applies Elligator twice and adds the results.\n * **Note:** this is one-way map, there is no conversion from point to hash.\n * https://ristretto.group/formulas/elligator.html\n * @param hex 64-byte output of a hash function\n */\n static hashToCurve(hex) {\n hex = ensureBytes('ristrettoHash', hex, 64);\n const r1 = bytes255ToNumberLE(hex.slice(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(hex.slice(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new RistPoint(R1.add(R2));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * https://ristretto.group/formulas/decoding.html\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n hex = ensureBytes('ristrettoHex', hex, 32);\n const { a, d } = ed25519.CURVE;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const emsg = 'RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint';\n const s = bytes255ToNumberLE(hex);\n // 1. Check that s_bytes is the canonical encoding of a field element, or else abort.\n // 3. Check that s is non-negative, or else abort\n if (!equalBytes(numberToBytesLE(s, 32), hex) || isNegativeLE(s, P))\n throw new Error(emsg);\n const s2 = mod(s * s);\n const u1 = mod(_1n + a * s2); // 4 (a is -1)\n const u2 = mod(_1n - a * s2); // 5\n const u1_2 = mod(u1 * u1);\n const u2_2 = mod(u2 * u2);\n const v = mod(a * d * u1_2 - u2_2); // 6\n const { isValid, value: I } = invertSqrt(mod(v * u2_2)); // 7\n const Dx = mod(I * u2); // 8\n const Dy = mod(I * Dx * v); // 9\n let x = mod((s + s) * Dx); // 10\n if (isNegativeLE(x, P))\n x = mod(-x); // 10\n const y = mod(u1 * Dy); // 11\n const t = mod(x * y); // 12\n if (!isValid || isNegativeLE(t, P) || y === _0n)\n throw new Error(emsg);\n return new RistPoint(new ed25519.ExtendedPoint(x, y, _1n, t));\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * https://ristretto.group/formulas/encoding.html\n */\n toRawBytes() {\n let { ex: x, ey: y, ez: z, et: t } = this.ep;\n const P = ed25519.CURVE.Fp.ORDER;\n const mod = ed25519.CURVE.Fp.create;\n const u1 = mod(mod(z + y) * mod(z - y)); // 1\n const u2 = mod(x * y); // 2\n // Square root always exists\n const u2sq = mod(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod(u1 * u2sq)); // 3\n const D1 = mod(invsqrt * u1); // 4\n const D2 = mod(invsqrt * u2); // 5\n const zInv = mod(D1 * D2 * t); // 6\n let D; // 7\n if (isNegativeLE(t * zInv, P)) {\n let _x = mod(y * SQRT_M1);\n let _y = mod(x * SQRT_M1);\n x = _x;\n y = _y;\n D = mod(D1 * INVSQRT_A_MINUS_D);\n }\n else {\n D = D2; // 8\n }\n if (isNegativeLE(x * zInv, P))\n y = mod(-y); // 9\n let s = mod((z - y) * D); // 10 (check footer's note, no sqrt(-a))\n if (isNegativeLE(s, P))\n s = mod(-s);\n return numberToBytesLE(s, 32); // 11\n }\n toHex() {\n return bytesToHex(this.toRawBytes());\n }\n toString() {\n return this.toHex();\n }\n // Compare one point to another.\n equals(other) {\n assertRstPoint(other);\n const { ex: X1, ey: Y1 } = this.ep;\n const { ex: X2, ey: Y2 } = other.ep;\n const mod = ed25519.CURVE.Fp.create;\n // (x1 * y2 == y1 * x2) | (y1 * y2 == x1 * x2)\n const one = mod(X1 * Y2) === mod(Y1 * X2);\n const two = mod(Y1 * Y2) === mod(X1 * X2);\n return one || two;\n }\n add(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.add(other.ep));\n }\n subtract(other) {\n assertRstPoint(other);\n return new RistPoint(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return new RistPoint(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return new RistPoint(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return new RistPoint(this.ep.double());\n }\n negate() {\n return new RistPoint(this.ep.negate());\n }\n}\nexport const RistrettoPoint = /* @__PURE__ */ (() => {\n if (!RistPoint.BASE)\n RistPoint.BASE = new RistPoint(ed25519.ExtendedPoint.BASE);\n if (!RistPoint.ZERO)\n RistPoint.ZERO = new RistPoint(ed25519.ExtendedPoint.ZERO);\n return RistPoint;\n})();\n// Hashing to ristretto255. https://www.rfc-editor.org/rfc/rfc9380#appendix-B\nexport const hashToRistretto255 = (msg, options) => {\n const d = options.DST;\n const DST = typeof d === 'string' ? utf8ToBytes(d) : d;\n const uniform_bytes = expand_message_xmd(msg, DST, 64, sha512);\n const P = RistPoint.hashToCurve(uniform_bytes);\n return P;\n};\nexport const hash_to_ristretto255 = hashToRistretto255; // legacy\n//# sourceMappingURL=ed25519.js.map","import { hash as assertHash, bytes as assertBytes, exists as assertExists } from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assertHash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assertExists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assertExists(this);\n assertBytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n ut.abytes(data);\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((_c, point, _isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (ut.isBytes(key))\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n // (0, 1, 0) aka ZERO is invalid in most contexts.\n // In BLS, ZERO can be serialized, so we allow it.\n // (0, 0, 0) is wrong representation of ZERO and is always invalid.\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y;\n try {\n y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n }\n catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? ': ' + sqrtError.message : '';\n throw new Error('Point is not on curve' + suffix);\n }\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod.getMinHashLength(CURVE.n);\n return mod.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = ut.isBytes(item);\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null && ent !== false) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || ut.isBytes(sg)) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0), // equation params: a, b\n b: BigInt(7), // Seem to be rigid: bitcointalk.org/index.php?topic=289795.msg3183975#msg3183975\n Fp, // Field's prime: 2n**256n - 2n**32n - 2n**9n - 2n**8n - 2n**7n - 2n**6n - 2n**4n - 1n\n n: secp256k1N, // Curve order, total count of valid points in the field\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1), // Cofactor\n lowS: true, // Allow only low-S signatures by default in sign() and verify()\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`positive integer expected, not ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`boolean expected, not ${b}`);\n}\n// copied from utils\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(h.outputLen);\n number(h.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map","import { exists, output } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Choice: a ? b : c\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nexport const Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nexport class HashMD extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n exists(this);\n output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_md.js.map","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","import { HashMD, Chi, Maj } from './_md.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state:\n// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends HashMD {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256());\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","import { bytes, exists, number, output } from './_assert.js';\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapXOFConstructorWithOpts, isLE, byteSwap32, } from './utils.js';\n// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.\n// It's called a sponge function.\n// Various per round constants calculations\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nconst _2n = /* @__PURE__ */ BigInt(2);\nconst _7n = /* @__PURE__ */ BigInt(7);\nconst _256n = /* @__PURE__ */ BigInt(256);\nconst _0x71n = /* @__PURE__ */ BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n if (!isLE)\n byteSwap32(this.state32);\n keccakP(this.state32, this.rounds);\n if (!isLE)\n byteSwap32(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n exists(this, false);\n bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = /* @__PURE__ */ gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = /* @__PURE__ */ gen(0x06, 136, 256 / 8);\nexport const sha3_384 = /* @__PURE__ */ gen(0x06, 104, 384 / 8);\nexport const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);\nexport const keccak_224 = /* @__PURE__ */ gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = /* @__PURE__ */ gen(0x01, 136, 256 / 8);\nexport const keccak_384 = /* @__PURE__ */ gen(0x01, 104, 384 / 8);\nexport const keccak_512 = /* @__PURE__ */ gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapXOFConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = /* @__PURE__ */ genShake(0x1f, 168, 128 / 8);\nexport const shake256 = /* @__PURE__ */ genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { bytes as abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nexport const rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nexport const byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\n// Conditionally byte swap if on a big-endian platform\nexport const byteSwapIfBE = isLE ? (n) => n : (n) => byteSwap(n);\n// In place byte swap for Uint32Array\nexport function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import nacl from 'tweetnacl-util';\nimport nacl$1 from 'tweetnacl';\n\nvar CONNECT_EVENT_ERROR_CODES;\n(function (CONNECT_EVENT_ERROR_CODES) {\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"BAD_REQUEST_ERROR\"] = 1] = \"BAD_REQUEST_ERROR\";\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"MANIFEST_NOT_FOUND_ERROR\"] = 2] = \"MANIFEST_NOT_FOUND_ERROR\";\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"MANIFEST_CONTENT_ERROR\"] = 3] = \"MANIFEST_CONTENT_ERROR\";\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"UNKNOWN_APP_ERROR\"] = 100] = \"UNKNOWN_APP_ERROR\";\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"USER_REJECTS_ERROR\"] = 300] = \"USER_REJECTS_ERROR\";\n CONNECT_EVENT_ERROR_CODES[CONNECT_EVENT_ERROR_CODES[\"METHOD_NOT_SUPPORTED\"] = 400] = \"METHOD_NOT_SUPPORTED\";\n})(CONNECT_EVENT_ERROR_CODES || (CONNECT_EVENT_ERROR_CODES = {}));\nvar CONNECT_ITEM_ERROR_CODES;\n(function (CONNECT_ITEM_ERROR_CODES) {\n CONNECT_ITEM_ERROR_CODES[CONNECT_ITEM_ERROR_CODES[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n CONNECT_ITEM_ERROR_CODES[CONNECT_ITEM_ERROR_CODES[\"METHOD_NOT_SUPPORTED\"] = 400] = \"METHOD_NOT_SUPPORTED\";\n})(CONNECT_ITEM_ERROR_CODES || (CONNECT_ITEM_ERROR_CODES = {}));\n\nvar SEND_TRANSACTION_ERROR_CODES;\n(function (SEND_TRANSACTION_ERROR_CODES) {\n SEND_TRANSACTION_ERROR_CODES[SEND_TRANSACTION_ERROR_CODES[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n SEND_TRANSACTION_ERROR_CODES[SEND_TRANSACTION_ERROR_CODES[\"BAD_REQUEST_ERROR\"] = 1] = \"BAD_REQUEST_ERROR\";\n SEND_TRANSACTION_ERROR_CODES[SEND_TRANSACTION_ERROR_CODES[\"UNKNOWN_APP_ERROR\"] = 100] = \"UNKNOWN_APP_ERROR\";\n SEND_TRANSACTION_ERROR_CODES[SEND_TRANSACTION_ERROR_CODES[\"USER_REJECTS_ERROR\"] = 300] = \"USER_REJECTS_ERROR\";\n SEND_TRANSACTION_ERROR_CODES[SEND_TRANSACTION_ERROR_CODES[\"METHOD_NOT_SUPPORTED\"] = 400] = \"METHOD_NOT_SUPPORTED\";\n})(SEND_TRANSACTION_ERROR_CODES || (SEND_TRANSACTION_ERROR_CODES = {}));\n\nvar SIGN_DATA_ERROR_CODES;\n(function (SIGN_DATA_ERROR_CODES) {\n SIGN_DATA_ERROR_CODES[SIGN_DATA_ERROR_CODES[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n SIGN_DATA_ERROR_CODES[SIGN_DATA_ERROR_CODES[\"BAD_REQUEST_ERROR\"] = 1] = \"BAD_REQUEST_ERROR\";\n SIGN_DATA_ERROR_CODES[SIGN_DATA_ERROR_CODES[\"UNKNOWN_APP_ERROR\"] = 100] = \"UNKNOWN_APP_ERROR\";\n SIGN_DATA_ERROR_CODES[SIGN_DATA_ERROR_CODES[\"USER_REJECTS_ERROR\"] = 300] = \"USER_REJECTS_ERROR\";\n SIGN_DATA_ERROR_CODES[SIGN_DATA_ERROR_CODES[\"METHOD_NOT_SUPPORTED\"] = 400] = \"METHOD_NOT_SUPPORTED\";\n})(SIGN_DATA_ERROR_CODES || (SIGN_DATA_ERROR_CODES = {}));\n\nvar DISCONNECT_ERROR_CODES;\n(function (DISCONNECT_ERROR_CODES) {\n DISCONNECT_ERROR_CODES[DISCONNECT_ERROR_CODES[\"UNKNOWN_ERROR\"] = 0] = \"UNKNOWN_ERROR\";\n DISCONNECT_ERROR_CODES[DISCONNECT_ERROR_CODES[\"BAD_REQUEST_ERROR\"] = 1] = \"BAD_REQUEST_ERROR\";\n DISCONNECT_ERROR_CODES[DISCONNECT_ERROR_CODES[\"UNKNOWN_APP_ERROR\"] = 100] = \"UNKNOWN_APP_ERROR\";\n DISCONNECT_ERROR_CODES[DISCONNECT_ERROR_CODES[\"METHOD_NOT_SUPPORTED\"] = 400] = \"METHOD_NOT_SUPPORTED\";\n})(DISCONNECT_ERROR_CODES || (DISCONNECT_ERROR_CODES = {}));\n\nvar CHAIN;\n(function (CHAIN) {\n CHAIN[\"MAINNET\"] = \"-239\";\n CHAIN[\"TESTNET\"] = \"-3\";\n})(CHAIN || (CHAIN = {}));\n\nfunction encodeUint8Array(value, urlSafe) {\n const encoded = nacl.encodeBase64(value);\n if (!urlSafe) {\n return encoded;\n }\n return encodeURIComponent(encoded);\n}\nfunction decodeToUint8Array(value, urlSafe) {\n if (urlSafe) {\n value = decodeURIComponent(value);\n }\n return nacl.decodeBase64(value);\n}\nfunction encode(value, urlSafe = false) {\n let uint8Array;\n if (value instanceof Uint8Array) {\n uint8Array = value;\n }\n else {\n if (typeof value !== 'string') {\n value = JSON.stringify(value);\n }\n uint8Array = nacl.decodeUTF8(value);\n }\n return encodeUint8Array(uint8Array, urlSafe);\n}\nfunction decode(value, urlSafe = false) {\n const decodedUint8Array = decodeToUint8Array(value, urlSafe);\n return {\n toString() {\n return nacl.encodeUTF8(decodedUint8Array);\n },\n toObject() {\n try {\n return JSON.parse(nacl.encodeUTF8(decodedUint8Array));\n }\n catch (e) {\n return null;\n }\n },\n toUint8Array() {\n return decodedUint8Array;\n }\n };\n}\nconst Base64 = {\n encode,\n decode\n};\n\nfunction concatUint8Arrays(buffer1, buffer2) {\n const mergedArray = new Uint8Array(buffer1.length + buffer2.length);\n mergedArray.set(buffer1);\n mergedArray.set(buffer2, buffer1.length);\n return mergedArray;\n}\nfunction splitToUint8Arrays(array, index) {\n if (index >= array.length) {\n throw new Error('Index is out of buffer');\n }\n const subArray1 = array.slice(0, index);\n const subArray2 = array.slice(index);\n return [subArray1, subArray2];\n}\nfunction toHexString(byteArray) {\n let hexString = '';\n byteArray.forEach(byte => {\n hexString += ('0' + (byte & 0xff).toString(16)).slice(-2);\n });\n return hexString;\n}\nfunction hexToByteArray(hexString) {\n if (hexString.length % 2 !== 0) {\n throw new Error(`Cannot convert ${hexString} to bytesArray`);\n }\n const result = new Uint8Array(hexString.length / 2);\n for (let i = 0; i < hexString.length; i += 2) {\n result[i / 2] = parseInt(hexString.slice(i, i + 2), 16);\n }\n return result;\n}\n\nfunction isNode() {\n return (typeof process !== 'undefined' && process.versions != null && process.versions.node != null);\n}\n\nclass SessionCrypto {\n constructor(keyPair) {\n this.nonceLength = 24;\n this.keyPair = keyPair ? this.createKeypairFromString(keyPair) : this.createKeypair();\n this.sessionId = toHexString(this.keyPair.publicKey);\n }\n createKeypair() {\n return nacl$1.box.keyPair();\n }\n createKeypairFromString(keyPair) {\n return {\n publicKey: hexToByteArray(keyPair.publicKey),\n secretKey: hexToByteArray(keyPair.secretKey)\n };\n }\n createNonce() {\n return nacl$1.randomBytes(this.nonceLength);\n }\n encrypt(message, receiverPublicKey) {\n const encodedMessage = new TextEncoder().encode(message);\n const nonce = this.createNonce();\n const encrypted = nacl$1.box(encodedMessage, nonce, receiverPublicKey, this.keyPair.secretKey);\n return concatUint8Arrays(nonce, encrypted);\n }\n decrypt(message, senderPublicKey) {\n const [nonce, internalMessage] = splitToUint8Arrays(message, this.nonceLength);\n const decrypted = nacl$1.box.open(internalMessage, nonce, senderPublicKey, this.keyPair.secretKey);\n if (!decrypted) {\n throw new Error(`Decryption error: \\n message: ${message.toString()} \\n sender pubkey: ${senderPublicKey.toString()} \\n keypair pubkey: ${this.keyPair.publicKey.toString()} \\n keypair secretkey: ${this.keyPair.secretKey.toString()}`);\n }\n return new TextDecoder().decode(decrypted);\n }\n stringifyKeypair() {\n return {\n publicKey: toHexString(this.keyPair.publicKey),\n secretKey: toHexString(this.keyPair.secretKey)\n };\n }\n}\n\nexport { Base64, CHAIN, CONNECT_EVENT_ERROR_CODES, CONNECT_ITEM_ERROR_CODES, DISCONNECT_ERROR_CODES, SEND_TRANSACTION_ERROR_CODES, SIGN_DATA_ERROR_CODES, SessionCrypto, concatUint8Arrays, hexToByteArray, isNode, splitToUint8Arrays, toHexString };\n//# sourceMappingURL=index.mjs.map\n","import { CONNECT_EVENT_ERROR_CODES, SEND_TRANSACTION_ERROR_CODES, Base64, SessionCrypto, hexToByteArray } from '@tonconnect/protocol';\nexport { CHAIN, CONNECT_EVENT_ERROR_CODES, CONNECT_ITEM_ERROR_CODES, SEND_TRANSACTION_ERROR_CODES } from '@tonconnect/protocol';\nimport '@tonconnect/isomorphic-eventsource';\nimport '@tonconnect/isomorphic-fetch';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\n/**\n * Base class for TonConnect errors. You can check if the error was triggered by the @tonconnect/sdk using `err instanceof TonConnectError`.\n */\nclass TonConnectError extends Error {\n constructor(message, options) {\n super(message, options);\n this.message = `${TonConnectError.prefix} ${this.constructor.name}${this.info ? ': ' + this.info : ''}${message ? '\\n' + message : ''}`;\n Object.setPrototypeOf(this, TonConnectError.prototype);\n }\n get info() {\n return '';\n }\n}\nTonConnectError.prefix = '[TON_CONNECT_SDK_ERROR]';\n\n/**\n * Thrown when passed DappMetadata is in incorrect format.\n */\nclass DappMetadataError extends TonConnectError {\n get info() {\n return 'Passed DappMetadata is in incorrect format.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, DappMetadataError.prototype);\n }\n}\n\n/**\n * Thrown when passed manifest contains errors.\n */\nclass ManifestContentErrorError extends TonConnectError {\n get info() {\n return 'Passed `tonconnect-manifest.json` contains errors. Check format of your manifest. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, ManifestContentErrorError.prototype);\n }\n}\n\n/**\n * Thrown when wallet can't get manifest by passed manifestUrl.\n */\nclass ManifestNotFoundError extends TonConnectError {\n get info() {\n return 'Manifest not found. Make sure you added `tonconnect-manifest.json` to the root of your app or passed correct manifestUrl. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, ManifestNotFoundError.prototype);\n }\n}\n\n/**\n * Thrown when wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection.\n */\nclass WalletAlreadyConnectedError extends TonConnectError {\n get info() {\n return 'Wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, WalletAlreadyConnectedError.prototype);\n }\n}\n\n/**\n * Thrown when send transaction or other protocol methods called while wallet is not connected.\n */\nclass WalletNotConnectedError extends TonConnectError {\n get info() {\n return 'Send transaction or other protocol methods called while wallet is not connected.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, WalletNotConnectedError.prototype);\n }\n}\n\nfunction isWalletConnectionSourceJS(value) {\n return 'jsBridgeKey' in value;\n}\n\n/**\n * Thrown when user rejects the action in the wallet.\n */\nclass UserRejectsError extends TonConnectError {\n get info() {\n return 'User rejects the action in the wallet.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, UserRejectsError.prototype);\n }\n}\n\n/**\n * Thrown when request to the wallet contains errors.\n */\nclass BadRequestError extends TonConnectError {\n get info() {\n return 'Request to the wallet contains errors.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, BadRequestError.prototype);\n }\n}\n\n/**\n * Thrown when app tries to send rpc request to the injected wallet while not connected.\n */\nclass UnknownAppError extends TonConnectError {\n get info() {\n return 'App tries to send rpc request to the injected wallet while not connected.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, UnknownAppError.prototype);\n }\n}\n\n/**\n * Thrown when there is an attempt to connect to the injected wallet while it is not exists in the webpage.\n */\nclass WalletNotInjectedError extends TonConnectError {\n get info() {\n return 'There is an attempt to connect to the injected wallet while it is not exists in the webpage.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, WalletNotInjectedError.prototype);\n }\n}\n\n/**\n * Thrown when `Storage` was not specified in the `DappMetadata` and default `localStorage` was not detected in the Node.js environment.\n */\nclass LocalstorageNotFoundError extends TonConnectError {\n get info() {\n return 'Storage was not specified in the `DappMetadata` and default `localStorage` was not detected in the environment.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, LocalstorageNotFoundError.prototype);\n }\n}\n\n/**\n * Thrown when an error occurred while fetching the wallets list.\n */\nclass FetchWalletsError extends TonConnectError {\n get info() {\n return 'An error occurred while fetching the wallets list.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, FetchWalletsError.prototype);\n }\n}\n\n/**\n * Thrown when passed address is in incorrect format.\n */\nclass WrongAddressError extends TonConnectError {\n get info() {\n return 'Passed address is in incorrect format.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, WrongAddressError.prototype);\n }\n}\n\n/**\n * Thrown when passed hex is in incorrect format.\n */\nclass ParseHexError extends TonConnectError {\n get info() {\n return 'Passed hex is in incorrect format.';\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, ParseHexError.prototype);\n }\n}\n\n/**\n * Unhanded unknown error.\n */\nclass UnknownError extends TonConnectError {\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, UnknownError.prototype);\n }\n}\n\nconst connectEventErrorsCodes = {\n [CONNECT_EVENT_ERROR_CODES.UNKNOWN_ERROR]: UnknownError,\n [CONNECT_EVENT_ERROR_CODES.USER_REJECTS_ERROR]: UserRejectsError,\n [CONNECT_EVENT_ERROR_CODES.BAD_REQUEST_ERROR]: BadRequestError,\n [CONNECT_EVENT_ERROR_CODES.UNKNOWN_APP_ERROR]: UnknownAppError,\n [CONNECT_EVENT_ERROR_CODES.MANIFEST_NOT_FOUND_ERROR]: ManifestNotFoundError,\n [CONNECT_EVENT_ERROR_CODES.MANIFEST_CONTENT_ERROR]: ManifestContentErrorError\n};\nclass ConnectErrorsParser {\n parseError(error) {\n let ErrorConstructor = UnknownError;\n if (error.code in connectEventErrorsCodes) {\n ErrorConstructor = connectEventErrorsCodes[error.code] || UnknownError;\n }\n return new ErrorConstructor(error.message);\n }\n}\nconst connectErrorsParser = new ConnectErrorsParser();\n\nclass RpcParser {\n isError(response) {\n return 'error' in response;\n }\n}\n\nconst sendTransactionErrors = {\n [SEND_TRANSACTION_ERROR_CODES.UNKNOWN_ERROR]: UnknownError,\n [SEND_TRANSACTION_ERROR_CODES.USER_REJECTS_ERROR]: UserRejectsError,\n [SEND_TRANSACTION_ERROR_CODES.BAD_REQUEST_ERROR]: BadRequestError,\n [SEND_TRANSACTION_ERROR_CODES.UNKNOWN_APP_ERROR]: UnknownAppError\n};\nclass SendTransactionParser extends RpcParser {\n convertToRpcRequest(request) {\n return {\n method: 'sendTransaction',\n params: [JSON.stringify(request)]\n };\n }\n parseAndThrowError(response) {\n let ErrorConstructor = UnknownError;\n if (response.error.code in sendTransactionErrors) {\n ErrorConstructor = sendTransactionErrors[response.error.code] || UnknownError;\n }\n throw new ErrorConstructor(response.error.message);\n }\n convertFromRpcResponse(rpcResponse) {\n return {\n boc: rpcResponse.result\n };\n }\n}\nconst sendTransactionParser = new SendTransactionParser();\n\nclass HttpBridgeGatewayStorage {\n constructor(storage, bridgeUrl) {\n this.storage = storage;\n this.storeKey = 'ton-connect-storage_http-bridge-gateway::' + bridgeUrl;\n }\n storeLastEventId(lastEventId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storage.setItem(this.storeKey, lastEventId);\n });\n }\n removeLastEventId() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storage.removeItem(this.storeKey);\n });\n }\n getLastEventId() {\n return __awaiter(this, void 0, void 0, function* () {\n const stored = yield this.storage.getItem(this.storeKey);\n if (!stored) {\n return null;\n }\n return stored;\n });\n }\n}\n\nfunction removeUrlLastSlash(url) {\n if (url.slice(-1) === '/') {\n return url.slice(0, -1);\n }\n return url;\n}\nfunction addPathToUrl(url, path) {\n return removeUrlLastSlash(url) + '/' + path;\n}\nfunction isTelegramUrl(link) {\n if (!link) {\n return false;\n }\n const url = new URL(link);\n return url.protocol === 'tg:' || url.hostname === 't.me';\n}\nfunction encodeTelegramUrlParameters(parameters) {\n return parameters\n .replaceAll('.', '%2E')\n .replaceAll('-', '%2D')\n .replaceAll('_', '%5F')\n .replaceAll('&', '-')\n .replaceAll('=', '__')\n .replaceAll('%', '--');\n}\n\n/**\n * Delays the execution of code for a specified number of milliseconds.\n * @param {number} timeout - The number of milliseconds to delay the execution.\n * @param {DelayOptions} [options] - Optional configuration options for the delay.\n * @return {Promise} - A promise that resolves after the specified delay, or rejects if the delay is aborted.\n */\nfunction delay(timeout, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n var _a, _b;\n if ((_a = options === null || options === void 0 ? void 0 : options.signal) === null || _a === void 0 ? void 0 : _a.aborted) {\n reject(new TonConnectError('Delay aborted'));\n return;\n }\n const timeoutId = setTimeout(() => resolve(), timeout);\n (_b = options === null || options === void 0 ? void 0 : options.signal) === null || _b === void 0 ? void 0 : _b.addEventListener('abort', () => {\n clearTimeout(timeoutId);\n reject(new TonConnectError('Delay aborted'));\n });\n });\n });\n}\n\n/**\n * Creates an AbortController instance with an optional AbortSignal.\n *\n * @param {AbortSignal} [signal] - An optional AbortSignal to use for aborting the controller.\n * @returns {AbortController} - An instance of AbortController.\n */\nfunction createAbortController(signal) {\n const abortController = new AbortController();\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n abortController.abort();\n }\n else {\n signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', () => abortController.abort(), { once: true });\n }\n return abortController;\n}\n\n/**\n * Function to call ton api until we get response.\n * Because ton network is pretty unstable we need to make sure response is final.\n * @param {T} fn - function to call\n * @param {CallForSuccessOptions} [options] - optional configuration options\n */\nfunction callForSuccess(fn, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n const attempts = (_a = options === null || options === void 0 ? void 0 : options.attempts) !== null && _a !== void 0 ? _a : 10;\n const delayMs = (_b = options === null || options === void 0 ? void 0 : options.delayMs) !== null && _b !== void 0 ? _b : 200;\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n if (typeof fn !== 'function') {\n throw new TonConnectError(`Expected a function, got ${typeof fn}`);\n }\n let i = 0;\n let lastError;\n while (i < attempts) {\n if (abortController.signal.aborted) {\n throw new TonConnectError(`Aborted after attempts ${i}`);\n }\n try {\n return yield fn({ signal: abortController.signal });\n }\n catch (err) {\n lastError = err;\n i++;\n if (i < attempts) {\n yield delay(delayMs);\n }\n }\n }\n throw lastError;\n });\n}\n\nfunction logDebug(...args) {\n {\n try {\n console.debug('[TON_CONNECT_SDK]', ...args);\n }\n catch (_a) { }\n }\n}\nfunction logError(...args) {\n {\n try {\n console.error('[TON_CONNECT_SDK]', ...args);\n }\n catch (_a) { }\n }\n}\nfunction logWarning(...args) {\n {\n try {\n console.warn('[TON_CONNECT_SDK]', ...args);\n }\n catch (_a) { }\n }\n}\n\n/**\n * Create a resource.\n *\n * @template T - The type of the resource.\n * @template Args - The type of the arguments for creating the resource.\n *\n * @param {(...args: Args) => Promise} createFn - A function that creates the resource.\n * @param {(resource: T) => Promise} [disposeFn] - An optional function that disposes the resource.\n */\nfunction createResource(createFn, disposeFn) {\n let currentResource = null;\n let currentArgs = null;\n let currentPromise = null;\n let currentSignal = null;\n let abortController = null;\n // create a new resource\n const create = (signal, ...args) => __awaiter(this, void 0, void 0, function* () {\n currentSignal = signal !== null && signal !== void 0 ? signal : null;\n abortController === null || abortController === void 0 ? void 0 : abortController.abort();\n abortController = createAbortController(signal);\n if (abortController.signal.aborted) {\n throw new TonConnectError('Resource creation was aborted');\n }\n currentArgs = args !== null && args !== void 0 ? args : null;\n const promise = createFn(abortController.signal, ...args);\n currentPromise = promise;\n const resource = yield promise;\n if (currentPromise !== promise && resource !== currentResource) {\n yield disposeFn(resource);\n throw new TonConnectError('Resource creation was aborted by a new resource creation');\n }\n currentResource = resource;\n return currentResource;\n });\n // get the current resource\n const current = () => {\n return currentResource !== null && currentResource !== void 0 ? currentResource : null;\n };\n // dispose the current resource\n const dispose = () => __awaiter(this, void 0, void 0, function* () {\n try {\n const resource = currentResource;\n currentResource = null;\n const promise = currentPromise;\n currentPromise = null;\n try {\n abortController === null || abortController === void 0 ? void 0 : abortController.abort();\n }\n catch (e) { }\n yield Promise.allSettled([\n resource ? disposeFn(resource) : Promise.resolve(),\n promise ? disposeFn(yield promise) : Promise.resolve()\n ]);\n }\n catch (e) { }\n });\n // recreate the current resource\n const recreate = (delayMs) => __awaiter(this, void 0, void 0, function* () {\n const resource = currentResource;\n const promise = currentPromise;\n const args = currentArgs;\n const signal = currentSignal;\n yield delay(delayMs);\n if (resource === currentResource &&\n promise === currentPromise &&\n args === currentArgs &&\n signal === currentSignal) {\n return yield create(currentSignal, ...(args !== null && args !== void 0 ? args : []));\n }\n throw new TonConnectError('Resource recreation was aborted by a new resource creation');\n });\n return {\n create,\n current,\n dispose,\n recreate\n };\n}\n\n/**\n * Executes a function and provides deferred behavior, allowing for a timeout and abort functionality.\n *\n * @param {Deferrable} fn - The function to execute. It should return a promise that resolves with the desired result.\n * @param {DeferOptions} options - Optional configuration options for the defer behavior.\n * @returns {Promise} - A promise that resolves with the result of the executed function, or rejects with an error if it times out or is aborted.\n */\nfunction timeout(fn, options) {\n const timeout = options === null || options === void 0 ? void 0 : options.timeout;\n const signal = options === null || options === void 0 ? void 0 : options.signal;\n const abortController = createAbortController(signal);\n return new Promise((resolve, reject) => {\n if (abortController.signal.aborted) {\n reject(new TonConnectError('Operation aborted'));\n return;\n }\n let timeoutId;\n if (typeof timeout !== 'undefined') {\n timeoutId = setTimeout(() => {\n abortController.abort();\n reject(new TonConnectError(`Timeout after ${timeout}ms`));\n }, timeout);\n }\n abortController.signal.addEventListener('abort', () => {\n clearTimeout(timeoutId);\n reject(new TonConnectError('Operation aborted'));\n }, { once: true });\n const deferOptions = { timeout, abort: abortController.signal };\n fn(resolve, reject, deferOptions).finally(() => clearTimeout(timeoutId));\n });\n}\n\nclass BridgeGateway {\n constructor(storage, bridgeUrl, sessionId, listener, errorsListener) {\n this.bridgeUrl = bridgeUrl;\n this.sessionId = sessionId;\n this.listener = listener;\n this.errorsListener = errorsListener;\n this.ssePath = 'events';\n this.postPath = 'message';\n this.heartbeatMessage = 'heartbeat';\n this.defaultTtl = 300;\n this.defaultReconnectDelay = 5000;\n this.eventSource = createResource((signal, openingDeadlineMS) => __awaiter(this, void 0, void 0, function* () {\n const eventSourceConfig = {\n bridgeUrl: this.bridgeUrl,\n ssePath: this.ssePath,\n sessionId: this.sessionId,\n bridgeGatewayStorage: this.bridgeGatewayStorage,\n errorHandler: this.errorsHandler.bind(this),\n messageHandler: this.messagesHandler.bind(this),\n signal: signal,\n openingDeadlineMS: openingDeadlineMS\n };\n return yield createEventSource(eventSourceConfig);\n }), (resource) => __awaiter(this, void 0, void 0, function* () {\n resource.close();\n }));\n this.bridgeGatewayStorage = new HttpBridgeGatewayStorage(storage, bridgeUrl);\n }\n get isReady() {\n const eventSource = this.eventSource.current();\n return (eventSource === null || eventSource === void 0 ? void 0 : eventSource.readyState) === EventSource.OPEN;\n }\n get isClosed() {\n const eventSource = this.eventSource.current();\n return (eventSource === null || eventSource === void 0 ? void 0 : eventSource.readyState) !== EventSource.OPEN;\n }\n get isConnecting() {\n const eventSource = this.eventSource.current();\n return (eventSource === null || eventSource === void 0 ? void 0 : eventSource.readyState) === EventSource.CONNECTING;\n }\n registerSession(options) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.eventSource.create(options === null || options === void 0 ? void 0 : options.signal, options === null || options === void 0 ? void 0 : options.openingDeadlineMS);\n });\n }\n send(message, receiver, topic, ttlOrOptions) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n // TODO: remove deprecated method\n const options = {};\n if (typeof ttlOrOptions === 'number') {\n options.ttl = ttlOrOptions;\n }\n else {\n options.ttl = ttlOrOptions === null || ttlOrOptions === void 0 ? void 0 : ttlOrOptions.ttl;\n options.signal = ttlOrOptions === null || ttlOrOptions === void 0 ? void 0 : ttlOrOptions.signal;\n options.attempts = ttlOrOptions === null || ttlOrOptions === void 0 ? void 0 : ttlOrOptions.attempts;\n }\n const url = new URL(addPathToUrl(this.bridgeUrl, this.postPath));\n url.searchParams.append('client_id', this.sessionId);\n url.searchParams.append('to', receiver);\n url.searchParams.append('ttl', ((options === null || options === void 0 ? void 0 : options.ttl) || this.defaultTtl).toString());\n url.searchParams.append('topic', topic);\n const body = Base64.encode(message);\n yield callForSuccess((options) => __awaiter(this, void 0, void 0, function* () {\n const response = yield this.post(url, body, options.signal);\n if (!response.ok) {\n throw new TonConnectError(`Bridge send failed, status ${response.status}`);\n }\n }), {\n attempts: (_a = options === null || options === void 0 ? void 0 : options.attempts) !== null && _a !== void 0 ? _a : Number.MAX_SAFE_INTEGER,\n delayMs: 5000,\n signal: options === null || options === void 0 ? void 0 : options.signal\n });\n });\n }\n pause() {\n this.eventSource.dispose().catch(e => logError(`Bridge pause failed, ${e}`));\n }\n unPause() {\n return __awaiter(this, void 0, void 0, function* () {\n const RECREATE_WITHOUT_DELAY = 0;\n yield this.eventSource.recreate(RECREATE_WITHOUT_DELAY);\n });\n }\n close() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.eventSource.dispose().catch(e => logError(`Bridge close failed, ${e}`));\n });\n }\n setListener(listener) {\n this.listener = listener;\n }\n setErrorsListener(errorsListener) {\n this.errorsListener = errorsListener;\n }\n post(url, body, signal) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield fetch(url, {\n method: 'post',\n body: body,\n signal: signal\n });\n if (!response.ok) {\n throw new TonConnectError(`Bridge send failed, status ${response.status}`);\n }\n return response;\n });\n }\n errorsHandler(eventSource, e) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.isConnecting) {\n logError('Bridge error', JSON.stringify(e));\n return;\n }\n if (this.isReady) {\n try {\n this.errorsListener(e);\n }\n catch (e) { }\n return;\n }\n if (this.isClosed) {\n eventSource.close();\n logDebug(`Bridge reconnecting, ${this.defaultReconnectDelay}ms delay`);\n return yield this.eventSource.recreate(this.defaultReconnectDelay);\n }\n throw new TonConnectError('Bridge error, unknown state');\n });\n }\n messagesHandler(e) {\n return __awaiter(this, void 0, void 0, function* () {\n if (e.data === this.heartbeatMessage) {\n return;\n }\n yield this.bridgeGatewayStorage.storeLastEventId(e.lastEventId);\n if (this.isClosed) {\n return;\n }\n let bridgeIncomingMessage;\n try {\n bridgeIncomingMessage = JSON.parse(e.data);\n }\n catch (e) {\n throw new TonConnectError(`Bridge message parse failed, message ${e.data}`);\n }\n this.listener(bridgeIncomingMessage);\n });\n }\n}\n/**\n * Creates an event source.\n * @param {CreateEventSourceConfig} config - Configuration for creating an event source.\n */\nfunction createEventSource(config) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield timeout((resolve, reject, deferOptions) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n const abortController = createAbortController(deferOptions.signal);\n const signal = abortController.signal;\n if (signal.aborted) {\n reject(new TonConnectError('Bridge connection aborted'));\n return;\n }\n const url = new URL(addPathToUrl(config.bridgeUrl, config.ssePath));\n url.searchParams.append('client_id', config.sessionId);\n const lastEventId = yield config.bridgeGatewayStorage.getLastEventId();\n if (lastEventId) {\n url.searchParams.append('last_event_id', lastEventId);\n }\n if (signal.aborted) {\n reject(new TonConnectError('Bridge connection aborted'));\n return;\n }\n const eventSource = new EventSource(url.toString());\n eventSource.onerror = (reason) => __awaiter(this, void 0, void 0, function* () {\n if (signal.aborted) {\n eventSource.close();\n reject(new TonConnectError('Bridge connection aborted'));\n return;\n }\n try {\n const newInstance = yield config.errorHandler(eventSource, reason);\n if (newInstance !== eventSource) {\n eventSource.close();\n }\n if (newInstance && newInstance !== eventSource) {\n resolve(newInstance);\n }\n }\n catch (e) {\n eventSource.close();\n reject(e);\n }\n });\n eventSource.onopen = () => {\n if (signal.aborted) {\n eventSource.close();\n reject(new TonConnectError('Bridge connection aborted'));\n return;\n }\n resolve(eventSource);\n };\n eventSource.onmessage = (event) => {\n if (signal.aborted) {\n eventSource.close();\n reject(new TonConnectError('Bridge connection aborted'));\n return;\n }\n config.messageHandler(event);\n };\n (_a = config.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => {\n eventSource.close();\n reject(new TonConnectError('Bridge connection aborted'));\n });\n }), { timeout: config.openingDeadlineMS, signal: config.signal });\n });\n}\n\nfunction isPendingConnectionHttp(connection) {\n return !('connectEvent' in connection);\n}\n\nclass BridgeConnectionStorage {\n constructor(storage) {\n this.storage = storage;\n this.storeKey = 'ton-connect-storage_bridge-connection';\n }\n storeConnection(connection) {\n return __awaiter(this, void 0, void 0, function* () {\n if (connection.type === 'injected') {\n return this.storage.setItem(this.storeKey, JSON.stringify(connection));\n }\n if (!isPendingConnectionHttp(connection)) {\n const rawSession = {\n sessionKeyPair: connection.session.sessionCrypto.stringifyKeypair(),\n walletPublicKey: connection.session.walletPublicKey,\n bridgeUrl: connection.session.bridgeUrl\n };\n const rawConnection = {\n type: 'http',\n connectEvent: connection.connectEvent,\n session: rawSession,\n lastWalletEventId: connection.lastWalletEventId,\n nextRpcRequestId: connection.nextRpcRequestId\n };\n return this.storage.setItem(this.storeKey, JSON.stringify(rawConnection));\n }\n const rawConnection = {\n type: 'http',\n connectionSource: connection.connectionSource,\n sessionCrypto: connection.sessionCrypto.stringifyKeypair()\n };\n return this.storage.setItem(this.storeKey, JSON.stringify(rawConnection));\n });\n }\n removeConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storage.removeItem(this.storeKey);\n });\n }\n getConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n const stored = yield this.storage.getItem(this.storeKey);\n if (!stored) {\n return null;\n }\n const connection = JSON.parse(stored);\n if (connection.type === 'injected') {\n return connection;\n }\n if ('connectEvent' in connection) {\n const sessionCrypto = new SessionCrypto(connection.session.sessionKeyPair);\n return {\n type: 'http',\n connectEvent: connection.connectEvent,\n lastWalletEventId: connection.lastWalletEventId,\n nextRpcRequestId: connection.nextRpcRequestId,\n session: {\n sessionCrypto,\n bridgeUrl: connection.session.bridgeUrl,\n walletPublicKey: connection.session.walletPublicKey\n }\n };\n }\n return {\n type: 'http',\n sessionCrypto: new SessionCrypto(connection.sessionCrypto),\n connectionSource: connection.connectionSource\n };\n });\n }\n getHttpConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (!connection) {\n throw new TonConnectError('Trying to read HTTP connection source while nothing is stored');\n }\n if (connection.type === 'injected') {\n throw new TonConnectError('Trying to read HTTP connection source while injected connection is stored');\n }\n return connection;\n });\n }\n getHttpPendingConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (!connection) {\n throw new TonConnectError('Trying to read HTTP connection source while nothing is stored');\n }\n if (connection.type === 'injected') {\n throw new TonConnectError('Trying to read HTTP connection source while injected connection is stored');\n }\n if (!isPendingConnectionHttp(connection)) {\n throw new TonConnectError('Trying to read HTTP-pending connection while http connection is stored');\n }\n return connection;\n });\n }\n getInjectedConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (!connection) {\n throw new TonConnectError('Trying to read Injected bridge connection source while nothing is stored');\n }\n if ((connection === null || connection === void 0 ? void 0 : connection.type) === 'http') {\n throw new TonConnectError('Trying to read Injected bridge connection source while HTTP connection is stored');\n }\n return connection;\n });\n }\n storedConnectionType() {\n return __awaiter(this, void 0, void 0, function* () {\n const stored = yield this.storage.getItem(this.storeKey);\n if (!stored) {\n return null;\n }\n const connection = JSON.parse(stored);\n return connection.type;\n });\n }\n storeLastWalletEventId(id) {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (connection && connection.type === 'http' && !isPendingConnectionHttp(connection)) {\n connection.lastWalletEventId = id;\n return this.storeConnection(connection);\n }\n });\n }\n getLastWalletEventId() {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (connection && 'lastWalletEventId' in connection) {\n return connection.lastWalletEventId;\n }\n return undefined;\n });\n }\n increaseNextRpcRequestId() {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (connection && 'nextRpcRequestId' in connection) {\n const lastId = connection.nextRpcRequestId || 0;\n connection.nextRpcRequestId = lastId + 1;\n return this.storeConnection(connection);\n }\n });\n }\n getNextRpcRequestId() {\n return __awaiter(this, void 0, void 0, function* () {\n const connection = yield this.getConnection();\n if (connection && 'nextRpcRequestId' in connection) {\n return connection.nextRpcRequestId || 0;\n }\n return 0;\n });\n }\n}\n\nconst PROTOCOL_VERSION = 2;\n\nclass BridgeProvider {\n constructor(storage, walletConnectionSource) {\n this.storage = storage;\n this.walletConnectionSource = walletConnectionSource;\n this.type = 'http';\n this.standardUniversalLink = 'tc://';\n this.pendingRequests = new Map();\n this.session = null;\n this.gateway = null;\n this.pendingGateways = [];\n this.listeners = [];\n this.defaultOpeningDeadlineMS = 5000;\n this.connectionStorage = new BridgeConnectionStorage(storage);\n }\n static fromStorage(storage) {\n return __awaiter(this, void 0, void 0, function* () {\n const bridgeConnectionStorage = new BridgeConnectionStorage(storage);\n const connection = yield bridgeConnectionStorage.getHttpConnection();\n if (isPendingConnectionHttp(connection)) {\n return new BridgeProvider(storage, connection.connectionSource);\n }\n return new BridgeProvider(storage, { bridgeUrl: connection.session.bridgeUrl });\n });\n }\n connect(message, options) {\n var _a;\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();\n this.abortController = abortController;\n this.closeGateways();\n const sessionCrypto = new SessionCrypto();\n this.session = {\n sessionCrypto,\n bridgeUrl: 'bridgeUrl' in this.walletConnectionSource\n ? this.walletConnectionSource.bridgeUrl\n : ''\n };\n this.connectionStorage\n .storeConnection({\n type: 'http',\n connectionSource: this.walletConnectionSource,\n sessionCrypto\n })\n .then(() => __awaiter(this, void 0, void 0, function* () {\n if (abortController.signal.aborted) {\n return;\n }\n yield callForSuccess(_options => this.openGateways(sessionCrypto, {\n openingDeadlineMS: options === null || options === void 0 ? void 0 : options.openingDeadlineMS,\n signal: _options === null || _options === void 0 ? void 0 : _options.signal\n }), {\n attempts: Number.MAX_SAFE_INTEGER,\n delayMs: 5000,\n signal: abortController.signal\n });\n }));\n const universalLink = 'universalLink' in this.walletConnectionSource &&\n this.walletConnectionSource.universalLink\n ? this.walletConnectionSource.universalLink\n : this.standardUniversalLink;\n return this.generateUniversalLink(universalLink, message);\n }\n restoreConnection(options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();\n this.abortController = abortController;\n if (abortController.signal.aborted) {\n return;\n }\n this.closeGateways();\n const storedConnection = yield this.connectionStorage.getHttpConnection();\n if (!storedConnection) {\n return;\n }\n if (abortController.signal.aborted) {\n return;\n }\n const openingDeadlineMS = (_b = options === null || options === void 0 ? void 0 : options.openingDeadlineMS) !== null && _b !== void 0 ? _b : this.defaultOpeningDeadlineMS;\n if (isPendingConnectionHttp(storedConnection)) {\n this.session = {\n sessionCrypto: storedConnection.sessionCrypto,\n bridgeUrl: 'bridgeUrl' in this.walletConnectionSource\n ? this.walletConnectionSource.bridgeUrl\n : ''\n };\n return yield this.openGateways(storedConnection.sessionCrypto, {\n openingDeadlineMS: openingDeadlineMS,\n signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal\n });\n }\n if (Array.isArray(this.walletConnectionSource)) {\n throw new TonConnectError('Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.');\n }\n this.session = storedConnection.session;\n if (this.gateway) {\n logDebug('Gateway is already opened, closing previous gateway');\n yield this.gateway.close();\n }\n this.gateway = new BridgeGateway(this.storage, this.walletConnectionSource.bridgeUrl, storedConnection.session.sessionCrypto.sessionId, this.gatewayListener.bind(this), this.gatewayErrorsListener.bind(this));\n if (abortController.signal.aborted) {\n return;\n }\n // notify listeners about stored connection\n this.listeners.forEach(listener => listener(storedConnection.connectEvent));\n // wait for the connection to be opened\n try {\n yield callForSuccess(options => this.gateway.registerSession({\n openingDeadlineMS: openingDeadlineMS,\n signal: options.signal\n }), {\n attempts: Number.MAX_SAFE_INTEGER,\n delayMs: 5000,\n signal: abortController.signal\n });\n }\n catch (e) {\n yield this.disconnect({ signal: abortController.signal });\n return;\n }\n });\n }\n sendRequest(request, optionsOrOnRequestSent) {\n // TODO: remove deprecated method\n const options = {};\n if (typeof optionsOrOnRequestSent === 'function') {\n options.onRequestSent = optionsOrOnRequestSent;\n }\n else {\n options.onRequestSent = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.onRequestSent;\n options.signal = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.signal;\n options.attempts = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.attempts;\n }\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (!this.gateway || !this.session || !('walletPublicKey' in this.session)) {\n throw new TonConnectError('Trying to send bridge request without session');\n }\n const id = (yield this.connectionStorage.getNextRpcRequestId()).toString();\n yield this.connectionStorage.increaseNextRpcRequestId();\n logDebug('Send http-bridge request:', Object.assign(Object.assign({}, request), { id }));\n const encodedRequest = this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({}, request), { id })), hexToByteArray(this.session.walletPublicKey));\n try {\n yield this.gateway.send(encodedRequest, this.session.walletPublicKey, request.method, { attempts: options === null || options === void 0 ? void 0 : options.attempts, signal: options === null || options === void 0 ? void 0 : options.signal });\n (_a = options === null || options === void 0 ? void 0 : options.onRequestSent) === null || _a === void 0 ? void 0 : _a.call(options);\n this.pendingRequests.set(id.toString(), resolve);\n }\n catch (e) {\n reject(e);\n }\n }));\n }\n closeConnection() {\n this.closeGateways();\n this.listeners = [];\n this.session = null;\n this.gateway = null;\n }\n disconnect(options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let called = false;\n let timeoutId = null;\n const onRequestSent = () => {\n if (!called) {\n called = true;\n this.removeBridgeAndSession().then(resolve);\n }\n };\n try {\n this.closeGateways();\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n timeoutId = setTimeout(() => {\n abortController.abort();\n }, this.defaultOpeningDeadlineMS);\n yield this.sendRequest({ method: 'disconnect', params: [] }, {\n onRequestSent: onRequestSent,\n signal: abortController.signal,\n attempts: 1,\n });\n }\n catch (e) {\n logDebug('Disconnect error:', e);\n if (!called) {\n this.removeBridgeAndSession().then(resolve);\n }\n }\n finally {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n onRequestSent();\n }\n }));\n });\n }\n listen(callback) {\n this.listeners.push(callback);\n return () => (this.listeners = this.listeners.filter(listener => listener !== callback));\n }\n pause() {\n var _a;\n (_a = this.gateway) === null || _a === void 0 ? void 0 : _a.pause();\n this.pendingGateways.forEach(bridge => bridge.pause());\n }\n unPause() {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = this.pendingGateways.map(bridge => bridge.unPause());\n if (this.gateway) {\n promises.push(this.gateway.unPause());\n }\n yield Promise.all(promises);\n });\n }\n pendingGatewaysListener(gateway, bridgeUrl, bridgeIncomingMessage) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.pendingGateways.includes(gateway)) {\n yield gateway.close();\n return;\n }\n this.closeGateways({ except: gateway });\n if (this.gateway) {\n logDebug('Gateway is already opened, closing previous gateway');\n yield this.gateway.close();\n }\n this.session.bridgeUrl = bridgeUrl;\n this.gateway = gateway;\n this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this));\n this.gateway.setListener(this.gatewayListener.bind(this));\n return this.gatewayListener(bridgeIncomingMessage);\n });\n }\n gatewayListener(bridgeIncomingMessage) {\n return __awaiter(this, void 0, void 0, function* () {\n const walletMessage = JSON.parse(this.session.sessionCrypto.decrypt(Base64.decode(bridgeIncomingMessage.message).toUint8Array(), hexToByteArray(bridgeIncomingMessage.from)));\n logDebug('Wallet message received:', walletMessage);\n if (!('event' in walletMessage)) {\n const id = walletMessage.id.toString();\n const resolve = this.pendingRequests.get(id);\n if (!resolve) {\n logDebug(`Response id ${id} doesn't match any request's id`);\n return;\n }\n resolve(walletMessage);\n this.pendingRequests.delete(id);\n return;\n }\n if (walletMessage.id !== undefined) {\n const lastId = yield this.connectionStorage.getLastWalletEventId();\n if (lastId !== undefined && walletMessage.id <= lastId) {\n logError(`Received event id (=${walletMessage.id}) must be greater than stored last wallet event id (=${lastId}) `);\n return;\n }\n if (walletMessage.event !== 'connect') {\n yield this.connectionStorage.storeLastWalletEventId(walletMessage.id);\n }\n }\n // `this.listeners` might be modified in the event handler\n const listeners = this.listeners;\n if (walletMessage.event === 'connect') {\n yield this.updateSession(walletMessage, bridgeIncomingMessage.from);\n }\n if (walletMessage.event === 'disconnect') {\n logDebug(`Removing bridge and session: received disconnect event`);\n yield this.removeBridgeAndSession();\n }\n listeners.forEach(listener => listener(walletMessage));\n });\n }\n gatewayErrorsListener(e) {\n return __awaiter(this, void 0, void 0, function* () {\n throw new TonConnectError(`Bridge error ${JSON.stringify(e)}`);\n });\n }\n updateSession(connectEvent, walletPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n this.session = Object.assign(Object.assign({}, this.session), { walletPublicKey });\n const tonAddrItem = connectEvent.payload.items.find(item => item.name === 'ton_addr');\n const connectEventToSave = Object.assign(Object.assign({}, connectEvent), { payload: Object.assign(Object.assign({}, connectEvent.payload), { items: [tonAddrItem] }) });\n yield this.connectionStorage.storeConnection({\n type: 'http',\n session: this.session,\n lastWalletEventId: connectEvent.id,\n connectEvent: connectEventToSave,\n nextRpcRequestId: 0\n });\n });\n }\n removeBridgeAndSession() {\n return __awaiter(this, void 0, void 0, function* () {\n this.closeConnection();\n yield this.connectionStorage.removeConnection();\n });\n }\n generateUniversalLink(universalLink, message) {\n if (isTelegramUrl(universalLink)) {\n return this.generateTGUniversalLink(universalLink, message);\n }\n return this.generateRegularUniversalLink(universalLink, message);\n }\n generateRegularUniversalLink(universalLink, message) {\n const url = new URL(universalLink);\n url.searchParams.append('v', PROTOCOL_VERSION.toString());\n url.searchParams.append('id', this.session.sessionCrypto.sessionId);\n url.searchParams.append('r', JSON.stringify(message));\n return url.toString();\n }\n generateTGUniversalLink(universalLink, message) {\n const urlToWrap = this.generateRegularUniversalLink('about:blank', message);\n const linkParams = urlToWrap.split('?')[1];\n const startapp = 'tonconnect-' + encodeTelegramUrlParameters(linkParams);\n // TODO: Remove this line after all dApps and the wallets-list.json have been updated\n const updatedUniversalLink = this.convertToDirectLink(universalLink);\n const url = new URL(updatedUniversalLink);\n url.searchParams.append('startapp', startapp);\n return url.toString();\n }\n // TODO: Remove this method after all dApps and the wallets-list.json have been updated\n convertToDirectLink(universalLink) {\n const url = new URL(universalLink);\n if (url.searchParams.has('attach')) {\n url.searchParams.delete('attach');\n url.pathname += '/start';\n }\n return url.toString();\n }\n openGateways(sessionCrypto, options) {\n return __awaiter(this, void 0, void 0, function* () {\n if (Array.isArray(this.walletConnectionSource)) {\n // close all gateways before opening new ones\n this.pendingGateways.map(bridge => bridge.close().catch());\n // open new gateways\n this.pendingGateways = this.walletConnectionSource.map(source => {\n const gateway = new BridgeGateway(this.storage, source.bridgeUrl, sessionCrypto.sessionId, () => { }, () => { });\n gateway.setListener(message => this.pendingGatewaysListener(gateway, source.bridgeUrl, message));\n return gateway;\n });\n yield Promise.allSettled(this.pendingGateways.map(bridge => callForSuccess((_options) => {\n if (!this.pendingGateways.some(item => item === bridge)) {\n return bridge.close();\n }\n return bridge.registerSession({\n openingDeadlineMS: options === null || options === void 0 ? void 0 : options.openingDeadlineMS,\n signal: _options.signal\n });\n }, {\n attempts: Number.MAX_SAFE_INTEGER,\n delayMs: 5000,\n signal: options === null || options === void 0 ? void 0 : options.signal\n })));\n return;\n }\n else {\n if (this.gateway) {\n logDebug(`Gateway is already opened, closing previous gateway`);\n yield this.gateway.close();\n }\n this.gateway = new BridgeGateway(this.storage, this.walletConnectionSource.bridgeUrl, sessionCrypto.sessionId, this.gatewayListener.bind(this), this.gatewayErrorsListener.bind(this));\n return yield this.gateway.registerSession({\n openingDeadlineMS: options === null || options === void 0 ? void 0 : options.openingDeadlineMS,\n signal: options === null || options === void 0 ? void 0 : options.signal\n });\n }\n });\n }\n closeGateways(options) {\n var _a;\n (_a = this.gateway) === null || _a === void 0 ? void 0 : _a.close();\n this.pendingGateways\n .filter(item => item !== (options === null || options === void 0 ? void 0 : options.except))\n .forEach(bridge => bridge.close());\n this.pendingGateways = [];\n }\n}\n\nfunction hasProperty(value, propertyKey) {\n return hasProperties(value, [propertyKey]);\n}\nfunction hasProperties(value, propertyKeys) {\n if (!value || typeof value !== 'object') {\n return false;\n }\n return propertyKeys.every(propertyKey => propertyKey in value);\n}\n\nfunction isJSBridgeWithMetadata(value) {\n try {\n if (!hasProperty(value, 'tonconnect') || !hasProperty(value.tonconnect, 'walletInfo')) {\n return false;\n }\n return hasProperties(value.tonconnect.walletInfo, [\n 'name',\n 'app_name',\n 'image',\n 'about_url',\n 'platforms'\n ]);\n }\n catch (_a) {\n return false;\n }\n}\n\n/**\n * In memory storage like localStorage, but without persistence.\n * Uses as a fallback for localStorage in Safari's private mode.\n */\nclass InMemoryStorage {\n constructor() {\n this.storage = {};\n }\n static getInstance() {\n if (!InMemoryStorage.instance) {\n InMemoryStorage.instance = new InMemoryStorage();\n }\n return InMemoryStorage.instance;\n }\n get length() {\n return Object.keys(this.storage).length;\n }\n clear() {\n this.storage = {};\n }\n getItem(key) {\n var _a;\n return (_a = this.storage[key]) !== null && _a !== void 0 ? _a : null;\n }\n key(index) {\n var _a;\n const keys = Object.keys(this.storage);\n if (index < 0 || index >= keys.length) {\n return null;\n }\n return (_a = keys[index]) !== null && _a !== void 0 ? _a : null;\n }\n removeItem(key) {\n delete this.storage[key];\n }\n setItem(key, value) {\n this.storage[key] = value;\n }\n}\n\nfunction getWindow() {\n if (typeof window === 'undefined') {\n return undefined;\n }\n return window;\n}\n/**\n * The function try to get window keys, if it is not available it returns empty array.\n * As an example, for Safari's private mode it returns empty array, because the browser does not allow to get window keys.\n */\nfunction tryGetWindowKeys() {\n const window = getWindow();\n if (!window) {\n return [];\n }\n try {\n return Object.keys(window);\n }\n catch (_a) {\n return [];\n }\n}\nfunction getDocument() {\n if (typeof document === 'undefined') {\n return undefined;\n }\n return document;\n}\nfunction getWebPageManifest() {\n var _a;\n const origin = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.location.origin;\n if (origin) {\n return origin + '/tonconnect-manifest.json';\n }\n return '';\n}\n/**\n * Returns `localStorage` if it is available. In Safari's private mode, it returns `InMemoryStorage`. In Node.js, it throws an error.\n */\nfunction tryGetLocalStorage() {\n if (isLocalStorageAvailable()) {\n return localStorage;\n }\n if (isNodeJs()) {\n throw new TonConnectError('`localStorage` is unavailable, but it is required for TonConnect. For more details, see https://github.com/ton-connect/sdk/tree/main/packages/sdk#init-connector');\n }\n return InMemoryStorage.getInstance();\n}\n/**\n * Checks if `localStorage` is available.\n */\nfunction isLocalStorageAvailable() {\n // We use a try/catch block because Safari's private mode throws an error when attempting to access localStorage.\n try {\n return typeof localStorage !== 'undefined';\n }\n catch (_a) {\n return false;\n }\n}\n/**\n * Checks if the environment is Node.js.\n */\nfunction isNodeJs() {\n return (typeof process !== 'undefined' && process.versions != null && process.versions.node != null);\n}\n\nclass InjectedProvider {\n constructor(storage, injectedWalletKey) {\n this.injectedWalletKey = injectedWalletKey;\n this.type = 'injected';\n this.unsubscribeCallback = null;\n this.listenSubscriptions = false;\n this.listeners = [];\n const window = InjectedProvider.window;\n if (!InjectedProvider.isWindowContainsWallet(window, injectedWalletKey)) {\n throw new WalletNotInjectedError();\n }\n this.connectionStorage = new BridgeConnectionStorage(storage);\n this.injectedWallet = window[injectedWalletKey].tonconnect;\n }\n static fromStorage(storage) {\n return __awaiter(this, void 0, void 0, function* () {\n const bridgeConnectionStorage = new BridgeConnectionStorage(storage);\n const connection = yield bridgeConnectionStorage.getInjectedConnection();\n return new InjectedProvider(storage, connection.jsBridgeKey);\n });\n }\n static isWalletInjected(injectedWalletKey) {\n return InjectedProvider.isWindowContainsWallet(this.window, injectedWalletKey);\n }\n static isInsideWalletBrowser(injectedWalletKey) {\n if (InjectedProvider.isWindowContainsWallet(this.window, injectedWalletKey)) {\n return this.window[injectedWalletKey].tonconnect.isWalletBrowser;\n }\n return false;\n }\n static getCurrentlyInjectedWallets() {\n if (!this.window) {\n return [];\n }\n const windowKeys = tryGetWindowKeys();\n const wallets = windowKeys.filter(([_, value]) => isJSBridgeWithMetadata(value));\n return wallets.map(([jsBridgeKey, wallet]) => ({\n name: wallet.tonconnect.walletInfo.name,\n appName: wallet.tonconnect.walletInfo.app_name,\n aboutUrl: wallet.tonconnect.walletInfo.about_url,\n imageUrl: wallet.tonconnect.walletInfo.image,\n tondns: wallet.tonconnect.walletInfo.tondns,\n jsBridgeKey,\n injected: true,\n embedded: wallet.tonconnect.isWalletBrowser,\n platforms: wallet.tonconnect.walletInfo.platforms\n }));\n }\n static isWindowContainsWallet(window, injectedWalletKey) {\n return (!!window &&\n injectedWalletKey in window &&\n typeof window[injectedWalletKey] === 'object' &&\n 'tonconnect' in window[injectedWalletKey]);\n }\n connect(message) {\n this._connect(PROTOCOL_VERSION, message);\n }\n restoreConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n logDebug(`Injected Provider restoring connection...`);\n const connectEvent = yield this.injectedWallet.restoreConnection();\n logDebug('Injected Provider restoring connection response', connectEvent);\n if (connectEvent.event === 'connect') {\n this.makeSubscriptions();\n this.listeners.forEach(listener => listener(connectEvent));\n }\n else {\n yield this.connectionStorage.removeConnection();\n }\n }\n catch (e) {\n yield this.connectionStorage.removeConnection();\n console.error(e);\n }\n });\n }\n closeConnection() {\n if (this.listenSubscriptions) {\n this.injectedWallet.disconnect();\n }\n this.closeAllListeners();\n }\n disconnect() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => {\n const onRequestSent = () => {\n this.closeAllListeners();\n this.connectionStorage.removeConnection().then(resolve);\n };\n try {\n this.injectedWallet.disconnect();\n onRequestSent();\n }\n catch (e) {\n logDebug(e);\n this.sendRequest({\n method: 'disconnect',\n params: []\n }, onRequestSent);\n }\n });\n });\n }\n closeAllListeners() {\n var _a;\n this.listenSubscriptions = false;\n this.listeners = [];\n (_a = this.unsubscribeCallback) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n listen(eventsCallback) {\n this.listeners.push(eventsCallback);\n return () => (this.listeners = this.listeners.filter(listener => listener !== eventsCallback));\n }\n sendRequest(request, optionsOrOnRequestSent) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n // TODO: remove deprecated method\n const options = {};\n if (typeof optionsOrOnRequestSent === 'function') {\n options.onRequestSent = optionsOrOnRequestSent;\n }\n else {\n options.onRequestSent = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.onRequestSent;\n options.signal = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.signal;\n }\n const id = (yield this.connectionStorage.getNextRpcRequestId()).toString();\n yield this.connectionStorage.increaseNextRpcRequestId();\n logDebug('Send injected-bridge request:', Object.assign(Object.assign({}, request), { id }));\n const result = this.injectedWallet.send(Object.assign(Object.assign({}, request), { id }));\n result.then(response => logDebug('Wallet message received:', response));\n (_a = options === null || options === void 0 ? void 0 : options.onRequestSent) === null || _a === void 0 ? void 0 : _a.call(options);\n return result;\n });\n }\n _connect(protocolVersion, message) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n logDebug(`Injected Provider connect request: protocolVersion: ${protocolVersion}, message:`, message);\n const connectEvent = yield this.injectedWallet.connect(protocolVersion, message);\n logDebug('Injected Provider connect response:', connectEvent);\n if (connectEvent.event === 'connect') {\n yield this.updateSession();\n this.makeSubscriptions();\n }\n this.listeners.forEach(listener => listener(connectEvent));\n }\n catch (e) {\n logDebug('Injected Provider connect error:', e);\n const connectEventError = {\n event: 'connect_error',\n payload: {\n code: 0,\n message: e === null || e === void 0 ? void 0 : e.toString()\n }\n };\n this.listeners.forEach(listener => listener(connectEventError));\n }\n });\n }\n makeSubscriptions() {\n this.listenSubscriptions = true;\n this.unsubscribeCallback = this.injectedWallet.listen(e => {\n logDebug('Wallet message received:', e);\n if (this.listenSubscriptions) {\n this.listeners.forEach(listener => listener(e));\n }\n if (e.event === 'disconnect') {\n this.disconnect();\n }\n });\n }\n updateSession() {\n return this.connectionStorage.storeConnection({\n type: 'injected',\n jsBridgeKey: this.injectedWalletKey,\n nextRpcRequestId: 0\n });\n }\n}\nInjectedProvider.window = getWindow();\n\n/**\n * Default storage to save protocol data, uses `localStorage` if it is available. In Safari's private mode, it uses `InMemoryStorage`. In Node.js, it throws an error.\n */\nclass DefaultStorage {\n constructor() {\n this.localStorage = tryGetLocalStorage();\n }\n getItem(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.localStorage.getItem(key);\n });\n }\n removeItem(key) {\n return __awaiter(this, void 0, void 0, function* () {\n this.localStorage.removeItem(key);\n });\n }\n setItem(key, value) {\n return __awaiter(this, void 0, void 0, function* () {\n this.localStorage.setItem(key, value);\n });\n }\n}\n\n/**\n * Checks if `WalletInfo` is `WalletInfoInjectable` and `WalletInfo` is injected to the current webpage (`walletInfo.injected === true`).\n * @param value WalletInfo to check.\n */\nfunction isWalletInfoCurrentlyInjected(value) {\n return isWalletInfoInjectable(value) && value.injected;\n}\n/**\n * Checks if `WalletInfo` is `WalletInfoInjectable` and dApp is opened inside this wallet's browser.\n * @param value WalletInfo to check.\n */\nfunction isWalletInfoCurrentlyEmbedded(value) {\n return isWalletInfoCurrentlyInjected(value) && value.embedded;\n}\n/**\n * Checks if `WalletInfo` is `WalletInfoInjected`, but doesn't check if it is injected to the page or not.\n * @param value WalletInfo to check.\n */\nfunction isWalletInfoInjectable(value) {\n return 'jsBridgeKey' in value;\n}\n/**\n * Checks if `WalletInfo` is `WalletInfoRemote`.\n * @param value WalletInfo to check.\n */\nfunction isWalletInfoRemote(value) {\n return 'bridgeUrl' in value;\n}\n/**\n * @deprecated use `isWalletInfoInjectable` or `isWalletInfoCurrentlyInjected` instead.\n * @param value WalletInfo to check.\n */\nfunction isWalletInfoInjected(value) {\n return 'jsBridgeKey' in value;\n}\n\nconst FALLBACK_WALLETS_LIST = [\n {\n app_name: 'telegram-wallet',\n name: 'Wallet',\n image: 'https://wallet.tg/images/logo-288.png',\n about_url: 'https://wallet.tg/',\n universal_url: 'https://t.me/wallet?attach=wallet',\n bridge: [\n {\n type: 'sse',\n url: 'https://bridge.tonapi.io/bridge'\n }\n ],\n platforms: ['ios', 'android', 'macos', 'windows', 'linux']\n },\n {\n app_name: 'tonkeeper',\n name: 'Tonkeeper',\n image: 'https://tonkeeper.com/assets/tonconnect-icon.png',\n tondns: 'tonkeeper.ton',\n about_url: 'https://tonkeeper.com',\n universal_url: 'https://app.tonkeeper.com/ton-connect',\n deepLink: 'tonkeeper-tc://',\n bridge: [\n {\n type: 'sse',\n url: 'https://bridge.tonapi.io/bridge'\n },\n {\n type: 'js',\n key: 'tonkeeper'\n }\n ],\n platforms: ['ios', 'android', 'chrome', 'firefox', 'macos']\n },\n {\n app_name: 'mytonwallet',\n name: 'MyTonWallet',\n image: 'https://mytonwallet.io/icon-256.png',\n about_url: 'https://mytonwallet.io',\n universal_url: 'https://connect.mytonwallet.org',\n bridge: [\n {\n type: 'js',\n key: 'mytonwallet'\n },\n {\n type: 'sse',\n url: 'https://tonconnectbridge.mytonwallet.org/bridge/'\n }\n ],\n platforms: ['chrome', 'windows', 'macos', 'linux', 'ios', 'android', 'firefox']\n },\n {\n app_name: 'openmask',\n name: 'OpenMask',\n image: 'https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png',\n about_url: 'https://www.openmask.app/',\n bridge: [\n {\n type: 'js',\n key: 'openmask'\n }\n ],\n platforms: ['chrome']\n },\n {\n app_name: 'tonhub',\n name: 'Tonhub',\n image: 'https://tonhub.com/tonconnect_logo.png',\n about_url: 'https://tonhub.com',\n universal_url: 'https://tonhub.com/ton-connect',\n bridge: [\n {\n type: 'js',\n key: 'tonhub'\n },\n {\n type: 'sse',\n url: 'https://connect.tonhubapi.com/tonconnect'\n }\n ],\n platforms: ['ios', 'android']\n },\n {\n app_name: 'dewallet',\n name: 'DeWallet',\n image: 'https://app.delabwallet.com/logo_black.png',\n about_url: 'https://delabwallet.com',\n bridge: [\n {\n type: 'js',\n key: 'dewallet'\n }\n ],\n platforms: ['chrome']\n },\n {\n app_name: 'xtonwallet',\n name: 'XTONWallet',\n image: 'https://xtonwallet.com/assets/img/icon-256-back.png',\n about_url: 'https://xtonwallet.com',\n bridge: [\n {\n type: 'js',\n key: 'xtonwallet'\n }\n ],\n platforms: ['chrome', 'firefox']\n },\n {\n app_name: 'tonwallet',\n name: 'TON Wallet',\n image: 'https://wallet.ton.org/assets/ui/qr-logo.png',\n about_url: 'https://chrome.google.com/webstore/detail/ton-wallet/nphplpgoakhhjchkkhmiggakijnkhfnd',\n bridge: [\n {\n type: 'js',\n key: 'tonwallet'\n }\n ],\n platforms: ['chrome']\n }\n];\n\nclass WalletsListManager {\n constructor(options) {\n this.walletsListCache = null;\n this.walletsListCacheCreationTimestamp = null;\n this.walletsListSource = 'https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets-v2.json';\n if (options === null || options === void 0 ? void 0 : options.walletsListSource) {\n this.walletsListSource = options.walletsListSource;\n }\n if (options === null || options === void 0 ? void 0 : options.cacheTTLMs) {\n this.cacheTTLMs = options.cacheTTLMs;\n }\n }\n getWallets() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.cacheTTLMs &&\n this.walletsListCacheCreationTimestamp &&\n Date.now() > this.walletsListCacheCreationTimestamp + this.cacheTTLMs) {\n this.walletsListCache = null;\n }\n if (!this.walletsListCache) {\n this.walletsListCache = this.fetchWalletsList();\n this.walletsListCache\n .then(() => {\n this.walletsListCacheCreationTimestamp = Date.now();\n })\n .catch(() => {\n this.walletsListCache = null;\n this.walletsListCacheCreationTimestamp = null;\n });\n }\n return this.walletsListCache;\n });\n }\n getEmbeddedWallet() {\n return __awaiter(this, void 0, void 0, function* () {\n const walletsList = yield this.getWallets();\n const embeddedWallets = walletsList.filter(isWalletInfoCurrentlyEmbedded);\n if (embeddedWallets.length !== 1) {\n return null;\n }\n return embeddedWallets[0];\n });\n }\n fetchWalletsList() {\n return __awaiter(this, void 0, void 0, function* () {\n let walletsList = [];\n try {\n const walletsResponse = yield fetch(this.walletsListSource);\n walletsList = yield walletsResponse.json();\n if (!Array.isArray(walletsList)) {\n throw new FetchWalletsError('Wrong wallets list format, wallets list must be an array.');\n }\n const wrongFormatWallets = walletsList.filter(wallet => !this.isCorrectWalletConfigDTO(wallet));\n if (wrongFormatWallets.length) {\n logError(`Wallet(s) ${wrongFormatWallets\n .map(wallet => wallet.name)\n .join(', ')} config format is wrong. They were removed from the wallets list.`);\n walletsList = walletsList.filter(wallet => this.isCorrectWalletConfigDTO(wallet));\n }\n }\n catch (e) {\n logError(e);\n walletsList = FALLBACK_WALLETS_LIST;\n }\n let currentlyInjectedWallets = [];\n try {\n currentlyInjectedWallets = InjectedProvider.getCurrentlyInjectedWallets();\n }\n catch (e) {\n logError(e);\n }\n return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(walletsList), currentlyInjectedWallets);\n });\n }\n walletConfigDTOListToWalletConfigList(walletConfigDTO) {\n return walletConfigDTO.map(walletConfigDTO => {\n const walletConfigBase = {\n name: walletConfigDTO.name,\n appName: walletConfigDTO.app_name,\n imageUrl: walletConfigDTO.image,\n aboutUrl: walletConfigDTO.about_url,\n tondns: walletConfigDTO.tondns,\n platforms: walletConfigDTO.platforms\n };\n const walletConfig = walletConfigBase;\n walletConfigDTO.bridge.forEach(bridge => {\n if (bridge.type === 'sse') {\n walletConfig.bridgeUrl = bridge.url;\n walletConfig.universalLink =\n walletConfigDTO.universal_url;\n walletConfig.deepLink = walletConfigDTO.deepLink;\n }\n if (bridge.type === 'js') {\n const jsBridgeKey = bridge.key;\n walletConfig.jsBridgeKey = jsBridgeKey;\n walletConfig.injected =\n InjectedProvider.isWalletInjected(jsBridgeKey);\n walletConfig.embedded =\n InjectedProvider.isInsideWalletBrowser(jsBridgeKey);\n }\n });\n return walletConfig;\n });\n }\n mergeWalletsLists(list1, list2) {\n const names = new Set(list1.concat(list2).map(item => item.name));\n return [...names.values()].map(name => {\n const list1Item = list1.find(item => item.name === name);\n const list2Item = list2.find(item => item.name === name);\n return Object.assign(Object.assign({}, (list1Item && Object.assign({}, list1Item))), (list2Item && Object.assign({}, list2Item)));\n });\n }\n // eslint-disable-next-line complexity\n isCorrectWalletConfigDTO(value) {\n if (!value || !(typeof value === 'object')) {\n return false;\n }\n const containsName = 'name' in value;\n const containsAppName = 'app_name' in value;\n const containsImage = 'image' in value;\n const containsAbout = 'about_url' in value;\n const containsPlatforms = 'platforms' in value;\n if (!containsName ||\n !containsImage ||\n !containsAbout ||\n !containsPlatforms ||\n !containsAppName) {\n return false;\n }\n if (!value.platforms ||\n !Array.isArray(value.platforms) ||\n !value.platforms.length) {\n return false;\n }\n if (!('bridge' in value) ||\n !Array.isArray(value.bridge) ||\n !value.bridge.length) {\n return false;\n }\n const bridge = value.bridge;\n if (bridge.some(item => !item || typeof item !== 'object' || !('type' in item))) {\n return false;\n }\n const sseBridge = bridge.find(item => item.type === 'sse');\n if (sseBridge) {\n if (!('url' in sseBridge) ||\n !sseBridge.url ||\n !value.universal_url) {\n return false;\n }\n }\n const jsBridge = bridge.find(item => item.type === 'js');\n if (jsBridge) {\n if (!('key' in jsBridge) || !jsBridge.key) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * Thrown when wallet doesn't support requested feature method.\n */\nclass WalletNotSupportFeatureError extends TonConnectError {\n get info() {\n return \"Wallet doesn't support requested feature method.\";\n }\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, WalletNotSupportFeatureError.prototype);\n }\n}\n\nfunction checkSendTransactionSupport(features, options) {\n const supportsDeprecatedSendTransactionFeature = features.includes('SendTransaction');\n const sendTransactionFeature = features.find(feature => feature && typeof feature === 'object' && feature.name === 'SendTransaction');\n if (!supportsDeprecatedSendTransactionFeature && !sendTransactionFeature) {\n throw new WalletNotSupportFeatureError(\"Wallet doesn't support SendTransaction feature.\");\n }\n if (sendTransactionFeature && sendTransactionFeature.maxMessages !== undefined) {\n if (sendTransactionFeature.maxMessages < options.requiredMessagesNumber) {\n throw new WalletNotSupportFeatureError(`Wallet is not able to handle such SendTransaction request. Max support messages number is ${sendTransactionFeature.maxMessages}, but ${options.requiredMessagesNumber} is required.`);\n }\n return;\n }\n logWarning(\"Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet.\");\n}\n\n/**\n * Create a request version event.\n */\nfunction createRequestVersionEvent() {\n return {\n type: 'request-version'\n };\n}\n/**\n * Create a response version event.\n * @param version\n */\nfunction createResponseVersionEvent(version) {\n return {\n type: 'response-version',\n version: version\n };\n}\n/**\n * Create a version info.\n * @param version\n */\nfunction createVersionInfo(version) {\n return {\n ton_connect_sdk_lib: version.ton_connect_sdk_lib,\n ton_connect_ui_lib: version.ton_connect_ui_lib\n };\n}\nfunction createConnectionInfo(version, wallet) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const isTonProof = ((_a = wallet === null || wallet === void 0 ? void 0 : wallet.connectItems) === null || _a === void 0 ? void 0 : _a.tonProof) && 'proof' in wallet.connectItems.tonProof;\n const authType = isTonProof ? 'ton_proof' : 'ton_addr';\n return {\n wallet_address: (_c = (_b = wallet === null || wallet === void 0 ? void 0 : wallet.account) === null || _b === void 0 ? void 0 : _b.address) !== null && _c !== void 0 ? _c : null,\n wallet_type: (_d = wallet === null || wallet === void 0 ? void 0 : wallet.device.appName) !== null && _d !== void 0 ? _d : null,\n wallet_version: (_e = wallet === null || wallet === void 0 ? void 0 : wallet.device.appVersion) !== null && _e !== void 0 ? _e : null,\n auth_type: authType,\n custom_data: Object.assign({ chain_id: (_g = (_f = wallet === null || wallet === void 0 ? void 0 : wallet.account) === null || _f === void 0 ? void 0 : _f.chain) !== null && _g !== void 0 ? _g : null, provider: (_h = wallet === null || wallet === void 0 ? void 0 : wallet.provider) !== null && _h !== void 0 ? _h : null }, createVersionInfo(version))\n };\n}\n/**\n * Create a connection init event.\n */\nfunction createConnectionStartedEvent(version) {\n return {\n type: 'connection-started',\n custom_data: createVersionInfo(version)\n };\n}\n/**\n * Create a connection completed event.\n * @param version\n * @param wallet\n */\nfunction createConnectionCompletedEvent(version, wallet) {\n return Object.assign({ type: 'connection-completed', is_success: true }, createConnectionInfo(version, wallet));\n}\n/**\n * Create a connection error event.\n * @param version\n * @param error_message\n * @param errorCode\n */\nfunction createConnectionErrorEvent(version, error_message, errorCode) {\n return {\n type: 'connection-error',\n is_success: false,\n error_message: error_message,\n error_code: errorCode !== null && errorCode !== void 0 ? errorCode : null,\n custom_data: createVersionInfo(version)\n };\n}\n/**\n * Create a connection restoring started event.\n */\nfunction createConnectionRestoringStartedEvent(version) {\n return {\n type: 'connection-restoring-started',\n custom_data: createVersionInfo(version)\n };\n}\n/**\n * Create a connection restoring completed event.\n * @param version\n * @param wallet\n */\nfunction createConnectionRestoringCompletedEvent(version, wallet) {\n return Object.assign({ type: 'connection-restoring-completed', is_success: true }, createConnectionInfo(version, wallet));\n}\n/**\n * Create a connection restoring error event.\n * @param version\n * @param errorMessage\n */\nfunction createConnectionRestoringErrorEvent(version, errorMessage) {\n return {\n type: 'connection-restoring-error',\n is_success: false,\n error_message: errorMessage,\n custom_data: createVersionInfo(version)\n };\n}\nfunction createTransactionInfo(wallet, transaction) {\n var _a, _b, _c, _d;\n return {\n valid_until: (_a = String(transaction.validUntil)) !== null && _a !== void 0 ? _a : null,\n from: (_d = (_b = transaction.from) !== null && _b !== void 0 ? _b : (_c = wallet === null || wallet === void 0 ? void 0 : wallet.account) === null || _c === void 0 ? void 0 : _c.address) !== null && _d !== void 0 ? _d : null,\n messages: transaction.messages.map(message => {\n var _a, _b;\n return ({\n address: (_a = message.address) !== null && _a !== void 0 ? _a : null,\n amount: (_b = message.amount) !== null && _b !== void 0 ? _b : null\n });\n })\n };\n}\n/**\n * Create a transaction init event.\n * @param version\n * @param wallet\n * @param transaction\n */\nfunction createTransactionSentForSignatureEvent(version, wallet, transaction) {\n return Object.assign(Object.assign({ type: 'transaction-sent-for-signature' }, createConnectionInfo(version, wallet)), createTransactionInfo(wallet, transaction));\n}\n/**\n * Create a transaction signed event.\n * @param version\n * @param wallet\n * @param transaction\n * @param signedTransaction\n */\nfunction createTransactionSignedEvent(version, wallet, transaction, signedTransaction) {\n return Object.assign(Object.assign({ type: 'transaction-signed', is_success: true, signed_transaction: signedTransaction.boc }, createConnectionInfo(version, wallet)), createTransactionInfo(wallet, transaction));\n}\n/**\n * Create a transaction error event.\n * @param version\n * @param wallet\n * @param transaction\n * @param errorMessage\n * @param errorCode\n */\nfunction createTransactionSigningFailedEvent(version, wallet, transaction, errorMessage, errorCode) {\n return Object.assign(Object.assign({ type: 'transaction-signing-failed', is_success: false, error_message: errorMessage, error_code: errorCode !== null && errorCode !== void 0 ? errorCode : null }, createConnectionInfo(version, wallet)), createTransactionInfo(wallet, transaction));\n}\n/**\n * Create a disconnect event.\n * @param version\n * @param wallet\n * @param scope\n * @returns\n */\nfunction createDisconnectionEvent(version, wallet, scope) {\n return Object.assign({ type: 'disconnection', scope: scope }, createConnectionInfo(version, wallet));\n}\n\n/**\n * A concrete implementation of EventDispatcher that dispatches events to the browser window.\n */\nclass BrowserEventDispatcher {\n constructor() {\n /**\n * The window object, possibly undefined in a server environment.\n * @private\n */\n this.window = getWindow();\n }\n /**\n * Dispatches an event with the given name and details to the browser window.\n * @param eventName - The name of the event to dispatch.\n * @param eventDetails - The details of the event to dispatch.\n * @returns A promise that resolves when the event has been dispatched.\n */\n dispatchEvent(eventName, eventDetails) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const event = new CustomEvent(eventName, { detail: eventDetails });\n (_a = this.window) === null || _a === void 0 ? void 0 : _a.dispatchEvent(event);\n });\n }\n /**\n * Adds an event listener to the browser window.\n * @param eventName - The name of the event to listen for.\n * @param listener - The listener to add.\n * @param options - The options for the listener.\n * @returns A function that removes the listener.\n */\n addEventListener(eventName, listener, options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n (_a = this.window) === null || _a === void 0 ? void 0 : _a.addEventListener(eventName, listener, options);\n return () => {\n var _a;\n return (_a = this.window) === null || _a === void 0 ? void 0 : _a.removeEventListener(eventName, listener);\n };\n });\n }\n}\n\n/**\n * Tracker for TonConnect user actions, such as transaction signing, connection, etc.\n *\n * List of events:\n * * `connection-started`: when a user starts connecting a wallet.\n * * `connection-completed`: when a user successfully connected a wallet.\n * * `connection-error`: when a user cancels a connection or there is an error during the connection process.\n * * `connection-restoring-started`: when the dApp starts restoring a connection.\n * * `connection-restoring-completed`: when the dApp successfully restores a connection.\n * * `connection-restoring-error`: when the dApp fails to restore a connection.\n * * `disconnection`: when a user starts disconnecting a wallet.\n * * `transaction-sent-for-signature`: when a user sends a transaction for signature.\n * * `transaction-signed`: when a user successfully signs a transaction.\n * * `transaction-signing-failed`: when a user cancels transaction signing or there is an error during the signing process.\n *\n * If you want to track user actions, you can subscribe to the window events with prefix `ton-connect-`:\n *\n * @example\n * window.addEventListener('ton-connect-transaction-sent-for-signature', (event) => {\n * console.log('Transaction init', event.detail);\n * });\n *\n * @internal\n */\nclass TonConnectTracker {\n constructor(options) {\n var _a;\n /**\n * Event prefix for user actions.\n * @private\n */\n this.eventPrefix = 'ton-connect-';\n /**\n * TonConnect UI version.\n */\n this.tonConnectUiVersion = null;\n this.eventDispatcher = (_a = options === null || options === void 0 ? void 0 : options.eventDispatcher) !== null && _a !== void 0 ? _a : new BrowserEventDispatcher();\n this.tonConnectSdkVersion = options.tonConnectSdkVersion;\n this.init().catch();\n }\n /**\n * Version of the library.\n */\n get version() {\n return createVersionInfo({\n ton_connect_sdk_lib: this.tonConnectSdkVersion,\n ton_connect_ui_lib: this.tonConnectUiVersion\n });\n }\n /**\n * Called once when the tracker is created and request version other libraries.\n */\n init() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.setRequestVersionHandler();\n this.tonConnectUiVersion = yield this.requestTonConnectUiVersion();\n }\n catch (e) { }\n });\n }\n /**\n * Set request version handler.\n * @private\n */\n setRequestVersionHandler() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.eventDispatcher.addEventListener('ton-connect-request-version', () => __awaiter(this, void 0, void 0, function* () {\n yield this.eventDispatcher.dispatchEvent('ton-connect-response-version', createResponseVersionEvent(this.tonConnectSdkVersion));\n }));\n });\n }\n /**\n * Request TonConnect UI version.\n * @private\n */\n requestTonConnectUiVersion() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.eventDispatcher.addEventListener('ton-connect-ui-response-version', (event) => {\n resolve(event.detail.version);\n }, { once: true });\n yield this.eventDispatcher.dispatchEvent('ton-connect-ui-request-version', createRequestVersionEvent());\n }\n catch (e) {\n reject(e);\n }\n }));\n });\n }\n /**\n * Emit user action event to the window.\n * @param eventDetails\n * @private\n */\n dispatchUserActionEvent(eventDetails) {\n try {\n this.eventDispatcher\n .dispatchEvent(`${this.eventPrefix}${eventDetails.type}`, eventDetails)\n .catch();\n }\n catch (e) { }\n }\n /**\n * Track connection init event.\n * @param args\n */\n trackConnectionStarted(...args) {\n try {\n const event = createConnectionStartedEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track connection success event.\n * @param args\n */\n trackConnectionCompleted(...args) {\n try {\n const event = createConnectionCompletedEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track connection error event.\n * @param args\n */\n trackConnectionError(...args) {\n try {\n const event = createConnectionErrorEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track connection restoring init event.\n * @param args\n */\n trackConnectionRestoringStarted(...args) {\n try {\n const event = createConnectionRestoringStartedEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track connection restoring success event.\n * @param args\n */\n trackConnectionRestoringCompleted(...args) {\n try {\n const event = createConnectionRestoringCompletedEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track connection restoring error event.\n * @param args\n */\n trackConnectionRestoringError(...args) {\n try {\n const event = createConnectionRestoringErrorEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track disconnect event.\n * @param args\n */\n trackDisconnection(...args) {\n try {\n const event = createDisconnectionEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track transaction init event.\n * @param args\n */\n trackTransactionSentForSignature(...args) {\n try {\n const event = createTransactionSentForSignatureEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track transaction signed event.\n * @param args\n */\n trackTransactionSigned(...args) {\n try {\n const event = createTransactionSignedEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n /**\n * Track transaction error event.\n * @param args\n */\n trackTransactionSigningFailed(...args) {\n try {\n const event = createTransactionSigningFailedEvent(this.version, ...args);\n this.dispatchUserActionEvent(event);\n }\n catch (e) { }\n }\n}\n\nconst tonConnectSdkVersion = \"3.0.3\";\n\nclass TonConnect {\n constructor(options) {\n this.walletsList = new WalletsListManager();\n this._wallet = null;\n this.provider = null;\n this.statusChangeSubscriptions = [];\n this.statusChangeErrorSubscriptions = [];\n this.dappSettings = {\n manifestUrl: (options === null || options === void 0 ? void 0 : options.manifestUrl) || getWebPageManifest(),\n storage: (options === null || options === void 0 ? void 0 : options.storage) || new DefaultStorage()\n };\n this.walletsList = new WalletsListManager({\n walletsListSource: options === null || options === void 0 ? void 0 : options.walletsListSource,\n cacheTTLMs: options === null || options === void 0 ? void 0 : options.walletsListCacheTTLMs\n });\n this.tracker = new TonConnectTracker({\n eventDispatcher: options === null || options === void 0 ? void 0 : options.eventDispatcher,\n tonConnectSdkVersion: tonConnectSdkVersion\n });\n if (!this.dappSettings.manifestUrl) {\n throw new DappMetadataError('Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest');\n }\n this.bridgeConnectionStorage = new BridgeConnectionStorage(this.dappSettings.storage);\n if (!(options === null || options === void 0 ? void 0 : options.disableAutoPauseConnection)) {\n this.addWindowFocusAndBlurSubscriptions();\n }\n }\n /**\n * Returns available wallets list.\n */\n static getWallets() {\n return this.walletsList.getWallets();\n }\n /**\n * Shows if the wallet is connected right now.\n */\n get connected() {\n return this._wallet !== null;\n }\n /**\n * Current connected account or null if no account is connected.\n */\n get account() {\n var _a;\n return ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.account) || null;\n }\n /**\n * Current connected wallet or null if no account is connected.\n */\n get wallet() {\n return this._wallet;\n }\n set wallet(value) {\n this._wallet = value;\n this.statusChangeSubscriptions.forEach(callback => callback(this._wallet));\n }\n /**\n * Returns available wallets list.\n */\n getWallets() {\n return this.walletsList.getWallets();\n }\n /**\n * Allows to subscribe to connection status changes and handle connection errors.\n * @param callback will be called after connections status changes with actual wallet or null.\n * @param errorsHandler (optional) will be called with some instance of TonConnectError when connect error is received.\n * @returns unsubscribe callback.\n */\n onStatusChange(callback, errorsHandler) {\n this.statusChangeSubscriptions.push(callback);\n if (errorsHandler) {\n this.statusChangeErrorSubscriptions.push(errorsHandler);\n }\n return () => {\n this.statusChangeSubscriptions = this.statusChangeSubscriptions.filter(item => item !== callback);\n if (errorsHandler) {\n this.statusChangeErrorSubscriptions = this.statusChangeErrorSubscriptions.filter(item => item !== errorsHandler);\n }\n };\n }\n connect(wallet, requestOrOptions) {\n var _a, _b;\n // TODO: remove deprecated method\n const options = {};\n if (typeof requestOrOptions === 'object' && 'tonProof' in requestOrOptions) {\n options.request = requestOrOptions;\n }\n if (typeof requestOrOptions === 'object' &&\n ('openingDeadlineMS' in requestOrOptions ||\n 'signal' in requestOrOptions ||\n 'request' in requestOrOptions)) {\n options.request = requestOrOptions === null || requestOrOptions === void 0 ? void 0 : requestOrOptions.request;\n options.openingDeadlineMS = requestOrOptions === null || requestOrOptions === void 0 ? void 0 : requestOrOptions.openingDeadlineMS;\n options.signal = requestOrOptions === null || requestOrOptions === void 0 ? void 0 : requestOrOptions.signal;\n }\n if (this.connected) {\n throw new WalletAlreadyConnectedError();\n }\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();\n this.abortController = abortController;\n if (abortController.signal.aborted) {\n throw new TonConnectError('Connection was aborted');\n }\n (_b = this.provider) === null || _b === void 0 ? void 0 : _b.closeConnection();\n this.provider = this.createProvider(wallet);\n abortController.signal.addEventListener('abort', () => {\n var _a;\n (_a = this.provider) === null || _a === void 0 ? void 0 : _a.closeConnection();\n this.provider = null;\n });\n this.tracker.trackConnectionStarted();\n return this.provider.connect(this.createConnectRequest(options === null || options === void 0 ? void 0 : options.request), {\n openingDeadlineMS: options === null || options === void 0 ? void 0 : options.openingDeadlineMS,\n signal: abortController.signal\n });\n }\n /**\n * Try to restore existing session and reconnect to the corresponding wallet. Call it immediately when your app is loaded.\n */\n restoreConnection(options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n this.tracker.trackConnectionRestoringStarted();\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();\n this.abortController = abortController;\n if (abortController.signal.aborted) {\n this.tracker.trackConnectionRestoringError('Connection restoring was aborted');\n return;\n }\n // TODO: potentially race condition here\n const [bridgeConnectionType, embeddedWallet] = yield Promise.all([\n this.bridgeConnectionStorage.storedConnectionType(),\n this.walletsList.getEmbeddedWallet()\n ]);\n if (abortController.signal.aborted) {\n this.tracker.trackConnectionRestoringError('Connection restoring was aborted');\n return;\n }\n let provider = null;\n try {\n switch (bridgeConnectionType) {\n case 'http':\n provider = yield BridgeProvider.fromStorage(this.dappSettings.storage);\n break;\n case 'injected':\n provider = yield InjectedProvider.fromStorage(this.dappSettings.storage);\n break;\n default:\n if (embeddedWallet) {\n provider = this.createProvider(embeddedWallet);\n }\n else {\n return;\n }\n }\n }\n catch (_c) {\n this.tracker.trackConnectionRestoringError('Provider is not restored');\n yield this.bridgeConnectionStorage.removeConnection();\n provider === null || provider === void 0 ? void 0 : provider.closeConnection();\n provider = null;\n return;\n }\n if (abortController.signal.aborted) {\n provider === null || provider === void 0 ? void 0 : provider.closeConnection();\n this.tracker.trackConnectionRestoringError('Connection restoring was aborted');\n return;\n }\n if (!provider) {\n logError('Provider is not restored');\n this.tracker.trackConnectionRestoringError('Provider is not restored');\n return;\n }\n (_b = this.provider) === null || _b === void 0 ? void 0 : _b.closeConnection();\n this.provider = provider;\n provider.listen(this.walletEventsListener.bind(this));\n const onAbortRestore = () => {\n this.tracker.trackConnectionRestoringError('Connection restoring was aborted');\n provider === null || provider === void 0 ? void 0 : provider.closeConnection();\n provider = null;\n };\n abortController.signal.addEventListener('abort', onAbortRestore);\n return yield callForSuccess((_options) => __awaiter(this, void 0, void 0, function* () {\n yield (provider === null || provider === void 0 ? void 0 : provider.restoreConnection({\n openingDeadlineMS: options === null || options === void 0 ? void 0 : options.openingDeadlineMS,\n signal: _options.signal\n }));\n abortController.signal.removeEventListener('abort', onAbortRestore);\n if (this.connected) {\n this.tracker.trackConnectionRestoringCompleted(this.wallet);\n }\n else {\n this.tracker.trackConnectionRestoringError('Connection restoring failed');\n }\n }), {\n attempts: Number.MAX_SAFE_INTEGER,\n delayMs: 5000,\n signal: options === null || options === void 0 ? void 0 : options.signal\n });\n });\n }\n sendTransaction(transaction, optionsOrOnRequestSent) {\n return __awaiter(this, void 0, void 0, function* () {\n // TODO: remove deprecated method\n const options = {};\n if (typeof optionsOrOnRequestSent === 'function') {\n options.onRequestSent = optionsOrOnRequestSent;\n }\n else {\n options.onRequestSent = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.onRequestSent;\n options.signal = optionsOrOnRequestSent === null || optionsOrOnRequestSent === void 0 ? void 0 : optionsOrOnRequestSent.signal;\n }\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n if (abortController.signal.aborted) {\n throw new TonConnectError('Transaction sending was aborted');\n }\n this.checkConnection();\n checkSendTransactionSupport(this.wallet.device.features, {\n requiredMessagesNumber: transaction.messages.length\n });\n this.tracker.trackTransactionSentForSignature(this.wallet, transaction);\n const { validUntil } = transaction, tx = __rest(transaction, [\"validUntil\"]);\n const from = transaction.from || this.account.address;\n const network = transaction.network || this.account.chain;\n const response = yield this.provider.sendRequest(sendTransactionParser.convertToRpcRequest(Object.assign(Object.assign({}, tx), { valid_until: validUntil, from,\n network })), { onRequestSent: options.onRequestSent, signal: abortController.signal });\n if (sendTransactionParser.isError(response)) {\n this.tracker.trackTransactionSigningFailed(this.wallet, transaction, response.error.message, response.error.code);\n return sendTransactionParser.parseAndThrowError(response);\n }\n const result = sendTransactionParser.convertFromRpcResponse(response);\n this.tracker.trackTransactionSigned(this.wallet, transaction, result);\n return result;\n });\n }\n /**\n * Disconnect form thw connected wallet and drop current session.\n */\n disconnect(options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.connected) {\n throw new WalletNotConnectedError();\n }\n const abortController = createAbortController(options === null || options === void 0 ? void 0 : options.signal);\n const prevAbortController = this.abortController;\n this.abortController = abortController;\n if (abortController.signal.aborted) {\n throw new TonConnectError('Disconnect was aborted');\n }\n this.onWalletDisconnected('dapp');\n yield ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.disconnect({\n signal: abortController.signal\n }));\n prevAbortController === null || prevAbortController === void 0 ? void 0 : prevAbortController.abort();\n });\n }\n /**\n * Pause bridge HTTP connection. Might be helpful, if you want to pause connections while browser tab is unfocused,\n * or if you use SDK with NodeJS and want to save server resources.\n */\n pauseConnection() {\n var _a;\n if (((_a = this.provider) === null || _a === void 0 ? void 0 : _a.type) !== 'http') {\n return;\n }\n this.provider.pause();\n }\n /**\n * Unpause bridge HTTP connection if it is paused.\n */\n unPauseConnection() {\n var _a;\n if (((_a = this.provider) === null || _a === void 0 ? void 0 : _a.type) !== 'http') {\n return Promise.resolve();\n }\n return this.provider.unPause();\n }\n addWindowFocusAndBlurSubscriptions() {\n const document = getDocument();\n if (!document) {\n return;\n }\n try {\n document.addEventListener('visibilitychange', () => {\n if (document.hidden) {\n this.pauseConnection();\n }\n else {\n this.unPauseConnection().catch();\n }\n });\n }\n catch (e) {\n logError('Cannot subscribe to the document.visibilitychange: ', e);\n }\n }\n createProvider(wallet) {\n let provider;\n if (!Array.isArray(wallet) && isWalletConnectionSourceJS(wallet)) {\n provider = new InjectedProvider(this.dappSettings.storage, wallet.jsBridgeKey);\n }\n else {\n provider = new BridgeProvider(this.dappSettings.storage, wallet);\n }\n provider.listen(this.walletEventsListener.bind(this));\n return provider;\n }\n walletEventsListener(e) {\n switch (e.event) {\n case 'connect':\n this.onWalletConnected(e.payload);\n break;\n case 'connect_error':\n this.onWalletConnectError(e.payload);\n break;\n case 'disconnect':\n this.onWalletDisconnected('wallet');\n }\n }\n onWalletConnected(connectEvent) {\n const tonAccountItem = connectEvent.items.find(item => item.name === 'ton_addr');\n const tonProofItem = connectEvent.items.find(item => item.name === 'ton_proof');\n if (!tonAccountItem) {\n throw new TonConnectError('ton_addr connection item was not found');\n }\n const wallet = {\n device: connectEvent.device,\n provider: this.provider.type,\n account: {\n address: tonAccountItem.address,\n chain: tonAccountItem.network,\n walletStateInit: tonAccountItem.walletStateInit,\n publicKey: tonAccountItem.publicKey\n }\n };\n if (tonProofItem) {\n wallet.connectItems = {\n tonProof: tonProofItem\n };\n }\n this.wallet = wallet;\n this.tracker.trackConnectionCompleted(wallet);\n }\n onWalletConnectError(connectEventError) {\n const error = connectErrorsParser.parseError(connectEventError);\n this.statusChangeErrorSubscriptions.forEach(errorsHandler => errorsHandler(error));\n logDebug(error);\n this.tracker.trackConnectionError(connectEventError.message, connectEventError.code);\n if (error instanceof ManifestNotFoundError || error instanceof ManifestContentErrorError) {\n logError(error);\n throw error;\n }\n }\n onWalletDisconnected(scope) {\n this.tracker.trackDisconnection(this.wallet, scope);\n this.wallet = null;\n }\n checkConnection() {\n if (!this.connected) {\n throw new WalletNotConnectedError();\n }\n }\n createConnectRequest(request) {\n const items = [\n {\n name: 'ton_addr'\n }\n ];\n if (request === null || request === void 0 ? void 0 : request.tonProof) {\n items.push({\n name: 'ton_proof',\n payload: request.tonProof\n });\n }\n return {\n manifestUrl: this.dappSettings.manifestUrl,\n items\n };\n }\n}\nTonConnect.walletsList = new WalletsListManager();\n/**\n * Check if specified wallet is injected and available to use with the app.\n * @param walletJSKey target wallet's js bridge key.\n */\nTonConnect.isWalletInjected = (walletJSKey) => InjectedProvider.isWalletInjected(walletJSKey);\n/**\n * Check if the app is opened inside specified wallet's browser.\n * @param walletJSKey target wallet's js bridge key.\n */\nTonConnect.isInsideWalletBrowser = (walletJSKey) => InjectedProvider.isInsideWalletBrowser(walletJSKey);\n\nconst noBounceableTag = 0x51;\nconst testOnlyTag = 0x80;\n/**\n * Converts raw TON address to no-bounceable user-friendly format. [See details]{@link https://ton.org/docs/learn/overviews/addresses#user-friendly-address}\n * @param hexAddress raw TON address formatted as \"0:\".\n * @param [testOnly=false] convert address to test-only form. [See details]{@link https://ton.org/docs/learn/overviews/addresses#user-friendly-address}\n */\nfunction toUserFriendlyAddress(hexAddress, testOnly = false) {\n const { wc, hex } = parseHexAddress(hexAddress);\n let tag = noBounceableTag;\n if (testOnly) {\n tag |= testOnlyTag;\n }\n const addr = new Int8Array(34);\n addr[0] = tag;\n addr[1] = wc;\n addr.set(hex, 2);\n const addressWithChecksum = new Uint8Array(36);\n addressWithChecksum.set(addr);\n addressWithChecksum.set(crc16(addr), 34);\n let addressBase64 = Base64.encode(addressWithChecksum);\n return addressBase64.replace(/\\+/g, '-').replace(/\\//g, '_');\n}\nfunction parseHexAddress(hexAddress) {\n if (!hexAddress.includes(':')) {\n throw new WrongAddressError(`Wrong address ${hexAddress}. Address must include \":\".`);\n }\n const parts = hexAddress.split(':');\n if (parts.length !== 2) {\n throw new WrongAddressError(`Wrong address ${hexAddress}. Address must include \":\" only once.`);\n }\n const wc = parseInt(parts[0]);\n if (wc !== 0 && wc !== -1) {\n throw new WrongAddressError(`Wrong address ${hexAddress}. WC must be eq 0 or -1, but ${wc} received.`);\n }\n const hex = parts[1];\n if ((hex === null || hex === void 0 ? void 0 : hex.length) !== 64) {\n throw new WrongAddressError(`Wrong address ${hexAddress}. Hex part must be 64bytes length, but ${hex === null || hex === void 0 ? void 0 : hex.length} received.`);\n }\n return {\n wc,\n hex: hexToBytes(hex)\n };\n}\nfunction crc16(data) {\n const poly = 0x1021;\n let reg = 0;\n const message = new Uint8Array(data.length + 2);\n message.set(data);\n for (let byte of message) {\n let mask = 0x80;\n while (mask > 0) {\n reg <<= 1;\n if (byte & mask) {\n reg += 1;\n }\n mask >>= 1;\n if (reg > 0xffff) {\n reg &= 0xffff;\n reg ^= poly;\n }\n }\n }\n return new Uint8Array([Math.floor(reg / 256), reg % 256]);\n}\nconst toByteMap = {};\nfor (let ord = 0; ord <= 0xff; ord++) {\n let s = ord.toString(16);\n if (s.length < 2) {\n s = '0' + s;\n }\n toByteMap[s] = ord;\n}\nfunction hexToBytes(hex) {\n hex = hex.toLowerCase();\n const length2 = hex.length;\n if (length2 % 2 !== 0) {\n throw new ParseHexError('Hex string must have length a multiple of 2: ' + hex);\n }\n const length = length2 / 2;\n const result = new Uint8Array(length);\n for (let i = 0; i < length; i++) {\n const doubled = i * 2;\n const hexSubstring = hex.substring(doubled, doubled + 2);\n if (!toByteMap.hasOwnProperty(hexSubstring)) {\n throw new ParseHexError('Invalid hex character: ' + hexSubstring);\n }\n result[i] = toByteMap[hexSubstring];\n }\n return result;\n}\n\nexport { BadRequestError, BrowserEventDispatcher, FetchWalletsError, LocalstorageNotFoundError, ParseHexError, TonConnect, TonConnectError, UnknownAppError, UnknownError, UserRejectsError, WalletAlreadyConnectedError, WalletNotConnectedError, WalletNotInjectedError, WalletsListManager, WrongAddressError, createConnectionCompletedEvent, createConnectionErrorEvent, createConnectionRestoringCompletedEvent, createConnectionRestoringErrorEvent, createConnectionRestoringStartedEvent, createConnectionStartedEvent, createDisconnectionEvent, createRequestVersionEvent, createResponseVersionEvent, createTransactionSentForSignatureEvent, createTransactionSignedEvent, createTransactionSigningFailedEvent, createVersionInfo, TonConnect as default, encodeTelegramUrlParameters, isTelegramUrl, isWalletInfoCurrentlyEmbedded, isWalletInfoCurrentlyInjected, isWalletInfoInjectable, isWalletInfoInjected, isWalletInfoRemote, toUserFriendlyAddress };\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nimport require$$0, { createContext, memo, useContext, useCallback, useEffect, useState, useMemo } from \"react\";\nimport { TonConnectUI, TonConnectUIError, toUserFriendlyAddress, CHAIN } from \"@tonconnect/ui\";\nexport * from \"@tonconnect/ui\";\nvar jsxRuntime = { exports: {} };\nvar reactJsxRuntime_production_min = {};\n/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar hasRequiredReactJsxRuntime_production_min;\nfunction requireReactJsxRuntime_production_min() {\n if (hasRequiredReactJsxRuntime_production_min)\n return reactJsxRuntime_production_min;\n hasRequiredReactJsxRuntime_production_min = 1;\n var f = require$$0, k = Symbol.for(\"react.element\"), l = Symbol.for(\"react.fragment\"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };\n function q(c, a, g) {\n var b, d = {}, e = null, h = null;\n void 0 !== g && (e = \"\" + g);\n void 0 !== a.key && (e = \"\" + a.key);\n void 0 !== a.ref && (h = a.ref);\n for (b in a)\n m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);\n if (c && c.defaultProps)\n for (b in a = c.defaultProps, a)\n void 0 === d[b] && (d[b] = a[b]);\n return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };\n }\n reactJsxRuntime_production_min.Fragment = l;\n reactJsxRuntime_production_min.jsx = q;\n reactJsxRuntime_production_min.jsxs = q;\n return reactJsxRuntime_production_min;\n}\nvar reactJsxRuntime_development = {};\n/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar hasRequiredReactJsxRuntime_development;\nfunction requireReactJsxRuntime_development() {\n if (hasRequiredReactJsxRuntime_development)\n return reactJsxRuntime_development;\n hasRequiredReactJsxRuntime_development = 1;\n if (process.env.NODE_ENV !== \"production\") {\n (function() {\n var React = require$$0;\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.element\");\n var REACT_PORTAL_TYPE = Symbol.for(\"react.portal\");\n var REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\n var REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\");\n var REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n var REACT_PROVIDER_TYPE = Symbol.for(\"react.provider\");\n var REACT_CONTEXT_TYPE = Symbol.for(\"react.context\");\n var REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\");\n var REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\");\n var REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\");\n var REACT_MEMO_TYPE = Symbol.for(\"react.memo\");\n var REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\n var REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\");\n var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = \"@@iterator\";\n function getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== \"object\") {\n return null;\n }\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === \"function\") {\n return maybeIterator;\n }\n return null;\n }\n var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n function error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n printWarning(\"error\", format, args);\n }\n }\n }\n function printWarning(level, format, args) {\n {\n var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame2.getStackAddendum();\n if (stack !== \"\") {\n format += \"%s\";\n args = args.concat([stack]);\n }\n var argsWithFormat = args.map(function(item) {\n return String(item);\n });\n argsWithFormat.unshift(\"Warning: \" + format);\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n }\n var enableScopeAPI = false;\n var enableCacheElement = false;\n var enableTransitionTracing = false;\n var enableLegacyHidden = false;\n var enableDebugTracing = false;\n var REACT_MODULE_REFERENCE;\n {\n REACT_MODULE_REFERENCE = Symbol.for(\"react.module.reference\");\n }\n function isValidElementType(type) {\n if (typeof type === \"string\" || typeof type === \"function\") {\n return true;\n }\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {\n return true;\n }\n if (typeof type === \"object\" && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {\n return true;\n }\n }\n return false;\n }\n function getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n if (displayName) {\n return displayName;\n }\n var functionName = innerType.displayName || innerType.name || \"\";\n return functionName !== \"\" ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n }\n function getContextName(type) {\n return type.displayName || \"Context\";\n }\n function getComponentNameFromType(type) {\n if (type == null) {\n return null;\n }\n {\n if (typeof type.tag === \"number\") {\n error(\"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\");\n }\n }\n if (typeof type === \"function\") {\n return type.displayName || type.name || null;\n }\n if (typeof type === \"string\") {\n return type;\n }\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n }\n if (typeof type === \"object\") {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + \".Consumer\";\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + \".Provider\";\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, \"ForwardRef\");\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n if (outerName !== null) {\n return outerName;\n }\n return getComponentNameFromType(type.type) || \"Memo\";\n case REACT_LAZY_TYPE: {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n return null;\n }\n var assign = Object.assign;\n var disabledDepth = 0;\n var prevLog;\n var prevInfo;\n var prevWarn;\n var prevError;\n var prevGroup;\n var prevGroupCollapsed;\n var prevGroupEnd;\n function disabledLog() {\n }\n disabledLog.__reactDisabledLog = true;\n function disableLogs() {\n {\n if (disabledDepth === 0) {\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd;\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n };\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n }\n disabledDepth++;\n }\n }\n function reenableLogs() {\n {\n disabledDepth--;\n if (disabledDepth === 0) {\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n };\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n }\n if (disabledDepth < 0) {\n error(\"disabledDepth fell below zero. This is a bug in React. Please file an issue.\");\n }\n }\n }\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n var prefix;\n function describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === void 0) {\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || \"\";\n }\n }\n return \"\\n\" + prefix + name;\n }\n }\n var reentry = false;\n var componentFrameCache;\n {\n var PossiblyWeakMap = typeof WeakMap === \"function\" ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n }\n function describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) {\n return \"\";\n }\n {\n var frame = componentFrameCache.get(fn);\n if (frame !== void 0) {\n return frame;\n }\n }\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n var previousDispatcher;\n {\n previousDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n try {\n if (construct) {\n var Fake = function() {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function() {\n throw Error();\n }\n });\n if (typeof Reflect === \"object\" && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n fn();\n }\n } catch (sample) {\n if (sample && control && typeof sample.stack === \"string\") {\n var sampleLines = sample.stack.split(\"\\n\");\n var controlLines = control.stack.split(\"\\n\");\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n c--;\n }\n for (; s >= 1 && c >= 0; s--, c--) {\n if (sampleLines[s] !== controlLines[c]) {\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--;\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n var _frame = \"\\n\" + sampleLines[s].replace(\" at new \", \" at \");\n if (fn.displayName && _frame.includes(\"\")) {\n _frame = _frame.replace(\"\", fn.displayName);\n }\n {\n if (typeof fn === \"function\") {\n componentFrameCache.set(fn, _frame);\n }\n }\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n break;\n }\n }\n }\n } finally {\n reentry = false;\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n Error.prepareStackTrace = previousPrepareStackTrace;\n }\n var name = fn ? fn.displayName || fn.name : \"\";\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : \"\";\n {\n if (typeof fn === \"function\") {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n return syntheticFrame;\n }\n function describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n }\n function shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n }\n function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n if (type == null) {\n return \"\";\n }\n if (typeof type === \"function\") {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n if (typeof type === \"string\") {\n return describeBuiltInComponentFrame(type);\n }\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame(\"Suspense\");\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n }\n if (typeof type === \"object\") {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n case REACT_MEMO_TYPE:\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n case REACT_LAZY_TYPE: {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n try {\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {\n }\n }\n }\n }\n return \"\";\n }\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var loggedTypeFailures = {};\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n function setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n }\n function checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n var has = Function.call.bind(hasOwnProperty);\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0;\n try {\n if (typeof typeSpecs[typeSpecName] !== \"function\") {\n var err = Error((componentName || \"React class\") + \": \" + location + \" type `\" + typeSpecName + \"` is invalid; it must be a function, usually from the `prop-types` package, but received `\" + typeof typeSpecs[typeSpecName] + \"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.\");\n err.name = \"Invariant Violation\";\n throw err;\n }\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\");\n } catch (ex) {\n error$1 = ex;\n }\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n error(\"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).\", componentName || \"React class\", location, typeSpecName, typeof error$1);\n setCurrentlyValidatingElement(null);\n }\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n error(\"Failed %s type: %s\", location, error$1.message);\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n }\n var isArrayImpl = Array.isArray;\n function isArray(a) {\n return isArrayImpl(a);\n }\n function typeName(value) {\n {\n var hasToStringTag = typeof Symbol === \"function\" && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || \"Object\";\n return type;\n }\n }\n function willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error(\"The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.\", typeName(value));\n return testStringCoercion(value);\n }\n }\n }\n var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\n var RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n };\n var specialPropKeyWarningShown;\n var specialPropRefWarningShown;\n var didWarnAboutStringRefs;\n {\n didWarnAboutStringRefs = {};\n }\n function hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, \"ref\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"ref\").get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.ref !== void 0;\n }\n function hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n return config.key !== void 0;\n }\n function warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === \"string\" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n }\n function defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function() {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n error(\"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)\", displayName);\n }\n };\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n }\n function defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function() {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n error(\"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)\", displayName);\n }\n };\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, \"ref\", {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n }\n var ReactElement = function(type, key, ref, self, source, owner, props) {\n var element = {\n $$typeof: REACT_ELEMENT_TYPE,\n type,\n key,\n ref,\n props,\n _owner: owner\n };\n {\n element._store = {};\n Object.defineProperty(element._store, \"validated\", {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n });\n Object.defineProperty(element, \"_self\", {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n });\n Object.defineProperty(element, \"_source\", {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n return element;\n };\n function jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName;\n var props = {};\n var key = null;\n var ref = null;\n if (maybeKey !== void 0) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n key = \"\" + maybeKey;\n }\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n key = \"\" + config.key;\n }\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n }\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n if (key || ref) {\n var displayName = typeof type === \"function\" ? type.displayName || type.name || \"Unknown\" : type;\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n }\n var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\n var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n function setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n }\n var propTypesMisspellWarningShown;\n {\n propTypesMisspellWarningShown = false;\n }\n function isValidElement(object) {\n {\n return typeof object === \"object\" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n }\n function getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n if (name) {\n return \"\\n\\nCheck the render method of `\" + name + \"`.\";\n }\n }\n return \"\";\n }\n }\n function getSourceInfoErrorAddendum(source) {\n {\n if (source !== void 0) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, \"\");\n var lineNumber = source.lineNumber;\n return \"\\n\\nCheck your code at \" + fileName + \":\" + lineNumber + \".\";\n }\n return \"\";\n }\n }\n var ownerHasKeyUseWarning = {};\n function getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n if (!info) {\n var parentName = typeof parentType === \"string\" ? parentType : parentType.displayName || parentType.name;\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n return info;\n }\n }\n function validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true;\n var childOwner = \"\";\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n setCurrentlyValidatingElement$1(element);\n error('Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n setCurrentlyValidatingElement$1(null);\n }\n }\n function validateChildKeys(node, parentType) {\n {\n if (typeof node !== \"object\") {\n return;\n }\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n if (typeof iteratorFn === \"function\") {\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n }\n function validatePropTypes(element) {\n {\n var type = element.type;\n if (type === null || type === void 0 || typeof type === \"string\") {\n return;\n }\n var propTypes;\n if (typeof type === \"function\") {\n propTypes = type.propTypes;\n } else if (typeof type === \"object\" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n if (propTypes) {\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, \"prop\", name, element);\n } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true;\n var _name = getComponentNameFromType(type);\n error(\"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?\", _name || \"Unknown\");\n }\n if (typeof type.getDefaultProps === \"function\" && !type.getDefaultProps.isReactClassApproved) {\n error(\"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.\");\n }\n }\n }\n function validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (key !== \"children\" && key !== \"key\") {\n setCurrentlyValidatingElement$1(fragment);\n error(\"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.\", key);\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n error(\"Invalid attribute `ref` supplied to `React.Fragment`.\");\n setCurrentlyValidatingElement$1(null);\n }\n }\n }\n function jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type);\n if (!validType) {\n var info = \"\";\n if (type === void 0 || typeof type === \"object\" && type !== null && Object.keys(type).length === 0) {\n info += \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n }\n var sourceInfo = getSourceInfoErrorAddendum(source);\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n var typeString;\n if (type === null) {\n typeString = \"null\";\n } else if (isArray(type)) {\n typeString = \"array\";\n } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || \"Unknown\") + \" />\";\n info = \" Did you accidentally export a JSX literal instead of a component?\";\n } else {\n typeString = typeof type;\n }\n error(\"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s\", typeString, info);\n }\n var element = jsxDEV(type, props, key, source, self);\n if (element == null) {\n return element;\n }\n if (validType) {\n var children = props.children;\n if (children !== void 0) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error(\"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\");\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n return element;\n }\n }\n function jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n }\n function jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n }\n var jsx2 = jsxWithValidationDynamic;\n var jsxs = jsxWithValidationStatic;\n reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;\n reactJsxRuntime_development.jsx = jsx2;\n reactJsxRuntime_development.jsxs = jsxs;\n })();\n }\n return reactJsxRuntime_development;\n}\n(function(module) {\n if (process.env.NODE_ENV === \"production\") {\n module.exports = requireReactJsxRuntime_production_min();\n } else {\n module.exports = requireReactJsxRuntime_development();\n }\n})(jsxRuntime);\nconst jsx = jsxRuntime.exports.jsx;\nfunction isClientSide() {\n return typeof window !== \"undefined\";\n}\nfunction isServerSide() {\n return !isClientSide();\n}\nconst TonConnectUIContext = createContext(null);\nlet tonConnectUI = null;\nconst TonConnectUIProvider = (_a) => {\n var _b = _a, {\n children\n } = _b, options = __objRest(_b, [\n \"children\"\n ]);\n if (isClientSide() && !tonConnectUI) {\n tonConnectUI = new TonConnectUI(options);\n }\n return /* @__PURE__ */ jsx(TonConnectUIContext.Provider, { value: tonConnectUI, children });\n};\nconst TonConnectUIProvider$1 = memo(TonConnectUIProvider);\nclass TonConnectUIReactError extends TonConnectUIError {\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, TonConnectUIReactError.prototype);\n }\n}\nclass TonConnectProviderNotSetError extends TonConnectUIReactError {\n constructor(...args) {\n super(...args);\n Object.setPrototypeOf(this, TonConnectProviderNotSetError.prototype);\n }\n}\nfunction checkProvider(provider) {\n if (!provider) {\n throw new TonConnectProviderNotSetError(\n \"You should add on the top of the app to use TonConnect\"\n );\n }\n return true;\n}\nfunction useTonConnectUI() {\n const tonConnectUI2 = useContext(TonConnectUIContext);\n const setOptions = useCallback(\n (options) => {\n if (tonConnectUI2) {\n tonConnectUI2.uiOptions = options;\n }\n },\n [tonConnectUI2]\n );\n if (isServerSide()) {\n return [null, () => {\n }];\n }\n checkProvider(tonConnectUI2);\n return [tonConnectUI2, setOptions];\n}\nconst buttonRootId = \"ton-connect-button\";\nconst TonConnectButton = ({ className, style }) => {\n const [_, setOptions] = useTonConnectUI();\n useEffect(() => {\n setOptions({ buttonRootId });\n return () => setOptions({ buttonRootId: null });\n }, [setOptions]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n id: buttonRootId,\n className,\n style: __spreadValues({ width: \"fit-content\" }, style)\n }\n );\n};\nconst TonConnectButton$1 = memo(TonConnectButton);\nfunction useTonWallet() {\n const [tonConnectUI2] = useTonConnectUI();\n const [wallet, setWallet] = useState(\n (tonConnectUI2 == null ? void 0 : tonConnectUI2.wallet) || null\n );\n useEffect(() => {\n if (tonConnectUI2) {\n setWallet(tonConnectUI2.wallet);\n return tonConnectUI2.onStatusChange((value) => {\n setWallet(value);\n });\n }\n }, [tonConnectUI2]);\n return wallet;\n}\nfunction useTonAddress(userFriendly = true) {\n const wallet = useTonWallet();\n return useMemo(() => {\n if (wallet) {\n return userFriendly ? toUserFriendlyAddress(\n wallet.account.address,\n wallet.account.chain === CHAIN.TESTNET\n ) : wallet.account.address;\n } else {\n return \"\";\n }\n }, [wallet, userFriendly, wallet == null ? void 0 : wallet.account.address, wallet == null ? void 0 : wallet.account.chain]);\n}\nfunction useTonConnectModal() {\n const [tonConnectUI2] = useTonConnectUI();\n const [state, setState] = useState((tonConnectUI2 == null ? void 0 : tonConnectUI2.modal.state) || null);\n useEffect(() => {\n if (tonConnectUI2) {\n setState(tonConnectUI2.modal.state);\n return tonConnectUI2.onModalStateChange((value) => {\n setState(value);\n });\n }\n }, [tonConnectUI2]);\n return {\n state,\n open: () => tonConnectUI2 == null ? void 0 : tonConnectUI2.modal.open(),\n close: () => tonConnectUI2 == null ? void 0 : tonConnectUI2.modal.close()\n };\n}\nfunction useIsConnectionRestored() {\n const [restored, setRestored] = useState(false);\n const [tonConnectUI2] = useTonConnectUI();\n useEffect(() => {\n if (tonConnectUI2) {\n tonConnectUI2.connectionRestored.then(() => setRestored(true));\n }\n }, [tonConnectUI2]);\n return restored;\n}\nexport {\n TonConnectButton$1 as TonConnectButton,\n TonConnectProviderNotSetError,\n TonConnectUIContext,\n TonConnectUIProvider$1 as TonConnectUIProvider,\n TonConnectUIReactError,\n useIsConnectionRestored,\n useTonAddress,\n useTonConnectModal,\n useTonConnectUI,\n useTonWallet\n};\n//# sourceMappingURL=index.mjs.map\n","/** Name of the feature. */\nexport const StandardConnect = 'standard:connect';\n/**\n * @deprecated Use {@link StandardConnect} instead.\n *\n * @group Deprecated\n */\nexport const Connect = StandardConnect;\n//# sourceMappingURL=connect.js.map","/** Name of the feature. */\nexport const StandardDisconnect = 'standard:disconnect';\n/**\n * @deprecated Use {@link StandardDisconnect} instead.\n *\n * @group Deprecated\n */\nexport const Disconnect = StandardDisconnect;\n//# sourceMappingURL=disconnect.js.map","/** Name of the feature. */\nexport const StandardEvents = 'standard:events';\n/**\n * @deprecated Use {@link StandardEvents} instead.\n *\n * @group Deprecated\n */\nexport const Events = StandardEvents;\n//# sourceMappingURL=events.js.map","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const {\n message,\n ...rest\n } = failure;\n const {\n path\n } = failure;\n const msg = path.length === 0 ? message : \"At path: \" + path.join('.') + \" -- \" + message;\n super(msg);\n Object.assign(this, rest);\n this.name = this.constructor.name;\n\n this.failures = () => {\n var _cached;\n\n return (_cached = cached) != null ? _cached : cached = [failure, ...failures()];\n };\n }\n\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a plain object.\n */\n\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\n\nfunction print(value) {\n return typeof value === 'string' ? JSON.stringify(value) : \"\" + value;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\nfunction shiftIterator(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\n\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === 'string') {\n result = {\n message: result\n };\n }\n\n const {\n path,\n branch\n } = context;\n const {\n type\n } = struct;\n const {\n refinement,\n message = \"Expected a value of type `\" + type + \"`\" + (refinement ? \" with refinement `\" + refinement + \"`\" : '') + \", but received: `\" + print(value) + \"`\"\n } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\n\nfunction* run(value, struct, options = {}) {\n const {\n path = [],\n branch = [value],\n coerce = false,\n mask = false\n } = options;\n const ctx = {\n path,\n branch\n };\n\n if (coerce) {\n value = struct.coercer(value, ctx);\n\n if (mask && struct.type !== 'type' && isObject(struct.schema) && isObject(value) && !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n\n let valid = true;\n\n for (const failure of struct.validator(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask\n });\n\n for (const t of ts) {\n if (t[0]) {\n valid = false;\n yield [t[0], undefined];\n } else if (coerce) {\n v = t[1];\n\n if (k === undefined) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n value[k] = v;\n }\n }\n }\n }\n\n if (valid) {\n for (const failure of struct.refiner(value, ctx)) {\n valid = false;\n yield [failure, undefined];\n }\n }\n\n if (valid) {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\n\nclass Struct {\n constructor(props) {\n const {\n type,\n schema,\n validator,\n refiner,\n coercer = value => value,\n entries = function* () {}\n } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n\n\n assert(value) {\n return assert(value, this);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n\n\n create(value) {\n return create(value, this);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n\n\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n\n\n mask(value) {\n return mask(value, this);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n\n\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\n\nfunction assert(value, struct) {\n const result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\n\nfunction create(value, struct) {\n const result = validate(value, struct, {\n coerce: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\n\nfunction mask(value, struct) {\n const result = validate(value, struct, {\n coerce: true,\n mask: true\n });\n\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\n\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\n\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n } else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const schemas = Structs.map(s => s.schema);\n const schema = Object.assign({}, ...schemas);\n return object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\n\nfunction define(name, validator) {\n return new Struct({\n type: name,\n schema: null,\n validator\n });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\n\nfunction deprecated(struct, log) {\n return new Struct({ ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n } else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n }\n\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\n\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\n\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n\n *entries(value, ctx) {\n var _struct;\n\n (_struct = struct) != null ? _struct : struct = fn();\n yield* struct.entries(value, ctx);\n },\n\n validator(value, ctx) {\n var _struct2;\n\n (_struct2 = struct) != null ? _struct2 : struct = fn();\n return struct.validator(value, ctx);\n },\n\n coercer(value, ctx) {\n var _struct3;\n\n (_struct3 = struct) != null ? _struct3 : struct = fn();\n return struct.coercer(value, ctx);\n }\n\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\n\nfunction omit(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = { ...schema\n };\n\n for (const key of keys) {\n delete subschema[key];\n }\n\n return object(subschema);\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\n\nfunction partial(struct) {\n const schema = struct instanceof Struct ? { ...struct.schema\n } : { ...struct\n };\n\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\n\nfunction pick(struct, keys) {\n const {\n schema\n } = struct;\n const subschema = {};\n\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n\n return object(subschema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\n\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\n\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array value, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\n\nfunction boolean() {\n return define('boolean', value => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\nfunction date() {\n return define('date', value => {\n return value instanceof Date && !isNaN(value.getTime()) || \"Expected a valid `Date` object, but received: \" + print(value);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map(v => print(v)).join();\n\n for (const key of values) {\n schema[key] = key;\n }\n\n return new Struct({\n type: 'enums',\n schema,\n\n validator(value) {\n return values.includes(value) || \"Expected one of `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a function.\n */\n\nfunction func() {\n return define('func', value => {\n return typeof value === 'function' || \"Expected a function, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\n\nfunction instance(Class) {\n return define('instance', value => {\n return value instanceof Class || \"Expected a `\" + Class.name + \"` instance, but received: \" + print(value);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\n\nfunction integer() {\n return define('integer', value => {\n return typeof value === 'number' && !isNaN(value) && Number.isInteger(value) || \"Expected an integer, but received: \" + print(value);\n });\n}\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n }\n\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n\n validator(value) {\n return value === constant || \"Expected the literal `\" + description + \"`, but received: \" + print(value);\n }\n\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n\n validator(value) {\n return value instanceof Map || \"Expected a `Map` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\n\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\n\nfunction nullable(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is a number.\n */\n\nfunction number() {\n return define('number', value => {\n return typeof value === 'number' && !isNaN(value) || \"Expected a number, but received: \" + print(value);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n },\n\n coercer(value) {\n return isObject(value) ? { ...value\n } : value;\n }\n\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\n\nfunction optional(struct) {\n return new Struct({ ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx)\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\n\nfunction regexp() {\n return define('regexp', value => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n\n validator(value) {\n return value instanceof Set || \"Expected a `Set` object, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value is a string.\n */\n\nfunction string() {\n return define('string', value => {\n return typeof value === 'string' || \"Expected a string, but received: \" + print(value);\n });\n}\nfunction tuple(Elements) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Elements.length, value.length);\n\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Elements[i] || Never];\n }\n }\n },\n\n validator(value) {\n return Array.isArray(value) || \"Expected an array, but received: \" + print(value);\n }\n\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\n\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n\n validator(value) {\n return isObject(value) || \"Expected an object, but received: \" + print(value);\n }\n\n });\n}\nfunction union(Structs) {\n const description = Structs.map(s => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n\n validator(value, ctx) {\n const failures = [];\n\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n\n return [\"Expected the value to satisfy a union of `\" + description + \"`, but received: \" + print(value), ...failures];\n }\n\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\n\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction coerce(struct, condition, coercer) {\n return new Struct({ ...struct,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct.coercer(coercer(value, ctx), ctx) : struct.coercer(value, ctx);\n }\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), x => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x\n };\n let changed = false;\n\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\n\nfunction trimmed(struct) {\n return coerce(struct, string(), x => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\n\nfunction empty(struct) {\n const expected = \"Expected an empty \" + struct.type;\n return refine(struct, 'empty', value => {\n if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return size === 0 || expected + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return length === 0 || expected + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\n\nfunction max(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'max', value => {\n return exclusive ? value < threshold : value <= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\n\nfunction min(struct, threshold, options = {}) {\n const {\n exclusive\n } = options;\n return refine(struct, 'min', value => {\n return exclusive ? value > threshold : value >= threshold || \"Expected a \" + struct.type + \" greater than \" + (exclusive ? '' : 'or equal to ') + threshold + \" but received `\" + value + \"`\";\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\n\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', value => {\n return regexp.test(value) || \"Expected a \" + struct.type + \" matching `/\" + regexp.source + \"/` but received \\\"\" + value + \"\\\"\";\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\n\nfunction size(struct, min, max = min) {\n const expected = \"Expected a \" + struct.type;\n const of = min === max ? \"of `\" + min + \"`\" : \"between `\" + min + \"` and `\" + max + \"`\";\n return refine(struct, 'size', value => {\n if (typeof value === 'number' || value instanceof Date) {\n return min <= value && value <= max || expected + \" \" + of + \" but received `\" + value + \"`\";\n } else if (value instanceof Map || value instanceof Set) {\n const {\n size\n } = value;\n return min <= size && size <= max || expected + \" with a size \" + of + \" but received one with a size of `\" + size + \"`\";\n } else {\n const {\n length\n } = value;\n return min <= length && length <= max || expected + \" with a length \" + of + \" but received one with a length of `\" + length + \"`\";\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\n\nfunction refine(struct, name, refiner) {\n return new Struct({ ...struct,\n\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n\n for (const failure of failures) {\n yield { ...failure,\n refinement: name\n };\n }\n }\n\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.es.js.map\n"],"names":["HwTransportErrorType","errorClasses","deserializers","addCustomErrorDeserializer","name","deserializer","createCustomErrorClass","CustomErrorClass","Error","constructor","message","fields","options","Object","setPrototypeOf","prototype","k","cause","stack","deserializeError","object","error","msg","JSON","parse","e","des","console","warn","create","prop","hasOwnProperty","captureStackTrace","String","serializeError","value","destroyCircular","from","seen","to","key","push","keys","indexOf","slice","AccountNameRequiredError","AccountNotSupported","AmountRequired","BluetoothRequired","BtcUnmatchedApp","CantOpenDevice","CashAddrNotSupported","ClaimRewardsFeesWarning","CurrencyNotSupported","DeviceAppVerifyNotSupported","DeviceGenuineSocketEarlyClose","DeviceNotGenuineError","DeviceOnDashboardExpected","DeviceOnDashboardUnexpected","DeviceInOSUExpected","DeviceHalted","DeviceNameInvalid","DeviceSocketFail","DeviceSocketNoBulkStatus","DeviceNeedsRestart","UnresponsiveDeviceError","DisconnectedDevice","DisconnectedDeviceDuringOperation","DeviceExtractOnboardingStateError","DeviceOnboardingStatePollingError","EnpointConfigError","EthAppPleaseEnableContractData","FeeEstimationFailed","FirmwareNotRecognized","HardResetFail","InvalidXRPTag","InvalidAddress","InvalidNonce","InvalidAddressBecauseDestinationIsAlsoSource","LatestMCUInstalledError","UnknownMCU","LedgerAPIError","LedgerAPIErrorWithMessage","LedgerAPINotAvailable","ManagerAppAlreadyInstalledError","ManagerAppRelyOnBTCError","ManagerAppDepInstallRequired","ManagerAppDepUninstallRequired","ManagerDeviceLockedError","ManagerFirmwareNotEnoughSpaceError","ManagerNotEnoughSpaceError","ManagerUninstallBTCDep","NetworkDown","NetworkError","NoAddressesFound","NotEnoughBalance","NotEnoughBalanceToDelegate","NotEnoughBalanceInParentAccount","NotEnoughSpendableBalance","NotEnoughBalanceBecauseDestinationNotCreated","NoAccessToCamera","NotEnoughGas","NotEnoughGasSwap","NotSupportedLegacyAddress","GasLessThanEstimate","PriorityFeeTooLow","PriorityFeeTooHigh","PriorityFeeHigherThanMaxFee","MaxFeeTooLow","PasswordsDontMatchError","PasswordIncorrectError","RecommendSubAccountsToEmpty","RecommendUndelegation","TimeoutTagged","UnexpectedBootloader","MCUNotGenuineToDashboard","RecipientRequired","UnavailableTezosOriginatedAccountReceive","UnavailableTezosOriginatedAccountSend","UpdateFetchFileFail","UpdateIncorrectHash","UpdateIncorrectSig","UpdateYourApp","UserRefusedDeviceNameChange","UserRefusedAddress","UserRefusedFirmwareUpdate","UserRefusedAllowManager","UserRefusedOnDevice","ExpertModeRequired","TransportOpenUserCancelled","TransportInterfaceNotAvailable","TransportPendingOperation","TransportWebUSBGestureRequired","TransactionHasBeenValidatedError","TransportExchangeTimeoutError","DeviceShouldStayInApp","WebsocketConnectionError","WebsocketConnectionFailed","WrongDeviceForAccount","WrongDeviceForAccountPayout","WrongDeviceForAccountRefund","WrongAppForCurrency","ETHAddressNonEIP","CantScanQRCode","FeeNotLoaded","FeeNotLoadedSwap","FeeRequired","FeeTooHigh","PendingOperation","SyncError","PairingFailed","PeerRemovedPairing","GenuineCheckFailed","LedgerAPI4xx","LedgerAPI5xx","FirmwareOrAppUpdateRequired","ReplacementTransactionUnderpriced","OpReturnDataSizeLimit","DustLimit","LanguageNotFound","NoDBPathGiven","DBWrongPassword","DBNotReset","SequenceNumberError","DisabledTransactionBroadcastError","HwTransportError","type","TransportError","id","StatusCodes","ACCESS_CONDITION_NOT_FULFILLED","ALGORITHM_NOT_SUPPORTED","CLA_NOT_SUPPORTED","CODE_BLOCKED","CODE_NOT_INITIALIZED","COMMAND_INCOMPATIBLE_FILE_STRUCTURE","CONDITIONS_OF_USE_NOT_SATISFIED","CONTRADICTION_INVALIDATION","CONTRADICTION_SECRET_CODE_STATUS","CUSTOM_IMAGE_BOOTLOADER","CUSTOM_IMAGE_EMPTY","FILE_ALREADY_EXISTS","FILE_NOT_FOUND","GP_AUTH_FAILED","HALTED","INCONSISTENT_FILE","INCORRECT_DATA","INCORRECT_LENGTH","INCORRECT_P1_P2","INS_NOT_SUPPORTED","DEVICE_NOT_ONBOARDED","DEVICE_NOT_ONBOARDED_2","INVALID_KCV","INVALID_OFFSET","LICENSING","LOCKED_DEVICE","MAX_VALUE_REACHED","MEMORY_PROBLEM","MISSING_CRITICAL_PARAMETER","NO_EF_SELECTED","NOT_ENOUGH_MEMORY_SPACE","OK","PIN_REMAINING_ATTEMPTS","REFERENCED_DATA_NOT_FOUND","SECURITY_STATUS_NOT_SATISFIED","TECHNICAL_PROBLEM","UNKNOWN_APDU","USER_REFUSED_ON_DEVICE","NOT_ENOUGH_SPACE","getAltStatusMessage","code","TransportStatusError","statusCode","canBeMappedToChildError","statusText","find","smsg","statusCodeStr","toString","LockedDeviceError","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","rejected","result","done","adopt","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","n","v","op","call","pop","length","__read","o","m","r","i","ar","__spreadArray","pack","arguments","l","Array","concat","__values","s","Transport","_this","exchangeTimeout","unresponsiveTimeout","deviceModel","_events","events__WEBPACK_IMPORTED_MODULE_0___default","send","cla","ins","p1","p2","data","statusList","Buffer","alloc","_ledgerhq_errors__WEBPACK_IMPORTED_MODULE_1__","response","sw","_a","exchange","readUInt16BE","some","exchangeAtomicImpl","resolveBusy","busyPromise","unresponsiveReached","timeout","res","exchangeBusyPromise","TransportRaceCondition","setTimeout","emit","clearTimeout","_appAPIlock","_apdu","setScrambleKey","_key","close","on","eventName","cb","off","removeListener","event","args","_i","setDebugMode","setExchangeTimeout","setExchangeUnresponsiveTimeout","openTimeout","listenTimeout","found","sub","listen","unsubscribe","listenTimeoutId","open","descriptor","complete","ErrorMessage_NoDeviceFound","ErrorMessage_ListenTimeout","decorateAppAPIMethods","self","methods","scrambleKey","e_1","methods_1","methods_1_1","methodName","decorateAppAPIMethod","e_1_1","ctx","__webpack_exports__","ZP","exports","_O","Jq","KB","u8","cv","Ik","A9","n_","gM","buffer_1","__webpack_require__","checkUint8Array","b","Uint8Array","uint8ArrayToBuffer","buffer","byteOffset","Layout","span","property","Number","isInteger","makeDestinationObject","getSpan","offset","replicate","rv","assign","fromArray","values","nameWithProperty","lo","ExternalLayout","isCount","OffsetLayout","layout","UInt","UIntBE","decode","encode","src","readUIntLE","writeUIntLE","readUIntBE","writeUIntBE","divmodInt64","hi32","Math","floor","lo32","roundedInt64","NearUInt64","readUInt32LE","split","writeUInt32LE","NearInt64","readInt32LE","writeInt32LE","Sequence","elementLayout","count","idx","elo","reduce","Structure","decodePrefixes","isArray","acc","fd","undefined","fsp","dest","firstOffset","lastOffset","lastWrote","fv","shift","layoutFor","offsetOf","UnionDiscriminator","UnionLayoutDiscriminator","Union","discr","defaultLayout","discriminator","usesPrefixDiscriminator","registry","boundGetSourceVariant","defaultGetSourceVariant","bind","getSourceVariant","configGetSourceVariant","gsv","vlo","getVariant","tag","dlo","clo","contentOffset","addVariant","variant","VariantLayout","vb","union","fixBitwiseResult","BitStructure","word","msb","_packedSetValue","_packedGetValue","addField","bits","bf","BitField","addBoolean","Boolean","fieldFor","container","totalBits","usedBits","sum","valueMask","start","wordMask","wordValue","Blob","srcBuffer","write","has","prefix","Events","EE","fn","context","once","addListener","emitter","listener","evt","_eventsCount","clearEvent","EventEmitter","__proto__","eventNames","events","names","getOwnPropertySymbols","listeners","handlers","ee","listenerCount","a1","a2","a3","a4","a5","len","j","removeAllListeners","prefixed","module","basex","_Buffer","ALPHABET","BASE_MAP","x","charAt","xc","charCodeAt","BASE","LEADER","FACTOR","log","iFACTOR","decodeUnsafe","source","psz","zeroes","size","b256","carry","it3","it4","vch","allocUnsafe","fill","isBuffer","pbegin","pend","b58","it1","it2","str","repeat","string","oU","buf","reversed","reverse","hex","BigInt","k$","num","width","padStart","__createBinding","k2","defineProperty","enumerable","get","__setModuleDefault","__decorate","decorators","target","desc","d","c","getOwnPropertyDescriptor","Reflect","decorate","__importStar","mod","__esModule","__importDefault","deserializeUnchecked","deserialize","serialize","BinaryReader","BinaryWriter","BorshError","baseDecode","baseEncode","bn_js_1","bs58_1","encoding","textDecoder","TextDecoder","fatal","default","fieldPath","originalMessage","addToFieldPath","fieldName","splice","join","maybeResize","writeU8","writeUInt8","writeU16","writeUInt16LE","writeU32","writeU64","writeBuffer","toArray","writeU128","writeU256","writeU512","subarray","writeString","writeFixedArray","array","writeArray","elem","handlingRangeError","propertyKey","propertyDescriptor","originalMethod","RangeError","readU8","readUInt8","readU16","readUInt16LE","readU32","readU64","readBuffer","readU128","readU256","readU512","readString","readFixedArray","readArray","capitalizeFirstLetter","toUpperCase","serializeField","schema","fieldType","writer","item","kind","forEach","val","serializeStruct","obj","borshSerialize","structSchema","map","field","deserializeField","reader","arr","Map","set","deserializeStruct","classType","borshDeserialize","fieldValue","Writer","Reader","ArrayBuffer","isView","byteLength","isMergeableObject","stringValue","isNonNullObject","$$typeof","REACT_ELEMENT_TYPE","canUseSymbol","for","cloneUnlessOtherwiseSpecified","clone","deepmerge","defaultArrayMerge","element","getKeys","filter","symbol","propertyIsEnumerable","propertyIsOnObject","arrayMerge","destination","sourceIsArray","getMergeFunction","customMerge","all","prev","uuid","v4","generateRequest","ClientBrowser","callServer","reviver","replacer","version","notificationIdNull","request","method","params","callback","isBatch","isRaw","hasCallback","err","stringify","_parseResponse","responseText","isError","jsonrpc","getRandomValues","rnds8","regex","byteToHex","substr","esm_browser_stringify","toLowerCase","test","TypeError","esm_browser_v4","rnds","random","rng","crypto","msCrypto","_interopRequireDefault","Z","_regenerator","_asyncToGenerator2","_typeof2","_classCallCheck2","_createClass2","_possibleConstructorReturn2","_getPrototypeOf2","_inherits2","_eventemitter","_utils","_isNativeReflectConstruct","valueOf","construct","__rest","p","_EventEmitter","_login","_listMethods","_subscribe","_unsubscribe","CommonClient","webSocketFactory","address","generate_request_id","dataPack","_a$autoconnect","autoconnect","_a$reconnect","reconnect","_a$reconnect_interval","reconnect_interval","_a$max_reconnects","max_reconnects","rest_options","queue","rpc_id","ready","reconnect_timer_id","current_reconnects","DefaultDataPack","_connect","socket","ws_opts","_this2","promise","mark","_callee","resp","wrap","_context","abrupt","stop","_x","_callee2","_context2","_this3","_callee3","_context3","_x2","_callee4","_context4","_x3","interval","_this4","addEventListener","_ref","notification","_ref2","reason","WebSocketBrowserImpl","protocols","window","WebSocket","onopen","onmessage","onerror","onclose","optionsOrCallback","createError","details","errors","inRange","a","min","max","ToDictionary","Stream","tokens","decoderError","opt_code_point","endOfStream","read","prepend","token","unshift","DEFAULT_ENCODING","_streaming","_BOMseen","_decoder","_fatal","_ignoreBOM","TextEncoder","_encoder","_options","UTF8Decoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","handler","stream","bite","code_point","UTF8Encoder","bytes","temp","input","input_stream","code_points","codePointsToString","cp","fromCharCode","opt_string","stringToCodePoints","u","util","validateBase64","decodeUTF8","unescape","encodeURIComponent","encodeUTF8","decodeURIComponent","escape","atob","encodeBase64","decodeBase64","btoa","root","nacl","asyncGeneratorStep","_next","_throw","toPropertyKey","_defineProperties","configurable","writable","_getPrototypeOf","getPrototypeOf","_typeof","assertThisInitialized","_regeneratorRuntime","asyncIterator","toStringTag","define","Generator","Context","h","arg","delegate","maybeInvokeDelegate","tryCatch","resultName","nextLoc","_sent","dispatchException","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","_invoke","AsyncIterator","callInvokeWithMethodAndArg","invoke","__await","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","awrap","async","rval","handle","finish","delegateYield","_setPrototypeOf","toPrimitive","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","index_esm","U2","setCustomValidity","reportValidity","resolvers_i","ref","refs","shouldUseNativeValidation","t8","startsWith","zod_n","path","unionErrors","types","KN","zod_t","mode","raw","criteriaMode","SWITCH_NAME","createSwitchContext","createSwitchScope","createContextScope","SwitchProvider","useSwitchContext","Switch","React","props","forwardedRef","__scopeSwitch","checked","checkedProp","defaultChecked","required","disabled","onCheckedChange","form","switchProps","button","setButton","composedRefs","useComposedRefs","node","hasConsumerStoppedPropagationRef","isFormControl","closest","setChecked","useControllableState","defaultProp","onChange","jsxs","scope","children","jsx","Primitive","role","getState","onClick","composeEventHandlers","prevChecked","current","isPropagationStopped","stopPropagation","BubbleInput","control","bubbles","style","transform","THUMB_NAME","SwitchThumb","thumbProps","inputProps","usePrevious","controlSize","useSize","HTMLInputElement","Event","dispatchEvent","tabIndex","position","pointerEvents","opacity","margin","Root","Thumb","WalletReadyState","BaseWalletAdapter","eventemitter3__WEBPACK_IMPORTED_MODULE_0__","connected","publicKey","autoConnect","connect","prepareTransaction","transaction","connection","_errors_js__WEBPACK_IMPORTED_MODULE_1__","oS","feePayer","recentBlockhash","getLatestBlockhash","commitment","preflightCommitment","minContextSlot","blockhash","scopePollingDetectionStrategy","detect","document","disposers","detectAndDispose","dispose","setInterval","clearInterval","readyState","removeEventListener","isIosAndRedirectable","navigator","userAgent","isIos","includes","isSafari","WalletError","WalletNotReadyError","WalletLoadError","WalletConfigError","WalletConnectionError","WalletDisconnectedError","WalletDisconnectionError","WalletAccountError","WalletPublicKeyError","WalletNotConnectedError","WalletSendTransactionError","WalletSignTransactionError","WalletSignMessageError","WalletSignInError","BaseSignerWalletAdapter","_adapter_js__WEBPACK_IMPORTED_MODULE_0__","mI","sendTransaction","_transaction_js__WEBPACK_IMPORTED_MODULE_1__","W","supportedTransactionVersions","_errors_js__WEBPACK_IMPORTED_MODULE_2__","IW","rawTransaction","signTransaction","sendRawTransaction","PY","signers","sendOptions","partialSign","signAllTransactions","transactions","signedTransactions","BaseMessageSignerWalletAdapter","BaseSignInMessageSignerWalletAdapter","isVersionedTransaction","WalletAdapterNetwork","harden","getPublicKey","transport","derivationPath","index_browser_esm","nh","paths","esm_transaction","serializeMessage","instruction","rZ","WC","LedgerWalletAdapter","signer","sz","config","url","icon","Set","_readyState","hid","adapter","i1","Loadable","Unsupported","_disconnected","_transport","_publicKey","at","_derivationPath","getDerivationPath","account","change","writeUInt32BE","_connecting","connecting","TransportWebHIDClass","OZ","W8","$w","Nx","disconnect","UG","signature","addSignature","PhantomWalletAdapter","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_1__","eC","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_2__","NotDetected","wallet","_wallet","_accountChanged","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_3__","newPublicKey","_solana_web3_js__WEBPACK_IMPORTED_MODULE_0__","toBytes","equals","H","su","phantom","solana","isPhantom","Installed","location","href","origin","isConnected","cO","_solana_wallet_adapter_base__WEBPACK_IMPORTED_MODULE_4__","sign","signAndSendTransaction","lj","signMessage","fk","Button","react__WEBPACK_IMPORTED_MODULE_0__","createElement","className","startIcon","endIcon","WalletIcon","alt","Collapse","expanded","react","useRef","instant","openCollapse","requestAnimationFrame","height","scrollHeight","closeCollapse","offsetHeight","overflow","useLayoutEffect","handleComplete","handleTransitionEnd","propertyName","transition","WalletListItem","handleClick","z","WalletSVG","viewBox","xmlns","cx","cy","fillOpacity","stroke","strokeOpacity","strokeWidth","clipPath","x1","y1","x2","y2","gradientUnits","stopColor","WalletModal","wallets","select","useWallet","O","setVisible","useWalletModal","setExpanded","useState","fadeIn","setFadeIn","portal","setPortal","listedWallets","collapsedWallets","useMemo","installed","notInstalled","hideModal","useCallback","handleClose","preventDefault","handleWalletClick","walletName","handleCollapseClick","handleTabKey","focusableElements","querySelectorAll","firstElement","lastElement","shiftKey","activeElement","focus","handleKeyDown","getComputedStyle","querySelector","react_dom","createPortal","Fragment","onMouseDown","WalletModalProvider","visible","Provider","BaseWalletConnectionButton","walletIcon","BaseWalletMultiButton","labels","setModalVisible","buttonState","onConnect","onDisconnect","useWalletMultiButton","onSelectWallet","disconnecting","handleConnect","catch","handleDisconnect","copied","setCopied","menuOpen","setMenuOpen","useEffect","contains","content","base58","toBase58","clipboard","writeText","LABELS","WalletMultiButton","DEFAULT_CONTEXT","_open","constructMissingProviderErrorMessage","action","valueName","WalletModalContext","createContext","useContext","ConnectionProvider","endpoint","react__WEBPACK_IMPORTED_MODULE_1__","ew","_useConnection_js__WEBPACK_IMPORTED_MODULE_2__","_utf8Decoder","_userAgent","Environment","_StandardWalletAdapter_instances","_StandardWalletAdapter_account","_StandardWalletAdapter_publicKey","_StandardWalletAdapter_connecting","_StandardWalletAdapter_disconnecting","_StandardWalletAdapter_off","_StandardWalletAdapter_supportedTransactionVersions","_StandardWalletAdapter_wallet","_StandardWalletAdapter_readyState","_StandardWalletAdapter_connect","_StandardWalletAdapter_connected","_StandardWalletAdapter_disconnected","_StandardWalletAdapter_reset","_StandardWalletAdapter_changed","_StandardWalletAdapter_signTransaction","_StandardWalletAdapter_signAllTransactions","_StandardWalletAdapter_signMessage","_StandardWalletAdapter_signIn","_AppReadyEvent_detail","FIELDS","SolanaMobileWalletAdapterErrorCode","ERROR_ASSOCIATION_PORT_OUT_OF_RANGE","ERROR_FORBIDDEN_WALLET_BASE_URL","ERROR_SECURE_CONTEXT_REQUIRED","ERROR_SESSION_CLOSED","ERROR_SESSION_TIMEOUT","ERROR_WALLET_NOT_FOUND","ERROR_INVALID_PROTOCOL_VERSION","SolanaMobileWalletAdapterError","SolanaMobileWalletAdapterProtocolError","jsonRpcMessageId","SolanaCloneAuthorization","decryptMessage","sharedSecret","sequenceNumberVector","initializationVector","SEQUENCE_NUMBER_BYTES","ciphertext","plaintextBuffer","subtle","decrypt","getAlgorithmParams","getUtf8Decoder","sequenceNumber","additionalData","iv","tagLength","assertAssociationPort","port","getPathParts","pathString","replace","Browser","Firefox","Other","_frame","getSequenceNumberFromByteArray","byteArray","view","DataView","getUint32","esm_awaiter","fromUint8Array","toUint8Array","base64EncodedByteArray","getPayloadFromTransaction","requireAllSignatures","verifySignatures","getTransactionFromWireMessage","messageOffset","numSignatures","eT","EC","deserializeMessageVersion","YW","GS","lib_esm_awaiter","esm_toUint8Array","SolanaMobileWalletAdapterWalletName","SolanaMobileWalletAdapter","qz","_connectionGeneration","getIsSupported","isSecureContext","esm_adapter","_authorizationResultCache","authorizationResultCache","_addressSelector","addressSelector","_appIdentity","appIdentity","_chain","chain","cluster","_onWalletNotFound","onWalletNotFound","authorizationResult","declareWalletAsInstalled","_selectedAddress","getPublicKeyFromAddress","publicKeyByteArray","_authorizationResult","runWithGuard","autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cachedAuthorizationResult","handleAuthorizationResult","performAuthorization","signInPayload","transact","authorize","identity","sign_in_payload","didPublicKeysChange","accounts","ii","nextSelectedAddress","performReauthorization","authToken","auth_token","clear","walletUriBase","wallet_uri_base","currentConnectionGeneration","esm_transact","connectionStartTime","assertSecureContext","associationKeypair","generateAssociationKeypair","generateKey","namedCurve","sessionPort","startSession","associationPublicKey","associationURLBase","randomAssociationPort","associationUrl","getAssociateAndroidIntentURL","putativePort","protocolVersions","associationPort","encodedKey","arrayBufferToBase64String","binary","exportKey","getIntentURL","methodPathname","intentUrlBase","baseUrl","URL","protocol","pathname","searchParams","unsafeBase64EncodedString","display","appendChild","contentWindow","detectionPromise","cleanup","timeoutId","handleBlur","baseUri","websocketURL","getNextRetryDelayMs","schedule","nextJsonRpcMessageId","lastKnownInboundSequenceNumber","state","__type","disposeSocket","retryWaitTimeoutId","jsonRpcResponsePromises","handleOpen","ecdhKeypair","generateECDHKeypair","createHelloReq","ecdhPublicKey","associationKeypairPrivateKey","publicKeyBuffer","signatureBuffer","hash","privateKey","ecdhPrivateKey","wasClean","closeEvent","handleError","Date","now","retryDelayMs","attemptSocketConnection","handleMessage","responseBuffer","arrayBuffer","jsonRpcMessage","decryptJsonRpcMessage","responsePromise","protocolVersion","protocolRequestHandler","parseHelloRsp","payloadBuffer","associationPublicKeyBuffer","walletPublicKey","importKey","deriveBits","public","ecdhSecretKey","deriveKey","salt","info","sessionPropertiesBuffer","sessionProperties","parseSessionProps","jsonProperties","protocol_version","encryptJsonRpcMessage","plaintext","encryptMessage","createSequenceNumberVector","setUint32","encrypt","assertSecureEndpointSpecificURI","Proxy","inputParams","handleMobileWalletRequest","methodParams","letter","sign_in_result","signInFallback","payload","domain","host","siwsMessage","createSignInMessageText","statement","uri","chainId","nonce","issuedAt","expirationTime","notBefore","requestId","resources","resource","signMessageResult","addresses","payloads","signed_message","signed_payloads","handleMobileWalletResponse","features","capabilities","supports_clone_authorization","supports_sign_and_send_transactions","deleteProperty","skipPreflight","maxRetries","waitForCommitmentToSendNextTransaction","rest","min_context_slot","skip_preflight","max_retries","wait_for_commitment_to_send_next_transaction","signatures","base64EncodedSignatures","signAndSendTransactions","bs58","base64EncodedPayloads","base64EncodedSignedMessages","signMessages","base64EncodedCompiledTransactions","signTransactions","compiledTransactions","assertIsAuthorized","selectedAddress","performSignTransactions","getTargetCommitment","targetCommitment","targetPreflightCommitment","preflightCommitmentScore","targetCommitmentScore","_1","_2","getCapabilities","signedTransaction","serializedTransaction","signedMessage","signIn","_b","signedInAddress","CACHE_KEY","defaultWalletNotFoundHandler","mobileWalletAdapter","isWalletAdapterCompatibleWallet","V","G","R","SolanaSignIn","getCommitment","_ReadonlyWalletAccount_address","WeakMap","adapter_classPrivateFieldSet","receiver","adapter_classPrivateFieldGet","StandardWalletAdapter","add","properties","standard","destroy","silent","feature","p6","rpcEndpoint","esm","aI","BR","gv","l1","chains","output","WeakSet","util_arraysEqual","index","signedMessages","bD","wallets_classPrivateFieldSet","wallets_classPrivateFieldGet","registered","register","wallets_guard","delete","existingListener","AppReadyEvent","api","cancelable","composed","detail","stopImmediatePropagation","useConstant","wrapWalletsWithAdapters","WalletNotSelectedError","WalletProviderBase","adapters","isUnloadingRef","onAutoConnectRequest","onConnectError","onError","isConnectingRef","setConnecting","isDisconnectingRef","setDisconnecting","setPublicKey","setConnected","onErrorRef","handleErrorRef","setWallets","handleReadyStateChange","prevWallets","findIndex","didAttemptAutoConnectRef","getIsMobile","getEnvironment","userAgentString","DESKTOP_WEB","MOBILE_WEB","WalletProvider","localStorageKey","useConnection","adaptersWithStandardAdapters","useStandardWalletAdapters","warnings","DEPRECATED_getWallets","getWallets","freeze","callbacks","standardAdapters","setStandardAdapters","standardAdapter","prevStandardAdapters","currentAdapters","removedAdapters","previousAdapter","existingMobileWalletAdapter","getUriForAppIdentity","createDefaultAuthorizationResultCache","storage","localStorage","removeItem","getItem","setItem","adaptersWithMobileWalletAdapter","setWalletName","useLocalStorage","defaultState","isFirstRenderRef","changeWallet","nextWalletName","hasUserSelectedAWallet","handleAutoConnectRequest","handleBeforeUnload","handleConnectError","selectWallet","ConnectionContext","EMPTY_ARRAY","logMissingProviderError","WalletContext","_RegisterWalletEvent_detail","_SolflareMetaMaskWallet_instances","_SolflareMetaMaskWallet_listeners","_SolflareMetaMaskWallet_version","_SolflareMetaMaskWallet_name","_SolflareMetaMaskWallet_icon","_SolflareMetaMaskWallet_solflareMetaMask","_SolflareMetaMaskWallet_on","_SolflareMetaMaskWallet_emit","_SolflareMetaMaskWallet_off","_SolflareMetaMaskWallet_connect","_SolflareMetaMaskWallet_disconnect","_SolflareMetaMaskWallet_signAndSendTransaction","_SolflareMetaMaskWallet_signTransaction","_SolflareMetaMaskWallet_signMessage","__classPrivateFieldSet","__classPrivateFieldGet","RegisterWalletEvent","wallet_classPrivateFieldGet","wallet_classPrivateFieldSet","SolflareMetaMaskWallet","SolflareMetaMaskClass","inputs","standardSignAndSendTransaction","standardSignTransaction","standardSignMessage","standardAccounts","detectAndRegisterSolflareMetaMaskWallet","postMessage","onMessage","registerWallet","SolflareWalletAdapter","_config","solflare","isSolflare","SolflareApp","SolflareClass","network","TorusWalletAdapter","showTorusButton","_params","isLoggedIn","TorusClass","torus","isInitialized","init","login","cleanUp","SOLANA_MAINNET_CHAIN","SOLANA_DEVNET_CHAIN","SOLANA_TESTNET_CHAIN","SOLANA_LOCALNET_CHAIN","SolanaSignAndSendTransaction","SolanaSignMessage","SolanaSignTransaction","_0n","_1n","wNAF","constTimeNegate","condition","neg","negate","opts","windows","ceil","windowSize","unsafeLadder","elm","ZERO","double","precomputeWindow","points","base","precomputes","mask","maxNumber","shiftBy","wbits","offset2","abs","cond1","cond2","wNAFCached","precomputesMap","_WINDOW_SIZE","comp","validateBasic","curve","_modular_js__WEBPACK_IMPORTED_MODULE_0__","OP","Fp","_utils_js__WEBPACK_IMPORTED_MODULE_1__","FF","Gx","Gy","nBitLength","nByteLength","kK","ORDER","_2n","_3n","_4n","_5n","_8n","pow2","power","modulo","invert","number","q","gcd","isNegativeLE","FIELD_FIELDS","validateField","MASK","BYTES","BITS","_utils_js__WEBPACK_IMPORTED_MODULE_0__","nLength","_nBitLength","Field","bitLen","isLE","redef","sqrtP","FpSqrt","p1div4","pow","eql","sqr","c1","n2","mul","nv","ONE","tonelliShanks","Q","S","legendreC","Q1div2","t2","ge","dQ","isValid","is0","isOdd","lhs","rhs","FpPow","div","sqrN","addN","subN","mulN","inv","sqrt","invertBatch","FpInvertBatch","nums","tmp","lastMultiplied","inverted","reduceRight","lst","cmov","S5","tL","fromBytes","ty","bytesToNumberBE","FpSqrtEven","getFieldBytesLength","fieldOrder","bitLength","getMinHashLength","mapHashToField","fieldLen","minLen","reduced","isBytes","abytes","hexes","bytesToHex","hexToNumber","asciis","_0","_9","_A","_F","_f","asciiToBase16","char","hexToBytes","hl","al","ai","hi","n1","bytesToNumberLE","numberToBytesBE","numberToBytesLE","ensureBytes","title","expectedLength","concatBytes","arrays","pad","bitMask","u8n","u8fr","createHmacDrbg","hashLen","qByteLen","hmacFn","reseed","seed","gen","out","sl","pred","validatorFns","bigint","function","boolean","stringOrUint8Array","isSafeInteger","outputLen","validateObject","validators","optValidators","checkField","isOptional","checkVal","entries","SHA512_Kh","SHA512_Kl","_u64","SHA512_W_H","Uint32Array","SHA512_W_L","SHA512","_md","VR","Ah","Al","Bh","Bl","Ch","Cl","Dh","Dl","Eh","El","Fh","Fl","Gh","Gl","Hh","Hl","process","W15h","W15l","s0h","rotrSH","shrSH","s0l","rotrSL","shrSL","W2h","W2l","s1h","rotrBH","s1l","rotrBL","SUMl","add4L","SUMh","add4H","sigma1h","sigma1l","CHIh","CHIl","T1ll","add5L","T1h","add5H","T1l","sigma0h","sigma0l","MAJh","MAJl","All","add3L","add3H","roundClean","sha512_sha512","utils","hE","VERIFY_DEFAULT","zip215","ED25519_P","ED25519_SQRT_M1","ed25519_0n","ed25519_1n","ed25519_2n","_10n","_20n","_40n","_80n","uvRatio","v3","modular","wQ","ed25519_pow_2_252_3","b2","b4","oA","b5","b10","b20","b40","b80","b160","b240","b250","pow_p_5_8","vx2","root1","root2","useRoot1","useRoot2","noRoot","Tu","gN","ed25519Defaults","randomBytes","O6","adjustScalarBytes","ed25519","twistedEdwards","curveDef","CURVE","validateOpts","abstract_curve","K","abstract_utils","mapToCurve","CURVE_ORDER","prehash","cHash","cofactor","modP","phflag","inBig","in0MaskRange","assertInRange","assertGE0","pointPrecomputes","isPoint","other","Point","ex","ey","ez","et","toAffine","fromAffine","normalizeZ","toInv","_setWindowSize","assertValidity","X","Y","T","X2","Y2","Z2","Z4","aX2","left","XY","X1","Y1","Z1","X1Z2","X2Z1","Y1Z2","Y2Z1","A","B","C","D","x1y1","E","F","X3","Y3","T3","T1","T2","subtract","wnaf","multiply","scalar","multiplyUnsafe","I","isSmallOrder","isTorsionFree","iz","ax","ay","zz","clearCofactor","fromHex","normed","ql","lastByte","isXOdd","isLastByteOdd","fromPrivateKey","privKey","getExtendedPublicKey","point","toRawBytes","toHex","ci","M","modN_LE","hashed","head","pointBytes","hashDomainToScalar","msgs","eV","verify","sig","SB","RkA","ExtendedPoint","randomPrivateKey","precompute","ELL2_C1","assertRstPoint","RistPoint","DV","SQRT_AD_MINUS_ONE","INVSQRT_A_MINUS_D","ONE_MINUS_D_SQ","D_MINUS_ONE_SQ","invertSqrt","MAX_255B","bytes255ToNumberLE","calcElligatorRistrettoMap","r0","SQRT_M1","Ns","Ns_D_is_sq","s_","Nt","s2","W0","W1","W2","W3","ep","ap","hashToCurve","R1","R2","emsg","equalBytes","u1","u2","u1_2","u2_2","Dx","Dy","u2sq","invsqrt","D1","D2","zInv","_y","one","two","HMAC","kb","finished","destroyed","_assert","vp","O0","iHash","update","blockLen","digest","oHash","Gg","digestInto","_cloneInto","hmac","b2n","h2b","DER","Err","_parseInt","toSig","gk","sBytes","rBytesLeft","hexFromSig","parseInt","shl","rhl","rl","secp256k1P","secp256k1N","secp256k1_1n","secp256k1_2n","divNearest","_6n","_11n","_22n","_23n","_44n","_88n","b3","b6","b9","b11","b22","b44","b88","b176","b220","b223","t1","secp256k1","createCurve","defHash","weierstrass","bits2int","bits2int_modN","lowS","compressedLen","uncompressedLen","modN","invN","U_","ProjectivePoint","normPrivateKeyToScalar","weierstrassEquation","isWithinCurveOrder","weierstrassPoints","validatePointOpts","allowedPrivateKeyLengths","wrapPrivateKey","allowInfinityPoint","endo","beta","splitScalar","_c","_isCompressed","tail","x3","assertGE","lengths","_t","assertPrjPoint","px","py","pz","right","hasEvenY","U1","Z3","t0","t3","t4","t5","k1neg","k1","k2neg","k1p","k2p","fake","f1p","f2p","multiplyAndAddUnsafe","isCompressed","_bits","cat","sqrtError","numToNByteStr","slcNum","Signature","recovery","fromCompact","fromDER","addRecoveryBit","recoverPublicKey","msgHash","rec","radj","ir","hasHighS","normalizeS","toDERRawBytes","toDERHex","toCompactRawBytes","toCompactHex","isProbPub","delta","ORDER_MASK","int2octets","defaultSigOpts","defaultVerOpts","getSharedSecret","privateA","publicB","k2sig","prepSig","extraEntropy","ent","h1int","seedArgs","kBytes","ik","normS","isBiggerThanHalfOrder","drbg","n$","_sig","derError","sg","is","isValidPrivateKey","PS","Us","b1","POW_2_128","c2","esm_sha256","J","exists","instance","checkFinished","Chi","Maj","HashMD","padOffset","pos","GL","_assert_js__WEBPACK_IMPORTED_MODULE_1__","take","dataView","J8","setBigUint64","_32n","_u32_max","wh","wl","oview","outLen","U32_MASK64","fromBig","le","rotlSH","rotlSL","rotlBH","rotlBL","toBig","_l","rotr32H","_h","rotr32L","low","SHA256_K","SHA256_IV","SHA256_W","SHA256","_md_js__WEBPACK_IMPORTED_MODULE_0__","W15","s0","np","s1","bc","l3","sha256","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","_7n","_256n","_0x71n","round","SHA3_IOTA_H","SHA3_IOTA_L","_u64_js__WEBPACK_IMPORTED_MODULE_0__","Vl","rotlH","SD","EP","rotlL","mk","gm","Keccak","suffix","enableXOF","rounds","posOut","_assert_js__WEBPACK_IMPORTED_MODULE_2__","Rx","state32","keccak","iA","keccakP","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","writeInto","bufferOut","xofInto","xof","keccak_256","crypto_crypto","u32","createView","rotr","byteSwap","byteSwap32","utf8ToBytes","Hash","wrapConstructor","hashCons","hashC","bytesLength","CONNECT_EVENT_ERROR_CODES","CONNECT_ITEM_ERROR_CODES","SEND_TRANSACTION_ERROR_CODES","SIGN_DATA_ERROR_CODES","DISCONNECT_ERROR_CODES","CHAIN","urlSafe","uint8Array","nacl_util","encodeUint8Array","encoded","decodedUint8Array","toObject","toHexString","hexString","byte","hexToByteArray","SessionCrypto","keyPair","nonceLength","createKeypairFromString","createKeypair","sessionId","nacl_fast","box","secretKey","createNonce","receiverPublicKey","encodedMessage","encrypted","concatUint8Arrays","buffer1","buffer2","mergedArray","senderPublicKey","internalMessage","splitToUint8Arrays","decrypted","stringifyKeypair","TonConnectError","DappMetadataError","ManifestContentErrorError","ManifestNotFoundError","WalletAlreadyConnectedError","UserRejectsError","BadRequestError","UnknownAppError","WalletNotInjectedError","FetchWalletsError","WrongAddressError","ParseHexError","UnknownError","connectEventErrorsCodes","UNKNOWN_ERROR","USER_REJECTS_ERROR","BAD_REQUEST_ERROR","UNKNOWN_APP_ERROR","MANIFEST_NOT_FOUND_ERROR","MANIFEST_CONTENT_ERROR","ConnectErrorsParser","parseError","ErrorConstructor","connectErrorsParser","RpcParser","sendTransactionErrors","SendTransactionParser","convertToRpcRequest","parseAndThrowError","convertFromRpcResponse","rpcResponse","boc","sendTransactionParser","HttpBridgeGatewayStorage","bridgeUrl","storeKey","storeLastEventId","lastEventId","removeLastEventId","getLastEventId","addPathToUrl","removeUrlLastSlash","isTelegramUrl","link","hostname","encodeTelegramUrlParameters","parameters","replaceAll","delay","signal","aborted","createAbortController","abortController","AbortController","abort","callForSuccess","lastError","attempts","delayMs","logDebug","debug","logError","BridgeGateway","errorsListener","ssePath","postPath","heartbeatMessage","defaultTtl","defaultReconnectDelay","eventSource","createResource","createFn","disposeFn","currentResource","currentArgs","currentPromise","currentSignal","allSettled","recreate","openingDeadlineMS","eventSourceConfig","bridgeGatewayStorage","errorHandler","errorsHandler","messageHandler","messagesHandler","createEventSource","finally","deferOptions","append","EventSource","newInstance","isReady","OPEN","isClosed","isConnecting","CONNECTING","registerSession","topic","ttlOrOptions","ttl","Base64","post","ok","status","MAX_SAFE_INTEGER","pause","unPause","setListener","setErrorsListener","fetch","bridgeIncomingMessage","isPendingConnectionHttp","BridgeConnectionStorage","storeConnection","rawSession","sessionKeyPair","session","sessionCrypto","rawConnection","connectEvent","lastWalletEventId","nextRpcRequestId","connectionSource","removeConnection","getConnection","stored","getHttpConnection","getHttpPendingConnection","getInjectedConnection","storedConnectionType","storeLastWalletEventId","getLastWalletEventId","increaseNextRpcRequestId","lastId","getNextRpcRequestId","BridgeProvider","walletConnectionSource","standardUniversalLink","pendingRequests","gateway","pendingGateways","defaultOpeningDeadlineMS","connectionStorage","fromStorage","bridgeConnectionStorage","closeGateways","openGateways","universalLink","generateUniversalLink","restoreConnection","storedConnection","gatewayListener","gatewayErrorsListener","sendRequest","optionsOrOnRequestSent","onRequestSent","encodedRequest","closeConnection","called","removeBridgeAndSession","bridge","promises","pendingGatewaysListener","except","walletMessage","updateSession","tonAddrItem","items","connectEventToSave","generateTGUniversalLink","generateRegularUniversalLink","PROTOCOL_VERSION","startapp","urlToWrap","convertToDirectLink","hasProperties","propertyKeys","every","InMemoryStorage","getInstance","getWindow","InjectedProvider","injectedWalletKey","unsubscribeCallback","listenSubscriptions","isWindowContainsWallet","injectedWallet","tonconnect","jsBridgeKey","isWalletInjected","isInsideWalletBrowser","isWalletBrowser","getCurrentlyInjectedWallets","isJSBridgeWithMetadata","walletInfo","appName","app_name","aboutUrl","about_url","imageUrl","image","tondns","injected","embedded","platforms","makeSubscriptions","closeAllListeners","eventsCallback","connectEventError","DefaultStorage","tryGetLocalStorage","isLocalStorageAvailable","esm_process","versions","isWalletInfoCurrentlyInjected","isWalletInfoInjectable","isWalletInfoCurrentlyEmbedded","isWalletInfoRemote","FALLBACK_WALLETS_LIST","universal_url","deepLink","WalletsListManager","walletsListCache","walletsListCacheCreationTimestamp","walletsListSource","cacheTTLMs","fetchWalletsList","getEmbeddedWallet","embeddedWallets","walletsList","walletsResponse","json","wrongFormatWallets","isCorrectWalletConfigDTO","currentlyInjectedWallets","mergeWalletsLists","walletConfigDTOListToWalletConfigList","walletConfigDTO","walletConfigBase","walletConfig","list1","list2","list1Item","list2Item","sseBridge","jsBridge","WalletNotSupportFeatureError","createRequestVersionEvent","createResponseVersionEvent","createVersionInfo","ton_connect_sdk_lib","ton_connect_ui_lib","createConnectionInfo","_d","_e","_g","isTonProof","connectItems","tonProof","wallet_address","wallet_type","device","wallet_version","appVersion","auth_type","custom_data","chain_id","provider","createConnectionStartedEvent","createConnectionCompletedEvent","is_success","createConnectionErrorEvent","error_message","errorCode","error_code","createConnectionRestoringStartedEvent","createConnectionRestoringCompletedEvent","createConnectionRestoringErrorEvent","errorMessage","createTransactionInfo","valid_until","validUntil","messages","amount","createTransactionSentForSignatureEvent","createTransactionSignedEvent","signed_transaction","createTransactionSigningFailedEvent","createDisconnectionEvent","BrowserEventDispatcher","eventDetails","CustomEvent","TonConnectTracker","eventPrefix","tonConnectUiVersion","eventDispatcher","tonConnectSdkVersion","setRequestVersionHandler","requestTonConnectUiVersion","dispatchUserActionEvent","trackConnectionStarted","trackConnectionCompleted","trackConnectionError","trackConnectionRestoringStarted","trackConnectionRestoringCompleted","trackConnectionRestoringError","trackDisconnection","trackTransactionSentForSignature","trackTransactionSigned","trackTransactionSigningFailed","TonConnect","statusChangeSubscriptions","statusChangeErrorSubscriptions","dappSettings","manifestUrl","getWebPageManifest","walletsListCacheTTLMs","tracker","disableAutoPauseConnection","addWindowFocusAndBlurSubscriptions","onStatusChange","requestOrOptions","createProvider","createConnectRequest","bridgeConnectionType","embeddedWallet","walletEventsListener","onAbortRestore","checkConnection","checkSendTransactionSupport","supportsDeprecatedSendTransactionFeature","sendTransactionFeature","maxMessages","requiredMessagesNumber","logWarning","tx","prevAbortController","onWalletDisconnected","pauseConnection","unPauseConnection","getDocument","hidden","onWalletConnected","onWalletConnectError","tonAccountItem","tonProofItem","walletStateInit","toUserFriendlyAddress","hexAddress","testOnly","wc","parseHexAddress","parts","length2","doubled","hexSubstring","substring","toByteMap","addr","Int8Array","addressWithChecksum","crc16","reg","addressBase64","walletJSKey","ord","hasRequiredReactJsxRuntime_production_min","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","__spreadValues","__objRest","exclude","jsxRuntime","reactJsxRuntime_production_min","requireReactJsxRuntime_production_min","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","__self","__source","defaultProps","_owner","isClientSide","TonConnectUIContext","tonConnectUI","TonConnectUIProvider$1","memo","_tonconnect_ui__WEBPACK_IMPORTED_MODULE_1__","HF","TonConnectUIReactError","BN","TonConnectProviderNotSetError","useTonConnectUI","tonConnectUI2","setOptions","uiOptions","checkProvider","buttonRootId","useTonWallet","setWallet","useIsConnectionRestored","restored","setRestored","connectionRestored","StandardConnect","StandardDisconnect","StandardEvents","StructError","failure","failures","cached","_cached","isObject","print","toFailures","struct","toFailure","branch","refinement","run","coerce","coercer","valid","validator","refiner","Struct","assert","validate","tuples","tuple","shiftIterator","any","Element","Class","literal","constant","description","nullable","optional","record","Key","Value","Elements","Never","Structs","first","unknown"],"sourceRoot":""}