triam-base
Version:
Low level triam network support library
2 lines • 367 kB
JavaScript
var StellarBase=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";t.exports=r(1),_.noConflict()},function(t,e,r){"use strict";function n(t,e){var r=e({},t);return delete r["default"],r}function i(t,e){for(var r=Object.getOwnPropertyNames(e),n=0;n<r.length;n++){var i=r[n],o=Object.getOwnPropertyDescriptor(e,i);o&&o.configurable&&void 0===t[i]&&Object.defineProperty(t,i,o)}return t}function o(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var u=r(2),a=o(u);e.xdr=a["default"];var s=r(41);Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return s.hash}});var c=r(51);Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return c.sign}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return c.verify}}),Object.defineProperty(e,"FastSigning",{enumerable:!0,get:function(){return c.FastSigning}});var f=r(54);Object.defineProperty(e,"Keypair",{enumerable:!0,get:function(){return f.Keypair}});var l=r(3);Object.defineProperty(e,"UnsignedHyper",{enumerable:!0,get:function(){return l.UnsignedHyper}}),Object.defineProperty(e,"Hyper",{enumerable:!0,get:function(){return l.Hyper}});var h=r(117);Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return h.Transaction}});var p=r(318);Object.defineProperty(e,"TransactionBuilder",{enumerable:!0,get:function(){return p.TransactionBuilder}});var d=r(119);Object.defineProperty(e,"Asset",{enumerable:!0,get:function(){return d.Asset}});var v=r(118);Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return v.Operation}}),Object.defineProperty(e,"AuthRequiredFlag",{enumerable:!0,get:function(){return v.AuthRequiredFlag}}),Object.defineProperty(e,"AuthRevocableFlag",{enumerable:!0,get:function(){return v.AuthRevocableFlag}}),Object.defineProperty(e,"AuthImmutableFlag",{enumerable:!0,get:function(){return v.AuthImmutableFlag}});var y=r(222);i(e,n(y,i));var g=r(319);Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return g.Account}});var _=r(55);Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return _.Network}}),Object.defineProperty(e,"Networks",{enumerable:!0,get:function(){return _.Networks}});var w=r(60);Object.defineProperty(e,"StrKey",{enumerable:!0,get:function(){return w.StrKey}}),e["default"]=t.exports},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e["default"]=t,e}Object.defineProperty(e,"__esModule",{value:!0});var i=r(3),o=n(i),u=o.config(function(t){t.typedef("Value",t.varOpaque()),t.struct("ScpBallot",[["counter",t.lookup("Uint32")],["value",t.lookup("Value")]]),t["enum"]("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),t.struct("ScpNomination",[["quorumSetHash",t.lookup("Hash")],["votes",t.varArray(t.lookup("Value"),2147483647)],["accepted",t.varArray(t.lookup("Value"),2147483647)]]),t.struct("ScpStatementPrepare",[["quorumSetHash",t.lookup("Hash")],["ballot",t.lookup("ScpBallot")],["prepared",t.option(t.lookup("ScpBallot"))],["preparedPrime",t.option(t.lookup("ScpBallot"))],["nC",t.lookup("Uint32")],["nH",t.lookup("Uint32")]]),t.struct("ScpStatementConfirm",[["ballot",t.lookup("ScpBallot")],["nPrepared",t.lookup("Uint32")],["nCommit",t.lookup("Uint32")],["nH",t.lookup("Uint32")],["quorumSetHash",t.lookup("Hash")]]),t.struct("ScpStatementExternalize",[["commit",t.lookup("ScpBallot")],["nH",t.lookup("Uint32")],["commitQuorumSetHash",t.lookup("Hash")]]),t.union("ScpStatementPledges",{switchOn:t.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:t.lookup("ScpStatementPrepare"),confirm:t.lookup("ScpStatementConfirm"),externalize:t.lookup("ScpStatementExternalize"),nominate:t.lookup("ScpNomination")}}),t.struct("ScpStatement",[["nodeId",t.lookup("NodeId")],["slotIndex",t.lookup("Uint64")],["pledges",t.lookup("ScpStatementPledges")]]),t.struct("ScpEnvelope",[["statement",t.lookup("ScpStatement")],["signature",t.lookup("Signature")]]),t.struct("ScpQuorumSet",[["threshold",t.lookup("Uint32")],["validators",t.varArray(t.lookup("PublicKey"),2147483647)],["innerSets",t.varArray(t.lookup("ScpQuorumSet"),2147483647)]]),t.typedef("AccountId",t.lookup("PublicKey")),t.typedef("Thresholds",t.opaque(4)),t.typedef("String32",t.string(32)),t.typedef("String64",t.string(64)),t.typedef("SequenceNumber",t.lookup("Uint64")),t.typedef("DataValue",t.varOpaque(64)),t["enum"]("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2}),t.struct("AssetAlphaNum4",[["assetCode",t.opaque(4)],["issuer",t.lookup("AccountId")]]),t.struct("AssetAlphaNum12",[["assetCode",t.opaque(12)],["issuer",t.lookup("AccountId")]]),t.union("Asset",{switchOn:t.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",t["void"]()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:t.lookup("AssetAlphaNum4"),alphaNum12:t.lookup("AssetAlphaNum12")}}),t.struct("Price",[["n",t.lookup("Int32")],["d",t.lookup("Int32")]]),t["enum"]("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),t["enum"]("LedgerEntryType",{account:0,trustline:1,offer:2,datum:3}),t.struct("Signer",[["key",t.lookup("SignerKey")],["weight",t.lookup("Uint32")]]),t["enum"]("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4}),t.union("AccountEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("AccountEntry",[["accountId",t.lookup("AccountId")],["balance",t.lookup("Int64")],["seqNum",t.lookup("SequenceNumber")],["numSubEntries",t.lookup("Uint32")],["inflationDest",t.option(t.lookup("AccountId"))],["flags",t.lookup("Uint32")],["homeDomain",t.lookup("String32")],["thresholds",t.lookup("Thresholds")],["signers",t.varArray(t.lookup("Signer"),20)],["ext",t.lookup("AccountEntryExt")]]),t["enum"]("TrustLineFlags",{authorizedFlag:1}),t.union("TrustLineEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("TrustLineEntry",[["accountId",t.lookup("AccountId")],["asset",t.lookup("Asset")],["balance",t.lookup("Int64")],["limit",t.lookup("Int64")],["flags",t.lookup("Uint32")],["ext",t.lookup("TrustLineEntryExt")]]),t["enum"]("OfferEntryFlags",{passiveFlag:1}),t.union("OfferEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("OfferEntry",[["sellerId",t.lookup("AccountId")],["offerId",t.lookup("Uint64")],["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["amount",t.lookup("Int64")],["price",t.lookup("Price")],["flags",t.lookup("Uint32")],["ext",t.lookup("OfferEntryExt")]]),t.union("DataEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("DataEntry",[["accountId",t.lookup("AccountId")],["dataName",t.lookup("String64")],["dataValue",t.lookup("DataValue")],["ext",t.lookup("DataEntryExt")]]),t.union("LedgerEntryData",{switchOn:t.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["datum","data"]],arms:{account:t.lookup("AccountEntry"),trustLine:t.lookup("TrustLineEntry"),offer:t.lookup("OfferEntry"),data:t.lookup("DataEntry")}}),t.union("LedgerEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("LedgerEntry",[["lastModifiedLedgerSeq",t.lookup("Uint32")],["data",t.lookup("LedgerEntryData")],["ext",t.lookup("LedgerEntryExt")]]),t["enum"]("EnvelopeType",{envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3}),t.typedef("UpgradeType",t.varOpaque(128)),t.union("StellarValueExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("StellarValue",[["txSetHash",t.lookup("Hash")],["closeTime",t.lookup("Uint64")],["upgrades",t.varArray(t.lookup("UpgradeType"),6)],["ext",t.lookup("StellarValueExt")]]),t.union("LedgerHeaderExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("LedgerHeader",[["ledgerVersion",t.lookup("Uint32")],["previousLedgerHash",t.lookup("Hash")],["scpValue",t.lookup("StellarValue")],["txSetResultHash",t.lookup("Hash")],["bucketListHash",t.lookup("Hash")],["ledgerSeq",t.lookup("Uint32")],["totalCoins",t.lookup("Int64")],["feePool",t.lookup("Int64")],["inflationSeq",t.lookup("Uint32")],["idPool",t.lookup("Uint64")],["baseFee",t.lookup("Uint32")],["baseReserve",t.lookup("Uint32")],["maxTxSetSize",t.lookup("Uint32")],["skipList",t.array(t.lookup("Hash"),4)],["ext",t.lookup("LedgerHeaderExt")]]),t["enum"]("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3}),t.union("LedgerUpgrade",{switchOn:t.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"]],arms:{newLedgerVersion:t.lookup("Uint32"),newBaseFee:t.lookup("Uint32"),newMaxTxSetSize:t.lookup("Uint32")}}),t.struct("LedgerKeyAccount",[["accountId",t.lookup("AccountId")]]),t.struct("LedgerKeyTrustLine",[["accountId",t.lookup("AccountId")],["asset",t.lookup("Asset")]]),t.struct("LedgerKeyOffer",[["sellerId",t.lookup("AccountId")],["offerId",t.lookup("Uint64")]]),t.struct("LedgerKeyData",[["accountId",t.lookup("AccountId")],["dataName",t.lookup("String64")]]),t.union("LedgerKey",{switchOn:t.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["datum","data"]],arms:{account:t.lookup("LedgerKeyAccount"),trustLine:t.lookup("LedgerKeyTrustLine"),offer:t.lookup("LedgerKeyOffer"),data:t.lookup("LedgerKeyData")}}),t["enum"]("BucketEntryType",{liveentry:0,deadentry:1}),t.union("BucketEntry",{switchOn:t.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["deadentry","deadEntry"]],arms:{liveEntry:t.lookup("LedgerEntry"),deadEntry:t.lookup("LedgerKey")}}),t.struct("TransactionSet",[["previousLedgerHash",t.lookup("Hash")],["txes",t.varArray(t.lookup("TransactionEnvelope"),2147483647)]]),t.struct("TransactionResultPair",[["transactionHash",t.lookup("Hash")],["result",t.lookup("TransactionResult")]]),t.struct("TransactionResultSet",[["results",t.varArray(t.lookup("TransactionResultPair"),2147483647)]]),t.union("TransactionHistoryEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("TransactionHistoryEntry",[["ledgerSeq",t.lookup("Uint32")],["txSet",t.lookup("TransactionSet")],["ext",t.lookup("TransactionHistoryEntryExt")]]),t.union("TransactionHistoryResultEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("TransactionHistoryResultEntry",[["ledgerSeq",t.lookup("Uint32")],["txResultSet",t.lookup("TransactionResultSet")],["ext",t.lookup("TransactionHistoryResultEntryExt")]]),t.union("LedgerHeaderHistoryEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("LedgerHeaderHistoryEntry",[["hash",t.lookup("Hash")],["header",t.lookup("LedgerHeader")],["ext",t.lookup("LedgerHeaderHistoryEntryExt")]]),t.struct("LedgerScpMessages",[["ledgerSeq",t.lookup("Uint32")],["messages",t.varArray(t.lookup("ScpEnvelope"),2147483647)]]),t.struct("ScpHistoryEntryV0",[["quorumSets",t.varArray(t.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",t.lookup("LedgerScpMessages")]]),t.union("ScpHistoryEntry",{switchOn:t.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:t.lookup("ScpHistoryEntryV0")}}),t["enum"]("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),t.union("LedgerEntryChange",{switchOn:t.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:t.lookup("LedgerEntry"),updated:t.lookup("LedgerEntry"),removed:t.lookup("LedgerKey"),state:t.lookup("LedgerEntry")}}),t.typedef("LedgerEntryChanges",t.varArray(t.lookup("LedgerEntryChange"),2147483647)),t.struct("OperationMeta",[["changes",t.lookup("LedgerEntryChanges")]]),t.union("TransactionMeta",{switchOn:t.int(),switchName:"v",switches:[[0,"operations"]],arms:{operations:t.varArray(t.lookup("OperationMeta"),2147483647)}}),t["enum"]("ErrorCode",{errMisc:0,errDatum:1,errConf:2,errAuth:3,errLoad:4}),t.struct("Error",[["code",t.lookup("ErrorCode")],["msg",t.string(100)]]),t.struct("AuthCert",[["pubkey",t.lookup("Curve25519Public")],["expiration",t.lookup("Uint64")],["sig",t.lookup("Signature")]]),t.struct("Hello",[["ledgerVersion",t.lookup("Uint32")],["overlayVersion",t.lookup("Uint32")],["overlayMinVersion",t.lookup("Uint32")],["networkId",t.lookup("Hash")],["versionStr",t.string(100)],["listeningPort",t.int()],["peerId",t.lookup("NodeId")],["cert",t.lookup("AuthCert")],["nonce",t.lookup("Uint256")]]),t.struct("Auth",[["unused",t.int()]]),t["enum"]("IpAddrType",{iPv4:0,iPv6:1}),t.union("PeerAddressIp",{switchOn:t.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:t.opaque(4),ipv6:t.opaque(16)}}),t.struct("PeerAddress",[["ip",t.lookup("PeerAddressIp")],["port",t.lookup("Uint32")],["numFailures",t.lookup("Uint32")]]),t["enum"]("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeer:4,peer:5,getTxSet:6,txSet:7,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13}),t.struct("DontHave",[["type",t.lookup("MessageType")],["reqHash",t.lookup("Uint256")]]),t.union("StellarMessage",{switchOn:t.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeer",t["void"]()],["peer","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["transaction","transaction"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"]],arms:{error:t.lookup("Error"),hello:t.lookup("Hello"),auth:t.lookup("Auth"),dontHave:t.lookup("DontHave"),peers:t.varArray(t.lookup("PeerAddress"),2147483647),txSetHash:t.lookup("Uint256"),txSet:t.lookup("TransactionSet"),transaction:t.lookup("TransactionEnvelope"),qSetHash:t.lookup("Uint256"),qSet:t.lookup("ScpQuorumSet"),envelope:t.lookup("ScpEnvelope"),getScpLedgerSeq:t.lookup("Uint32")}}),t.struct("AuthenticatedMessageV0",[["sequence",t.lookup("Uint64")],["message",t.lookup("StellarMessage")],["mac",t.lookup("HmacSha256Mac")]]),t.union("AuthenticatedMessage",{switchOn:t.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:t.lookup("AuthenticatedMessageV0")}}),t.struct("DecoratedSignature",[["hint",t.lookup("SignatureHint")],["signature",t.lookup("Signature")]]),t["enum"]("OperationType",{createAccount:0,payment:1,pathPayment:2,manageOffer:3,createPassiveOffer:4,setOption:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageDatum:10}),t.struct("CreateAccountOp",[["destination",t.lookup("AccountId")],["startingBalance",t.lookup("Int64")]]),t.struct("PaymentOp",[["destination",t.lookup("AccountId")],["asset",t.lookup("Asset")],["amount",t.lookup("Int64")]]),t.struct("PathPaymentOp",[["sendAsset",t.lookup("Asset")],["sendMax",t.lookup("Int64")],["destination",t.lookup("AccountId")],["destAsset",t.lookup("Asset")],["destAmount",t.lookup("Int64")],["path",t.varArray(t.lookup("Asset"),5)]]),t.struct("ManageOfferOp",[["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["amount",t.lookup("Int64")],["price",t.lookup("Price")],["offerId",t.lookup("Uint64")]]),t.struct("CreatePassiveOfferOp",[["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["amount",t.lookup("Int64")],["price",t.lookup("Price")]]),t.struct("SetOptionsOp",[["inflationDest",t.option(t.lookup("AccountId"))],["clearFlags",t.option(t.lookup("Uint32"))],["setFlags",t.option(t.lookup("Uint32"))],["masterWeight",t.option(t.lookup("Uint32"))],["lowThreshold",t.option(t.lookup("Uint32"))],["medThreshold",t.option(t.lookup("Uint32"))],["highThreshold",t.option(t.lookup("Uint32"))],["homeDomain",t.option(t.lookup("String32"))],["signer",t.option(t.lookup("Signer"))]]),t.struct("ChangeTrustOp",[["line",t.lookup("Asset")],["limit",t.lookup("Int64")]]),t.union("AllowTrustOpAsset",{switchOn:t.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:t.opaque(4),assetCode12:t.opaque(12)}}),t.struct("AllowTrustOp",[["trustor",t.lookup("AccountId")],["asset",t.lookup("AllowTrustOpAsset")],["authorize",t.bool()]]),t.struct("ManageDataOp",[["dataName",t.lookup("String64")],["dataValue",t.option(t.lookup("DataValue"))]]),t.union("OperationBody",{switchOn:t.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPayment","pathPaymentOp"],["manageOffer","manageOfferOp"],["createPassiveOffer","createPassiveOfferOp"],["setOption","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",t["void"]()],["manageDatum","manageDataOp"]],arms:{createAccountOp:t.lookup("CreateAccountOp"),paymentOp:t.lookup("PaymentOp"),pathPaymentOp:t.lookup("PathPaymentOp"),manageOfferOp:t.lookup("ManageOfferOp"),createPassiveOfferOp:t.lookup("CreatePassiveOfferOp"),setOptionsOp:t.lookup("SetOptionsOp"),changeTrustOp:t.lookup("ChangeTrustOp"),allowTrustOp:t.lookup("AllowTrustOp"),destination:t.lookup("AccountId"),manageDataOp:t.lookup("ManageDataOp")}}),t.struct("Operation",[["sourceAccount",t.option(t.lookup("AccountId"))],["body",t.lookup("OperationBody")]]),t["enum"]("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),t.union("Memo",{switchOn:t.lookup("MemoType"),switchName:"type",switches:[["memoNone",t["void"]()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:t.string(28),id:t.lookup("Uint64"),hash:t.lookup("Hash"),retHash:t.lookup("Hash")}}),t.struct("TimeBounds",[["minTime",t.lookup("Uint64")],["maxTime",t.lookup("Uint64")]]),t.union("TransactionExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("Transaction",[["sourceAccount",t.lookup("AccountId")],["fee",t.lookup("Uint32")],["seqNum",t.lookup("SequenceNumber")],["timeBounds",t.option(t.lookup("TimeBounds"))],["memo",t.lookup("Memo")],["operations",t.varArray(t.lookup("Operation"),100)],["ext",t.lookup("TransactionExt")]]),t.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:t.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"]],arms:{tx:t.lookup("Transaction")}}),t.struct("TransactionSignaturePayload",[["networkId",t.lookup("Hash")],["taggedTransaction",t.lookup("TransactionSignaturePayloadTaggedTransaction")]]),t.struct("TransactionEnvelope",[["tx",t.lookup("Transaction")],["signatures",t.varArray(t.lookup("DecoratedSignature"),20)]]),t.struct("ClaimOfferAtom",[["sellerId",t.lookup("AccountId")],["offerId",t.lookup("Uint64")],["assetSold",t.lookup("Asset")],["amountSold",t.lookup("Int64")],["assetBought",t.lookup("Asset")],["amountBought",t.lookup("Int64")]]),t["enum"]("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),t.union("CreateAccountResult",{switchOn:t.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",t["void"]()]],arms:{},defaultArm:t["void"]()}),t["enum"]("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),t.union("PaymentResult",{switchOn:t.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",t["void"]()]],arms:{},defaultArm:t["void"]()}),t["enum"]("PathPaymentResultCode",{pathPaymentSuccess:0,pathPaymentMalformed:-1,pathPaymentUnderfunded:-2,pathPaymentSrcNoTrust:-3,pathPaymentSrcNotAuthorized:-4,pathPaymentNoDestination:-5,pathPaymentNoTrust:-6,pathPaymentNotAuthorized:-7,pathPaymentLineFull:-8,pathPaymentNoIssuer:-9,pathPaymentTooFewOffer:-10,pathPaymentOfferCrossSelf:-11,pathPaymentOverSendmax:-12}),t.struct("SimplePaymentResult",[["destination",t.lookup("AccountId")],["asset",t.lookup("Asset")],["amount",t.lookup("Int64")]]),t.struct("PathPaymentResultSuccess",[["offers",t.varArray(t.lookup("ClaimOfferAtom"),2147483647)],["last",t.lookup("SimplePaymentResult")]]),t.union("PathPaymentResult",{switchOn:t.lookup("PathPaymentResultCode"),switchName:"code",switches:[["pathPaymentSuccess","success"],["pathPaymentNoIssuer","noIssuer"]],arms:{success:t.lookup("PathPaymentResultSuccess"),noIssuer:t.lookup("Asset")},defaultArm:t["void"]()}),t["enum"]("ManageOfferResultCode",{manageOfferSuccess:0,manageOfferMalformed:-1,manageOfferSellNoTrust:-2,manageOfferBuyNoTrust:-3,manageOfferSellNotAuthorized:-4,manageOfferBuyNotAuthorized:-5,manageOfferLineFull:-6,manageOfferUnderfunded:-7,manageOfferCrossSelf:-8,manageOfferSellNoIssuer:-9,manageOfferBuyNoIssuer:-10,manageOfferNotFound:-11,manageOfferLowReserve:-12}),t["enum"]("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),t.union("ManageOfferSuccessResultOffer",{switchOn:t.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"]],arms:{offer:t.lookup("OfferEntry")},defaultArm:t["void"]()}),t.struct("ManageOfferSuccessResult",[["offersClaimed",t.varArray(t.lookup("ClaimOfferAtom"),2147483647)],["offer",t.lookup("ManageOfferSuccessResultOffer")]]),t.union("ManageOfferResult",{switchOn:t.lookup("ManageOfferResultCode"),switchName:"code",switches:[["manageOfferSuccess","success"]],arms:{success:t.lookup("ManageOfferSuccessResult")},defaultArm:t["void"]()}),t["enum"]("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigner:-2,setOptionsBadFlag:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9}),t.union("SetOptionsResult",{switchOn:t.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",t["void"]()]],arms:{},defaultArm:t["void"]()}),t["enum"]("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5}),t.union("ChangeTrustResult",{switchOn:t.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",t["void"]()]],arms:{},defaultArm:t["void"]()}),t["enum"]("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5}),t.union("AllowTrustResult",{switchOn:t.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",t["void"]()]],arms:{},defaultArm:t["void"]()}),t["enum"]("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntry:-4}),t.union("AccountMergeResult",{switchOn:t.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"]],arms:{sourceAccountBalance:t.lookup("Int64")},defaultArm:t["void"]()}),t["enum"]("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),t.struct("InflationPayout",[["destination",t.lookup("AccountId")],["amount",t.lookup("Int64")]]),t.union("InflationResult",{switchOn:t.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"]],arms:{payouts:t.varArray(t.lookup("InflationPayout"),2147483647)},defaultArm:t["void"]()}),t["enum"]("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),t.union("ManageDataResult",{switchOn:t.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",t["void"]()]],arms:{},defaultArm:t["void"]()}),t["enum"]("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2}),t.union("OperationResultTr",{switchOn:t.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPayment","pathPaymentResult"],["manageOffer","manageOfferResult"],["createPassiveOffer","createPassiveOfferResult"],["setOption","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageDatum","manageDataResult"]],arms:{createAccountResult:t.lookup("CreateAccountResult"),paymentResult:t.lookup("PaymentResult"),pathPaymentResult:t.lookup("PathPaymentResult"),manageOfferResult:t.lookup("ManageOfferResult"),createPassiveOfferResult:t.lookup("ManageOfferResult"),setOptionsResult:t.lookup("SetOptionsResult"),changeTrustResult:t.lookup("ChangeTrustResult"),allowTrustResult:t.lookup("AllowTrustResult"),accountMergeResult:t.lookup("AccountMergeResult"),inflationResult:t.lookup("InflationResult"),manageDataResult:t.lookup("ManageDataResult")}}),t.union("OperationResult",{switchOn:t.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"]],arms:{tr:t.lookup("OperationResultTr")},defaultArm:t["void"]()}),t["enum"]("TransactionResultCode",{txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11}),t.union("TransactionResultResult",{switchOn:t.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"]],arms:{results:t.varArray(t.lookup("OperationResult"),2147483647)},defaultArm:t["void"]()}),t.union("TransactionResultExt",{switchOn:t.int(),switchName:"v",switches:[[0,t["void"]()]],arms:{}}),t.struct("TransactionResult",[["feeCharged",t.lookup("Int64")],["result",t.lookup("TransactionResultResult")],["ext",t.lookup("TransactionResultExt")]]),t.typedef("Hash",t.opaque(32)),t.typedef("Uint256",t.opaque(32)),t.typedef("Uint32",t.uint()),t.typedef("Int32",t.int()),t.typedef("Uint64",t.uhyper()),t.typedef("Int64",t.hyper()),t["enum"]("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2}),t["enum"]("PublicKeyType",{publicKeyTypeEd25519:0}),t["enum"]("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2}),t.union("PublicKey",{switchOn:t.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:t.lookup("Uint256")}}),t.union("SignerKey",{switchOn:t.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"]],arms:{ed25519:t.lookup("Uint256"),preAuthTx:t.lookup("Uint256"),hashX:t.lookup("Uint256")}}),t.typedef("Signature",t.varOpaque(64)),t.typedef("SignatureHint",t.opaque(4)),t.typedef("NodeId",t.lookup("PublicKey")),t.struct("Curve25519Secret",[["key",t.opaque(32)]]),t.struct("Curve25519Public",[["key",t.opaque(32)]]),t.struct("HmacSha256Key",[["key",t.opaque(32)]]),t.struct("HmacSha256Mac",[["mac",t.opaque(32)]])});e["default"]=u,t.exports=e["default"]},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){for(var r=Object.getOwnPropertyNames(e),n=0;n<r.length;n++){var i=r[n],o=Object.getOwnPropertyDescriptor(e,i);o&&o.configurable&&void 0===t[i]&&Object.defineProperty(t,i,o)}return t};Object.defineProperty(e,"__esModule",{value:!0}),i(e,n(r(4)));var o=r(38);i(e,n(o));o.config},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{"default":t}},i=function(t,e){for(var r=Object.getOwnPropertyNames(e),n=0;n<r.length;n++){var i=r[n],o=Object.getOwnPropertyDescriptor(e,i);o&&o.configurable&&void 0===t[i]&&Object.defineProperty(t,i,o)}return t};Object.defineProperty(e,"__esModule",{value:!0}),i(e,n(r(5))),i(e,n(r(20))),i(e,n(r(23))),i(e,n(r(24))),i(e,n(r(25))),i(e,n(r(26))),i(e,n(r(27))),i(e,n(r(28))),i(e,n(r(29))),i(e,n(r(30))),i(e,n(r(31))),i(e,n(r(32))),i(e,n(r(33))),i(e,n(r(34))),i(e,n(r(35))),i(e,n(r(36))),i(e,n(r(37))),i(e,n(r(40)))},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t["default"]:t};Object.defineProperty(e,"__esModule",{value:!0});var i=r(6).isNumber,o=n(r(8)),u={read:function(t){return t.readInt32BE()},write:function(t,e){if(!i(t))throw new Error("XDR Write Error: not a number");if(Math.floor(t)!==t)throw new Error("XDR Write Error: not an integer");e.writeInt32BE(t)},isValid:function(t){return i(t)?Math.floor(t)!==t?!1:t>=u.MIN_VALUE&&t<=u.MAX_VALUE:!1}};e.Int=u,u.MAX_VALUE=Math.pow(2,31)-1,u.MIN_VALUE=-Math.pow(2,31),o(u)},function(t,e,r){var n;(function(t,i){(function(){function o(t,e){if(t!==e){var r=null===t,n=t===O,i=t===t,o=null===e,u=e===O,a=e===e;if(t>e&&!o||!i||r&&!u&&a||n&&a)return 1;if(e>t&&!r||!a||o&&!n&&i||u&&i)return-1}return 0}function u(t,e,r){for(var n=t.length,i=r?n:-1;r?i--:++i<n;)if(e(t[i],i,t))return i;return-1}function a(t,e,r){if(e!==e)return _(t,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function s(t){return"function"==typeof t||!1}function c(t){return null==t?"":t+""}function f(t,e){for(var r=-1,n=t.length;++r<n&&e.indexOf(t.charAt(r))>-1;);return r}function l(t,e){for(var r=t.length;r--&&e.indexOf(t.charAt(r))>-1;);return r}function h(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function p(t,e,r){for(var n=-1,i=t.criteria,u=e.criteria,a=i.length,s=r.length;++n<a;){var c=o(i[n],u[n]);if(c){if(n>=s)return c;var f=r[n];return c*("asc"===f||f===!0?1:-1)}}return t.index-e.index}function d(t){return Xe[t]}function v(t){return We[t]}function y(t,e,r){return e?t=Ge[t]:r&&(t=Ze[t]),"\\"+t}function g(t){return"\\"+Ze[t]}function _(t,e,r){for(var n=t.length,i=e+(r?0:-1);r?i--:++i<n;){var o=t[i];if(o!==o)return i}return-1}function w(t){return!!t&&"object"==typeof t}function m(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function b(t,e){for(var r=-1,n=t.length,i=-1,o=[];++r<n;)t[r]===e&&(t[r]=X,o[++i]=r);return o}function E(t,e){for(var r,n=-1,i=t.length,o=-1,u=[];++n<i;){var a=t[n],s=e?e(a,n,t):a;n&&r===s||(r=s,u[++o]=a)}return u}function k(t){for(var e=-1,r=t.length;++e<r&&m(t.charCodeAt(e)););return e}function x(t){for(var e=t.length;e--&&m(t.charCodeAt(e)););return e}function A(t){return Ye[t]}function S(t){function e(t){if(w(t)&&!Is(t)&&!(t instanceof i)){if(t instanceof n)return t;if(ea.call(t,"__chain__")&&ea.call(t,"__wrapped__"))return pi(t)}return new n(t)}function r(){}function n(t,e,r){this.__wrapped__=t,this.__actions__=r||[],this.__chain__=!!e}function i(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ta,this.__views__=[]}function m(){var t=new i(this.__wrapped__);return t.__actions__=tr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=tr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=tr(this.__views__),t}function Q(){if(this.__filtered__){var t=new i(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function ne(){var t=this.__wrapped__.value(),e=this.__dir__,r=Is(t),n=0>e,i=r?t.length:0,o=Xn(0,i,this.__views__),u=o.start,a=o.end,s=a-u,c=n?a:u-1,f=this.__iteratees__,l=f.length,h=0,p=ka(s,this.__takeCount__);if(!r||F>i||i==s&&p==s)return rn(n&&r?t.reverse():t,this.__actions__);var d=[];t:for(;s--&&p>h;){c+=e;for(var v=-1,y=t[c];++v<l;){var g=f[v],_=g.iteratee,w=g.type,m=_(y);
if(w==q)y=m;else if(!m){if(w==H)continue t;break t}}d[h++]=y}return d}function oe(){this.__data__={}}function Xe(t){return this.has(t)&&delete this.__data__[t]}function We(t){return"__proto__"==t?O:this.__data__[t]}function Ye(t){return"__proto__"!=t&&ea.call(this.__data__,t)}function $e(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Ge(t){var e=t?t.length:0;for(this.data={hash:ga(null),set:new la};e--;)this.push(t[e])}function Ze(t,e){var r=t.data,n="string"==typeof e||Uo(e)?r.set.has(e):r.hash[e];return n?0:-1}function Je(t){var e=this.data;"string"==typeof t||Uo(t)?e.set.add(t):e.hash[t]=!0}function Qe(t,e){for(var r=-1,n=t.length,i=-1,o=e.length,u=Vu(n+o);++r<n;)u[r]=t[r];for(;++i<o;)u[r++]=e[i];return u}function tr(t,e){var r=-1,n=t.length;for(e||(e=Vu(n));++r<n;)e[r]=t[r];return e}function er(t,e){for(var r=-1,n=t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function rr(t,e){for(var r=t.length;r--&&e(t[r],r,t)!==!1;);return t}function or(t,e){for(var r=-1,n=t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function ur(t,e,r,n){for(var i=-1,o=t.length,u=n,a=u;++i<o;){var s=t[i],c=+e(s);r(c,u)&&(u=c,a=s)}return a}function ar(t,e){for(var r=-1,n=t.length,i=-1,o=[];++r<n;){var u=t[r];e(u,r,t)&&(o[++i]=u)}return o}function sr(t,e){for(var r=-1,n=t.length,i=Vu(n);++r<n;)i[r]=e(t[r],r,t);return i}function cr(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function fr(t,e,r,n){var i=-1,o=t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function lr(t,e,r,n){var i=t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function hr(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function pr(t,e){for(var r=t.length,n=0;r--;)n+=+e(t[r])||0;return n}function dr(t,e){return t===O?e:t}function vr(t,e,r,n){return t!==O&&ea.call(n,r)?t:e}function yr(t,e,r){for(var n=-1,i=Ks(e),o=i.length;++n<o;){var u=i[n],a=t[u],s=r(a,e[u],u,t,e);(s===s?s===a:a!==a)&&(a!==O||u in t)||(t[u]=s)}return t}function gr(t,e){return null==e?t:wr(e,Ks(e),t)}function _r(t,e){for(var r=-1,n=null==t,i=!n&&Zn(t),o=i?t.length:0,u=e.length,a=Vu(u);++r<u;){var s=e[r];a[r]=i?Jn(s,o)?t[s]:O:n?O:t[s]}return a}function wr(t,e,r){r||(r={});for(var n=-1,i=e.length;++n<i;){var o=e[n];r[o]=t[o]}return r}function mr(t,e,r){var n=typeof t;return"function"==n?e===O?t:un(t,e,r):null==t?Tu:"object"==n?Dr(t):e===O?ju(t):Kr(t,e)}function br(t,e,r,n,i,o,u){var a;if(r&&(a=i?r(t,n,i):r(t)),a!==O)return a;if(!Uo(t))return t;var s=Is(t);if(s){if(a=Wn(t),!e)return tr(t,a)}else{var c=na.call(t),f=c==J;if(c!=ee&&c!=W&&(!f||i))return ze[c]?$n(t,c,e):i?t:{};if(a=Yn(f?{}:t),!e)return gr(a,t)}o||(o=[]),u||(u=[]);for(var l=o.length;l--;)if(o[l]==t)return u[l];return o.push(t),u.push(a),(s?er:Rr)(t,function(n,i){a[i]=br(n,e,r,i,t,o,u)}),a}function Er(t,e,r){if("function"!=typeof t)throw new Gu(z);return ha(function(){t.apply(O,r)},e)}function kr(t,e){var r=t?t.length:0,n=[];if(!r)return n;var i=-1,o=Hn(),u=o==a,s=u&&e.length>=F?vn(e):null,c=e.length;s&&(o=Ze,u=!1,e=s);t:for(;++i<r;){var f=t[i];if(u&&f===f){for(var l=c;l--;)if(e[l]===f)continue t;n.push(f)}else o(e,f,0)<0&&n.push(f)}return n}function xr(t,e){var r=!0;return Na(t,function(t,n,i){return r=!!e(t,n,i)}),r}function Ar(t,e,r,n){var i=n,o=i;return Na(t,function(t,u,a){var s=+e(t,u,a);(r(s,i)||s===n&&s===o)&&(i=s,o=t)}),o}function Sr(t,e,r,n){var i=t.length;for(r=null==r?0:+r||0,0>r&&(r=-r>i?0:i+r),n=n===O||n>i?i:+n||0,0>n&&(n+=i),i=r>n?0:n>>>0,r>>>=0;i>r;)t[r++]=e;return t}function Or(t,e){var r=[];return Na(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}function Tr(t,e,r,n){var i;return r(t,function(t,r,o){return e(t,r,o)?(i=n?r:t,!1):void 0}),i}function Ir(t,e,r,n){n||(n=[]);for(var i=-1,o=t.length;++i<o;){var u=t[i];w(u)&&Zn(u)&&(r||Is(u)||So(u))?e?Ir(u,e,r,n):cr(n,u):r||(n[n.length]=u)}return n}function Br(t,e){return Ca(t,e,eu)}function Rr(t,e){return Ca(t,e,Ks)}function Mr(t,e){return Da(t,e,Ks)}function Pr(t,e){for(var r=-1,n=e.length,i=-1,o=[];++r<n;){var u=e[r];jo(t[u])&&(o[++i]=u)}return o}function jr(t,e,r){if(null!=t){r!==O&&r in li(t)&&(e=[r]);for(var n=0,i=e.length;null!=t&&i>n;)t=t[e[n++]];return n&&n==i?t:O}}function Ur(t,e,r,n,i,o){return t===e?!0:null==t||null==e||!Uo(t)&&!w(e)?t!==t&&e!==e:Nr(t,e,Ur,r,n,i,o)}function Nr(t,e,r,n,i,o,u){var a=Is(t),s=Is(e),c=Y,f=Y;a||(c=na.call(t),c==W?c=ee:c!=ee&&(a=qo(t))),s||(f=na.call(e),f==W?f=ee:f!=ee&&(s=qo(e)));var l=c==ee,h=f==ee,p=c==f;if(p&&!a&&!l)return Dn(t,e,c);if(!i){var d=l&&ea.call(t,"__wrapped__"),v=h&&ea.call(e,"__wrapped__");if(d||v)return r(d?t.value():t,v?e.value():e,n,i,o,u)}if(!p)return!1;o||(o=[]),u||(u=[]);for(var y=o.length;y--;)if(o[y]==t)return u[y]==e;o.push(t),u.push(e);var g=(a?Cn:Kn)(t,e,r,n,i,o,u);return o.pop(),u.pop(),g}function Lr(t,e,r){var n=e.length,i=n,o=!r;if(null==t)return!i;for(t=li(t);n--;){var u=e[n];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++n<i;){u=e[n];var a=u[0],s=t[a],c=u[1];if(o&&u[2]){if(s===O&&!(a in t))return!1}else{var f=r?r(s,c,a):O;if(!(f===O?Ur(c,s,r,!0):f))return!1}}return!0}function Cr(t,e){var r=-1,n=Zn(t)?Vu(t.length):[];return Na(t,function(t,i,o){n[++r]=e(t,i,o)}),n}function Dr(t){var e=qn(t);if(1==e.length&&e[0][2]){var r=e[0][0],n=e[0][1];return function(t){return null==t?!1:t[r]===n&&(n!==O||r in li(t))}}return function(t){return Lr(t,e)}}function Kr(t,e){var r=Is(t),n=ti(t)&&ni(e),i=t+"";return t=hi(t),function(o){if(null==o)return!1;var u=i;if(o=li(o),!(!r&&n||u in o)){if(o=1==t.length?o:jr(o,Yr(t,0,-1)),null==o)return!1;u=Si(t),o=li(o)}return o[u]===e?e!==O||u in o:Ur(e,o[u],O,!0)}}function Vr(t,e,r,n,i){if(!Uo(t))return t;var o=Zn(e)&&(Is(e)||qo(e)),u=o?O:Ks(e);return er(u||e,function(a,s){if(u&&(s=a,a=e[s]),w(a))n||(n=[]),i||(i=[]),Fr(t,e,s,Vr,r,n,i);else{var c=t[s],f=r?r(c,a,s,t,e):O,l=f===O;l&&(f=a),f===O&&(!o||s in t)||!l&&(f===f?f===c:c!==c)||(t[s]=f)}}),t}function Fr(t,e,r,n,i,o,u){for(var a=o.length,s=e[r];a--;)if(o[a]==s)return t[r]=u[a],void 0;var c=t[r],f=i?i(c,s,r,t,e):O,l=f===O;l&&(f=s,Zn(s)&&(Is(s)||qo(s))?f=Is(c)?c:Zn(c)?tr(c):[]:Vo(s)||So(s)?f=So(c)?$o(c):Vo(c)?c:{}:l=!1),o.push(s),u.push(f),l?t[r]=n(f,s,i,o,u):(f===f?f!==c:c===c)&&(t[r]=f)}function Hr(t){return function(e){return null==e?O:e[t]}}function qr(t){var e=t+"";return t=hi(t),function(r){return jr(r,t,e)}}function zr(t,e){for(var r=t?e.length:0;r--;){var n=e[r];if(n!=i&&Jn(n)){var i=n;pa.call(t,n,1)}}return t}function Xr(t,e){return t+_a(Sa()*(e-t+1))}function Wr(t,e,r,n,i){return i(t,function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)}),r}function Yr(t,e,r){var n=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),r=r===O||r>i?i:+r||0,0>r&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Vu(i);++n<i;)o[n]=t[n+e];return o}function $r(t,e){var r;return Na(t,function(t,n,i){return r=e(t,n,i),!r}),!!r}function Gr(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function Zr(t,e,r){var n=Vn(),i=-1;e=sr(e,function(t){return n(t)});var o=Cr(t,function(t){var r=sr(e,function(e){return e(t)});return{criteria:r,index:++i,value:t}});return Gr(o,function(t,e){return p(t,e,r)})}function Jr(t,e){var r=0;return Na(t,function(t,n,i){r+=+e(t,n,i)||0}),r}function Qr(t,e){var r=-1,n=Hn(),i=t.length,o=n==a,u=o&&i>=F,s=u?vn():null,c=[];s?(n=Ze,o=!1):(u=!1,s=e?[]:c);t:for(;++r<i;){var f=t[r],l=e?e(f,r,t):f;if(o&&f===f){for(var h=s.length;h--;)if(s[h]===l)continue t;e&&s.push(l),c.push(f)}else n(s,l,0)<0&&((e||u)&&s.push(l),c.push(f))}return c}function tn(t,e){for(var r=-1,n=e.length,i=Vu(n);++r<n;)i[r]=t[e[r]];return i}function en(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?Yr(t,n?0:o,n?o+1:i):Yr(t,n?o+1:0,n?i:o)}function rn(t,e){var r=t;r instanceof i&&(r=r.value());for(var n=-1,o=e.length;++n<o;){var u=e[n];r=u.func.apply(u.thisArg,cr([r],u.args))}return r}function nn(t,e,r){var n=0,i=t?t.length:n;if("number"==typeof e&&e===e&&Ra>=i){for(;i>n;){var o=n+i>>>1,u=t[o];(r?e>=u:e>u)&&null!==u?n=o+1:i=o}return i}return on(t,e,Tu,r)}function on(t,e,r,n){e=r(e);for(var i=0,o=t?t.length:0,u=e!==e,a=null===e,s=e===O;o>i;){var c=_a((i+o)/2),f=r(t[c]),l=f!==O,h=f===f;if(u)var p=h||n;else p=a?h&&l&&(n||null!=f):s?h&&(n||l):null==f?!1:n?e>=f:e>f;p?i=c+1:o=c}return ka(o,Ba)}function un(t,e,r){if("function"!=typeof t)return Tu;if(e===O)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,o){return t.call(e,r,n,i,o)};case 5:return function(r,n,i,o,u){return t.call(e,r,n,i,o,u)}}return function(){return t.apply(e,arguments)}}function an(t){var e=new ua(t.byteLength),r=new da(e);return r.set(new da(t)),e}function sn(t,e,r){for(var n=r.length,i=-1,o=Ea(t.length-n,0),u=-1,a=e.length,s=Vu(a+o);++u<a;)s[u]=e[u];for(;++i<n;)s[r[i]]=t[i];for(;o--;)s[u++]=t[i++];return s}function cn(t,e,r){for(var n=-1,i=r.length,o=-1,u=Ea(t.length-i,0),a=-1,s=e.length,c=Vu(u+s);++o<u;)c[o]=t[o];for(var f=o;++a<s;)c[f+a]=e[a];for(;++n<i;)c[f+r[n]]=t[o++];return c}function fn(t,e){return function(r,n,i){var o=e?e():{};if(n=Vn(n,i,3),Is(r))for(var u=-1,a=r.length;++u<a;){var s=r[u];t(o,s,n(s,u,r),r)}else Na(r,function(e,r,i){t(o,e,n(e,r,i),i)});return o}}function ln(t){return _o(function(e,r){var n=-1,i=null==e?0:r.length,o=i>2?r[i-2]:O,u=i>2?r[2]:O,a=i>1?r[i-1]:O;for("function"==typeof o?(o=un(o,a,5),i-=2):(o="function"==typeof a?a:O,i-=o?1:0),u&&Qn(r[0],r[1],u)&&(o=3>i?O:o,i=1);++n<i;){var s=r[n];s&&t(e,s,o)}return e})}function hn(t,e){return function(r,n){var i=r?Fa(r):0;if(!ri(i))return t(r,n);for(var o=e?i:-1,u=li(r);(e?o--:++o<i)&&n(u[o],o,u)!==!1;);return r}}function pn(t){return function(e,r,n){for(var i=li(e),o=n(e),u=o.length,a=t?u:-1;t?a--:++a<u;){var s=o[a];if(r(i[s],s,i)===!1)break}return e}}function dn(t,e){function r(){var i=this&&this!==nr&&this instanceof r?n:t;return i.apply(e,arguments)}var n=gn(t);return r}function vn(t){return ga&&la?new Ge(t):null}function yn(t){return function(e){for(var r=-1,n=Au(lu(e)),i=n.length,o="";++r<i;)o=t(o,n[r],r);return o}}function gn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Ua(t.prototype),n=t.apply(r,e);return Uo(n)?n:r}}function _n(t){function e(r,n,i){i&&Qn(r,n,i)&&(n=O);var o=Ln(r,t,O,O,O,O,O,n);return o.placeholder=e.placeholder,o}return e}function wn(t,e){return _o(function(r){var n=r[0];return null==n?n:(r.push(e),t.apply(O,r))})}function mn(t,e){return function(r,n,i){if(i&&Qn(r,n,i)&&(n=O),n=Vn(n,i,3),1==n.length){r=Is(r)?r:fi(r);var o=ur(r,n,t,e);if(!r.length||o!==e)return o}return Ar(r,n,t,e)}}function bn(t,e){return function(r,n,i){if(n=Vn(n,i,3),Is(r)){var o=u(r,n,e);return o>-1?r[o]:O}return Tr(r,n,t)}}function En(t){return function(e,r,n){return e&&e.length?(r=Vn(r,n,3),u(e,r,t)):-1}}function kn(t){return function(e,r,n){return r=Vn(r,n,3),Tr(e,r,t,!0)}}function xn(t){return function(){for(var e,r=arguments.length,i=t?r:-1,o=0,u=Vu(r);t?i--:++i<r;){var a=u[o++]=arguments[i];if("function"!=typeof a)throw new Gu(z);!e&&n.prototype.thru&&"wrapper"==Fn(a)&&(e=new n([],!0))}for(i=e?-1:r;++i<r;){a=u[i];var s=Fn(a),c="wrapper"==s?Va(a):O;e=c&&ei(c[0])&&c[1]==(N|M|j|L)&&!c[4].length&&1==c[9]?e[Fn(c[0])].apply(e,c[3]):1==a.length&&ei(a)?e[s]():e.thru(a)}return function(){var t=arguments,n=t[0];if(e&&1==t.length&&Is(n)&&n.length>=F)return e.plant(n).value();for(var i=0,o=r?u[i].apply(this,t):n;++i<r;)o=u[i].call(this,o);return o}}}function An(t,e){return function(r,n,i){return"function"==typeof n&&i===O&&Is(r)?t(r,n):e(r,un(n,i,3))}}function Sn(t){return function(e,r,n){return("function"!=typeof r||n!==O)&&(r=un(r,n,3)),t(e,r,eu)}}function On(t){return function(e,r,n){return("function"!=typeof r||n!==O)&&(r=un(r,n,3)),t(e,r)}}function Tn(t){return function(e,r,n){var i={};return r=Vn(r,n,3),Rr(e,function(e,n,o){var u=r(e,n,o);n=t?u:n,e=t?e:u,i[n]=e}),i}}function In(t){return function(e,r,n){return e=c(e),(t?e:"")+Pn(e,r,n)+(t?"":e)}}function Bn(t){var e=_o(function(r,n){var i=b(n,e.placeholder);return Ln(r,t,O,n,i)});return e}function Rn(t,e){return function(r,n,i,o){var u=arguments.length<3;return"function"==typeof n&&o===O&&Is(r)?t(r,n,i,u):Wr(r,Vn(n,o,4),i,u,e)}}function Mn(t,e,r,n,i,o,u,a,s,c){function f(){for(var _=arguments.length,w=_,m=Vu(_);w--;)m[w]=arguments[w];if(n&&(m=sn(m,n,i)),o&&(m=cn(m,o,u)),d||y){var E=f.placeholder,k=b(m,E);if(_-=k.length,c>_){var x=a?tr(a):O,A=Ea(c-_,0),S=d?k:O,T=d?O:k,R=d?m:O,M=d?O:m;e|=d?j:U,e&=~(d?U:j),v||(e&=~(I|B));var P=[t,e,r,R,S,M,T,x,s,A],N=Mn.apply(O,P);return ei(t)&&Ha(N,P),N.placeholder=E,N}}var L=h?r:this,C=p?L[t]:t;return a&&(m=si(m,a)),l&&s<m.length&&(m.length=s),this&&this!==nr&&this instanceof f&&(C=g||gn(t)),C.apply(L,m)}var l=e&N,h=e&I,p=e&B,d=e&M,v=e&R,y=e&P,g=p?O:gn(t);return f}function Pn(t,e,r){var n=t.length;if(e=+e,n>=e||!ma(e))return"";var i=e-n;return r=null==r?" ":r+"",gu(r,ya(i/r.length)).slice(0,i)}function jn(t,e,r,n){function i(){for(var e=-1,a=arguments.length,s=-1,c=n.length,f=Vu(c+a);++s<c;)f[s]=n[s];for(;a--;)f[s++]=arguments[++e];var l=this&&this!==nr&&this instanceof i?u:t;return l.apply(o?r:this,f)}var o=e&I,u=gn(t);return i}function Un(t){var e=zu[t];return function(t,r){return r=r===O?0:+r||0,r?(r=ca(10,r),e(t*r)/r):e(t)}}function Nn(t){return function(e,r,n,i){var o=Vn(n);return null==n&&o===mr?nn(e,r,t):on(e,r,o(n,i,1),t)}}function Ln(t,e,r,n,i,o,u,a){var s=e&B;if(!s&&"function"!=typeof t)throw new Gu(z);var c=n?n.length:0;if(c||(e&=~(j|U),n=i=O),c-=i?i.length:0,e&U){var f=n,l=i;n=i=O}var h=s?O:Va(t),p=[t,e,r,n,i,f,l,o,u,a];if(h&&(ii(p,h),e=p[1],a=p[9]),p[9]=null==a?s?0:t.length:Ea(a-c,0)||0,e==I)var d=dn(p[0],p[2]);else d=e!=j&&e!=(I|j)||p[4].length?Mn.apply(O,p):jn.apply(O,p);var v=h?Ka:Ha;return v(d,p)}function Cn(t,e,r,n,i,o,u){var a=-1,s=t.length,c=e.length;if(s!=c&&!(i&&c>s))return!1;for(;++a<s;){var f=t[a],l=e[a],h=n?n(i?l:f,i?f:l,a):O;if(h!==O){if(h)continue;return!1}if(i){if(!hr(e,function(t){return f===t||r(f,t,n,i,o,u)}))return!1}else if(f!==l&&!r(f,l,n,i,o,u))return!1}return!0}function Dn(t,e,r){switch(r){case $:case G:return+t==+e;case Z:return t.name==e.name&&t.message==e.message;case te:return t!=+t?e!=+e:t==+e;case re:case ie:return t==e+""}return!1}function Kn(t,e,r,n,i,o,u){var a=Ks(t),s=a.length,c=Ks(e),f=c.length;if(s!=f&&!i)return!1;for(var l=s;l--;){var h=a[l];if(!(i?h in e:ea.call(e,h)))return!1}for(var p=i;++l<s;){h=a[l];var d=t[h],v=e[h],y=n?n(i?v:d,i?d:v,h):O;if(!(y===O?r(d,v,n,i,o,u):y))return!1;p||(p="constructor"==h)}if(!p){var g=t.constructor,_=e.constructor;if(g!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _))return!1}return!0}function Vn(t,r,n){var i=e.callback||Su;return i=i===Su?mr:i,n?i(t,r,n):i}function Fn(t){for(var e=t.name,r=ja[e],n=r?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function Hn(t,r,n){var i=e.indexOf||xi;return i=i===xi?a:i,t?i(t,r,n):i}function qn(t){for(var e=ru(t),r=e.length;r--;)e[r][2]=ni(e[r][1]);return e}function zn(t,e){var r=null==t?O:t[e];return Co(r)?r:O}function Xn(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],u=o.size;switch(o.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=ka(e,t+u);break;case"takeRight":t=Ea(t,e-u)}}return{start:t,end:e}}function Wn(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&ea.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Yn(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Wu),new e}function $n(t,e,r){var n=t.constructor;switch(e){case ue:return an(t);case $:case G:return new n(+t);case ae:case se:case ce:case fe:case le:case he:case pe:case de:case ve:var i=t.buffer;return new n(r?an(i):i,t.byteOffset,t.length);case te:case ie:return new n(t);case re:var o=new n(t.source,je.exec(t));o.lastIndex=t.lastIndex}return o}function Gn(t,e,r){null==t||ti(e,t)||(e=hi(e),t=1==e.length?t:jr(t,Yr(e,0,-1)),e=Si(e));var n=null==t?t:t[e];return null==n?O:n.apply(t,r)}function Zn(t){return null!=t&&ri(Fa(t))}function Jn(t,e){return t="number"==typeof t||Le.test(t)?+t:-1,e=null==e?Ma:e,t>-1&&t%1==0&&e>t}function Qn(t,e,r){if(!Uo(r))return!1;var n=typeof e;if("number"==n?Zn(r)&&Jn(e,r.length):"string"==n&&e in r){var i=r[e];return t===t?t===i:i!==i}return!1}function ti(t,e){var r=typeof t;if("string"==r&&Oe.test(t)||"number"==r)return!0;if(Is(t))return!1;var n=!Se.test(t);return n||null!=e&&t in li(e)}function ei(t){var r=Fn(t);if(!(r in i.prototype))return!1;var n=e[r];if(t===n)return!0;var o=Va(n);return!!o&&t===o[0]}function ri(t){return"number"==typeof t&&t>-1&&t%1==0&&Ma>=t}function ni(t){return t===t&&!Uo(t)}function ii(t,e){var r=t[1],n=e[1],i=r|n,o=N>i,u=n==N&&r==M||n==N&&r==L&&t[7].length<=e[8]||n==(N|L)&&r==M;if(!o&&!u)return t;n&I&&(t[2]=e[2],i|=r&I?0:R);var a=e[3];if(a){var s=t[3];t[3]=s?sn(s,a,e[4]):tr(a),t[4]=s?b(t[3],X):tr(e[4])}return a=e[5],a&&(s=t[5],t[5]=s?cn(s,a,e[6]):tr(a),t[6]=s?b(t[5],X):tr(e[6])),a=e[7],a&&(t[7]=tr(a)),n&N&&(t[8]=null==t[8]?e[8]:ka(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function oi(t,e){return t===O?e:Bs(t,e,oi)}function ui(t,e){t=li(t);for(var r=-1,n=e.length,i={};++r<n;){var o=e[r];o in t&&(i[o]=t[o])}return i}function ai(t,e){var r={};return Br(t,function(t,n,i){e(t,n,i)&&(r[n]=t)}),r}function si(t,e){for(var r=t.length,n=ka(e.length,r),i=tr(t);n--;){var o=e[n];t[n]=Jn(o,r)?i[o]:O}return t}function ci(t){for(var e=eu(t),r=e.length,n=r&&t.length,i=!!n&&ri(n)&&(Is(t)||So(t)),o=-1,u=[];++o<r;){var a=e[o];(i&&Jn(a,n)||ea.call(t,a))&&u.push(a)}return u}function fi(t){return null==t?[]:Zn(t)?Uo(t)?t:Wu(t):uu(t)}function li(t){return Uo(t)?t:Wu(t)}function hi(t){if(Is(t))return t;var e=[];return c(t).replace(Te,function(t,r,n,i