Reading from NEAR testnet…
Reading from NEAR testnet…
6Hgg7Q7TyE35oEkYfXJGgiU4ituihaAE5a9YL7kvjnce
sleetcreate.testnet to sleetcreate.testnet · failed
fs_store()
r(o),Number(n)))}panic(n){throw new Error("panic: "+n)}abort(n,o,a,c){const l=this.readUTF16CStr(n),u=this.readUTF16CStr(o),d=`${l} ${u}:${a}:${c}`;throw!l||!u?new Error("abort: String encoding is bad UTF-16 sequence."):new Error("abort: "+d)}appendToLog(n,o){this.logs.push(this.readUTF8CStr(n,o))}readStorage(n,o,a){const c=this.storageRead(n,o);return c==null?0n:(this.registers[a]=c,1n)}hasStorageKey(n,o){return this.storageRead(n,o)==null?0n:1n}getHostImports(){return{register_len:this.getRegisterLength.bind(this),read_register:this.readFromRegister.bind(this),current_account_id:this.getCurrentAccountId.bind(this),input:this.inputMethodArgs.bind(this),block_index:this.getBlockHeight.bind(this),block_timestamp:this.getBlockTimestamp.bind(this),sha256:this.sha256.bind(this),value_return:this.returnValue.bind(this),abort:this.abort.bind(this),log_utf8:this.appendToLog.bind(this),log_utf16:this.appendToLog.bind(this),storage_read:this.readStorage.bind(this),storage_has_key:this.hasStorageKey.bind(this),panic:()=>this.panic("explicit guest panic"),panic_utf8:(n,o)=>this.panic(this.readUTF8CStr(n,o)),epoch_height:notImplemented$1("epoch_height"),storage_usage:notImplemented$1("storage_usage"),account_balance:notImplemented$1("account_balance"),account_locked_balance:notImplemented$1("account_locked_balance"),random_seed:notImplemented$1("random_seed"),ripemd160:notImplemented$1("ripemd160"),keccak256:notImplemented$1("keccak256"),keccak512:notImplemented$1("keccak512"),ecrecover:notImplemented$1("ecrecover"),validator_stake:notImplemented$1("validator_stake"),validator_total_stake:notImplemented$1("validator_total_stake"),write_register:prohibitedInView$1("write_register"),signer_account_id:prohibitedInView$1("signer_account_id"),signer_account_pk:prohibitedInView$1("signer_account_pk"),predecessor_account_id:prohibitedInView$1("predecessor_account_id"),attached_deposit:prohibitedInView$1("attached_deposit"),prepaid_gas:prohibitedInView$1("prepaid_gas"),used_gas:prohibitedInView$1("used_gas"),promise_create:prohibitedInView$1("promise_create"),promise_then:prohibitedInView$1("promise_then"),promise_and:prohibitedInView$1("promise_and"),promise_batch_create:prohibitedInView$1("promise_batch_create"),promise_batch_then:prohibitedInView$1("promise_batch_then"),promise_batch_action_create_account:prohibitedInView$1("promise_batch_action_create_account"),promise_batch_action_deploy_contract:prohibitedInView$1("promise_batch_action_deploy_contract"),promise_batch_action_function_call:prohibitedInView$1("promise_batch_action_function_call"),promise_batch_action_function_call_weight:prohibitedInView$1("promise_batch_action_function_call_weight"),promise_batch_action_transfer:prohibitedInView$1("promise_batch_action_transfer"),promise_batch_action_stake:prohibitedInView$1("promise_batch_action_stake"),promise_batch_action_add_key_with_full_access:prohibitedInView$1("promise_batch_action_add_key_with_full_access"),promise_batch_action_add_key_with_function_call:prohibitedInView$1("promise_batch_action_add_key_with_function_call"),promise_batch_action_delete_key:prohibitedInView$1("promise_batch_action_delete_key"),promise_batch_action_delete_account:prohibitedInView$1("promise_batch_action_delete_account"),promise_results_count:prohibitedInView$1("promise_results_count"),promise_result:prohibitedInView$1("promise_result"),promise_return:prohibitedInView$1("promise_return"),storage_write:prohibitedInView$1("storage_write"),storage_remove:prohibitedInView$1("storage_remove")}}async execute(n){const o=await WebAssembly.compile(this.wasm),c=(await WebAssembly.instantiate(o,{env:{...this.getHostImports(),memory:this.memory}})).exports[n];if(c==null)throw new Error(`Contract method '${n}' does not exists in contract ${this.context.contractId} for block id ${this.context.blockHeight}`);return c(),{result:this.result,logs:this.logs}}};runtime$1.Runtime=Runtime$1;Object.defineProperty(localViewExecution$1,"__esModule",{value:!0});localViewExecution$1.LocalViewExecution=void 0;const utils_1$i=commonjs$7,storage_1$1=storage$1,runtime_1$1=runtime$1,utils_2$5=utils$7;let LocalViewExecution$1=class{constructor(n){pe(this,"connection");pe(this,"storage");this.connection=n.getConnection(),this.storage=new storage_1$1.Storage}async fetchContractCode(n,o){return(await this.connection.provider.query({request_type:"view_code",account_id:n,...o})).code_base64}async fetchContractState(n,o){return(0,utils_2$5.viewState)(this.connection,n,"",o)}async fetch(n,o){const a=await this.connection.provider.block(o),c=a.header.hash,l=a.header.height,u=a.header.timestamp,d=await this.fetchContractCode(n,o),h=await this.fetchContractState(n,o);return{blockHash:c,blockHeight:l,blockTimestamp:u,contractCode:d,contractState:h}}async loadOrFetch(n,o){const a=this.storage.load(o);if(a)return a;const{blockHash:c,...l}=await this.fetch(n,o);return this.storage.save(c,l),l}async viewFunction({contractId:n,methodName:o,args:a={},blockQuery:c={finality:"optimistic"}}){const l=JSON.stringify(a),{contractCode:u,contractState:d,blockHeight:h,blockTimestamp:y}=await this.loadOrFetch(n,c),p=new runtime_1$1.Runtime({contractId:n,contractCode:u,contractState:d,blockHeight:h,blockTimestamp:y,methodArgs:l}),{result:v,logs:b}=await p.execute(o);return b&&(0,utils_1$i.printTxOutcomeLogs)({contractId:n,logs:b}),JSON.parse(Buffer.from(v).toString())}};localViewExecution$1.LocalViewExecution=LocalViewExecution$1;var lib$a={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbiSerializationType=e.AbiFunctionModifier=e.AbiFunctionKind=e.SCHEMA_VERSION=void 0,e.SCHEMA_VERSION="0.4.0",function(n){n.View="view",n.Call="call"}(e.AbiFunctionKind||(e.AbiFunctionKind={})),function(n){n.Init="init",n.Private="private",n.Payable="payable"}(e.AbiFunctionModifier||(e.AbiFunctionModifier={})),function(n){n.Json="json",n.Borsh="borsh"}(e.AbiSerializationType||(e.AbiSerializationType={}))})(lib$a);var errors$6={};Object.defineProperty(errors$6,"__esModule",{value:!0});errors$6.ConflictingOptions=errors$6.ArgumentSchemaError=errors$6.UnknownArgumentError=errors$6.UnsupportedSerializationError=void 0;let UnsupportedSerializationError$1=class extends Error{constructor(n,o){super(`Contract method '${n}' is using an unsupported serialization type ${o}`)}};errors$6.UnsupportedSerializationError=UnsupportedSerializationError$1;let UnknownArgumentError$1=class extends Error{constructor(n,o){super(`Unrecognized argument '${n}', expected '${JSON.stringify(o)}'`)}};errors$6.UnknownArgumentError=UnknownArgumentError$1;let ArgumentSchemaError$1=class extends Error{constructor(n,o){super(`Argument '${n}' does not conform to the specified ABI schema: '${JSON.stringify(o)}'`)}};errors$6.ArgumentSchemaError=ArgumentSchemaError$1;let ConflictingOptions$1=class extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}};errors$6.ConflictingOptions=ConflictingOptions$1;var __importDefault$f=commonjsGlobal$c&&commonjsGlobal$c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(contract$3,"__esModule",{value:!0});contract$3.Contract=void 0;const utils_1$h=commonjs$7,types_1$i=commonjs$6,local_view_execution_1$1=localViewExecution$1,is_my_json_valid_1$1=__importDefault$f(isMyJsonValidExports),depd_1$2=__importDefault$f(browser$5),near_abi_1$1=lib$a,account_1$2=account$2,errors_1$3=errors$6,utils_2$4=utils$7;function nameFunction$1(e,n){return{[e](...o){return n(...o)}}[e]}function validateArguments$1(e,n,o){var c;if(!isObject$k(e))return;if(n.params&&n.params.serialization_type!==near_abi_1$1.AbiSerializationType.Json)throw new errors_1$3.UnsupportedSerializationError(n.name,n.params.serialization_type);if(n.result&&n.result.serialization_type!==near_abi_1$1.AbiSerializationType.Json)throw new errors_1$3.UnsupportedSerializationError(n.name,n.result.serialization_type);const a=((c=n.params)==null?void 0:c.args)||[];for(const l of a){const u=e[l.name],d=l.type_schema;d.definitions=o.body.root_schema.definitions;const h=(0,is_my_json_valid_1$1.default)(d);if(!h(u))throw new errors_1$3.ArgumentSchemaError(l.name,h.errors)}for(const l of Object.keys(e))if(!a.find(d=>d.name===l))throw new errors_1$3.UnknownArgumentError(l,a.map(d=>d.name))}const isUint8Array$1=e=>e&&e.byteLength!==void 0&&e.byteLength===e.length,isObject$k=e=>Object.prototype.toString.call(e)==="[object Object]";let Contract$1=class{constructor(n,o,a){pe(this,"account");pe(this,"connection");pe(this,"contractId");pe(this,"lve");this.connection=n.getConnection(),n instanceof account_1$2.Account&&((0,depd_1$2.default)("new Contract(account, contractId, options)")("use `new Contract(connection, contractId, options)` instead"),this.account=n),this.contractId=o,this.lve=new local_view_execution_1$1.LocalViewExecution(n);const{viewMethods:c=[],changeMethods:l=[],abi:u,useLocalViewExecution:d}=a;let h=c.map(p=>({name:p,abi:null})),y=l.map(p=>({name:p,abi:null}));if(u){if(h.length>0||y.length>0)throw new errors_1$3.ConflictingOptions;h=u.body.functions.filter(p=>p.kind===near_abi_1$1.AbiFunctionKind.View).map(p=>({name:p.name,abi:p})),y=u.body.functions.filter(p=>p.kind===near_abi_1$1.AbiFunctionKind.Call).map(p=>({name:p.name,abi:p}))}h.forEach(({name:p,abi:v})=>{Object.defineProperty(this,p,{writable:!1,enumerable:!0,value:nameFunction$1(p,async(b={},_={},...T)=>{if(T.length||!(isObject$k(b)||isUint8Array$1(b))||!isObject$k(_))throw new types_1$i.PositionalArgsError;if(v&&validateArguments$1(b,v,u),d)try{return await this.lve.viewFunction({contractId:this.contractId,methodName:p,args:b,..._})}catch(I){utils_1$h.Logger.warn(`Local view execution failed with: "${I.message}"`),utils_1$h.Logger.warn("Fallback to normal RPC call")}return this.account?this.account.viewFunction({contractId:this.contractId,methodName:p,args:b,..._}):(0,utils_2$4.viewFunction)(this.connection,{contractId:this.contractId,methodName:p,args:b,..._})})})}),y.forEach(({name:p,abi:v})=>{Object.defineProperty(this,p,{writable:!1,enumerable:!0,value:nameFunction$1(p,async(...b)=>{if(b.length&&(b.length>3||!(isObject$k(b[0])||isUint8Array$1(b[0]))))throw new types_1$i.PositionalArgsError;return(b.length>1||!(b[0]&&b[0].args))&&((0,depd_1$2.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ signerAccount, args, gas?, amount?, callbackUrl?, meta? })` instead"),b[0]={args:b[0],gas:b[1],amount:b[2]}),v&&validateArguments$1(b[0].args,v,u),this._changeMethod({methodName:p,...b[0]})})})})}async _changeMethod({signerAccount:n,args:o,methodName:a,gas:c,amount:l,meta:u,callbackUrl:d}){validateBNLike$1({gas:c,amount:l});const h=this.account||n;if(!h)throw new Error("signerAccount must be specified");const y=await h.functionCall({contractId:this.contractId,methodName:a,args:o,gas:c,attachedDeposit:l,walletMeta:u,walletCallbackUrl:d});return(0,utils_1$h.getTransactionLastResult)(y)}};contract$3.Contract=Contract$1;function validateBNLike$1(e){const n="number, decimal string or BigInt";for(const o of Object.keys(e)){const a=e[o];if(a&&typeof a!="bigint"&&isNaN(a))throw new types_1$i.ArgumentTypeError(o,n,a)}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MultisigStateStatus=e.MultisigDeleteRequestRejectionError=e.UnsupportedSerializationError=e.UnknownArgumentError=e.ConflictingOptions=e.ArgumentSchemaError=e.Contract=e.MULTISIG_CONFIRM_METHODS=e.MULTISIG_CHANGE_METHODS=e.MULTISIG_DEPOSIT=e.MULTISIG_GAS=e.MULTISIG_ALLOWANCE=e.MULTISIG_STORAGE_KEY=e.Connection=e.AccountMultisig=e.UrlAccountCreator=e.LocalAccountCreator=e.AccountCreator=e.Account2FA=e.Account=void 0;var n=account$2;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}});var o=account_2fa$1;Object.defineProperty(e,"Account2FA",{enumerable:!0,get:function(){return o.Account2FA}});var a=account_creator$3;Object.defineProperty(e,"AccountCreator",{enumerable:!0,get:function(){return a.AccountCreator}}),Object.defineProperty(e,"LocalAccountCreator",{enumerable:!0,get:function(){return a.LocalAccountCreator}}),Object.defineProperty(e,"UrlAccountCreator",{enumerable:!0,get:function(){return a.UrlAccountCreator}});var c=account_multisig$3;Object.defineProperty(e,"AccountMultisig",{enumerable:!0,get:function(){return c.AccountMultisig}});var l=connection$3;Object.defineProperty(e,"Connection",{enumerable:!0,get:function(){return l.Connection}});var u=constants$5;Object.defineProperty(e,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return u.MULTISIG_STORAGE_KEY}}),Object.defineProperty(e,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return u.MULTISIG_ALLOWANCE}}),Object.defineProperty(e,"MULTISIG_GAS",{enumerable:!0,get:function(){return u.MULTISIG_GAS}}),Object.defineProperty(e,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return u.MULTISIG_DEPOSIT}}),Object.defineProperty(e,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return u.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(e,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return u.MULTISIG_CONFIRM_METHODS}});var d=contract$3;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return d.Contract}});var h=errors$6;Object.defineProperty(e,"ArgumentSchemaError",{enumerable:!0,get:function(){return h.ArgumentSchemaError}}),Object.defineProperty(e,"ConflictingOptions",{enumerable:!0,get:function(){return h.ConflictingOptions}}),Object.defineProperty(e,"UnknownArgumentError",{enumerable:!0,get:function(){return h.UnknownArgumentError}}),Object.defineProperty(e,"UnsupportedSerializationError",{enumerable:!0,get:function(){return h.UnsupportedSerializationError}});var y=types$3;Object.defineProperty(e,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return y.MultisigDeleteRequestRejectionError}}),Object.defineProperty(e,"MultisigStateStatus",{enumerable:!0,get:function(){return y.MultisigStateStatus}})})(commonjs$2);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=void 0;var n=commonjs$2;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}})})(account$3);var account_multisig$2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MultisigStateStatus=e.MultisigDeleteRequestRejectionError=e.MULTISIG_CONFIRM_METHODS=e.MULTISIG_CHANGE_METHODS=e.MULTISIG_DEPOSIT=e.MULTISIG_GAS=e.MULTISIG_ALLOWANCE=e.MULTISIG_STORAGE_KEY=e.AccountMultisig=e.Account2FA=void 0;var n=commonjs$2;Object.defineProperty(e,"Account2FA",{enumerable:!0,get:function(){return n.Account2FA}}),Object.defineProperty(e,"AccountMultisig",{enumerable:!0,get:function(){return n.AccountMultisig}}),Object.defineProperty(e,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return n.MULTISIG_STORAGE_KEY}}),Object.defineProperty(e,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return n.MULTISIG_ALLOWANCE}}),Object.defineProperty(e,"MULTISIG_GAS",{enumerable:!0,get:function(){return n.MULTISIG_GAS}}),Object.defineProperty(e,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return n.MULTISIG_DEPOSIT}}),Object.defineProperty(e,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return n.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(e,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return n.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(e,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return n.MultisigDeleteRequestRejectionError}}),Object.defineProperty(e,"MultisigStateStatus",{enumerable:!0,get:function(){return n.MultisigStateStatus}})})(account_multisig$2);var account_creator$2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UrlAccountCreator=e.LocalAccountCreator=e.AccountCreator=void 0;var n=commonjs$2;Object.defineProperty(e,"AccountCreator",{enumerable:!0,get:function(){return n.AccountCreator}}),Object.defineProperty(e,"LocalAccountCreator",{enumerable:!0,get:function(){return n.LocalAccountCreator}}),Object.defineProperty(e,"UrlAccountCreator",{enumerable:!0,get:function(){return n.UrlAccountCreator}})})(account_creator$2);var connection$2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Connection=void 0;var n=commonjs$2;Object.defineProperty(e,"Connection",{enumerable:!0,get:function(){return n.Connection}})})(connection$2);var signer$2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Signer=e.InMemorySigner=void 0;var n=commonjs$1;Object.defineProperty(e,"InMemorySigner",{enumerable:!0,get:function(){return n.InMemorySigner}}),Object.defineProperty(e,"Signer",{enumerable:!0,get:function(){return n.Signer}})})(signer$2);var contract$2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=void 0;var n=commonjs$2;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return n.Contract}})})(contract$2);var near$3={},commonjs={},near$2={};Object.defineProperty(near$2,"__esModule",{value:!0});near$2.Near=void 0;const accounts_1$4=commonjs$2;let Near$1=class{constructor(n){pe(this,"config");pe(this,"connection");pe(this,"accountCreator");var o;if(this.config=n,this.connection=accounts_1$4.Connection.fromConfig({networkId:n.networkId,provider:n.provider||{type:"JsonRpcProvider",args:{url:n.nodeUrl,headers:n.headers}},signer:n.signer||{type:"InMemorySigner",keyStore:n.keyStore||((o=n.deps)==null?void 0:o.keyStore)},jsvmAccountId:n.jsvmAccountId||`jsvm.${n.networkId}`}),n.masterAccount){const a=n.initialBalance?BigInt(n.initialBalance):500000000000000000000000000n;this.accountCreator=new accounts_1$4.LocalAccountCreator(new accounts_1$4.Account(this.connection,n.masterAccount),a)}else n.helperUrl?this.accountCreator=new accounts_1$4.UrlAccountCreator(this.connection,n.helperUrl):this.accountCreator=null}async account(n){return new accounts_1$4.Account(this.connection,n)}async createAccount(n,o){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return await this.accountCreator.createAccount(n,o),new accounts_1$4.Account(this.connection,n)}};near$2.Near=Near$1;var wallet_account$1={};Object.defineProperty(wallet_account$1,"__esModule",{value:!0});wallet_account$1.ConnectedWalletAccount=wallet_account$1.WalletConnection=void 0;const accounts_1$3=commonjs$2,crypto_1$d=commonjs$8,utils_1$g=commonjs$7,transactions_1$7=commonjs$3,borsh_1$3=cjs,LOGIN_WALLET_URL_SUFFIX$1="/login/",MULTISIG_HAS_METHOD$2="add_request_and_confirm",LOCAL_STORAGE_KEY_SUFFIX$2="_wallet_auth_key",PENDING_ACCESS_KEY_PREFIX$1="pending_key";let WalletConnection$1=class{constructor(n,o){pe(this,"_walletBaseUrl");pe(this,"_authDataKey");pe(this,"_keyStore");pe(this,"_authData");pe(this,"_networkId");pe(this,"_near");pe(this,"_connectedAccount");pe(this,"_completeSignInPromise");if(typeof o!="string")throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get(l,u){return u==="isSignedIn"?()=>!1:u==="getAccountId"?()=>"":l[u]&&typeof l[u]=="function"?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:l[u]}});this._near=n;const a=o+LOCAL_STORAGE_KEY_SUFFIX$2,c=JSON.parse(window.localStorage.getItem(a));this._networkId=n.config.networkId,this._walletBaseUrl=n.config.walletUrl,o=o||n.config.contractName||"default",this._keyStore=n.connection.signer.keyStore,this._authData=c||{allKeys:[]},this._authDataKey=a,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}async isSignedInAsync(){return this._completeSignInPromise?(await this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()}getAccountId(){return this._authData.accountId||""}async requestSignInUrl({contractId:n,methodNames:o,successUrl:a,failureUrl:c,keyType:l="ed25519"}){const u=new URL(window.location.href),d=new URL(this._walletBaseUrl+LOGIN_WALLET_URL_SUFFIX$1);if(d.searchParams.set("success_url",a||u.href),d.searchParams.set("failure_url",c||u.href),n){await(await this._near.account(n)).state(),d.searchParams.set("contract_id",n);const y=crypto_1$d.KeyPair.fromRandom(l);d.searchParams.set("public_key",y.getPublicKey().toString()),await this._keyStore.setKey(this._networkId,PENDING_ACCESS_KEY_PREFIX$1+y.getPublicKey(),y)}return o&&o.forEach(h=>{d.searchParams.append("methodNames",h)}),d.toString()}async requestSignIn(n){const o=await this.requestSignInUrl(n);window.location.assign(o)}requestSignTransactionsUrl({transactions:n,meta:o,callbackUrl:a}){const c=new URL(window.location.href),l=new URL("sign",this._walletBaseUrl);return l.searchParams.set("transactions",n.map(u=>(0,borsh_1$3.serialize)(transactions_1$7.SCHEMA.Transaction,u)).map(u=>Buffer.from(u).toString("base64")).join(",")),l.searchParams.set("callbackUrl",a||c.href),o&&l.searchParams.set("meta",o),l.toString()}requestSignTransactions(n){const o=this.requestSignTransactionsUrl(n);window.location.assign(o)}async _completeSignInWithAccessKey(){const n=new URL(window.location.href),o=n.searchParams.get("public_key")||"",a=(n.searchParams.get("all_keys")||"").split(","),c=n.searchParams.get("account_id")||"";if(c){const l={accountId:c,allKeys:a};window.localStorage.setItem(this._authDataKey,JSON.stringify(l)),o&&await this._moveKeyFromTempToPermanent(c,o),this._authData=l}n.searchParams.delete("public_key"),n.searchParams.delete("all_keys"),n.searchParams.delete("account_id"),n.searchParams.delete("meta"),n.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,n.toString())}async _moveKeyFromTempToPermanent(n,o){const a=await this._keyStore.getKey(this._networkId,PENDING_ACCESS_KEY_PREFIX$1+o);await this._keyStore.setKey(this._networkId,n,a),await this._keyStore.removeKey(this._networkId,PENDING_ACCESS_KEY_PREFIX$1+o)}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new ConnectedWalletAccount$1(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};wallet_account$1.WalletConnection=WalletConnection$1;let ConnectedWalletAccount$1=class extends accounts_1$3.Account{constructor(o,a,c){super(a,c);pe(this,"walletConnection");this.walletConnection=o}async signAndSendTransaction({receiverId:o,actions:a,walletMeta:c,walletCallbackUrl:l=window.location.href}){const u=await this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let d=await this.accessKeyForTransaction(o,a,u);if(!d)throw new Error(`Cannot find matching key for transaction sent to ${o}`);if(u&&u.toString()===d.public_key)try{return await super.signAndSendTransaction({receiverId:o,actions:a})}catch(_){if(_.type==="NotEnoughAllowance")d=await this.accessKeyForTransaction(o,a);else throw _}const h=await this.connection.provider.block({finality:"final"}),y=(0,utils_1$g.baseDecode)(h.header.hash),p=crypto_1$d.PublicKey.from(d.public_key),v=d.access_key.nonce+1n,b=(0,transactions_1$7.createTransaction)(this.accountId,p,o,v,a,y);return await this.walletConnection.requestSignTransactions({transactions:[b],meta:c,callbackUrl:l}),new Promise((_,T)=>{setTimeout(()=>{T(new Error("Failed to redirect to sign transaction"))},1e3)})}async accessKeyMatchesTransaction(o,a,c){const{access_key:{permission:l}}=o;if(l==="FullAccess")return!0;if(l.FunctionCall){const{receiver_id:u,method_names:d}=l.FunctionCall;if(u===this.accountId&&d.includes(MULTISIG_HAS_METHOD$2))return!0;if(u===a){if(c.length!==1)return!1;const[{functionCall:h}]=c;return h&&(!h.deposit||h.deposit.toString()==="0")&&(d.length===0||d.includes(h.methodName))}}return!1}async accessKeyForTransaction(o,a,c){const l=await this.getAccessKeys();if(c){const d=l.find(h=>h.public_key.toString()===c.toString());if(d&&await this.accessKeyMatchesTransaction(d,o,a))return d}const u=this.walletConnection._authData.allKeys;for(const d of l)if(u.indexOf(d.public_key)!==-1&&await this.accessKeyMatchesTransaction(d,o,a))return d;return null}};wallet_account$1.ConnectedWalletAccount=ConnectedWalletAccount$1;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletConnection=e.ConnectedWalletAccount=e.Near=void 0;var n=near$2;Object.defineProperty(e,"Near",{enumerable:!0,get:function(){return n.Near}});var o=wallet_account$1;Object.defineProperty(e,"ConnectedWalletAccount",{enumerable:!0,get:function(){return o.ConnectedWalletAccount}}),Object.defineProperty(e,"WalletConnection",{enumerable:!0,get:function(){return o.WalletConnection}})})(commonjs);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Near=void 0;var n=commonjs;Object.defineProperty(e,"Near",{enumerable:!0,get:function(){return n.Near}})})(near$3);var walletAccount$1={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletConnection=e.ConnectedWalletAccount=void 0;var n=commonjs;Object.defineProperty(e,"ConnectedWalletAccount",{enumerable:!0,get:function(){return n.ConnectedWalletAccount}}),Object.defineProperty(e,"WalletConnection",{enumerable:!0,get:function(){return n.WalletConnection}})})(walletAccount$1);(function(e){var n=commonjsGlobal$c&&commonjsGlobal$c.__createBinding||(Object.create?function(N,D,L,B){B===void 0&&(B=L);var H=Object.getOwnPropertyDescriptor(D,L);(!H||("get"in H?!D.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return D[L]}}),Object.defineProperty(N,B,H)}:function(N,D,L,B){B===void 0&&(B=L),N[B]=D[L]}),o=commonjsGlobal$c&&commonjsGlobal$c.__setModuleDefault||(Object.create?function(N,D){Object.defineProperty(N,"default",{enumerable:!0,value:D})}:function(N,D){N.default=D}),a=commonjsGlobal$c&&commonjsGlobal$c.__importStar||function(N){if(N&&N.__esModule)return N;var D={};if(N!=null)for(var L in N)L!=="default"&&Object.prototype.hasOwnProperty.call(N,L)&&n(D,N,L);return o(D,N),D};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletConnection=e.ConnectedWalletAccount=e.Near=e.KeyPair=e.Signer=e.InMemorySigner=e.Contract=e.Connection=e.Account=e.multisig=e.validators=e.transactions=e.utils=e.providers=e.accountCreator=void 0;const c=a(providers$1);e.providers=c;const l=a(utils$8);e.utils=l;const u=a(transaction$1);e.transactions=u;const d=a(validators$2);e.validators=d;const h=account$3;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return h.Account}});const y=a(account_multisig$2);e.multisig=y;const p=a(account_creator$2);e.accountCreator=p;const v=connection$2;Object.defineProperty(e,"Connection",{enumerable:!0,get:function(){return v.Connection}});const b=signer$2;Object.defineProperty(e,"Signer",{enumerable:!0,get:function(){return b.Signer}}),Object.defineProperty(e,"InMemorySigner",{enumerable:!0,get:function(){return b.InMemorySigner}});const _=contract$2;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return _.Contract}});const T=key_pair$2;Object.defineProperty(e,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const I=near$3;Object.defineProperty(e,"Near",{enumerable:!0,get:function(){return I.Near}});const U=walletAccount$1;Object.defineProperty(e,"ConnectedWalletAccount",{enumerable:!0,get:function(){return U.ConnectedWalletAccount}}),Object.defineProperty(e,"WalletConnection",{enumerable:!0,get:function(){return U.WalletConnection}})})(commonIndex$1);var browserConnect$1={};Object.defineProperty(browserConnect$1,"__esModule",{value:!0});browserConnect$1.connect=void 0;const near_1$1=near$3;async function connect$1(e){return new near_1$1.Near(e)}browserConnect$1.connect=connect$1;(function(e){var n=commonjsGlobal$c&&commonjsGlobal$c.__createBinding||(Object.create?function(l,u,d,h){h===void 0&&(h=d);var y=Object.getOwnPropertyDescriptor(u,d);(!y||("get"in y?!u.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(l,h,y)}:function(l,u,d,h){h===void 0&&(h=d),l[h]=u[d]}),o=commonjsGlobal$c&&commonjsGlobal$c.__setModuleDefault||(Object.create?function(l,u){Object.defineProperty(l,"default",{enumerable:!0,value:u})}:function(l,u){l.default=u}),a=commonjsGlobal$c&&commonjsGlobal$c.__importStar||function(l){if(l&&l.__esModule)return l;var u={};if(l!=null)for(var d in l)d!=="default"&&Object.prototype.hasOwnProperty.call(l,d)&&n(u,l,d);return o(u,l),u},c=commonjsGlobal$c&&commonjsGlobal$c.__exportStar||function(l,u){for(var d in l)d!=="default"&&!Object.prototype.hasOwnProperty.call(u,d)&&n(u,l,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.keyStores=void 0,e.keyStores=a(browserIndex$3),c(commonIndex$1,e),c(browserConnect$1,e)})(browserIndex$4);var events={exports:{}},R=typeof Reflect=="object"?Reflect:null,ReflectApply=R&&typeof R.apply=="function"?R.apply:function(n,o,a){return Function.prototype.apply.call(n,o,a)},ReflectOwnKeys;R&&typeof R.ownKeys=="function"?ReflectOwnKeys=R.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:ReflectOwnKeys=function(n){return Object.getOwnPropertyNames(n)};function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}var NumberIsNaN=Number.isNaN||function(n){return n!==n};function EventEmitter$1(){EventEmitter$1.init.call(this)}events.exports=EventEmitter$1;events.exports.once=once;EventEmitter$1.EventEmitter=EventEmitter$1;EventEmitter$1.prototype._events=void 0;EventEmitter$1.prototype._eventsCount=0;EventEmitter$1.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(EventEmitter$1,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(e){if(typeof e!="number"||e<0||NumberIsNaN(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");defaultMaxListeners=e}});EventEmitter$1.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$1.prototype.setMaxListeners=function(n){if(typeof n!="number"||n<0||NumberIsNaN(n))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+n+".");return this._maxListeners=n,this};function _getMaxListeners(e){return e._maxListeners===void 0?EventEmitter$1.defaultMaxListeners:e._maxListeners}EventEmitter$1.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$1.prototype.emit=function(n){for(var o=[],a=1;a<arguments.length;a++)o.push(arguments[a]);var c=n==="error",l=this._events;if(l!==void 0)c=c&&l.error===void 0;else if(!c)return!1;if(c){var u;if(o.length>0&&(u=o[0]),u instanceof Error)throw u;var d=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw d.context=u,d}var h=l[n];if(h===void 0)return!1;if(typeof h=="function")ReflectApply(h,this,o);else for(var y=h.length,p=arrayClone(h,y),a=0;a<y;++a)ReflectApply(p[a],this,o);return!0};function _addListener(e,n,o,a){var c,l,u;if(checkListener(o),l=e._events,l===void 0?(l=e._events=Object.create(null),e._eventsCount=0):(l.newListener!==void 0&&(e.emit("newListener",n,o.listener?o.listener:o),l=e._events),u=l[n]),u===void 0)u=l[n]=o,++e._eventsCount;else if(typeof u=="function"?u=l[n]=a?[o,u]:[u,o]:a?u.unshift(o):u.push(o),c=_getMaxListeners(e),c>0&&u.length>c&&!u.warned){u.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=n,d.count=u.length,ProcessEmitWarning(d)}return e}EventEmitter$1.prototype.addListener=function(n,o){return _addListener(this,n,o,!1)};EventEmitter$1.prototype.on=EventEmitter$1.prototype.addListener;EventEmitter$1.prototype.prependListener=function(n,o){return _addListener(this,n,o,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(e,n,o){var a={fired:!1,wrapFn:void 0,target:e,type:n,listener:o},c=onceWrapper.bind(a);return c.listener=o,a.wrapFn=c,c}EventEmitter$1.prototype.once=function(n,o){return checkListener(o),this.on(n,_onceWrap(this,n,o)),this};EventEmitter$1.prototype.prependOnceListener=function(n,o){return checkListener(o),this.prependListener(n,_onceWrap(this,n,o)),this};EventEmitter$1.prototype.removeListener=function(n,o){var a,c,l,u,d;if(checkListener(o),c=this._events,c===void 0)return this;if(a=c[n],a===void 0)return this;if(a===o||a.listener===o)--this._eventsCount===0?this._events=Object.create(null):(delete c[n],c.removeListener&&this.emit("removeListener",n,a.listener||o));else if(typeof a!="function"){for(l=-1,u=a.length-1;u>=0;u--)if(a[u]===o||a[u].listener===o){d=a[u].listener,l=u;break}if(l<0)return this;l===0?a.shift():spliceOne(a,l),a.length===1&&(c[n]=a[0]),c.removeListener!==void 0&&this.emit("removeListener",n,d||o)}return this};EventEmitter$1.prototype.off=EventEmitter$1.prototype.removeListener;EventEmitter$1.prototype.removeAllListeners=function(n){var o,a,c;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[n]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[n]),this;if(arguments.length===0){var l=Object.keys(a),u;for(c=0;c<l.length;++c)u=l[c],u!=="removeListener"&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(o=a[n],typeof o=="function")this.removeListener(n,o);else if(o!==void 0)for(c=o.length-1;c>=0;c--)this.removeListener(n,o[c]);return this};function _listeners(e,n,o){var a=e._events;if(a===void 0)return[];var c=a[n];return c===void 0?[]:typeof c=="function"?o?[c.listener||c]:[c]:o?unwrapListeners(c):arrayClone(c,c.length)}EventEmitter$1.prototype.listeners=function(n){return _listeners(this,n,!0)};EventEmitter$1.prototype.rawListeners=function(n){return _listeners(this,n,!1)};EventEmitter$1.listenerCount=function(e,n){return typeof e.listenerCount=="function"?e.listenerCount(n):listenerCount.call(e,n)};EventEmitter$1.prototype.listenerCount=listenerCount;function listenerCount(e){var n=this._events;if(n!==void 0){var o=n[e];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}EventEmitter$1.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(e,n){for(var o=new Array(n),a=0;a<n;++a)o[a]=e[a];return o}function spliceOne(e,n){for(;n+1<e.length;n++)e[n]=e[n+1];e.pop()}function unwrapListeners(e){for(var n=new Array(e.length),o=0;o<n.length;++o)n[o]=e[o].listener||e[o];return n}function once(e,n){return new Promise(function(o,a){function c(u){e.removeListener(n,l),a(u)}function l(){typeof e.removeListener=="function"&&e.removeListener("error",c),o([].slice.call(arguments))}eventTargetAgnosticAddListener(e,n,l,{once:!0}),n!=="error"&&addErrorHandlerIfEventEmitter(e,c,{once:!0})})}function addErrorHandlerIfEventEmitter(e,n,o){typeof e.on=="function"&&eventTargetAgnosticAddListener(e,"error",n,o)}function eventTargetAgnosticAddListener(e,n,o,a){if(typeof e.on=="function")a.once?e.once(n,o):e.on(n,o);else if(typeof e.addEventListener=="function")e.addEventListener(n,function c(l){a.once&&e.removeEventListener(n,c),o(l)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var eventsExports=events.exports;const EventEmitter$2=getDefaultExportFromCjs(eventsExports);var extendStatics=function(e,n){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},extendStatics(e,n)};function __extends$1(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");extendStatics(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}function __values(e){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&e[n],a=0;if(o)return o.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,n){var o=typeof Symbol=="function"&&e[Symbol.iterator];if(!o)return e;var a=o.call(e),c,l=[],u;try{for(;(n===void 0||n-- >0)&&!(c=a.next()).done;)l.push(c.value)}catch(d){u={error:d}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(u)throw u.error}}return l}function __spreadArray(e,n,o){if(o||arguments.length===2)for(var a=0,c=n.length,l;a<c;a++)(l||!(a in n))&&(l||(l=Array.prototype.slice.call(n,0,a)),l[a]=n[a]);return e.concat(l||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;function isFunction(e){return typeof e=="function"}function createErrorClass(e){var n=function(a){Error.call(a),a.stack=new Error().stack},o=e(n);return o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o}var UnsubscriptionError=createErrorClass(function(e){return function(o){e(this),this.message=o?o.length+` errors occurred during unsubscription:
`+o.map(function(a,c){return c+1+") "+a.toString()}).join(`
`):"",this.name="UnsubscriptionError",this.errors=o}});function arrRemove(e,n){if(e){var o=e.indexOf(n);0<=o&&e.splice(o,1)}}var Subscription=function(){function e(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var n,o,a,c,l;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var d=__values(u),h=d.next();!h.done;h=d.next()){var y=h.value;y.remove(this)}}catch(I){n={error:I}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}else u.remove(this);var p=this.initialTeardown;if(isFunction(p))try{p()}catch(I){l=I instanceof UnsubscriptionError?I.errors:[I]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var b=__values(v),_=b.next();!_.done;_=b.next()){var T=_.value;try{execFinalizer(T)}catch(I){l=l??[],I instanceof UnsubscriptionError?l=__spreadArray(__spreadArray([],__read(l)),__read(I.errors)):l.push(I)}}}catch(I){a={error:I}}finally{try{_&&!_.done&&(c=b.return)&&c.call(b)}finally{if(a)throw a.error}}}if(l)throw new UnsubscriptionError(l)}},e.prototype.add=function(n){var o;if(n&&n!==this)if(this.closed)execFinalizer(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(o=this._finalizers)!==null&&o!==void 0?o:[]).push(n)}},e.prototype._hasParent=function(n){var o=this._parentage;return o===n||Array.isArray(o)&&o.includes(n)},e.prototype._addParent=function(n){var o=this._parentage;this._parentage=Array.isArray(o)?(o.push(n),o):o?[o,n]:n},e.prototype._removeParent=function(n){var o=this._parentage;o===n?this._parentage=null:Array.isArray(o)&&arrRemove(o,n)},e.prototype.remove=function(n){var o=this._finalizers;o&&arrRemove(o,n),n instanceof e&&n._removeParent(this)},e.EMPTY=function(){var n=new e;return n.closed=!0,n}(),e}(),EMPTY_SUBSCRIPTION=Subscription.EMPTY;function isSubscription(e){return e instanceof Subscription||e&&"closed"in e&&isFunction(e.remove)&&isFunction(e.add)&&isFunction(e.unsubscribe)}function execFinalizer(e){isFunction(e)?e():e.unsubscribe()}var config$2={Promise:void 0},timeoutProvider={setTimeout:function(e,n){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];return setTimeout.apply(void 0,__spreadArray([e,n],__read(o)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function reportUnhandledError(e){timeoutProvider.setTimeout(function(){throw e})}function noop(){}function errorContext(e){e()}var Subscriber=function(e){__extends$1(n,e);function n(o){var a=e.call(this)||this;return a.isStopped=!1,o?(a.destination=o,isSubscription(o)&&o.add(a)):a.destination=EMPTY_OBSERVER,a}return n.create=function(o,a,c){return new SafeSubscriber(o,a,c)},n.prototype.next=function(o){this.isStopped||this._next(o)},n.prototype.error=function(o){this.isStopped||(this.isStopped=!0,this._error(o))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(o){this.destination.next(o)},n.prototype._error=function(o){try{this.destination.error(o)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Subscription),ConsumerObserver=function(){function e(n){this.partialObserver=n}return e.prototype.next=function(n){var o=this.partialObserver;if(o.next)try{o.next(n)}catch(a){handleUnhandledError(a)}},e.prototype.error=function(n){var o=this.partialObserver;if(o.error)try{o.error(n)}catch(a){handleUnhandledError(a)}else handleUnhandledError(n)},e.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(o){handleUnhandledError(o)}},e}(),SafeSubscriber=function(e){__extends$1(n,e);function n(o,a,c){var l=e.call(this)||this,u;return isFunction(o)||!o?u={next:o??void 0,error:a??void 0,complete:c??void 0}:u=o,l.destination=new ConsumerObserver(u),l}return n}(Subscriber);function handleUnhandledError(e){reportUnhandledError(e)}function defaultErrorHandler(e){throw e}var EMPTY_OBSERVER={closed:!0,next:noop,error:defaultErrorHandler,complete:noop},observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function identity(e){return e}function pipeFromArray(e){return e.length===0?identity:e.length===1?e[0]:function(o){return e.reduce(function(a,c){return c(a)},o)}}var Observable=function(){function e(n){n&&(this._subscribe=n)}return e.prototype.lift=function(n){var o=new e;return o.source=this,o.operator=n,o},e.prototype.subscribe=function(n,o,a){var c=this,l=isSubscriber(n)?n:new SafeSubscriber(n,o,a);return errorContext(function(){var u=c,d=u.operator,h=u.source;l.add(d?d.call(l,h):h?c._subscribe(l):c._trySubscribe(l))}),l},e.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(o){n.error(o)}},e.prototype.forEach=function(n,o){var a=this;return o=getPromiseCtor(o),new o(function(c,l){var u=new SafeSubscriber({next:function(d){try{n(d)}catch(h){l(h),u.unsubscribe()}},error:l,complete:c});a.subscribe(u)})},e.prototype._subscribe=function(n){var o;return(o=this.source)===null||o===void 0?void 0:o.subscribe(n)},e.prototype[observable]=function(){return this},e.prototype.pipe=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return pipeFromArray(n)(this)},e.prototype.toPromise=function(n){var o=this;return n=getPromiseCtor(n),new n(function(a,c){var l;o.subscribe(function(u){return l=u},function(u){return c(u)},function(){return a(l)})})},e.create=function(n){return new e(n)},e}();function getPromiseCtor(e){var n;return(n=e??config$2.Promise)!==null&&n!==void 0?n:Promise}function isObserver(e){return e&&isFunction(e.next)&&isFunction(e.error)&&isFunction(e.complete)}function isSubscriber(e){return e&&e instanceof Subscriber||isObserver(e)&&isSubscription(e)}function hasLift(e){return isFunction(e==null?void 0:e.lift)}function operate(e){return function(n){if(hasLift(n))return n.lift(function(o){try{return e(o,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function createOperatorSubscriber(e,n,o,a,c){return new OperatorSubscriber(e,n,o,a,c)}var OperatorSubscriber=function(e){__extends$1(n,e);function n(o,a,c,l,u,d){var h=e.call(this,o)||this;return h.onFinalize=u,h.shouldUnsubscribe=d,h._next=a?function(y){try{a(y)}catch(p){o.error(p)}}:e.prototype._next,h._error=l?function(y){try{l(y)}catch(p){o.error(p)}finally{this.unsubscribe()}}:e.prototype._error,h._complete=c?function(){try{c()}catch(y){o.error(y)}finally{this.unsubscribe()}}:e.prototype._complete,h}return n.prototype.unsubscribe=function(){var o;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;e.prototype.unsubscribe.call(this),!a&&((o=this.onFinalize)===null||o===void 0||o.call(this))}},n}(Subscriber),ObjectUnsubscribedError=createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Subject=function(e){__extends$1(n,e);function n(){var o=e.call(this)||this;return o.closed=!1,o.currentObservers=null,o.observers=[],o.isStopped=!1,o.hasError=!1,o.thrownError=null,o}return n.prototype.lift=function(o){var a=new AnonymousSubject(this,this);return a.operator=o,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new ObjectUnsubscribedError},n.prototype.next=function(o){var a=this;errorContext(function(){var c,l;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var u=__values(a.currentObservers),d=u.next();!d.done;d=u.next()){var h=d.value;h.next(o)}}catch(y){c={error:y}}finally{try{d&&!d.done&&(l=u.return)&&l.call(u)}finally{if(c)throw c.error}}}})},n.prototype.error=function(o){var a=this;errorContext(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=o;for(var c=a.observers;c.length;)c.shift().error(o)}})},n.prototype.complete=function(){var o=this;errorContext(function(){if(o._throwIfClosed(),!o.isStopped){o.isStopped=!0;for(var a=o.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var o;return((o=this.observers)===null||o===void 0?void 0:o.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(o){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,o)},n.prototype._subscribe=function(o){return this._throwIfClosed(),this._checkFinalizedStatuses(o),this._innerSubscribe(o)},n.prototype._innerSubscribe=function(o){var a=this,c=this,l=c.hasError,u=c.isStopped,d=c.observers;return l||u?EMPTY_SUBSCRIPTION:(this.currentObservers=null,d.push(o),new Subscription(function(){a.currentObservers=null,arrRemove(d,o)}))},n.prototype._checkFinalizedStatuses=function(o){var a=this,c=a.hasError,l=a.thrownError,u=a.isStopped;c?o.error(l):u&&o.complete()},n.prototype.asObservable=function(){var o=new Observable;return o.source=this,o},n.create=function(o,a){return new AnonymousSubject(o,a)},n}(Observable),AnonymousSubject=function(e){__extends$1(n,e);function n(o,a){var c=e.call(this)||this;return c.destination=o,c.source=a,c}return n.prototype.next=function(o){var a,c;(c=(a=this.destination)===null||a===void 0?void 0:a.next)===null||c===void 0||c.call(a,o)},n.prototype.error=function(o){var a,c;(c=(a=this.destination)===null||a===void 0?void 0:a.error)===null||c===void 0||c.call(a,o)},n.prototype.complete=function(){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.complete)===null||a===void 0||a.call(o)},n.prototype._subscribe=function(o){var a,c;return(c=(a=this.source)===null||a===void 0?void 0:a.subscribe(o))!==null&&c!==void 0?c:EMPTY_SUBSCRIPTION},n}(Subject),BehaviorSubject=function(e){__extends$1(n,e);function n(o){var a=e.call(this)||this;return a._value=o,a}return Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(o){var a=e.prototype._subscribe.call(this,o);return!a.closed&&o.next(this._value),a},n.prototype.getValue=function(){var o=this,a=o.hasError,c=o.thrownError,l=o._value;if(a)throw c;return this._throwIfClosed(),l},n.prototype.next=function(o){e.prototype.next.call(this,this._value=o)},n}(Subject);function scanInternals(e,n,o,a,c){return function(l,u){var d=o,h=n,y=0;l.subscribe(createOperatorSubscriber(u,function(p){var v=y++;h=d?e(h,p,v):(d=!0,p),u.next(h)},c))}}function scan(e,n){return operate(scanInternals(e,n,arguments.length>=2,!0))}var integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"],EncodeBuffer=function(){function e(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return e.prototype.resize_if_necessary=function(n){if(this.buffer_size-this.offset<n){this.buffer_size=Math.max(this.buffer_size*2,this.buffer_size+n);var o=new ArrayBuffer(this.buffer_size);new Uint8Array(o).set(new Uint8Array(this.buffer)),this.buffer=o,this.view=new DataView(o)}},e.prototype.get_used_buffer=function(){return new Uint8Array(this.buffer).slice(0,this.offset)},e.prototype.store_value=function(n,o){var a=o.substring(1),c=parseInt(a)/8;this.resize_if_necessary(c);var l=o[0]==="f"?"setFloat".concat(a):o[0]==="i"?"setInt".concat(a):"setUint".concat(a);this.view[l](this.offset,n,!0),this.offset+=c},e.prototype.store_bytes=function(n){this.resize_if_necessary(n.length),new Uint8Array(this.buffer).set(new Uint8Array(n),this.offset),this.offset+=n.length},e}(),__extends=function(){var e=function(n,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var l in c)Object.prototype.hasOwnProperty.call(c,l)&&(a[l]=c[l])},e(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(n,o);function a(){this.constructor=n}n.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}}();function isArrayLike(e){return Array.isArray(e)||!!e&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&(e.length===0||e.length>0&&e.length-1 in e)}function expect_type(e,n,o){if(typeof e!==n)throw new Error("Expected ".concat(n," not ").concat(typeof e,"(").concat(e,") at ").concat(o.join(".")))}function expect_bigint(e,n){var o=["number","string","bigint","boolean"].includes(typeof e),a=typeof e=="object"&&e!==null&&"toString"in e;if(!o&&!a)throw new Error("Expected bigint, number, boolean or string not ".concat(typeof e,"(").concat(e,") at ").concat(n.join(".")))}function expect_same_size(e,n,o){if(e!==n)throw new Error("Array length ".concat(e," does not match schema length ").concat(n," at ").concat(o.join(".")))}function expect_enum(e,n){if(typeof e!="object"||e===null)throw new Error("Expected object not ".concat(typeof e,"(").concat(e,") at ").concat(n.join(".")))}var VALID_STRING_TYPES=integers.concat(["bool","string"]),VALID_OBJECT_KEYS=["option","enum","array","set","map","struct"],ErrorSchema=function(e){__extends(n,e);function n(o,a){var c="Invalid schema: ".concat(JSON.stringify(o)," expected ").concat(a);return e.call(this,c)||this}return n}(Error);function validate_schema(e){if(!(typeof e=="string"&&VALID_STRING_TYPES.includes(e))){if(e&&typeof e=="object"){var n=Object.keys(e);if(n.length===1&&VALID_OBJECT_KEYS.includes(n[0])){var o=n[0];if(o==="option")return validate_schema(e[o]);if(o==="enum")return validate_enum_schema(e[o]);if(o==="array")return validate_array_schema(e[o]);if(o==="set")return validate_schema(e[o]);if(o==="map")return validate_map_schema(e[o]);if(o==="struct")return validate_struct_schema(e[o])}}throw new ErrorSchema(e,VALID_OBJECT_KEYS.join(", ")+" or "+VALID_STRING_TYPES.join(", "))}}function validate_enum_schema(e){if(!Array.isArray(e))throw new ErrorSchema(e,"Array");for(var n=0,o=e;n<o.length;n++){var a=o[n];if(typeof a!="object"||!("struct"in a))throw new Error('Missing "struct" key in enum schema');if(typeof a.struct!="object"||Object.keys(a.struct).length!==1)throw new Error('The "struct" in each enum must have a single key');validate_schema({struct:a.struct})}}function validate_array_schema(e){if(typeof e!="object")throw new ErrorSchema(e,"{ type, len? }");if(e.len&&typeof e.len!="number")throw new Error("Invalid schema: ".concat(e));if("type"in e)return validate_schema(e.type);throw new ErrorSchema(e,"{ type, len? }")}function validate_map_schema(e){if(typeof e=="object"&&"key"in e&&"value"in e)validate_schema(e.key),validate_schema(e.value);else throw new ErrorSchema(e,"{ key, value }")}function validate_struct_schema(e){if(typeof e!="object")throw new ErrorSchema(e,"object");for(var n in e)validate_schema(e[n])}var BorshSerializer=function(){function e(n){this.encoded=new EncodeBuffer,this.fieldPath=["value"],this.checkTypes=n}return e.prototype.encode=function(n,o){return this.encode_value(n,o),this.encoded.get_used_buffer()},e.prototype.encode_value=function(n,o){if(typeof o=="string"){if(integers.includes(o))return this.encode_integer(n,o);if(o==="string")return this.encode_string(n);if(o==="bool")return this.encode_boolean(n)}if(typeof o=="object"){if("option"in o)return this.encode_option(n,o);if("enum"in o)return this.encode_enum(n,o);if("array"in o)return this.encode_array(n,o);if("set"in o)return this.encode_set(n,o);if("map"in o)return this.encode_map(n,o);if("struct"in o)return this.encode_struct(n,o)}},e.prototype.encode_integer=function(n,o){var a=parseInt(o.substring(1));a<=32||o=="f64"?(this.checkTypes&&expect_type(n,"number",this.fieldPath),this.encoded.store_value(n,o)):(this.checkTypes&&expect_bigint(n,this.fieldPath),this.encode_bigint(BigInt(n),a))},e.prototype.encode_bigint=function(n,o){for(var a=o/8,c=new Uint8Array(a),l=0;l<a;l++)c[l]=Number(n&BigInt(255)),n=n>>BigInt(8);this.encoded.store_bytes(new Uint8Array(c))},e.prototype.encode_string=function(n){this.checkTypes&&expect_type(n,"string",this.fieldPath);var o=n;this.encoded.store_value(o.length,"u32");for(var a=0;a<o.length;a++)this.encoded.store_value(o.charCodeAt(a),"u8")},e.prototype.encode_boolean=function(n){this.checkTypes&&expect_type(n,"boolean",this.fieldPath),this.encoded.store_value(n?1:0,"u8")},e.prototype.encode_option=function(n,o){n==null?this.encoded.store_value(0,"u8"):(this.encoded.store_value(1,"u8"),this.encode_value(n,o.option))},e.prototype.encode_enum=function(n,o){this.checkTypes&&expect_enum(n,this.fieldPath);for(var a=Object.keys(n)[0],c=0;c<o.enum.length;c++){var l=o.enum[c];if(a===Object.keys(l.struct)[0])return this.encoded.store_value(c,"u8"),this.encode_struct(n,l)}throw new Error("Enum key (".concat(a,") not found in enum schema: ").concat(JSON.stringify(o)," at ").concat(this.fieldPath.join(".")))},e.prototype.encode_array=function(n,o){if(isArrayLike(n))return this.encode_arraylike(n,o);if(n instanceof ArrayBuffer)return this.encode_buffer(n,o);throw new Error("Expected Array-like not ".concat(typeof n,"(").concat(n,") at ").concat(this.fieldPath.join(".")))},e.prototype.encode_arraylike=function(n,o){o.array.len?expect_same_size(n.length,o.array.len,this.fieldPath):this.encoded.store_value(n.length,"u32");for(var a=0;a<n.length;a++)this.encode_value(n[a],o.array.type)},e.prototype.encode_buffer=function(n,o){o.array.len?expect_same_size(n.byteLength,o.array.len,this.fieldPath):this.encoded.store_value(n.byteLength,"u32"),this.encoded.store_bytes(new Uint8Array(n))},e.prototype.encode_set=function(n,o){this.checkTypes&&expect_type(n,"object",this.fieldPath);var a=n instanceof Set,c=a?Array.from(n.values()):Object.values(n);this.encoded.store_value(c.length,"u32");for(var l=0,u=c;l<u.length;l++){var d=u[l];this.encode_value(d,o.set)}},e.prototype.encode_map=function(n,o){this.checkTypes&&expect_type(n,"object",this.fieldPath);var a=n instanceof Map,c=a?Array.from(n.keys()):Object.keys(n);this.encoded.store_value(c.length,"u32");for(var l=0,u=c;l<u.length;l++){var d=u[l];this.encode_value(d,o.map.key),this.encode_value(a?n.get(d):n[d],o.map.value)}},e.prototype.encode_struct=function(n,o){this.checkTypes&&expect_type(n,"object",this.fieldPath);for(var a=0,c=Object.keys(o.struct);a<c.length;a++){var l=c[a];this.fieldPath.push(l),this.encode_value(n[l],o.struct[l]),this.fieldPath.pop()}},e}();function serialize$3(e,n,o){o===void 0&&(o=!0),o&&validate_schema(e);var a=new BorshSerializer(o);return a.encode(n,e)}var sha256$1={exports:{}};/**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.9.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*/(function(module){(function(){var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=globalThis:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&!0&&module.exports,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,n){return function(o){return new Sha256(n,!0).update(o)[e]()}},createMethod=function(e){var n=createOutputMethod("hex",e);NODE_JS&&(n=nodeWrap(n,e)),n.create=function(){return new Sha256(e)},n.update=function(c){return n.create().update(c)};for(var o=0;o<OUTPUT_TYPES.length;++o){var a=OUTPUT_TYPES[o];n[a]=createOutputMethod(a,e)}return n},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if(typeof e=="string")return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(e==null)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,n){return function(o,a){return new HmacSha256(o,n,!0).update(a)[e]()}},createHmacMethod=function(e){var n=createHmacOutputMethod("hex",e);n.create=function(c){return new HmacSha256(c,e)},n.update=function(c,l){return n.create(c).update(l)};for(var o=0;o<OUTPUT_TYPES.length;++o){var a=OUTPUT_TYPES[o];n[a]=createHmacOutputMethod(a,e)}return n};function Sha256(e,n){n?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Sha256.prototype.update=function(e){if(!this.finalized){var n,o=typeof e;if(o!=="string"){if(o==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);n=!0}for(var a,c=0,l,u=e.length,d=this.blocks;c<u;){if(this.hashed&&(this.hashed=!1,d[0]=this.block,d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0),n)for(l=this.start;c<u&&l<64;++c)d[l>>2]|=e[c]<<SHIFT[l++&3];else for(l=this.start;c<u&&l<64;++c)a=e.charCodeAt(c),a<128?d[l>>2]|=a<<SHIFT[l++&3]:a<2048?(d[l>>2]|=(192|a>>6)<<SHIFT[l++&3],d[l>>2]|=(128|a&63)<<SHIFT[l++&3]):a<55296||a>=57344?(d[l>>2]|=(224|a>>12)<<SHIFT[l++&3],d[l>>2]|=(128|a>>6&63)<<SHIFT[l++&3],d[l>>2]|=(128|a&63)<<SHIFT[l++&3]):(a=65536+((a&1023)<<10|e.charCodeAt(++c)&1023),d[l>>2]|=(240|a>>18)<<SHIFT[l++&3],d[l>>2]|=(128|a>>12&63)<<SHIFT[l++&3],d[l>>2]|=(128|a>>6&63)<<SHIFT[l++&3],d[l>>2]|=(128|a&63)<<SHIFT[l++&3]);this.lastByteIndex=l,this.bytes+=l-this.start,l>=64?(this.block=d[16],this.start=l-64,this.hash(),this.hashed=!0):this.start=l}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,n=this.lastByteIndex;e[16]=this.block,e[n>>2]|=EXTRA[n&3],this.block=e[16],n>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,n=this.h1,o=this.h2,a=this.h3,c=this.h4,l=this.h5,u=this.h6,d=this.h7,h=this.blocks,y,p,v,b,_,T,I,U,N,D,L;for(y=16;y<64;++y)_=h[y-15],p=(_>>>7|_<<25)^(_>>>18|_<<14)^_>>>3,_=h[y-2],v=(_>>>17|_<<15)^(_>>>19|_<<13)^_>>>10,h[y]=h[y-16]+p+h[y-7]+v<<0;for(L=n&o,y=0;y<64;y+=4)this.first?(this.is224?(U=300032,_=h[0]-1413257819,d=_-150054599<<0,a=_+24177077<<0):(U=704751109,_=h[0]-210244248,d=_-1521486534<<0,a=_+143694565<<0),this.first=!1):(p=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),v=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),U=e&n,b=U^e&o^L,I=c&l^~c&u,_=d+v+I+K[y]+h[y],T=p+b,d=a+_<<0,a=_+T<<0),p=(a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10),v=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),N=a&e,b=N^a&n^U,I=d&c^~d&l,_=u+v+I+K[y+1]+h[y+1],T=p+b,u=o+_<<0,o=_+T<<0,p=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),v=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),D=o&a,b=D^o&e^N,I=u&d^~u&c,_=l+v+I+K[y+2]+h[y+2],T=p+b,l=n+_<<0,n=_+T<<0,p=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),v=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7),L=n&o,b=L^n&a^D,I=l&u^~l&d,_=c+v+I+K[y+3]+h[y+3],T=p+b,c=e+_<<0,e=_+T<<0;this.h0=this.h0+e<<0,this.h1=this.h1+n<<0,this.h2=this.h2+o<<0,this.h3=this.h3+a<<0,this.h4=this.h4+c<<0,this.h5=this.h5+l<<0,this.h6=this.h6+u<<0,this.h7=this.h7+d<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,n=this.h1,o=this.h2,a=this.h3,c=this.h4,l=this.h5,u=this.h6,d=this.h7,h=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[c&15]+HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[l&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15];return this.is224||(h+=HEX_CHARS[d>>28&15]+HEX_CHARS[d>>24&15]+HEX_CHARS[d>>20&15]+HEX_CHARS[d>>16&15]+HEX_CHARS[d>>12&15]+HEX_CHARS[d>>8&15]+HEX_CHARS[d>>4&15]+HEX_CHARS[d&15]),h},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,n=this.h1,o=this.h2,a=this.h3,c=this.h4,l=this.h5,u=this.h6,d=this.h7,h=[e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&255,a>>24&255,a>>16&255,a>>8&255,a&255,c>>24&255,c>>16&255,c>>8&255,c&255,l>>24&255,l>>16&255,l>>8&255,l&255,u>>24&255,u>>16&255,u>>8&255,u&255];return this.is224||h.push(d>>24&255,d>>16&255,d>>8&255,d&255),h},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),n=new DataView(e);return n.setUint32(0,this.h0),n.setUint32(4,this.h1),n.setUint32(8,this.h2),n.setUint32(12,this.h3),n.setUint32(16,this.h4),n.setUint32(20,this.h5),n.setUint32(24,this.h6),this.is224||n.setUint32(28,this.h7),e};function HmacSha256(e,n,o){var a,c=typeof e;if(c==="string"){var l=[],u=e.length,d=0,h;for(a=0;a<u;++a)h=e.charCodeAt(a),h<128?l[d++]=h:h<2048?(l[d++]=192|h>>6,l[d++]=128|h&63):h<55296||h>=57344?(l[d++]=224|h>>12,l[d++]=128|h>>6&63,l[d++]=128|h&63):(h=65536+((h&1023)<<10|e.charCodeAt(++a)&1023),l[d++]=240|h>>18,l[d++]=128|h>>12&63,l[d++]=128|h>>6&63,l[d++]=128|h&63);e=l}else if(c==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(n,!0).update(e).array());var y=[],p=[];for(a=0;a<64;++a){var v=e[a]||0;y[a]=92^v,p[a]=54^v}Sha256.call(this,n,o),this.update(p),this.oKeyPad=y,this.inner=!0,this.sharedMemory=o}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224)})()})(sha256$1);var sha256Exports$1=sha256$1.exports;function __awaiter$L(e,n,o,a){function c(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(p){try{y(a.next(p))}catch(v){u(v)}}function h(p){try{y(a.throw(p))}catch(v){u(v)}}function y(p){p.done?l(p.value):c(p.value).then(d,h)}y((a=a.apply(e,[])).next())})}typeof SuppressedError=="function"&&SuppressedError;let Provider$1=class{constructor(n){this.provider=new browserIndex$4.providers.FailoverRpcProvider(this.urlsToProviders(n))}query(n,o){return typeof n=="string"&&o!==void 0?this.provider.query(n,o):this.provider.query(n)}viewAccessKey({accountId:n,publicKey:o}){return this.query({request_type:"view_access_key",finality:"final",account_id:n,public_key:o})}block(n){return this.provider.block(n)}sendTransaction(n){return this.provider.sendTransaction(n)}urlsToProviders(n){return n&&n.length>0?n.map(o=>new providers$1.JsonRpcProvider({url:o})):[]}};const KEY_DELIMITER=":";class JsonStorage{constructor(n,o){this.storage=n,this.namespace=Array.isArray(o)?o.join(KEY_DELIMITER):o}resolveKey(n){return[this.namespace,n].join(KEY_DELIMITER)}getItem(n){return this.storage.getItem(this.resolveKey(n)).then(o=>typeof o=="string"?JSON.parse(o):null)}setItem(n,o){return this.storage.setItem(this.resolveKey(n),JSON.stringify(o))}removeItem(n){return this.storage.removeItem(this.resolveKey(n))}}var commonjsGlobal$a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},check$a=function(e){return e&&e.Math==Math&&e},global$n$1=check$a(typeof globalThis=="object"&&globalThis)||check$a(typeof window=="object"&&window)||check$a(typeof self=="object"&&self)||check$a(typeof commonjsGlobal$a=="object"&&commonjsGlobal$a)||Function("return this")(),objectGetOwnPropertyDescriptor$a={},fails$h$2=function(e){try{return!!e()}catch{return!0}},fails$g$2=fails$h$2,descriptors$a=!fails$g$2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),objectPropertyIsEnumerable$a={},nativePropertyIsEnumerable$a={}.propertyIsEnumerable,getOwnPropertyDescriptor$2$5=Object.getOwnPropertyDescriptor,NASHORN_BUG$a=getOwnPropertyDescriptor$2$5&&!nativePropertyIsEnumerable$a.call({1:2},1);objectPropertyIsEnumerable$a.f=NASHORN_BUG$a?function e(n){var o=getOwnPropertyDescriptor$2$5(this,n);return!!o&&o.enumerable}:nativePropertyIsEnumerable$a;var createPropertyDescriptor$4$4=function(e,n){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:n}},toString$9={}.toString,classofRaw$1$6=function(e){return toString$9.call(e).slice(8,-1)},fails$f$2=fails$h$2,classof$9$2=classofRaw$1$6,split$a="".split,indexedObject$a=fails$f$2(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return classof$9$2(e)=="String"?split$a.call(e,""):Object(e)}:Object,requireObjectCoercible$4$4=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},IndexedObject$3$2=indexedObject$a,requireObjectCoercible$3$5=requireObjectCoercible$4$4,toIndexedObject$4$7=function(e){return IndexedObject$3$2(requireObjectCoercible$3$5(e))},isObject$c$2=function(e){return typeof e=="object"?e!==null:typeof e=="function"},isObject$b$2=isObject$c$2,toPrimitive$3$4=function(e,n){if(!isObject$b$2(e))return e;var o,a;if(n&&typeof(o=e.toString)=="function"&&!isObject$b$2(a=o.call(e))||typeof(o=e.valueOf)=="function"&&!isObject$b$2(a=o.call(e))||!n&&typeof(o=e.toString)=="function"&&!isObject$b$2(a=o.call(e)))return a;throw TypeError("Can't convert object to primitive value")},hasOwnProperty$a={}.hasOwnProperty,has$c$2=function(e,n){return hasOwnProperty$a.call(e,n)},global$m$1=global$n$1,isObject$a$2=isObject$c$2,document$2$5=global$m$1.document,EXISTS$a=isObject$a$2(document$2$5)&&isObject$a$2(document$2$5.createElement),documentCreateElement$1$7=function(e){return EXISTS$a?document$2$5.createElement(e):{}},DESCRIPTORS$a$2=descriptors$a,fails$e$2=fails$h$2,createElement$1$5=documentCreateElement$1$7,ie8DomDefine$a=!DESCRIPTORS$a$2&&!fails$e$2(function(){return Object.defineProperty(createElement$1$5("div"),"a",{get:function(){return 7}}).a!=7}),DESCRIPTORS$9$3=descriptors$a,propertyIsEnumerableModule$1$9=objectPropertyIsEnumerable$a,createPropertyDescriptor$3$7=createPropertyDescriptor$4$4,toIndexedObject$3$a=toIndexedObject$4$7,toPrimitive$2$a=toPrimitive$3$4,has$b$4=has$c$2,IE8_DOM_DEFINE$1$a=ie8DomDefine$a,nativeGetOwnPropertyDescriptor$1$3=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$a.f=DESCRIPTORS$9$3?nativeGetOwnPropertyDescriptor$1$3:function e(n,o){if(n=toIndexedObject$3$a(n),o=toPrimitive$2$a(o,!0),IE8_DOM_DEFINE$1$a)try{return nativeGetOwnPropertyDescriptor$1$3(n,o)}catch{}if(has$b$4(n,o))return createPropertyDescriptor$3$7(!propertyIsEnumerableModule$1$9.f.call(n,o),n[o])};var objectDefineProperty$a={},isObject$9$4=isObject$c$2,anObject$b$5=function(e){if(!isObject$9$4(e))throw TypeError(String(e)+" is not an object");return e},DESCRIPTORS$8$4=descriptors$a,IE8_DOM_DEFINE$b=ie8DomDefine$a,anObject$a$5=anObject$b$5,toPrimitive$1$a=toPrimitive$3$4,nativeDefineProperty$1$3=Object.defineProperty;objectDefineProperty$a.f=DESCRIPTORS$8$4?nativeDefineProperty$1$3:function e(n,o,a){if(anObject$a$5(n),o=toPrimitive$1$a(o,!0),anObject$a$5(a),IE8_DOM_DEFINE$b)try{return nativeDefineProperty$1$3(n,o,a)}catch{}if("get"in a||"set"in a)throw TypeError("Accessors not supported");return"value"in a&&(n[o]=a.value),n};var DESCRIPTORS$7$5=descriptors$a,definePropertyModule$5$4=objectDefineProperty$a,createPropertyDescriptor$2$a=createPropertyDescriptor$4$4,createNonEnumerableProperty$a$2=DESCRIPTORS$7$5?function(e,n,o){return definePropertyModule$5$4.f(e,n,createPropertyDescriptor$2$a(1,o))}:function(e,n,o){return e[n]=o,e},redefine$5$6={exports:{}},global$l$1=global$n$1,createNonEnumerableProperty$9$3=createNonEnumerableProperty$a$2,setGlobal$3$a=function(e,n){try{createNonEnumerableProperty$9$3(global$l$1,e,n)}catch{global$l$1[e]=n}return n},global$k$1=global$n$1,setGlobal$2$a=setGlobal$3$a,SHARED$a="__core-js_shared__",store$3$a=global$k$1[SHARED$a]||setGlobal$2$a(SHARED$a,{}),sharedStore$a=store$3$a,store$2$a=sharedStore$a,functionToString$a=Function.toString;typeof store$2$a.inspectSource!="function"&&(store$2$a.inspectSource=function(e){return functionToString$a.call(e)});var inspectSource$3$5=store$2$a.inspectSource,global$j$3=global$n$1,inspectSource$2$a=inspectSource$3$5,WeakMap$1$a=global$j$3.WeakMap,nativeWeakMap$a=typeof WeakMap$1$a=="function"&&/native code/.test(inspectSource$2$a(WeakMap$1$a)),shared$2$7={exports:{}},store$1$a=sharedStore$a;(shared$2$7.exports=function(e,n){return store$1$a[e]||(store$1$a[e]=n!==void 0?n:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var id$b=0,postfix$a=Math.random(),uid$3$3=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++id$b+postfix$a).toString(36)},shared$1$a=shared$2$7.exports,uid$2$7=uid$3$3,keys$1$3=shared$1$a("keys"),sharedKey$3$7=function(e){return keys$1$3[e]||(keys$1$3[e]=uid$2$7(e))},hiddenKeys$4$7={},NATIVE_WEAK_MAP$a=nativeWeakMap$a,global$i$4=global$n$1,isObject$8$5=isObject$c$2,createNonEnumerableProperty$8$4=createNonEnumerableProperty$a$2,objectHas$a=has$c$2,sharedKey$2$7=sharedKey$3$7,hiddenKeys$3$a=hiddenKeys$4$7,WeakMap$c=global$i$4.WeakMap,set$2$2,get$1$3,has$a$5,enforce$a=function(e){return has$a$5(e)?get$1$3(e):set$2$2(e,{})},getterFor$7=function(e){return function(n){var o;if(!isObject$8$5(n)||(o=get$1$3(n)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return o}};if(NATIVE_WEAK_MAP$a){var store$d=new WeakMap$c,wmget$a=store$d.get,wmhas$a=store$d.has,wmset$a=store$d.set;set$2$2=function(e,n){return wmset$a.call(store$d,e,n),n},get$1$3=function(e){return wmget$a.call(store$d,e)||{}},has$a$5=function(e){return wmhas$a.call(store$d,e)}}else{var STATE$a=sharedKey$2$7("state");hiddenKeys$3$a[STATE$a]=!0,set$2$2=function(e,n){return createNonEnumerableProperty$8$4(e,STATE$a,n),n},get$1$3=function(e){return objectHas$a(e,STATE$a)?e[STATE$a]:{}},has$a$5=function(e){return objectHas$a(e,STATE$a)}}var internalState$a={set:set$2$2,get:get$1$3,has:has$a$5,enforce:enforce$a,getterFor:getterFor$7},global$h$5=global$n$1,createNonEnumerableProperty$7$7=createNonEnumerableProperty$a$2,has$9$7=has$c$2,setGlobal$1$a=setGlobal$3$a,inspectSource$1$a=inspectSource$3$5,InternalStateModule$4$3=internalState$a,getInternalState$4$2=InternalStateModule$4$3.get,enforceInternalState$a=InternalStateModule$4$3.enforce,TEMPLATE$a=String(String).split("String");(redefine$5$6.exports=function(e,n,o,a){var c=a?!!a.unsafe:!1,l=a?!!a.enumerable:!1,u=a?!!a.noTargetGet:!1;if(typeof o=="function"&&(typeof n=="string"&&!has$9$7(o,"name")&&createNonEnumerableProperty$7$7(o,"name",n),enforceInternalState$a(o).source=TEMPLATE$a.join(typeof n=="string"?n:"")),e===global$h$5){l?e[n]=o:setGlobal$1$a(n,o);return}else c?!u&&e[n]&&(l=!0):delete e[n];l?e[n]=o:createNonEnumerableProperty$7$7(e,n,o)})(Function.prototype,"toString",function e(){return typeof this=="function"&&getInternalState$4$2(this).source||inspectSource$1$a(this)});var global$g$6=global$n$1,path$1$a=global$g$6,path$b=path$1$a,global$f$6=global$n$1,aFunction$6$3=function(e){return typeof e=="function"?e:void 0},getBuiltIn$5$5=function(e,n){return arguments.length<2?aFunction$6$3(path$b[e])||aFunction$6$3(global$f$6[e]):path$b[e]&&path$b[e][n]||global$f$6[e]&&global$f$6[e][n]},objectGetOwnPropertyNames$a={},ceil$a=Math.ceil,floor$1$4=Math.floor,toInteger$5$3=function(e){return isNaN(e=+e)?0:(e>0?floor$1$4:ceil$a)(e)},toInteger$4$4=toInteger$5$3,min$1$a=Math.min,toLength$b$2=function(e){return e>0?min$1$a(toInteger$4$4(e),9007199254740991):0},toInteger$3$4=toInteger$5$3,max$a=Math.max,min$b=Math.min,toAbsoluteIndex$3$3=function(e,n){var o=toInteger$3$4(e);return o<0?max$a(o+n,0):min$b(o,n)},toIndexedObject$2$a=toIndexedObject$4$7,toLength$a$2=toLength$b$2,toAbsoluteIndex$2$3=toAbsoluteIndex$3$3,createMethod$3$2=function(e){return function(n,o,a){var c=toIndexedObject$2$a(n),l=toLength$a$2(c.length),u=toAbsoluteIndex$2$3(a,l),d;if(e&&o!=o){for(;l>u;)if(d=c[u++],d!=d)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===o)return e||u||0;return!e&&-1}},arrayIncludes$a={includes:createMethod$3$2(!0),indexOf:createMethod$3$2(!1)},has$8$7=has$c$2,toIndexedObject$1$a=toIndexedObject$4$7,indexOf$a=arrayIncludes$a.indexOf,hiddenKeys$2$a=hiddenKeys$4$7,objectKeysInternal$a=function(e,n){var o=toIndexedObject$1$a(e),a=0,c=[],l;for(l in o)!has$8$7(hiddenKeys$2$a,l)&&has$8$7(o,l)&&c.push(l);for(;n.length>a;)has$8$7(o,l=n[a++])&&(~indexOf$a(c,l)||c.push(l));return c},enumBugKeys$3$7=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1$a=objectKeysInternal$a,enumBugKeys$2$a=enumBugKeys$3$7,hiddenKeys$1$a=enumBugKeys$2$a.concat("length","prototype");objectGetOwnPropertyNames$a.f=Object.getOwnPropertyNames||function e(n){return internalObjectKeys$1$a(n,hiddenKeys$1$a)};var objectGetOwnPropertySymbols$a={};objectGetOwnPropertySymbols$a.f=Object.getOwnPropertySymbols;var getBuiltIn$4$5=getBuiltIn$5$5,getOwnPropertyNamesModule$a=objectGetOwnPropertyNames$a,getOwnPropertySymbolsModule$1$9=objectGetOwnPropertySymbols$a,anObject$9$6=anObject$b$5,ownKeys$1$a=getBuiltIn$4$5("Reflect","ownKeys")||function e(n){var o=getOwnPropertyNamesModule$a.f(anObject$9$6(n)),a=getOwnPropertySymbolsModule$1$9.f;return a?o.concat(a(n)):o},has$7$7=has$c$2,ownKeys2$a=ownKeys$1$a,getOwnPropertyDescriptorModule$1$3=objectGetOwnPropertyDescriptor$a,definePropertyModule$4$6=objectDefineProperty$a,copyConstructorProperties$1$a=function(e,n){for(var o=ownKeys2$a(n),a=definePropertyModule$4$6.f,c=getOwnPropertyDescriptorModule$1$3.f,l=0;l<o.length;l++){var u=o[l];has$7$7(e,u)||a(e,u,c(n,u))}},fails$d$3=fails$h$2,replacement$a=/#|\.prototype\./,isForced$2$5=function(e,n){var o=data$a[normalize$a(e)];return o==POLYFILL$a?!0:o==NATIVE$a?!1:typeof n=="function"?fails$d$3(n):!!n},normalize$a=isForced$2$5.normalize=function(e){return String(e).replace(replacement$a,".").toLowerCase()},data$a=isForced$2$5.data={},NATIVE$a=isForced$2$5.NATIVE="N",POLYFILL$a=isForced$2$5.POLYFILL="P",isForced_1$a=isForced$2$5,global$e$6=global$n$1,getOwnPropertyDescriptor$1$a=objectGetOwnPropertyDescriptor$a.f,createNonEnumerableProperty$6$7=createNonEnumerableProperty$a$2,redefine$4$6=redefine$5$6.exports,setGlobal$d=setGlobal$3$a,copyConstructorProperties$b=copyConstructorProperties$1$a,isForced$1$a=isForced_1$a,_export$a=function(e,n){var o=e.target,a=e.global,c=e.stat,l,u,d,h,y,p;if(a?u=global$e$6:c?u=global$e$6[o]||setGlobal$d(o,{}):u=(global$e$6[o]||{}).prototype,u)for(d in n){if(y=n[d],e.noTargetGet?(p=getOwnPropertyDescriptor$1$a(u,d),h=p&&p.value):h=u[d],l=isForced$1$a(a?d:o+(c?".":"#")+d,e.forced),!l&&h!==void 0){if(typeof y==typeof h)continue;copyConstructorProperties$b(y,h)}(e.sham||h&&h.sham)&&createNonEnumerableProperty$6$7(y,"sham",!0),redefine$4$6(u,d,y,e)}},global$d$7=global$n$1,nativePromiseConstructor$4=global$d$7.Promise,redefine$3$7=redefine$5$6.exports,redefineAll$2$3=function(e,n,o){for(var a in n)redefine$3$7(e,a,n[a],o);return e},fails$c$5=fails$h$2,nativeSymbol$7=!!Object.getOwnPropertySymbols&&!fails$c$5(function(){return!String(Symbol())}),NATIVE_SYMBOL$1$7=nativeSymbol$7,useSymbolAsUid$7=NATIVE_SYMBOL$1$7&&!Symbol.sham&&typeof Symbol.iterator=="symbol",global$c$7=global$n$1,shared$c=shared$2$7.exports,has$6$7=has$c$2,uid$1$a=uid$3$3,NATIVE_SYMBOL$8=nativeSymbol$7,USE_SYMBOL_AS_UID$7=useSymbolAsUid$7,WellKnownSymbolsStore$7=shared$c("wks"),Symbol$1$7=global$c$7.Symbol,createWellKnownSymbol$7=USE_SYMBOL_AS_UID$7?Symbol$1$7:Symbol$1$7&&Symbol$1$7.withoutSetter||uid$1$a,wellKnownSymbol$h$2=function(e){return has$6$7(WellKnownSymbolsStore$7,e)||(NATIVE_SYMBOL$8&&has$6$7(Symbol$1$7,e)?WellKnownSymbolsStore$7[e]=Symbol$1$7[e]:WellKnownSymbolsStore$7[e]=createWellKnownSymbol$7("Symbol."+e)),WellKnownSymbolsStore$7[e]},defineProperty$4$1=objectDefineProperty$a.f,has$5$a=has$c$2,wellKnownSymbol$g$2=wellKnownSymbol$h$2,TO_STRING_TAG$4$2=wellKnownSymbol$g$2("toStringTag"),setToStringTag$4$3=function(e,n,o){e&&!has$5$a(e=o?e:e.prototype,TO_STRING_TAG$4$2)&&defineProperty$4$1(e,TO_STRING_TAG$4$2,{configurable:!0,value:n})},getBuiltIn$3$6=getBuiltIn$5$5,definePropertyModule$3$7=objectDefineProperty$a,wellKnownSymbol$f$4=wellKnownSymbol$h$2,DESCRIPTORS$6$5=descriptors$a,SPECIES$3$3=wellKnownSymbol$f$4("species"),setSpecies$2$2=function(e){var n=getBuiltIn$3$6(e),o=definePropertyModule$3$7.f;DESCRIPTORS$6$5&&n&&!n[SPECIES$3$3]&&o(n,SPECIES$3$3,{configurable:!0,get:function(){return this}})},aFunction$5$5=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e},anInstance$3$3=function(e,n,o){if(!(e instanceof n))throw TypeError("Incorrect "+(o?o+" ":"")+"invocation");return e},iterate$2$4={exports:{}},iterators$7={},wellKnownSymbol$e$4=wellKnownSymbol$h$2,Iterators$4$6=iterators$7,ITERATOR$5$5=wellKnownSymbol$e$4("iterator"),ArrayPrototype$1$6=Array.prototype,isArrayIteratorMethod$2$3=function(e){return e!==void 0&&(Iterators$4$6.Array===e||ArrayPrototype$1$6[ITERATOR$5$5]===e)},aFunction$4$5=aFunction$5$5,functionBindContext$6=function(e,n,o){if(aFunction$4$5(e),n===void 0)return e;switch(o){case 0:return function(){return e.call(n)};case 1:return function(a){return e.call(n,a)};case 2:return function(a,c){return e.call(n,a,c)};case 3:return function(a,c,l){return e.call(n,a,c,l)}}return function(){return e.apply(n,arguments)}},wellKnownSymbol$d$6=wellKnownSymbol$h$2,TO_STRING_TAG$3$6=wellKnownSymbol$d$6("toStringTag"),test$6={};test$6[TO_STRING_TAG$3$6]="z";var toStringTagSupport$6=String(test$6)==="[object z]",TO_STRING_TAG_SUPPORT$6=toStringTagSupport$6,classofRaw$b=classofRaw$1$6,wellKnownSymbol$c$6=wellKnownSymbol$h$2,TO_STRING_TAG$2$6=wellKnownSymbol$c$6("toStringTag"),CORRECT_ARGUMENTS$6=classofRaw$b(function(){return arguments}())=="Arguments",tryGet$6=function(e,n){try{return e[n]}catch{}},classof$8$2=TO_STRING_TAG_SUPPORT$6?classofRaw$b:function(e){var n,o,a;return e===void 0?"Undefined":e===null?"Null":typeof(o=tryGet$6(n=Object(e),TO_STRING_TAG$2$6))=="string"?o:CORRECT_ARGUMENTS$6?classofRaw$b(n):(a=classofRaw$b(n))=="Object"&&typeof n.callee=="function"?"Arguments":a},classof$7$3=classof$8$2,Iterators$3$6=iterators$7,wellKnownSymbol$b$6=wellKnownSymbol$h$2,ITERATOR$4$6=wellKnownSymbol$b$6("iterator"),getIteratorMethod$2$3=function(e){if(e!=null)return e[ITERATOR$4$6]||e["@@iterator"]||Iterators$3$6[classof$7$3(e)]},anObject$8$6=anObject$b$5,callWithSafeIterationClosing$1$4=function(e,n,o,a){try{return a?n(anObject$8$6(o)[0],o[1]):n(o)}catch(l){var c=e.return;throw c!==void 0&&anObject$8$6(c.call(e)),l}},anObject$7$7=anObject$b$5,isArrayIteratorMethod$1$6=isArrayIteratorMethod$2$3,toLength$9$3=toLength$b$2,bind$4$2=functionBindContext$6,getIteratorMethod$1$6=getIteratorMethod$2$3,callWithSafeIterationClosing$6=callWithSafeIterationClosing$1$4,Result$4=function(e,n){this.stopped=e,this.result=n},iterate$1$4=iterate$2$4.exports=function(e,n,o,a,c){var l=bind$4$2(n,o,a?2:1),u,d,h,y,p,v,b;if(c)u=e;else{if(d=getIteratorMethod$1$6(e),typeof d!="function")throw TypeError("Target is not iterable");if(isArrayIteratorMethod$1$6(d)){for(h=0,y=toLength$9$3(e.length);y>h;h++)if(p=a?l(anObject$7$7(b=e[h])[0],b[1]):l(e[h]),p&&p instanceof Result$4)return p;return new Result$4(!1)}u=d.call(e)}for(v=u.next;!(b=v.call(u)).done;)if(p=callWithSafeIterationClosing$6(u,l,b.value,a),typeof p=="object"&&p&&p instanceof Result$4)return p;return new Result$4(!1)};iterate$1$4.stop=function(e){return new Result$4(!0,e)};var wellKnownSymbol$a$6=wellKnownSymbol$h$2,ITERATOR$3$6=wellKnownSymbol$a$6("iterator"),SAFE_CLOSING$6=!1;try{var called$6=0,iteratorWithReturn$6={next:function(){return{done:!!called$6++}},return:function(){SAFE_CLOSING$6=!0}};iteratorWithReturn$6[ITERATOR$3$6]=function(){return this},Array.from(iteratorWithReturn$6,function(){throw 2})}catch(e){}var checkCorrectnessOfIteration$2$2=function(e,n){if(!n&&!SAFE_CLOSING$6)return!1;var o=!1;try{var a={};a[ITERATOR$3$6]=function(){return{next:function(){return{done:o=!0}}}},e(a)}catch{}return o},anObject$6$7=anObject$b$5,aFunction$3$6=aFunction$5$5,wellKnownSymbol$9$6=wellKnownSymbol$h$2,SPECIES$2$6=wellKnownSymbol$9$6("species"),speciesConstructor$2$2=function(e,n){var o=anObject$6$7(e).constructor,a;return o===void 0||(a=anObject$6$7(o)[SPECIES$2$6])==null?n:aFunction$3$6(a)},getBuiltIn$2$7=getBuiltIn$5$5,html$2$5=getBuiltIn$2$7("document","documentElement"),getBuiltIn$1$a=getBuiltIn$5$5,engineUserAgent$4=getBuiltIn$1$a("navigator","userAgent")||"",userAgent$1$4=engineUserAgent$4,engineIsIos$4=/(iphone|ipod|ipad).*applewebkit/i.test(userAgent$1$4),global$b$7=global$n$1,fails$b$5=fails$h$2,classof$6$4=classofRaw$1$6,bind$3$2=functionBindContext$6,html$1$7=html$2$5,createElement$a=documentCreateElement$1$7,IS_IOS$1$4=engineIsIos$4,location$5=global$b$7.location,set$1$6=global$b$7.setImmediate,clear$4=global$b$7.clearImmediate,process$3$4=global$b$7.process,MessageChannel$5=global$b$7.MessageChannel,Dispatch$4=global$b$7.Dispatch,counter$4=0,queue$4={},ONREADYSTATECHANGE$4="onreadystatechange",defer$4,channel$4,port$4,run$4=function(e){if(queue$4.hasOwnProperty(e)){var n=queue$4[e];delete queue$4[e],n()}},runner$4=function(e){return function(){run$4(e)}},listener$4=function(e){run$4(e.data)},post$4=function(e){global$b$7.postMessage(e+"",location$5.protocol+"//"+location$5.host)};(!set$1$6||!clear$4)&&(set$1$6=function(n){for(var o=[],a=1;arguments.length>a;)o.push(arguments[a++]);return queue$4[++counter$4]=function(){(typeof n=="function"?n:Function(n)).apply(void 0,o)},defer$4(counter$4),counter$4},clear$4=function(n){delete queue$4[n]},classof$6$4(process$3$4)=="process"?defer$4=function(e){process$3$4.nextTick(runner$4(e))}:Dispatch$4&&Dispatch$4.now?defer$4=function(e){Dispatch$4.now(runner$4(e))}:MessageChannel$5&&!IS_IOS$1$4?(channel$4=new MessageChannel$5,port$4=channel$4.port2,channel$4.port1.onmessage=listener$4,defer$4=bind$3$2(port$4.postMessage,port$4,1)):global$b$7.addEventListener&&typeof postMessage=="function"&&!global$b$7.importScripts&&!fails$b$5(post$4)&&location$5.protocol!=="file:"?(defer$4=post$4,global$b$7.addEventListener("message",listener$4,!1)):ONREADYSTATECHANGE$4 in createElement$a("script")?defer$4=function(e){html$1$7.appendChild(createElement$a("script"))[ONREADYSTATECHANGE$4]=function(){html$1$7.removeChild(this),run$4(e)}}:defer$4=function(e){setTimeout(runner$4(e),0)});var task$1$4={set:set$1$6},global$a$a=global$n$1,getOwnPropertyDescriptor2$a=objectGetOwnPropertyDescriptor$a.f,classof$5$6=classofRaw$1$6,macrotask$4=task$1$4.set,IS_IOS$5=engineIsIos$4,MutationObserver$5=global$a$a.MutationObserver||global$a$a.WebKitMutationObserver,process$2$4=global$a$a.process,Promise$1$4=global$a$a.Promise,IS_NODE$1$4=classof$5$6(process$2$4)=="process",queueMicrotaskDescriptor$4=getOwnPropertyDescriptor2$a(global$a$a,"queueMicrotask"),queueMicrotask$5=queueMicrotaskDescriptor$4&&queueMicrotaskDescriptor$4.value,flush$4,head$4,last$4,notify$1$4,toggle$4,node$4,promise$4,then$4;queueMicrotask$5||(flush$4=function(){var e,n;for(IS_NODE$1$4&&(e=process$2$4.domain)&&e.exit();head$4;){n=head$4.fn,head$4=head$4.next;try{n()}catch(o){throw head$4?notify$1$4():last$4=void 0,o}}last$4=void 0,e&&e.enter()},IS_NODE$1$4?notify$1$4=function(){process$2$4.nextTick(flush$4)}:MutationObserver$5&&!IS_IOS$5?(toggle$4=!0,node$4=document.createTextNode(""),new MutationObserver$5(flush$4).observe(node$4,{characterData:!0}),notify$1$4=function(){node$4.data=toggle$4=!toggle$4}):Promise$1$4&&Promise$1$4.resolve?(promise$4=Promise$1$4.resolve(void 0),then$4=promise$4.then,notify$1$4=function(){then$4.call(promise$4,flush$4)}):notify$1$4=function(){macrotask$4.call(global$a$a,flush$4)});var microtask$1$4=queueMicrotask$5||function(e){var n={fn:e,next:void 0};last$4&&(last$4.next=n),head$4||(head$4=n,notify$1$4()),last$4=n},newPromiseCapability$2$4={},aFunction$2$6=aFunction$5$5,PromiseCapability$4=function(e){var n,o;this.promise=new e(function(a,c){if(n!==void 0||o!==void 0)throw TypeError("Bad Promise constructor");n=a,o=c}),this.resolve=aFunction$2$6(n),this.reject=aFunction$2$6(o)};newPromiseCapability$2$4.f=function(e){return new PromiseCapability$4(e)};var anObject$5$7=anObject$b$5,isObject$7$6=isObject$c$2,newPromiseCapability$1$4=newPromiseCapability$2$4,promiseResolve$1$4=function(e,n){if(anObject$5$7(e),isObject$7$6(n)&&n.constructor===e)return n;var o=newPromiseCapability$1$4.f(e),a=o.resolve;return a(n),o.promise},global$9$a=global$n$1,hostReportErrors$1$4=function(e,n){var o=global$9$a.console;o&&o.error&&(arguments.length===1?o.error(e):o.error(e,n))},perform$1$4=function(e){try{return{error:!1,value:e()}}catch(n){return{error:!0,value:n}}},global$8$a=global$n$1,userAgent$5=engineUserAgent$4,process$1$4=global$8$a.process,versions$4=process$1$4&&process$1$4.versions,v8$4=versions$4&&versions$4.v8,match$4,version$5;v8$4?(match$4=v8$4.split("."),version$5=match$4[0]+match$4[1]):userAgent$5&&(match$4=userAgent$5.match(/Edge\/(\d+)/),(!match$4||match$4[1]>=74)&&(match$4=userAgent$5.match(/Chrome\/(\d+)/),match$4&&(version$5=match$4[1])));var engineV8Version$4=version$5&&+version$5,$$9$2=_export$a,global$7$a=global$n$1,getBuiltIn$d=getBuiltIn$5$5,NativePromise$4=nativePromiseConstructor$4,redefine$2$a=redefine$5$6.exports,redefineAll$1$6=redefineAll$2$3,setToStringTag$3$6=setToStringTag$4$3,setSpecies$1$6=setSpecies$2$2,isObject$6$7=isObject$c$2,aFunction$1$6=aFunction$5$5,anInstance$2$4=anInstance$3$3,classof$4$6=classofRaw$1$6,inspectSource$c=inspectSource$3$5,iterate$6=iterate$2$4.exports,checkCorrectnessOfIteration$1$6=checkCorrectnessOfIteration$2$2,speciesConstructor$1$6=speciesConstructor$2$2,task$5=task$1$4.set,microtask$5=microtask$1$4,promiseResolve$5=promiseResolve$1$4,hostReportErrors$5=hostReportErrors$1$4,newPromiseCapabilityModule$4=newPromiseCapability$2$4,perform$5=perform$1$4,InternalStateModule$3$4=internalState$a,isForced$b=isForced_1$a,wellKnownSymbol$8$6=wellKnownSymbol$h$2,V8_VERSION$4=engineV8Version$4,SPECIES$1$6=wellKnownSymbol$8$6("species"),PROMISE$4="Promise",getInternalState$3$4=InternalStateModule$3$4.get,setInternalState$3$3=InternalStateModule$3$4.set,getInternalPromiseState$4=InternalStateModule$3$4.getterFor(PROMISE$4),PromiseConstructor$4=NativePromise$4,TypeError$1$4=global$7$a.TypeError,document$1$7=global$7$a.document,process$8=global$7$a.process,$fetch$5=getBuiltIn$d("fetch"),newPromiseCapability$6=newPromiseCapabilityModule$4.f,newGenericPromiseCapability$4=newPromiseCapability$6,IS_NODE$5=classof$4$6(process$8)=="process",DISPATCH_EVENT$4=!!(document$1$7&&document$1$7.createEvent&&global$7$a.dispatchEvent),UNHANDLED_REJECTION$4="unhandledrejection",REJECTION_HANDLED$4="rejectionhandled",PENDING$4=0,FULFILLED$4=1,REJECTED$4=2,HANDLED$4=1,UNHANDLED$4=2,Internal$4,OwnPromiseCapability$4,PromiseWrapper$4,nativeThen$4,FORCED$2$2=isForced$b(PROMISE$4,function(){var e=inspectSource$c(PromiseConstructor$4)!==String(PromiseConstructor$4);if(!e&&(V8_VERSION$4===66||!IS_NODE$5&&typeof PromiseRejectionEvent!="function"))return!0;if(V8_VERSION$4>=51&&/native code/.test(PromiseConstructor$4))return!1;var n=PromiseConstructor$4.resolve(1),o=function(c){c(function(){},function(){})},a=n.constructor={};return a[SPECIES$1$6]=o,!(n.then(function(){})instanceof o)}),INCORRECT_ITERATION$4=FORCED$2$2||!checkCorrectnessOfIteration$1$6(function(e){PromiseConstructor$4.all(e).catch(function(){})}),isThenable$4=function(e){var n;return isObject$6$7(e)&&typeof(n=e.then)=="function"?n:!1},notify$5=function(e,n,o){if(!n.notified){n.notified=!0;var a=n.reactions;microtask$5(function(){for(var c=n.value,l=n.state==FULFILLED$4,u=0;a.length>u;){var d=a[u++],h=l?d.ok:d.fail,y=d.resolve,p=d.reject,v=d.domain,b,_,T;try{h?(l||(n.rejection===UNHANDLED$4&&onHandleUnhandled$4(e,n),n.rejection=HANDLED$4),h===!0?b=c:(v&&v.enter(),b=h(c),v&&(v.exit(),T=!0)),b===d.promise?p(TypeError$1$4("Promise-chain cycle")):(_=isThenable$4(b))?_.call(b,y,p):y(b)):p(c)}catch(I){v&&!T&&v.exit(),p(I)}}n.reactions=[],n.notified=!1,o&&!n.rejection&&onUnhandled$4(e,n)})}},dispatchEvent$4=function(e,n,o){var a,c;DISPATCH_EVENT$4?(a=document$1$7.createEvent("Event"),a.promise=n,a.reason=o,a.initEvent(e,!1,!0),global$7$a.dispatchEvent(a)):a={promise:n,reason:o},(c=global$7$a["on"+e])?c(a):e===UNHANDLED_REJECTION$4&&hostReportErrors$5("Unhandled promise rejection",o)},onUnhandled$4=function(e,n){task$5.call(global$7$a,function(){var o=n.value,a=isUnhandled$4(n),c;if(a&&(c=perform$5(function(){IS_NODE$5?process$8.emit("unhandledRejection",o,e):dispatchEvent$4(UNHANDLED_REJECTION$4,e,o)}),n.rejection=IS_NODE$5||isUnhandled$4(n)?UNHANDLED$4:HANDLED$4,c.error))throw c.value})},isUnhandled$4=function(e){return e.rejection!==HANDLED$4&&!e.parent},onHandleUnhandled$4=function(e,n){task$5.call(global$7$a,function(){IS_NODE$5?process$8.emit("rejectionHandled",e):dispatchEvent$4(REJECTION_HANDLED$4,e,n.value)})},bind$2$5=function(e,n,o,a){return function(c){e(n,o,c,a)}},internalReject$4=function(e,n,o,a){n.done||(n.done=!0,a&&(n=a),n.value=o,n.state=REJECTED$4,notify$5(e,n,!0))},internalResolve$4=function(e,n,o,a){if(!n.done){n.done=!0,a&&(n=a);try{if(e===o)throw TypeError$1$4("Promise can't be resolved itself");var c=isThenable$4(o);c?microtask$5(function(){var l={done:!1};try{c.call(o,bind$2$5(internalResolve$4,e,l,n),bind$2$5(internalReject$4,e,l,n))}catch(u){internalReject$4(e,l,u,n)}}):(n.value=o,n.state=FULFILLED$4,notify$5(e,n,!1))}catch(l){internalReject$4(e,{done:!1},l,n)}}};FORCED$2$2&&(PromiseConstructor$4=function(n){anInstance$2$4(this,PromiseConstructor$4,PROMISE$4),aFunction$1$6(n),Internal$4.call(this);var o=getInternalState$3$4(this);try{n(bind$2$5(internalResolve$4,this,o),bind$2$5(internalReject$4,this,o))}catch(a){internalReject$4(this,o,a)}},Internal$4=function(n){setInternalState$3$3(this,{type:PROMISE$4,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING$4,value:void 0})},Internal$4.prototype=redefineAll$1$6(PromiseConstructor$4.prototype,{then:function(n,o){var a=getInternalPromiseState$4(this),c=newPromiseCapability$6(speciesConstructor$1$6(this,PromiseConstructor$4));return c.ok=typeof n=="function"?n:!0,c.fail=typeof o=="function"&&o,c.domain=IS_NODE$5?process$8.domain:void 0,a.parent=!0,a.reactions.push(c),a.state!=PENDING$4&¬ify$5(this,a,!1),c.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability$4=function(){var e=new Internal$4,n=getInternalState$3$4(e);this.promise=e,this.resolve=bind$2$5(internalResolve$4,e,n),this.reject=bind$2$5(internalReject$4,e,n)},newPromiseCapabilityModule$4.f=newPromiseCapability$6=function(e){return e===PromiseConstructor$4||e===PromiseWrapper$4?new OwnPromiseCapability$4(e):newGenericPromiseCapability$4(e)},typeof NativePromise$4=="function"&&(nativeThen$4=NativePromise$4.prototype.then,redefine$2$a(NativePromise$4.prototype,"then",function(n,o){var a=this;return new PromiseConstructor$4(function(c,l){nativeThen$4.call(a,c,l)}).then(n,o)},{unsafe:!0}),typeof $fetch$5=="function"&&$$9$2({global:!0,enumerable:!0,forced:!0},{fetch:function(n){return promiseResolve$5(PromiseConstructor$4,$fetch$5.apply(global$7$a,arguments))}})));$$9$2({global:!0,wrap:!0,forced:FORCED$2$2},{Promise:PromiseConstructor$4});setToStringTag$3$6(PromiseConstructor$4,PROMISE$4,!1);setSpecies$1$6(PROMISE$4);PromiseWrapper$4=getBuiltIn$d(PROMISE$4);$$9$2({target:PROMISE$4,stat:!0,forced:FORCED$2$2},{reject:function e(n){var o=newPromiseCapability$6(this);return o.reject.call(void 0,n),o.promise}});$$9$2({target:PROMISE$4,stat:!0,forced:FORCED$2$2},{resolve:function e(n){return promiseResolve$5(this,n)}});$$9$2({target:PROMISE$4,stat:!0,forced:INCORRECT_ITERATION$4},{all:function e(n){var o=this,a=newPromiseCapability$6(o),c=a.resolve,l=a.reject,u=perform$5(function(){var d=aFunction$1$6(o.resolve),h=[],y=0,p=1;iterate$6(n,function(v){var b=y++,_=!1;h.push(void 0),p++,d.call(o,v).then(function(T){_||(_=!0,h[b]=T,--p||c(h))},l)}),--p||c(h)});return u.error&&l(u.value),a.promise},race:function e(n){var o=this,a=newPromiseCapability$6(o),c=a.reject,l=perform$5(function(){var u=aFunction$1$6(o.resolve);iterate$6(n,function(d){u.call(o,d).then(a.resolve,c)})});return l.error&&c(l.value),a.promise}});class WebStorageService{getItem(n){return new Promise(o=>{const a=localStorage.getItem(n);o(a)})}setItem(n,o){return new Promise(a=>{localStorage.setItem(n,o),a()})}removeItem(n){return new Promise(o=>{localStorage.removeItem(n),o()})}}var internalObjectKeys$b=objectKeysInternal$a,enumBugKeys$1$a=enumBugKeys$3$7,objectKeys$2$6=Object.keys||function e(n){return internalObjectKeys$b(n,enumBugKeys$1$a)},DESCRIPTORS$5$7=descriptors$a,definePropertyModule$2$7=objectDefineProperty$a,anObject$4$a=anObject$b$5,objectKeys$1$a=objectKeys$2$6,objectDefineProperties$7=DESCRIPTORS$5$7?Object.defineProperties:function e(n,o){anObject$4$a(n);for(var a=objectKeys$1$a(o),c=a.length,l=0,u;c>l;)definePropertyModule$2$7.f(n,u=a[l++],o[u]);return n},anObject$3$a=anObject$b$5,defineProperties2$7=objectDefineProperties$7,enumBugKeys$d=enumBugKeys$3$7,hiddenKeys$e=hiddenKeys$4$7,html$8=html$2$5,documentCreateElement$b=documentCreateElement$1$7,sharedKey$1$a=sharedKey$3$7,GT$7=">",LT$7="<",PROTOTYPE$1$3="prototype",SCRIPT$7="script",IE_PROTO$1$7=sharedKey$1$a("IE_PROTO"),EmptyConstructor$7=function(){},scriptTag$7=function(e){return LT$7+SCRIPT$7+GT$7+e+LT$7+"/"+SCRIPT$7+GT$7},NullProtoObjectViaActiveX$7=function(e){e.write(scriptTag$7("")),e.close();var n=e.parentWindow.Object;return e=null,n},NullProtoObjectViaIFrame$7=function(){var e=documentCreateElement$b("iframe"),n="java"+SCRIPT$7+":",o;return e.style.display="none",html$8.appendChild(e),e.src=String(n),o=e.contentWindow.document,o.open(),o.write(scriptTag$7("document.F=Object")),o.close(),o.F},activeXDocument$7,NullProtoObject$7=function(){try{activeXDocument$7=document.domain&&new ActiveXObject("htmlfile")}catch{}NullProtoObject$7=activeXDocument$7?NullProtoObjectViaActiveX$7(activeXDocument$7):NullProtoObjectViaIFrame$7();for(var e=enumBugKeys$d.length;e--;)delete NullProtoObject$7[PROTOTYPE$1$3][enumBugKeys$d[e]];return NullProtoObject$7()};hiddenKeys$e[IE_PROTO$1$7]=!0;var objectCreate$7=Object.create||function e(n,o){var a;return n!==null?(EmptyConstructor$7[PROTOTYPE$1$3]=anObject$3$a(n),a=new EmptyConstructor$7,EmptyConstructor$7[PROTOTYPE$1$3]=null,a[IE_PROTO$1$7]=n):a=NullProtoObject$7(),o===void 0?a:defineProperties2$7(a,o)},wellKnownSymbol$7$7=wellKnownSymbol$h$2,create$2$4=objectCreate$7,definePropertyModule$1$a=objectDefineProperty$a,UNSCOPABLES$7=wellKnownSymbol$7$7("unscopables"),ArrayPrototype$8=Array.prototype;ArrayPrototype$8[UNSCOPABLES$7]==null&&definePropertyModule$1$a.f(ArrayPrototype$8,UNSCOPABLES$7,{configurable:!0,value:create$2$4(null)});var addToUnscopables$2$3=function(e){ArrayPrototype$8[UNSCOPABLES$7][e]=!0},requireObjectCoercible$2$a=requireObjectCoercible$4$4,toObject$7$2=function(e){return Object(requireObjectCoercible$2$a(e))},fails$a$5=fails$h$2,correctPrototypeGetter$7=!fails$a$5(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),has$4$a=has$c$2,toObject$6$3=toObject$7$2,sharedKey$d=sharedKey$3$7,CORRECT_PROTOTYPE_GETTER$7=correctPrototypeGetter$7,IE_PROTO$8=sharedKey$d("IE_PROTO"),ObjectPrototype$2$3=Object.prototype,objectGetPrototypeOf$7=CORRECT_PROTOTYPE_GETTER$7?Object.getPrototypeOf:function(e){return e=toObject$6$3(e),has$4$a(e,IE_PROTO$8)?e[IE_PROTO$8]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectPrototype$2$3:null},getPrototypeOf$3$3=objectGetPrototypeOf$7,createNonEnumerableProperty$5$7=createNonEnumerableProperty$a$2,has$3$a=has$c$2,wellKnownSymbol$6$7=wellKnownSymbol$h$2,ITERATOR$2$7=wellKnownSymbol$6$7("iterator"),BUGGY_SAFARI_ITERATORS$1$7=!1,returnThis$2$7=function(){return this},IteratorPrototype$2$7,PrototypeOfArrayIteratorPrototype$7,arrayIterator$7;[].keys&&(arrayIterator$7=[].keys(),"next"in arrayIterator$7?(PrototypeOfArrayIteratorPrototype$7=getPrototypeOf$3$3(getPrototypeOf$3$3(arrayIterator$7)),PrototypeOfArrayIteratorPrototype$7!==Object.prototype&&(IteratorPrototype$2$7=PrototypeOfArrayIteratorPrototype$7)):BUGGY_SAFARI_ITERATORS$1$7=!0);IteratorPrototype$2$7==null&&(IteratorPrototype$2$7={});has$3$a(IteratorPrototype$2$7,ITERATOR$2$7)||createNonEnumerableProperty$5$7(IteratorPrototype$2$7,ITERATOR$2$7,returnThis$2$7);var iteratorsCore$7={IteratorPrototype:IteratorPrototype$2$7,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1$7},IteratorPrototype$1$7=iteratorsCore$7.IteratorPrototype,create$1$7=objectCreate$7,createPropertyDescriptor$1$a=createPropertyDescriptor$4$4,setToStringTag$2$7=setToStringTag$4$3,Iterators$2$7=iterators$7,returnThis$1$7=function(){return this},createIteratorConstructor$1$7=function(e,n,o){var a=n+" Iterator";return e.prototype=create$1$7(IteratorPrototype$1$7,{next:createPropertyDescriptor$1$a(1,o)}),setToStringTag$2$7(e,a,!1),Iterators$2$7[a]=returnThis$1$7,e},isObject$5$7=isObject$c$2,aPossiblePrototype$1$7=function(e){if(!isObject$5$7(e)&&e!==null)throw TypeError("Can't set "+String(e)+" as a prototype");return e},anObject$2$a=anObject$b$5,aPossiblePrototype$8=aPossiblePrototype$1$7,objectSetPrototypeOf$7=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,n={},o;try{o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,o.call(n,[]),e=n instanceof Array}catch{}return function(c,l){return anObject$2$a(c),aPossiblePrototype$8(l),e?o.call(c,l):c.__proto__=l,c}}():void 0),$$8$2=_export$a,createIteratorConstructor$8=createIteratorConstructor$1$7,getPrototypeOf$2$3=objectGetPrototypeOf$7,setPrototypeOf$4$3=objectSetPrototypeOf$7,setToStringTag$1$7=setToStringTag$4$3,createNonEnumerableProperty$4$a=createNonEnumerableProperty$a$2,redefine$1$a=redefine$5$6.exports,wellKnownSymbol$5$7=wellKnownSymbol$h$2,Iterators$1$7=iterators$7,IteratorsCore$7=iteratorsCore$7,IteratorPrototype$9=IteratorsCore$7.IteratorPrototype,BUGGY_SAFARI_ITERATORS$8=IteratorsCore$7.BUGGY_SAFARI_ITERATORS,ITERATOR$1$7=wellKnownSymbol$5$7("iterator"),KEYS$7="keys",VALUES$7="values",ENTRIES$7="entries",returnThis$9=function(){return this},defineIterator$1$7=function(e,n,o,a,c,l,u){createIteratorConstructor$8(o,n,a);var d=function(N){if(N===c&&b)return b;if(!BUGGY_SAFARI_ITERATORS$8&&N in p)return p[N];switch(N){case KEYS$7:return function(){return new o(this,N)};case VALUES$7:return function(){return new o(this,N)};case ENTRIES$7:return function(){return new o(this,N)}}return function(){return new o(this)}},h=n+" Iterator",y=!1,p=e.prototype,v=p[ITERATOR$1$7]||p["@@iterator"]||c&&p[c],b=!BUGGY_SAFARI_ITERATORS$8&&v||d(c),_=n=="Array"&&p.entries||v,T,I,U;if(_&&(T=getPrototypeOf$2$3(_.call(new e)),IteratorPrototype$9!==Object.prototype&&T.next&&(getPrototypeOf$2$3(T)!==IteratorPrototype$9&&(setPrototypeOf$4$3?setPrototypeOf$4$3(T,IteratorPrototype$9):typeof T[ITERATOR$1$7]!="function"&&createNonEnumerableProperty$4$a(T,ITERATOR$1$7,returnThis$9)),setToStringTag$1$7(T,h,!0))),c==VALUES$7&&v&&v.name!==VALUES$7&&(y=!0,b=function(){return v.call(this)}),p[ITERATOR$1$7]!==b&&createNonEnumerableProperty$4$a(p,ITERATOR$1$7,b),Iterators$1$7[n]=b,c)if(I={values:d(VALUES$7),keys:l?b:d(KEYS$7),entries:d(ENTRIES$7)},u)for(U in I)(BUGGY_SAFARI_ITERATORS$8||y||!(U in p))&&redefine$1$a(p,U,I[U]);else $$8$2({target:n,proto:!0,forced:BUGGY_SAFARI_ITERATORS$8||y},I);return I},toIndexedObject$e=toIndexedObject$4$7,addToUnscopables$1$7=addToUnscopables$2$3,Iterators$b=iterators$7,InternalStateModule$2$6=internalState$a,defineIterator$8=defineIterator$1$7,ARRAY_ITERATOR$7="Array Iterator",setInternalState$2$4=InternalStateModule$2$6.set,getInternalState$2$6=InternalStateModule$2$6.getterFor(ARRAY_ITERATOR$7),es_array_iterator$6=defineIterator$8(Array,"Array",function(e,n){setInternalState$2$4(this,{type:ARRAY_ITERATOR$7,target:toIndexedObject$e(e),index:0,kind:n})},function(){var e=getInternalState$2$6(this),n=e.target,o=e.kind,a=e.index++;return!n||a>=n.length?(e.target=void 0,{value:void 0,done:!0}):o=="keys"?{value:a,done:!1}:o=="values"?{value:n[a],done:!1}:{value:[a,n[a]],done:!1}},"values");Iterators$b.Arguments=Iterators$b.Array;addToUnscopables$1$7("keys");addToUnscopables$1$7("values");addToUnscopables$1$7("entries");var domIterables$6={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},global$6$a=global$n$1,DOMIterables$6=domIterables$6,ArrayIteratorMethods$6=es_array_iterator$6,createNonEnumerableProperty$3$a=createNonEnumerableProperty$a$2,wellKnownSymbol$4$7=wellKnownSymbol$h$2,ITERATOR$d=wellKnownSymbol$4$7("iterator"),TO_STRING_TAG$1$7=wellKnownSymbol$4$7("toStringTag"),ArrayValues$6=ArrayIteratorMethods$6.values;for(var COLLECTION_NAME$6 in DOMIterables$6){var Collection$6=global$6$a[COLLECTION_NAME$6],CollectionPrototype$6=Collection$6&&Collection$6.prototype;if(CollectionPrototype$6){if(CollectionPrototype$6[ITERATOR$d]!==ArrayValues$6)try{createNonEnumerableProperty$3$a(CollectionPrototype$6,ITERATOR$d,ArrayValues$6)}catch{CollectionPrototype$6[ITERATOR$d]=ArrayValues$6}if(CollectionPrototype$6[TO_STRING_TAG$1$7]||createNonEnumerableProperty$3$a(CollectionPrototype$6,TO_STRING_TAG$1$7,COLLECTION_NAME$6),DOMIterables$6[COLLECTION_NAME$6]){for(var METHOD_NAME$6 in ArrayIteratorMethods$6)if(CollectionPrototype$6[METHOD_NAME$6]!==ArrayIteratorMethods$6[METHOD_NAME$6])try{createNonEnumerableProperty$3$a(CollectionPrototype$6,METHOD_NAME$6,ArrayIteratorMethods$6[METHOD_NAME$6])}catch{CollectionPrototype$6[METHOD_NAME$6]=ArrayIteratorMethods$6[METHOD_NAME$6]}}}}let Logger$1=class Kt{constructor(n){this.namespace=n}emit(n,...o){if(Kt.debug){if(this.namespace&&n!=="error"){console[n](this.namespace,...o);return}console[n](...o)}}log(...n){this.emit("log",...n)}info(...n){this.emit("info",...n)}warn(...n){this.emit("warn",...n)}error(...n){this.emit("error",...n)}};Logger$1.debug=!1;const logger$3=new Logger$1;var DESCRIPTORS$4$a=descriptors$a,fails$9$5=fails$h$2,has$2$a=has$c$2,defineProperty$3$4=Object.defineProperty,cache$2={},thrower$2=function(e){throw e},arrayMethodUsesToLength$2$2=function(e,n){if(has$2$a(cache$2,e))return cache$2[e];n||(n={});var o=[][e],a=has$2$a(n,"ACCESSORS")?n.ACCESSORS:!1,c=has$2$a(n,0)?n[0]:thrower$2,l=has$2$a(n,1)?n[1]:void 0;return cache$2[e]=!!o&&!fails$9$5(function(){if(a&&!DESCRIPTORS$4$a)return!0;var u={length:-1};a?defineProperty$3$4(u,1,{enumerable:!0,get:thrower$2}):u[1]=1,o.call(u,c,l)})},$$7$3=_export$a,$includes$2=arrayIncludes$a.includes,addToUnscopables$8=addToUnscopables$2$3,arrayMethodUsesToLength$1$2=arrayMethodUsesToLength$2$2,USES_TO_LENGTH$1$2=arrayMethodUsesToLength$1$2("indexOf",{ACCESSORS:!0,1:0});$$7$3({target:"Array",proto:!0,forced:!USES_TO_LENGTH$1$2},{includes:function e(n){return $includes$2(this,n,arguments.length>1?arguments[1]:void 0)}});addToUnscopables$8("includes");var DESCRIPTORS$3$a=descriptors$a,fails$8$7=fails$h$2,objectKeys$c=objectKeys$2$6,getOwnPropertySymbolsModule$b=objectGetOwnPropertySymbols$a,propertyIsEnumerableModule$b=objectPropertyIsEnumerable$a,toObject$5$3=toObject$7$2,IndexedObject$2$4=indexedObject$a,nativeAssign$9=Object.assign,defineProperty$2$4=Object.defineProperty,objectAssign$9=!nativeAssign$9||fails$8$7(function(){if(DESCRIPTORS$3$a&&nativeAssign$9({b:1},nativeAssign$9(defineProperty$2$4({},"a",{enumerable:!0,get:function(){defineProperty$2$4(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},n={},o=Symbol(),a="abcdefghijklmnopqrst";return e[o]=7,a.split("").forEach(function(c){n[c]=c}),nativeAssign$9({},e)[o]!=7||objectKeys$c(nativeAssign$9({},n)).join("")!=a})?function e(n,o){for(var a=toObject$5$3(n),c=arguments.length,l=1,u=getOwnPropertySymbolsModule$b.f,d=propertyIsEnumerableModule$b.f;c>l;)for(var h=IndexedObject$2$4(arguments[l++]),y=u?objectKeys$c(h).concat(u(h)):objectKeys$c(h),p=y.length,v=0,b;p>v;)b=y[v++],(!DESCRIPTORS$3$a||d.call(h,b))&&(a[b]=h[b]);return a}:nativeAssign$9,$$6$4=_export$a,assign2$9=objectAssign$9;$$6$4({target:"Object",stat:!0,forced:Object.assign!==assign2$9},{assign:assign2$9});var isObject$4$a=isObject$c$2,classof$3$6=classofRaw$1$6,wellKnownSymbol$3$7=wellKnownSymbol$h$2,MATCH$1$3=wellKnownSymbol$3$7("match"),isRegexp$3=function(e){var n;return isObject$4$a(e)&&((n=e[MATCH$1$3])!==void 0?!!n:classof$3$6(e)=="RegExp")},isRegExp$3=isRegexp$3,notARegexp$3=function(e){if(isRegExp$3(e))throw TypeError("The method doesn't accept regular expressions");return e},wellKnownSymbol$2$7=wellKnownSymbol$h$2,MATCH$4=wellKnownSymbol$2$7("match"),correctIsRegexpLogic$3=function(e){var n=/./;try{"/./"[e](n)}catch{try{return n[MATCH$4]=!1,"/./"[e](n)}catch{}}return!1},$$5$4=_export$a,notARegExp$3=notARegexp$3,requireObjectCoercible$1$a=requireObjectCoercible$4$4,correctIsRegExpLogic$3=correctIsRegexpLogic$3;$$5$4({target:"String",proto:!0,forced:!correctIsRegExpLogic$3("includes")},{includes:function e(n){return!!~String(requireObjectCoercible$1$a(this)).indexOf(notARegExp$3(n),arguments.length>1?arguments[1]:void 0)}});var whitespaces$2$2=`
\v\f\r \u2028\u2029\uFEFF`,requireObjectCoercible$c=requireObjectCoercible$4$4,whitespaces$1$2=whitespaces$2$2,whitespace$2="["+whitespaces$1$2+"]",ltrim$2=RegExp("^"+whitespace$2+whitespace$2+"*"),rtrim$2=RegExp(whitespace$2+whitespace$2+"*$"),createMethod$2$2=function(e){return function(n){var o=String(requireObjectCoercible$c(n));return e&1&&(o=o.replace(ltrim$2,"")),e&2&&(o=o.replace(rtrim$2,"")),o}},stringTrim$2={trim:createMethod$2$2(3)},fails$7$7=fails$h$2,whitespaces$4=whitespaces$2$2,non$1="
",stringTrimForced$1=function(e){return fails$7$7(function(){return!!whitespaces$4[e]()||non$1[e]()!=non$1||whitespaces$4[e].name!==e})},$$4$4=_export$a,$trim$1=stringTrim$2.trim,forcedStringTrimMethod$1=stringTrimForced$1;$$4$4({target:"String",proto:!0,forced:forcedStringTrimMethod$1("trim")},{trim:function e(){return $trim$1(this)}});class EventEmitter{constructor(){this.emitter=new eventsExports.EventEmitter}on(n,o){return this.emitter.on(n,o),{remove:()=>this.emitter.off(n,o)}}off(n,o){this.emitter.off(n,o)}emit(n,o){this.emitter.emit(n,o)}}const PACKAGE_NAME="near-wallet-selector",RECENTLY_SIGNED_IN_WALLETS="recentlySignedInWallets",REMEMBER_RECENT_WALLETS="rememberRecentWallets",REMEMBER_RECENT_WALLETS_STATE={ENABLED:"enabled",DISABLED:"disabled"},CONTRACT="contract",PENDING_CONTRACT="contract:pending",SELECTED_WALLET_ID="selectedWalletId",PENDING_SELECTED_WALLET_ID="selectedWalletId:pending";class WalletModules{constructor({factories:n,storage:o,options:a,store:c,emitter:l,provider:u}){this.factories=n,this.storage=o,this.options=a,this.store=c,this.emitter=l,this.provider=u,this.modules=[],this.instances={}}validateWallet(n){return __awaiter$L(this,void 0,void 0,function*(){let o=[];const a=yield this.getWallet(n);return a&&(o=yield a.getAccounts().catch(c=>(logger$3.log(`Failed to validate ${a.id} during setup`),logger$3.error(c),[]))),o})}resolveStorageState(){return __awaiter$L(this,void 0,void 0,function*(){const n=new JsonStorage(this.storage,PACKAGE_NAME),o=yield n.getItem(PENDING_SELECTED_WALLET_ID),a=yield n.getItem(PENDING_CONTRACT),c=yield n.getItem(REMEMBER_RECENT_WALLETS);if(o&&a){const y=yield this.validateWallet(o);if(yield n.removeItem(PENDING_SELECTED_WALLET_ID),yield n.removeItem(PENDING_CONTRACT),y.length){const{selectedWalletId:p}=this.store.getState(),v=yield this.getWallet(p);v&&o!==p&&(yield v.signOut().catch(_=>{logger$3.log("Failed to sign out existing wallet"),logger$3.error(_)}));let b=[];return c===REMEMBER_RECENT_WALLETS_STATE.ENABLED&&(b=yield this.setWalletAsRecentlySignedIn(o)),{accounts:y,contract:a,selectedWalletId:o,recentlySignedInWallets:b,rememberRecentWallets:c||REMEMBER_RECENT_WALLETS_STATE.ENABLED}}}const{contract:l,selectedWalletId:u}=this.store.getState(),d=yield this.validateWallet(u),h=yield n.getItem(RECENTLY_SIGNED_IN_WALLETS);return d.length?{accounts:d,contract:l,selectedWalletId:u,recentlySignedInWallets:h||[],rememberRecentWallets:c||REMEMBER_RECENT_WALLETS_STATE.ENABLED}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:h||[],rememberRecentWallets:c||REMEMBER_RECENT_WALLETS_STATE.ENABLED}})}setWalletAsRecentlySignedIn(n){return __awaiter$L(this,void 0,void 0,function*(){const o=new JsonStorage(this.storage,PACKAGE_NAME);let a=yield o.getItem(RECENTLY_SIGNED_IN_WALLETS);return a||(a=[]),a.includes(n)||(a.unshift(n),a=a.slice(0,5),yield o.setItem(RECENTLY_SIGNED_IN_WALLETS,a)),a})}signOutWallet(n){return __awaiter$L(this,void 0,void 0,function*(){const o=yield this.getWallet(n);yield o.signOut().catch(a=>{logger$3.log(`Failed to sign out ${o.id}`),logger$3.error(a),this.onWalletSignedOut(o.id)})})}onWalletSignedIn(n,{accounts:o,contractId:a,methodNames:c}){return __awaiter$L(this,void 0,void 0,function*(){const{selectedWalletId:l,rememberRecentWallets:u}=this.store.getState(),d=new JsonStorage(this.storage,PACKAGE_NAME),h={contractId:a,methodNames:c};if(!o.length){this.getModule(n).type==="browser"&&(yield d.setItem(PENDING_SELECTED_WALLET_ID,n),yield d.setItem(PENDING_CONTRACT,h));return}l&&l!==n&&(yield this.signOutWallet(l));let y=[];u===REMEMBER_RECENT_WALLETS_STATE.ENABLED&&(y=yield this.setWalletAsRecentlySignedIn(n)),this.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:n,contract:h,accounts:o,recentlySignedInWallets:y,rememberRecentWallets:u}}),this.emitter.emit("signedIn",{walletId:n,contractId:a,methodNames:c,accounts:o})})}onWalletSignedOut(n){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:n}}),this.emitter.emit("signedOut",{walletId:n})}setupWalletEmitter(n){const o=new EventEmitter;return o.on("signedOut",()=>{this.onWalletSignedOut(n.id)}),o.on("signedIn",a=>{this.onWalletSignedIn(n.id,a)}),o.on("accountsChanged",({accounts:a})=>__awaiter$L(this,void 0,void 0,function*(){if(this.emitter.emit("accountsChanged",{walletId:n.id,accounts:a}),!a.length)return this.signOutWallet(n.id);this.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:n.id,accounts:a}})})),o.on("networkChanged",({networkId:a})=>{this.emitter.emit("networkChanged",{walletId:n.id,networkId:a})}),o.on("uriChanged",({uri:a})=>{this.emitter.emit("uriChanged",{walletId:n.id,uri:a})}),o}validateSignMessageParams({message:n,nonce:o,recipient:a}){if(!n||n.trim()==="")throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(o)||o.length!==32)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!a||a.trim()==="")throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(n){const o=n.signIn,a=n.signOut,c=n.signMessage;return n.signIn=l=>__awaiter$L(this,void 0,void 0,function*(){const u=yield o(l),{contractId:d,methodNames:h=[]}=l;return yield this.onWalletSignedIn(n.id,{accounts:u,contractId:d,methodNames:h}),u}),n.signOut=()=>__awaiter$L(this,void 0,void 0,function*(){yield a(),this.onWalletSignedOut(n.id)}),n.signMessage=l=>__awaiter$L(this,void 0,void 0,function*(){if(c===void 0)throw Error(`The signMessage method is not supported by ${n.metadata.name}`);return this.validateSignMessageParams(l),yield c(l)}),n}setupInstance(n){return __awaiter$L(this,void 0,void 0,function*(){if(!n.metadata.available){const a=n.type==="injected"?"not installed":"not available";throw Error(`${n.metadata.name} is ${a}`)}const o=Object.assign({id:n.id,type:n.type,metadata:n.metadata},yield n.init({id:n.id,type:n.type,metadata:n.metadata,options:this.options,store:this.store.toReadOnly(),provider:this.provider,emitter:this.setupWalletEmitter(n),logger:new Logger$1(n.id),storage:new JsonStorage(this.storage,[PACKAGE_NAME,n.id])}));return this.decorateWallet(o)})}getModule(n){return this.modules.find(o=>o.id===n)}getWallet(n){return __awaiter$L(this,void 0,void 0,function*(){const o=this.getModule(n);if(!o)return null;const{selectedWalletId:a}=this.store.getState();return!o.metadata.available&&a?(this.onWalletSignedOut(a),null):yield o.wallet()})}setup(){return __awaiter$L(this,void 0,void 0,function*(){const n=[];for(let d=0;d<this.factories.length;d+=1){const h=yield this.factories[d]({options:this.options}).catch(y=>(logger$3.log("Failed to setup module"),logger$3.error(y),null));h&&(n.some(y=>y.id===h.id)||n.push({id:h.id,type:h.type,metadata:h.metadata,wallet:()=>__awaiter$L(this,void 0,void 0,function*(){let y=this.instances[h.id];return y||(y=yield this.setupInstance(h),this.instances[h.id]=y,y)})}))}this.modules=n;const{accounts:o,contract:a,selectedWalletId:c,recentlySignedInWallets:l,rememberRecentWallets:u}=yield this.resolveStorageState();this.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:n,accounts:o,contract:a,selectedWalletId:c,recentlySignedInWallets:l,rememberRecentWallets:u}});for(let d=0;d<this.modules.length;d++){if(this.modules[d].type!=="instant-link")continue;const h=yield this.modules[d].wallet();if(h.metadata.runOnStartup)try{yield h.signIn({contractId:h.getContractId()})}catch(y){logger$3.error("Failed to sign in to wallet. "+y)}}})}}const getNetworkPreset$1=(e,n)=>{switch(e){case"mainnet":return{networkId:e,nodeUrl:(n==null?void 0:n[0])||"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.fastnear.com/v0"};case"testnet":return{networkId:e,nodeUrl:(n==null?void 0:n[0])||"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://test.api.fastnear.com/v0"};default:throw Error(`Failed to find config for: '${e}'`)}},resolveNetwork=e=>typeof e=="string"?getNetworkPreset$1(e):e,resolveOptions=e=>({options:{languageCode:e.languageCode||void 0,network:resolveNetwork(e.network),debug:e.debug||!1,optimizeWalletOrder:e.optimizeWalletOrder!==!1,randomizeWalletOrder:e.randomizeWalletOrder||!1,relayerUrl:e.relayerUrl||void 0},storage:e.storage||new WebStorageService}),reducer=(e,n)=>{switch(logger$3.log("Store Action",n),n.type){case"SETUP_WALLET_MODULES":{const{modules:o,accounts:a,contract:c,selectedWalletId:l,recentlySignedInWallets:u,rememberRecentWallets:d}=n.payload,h=a.map((y,p)=>Object.assign(Object.assign({},y),{active:p===0}));return Object.assign(Object.assign({},e),{modules:o,accounts:h,contract:c,selectedWalletId:l,recentlySignedInWallets:u,rememberRecentWallets:d})}case"WALLET_CONNECTED":{const{walletId:o,contract:a,accounts:c,recentlySignedInWallets:l}=n.payload;if(!c.length)return e;const u=e.accounts.findIndex(h=>h.active),d=c.map((h,y)=>Object.assign(Object.assign({},h),{active:y===(u>-1?u:0)}));return Object.assign(Object.assign({},e),{contract:a,accounts:d,selectedWalletId:o,recentlySignedInWallets:l})}case"WALLET_DISCONNECTED":{const{walletId:o}=n.payload;return o!==e.selectedWalletId?e:Object.assign(Object.assign({},e),{contract:null,accounts:[],selectedWalletId:null})}case"ACCOUNTS_CHANGED":{const{walletId:o,accounts:a}=n.payload;if(o!==e.selectedWalletId)return e;const c=e.accounts.find(d=>d.active),l=!a.some(d=>d.accountId===(c==null?void 0:c.accountId)),u=a.map((d,h)=>Object.assign(Object.assign({},d),{active:l?h===0:d.accountId===(c==null?void 0:c.accountId)}));return Object.assign(Object.assign({},e),{accounts:u})}case"SET_ACTIVE_ACCOUNT":{const{accountId:o}=n.payload,a=e.accounts.map(c=>Object.assign(Object.assign({},c),{active:c.accountId===o}));return Object.assign(Object.assign({},e),{accounts:a})}case"SET_REMEMBER_RECENT_WALLETS":{const{selectedWalletId:o,recentlySignedInWallets:a}=e,{rememberRecentWallets:c}=n.payload,l=c===REMEMBER_RECENT_WALLETS_STATE.ENABLED?REMEMBER_RECENT_WALLETS_STATE.DISABLED:REMEMBER_RECENT_WALLETS_STATE.ENABLED,u=[...a];o&&!a.includes(o)&&u.push(o);const d=l===REMEMBER_RECENT_WALLETS_STATE.ENABLED?u:[];return Object.assign(Object.assign({},e),{rememberRecentWallets:l,recentlySignedInWallets:d})}default:return e}},createStore=e=>__awaiter$L(void 0,void 0,void 0,function*(){const n=new JsonStorage(e,PACKAGE_NAME),o={modules:[],accounts:[],contract:yield n.getItem(CONTRACT),selectedWalletId:yield n.getItem(SELECTED_WALLET_ID),recentlySignedInWallets:(yield n.getItem(RECENTLY_SIGNED_IN_WALLETS))||[],rememberRecentWallets:(yield n.getItem(REMEMBER_RECENT_WALLETS))||""},a=new BehaviorSubject(o),c=new Subject;c.pipe(scan(reducer,o)).subscribe(a);const l=(d,h,y,p)=>__awaiter$L(void 0,void 0,void 0,function*(){if(h[p]!==d[p]){if(h[p]){yield n.setItem(y,h[p]);return}yield n.removeItem(y)}});let u=a.getValue();return a.subscribe(d=>{l(u,d,SELECTED_WALLET_ID,"selectedWalletId"),l(u,d,CONTRACT,"contract"),l(u,d,RECENTLY_SIGNED_IN_WALLETS,"recentlySignedInWallets"),l(u,d,REMEMBER_RECENT_WALLETS,"rememberRecentWallets"),u=d}),{observable:a,getState:()=>a.getValue(),dispatch:d=>c.next(d),toReadOnly:()=>({getState:()=>a.getValue(),observable:a.asObservable()})}});let walletSelectorInstance=null;const createSelector=(e,n,o,a)=>({options:e,store:n.toReadOnly(),wallet:c=>__awaiter$L(void 0,void 0,void 0,function*(){const{selectedWalletId:l}=n.getState(),u=yield o.getWallet(c||l);if(!u)throw c?new Error("Invalid wallet id"):new Error("No wallet selected");return u}),setActiveAccount:c=>{const{accounts:l}=n.getState();if(!l.some(u=>u.accountId===c))throw new Error("Invalid account id");n.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:c}})},setRememberRecentWallets:()=>{const{rememberRecentWallets:c}=n.getState();n.dispatch({type:"SET_REMEMBER_RECENT_WALLETS",payload:{rememberRecentWallets:c}})},isSignedIn(){const{accounts:c}=n.getState();return!!c.length},on:(c,l)=>a.on(c,l),off:(c,l)=>{a.off(c,l)},subscribeOnAccountChange(c){this.store.observable.subscribe(l=>__awaiter$L(this,void 0,void 0,function*(){var u;const d=(u=l==null?void 0:l.accounts.find(h=>h.active))===null||u===void 0?void 0:u.accountId;c(d||"")}))}}),setupWalletSelector=e=>__awaiter$L(void 0,void 0,void 0,function*(){const{options:n,storage:o}=resolveOptions(e);Logger$1.debug=n.debug;const a=new EventEmitter,c=yield createStore(o),l=yield getNetworkPreset$1(n.network.networkId,e.fallbackRpcUrls),u=e.fallbackRpcUrls&&e.fallbackRpcUrls.length>0?e.fallbackRpcUrls:[l.nodeUrl],d=new WalletModules({factories:e.modules,storage:o,options:n,store:c,emitter:a,provider:new Provider$1(u)});return yield d.setup(),e.allowMultipleSelectors?createSelector(n,c,d,a):(walletSelectorInstance||(walletSelectorInstance=createSelector(n,c,d,a)),walletSelectorInstance)});var aFunction$d=aFunction$5$5,toObject$4$5=toObject$7$2,IndexedObject$1$9=indexedObject$a,toLength$8$3=toLength$b$2,createMethod$1$6=function(e){return function(n,o,a,c){aFunction$d(o);var l=toObject$4$5(n),u=IndexedObject$1$9(l),d=toLength$8$3(l.length),h=e?d-1:0,y=e?-1:1;if(a<2)for(;;){if(h in u){c=u[h],h+=y;break}if(h+=y,e?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:d>h;h+=y)h in u&&(c=o(c,u[h],h,l));return c}},arrayReduce$2={left:createMethod$1$6(!1)},fails$6$a=fails$h$2,arrayMethodIsStrict$1$2=function(e,n){var o=[][e];return!!o&&fails$6$a(function(){o.call(null,n||function(){throw 1},1)})},$$3$6=_export$a,$reduce$2=arrayReduce$2.left,arrayMethodIsStrict$4=arrayMethodIsStrict$1$2,arrayMethodUsesToLength$4=arrayMethodUsesToLength$2$2,STRICT_METHOD$3=arrayMethodIsStrict$4("reduce"),USES_TO_LENGTH$3=arrayMethodUsesToLength$4("reduce",{1:0});$$3$6({target:"Array",proto:!0,forced:!STRICT_METHOD$3||!USES_TO_LENGTH$3},{reduce:function e(n){return $reduce$2(this,n,arguments.length,arguments.length>1?arguments[1]:void 0)}});var anObject$1$a=anObject$b$5,regexpFlags$1$3=function(){var e=anObject$1$a(this),n="";return e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.sticky&&(n+="y"),n},regexpStickyHelpers$2={},fails$5$a=fails$h$2;function RE$2(e,n){return RegExp(e,n)}regexpStickyHelpers$2.UNSUPPORTED_Y=fails$5$a(function(){var e=RE$2("a","y");return e.lastIndex=2,e.exec("abcd")!=null});regexpStickyHelpers$2.BROKEN_CARET=fails$5$a(function(){var e=RE$2("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var regexpFlags$a=regexpFlags$1$3,stickyHelpers$2=regexpStickyHelpers$2,nativeExec$2=RegExp.prototype.exec,nativeReplace$2=String.prototype.replace,patchedExec$2=nativeExec$2,UPDATES_LAST_INDEX_WRONG$2=function(){var e=/a/,n=/b*/g;return nativeExec$2.call(e,"a"),nativeExec$2.call(n,"a"),e.lastIndex!==0||n.lastIndex!==0}(),UNSUPPORTED_Y$2=stickyHelpers$2.UNSUPPORTED_Y||stickyHelpers$2.BROKEN_CARET,NPCG_INCLUDED$2=/()??/.exec("")[1]!==void 0,PATCH$2=UPDATES_LAST_INDEX_WRONG$2||NPCG_INCLUDED$2||UNSUPPORTED_Y$2;PATCH$2&&(patchedExec$2=function(n){var o=this,a,c,l,u,d=UNSUPPORTED_Y$2&&o.sticky,h=regexpFlags$a.call(o),y=o.source,p=0,v=n;return d&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),v=String(n).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&n[o.lastIndex-1]!==`
`)&&(y="(?: "+y+")",v=" "+v,p++),c=new RegExp("^(?:"+y+")",h)),NPCG_INCLUDED$2&&(c=new RegExp("^"+y+"$(?!\\s)",h)),UPDATES_LAST_INDEX_WRONG$2&&(a=o.lastIndex),l=nativeExec$2.call(d?c:o,v),d?l?(l.input=l.input.slice(p),l[0]=l[0].slice(p),l.index=o.lastIndex,o.lastIndex+=l[0].length):o.lastIndex=0:UPDATES_LAST_INDEX_WRONG$2&&l&&(o.lastIndex=o.global?l.index+l[0].length:a),NPCG_INCLUDED$2&&l&&l.length>1&&nativeReplace$2.call(l[0],c,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l});var regexpExec$4=patchedExec$2,$$2$6=_export$a,exec$2=regexpExec$4;$$2$6({target:"RegExp",proto:!0,forced:/./.exec!==exec$2},{exec:exec$2});var arrayBufferNative$3=typeof ArrayBuffer<"u"&&typeof DataView<"u",toInteger$2$a=toInteger$5$3,toLength$7$3=toLength$b$2,toIndex$2$3=function(e){if(e===void 0)return 0;var n=toInteger$2$a(e),o=toLength$7$3(n);if(n!==o)throw RangeError("Wrong length or index");return o},Infinity$4=1/0,abs$3=Math.abs,pow$4=Math.pow,floor$b=Math.floor,log$4=Math.log,LN2$3=Math.LN2,pack$3=function(e,n,o){var a=new Array(o),c=o*8-n-1,l=(1<<c)-1,u=l>>1,d=n===23?pow$4(2,-24)-pow$4(2,-77):0,h=e<0||e===0&&1/e<0?1:0,y=0,p,v,b;for(e=abs$3(e),e!=e||e===Infinity$4?(v=e!=e?1:0,p=l):(p=floor$b(log$4(e)/LN2$3),e*(b=pow$4(2,-p))<1&&(p--,b*=2),p+u>=1?e+=d/b:e+=d*pow$4(2,1-u),e*b>=2&&(p++,b/=2),p+u>=l?(v=0,p=l):p+u>=1?(v=(e*b-1)*pow$4(2,n),p=p+u):(v=e*pow$4(2,u-1)*pow$4(2,n),p=0));n>=8;a[y++]=v&255,v/=256,n-=8);for(p=p<<n|v,c+=n;c>0;a[y++]=p&255,p/=256,c-=8);return a[--y]|=h*128,a},unpack$3=function(e,n){var o=e.length,a=o*8-n-1,c=(1<<a)-1,l=c>>1,u=a-7,d=o-1,h=e[d--],y=h&127,p;for(h>>=7;u>0;y=y*256+e[d],d--,u-=8);for(p=y&(1<<-u)-1,y>>=-u,u+=n;u>0;p=p*256+e[d],d--,u-=8);if(y===0)y=1-l;else{if(y===c)return p?NaN:h?-1/0:Infinity$4;p=p+pow$4(2,n),y=y-l}return(h?-1:1)*p*pow$4(2,y-n)},ieee754$3={pack:pack$3,unpack:unpack$3},toObject$3$5=toObject$7$2,toAbsoluteIndex$1$a=toAbsoluteIndex$3$3,toLength$6$3=toLength$b$2,arrayFill$1$3=function e(n){for(var o=toObject$3$5(this),a=toLength$6$3(o.length),c=arguments.length,l=toAbsoluteIndex$1$a(c>1?arguments[1]:void 0,a),u=c>2?arguments[2]:void 0,d=u===void 0?a:toAbsoluteIndex$1$a(u,a);d>l;)o[l++]=n;return o},global$5$a=global$n$1,DESCRIPTORS$2$a=descriptors$a,NATIVE_ARRAY_BUFFER$1$3=arrayBufferNative$3,createNonEnumerableProperty$2$a=createNonEnumerableProperty$a$2,redefineAll$7=redefineAll$2$3,fails$4$a=fails$h$2,anInstance$1$6=anInstance$3$3,toInteger$1$a=toInteger$5$3,toLength$5$3=toLength$b$2,toIndex$1$3=toIndex$2$3,IEEE754$3=ieee754$3,getPrototypeOf$1$7=objectGetPrototypeOf$7,setPrototypeOf$3$3=objectSetPrototypeOf$7,getOwnPropertyNames$1$3=objectGetOwnPropertyNames$a.f,defineProperty$1$6=objectDefineProperty$a.f,arrayFill$4=arrayFill$1$3,setToStringTag$b=setToStringTag$4$3,InternalStateModule$1$7=internalState$a,getInternalState$1$7=InternalStateModule$1$7.get,setInternalState$1$6=InternalStateModule$1$7.set,ARRAY_BUFFER$3="ArrayBuffer",DATA_VIEW$3="DataView",PROTOTYPE$8="prototype",WRONG_LENGTH$1$3="Wrong length",WRONG_INDEX$3="Wrong index",NativeArrayBuffer$3=global$5$a[ARRAY_BUFFER$3],$ArrayBuffer$3=NativeArrayBuffer$3,$DataView$3=global$5$a[DATA_VIEW$3],$DataViewPrototype$3=$DataView$3&&$DataView$3[PROTOTYPE$8],ObjectPrototype$1$3=Object.prototype,RangeError$2$3=global$5$a.RangeError,packIEEE754$3=IEEE754$3.pack,unpackIEEE754$3=IEEE754$3.unpack,packInt8$3=function(e){return[e&255]},packInt16$3=function(e){return[e&255,e>>8&255]},packInt32$3=function(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]},unpackInt32$3=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32$3=function(e){return packIEEE754$3(e,23,4)},packFloat64$3=function(e){return packIEEE754$3(e,52,8)},addGetter$1$3=function(e,n){defineProperty$1$6(e[PROTOTYPE$8],n,{get:function(){return getInternalState$1$7(this)[n]}})},get$b=function(e,n,o,a){var c=toIndex$1$3(o),l=getInternalState$1$7(e);if(c+n>l.byteLength)throw RangeError$2$3(WRONG_INDEX$3);var u=getInternalState$1$7(l.buffer).bytes,d=c+l.byteOffset,h=u.slice(d,d+n);return a?h:h.reverse()},set$b=function(e,n,o,a,c,l){var u=toIndex$1$3(o),d=getInternalState$1$7(e);if(u+n>d.byteLength)throw RangeError$2$3(WRONG_INDEX$3);for(var h=getInternalState$1$7(d.buffer).bytes,y=u+d.byteOffset,p=a(+c),v=0;v<n;v++)h[y+v]=p[l?v:n-v-1]};if(!NATIVE_ARRAY_BUFFER$1$3)$ArrayBuffer$3=function(n){anInstance$1$6(this,$ArrayBuffer$3,ARRAY_BUFFER$3);var o=toIndex$1$3(n);setInternalState$1$6(this,{bytes:arrayFill$4.call(new Array(o),0),byteLength:o}),DESCRIPTORS$2$a||(this.byteLength=o)},$DataView$3=function(n,o,a){anInstance$1$6(this,$DataView$3,DATA_VIEW$3),anInstance$1$6(n,$ArrayBuffer$3,DATA_VIEW$3);var c=getInternalState$1$7(n).byteLength,l=toInteger$1$a(o);if(l<0||l>c)throw RangeError$2$3("Wrong offset");if(a=a===void 0?c-l:toLength$5$3(a),l+a>c)throw RangeError$2$3(WRONG_LENGTH$1$3);setInternalState$1$6(this,{buffer:n,byteLength:a,byteOffset:l}),DESCRIPTORS$2$a||(this.buffer=n,this.byteLength=a,this.byteOffset=l)},DESCRIPTORS$2$a&&(addGetter$1$3($ArrayBuffer$3,"byteLength"),addGetter$1$3($DataView$3,"buffer"),addGetter$1$3($DataView$3,"byteLength"),addGetter$1$3($DataView$3,"byteOffset")),redefineAll$7($DataView$3[PROTOTYPE$8],{getInt8:function(n){return get$b(this,1,n)[0]<<24>>24},getUint8:function(n){return get$b(this,1,n)[0]},getInt16:function(n){var o=get$b(this,2,n,arguments.length>1?arguments[1]:void 0);return(o[1]<<8|o[0])<<16>>16},getUint16:function(n){var o=get$b(this,2,n,arguments.length>1?arguments[1]:void 0);return o[1]<<8|o[0]},getInt32:function(n){return unpackInt32$3(get$b(this,4,n,arguments.length>1?arguments[1]:void 0))},getUint32:function(n){return unpackInt32$3(get$b(this,4,n,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(n){return unpackIEEE754$3(get$b(this,4,n,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(n){return unpackIEEE754$3(get$b(this,8,n,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(n,o){set$b(this,1,n,packInt8$3,o)},setUint8:function(n,o){set$b(this,1,n,packInt8$3,o)},setInt16:function(n,o){set$b(this,2,n,packInt16$3,o,arguments.length>2?arguments[2]:void 0)},setUint16:function(n,o){set$b(this,2,n,packInt16$3,o,arguments.length>2?arguments[2]:void 0)},setInt32:function(n,o){set$b(this,4,n,packInt32$3,o,arguments.length>2?arguments[2]:void 0)},setUint32:function(n,o){set$b(this,4,n,packInt32$3,o,arguments.length>2?arguments[2]:void 0)},setFloat32:function(n,o){set$b(this,4,n,packFloat32$3,o,arguments.length>2?arguments[2]:void 0)},setFloat64:function(n,o){set$b(this,8,n,packFloat64$3,o,arguments.length>2?arguments[2]:void 0)}});else{if(!fails$4$a(function(){NativeArrayBuffer$3(1)})||!fails$4$a(function(){new NativeArrayBuffer$3(-1)})||fails$4$a(function(){return new NativeArrayBuffer$3,new NativeArrayBuffer$3(1.5),new NativeArrayBuffer$3(NaN),NativeArrayBuffer$3.name!=ARRAY_BUFFER$3})){$ArrayBuffer$3=function(n){return anInstance$1$6(this,$ArrayBuffer$3),new NativeArrayBuffer$3(toIndex$1$3(n))};for(var ArrayBufferPrototype$3=$ArrayBuffer$3[PROTOTYPE$8]=NativeArrayBuffer$3[PROTOTYPE$8],keys2$6=getOwnPropertyNames$1$3(NativeArrayBuffer$3),j$3=0,key$3;keys2$6.length>j$3;)(key$3=keys2$6[j$3++])in $ArrayBuffer$3||createNonEnumerableProperty$2$a($ArrayBuffer$3,key$3,NativeArrayBuffer$3[key$3]);ArrayBufferPrototype$3.constructor=$ArrayBuffer$3}setPrototypeOf$3$3&&getPrototypeOf$1$7($DataViewPrototype$3)!==ObjectPrototype$1$3&&setPrototypeOf$3$3($DataViewPrototype$3,ObjectPrototype$1$3);var testView$3=new $DataView$3(new $ArrayBuffer$3(2)),nativeSetInt8$3=$DataViewPrototype$3.setInt8;testView$3.setInt8(0,2147483648),testView$3.setInt8(1,2147483649),(testView$3.getInt8(0)||!testView$3.getInt8(1))&&redefineAll$7($DataViewPrototype$3,{setInt8:function(n,o){nativeSetInt8$3.call(this,n,o<<24>>24)},setUint8:function(n,o){nativeSetInt8$3.call(this,n,o<<24>>24)}},{unsafe:!0})}setToStringTag$b($ArrayBuffer$3,ARRAY_BUFFER$3);setToStringTag$b($DataView$3,DATA_VIEW$3);var arrayBuffer$3={ArrayBuffer:$ArrayBuffer$3,DataView:$DataView$3},$$1$7=_export$a,fails$3$a=fails$h$2,ArrayBufferModule$1$3=arrayBuffer$3,anObject$l=anObject$b$5,toAbsoluteIndex$d=toAbsoluteIndex$3$3,toLength$4$4=toLength$b$2,speciesConstructor$7=speciesConstructor$2$2,ArrayBuffer$3$3=ArrayBufferModule$1$3.ArrayBuffer,DataView$2$3=ArrayBufferModule$1$3.DataView,nativeArrayBufferSlice$3=ArrayBuffer$3$3.prototype.slice,INCORRECT_SLICE$3=fails$3$a(function(){return!new ArrayBuffer$3$3(2).slice(1,void 0).byteLength});$$1$7({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE$3},{slice:function e(n,o){if(nativeArrayBufferSlice$3!==void 0&&o===void 0)return nativeArrayBufferSlice$3.call(anObject$l(this),n);for(var a=anObject$l(this).byteLength,c=toAbsoluteIndex$d(n,a),l=toAbsoluteIndex$d(o===void 0?a:o,a),u=new(speciesConstructor$7(this,ArrayBuffer$3$3))(toLength$4$4(l-c)),d=new DataView$2$3(this),h=new DataView$2$3(u),y=0;c<l;)h.setUint8(y++,d.getUint8(c++));return u}});var typedArrayConstructor$3={exports:{}},NATIVE_ARRAY_BUFFER$4=arrayBufferNative$3,DESCRIPTORS$1$a=descriptors$a,global$4$a=global$n$1,isObject$3$a=isObject$c$2,has$1$a=has$c$2,classof$2$6=classof$8$2,createNonEnumerableProperty$1$a=createNonEnumerableProperty$a$2,redefine$f=redefine$5$6.exports,defineProperty2$a=objectDefineProperty$a.f,getPrototypeOf$a=objectGetPrototypeOf$7,setPrototypeOf$2$3=objectSetPrototypeOf$7,wellKnownSymbol$1$7=wellKnownSymbol$h$2,uid$d=uid$3$3,Int8Array$3$3=global$4$a.Int8Array,Int8ArrayPrototype$3=Int8Array$3$3&&Int8Array$3$3.prototype,Uint8ClampedArray$4=global$4$a.Uint8ClampedArray,Uint8ClampedArrayPrototype$3=Uint8ClampedArray$4&&Uint8ClampedArray$4.prototype,TypedArray$1$3=Int8Array$3$3&&getPrototypeOf$a(Int8Array$3$3),TypedArrayPrototype$1$3=Int8ArrayPrototype$3&&getPrototypeOf$a(Int8ArrayPrototype$3),ObjectPrototype$9=Object.prototype,isPrototypeOf$3=ObjectPrototype$9.isPrototypeOf,TO_STRING_TAG$b=wellKnownSymbol$1$7("toStringTag"),TYPED_ARRAY_TAG$1$3=uid$d("TYPED_ARRAY_TAG"),NATIVE_ARRAY_BUFFER_VIEWS$2$3=NATIVE_ARRAY_BUFFER$4&&!!setPrototypeOf$2$3&&classof$2$6(global$4$a.opera)!=="Opera",TYPED_ARRAY_TAG_REQIRED$3=!1,NAME$3,TypedArrayConstructorsList$3={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},isTypedArray$1$3=function(e){return isObject$3$a(e)&&has$1$a(TypedArrayConstructorsList$3,classof$2$6(e))},aTypedArray$4$3=function(e){if(isTypedArray$1$3(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2$3=function(e){if(setPrototypeOf$2$3){if(isPrototypeOf$3.call(TypedArray$1$3,e))return e}else for(var n in TypedArrayConstructorsList$3)if(has$1$a(TypedArrayConstructorsList$3,NAME$3)){var o=global$4$a[n];if(o&&(e===o||isPrototypeOf$3.call(o,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod$4$3=function(e,n,o){if(DESCRIPTORS$1$a){if(o)for(var a in TypedArrayConstructorsList$3){var c=global$4$a[a];c&&has$1$a(c.prototype,e)&&delete c.prototype[e]}(!TypedArrayPrototype$1$3[e]||o)&&redefine$f(TypedArrayPrototype$1$3,e,o?n:NATIVE_ARRAY_BUFFER_VIEWS$2$3&&Int8ArrayPrototype$3[e]||n)}},exportTypedArrayStaticMethod$1$1=function(e,n,o){var a,c;if(DESCRIPTORS$1$a){if(setPrototypeOf$2$3){if(o)for(a in TypedArrayConstructorsList$3)c=global$4$a[a],c&&has$1$a(c,e)&&delete c[e];if(!TypedArray$1$3[e]||o)try{return redefine$f(TypedArray$1$3,e,o?n:NATIVE_ARRAY_BUFFER_VIEWS$2$3&&Int8Array$3$3[e]||n)}catch{}else return}for(a in TypedArrayConstructorsList$3)c=global$4$a[a],c&&(!c[e]||o)&&redefine$f(c,e,n)}};for(NAME$3 in TypedArrayConstructorsList$3)global$4$a[NAME$3]||(NATIVE_ARRAY_BUFFER_VIEWS$2$3=!1);if((!NATIVE_ARRAY_BUFFER_VIEWS$2$3||typeof TypedArray$1$3!="function"||TypedArray$1$3===Function.prototype)&&(TypedArray$1$3=function(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$2$3))for(NAME$3 in TypedArrayConstructorsList$3)global$4$a[NAME$3]&&setPrototypeOf$2$3(global$4$a[NAME$3],TypedArray$1$3);if((!NATIVE_ARRAY_BUFFER_VIEWS$2$3||!TypedArrayPrototype$1$3||TypedArrayPrototype$1$3===ObjectPrototype$9)&&(TypedArrayPrototype$1$3=TypedArray$1$3.prototype,NATIVE_ARRAY_BUFFER_VIEWS$2$3))for(NAME$3 in TypedArrayConstructorsList$3)global$4$a[NAME$3]&&setPrototypeOf$2$3(global$4$a[NAME$3].prototype,TypedArrayPrototype$1$3);NATIVE_ARRAY_BUFFER_VIEWS$2$3&&getPrototypeOf$a(Uint8ClampedArrayPrototype$3)!==TypedArrayPrototype$1$3&&setPrototypeOf$2$3(Uint8ClampedArrayPrototype$3,TypedArrayPrototype$1$3);if(DESCRIPTORS$1$a&&!has$1$a(TypedArrayPrototype$1$3,TO_STRING_TAG$b)){TYPED_ARRAY_TAG_REQIRED$3=!0,defineProperty2$a(TypedArrayPrototype$1$3,TO_STRING_TAG$b,{get:function(){return isObject$3$a(this)?this[TYPED_ARRAY_TAG$1$3]:void 0}});for(NAME$3 in TypedArrayConstructorsList$3)global$4$a[NAME$3]&&createNonEnumerableProperty$1$a(global$4$a[NAME$3],TYPED_ARRAY_TAG$1$3,NAME$3)}var arrayBufferViewCore$3={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$2$3,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED$3&&TYPED_ARRAY_TAG$1$3,aTypedArray:aTypedArray$4$3,aTypedArrayConstructor:aTypedArrayConstructor$2$3,exportTypedArrayMethod:exportTypedArrayMethod$4$3,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod$1$1,isTypedArray:isTypedArray$1$3,TypedArray:TypedArray$1$3,TypedArrayPrototype:TypedArrayPrototype$1$3},global$3$a=global$n$1,fails$2$a=fails$h$2,checkCorrectnessOfIteration$7=checkCorrectnessOfIteration$2$2,NATIVE_ARRAY_BUFFER_VIEWS$1$3=arrayBufferViewCore$3.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$2$3=global$3$a.ArrayBuffer,Int8Array$2$3=global$3$a.Int8Array,typedArrayConstructorsRequireWrappers$3=!NATIVE_ARRAY_BUFFER_VIEWS$1$3||!fails$2$a(function(){Int8Array$2$3(1)})||!fails$2$a(function(){new Int8Array$2$3(-1)})||!checkCorrectnessOfIteration$7(function(e){new Int8Array$2$3,new Int8Array$2$3(null),new Int8Array$2$3(1.5),new Int8Array$2$3(e)},!0)||fails$2$a(function(){return new Int8Array$2$3(new ArrayBuffer$2$3(2),1,void 0).length!==1}),toInteger$f=toInteger$5$3,toPositiveInteger$1$3=function(e){var n=toInteger$f(e);if(n<0)throw RangeError("The argument can't be less than 0");return n},toPositiveInteger$4=toPositiveInteger$1$3,toOffset$2$3=function(e,n){var o=toPositiveInteger$4(e);if(o%n)throw RangeError("Wrong offset");return o},toObject$2$6=toObject$7$2,toLength$3$5=toLength$b$2,getIteratorMethod$9=getIteratorMethod$2$3,isArrayIteratorMethod$7=isArrayIteratorMethod$2$3,bind$1$6=functionBindContext$6,aTypedArrayConstructor$1$3=arrayBufferViewCore$3.aTypedArrayConstructor,typedArrayFrom$2$2=function e(n){var o=toObject$2$6(n),a=arguments.length,c=a>1?arguments[1]:void 0,l=c!==void 0,u=getIteratorMethod$9(o),d,h,y,p,v,b;if(u!=null&&!isArrayIteratorMethod$7(u))for(v=u.call(o),b=v.next,o=[];!(p=b.call(v)).done;)o.push(p.value);for(l&&a>2&&(c=bind$1$6(c,arguments[2],2)),h=toLength$3$5(o.length),y=new(aTypedArrayConstructor$1$3(this))(h),d=0;h>d;d++)y[d]=l?c(o[d],d):o[d];return y},classof$1$7=classofRaw$1$6,isArray$1$3=Array.isArray||function e(n){return classof$1$7(n)=="Array"},isObject$2$a=isObject$c$2,isArray2$3=isArray$1$3,wellKnownSymbol$m=wellKnownSymbol$h$2,SPECIES$8=wellKnownSymbol$m("species"),arraySpeciesCreate$1$3=function(e,n){var o;return isArray2$3(e)&&(o=e.constructor,typeof o=="function"&&(o===Array||isArray2$3(o.prototype))?o=void 0:isObject$2$a(o)&&(o=o[SPECIES$8],o===null&&(o=void 0))),new(o===void 0?Array:o)(n===0?0:n)},bind$9=functionBindContext$6,IndexedObject$c=indexedObject$a,toObject$1$a=toObject$7$2,toLength$2$7=toLength$b$2,arraySpeciesCreate$4=arraySpeciesCreate$1$3,push$3=[].push,createMethod$b=function(e){var n=e==1,o=e==2,a=e==3,c=e==4,l=e==6,u=e==5||l;return function(d,h,y,p){for(var v=toObject$1$a(d),b=IndexedObject$c(v),_=bind$9(h,y,3),T=toLength$2$7(b.length),I=0,U=p||arraySpeciesCreate$4,N=n?U(d,T):o?U(d,0):void 0,D,L;T>I;I++)if((u||I in b)&&(D=b[I],L=_(D,I,v),e)){if(n)N[I]=L;else if(L)switch(e){case 3:return!0;case 5:return D;case 6:return I;case 2:push$3.call(N,D)}else if(c)return!1}return l?-1:a||c?c:N}},arrayIteration$3={forEach:createMethod$b(0)},isObject$1$a=isObject$c$2,setPrototypeOf$1$3=objectSetPrototypeOf$7,inheritIfRequired$1$3=function(e,n,o){var a,c;return setPrototypeOf$1$3&&typeof(a=n.constructor)=="function"&&a!==o&&isObject$1$a(c=a.prototype)&&c!==o.prototype&&setPrototypeOf$1$3(e,c),e},$$d=_export$a,global$2$a=global$n$1,DESCRIPTORS$j=descriptors$a,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$1$2=typedArrayConstructorsRequireWrappers$3,ArrayBufferViewCore$4$3=arrayBufferViewCore$3,ArrayBufferModule$4=arrayBuffer$3,anInstance$8=anInstance$3$3,createPropertyDescriptor$e=createPropertyDescriptor$4$4,createNonEnumerableProperty$k=createNonEnumerableProperty$a$2,toLength$1$a=toLength$b$2,toIndex$5=toIndex$2$3,toOffset$1$3=toOffset$2$3,toPrimitive$d=toPrimitive$3$4,has$k=has$c$2,classof$f=classof$8$2,isObject$j=isObject$c$2,create2$7=objectCreate$7,setPrototypeOf$b=objectSetPrototypeOf$7,getOwnPropertyNames2$3=objectGetOwnPropertyNames$a.f,typedArrayFrom$1$3=typedArrayFrom$2$2,forEach$3=arrayIteration$3.forEach,setSpecies$7=setSpecies$2$2,definePropertyModule$f=objectDefineProperty$a,getOwnPropertyDescriptorModule$b=objectGetOwnPropertyDescriptor$a,InternalStateModule$d=internalState$a,inheritIfRequired$4=inheritIfRequired$1$3,getInternalState$d=InternalStateModule$d.get,setInternalState$a=InternalStateModule$d.set,nativeDefineProperty$b=definePropertyModule$f.f,nativeGetOwnPropertyDescriptor$b=getOwnPropertyDescriptorModule$b.f,round$3=Math.round,RangeError$1$3=global$2$a.RangeError,ArrayBuffer$1$3=ArrayBufferModule$4.ArrayBuffer,DataView$1$3=ArrayBufferModule$4.DataView,NATIVE_ARRAY_BUFFER_VIEWS$5=ArrayBufferViewCore$4$3.NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG$4=ArrayBufferViewCore$4$3.TYPED_ARRAY_TAG,TypedArray$4=ArrayBufferViewCore$4$3.TypedArray,TypedArrayPrototype$4=ArrayBufferViewCore$4$3.TypedArrayPrototype,aTypedArrayConstructor$5=ArrayBufferViewCore$4$3.aTypedArrayConstructor,isTypedArray$4=ArrayBufferViewCore$4$3.isTypedArray,BYTES_PER_ELEMENT$3="BYTES_PER_ELEMENT",WRONG_LENGTH$4="Wrong length",fromList$3=function(e,n){for(var o=0,a=n.length,c=new(aTypedArrayConstructor$5(e))(a);a>o;)c[o]=n[o++];return c},addGetter$4=function(e,n){nativeDefineProperty$b(e,n,{get:function(){return getInternalState$d(this)[n]}})},isArrayBuffer$3=function(e){var n;return e instanceof ArrayBuffer$1$3||(n=classof$f(e))=="ArrayBuffer"||n=="SharedArrayBuffer"},isTypedArrayIndex$3=function(e,n){return isTypedArray$4(e)&&typeof n!="symbol"&&n in e&&String(+n)==String(n)},wrappedGetOwnPropertyDescriptor$3=function e(n,o){return isTypedArrayIndex$3(n,o=toPrimitive$d(o,!0))?createPropertyDescriptor$e(2,n[o]):nativeGetOwnPropertyDescriptor$b(n,o)},wrappedDefineProperty$3=function e(n,o,a){return isTypedArrayIndex$3(n,o=toPrimitive$d(o,!0))&&isObject$j(a)&&has$k(a,"value")&&!has$k(a,"get")&&!has$k(a,"set")&&!a.configurable&&(!has$k(a,"writable")||a.writable)&&(!has$k(a,"enumerable")||a.enumerable)?(n[o]=a.value,n):nativeDefineProperty$b(n,o,a)};DESCRIPTORS$j?(NATIVE_ARRAY_BUFFER_VIEWS$5||(getOwnPropertyDescriptorModule$b.f=wrappedGetOwnPropertyDescriptor$3,definePropertyModule$f.f=wrappedDefineProperty$3,addGetter$4(TypedArrayPrototype$4,"buffer"),addGetter$4(TypedArrayPrototype$4,"byteOffset"),addGetter$4(TypedArrayPrototype$4,"byteLength"),addGetter$4(TypedArrayPrototype$4,"length")),$$d({target:"Object",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS$5},{getOwnPropertyDescriptor:wrappedGetOwnPropertyDescriptor$3,defineProperty:wrappedDefineProperty$3}),typedArrayConstructor$3.exports=function(e,n,o){var a=e.match(/\d+$/)[0]/8,c=e+(o?"Clamped":"")+"Array",l="get"+e,u="set"+e,d=global$2$a[c],h=d,y=h&&h.prototype,p={},v=function(T,I){var U=getInternalState$d(T);return U.view[l](I*a+U.byteOffset,!0)},b=function(T,I,U){var N=getInternalState$d(T);o&&(U=(U=round$3(U))<0?0:U>255?255:U&255),N.view[u](I*a+N.byteOffset,U,!0)},_=function(T,I){nativeDefineProperty$b(T,I,{get:function(){return v(this,I)},set:function(U){return b(this,I,U)},enumerable:!0})};NATIVE_ARRAY_BUFFER_VIEWS$5?TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$1$2&&(h=n(function(T,I,U,N){return anInstance$8(T,h,c),inheritIfRequired$4(function(){return isObject$j(I)?isArrayBuffer$3(I)?N!==void 0?new d(I,toOffset$1$3(U,a),N):U!==void 0?new d(I,toOffset$1$3(U,a)):new d(I):isTypedArray$4(I)?fromList$3(h,I):typedArrayFrom$1$3.call(h,I):new d(toIndex$5(I))}(),T,h)}),setPrototypeOf$b&&setPrototypeOf$b(h,TypedArray$4),forEach$3(getOwnPropertyNames2$3(d),function(T){T in h||createNonEnumerableProperty$k(h,T,d[T])}),h.prototype=y):(h=n(function(T,I,U,N){anInstance$8(T,h,c);var D=0,L=0,B,H,W;if(!isObject$j(I))W=toIndex$5(I),H=W*a,B=new ArrayBuffer$1$3(H);else if(isArrayBuffer$3(I)){B=I,L=toOffset$1$3(U,a);var X=I.byteLength;if(N===void 0){if(X%a||(H=X-L,H<0))throw RangeError$1$3(WRONG_LENGTH$4)}else if(H=toLength$1$a(N)*a,H+L>X)throw RangeError$1$3(WRONG_LENGTH$4);W=H/a}else return isTypedArray$4(I)?fromList$3(h,I):typedArrayFrom$1$3.call(h,I);for(setInternalState$a(T,{buffer:B,byteOffset:L,byteLength:H,length:W,view:new DataView$1$3(B)});D<W;)_(T,D++)}),setPrototypeOf$b&&setPrototypeOf$b(h,TypedArray$4),y=h.prototype=create2$7(TypedArrayPrototype$4)),y.constructor!==h&&createNonEnumerableProperty$k(y,"constructor",h),TYPED_ARRAY_TAG$4&&createNonEnumerableProperty$k(y,TYPED_ARRAY_TAG$4,c),p[c]=h,$$d({global:!0,forced:h!=d,sham:!NATIVE_ARRAY_BUFFER_VIEWS$5},p),BYTES_PER_ELEMENT$3 in h||createNonEnumerableProperty$k(h,BYTES_PER_ELEMENT$3,a),BYTES_PER_ELEMENT$3 in y||createNonEnumerableProperty$k(y,BYTES_PER_ELEMENT$3,a),setSpecies$7(c)}):typedArrayConstructor$3.exports=function(){};var createTypedArrayConstructor$3=typedArrayConstructor$3.exports;createTypedArrayConstructor$3("Uint8",function(e){return function(o,a,c){return e(this,o,a,c)}});var ArrayBufferViewCore$3$3=arrayBufferViewCore$3,$fill$3=arrayFill$1$3,aTypedArray$3$3=ArrayBufferViewCore$3$3.aTypedArray,exportTypedArrayMethod$3$3=ArrayBufferViewCore$3$3.exportTypedArrayMethod;exportTypedArrayMethod$3$3("fill",function e(n){return $fill$3.apply(aTypedArray$3$3(this),arguments)});var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$3=typedArrayConstructorsRequireWrappers$3,exportTypedArrayStaticMethod$2=arrayBufferViewCore$3.exportTypedArrayStaticMethod,typedArrayFrom$4=typedArrayFrom$2$2;exportTypedArrayStaticMethod$2("from",typedArrayFrom$4,TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS$3);var ArrayBufferViewCore$2$3=arrayBufferViewCore$3,toLength$j=toLength$b$2,toOffset$5=toOffset$2$3,toObject$g=toObject$7$2,fails$1$a=fails$h$2,aTypedArray$2$3=ArrayBufferViewCore$2$3.aTypedArray,exportTypedArrayMethod$2$3=ArrayBufferViewCore$2$3.exportTypedArrayMethod,FORCED$1$4=fails$1$a(function(){new Int8Array(1).set({})});exportTypedArrayMethod$2$3("set",function e(n){aTypedArray$2$3(this);var o=toOffset$5(arguments.length>1?arguments[1]:void 0,1),a=this.length,c=toObject$g(n),l=toLength$j(c.length),u=0;if(l+o>a)throw RangeError("Wrong length");for(;u<l;)this[o+u]=c[u++]},FORCED$1$4);var ArrayBufferViewCore$1$3=arrayBufferViewCore$3,aTypedArray$1$3=ArrayBufferViewCore$1$3.aTypedArray,exportTypedArrayMethod$1$3=ArrayBufferViewCore$1$3.exportTypedArrayMethod,$sort$3=[].sort;exportTypedArrayMethod$1$3("sort",function e(n){return $sort$3.call(aTypedArray$1$3(this),n)});var global$1$a=global$n$1,ArrayBufferViewCore$7=arrayBufferViewCore$3,fails$n=fails$h$2,Int8Array$1$3=global$1$a.Int8Array,aTypedArray$7=ArrayBufferViewCore$7.aTypedArray,exportTypedArrayMethod$7=ArrayBufferViewCore$7.exportTypedArrayMethod,$toLocaleString$3=[].toLocaleString,$slice$3=[].slice,TO_LOCALE_STRING_BUG$3=!!Int8Array$1$3&&fails$n(function(){$toLocaleString$3.call(new Int8Array$1$3(1))}),FORCED$8=fails$n(function(){return[1,2].toLocaleString()!=new Int8Array$1$3([1,2]).toLocaleString()})||!fails$n(function(){Int8Array$1$3.prototype.toLocaleString.call([1,2])});exportTypedArrayMethod$7("toLocaleString",function e(){return $toLocaleString$3.apply(TO_LOCALE_STRING_BUG$3?$slice$3.call(aTypedArray$7(this)):aTypedArray$7(this),arguments)},FORCED$8);var modal$b={wallet:{connectYourWallet:"Connect Your Wallet",whatIsAWallet:"What is a Wallet?",secureAndManage:"Secure & Manage Your Digital Assets",safelyStore:"Safely store and transfer your crypto and NFTs.",logInToAny:"Log In to Any NEAR App",noNeedToCreate:"No need to create new accounts or credentials. Connect your wallet and you are good to go!",getAWallet:"Get a Wallet",useAWallet:"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.",connectionFailed:"Connection Failed",connectionSuccessful:"Connection Successful",rememberWallet:"Remember wallets",connected:"Connected",connectingTo:"Connecting to",connectingMessage:{injected:"Confirm the connection in the extension window",browser:"Confirm the connection in the wallet after redirect",hardware:"Confirm the connection in the ledger device",bridge:"Confirm the connection in the wallet"}},ledger:{connectWithLedger:"Connect with Ledger",makeSureYourLedger:"Make sure your Ledger is connected securely, and that the NEAR app is open on your device",continue:"Continue",specifyHDPath:"Specify HD Path",enterYourPreferredHDPath:"Enter your preferred HD path, then scan for any active accounts.",scan:"Scan",retry:"Retry",ledgerIsNotAvailable:"Ledger is not available",accessDeniedToUseLedgerDevice:"Access denied to use Ledger device",noAccountsFound:"No Accounts Found",selectYourAccounts:"Select Your Accounts",connecting1Account:"Connecting 1 Account",cantFindAnyAccount:"Can't find any account associated with this Ledger. Please create a new NEAR account on",orConnectAnAnotherLedger:"or connect an another Ledger.",connecting:"Connecting",ofAccounts:"of Accounts",failedToAutomatically:"Failed to automatically find account id. Provide it manually:",overviewTheListOfAuthorized:"Overview the list of authorized account(s), complete sign in by clicking the button below.",finish:"Finish"},install:{youllNeedToInstall:"You'll need to install",toContinueAfterInstalling:"to continue. After installing",refreshThePage:"refresh the page.",open:"Open"},qr:{copiedToClipboard:"Copied to clipboard",failedToCopy:"Failed to copy to clipboard",scanWithYourMobile:"Scan with Your Mobile Device",copyToClipboard:" Copy to clipboard",preferTheOfficial:"Prefer the official dialogue of",open:"Open"},walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet","instant-link":"Instant Wallet"},exportAccounts:{chooseAWallet:"Choose a Wallet",transferYourAccounts:"Transfer Your Accounts",selectAWallet:"Select a wallet that fits your needs and supports your connected accounts.",selectYourAccounts:"Select Your Accounts",afterDecide:"After you decide on a wallet, you can select which accounts you want to transfer.",disclaimer:"You won’t be able to transfer accounts that have never been funded or used on NEAR.",warning:"does not support account export at this time. Please select another wallet.",walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet"},selectAccounts:{title:"Select Accounts to Transfer",button:"Continue",deselectAll:"Deselect All",selectAll:"Select All",unavailable:"Transfer Unavailable",error:"Account does not exist",warningLedger:"Ledger support required",noBalance:"Account not funded"},getPassphrase:{title:"Copy Temporary Password",desc:"You’ll need to enter this password when you begin exporting your accounts to a different wallet.",button:"Continue",transferButton:"Transfer Accounts",label:"Click to Copy",checkLabel:"I copied or wrote down the password"},complete:{title:"Complete the Transfer",descOne:"You will now be redirected to the wallet you selected to complete the transfer.",descTwo:"Once import part of process is completed from selected wallet, press button to complete the transfer process.",startOverButton:"Start Over",button:"Complete"}}},component$5={clickToCopy:{label:"Copied",tooltip:"Click to copy"}},en={modal:modal$b,component:component$5},modal$a={wallet:{connectYourWallet:"Conecta Tu Billetera",whatIsAWallet:"¿Que es una Billetera?",secureAndManage:"Resguarda y Administrar Tus Activos Digitales",safelyStore:"Almacena de forma segura y transfiere tus cryptos y NFT's",logInToAny:"Inicie sesión en Cualquier Aplicacion NEAR",noNeedToCreate:"No es necesario crear nuevas cuentas o credenciales, ¡Conecta tu billetera y listo!",getAWallet:"Obten una Billetera",useAWallet:"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesión en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contraseñas",connectionFailed:"Conexión Fallida",connectionSuccessful:"Conexión Existosa",rememberWallet:"Recordar las carteras",connected:"Conectado",connectingTo:"Conectando a ",connectingMessage:{injected:"Confirme la conexión en la ventana de extensión",browser:"Confirme la conexión en la billetera después de la redirección",hardware:"Confirme la conexión en el dispositivo de libro mayor",bridge:"Confirmar la conexión en la billetera"}},ledger:{connectWithLedger:"Conectar con Ledger",makeSureYourLedger:"Asegúrese de que su ledger está conectada de forma segura y que la aplicacion NEAR esté abierta en su dispositivo",continue:"Continuar",specifyHDPath:"Especifique la ruta HD",enterYourPreferredHDPath:"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.",scan:"Escanear",retry:"Reintentar",ledgerIsNotAvailable:"El Ledger no está disponible",accessDeniedToUseLedgerDevice:"Acceso denegado para usar el dispositivo ledger",noAccountsFound:"No se encontraron cuentas",selectYourAccounts:"Selecciona tus cuentas",connecting1Account:"Conectando a 1 cuenta",cantFindAnyAccount:"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR",orConnectAnAnotherLedger:"o conecta otro ledger",connecting:"Conectando",ofAccounts:"de Cuentas",failedToAutomatically:"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:",overviewTheListOfAuthorized:"Revise la lista de las cuentas autorizadas,Complete el inicio de sesión haciedo click a countinuacion.",finish:"Finalizar"},install:{youllNeedToInstall:"Tendrás que instalar",toContinueAfterInstalling:"Para continuar, Despues de instalar",refreshThePage:"Recarga la pagina",open:"Abrir"},qr:{copiedToClipboard:"Copiado al Portapapeles",failedToCopy:"Falló la copia al Portapapeles",scanWithYourMobile:"Busca con tu dispositivo movil",copyToClipboard:" Copiar al Portapapeles",preferTheOfficial:"¿Prefires el diálogo oficial de",open:"Abrir"},walletTypes:{hardware:"Cartera de Hardware",browser:"Cartera de Navegador",injected:"Extensión de Cartera",bridge:"Cartera de Puente",mobile:"Cartera Móvil","instant-link":"Cartera Instantánea"},exportAccounts:{afterDecide:"Después de decidirte por una billetera, puedes seleccionar qué cuentas deseas transferir.",chooseAWallet:"Elige una Billetera",complete:{button:"Completar",descOne:"Ahora serás redirigido a la billetera que seleccionaste para completar la transferencia.",descTwo:"Una vez que se haya completado la parte de importación del proceso desde la billetera seleccionada, presiona el botón para finalizar el proceso de transferencia.",startOverButton:"Empezar de Nuevo",title:"Completar la Transferencia"},disclaimer:"No podrás transferir cuentas que nunca hayan sido financiadas o utilizadas en NEAR.",getPassphrase:{button:"Continuar",checkLabel:"Copie o anote la contraseña",desc:"Necesitarás ingresar esta contraseña cuando comiences a exportar tus cuentas a otra billetera.",label:"Haga clic para Copiar",title:"Copiar Contraseña Temporal",transferButton:"Transferir Cuentas"},selectAWallet:"Selecciona una billetera que se ajuste a tus necesidades y que soporte tus cuentas conectadas.",selectAccounts:{button:"Continuar",deselectAll:"Deseleccionar Todo",error:"La cuenta no existe",noBalance:"Cuenta no financiada",selectAll:"Seleccionar Todo",title:"Seleccionar Cuentas para Transferir",unavailable:"Transferencia No Disponible",warningLedger:"Se requiere soporte de Ledger"},selectYourAccounts:"Selecciona Tus Cuentas",transferYourAccounts:"Transfiere Tus Cuentas",walletTypes:{bridge:"Billetera Bridge",browser:"Billetera de Navegador",hardware:"Billetera de Hardware",injected:"Extensión de Billetera",mobile:"Billetera Móvil"},warning:"no admite la exportación de cuentas en este momento. Por favor selecciona otra billetera."}},component$4={clickToCopy:{label:"Copiado",tooltip:"Haga clic para copiar"}},es={modal:modal$a,component:component$4},modal$9={wallet:{connectYourWallet:"连接你的钱包",whatIsAWallet:"什么是钱包?",secureAndManage:"保护和管理你的数字资产",safelyStore:"安全存储和转移你的加密货币和NFT",logInToAny:"登录任何 NEAR 应用",noNeedToCreate:"不需要创建新账户或密码。连接你的钱包,即可开始使用!",getAWallet:"获取新账户",useAWallet:"使用钱包来保护和管理你的 NEAR 资产,无需用户名和密码即可登录任何 NEAR 应用",connectionFailed:"连接失败",connectionSuccessful:"连接成功",rememberWallet:"记住钱包选择",connected:"已连接",connectingTo:"正在连接"},ledger:{connectWithLedger:"连接 Ledger",makeSureYourLedger:"确保你的 Ledger 已经安全连接,并且 NEAR 应用已经在你设备上打开",continue:"继续",specifyHDPath:"指定 HD 路径",enterYourPreferredHDPath:"输入你偏好的 HD 路径,然后为任意活跃账户扫码",scan:"扫码",retry:"重试",ledgerIsNotAvailable:"Ledger 不可用",accessDeniedToUseLedgerDevice:"访问 Ledger 设备被拒绝",noAccountsFound:"没有找到账户",selectYourAccounts:"选择你的账户",connecting1Account:"正在连接1个账户",cantFindAnyAccount:"没有找到任何与这个 Ledger 相关联的账户。请创建新账户于","orConnectAnAnotherLedger.":"或连接另一个 Ledger",connecting:"正在连接",ofAccounts:"个账户",failedToAutomatically:"无法自动找到账户ID,请主动提供:",overviewTheListOfAuthorized:"请查看已授权的账户列表,点击以下按钮完成登录",finish:"完成"},install:{youllNeedToInstall:"你将需要安装",toContinueAfterInstalling:"以继续。安装完",refreshThePage:"请刷新页面",open:"打开"},qr:{copiedToClipboard:"复制到了剪贴板",failedToCopy:"复制到剪贴板失败",scanWithYourMobile:"用你的移动设备扫码",copyToClipboard:" 复制到剪贴板",preferTheOfficial:"希望使用官方对话框于",open:"打开"},walletTypes:{hardware:"硬件钱包",browser:"浏览器钱包",injected:"钱包扩展",bridge:"桥接钱包",mobile:"移动钱包","instant-link":"即时钱包"}},zh={modal:modal$9},modal$8={wallet:{connectYourWallet:"Свържете вашия Портфейл",whatIsAWallet:"Какво е Портфейл?",secureAndManage:"Защитете и управлявайте дигиталните си активи",safelyStore:"Съхранявайте и прехвърляйте безопасно вашите крипто и NFT.",logInToAny:"Използвайте всяко приложение на NEAR",noNeedToCreate:"Няма нужда да създавате нови профили. Свържете портфейла си и сте готови!",getAWallet:"Създайте Портфейл",useAWallet:"Използвайте портфейла, за да защитите и управлявате активите си на NEAR както и да използвате всяко приложение на NEAR без нужда от потребителски имена и пароли.",connectionFailed:"Свързването неуспешно",connectionSuccessful:"Свързването успешно",rememberWallet:"Запази портфейлите",connected:"Свързан",connectingTo:"Свързване към",connectingMessage:{injected:"Потвърдете свързването в прозореца на разширението",browser:"Потвърдете свързването в портфейла след пренасочването",hardware:"Потвърдете свързването в хардуерния портфейл",bridge:"Потвърдете връзката в портфейла"}},ledger:{connectWithLedger:"Свържете се с Ledger",makeSureYourLedger:"Уверете се, че вашият Ledger е свързан и че приложението NEAR е отворено нa него.",continue:"Продължете",specifyHDPath:"Посочете HD път",enterYourPreferredHDPath:"Въведете предпочитания HD път, след което сканирайте за активни акаунти.",scan:"Сканирайте",retry:"Опитайте отново",ledgerIsNotAvailable:"Ledger устройството не е достъпно",accessDeniedToUseLedgerDevice:"Достъпът за използване на Ledger е отказан",noAccountsFound:"Няма намерени профили",selectYourAccounts:"Изберете вашите профили",connecting1Account:"Свързване на 1 профил",cantFindAnyAccount:"Няма намерени профили, съврзани с този Ledger. Моля, създайте нов NEAR профил на",orConnectAnAnotherLedger:"или свържете друг Ledger.",connecting:"Свързване",ofAccounts:"от профили",failedToAutomatically:"Автоматичното намиране на профила не бе успешно. Въведете го ръчно:",overviewTheListOfAuthorized:"Прегледайте списъка с упълномощени профили, завършете влизането, като щракнете върху бутона по-долу..",finish:"Завършете"},install:{youllNeedToInstall:"Ще трябва да инсталирате",toContinueAfterInstalling:"за да продължите. След инсталиране",refreshThePage:"презаредете страницата.",open:"Отворете"},qr:{copiedToClipboard:"Копирано в клипборда",failedToCopy:"Неуспешно копиране в клипборда",scanWithYourMobile:" Сканирайте с мобилното си устройство",copyToClipboard:" Копирайте в клипборда",preferTheOfficial:"Предпочитан език за кореспонденция",open:"Отворете"},walletTypes:{hardware:"Хардуерен портфейл",browser:"Портфейл в браузъра",injected:"Разширение на портфейл",bridge:"Мостов портфейл",mobile:"Мобилен портфейл","instant-link":"Мигновен портфейл"},exportAccounts:{afterDecide:"След като изберете портфейл, можете да изберете кои акаунти искате да прехвърлите.",chooseAWallet:"Изберете Портфейл",complete:{button:"Завърши",descOne:"Сега ще бъдете пренасочени към избрания от вас портфейл, за да завършите прехвърлянето.",descTwo:"След като частта от процеса по импортиране от избрания портфейл бъде завършена, натиснете бутона, за да завършите процеса на прехвърляне.",startOverButton:"Започнете отначало",title:"Завършете Прехвърлянето"},disclaimer:"Няма да можете да прехвърлите акаунти, които никога не са били финансирани или използвани в NEAR.",getPassphrase:{button:"Продължи",checkLabel:"Копирах или написах паролата",desc:"Ще трябва да въведете тази парола, когато започнете да експортирате акаунтите си в различен портфейл.",label:"Щракнете, за да копирате",title:"Копирайте Временната Парола",transferButton:"Прехвърлете Акаунти"},selectAWallet:"Изберете портфейл, който отговаря на нуждите ви и поддържа свързаните ви акаунти.",selectAccounts:{button:"Продължи",deselectAll:"Отметете всички",error:"Акаунтът не съществува",noBalance:"Акаунтът не е финансиран",selectAll:"Отметете всички",title:"Изберете Акаунти за Прехвърляне",unavailable:"Прехвърлянето е недостъпно",warningLedger:"Изисква се поддръжка на Ledger"},selectYourAccounts:"Изберете Вашите Акаунти",transferYourAccounts:"Прехвърлете Вашите Акаунти",walletTypes:{bridge:"Мостов Портфейл",browser:"Портфейл за Браузър",hardware:"Хардуерен Портфейл",injected:"Разширение на Портфейл",mobile:"Мобилен Портфейл"},warning:"не поддържа експортиране на акаунти в момента. Моля, изберете друг портфейл."}},component$3={clickToCopy:{label:"Копирано",tooltip:"Щракнете, за да копирате"}},bg={modal:modal$8,component:component$3},modal$7={wallet:{connectYourWallet:"지갑 연결하기",whatIsAWallet:"지갑은 무슨 역할을 하나요?",secureAndManage:"당신의 디지털 자산을 보호하고 관리합니다.",safelyStore:"암호화폐와 NFT를 안전하게 저장하고 전송할 수 있습니다.",logInToAny:"NEAR App에 로그인합니다.",noNeedToCreate:"새로운 계정이나 비밀번호를 만들 필요 없이 지갑을 연결한 후 바로 사용할 수 있습니다.",getAWallet:"지갑 가져오기",useAWallet:"지갑을 사용하여 NEAR 자산을 보호·관리하고, 아이디와 비밀번호 없이 NEAR 앱에 로그인할 수 있습니다.",connectionFailed:"연결 실패",connectionSuccessful:"연결 성공",rememberWallet:"지갑들 기억하기",connected:"Connected",connectingTo:"연결 중: ",connectingMessage:{injected:"익스텐션 창에서 연결을 확인하세요",browser:"리다이렉트 된 지갑에서 연결을 확인하세요",hardware:"Ledger 기기에서 연결을 확인하세요",bridge:"지갑에서 연결 확인"}},ledger:{connectWithLedger:"Ledger 연결하기",makeSureYourLedger:"Ledger가 안전하게 연결되어 있고, NEAR 앱이 열려 있는 지 확인하세요",continue:"계속하기",specifyHDPath:"HD Path 지정하기",enterYourPreferredHDPath:"원하는 HD Path를 선택하고, 활성화된 계정이 있는 지 검색하세요",scan:"검색",retry:"다시 시도",ledgerIsNotAvailable:"Ledger를 사용할 수 없습니다",accessDeniedToUseLedgerDevice:"Ledger 기기 접근 권한이 거부되었습니다",noAccountsFound:"계정을 찾을 수 없습니다",selectYourAccounts:"계정 선택하기",connecting1Account:"하나의 계정에 연결",cantFindAnyAccount:"Ledger와 연결된 계정을 찾을 수 없습니다. 새로운 계정을 생성하거나 ",orConnectAnAnotherLedger:"다른 Ledger를 연결하세요",connecting:"계정 연결하기: ",ofAccounts:"개 계정을 찾았습니다",failedToAutomatically:"계정 ID를 찾지 못했습니다. 수동으로 입력해주세요.",overviewTheListOfAuthorized:"인증된 계정 목록을 확인한 후 아래 버튼을 클릭하여 로그인을 완료하세요",finish:"완료"},walletTypes:{hardware:"하드웨어 지갑",browser:"브라우저 지갑",injected:"지갑 확장",bridge:"브리지 지갑",mobile:"모바일 지갑","instant-link":"인스턴트 지갑"},install:{youllNeedToInstall:"다음 확장 프로그램을 설치해주세요:",toContinueAfterInstalling:". 설치 완료 후 페이지 새로 고침이 필요합니다. ",refreshThePage:"새로 고침",open:"Open"},qr:{copiedToClipboard:"클립보드에 복사 완료",failedToCopy:"클립보드에 복사 실패",scanWithYourMobile:"모바일 장치를 사용하여 스캔해주세요",copyToClipboard:" 클립보드에 복사하기",preferTheOfficial:"다음 프로그램에서 제공하는 공식 프로세스를 선호하십니까: ",open:"Open"}},ko={modal:modal$7},modal$6={wallet:{connectYourWallet:"Kết nối ví của bạn",whatIsAWallet:"Ví là gì?",secureAndManage:"Bảo mật & Quản lý tài sản số của bạn",safelyStore:"Lưu trữ và chuyển tiền điện tử và NFT của bạn một cách an toàn.",logInToAny:"Đăng nhập vào bất kỳ ứng dụng trên NEAR",noNeedToCreate:"Không cần tạo tài khoản hoặc thông tin đăng nhập mới. Kết nối ví của bạn và bắt đầu!",getAWallet:"Tạo Ví",useAWallet:"Sử dụng ví để bảo mật và quản lý tài sản trên NEAR của bạn và đăng nhập vào bất kỳ ứng dụng NEAR nào, không cần tên người dùng và mật khẩu.",connectionFailed:"Kết nối thất bại",connectionSuccessful:"Kết nối thành công",rememberWallet:"Ghi nhớ lựa chọn ví",connected:"Đã kết nối",connectingTo:"Đang kết nối tới",connectingMessage:{injected:"Xác nhận kết nối trong cửa sổ tiện ích mở rộng",browser:"Xác nhận kết nối trong ví sau khi được chuyển hướng",hardware:"Xác nhận kết nối với ví lạnh",bridge:"Xác nhận kết nối trong ví"}},ledger:{connectWithLedger:"Kết nối ví Ledger",makeSureYourLedger:"Đảm bảo Ledger của bạn được kết nối an toàn và ứng dụng NEAR đang mở sẵn trên thiết bị",continue:"Tiếp tục",specifyHDPath:"Chỉ định HD Path",enterYourPreferredHDPath:"Nhập HD Path của bạn, sau đó quét tìm các tài khoản hoạt động",scan:"Quét",retry:"Thử lại",ledgerIsNotAvailable:"Ledger không khả dụng",accessDeniedToUseLedgerDevice:"Truy cập Ledger bị từ chối",noAccountsFound:"Không tìm thấy tài khoản",selectYourAccounts:"Chọn tài khoản của bạn",connecting1Account:"Đang kết nối 1 tài khoản",cantFindAnyAccount:"Không thể tìm thấy bất kỳ tài khoản nào được liên kết với Ledger này. Vui lòng tạo một tài khoản NEAR mới",orConnectAnAnotherLedger:"hoặc kết nối với ví Ledger khác.",connecting:"Đang kết nối",ofAccounts:"của tài khoản",failedToAutomatically:"Không thể tự động tìm id tài khoản. Nhập thủ công:",overviewTheListOfAuthorized:"Tổng quan danh sách các tài khoản được ủy quyền, hoàn tất đăng nhập bằng cách bấm vào nút bên dưới.",finish:"Hoàn thành"},install:{youllNeedToInstall:"Bạn sẽ cần cài đặt",toContinueAfterInstalling:"để bắt đầu. Sau khi cài đặt xong",refreshThePage:"Tải lại trang.",open:"Mở"},qr:{copiedToClipboard:"Đã sao chép vào bảng ghi tạm",failedToCopy:"Sao chép vào bảng ghi tạm thất bại",scanWithYourMobile:"Quét với điện thoại của bạn",copyToClipboard:" Sao chép vào bảng ghi tạm",preferTheOfficial:"Dialogue chính thức của",open:"Mở"},walletTypes:{hardware:"Ví lạnh",browser:"Ví trình duyệt",injected:"Ví tiện ích mở rộng",bridge:"Ví Cầu",mobile:"Ví Mobile","instant-link":"Ví tức thì"},exportAccounts:{chooseAWallet:"Chọn ví",transferYourAccounts:"Chuyển tài khoản",selectAWallet:"Chọn ví phù hợp với nhu cầu của bạn, ví được chọn cần hỗ trợ các tài khoản đang sử dụng.",selectYourAccounts:"Chọn tài khoản",afterDecide:"Sau khi chọn được tài khoản bạn có chuyển.",disclaimer:"Bạn không thể chuyển tài khoản nếu tài khoản đó chưa được nhận tiền hoặc chưa phát sinh giao dịch trên NEAR.",warning:"không hỗ trợ xuất tài khoản. Vui lòng chọn ví khác.",walletTypes:{hardware:"Ví lạnh",browser:"Ví trình duyệt",injected:"Ví tiện ích mở rộng",bridge:"Ví Cầu",mobile:"Ví Mobile"},selectAccounts:{title:"Chọn tài khoản để chuyển",button:"Lấy cụm mật khẩu",deselectAll:"Bỏ chọn tất cả",selectAll:"Chọn tất cả",unavailable:"Chuyển không khả dụng",error:"Tài khoản không tồn tại",warningLedger:"Yêu cầu hỗ trợ Ledger",noBalance:"Tài khoản trống"},getPassphrase:{title:"Sao chép mật khẩu tạm thời",desc:"Bạn sẽ cần nhập mật khẩu khi bắt đầu xuất các khoản tới ví khác.",button:"Tiếp tục",label:"Bấm để sao chép",checkLabel:"Tôi đã chép hoặc ghi lại mật khẩu"},complete:{title:"Hoàn thành chuyển",descOne:"Bạn sẽ được chuyển hướng tới tài khoản đã chọn để hoàn tất quá trình.",descTwo:"Sau khi nhập, nhấn nút để hoàn tất quy trình chuyển.",button:"Hoàn thành"}}},component$2={clickToCopy:{label:"Đã sao chép",tooltip:"Bấm để sao chép"}},vi={modal:modal$6,component:component$2},modal$5={wallet:{connectYourWallet:"अपना वॉलेट (Wallet) कनेक्ट करें।",whatIsAWallet:"वॉलेट क्या है?",secureAndManage:"सुरक्षित और प्रबंधित करें।",safelyStore:"अपनी क्रिप्टोकरेंसी और एनएफटी को सुरक्षित रूप से स्टोर और ट्रांसफर करें।",logInToAny:"NEAR पर किसी भी ऐप में साइन इन करें।",noNeedToCreate:"नए खाते या लॉगिन बनाने की आवश्यकता नहीं है। अपना वॉलेट(NEAR Wallet)कनेक्ट करें और आरंभ करें।",getAWallet:"एक वॉलेट बनाएँ।",useAWallet:"अपनी NEAR संपत्तियों को सुरक्षित और प्रबंधित करने के लिए वॉलेट का उपयोग करें और किसी भी NEAR ऐप (app) में लॉग इन करें, किसी उपयोगकर्ता (user) नाम और पासवर्ड की आवश्यकता नहीं है।",connectionFailed:"कनेक्शन विफल|",connectionSuccessful:"कनेक्शन सफल|",rememberWallet:"वॉलेटों को याद रखें",connected:"वॉलेट जुड़ गया|",connectingTo:"वॉलेट जुड़ रहा हे|",connectingMessage:{injected:"एक्सटेंशन विंडो में कनेक्शन की पुष्टि करें|",browser:"रीडायरेक्ट होने के बाद वॉलेट में कनेक्शन की पुष्टि करें|",hardware:"कोल्ड वॉलेट के साथ कनेक्शन की पुष्टि करें|",bridge:"वॉलेट में कनेक्शन की पुष्टि करें"}},ledger:{connectWithLedger:"लेजर(Ledger)वॉलेट कनेक्ट करें|",makeSureYourLedger:"सुनिश्चित करें कि आपका लेजर सुरक्षित रूप से जुड़ा हुआ है और NEAR ऐप आपके डिवाइस (Device)पर पहले से ही खुला है|",continue:"जारी रखे|",specifyHDPath:"हार्ड डिस्क(Hard Disk)पथ(Path)निर्धारित करे|",enterYourPreferredHDPath:"अपना एचडी पथ दर्ज करें, फिर सक्रिय खातों के लिए स्कैन करें|",scan:"स्कैन करे|",retry:"दोबारा प्रयास करे|",ledgerIsNotAvailable:"लेजर उपलब्ध नहीं है|",accessDeniedToUseLedgerDevice:"लेजर डिवाइस का उपयोग करने के लिए प्रवेश निषेध|",noAccountsFound:"खाता नहीं मिला|",selectYourAccounts:"अपने खाते चुनें|",connecting1Account:"एक खाता कनेक्ट हो रहा है|",cantFindAnyAccount:"इस लेजर से जुड़ा कोई खाता नहीं मिला। कृपया एक नया NEAR खाता बनाएँ|",orConnectAnAnotherLedger:"अथवा दूसरे लेजर वॉलेट से कनेक्ट करें।",connecting:"जुड़ रहा हे|",ofAccounts:"खाता अब जुड़ा नहीं हे|",failedToAutomatically:"खाता आईडी स्वचालित रूप से खोजने में असमर्थ। मैन्युअल (Manuall) रूप से कोशिश करें|",overviewTheListOfAuthorized:"अवलोकन अधिकृत की सूची, नीचे दिए गए बटन पर क्लिक करके लॉगिन पूरा करें।",finish:"समाप्त|"},install:{youllNeedToInstall:"आपको इंस्टॉल करना होगा|",toContinueAfterInstalling:"इंस्टॉल करने के बाद जारी रखे|",refreshThePage:"पुन: लोड करें।",open:"खोले|"},qr:{copiedToClipboard:"क्लिपबोर्ड(Clipboard)पर कॉपी किया गया|",failedToCopy:"क्लिपबोर्ड पर कॉपी करना विफल रहा|",scanWithYourMobile:"अपने फोन (Mobile)से स्कैन करें|",copyToClipboard:" क्लिपबोर्ड पर कॉपी करें|",preferTheOfficial:"आधिकारिक संवाद को प्राथमिकता दें|",open:"खोले|"},walletTypes:{hardware:"हार्डवेयर वॉलेट",browser:"ब्राउज़र वॉलेट",injected:"वॉलेट एक्सटेंशन",bridge:"ब्रिज वॉलेट",mobile:"मोबाइल वॉलेट","instant-link":"इंस्टेंट वॉलेट"},exportAccounts:{afterDecide:"जब आप एक वॉलेट चुन लेंगे, तब आप चुन सकते हैं कि आप कौन से खाते स्थानांतरित करना चाहते हैं।",chooseAWallet:"एक वॉलेट चुनें",complete:{button:"पूर्ण करें",descOne:"अब आपको स्थानांतरित करने के लिए आपने जो वॉलेट चुना है, उस पर रीडायरेक्ट किया जाएगा।",descTwo:"चुने हुए वॉलेट से आयात प्रक्रिया पूरी होने के बाद, स्थानांतरण प्रक्रिया को पूरा करने के लिए बटन दबाएं।",startOverButton:"फिर से शुरू करें",title:"स्थानांतरण पूरा करें"},disclaimer:"आप उन खातों को स्थानांतरित नहीं कर सकेंगे जो कभी भी NEAR पर फंडेड या उपयोग किए गए नहीं हैं।",getPassphrase:{button:"जारी रखें",checkLabel:"मैंने पासवर्ड को कॉपी या नोट किया है",desc:"जब आप अपने खातों को एक अलग वॉलेट में निर्यात करना शुरू करेंगे, तो आपको इस पासवर्ड को दर्ज करने की आवश्यकता होगी।",label:"कॉपी करने के लिए क्लिक करें",title:"अस्थायी पासवर्ड कॉपी करें",transferButton:"खातों का स्थानांतरण करें"},selectAWallet:"एक वॉलेट चुनें जो आपकी आवश्यकताओं को पूरा करता है और आपके जुड़े खातों का समर्थन करता है।",selectAccounts:{button:"जारी रखें",deselectAll:"सभी अचयनित करें",error:"खाता अस्तित्व में नहीं है",noBalance:"खाता निधि नहीं है",selectAll:"सभी चुनें",title:"स्थानांतरण के लिए खातों का चयन करें",unavailable:"स्थानांतरण अस्वीकृत",warningLedger:"लेजर समर्थन की आवश्यकता है"},selectYourAccounts:"अपने खाते चुनें",transferYourAccounts:"अपने खातों का स्थानांतरण करें",walletTypes:{bridge:"ब्रिज वॉलेट",browser:"ब्राउज़र वॉलेट",hardware:"हार्डवेयर वॉलेट",injected:"वॉलेट एक्सटेंशन",mobile:"मोबाइल वॉलेट"},warning:"वर्तमान में खाते निर्यात का समर्थन नहीं करता है। कृपया एक अन्य वॉलेट चुनें।"}},component$1={clickToCopy:{label:"कॉपी हो गया",tooltip:"कॉपी करने के लिए क्लिक करें"}},hi={modal:modal$5,component:component$1},modal$4={wallet:{connectYourWallet:"صل محفظتك",whatIsAWallet:"ما هي المحفظة؟",secureAndManage:"تأمين وإدارة الممتلكات الرقمية الخاصة بك",safelyStore:"قم بتخزين و ارسال عملاتك و أصولك الرقمية بأمان",logInToAny:"سجل الدخول إلى أي تطبيق يستخدم نير",noNeedToCreate:".لا داعي لإنشاء حساب جديد. فقط قم بتوصيل محفظتك وانطلق",getAWallet:"احصل على محفظة",useAWallet:"استخدم محفظة لتأمين وإدارة أصول نير الخاصة بك، وادخل لأي تطبيق يستخدم نير دون الحاجة إلى اسم المستخدم وكلمةالمرور",connectionFailed:"اتصال فاشل",connectionSuccessful:"اتصال ناجح",rememberWallet:"تذكر المحافظ",connected:"متصل",connectingTo:"جاري الاتصال ب",connectingMessage:{injected:"وافق على الاتصال في نافذة الإضافة",browser:"وافق على الاتصال في المحفظة بعد إعادة توجيه",hardware:"وافق على الاتصال في جهاز ليدجر",bridge:"وافق على الاتصال في المحفظة"}},ledger:{connectWithLedger:"اتصل مع ليدجر",makeSureYourLedger:"تأكد أن ليدجر متصل بأمان, و أن تطبيق نير مفتوح في جهازك",continue:"تابع",specifyHDPath:"حدد مسار الحساب",enterYourPreferredHDPath:"أدخل مسار الحساب المفضل، ثم ابحث عن كل الحسابات النشطة",scan:"مسح",retry:"أعد المحاولة",ledgerIsNotAvailable:"ليدجر غير متوفر",accessDeniedToUseLedgerDevice:"تم رفض الاتصال بليدجر",noAccountsFound:"لم يتم العثور على أي حسابات",selectYourAccounts:"حدد حساباتك",connecting1Account:"جاري الاتصال بحساب واحد",cantFindAnyAccount:"لا يمكن العثور على أي حساب مرتبط بهذا ليدجر الرجاء إنشاء حساب نير جديد على",orConnectAnAnotherLedger:"او اربط جهاز ليدجر آخر",connecting:"جاري الاتصال",ofAccounts:"من الحسابات",failedToAutomatically:"فشل في الاتصال بالحساب تلقائيا. يرجى الاتصال بالحساب يدويا",overviewTheListOfAuthorized:"لائحة الحسابات المصرح بها, أكمل تسجيل الدخول بالنقر على الزر أدناه",finish:"إنهاء"},install:{youllNeedToInstall:"ستحتاج لتثبيت",toContinueAfterInstalling:"للاستكمال. بعد التثبيت",refreshThePage:"قم بتحديث الصفحة",open:"افتح"},qr:{copiedToClipboard:"تم النسخ",failedToCopy:"فشل النسخ",scanWithYourMobile:"امسح بجهازك المحمول",copyToClipboard:"نسخ",preferTheOfficial:"تفضل الحوار الرسمي ل",open:"فتح"},walletTypes:{hardware:"محفظة الأجهزة",browser:"محفظة المتصفح",injected:"ملحق المحفظة",bridge:"محفظة الجسر",mobile:"محفظة الجوال","instant-link":"محفظة الرابط الفوري"},exportAccounts:{afterDecide:"بعد اتخاذ قرار بشأن محفظة، يمكنك اختيار الحسابات التي تريد نقلها.",chooseAWallet:"اختر محفظة",disclaimer:"لن تتمكن من نقل الحسابات التي لم يتم تمويلها أو استخدامها على NEAR.",selectAWallet:"اختر محفظة تناسب احتياجاتك وتدعم حساباتك المتصلة.",selectYourAccounts:"حدد حساباتك",transferYourAccounts:"نقل حساباتك",warning:"لا تدعم تصدير الحسابات في الوقت الحالي. يرجى اختيار محفظة أخرى.",complete:{button:"أكمل",descOne:"سيتم توجيهك الآن إلى المحفظة التي اخترتها لإكمال النقل.",descTwo:"بمجرد إكمال جزء الاستيراد من العملية من المحفظة المحددة، اضغط على الزر لإكمال عملية النقل.",startOverButton:"ابدأ من جديد",title:"أكمل النقل"},getPassphrase:{button:"تابع",checkLabel:"لقد قمت بنسخ أو كتابة كلمة المرور",desc:"ستحتاج إلى إدخال هذه الكلمة السرية عند بدء تصدير حساباتك إلى محفظة مختلفة.",label:"انقر لنسخ",title:"انسخ كلمة المرور المؤقتة",transferButton:"نقل الحسابات"},selectAccounts:{button:"تابع",deselectAll:"إلغاء تحديد الكل",error:"الحساب غير موجود",noBalance:"الحساب غير ممول",selectAll:"تحديد الكل",title:"حدد الحسابات لنقلها",unavailable:"النقل غير متاح",warningLedger:"دعم Ledger مطلوب"},walletTypes:{bridge:"محفظة الجسر",browser:"محفظة المتصفح",hardware:"محفظة الأجهزة",injected:"ملحق المحفظة",mobile:"محفظة الجوال"}}},component={clickToCopy:{label:"تم النسخ",tooltip:"انقر لنسخ"}},ar={modal:modal$4,component},modal$3={wallet:{connectYourWallet:"Spojite crypto novčanik!",whatIsAWallet:"Što je to crypto novčanik?",secureAndManage:"Osigurajte i upravljajte svojom digitalnom imovinom.",safelyStore:"Sigurno pohranite i prebacite svoj crypto i NFT-eve.",logInToAny:" Prijavite se u bilo koju NEAR aplikaciju",noNeedToCreate:"Nema potrebe za stvaranjem novih naloga ili korisničkih podataka. Spojite svoj crypto novčanik i spremni ste!",getAWallet:"Otvorite crypto novčanik",useAWallet:"Koristite crypto novčanik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisničkog imena i lozinke.",connectionFailed:"Neuspješno povezivanje.",connectionSuccessful:"Uspješno povezivanje.",rememberWallet:"Zapamti novčanike",connected:"Povezano.",connectingTo:"Povezivanje u tijeku",connectingMessage:{injected:"Potvrdite vezu u eksternom prozoru",browser:"Nakon redirekcije, potvrdite vezu u novčaniku",hardware:"Potvrdite vezu sa novčanikom",bridge:"Potvrdite vezu u novčaniku"}},ledger:{connectWithLedger:"Povežite se hardverskim novčanikom",makeSureYourLedger:"Osigurajte sigurnu vezu s hardverskim novčanikom, te da je NEAR aplikacija otvorena na vašem uređaju",continue:"Nastavite",specifyHDPath:"Specificirajte HD putanju",enterYourPreferredHDPath:"Upišite preferiranu HD putanju, zatim skenirajte aktivne naloge",scan:"Skenirajte",retry:"Pokušajte ponovno",ledgerIsNotAvailable:"Hardverski novčanik nije dostupan.",accessDeniedToUseLedgerDevice:"Odbijen pristup za korištenjem hardverskog novčanika",noAccountsFound:"Nalozi nisu pronađeni",selectYourAccounts:"Odaberite svoje naloge",connecting1Account:"Povezivanje 1 naloga",cantFindAnyAccount:"Nije moguće pronaći niti jedan nalog povezan s ovim hardverskim novčanikom. Molimo vas, kreirajte novi NEAR nalog",orConnectAnAnotherLedger:"Ili povežite drugi hardverski novčanik.",connecting:"Povezivanje",ofAccounts:"naloga",failedToAutomatically:"Neuspješno automatsko pronalaženje ID naloga. Unesite ručno:",overviewTheListOfAuthorized:"Pregledajte popis odobrenih naloga, završite prijavu pritiskom na niže prikazani gumb.",finish:"Završite"},install:{youllNeedToInstall:" Potrebno je instalirati modal",toContinueAfterInstalling:"za nastavak. Nakon instalacije",refreshThePage:"osvježite stranicu.",open:"Otvorite QR modal"},qr:{copiedToClipboard:"Kopirano u međuspremnik",failedToCopy:"Neupsješno kopiranje u međuspremnik",scanWithYourMobile:"Skenirajte svojim mobilnim uređajem",copyToClipboard:" Kopirajte u međuspremnik",preferTheOfficial:"Odaberite službeni dijalog",open:"Otvorite"},walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet","instant-link":"Instant Wallet"},exportAccounts:{chooseAWallet:"Odaberi Wallet",transferYourAccounts:"Prenesi svoje naloge",selectAWallet:"Odaberite wallet koji odgovara vašim potrebama i podržava vaše povezane naloge.",selectYourAccounts:"Odaberi svoje naloge",afterDecide:"Nakon što odlučite koji wallet koristite, možete odabrati koje račune želite prebaciti.",disclaimer:"Nećete moći prebaciti naloge koji nisu nikada bili korišteni na NEAR-u.",warning:"ne podržava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.",walletTypes:{hardware:"Hardware Wallet",browser:"Browser Wallet",injected:"Wallet Extension",bridge:"Bridge Wallet",mobile:"Mobile Wallet"},selectAccounts:{title:"Odaberi naloge za prijenos",button:"Generiraj lozinku",deselectAll:"Makni odabir sa svih",selectAll:"Odaberi sve",unavailable:"Prijenos nije dostupan",error:"Nalog ne postoji",warningLedger:"Potrebna ledger podrška",noBalance:"Nalog nema sredstava"},getPassphrase:{title:"Kopiraj privremenu lozinku",desc:"Bit će potrebno unijeti ovu lozinku na početku izvoza naloga na drugi wallet.",button:"Nastavi",label:"Klikni za kopiju",checkLabel:"Kopirao sam ili zapisao lozinku"},complete:{title:"Završi prijenos",descOne:"You will now be redirected to the wallet you selected to complete the transfer.",descTwo:"Kada je unos s odabranog walleta završen, pritisnite gumb da biste završili prijenos.",button:"Završi"}}},hr={modal:modal$3},modal$2={wallet:{connectYourWallet:"Поврзете го вашиот новчаник!",whatIsAWallet:"Што е новчаник?",secureAndManage:"Заштитете ги и управувајте со вашите дигитални средства.",safelyStore:"Безбедно складирајте и извршувајте трансакции со вашите крипто и NFT.",logInToAny:"Најавете се на која било NEAR апликација",noNeedToCreate:"Нема потреба да креирате нови сметки или ингеренции. Поврзете го вашиот паричник и сте подготвени!",getAWallet:"Направете новчаник",useAWallet:"Користете паричник за да ги заштитите и управувате вашите NEAR средства и да се најавите на која било NEAR апликација без потреба од кориснички имиња и лозинки.",connectionFailed:"Поврзувањето не беше успешно.",connectionSuccessful:"Успешно поврзување.",rememberWallet:"Запомни паричници",connected:"Поврзано.",connectingTo:"Поврзување со",connectingMessage:{injected:"Потврдете го поврзувањето во екстерниот прозорец",browser:"По преусмерувањето, потврдете го поврзувањето од новчаниокт",hardware:"Потврдете го поврзувањето со ладен новчаник",bridge:"Потврдете ја врската во новчаникот"}},ledger:{connectWithLedger:"Поврзете се со Леџер",makeSureYourLedger:"Осигурајте се дека вашиот Леџер е поврзан безбедно, и дека NEAR апликацијата е отворена на вашиот уред",continue:"Продолжете",specifyHDPath:"Наведете ХД локација",enterYourPreferredHDPath:"Внесете ја вашата преферирана ХД локација, а потоа скенирајте да ги најдете активните сметки.",scan:"Скенирајте",retry:"Обидете се повторно",ledgerIsNotAvailable:"Леџерот не е достапен.",accessDeniedToUseLedgerDevice:"Пристапот за користење на Леџер уред е одбиен",noAccountsFound:"Нема најдени сметки",selectYourAccounts:"Изберете ги вашите сметки",connecting1Account:"Поврзување на една сметка",cantFindAnyAccount:"Не се најдени сметки поврзани со овој Леџер. Ве молиме креирајте нова NEAR сметка ",orConnectAnAnotherLedger:"или поврзете друг Леџер.",connecting:"Поврзување",ofAccounts:"на сметки",failedToAutomatically:"Неуспешно автоматско барање на ИД на сметката. Внесете го рачно:",overviewTheListOfAuthorized:"Преглед на листата на овластени сметки, завршете се најавата со кликнување на копчето подолу.",finish:"Завршете"},install:{youllNeedToInstall:"Треба да инсталирате",toContinueAfterInstalling:"за да продолжите. По инсталирањето",refreshThePage:"Освежете ја страната.",open:"Отворете"},qr:{copiedToClipboard:"Копирано на клипбордот",failedToCopy:"Неуспешно копирање на клипборд",scanWithYourMobile:"Скенирајте со вашиот телефонски уред",copyToClipboard:"Копирајте на клипборд",preferTheOfficial:"Преферирајте официјален диалог на",open:"Отворете"},walletTypes:{hardware:"Хардверски новчаник",browser:"Новчаник на интернет прелистувач",injected:"Екстензија за новчаник",bridge:"Bridge новчаник",mobile:"Мобилен новчаник","instant-link":"Инстант паричник"},exportAccounts:{chooseAWallet:"Одберете паричник",transferYourAccounts:"Префрлете ги вашите кориснички сметки",selectAWallet:"Изберетен новчаник кој ги задоволува вашите баранња и ги поддржува вашите поврзани кориснички сметки.",selectYourAccounts:"Изберете ги вашите кориснички сметки",afterDecide:"Одкако ќе изберете новчаник, можете да изберете кои кориснички сметки сакате да ги префрлите.",disclaimer:"Не можете да прфрлате кориснички сметки кои никогаш не биле надополнати или користени на NEAR.",warning:"не поддржува извезување на кориснички сметки во овој момент. Ве молиме изберете друг новчаник.",walletTypes:{hardware:"Хардверски новчаник",browser:"Новчаник на интернет прелистувач",injected:"Екстензија за новчаник",bridge:"Bridge новчаник",mobile:"Мобилен новчаник"},selectAccounts:{title:"Изберете ги корисничките сметки за да ги префрлите.",button:"Добијте лозинка",deselectAll:"Отселектирајте се",selectAll:"Изберете се",unavailable:"Трансферот е недостапен",error:"Корисничката сметка не постои",warningLedger:"Потребна е поддршка од Леџер",noBalance:"Сметката не е финансирана"},getPassphrase:{title:"Копирајте ја привремената лозинка",desc:"Ќе треба да ја внесете оваа лозинка кога ќе започнете да ги извезувате вашите сметки на друг новчаник.",button:"Продолжете",label:"Кликнете за да копирате",checkLabel:"Ја копирав или запишав лозинката"},complete:{title:"Завршете го преносот",descOne:"Сега ќе бидете пренасочени на избраниот новчаник за завршување на преносот.",descTwo:"Откако ќе заврши увозот од избраниот новчаник, притиснете го копчето за да го завршите преносот.",button:"Завршете"}}},mk={modal:modal$2},modal$1={wallet:{connectYourWallet:"Povežite svojo denarnico!",whatIsAWallet:"Kaj je denarnica?",secureAndManage:"Zavarujte in upravljajte svoja digitalna sredstva.",safelyStore:"Varno shranjujte in prenašajte svoje kriptovalute in NFTje.",logInToAny:"Prijavite se v katero koli aplikacijo na NEAR",noNeedToCreate:"Ni vam treba ustvarjati novih računov. Povežite svojo denarnico in začnite!",getAWallet:"Ustvarite denarnico",useAWallet:"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR",connectionFailed:"Povezava ni bila uspešna.",connectionSuccessful:"Povezava je bila uspešna.",rememberWallet:"Zapomni si denarnice",connected:"Vaša denarnica je povezana.",connectingTo:"Povezovanje z",connectingMessage:{injected:"Potrdite povezavo v oknu razširitve",browser:"Po preusmeritvi potrdite povezavo v denarnici",hardware:"Potrdite povezavo s hladno denarnico",bridge:"Potrdite povezavo v denarnici"}},ledger:{connectWithLedger:"Povežite se z Ledger",makeSureYourLedger:"Prepričajte se, da je vaš Ledger varno povezan in da je aplikacija NEAR odprta v vaši napravi",continue:"Nadaljuj",specifyHDPath:"Določite HD pot",enterYourPreferredHDPath:"Vnesite želeno HD pot, nato poiščite vse aktivne račune.",scan:"Skenirajte",retry:"Poskusite znova",ledgerIsNotAvailable:"Ledger ni na voljo",accessDeniedToUseLedgerDevice:"Dostop za uporabo naprave Ledger zavrnjen",noAccountsFound:"Ni najdenih računov",selectYourAccounts:"Izberite Vaši računi",connecting1Account:"Povezovanje enega računa",cantFindAnyAccount:"Ni mogoče najti nobenega računa, povezanega s tem Ledgerjem. Ustvarite nov NEAR račun ",orConnectAnAnotherLedger:"ali povežite drug Ledger..",connecting:"Povezovanje",ofAccounts:"računov",failedToAutomatically:"ID-ja računa ni bilo mogoče samodejno najti. Zagotovite ga ročno:",overviewTheListOfAuthorized:"Oglejte si seznam pooblaščenih računov, dokončajte prijavo s klikom na spodnji gumb.",finish:"Končajte"},install:{youllNeedToInstall:"Morali ga boste namestiti",toContinueAfterInstalling:"nadaljevati. Po namestitvi",refreshThePage:"Osvežite stran.",open:"Odprite"},qr:{copiedToClipboard:"Kopirano v podložni mapi",failedToCopy:"Kopiranje v podložni mapi ni uspelo",scanWithYourMobile:"Skenirajte s svojo mobilno napravo",copyToClipboard:" Kopirajte v podložni mapi",preferTheOfficial:"Preferirajte uradno pogovorno okno",open:"Odprite"},walletTypes:{hardware:"Hladna denarnica",browser:"Denarnica brskalnika",injected:"Razširitev za denarnico",bridge:"Bridge denarnica",mobile:"Mobilna denarnica","instant-link":"Takojšnja denarnica"},exportAccounts:{chooseAWallet:"Izberite denarnico",transferYourAccounts:"Prenesite svoje račune",selectAWallet:"Izberite denarnico, ki ustreza vašim potrebam in podpira vaše povezane račune.",selectYourAccounts:"Izberite vaši računi",afterDecide:"Ko se odločite za denarnico, lahko izberete, katere račune želite prenesti.",disclaimer:"Ne boste mogli prenesti Računov, ki nikoli niso bili financirani ali uporabljeni na NEAR.",warning:"trenutno ne podpira izvoza računa. Izberite drugo denarnico",walletTypes:{hardware:"Hladna denarnica",browser:"Denarnica brskalnika",injected:"Razširitev za denarnico",bridge:"Bridge denarnica",mobile:"Mobilna denarnica"},selectAccounts:{title:"Izberite računi za prenos.",button:"Pridobite geslo",deselectAll:"Prekliči izbiro vseh",selectAll:"Izberi vse",unavailable:"Prenos ni na voljo",error:"Račun ne obstaja",warningLedger:"Potrebna je podpora za Ledger",noBalance:"Račun ni financiran"},getPassphrase:{title:"Kopiraj začasno geslo",desc:"To geslo boste morali vnesti, ko boste začeli izvažati svoje račune v drugo denarnico.",button:"Nadaljujte",label:"Kliknite za kopiranje",checkLabel:"Geslo sem kopiral ali zapisal"},complete:{title:"Dokončajte prenos",descOne:"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokončanje prenosa.",descTwo:"Ko je uvozni del postopka končan iz izbrane denarnice, pritisnite gumb za dokončanje postopka prenosa.",button:"Končajte"}}},sl={modal:modal$1},modal={wallet:{connectYourWallet:"Повежите свој новчаник!",whatIsAWallet:"Шта је новчаник?",secureAndManage:"Обезбедите и управљајте својом дигиталном имовином.",safelyStore:"Безбедно чувајте и преносите своје криптовалуте и NFT.",logInToAny:"Пријавите се на било коју апликацију NEAR",noNeedToCreate:"Нема потребе да креирате нове налоге или акредитиве. Повежите новчаник и спремни стe!",getAWallet:"Набавите новчаник",useAWallet:"Користите новчаник да обезбедите и управљате својим NEAR средствима и да се пријавите у било коју апликацију NEAR без потребе за корисничким именима и лозинкама.",connectionFailed:"Веза није успостављена.",connectionSuccessful:"Веза је успела.",rememberWallet:"Запамти новчанике",connected:"Повезан.",connectingTo:"Повезивање на",connectingMessage:{injected:"Потврдите везу у спољном прозору",browser:"Након преусмеравања, потврдите везу у новчанику",hardware:"Потврдите везу са хладним новчаником",bridge:"Потврдите везу са новчаником"}},ledger:{connectWithLedger:"Повежите се са Ledger",makeSureYourLedger:"Уверите се да је ваш Ledger безбедно повезан и да је апликација NEAR отворена на вашем уређају",continue:"Настави",specifyHDPath:"Наведите ХД путању",enterYourPreferredHDPath:"Унесите жељену жељену ХД путању, а затим скенирајте све активне налоге.",scan:"Скенирајте",retry:"Покушај поново",ledgerIsNotAvailable:"Ledger није доступан.",accessDeniedToUseLedgerDevice:"Приступ је одбијен за коришћење Ledger уређаја",noAccountsFound:"Наlози нису пронађени",selectYourAccounts:"Изаберите Ваш наlог",connecting1Account:"Повезати 1 наlог",cantFindAnyAccount:"Није могуће пронаћи ниједан наlог повезан са овим Ledger-ом. Направите нови NEAR наlог",orConnectAnAnotherLedger:"или повежите други Ledger.",connecting:"Повезивање",ofAccounts:"наlога",failedToAutomatically:"Аутоматско проналажење ID-a наlога није успело. Наведите га ручно:",overviewTheListOfAuthorized:"Прегледајте листу овлашћених рачуна, завршите пријаву кликом на дугме испод.",finish:"Заврши"},install:{youllNeedToInstall:"Мораћете да инсталирате",toContinueAfterInstalling:"за наставак. Након инсталирања",refreshThePage:"поново учитати страницу.",open:"Отвори"},qr:{copiedToClipboard:"Копирано у међуспремник",failedToCopy:"Копирање у међуспремник није успело",scanWithYourMobile:"Скенирајте помоћу мобилног уређаја",copyToClipboard:" Копирај у међуспремник",preferTheOfficial:"Преферирате званични дијалог од",open:"Отвори"},walletTypes:{hardware:"Хардверски новчаник",browser:"Новчаник претраживача,",injected:"Додатак за новчаник,",bridge:"Bridge новчаник",mobile:"Мобилни новчаник","instant-link":"Инстант новчаник"},exportAccounts:{chooseAWallet:"Изаберите новчаник",transferYourAccounts:"Пренесите своје налоге",selectAWallet:"Изаберите новчаник који одговара вашим потребама и који подржава ваше повезане налоге.",selectYourAccounts:"Изаберите ваше налоге",afterDecide:"Након што се одлучите за новчаник, можете изабрати које налоге желите да пренесете.",disclaimer:"Нећете моћи да пренесете налоге који никада нису били финансирани или коришћени на NEAR.",warning:"тренутно не подржава извоз налога. Изаберите други новчаник.",walletTypes:{hardware:"Хардверски новчаник",browser:"Новчаник претраживача,",injected:"Додатак за новчаник,",bridge:"Bridge новчаник",mobile:"Мобилни новчаник"},selectAccounts:{title:"Изаберите налоге за пренос.",button:"Добијте приступну фразу",deselectAll:"Поништите избор",selectAll:"Изаберите све",unavailable:"Трансфер није доступан",error:"Налог не постоји",warningLedger:"Потребна подршка за Ledger",noBalance:"Налог није финансиран"},getPassphrase:{title:"Копирај привремену лозинку",desc:"Мораћете да унесете ову лозинку када почнете да извозите своје налоге у други новчаник.",button:"Наставите",label:"Кликните да бисте копирали",checkLabel:"Копирао сам или записао лозинку"},complete:{title:"Довршите трансфер",descOne:"Сада ћете бити преусмерени на новчаник који сте изабрали да завршите трансфер.",descTwo:"Када се део процеса увоза заврши из изабраног новчаника, притисните дугме да завршите процес преноса.",button:"Завршите"}}},sr={modal};const getLanguage=e=>{switch(e){case"en":return en;case"es":return es;case"zh":return zh;case"bg":return bg;case"ko":return ko;case"vi":return vi;case"hi":return hi;case"ar":return ar;case"hr":return hr;case"mk":return mk;case"sl":return sl;case"sr":return sr;default:return en}};let chosenLang;const allowOnlyLanguage=e=>{chosenLang=e},shortenLanguageCode=e=>e.indexOf("-")!==-1?e.split("-")[0]:e.split("_")[0],findObjectPropByStringPath=(e,n)=>{if(!e)return"";const o=n.indexOf(".");if(o>-1){const a=n.substring(0,o),c=n.substring(o+1);return findObjectPropByStringPath(e[a],c)}return e[n]},translate=e=>{let n=window.navigator.languages?window.navigator.languages[0]:null;n=n||window.navigator.language;const o=shortenLanguageCode(chosenLang||n),a=getLanguage(o),c=findObjectPropByStringPath(a,e);return c&&typeof c=="string"?c:e};var isMobile$3={exports:{}};isMobile$3.exports=isMobile$1;var isMobile_2=isMobile$3.exports.isMobile=isMobile$1;isMobile$3.exports.default=isMobile$1;const mobileRE=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,notMobileRE=/CrOS/,tabletRE=/android|ipad|playbook|silk/i;function isMobile$1(e){e||(e={});let n=e.ua;if(!n&&typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),typeof n!="string")return!1;let o=mobileRE.test(n)&&!notMobileRE.test(n)||!!e.tablet&&tabletRE.test(n);return!o&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&n.indexOf("Macintosh")!==-1&&n.indexOf("Safari")!==-1&&(o=!0),o}var isMobileExports=isMobile$3.exports;const isMobile$2=getDefaultExportFromCjs(isMobileExports);var browserIndex$2={},browserIndex$1={},keystore$1={},lib$9={},in_memory_key_store$1={},lib$8={},constants$4={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KeySize=e.KeyType=void 0,function(n){n[n.ED25519=0]="ED25519"}(e.KeyType||(e.KeyType={})),function(n){n[n.SECRET_KEY=32]="SECRET_KEY"}(e.KeySize||(e.KeySize={}))})(constants$4);var key_pair$1={},key_pair_base={};Object.defineProperty(key_pair_base,"__esModule",{value:!0});key_pair_base.KeyPairBase=void 0;class KeyPairBase{}key_pair_base.KeyPairBase=KeyPairBase;var key_pair_ed25519={},lib$7={},constants$3={};Object.defineProperty(constants$3,"__esModule",{value:!0});constants$3.DEFAULT_FUNCTION_CALL_GAS=void 0;constants$3.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000");var errors$5={},errors$4={},logger$2={},logger$1={},console_logger={};Object.defineProperty(console_logger,"__esModule",{value:!0});console_logger.ConsoleLogger=void 0;class ConsoleLogger{constructor(n){this.logLevels=n,this.isLevelEnabled=o=>this.logLevels.includes(o)}print(n,o,...a){switch(n){case"error":case"fatal":return console.error(o,...a);case"warn":return console.warn(o,...a);case"log":return console.log(o,...a);case"debug":case"verbose":return console.debug(o,...a)}}verbose(n,...o){this.isLevelEnabled("verbose")&&this.print("verbose",n,...o)}debug(n,...o){this.isLevelEnabled("debug")&&this.print("debug",n,...o)}log(n,...o){this.isLevelEnabled("log")&&this.print("log",n,...o)}warn(n,...o){this.isLevelEnabled("warn")&&this.print("warn",n,...o)}error(n,...o){this.isLevelEnabled("error")&&this.print("error",n,...o)}fatal(n,...o){this.isLevelEnabled("fatal")&&this.print("fatal",n,...o)}}console_logger.ConsoleLogger=ConsoleLogger;var define_process_env_default$2={},_a;Object.defineProperty(logger$1,"__esModule",{value:!0});logger$1.Logger=void 0;const console_logger_1=console_logger,DEFAULT_LOG_LEVELS=["verbose","debug","log","warn","error","fatal"],DEFAULT_LOGGER=typeof process=="object"&&define_process_env_default$2.NEAR_NO_LOGS?void 0:new console_logger_1.ConsoleLogger(DEFAULT_LOG_LEVELS);class Logger{static error(n,...o){var a;(a=this.instanceRef)===null||a===void 0||a.error(n,...o)}static log(n,...o){var a;(a=this.instanceRef)===null||a===void 0||a.log(n,...o)}static warn(n,...o){var a;(a=this.instanceRef)===null||a===void 0||a.warn(n,...o)}static debug(n,...o){var a,c;(c=(a=this.instanceRef)===null||a===void 0?void 0:a.debug)===null||c===void 0||c.call(a,n,...o)}static verbose(n,...o){var a,c;(c=(a=this.instanceRef)===null||a===void 0?void 0:a.verbose)===null||c===void 0||c.call(a,n,...o)}static fatal(n,...o){var a,c;(c=(a=this.instanceRef)===null||a===void 0?void 0:a.fatal)===null||c===void 0||c.call(a,n,...o)}}logger$1.Logger=Logger;_a=Logger;Logger.instanceRef=DEFAULT_LOGGER;Logger.overrideLogger=e=>{_a.instanceRef=e};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Logger=void 0;var n=logger$1;Object.defineProperty(e,"Logger",{enumerable:!0,get:function(){return n.Logger}})})(logger$2);Object.defineProperty(errors$4,"__esModule",{value:!0});errors$4.logWarning=void 0;const logger_1$1=logger$2;function logWarning(...e){const[n,...o]=e;logger_1$1.Logger.warn(n,...o)}errors$4.logWarning=logWarning;var rpc_errors$1={},format$2={};(function(e){var n=commonjsGlobal$c&&commonjsGlobal$c.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.baseDecode=e.baseEncode=e.parseNearAmount=e.formatNearAmount=e.NEAR_NOMINATION=e.NEAR_NOMINATION_EXP=void 0;const o=n(bs58$1);e.NEAR_NOMINATION_EXP=24,e.NEAR_NOMINATION=BigInt(10)**BigInt(e.NEAR_NOMINATION_EXP);const a=[],c=BigInt(10);for(let _=0,T=BigInt(5);_<e.NEAR_NOMINATION_EXP;_++,T=T*c)a[_]=T;function l(_,T=e.NEAR_NOMINATION_EXP){let I=BigInt(_);if(T!==e.NEAR_NOMINATION_EXP){const D=e.NEAR_NOMINATION_EXP-T-1;D>0&&(I+=a[D])}_=I.toString();const U=_.substring(0,_.length-e.NEAR_NOMINATION_EXP)||"0",N=_.substring(_.length-e.NEAR_NOMINATION_EXP).padStart(e.NEAR_NOMINATION_EXP,"0").substring(0,T);return h(`${p(U)}.${N}`)}e.formatNearAmount=l;function u(_){if(!_)return null;_=d(_);const T=_.split("."),I=T[0],U=T[1]||"";if(T.length>2||U.length>e.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return y(I+U.padEnd(e.NEAR_NOMINATION_EXP,"0"))}e.parseNearAmount=u;function d(_){return _.replace(/,/g,"").trim()}function h(_){return _.replace(/\.?0*$/,"")}function y(_){return _=_.replace(/^0+/,""),_===""?"0":_}function p(_){const T=/(-?\d+)(\d{3})/;for(;T.test(_);)_=_.replace(T,"$1,$2");return _}function v(_){if(typeof _=="string"){const T=[];for(let I=0;I<_.length;I++)T.push(_.charCodeAt(I));_=new Uint8Array(T)}return o.default.encode(_)}e.baseEncode=v;function b(_){return new Uint8Array(o.default.decode(_))}e.baseDecode=b})(format$2);const GasLimitExceeded="Exceeded the maximum amount of gas allowed to burn per contract",MethodEmptyName="Method name is empty",WasmerCompileError="Wasmer compilation error: {{msg}}",GuestPanic="Smart contract panicked: {{panic_msg}}",Memory="Error creating Wasm memory",GasExceeded="Exceeded the prepaid gas",MethodUTF8Error="Method name is not valid UTF8 string",BadUTF16="String encoding is bad UTF-16 sequence",WasmTrap="WebAssembly trap: {{msg}}",GasInstrumentation="Gas instrumentation failed or contract has denied instructions.",InvalidPromiseIndex="{{promise_idx}} does not correspond to existing promises",InvalidPromiseResultIndex="Accessed invalid promise result index: {{result_idx}}",Deserialization="Error happened while deserializing the module",MethodNotFound="Contract method is not found",InvalidRegisterId="Accessed invalid register id: {{register_id}}",InvalidReceiptIndex="VM Logic returned an invalid receipt index: {{receipt_index}}",EmptyMethodName="Method name is empty in contract call",CannotReturnJointPromise="Returning joint promise is currently prohibited",StackHeightInstrumentation="Stack instrumentation failed",CodeDoesNotExist="Cannot find contract code for account {{account_id}}",MethodInvalidSignature="Invalid method signature",IntegerOverflow="Integer overflow happened during contract execution",MemoryAccessViolation="MemoryAccessViolation",InvalidIteratorIndex="Iterator index {{iterator_index}} does not exist",IteratorWasInvalidated="Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie",InvalidAccountId="VM Logic returned an invalid account id",Serialization="Error happened while serializing the module",CannotAppendActionToJointPromise="Actions can only be appended to non-joint promise.",InternalMemoryDeclared="Internal memory declaration has been found in the module",Instantiate="Error happened during instantiation",ProhibitedInView="{{method_name}} is not allowed in view calls",InvalidMethodName="VM Logic returned an invalid method name",BadUTF8="String encoding is bad UTF-8 sequence",BalanceExceeded="Exceeded the account balance",LinkError="Wasm contract link error: {{msg}}",InvalidPublicKey="VM Logic provided an invalid public key",ActorNoPermission="Actor {{actor_id}} doesn't have permission to account {{account_id}} to complete the action",LackBalanceForState="The account {{account_id}} wouldn't have enough balance to cover storage, required to have {{amount}} yoctoNEAR more",ReceiverMismatch="Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.",CostOverflow="Transaction gas or balance cost is too high",InvalidSignature="Transaction is not signed with the given public key",AccessKeyNotFound=`Signer "{{account_id}}" doesn't have access key with the given public_key {{public_key}}`,NotEnoughBalance="Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}",NotEnoughAllowance="Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}",Expired="Transaction has expired",DeleteAccountStaking="Account {{account_id}} is staking and can not be deleted",SignerDoesNotExist="Signer {{signer_id}} does not exist",TriesToStake="Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}",AddKeyAlreadyExists="The public key {{public_key}} is already used for an existing access key",InvalidSigner="Invalid signer account ID {{signer_id}} according to requirements",CreateAccountNotAllowed="The new account_id {{account_id}} can't be created by {{predecessor_id}}",RequiresFullAccess="The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key",TriesToUnstake="Account {{account_id}} is not yet staked, but tried to unstake",InvalidNonce="Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}",AccountAlreadyExists="Can't create a new account {{account_id}}, because it already exists",InvalidChain="Transaction parent block hash doesn't belong to the current chain",AccountDoesNotExist="Can't complete the action because account {{account_id}} doesn't exist",AccessKeyDoesNotExist="Can't complete the action because access key {{public_key}} doesn't exist",MethodNameMismatch="Transaction method name {{method_name}} isn't allowed by the access key",DeleteAccountHasRent="Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent",DeleteAccountHasEnoughBalance="Account {{account_id}} can't be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it's storage",InvalidReceiver="Invalid receiver account ID {{receiver_id}} according to requirements",DeleteKeyDoesNotExist="Account {{account_id}} tries to remove an access key that doesn't exist",Timeout="Timeout exceeded",Closed="Connection closed",require$$3$1={GasLimitExceeded,MethodEmptyName,WasmerCompileError,GuestPanic,Memory,GasExceeded,MethodUTF8Error,BadUTF16,WasmTrap,GasInstrumentation,InvalidPromiseIndex,InvalidPromiseResultIndex,Deserialization,MethodNotFound,InvalidRegisterId,InvalidReceiptIndex,EmptyMethodName,CannotReturnJointPromise,StackHeightInstrumentation,CodeDoesNotExist,MethodInvalidSignature,IntegerOverflow,MemoryAccessViolation,InvalidIteratorIndex,IteratorWasInvalidated,InvalidAccountId,Serialization,CannotAppendActionToJointPromise,InternalMemoryDeclared,Instantiate,ProhibitedInView,InvalidMethodName,BadUTF8,BalanceExceeded,LinkError,InvalidPublicKey,ActorNoPermission,LackBalanceForState,ReceiverMismatch,CostOverflow,InvalidSignature,AccessKeyNotFound,NotEnoughBalance,NotEnoughAllowance,Expired,DeleteAccountStaking,SignerDoesNotExist,TriesToStake,AddKeyAlreadyExists,InvalidSigner,CreateAccountNotAllowed,RequiresFullAccess,TriesToUnstake,InvalidNonce,AccountAlreadyExists,InvalidChain,AccountDoesNotExist,AccessKeyDoesNotExist,MethodNameMismatch,DeleteAccountHasRent,DeleteAccountHasEnoughBalance,InvalidReceiver,DeleteKeyDoesNotExist,Timeout,Closed},schema$1={AccessKeyNotFound:{name:"AccessKeyNotFound",subtypes:[],props:{account_id:"",public_key:""}},AccountAlreadyExists:{name:"AccountAlreadyExists",subtypes:[],props:{account_id:""}},AccountDoesNotExist:{name:"AccountDoesNotExist",subtypes:[],props:{account_id:""}},ActionError:{name:"ActionError",subtypes:["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],props:{index:""}},ActionsValidationError:{name:"ActionsValidationError",subtypes:["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],props:{}},ActorNoPermission:{name:"ActorNoPermission",subtypes:[],props:{account_id:"",actor_id:""}},AddKeyAlreadyExists:{name:"AddKeyAlreadyExists",subtypes:[],props:{account_id:"",public_key:""}},AddKeyMethodNameLengthExceeded:{name:"AddKeyMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},AddKeyMethodNamesNumberOfBytesExceeded:{name:"AddKeyMethodNamesNumberOfBytesExceeded",subtypes:[],props:{limit:"",total_number_of_bytes:""}},AltBn128InvalidInput:{name:"AltBn128InvalidInput",subtypes:[],props:{msg:""}},BadUTF16:{name:"BadUTF16",subtypes:[],props:{}},BadUTF8:{name:"BadUTF8",subtypes:[],props:{}},BalanceExceeded:{name:"BalanceExceeded",subtypes:[],props:{}},BalanceMismatchError:{name:"BalanceMismatchError",subtypes:[],props:{final_accounts_balance:"",final_postponed_receipts_balance:"",incoming_receipts_balance:"",incoming_validator_rewards:"",initial_accounts_balance:"",initial_postponed_receipts_balance:"",new_delayed_receipts_balance:"",other_burnt_amount:"",outgoing_receipts_balance:"",processed_delayed_receipts_balance:"",slashed_burnt_amount:"",tx_burnt_amount:""}},CallIndirectOOB:{name:"CallIndirectOOB",subtypes:[],props:{}},CannotAppendActionToJointPromise:{name:"CannotAppendActionToJointPromise",subtypes:[],props:{}},CannotReturnJointPromise:{name:"CannotReturnJointPromise",subtypes:[],props:{}},CodeDoesNotExist:{name:"CodeDoesNotExist",subtypes:[],props:{account_id:""}},CompilationError:{name:"CompilationError",subtypes:["CodeDoesNotExist","PrepareError","WasmerCompileError"],props:{}},ContractSizeExceeded:{name:"ContractSizeExceeded",subtypes:[],props:{limit:"",size:""}},CostOverflow:{name:"CostOverflow",subtypes:[],props:{}},CreateAccountNotAllowed:{name:"CreateAccountNotAllowed",subtypes:[],props:{account_id:"",predecessor_id:""}},CreateAccountOnlyByRegistrar:{name:"CreateAccountOnlyByRegistrar",subtypes:[],props:{account_id:"",predecessor_id:"",registrar_account_id:""}},DelegateActionExpired:{name:"DelegateActionExpired",subtypes:[],props:{}},DelegateActionInvalidNonce:{name:"DelegateActionInvalidNonce",subtypes:[],props:{ak_nonce:"",delegate_nonce:""}},DelegateActionInvalidSignature:{name:"DelegateActionInvalidSignature",subtypes:[],props:{}},DelegateActionMustBeOnlyOne:{name:"DelegateActionMustBeOnlyOne",subtypes:[],props:{}},DelegateActionNonceTooLarge:{name:"DelegateActionNonceTooLarge",subtypes:[],props:{delegate_nonce:"",upper_bound:""}},DelegateActionSenderDoesNotMatchTxReceiver:{name:"DelegateActionSenderDoesNotMatchTxReceiver",subtypes:[],props:{receiver_id:"",sender_id:""}},DeleteAccountStaking:{name:"DeleteAccountStaking",subtypes:[],props:{account_id:""}},DeleteAccountWithLargeState:{name:"DeleteAccountWithLargeState",subtypes:[],props:{account_id:""}},DeleteActionMustBeFinal:{name:"DeleteActionMustBeFinal",subtypes:[],props:{}},DeleteKeyDoesNotExist:{name:"DeleteKeyDoesNotExist",subtypes:[],props:{account_id:"",public_key:""}},DepositWithFunctionCall:{name:"DepositWithFunctionCall",subtypes:[],props:{}},Deprecated:{name:"Deprecated",subtypes:[],props:{method_name:""}},Deserialization:{name:"Deserialization",subtypes:[],props:{}},ECRecoverError:{name:"ECRecoverError",subtypes:[],props:{msg:""}},Ed25519VerifyInvalidInput:{name:"Ed25519VerifyInvalidInput",subtypes:[],props:{msg:""}},EmptyMethodName:{name:"EmptyMethodName",subtypes:[],props:{}},Expired:{name:"Expired",subtypes:[],props:{}},FunctionCallArgumentsLengthExceeded:{name:"FunctionCallArgumentsLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallMethodNameLengthExceeded:{name:"FunctionCallMethodNameLengthExceeded",subtypes:[],props:{length:"",limit:""}},FunctionCallZeroAttachedGas:{name:"FunctionCallZeroAttachedGas",subtypes:[],props:{}},GasExceeded:{name:"GasExceeded",subtypes:[],props:{}},GasInstrumentation:{name:"GasInstrumentation",subtypes:[],props:{}},GasLimitExceeded:{name:"GasLimitExceeded",subtypes:[],props:{}},GenericTrap:{name:"GenericTrap",subtypes:[],props:{}},GuestPanic:{name:"GuestPanic",subtypes:[],props:{panic_msg:""}},HostError:{name:"HostError",subtypes:["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],props:{}},IllegalArithmetic:{name:"IllegalArithmetic",subtypes:[],props:{}},IncorrectCallIndirectSignature:{name:"IncorrectCallIndirectSignature",subtypes:[],props:{}},IndirectCallToNull:{name:"IndirectCallToNull",subtypes:[],props:{}},Instantiate:{name:"Instantiate",subtypes:[],props:{}},InsufficientStake:{name:"InsufficientStake",subtypes:[],props:{account_id:"",minimum_stake:"",stake:""}},IntegerOverflow:{name:"IntegerOverflow",subtypes:[],props:{}},InternalMemoryDeclared:{name:"InternalMemoryDeclared",subtypes:[],props:{}},InvalidAccessKeyError:{name:"InvalidAccessKeyError",subtypes:["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],props:{}},InvalidAccountId:{name:"InvalidAccountId",subtypes:[],props:{}},InvalidChain:{name:"InvalidChain",subtypes:[],props:{}},InvalidDataReceiverId:{name:"InvalidDataReceiverId",subtypes:[],props:{account_id:""}},InvalidIteratorIndex:{name:"InvalidIteratorIndex",subtypes:[],props:{iterator_index:""}},InvalidMethodName:{name:"InvalidMethodName",subtypes:[],props:{}},InvalidNonce:{name:"InvalidNonce",subtypes:[],props:{ak_nonce:"",tx_nonce:""}},InvalidPredecessorId:{name:"InvalidPredecessorId",subtypes:[],props:{account_id:""}},InvalidPromiseIndex:{name:"InvalidPromiseIndex",subtypes:[],props:{promise_idx:""}},InvalidPromiseResultIndex:{name:"InvalidPromiseResultIndex",subtypes:[],props:{result_idx:""}},InvalidPublicKey:{name:"InvalidPublicKey",subtypes:[],props:{}},InvalidReceiptIndex:{name:"InvalidReceiptIndex",subtypes:[],props:{receipt_index:""}},InvalidReceiverId:{name:"InvalidReceiverId",subtypes:[],props:{account_id:""}},InvalidRegisterId:{name:"InvalidRegisterId",subtypes:[],props:{register_id:""}},InvalidSignature:{name:"InvalidSignature",subtypes:[],props:{}},InvalidSignerId:{name:"InvalidSignerId",subtypes:[],props:{account_id:""}},InvalidTxError:{name:"InvalidTxError",subtypes:["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],props:{}},IteratorWasInvalidated:{name:"IteratorWasInvalidated",subtypes:[],props:{iterator_index:""}},KeyLengthExceeded:{name:"KeyLengthExceeded",subtypes:[],props:{length:"",limit:""}},LackBalanceForState:{name:"LackBalanceForState",subtypes:[],props:{account_id:"",amount:""}},Memory:{name:"Memory",subtypes:[],props:{}},MemoryAccessViolation:{name:"MemoryAccessViolation",subtypes:[],props:{}},MemoryOutOfBounds:{name:"MemoryOutOfBounds",subtypes:[],props:{}},MethodEmptyName:{name:"MethodEmptyName",subtypes:[],props:{}},MethodInvalidSignature:{name:"MethodInvalidSignature",subtypes:[],props:{}},MethodNameMismatch:{name:"MethodNameMismatch",subtypes:[],props:{method_name:""}},MethodNotFound:{name:"MethodNotFound",subtypes:[],props:{}},MethodResolveError:{name:"MethodResolveError",subtypes:["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],props:{}},MisalignedAtomicAccess:{name:"MisalignedAtomicAccess",subtypes:[],props:{}},NonceTooLarge:{name:"NonceTooLarge",subtypes:[],props:{tx_nonce:"",upper_bound:""}},NotEnoughAllowance:{name:"NotEnoughAllowance",subtypes:[],props:{account_id:"",allowance:"",cost:"",public_key:""}},NotEnoughBalance:{name:"NotEnoughBalance",subtypes:[],props:{balance:"",cost:"",signer_id:""}},NumberInputDataDependenciesExceeded:{name:"NumberInputDataDependenciesExceeded",subtypes:[],props:{limit:"",number_of_input_data_dependencies:""}},NumberOfLogsExceeded:{name:"NumberOfLogsExceeded",subtypes:[],props:{limit:""}},NumberPromisesExceeded:{name:"NumberPromisesExceeded",subtypes:[],props:{limit:"",number_of_promises:""}},OnlyImplicitAccountCreationAllowed:{name:"OnlyImplicitAccountCreationAllowed",subtypes:[],props:{account_id:""}},PrepareError:{name:"PrepareError",subtypes:["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],props:{}},ProhibitedInView:{name:"ProhibitedInView",subtypes:[],props:{method_name:""}},ReceiptValidationError:{name:"ReceiptValidationError",subtypes:["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],props:{}},ReceiverMismatch:{name:"ReceiverMismatch",subtypes:[],props:{ak_receiver:"",tx_receiver:""}},RequiresFullAccess:{name:"RequiresFullAccess",subtypes:[],props:{}},ReturnedValueLengthExceeded:{name:"ReturnedValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},Serialization:{name:"Serialization",subtypes:[],props:{}},SignerDoesNotExist:{name:"SignerDoesNotExist",subtypes:[],props:{signer_id:""}},StackHeightInstrumentation:{name:"StackHeightInstrumentation",subtypes:[],props:{}},StackOverflow:{name:"StackOverflow",subtypes:[],props:{}},TooManyFunctions:{name:"TooManyFunctions",subtypes:[],props:{}},TooManyLocals:{name:"TooManyLocals",subtypes:[],props:{}},TotalLogLengthExceeded:{name:"TotalLogLengthExceeded",subtypes:[],props:{length:"",limit:""}},TotalNumberOfActionsExceeded:{name:"TotalNumberOfActionsExceeded",subtypes:[],props:{limit:"",total_number_of_actions:""}},TotalPrepaidGasExceeded:{name:"TotalPrepaidGasExceeded",subtypes:[],props:{limit:"",total_prepaid_gas:""}},TransactionSizeExceeded:{name:"TransactionSizeExceeded",subtypes:[],props:{limit:"",size:""}},TriesToStake:{name:"TriesToStake",subtypes:[],props:{account_id:"",balance:"",locked:"",stake:""}},TriesToUnstake:{name:"TriesToUnstake",subtypes:[],props:{account_id:""}},TxExecutionError:{name:"TxExecutionError",subtypes:["ActionError","InvalidTxError"],props:{}},Unreachable:{name:"Unreachable",subtypes:[],props:{}},UnsuitableStakingKey:{name:"UnsuitableStakingKey",subtypes:[],props:{public_key:""}},UnsupportedProtocolFeature:{name:"UnsupportedProtocolFeature",subtypes:[],props:{protocol_feature:"",version:""}},ValueLengthExceeded:{name:"ValueLengthExceeded",subtypes:[],props:{length:"",limit:""}},WasmTrap:{name:"WasmTrap",subtypes:["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],props:{}},WasmerCompileError:{name:"WasmerCompileError",subtypes:[],props:{msg:""}},Closed:{name:"Closed",subtypes:[],props:{}},ServerError:{name:"ServerError",subtypes:["TxExecutionError","Timeout","Closed"],props:{}},Timeout:{name:"Timeout",subtypes:[],props:{}}},require$$4$1={schema:schema$1};var __importDefault$e=commonjsGlobal$c&&commonjsGlobal$c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rpc_errors$1,"__esModule",{value:!0});rpc_errors$1.getErrorTypeFromErrorMessage=rpc_errors$1.formatError=rpc_errors$1.parseResultError=rpc_errors$1.parseRpcError=rpc_errors$1.ServerError=void 0;const types_1$h=lib$l,mustache_1=__importDefault$e(mustacheExports),format_1=format$2,error_messages_json_1=__importDefault$e(require$$3$1),rpc_error_schema_json_1=__importDefault$e(require$$4$1),mustacheHelpers={formatNear:()=>(e,n)=>(0,format_1.formatNearAmount)(n(e))};class ServerError extends types_1$h.TypedError{}rpc_errors$1.ServerError=ServerError;class ServerTransactionError extends ServerError{}function parseRpcError(e){const n={},o=walkSubtype(e,rpc_error_schema_json_1.default.schema,n,""),a=new ServerError(formatError(o,n),o);return Object.assign(a,n),a}rpc_errors$1.parseRpcError=parseRpcError;function parseResultError(e){const n=parseRpcError(e.status.Failure),o=new ServerTransactionError;return Object.assign(o,n),o.type=n.type,o.message=n.message,o.transaction_outcome=e.transaction_outcome,o}rpc_errors$1.parseResultError=parseResultError;function formatError(e,n){return typeof error_messages_json_1.default[e]=="string"?mustache_1.default.render(error_messages_json_1.default[e],Object.assign(Object.assign({},n),mustacheHelpers)):JSON.stringify(n)}rpc_errors$1.formatError=formatError;function walkSubtype(e,n,o,a){let c,l,u;for(const d in n){if(isString(e[d]))return e[d];if(isObject$i(e[d]))c=e[d],l=n[d],u=d;else if(isObject$i(e.kind)&&isObject$i(e.kind[d]))c=e.kind[d],l=n[d],u=d;else continue}if(c&&l){for(const d of Object.keys(l.props))o[d]=c[d];return walkSubtype(c,n,o,u)}else return o.kind=e,a}function getErrorTypeFromErrorMessage(e,n){switch(!0){case/^account .*? does not exist while viewing$/.test(e):return"AccountDoesNotExist";case/^Account .*? doesn't exist$/.test(e):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(e):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(e):return"CodeDoesNotExist";case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(e):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(e):return"MethodNotFound";case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(e):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(e):return"InvalidNonce";default:return n}}rpc_errors$1.getErrorTypeFromErrorMessage=getErrorTypeFromErrorMessage;function isObject$i(e){return Object.prototype.toString.call(e)==="[object Object]"}function isString(e){return Object.prototype.toString.call(e)==="[object String]"}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseRpcError=e.parseResultError=e.getErrorTypeFromErrorMessage=e.formatError=e.ServerError=e.logWarning=void 0;var n=errors$4;Object.defineProperty(e,"logWarning",{enumerable:!0,get:function(){return n.logWarning}});var o=rpc_errors$1;Object.defineProperty(e,"ServerError",{enumerable:!0,get:function(){return o.ServerError}}),Object.defineProperty(e,"formatError",{enumerable:!0,get:function(){return o.formatError}}),Object.defineProperty(e,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return o.getErrorTypeFromErrorMessage}}),Object.defineProperty(e,"parseResultError",{enumerable:!0,get:function(){return o.parseResultError}}),Object.defineProperty(e,"parseRpcError",{enumerable:!0,get:function(){return o.parseRpcError}})})(errors$5);var logging={};Object.defineProperty(logging,"__esModule",{value:!0});logging.printTxOutcomeLogs=logging.printTxOutcomeLogsAndFailures=void 0;const errors_1$2=errors$5,logger_1=logger$2;function printTxOutcomeLogsAndFailures({contractId:e,outcome:n}){const o=[n.transaction_outcome,...n.receipts_outcome].reduce((a,c)=>{const l=typeof c.outcome.status=="object"&&typeof c.outcome.status.Failure=="object";return c.outcome.logs.length||l?a.concat({receiptIds:c.outcome.receipt_ids,logs:c.outcome.logs,failure:typeof c.outcome.status=="object"&&c.outcome.status.Failure!==void 0?(0,errors_1$2.parseRpcError)(c.outcome.status.Failure):null}):a},[]);for(const a of o)logger_1.Logger.log(`Receipt${a.receiptIds.length>1?"s":""}: ${a.receiptIds.join(", ")}`),printTxOutcomeLogs({contractId:e,logs:a.logs,prefix:" "}),a.failure&&logger_1.Logger.warn(` Failure [${e}]: ${a.failure}`)}logging.printTxOutcomeLogsAndFailures=printTxOutcomeLogsAndFailures;function printTxOutcomeLogs({contractId:e,logs:n,prefix:o=""}){for(const a of n)logger_1.Logger.log(`${o}Log [${e}]: ${a}`)}logging.printTxOutcomeLogs=printTxOutcomeLogs;var provider$2={};Object.defineProperty(provider$2,"__esModule",{value:!0});provider$2.getTransactionLastResult=void 0;function getTransactionLastResult(e){if(typeof e.status=="object"&&typeof e.status.SuccessValue=="string"){const n=Buffer.from(e.status.SuccessValue,"base64").toString();try{return JSON.parse(n)}catch{return n}}return null}provider$2.getTransactionLastResult=getTransactionLastResult;var validators$1={},utils$6={};Object.defineProperty(utils$6,"__esModule",{value:!0});utils$6.sortBigIntAsc=void 0;function sortBigIntAsc(e,n){return e<n?-1:e>n?1:0}utils$6.sortBigIntAsc=sortBigIntAsc;var __importDefault$d=commonjsGlobal$c&&commonjsGlobal$c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(validators$1,"__esModule",{value:!0});validators$1.diffEpochValidators=validators$1.findSeatPrice=void 0;const depd_1$1=__importDefault$d(browser$5),utils_1$f=utils$6;function findSeatPrice(e,n,o,a){return a&&a<49?findSeatPriceForProtocolBefore49(e,n):(o||((0,depd_1$1.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),o=[1,6250]),findSeatPriceForProtocolAfter49(e,n,o))}validators$1.findSeatPrice=findSeatPrice;function findSeatPriceForProtocolBefore49(e,n){const o=e.map(d=>BigInt(d.stake)).sort(utils_1$f.sortBigIntAsc),a=BigInt(n),c=o.reduce((d,h)=>d+h);if(c<a)throw new Error("Stakes are below seats");let l=BigInt(1),u=c+BigInt(1);for(;l!==u-BigInt(1);){const d=(l+u)/BigInt(2);let h=!1,y=BigInt(0);for(let p=0;p<o.length;++p)if(y=y+o[p]/d,y>=a){l=d,h=!0;break}h||(u=d)}return l}function findSeatPriceForProtocolAfter49(e,n,o){if(o.length!=2)throw Error("minimumStakeRatio should have 2 elements");const a=e.map(l=>BigInt(l.stake)).sort(utils_1$f.sortBigIntAsc),c=a.reduce((l,u)=>l+u);return e.length<n?c*BigInt(o[0])/BigInt(o[1]):a[0]+BigInt(1)}function diffEpochValidators(e,n){const o=new Map;e.forEach(c=>o.set(c.account_id,c));const a=new Set(n.map(c=>c.account_id));return{newValidators:n.filter(c=>!o.has(c.account_id)),removedValidators:e.filter(c=>!a.has(c.account_id)),changedValidators:n.filter(c=>o.has(c.account_id)&&o.get(c.account_id).stake!=c.stake).map(c=>({current:o.get(c.account_id),next:c}))}}validators$1.diffEpochValidators=diffEpochValidators;(function(e){var n=commonjsGlobal$c&&commonjsGlobal$c.__createBinding||(Object.create?function(a,c,l,u){u===void 0&&(u=l);var d=Object.getOwnPropertyDescriptor(c,l);(!d||("get"in d?!c.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(a,u,d)}:function(a,c,l,u){u===void 0&&(u=l),a[u]=c[l]}),o=commonjsGlobal$c&&commonjsGlobal$c.__exportStar||function(a,c){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(c,l)&&n(c,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),o(constants$3,e),o(errors$5,e),o(format$2,e),o(logging,e),o(provider$2,e),o(validators$1,e),o(logger$2,e),o(utils$6,e)})(lib$7);var public_key={};Object.defineProperty(public_key,"__esModule",{value:!0});public_key.PublicKey=void 0;const types_1$g=lib$l,utils_1$e=lib$7,ed25519_1$1=ed25519$1,constants_1$3=constants$4;function key_type_to_str(e){switch(e){case constants_1$3.KeyType.ED25519:return"ed25519";default:throw new Error(`Unknown key type ${e}`)}}function str_to_key_type(e){switch(e.toLowerCase()){case"ed25519":return constants_1$3.KeyType.ED25519;default:throw new Error(`Unknown key type ${e}`)}}class PublicKey extends types_1$g.Assignable{static from(n){return typeof n=="string"?PublicKey.fromString(n):n}static fromString(n){const o=n.split(":");let a,c=constants_1$3.KeyType.ED25519;if(o.length===1)a=o[0];else if(o.length===2)a=o[1],c=str_to_key_type(o[0]);else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>");const l=(0,utils_1$e.baseDecode)(a);if(l.length!==constants_1$3.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${l.length}), must be ${constants_1$3.KeySize.SECRET_KEY}`);return new PublicKey({keyType:c,data:l})}toString(){return`${key_type_to_str(this.keyType)}:${(0,utils_1$e.baseEncode)(this.data)}`}verify(n,o){switch(this.keyType){case constants_1$3.KeyType.ED25519:return ed25519_1$1.ed25519.verify(o,n,this.data);default:throw new Error(`Unknown key type ${this.keyType}`)}}}public_key.PublicKey=PublicKey;var __importDefault$c=commonjsGlobal$c&&commonjsGlobal$c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(key_pair_ed25519,"__esModule",{value:!0});key_pair_ed25519.KeyPairEd25519=void 0;const utils_1$d=lib$7,ed25519_1=ed25519$1,randombytes_1=__importDefault$c(browserExports),constants_1$2=constants$4,key_pair_base_1$1=key_pair_base,public_key_1=public_key;class KeyPairEd25519 extends key_pair_base_1$1.KeyPairBase{constructor(n){super();const o=(0,utils_1$d.baseDecode)(n),a=new Uint8Array(o.slice(0,constants_1$2.KeySize.SECRET_KEY)),c=ed25519_1.ed25519.getPublicKey(new Uint8Array(a));this.publicKey=new public_key_1.PublicKey({keyType:constants_1$2.KeyType.ED25519,data:c}),this.secretKey=(0,utils_1$d.baseEncode)(a),this.extendedSecretKey=n}static fromRandom(){const n=(0,randombytes_1.default)(constants_1$2.KeySize.SECRET_KEY),o=ed25519_1.ed25519.getPublicKey(new Uint8Array(n)),a=new Uint8Array([...n,...o]);return new KeyPairEd25519((0,utils_1$d.baseEncode)(a))}sign(n){return{signature:ed25519_1.ed25519.sign(n,(0,utils_1$d.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(n,o){return this.publicKey.verify(n,o)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}key_pair_ed25519.KeyPairEd25519=KeyPairEd25519;Object.defineProperty(key_pair$1,"__esModule",{value:!0});key_pair$1.KeyPair=void 0;const key_pair_base_1=key_pair_base,key_pair_ed25519_1=key_pair_ed25519;class KeyPair extends key_pair_base_1.KeyPairBase{static fromRandom(n){switch(n.toUpperCase()){case"ED25519":return key_pair_ed25519_1.KeyPairEd25519.fromRandom();default:throw new Error(`Unknown curve ${n}`)}}static fromString(n){const o=n.split(":");if(o.length===1)return new key_pair_ed25519_1.KeyPairEd25519(o[0]);if(o.length===2)switch(o[0].toUpperCase()){case"ED25519":return new key_pair_ed25519_1.KeyPairEd25519(o[1]);default:throw new Error(`Unknown curve: ${o[0]}`)}else throw new Error("Invalid encoded key format, must be <curve>:<encoded key>")}}key_pair$1.KeyPair=KeyPair;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=e.KeyPairEd25519=e.KeyPair=e.KeyType=void 0;var n=constants$4;Object.defineProperty(e,"KeyType",{enumerable:!0,get:function(){return n.KeyType}});var o=key_pair$1;Object.defineProperty(e,"KeyPair",{enumerable:!0,get:function(){return o.KeyPair}});var a=key_pair_ed25519;Object.defineProperty(e,"KeyPairEd25519",{enumerable:!0,get:function(){return a.KeyPairEd25519}});var c=public_key;Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return c.PublicKey}})})(lib$8);var keystore={};Object.defineProperty(keystore,"__esModule",{value:!0});keystore.KeyStore=void 0;class KeyStore{}keystore.KeyStore=KeyStore;var __awaiter$K=commonjsGlobal$c&&commonjsGlobal$c.__awaiter||function(e,n,o,a){function c(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(p){try{y(a.next(p))}catch(v){u(v)}}function h(p){try{y(a.throw(p))}catch(v){u(v)}}function y(p){p.done?l(p.value):c(p.value).then(d,h)}y((a=a.apply(e,n||[])).next())})};Object.defineProperty(in_memory_key_store$1,"__esModule",{value:!0});in_memory_key_store$1.InMemoryKeyStore=void 0;const crypto_1$c=lib$8,keystore_1$1=keystore;class InMemoryKeyStore extends keystore_1$1.KeyStore{constructor(){super(),this.keys={}}setKey(n,o,a){return __awaiter$K(this,void 0,void 0,function*(){this.keys[`${o}:${n}`]=a.toString()})}getKey(n,o){return __awaiter$K(this,void 0,void 0,function*(){const a=this.keys[`${o}:${n}`];return a?crypto_1$c.KeyPair.fromString(a):null})}removeKey(n,o){return __awaiter$K(this,void 0,void 0,function*(){delete this.keys[`${o}:${n}`]})}clear(){return __awaiter$K(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return __awaiter$K(this,void 0,void 0,function*(){const n=new Set;return Object.keys(this.keys).forEach(o=>{const a=o.split(":");n.add(a[1])}),Array.from(n.values())})}getAccounts(n){return __awaiter$K(this,void 0,void 0,function*(){const o=new Array;return Object.keys(this.keys).forEach(a=>{const c=a.split(":");c[c.length-1]===n&&o.push(c.slice(0,c.length-1).join(":"))}),o})}toString(){return"InMemoryKeyStore"}}in_memory_key_store$1.InMemoryKeyStore=InMemoryKeyStore;var merge_key_store$1={},__awaiter$J=commonjsGlobal$c&&commonjsGlobal$c.__awaiter||function(e,n,o,a){function c(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(p){try{y(a.next(p))}catch(v){u(v)}}function h(p){try{y(a.throw(p))}catch(v){u(v)}}function y(p){p.done?l(p.value):c(p.value).then(d,h)}y((a=a.apply(e,n||[])).next())})};Object.defineProperty(merge_key_store$1,"__esModule",{value:!0});merge_key_store$1.MergeKeyStore=void 0;const keystore_1=keystore;class MergeKeyStore extends keystore_1.KeyStore{constructor(n,o={writeKeyStoreIndex:0}){super(),this.options=o,this.keyStores=n}setKey(n,o,a){return __awaiter$J(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(n,o,a)})}getKey(n,o){return __awaiter$J(this,void 0,void 0,function*(){for(const a of this.keyStores){const c=yield a.getKey(n,o);if(c)return c}return null})}removeKey(n,o){return __awaiter$J(this,void 0,void 0,function*(){for(const a of this.keyStores)yield a.removeKey(n,o)})}clear(){return __awaiter$J(this,void 0,void 0,function*(){for(const n of this.keyStores)yield n.clear()})}getNetworks(){return __awaiter$J(this,void 0,void 0,function*(){const n=new Set;for(const o of this.keyStores)for(const a of yield o.getNetworks())n.add(a);return Array.from(n)})}getAccounts(n){return __awaiter$J(this,void 0,void 0,function*(){const o=new Set;for(const a of this.keyStores)for(const c of yield a.getAccounts(n))o.add(c);return Array.from(o)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}merge_key_store$1.MergeKeyStore=MergeKeyStore;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MergeKeyStore=e.KeyStore=e.InMemoryKeyStore=void 0;var n=in_memory_key_store$1;Object.defineProperty(e,"InMemoryKeyStore",{enumerable:!0,get:function(){return n.InMemoryKeyStore}});var o=keystore;Object.defineProperty(e,"KeyStore",{enumerable:!0,get:function(){return o.KeyStore}});var a=merge_key_store$1;Object.defineProperty(e,"MergeKeyStore",{enumerable:!0,get:function(){return a.MergeKeyStore}})})(lib$9);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyStore=void 0;var n=lib$9;Object.defineProperty(e,"KeyStore",{enumerable:!0,get:function(){return n.KeyStore}})})(keystore$1);var in_memory_key_store={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryKeyStore=void 0;var n=lib$9;Object.defineProperty(e,"InMemoryKeyStore",{enumerable:!0,get:function(){return n.InMemoryKeyStore}})})(in_memory_key_store);var browser_local_storage_key_store$1={},lib$6={},browser_local_storage_key_store={},__awaiter$I=commonjsGlobal$c&&commonjsGlobal$c.__awaiter||function(e,n,o,a){function c(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(p){try{y(a.next(p))}catch(v){u(v)}}function h(p){try{y(a.throw(p))}catch(v){u(v)}}function y(p){p.done?l(p.value):c(p.value).then(d,h)}y((a=a.apply(e,n||[])).next())})};Object.defineProperty(browser_local_storage_key_store,"__esModule",{value:!0});browser_local_storage_key_store.BrowserLocalStorageKeyStore=void 0;const crypto_1$b=lib$8,keystores_1$1=lib$9,LOCAL_STORAGE_KEY_PREFIX="near-api-js:keystore:";class BrowserLocalStorageKeyStore extends keystores_1$1.KeyStore{constructor(n=window.localStorage,o=LOCAL_STORAGE_KEY_PREFIX){super(),this.localStorage=n,this.prefix=o}setKey(n,o,a){return __awaiter$I(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(n,o),a.toString())})}getKey(n,o){return __awaiter$I(this,void 0,void 0,function*(){const a=this.localStorage.getItem(this.storageKeyForSecretKey(n,o));return a?crypto_1$b.KeyPair.fromString(a):null})}removeKey(n,o){return __awaiter$I(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(n,o))})}clear(){return __awaiter$I(this,void 0,void 0,function*(){for(const n of this.storageKeys())n.startsWith(this.prefix)&&this.localStorage.removeItem(n)})}getNetworks(){return __awaiter$I(this,void 0,void 0,function*(){const n=new Set;for(const o of this.storageKeys())if(o.startsWith(this.prefix)){const a=o.substring(this.prefix.length).split(":");n.add(a[1])}return Array.from(n.values())})}getAccounts(n){return __awaiter$I(this,void 0,void 0,function*(){const o=new Array;for(const a of this.storageKeys())if(a.startsWith(this.prefix)){const c=a.substring(this.prefix.length).split(":");c[1]===n&&o.push(c[0])}return o})}storageKeyForSecretKey(n,o){return`${this.prefix}${o}:${n}`}*storageKeys(){for(let n=0;n<this.localStorage.length;n++)yield this.localStorage.key(n)}}browser_local_storage_key_store.BrowserLocalStorageKeyStore=BrowserLocalStorageKeyStore;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserLocalStorageKeyStore=void 0;var n=browser_local_storage_key_store;Object.defineProperty(e,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return n.BrowserLocalStorageKeyStore}})})(lib$6);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserLocalStorageKeyStore=void 0;var n=lib$6;Object.defineProperty(e,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return n.BrowserLocalStorageKeyStore}})})(browser_local_storage_key_store$1);var merge_key_store={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MergeKeyStore=void 0;var n=lib$9;Object.defineProperty(e,"MergeKeyStore",{enumerable:!0,get:function(){return n.MergeKeyStore}})})(merge_key_store);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MergeKeyStore=e.BrowserLocalStorageKeyStore=e.InMemoryKeyStore=e.KeyStore=void 0;const n=keystore$1;Object.defineProperty(e,"KeyStore",{enumerable:!0,get:function(){return n.KeyStore}});const o=in_memory_key_store;Object.defineProperty(e,"InMemoryKeyStore",{enumerable:!0,get:function(){return o.InMemoryKeyStore}});const a=browser_local_storage_key_store$1;Object.defineProperty(e,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return a.BrowserLocalStorageKeyStore}});const c=merge_key_store;Object.defineProperty(e,"MergeKeyStore",{enumerable:!0,get:function(){return c.MergeKeyStore}})})(browserIndex$1);var commonIndex={},providers={},provider$1={},lib$5={},exponentialBackoff$1={},__awaiter$H=commonjsGlobal$c&&commonjsGlobal$c.__awaiter||function(e,n,o,a){function c(l){return l instanceof o?l:new o(function(u){u(l)})}return new(o||(o=Promise))(function(l,u){function d(p){try{y(a.next(p))}catch(v){u(v)}}function h(p){try{y(a.throw(p))}catch(v){u(v)}}function y(p){p.done?l(p.value):c(p.value).then(d,h)}y((a=a.apply(e,n||[])).next())})};Object.defineProperty(exponentialBackoff$1,"__esModule",{value:!0});exponentialBackoff$1.exponentialBackoff=void 0;function exponentialBackoff(e,n,o,a){return __awaiter$H(this,void 0,void 0,function*(){let c=e;for(let l=0;l<n;l++){const u=yield a();if(u)return u;yield sleep(c),c*=o}return null})}exponentialBackoff$1.exponentialBackoff=exponentialBackoff;function sleep(e){return new Promise(n=>setTimeout(n,e))}var jsonRpcProvider$1={},lib$4={},action_creators={},actions$1={};Object.defineProperty(actions$1,"__esModule",{value:!0});actions$1.Action=actions$1.SignedDelegate=actions$1.DeleteAccount=actions$1.DeleteKey=actions$1.AddKey=actions$1.Stake=actions$1.Transfer=actions$1.FunctionCall=actions$1.DeployContract=actions$1.CreateAccount=actions$1.IAction=actions$1.AccessKey=actions$1.AccessKeyPermission=actions$1.FullAccessPermission=actions$1.FunctionCallPermission=void 0;const types_1$f=lib$l;class Enum{constructor(n){if(Object.keys(n).length!==1)throw new Error("Enum can only take single value");Object.keys(n).map(o=>{this[o]=n[o],this.enum=o})}}class FunctionCallPermission extends types_1$f.Assignable{}actions$1.FunctionCallPermission=FunctionCallPermission;class FullAccessPermission extends types_1$f.Assignable{}actions$1.FullAccessPermission=FullAccessPermission;class AccessKeyPermission extends Enum{}actions$1.AccessKeyPermission=AccessKeyPermission;class AccessKey extends types_1$f.Assignable{}actions$1.AccessKey=AccessKey;class IAction extends types_1$f.Assignable{}actions$1.IAction=IAction;class CreateAccount extends IAction{}actions$1.CreateAccount=CreateAccount;class DeployContract extends IAction{}actions$1.DeployContract=DeployContract;class FunctionCall extends IAction{}actions$1.FunctionCall=FunctionCall;class Transfer extends IAction{}actions$1.Transfer=Transfer;class Stake extends IAction{}actions$1.Stake=Stake;class AddKey extends IAction{}actions$1.AddKey=AddKey;class DeleteKey extends IAction{}actions$1.DeleteKey=DeleteKey;class DeleteAccount extends IAction{}actions$1.DeleteAccount=DeleteAccount;class SignedDelegate extends IAction{}actions$1.SignedDelegate=SignedDelegate;class Action extends Enum{}actions$1.Action=Action;Object.defineProperty(action_creators,"__esModule",{value:!0});action_creators.actionCreators=action_creators.stringifyJsonOrBytes=void 0;const actions_1$2=actions$1;function fullAccessKey$2(){return new actions_1$2.AccessKey({nonce:0,permission:new actions_1$2.AccessKeyPermission({fullAccess:new actions_1$2.FullAccessPermission({})})})}function functionCallAccessKey$2(e,n,o){return new actions_1$2.AccessKey({nonce:0,permission:new actions_1$2.AccessKeyPermission({functionCall:new actions_1$2.FunctionCallPermission({receiverId:e,allowance:o,methodNames:n})})})}function createAccount$2(){return new actions_1$2.Action({createAccount:new actions_1$2.CreateAccount({})})}function deployContract$4(e){return new actions_1$2.Action({deployContract:new actions_1$2.DeployContract({code:e})})}function stringifyJsonOrBytes(e){return e.byteLength!==void 0&&e.byteLength===e.length?e:Buffer.from(JSON.stringify(e))}action_creators.stringifyJsonOrBytes=stringifyJsonOrBytes;function functionCall$4(e,n,o=BigInt(0),a=BigInt(0),c=stringifyJsonOrBytes,l=!1){return l?new actions_1$2.Action({functionCall:new actions_1$2.FunctionCall({methodName:e,args:n,gas:o,deposit:a})}):new actions_1$2.Action({functionCall:new actions_1$2.FunctionCall({methodName:e,args:c(n),gas:o,deposit:a})})}function transfer$2(e=BigInt(0)){return new actions_1$2.Action({transfer:new actions_1$2.Transfer({deposit:e})})}function stake$2(e=BigInt(0),n){return new actions_1$2.Action({stake:new actions_1$2.Stake({stake:e,publicKey:n})})}function addKey$3(e,n){return new actions_1$2.Action({addKey:new actions_1$2.AddKey({publicKey:e,accessKey:n})})}function deleteKey$3(e){return new actions_1$2.Action({deleteKey:new actions_1$2.DeleteKey({publicKey:e})})}function deleteAccount$2(e){return new actions_1$2.Action({deleteAccount:new actions_1$2.DeleteAccount({beneficiaryId:e})})}function signedDelegate({delegateAction:e,signature:n}){return new actions_1$2.Action({signedDelegate:new actions_1$2.SignedDelegate({delegateAction:e,signature:n})})}action_creators.actionCreators={addKey:addKey$3,createAccount:createAccount$2,deleteAccount:deleteAccount$2,deleteKey:deleteKey$3,deployContract:deployContract$4,fullAccessKey:fullAccessKey$2,functionCall:functionCall$4,functionCallAccessKey:functionCallAccessKey$2,signedDelegate,stake:stake$2,transfer:transfer$2};var create_transaction={},schema={},prefix={};Object.defineProperty(prefix,"__esModule",{value:{"ActionError":{"index":0,"kind":{"FunctionCallError":{"MethodResolveError":"MethodNotFound"}}}}
1 automatic refund step from the network not shown.
This page reads FastNEAR's public transaction index and stores nothing. This command asks a NEAR archival node for the same transaction and needs no keys.
curl -s https://archival-rpc.testnet.fastnear.com -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tx","params":{"tx_hash":"6Hgg7Q7TyE35oEkYfXJGgiU4ituihaAE5a9YL7kvjnce","sender_account_id":"sleetcreate.testnet","wait_until":"FINAL"}}'Vouch has its own page because testnet.nearblocks.io stopped indexing on 27 Sep 2026, so it can't show newer transactions.