From 3c631d22367b2d99675546df5f699b45935599e2 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Tue, 7 Nov 2023 14:09:57 +0800 Subject: [PATCH 01/18] Remove optForkAllTransactions --- pkg/protocol/engine/ledger/ledger/ledger.go | 2 +- pkg/protocol/engine/mempool/v1/mempool.go | 30 ++++--------------- .../engine/mempool/v1/mempool_test.go | 2 +- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/pkg/protocol/engine/ledger/ledger/ledger.go b/pkg/protocol/engine/ledger/ledger/ledger.go index 31632f082..c5f111313 100644 --- a/pkg/protocol/engine/ledger/ledger/ledger.go +++ b/pkg/protocol/engine/ledger/ledger/ledger.go @@ -68,7 +68,7 @@ func NewProvider() module.Provider[*engine.Engine, ledger.Ledger] { l.setRetainTransactionFailureFunc(e.Retainer.RetainTransactionFailure) - l.memPool = mempoolv1.New(NewVM(l), l.resolveState, e.Storage.Mutations, e.Workers.CreateGroup("MemPool"), l.conflictDAG, l.apiProvider, l.errorHandler, mempoolv1.WithForkAllTransactions[ledger.BlockVoteRank](true)) + l.memPool = mempoolv1.New(NewVM(l), l.resolveState, e.Storage.Mutations, e.Workers.CreateGroup("MemPool"), l.conflictDAG, l.apiProvider, l.errorHandler) e.EvictionState.Events.SlotEvicted.Hook(l.memPool.Evict) l.manaManager = mana.NewManager(l.apiProvider, l.resolveAccountOutput, l.accountsLedger.Account) diff --git a/pkg/protocol/engine/mempool/v1/mempool.go b/pkg/protocol/engine/mempool/v1/mempool.go index aa82b1185..d331faa4e 100644 --- a/pkg/protocol/engine/mempool/v1/mempool.go +++ b/pkg/protocol/engine/mempool/v1/mempool.go @@ -69,8 +69,6 @@ type MemPool[VoteRank conflictdag.VoteRankType[VoteRank]] struct { // evictionMutex is used to synchronize the eviction of slots. evictionMutex syncutils.RWMutex - optForkAllTransactions bool - signedTransactionAttached *event.Event1[mempool.SignedTransactionMetadata] transactionAttached *event.Event1[mempool.TransactionMetadata] @@ -319,23 +317,13 @@ func (m *MemPool[VoteRank]) executeTransaction(executionContext context.Context, } func (m *MemPool[VoteRank]) bookTransaction(transaction *TransactionMetadata) { - if m.optForkAllTransactions { - inputsToFork := lo.Filter(transaction.inputs, func(metadata *StateMetadata) bool { - return !metadata.state.IsReadOnly() - }) + inputsToFork := lo.Filter(transaction.inputs, func(metadata *StateMetadata) bool { + return !metadata.state.IsReadOnly() + }) - m.forkTransaction(transaction, ds.NewSet(lo.Map(inputsToFork, func(stateMetadata *StateMetadata) mempool.StateID { - return stateMetadata.state.StateID() - })...)) - } else { - lo.ForEach(transaction.inputs, func(input *StateMetadata) { - if !input.state.IsReadOnly() { - input.OnDoubleSpent(func() { - m.forkTransaction(transaction, ds.NewSet(input.state.StateID())) - }) - } - }) - } + m.forkTransaction(transaction, ds.NewSet(lo.Map(inputsToFork, func(stateMetadata *StateMetadata) mempool.StateID { + return stateMetadata.state.StateID() + })...)) // if !lo.Return2(transaction.IsOrphaned()) && transaction.setBooked() { if transaction.setBooked() { @@ -548,10 +536,4 @@ func (m *MemPool[VoteRank]) setupSignedTransaction(signedTransactionMetadata *Si }) } -func WithForkAllTransactions[VoteRank conflictdag.VoteRankType[VoteRank]](forkAllTransactions bool) options.Option[MemPool[VoteRank]] { - return func(m *MemPool[VoteRank]) { - m.optForkAllTransactions = forkAllTransactions - } -} - var _ mempool.MemPool[vote.MockedRank] = new(MemPool[vote.MockedRank]) diff --git a/pkg/protocol/engine/mempool/v1/mempool_test.go b/pkg/protocol/engine/mempool/v1/mempool_test.go index 942a4cb09..a35d8f171 100644 --- a/pkg/protocol/engine/mempool/v1/mempool_test.go +++ b/pkg/protocol/engine/mempool/v1/mempool_test.go @@ -168,5 +168,5 @@ func newForkingTestFramework(t *testing.T) *mempooltests.TestFramework { return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, conflictDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}, WithForkAllTransactions[vote.MockedRank](true)), conflictDAG, ledgerState, workers) + }, mutationsFunc, workers, conflictDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), conflictDAG, ledgerState, workers) } From 4063dc2814d0584b27dd8264942f45bbd4686811 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Tue, 7 Nov 2023 21:31:01 +0800 Subject: [PATCH 02/18] Store conflictTx failure reason on rejected txs --- pkg/retainer/retainer/retainer.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/retainer/retainer/retainer.go b/pkg/retainer/retainer/retainer.go index d513f540b..bff0b20ba 100644 --- a/pkg/retainer/retainer/retainer.go +++ b/pkg/retainer/retainer/retainer.go @@ -87,6 +87,14 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] { r.RetainBlockFailure(b.ID(), apimodels.BlockFailureDroppedDueToCongestion) }) + e.Events.ConflictDAG.ConflictRejected.Hook(func(conflictID iotago.TransactionID) { + txMetadata, exist := e.Ledger.MemPool().TransactionMetadata(conflictID) + if !exist { + return + } + r.RetainTransactionFailure(txMetadata.EarliestIncludedAttachment(), iotago.ErrTxConflicting) + }, asyncOpt) + e.HookInitialized(func() { e.Ledger.MemPool().OnSignedTransactionAttached(func(signedTransactionMetadata mempool.SignedTransactionMetadata) { attachment := signedTransactionMetadata.Attachments()[0] @@ -103,11 +111,6 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] { r.errorHandler(ierrors.Wrap(err, "failed to store on TransactionAttached in retainer")) } - transactionMetadata.OnConflicting(func() { - // transaction is not included yet, thus EarliestIncludedAttachment is not set. - r.RetainTransactionFailure(attachment, iotago.ErrTxConflicting) - }) - transactionMetadata.OnInvalid(func(err error) { // transaction is not included yet, thus EarliestIncludedAttachment is not set. r.RetainTransactionFailure(attachment, err) From f5a30c4388055012086c85acea12f93e4f07732a Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 8 Nov 2023 15:09:06 +0800 Subject: [PATCH 03/18] Rename ConflictDAG to SpendDAG --- components/dashboard/explorer_routes.go | 14 +- components/dashboard/jsonresponse.go | 8 +- components/dashboard/type.go | 6 +- components/debugapi/debug_models.go | 14 +- components/metrics/metrics_conflicts.go | 8 +- components/metrics/metrics_slots.go | 12 +- pkg/protocol/block_dispatcher.go | 2 +- pkg/protocol/engine/blocks/block.go | 36 +- .../engine/booker/inmemorybooker/booker.go | 50 +- pkg/protocol/engine/events.go | 6 +- pkg/protocol/engine/ledger/ledger.go | 4 +- pkg/protocol/engine/ledger/ledger/ledger.go | 22 +- .../engine/mempool/conflictdag/conflictdag.go | 43 -- .../conflictdag/conflictdagv1/conflict_set.go | 72 --- .../conflictdag/conflictdagv1/conflictdag.go | 509 ------------------ .../conflictdagv1/sorted_conflict.go | 197 ------- .../conflictdag/conflictdagv1/utils.go | 19 - .../engine/mempool/conflictdag/events.go | 47 -- pkg/protocol/engine/mempool/mempool.go | 4 +- .../{conflictdag => spenddag}/constraints.go | 2 +- .../{conflictdag => spenddag}/errors.go | 2 +- .../engine/mempool/spenddag/events.go | 47 ++ .../engine/mempool/spenddag/spenddag.go | 43 ++ .../spenddag/spenddagv1/conflict_set.go | 72 +++ .../spenddagv1}/conflict_set_test.go | 2 +- .../spenddag/spenddagv1/sorted_spend.go | 197 +++++++ .../spenddagv1/sorted_spends.go} | 164 +++--- .../spenddagv1/sorted_spends_test.go} | 48 +- .../spenddagv1/spend.go} | 150 +++--- .../spenddagv1/spend_test.go} | 162 +++--- .../mempool/spenddag/spenddagv1/spenddag.go | 509 ++++++++++++++++++ .../spenddagv1/spenddag_test.go} | 32 +- .../mempool/spenddag/spenddagv1/utils.go | 19 + .../tests/accounts_framework.go | 0 .../tests/assertions.go | 20 +- .../tests/framework.go | 52 +- .../{conflictdag => spenddag}/tests/tests.go | 124 ++--- pkg/protocol/engine/mempool/state_metadata.go | 2 +- .../engine/mempool/tests/testframework.go | 18 +- pkg/protocol/engine/mempool/tests/tests.go | 28 +- .../engine/mempool/transaction_metadata.go | 2 +- pkg/protocol/engine/mempool/v1/mempool.go | 26 +- .../engine/mempool/v1/mempool_test.go | 16 +- .../engine/mempool/v1/state_metadata.go | 10 +- .../engine/mempool/v1/transaction_metadata.go | 36 +- .../engine/tipselection/v1/provider.go | 2 +- .../tipselection/v1/test_framework_test.go | 4 +- .../engine/tipselection/v1/tip_selection.go | 24 +- pkg/retainer/retainer/retainer.go | 4 +- pkg/tests/booker_test.go | 6 +- pkg/testsuite/blocks.go | 12 +- pkg/testsuite/mock/node.go | 16 +- pkg/testsuite/{conflicts.go => spends.go} | 4 +- pkg/testsuite/transactions.go | 12 +- 54 files changed, 1470 insertions(+), 1470 deletions(-) delete mode 100644 pkg/protocol/engine/mempool/conflictdag/conflictdag.go delete mode 100644 pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set.go delete mode 100644 pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag.go delete mode 100644 pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflict.go delete mode 100644 pkg/protocol/engine/mempool/conflictdag/conflictdagv1/utils.go delete mode 100644 pkg/protocol/engine/mempool/conflictdag/events.go rename pkg/protocol/engine/mempool/{conflictdag => spenddag}/constraints.go (97%) rename pkg/protocol/engine/mempool/{conflictdag => spenddag}/errors.go (94%) create mode 100644 pkg/protocol/engine/mempool/spenddag/events.go create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddag.go create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go rename pkg/protocol/engine/mempool/{conflictdag/conflictdagv1 => spenddag/spenddagv1}/conflict_set_test.go (93%) create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go rename pkg/protocol/engine/mempool/{conflictdag/conflictdagv1/sorted_conflicts.go => spenddag/spenddagv1/sorted_spends.go} (55%) rename pkg/protocol/engine/mempool/{conflictdag/conflictdagv1/sorted_conflicts_test.go => spenddag/spenddagv1/sorted_spends_test.go} (75%) rename pkg/protocol/engine/mempool/{conflictdag/conflictdagv1/conflict.go => spenddag/spenddagv1/spend.go} (66%) rename pkg/protocol/engine/mempool/{conflictdag/conflictdagv1/conflict_test.go => spenddag/spenddagv1/spend_test.go} (64%) create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go rename pkg/protocol/engine/mempool/{conflictdag/conflictdagv1/conflictdag_test.go => spenddag/spenddagv1/spenddag_test.go} (68%) create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go rename pkg/protocol/engine/mempool/{conflictdag => spenddag}/tests/accounts_framework.go (100%) rename pkg/protocol/engine/mempool/{conflictdag => spenddag}/tests/assertions.go (71%) rename pkg/protocol/engine/mempool/{conflictdag => spenddag}/tests/framework.go (55%) rename pkg/protocol/engine/mempool/{conflictdag => spenddag}/tests/tests.go (77%) rename pkg/testsuite/{conflicts.go => spends.go} (73%) diff --git a/components/dashboard/explorer_routes.go b/components/dashboard/explorer_routes.go index 4918fc2f8..2d11b57b7 100644 --- a/components/dashboard/explorer_routes.go +++ b/components/dashboard/explorer_routes.go @@ -47,10 +47,10 @@ func setupExplorerRoutes(routeGroup *echo.Group) { routeGroup.GET("/output/:"+restapipkg.ParameterOutputID, getOutput) // routeGroup.GET("/output/:outputID/metadata", ledgerstateAPI.GetOutputMetadata) // routeGroup.GET("/output/:outputID/consumers", ledgerstateAPI.GetOutputConsumers) - // routeGroup.GET("/conflict/:conflictID", ledgerstateAPI.GetConflict) - // routeGroup.GET("/conflict/:conflictID/children", ledgerstateAPI.GetConflictChildren) - // routeGroup.GET("/conflict/:conflictID/conflicts", ledgerstateAPI.GetConflictConflicts) - // routeGroup.GET("/conflict/:conflictID/voters", ledgerstateAPI.GetConflictVoters) + // routeGroup.GET("/conflict/:spendID", ledgerstateAPI.GetConflict) + // routeGroup.GET("/conflict/:spendID/children", ledgerstateAPI.GetConflictChildren) + // routeGroup.GET("/conflict/:spendID/conflicts", ledgerstateAPI.GetConflictConflicts) + // routeGroup.GET("/conflict/:spendID/voters", ledgerstateAPI.GetConflictVoters) routeGroup.GET("/slot/commitment/:"+restapipkg.ParameterCommitmentID, getSlotDetailsByID) routeGroup.GET("/search/:search", func(c echo.Context) error { @@ -172,8 +172,8 @@ func createExplorerBlock(block *model.Block, cachedBlock *blocks.Block, metadata t.LikedInsteadChildren = lo.Map(cachedBlock.ShallowLikeChildren(), func(childBlock *blocks.Block) string { return childBlock.ID().ToHex() }) - t.ConflictIDs = lo.Map(cachedBlock.ConflictIDs().ToSlice(), func(conflictID iotago.TransactionID) string { - return conflictID.ToHex() + t.SpendIDs = lo.Map(cachedBlock.SpendIDs().ToSlice(), func(spendID iotago.TransactionID) string { + return spendID.ToHex() }) } else { switch metadata.BlockState { @@ -233,7 +233,7 @@ func getTransactionMetadata(c echo.Context) error { return ierrors.Errorf("tx metadata not found: %s", txID.ToHex()) } - conflicts, _ := deps.Protocol.MainEngineInstance().Ledger.ConflictDAG().ConflictingConflicts(txID) + conflicts, _ := deps.Protocol.MainEngineInstance().Ledger.SpendDAG().ConflictingSpends(txID) return httpserver.JSONResponse(c, http.StatusOK, NewTransactionMetadata(txMetadata, conflicts)) } diff --git a/components/dashboard/jsonresponse.go b/components/dashboard/jsonresponse.go index 9b66b8056..51e6d172e 100644 --- a/components/dashboard/jsonresponse.go +++ b/components/dashboard/jsonresponse.go @@ -91,7 +91,7 @@ func NewOutputID(outputID iotago.OutputID) *OutputID { // OutputMetadata represents the JSON model of the mempool.OutputMetadata. // type OutputMetadata struct { // OutputID *OutputID `json:"outputID"` -// ConflictIDs []string `json:"conflictIDs"` +// SpendIDs []string `json:"spendIDs"` // FirstConsumer string `json:"firstCount"` // ConfirmedConsumer string `json:"confirmedConsumer,omitempty"` // ConfirmationState confirmation.State `json:"confirmationState"` @@ -102,7 +102,7 @@ func NewOutputID(outputID iotago.OutputID) *OutputID { // func NewOutputMetadata(outputMetadata *mempool.OutputMetadata, confirmedConsumerID utxo.TransactionID) *OutputMetadata { // return &OutputMetadata{ // OutputID: NewOutputID(outputMetadata.ID()), -// ConflictIDs: lo.Map(lo.Map(outputMetadata.ConflictIDs().Slice(), func(t utxo.TransactionID) []byte { +// SpendIDs: lo.Map(lo.Map(outputMetadata.SpendIDs().Slice(), func(t utxo.TransactionID) []byte { // return lo.PanicOnErr(t.Bytes()) // }), base58.Encode), // FirstConsumer: outputMetadata.FirstConsumer().Base58(), @@ -234,7 +234,7 @@ func NewUnlockBlock(unlockBlock iotago.Unlock) *UnlockBlock { // TransactionMetadata represents the JSON model of the mempool.TransactionMetadata. type TransactionMetadata struct { TransactionID string `json:"transactionID"` - ConflictIDs []string `json:"conflictIDs"` + SpendIDs []string `json:"spendIDs"` Booked bool `json:"booked"` BookedTime int64 `json:"bookedTime"` ConfirmationState string `json:"confirmationState"` @@ -254,7 +254,7 @@ func NewTransactionMetadata(transactionMetadata mempool.TransactionMetadata, con return &TransactionMetadata{ TransactionID: transactionMetadata.ID().ToHex(), - ConflictIDs: func() []string { + SpendIDs: func() []string { var strIDs []string for _, txID := range conflicts.ToSlice() { strIDs = append(strIDs, txID.ToHex()) diff --git a/components/dashboard/type.go b/components/dashboard/type.go index 20d29a88f..533ebb015 100644 --- a/components/dashboard/type.go +++ b/components/dashboard/type.go @@ -151,9 +151,9 @@ type ExplorerBlock struct { LikedInsteadChildren []string `json:"shallowLikeChildren"` // Solid defines the solid status of the block. Solid bool `json:"solid"` - ConflictIDs []string `json:"conflictIDs"` - AddedConflictIDs []string `json:"addedConflictIDs"` - SubtractedConflictIDs []string `json:"subtractedConflictIDs"` + SpendIDs []string `json:"spendIDs"` + AddedSpendIDs []string `json:"addedSpendIDs"` + SubtractedSpendIDs []string `json:"subtractedSpendIDs"` Scheduled bool `json:"scheduled"` Booked bool `json:"booked"` Orphaned bool `json:"orphaned"` diff --git a/components/debugapi/debug_models.go b/components/debugapi/debug_models.go index 8343b91af..f6edf6a6d 100644 --- a/components/debugapi/debug_models.go +++ b/components/debugapi/debug_models.go @@ -29,11 +29,11 @@ type ( Confirmed bool `json:"confirmed"` Witnesses []string `json:"witnesses"` - // conflictIDs are the all conflictIDs of the block inherited from the parents + payloadConflictIDs. - ConflictIDs []iotago.TransactionID `json:"conflictIDs"` - // payloadConflictIDs are the conflictIDs of the block's payload (in case it is a transaction, otherwise empty). - PayloadConflictIDs []iotago.TransactionID `json:"payloadConflictIDs"` - String string `json:"string"` + // spendIDs are the all spendIDs of the block inherited from the parents + payloadSpendIDs. + SpendIDs []iotago.TransactionID `json:"spendIDs"` + // payloadSpendIDs are the spendIDs of the block's payload (in case it is a transaction, otherwise empty). + PayloadSpendIDs []iotago.TransactionID `json:"payloadSpendIDs"` + String string `json:"string"` } Validator struct { @@ -82,8 +82,8 @@ func BlockMetadataResponseFromBlock(block *blocks.Block) *BlockMetadataResponse PreConfirmed: block.IsPreConfirmed(), Confirmed: block.IsConfirmed(), Witnesses: lo.Map(block.Witnesses(), func(seatIndex account.SeatIndex) string { return fmt.Sprintf("%d", seatIndex) }), - ConflictIDs: block.ConflictIDs().ToSlice(), - PayloadConflictIDs: block.PayloadConflictIDs().ToSlice(), + SpendIDs: block.SpendIDs().ToSlice(), + PayloadSpendIDs: block.PayloadSpendIDs().ToSlice(), String: block.String(), } } diff --git a/components/metrics/metrics_conflicts.go b/components/metrics/metrics_conflicts.go index 54caa7a8c..bdfb08c9a 100644 --- a/components/metrics/metrics_conflicts.go +++ b/components/metrics/metrics_conflicts.go @@ -21,8 +21,8 @@ var ConflictMetrics = collector.NewCollection(conflictNamespace, collector.WithType(collector.Counter), collector.WithHelp("Time since transaction issuance to the conflict acceptance"), collector.WithInitFunc(func() { - deps.Protocol.Events.Engine.ConflictDAG.ConflictAccepted.Hook(func(conflictID iotago.TransactionID) { - if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.MemPool().TransactionMetadata(conflictID); exists { + deps.Protocol.Events.Engine.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { + if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.MemPool().TransactionMetadata(spendID); exists { firstAttachmentID := txMetadata.EarliestIncludedAttachment() if block, blockExists := deps.Protocol.MainEngineInstance().BlockFromCache(firstAttachmentID); blockExists { timeSinceIssuance := time.Since(block.IssuingTime()).Milliseconds() @@ -37,7 +37,7 @@ var ConflictMetrics = collector.NewCollection(conflictNamespace, collector.WithType(collector.Counter), collector.WithHelp("Number of resolved (accepted) conflicts"), collector.WithInitFunc(func() { - deps.Protocol.Events.Engine.ConflictDAG.ConflictAccepted.Hook(func(conflictID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { deps.Collector.Increment(conflictNamespace, resolvedConflictCount) }, event.WithWorkerPool(Component.WorkerPool)) }), @@ -46,7 +46,7 @@ var ConflictMetrics = collector.NewCollection(conflictNamespace, collector.WithType(collector.Counter), collector.WithHelp("Number of created conflicts"), collector.WithInitFunc(func() { - deps.Protocol.Events.Engine.ConflictDAG.ConflictCreated.Hook(func(conflictID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpendCreated.Hook(func(spendID iotago.TransactionID) { deps.Collector.Increment(conflictNamespace, allConflictCounts) }, event.WithWorkerPool(Component.WorkerPool)) }), diff --git a/components/metrics/metrics_slots.go b/components/metrics/metrics_slots.go index 02f49c8df..46cf9249a 100644 --- a/components/metrics/metrics_slots.go +++ b/components/metrics/metrics_slots.go @@ -93,8 +93,8 @@ var SlotMetrics = collector.NewCollection(slotNamespace, deps.Collector.Update(slotNamespace, createdConflicts, 0, strconv.Itoa(eventSlot)) }, event.WithWorkerPool(Component.WorkerPool)) - deps.Protocol.Events.Engine.ConflictDAG.ConflictCreated.Hook(func(conflictID iotago.TransactionID) { - if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(conflictID); exists { + deps.Protocol.Events.Engine.SpendDAG.SpendCreated.Hook(func(spendID iotago.TransactionID) { + if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(spendID); exists { for _, attachment := range txMetadata.ValidAttachments() { deps.Collector.Increment(slotNamespace, createdConflicts, strconv.Itoa(int(attachment.Slot()))) } @@ -115,8 +115,8 @@ var SlotMetrics = collector.NewCollection(slotNamespace, deps.Collector.Update(slotNamespace, acceptedConflicts, 0, strconv.Itoa(eventSlot)) }, event.WithWorkerPool(Component.WorkerPool)) - deps.Protocol.Events.Engine.ConflictDAG.ConflictAccepted.Hook(func(conflictID iotago.TransactionID) { - if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(conflictID); exists { + deps.Protocol.Events.Engine.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { + if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(spendID); exists { for _, attachmentBlockID := range txMetadata.ValidAttachments() { if attachment, exists := deps.Protocol.MainEngineInstance().BlockCache.Block(attachmentBlockID); exists && attachment.IsAccepted() { deps.Collector.Increment(slotNamespace, acceptedConflicts, strconv.Itoa(int(attachment.ID().Slot()))) @@ -139,8 +139,8 @@ var SlotMetrics = collector.NewCollection(slotNamespace, deps.Collector.Update(slotNamespace, rejectedConflicts, 0, strconv.Itoa(eventSlot)) }, event.WithWorkerPool(Component.WorkerPool)) - deps.Protocol.Events.Engine.ConflictDAG.ConflictRejected.Hook(func(conflictID iotago.TransactionID) { - if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(conflictID); exists { + deps.Protocol.Events.Engine.SpendDAG.SpendRejected.Hook(func(spendID iotago.TransactionID) { + if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(spendID); exists { for _, attachmentBlockID := range txMetadata.ValidAttachments() { if attachment, exists := deps.Protocol.MainEngineInstance().BlockCache.Block(attachmentBlockID); exists && attachment.IsAccepted() { deps.Collector.Increment(slotNamespace, rejectedConflicts, strconv.Itoa(int(attachment.ID().Slot()))) diff --git a/pkg/protocol/block_dispatcher.go b/pkg/protocol/block_dispatcher.go index 15b2fcfa3..906c81645 100644 --- a/pkg/protocol/block_dispatcher.go +++ b/pkg/protocol/block_dispatcher.go @@ -298,7 +298,7 @@ func (b *BlockDispatcher) processWarpSyncResponse(commitmentID iotago.Commitment // 1. Mark all transactions as accepted for _, transactionID := range transactionIDs { - targetEngine.Ledger.ConflictDAG().SetAccepted(transactionID) + targetEngine.Ledger.SpendDAG().SetAccepted(transactionID) } // 2. Mark all blocks as accepted diff --git a/pkg/protocol/engine/blocks/block.go b/pkg/protocol/engine/blocks/block.go index 10df6cbb5..19f6f2dac 100644 --- a/pkg/protocol/engine/blocks/block.go +++ b/pkg/protocol/engine/blocks/block.go @@ -28,10 +28,10 @@ type Block struct { // Booker block booked reactive.Variable[bool] witnesses ds.Set[account.SeatIndex] - // conflictIDs are the all conflictIDs of the block inherited from the parents + payloadConflictIDs. - conflictIDs ds.Set[iotago.TransactionID] - // payloadConflictIDs are the conflictIDs of the block's payload (in case it is a transaction, otherwise empty). - payloadConflictIDs ds.Set[iotago.TransactionID] + // spendIDs are the all spendIDs of the block inherited from the parents + payloadSpendIDs. + spendIDs ds.Set[iotago.TransactionID] + // payloadSpendIDs are the spendIDs of the block's payload (in case it is a transaction, otherwise empty). + payloadSpendIDs ds.Set[iotago.TransactionID] // BlockGadget block preAccepted bool @@ -77,8 +77,8 @@ func (r *rootBlock) String() string { func NewBlock(data *model.Block) *Block { return &Block{ witnesses: ds.NewSet[account.SeatIndex](), - conflictIDs: ds.NewSet[iotago.TransactionID](), - payloadConflictIDs: ds.NewSet[iotago.TransactionID](), + spendIDs: ds.NewSet[iotago.TransactionID](), + payloadSpendIDs: ds.NewSet[iotago.TransactionID](), acceptanceRatifiers: ds.NewSet[account.SeatIndex](), confirmationRatifiers: ds.NewSet[account.SeatIndex](), modelBlock: data, @@ -94,8 +94,8 @@ func NewBlock(data *model.Block) *Block { func NewRootBlock(blockID iotago.BlockID, commitmentID iotago.CommitmentID, issuingTime time.Time) *Block { b := &Block{ witnesses: ds.NewSet[account.SeatIndex](), - conflictIDs: ds.NewSet[iotago.TransactionID](), - payloadConflictIDs: ds.NewSet[iotago.TransactionID](), + spendIDs: ds.NewSet[iotago.TransactionID](), + payloadSpendIDs: ds.NewSet[iotago.TransactionID](), acceptanceRatifiers: ds.NewSet[account.SeatIndex](), confirmationRatifiers: ds.NewSet[account.SeatIndex](), @@ -127,8 +127,8 @@ func NewMissingBlock(blockID iotago.BlockID) *Block { missing: true, missingBlockID: blockID, witnesses: ds.NewSet[account.SeatIndex](), - conflictIDs: ds.NewSet[iotago.TransactionID](), - payloadConflictIDs: ds.NewSet[iotago.TransactionID](), + spendIDs: ds.NewSet[iotago.TransactionID](), + payloadSpendIDs: ds.NewSet[iotago.TransactionID](), acceptanceRatifiers: ds.NewSet[account.SeatIndex](), confirmationRatifiers: ds.NewSet[account.SeatIndex](), solid: reactive.NewVariable[bool](), @@ -395,32 +395,32 @@ func (b *Block) Witnesses() []account.SeatIndex { return b.witnesses.ToSlice() } -func (b *Block) ConflictIDs() ds.Set[iotago.TransactionID] { +func (b *Block) SpendIDs() ds.Set[iotago.TransactionID] { b.mutex.RLock() defer b.mutex.RUnlock() - return b.conflictIDs + return b.spendIDs } -func (b *Block) SetConflictIDs(conflictIDs ds.Set[iotago.TransactionID]) { +func (b *Block) SetSpendIDs(spendIDs ds.Set[iotago.TransactionID]) { b.mutex.Lock() defer b.mutex.Unlock() - b.conflictIDs = conflictIDs + b.spendIDs = spendIDs } -func (b *Block) PayloadConflictIDs() ds.Set[iotago.TransactionID] { +func (b *Block) PayloadSpendIDs() ds.Set[iotago.TransactionID] { b.mutex.RLock() defer b.mutex.RUnlock() - return b.payloadConflictIDs + return b.payloadSpendIDs } -func (b *Block) SetPayloadConflictIDs(payloadConflictIDs ds.Set[iotago.TransactionID]) { +func (b *Block) SetPayloadSpendIDs(payloadSpendIDs ds.Set[iotago.TransactionID]) { b.mutex.Lock() defer b.mutex.Unlock() - b.payloadConflictIDs = payloadConflictIDs + b.payloadSpendIDs = payloadSpendIDs } // IsPreAccepted returns true if the Block was preAccepted. diff --git a/pkg/protocol/engine/booker/inmemorybooker/booker.go b/pkg/protocol/engine/booker/inmemorybooker/booker.go index 99dbae5cd..16795c0ba 100644 --- a/pkg/protocol/engine/booker/inmemorybooker/booker.go +++ b/pkg/protocol/engine/booker/inmemorybooker/booker.go @@ -13,7 +13,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/booker" "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" iotago "github.com/iotaledger/iota.go/v4" "github.com/iotaledger/iota.go/v4/nodeclient/apimodels" ) @@ -23,7 +23,7 @@ type Booker struct { blockCache *blocks.Blocks - conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] + spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] ledger ledger.Ledger @@ -41,7 +41,7 @@ func NewProvider(opts ...options.Option[Booker]) module.Provider[*engine.Engine, e.HookConstructed(func() { b.ledger = e.Ledger b.ledger.HookConstructed(func() { - b.conflictDAG = b.ledger.ConflictDAG() + b.spendDAG = b.ledger.SpendDAG() b.ledger.MemPool().OnTransactionAttached(func(transaction mempool.TransactionMetadata) { transaction.OnAccepted(func() { @@ -108,7 +108,7 @@ func (b *Booker) Queue(block *blocks.Block) error { } transactionMetadata.OnBooked(func() { - block.SetPayloadConflictIDs(transactionMetadata.ConflictIDs()) + block.SetPayloadSpendIDs(transactionMetadata.SpendIDs()) b.setupBlock(block) }) }) @@ -155,37 +155,37 @@ func (b *Booker) setRetainBlockFailureFunc(retainBlockFailure func(iotago.BlockI } func (b *Booker) book(block *blocks.Block) error { - conflictsToInherit, err := b.inheritConflicts(block) + spendsToInherit, err := b.inheritSpends(block) if err != nil { return ierrors.Wrapf(err, "failed to inherit conflicts for block %s", block.ID()) } // The block does not inherit conflicts that have been orphaned with respect to its commitment. - for it := conflictsToInherit.Iterator(); it.HasNext(); { - conflictID := it.Next() + for it := spendsToInherit.Iterator(); it.HasNext(); { + spendID := it.Next() - txMetadata, exists := b.ledger.MemPool().TransactionMetadata(conflictID) + txMetadata, exists := b.ledger.MemPool().TransactionMetadata(spendID) if !exists { - return ierrors.Errorf("failed to load transaction %s for block %s", conflictID.String(), block.ID()) + return ierrors.Errorf("failed to load transaction %s for block %s", spendID.String(), block.ID()) } if orphanedSlot, orphaned := txMetadata.OrphanedSlot(); orphaned && orphanedSlot <= block.SlotCommitmentID().Slot() { // Merge-to-master orphaned conflicts. - conflictsToInherit.Delete(conflictID) + spendsToInherit.Delete(spendID) } } - block.SetConflictIDs(conflictsToInherit) + block.SetSpendIDs(spendsToInherit) block.SetBooked() b.events.BlockBooked.Trigger(block) return nil } -func (b *Booker) inheritConflicts(block *blocks.Block) (conflictIDs ds.Set[iotago.TransactionID], err error) { - conflictIDsToInherit := ds.NewSet[iotago.TransactionID]() +func (b *Booker) inheritSpends(block *blocks.Block) (spendIDs ds.Set[iotago.TransactionID], err error) { + spendIDsToInherit := ds.NewSet[iotago.TransactionID]() - // Inherit conflictIDs from parents based on the parent type. + // Inherit spendIDs from parents based on the parent type. for _, parent := range block.ParentsWithType() { parentBlock, exists := b.blockCache.Block(parent.ID) if !exists { @@ -195,30 +195,30 @@ func (b *Booker) inheritConflicts(block *blocks.Block) (conflictIDs ds.Set[iotag switch parent.Type { case iotago.StrongParentType: - conflictIDsToInherit.AddAll(parentBlock.ConflictIDs()) + spendIDsToInherit.AddAll(parentBlock.SpendIDs()) case iotago.WeakParentType: - conflictIDsToInherit.AddAll(parentBlock.PayloadConflictIDs()) + spendIDsToInherit.AddAll(parentBlock.PayloadSpendIDs()) case iotago.ShallowLikeParentType: // Check whether the parent contains a conflicting TX, // otherwise reference is invalid and the block should be marked as invalid as well. - if signedTransaction, hasTx := parentBlock.SignedTransaction(); !hasTx || !parentBlock.PayloadConflictIDs().Has(lo.PanicOnErr(signedTransaction.Transaction.ID())) { + if signedTransaction, hasTx := parentBlock.SignedTransaction(); !hasTx || !parentBlock.PayloadSpendIDs().Has(lo.PanicOnErr(signedTransaction.Transaction.ID())) { return nil, ierrors.Wrapf(err, "shallow like parent %s does not contain a conflicting transaction", parent.ID.String()) } - conflictIDsToInherit.AddAll(parentBlock.PayloadConflictIDs()) - // remove all conflicting conflicts from conflictIDsToInherit - for _, conflictID := range parentBlock.PayloadConflictIDs().ToSlice() { - if conflictingConflicts, exists := b.conflictDAG.ConflictingConflicts(conflictID); exists { - conflictIDsToInherit.DeleteAll(b.conflictDAG.FutureCone(conflictingConflicts)) + spendIDsToInherit.AddAll(parentBlock.PayloadSpendIDs()) + // remove all conflicting conflicts from spendIDsToInherit + for _, spendID := range parentBlock.PayloadSpendIDs().ToSlice() { + if conflictingConflicts, exists := b.spendDAG.ConflictingSpends(spendID); exists { + spendIDsToInherit.DeleteAll(b.spendDAG.FutureCone(conflictingConflicts)) } } } } // Add all conflicts from the block's payload itself. - // Forking on booking: we determine the block's PayloadConflictIDs by treating each TX as a conflict. - conflictIDsToInherit.AddAll(block.PayloadConflictIDs()) + // Forking on booking: we determine the block's PayloadSpendIDs by treating each TX as a conflict. + spendIDsToInherit.AddAll(block.PayloadSpendIDs()) // Only inherit conflicts that are not yet accepted (aka merge to master). - return b.conflictDAG.UnacceptedConflicts(conflictIDsToInherit), nil + return b.spendDAG.UnacceptedSpends(spendIDsToInherit), nil } diff --git a/pkg/protocol/engine/events.go b/pkg/protocol/engine/events.go index 7a07445da..405f62ed7 100644 --- a/pkg/protocol/engine/events.go +++ b/pkg/protocol/engine/events.go @@ -15,7 +15,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/filter" "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" "github.com/iotaledger/iota-core/pkg/protocol/engine/notarization" "github.com/iotaledger/iota-core/pkg/protocol/engine/syncmanager" "github.com/iotaledger/iota-core/pkg/protocol/engine/tipmanager" @@ -42,7 +42,7 @@ type Events struct { SybilProtection *sybilprotection.Events Ledger *ledger.Events Notarization *notarization.Events - ConflictDAG *conflictdag.Events[iotago.TransactionID, mempool.StateID] + SpendDAG *spenddag.Events[iotago.TransactionID, mempool.StateID] Scheduler *scheduler.Events SeatManager *seatmanager.Events SyncManager *syncmanager.Events @@ -69,7 +69,7 @@ var NewEvents = event.CreateGroupConstructor(func() (newEvents *Events) { SybilProtection: sybilprotection.NewEvents(), Ledger: ledger.NewEvents(), Notarization: notarization.NewEvents(), - ConflictDAG: conflictdag.NewEvents[iotago.TransactionID, mempool.StateID](), + SpendDAG: spenddag.NewEvents[iotago.TransactionID, mempool.StateID](), Scheduler: scheduler.NewEvents(), SeatManager: seatmanager.NewEvents(), SyncManager: syncmanager.NewEvents(), diff --git a/pkg/protocol/engine/ledger/ledger.go b/pkg/protocol/engine/ledger/ledger.go index da542bb46..c7c7d2127 100644 --- a/pkg/protocol/engine/ledger/ledger.go +++ b/pkg/protocol/engine/ledger/ledger.go @@ -10,7 +10,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" "github.com/iotaledger/iota-core/pkg/protocol/engine/congestioncontrol/rmc" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" iotago "github.com/iotaledger/iota.go/v4" ) @@ -30,7 +30,7 @@ type Ledger interface { ForEachUnspentOutput(func(output *utxoledger.Output) bool) error AddGenesisUnspentOutput(unspentOutput *utxoledger.Output) error - ConflictDAG() conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, BlockVoteRank] + SpendDAG() spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, BlockVoteRank] MemPool() mempool.MemPool[BlockVoteRank] SlotDiffs(slot iotago.SlotIndex) (*utxoledger.SlotDiff, error) diff --git a/pkg/protocol/engine/ledger/ledger/ledger.go b/pkg/protocol/engine/ledger/ledger/ledger.go index c5f111313..691d79394 100644 --- a/pkg/protocol/engine/ledger/ledger/ledger.go +++ b/pkg/protocol/engine/ledger/ledger/ledger.go @@ -20,8 +20,8 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/congestioncontrol/rmc" "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag/conflictdagv1" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag/spenddagv1" mempoolv1 "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/v1" "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" "github.com/iotaledger/iota-core/pkg/protocol/sybilprotection" @@ -41,7 +41,7 @@ type Ledger struct { sybilProtection sybilprotection.SybilProtection commitmentLoader func(iotago.SlotIndex) (*model.Commitment, error) memPool mempool.MemPool[ledger.BlockVoteRank] - conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] + spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] retainTransactionFailure func(iotago.BlockID, error) errorHandler func(error) @@ -63,12 +63,12 @@ func NewProvider() module.Provider[*engine.Engine, ledger.Ledger] { e.HookConstructed(func() { e.Events.Ledger.LinkTo(l.events) - l.conflictDAG = conflictdagv1.New[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank](l.sybilProtection.SeatManager().OnlineCommittee().Size) - e.Events.ConflictDAG.LinkTo(l.conflictDAG.Events()) + l.spendDAG = spenddagv1.New[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank](l.sybilProtection.SeatManager().OnlineCommittee().Size) + e.Events.SpendDAG.LinkTo(l.spendDAG.Events()) l.setRetainTransactionFailureFunc(e.Retainer.RetainTransactionFailure) - l.memPool = mempoolv1.New(NewVM(l), l.resolveState, e.Storage.Mutations, e.Workers.CreateGroup("MemPool"), l.conflictDAG, l.apiProvider, l.errorHandler) + l.memPool = mempoolv1.New(NewVM(l), l.resolveState, e.Storage.Mutations, e.Workers.CreateGroup("MemPool"), l.spendDAG, l.apiProvider, l.errorHandler) e.EvictionState.Events.SlotEvicted.Hook(l.memPool.Evict) l.manaManager = mana.NewManager(l.apiProvider, l.resolveAccountOutput, l.accountsLedger.Account) @@ -110,7 +110,7 @@ func New( commitmentLoader: commitmentLoader, sybilProtection: sybilProtection, errorHandler: errorHandler, - conflictDAG: conflictdagv1.New[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank](sybilProtection.SeatManager().OnlineCommittee().Size), + spendDAG: spenddagv1.New[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank](sybilProtection.SeatManager().OnlineCommittee().Size), } } @@ -306,8 +306,8 @@ func (l *Ledger) TransactionMetadataByAttachment(blockID iotago.BlockID) (mempoo return l.memPool.TransactionMetadataByAttachment(blockID) } -func (l *Ledger) ConflictDAG() conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] { - return l.conflictDAG +func (l *Ledger) SpendDAG() spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] { + return l.spendDAG } func (l *Ledger) MemPool() mempool.MemPool[ledger.BlockVoteRank] { @@ -348,7 +348,7 @@ func (l *Ledger) RMCManager() *rmc.Manager { func (l *Ledger) Shutdown() { l.TriggerStopped() - l.conflictDAG.Shutdown() + l.spendDAG.Shutdown() } // Process the collected account changes. The consumedAccounts and createdAccounts maps only contain outputs with a @@ -758,7 +758,7 @@ func (l *Ledger) blockPreAccepted(block *blocks.Block) { return } - if err := l.conflictDAG.CastVotes(vote.NewVote(seat, voteRank), block.ConflictIDs()); err != nil { + if err := l.spendDAG.CastVotes(vote.NewVote(seat, voteRank), block.SpendIDs()); err != nil { l.errorHandler(ierrors.Wrapf(err, "failed to cast votes for block %s", block.ID())) } } diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdag.go b/pkg/protocol/engine/mempool/conflictdag/conflictdag.go deleted file mode 100644 index 2513f6392..000000000 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdag.go +++ /dev/null @@ -1,43 +0,0 @@ -package conflictdag - -import ( - "github.com/iotaledger/hive.go/ds" - "github.com/iotaledger/iota-core/pkg/core/acceptance" - "github.com/iotaledger/iota-core/pkg/core/account" - "github.com/iotaledger/iota-core/pkg/core/vote" -) - -type ConflictDAG[ConflictID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { - Shutdown() - Events() *Events[ConflictID, ResourceID] - - CreateConflict(id ConflictID) - UpdateConflictingResources(id ConflictID, resourceIDs ds.Set[ResourceID]) error - - ReadConsistent(callback func(conflictDAG ReadLockedConflictDAG[ConflictID, ResourceID, VoteRank]) error) error - UpdateConflictParents(conflictID ConflictID, addedParentIDs, removedParentIDs ds.Set[ConflictID]) error - FutureCone(conflictIDs ds.Set[ConflictID]) (futureCone ds.Set[ConflictID]) - ConflictingConflicts(conflictID ConflictID) (conflictingConflicts ds.Set[ConflictID], exists bool) - CastVotes(vote *vote.Vote[VoteRank], conflictIDs ds.Set[ConflictID]) error - AcceptanceState(conflictIDs ds.Set[ConflictID]) acceptance.State - SetAccepted(conflictID ConflictID) - UnacceptedConflicts(conflictIDs ds.Set[ConflictID]) ds.Set[ConflictID] - AllConflictsSupported(seat account.SeatIndex, conflictIDs ds.Set[ConflictID]) bool - EvictConflict(conflictID ConflictID) - - ConflictSets(conflictID ConflictID) (conflictSetIDs ds.Set[ResourceID], exists bool) - ConflictParents(conflictID ConflictID) (conflictIDs ds.Set[ConflictID], exists bool) - ConflictSetMembers(conflictSetID ResourceID) (conflictIDs ds.Set[ConflictID], exists bool) - ConflictWeight(conflictID ConflictID) int64 - ConflictChildren(conflictID ConflictID) (conflictIDs ds.Set[ConflictID], exists bool) - ConflictVoters(conflictID ConflictID) (voters ds.Set[account.SeatIndex]) - LikedInstead(conflictIDs ds.Set[ConflictID]) ds.Set[ConflictID] -} - -type ReadLockedConflictDAG[ConflictID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { - LikedInstead(conflictIDs ds.Set[ConflictID]) ds.Set[ConflictID] - FutureCone(conflictIDs ds.Set[ConflictID]) (futureCone ds.Set[ConflictID]) - ConflictingConflicts(conflictID ConflictID) (conflictingConflicts ds.Set[ConflictID], exists bool) - AcceptanceState(conflictIDs ds.Set[ConflictID]) acceptance.State - UnacceptedConflicts(conflictIDs ds.Set[ConflictID]) ds.Set[ConflictID] -} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set.go b/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set.go deleted file mode 100644 index 653a3f413..000000000 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set.go +++ /dev/null @@ -1,72 +0,0 @@ -package conflictdagv1 - -import ( - "github.com/iotaledger/hive.go/ds" - "github.com/iotaledger/hive.go/ds/reactive" - "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/runtime/syncutils" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" -) - -// ConflictSet represents a set of Conflicts that are conflicting with each other over a common Resource. -type ConflictSet[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]] struct { - // ID is the ID of the Resource that the Conflicts in this ConflictSet are conflicting over. - ID ResourceID - - // members is the set of Conflicts that are conflicting over the shared resource. - members ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]] - - allMembersEvicted reactive.Variable[bool] - - mutex syncutils.RWMutex -} - -// NewConflictSet creates a new ConflictSet of Conflicts that are conflicting with each other over the given Resource. -func NewConflictSet[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]](id ResourceID) *ConflictSet[ConflictID, ResourceID, VoteRank] { - return &ConflictSet[ConflictID, ResourceID, VoteRank]{ - ID: id, - allMembersEvicted: reactive.NewVariable[bool](), - members: ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]](), - } -} - -// Add adds a Conflict to the ConflictSet and returns all other members of the set. -func (c *ConflictSet[ConflictID, ResourceID, VoteRank]) Add(addedConflict *Conflict[ConflictID, ResourceID, VoteRank]) (otherMembers ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]], err error) { - c.mutex.Lock() - defer c.mutex.Unlock() - - if c.allMembersEvicted.Get() { - return nil, ierrors.New("cannot join a ConflictSet whose all members are evicted") - } - - if otherMembers = c.members.Clone(); !c.members.Add(addedConflict) { - return nil, conflictdag.ErrAlreadyPartOfConflictSet - } - - return otherMembers, nil - -} - -// Remove removes a Conflict from the ConflictSet and returns all remaining members of the set. -func (c *ConflictSet[ConflictID, ResourceID, VoteRank]) Remove(removedConflict *Conflict[ConflictID, ResourceID, VoteRank]) (removed bool) { - c.mutex.Lock() - defer c.mutex.Unlock() - - if removed = c.members.Delete(removedConflict); removed && c.members.IsEmpty() { - c.allMembersEvicted.Set(true) - } - - return removed -} - -func (c *ConflictSet[ConflictID, ResourceID, VoteRank]) ForEach(callback func(parent *Conflict[ConflictID, ResourceID, VoteRank]) error) error { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.members.ForEach(callback) -} - -// OnAllMembersEvicted executes a callback when all members of the ConflictSet are evicted and the ConflictSet itself can be evicted. -func (c *ConflictSet[ConflictID, ResourceID, VoteRank]) OnAllMembersEvicted(callback func(prevValue, newValue bool)) { - c.allMembersEvicted.OnUpdate(callback) -} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag.go b/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag.go deleted file mode 100644 index 88306cc12..000000000 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag.go +++ /dev/null @@ -1,509 +0,0 @@ -package conflictdagv1 - -import ( - "github.com/iotaledger/hive.go/ds" - "github.com/iotaledger/hive.go/ds/shrinkingmap" - "github.com/iotaledger/hive.go/ds/walker" - "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/lo" - "github.com/iotaledger/hive.go/runtime/syncutils" - "github.com/iotaledger/iota-core/pkg/core/acceptance" - "github.com/iotaledger/iota-core/pkg/core/account" - "github.com/iotaledger/iota-core/pkg/core/vote" - "github.com/iotaledger/iota-core/pkg/core/weight" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" - iotago "github.com/iotaledger/iota.go/v4" -) - -// ConflictDAG represents a data structure that tracks causal relationships between Conflicts and that allows to -// efficiently manage these Conflicts (and vote on their fate). -type ConflictDAG[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]] struct { - // events contains the events of the ConflictDAG. - events *conflictdag.Events[ConflictID, ResourceID] - - // seatCount is a function that returns the number of seats. - seatCount func() int - - // conflictsByID is a mapping of ConflictIDs to Conflicts. - conflictsByID *shrinkingmap.ShrinkingMap[ConflictID, *Conflict[ConflictID, ResourceID, VoteRank]] - - conflictUnhooks *shrinkingmap.ShrinkingMap[ConflictID, func()] - - // conflictSetsByID is a mapping of ResourceIDs to ConflictSets. - conflictSetsByID *shrinkingmap.ShrinkingMap[ResourceID, *ConflictSet[ConflictID, ResourceID, VoteRank]] - - // pendingTasks is a counter that keeps track of the number of pending tasks. - pendingTasks *syncutils.Counter - - // mutex is used to synchronize access to the ConflictDAG. - mutex syncutils.RWMutex - - // votingMutex is used to synchronize voting for different identities. - votingMutex *syncutils.DAGMutex[account.SeatIndex] -} - -// New creates a new ConflictDAG. -func New[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]](seatCount func() int) *ConflictDAG[ConflictID, ResourceID, VoteRank] { - return &ConflictDAG[ConflictID, ResourceID, VoteRank]{ - events: conflictdag.NewEvents[ConflictID, ResourceID](), - - seatCount: seatCount, - conflictsByID: shrinkingmap.New[ConflictID, *Conflict[ConflictID, ResourceID, VoteRank]](), - conflictUnhooks: shrinkingmap.New[ConflictID, func()](), - conflictSetsByID: shrinkingmap.New[ResourceID, *ConflictSet[ConflictID, ResourceID, VoteRank]](), - pendingTasks: syncutils.NewCounter(), - votingMutex: syncutils.NewDAGMutex[account.SeatIndex](), - } -} - -var _ conflictdag.ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank] = &ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]{} - -// Shutdown shuts down the ConflictDAG. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) Shutdown() { - c.mutex.Lock() - defer c.mutex.Unlock() - - c.conflictsByID.ForEach(func(conflictID ConflictID, conflict *Conflict[ConflictID, ResourceID, VoteRank]) bool { - conflict.Shutdown() - - return true - }) -} - -// Events returns the events of the ConflictDAG. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) Events() *conflictdag.Events[ConflictID, ResourceID] { - return c.events -} - -// CreateConflict creates a new Conflict. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) CreateConflict(id ConflictID) { - if func() (created bool) { - c.mutex.RLock() - defer c.mutex.RUnlock() - - _, isNewConflict := c.conflictsByID.GetOrCreate(id, func() *Conflict[ConflictID, ResourceID, VoteRank] { - newConflict := NewConflict[ConflictID, ResourceID, VoteRank](id, weight.New(), c.pendingTasks, acceptance.ThresholdProvider(func() int64 { return int64(c.seatCount()) })) - - // attach to the acceptance state updated event and propagate that event to the outside. - // also need to remember the unhook method to properly evict the conflict. - c.conflictUnhooks.Set(id, newConflict.AcceptanceStateUpdated.Hook(func(oldState, newState acceptance.State) { - if newState.IsAccepted() { - c.events.ConflictAccepted.Trigger(newConflict.ID) - return - } - if newState.IsRejected() { - c.events.ConflictRejected.Trigger(newConflict.ID) - } - }).Unhook) - - return newConflict - }) - - return isNewConflict - }() { - c.events.ConflictCreated.Trigger(id) - } -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) UpdateConflictingResources(id ConflictID, resourceIDs ds.Set[ResourceID]) error { - joinedConflictSets, err := func() (ds.Set[ResourceID], error) { - c.mutex.RLock() - defer c.mutex.RUnlock() - - conflict, exists := c.conflictsByID.Get(id) - if !exists { - return nil, ierrors.Errorf("conflict already evicted: %w", conflictdag.ErrEntityEvicted) - } - - return conflict.JoinConflictSets(c.conflictSets(resourceIDs)) - }() - - if err != nil { - return ierrors.Errorf("conflict %s failed to join conflict sets: %w", id, err) - } - - if !joinedConflictSets.IsEmpty() { - c.events.ConflictingResourcesAdded.Trigger(id, joinedConflictSets) - } - - return nil -} - -// ReadConsistent write locks the ConflictDAG and exposes read-only methods to the callback to perform multiple reads while maintaining the same ConflictDAG state. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ReadConsistent(callback func(conflictDAG conflictdag.ReadLockedConflictDAG[ConflictID, ResourceID, VoteRank]) error) error { - c.mutex.Lock() - defer c.mutex.Unlock() - - c.pendingTasks.WaitIsZero() - - return callback(c) -} - -// UpdateConflictParents updates the parents of the given Conflict and returns an error if the operation failed. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) UpdateConflictParents(conflictID ConflictID, addedParentIDs, removedParentIDs ds.Set[ConflictID]) error { - newParents := ds.NewSet[ConflictID]() - - updated, err := func() (bool, error) { - c.mutex.RLock() - defer c.mutex.RUnlock() - - currentConflict, currentConflictExists := c.conflictsByID.Get(conflictID) - if !currentConflictExists { - return false, ierrors.Errorf("tried to modify evicted conflict with %s: %w", conflictID, conflictdag.ErrEntityEvicted) - } - - addedParents := ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]]() - - if err := addedParentIDs.ForEach(func(addedParentID ConflictID) error { - // If we cannot load the parent it is because it has been already evicted - if addedParent, addedParentExists := c.conflictsByID.Get(addedParentID); addedParentExists { - addedParents.Add(addedParent) - } - - return nil - }); err != nil { - return false, err - } - - removedParents, err := c.conflicts(removedParentIDs, !currentConflict.IsRejected()) - if err != nil { - return false, ierrors.Errorf("failed to update conflict parents: %w", err) - } - - updated := currentConflict.UpdateParents(addedParents, removedParents) - if updated { - _ = currentConflict.Parents.ForEach(func(parentConflict *Conflict[ConflictID, ResourceID, VoteRank]) (err error) { - newParents.Add(parentConflict.ID) - return nil - }) - } - - return updated, nil - }() - if err != nil { - return err - } - - if updated { - c.events.ConflictParentsUpdated.Trigger(conflictID, newParents) - } - - return nil -} - -// LikedInstead returns the ConflictIDs of the Conflicts that are liked instead of the Conflicts. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) LikedInstead(conflictIDs ds.Set[ConflictID]) ds.Set[ConflictID] { - likedInstead := ds.NewSet[ConflictID]() - conflictIDs.Range(func(conflictID ConflictID) { - if currentConflict, exists := c.conflictsByID.Get(conflictID); exists { - if likedConflict := heaviestConflict(currentConflict.LikedInstead()); likedConflict != nil { - likedInstead.Add(likedConflict.ID) - } - } - }) - - return likedInstead -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) FutureCone(conflictIDs ds.Set[ConflictID]) (futureCone ds.Set[ConflictID]) { - futureCone = ds.NewSet[ConflictID]() - for futureConeWalker := walker.New[*Conflict[ConflictID, ResourceID, VoteRank]]().PushAll(lo.Return1(c.conflicts(conflictIDs, true)).ToSlice()...); futureConeWalker.HasNext(); { - if conflict := futureConeWalker.Next(); futureCone.Add(conflict.ID) { - futureConeWalker.PushAll(conflict.Children.ToSlice()...) - } - } - - return futureCone -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictingConflicts(conflictID ConflictID) (conflictingConflicts ds.Set[ConflictID], exists bool) { - conflict, exists := c.conflictsByID.Get(conflictID) - if !exists { - return nil, false - } - - conflictingConflicts = ds.NewSet[ConflictID]() - conflict.ConflictingConflicts.Range(func(conflictingConflict *Conflict[ConflictID, ResourceID, VoteRank]) { - conflictingConflicts.Add(conflictingConflict.ID) - }) - - return conflictingConflicts, true -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) AllConflictsSupported(seat account.SeatIndex, conflictIDs ds.Set[ConflictID]) bool { - return lo.Return1(c.conflicts(conflictIDs, true)).ForEach(func(conflict *Conflict[ConflictID, ResourceID, VoteRank]) (err error) { - lastVote, exists := conflict.LatestVotes.Get(seat) - - return lo.Cond(exists && lastVote.IsLiked(), nil, ierrors.Errorf("conflict with %s is not supported by seat %d", conflict.ID, seat)) - }) == nil -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictVoters(conflictID ConflictID) (conflictVoters ds.Set[account.SeatIndex]) { - if conflict, exists := c.conflictsByID.Get(conflictID); exists { - return conflict.Weight.Voters.Clone() - } - - return ds.NewSet[account.SeatIndex]() -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictSets(conflictID ConflictID) (conflictSets ds.Set[ResourceID], exists bool) { - conflict, exists := c.conflictsByID.Get(conflictID) - if !exists { - return nil, false - } - - conflictSets = ds.NewSet[ResourceID]() - _ = conflict.ConflictSets.ForEach(func(conflictSet *ConflictSet[ConflictID, ResourceID, VoteRank]) error { - conflictSets.Add(conflictSet.ID) - return nil - }) - - return conflictSets, true -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictParents(conflictID ConflictID) (conflictParents ds.Set[ConflictID], exists bool) { - conflict, exists := c.conflictsByID.Get(conflictID) - if !exists { - return nil, false - } - - conflictParents = ds.NewSet[ConflictID]() - _ = conflict.Parents.ForEach(func(parent *Conflict[ConflictID, ResourceID, VoteRank]) error { - conflictParents.Add(parent.ID) - return nil - }) - - return conflictParents, true -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictChildren(conflictID ConflictID) (conflictChildren ds.Set[ConflictID], exists bool) { - conflict, exists := c.conflictsByID.Get(conflictID) - if !exists { - return nil, false - } - - conflictChildren = ds.NewSet[ConflictID]() - _ = conflict.Children.ForEach(func(parent *Conflict[ConflictID, ResourceID, VoteRank]) error { - conflictChildren.Add(parent.ID) - return nil - }) - - return conflictChildren, true -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictSetMembers(conflictSetID ResourceID) (conflicts ds.Set[ConflictID], exists bool) { - conflictSet, exists := c.conflictSetsByID.Get(conflictSetID) - if !exists { - return nil, false - } - - conflicts = ds.NewSet[ConflictID]() - _ = conflictSet.ForEach(func(parent *Conflict[ConflictID, ResourceID, VoteRank]) error { - conflicts.Add(parent.ID) - return nil - }) - - return conflicts, true -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) ConflictWeight(conflictID ConflictID) int64 { - if conflict, exists := c.conflictsByID.Get(conflictID); exists { - return conflict.Weight.Value().ValidatorsWeight() - } - - return 0 -} - -// CastVotes applies the given votes to the ConflictDAG. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) CastVotes(vote *vote.Vote[VoteRank], conflictIDs ds.Set[ConflictID]) error { - c.mutex.RLock() - defer c.mutex.RUnlock() - c.votingMutex.Lock(vote.Voter) - defer c.votingMutex.Unlock(vote.Voter) - - supportedConflicts, revokedConflicts, err := c.determineVotes(conflictIDs) - if err != nil { - return ierrors.Errorf("failed to determine votes: %w", err) - } - - for supportedConflict := supportedConflicts.Iterator(); supportedConflict.HasNext(); { - supportedConflict.Next().ApplyVote(vote.WithLiked(true)) - } - - for revokedConflict := revokedConflicts.Iterator(); revokedConflict.HasNext(); { - revokedConflict.Next().ApplyVote(vote.WithLiked(false)) - } - - return nil -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) AcceptanceState(conflictIDs ds.Set[ConflictID]) acceptance.State { - lowestObservedState := acceptance.Accepted - if err := conflictIDs.ForEach(func(conflictID ConflictID) error { - conflict, exists := c.conflictsByID.Get(conflictID) - if !exists { - return ierrors.Errorf("tried to retrieve non-existing conflict: %w", conflictdag.ErrFatal) - } - - if conflict.IsRejected() { - lowestObservedState = acceptance.Rejected - - return conflictdag.ErrExpected - } - - if conflict.IsPending() { - lowestObservedState = acceptance.Pending - } - - return nil - }); err != nil && !ierrors.Is(err, conflictdag.ErrExpected) { - panic(err) - } - - return lowestObservedState -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) SetAccepted(conflictID ConflictID) { - c.mutex.RLock() - defer c.mutex.RUnlock() - - if conflict, exists := c.conflictsByID.Get(conflictID); exists { - conflict.setAcceptanceState(acceptance.Accepted) - } -} - -// UnacceptedConflicts takes a set of ConflictIDs and removes all the accepted Conflicts (leaving only the -// pending or rejected ones behind). -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) UnacceptedConflicts(conflictIDs ds.Set[ConflictID]) ds.Set[ConflictID] { - pendingConflictIDs := ds.NewSet[ConflictID]() - conflictIDs.Range(func(currentConflictID ConflictID) { - if conflict, exists := c.conflictsByID.Get(currentConflictID); exists && !conflict.IsAccepted() { - pendingConflictIDs.Add(currentConflictID) - } - }) - - return pendingConflictIDs -} - -// EvictConflict removes conflict with given ConflictID from ConflictDAG. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) EvictConflict(conflictID ConflictID) { - for _, evictedConflictID := range func() []ConflictID { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.evictConflict(conflictID) - }() { - c.events.ConflictEvicted.Trigger(evictedConflictID) - } -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) evictConflict(conflictID ConflictID) []ConflictID { - // evicting an already evicted conflict is fine - conflict, exists := c.conflictsByID.Get(conflictID) - if !exists { - return nil - } - - evictedConflictIDs := conflict.Evict() - - // remove the conflicts from the ConflictDAG dictionary - for _, evictedConflictID := range evictedConflictIDs { - c.conflictsByID.Delete(evictedConflictID) - } - - // unhook the conflict events and remove the unhook method from the storage - unhookFunc, unhookExists := c.conflictUnhooks.Get(conflictID) - if unhookExists { - unhookFunc() - c.conflictUnhooks.Delete(conflictID) - } - - return evictedConflictIDs -} - -// conflicts returns the Conflicts that are associated with the given ConflictIDs. If ignoreMissing is set to true, it -// will ignore missing Conflicts instead of returning an ErrEntityEvicted error. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) conflicts(ids ds.Set[ConflictID], ignoreMissing bool) (ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]], error) { - conflicts := ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]]() - - return conflicts, ids.ForEach(func(id ConflictID) (err error) { - existingConflict, exists := c.conflictsByID.Get(id) - if exists { - conflicts.Add(existingConflict) - } - - return lo.Cond(exists || ignoreMissing, nil, ierrors.Errorf("tried to retrieve a non-existing conflict with %s: %w", id, conflictdag.ErrEntityEvicted)) - }) -} - -// conflictSets returns the ConflictSets that are associated with the given ResourceIDs. If createMissing is set to -// true, it will create an empty ConflictSet for each missing ResourceID. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) conflictSets(resourceIDs ds.Set[ResourceID]) ds.Set[*ConflictSet[ConflictID, ResourceID, VoteRank]] { - conflictSets := ds.NewSet[*ConflictSet[ConflictID, ResourceID, VoteRank]]() - - resourceIDs.Range(func(resourceID ResourceID) { - conflictSets.Add(lo.Return1(c.conflictSetsByID.GetOrCreate(resourceID, c.conflictSetFactory(resourceID)))) - }) - - return conflictSets -} - -// determineVotes determines the Conflicts that are supported and revoked by the given ConflictIDs. -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) determineVotes(conflictIDs ds.Set[ConflictID]) (supportedConflicts, revokedConflicts ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]], err error) { - supportedConflicts = ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]]() - revokedConflicts = ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]]() - - revokedWalker := walker.New[*Conflict[ConflictID, ResourceID, VoteRank]]() - revokeConflict := func(revokedConflict *Conflict[ConflictID, ResourceID, VoteRank]) error { - if revokedConflicts.Add(revokedConflict) { - if supportedConflicts.Has(revokedConflict) { - return ierrors.Errorf("applied conflicting votes (%s is supported and revoked)", revokedConflict.ID) - } - - revokedWalker.PushAll(revokedConflict.Children.ToSlice()...) - } - - return nil - } - - supportedWalker := walker.New[*Conflict[ConflictID, ResourceID, VoteRank]]() - supportConflict := func(supportedConflict *Conflict[ConflictID, ResourceID, VoteRank]) error { - if supportedConflicts.Add(supportedConflict) { - if err := supportedConflict.ConflictingConflicts.ForEach(revokeConflict); err != nil { - return ierrors.Errorf("failed to collect conflicting conflicts: %w", err) - } - - supportedWalker.PushAll(supportedConflict.Parents.ToSlice()...) - } - - return nil - } - - for supportedWalker.PushAll(lo.Return1(c.conflicts(conflictIDs, true)).ToSlice()...); supportedWalker.HasNext(); { - if err := supportConflict(supportedWalker.Next()); err != nil { - return nil, nil, ierrors.Errorf("failed to collect supported conflicts: %w", err) - } - } - - for revokedWalker.HasNext() { - if revokedConflict := revokedWalker.Next(); revokedConflicts.Add(revokedConflict) { - revokedWalker.PushAll(revokedConflict.Children.ToSlice()...) - } - } - - return supportedConflicts, revokedConflicts, nil -} - -func (c *ConflictDAG[ConflictID, ResourceID, VoteRank]) conflictSetFactory(resourceID ResourceID) func() *ConflictSet[ConflictID, ResourceID, VoteRank] { - return func() *ConflictSet[ConflictID, ResourceID, VoteRank] { - conflictSet := NewConflictSet[ConflictID, ResourceID, VoteRank](resourceID) - - conflictSet.OnAllMembersEvicted(func(prevValue, newValue bool) { - if newValue && !prevValue { - c.conflictSetsByID.Delete(conflictSet.ID) - } - }) - - return conflictSet - } -} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflict.go b/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflict.go deleted file mode 100644 index 461f9b3a4..000000000 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflict.go +++ /dev/null @@ -1,197 +0,0 @@ -package conflictdagv1 - -import ( - "bytes" - - "github.com/iotaledger/hive.go/lo" - "github.com/iotaledger/hive.go/runtime/event" - "github.com/iotaledger/hive.go/runtime/syncutils" - "github.com/iotaledger/iota-core/pkg/core/acceptance" - "github.com/iotaledger/iota-core/pkg/core/weight" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" -) - -// sortedConflict is a wrapped Conflict that contains additional information for the SortedConflicts. -type sortedConflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]] struct { - // sortedSet is the SortedConflicts that contains this sortedConflict. - sortedSet *SortedConflicts[ConflictID, ResourceID, VoteRank] - - // lighterMember is the sortedConflict that is lighter than this one. - lighterMember *sortedConflict[ConflictID, ResourceID, VoteRank] - - // heavierMember is the sortedConflict that is heavierMember than this one. - heavierMember *sortedConflict[ConflictID, ResourceID, VoteRank] - - // currentWeight is the current weight of the Conflict. - currentWeight weight.Value - - // queuedWeight is the weight that is queued to be applied to the Conflict. - queuedWeight *weight.Value - - // weightMutex is used to protect the currentWeight and queuedWeight. - weightMutex syncutils.RWMutex - - // currentPreferredInstead is the current PreferredInstead value of the Conflict. - currentPreferredInstead *Conflict[ConflictID, ResourceID, VoteRank] - - // queuedPreferredInstead is the PreferredInstead value that is queued to be applied to the Conflict. - queuedPreferredInstead *Conflict[ConflictID, ResourceID, VoteRank] - - // preferredMutex is used to protect the currentPreferredInstead and queuedPreferredInstead. - preferredInsteadMutex syncutils.RWMutex - - onAcceptanceStateUpdatedHook *event.Hook[func(acceptance.State, acceptance.State)] - - // onWeightUpdatedHook is the hook that is triggered when the weight of the Conflict is updated. - onWeightUpdatedHook *event.Hook[func(weight.Value)] - - // onPreferredUpdatedHook is the hook that is triggered when the PreferredInstead value of the Conflict is updated. - onPreferredUpdatedHook *event.Hook[func(*Conflict[ConflictID, ResourceID, VoteRank])] - - // Conflict is the wrapped Conflict. - *Conflict[ConflictID, ResourceID, VoteRank] -} - -// newSortedConflict creates a new sortedConflict. -func newSortedConflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]](set *SortedConflicts[ConflictID, ResourceID, VoteRank], conflict *Conflict[ConflictID, ResourceID, VoteRank]) *sortedConflict[ConflictID, ResourceID, VoteRank] { - s := &sortedConflict[ConflictID, ResourceID, VoteRank]{ - sortedSet: set, - currentWeight: conflict.Weight.Value(), - currentPreferredInstead: conflict.PreferredInstead(), - Conflict: conflict, - } - - if set.owner != nil { - s.onAcceptanceStateUpdatedHook = conflict.AcceptanceStateUpdated.Hook(s.onAcceptanceStateUpdated) - } - - s.onWeightUpdatedHook = conflict.Weight.OnUpdate.Hook(s.queueWeightUpdate) - s.onPreferredUpdatedHook = conflict.PreferredInsteadUpdated.Hook(s.queuePreferredInsteadUpdate) - - return s -} - -// Weight returns the current weight of the sortedConflict. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) Weight() weight.Value { - s.weightMutex.RLock() - defer s.weightMutex.RUnlock() - - return s.currentWeight -} - -// Compare compares the sortedConflict to another sortedConflict. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) Compare(other *sortedConflict[ConflictID, ResourceID, VoteRank]) int { - if result := s.Weight().Compare(other.Weight()); result != weight.Equal { - return result - } - - return bytes.Compare(lo.PanicOnErr(s.ID.Bytes()), lo.PanicOnErr(other.ID.Bytes())) -} - -// PreferredInstead returns the current preferred instead value of the sortedConflict. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) PreferredInstead() *Conflict[ConflictID, ResourceID, VoteRank] { - s.preferredInsteadMutex.RLock() - defer s.preferredInsteadMutex.RUnlock() - - return s.currentPreferredInstead -} - -// IsPreferred returns true if the sortedConflict is preferred instead of its Conflicts. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) IsPreferred() bool { - return s.PreferredInstead() == s.Conflict -} - -// Unhook cleans up the sortedConflict. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) Unhook() { - if s.onAcceptanceStateUpdatedHook != nil { - s.onAcceptanceStateUpdatedHook.Unhook() - s.onAcceptanceStateUpdatedHook = nil - } - - if s.onWeightUpdatedHook != nil { - s.onWeightUpdatedHook.Unhook() - s.onWeightUpdatedHook = nil - } - - if s.onPreferredUpdatedHook != nil { - s.onPreferredUpdatedHook.Unhook() - s.onPreferredUpdatedHook = nil - } -} - -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) onAcceptanceStateUpdated(_, newState acceptance.State) { - if newState.IsAccepted() { - s.sortedSet.owner.setAcceptanceState(acceptance.Rejected) - } -} - -// queueWeightUpdate queues a weight update for the sortedConflict. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) queueWeightUpdate(newWeight weight.Value) { - s.weightMutex.Lock() - defer s.weightMutex.Unlock() - - if (s.queuedWeight == nil && s.currentWeight == newWeight) || (s.queuedWeight != nil && *s.queuedWeight == newWeight) { - return - } - - s.queuedWeight = &newWeight - s.sortedSet.notifyPendingWeightUpdate(s) -} - -// weightUpdateApplied tries to apply a queued weight update to the sortedConflict and returns true if successful. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) weightUpdateApplied() bool { - s.weightMutex.Lock() - defer s.weightMutex.Unlock() - - if s.queuedWeight == nil { - return false - } - - if *s.queuedWeight == s.currentWeight { - s.queuedWeight = nil - - return false - } - - s.currentWeight = *s.queuedWeight - s.queuedWeight = nil - - return true -} - -// queuePreferredInsteadUpdate notifies the sortedSet that the preferred instead flag of the Conflict was updated. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) queuePreferredInsteadUpdate(conflict *Conflict[ConflictID, ResourceID, VoteRank]) { - s.preferredInsteadMutex.Lock() - defer s.preferredInsteadMutex.Unlock() - - if (s.queuedPreferredInstead == nil && s.currentPreferredInstead == conflict) || - (s.queuedPreferredInstead != nil && s.queuedPreferredInstead == conflict) || - s.sortedSet.owner.Conflict == conflict { - return - } - - s.queuedPreferredInstead = conflict - s.sortedSet.notifyPendingPreferredInsteadUpdate(s) -} - -// preferredInsteadUpdateApplied tries to apply a queued preferred instead update to the sortedConflict and returns -// true if successful. -func (s *sortedConflict[ConflictID, ResourceID, VoteRank]) preferredInsteadUpdateApplied() bool { - s.preferredInsteadMutex.Lock() - defer s.preferredInsteadMutex.Unlock() - - if s.queuedPreferredInstead == nil { - return false - } - - if s.queuedPreferredInstead == s.currentPreferredInstead { - s.queuedPreferredInstead = nil - - return false - } - - s.currentPreferredInstead = s.queuedPreferredInstead - s.queuedPreferredInstead = nil - - return true -} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/utils.go b/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/utils.go deleted file mode 100644 index cea192ae1..000000000 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/utils.go +++ /dev/null @@ -1,19 +0,0 @@ -package conflictdagv1 - -import ( - "github.com/iotaledger/hive.go/ds" - "github.com/iotaledger/iota-core/pkg/core/weight" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" -) - -// heaviestConflict returns the largest Conflict from the given Conflicts. -func heaviestConflict[ConflictID, ResourceID conflictdag.IDType, VoterPower conflictdag.VoteRankType[VoterPower]](conflicts ds.Set[*Conflict[ConflictID, ResourceID, VoterPower]]) *Conflict[ConflictID, ResourceID, VoterPower] { - var result *Conflict[ConflictID, ResourceID, VoterPower] - conflicts.Range(func(conflict *Conflict[ConflictID, ResourceID, VoterPower]) { - if conflict.Compare(result) == weight.Heavier { - result = conflict - } - }) - - return result -} diff --git a/pkg/protocol/engine/mempool/conflictdag/events.go b/pkg/protocol/engine/mempool/conflictdag/events.go deleted file mode 100644 index 0ac389859..000000000 --- a/pkg/protocol/engine/mempool/conflictdag/events.go +++ /dev/null @@ -1,47 +0,0 @@ -package conflictdag - -import ( - "github.com/iotaledger/hive.go/ds" - "github.com/iotaledger/hive.go/runtime/event" -) - -// region Events /////////////////////////////////////////////////////////////////////////////////////////////////////// - -// Events is a container that acts as a dictionary for the events of a ConflictDAG. -type Events[ConflictID, ResourceID comparable] struct { - // ConflictCreated is triggered when a new Conflict is created. - ConflictCreated *event.Event1[ConflictID] - - // ConflictEvicted is triggered when a Conflict is evicted from the ConflictDAG. - ConflictEvicted *event.Event1[ConflictID] - - // ConflictingResourcesAdded is triggered when the Conflict is added to a new ConflictSet. - ConflictingResourcesAdded *event.Event2[ConflictID, ds.Set[ResourceID]] - - // ConflictParentsUpdated is triggered when the parents of a Conflict are updated. - ConflictParentsUpdated *event.Event2[ConflictID, ds.Set[ConflictID]] - - // ConflictAccepted is an event that gets triggered whenever a Conflict is confirmed. - ConflictAccepted *event.Event1[ConflictID] - - // ConflictRejected is an event that gets triggered whenever a Conflict is rejected. - ConflictRejected *event.Event1[ConflictID] - - event.Group[Events[ConflictID, ResourceID], *Events[ConflictID, ResourceID]] -} - -// NewEvents contains the constructor of the Events object (it is generated by a generic factory). -func NewEvents[ConflictID, ResourceID comparable](optsLinkTarget ...*Events[ConflictID, ResourceID]) (events *Events[ConflictID, ResourceID]) { - return event.CreateGroupConstructor(func() (self *Events[ConflictID, ResourceID]) { - return &Events[ConflictID, ResourceID]{ - ConflictCreated: event.New1[ConflictID](), - ConflictEvicted: event.New1[ConflictID](), - ConflictingResourcesAdded: event.New2[ConflictID, ds.Set[ResourceID]](), - ConflictParentsUpdated: event.New2[ConflictID, ds.Set[ConflictID]](), - ConflictAccepted: event.New1[ConflictID](), - ConflictRejected: event.New1[ConflictID](), - } - })(optsLinkTarget...) -} - -// endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/pkg/protocol/engine/mempool/mempool.go b/pkg/protocol/engine/mempool/mempool.go index bb0ba1019..3116fb71c 100644 --- a/pkg/protocol/engine/mempool/mempool.go +++ b/pkg/protocol/engine/mempool/mempool.go @@ -2,11 +2,11 @@ package mempool import ( "github.com/iotaledger/hive.go/runtime/event" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" iotago "github.com/iotaledger/iota.go/v4" ) -type MemPool[VoteRank conflictdag.VoteRankType[VoteRank]] interface { +type MemPool[VoteRank spenddag.VoteRankType[VoteRank]] interface { AttachSignedTransaction(signedTransaction SignedTransaction, transaction Transaction, blockID iotago.BlockID) (signedTransactionMetadata SignedTransactionMetadata, err error) OnSignedTransactionAttached(callback func(signedTransactionMetadata SignedTransactionMetadata), opts ...event.Option) diff --git a/pkg/protocol/engine/mempool/conflictdag/constraints.go b/pkg/protocol/engine/mempool/spenddag/constraints.go similarity index 97% rename from pkg/protocol/engine/mempool/conflictdag/constraints.go rename to pkg/protocol/engine/mempool/spenddag/constraints.go index 3f7d6979a..2c5503c79 100644 --- a/pkg/protocol/engine/mempool/conflictdag/constraints.go +++ b/pkg/protocol/engine/mempool/spenddag/constraints.go @@ -1,4 +1,4 @@ -package conflictdag +package spenddag import ( "github.com/iotaledger/hive.go/constraints" diff --git a/pkg/protocol/engine/mempool/conflictdag/errors.go b/pkg/protocol/engine/mempool/spenddag/errors.go similarity index 94% rename from pkg/protocol/engine/mempool/conflictdag/errors.go rename to pkg/protocol/engine/mempool/spenddag/errors.go index 80740e8e4..d2574864a 100644 --- a/pkg/protocol/engine/mempool/conflictdag/errors.go +++ b/pkg/protocol/engine/mempool/spenddag/errors.go @@ -1,4 +1,4 @@ -package conflictdag +package spenddag import "github.com/iotaledger/hive.go/ierrors" diff --git a/pkg/protocol/engine/mempool/spenddag/events.go b/pkg/protocol/engine/mempool/spenddag/events.go new file mode 100644 index 000000000..14d68bacc --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/events.go @@ -0,0 +1,47 @@ +package spenddag + +import ( + "github.com/iotaledger/hive.go/ds" + "github.com/iotaledger/hive.go/runtime/event" +) + +// region Events /////////////////////////////////////////////////////////////////////////////////////////////////////// + +// Events is a container that acts as a dictionary for the events of a SpendDAG. +type Events[SpendID, ResourceID comparable] struct { + // SpendCreated is triggered when a new Conflict is created. + SpendCreated *event.Event1[SpendID] + + // SpendEvicted is triggered when a Conflict is evicted from the SpendDAG. + SpendEvicted *event.Event1[SpendID] + + // ConflictingResourcesAdded is triggered when the Conflict is added to a new ConflictSet. + ConflictingResourcesAdded *event.Event2[SpendID, ds.Set[ResourceID]] + + // SpendParentsUpdated is triggered when the parents of a Conflict are updated. + SpendParentsUpdated *event.Event2[SpendID, ds.Set[SpendID]] + + // SpendAccepted is an event that gets triggered whenever a Conflict is confirmed. + SpendAccepted *event.Event1[SpendID] + + // SpendRejected is an event that gets triggered whenever a Conflict is rejected. + SpendRejected *event.Event1[SpendID] + + event.Group[Events[SpendID, ResourceID], *Events[SpendID, ResourceID]] +} + +// NewEvents contains the constructor of the Events object (it is generated by a generic factory). +func NewEvents[SpendID, ResourceID comparable](optsLinkTarget ...*Events[SpendID, ResourceID]) (events *Events[SpendID, ResourceID]) { + return event.CreateGroupConstructor(func() (self *Events[SpendID, ResourceID]) { + return &Events[SpendID, ResourceID]{ + SpendCreated: event.New1[SpendID](), + SpendEvicted: event.New1[SpendID](), + ConflictingResourcesAdded: event.New2[SpendID, ds.Set[ResourceID]](), + SpendParentsUpdated: event.New2[SpendID, ds.Set[SpendID]](), + SpendAccepted: event.New1[SpendID](), + SpendRejected: event.New1[SpendID](), + } + })(optsLinkTarget...) +} + +// endregion /////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/pkg/protocol/engine/mempool/spenddag/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddag.go new file mode 100644 index 000000000..a0b697801 --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddag.go @@ -0,0 +1,43 @@ +package spenddag + +import ( + "github.com/iotaledger/hive.go/ds" + "github.com/iotaledger/iota-core/pkg/core/acceptance" + "github.com/iotaledger/iota-core/pkg/core/account" + "github.com/iotaledger/iota-core/pkg/core/vote" +) + +type SpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { + Shutdown() + Events() *Events[SpendID, ResourceID] + + CreateSpend(id SpendID) + UpdateConflictingResources(id SpendID, resourceIDs ds.Set[ResourceID]) error + + ReadConsistent(callback func(spendDAG ReadLockedSpendDAG[SpendID, ResourceID, VoteRank]) error) error + UpdateSpendParents(spendID SpendID, addedParentIDs, removedParentIDs ds.Set[SpendID]) error + FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) + ConflictingSpends(spendID SpendID) (conflictingSpends ds.Set[SpendID], exists bool) + CastVotes(vote *vote.Vote[VoteRank], spendIDs ds.Set[SpendID]) error + AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State + SetAccepted(spendID SpendID) + UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] + AllSpendsSupported(seat account.SeatIndex, spendIDs ds.Set[SpendID]) bool + EvictSpend(spendID SpendID) + + ConflictSets(spendID SpendID) (conflictSetIDs ds.Set[ResourceID], exists bool) + SpendParents(spendID SpendID) (spendIDs ds.Set[SpendID], exists bool) + ConflictSetMembers(conflictSetID ResourceID) (spendIDs ds.Set[SpendID], exists bool) + SpendWeight(spendID SpendID) int64 + SpendChildren(spendID SpendID) (spendIDs ds.Set[SpendID], exists bool) + SpendVoters(spendID SpendID) (voters ds.Set[account.SeatIndex]) + LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] +} + +type ReadLockedSpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { + LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] + FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) + ConflictingSpends(spendID SpendID) (conflictingConflicts ds.Set[SpendID], exists bool) + AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State + UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] +} diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go new file mode 100644 index 000000000..a891f7d5d --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go @@ -0,0 +1,72 @@ +package spenddagv1 + +import ( + "github.com/iotaledger/hive.go/ds" + "github.com/iotaledger/hive.go/ds/reactive" + "github.com/iotaledger/hive.go/ierrors" + "github.com/iotaledger/hive.go/runtime/syncutils" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" +) + +// ConflictSet represents a set of Spends that are conflicting with each other over a common Resource. +type ConflictSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // ID is the ID of the Resource that the Spends in this ConflictSet are conflicting over. + ID ResourceID + + // members is the set of Spends that are conflicting over the shared resource. + members ds.Set[*Spend[SpendID, ResourceID, VoteRank]] + + allMembersEvicted reactive.Variable[bool] + + mutex syncutils.RWMutex +} + +// NewConflictSet creates a new ConflictSet of Spends that are conflicting with each other over the given Resource. +func NewConflictSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id ResourceID) *ConflictSet[SpendID, ResourceID, VoteRank] { + return &ConflictSet[SpendID, ResourceID, VoteRank]{ + ID: id, + allMembersEvicted: reactive.NewVariable[bool](), + members: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), + } +} + +// Add adds a Spend to the ConflictSet and returns all other members of the set. +func (c *ConflictSet[SpendID, ResourceID, VoteRank]) Add(addedConflict *Spend[SpendID, ResourceID, VoteRank]) (otherMembers ds.Set[*Spend[SpendID, ResourceID, VoteRank]], err error) { + c.mutex.Lock() + defer c.mutex.Unlock() + + if c.allMembersEvicted.Get() { + return nil, ierrors.New("cannot join a ConflictSet whose all members are evicted") + } + + if otherMembers = c.members.Clone(); !c.members.Add(addedConflict) { + return nil, spenddag.ErrAlreadyPartOfConflictSet + } + + return otherMembers, nil + +} + +// Remove removes a Spend from the ConflictSet and returns all remaining members of the set. +func (c *ConflictSet[SpendID, ResourceID, VoteRank]) Remove(removedConflict *Spend[SpendID, ResourceID, VoteRank]) (removed bool) { + c.mutex.Lock() + defer c.mutex.Unlock() + + if removed = c.members.Delete(removedConflict); removed && c.members.IsEmpty() { + c.allMembersEvicted.Set(true) + } + + return removed +} + +func (c *ConflictSet[SpendID, ResourceID, VoteRank]) ForEach(callback func(parent *Spend[SpendID, ResourceID, VoteRank]) error) error { + c.mutex.RLock() + defer c.mutex.RUnlock() + + return c.members.ForEach(callback) +} + +// OnAllMembersEvicted executes a callback when all members of the ConflictSet are evicted and the ConflictSet itself can be evicted. +func (c *ConflictSet[SpendID, ResourceID, VoteRank]) OnAllMembersEvicted(callback func(prevValue, newValue bool)) { + c.allMembersEvicted.OnUpdate(callback) +} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go similarity index 93% rename from pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set_test.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go index 044182a21..8d2bf2a40 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_set_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go @@ -1,4 +1,4 @@ -package conflictdagv1 +package spenddagv1 import ( "github.com/iotaledger/iota-core/pkg/core/vote" diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go new file mode 100644 index 000000000..491c14aec --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go @@ -0,0 +1,197 @@ +package spenddagv1 + +import ( + "bytes" + + "github.com/iotaledger/hive.go/lo" + "github.com/iotaledger/hive.go/runtime/event" + "github.com/iotaledger/hive.go/runtime/syncutils" + "github.com/iotaledger/iota-core/pkg/core/acceptance" + "github.com/iotaledger/iota-core/pkg/core/weight" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" +) + +// sortedSpend is a wrapped Spend that contains additional information for the SortedSpends. +type sortedSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // sortedSet is the SortedSpends that contains this sortedSpend. + sortedSet *SortedSpends[SpendID, ResourceID, VoteRank] + + // lighterMember is the sortedSpend that is lighter than this one. + lighterMember *sortedSpend[SpendID, ResourceID, VoteRank] + + // heavierMember is the sortedSpend that is heavierMember than this one. + heavierMember *sortedSpend[SpendID, ResourceID, VoteRank] + + // currentWeight is the current weight of the Spend. + currentWeight weight.Value + + // queuedWeight is the weight that is queued to be applied to the Spend. + queuedWeight *weight.Value + + // weightMutex is used to protect the currentWeight and queuedWeight. + weightMutex syncutils.RWMutex + + // currentPreferredInstead is the current PreferredInstead value of the Spend. + currentPreferredInstead *Spend[SpendID, ResourceID, VoteRank] + + // queuedPreferredInstead is the PreferredInstead value that is queued to be applied to the Spend. + queuedPreferredInstead *Spend[SpendID, ResourceID, VoteRank] + + // preferredMutex is used to protect the currentPreferredInstead and queuedPreferredInstead. + preferredInsteadMutex syncutils.RWMutex + + onAcceptanceStateUpdatedHook *event.Hook[func(acceptance.State, acceptance.State)] + + // onWeightUpdatedHook is the hook that is triggered when the weight of the Spend is updated. + onWeightUpdatedHook *event.Hook[func(weight.Value)] + + // onPreferredUpdatedHook is the hook that is triggered when the PreferredInstead value of the Spend is updated. + onPreferredUpdatedHook *event.Hook[func(*Spend[SpendID, ResourceID, VoteRank])] + + // Spend is the wrapped Spend. + *Spend[SpendID, ResourceID, VoteRank] +} + +// newSortedSpend creates a new sortedSpend. +func newSortedSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](set *SortedSpends[SpendID, ResourceID, VoteRank], spend *Spend[SpendID, ResourceID, VoteRank]) *sortedSpend[SpendID, ResourceID, VoteRank] { + s := &sortedSpend[SpendID, ResourceID, VoteRank]{ + sortedSet: set, + currentWeight: spend.Weight.Value(), + currentPreferredInstead: spend.PreferredInstead(), + Spend: spend, + } + + if set.owner != nil { + s.onAcceptanceStateUpdatedHook = spend.AcceptanceStateUpdated.Hook(s.onAcceptanceStateUpdated) + } + + s.onWeightUpdatedHook = spend.Weight.OnUpdate.Hook(s.queueWeightUpdate) + s.onPreferredUpdatedHook = spend.PreferredInsteadUpdated.Hook(s.queuePreferredInsteadUpdate) + + return s +} + +// Weight returns the current weight of the sortedSpend. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Weight() weight.Value { + s.weightMutex.RLock() + defer s.weightMutex.RUnlock() + + return s.currentWeight +} + +// Compare compares the sortedSpend to another sortedSpend. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Compare(other *sortedSpend[SpendID, ResourceID, VoteRank]) int { + if result := s.Weight().Compare(other.Weight()); result != weight.Equal { + return result + } + + return bytes.Compare(lo.PanicOnErr(s.ID.Bytes()), lo.PanicOnErr(other.ID.Bytes())) +} + +// PreferredInstead returns the current preferred instead value of the sortedSpend. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) PreferredInstead() *Spend[SpendID, ResourceID, VoteRank] { + s.preferredInsteadMutex.RLock() + defer s.preferredInsteadMutex.RUnlock() + + return s.currentPreferredInstead +} + +// IsPreferred returns true if the sortedSpend is preferred instead of its Spends. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) IsPreferred() bool { + return s.PreferredInstead() == s.Spend +} + +// Unhook cleans up the sortedSpend. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Unhook() { + if s.onAcceptanceStateUpdatedHook != nil { + s.onAcceptanceStateUpdatedHook.Unhook() + s.onAcceptanceStateUpdatedHook = nil + } + + if s.onWeightUpdatedHook != nil { + s.onWeightUpdatedHook.Unhook() + s.onWeightUpdatedHook = nil + } + + if s.onPreferredUpdatedHook != nil { + s.onPreferredUpdatedHook.Unhook() + s.onPreferredUpdatedHook = nil + } +} + +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) onAcceptanceStateUpdated(_, newState acceptance.State) { + if newState.IsAccepted() { + s.sortedSet.owner.setAcceptanceState(acceptance.Rejected) + } +} + +// queueWeightUpdate queues a weight update for the sortedSpend. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queueWeightUpdate(newWeight weight.Value) { + s.weightMutex.Lock() + defer s.weightMutex.Unlock() + + if (s.queuedWeight == nil && s.currentWeight == newWeight) || (s.queuedWeight != nil && *s.queuedWeight == newWeight) { + return + } + + s.queuedWeight = &newWeight + s.sortedSet.notifyPendingWeightUpdate(s) +} + +// weightUpdateApplied tries to apply a queued weight update to the sortedSpend and returns true if successful. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) weightUpdateApplied() bool { + s.weightMutex.Lock() + defer s.weightMutex.Unlock() + + if s.queuedWeight == nil { + return false + } + + if *s.queuedWeight == s.currentWeight { + s.queuedWeight = nil + + return false + } + + s.currentWeight = *s.queuedWeight + s.queuedWeight = nil + + return true +} + +// queuePreferredInsteadUpdate notifies the sortedSet that the preferred instead flag of the Spend was updated. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queuePreferredInsteadUpdate(conflict *Spend[SpendID, ResourceID, VoteRank]) { + s.preferredInsteadMutex.Lock() + defer s.preferredInsteadMutex.Unlock() + + if (s.queuedPreferredInstead == nil && s.currentPreferredInstead == conflict) || + (s.queuedPreferredInstead != nil && s.queuedPreferredInstead == conflict) || + s.sortedSet.owner.Spend == conflict { + return + } + + s.queuedPreferredInstead = conflict + s.sortedSet.notifyPendingPreferredInsteadUpdate(s) +} + +// preferredInsteadUpdateApplied tries to apply a queued preferred instead update to the sortedSpend and returns +// true if successful. +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) preferredInsteadUpdateApplied() bool { + s.preferredInsteadMutex.Lock() + defer s.preferredInsteadMutex.Unlock() + + if s.queuedPreferredInstead == nil { + return false + } + + if s.queuedPreferredInstead == s.currentPreferredInstead { + s.queuedPreferredInstead = nil + + return false + } + + s.currentPreferredInstead = s.queuedPreferredInstead + s.queuedPreferredInstead = nil + + return true +} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go similarity index 55% rename from pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go index 6b05827dc..4f30a3b94 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go @@ -1,4 +1,4 @@ -package conflictdagv1 +package spenddagv1 import ( "sync" @@ -9,25 +9,25 @@ import ( "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/stringify" "github.com/iotaledger/iota-core/pkg/core/weight" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// SortedConflicts is a set of Conflicts that is sorted by their weight. -type SortedConflicts[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]] struct { - // owner is the Conflict that owns this SortedConflicts. - owner *sortedConflict[ConflictID, ResourceID, VoteRank] +// SortedSpends is a set of Spends that is sorted by their weight. +type SortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // owner is the Spend that owns this SortedSpends. + owner *sortedSpend[SpendID, ResourceID, VoteRank] - // members is a map of ConflictIDs to their corresponding sortedConflict. - members *shrinkingmap.ShrinkingMap[ConflictID, *sortedConflict[ConflictID, ResourceID, VoteRank]] + // members is a map of SpendIDs to their corresponding sortedSpend. + members *shrinkingmap.ShrinkingMap[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]] - // heaviestMember is the heaviest member of the SortedConflicts. - heaviestMember *sortedConflict[ConflictID, ResourceID, VoteRank] + // heaviestMember is the heaviest member of the SortedSpends. + heaviestMember *sortedSpend[SpendID, ResourceID, VoteRank] - // heaviestPreferredMember is the heaviest preferred member of the SortedConflicts. - heaviestPreferredMember *sortedConflict[ConflictID, ResourceID, VoteRank] + // heaviestPreferredMember is the heaviest preferred member of the SortedSpends. + heaviestPreferredMember *sortedSpend[SpendID, ResourceID, VoteRank] - // pendingWeightUpdates is a collection of Conflicts that have a pending weight update. - pendingWeightUpdates *shrinkingmap.ShrinkingMap[ConflictID, *sortedConflict[ConflictID, ResourceID, VoteRank]] + // pendingWeightUpdates is a collection of Spends that have a pending weight update. + pendingWeightUpdates *shrinkingmap.ShrinkingMap[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]] // pendingWeightUpdatesSignal is a signal that is used to notify the fixMemberPositionWorker about pending weight // updates. @@ -36,8 +36,8 @@ type SortedConflicts[ConflictID, ResourceID conflictdag.IDType, VoteRank conflic // pendingWeightUpdatesMutex is a mutex that is used to synchronize access to the pendingWeightUpdates. pendingWeightUpdatesMutex syncutils.RWMutex - // pendingPreferredInsteadUpdates is a collection of Conflicts that have a pending preferred instead update. - pendingPreferredInsteadUpdates *shrinkingmap.ShrinkingMap[ConflictID, *sortedConflict[ConflictID, ResourceID, VoteRank]] + // pendingPreferredInsteadUpdates is a collection of Spends that have a pending preferred instead update. + pendingPreferredInsteadUpdates *shrinkingmap.ShrinkingMap[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]] // pendingPreferredInsteadSignal is a signal that is used to notify the fixPreferredInsteadWorker about pending // preferred instead updates. @@ -49,25 +49,25 @@ type SortedConflicts[ConflictID, ResourceID conflictdag.IDType, VoteRank conflic // pendingUpdatesCounter is a counter that keeps track of the number of pending weight updates. pendingUpdatesCounter *syncutils.Counter - // isShutdown is used to signal that the SortedConflicts is shutting down. + // isShutdown is used to signal that the SortedSpends is shutting down. isShutdown atomic.Bool - // mutex is used to synchronize access to the SortedConflicts. + // mutex is used to synchronize access to the SortedSpends. mutex syncutils.RWMutex } -// NewSortedConflicts creates a new SortedConflicts that is owned by the given Conflict. -func NewSortedConflicts[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]](owner *Conflict[ConflictID, ResourceID, VoteRank], pendingUpdatesCounter *syncutils.Counter) *SortedConflicts[ConflictID, ResourceID, VoteRank] { - s := &SortedConflicts[ConflictID, ResourceID, VoteRank]{ - members: shrinkingmap.New[ConflictID, *sortedConflict[ConflictID, ResourceID, VoteRank]](), - pendingWeightUpdates: shrinkingmap.New[ConflictID, *sortedConflict[ConflictID, ResourceID, VoteRank]](), +// NewSortedSpends creates a new SortedSpends that is owned by the given Spend. +func NewSortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](owner *Spend[SpendID, ResourceID, VoteRank], pendingUpdatesCounter *syncutils.Counter) *SortedSpends[SpendID, ResourceID, VoteRank] { + s := &SortedSpends[SpendID, ResourceID, VoteRank]{ + members: shrinkingmap.New[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]](), + pendingWeightUpdates: shrinkingmap.New[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]](), pendingUpdatesCounter: pendingUpdatesCounter, - pendingPreferredInsteadUpdates: shrinkingmap.New[ConflictID, *sortedConflict[ConflictID, ResourceID, VoteRank]](), + pendingPreferredInsteadUpdates: shrinkingmap.New[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]](), } s.pendingWeightUpdatesSignal = sync.NewCond(&s.pendingWeightUpdatesMutex) s.pendingPreferredInsteadSignal = sync.NewCond(&s.pendingPreferredInsteadMutex) - s.owner = newSortedConflict[ConflictID, ResourceID, VoteRank](s, owner) + s.owner = newSortedSpend[SpendID, ResourceID, VoteRank](s, owner) s.members.Set(owner.ID, s.owner) s.heaviestMember = s.owner @@ -79,8 +79,8 @@ func NewSortedConflicts[ConflictID, ResourceID conflictdag.IDType, VoteRank conf return s } -// Add adds the given Conflict to the SortedConflicts. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Add(conflict *Conflict[ConflictID, ResourceID, VoteRank]) bool { +// Add adds the given Spend to the SortedSpends. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(conflict *Spend[SpendID, ResourceID, VoteRank]) bool { s.mutex.Lock() defer s.mutex.Unlock() @@ -88,8 +88,8 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Add(conflict *Confli return false } - newMember, isNew := s.members.GetOrCreate(conflict.ID, func() *sortedConflict[ConflictID, ResourceID, VoteRank] { - return newSortedConflict(s, conflict) + newMember, isNew := s.members.GetOrCreate(conflict.ID, func() *sortedSpend[SpendID, ResourceID, VoteRank] { + return newSortedSpend(s, conflict) }) if !isNew { return false @@ -98,7 +98,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Add(conflict *Confli for currentMember := s.heaviestMember; ; currentMember = currentMember.lighterMember { comparison := newMember.Compare(currentMember) if comparison == weight.Equal { - panic("different Conflicts should never have the same weight") + panic("different Spends should never have the same weight") } if comparison == weight.Heavier { @@ -134,8 +134,8 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Add(conflict *Confli return true } -// ForEach iterates over all Conflicts of the SortedConflicts and calls the given callback for each of them. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) ForEach(callback func(*Conflict[ConflictID, ResourceID, VoteRank]) error, optIncludeOwner ...bool) error { +// ForEach iterates over all Spends of the SortedSpends and calls the given callback for each of them. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) ForEach(callback func(*Spend[SpendID, ResourceID, VoteRank]) error, optIncludeOwner ...bool) error { s.mutex.RLock() defer s.mutex.RUnlock() @@ -144,7 +144,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) ForEach(callback fun continue } - if err := callback(currentMember.Conflict); err != nil { + if err := callback(currentMember.Spend); err != nil { return err } } @@ -152,9 +152,9 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) ForEach(callback fun return nil } -// Range iterates over all Conflicts of the SortedConflicts and calls the given callback for each of them (without +// Range iterates over all Spends of the SortedSpends and calls the given callback for each of them (without // manual error handling). -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Range(callback func(*Conflict[ConflictID, ResourceID, VoteRank]), optIncludeOwner ...bool) { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Range(callback func(*Spend[SpendID, ResourceID, VoteRank]), optIncludeOwner ...bool) { s.mutex.RLock() defer s.mutex.RUnlock() @@ -163,61 +163,61 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Range(callback func( continue } - callback(currentMember.Conflict) + callback(currentMember.Spend) } } -// Remove removes the Conflict with the given ID from the SortedConflicts. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Remove(id ConflictID) bool { +// Remove removes the Spend with the given ID from the SortedSpends. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Remove(id SpendID) bool { s.mutex.Lock() defer s.mutex.Unlock() - conflict, exists := s.members.Get(id) + spend, exists := s.members.Get(id) if !exists || !s.members.Delete(id) { return false } - conflict.Unhook() + spend.Unhook() - if conflict.heavierMember != nil { - conflict.heavierMember.lighterMember = conflict.lighterMember + if spend.heavierMember != nil { + spend.heavierMember.lighterMember = spend.lighterMember } - if conflict.lighterMember != nil { - conflict.lighterMember.heavierMember = conflict.heavierMember + if spend.lighterMember != nil { + spend.lighterMember.heavierMember = spend.heavierMember } - if s.heaviestMember == conflict { - s.heaviestMember = conflict.lighterMember + if s.heaviestMember == spend { + s.heaviestMember = spend.lighterMember } - if s.heaviestPreferredMember == conflict { - s.findLowerHeaviestPreferredMember(conflict.lighterMember) + if s.heaviestPreferredMember == spend { + s.findLowerHeaviestPreferredMember(spend.lighterMember) } - conflict.lighterMember = nil - conflict.heavierMember = nil + spend.lighterMember = nil + spend.heavierMember = nil return true } -// String returns a human-readable representation of the SortedConflicts. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) String() string { - structBuilder := stringify.NewStructBuilder("SortedConflicts", +// String returns a human-readable representation of the SortedSpends. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) String() string { + structBuilder := stringify.NewStructBuilder("SortedSpends", stringify.NewStructField("owner", s.owner.ID), stringify.NewStructField("heaviestMember", s.heaviestMember.ID), stringify.NewStructField("heaviestPreferredMember", s.heaviestPreferredMember.ID), ) - s.Range(func(conflict *Conflict[ConflictID, ResourceID, VoteRank]) { - structBuilder.AddField(stringify.NewStructField(conflict.ID.String(), conflict)) + s.Range(func(spend *Spend[SpendID, ResourceID, VoteRank]) { + structBuilder.AddField(stringify.NewStructField(spend.ID.String(), spend)) }, true) return structBuilder.String() } -// notifyPendingWeightUpdate notifies the SortedConflicts about a pending weight update of the given member. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) notifyPendingWeightUpdate(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +// notifyPendingWeightUpdate notifies the SortedSpends about a pending weight update of the given member. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) notifyPendingWeightUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { s.pendingWeightUpdatesMutex.Lock() defer s.pendingWeightUpdatesMutex.Unlock() @@ -229,7 +229,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) notifyPendingWeightU } // fixMemberPositionWorker is a worker that fixes the position of sortedSetMembers that need to be updated. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixMemberPositionWorker() { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPositionWorker() { for member := s.nextPendingWeightUpdate(); member != nil; member = s.nextPendingWeightUpdate() { s.applyWeightUpdate(member) @@ -238,7 +238,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixMemberPositionWor } // nextPendingWeightUpdate returns the next member that needs to be updated (or nil if the shutdown flag is set). -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) nextPendingWeightUpdate() *sortedConflict[ConflictID, ResourceID, VoteRank] { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) nextPendingWeightUpdate() *sortedSpend[SpendID, ResourceID, VoteRank] { s.pendingWeightUpdatesMutex.Lock() defer s.pendingWeightUpdatesMutex.Unlock() @@ -256,7 +256,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) nextPendingWeightUpd } // applyWeightUpdate applies the weight update of the given member. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) applyWeightUpdate(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyWeightUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { s.mutex.Lock() defer s.mutex.Unlock() @@ -265,8 +265,8 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) applyWeightUpdate(me } } -// fixMemberPosition fixes the position of the given member in the SortedConflicts. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixMemberPosition(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +// fixMemberPosition fixes the position of the given member in the SortedSpends. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPosition(member *sortedSpend[SpendID, ResourceID, VoteRank]) { preferredConflict := member.PreferredInstead() memberIsPreferred := member.IsPreferred() @@ -274,9 +274,9 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixMemberPosition(me for currentMember := member.heavierMember; currentMember != nil && currentMember.Compare(member) == weight.Lighter; currentMember = member.heavierMember { s.swapNeighbors(member, currentMember) - if currentMember == s.heaviestPreferredMember && (preferredConflict == currentMember.Conflict || memberIsPreferred || member == s.owner) { + if currentMember == s.heaviestPreferredMember && (preferredConflict == currentMember.Spend || memberIsPreferred || member == s.owner) { s.heaviestPreferredMember = member - s.owner.setPreferredInstead(member.Conflict) + s.owner.setPreferredInstead(member.Spend) } } @@ -284,15 +284,15 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixMemberPosition(me for currentMember := member.lighterMember; currentMember != nil && currentMember.Compare(member) == weight.Heavier; currentMember = member.lighterMember { s.swapNeighbors(currentMember, member) - if member == s.heaviestPreferredMember && (currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Conflict || currentMember == s.owner) { + if member == s.heaviestPreferredMember && (currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Spend || currentMember == s.owner) { s.heaviestPreferredMember = currentMember - s.owner.setPreferredInstead(currentMember.Conflict) + s.owner.setPreferredInstead(currentMember.Spend) } } } -// notifyPreferredInsteadUpdate notifies the SortedConflicts about a member that changed its preferred instead flag. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) notifyPendingPreferredInsteadUpdate(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +// notifyPreferredInsteadUpdate notifies the SortedSpends about a member that changed its preferred instead flag. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) notifyPendingPreferredInsteadUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { s.pendingPreferredInsteadMutex.Lock() defer s.pendingPreferredInsteadMutex.Unlock() @@ -304,7 +304,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) notifyPendingPreferr } // fixMemberPositionWorker is a worker that fixes the position of sortedSetMembers that need to be updated. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixHeaviestPreferredMemberWorker() { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixHeaviestPreferredMemberWorker() { for member := s.nextPendingPreferredMemberUpdate(); member != nil; member = s.nextPendingPreferredMemberUpdate() { s.applyPreferredInsteadUpdate(member) @@ -313,7 +313,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixHeaviestPreferred } // nextPendingWeightUpdate returns the next member that needs to be updated (or nil if the shutdown flag is set). -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) nextPendingPreferredMemberUpdate() *sortedConflict[ConflictID, ResourceID, VoteRank] { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) nextPendingPreferredMemberUpdate() *sortedSpend[SpendID, ResourceID, VoteRank] { s.pendingPreferredInsteadMutex.Lock() defer s.pendingPreferredInsteadMutex.Unlock() @@ -331,7 +331,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) nextPendingPreferred } // applyPreferredInsteadUpdate applies the preferred instead update of the given member. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) applyPreferredInsteadUpdate(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyPreferredInsteadUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { s.mutex.Lock() defer s.mutex.Unlock() @@ -340,12 +340,12 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) applyPreferredInstea } } -// fixHeaviestPreferredMember fixes the heaviest preferred member of the SortedConflicts after updating the given member. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixHeaviestPreferredMember(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +// fixHeaviestPreferredMember fixes the heaviest preferred member of the SortedSpends after updating the given member. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixHeaviestPreferredMember(member *sortedSpend[SpendID, ResourceID, VoteRank]) { if member.IsPreferred() { if member.Compare(s.heaviestPreferredMember) == weight.Heavier { s.heaviestPreferredMember = member - s.owner.setPreferredInstead(member.Conflict) + s.owner.setPreferredInstead(member.Spend) } return @@ -356,11 +356,11 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) fixHeaviestPreferred } } -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) findLowerHeaviestPreferredMember(member *sortedConflict[ConflictID, ResourceID, VoteRank]) { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) findLowerHeaviestPreferredMember(member *sortedSpend[SpendID, ResourceID, VoteRank]) { for currentMember := member; currentMember != nil; currentMember = currentMember.lighterMember { - if currentMember == s.owner || currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Conflict { + if currentMember == s.owner || currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Spend { s.heaviestPreferredMember = currentMember - s.owner.setPreferredInstead(currentMember.Conflict) + s.owner.setPreferredInstead(currentMember.Spend) return } @@ -369,8 +369,8 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) findLowerHeaviestPre s.heaviestPreferredMember = nil } -// swapNeighbors swaps the given members in the SortedConflicts. -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) swapNeighbors(heavierMember, lighterMember *sortedConflict[ConflictID, ResourceID, VoteRank]) { +// swapNeighbors swaps the given members in the SortedSpends. +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) swapNeighbors(heavierMember, lighterMember *sortedSpend[SpendID, ResourceID, VoteRank]) { if heavierMember.lighterMember != nil { heavierMember.lighterMember.heavierMember = lighterMember } @@ -388,7 +388,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) swapNeighbors(heavie } } -func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Shutdown() []*Conflict[ConflictID, ResourceID, VoteRank] { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Shutdown() []*Spend[SpendID, ResourceID, VoteRank] { s.mutex.Lock() defer s.mutex.Unlock() s.pendingWeightUpdatesMutex.Lock() @@ -404,7 +404,7 @@ func (s *SortedConflicts[ConflictID, ResourceID, VoteRank]) Shutdown() []*Confli s.pendingPreferredInsteadSignal.Broadcast() s.pendingWeightUpdatesSignal.Broadcast() - return lo.Map(s.members.Values(), func(conflict *sortedConflict[ConflictID, ResourceID, VoteRank]) *Conflict[ConflictID, ResourceID, VoteRank] { - return conflict.Conflict + return lo.Map(s.members.Values(), func(spend *sortedSpend[SpendID, ResourceID, VoteRank]) *Spend[SpendID, ResourceID, VoteRank] { + return spend.Spend }) } diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go similarity index 75% rename from pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go index d92132a19..a762d422b 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go @@ -1,4 +1,4 @@ -package conflictdagv1 +package spenddagv1 import ( "fmt" @@ -18,9 +18,9 @@ import ( iotago "github.com/iotaledger/iota.go/v4" ) -type SortedConflictSet = *SortedConflicts[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +type SortedConflictSet = *SortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -var NewSortedConflictSet = NewSortedConflicts[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +var NewSortedConflictSet = NewSortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] func TestSortedConflict(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) @@ -30,15 +30,15 @@ func TestSortedConflict(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestConflict(transactionID("conflict1"), nil, nil, weight.New().AddCumulativeWeight(12), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("conflict1"), nil, nil, weight.New().AddCumulativeWeight(12), pendingTasks, thresholdProvider) conflict1.setAcceptanceState(acceptance.Rejected) - conflict2 := NewTestConflict(transactionID("conflict2"), nil, nil, weight.New().AddCumulativeWeight(10), pendingTasks, thresholdProvider) - conflict3 := NewTestConflict(transactionID("conflict3"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("conflict2"), nil, nil, weight.New().AddCumulativeWeight(10), pendingTasks, thresholdProvider) + conflict3 := NewTestSpend(transactionID("conflict3"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) conflict3.setAcceptanceState(acceptance.Accepted) - conflict4 := NewTestConflict(transactionID("conflict4"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) + conflict4 := NewTestSpend(transactionID("conflict4"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) conflict4.setAcceptanceState(acceptance.Rejected) - conflict5 := NewTestConflict(transactionID("conflict5"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) - conflict6 := NewTestConflict(transactionID("conflict6"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) + conflict5 := NewTestSpend(transactionID("conflict5"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) + conflict6 := NewTestSpend(transactionID("conflict6"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) conflict6.setAcceptanceState(acceptance.Accepted) sortedConflicts := NewSortedConflictSet(conflict1, pendingTasks) @@ -88,9 +88,9 @@ func TestSortedDecreaseHeaviest(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestConflict(transactionID("conflict1"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("conflict1"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) conflict1.setAcceptanceState(acceptance.Accepted) - conflict2 := NewTestConflict(transactionID("conflict2"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("conflict2"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) sortedConflicts := NewSortedConflictSet(conflict1, pendingTasks) @@ -118,13 +118,13 @@ func TestSortedConflictParallel(t *testing.T) { const conflictCount = 1000 const updateCount = 100000 - conflicts := make(map[string]TestConflict) - parallelConflicts := make(map[string]TestConflict) + conflicts := make(map[string]TestSpend) + parallelConflicts := make(map[string]TestSpend) for i := 0; i < conflictCount; i++ { alias := "conflict" + strconv.Itoa(i) - conflicts[alias] = NewTestConflict(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) - parallelConflicts[alias] = NewTestConflict(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) + conflicts[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) + parallelConflicts[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) } sortedConflicts := NewSortedConflictSet(conflicts["conflict0"], pendingTasks) @@ -143,7 +143,7 @@ func TestSortedConflictParallel(t *testing.T) { parallelSortingBefore := sortedParallelConflicts.String() require.Equal(t, originalSortingBefore, parallelSortingBefore) - permutations := make([]func(conflict TestConflict), 0) + permutations := make([]func(conflict TestSpend), 0) for i := 0; i < updateCount; i++ { permutations = append(permutations, generateRandomWeightPermutation()) } @@ -155,7 +155,7 @@ func TestSortedConflictParallel(t *testing.T) { permutation(conflicts[targetAlias]) wg.Add(1) - go func(permutation func(conflict TestConflict)) { + go func(permutation func(conflict TestSpend)) { permutation(parallelConflicts[targetAlias]) wg.Done() @@ -178,21 +178,21 @@ func TestSortedConflictParallel(t *testing.T) { require.NotEqualf(t, originalSortingBefore, originalSortingAfter, "original sorting should have changed") } -func generateRandomWeightPermutation() func(conflict TestConflict) { +func generateRandomWeightPermutation() func(conflict TestSpend) { switch rand.Intn(2) { case 0: return generateRandomCumulativeWeightPermutation(int64(rand.Intn(100))) default: // return generateRandomConfirmationStatePermutation() - return func(conflict TestConflict) { + return func(conflict TestSpend) { } } } -func generateRandomCumulativeWeightPermutation(delta int64) func(conflict TestConflict) { +func generateRandomCumulativeWeightPermutation(delta int64) func(conflict TestSpend) { updateType := rand.Intn(100) - return func(conflict TestConflict) { + return func(conflict TestSpend) { if updateType%2 == 0 { conflict.Weight.AddCumulativeWeight(delta) } else { @@ -204,7 +204,7 @@ func generateRandomCumulativeWeightPermutation(delta int64) func(conflict TestCo } func assertSortedConflictsOrder(t *testing.T, sortedConflicts SortedConflictSet, aliases ...string) { - require.NoError(t, sortedConflicts.ForEach(func(c TestConflict) error { + require.NoError(t, sortedConflicts.ForEach(func(c TestSpend) error { currentAlias := aliases[0] aliases = aliases[1:] @@ -219,8 +219,8 @@ func assertSortedConflictsOrder(t *testing.T, sortedConflicts SortedConflictSet, func id(alias string) iotago.OutputID { bytes := blake2b.Sum256([]byte(alias)) txIdentifier := iotago.TransactionIDRepresentingData(TestTransactionCreationSlot, bytes[:]) - conflictID := iotago.OutputIDFromTransactionIDAndIndex(txIdentifier, 0) + spendID := iotago.OutputIDFromTransactionIDAndIndex(txIdentifier, 0) txIdentifier.RegisterAlias(alias) - return conflictID + return spendID } diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go similarity index 66% rename from pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go index d943bbb7c..22a9ddfc3 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go @@ -1,4 +1,4 @@ -package conflictdagv1 +package spenddagv1 import ( "bytes" @@ -16,25 +16,25 @@ import ( "github.com/iotaledger/iota-core/pkg/core/account" "github.com/iotaledger/iota-core/pkg/core/vote" "github.com/iotaledger/iota-core/pkg/core/weight" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// Conflict is a conflict that is part of a Conflict DAG. -type Conflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]] struct { +// Spend is a conflict that is part of a Spend DAG. +type Spend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { // ID is the identifier of the Conflict. - ID ConflictID + ID SpendID // Parents is the set of parents of the Conflict. - Parents ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]] + Parents ds.Set[*Spend[SpendID, ResourceID, VoteRank]] // Children is the set of children of the Conflict. - Children ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]] + Children ds.Set[*Spend[SpendID, ResourceID, VoteRank]] // ConflictSets is the set of ConflictSets that the Conflict is part of. - ConflictSets ds.Set[*ConflictSet[ConflictID, ResourceID, VoteRank]] + ConflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]] - // ConflictingConflicts is the set of conflicts that directly conflict with the Conflict. - ConflictingConflicts *SortedConflicts[ConflictID, ResourceID, VoteRank] + // ConflictingSpends is the set of conflicts that directly conflict with the Conflict. + ConflictingSpends *SortedSpends[SpendID, ResourceID, VoteRank] // Weight is the Weight of the Conflict. Weight *weight.Weight @@ -46,19 +46,19 @@ type Conflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.Vo AcceptanceStateUpdated *event.Event2[acceptance.State, acceptance.State] // PreferredInsteadUpdated is triggered when the preferred instead value of the Conflict is updated. - PreferredInsteadUpdated *event.Event1[*Conflict[ConflictID, ResourceID, VoteRank]] + PreferredInsteadUpdated *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] // LikedInsteadAdded is triggered when a liked instead reference is added to the Conflict. - LikedInsteadAdded *event.Event1[*Conflict[ConflictID, ResourceID, VoteRank]] + LikedInsteadAdded *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] // LikedInsteadRemoved is triggered when a liked instead reference is removed from the Conflict. - LikedInsteadRemoved *event.Event1[*Conflict[ConflictID, ResourceID, VoteRank]] + LikedInsteadRemoved *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] // childUnhookMethods is a mapping of children to their unhook functions. - childUnhookMethods *shrinkingmap.ShrinkingMap[ConflictID, func()] + childUnhookMethods *shrinkingmap.ShrinkingMap[SpendID, func()] // preferredInstead is the preferred instead value of the Conflict. - preferredInstead *Conflict[ConflictID, ResourceID, VoteRank] + preferredInstead *Spend[SpendID, ResourceID, VoteRank] // evicted evicted atomic.Bool @@ -67,10 +67,10 @@ type Conflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.Vo preferredInsteadMutex syncutils.RWMutex // likedInstead is the set of liked instead Conflicts. - likedInstead ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]] + likedInstead ds.Set[*Spend[SpendID, ResourceID, VoteRank]] // likedInsteadSources is a mapping of liked instead Conflicts to the set of parents that inherited them. - likedInsteadSources *shrinkingmap.ShrinkingMap[ConflictID, ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]]] + likedInsteadSources *shrinkingmap.ShrinkingMap[SpendID, ds.Set[*Spend[SpendID, ResourceID, VoteRank]]] // likedInsteadMutex and structureMutex are sometimes locked in different order by different goroutines, which could result in a deadlock // however, it's impossible to deadlock if we fork all transactions upon booking @@ -89,24 +89,24 @@ type Conflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.Vo unhookAcceptanceMonitoring func() } -// NewConflict creates a new Conflict. -func NewConflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag.VoteRankType[VoteRank]](id ConflictID, initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Conflict[ConflictID, ResourceID, VoteRank] { - c := &Conflict[ConflictID, ResourceID, VoteRank]{ +// NewSpend creates a new Spend. +func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id SpendID, initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[SpendID, ResourceID, VoteRank] { + c := &Spend[SpendID, ResourceID, VoteRank]{ ID: id, - Parents: ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]](), - Children: ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]](), - ConflictSets: ds.NewSet[*ConflictSet[ConflictID, ResourceID, VoteRank]](), + Parents: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), + Children: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), + ConflictSets: ds.NewSet[*ConflictSet[SpendID, ResourceID, VoteRank]](), Weight: initialWeight, LatestVotes: shrinkingmap.New[account.SeatIndex, *vote.Vote[VoteRank]](), AcceptanceStateUpdated: event.New2[acceptance.State, acceptance.State](), - PreferredInsteadUpdated: event.New1[*Conflict[ConflictID, ResourceID, VoteRank]](), - LikedInsteadAdded: event.New1[*Conflict[ConflictID, ResourceID, VoteRank]](), - LikedInsteadRemoved: event.New1[*Conflict[ConflictID, ResourceID, VoteRank]](), + PreferredInsteadUpdated: event.New1[*Spend[SpendID, ResourceID, VoteRank]](), + LikedInsteadAdded: event.New1[*Spend[SpendID, ResourceID, VoteRank]](), + LikedInsteadRemoved: event.New1[*Spend[SpendID, ResourceID, VoteRank]](), - childUnhookMethods: shrinkingmap.New[ConflictID, func()](), + childUnhookMethods: shrinkingmap.New[SpendID, func()](), acceptanceThreshold: acceptanceThresholdProvider, - likedInstead: ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]](), - likedInsteadSources: shrinkingmap.New[ConflictID, ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]]](), + likedInstead: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), + likedInsteadSources: shrinkingmap.New[SpendID, ds.Set[*Spend[SpendID, ResourceID, VoteRank]]](), } c.preferredInstead = c @@ -122,27 +122,27 @@ func NewConflict[ConflictID, ResourceID conflictdag.IDType, VoteRank conflictdag c.setAcceptanceState(acceptance.Accepted) } - c.ConflictingConflicts = NewSortedConflicts(c, pendingTasksCounter) + c.ConflictingSpends = NewSortedSpends(c, pendingTasksCounter) return c } // JoinConflictSets registers the Conflict with the given ConflictSets. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) JoinConflictSets(conflictSets ds.Set[*ConflictSet[ConflictID, ResourceID, VoteRank]]) (joinedConflictSets ds.Set[ResourceID], err error) { +func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(conflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]]) (joinedConflictSets ds.Set[ResourceID], err error) { if conflictSets == nil { return ds.NewSet[ResourceID](), nil } if c.evicted.Load() { - return nil, ierrors.Errorf("tried to join conflict sets of evicted conflict: %w", conflictdag.ErrEntityEvicted) + return nil, ierrors.Errorf("tried to join conflict sets of evicted conflict: %w", spenddag.ErrEntityEvicted) } - registerConflictingConflict := func(c, conflict *Conflict[ConflictID, ResourceID, VoteRank]) { + registerConflictingSpend := func(c, spend *Spend[SpendID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() - if c.ConflictingConflicts.Add(conflict) { - if conflict.IsAccepted() { + if c.ConflictingSpends.Add(spend) { + if spend.IsAccepted() { c.setAcceptanceState(acceptance.Rejected) } } @@ -150,17 +150,17 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) JoinConflictSets(conflictSe joinedConflictSets = ds.NewSet[ResourceID]() - return joinedConflictSets, conflictSets.ForEach(func(conflictSet *ConflictSet[ConflictID, ResourceID, VoteRank]) error { + return joinedConflictSets, conflictSets.ForEach(func(conflictSet *ConflictSet[SpendID, ResourceID, VoteRank]) error { otherConflicts, err := conflictSet.Add(c) - if err != nil && !ierrors.Is(err, conflictdag.ErrAlreadyPartOfConflictSet) { + if err != nil && !ierrors.Is(err, spenddag.ErrAlreadyPartOfConflictSet) { return err } if c.ConflictSets.Add(conflictSet) { if otherConflicts != nil { - otherConflicts.Range(func(otherConflict *Conflict[ConflictID, ResourceID, VoteRank]) { - registerConflictingConflict(c, otherConflict) - registerConflictingConflict(otherConflict, c) + otherConflicts.Range(func(otherConflict *Spend[SpendID, ResourceID, VoteRank]) { + registerConflictingSpend(c, otherConflict) + registerConflictingSpend(otherConflict, c) }) joinedConflictSets.Add(conflictSet.ID) @@ -171,7 +171,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) JoinConflictSets(conflictSe }) } -func (c *Conflict[ConflictID, ResourceID, VoteRank]) removeParent(parent *Conflict[ConflictID, ResourceID, VoteRank]) (removed bool) { +func (c *Spend[SpendID, ResourceID, VoteRank]) removeParent(parent *Spend[SpendID, ResourceID, VoteRank]) (removed bool) { if removed = c.Parents.Delete(parent); removed { parent.unregisterChild(c) } @@ -180,18 +180,18 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) removeParent(parent *Confli } // UpdateParents updates the parents of the Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) UpdateParents(addedParents, removedParents ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]]) (updated bool) { +func (c *Spend[SpendID, ResourceID, VoteRank]) UpdateParents(addedParents, removedParents ds.Set[*Spend[SpendID, ResourceID, VoteRank]]) (updated bool) { c.structureMutex.Lock() defer c.structureMutex.Unlock() if removedParents != nil { - removedParents.Range(func(removedParent *Conflict[ConflictID, ResourceID, VoteRank]) { + removedParents.Range(func(removedParent *Spend[SpendID, ResourceID, VoteRank]) { updated = c.removeParent(removedParent) || updated }) } if addedParents != nil { - addedParents.Range(func(addedParent *Conflict[ConflictID, ResourceID, VoteRank]) { + addedParents.Range(func(addedParent *Spend[SpendID, ResourceID, VoteRank]) { if c.Parents.Add(addedParent) { addedParent.registerChild(c) @@ -203,7 +203,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) UpdateParents(addedParents, return updated } -func (c *Conflict[ConflictID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRank]) { +func (c *Spend[SpendID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRank]) { // abort if the conflict has already been accepted or rejected if !c.Weight.AcceptanceState().IsPending() { return @@ -231,22 +231,22 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[V } // IsPending returns true if the Conflict is pending. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsPending() bool { +func (c *Spend[SpendID, ResourceID, VoteRank]) IsPending() bool { return c.Weight.Value().AcceptanceState().IsPending() } // IsAccepted returns true if the Conflict is accepted. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsAccepted() bool { +func (c *Spend[SpendID, ResourceID, VoteRank]) IsAccepted() bool { return c.Weight.Value().AcceptanceState().IsAccepted() } // IsRejected returns true if the Conflict is rejected. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsRejected() bool { +func (c *Spend[SpendID, ResourceID, VoteRank]) IsRejected() bool { return c.Weight.Value().AcceptanceState().IsRejected() } // IsPreferred returns true if the Conflict is preferred instead of its conflicting Conflicts. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsPreferred() bool { +func (c *Spend[SpendID, ResourceID, VoteRank]) IsPreferred() bool { c.preferredInsteadMutex.RLock() defer c.preferredInsteadMutex.RUnlock() @@ -254,7 +254,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsPreferred() bool { } // PreferredInstead returns the preferred instead value of the Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) PreferredInstead() *Conflict[ConflictID, ResourceID, VoteRank] { +func (c *Spend[SpendID, ResourceID, VoteRank]) PreferredInstead() *Spend[SpendID, ResourceID, VoteRank] { c.preferredInsteadMutex.RLock() defer c.preferredInsteadMutex.RUnlock() @@ -262,7 +262,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) PreferredInstead() *Conflic } // IsLiked returns true if the Conflict is liked instead of other conflicting Conflicts. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsLiked() bool { +func (c *Spend[SpendID, ResourceID, VoteRank]) IsLiked() bool { c.likedInsteadMutex.RLock() defer c.likedInsteadMutex.RUnlock() @@ -270,7 +270,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) IsLiked() bool { } // LikedInstead returns the set of liked instead Conflicts. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Conflict[ConflictID, ResourceID, VoteRank]] { +func (c *Spend[SpendID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Spend[SpendID, ResourceID, VoteRank]] { c.likedInsteadMutex.RLock() defer c.likedInsteadMutex.RUnlock() @@ -278,12 +278,12 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Conf } // Shutdown shuts down the Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) Shutdown() { - c.ConflictingConflicts.Shutdown() +func (c *Spend[SpendID, ResourceID, VoteRank]) Shutdown() { + c.ConflictingSpends.Shutdown() } // Evict cleans up the sortedConflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) Evict() (evictedConflicts []ConflictID) { +func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []SpendID) { if firstEvictCall := !c.evicted.Swap(true); !firstEvictCall { return nil } @@ -293,12 +293,12 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) Evict() (evictedConflicts [ switch c.Weight.AcceptanceState() { case acceptance.Rejected: // evict the entire future cone of rejected conflicts - c.Children.Range(func(childConflict *Conflict[ConflictID, ResourceID, VoteRank]) { + c.Children.Range(func(childConflict *Spend[SpendID, ResourceID, VoteRank]) { evictedConflicts = append(evictedConflicts, childConflict.Evict()...) }) default: // remove evicted conflict from parents of children (merge to master) - c.Children.Range(func(childConflict *Conflict[ConflictID, ResourceID, VoteRank]) { + c.Children.Range(func(childConflict *Spend[SpendID, ResourceID, VoteRank]) { childConflict.structureMutex.Lock() defer childConflict.structureMutex.Unlock() @@ -309,20 +309,20 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) Evict() (evictedConflicts [ c.structureMutex.Lock() defer c.structureMutex.Unlock() - c.Parents.Range(func(parentConflict *Conflict[ConflictID, ResourceID, VoteRank]) { + c.Parents.Range(func(parentConflict *Spend[SpendID, ResourceID, VoteRank]) { parentConflict.unregisterChild(c) }) c.Parents.Clear() - c.ConflictSets.Range(func(conflictSet *ConflictSet[ConflictID, ResourceID, VoteRank]) { + c.ConflictSets.Range(func(conflictSet *ConflictSet[SpendID, ResourceID, VoteRank]) { conflictSet.Remove(c) }) c.ConflictSets.Clear() - for _, conflict := range c.ConflictingConflicts.Shutdown() { + for _, conflict := range c.ConflictingSpends.Shutdown() { if conflict != c { - conflict.ConflictingConflicts.Remove(c.ID) - c.ConflictingConflicts.Remove(conflict.ID) + conflict.ConflictingSpends.Remove(c.ID) + c.ConflictingSpends.Remove(conflict.ID) if c.IsAccepted() { evictedConflicts = append(evictedConflicts, conflict.Evict()...) @@ -330,7 +330,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) Evict() (evictedConflicts [ } } - c.ConflictingConflicts.Remove(c.ID) + c.ConflictingSpends.Remove(c.ID) c.preferredInsteadMutex.Lock() defer c.preferredInsteadMutex.Unlock() @@ -346,7 +346,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) Evict() (evictedConflicts [ } // Compare compares the Conflict to the given other Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) Compare(other *Conflict[ConflictID, ResourceID, VoteRank]) int { +func (c *Spend[SpendID, ResourceID, VoteRank]) Compare(other *Spend[SpendID, ResourceID, VoteRank]) int { // no need to lock a mutex here, because the Weight is already thread-safe if c == other { @@ -369,7 +369,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) Compare(other *Conflict[Con } // String returns a human-readable representation of the Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) String() string { +func (c *Spend[SpendID, ResourceID, VoteRank]) String() string { // no need to lock a mutex here, because the Weight is already thread-safe return stringify.Struct("Conflict", @@ -379,7 +379,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) String() string { } // registerChild registers the given child Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) registerChild(child *Conflict[ConflictID, ResourceID, VoteRank]) { +func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() @@ -395,11 +395,11 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) registerChild(child *Confli } }).Unhook, - c.LikedInsteadRemoved.Hook(func(reference *Conflict[ConflictID, ResourceID, VoteRank]) { + c.LikedInsteadRemoved.Hook(func(reference *Spend[SpendID, ResourceID, VoteRank]) { child.removeInheritedLikedInsteadReference(c, reference) }).Unhook, - c.LikedInsteadAdded.Hook(func(conflict *Conflict[ConflictID, ResourceID, VoteRank]) { + c.LikedInsteadAdded.Hook(func(conflict *Spend[SpendID, ResourceID, VoteRank]) { child.structureMutex.Lock() defer child.structureMutex.Unlock() @@ -418,7 +418,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) registerChild(child *Confli } // unregisterChild unregisters the given child Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) unregisterChild(conflict *Conflict[ConflictID, ResourceID, VoteRank]) { +func (c *Spend[SpendID, ResourceID, VoteRank]) unregisterChild(conflict *Spend[SpendID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() @@ -432,12 +432,12 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) unregisterChild(conflict *C } // addInheritedLikedInsteadReference adds the given reference as a liked instead reference from the given source. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) addInheritedLikedInsteadReference(source, reference *Conflict[ConflictID, ResourceID, VoteRank]) { +func (c *Spend[SpendID, ResourceID, VoteRank]) addInheritedLikedInsteadReference(source, reference *Spend[SpendID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() // abort if the source already added the reference or if the source already existed - if sources := lo.Return1(c.likedInsteadSources.GetOrCreate(reference.ID, lo.NoVariadic(ds.NewSet[*Conflict[ConflictID, ResourceID, VoteRank]]))); !sources.Add(source) || !c.likedInstead.Add(reference) { + if sources := lo.Return1(c.likedInsteadSources.GetOrCreate(reference.ID, lo.NoVariadic(ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]))); !sources.Add(source) || !c.likedInstead.Add(reference) { return } @@ -451,7 +451,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) addInheritedLikedInsteadRef } // removeInheritedLikedInsteadReference removes the given reference as a liked instead reference from the given source. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) removeInheritedLikedInsteadReference(source, reference *Conflict[ConflictID, ResourceID, VoteRank]) { +func (c *Spend[SpendID, ResourceID, VoteRank]) removeInheritedLikedInsteadReference(source, reference *Spend[SpendID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() @@ -473,7 +473,7 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) removeInheritedLikedInstead } // setPreferredInstead sets the preferred instead value of the Conflict. -func (c *Conflict[ConflictID, ResourceID, VoteRank]) setPreferredInstead(preferredInstead *Conflict[ConflictID, ResourceID, VoteRank]) (previousPreferredInstead *Conflict[ConflictID, ResourceID, VoteRank]) { +func (c *Spend[SpendID, ResourceID, VoteRank]) setPreferredInstead(preferredInstead *Spend[SpendID, ResourceID, VoteRank]) (previousPreferredInstead *Spend[SpendID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() @@ -506,14 +506,14 @@ func (c *Conflict[ConflictID, ResourceID, VoteRank]) setPreferredInstead(preferr // setAcceptanceState sets the acceptance state of the Conflict and returns the previous acceptance state (it triggers // an AcceptanceStateUpdated event if the acceptance state was updated). -func (c *Conflict[ConflictID, ResourceID, VoteRank]) setAcceptanceState(newState acceptance.State) (previousState acceptance.State) { +func (c *Spend[SpendID, ResourceID, VoteRank]) setAcceptanceState(newState acceptance.State) (previousState acceptance.State) { if previousState = c.Weight.SetAcceptanceState(newState); previousState == newState { return previousState } // propagate acceptance to parents first if newState.IsAccepted() { - c.Parents.Range(func(parent *Conflict[ConflictID, ResourceID, VoteRank]) { + c.Parents.Range(func(parent *Spend[SpendID, ResourceID, VoteRank]) { parent.setAcceptanceState(acceptance.Accepted) }) } diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go similarity index 64% rename from pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_test.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go index 20876b610..b6cc4b716 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflict_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go @@ -1,4 +1,4 @@ -package conflictdagv1 +package spenddagv1 import ( "math/rand" @@ -20,18 +20,18 @@ import ( iotago "github.com/iotaledger/iota.go/v4" ) -type TestConflict = *Conflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +type TestSpend = *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -//var NewTestConflict = NewConflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +//var NewTestSpend = NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func NewTestConflict(id iotago.TransactionID, parentConflicts ds.Set[*Conflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], conflictSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Conflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { - conflict := NewConflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) - _, err := conflict.JoinConflictSets(conflictSets) +func NewTestSpend(id iotago.TransactionID, parentConflicts ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], conflictSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { + conflict := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) + _, err := conflict.JoinSpendSets(conflictSets) if err != nil { // TODO: change this panic(err) } - conflict.UpdateParents(parentConflicts, ds.NewSet[*Conflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) + conflict.UpdateParents(parentConflicts, ds.NewSet[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) return conflict } @@ -44,16 +44,16 @@ func TestConflict_SetRejected(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestConflict(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestConflict(transactionID("Conflict2"), ds.NewSet(conflict1), nil, weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestConflict(transactionID("Conflict3"), ds.NewSet(conflict2), nil, weight.New(), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("Conflict2"), ds.NewSet(conflict1), nil, weight.New(), pendingTasks, thresholdProvider) + conflict3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(conflict2), nil, weight.New(), pendingTasks, thresholdProvider) conflict1.setAcceptanceState(acceptance.Rejected) require.True(t, conflict1.IsRejected()) require.True(t, conflict2.IsRejected()) require.True(t, conflict3.IsRejected()) - conflict4 := NewTestConflict(transactionID("Conflict4"), ds.NewSet(conflict1), nil, weight.New(), pendingTasks, thresholdProvider) + conflict4 := NewTestSpend(transactionID("Conflict4"), ds.NewSet(conflict1), nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, conflict4.IsRejected()) } @@ -65,9 +65,9 @@ func TestConflict_UpdateParents(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestConflict(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestConflict(transactionID("Conflict2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestConflict(transactionID("Conflict3"), ds.NewSet(conflict1, conflict2), nil, weight.New(), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("Conflict2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + conflict3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(conflict1, conflict2), nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, conflict3.Parents.Has(conflict1)) require.True(t, conflict3.Parents.Has(conflict2)) @@ -85,9 +85,9 @@ func TestConflict_SetAccepted(t *testing.T) { conflictSet1 := NewTestConflictSet(id("ConflictSet1")) conflictSet2 := NewTestConflictSet(id("ConflictSet2")) - conflict1 := NewTestConflict(transactionID("Conflict1"), nil, ds.NewSet(conflictSet1), weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestConflict(transactionID("Conflict2"), nil, ds.NewSet(conflictSet1, conflictSet2), weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestConflict(transactionID("Conflict3"), nil, ds.NewSet(conflictSet2), weight.New(), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(conflictSet1), weight.New(), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(conflictSet1, conflictSet2), weight.New(), pendingTasks, thresholdProvider) + conflict3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(conflictSet2), weight.New(), pendingTasks, thresholdProvider) require.Equal(t, acceptance.Pending, conflict1.setAcceptanceState(acceptance.Accepted)) require.True(t, conflict1.IsAccepted()) @@ -106,9 +106,9 @@ func TestConflict_SetAccepted(t *testing.T) { conflictSet1 := NewTestConflictSet(id("ConflictSet1")) conflictSet2 := NewTestConflictSet(id("ConflictSet2")) - conflict1 := NewTestConflict(transactionID("Conflict1"), nil, ds.NewSet(conflictSet1), weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestConflict(transactionID("Conflict2"), nil, ds.NewSet(conflictSet1, conflictSet2), weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestConflict(transactionID("Conflict3"), nil, ds.NewSet(conflictSet2), weight.New(), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(conflictSet1), weight.New(), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(conflictSet1, conflictSet2), weight.New(), pendingTasks, thresholdProvider) + conflict3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(conflictSet2), weight.New(), pendingTasks, thresholdProvider) conflict2.setAcceptanceState(acceptance.Accepted) require.True(t, conflict1.IsRejected()) @@ -117,7 +117,7 @@ func TestConflict_SetAccepted(t *testing.T) { } } -func TestConflict_ConflictSets(t *testing.T) { +func TestConflict_SpendSets(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -130,13 +130,13 @@ func TestConflict_ConflictSets(t *testing.T) { green := NewTestConflictSet(id("green")) yellow := NewTestConflictSet(id("yellow")) - conflictA := NewTestConflict(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) - conflictB := NewTestConflict(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) - conflictC := NewTestConflict(transactionID("C"), nil, ds.NewSet(blue, green), weight.New().AddCumulativeWeight(5), pendingTasks, thresholdProvider) - conflictD := NewTestConflict(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) - conflictE := NewTestConflict(transactionID("E"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(9), pendingTasks, thresholdProvider) + conflictA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) + conflictB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) + conflictC := NewTestSpend(transactionID("C"), nil, ds.NewSet(blue, green), weight.New().AddCumulativeWeight(5), pendingTasks, thresholdProvider) + conflictD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) + conflictE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(9), pendingTasks, thresholdProvider) - preferredInsteadMap := map[TestConflict]TestConflict{ + preferredInsteadMap := map[TestSpend]TestSpend{ conflictA: conflictA, conflictB: conflictA, conflictC: conflictC, @@ -150,7 +150,7 @@ func TestConflict_ConflictSets(t *testing.T) { conflictD.Weight.SetCumulativeWeight(10) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictC: conflictD, conflictD: conflictD, conflictE: conflictD, @@ -159,7 +159,7 @@ func TestConflict_ConflictSets(t *testing.T) { conflictD.Weight.SetCumulativeWeight(0) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictC: conflictC, conflictD: conflictE, conflictE: conflictE, @@ -168,14 +168,14 @@ func TestConflict_ConflictSets(t *testing.T) { conflictC.Weight.SetCumulativeWeight(8) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictB: conflictC, })) conflictC.Weight.SetCumulativeWeight(8) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictB: conflictC, })) @@ -187,22 +187,22 @@ func TestConflict_ConflictSets(t *testing.T) { conflictE.Weight.SetCumulativeWeight(1) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictD: conflictC, })) conflictE.Weight.SetCumulativeWeight(9) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictD: conflictE, })) - conflictF := NewTestConflict(transactionID("F"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(19), pendingTasks, thresholdProvider) + conflictF := NewTestSpend(transactionID("F"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(19), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestConflict]TestConflict{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ conflictD: conflictF, conflictE: conflictF, conflictF: conflictF, @@ -223,7 +223,7 @@ func TestConflictParallel(t *testing.T) { const updateCount = 100000 - permutations := make([]func(conflict TestConflict), 0) + permutations := make([]func(conflict TestSpend), 0) for i := 0; i < updateCount; i++ { permutations = append(permutations, generateRandomConflictPermutation()) } @@ -235,7 +235,7 @@ func TestConflictParallel(t *testing.T) { permutation(sequentialConflicts[targetAlias]) wg.Add(1) - go func(permutation func(conflict TestConflict)) { + go func(permutation func(conflict TestSpend)) { permutation(parallelConflicts[targetAlias]) wg.Done() @@ -264,14 +264,14 @@ func TestLikedInstead1(t *testing.T) { return int64(weights.SeatCount()) }) - masterBranch := NewTestConflict(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + masterBranch := NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) conflictSet1 := NewTestConflictSet(id("O1")) - conflict1 := NewTestConflict(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) - conflict2 := NewTestConflict(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) require.True(t, conflict1.IsPreferred()) require.True(t, conflict1.IsLiked()) @@ -291,13 +291,13 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { return int64(weights.SeatCount()) }) - masterBranch := NewTestConflict(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + masterBranch := NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) conflictSet1 := NewTestConflictSet(id("O1")) - conflictA := NewTestConflict(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictB := NewTestConflict(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + conflictA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + conflictB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) require.True(t, conflictA.IsPreferred()) require.True(t, conflictA.IsLiked()) @@ -309,8 +309,8 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { require.True(t, conflictB.LikedInstead().Has(conflictA)) conflictSet2 := NewTestConflictSet(id("O2")) - conflictC := NewTestConflict(transactionID("TxC"), ds.NewSet(conflictA), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictD := NewTestConflict(transactionID("TxD"), ds.NewSet(conflictA), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + conflictC := NewTestSpend(transactionID("TxC"), ds.NewSet(conflictA), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + conflictD := NewTestSpend(transactionID("TxD"), ds.NewSet(conflictA), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) require.True(t, conflictC.IsPreferred()) require.True(t, conflictC.IsLiked()) @@ -368,13 +368,13 @@ func TestLikedInstead21(t *testing.T) { return int64(weights.SeatCount()) }) - masterBranch := NewTestConflict(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + masterBranch := NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) conflictSet1 := NewTestConflictSet(id("O1")) - conflictA := NewTestConflict(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictB := NewTestConflict(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + conflictA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + conflictB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) require.True(t, conflictA.IsPreferred()) require.True(t, conflictA.IsLiked()) @@ -386,8 +386,8 @@ func TestLikedInstead21(t *testing.T) { require.True(t, conflictB.LikedInstead().Has(conflictA)) conflictSet4 := NewTestConflictSet(id("O4")) - conflictF := NewTestConflict(transactionID("TxF"), ds.NewSet(conflictA), ds.NewSet(conflictSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) - conflictG := NewTestConflict(transactionID("TxG"), ds.NewSet(conflictA), ds.NewSet(conflictSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) + conflictF := NewTestSpend(transactionID("TxF"), ds.NewSet(conflictA), ds.NewSet(conflictSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) + conflictG := NewTestSpend(transactionID("TxG"), ds.NewSet(conflictA), ds.NewSet(conflictSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) require.True(t, conflictF.IsPreferred()) require.True(t, conflictF.IsLiked()) @@ -399,8 +399,8 @@ func TestLikedInstead21(t *testing.T) { require.True(t, conflictG.LikedInstead().Has(conflictF)) conflictSet2 := NewTestConflictSet(id("O2")) - conflictC := NewTestConflict(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictH := NewTestConflict(transactionID("TxH"), ds.NewSet(masterBranch, conflictA), ds.NewSet(conflictSet2, conflictSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) + conflictC := NewTestSpend(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + conflictH := NewTestSpend(transactionID("TxH"), ds.NewSet(masterBranch, conflictA), ds.NewSet(conflictSet2, conflictSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) require.True(t, conflictC.IsPreferred()) require.True(t, conflictC.IsLiked()) @@ -412,8 +412,8 @@ func TestLikedInstead21(t *testing.T) { require.True(t, conflictH.LikedInstead().Has(conflictC)) conflictSet3 := NewTestConflictSet(id("O12")) - conflictI := NewTestConflict(transactionID("TxI"), ds.NewSet(conflictF), ds.NewSet(conflictSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) - conflictJ := NewTestConflict(transactionID("TxJ"), ds.NewSet(conflictF), ds.NewSet(conflictSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) + conflictI := NewTestSpend(transactionID("TxI"), ds.NewSet(conflictF), ds.NewSet(conflictSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) + conflictJ := NewTestSpend(transactionID("TxJ"), ds.NewSet(conflictF), ds.NewSet(conflictSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) require.True(t, conflictJ.IsPreferred()) require.True(t, conflictJ.IsLiked()) @@ -459,7 +459,7 @@ func TestConflictSet_AllMembersEvicted(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestConflict(transactionID("conflict1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("conflict1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) evictedConflicts := conflict1.Evict() require.Len(t, evictedConflicts, 1) require.Contains(t, evictedConflicts, conflict1.ID) @@ -469,12 +469,12 @@ func TestConflictSet_AllMembersEvicted(t *testing.T) { require.Len(t, evictedConflicts, 0) // conflict tries to join conflictset who's all members were evicted - conflict2 := NewConflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("conflict1"), weight.New(), pendingTasks, thresholdProvider) - _, err := conflict2.JoinConflictSets(ds.NewSet(yellow)) + conflict2 := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("conflict1"), weight.New(), pendingTasks, thresholdProvider) + _, err := conflict2.JoinSpendSets(ds.NewSet(yellow)) require.Error(t, err) // evicted conflict tries to join conflictset - _, err = conflict1.JoinConflictSets(ds.NewSet(green)) + _, err = conflict1.JoinSpendSets(ds.NewSet(green)) require.Error(t, err) } @@ -486,9 +486,9 @@ func TestConflict_Compare(t *testing.T) { return int64(weights.SeatCount()) }) - var conflict1, conflict2 TestConflict + var conflict1, conflict2 TestSpend - conflict1 = NewTestConflict(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + conflict1 = NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.Equal(t, weight.Heavier, conflict1.Compare(nil)) require.Equal(t, weight.Lighter, conflict2.Compare(conflict1)) @@ -506,10 +506,10 @@ func TestConflict_Inheritance(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestConflict(transactionID("conflict1"), nil, ds.NewSet(yellow), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) - conflict2 := NewTestConflict(transactionID("conflict2"), nil, ds.NewSet(green), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) - conflict3 := NewTestConflict(transactionID("conflict3"), ds.NewSet(conflict1, conflict2), nil, weight.New(), pendingTasks, thresholdProvider) - conflict4 := NewTestConflict(transactionID("conflict4"), nil, ds.NewSet(yellow, green), weight.New(), pendingTasks, thresholdProvider) + conflict1 := NewTestSpend(transactionID("conflict1"), nil, ds.NewSet(yellow), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) + conflict2 := NewTestSpend(transactionID("conflict2"), nil, ds.NewSet(green), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) + conflict3 := NewTestSpend(transactionID("conflict3"), ds.NewSet(conflict1, conflict2), nil, weight.New(), pendingTasks, thresholdProvider) + conflict4 := NewTestSpend(transactionID("conflict4"), nil, ds.NewSet(yellow, green), weight.New(), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() require.True(t, conflict3.LikedInstead().IsEmpty()) @@ -524,7 +524,7 @@ func TestConflict_Inheritance(t *testing.T) { require.True(t, conflict3.LikedInstead().Has(conflict4)) // make sure that inheritance of LikedInstead works correctly for newly created conflicts - conflict5 := NewTestConflict(transactionID("conflict5"), ds.NewSet(conflict3), nil, weight.New(), pendingTasks, thresholdProvider) + conflict5 := NewTestSpend(transactionID("conflict5"), ds.NewSet(conflict3), nil, weight.New(), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() require.True(t, conflict5.LikedInstead().Has(conflict4)) @@ -533,18 +533,18 @@ func TestConflict_Inheritance(t *testing.T) { require.True(t, conflict3.LikedInstead().IsEmpty()) } -func assertCorrectOrder(t *testing.T, conflicts ...TestConflict) { +func assertCorrectOrder(t *testing.T, conflicts ...TestSpend) { sort.Slice(conflicts, func(i, j int) bool { return conflicts[i].Compare(conflicts[j]) == weight.Heavier }) - preferredConflicts := ds.NewSet[TestConflict]() - unPreferredConflicts := ds.NewSet[TestConflict]() + preferredConflicts := ds.NewSet[TestSpend]() + unPreferredConflicts := ds.NewSet[TestSpend]() for _, conflict := range conflicts { if !unPreferredConflicts.Has(conflict) { preferredConflicts.Add(conflict) - conflict.ConflictingConflicts.Range(func(conflictingConflict *Conflict[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { + conflict.ConflictingSpends.Range(func(conflictingConflict *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { if conflict != conflictingConflict { unPreferredConflicts.Add(conflictingConflict) } @@ -561,9 +561,9 @@ func assertCorrectOrder(t *testing.T, conflicts ...TestConflict) { } } - _ = unPreferredConflicts.ForEach(func(unPreferredConflict TestConflict) (err error) { + _ = unPreferredConflicts.ForEach(func(unPreferredConflict TestSpend) (err error) { // iterating in descending order, so the first preferred conflict - return unPreferredConflict.ConflictingConflicts.ForEach(func(conflictingConflict TestConflict) error { + return unPreferredConflict.ConflictingSpends.ForEach(func(conflictingConflict TestSpend) error { if conflictingConflict != unPreferredConflict && conflictingConflict.IsPreferred() { require.Equal(t, conflictingConflict, unPreferredConflict.PreferredInstead()) @@ -575,11 +575,11 @@ func assertCorrectOrder(t *testing.T, conflicts ...TestConflict) { }) } -func generateRandomConflictPermutation() func(conflict TestConflict) { +func generateRandomConflictPermutation() func(conflict TestSpend) { updateType := rand.Intn(100) delta := rand.Intn(100) - return func(conflict TestConflict) { + return func(conflict TestSpend) { if updateType%2 == 0 { conflict.Weight.AddCumulativeWeight(int64(delta)) } else { @@ -588,7 +588,7 @@ func generateRandomConflictPermutation() func(conflict TestConflict) { } } -func createConflicts(pendingTasks *syncutils.Counter) map[string]TestConflict { +func createConflicts(pendingTasks *syncutils.Counter) map[string]TestSpend { weights := account.NewSeatedAccounts(account.NewAccounts()) thresholdProvider := acceptance.ThresholdProvider(func() int64 { @@ -600,13 +600,13 @@ func createConflicts(pendingTasks *syncutils.Counter) map[string]TestConflict { green := NewTestConflictSet(id("green")) yellow := NewTestConflictSet(id("yellow")) - conflictA := NewTestConflict(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) - conflictB := NewTestConflict(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) - conflictC := NewTestConflict(transactionID("C"), nil, ds.NewSet(green, blue), weight.New(), pendingTasks, thresholdProvider) - conflictD := NewTestConflict(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New(), pendingTasks, thresholdProvider) - conflictE := NewTestConflict(transactionID("E"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) + conflictA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) + conflictB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) + conflictC := NewTestSpend(transactionID("C"), nil, ds.NewSet(green, blue), weight.New(), pendingTasks, thresholdProvider) + conflictD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New(), pendingTasks, thresholdProvider) + conflictE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) - return map[string]TestConflict{ + return map[string]TestSpend{ "conflictA": conflictA, "conflictB": conflictB, "conflictC": conflictC, @@ -615,7 +615,7 @@ func createConflicts(pendingTasks *syncutils.Counter) map[string]TestConflict { } } -func assertPreferredInstead(t *testing.T, preferredInsteadMap map[TestConflict]TestConflict) { +func assertPreferredInstead(t *testing.T, preferredInsteadMap map[TestSpend]TestSpend) { for conflict, preferredInsteadConflict := range preferredInsteadMap { assert.Equalf(t, preferredInsteadConflict.ID, conflict.PreferredInstead().ID, "conflict %s should prefer %s instead of %s", conflict.ID, preferredInsteadConflict.ID, conflict.PreferredInstead().ID) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go new file mode 100644 index 000000000..83cfb0171 --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -0,0 +1,509 @@ +package spenddagv1 + +import ( + "github.com/iotaledger/hive.go/ds" + "github.com/iotaledger/hive.go/ds/shrinkingmap" + "github.com/iotaledger/hive.go/ds/walker" + "github.com/iotaledger/hive.go/ierrors" + "github.com/iotaledger/hive.go/lo" + "github.com/iotaledger/hive.go/runtime/syncutils" + "github.com/iotaledger/iota-core/pkg/core/acceptance" + "github.com/iotaledger/iota-core/pkg/core/account" + "github.com/iotaledger/iota-core/pkg/core/vote" + "github.com/iotaledger/iota-core/pkg/core/weight" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" + iotago "github.com/iotaledger/iota.go/v4" +) + +// SpendDAG represents a data structure that tracks causal relationships between Spends and that allows to +// efficiently manage these Spends (and vote on their fate). +type SpendDAG[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // events contains the events of the spenddag. + events *spenddag.Events[SpendID, ResourceID] + + // seatCount is a function that returns the number of seats. + seatCount func() int + + // spendsByID is a mapping of SpendIDs to Spends. + spendsByID *shrinkingmap.ShrinkingMap[SpendID, *Spend[SpendID, ResourceID, VoteRank]] + + spendUnhooks *shrinkingmap.ShrinkingMap[SpendID, func()] + + // conflictSetsByID is a mapping of ResourceIDs to ConflictSets. + conflictSetsByID *shrinkingmap.ShrinkingMap[ResourceID, *ConflictSet[SpendID, ResourceID, VoteRank]] + + // pendingTasks is a counter that keeps track of the number of pending tasks. + pendingTasks *syncutils.Counter + + // mutex is used to synchronize access to the spenddag. + mutex syncutils.RWMutex + + // votingMutex is used to synchronize voting for different identities. + votingMutex *syncutils.DAGMutex[account.SeatIndex] +} + +// New creates a new spenddag. +func New[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](seatCount func() int) *SpendDAG[SpendID, ResourceID, VoteRank] { + return &SpendDAG[SpendID, ResourceID, VoteRank]{ + events: spenddag.NewEvents[SpendID, ResourceID](), + + seatCount: seatCount, + spendsByID: shrinkingmap.New[SpendID, *Spend[SpendID, ResourceID, VoteRank]](), + spendUnhooks: shrinkingmap.New[SpendID, func()](), + conflictSetsByID: shrinkingmap.New[ResourceID, *ConflictSet[SpendID, ResourceID, VoteRank]](), + pendingTasks: syncutils.NewCounter(), + votingMutex: syncutils.NewDAGMutex[account.SeatIndex](), + } +} + +var _ spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank] = &SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]{} + +// Shutdown shuts down the SpendDAG. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) Shutdown() { + c.mutex.Lock() + defer c.mutex.Unlock() + + c.spendsByID.ForEach(func(spendID SpendID, spend *Spend[SpendID, ResourceID, VoteRank]) bool { + spend.Shutdown() + + return true + }) +} + +// Events returns the events of the spenddag. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) Events() *spenddag.Events[SpendID, ResourceID] { + return c.events +} + +// CreateSpend creates a new Spend. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) CreateSpend(id SpendID) { + if func() (created bool) { + c.mutex.RLock() + defer c.mutex.RUnlock() + + _, isNewSpend := c.spendsByID.GetOrCreate(id, func() *Spend[SpendID, ResourceID, VoteRank] { + newSpend := NewSpend[SpendID, ResourceID, VoteRank](id, weight.New(), c.pendingTasks, acceptance.ThresholdProvider(func() int64 { return int64(c.seatCount()) })) + + // attach to the acceptance state updated event and propagate that event to the outside. + // also need to remember the unhook method to properly evict the spend. + c.spendUnhooks.Set(id, newSpend.AcceptanceStateUpdated.Hook(func(oldState, newState acceptance.State) { + if newState.IsAccepted() { + c.events.SpendAccepted.Trigger(newSpend.ID) + return + } + if newState.IsRejected() { + c.events.SpendRejected.Trigger(newSpend.ID) + } + }).Unhook) + + return newSpend + }) + + return isNewSpend + }() { + c.events.SpendCreated.Trigger(id) + } +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateConflictingResources(id SpendID, resourceIDs ds.Set[ResourceID]) error { + joinedConflictSets, err := func() (ds.Set[ResourceID], error) { + c.mutex.RLock() + defer c.mutex.RUnlock() + + spend, exists := c.spendsByID.Get(id) + if !exists { + return nil, ierrors.Errorf("spend already evicted: %w", spenddag.ErrEntityEvicted) + } + + return spend.JoinSpendSets(c.conflictSets(resourceIDs)) + }() + + if err != nil { + return ierrors.Errorf("spend %s failed to join spend sets: %w", id, err) + } + + if !joinedConflictSets.IsEmpty() { + c.events.ConflictingResourcesAdded.Trigger(id, joinedConflictSets) + } + + return nil +} + +// ReadConsistent write locks the spenddag and exposes read-only methods to the callback to perform multiple reads while maintaining the same spenddag state. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ReadConsistent(callback func(spenddag spenddag.ReadLockedSpendDAG[SpendID, ResourceID, VoteRank]) error) error { + c.mutex.Lock() + defer c.mutex.Unlock() + + c.pendingTasks.WaitIsZero() + + return callback(c) +} + +// UpdateSpendParents updates the parents of the given Spend and returns an error if the operation failed. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateSpendParents(spendID SpendID, addedParentIDs, removedParentIDs ds.Set[SpendID]) error { + newParents := ds.NewSet[SpendID]() + + updated, err := func() (bool, error) { + c.mutex.RLock() + defer c.mutex.RUnlock() + + currentSpend, currentSpendExists := c.spendsByID.Get(spendID) + if !currentSpendExists { + return false, ierrors.Errorf("tried to modify evicted spend with %s: %w", spendID, spenddag.ErrEntityEvicted) + } + + addedParents := ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() + + if err := addedParentIDs.ForEach(func(addedParentID SpendID) error { + // If we cannot load the parent it is because it has been already evicted + if addedParent, addedParentExists := c.spendsByID.Get(addedParentID); addedParentExists { + addedParents.Add(addedParent) + } + + return nil + }); err != nil { + return false, err + } + + removedParents, err := c.spends(removedParentIDs, !currentSpend.IsRejected()) + if err != nil { + return false, ierrors.Errorf("failed to update spend parents: %w", err) + } + + updated := currentSpend.UpdateParents(addedParents, removedParents) + if updated { + _ = currentSpend.Parents.ForEach(func(parentConflict *Spend[SpendID, ResourceID, VoteRank]) (err error) { + newParents.Add(parentConflict.ID) + return nil + }) + } + + return updated, nil + }() + if err != nil { + return err + } + + if updated { + c.events.SpendParentsUpdated.Trigger(spendID, newParents) + } + + return nil +} + +// LikedInstead returns the SpendIDs of the Spends that are liked instead of the Spends. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] { + likedInstead := ds.NewSet[SpendID]() + spendIDs.Range(func(spendID SpendID) { + if currentConflict, exists := c.spendsByID.Get(spendID); exists { + if likedConflict := heaviestConflict(currentConflict.LikedInstead()); likedConflict != nil { + likedInstead.Add(likedConflict.ID) + } + } + }) + + return likedInstead +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) { + futureCone = ds.NewSet[SpendID]() + for futureConeWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]().PushAll(lo.Return1(c.spends(spendIDs, true)).ToSlice()...); futureConeWalker.HasNext(); { + if spend := futureConeWalker.Next(); futureCone.Add(spend.ID) { + futureConeWalker.PushAll(spend.Children.ToSlice()...) + } + } + + return futureCone +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictingSpends(spendID SpendID) (conflictingSpends ds.Set[SpendID], exists bool) { + spend, exists := c.spendsByID.Get(spendID) + if !exists { + return nil, false + } + + conflictingSpends = ds.NewSet[SpendID]() + spend.ConflictingSpends.Range(func(conflictingConflict *Spend[SpendID, ResourceID, VoteRank]) { + conflictingSpends.Add(conflictingConflict.ID) + }) + + return conflictingSpends, true +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) AllSpendsSupported(seat account.SeatIndex, spendIDs ds.Set[SpendID]) bool { + return lo.Return1(c.spends(spendIDs, true)).ForEach(func(spend *Spend[SpendID, ResourceID, VoteRank]) (err error) { + lastVote, exists := spend.LatestVotes.Get(seat) + + return lo.Cond(exists && lastVote.IsLiked(), nil, ierrors.Errorf("spend with %s is not supported by seat %d", spend.ID, seat)) + }) == nil +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendVoters(spendID SpendID) (conflictVoters ds.Set[account.SeatIndex]) { + if spend, exists := c.spendsByID.Get(spendID); exists { + return spend.Weight.Voters.Clone() + } + + return ds.NewSet[account.SeatIndex]() +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictSets(spendID SpendID) (spendSets ds.Set[ResourceID], exists bool) { + spend, exists := c.spendsByID.Get(spendID) + if !exists { + return nil, false + } + + spendSets = ds.NewSet[ResourceID]() + _ = spend.ConflictSets.ForEach(func(conflictSet *ConflictSet[SpendID, ResourceID, VoteRank]) error { + spendSets.Add(conflictSet.ID) + return nil + }) + + return spendSets, true +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendParents(spendID SpendID) (spendParents ds.Set[SpendID], exists bool) { + spend, exists := c.spendsByID.Get(spendID) + if !exists { + return nil, false + } + + spendParents = ds.NewSet[SpendID]() + _ = spend.Parents.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { + spendParents.Add(parent.ID) + return nil + }) + + return spendParents, true +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendChildren(spendID SpendID) (spendChildren ds.Set[SpendID], exists bool) { + spend, exists := c.spendsByID.Get(spendID) + if !exists { + return nil, false + } + + spendChildren = ds.NewSet[SpendID]() + _ = spend.Children.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { + spendChildren.Add(parent.ID) + return nil + }) + + return spendChildren, true +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictSetMembers(conflictSetID ResourceID) (conflicts ds.Set[SpendID], exists bool) { + conflictSet, exists := c.conflictSetsByID.Get(conflictSetID) + if !exists { + return nil, false + } + + conflicts = ds.NewSet[SpendID]() + _ = conflictSet.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { + conflicts.Add(parent.ID) + return nil + }) + + return conflicts, true +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendWeight(spendID SpendID) int64 { + if spend, exists := c.spendsByID.Get(spendID); exists { + return spend.Weight.Value().ValidatorsWeight() + } + + return 0 +} + +// CastVotes applies the given votes to the spenddag. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) CastVotes(vote *vote.Vote[VoteRank], spendIDs ds.Set[SpendID]) error { + c.mutex.RLock() + defer c.mutex.RUnlock() + c.votingMutex.Lock(vote.Voter) + defer c.votingMutex.Unlock(vote.Voter) + + supportedSpends, revokedSpends, err := c.determineVotes(spendIDs) + if err != nil { + return ierrors.Errorf("failed to determine votes: %w", err) + } + + for supportedSpend := supportedSpends.Iterator(); supportedSpend.HasNext(); { + supportedSpend.Next().ApplyVote(vote.WithLiked(true)) + } + + for revokedSpend := revokedSpends.Iterator(); revokedSpend.HasNext(); { + revokedSpend.Next().ApplyVote(vote.WithLiked(false)) + } + + return nil +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State { + lowestObservedState := acceptance.Accepted + if err := spendIDs.ForEach(func(spendID SpendID) error { + spend, exists := c.spendsByID.Get(spendID) + if !exists { + return ierrors.Errorf("tried to retrieve non-existing spend: %w", spenddag.ErrFatal) + } + + if spend.IsRejected() { + lowestObservedState = acceptance.Rejected + + return spenddag.ErrExpected + } + + if spend.IsPending() { + lowestObservedState = acceptance.Pending + } + + return nil + }); err != nil && !ierrors.Is(err, spenddag.ErrExpected) { + panic(err) + } + + return lowestObservedState +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SetAccepted(spendID SpendID) { + c.mutex.RLock() + defer c.mutex.RUnlock() + + if spend, exists := c.spendsByID.Get(spendID); exists { + spend.setAcceptanceState(acceptance.Accepted) + } +} + +// UnacceptedSpends takes a set of SpendIDs and removes all the accepted Spends (leaving only the +// pending or rejected ones behind). +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] { + pendingSpendIDs := ds.NewSet[SpendID]() + spendIDs.Range(func(currentSpendID SpendID) { + if spend, exists := c.spendsByID.Get(currentSpendID); exists && !spend.IsAccepted() { + pendingSpendIDs.Add(currentSpendID) + } + }) + + return pendingSpendIDs +} + +// EvictConflict removes spend with given SpendID from spenddag. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) EvictSpend(spendID SpendID) { + for _, evictedSpendID := range func() []SpendID { + c.mutex.RLock() + defer c.mutex.RUnlock() + + return c.evictSpend(spendID) + }() { + c.events.SpendEvicted.Trigger(evictedSpendID) + } +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) evictSpend(spendID SpendID) []SpendID { + // evicting an already evicted spend is fine + spend, exists := c.spendsByID.Get(spendID) + if !exists { + return nil + } + + evictedSpendIDs := spend.Evict() + + // remove the conflicts from the spenddag dictionary + for _, evictedSpendID := range evictedSpendIDs { + c.spendsByID.Delete(evictedSpendID) + } + + // unhook the spend events and remove the unhook method from the storage + unhookFunc, unhookExists := c.spendUnhooks.Get(spendID) + if unhookExists { + unhookFunc() + c.spendUnhooks.Delete(spendID) + } + + return evictedSpendIDs +} + +// spends returns the Spends that are associated with the given SpendIDs. If ignoreMissing is set to true, it +// will ignore missing Spends instead of returning an ErrEntityEvicted error. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spends(ids ds.Set[SpendID], ignoreMissing bool) (ds.Set[*Spend[SpendID, ResourceID, VoteRank]], error) { + spends := ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() + + return spends, ids.ForEach(func(id SpendID) (err error) { + existingSpend, exists := c.spendsByID.Get(id) + if exists { + spends.Add(existingSpend) + } + + return lo.Cond(exists || ignoreMissing, nil, ierrors.Errorf("tried to retrieve a non-existing spend with %s: %w", id, spenddag.ErrEntityEvicted)) + }) +} + +// conflictSets returns the ConflictSets that are associated with the given ResourceIDs. If createMissing is set to +// true, it will create an empty ConflictSets for each missing ResourceID. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) conflictSets(resourceIDs ds.Set[ResourceID]) ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]] { + conflictSets := ds.NewSet[*ConflictSet[SpendID, ResourceID, VoteRank]]() + + resourceIDs.Range(func(resourceID ResourceID) { + conflictSets.Add(lo.Return1(c.conflictSetsByID.GetOrCreate(resourceID, c.conflictSetFactory(resourceID)))) + }) + + return conflictSets +} + +// determineVotes determines the Spends that are supported and revoked by the given SpendIDs. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) determineVotes(spendIDs ds.Set[SpendID]) (supportedSpends, revokedSpends ds.Set[*Spend[SpendID, ResourceID, VoteRank]], err error) { + supportedSpends = ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() + revokedSpends = ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() + + revokedWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]() + revokeConflict := func(revokedConflict *Spend[SpendID, ResourceID, VoteRank]) error { + if revokedSpends.Add(revokedConflict) { + if supportedSpends.Has(revokedConflict) { + return ierrors.Errorf("applied conflicting votes (%s is supported and revoked)", revokedConflict.ID) + } + + revokedWalker.PushAll(revokedConflict.Children.ToSlice()...) + } + + return nil + } + + supportedWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]() + supportConflict := func(supportedConflict *Spend[SpendID, ResourceID, VoteRank]) error { + if supportedSpends.Add(supportedConflict) { + if err := supportedConflict.ConflictingSpends.ForEach(revokeConflict); err != nil { + return ierrors.Errorf("failed to collect conflicting conflicts: %w", err) + } + + supportedWalker.PushAll(supportedConflict.Parents.ToSlice()...) + } + + return nil + } + + for supportedWalker.PushAll(lo.Return1(c.spends(spendIDs, true)).ToSlice()...); supportedWalker.HasNext(); { + if err := supportConflict(supportedWalker.Next()); err != nil { + return nil, nil, ierrors.Errorf("failed to collect supported conflicts: %w", err) + } + } + + for revokedWalker.HasNext() { + if revokedConflict := revokedWalker.Next(); revokedSpends.Add(revokedConflict) { + revokedWalker.PushAll(revokedConflict.Children.ToSlice()...) + } + } + + return supportedSpends, revokedSpends, nil +} + +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) conflictSetFactory(resourceID ResourceID) func() *ConflictSet[SpendID, ResourceID, VoteRank] { + return func() *ConflictSet[SpendID, ResourceID, VoteRank] { + conflictSet := NewConflictSet[SpendID, ResourceID, VoteRank](resourceID) + + conflictSet.OnAllMembersEvicted(func(prevValue, newValue bool) { + if newValue && !prevValue { + c.conflictSetsByID.Delete(conflictSet.ID) + } + }) + + return conflictSet + } +} diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go similarity index 68% rename from pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag_test.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go index 4b41130f7..51aee6d30 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/conflictdag_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go @@ -1,4 +1,4 @@ -package conflictdagv1 +package spenddagv1 import ( "fmt" @@ -10,7 +10,7 @@ import ( "github.com/iotaledger/hive.go/runtime/memanalyzer" "github.com/iotaledger/iota-core/pkg/core/account" "github.com/iotaledger/iota-core/pkg/core/vote" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag/tests" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag/tests" iotago "github.com/iotaledger/iota.go/v4" ) @@ -18,8 +18,8 @@ const ( TestTransactionCreationSlot = 0 ) -// TestConflictDAG runs the generic tests for the ConflictDAG. -func TestConflictDAG(t *testing.T) { +// Testspenddag runs the generic tests for the spenddag. +func TestSpendDAG(t *testing.T) { tests.TestAll(t, newTestFramework) } @@ -53,7 +53,7 @@ func TestMemoryRelease(t *testing.T) { //t.Skip("skip memory test as for some reason it's failing") tf := newTestFramework(t) - createConflictSets := func(startSlot, conflictSetCount, evictionDelay, conflictsInConflictSet int, prevConflictSetAlias string) (int, string) { + createSpendSets := func(startSlot, conflictSetCount, evictionDelay, conflictsInConflictSet int, prevConflictSetAlias string) (int, string) { slot := startSlot for ; slot < startSlot+conflictSetCount; slot++ { conflictSetAlias := fmt.Sprintf("conflictSet-%d", slot) @@ -61,7 +61,7 @@ func TestMemoryRelease(t *testing.T) { conflictAlias := fmt.Sprintf("conflictSet-%d:%d", slot, conflictIndex) require.NoError(t, tf.CreateOrUpdateConflict(conflictAlias, []string{conflictSetAlias})) if prevConflictSetAlias != "" { - require.NoError(t, tf.UpdateConflictParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevConflictSetAlias, 0)}, []string{})) + require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevConflictSetAlias, 0)}, []string{})) } } prevConflictSetAlias = conflictSetAlias @@ -69,27 +69,27 @@ func TestMemoryRelease(t *testing.T) { if slotToEvict := slot - evictionDelay; slotToEvict >= 0 { for conflictIndex := 0; conflictIndex < conflictsInConflictSet; conflictIndex++ { conflictAlias := fmt.Sprintf("conflictSet-%d:%d", slotToEvict, conflictIndex) - tf.EvictConflict(conflictAlias) + tf.EvictSpend(conflictAlias) } } } return slot, prevConflictSetAlias } - _, prevAlias := createConflictSets(0, 30000, 1, 2, "") + _, prevAlias := createSpendSets(0, 30000, 1, 2, "") - tf.Instance.EvictConflict(tf.ConflictID(prevAlias + ":0")) - tf.Instance.EvictConflict(tf.ConflictID(prevAlias + ":1")) + tf.Instance.EvictSpend(tf.SpendID(prevAlias + ":0")) + tf.Instance.EvictSpend(tf.SpendID(prevAlias + ":1")) iotago.UnregisterIdentifierAliases() fmt.Println("Memory report before:") fmt.Println(memanalyzer.MemoryReport(tf)) memStatsStart := memanalyzer.MemSize(tf) - _, alias := createConflictSets(0, 30000, 1, 2, "") + _, alias := createSpendSets(0, 30000, 1, 2, "") - tf.Instance.EvictConflict(tf.ConflictID(alias + ":0")) - tf.Instance.EvictConflict(tf.ConflictID(alias + ":1")) + tf.Instance.EvictSpend(tf.SpendID(alias + ":0")) + tf.Instance.EvictSpend(tf.SpendID(alias + ":1")) tf.Instance.Shutdown() @@ -97,9 +97,9 @@ func TestMemoryRelease(t *testing.T) { time.Sleep(time.Second) - require.Equal(t, 0, tf.Instance.(*ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).conflictSetsByID.Size()) - require.Equal(t, 0, tf.Instance.(*ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).conflictsByID.Size()) - require.Equal(t, 0, tf.Instance.(*ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).conflictUnhooks.Size()) + require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).conflictSetsByID.Size()) + require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendsByID.Size()) + require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendUnhooks.Size()) memStatsEnd := memanalyzer.MemSize(tf) fmt.Println("\n\nMemory report after:") diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go new file mode 100644 index 000000000..9359454fa --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go @@ -0,0 +1,19 @@ +package spenddagv1 + +import ( + "github.com/iotaledger/hive.go/ds" + "github.com/iotaledger/iota-core/pkg/core/weight" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" +) + +// heaviestConflict returns the largest Conflict from the given Conflicts. +func heaviestConflict[SpendID, ResourceID spenddag.IDType, VoterPower spenddag.VoteRankType[VoterPower]](conflicts ds.Set[*Spend[SpendID, ResourceID, VoterPower]]) *Spend[SpendID, ResourceID, VoterPower] { + var result *Spend[SpendID, ResourceID, VoterPower] + conflicts.Range(func(conflict *Spend[SpendID, ResourceID, VoterPower]) { + if conflict.Compare(result) == weight.Heavier { + result = conflict + } + }) + + return result +} diff --git a/pkg/protocol/engine/mempool/conflictdag/tests/accounts_framework.go b/pkg/protocol/engine/mempool/spenddag/tests/accounts_framework.go similarity index 100% rename from pkg/protocol/engine/mempool/conflictdag/tests/accounts_framework.go rename to pkg/protocol/engine/mempool/spenddag/tests/accounts_framework.go diff --git a/pkg/protocol/engine/mempool/conflictdag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go similarity index 71% rename from pkg/protocol/engine/mempool/conflictdag/tests/assertions.go rename to pkg/protocol/engine/mempool/spenddag/tests/assertions.go index ab9919171..a878b6e2d 100644 --- a/pkg/protocol/engine/mempool/conflictdag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -11,23 +11,23 @@ type Assertions struct { // Children asserts that the given conflict has the given children. func (a *Assertions) Children(conflictAlias string, childAliases ...string) { - childIDs, exists := a.f.Instance.ConflictChildren(a.f.ConflictID(conflictAlias)) + childIDs, exists := a.f.Instance.SpendChildren(a.f.SpendID(conflictAlias)) require.True(a.f.test, exists, "Conflict %s does not exist", conflictAlias) require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Conflict %s has wrong number of children", conflictAlias) for _, childAlias := range childAliases { - require.True(a.f.test, childIDs.Has(a.f.ConflictID(childAlias)), "Conflict %s does not have child %s", conflictAlias, childAlias) + require.True(a.f.test, childIDs.Has(a.f.SpendID(childAlias)), "Conflict %s does not have child %s", conflictAlias, childAlias) } } // Parents asserts that the given conflict has the given parents. func (a *Assertions) Parents(conflictAlias string, parentAliases ...string) { - parents, exists := a.f.Instance.ConflictParents(a.f.ConflictID(conflictAlias)) + parents, exists := a.f.Instance.SpendParents(a.f.SpendID(conflictAlias)) require.True(a.f.test, exists, "Conflict %s does not exist", conflictAlias) require.Equal(a.f.test, len(parentAliases), parents.Size(), "Conflict %s has wrong number of parents", conflictAlias) for _, parentAlias := range parentAliases { - require.True(a.f.test, parents.Has(a.f.ConflictID(parentAlias)), "Conflict %s does not have parent %s", conflictAlias, parentAlias) + require.True(a.f.test, parents.Has(a.f.SpendID(parentAlias)), "Conflict %s does not have parent %s", conflictAlias, parentAlias) } } @@ -45,13 +45,13 @@ func (a *Assertions) ConflictSetMembers(resourceAlias string, conflictAliases .. require.Equal(a.f.test, len(conflictAliases), conflictSetMembers.Size(), "Resource %s has wrong number of parents", resourceAlias) for _, conflictAlias := range conflictAliases { - require.True(a.f.test, conflictSetMembers.Has(a.f.ConflictID(conflictAlias)), "Resource %s does not have parent %s", resourceAlias, conflictAlias) + require.True(a.f.test, conflictSetMembers.Has(a.f.SpendID(conflictAlias)), "Resource %s does not have parent %s", resourceAlias, conflictAlias) } } // ConflictSets asserts that the given conflict has the given conflict sets. func (a *Assertions) ConflictSets(conflictAlias string, resourceAliases ...string) { - conflictSets, exists := a.f.Instance.ConflictSets(a.f.ConflictID(conflictAlias)) + conflictSets, exists := a.f.Instance.ConflictSets(a.f.SpendID(conflictAlias)) require.True(a.f.test, exists, "Conflict %s does not exist", conflictAlias) require.Equal(a.f.test, len(resourceAliases), conflictSets.Size(), "Conflict %s has wrong number of conflict sets", conflictAlias) @@ -63,25 +63,25 @@ func (a *Assertions) ConflictSets(conflictAlias string, resourceAliases ...strin // Pending asserts that the given conflicts are pending. func (a *Assertions) Pending(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.ConflictIDs(alias)).IsPending(), "Conflict %s is not pending", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsPending(), "Conflict %s is not pending", alias) } } // Accepted asserts that the given conflicts are accepted. func (a *Assertions) Accepted(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.ConflictIDs(alias)).IsAccepted(), "Conflict %s is not accepted", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsAccepted(), "Conflict %s is not accepted", alias) } } // Rejected asserts that the given conflicts are rejected. func (a *Assertions) Rejected(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.ConflictIDs(alias)).IsRejected(), "Conflict %s is not rejected", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsRejected(), "Conflict %s is not rejected", alias) } } // ValidatorWeight asserts that the given conflict has the given validator weight. func (a *Assertions) ValidatorWeight(conflictAlias string, weight int64) { - require.Equal(a.f.test, weight, a.f.Instance.ConflictWeight(a.f.ConflictID(conflictAlias)), "ValidatorWeight is %s instead of % for conflict %s", a.f.Instance.ConflictWeight(a.f.ConflictID(conflictAlias)), weight, conflictAlias) + require.Equal(a.f.test, weight, a.f.Instance.SpendWeight(a.f.SpendID(conflictAlias)), "ValidatorWeight is %s instead of % for conflict %s", a.f.Instance.SpendWeight(a.f.SpendID(conflictAlias)), weight, conflictAlias) } diff --git a/pkg/protocol/engine/mempool/conflictdag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go similarity index 55% rename from pkg/protocol/engine/mempool/conflictdag/tests/framework.go rename to pkg/protocol/engine/mempool/spenddag/tests/framework.go index 32676fa84..9b14a48eb 100644 --- a/pkg/protocol/engine/mempool/conflictdag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -6,24 +6,24 @@ import ( "github.com/iotaledger/hive.go/ds" "github.com/iotaledger/hive.go/ierrors" "github.com/iotaledger/iota-core/pkg/core/vote" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" iotago "github.com/iotaledger/iota.go/v4" ) -// Framework is a test framework for the ConflictDAG that allows to easily create and manipulate the DAG and its +// Framework is a test framework for the spenddag that allows to easily create and manipulate the DAG and its // validators using human-readable aliases instead of actual IDs. type Framework struct { - // Instance is the ConflictDAG instance that is used in the tests. - Instance conflictdag.ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank] + // Instance is the spenddag instance that is used in the tests. + Instance spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank] // Accounts is the AccountsTestFramework that is used in the tests. Accounts *AccountsTestFramework - // Assert provides a set of assertions that can be used to verify the state of the ConflictDAG. + // Assert provides a set of assertions that can be used to verify the state of the spenddag. Assert *Assertions - // ConflictID is a function that is used to translate a string alias into a (deterministic) iotago.TransactionID. - ConflictID func(string) iotago.TransactionID + // SpendID is a function that is used to translate a string alias into a (deterministic) iotago.TransactionID. + SpendID func(string) iotago.TransactionID // ResourceID is a function that is used to translate a string alias into a (deterministic) iotago.OutputID. ResourceID func(string) iotago.OutputID @@ -35,15 +35,15 @@ type Framework struct { // NewFramework creates a new instance of the Framework. func NewFramework( t *testing.T, - conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank], + spenddag spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank], validators *AccountsTestFramework, - conflictID func(string) iotago.TransactionID, + spendID func(string) iotago.TransactionID, resourceID func(string) iotago.OutputID, ) *Framework { f := &Framework{ - Instance: conflictDAG, + Instance: spenddag, Accounts: validators, - ConflictID: conflictID, + SpendID: spendID, ResourceID: resourceID, test: t, } @@ -54,21 +54,21 @@ func NewFramework( // CreateOrUpdateConflict creates a new conflict or adds it to the given ConflictSets. func (f *Framework) CreateOrUpdateConflict(alias string, resourceAliases []string) error { - f.Instance.CreateConflict(f.ConflictID(alias)) - return f.Instance.UpdateConflictingResources(f.ConflictID(alias), f.ConflictSetIDs(resourceAliases...)) + f.Instance.CreateSpend(f.SpendID(alias)) + return f.Instance.UpdateConflictingResources(f.SpendID(alias), f.ConflictSetIDs(resourceAliases...)) } // UpdateConflictParents updates the parents of the conflict with the given alias. -func (f *Framework) UpdateConflictParents(conflictAlias string, addedParentIDs, removedParentIDs []string) error { - return f.Instance.UpdateConflictParents(f.ConflictID(conflictAlias), f.ConflictIDs(addedParentIDs...), f.ConflictIDs(removedParentIDs...)) +func (f *Framework) UpdateSpendParents(conflictAlias string, addedParentIDs, removedParentIDs []string) error { + return f.Instance.UpdateSpendParents(f.SpendID(conflictAlias), f.SpendIDs(addedParentIDs...), f.SpendIDs(removedParentIDs...)) } // LikedInstead returns the set of conflicts that are liked instead of the given conflicts. func (f *Framework) LikedInstead(conflictAliases ...string) ds.Set[iotago.TransactionID] { var result ds.Set[iotago.TransactionID] - _ = f.Instance.ReadConsistent(func(conflictDAG conflictdag.ReadLockedConflictDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) error { - result = conflictDAG.LikedInstead(f.ConflictIDs(conflictAliases...)) + _ = f.Instance.ReadConsistent(func(spenddag spenddag.ReadLockedSpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) error { + result = spenddag.LikedInstead(f.SpendIDs(conflictAliases...)) return nil }) @@ -83,22 +83,22 @@ func (f *Framework) CastVotes(nodeAlias string, voteRank int, conflictAliases .. return ierrors.Errorf("node with alias '%s' does not have a seat in the committee", nodeAlias) } - return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.ConflictIDs(conflictAliases...)) + return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpendIDs(conflictAliases...)) } -// EvictConflict evicts given conflict from the ConflictDAG. -func (f *Framework) EvictConflict(conflictAlias string) { - f.Instance.EvictConflict(f.ConflictID(conflictAlias)) +// EvictConflict evicts given conflict from the spenddag. +func (f *Framework) EvictSpend(conflictAlias string) { + f.Instance.EvictSpend(f.SpendID(conflictAlias)) } -// ConflictIDs translates the given aliases into an AdvancedSet of iotago.TransactionIDs. -func (f *Framework) ConflictIDs(aliases ...string) ds.Set[iotago.TransactionID] { - conflictIDs := ds.NewSet[iotago.TransactionID]() +// SpendIDs translates the given aliases into an AdvancedSet of iotago.TransactionIDs. +func (f *Framework) SpendIDs(aliases ...string) ds.Set[iotago.TransactionID] { + spendIDs := ds.NewSet[iotago.TransactionID]() for _, alias := range aliases { - conflictIDs.Add(f.ConflictID(alias)) + spendIDs.Add(f.SpendID(alias)) } - return conflictIDs + return spendIDs } // ConflictSetIDs translates the given aliases into an AdvancedSet of iotago.OutputIDs. diff --git a/pkg/protocol/engine/mempool/conflictdag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go similarity index 77% rename from pkg/protocol/engine/mempool/conflictdag/tests/tests.go rename to pkg/protocol/engine/mempool/spenddag/tests/tests.go index d0ed856c5..38ad91774 100644 --- a/pkg/protocol/engine/mempool/conflictdag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -8,16 +8,16 @@ import ( "github.com/iotaledger/hive.go/ds" "github.com/iotaledger/hive.go/lo" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" iotago "github.com/iotaledger/iota.go/v4" ) func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { for testName, testCase := range map[string]func(*testing.T, *Framework){ - "CreateConflict": CreateConflict, - "ExistingConflictJoinsConflictSets": ExistingConflictJoinsConflictSets, + "CreateConflict": CreateSpend, + "ExistingConflictJoinsConflictSets": ExistingConflictJoinsSpendSets, "JoinConflictSetTwice": JoinConflictSetTwice, - "UpdateConflictParents": UpdateConflictParents, + "UpdateConflictParents": UpdateSpendParents, "LikedInstead": LikedInstead, "CreateConflictWithoutMembers": CreateConflictWithoutMembers, "ConflictAcceptance": ConflictAcceptance, @@ -31,7 +31,7 @@ func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { } } -func ExistingConflictJoinsConflictSets(t *testing.T, tf *Framework) { +func ExistingConflictJoinsSpendSets(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") @@ -50,22 +50,22 @@ func ExistingConflictJoinsConflictSets(t *testing.T, tf *Framework) { tf.Assert.LikedInstead([]string{"conflict3"}, "conflict1") } -func UpdateConflictParents(t *testing.T, tf *Framework) { +func UpdateSpendParents(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource2"})) require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource1", "resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1", "conflict2"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1", "conflict2"}, []string{})) tf.Assert.Children("conflict1", "conflict3") tf.Assert.Parents("conflict3", "conflict1", "conflict2") require.NoError(t, tf.CreateOrUpdateConflict("conflict2.5", []string{"conflict2.5"})) - require.NoError(t, tf.UpdateConflictParents("conflict2.5", []string{"conflict1", "conflict2"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict2.5", []string{"conflict1", "conflict2"}, []string{})) tf.Assert.Children("conflict1", "conflict2.5", "conflict3") tf.Assert.Children("conflict2", "conflict2.5", "conflict3") tf.Assert.Parents("conflict2.5", "conflict1", "conflict2") - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict2.5"}, []string{"conflict1", "conflict2"})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict2.5"}, []string{"conflict1", "conflict2"})) tf.Assert.Children("conflict1", "conflict2.5") tf.Assert.Children("conflict2", "conflict2.5") @@ -74,16 +74,16 @@ func UpdateConflictParents(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict2.5", "conflict1", "conflict2") } -func CreateConflict(t *testing.T, tf *Framework) { +func CreateSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -142,10 +142,10 @@ func LikedInstead(t *testing.T, tf *Framework) { tf.Assert.LikedInstead([]string{"conflict1", "conflict2"}, "conflict1") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) require.NoError(t, tf.CastVotes("zero-weight", 1, "conflict4")) tf.Assert.LikedInstead([]string{"conflict1", "conflict2", "conflict3", "conflict4"}, "conflict1", "conflict4") @@ -164,10 +164,10 @@ func ConflictAcceptance(t *testing.T, tf *Framework) { tf.Assert.ConflictSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -199,10 +199,10 @@ func CastVotes(t *testing.T, tf *Framework) { tf.Assert.ConflictSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -235,10 +235,10 @@ func CastVotesVoteRank(t *testing.T, tf *Framework) { // create nested conflicts require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -288,10 +288,10 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { tf.Assert.ConflictSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -311,19 +311,19 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { tf.Assert.Rejected("conflict5") // Evict conflict and try to add non-existing parent to a rejected conflict - update is ignored because the parent is evicted. - tf.EvictConflict("conflict2") - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict2"}, []string{})) - parents, exists := tf.Instance.ConflictParents(tf.ConflictID("conflict4")) + tf.EvictSpend("conflict2") + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict2"}, []string{})) + parents, exists := tf.Instance.SpendParents(tf.SpendID("conflict4")) require.True(t, exists) - require.False(t, parents.Has(tf.ConflictID("conflict2"))) + require.False(t, parents.Has(tf.SpendID("conflict2"))) // Try to update parents of evicted conflict. - require.ErrorIs(t, tf.UpdateConflictParents("conflict2", []string{"conflict1"}, []string{}), conflictdag.ErrEntityEvicted) + require.ErrorIs(t, tf.UpdateSpendParents("conflict2", []string{"conflict1"}, []string{}), spenddag.ErrEntityEvicted) } func JoinConflictSetTwice(t *testing.T, tf *Framework) { var conflictCreatedEventCount, resourceAddedEventCount int - tf.Instance.Events().ConflictCreated.Hook(func(id iotago.TransactionID) { + tf.Instance.Events().SpendCreated.Hook(func(id iotago.TransactionID) { conflictCreatedEventCount++ }) @@ -366,10 +366,10 @@ func EvictAcceptedConflict(t *testing.T, tf *Framework) { tf.Assert.ConflictSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -377,10 +377,10 @@ func EvictAcceptedConflict(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict4", "conflict1") require.NoError(t, tf.CreateOrUpdateConflict("conflict5", []string{"resource3"})) - require.NoError(t, tf.UpdateConflictParents("conflict5", []string{"conflict2"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict2"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict6", []string{"resource3"})) - require.NoError(t, tf.UpdateConflictParents("conflict6", []string{"conflict2"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") tf.Assert.Children("conflict2", "conflict5", "conflict6") @@ -398,13 +398,13 @@ func EvictAcceptedConflict(t *testing.T, tf *Framework) { tf.Assert.Rejected("conflict4") tf.Assert.Pending("conflict5", "conflict6") - tf.EvictConflict("conflict2") - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict1")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict2")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict3")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict4")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict5")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict6")))) + tf.EvictSpend("conflict2") + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict1")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict2")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict3")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict4")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) require.False(t, lo.Return2(tf.Instance.ConflictSetMembers(tf.ResourceID("resource1")))) require.False(t, lo.Return2(tf.Instance.ConflictSetMembers(tf.ResourceID("resource2")))) @@ -416,7 +416,7 @@ func EvictAcceptedConflict(t *testing.T, tf *Framework) { func EvictRejectedConflict(t *testing.T, tf *Framework) { conflictEvictedEventCount := 0 - tf.Instance.Events().ConflictEvicted.Hook(func(id iotago.TransactionID) { + tf.Instance.Events().SpendEvicted.Hook(func(id iotago.TransactionID) { conflictEvictedEventCount++ }) @@ -432,10 +432,10 @@ func EvictRejectedConflict(t *testing.T, tf *Framework) { tf.Assert.ConflictSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateConflictParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") @@ -443,10 +443,10 @@ func EvictRejectedConflict(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict4", "conflict1") require.NoError(t, tf.CreateOrUpdateConflict("conflict5", []string{"resource3"})) - require.NoError(t, tf.UpdateConflictParents("conflict5", []string{"conflict2"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict2"}, []string{})) require.NoError(t, tf.CreateOrUpdateConflict("conflict6", []string{"resource3"})) - require.NoError(t, tf.UpdateConflictParents("conflict6", []string{"conflict2"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") tf.Assert.Children("conflict2", "conflict5", "conflict6") @@ -464,16 +464,16 @@ func EvictRejectedConflict(t *testing.T, tf *Framework) { tf.Assert.Rejected("conflict4") tf.Assert.Pending("conflict5", "conflict6") - tf.EvictConflict("conflict1") - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict1")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict2")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict3")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict4")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict5")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict6")))) + tf.EvictSpend("conflict1") + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict1")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict2")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict3")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict4")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) require.Equal(t, 3, conflictEvictedEventCount) - tf.EvictConflict("conflict1") + tf.EvictSpend("conflict1") require.Equal(t, 3, conflictEvictedEventCount) tf.Assert.ConflictSetMembers("resource1", "conflict2") @@ -482,13 +482,13 @@ func EvictRejectedConflict(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict5", "conflict2") tf.Assert.Parents("conflict6", "conflict2") - tf.EvictConflict("conflict6") - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict1")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict2")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict3")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict4")))) - require.True(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict5")))) - require.False(t, lo.Return2(tf.Instance.ConflictingConflicts(tf.ConflictID("conflict6")))) + tf.EvictSpend("conflict6") + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict1")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict2")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict3")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict4")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) require.Equal(t, 4, conflictEvictedEventCount) tf.Assert.ConflictSetMembers("resource1", "conflict2") @@ -498,9 +498,9 @@ func EvictRejectedConflict(t *testing.T, tf *Framework) { tf.Assert.Children("conflict2", "conflict5") // Try to add non-existing parent to a pending conflict - nothing happens. - require.NoError(t, tf.UpdateConflictParents("conflict5", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict1"}, []string{})) - parents, exists := tf.Instance.ConflictParents(tf.ConflictID("conflict5")) + parents, exists := tf.Instance.SpendParents(tf.SpendID("conflict5")) require.True(t, exists) - require.False(t, parents.Has(tf.ConflictID("conflict1"))) + require.False(t, parents.Has(tf.SpendID("conflict1"))) } diff --git a/pkg/protocol/engine/mempool/state_metadata.go b/pkg/protocol/engine/mempool/state_metadata.go index 1a8b8cb2e..75072912a 100644 --- a/pkg/protocol/engine/mempool/state_metadata.go +++ b/pkg/protocol/engine/mempool/state_metadata.go @@ -8,7 +8,7 @@ import ( type StateMetadata interface { State() State - ConflictIDs() reactive.Set[iotago.TransactionID] + SpendIDs() reactive.Set[iotago.TransactionID] PendingSpenderCount() int diff --git a/pkg/protocol/engine/mempool/tests/testframework.go b/pkg/protocol/engine/mempool/tests/testframework.go index 55edeacf8..66f475268 100644 --- a/pkg/protocol/engine/mempool/tests/testframework.go +++ b/pkg/protocol/engine/mempool/tests/testframework.go @@ -14,13 +14,13 @@ import ( "github.com/iotaledger/iota-core/pkg/core/vote" ledgertests "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger/tests" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" iotago "github.com/iotaledger/iota.go/v4" ) type TestFramework struct { - Instance mempool.MemPool[vote.MockedRank] - ConflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank] + Instance mempool.MemPool[vote.MockedRank] + spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank] referencesByAlias map[string]mempool.StateReference stateIDByAlias map[string]mempool.StateID @@ -35,10 +35,10 @@ type TestFramework struct { mutex syncutils.RWMutex } -func NewTestFramework(test *testing.T, instance mempool.MemPool[vote.MockedRank], conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank], ledgerState *ledgertests.MockStateResolver, workers *workerpool.Group) *TestFramework { +func NewTestFramework(test *testing.T, instance mempool.MemPool[vote.MockedRank], spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank], ledgerState *ledgertests.MockStateResolver, workers *workerpool.Group) *TestFramework { t := &TestFramework{ Instance: instance, - ConflictDAG: conflictDAG, + spenddag: spenddag, referencesByAlias: make(map[string]mempool.StateReference), stateIDByAlias: make(map[string]mempool.StateID), signedTransactionByAlias: make(map[string]mempool.SignedTransaction), @@ -243,16 +243,16 @@ func (t *TestFramework) RequireTransactionsEvicted(transactionAliases map[string } } -func (t *TestFramework) RequireConflictIDs(conflictMapping map[string][]string) { +func (t *TestFramework) RequireSpendIDs(conflictMapping map[string][]string) { for transactionAlias, conflictAliases := range conflictMapping { transactionMetadata, exists := t.Instance.TransactionMetadata(t.TransactionID(transactionAlias)) require.True(t.test, exists, "transaction %s does not exist", transactionAlias) - conflictIDs := transactionMetadata.ConflictIDs() - require.Equal(t.test, len(conflictAliases), conflictIDs.Size(), "%s has wrong number of ConflictIDs", transactionAlias) + spendIDs := transactionMetadata.SpendIDs() + require.Equal(t.test, len(conflictAliases), spendIDs.Size(), "%s has wrong number of SpendIDs", transactionAlias) for _, conflictAlias := range conflictAliases { - require.True(t.test, conflictIDs.Has(t.TransactionID(conflictAlias)), "transaction %s should have conflict %s, instead had %s", transactionAlias, conflictAlias, conflictIDs) + require.True(t.test, spendIDs.Has(t.TransactionID(conflictAlias)), "transaction %s should have conflict %s, instead had %s", transactionAlias, conflictAlias, spendIDs) } } } diff --git a/pkg/protocol/engine/mempool/tests/tests.go b/pkg/protocol/engine/mempool/tests/tests.go index c14fdd591..53b5c20c4 100644 --- a/pkg/protocol/engine/mempool/tests/tests.go +++ b/pkg/protocol/engine/mempool/tests/tests.go @@ -129,12 +129,12 @@ func TestProcessTransactionWithReadOnlyInputs(t *testing.T, tf *TestFramework) { return nil }) - conflictSetsTx1, exists := tf.ConflictDAG.ConflictSets(tf.TransactionID("tx1")) + conflictSetsTx1, exists := tf.spenddag.ConflictSets(tf.TransactionID("tx1")) require.True(t, exists) require.Equal(t, 1, conflictSetsTx1.Size()) require.True(t, conflictSetsTx1.Has(tf.StateID("genesis"))) - conflictSetsTx2, exists := tf.ConflictDAG.ConflictSets(tf.TransactionID("tx2")) + conflictSetsTx2, exists := tf.spenddag.ConflictSets(tf.TransactionID("tx2")) require.True(t, exists) require.Equal(t, 1, conflictSetsTx2.Size()) require.True(t, conflictSetsTx2.Has(tf.StateID("tx1:0"))) @@ -316,9 +316,9 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { require.False(t, lo.Return2(tx2Metadata.OrphanedSlot())) require.False(t, lo.Return2(tx3Metadata.OrphanedSlot())) - require.True(t, lo.Return2(tf.ConflictDAG.ConflictSets(tf.TransactionID("tx1")))) - require.True(t, lo.Return2(tf.ConflictDAG.ConflictSets(tf.TransactionID("tx2")))) - require.True(t, lo.Return2(tf.ConflictDAG.ConflictSets(tf.TransactionID("tx3")))) + require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx1")))) + require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx2")))) + require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx3")))) tf.Instance.Evict(2) @@ -327,9 +327,9 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { require.True(t, lo.Return2(tx3Metadata.OrphanedSlot())) // All conflicts still exist, as they are kept around until MCA - require.True(t, lo.Return2(tf.ConflictDAG.ConflictSets(tf.TransactionID("tx1")))) - require.True(t, lo.Return2(tf.ConflictDAG.ConflictSets(tf.TransactionID("tx2")))) - require.True(t, lo.Return2(tf.ConflictDAG.ConflictSets(tf.TransactionID("tx3")))) + require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx1")))) + require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx2")))) + require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx3")))) tf.RequireTransactionsEvicted(map[string]bool{"tx1": false, "tx2": false, "tx3": false}) @@ -384,19 +384,19 @@ func TestConflictPropagationForkAll(t *testing.T, tf *TestFramework) { require.NoError(t, tf.AttachTransaction("tx1-signed", "tx1", "block1", 1)) tf.RequireBooked("tx1", "tx2", "tx3") - tf.RequireConflictIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}}) + tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}}) require.NoError(t, tf.AttachTransaction("tx3*-signed", "tx3*", "block3*", 3)) require.NoError(t, tf.AttachTransaction("tx2*-signed", "tx2*", "block2*", 2)) require.NoError(t, tf.AttachTransaction("tx1*-signed", "tx1*", "block1*", 1)) tf.RequireBooked("tx1*", "tx2*", "tx3*") - tf.RequireConflictIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) + tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) require.NoError(t, tf.AttachTransaction("tx4-signed", "tx4", "block4", 2)) tf.RequireBooked("tx4") - tf.RequireConflictIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) + tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) } func TestConflictPropagationForkOnDoubleSpend(t *testing.T, tf *TestFramework) { @@ -416,19 +416,19 @@ func TestConflictPropagationForkOnDoubleSpend(t *testing.T, tf *TestFramework) { require.NoError(t, tf.AttachTransaction("tx1-signed", "tx1", "block1", 1)) tf.RequireBooked("tx1", "tx2", "tx3") - tf.RequireConflictIDs(map[string][]string{"tx1": {}, "tx2": {}, "tx3": {}}) + tf.RequireSpendIDs(map[string][]string{"tx1": {}, "tx2": {}, "tx3": {}}) require.NoError(t, tf.AttachTransaction("tx3*-signed", "tx3*", "block3*", 3)) require.NoError(t, tf.AttachTransaction("tx2*-signed", "tx2*", "block2*", 2)) require.NoError(t, tf.AttachTransaction("tx1*-signed", "tx1*", "block1*", 1)) tf.RequireBooked("tx1*", "tx2*", "tx3*") - tf.RequireConflictIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx1"}, "tx3": {"tx1"}, "tx1*": {"tx1*"}, "tx2*": {"tx1*"}, "tx3*": {"tx1*"}}) + tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx1"}, "tx3": {"tx1"}, "tx1*": {"tx1*"}, "tx2*": {"tx1*"}, "tx3*": {"tx1*"}}) require.NoError(t, tf.AttachTransaction("tx4-signed", "tx4", "block4", 2)) tf.RequireBooked("tx4") - tf.RequireConflictIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx2"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx1*"}, "tx3*": {"tx1*"}}) + tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx2"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx1*"}, "tx3*": {"tx1*"}}) } func TestInvalidTransaction(t *testing.T, tf *TestFramework) { diff --git a/pkg/protocol/engine/mempool/transaction_metadata.go b/pkg/protocol/engine/mempool/transaction_metadata.go index e594a7d5a..e9d06dd1b 100644 --- a/pkg/protocol/engine/mempool/transaction_metadata.go +++ b/pkg/protocol/engine/mempool/transaction_metadata.go @@ -15,7 +15,7 @@ type TransactionMetadata interface { Outputs() ds.Set[StateMetadata] - ConflictIDs() reactive.Set[iotago.TransactionID] + SpendIDs() reactive.Set[iotago.TransactionID] Commit() diff --git a/pkg/protocol/engine/mempool/v1/mempool.go b/pkg/protocol/engine/mempool/v1/mempool.go index d331faa4e..dfc330edb 100644 --- a/pkg/protocol/engine/mempool/v1/mempool.go +++ b/pkg/protocol/engine/mempool/v1/mempool.go @@ -16,12 +16,12 @@ import ( "github.com/iotaledger/iota-core/pkg/core/promise" "github.com/iotaledger/iota-core/pkg/core/vote" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" iotago "github.com/iotaledger/iota.go/v4" ) // MemPool is a component that manages the state of transactions that are not yet included in the ledger state. -type MemPool[VoteRank conflictdag.VoteRankType[VoteRank]] struct { +type MemPool[VoteRank spenddag.VoteRankType[VoteRank]] struct { // vm is the virtual machine that is used to validate and execute transactions. vm mempool.VM @@ -53,8 +53,8 @@ type MemPool[VoteRank conflictdag.VoteRankType[VoteRank]] struct { // invalidate blocks that try to spend them. delayedOutputStateEviction *shrinkingmap.ShrinkingMap[iotago.SlotIndex, *shrinkingmap.ShrinkingMap[iotago.Identifier, *StateMetadata]] - // conflictDAG is the DAG that is used to keep track of the conflicts between transactions. - conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, VoteRank] + // spenddag is the DAG that is used to keep track of the conflicts between transactions. + spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, VoteRank] apiProvider iotago.APIProvider @@ -75,12 +75,12 @@ type MemPool[VoteRank conflictdag.VoteRankType[VoteRank]] struct { } // New is the constructor of the MemPool. -func New[VoteRank conflictdag.VoteRankType[VoteRank]]( +func New[VoteRank spenddag.VoteRankType[VoteRank]]( vm mempool.VM, stateResolver mempool.StateResolver, mutationsFunc func(iotago.SlotIndex) (kvstore.KVStore, error), workers *workerpool.Group, - conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, VoteRank], + spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, VoteRank], apiProvider iotago.APIProvider, errorHandler func(error), opts ...options.Option[MemPool[VoteRank]], @@ -97,7 +97,7 @@ func New[VoteRank conflictdag.VoteRankType[VoteRank]]( executionWorkers: workers.CreatePool("executionWorkers", workerpool.WithWorkerCount(1)), delayedTransactionEviction: shrinkingmap.New[iotago.SlotIndex, ds.Set[iotago.TransactionID]](), delayedOutputStateEviction: shrinkingmap.New[iotago.SlotIndex, *shrinkingmap.ShrinkingMap[iotago.Identifier, *StateMetadata]](), - conflictDAG: conflictDAG, + spenddag: spenddag, apiProvider: apiProvider, errorHandler: errorHandler, signedTransactionAttached: event.New1[mempool.SignedTransactionMetadata](), @@ -334,7 +334,7 @@ func (m *MemPool[VoteRank]) bookTransaction(transaction *TransactionMetadata) { func (m *MemPool[VoteRank]) forkTransaction(transactionMetadata *TransactionMetadata, resourceIDs ds.Set[mempool.StateID]) { transactionMetadata.conflicting.Trigger() - if err := m.conflictDAG.UpdateConflictingResources(transactionMetadata.ID(), resourceIDs); err != nil { + if err := m.spenddag.UpdateConflictingResources(transactionMetadata.ID(), resourceIDs); err != nil { // this is a hack, as with a reactive.Variable we cannot set it to 0 and still check if it was orphaned. transactionMetadata.orphanedSlot.Set(1) @@ -426,7 +426,7 @@ func (m *MemPool[VoteRank]) updateStateDiffs(transaction *TransactionMetadata, p } func (m *MemPool[VoteRank]) setup() { - m.conflictDAG.Events().ConflictAccepted.Hook(func(id iotago.TransactionID) { + m.spenddag.Events().SpendAccepted.Hook(func(id iotago.TransactionID) { if transaction, exists := m.cachedTransactions.Get(id); exists { transaction.setConflictAccepted() } @@ -449,10 +449,10 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { }) transaction.OnConflicting(func() { - m.conflictDAG.CreateConflict(transaction.ID()) + m.spenddag.CreateSpend(transaction.ID()) - unsubscribe := transaction.parentConflictIDs.OnUpdate(func(appliedMutations ds.SetMutations[iotago.TransactionID]) { - if err := m.conflictDAG.UpdateConflictParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { + unsubscribe := transaction.parentSpendIDs.OnUpdate(func(appliedMutations ds.SetMutations[iotago.TransactionID]) { + if err := m.spenddag.UpdateSpendParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { panic(err) } }) @@ -460,7 +460,7 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { transaction.OnEvicted(func() { unsubscribe() - m.conflictDAG.EvictConflict(transaction.ID()) + m.spenddag.EvictSpend(transaction.ID()) }) }) diff --git a/pkg/protocol/engine/mempool/v1/mempool_test.go b/pkg/protocol/engine/mempool/v1/mempool_test.go index a35d8f171..0f9afcdf0 100644 --- a/pkg/protocol/engine/mempool/v1/mempool_test.go +++ b/pkg/protocol/engine/mempool/v1/mempool_test.go @@ -18,7 +18,7 @@ import ( "github.com/iotaledger/iota-core/pkg/core/vote" ledgertests "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger/tests" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag/conflictdagv1" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag/spenddagv1" mempooltests "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/tests" iotago "github.com/iotaledger/iota.go/v4" "github.com/iotaledger/iota.go/v4/api" @@ -41,12 +41,12 @@ func TestMempoolV1_ResourceCleanup(t *testing.T) { } ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0)) - conflictDAG := conflictdagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](func() int { return 0 }) + spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](func() int { return 0 }) memPoolInstance := New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, conflictDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}) + }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}) - tf := mempooltests.NewTestFramework(t, memPoolInstance, conflictDAG, ledgerState, workers) + tf := mempooltests.NewTestFramework(t, memPoolInstance, spenddag, ledgerState, workers) issueTransactions := func(startIndex, transactionCount int, prevStateAlias string) (int, string) { index := startIndex @@ -145,7 +145,7 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework { workers := workerpool.NewGroup(t.Name()) ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0)) - conflictDAG := conflictdagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) + spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) mutationsFunc := func(index iotago.SlotIndex) (kvstore.KVStore, error) { return mapdb.NewMapDB(), nil @@ -153,14 +153,14 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework { return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, conflictDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), conflictDAG, ledgerState, workers) + }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers) } func newForkingTestFramework(t *testing.T) *mempooltests.TestFramework { workers := workerpool.NewGroup(t.Name()) ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0)) - conflictDAG := conflictdagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) + spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) mutationsFunc := func(index iotago.SlotIndex) (kvstore.KVStore, error) { return mapdb.NewMapDB(), nil @@ -168,5 +168,5 @@ func newForkingTestFramework(t *testing.T) *mempooltests.TestFramework { return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, conflictDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), conflictDAG, ledgerState, workers) + }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers) } diff --git a/pkg/protocol/engine/mempool/v1/state_metadata.go b/pkg/protocol/engine/mempool/v1/state_metadata.go index 80b30f3de..87af039ac 100644 --- a/pkg/protocol/engine/mempool/v1/state_metadata.go +++ b/pkg/protocol/engine/mempool/v1/state_metadata.go @@ -22,7 +22,7 @@ type StateMetadata struct { spendCommitted reactive.Variable[*TransactionMetadata] allSpendersRemoved *event.Event - conflictIDs reactive.DerivedSet[iotago.TransactionID] + spendIDs reactive.DerivedSet[iotago.TransactionID] *inclusionFlags } @@ -37,7 +37,7 @@ func NewStateMetadata(state mempool.State, optSource ...*TransactionMetadata) *S spendCommitted: reactive.NewVariable[*TransactionMetadata](), allSpendersRemoved: event.New(), - conflictIDs: reactive.NewDerivedSet[iotago.TransactionID](), + spendIDs: reactive.NewDerivedSet[iotago.TransactionID](), inclusionFlags: newInclusionFlags(), }).setup(optSource...) @@ -49,7 +49,7 @@ func (s *StateMetadata) setup(optSource ...*TransactionMetadata) *StateMetadata } source := optSource[0] - s.conflictIDs.InheritFrom(source.conflictIDs) + s.spendIDs.InheritFrom(source.spendIDs) source.OnPending(func() { s.accepted.Set(false) }) source.OnAccepted(func() { s.accepted.Set(true) }) @@ -64,8 +64,8 @@ func (s *StateMetadata) State() mempool.State { return s.state } -func (s *StateMetadata) ConflictIDs() reactive.Set[iotago.TransactionID] { - return s.conflictIDs +func (s *StateMetadata) SpendIDs() reactive.Set[iotago.TransactionID] { + return s.spendIDs } func (s *StateMetadata) IsDoubleSpent() bool { diff --git a/pkg/protocol/engine/mempool/v1/transaction_metadata.go b/pkg/protocol/engine/mempool/v1/transaction_metadata.go index a976dcf92..75f316921 100644 --- a/pkg/protocol/engine/mempool/v1/transaction_metadata.go +++ b/pkg/protocol/engine/mempool/v1/transaction_metadata.go @@ -15,13 +15,13 @@ import ( ) type TransactionMetadata struct { - id iotago.TransactionID - inputReferences []mempool.StateReference - inputs []*StateMetadata - outputs []*StateMetadata - transaction mempool.Transaction - parentConflictIDs reactive.DerivedSet[iotago.TransactionID] - conflictIDs reactive.DerivedSet[iotago.TransactionID] + id iotago.TransactionID + inputReferences []mempool.StateReference + inputs []*StateMetadata + outputs []*StateMetadata + transaction mempool.Transaction + parentSpendIDs reactive.DerivedSet[iotago.TransactionID] + spendIDs reactive.DerivedSet[iotago.TransactionID] // lifecycle events unsolidInputsCount uint64 @@ -65,12 +65,12 @@ func NewTransactionMetadata(transaction mempool.Transaction, referencedInputs [] } return (&TransactionMetadata{ - id: transactionID, - inputReferences: referencedInputs, - inputs: make([]*StateMetadata, len(referencedInputs)), - transaction: transaction, - parentConflictIDs: reactive.NewDerivedSet[iotago.TransactionID](), - conflictIDs: reactive.NewDerivedSet[iotago.TransactionID](), + id: transactionID, + inputReferences: referencedInputs, + inputs: make([]*StateMetadata, len(referencedInputs)), + transaction: transaction, + parentSpendIDs: reactive.NewDerivedSet[iotago.TransactionID](), + spendIDs: reactive.NewDerivedSet[iotago.TransactionID](), unsolidInputsCount: uint64(len(referencedInputs)), booked: reactive.NewEvent(), @@ -127,8 +127,8 @@ func (t *TransactionMetadata) Outputs() ds.Set[mempool.StateMetadata] { return outputs } -func (t *TransactionMetadata) ConflictIDs() reactive.Set[iotago.TransactionID] { - return t.conflictIDs +func (t *TransactionMetadata) SpendIDs() reactive.Set[iotago.TransactionID] { + return t.spendIDs } func (t *TransactionMetadata) publishInput(index int, input *StateMetadata) { @@ -247,7 +247,7 @@ func (t *TransactionMetadata) setConflictAccepted() { } func (t *TransactionMetadata) setupInput(input *StateMetadata) { - t.parentConflictIDs.InheritFrom(input.conflictIDs) + t.parentSpendIDs.InheritFrom(input.spendIDs) input.OnRejected(func() { t.rejected.Trigger() }) input.OnOrphanedSlotUpdated(func(slot iotago.SlotIndex) { @@ -286,12 +286,12 @@ func (t *TransactionMetadata) setupInput(input *StateMetadata) { } func (t *TransactionMetadata) setup() (self *TransactionMetadata) { - cancelConflictInheritance := t.conflictIDs.InheritFrom(t.parentConflictIDs) + cancelConflictInheritance := t.spendIDs.InheritFrom(t.parentSpendIDs) t.OnConflicting(func() { cancelConflictInheritance() - t.conflictIDs.Replace(ds.NewSet(t.id)) + t.spendIDs.Replace(ds.NewSet(t.id)) }) t.allValidAttachmentsEvicted.OnUpdate(func(_, slot iotago.SlotIndex) { diff --git a/pkg/protocol/engine/tipselection/v1/provider.go b/pkg/protocol/engine/tipselection/v1/provider.go index ad9bb1d1b..8eb001aa9 100644 --- a/pkg/protocol/engine/tipselection/v1/provider.go +++ b/pkg/protocol/engine/tipselection/v1/provider.go @@ -20,7 +20,7 @@ func NewProvider(opts ...options.Option[TipSelection]) module.Provider[*engine.E e.HookConstructed(func() { // wait for submodules to be constructed (so all of their properties are available) module.OnAllConstructed(func() { - t.Construct(e.TipManager, e.Ledger.ConflictDAG(), e.Ledger.MemPool().TransactionMetadata, e.EvictionState.LatestRootBlocks, DynamicLivenessThreshold(e.SybilProtection.SeatManager().OnlineCommittee().Size)) + t.Construct(e.TipManager, e.Ledger.SpendDAG(), e.Ledger.MemPool().TransactionMetadata, e.EvictionState.LatestRootBlocks, DynamicLivenessThreshold(e.SybilProtection.SeatManager().OnlineCommittee().Size)) e.Events.AcceptedBlockProcessed.Hook(func(block *blocks.Block) { t.SetAcceptanceTime(block.IssuingTime()) diff --git a/pkg/protocol/engine/tipselection/v1/test_framework_test.go b/pkg/protocol/engine/tipselection/v1/test_framework_test.go index 12f9f4725..d7288ae0e 100644 --- a/pkg/protocol/engine/tipselection/v1/test_framework_test.go +++ b/pkg/protocol/engine/tipselection/v1/test_framework_test.go @@ -10,7 +10,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag/conflictdagv1" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag/spenddagv1" "github.com/iotaledger/iota-core/pkg/protocol/engine/tipmanager" tipmanagertests "github.com/iotaledger/iota-core/pkg/protocol/engine/tipmanager/tests" tipselectionv1 "github.com/iotaledger/iota-core/pkg/protocol/engine/tipselection/v1" @@ -49,7 +49,7 @@ func NewTestFramework(test *testing.T, opts ...options.Option[TestFramework]) *T t.Instance = tipselectionv1.New().Construct( t.TipManager.Instance, - conflictdagv1.New[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank](t.CommitteeSize), + spenddagv1.New[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank](t.CommitteeSize), transactionMetadataRetriever, rootBlocksRetriever, t.expectedLivenessDuration, diff --git a/pkg/protocol/engine/tipselection/v1/tip_selection.go b/pkg/protocol/engine/tipselection/v1/tip_selection.go index ee7b7fad4..490367166 100644 --- a/pkg/protocol/engine/tipselection/v1/tip_selection.go +++ b/pkg/protocol/engine/tipselection/v1/tip_selection.go @@ -14,7 +14,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" "github.com/iotaledger/iota-core/pkg/protocol/engine/ledger" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" "github.com/iotaledger/iota-core/pkg/protocol/engine/tipmanager" iotago "github.com/iotaledger/iota.go/v4" ) @@ -25,7 +25,7 @@ type TipSelection struct { tipManager tipmanager.TipManager // conflictDAG is the ConflictDAG that is used to track conflicts. - conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] + conflictDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] // rootBlocks is a function that returns the current root blocks. rootBlocks func() iotago.BlockIDs @@ -76,7 +76,7 @@ func New(opts ...options.Option[TipSelection]) *TipSelection { // // This method is separated from the constructor so the TipSelection can be initialized lazily after all dependencies // are available. -func (t *TipSelection) Construct(tipManager tipmanager.TipManager, conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank], transactionMetadataRetriever func(iotago.TransactionID) (mempool.TransactionMetadata, bool), rootBlocksRetriever func() iotago.BlockIDs, livenessThresholdFunc func(tipmanager.TipMetadata) time.Duration) *TipSelection { +func (t *TipSelection) Construct(tipManager tipmanager.TipManager, conflictDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank], transactionMetadataRetriever func(iotago.TransactionID) (mempool.TransactionMetadata, bool), rootBlocksRetriever func() iotago.BlockIDs, livenessThresholdFunc func(tipmanager.TipMetadata) time.Duration) *TipSelection { t.tipManager = tipManager t.conflictDAG = conflictDAG t.transactionMetadata = transactionMetadataRetriever @@ -101,7 +101,7 @@ func (t *TipSelection) SelectTips(amount int) (references model.ParentReferences references = make(model.ParentReferences) strongParents := ds.NewSet[iotago.BlockID]() shallowLikesParents := ds.NewSet[iotago.BlockID]() - _ = t.conflictDAG.ReadConsistent(func(_ conflictdag.ReadLockedConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank]) error { + _ = t.conflictDAG.ReadConsistent(func(_ spenddag.ReadLockedSpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank]) error { previousLikedInsteadConflicts := ds.NewSet[iotago.TransactionID]() if t.collectReferences(references, iotago.StrongParentType, t.tipManager.StrongTips, func(tip tipmanager.TipMetadata) { @@ -164,13 +164,13 @@ func (t *TipSelection) classifyTip(tipMetadata tipmanager.TipMetadata) { // likedInsteadReferences returns the liked instead references that are required to be able to reference the given tip. func (t *TipSelection) likedInsteadReferences(likedConflicts ds.Set[iotago.TransactionID], tipMetadata tipmanager.TipMetadata) (references []iotago.BlockID, updatedLikedConflicts ds.Set[iotago.TransactionID], err error) { necessaryReferences := make(map[iotago.TransactionID]iotago.BlockID) - if err = t.conflictDAG.LikedInstead(tipMetadata.Block().ConflictIDs()).ForEach(func(likedConflictID iotago.TransactionID) error { - transactionMetadata, exists := t.transactionMetadata(likedConflictID) + if err = t.conflictDAG.LikedInstead(tipMetadata.Block().SpendIDs()).ForEach(func(likedSpendID iotago.TransactionID) error { + transactionMetadata, exists := t.transactionMetadata(likedSpendID) if !exists { - return ierrors.Errorf("transaction required for liked instead reference (%s) not found in mem-pool", likedConflictID) + return ierrors.Errorf("transaction required for liked instead reference (%s) not found in mem-pool", likedSpendID) } - necessaryReferences[likedConflictID] = lo.First(transactionMetadata.ValidAttachments()) + necessaryReferences[likedSpendID] = lo.First(transactionMetadata.ValidAttachments()) return nil }); err != nil { @@ -178,8 +178,8 @@ func (t *TipSelection) likedInsteadReferences(likedConflicts ds.Set[iotago.Trans } references, updatedLikedConflicts = make([]iotago.BlockID, 0), likedConflicts.Clone() - for conflictID, attachmentID := range necessaryReferences { - if updatedLikedConflicts.Add(conflictID) { + for spendID, attachmentID := range necessaryReferences { + if updatedLikedConflicts.Add(spendID) { references = append(references, attachmentID) } } @@ -220,12 +220,12 @@ func (t *TipSelection) collectReferences(references model.ParentReferences, pare // isValidStrongTip checks if the given block is a valid strong tip. func (t *TipSelection) isValidStrongTip(block *blocks.Block) bool { - return !t.conflictDAG.AcceptanceState(block.ConflictIDs()).IsRejected() + return !t.conflictDAG.AcceptanceState(block.SpendIDs()).IsRejected() } // isValidWeakTip checks if the given block is a valid weak tip. func (t *TipSelection) isValidWeakTip(block *blocks.Block) bool { - return t.conflictDAG.LikedInstead(block.PayloadConflictIDs()).Size() == 0 + return t.conflictDAG.LikedInstead(block.PayloadSpendIDs()).Size() == 0 } // triggerLivenessThreshold triggers the liveness threshold for all tips that have reached the given threshold. diff --git a/pkg/retainer/retainer/retainer.go b/pkg/retainer/retainer/retainer.go index bff0b20ba..ebd061047 100644 --- a/pkg/retainer/retainer/retainer.go +++ b/pkg/retainer/retainer/retainer.go @@ -87,8 +87,8 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] { r.RetainBlockFailure(b.ID(), apimodels.BlockFailureDroppedDueToCongestion) }) - e.Events.ConflictDAG.ConflictRejected.Hook(func(conflictID iotago.TransactionID) { - txMetadata, exist := e.Ledger.MemPool().TransactionMetadata(conflictID) + e.Events.SpendDAG.SpendRejected.Hook(func(spendID iotago.TransactionID) { + txMetadata, exist := e.Ledger.MemPool().TransactionMetadata(spendID) if !exist { return } diff --git a/pkg/tests/booker_test.go b/pkg/tests/booker_test.go index 8a9e2e576..8532e2f25 100644 --- a/pkg/tests/booker_test.go +++ b/pkg/tests/booker_test.go @@ -155,7 +155,7 @@ func Test_MultipleAttachments(t *testing.T) { ts.AssertTransactionInCacheConflicts(map[*iotago.Transaction][]string{ wallet.Transaction("tx1"): {"tx1"}, }, ts.Nodes()...) - ts.AssertConflictsInCacheAcceptanceState([]string{"tx1"}, acceptance.Accepted, ts.Nodes()...) + ts.AssertSpendsInCacheAcceptanceState([]string{"tx1"}, acceptance.Accepted, ts.Nodes()...) } // Create a transaction that is included and whose conflict is accepted, but whose inputs are not accepted. @@ -191,7 +191,7 @@ func Test_MultipleAttachments(t *testing.T) { wallet.Transaction("tx1"): {"tx1"}, wallet.Transaction("tx2"): {"tx2"}, }, nodeA, nodeB) - ts.AssertConflictsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, ts.Nodes()...) + ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, ts.Nodes()...) } // Issue a block that includes tx1, and make sure that tx2 is accepted as well as a consequence. @@ -221,7 +221,7 @@ func Test_MultipleAttachments(t *testing.T) { wallet.Transaction("tx1"): {"tx1"}, wallet.Transaction("tx2"): {"tx2"}, }, nodeA, nodeB) - ts.AssertConflictsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, nodeA, nodeB) + ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, nodeA, nodeB) } } diff --git a/pkg/testsuite/blocks.go b/pkg/testsuite/blocks.go index 90e5c70ac..267de628b 100644 --- a/pkg/testsuite/blocks.go +++ b/pkg/testsuite/blocks.go @@ -130,15 +130,15 @@ func (t *TestSuite) AssertBlocksInCacheConflicts(blockConflicts map[*blocks.Bloc return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s is root block", node.Name, blockFromCache.ID()) } - expectedConflictIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) - actualConflictIDs := blockFromCache.ConflictIDs() + expectedSpendIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) + actualSpendIDs := blockFromCache.SpendIDs() - if expectedConflictIDs.Size() != actualConflictIDs.Size() { - return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s conflict count incorrect: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedConflictIDs, actualConflictIDs) + if expectedSpendIDs.Size() != actualSpendIDs.Size() { + return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s conflict count incorrect: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedSpendIDs, actualSpendIDs) } - if !actualConflictIDs.HasAll(expectedConflictIDs) { - return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedConflictIDs, actualConflictIDs) + if !actualSpendIDs.HasAll(expectedSpendIDs) { + return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedSpendIDs, actualSpendIDs) } return nil diff --git a/pkg/testsuite/mock/node.go b/pkg/testsuite/mock/node.go index b9bde387f..9a7a64253 100644 --- a/pkg/testsuite/mock/node.go +++ b/pkg/testsuite/mock/node.go @@ -386,19 +386,19 @@ func (n *Node) attachEngineLogsWithName(failOnBlockFiltered bool, instance *engi fmt.Printf("%s > [%s] SybilProtection.CommitteeSelected: epoch %d - %s\n", n.Name, engineName, epoch, committee.IDs()) }) - events.ConflictDAG.ConflictCreated.Hook(func(conflictID iotago.TransactionID) { - fmt.Printf("%s > [%s] ConflictDAG.ConflictCreated: %s\n", n.Name, engineName, conflictID) + events.SpendDAG.SpendCreated.Hook(func(spendID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendCreated: %s\n", n.Name, engineName, spendID) }) - events.ConflictDAG.ConflictEvicted.Hook(func(conflictID iotago.TransactionID) { - fmt.Printf("%s > [%s] ConflictDAG.ConflictEvicted: %s\n", n.Name, engineName, conflictID) + events.SpendDAG.SpendEvicted.Hook(func(spendID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendEvicted: %s\n", n.Name, engineName, spendID) }) - events.ConflictDAG.ConflictRejected.Hook(func(conflictID iotago.TransactionID) { - fmt.Printf("%s > [%s] ConflictDAG.ConflictRejected: %s\n", n.Name, engineName, conflictID) + events.SpendDAG.SpendRejected.Hook(func(spendID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendRejected: %s\n", n.Name, engineName, spendID) }) - events.ConflictDAG.ConflictAccepted.Hook(func(conflictID iotago.TransactionID) { - fmt.Printf("%s > [%s] ConflictDAG.ConflictAccepted: %s\n", n.Name, engineName, conflictID) + events.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendAccepted: %s\n", n.Name, engineName, spendID) }) instance.Ledger.OnTransactionAttached(func(transactionMetadata mempool.TransactionMetadata) { diff --git a/pkg/testsuite/conflicts.go b/pkg/testsuite/spends.go similarity index 73% rename from pkg/testsuite/conflicts.go rename to pkg/testsuite/spends.go index b1fa92989..e8fd8163b 100644 --- a/pkg/testsuite/conflicts.go +++ b/pkg/testsuite/spends.go @@ -7,13 +7,13 @@ import ( "github.com/iotaledger/iota-core/pkg/testsuite/mock" ) -func (t *TestSuite) AssertConflictsInCacheAcceptanceState(expectedConflictAliases []string, expectedState acceptance.State, nodes ...*mock.Node) { +func (t *TestSuite) AssertSpendsInCacheAcceptanceState(expectedConflictAliases []string, expectedState acceptance.State, nodes ...*mock.Node) { mustNodes(nodes) for _, node := range nodes { for _, conflictAlias := range expectedConflictAliases { t.Eventually(func() error { - acceptanceState := node.Protocol.MainEngineInstance().Ledger.ConflictDAG().AcceptanceState(ds.NewSet(t.DefaultWallet().TransactionID(conflictAlias))) + acceptanceState := node.Protocol.MainEngineInstance().Ledger.SpendDAG().AcceptanceState(ds.NewSet(t.DefaultWallet().TransactionID(conflictAlias))) if acceptanceState != expectedState { return ierrors.Errorf("assertTransactionsInCacheWithFunc: %s: conflict %s is %s, but expected %s", node.Name, conflictAlias, acceptanceState, expectedState) diff --git a/pkg/testsuite/transactions.go b/pkg/testsuite/transactions.go index 23d2eb885..79217d775 100644 --- a/pkg/testsuite/transactions.go +++ b/pkg/testsuite/transactions.go @@ -141,15 +141,15 @@ func (t *TestSuite) AssertTransactionInCacheConflicts(transactionConflicts map[* return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: block %s does not exist", node.Name, transactionID) } - expectedConflictIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) - actualConflictIDs := transactionFromCache.ConflictIDs() + expectedSpendIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) + actualSpendIDs := transactionFromCache.SpendIDs() - if expectedConflictIDs.Size() != actualConflictIDs.Size() { - return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s conflict count incorrect: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedConflictIDs, actualConflictIDs) + if expectedSpendIDs.Size() != actualSpendIDs.Size() { + return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s conflict count incorrect: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedSpendIDs, actualSpendIDs) } - if !actualConflictIDs.HasAll(expectedConflictIDs) { - return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedConflictIDs, actualConflictIDs) + if !actualSpendIDs.HasAll(expectedSpendIDs) { + return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedSpendIDs, actualSpendIDs) } return nil From 02fb2f7e96c0a5a640a5f356e37e4c071c1a9412 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 8 Nov 2023 21:29:21 +0800 Subject: [PATCH 04/18] Hook to TransactionMetadata OnRejected to capture conflicting reason correctly --- pkg/retainer/retainer/retainer.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/retainer/retainer/retainer.go b/pkg/retainer/retainer/retainer.go index ebd061047..8e110c82b 100644 --- a/pkg/retainer/retainer/retainer.go +++ b/pkg/retainer/retainer/retainer.go @@ -87,14 +87,6 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] { r.RetainBlockFailure(b.ID(), apimodels.BlockFailureDroppedDueToCongestion) }) - e.Events.SpendDAG.SpendRejected.Hook(func(spendID iotago.TransactionID) { - txMetadata, exist := e.Ledger.MemPool().TransactionMetadata(spendID) - if !exist { - return - } - r.RetainTransactionFailure(txMetadata.EarliestIncludedAttachment(), iotago.ErrTxConflicting) - }, asyncOpt) - e.HookInitialized(func() { e.Ledger.MemPool().OnSignedTransactionAttached(func(signedTransactionMetadata mempool.SignedTransactionMetadata) { attachment := signedTransactionMetadata.Attachments()[0] @@ -116,6 +108,10 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] { r.RetainTransactionFailure(attachment, err) }) + transactionMetadata.OnRejected(func() { + r.RetainTransactionFailure(attachment, iotago.ErrTxConflicting) + }) + transactionMetadata.OnAccepted(func() { attachmentID := transactionMetadata.EarliestIncludedAttachment() if slot := attachmentID.Slot(); slot > 0 { From e6dd3083e1042e44172a48098d1a1bed1e390228 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 9 Nov 2023 10:38:48 +0800 Subject: [PATCH 05/18] Remove TestAllWithoutForkingEverything --- .../engine/mempool/v1/mempool_test.go | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/pkg/protocol/engine/mempool/v1/mempool_test.go b/pkg/protocol/engine/mempool/v1/mempool_test.go index 0f9afcdf0..fa95e3576 100644 --- a/pkg/protocol/engine/mempool/v1/mempool_test.go +++ b/pkg/protocol/engine/mempool/v1/mempool_test.go @@ -25,12 +25,8 @@ import ( "github.com/iotaledger/iota.go/v4/tpkg" ) -func TestMemPoolV1_InterfaceWithoutForkingEverything(t *testing.T) { - mempooltests.TestAllWithoutForkingEverything(t, newTestFramework) -} - func TestMemPoolV1_InterfaceWithForkingEverything(t *testing.T) { - mempooltests.TestAllWithForkingEverything(t, newForkingTestFramework) + mempooltests.TestAllWithForkingEverything(t, newTestFramework) } func TestMempoolV1_ResourceCleanup(t *testing.T) { @@ -155,18 +151,3 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework { return ledgerState.ResolveOutputState(reference) }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers) } - -func newForkingTestFramework(t *testing.T) *mempooltests.TestFramework { - workers := workerpool.NewGroup(t.Name()) - - ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0)) - spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) - - mutationsFunc := func(index iotago.SlotIndex) (kvstore.KVStore, error) { - return mapdb.NewMapDB(), nil - } - - return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { - return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers) -} From 2500e792ee0c2a5caf6c61cb2a92680514c2c041 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 9 Nov 2023 14:18:33 +0800 Subject: [PATCH 06/18] Remove TestAllWithoutForkingEverything --- pkg/protocol/engine/mempool/tests/tests.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pkg/protocol/engine/mempool/tests/tests.go b/pkg/protocol/engine/mempool/tests/tests.go index 4431a2298..721122605 100644 --- a/pkg/protocol/engine/mempool/tests/tests.go +++ b/pkg/protocol/engine/mempool/tests/tests.go @@ -18,22 +18,6 @@ const ( TestMemoryReleaseMaxMemoryIncreaseFactor = 1.20 ) -func TestAllWithoutForkingEverything(t *testing.T, frameworkProvider func(*testing.T) *TestFramework) { - for testName, testCase := range map[string]func(*testing.T, *TestFramework){ - "TestProcessTransaction": TestProcessTransaction, - "TestProcessTransactionsOutOfOrder": TestProcessTransactionsOutOfOrder, - "TestSetInclusionSlot": TestSetInclusionSlot, - "TestSetTransactionOrphanage": TestSetTransactionOrphanage, - "TestStateDiff": TestStateDiff, - "TestMemoryRelease": TestMemoryRelease, - "TestInvalidTransaction": TestInvalidTransaction, - "TestStoreAttachmentInEvictedSlot": TestStoreAttachmentInEvictedSlot, - "TestConflictPropagationForkOnDoubleSpend": TestConflictPropagationForkOnDoubleSpend, - } { - t.Run(testName, func(t *testing.T) { testCase(t, frameworkProvider(t)) }) - } -} - func TestAllWithForkingEverything(t *testing.T, frameworkProvider func(*testing.T) *TestFramework) { for testName, testCase := range map[string]func(*testing.T, *TestFramework){ "TestConflictPropagationForkAll": TestConflictPropagationForkAll, From 0c78f572e5c1b4aefff3fa3bf63dc65c785eef0c Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 9 Nov 2023 14:45:03 +0800 Subject: [PATCH 07/18] Rename variable spenddag to spendDAG --- .../mempool/spenddag/tests/framework.go | 16 ++++----- .../engine/mempool/spenddag/tests/tests.go | 34 +++++++++---------- .../engine/mempool/tests/testframework.go | 6 ++-- pkg/protocol/engine/mempool/tests/tests.go | 16 ++++----- pkg/protocol/engine/mempool/v1/mempool.go | 18 +++++----- .../engine/mempool/v1/mempool_test.go | 10 +++--- .../engine/tipselection/v1/tip_selection.go | 16 ++++----- 7 files changed, 58 insertions(+), 58 deletions(-) diff --git a/pkg/protocol/engine/mempool/spenddag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go index 1cb2227ce..58bfd21e6 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -10,16 +10,16 @@ import ( iotago "github.com/iotaledger/iota.go/v4" ) -// Framework is a test framework for the spenddag that allows to easily create and manipulate the DAG and its +// Framework is a test framework for the SpendDAG that allows to easily create and manipulate the DAG and its // validators using human-readable aliases instead of actual IDs. type Framework struct { - // Instance is the spenddag instance that is used in the tests. + // Instance is the SpendDAG instance that is used in the tests. Instance spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank] // Accounts is the AccountsTestFramework that is used in the tests. Accounts *AccountsTestFramework - // Assert provides a set of assertions that can be used to verify the state of the spenddag. + // Assert provides a set of assertions that can be used to verify the state of the SpendDAG. Assert *Assertions // SpendID is a function that is used to translate a string alias into a (deterministic) iotago.TransactionID. @@ -35,13 +35,13 @@ type Framework struct { // NewFramework creates a new instance of the Framework. func NewFramework( t *testing.T, - spenddag spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank], + spendDAG spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank], validators *AccountsTestFramework, spendID func(string) iotago.TransactionID, resourceID func(string) iotago.OutputID, ) *Framework { f := &Framework{ - Instance: spenddag, + Instance: spendDAG, Accounts: validators, SpendID: spendID, ResourceID: resourceID, @@ -67,8 +67,8 @@ func (f *Framework) UpdateSpendParents(conflictAlias string, addedParentIDs []st // LikedInstead returns the set of conflicts that are liked instead of the given conflicts. func (f *Framework) LikedInstead(conflictAliases ...string) ds.Set[iotago.TransactionID] { var result ds.Set[iotago.TransactionID] - _ = f.Instance.ReadConsistent(func(spenddag spenddag.ReadLockedSpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) error { - result = spenddag.LikedInstead(f.SpendIDs(conflictAliases...)) + _ = f.Instance.ReadConsistent(func(spendDAG spenddag.ReadLockedSpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) error { + result = spendDAG.LikedInstead(f.SpendIDs(conflictAliases...)) return nil }) @@ -86,7 +86,7 @@ func (f *Framework) CastVotes(nodeAlias string, voteRank int, conflictAliases .. return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpendIDs(conflictAliases...)) } -// EvictConflict evicts given conflict from the spenddag. +// EvictConflict evicts given conflict from the SpendDAG. func (f *Framework) EvictSpend(conflictAlias string) { f.Instance.EvictSpend(f.SpendID(conflictAlias)) } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go index 38ad91774..59e97adfc 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -14,24 +14,24 @@ import ( func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { for testName, testCase := range map[string]func(*testing.T, *Framework){ - "CreateConflict": CreateSpend, - "ExistingConflictJoinsConflictSets": ExistingConflictJoinsSpendSets, - "JoinConflictSetTwice": JoinConflictSetTwice, - "UpdateConflictParents": UpdateSpendParents, - "LikedInstead": LikedInstead, - "CreateConflictWithoutMembers": CreateConflictWithoutMembers, - "ConflictAcceptance": ConflictAcceptance, - "CastVotes": CastVotes, - "CastVotes_VoteRank": CastVotesVoteRank, - "CastVotesAcceptance": CastVotesAcceptance, - "EvictAcceptedConflict": EvictAcceptedConflict, - "EvictRejectedConflict": EvictRejectedConflict, + "CreateSpend": CreateSpend, + "ExistingSpendJoinsConflictSets": ExistingSpendJoinsConflictSets, + "JoinConflictSetTwice": JoinConflictSetTwice, + "UpdateSpendParents": UpdateSpendParents, + "LikedInstead": LikedInstead, + "CreateSpendWithoutMembers": CreateSpendWithoutMembers, + "SpendAcceptance": SpendAcceptance, + "CastVotes": CastVotes, + "CastVotes_VoteRank": CastVotesVoteRank, + "CastVotesAcceptance": CastVotesAcceptance, + "EvictAcceptedSpend": EvictAcceptedSpend, + "EvictRejectedSpend": EvictRejectedSpend, } { t.Run(testName, func(t *testing.T) { testCase(t, frameworkProvider(t)) }) } } -func ExistingConflictJoinsSpendSets(t *testing.T, tf *Framework) { +func ExistingSpendJoinsConflictSets(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") @@ -91,7 +91,7 @@ func CreateSpend(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict4", "conflict1") } -func CreateConflictWithoutMembers(t *testing.T, tf *Framework) { +func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID1") tf.Accounts.CreateID("nodeID2") tf.Accounts.CreateID("nodeID3") @@ -151,7 +151,7 @@ func LikedInstead(t *testing.T, tf *Framework) { tf.Assert.LikedInstead([]string{"conflict1", "conflict2", "conflict3", "conflict4"}, "conflict1", "conflict4") } -func ConflictAcceptance(t *testing.T, tf *Framework) { +func SpendAcceptance(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID1") tf.Accounts.CreateID("nodeID2") tf.Accounts.CreateID("nodeID3") @@ -353,7 +353,7 @@ func JoinConflictSetTwice(t *testing.T, tf *Framework) { tf.Assert.ConflictSets("conflict1", "resource1", "resource2", "resource3", "resource4") } -func EvictAcceptedConflict(t *testing.T, tf *Framework) { +func EvictAcceptedSpend(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID1") tf.Accounts.CreateID("nodeID2") tf.Accounts.CreateID("nodeID3") @@ -414,7 +414,7 @@ func EvictAcceptedConflict(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict6") } -func EvictRejectedConflict(t *testing.T, tf *Framework) { +func EvictRejectedSpend(t *testing.T, tf *Framework) { conflictEvictedEventCount := 0 tf.Instance.Events().SpendEvicted.Hook(func(id iotago.TransactionID) { conflictEvictedEventCount++ diff --git a/pkg/protocol/engine/mempool/tests/testframework.go b/pkg/protocol/engine/mempool/tests/testframework.go index 66f475268..d8e5de00a 100644 --- a/pkg/protocol/engine/mempool/tests/testframework.go +++ b/pkg/protocol/engine/mempool/tests/testframework.go @@ -20,7 +20,7 @@ import ( type TestFramework struct { Instance mempool.MemPool[vote.MockedRank] - spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank] + SpendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank] referencesByAlias map[string]mempool.StateReference stateIDByAlias map[string]mempool.StateID @@ -35,10 +35,10 @@ type TestFramework struct { mutex syncutils.RWMutex } -func NewTestFramework(test *testing.T, instance mempool.MemPool[vote.MockedRank], spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank], ledgerState *ledgertests.MockStateResolver, workers *workerpool.Group) *TestFramework { +func NewTestFramework(test *testing.T, instance mempool.MemPool[vote.MockedRank], spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, vote.MockedRank], ledgerState *ledgertests.MockStateResolver, workers *workerpool.Group) *TestFramework { t := &TestFramework{ Instance: instance, - spenddag: spenddag, + SpendDAG: spendDAG, referencesByAlias: make(map[string]mempool.StateReference), stateIDByAlias: make(map[string]mempool.StateID), signedTransactionByAlias: make(map[string]mempool.SignedTransaction), diff --git a/pkg/protocol/engine/mempool/tests/tests.go b/pkg/protocol/engine/mempool/tests/tests.go index 721122605..785c9501a 100644 --- a/pkg/protocol/engine/mempool/tests/tests.go +++ b/pkg/protocol/engine/mempool/tests/tests.go @@ -113,12 +113,12 @@ func TestProcessTransactionWithReadOnlyInputs(t *testing.T, tf *TestFramework) { return nil }) - conflictSetsTx1, exists := tf.spenddag.ConflictSets(tf.TransactionID("tx1")) + conflictSetsTx1, exists := tf.SpendDAG.ConflictSets(tf.TransactionID("tx1")) require.True(t, exists) require.Equal(t, 1, conflictSetsTx1.Size()) require.True(t, conflictSetsTx1.Has(tf.StateID("genesis"))) - conflictSetsTx2, exists := tf.spenddag.ConflictSets(tf.TransactionID("tx2")) + conflictSetsTx2, exists := tf.SpendDAG.ConflictSets(tf.TransactionID("tx2")) require.True(t, exists) require.Equal(t, 1, conflictSetsTx2.Size()) require.True(t, conflictSetsTx2.Has(tf.StateID("tx1:0"))) @@ -300,9 +300,9 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { require.False(t, lo.Return2(tx2Metadata.OrphanedSlot())) require.False(t, lo.Return2(tx3Metadata.OrphanedSlot())) - require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx1")))) - require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx2")))) - require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx3")))) + require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx1")))) + require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx2")))) + require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx3")))) tf.Instance.Evict(2) @@ -311,9 +311,9 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { require.True(t, lo.Return2(tx3Metadata.OrphanedSlot())) // All conflicts still exist, as they are kept around until MCA - require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx1")))) - require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx2")))) - require.True(t, lo.Return2(tf.spenddag.ConflictSets(tf.TransactionID("tx3")))) + require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx1")))) + require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx2")))) + require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx3")))) tf.RequireTransactionsEvicted(map[string]bool{"tx1": false, "tx2": false, "tx3": false}) diff --git a/pkg/protocol/engine/mempool/v1/mempool.go b/pkg/protocol/engine/mempool/v1/mempool.go index 4b00091a5..0dc3d9d1a 100644 --- a/pkg/protocol/engine/mempool/v1/mempool.go +++ b/pkg/protocol/engine/mempool/v1/mempool.go @@ -53,8 +53,8 @@ type MemPool[VoteRank spenddag.VoteRankType[VoteRank]] struct { // invalidate blocks that try to spend them. delayedOutputStateEviction *shrinkingmap.ShrinkingMap[iotago.SlotIndex, *shrinkingmap.ShrinkingMap[iotago.Identifier, *StateMetadata]] - // spenddag is the DAG that is used to keep track of the conflicts between transactions. - spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, VoteRank] + // spendDAG is the DAG that is used to keep track of the conflicts between transactions. + spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, VoteRank] apiProvider iotago.APIProvider @@ -80,7 +80,7 @@ func New[VoteRank spenddag.VoteRankType[VoteRank]]( stateResolver mempool.StateResolver, mutationsFunc func(iotago.SlotIndex) (kvstore.KVStore, error), workers *workerpool.Group, - spenddag spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, VoteRank], + spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, VoteRank], apiProvider iotago.APIProvider, errorHandler func(error), opts ...options.Option[MemPool[VoteRank]], @@ -97,7 +97,7 @@ func New[VoteRank spenddag.VoteRankType[VoteRank]]( executionWorkers: workers.CreatePool("executionWorkers", workerpool.WithWorkerCount(1)), delayedTransactionEviction: shrinkingmap.New[iotago.SlotIndex, ds.Set[iotago.TransactionID]](), delayedOutputStateEviction: shrinkingmap.New[iotago.SlotIndex, *shrinkingmap.ShrinkingMap[iotago.Identifier, *StateMetadata]](), - spenddag: spenddag, + spendDAG: spendDAG, apiProvider: apiProvider, errorHandler: errorHandler, signedTransactionAttached: event.New1[mempool.SignedTransactionMetadata](), @@ -334,7 +334,7 @@ func (m *MemPool[VoteRank]) bookTransaction(transaction *TransactionMetadata) { func (m *MemPool[VoteRank]) forkTransaction(transactionMetadata *TransactionMetadata, resourceIDs ds.Set[mempool.StateID]) { transactionMetadata.conflicting.Trigger() - if err := m.spenddag.UpdateConflictingResources(transactionMetadata.ID(), resourceIDs); err != nil { + if err := m.spendDAG.UpdateConflictingResources(transactionMetadata.ID(), resourceIDs); err != nil { // this is a hack, as with a reactive.Variable we cannot set it to 0 and still check if it was orphaned. transactionMetadata.orphanedSlot.Set(1) @@ -426,7 +426,7 @@ func (m *MemPool[VoteRank]) updateStateDiffs(transaction *TransactionMetadata, p } func (m *MemPool[VoteRank]) setup() { - m.spenddag.Events().SpendAccepted.Hook(func(id iotago.TransactionID) { + m.spendDAG.Events().SpendAccepted.Hook(func(id iotago.TransactionID) { if transaction, exists := m.cachedTransactions.Get(id); exists { transaction.setConflictAccepted() } @@ -449,10 +449,10 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { }) transaction.OnConflicting(func() { - m.spenddag.CreateSpend(transaction.ID()) + m.spendDAG.CreateSpend(transaction.ID()) unsubscribe := transaction.parentSpendIDs.OnUpdate(func(appliedMutations ds.SetMutations[iotago.TransactionID]) { - if err := m.spenddag.UpdateSpendParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { + if err := m.spendDAG.UpdateSpendParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { panic(err) } }) @@ -460,7 +460,7 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { transaction.OnEvicted(func() { unsubscribe() - m.spenddag.EvictSpend(transaction.ID()) + m.spendDAG.EvictSpend(transaction.ID()) }) }) diff --git a/pkg/protocol/engine/mempool/v1/mempool_test.go b/pkg/protocol/engine/mempool/v1/mempool_test.go index fa95e3576..e11b1eab9 100644 --- a/pkg/protocol/engine/mempool/v1/mempool_test.go +++ b/pkg/protocol/engine/mempool/v1/mempool_test.go @@ -37,12 +37,12 @@ func TestMempoolV1_ResourceCleanup(t *testing.T) { } ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0)) - spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](func() int { return 0 }) + spendDAG := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](func() int { return 0 }) memPoolInstance := New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}) + }, mutationsFunc, workers, spendDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}) - tf := mempooltests.NewTestFramework(t, memPoolInstance, spenddag, ledgerState, workers) + tf := mempooltests.NewTestFramework(t, memPoolInstance, spendDAG, ledgerState, workers) issueTransactions := func(startIndex, transactionCount int, prevStateAlias string) (int, string) { index := startIndex @@ -141,7 +141,7 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework { workers := workerpool.NewGroup(t.Name()) ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0)) - spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) + spendDAG := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount) mutationsFunc := func(index iotago.SlotIndex) (kvstore.KVStore, error) { return mapdb.NewMapDB(), nil @@ -149,5 +149,5 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework { return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] { return ledgerState.ResolveOutputState(reference) - }, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers) + }, mutationsFunc, workers, spendDAG, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spendDAG, ledgerState, workers) } diff --git a/pkg/protocol/engine/tipselection/v1/tip_selection.go b/pkg/protocol/engine/tipselection/v1/tip_selection.go index fbc7ab391..4489f4fba 100644 --- a/pkg/protocol/engine/tipselection/v1/tip_selection.go +++ b/pkg/protocol/engine/tipselection/v1/tip_selection.go @@ -26,8 +26,8 @@ type TipSelection struct { // tipManager is the TipManager that is used to access the tip related metadata. tipManager tipmanager.TipManager - // conflictDAG is the ConflictDAG that is used to track conflicts. - conflictDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] + // spendDAG is the SpendDAG that is used to track spends. + spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] // rootBlocks is a function that returns the current root blocks. rootBlocks func() iotago.BlockIDs @@ -78,9 +78,9 @@ func New(opts ...options.Option[TipSelection]) *TipSelection { // // This method is separated from the constructor so the TipSelection can be initialized lazily after all dependencies // are available. -func (t *TipSelection) Construct(tipManager tipmanager.TipManager, conflictDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank], transactionMetadataRetriever func(iotago.TransactionID) (mempool.TransactionMetadata, bool), rootBlocksRetriever func() iotago.BlockIDs, livenessThresholdFunc func(tipmanager.TipMetadata) time.Duration) *TipSelection { +func (t *TipSelection) Construct(tipManager tipmanager.TipManager, spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank], transactionMetadataRetriever func(iotago.TransactionID) (mempool.TransactionMetadata, bool), rootBlocksRetriever func() iotago.BlockIDs, livenessThresholdFunc func(tipmanager.TipMetadata) time.Duration) *TipSelection { t.tipManager = tipManager - t.conflictDAG = conflictDAG + t.spendDAG = spendDAG t.transactionMetadata = transactionMetadataRetriever t.rootBlocks = rootBlocksRetriever t.livenessThreshold = livenessThresholdFunc @@ -103,7 +103,7 @@ func (t *TipSelection) SelectTips(amount int) (references model.ParentReferences references = make(model.ParentReferences) strongParents := ds.NewSet[iotago.BlockID]() shallowLikesParents := ds.NewSet[iotago.BlockID]() - _ = t.conflictDAG.ReadConsistent(func(_ spenddag.ReadLockedSpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank]) error { + _ = t.spendDAG.ReadConsistent(func(_ spenddag.ReadLockedSpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank]) error { previousLikedInsteadConflicts := ds.NewSet[iotago.TransactionID]() if t.collectReferences(references, iotago.StrongParentType, t.tipManager.StrongTips, func(tip tipmanager.TipMetadata) { @@ -177,7 +177,7 @@ func (t *TipSelection) classifyTip(tipMetadata tipmanager.TipMetadata) { // likedInsteadReferences returns the liked instead references that are required to be able to reference the given tip. func (t *TipSelection) likedInsteadReferences(likedConflicts ds.Set[iotago.TransactionID], tipMetadata tipmanager.TipMetadata) (references []iotago.BlockID, updatedLikedConflicts ds.Set[iotago.TransactionID], err error) { necessaryReferences := make(map[iotago.TransactionID]iotago.BlockID) - if err = t.conflictDAG.LikedInstead(tipMetadata.Block().SpendIDs()).ForEach(func(likedSpendID iotago.TransactionID) error { + if err = t.spendDAG.LikedInstead(tipMetadata.Block().SpendIDs()).ForEach(func(likedSpendID iotago.TransactionID) error { transactionMetadata, exists := t.transactionMetadata(likedSpendID) if !exists { return ierrors.Errorf("transaction required for liked instead reference (%s) not found in mem-pool", likedSpendID) @@ -233,12 +233,12 @@ func (t *TipSelection) collectReferences(references model.ParentReferences, pare // isValidStrongTip checks if the given block is a valid strong tip. func (t *TipSelection) isValidStrongTip(block *blocks.Block) bool { - return !t.conflictDAG.AcceptanceState(block.SpendIDs()).IsRejected() + return !t.spendDAG.AcceptanceState(block.SpendIDs()).IsRejected() } // isValidWeakTip checks if the given block is a valid weak tip. func (t *TipSelection) isValidWeakTip(block *blocks.Block) bool { - return t.conflictDAG.LikedInstead(block.PayloadSpendIDs()).Size() == 0 + return t.spendDAG.LikedInstead(block.PayloadSpendIDs()).Size() == 0 } // triggerLivenessThreshold triggers the liveness threshold for all tips that have reached the given threshold. From 2857d119a62b897453cfe6be828b8ade0bcd8258 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 9 Nov 2023 15:06:07 +0800 Subject: [PATCH 08/18] Rename conflict to spend --- pkg/core/acceptance/state.go | 6 +- .../engine/booker/inmemorybooker/booker.go | 16 +- .../engine/mempool/spenddag/constraints.go | 2 +- .../engine/mempool/spenddag/errors.go | 2 +- .../engine/mempool/spenddag/spenddag.go | 2 +- .../spenddag/spenddagv1/sorted_spends.go | 8 +- .../spenddag/spenddagv1/sorted_spends_test.go | 158 +++--- .../mempool/spenddag/spenddagv1/spend.go | 86 +-- .../mempool/spenddag/spenddagv1/spend_test.go | 506 +++++++++--------- .../mempool/spenddag/spenddagv1/spenddag.go | 4 +- .../spenddag/spenddagv1/spenddag_test.go | 8 +- .../mempool/spenddag/spenddagv1/utils.go | 2 +- .../mempool/spenddag/tests/assertions.go | 66 +-- .../mempool/spenddag/tests/framework.go | 28 +- .../engine/mempool/spenddag/tests/tests.go | 108 ++-- .../engine/mempool/tests/testframework.go | 10 +- .../engine/mempool/v1/inclusion_flags.go | 2 +- 17 files changed, 507 insertions(+), 507 deletions(-) diff --git a/pkg/core/acceptance/state.go b/pkg/core/acceptance/state.go index f87fd3381..9bb7d0c2f 100644 --- a/pkg/core/acceptance/state.go +++ b/pkg/core/acceptance/state.go @@ -5,13 +5,13 @@ import ( ) const ( - // Pending is the state of pending conflicts. + // Pending is the state of pending spends. Pending State = iota - // Accepted is the state of accepted conflicts. + // Accepted is the state of accepted spends. Accepted - // Rejected is the state of rejected conflicts. + // Rejected is the state of rejected spends. Rejected ) diff --git a/pkg/protocol/engine/booker/inmemorybooker/booker.go b/pkg/protocol/engine/booker/inmemorybooker/booker.go index 562f50e59..1086e5815 100644 --- a/pkg/protocol/engine/booker/inmemorybooker/booker.go +++ b/pkg/protocol/engine/booker/inmemorybooker/booker.go @@ -157,10 +157,10 @@ func (b *Booker) setRetainBlockFailureFunc(retainBlockFailure func(iotago.BlockI func (b *Booker) book(block *blocks.Block) error { spendsToInherit, err := b.inheritSpends(block) if err != nil { - return ierrors.Wrapf(err, "failed to inherit conflicts for block %s", block.ID()) + return ierrors.Wrapf(err, "failed to inherit spends for block %s", block.ID()) } - // The block does not inherit conflicts that have been orphaned with respect to its commitment. + // The block does not inherit spends that have been orphaned with respect to its commitment. for it := spendsToInherit.Iterator(); it.HasNext(); { spendID := it.Next() @@ -170,7 +170,7 @@ func (b *Booker) book(block *blocks.Block) error { } if orphanedSlot, orphaned := txMetadata.OrphanedSlot(); orphaned && orphanedSlot <= block.SlotCommitmentID().Slot() { - // Merge-to-master orphaned conflicts. + // Merge-to-master orphaned spends. spendsToInherit.Delete(spendID) } } @@ -206,19 +206,19 @@ func (b *Booker) inheritSpends(block *blocks.Block) (spendIDs ds.Set[iotago.Tran } spendIDsToInherit.AddAll(parentBlock.PayloadSpendIDs()) - // remove all conflicting conflicts from spendIDsToInherit + // remove all conflicting spends from spendIDsToInherit for _, spendID := range parentBlock.PayloadSpendIDs().ToSlice() { - if conflictingConflicts, exists := b.spendDAG.ConflictingSpends(spendID); exists { - spendIDsToInherit.DeleteAll(b.spendDAG.FutureCone(conflictingConflicts)) + if conflictingSpends, exists := b.spendDAG.ConflictingSpends(spendID); exists { + spendIDsToInherit.DeleteAll(b.spendDAG.FutureCone(conflictingSpends)) } } } } - // Add all conflicts from the block's payload itself. + // Add all spends from the block's payload itself. // Forking on booking: we determine the block's PayloadSpendIDs by treating each TX as a conflict. spendIDsToInherit.AddAll(block.PayloadSpendIDs()) - // Only inherit conflicts that are not yet accepted (aka merge to master). + // Only inherit spends that are not yet accepted (aka merge to master). return b.spendDAG.UnacceptedSpends(spendIDsToInherit), nil } diff --git a/pkg/protocol/engine/mempool/spenddag/constraints.go b/pkg/protocol/engine/mempool/spenddag/constraints.go index 2c5503c79..f1543f636 100644 --- a/pkg/protocol/engine/mempool/spenddag/constraints.go +++ b/pkg/protocol/engine/mempool/spenddag/constraints.go @@ -4,7 +4,7 @@ import ( "github.com/iotaledger/hive.go/constraints" ) -// IDType is the constraint for the identifier of a conflict or a resource. +// IDType is the constraint for the identifier of a spend or a resource. type IDType interface { // comparable is a built-in constraint that ensures that the type can be used as a map key. comparable diff --git a/pkg/protocol/engine/mempool/spenddag/errors.go b/pkg/protocol/engine/mempool/spenddag/errors.go index d2574864a..beb901f92 100644 --- a/pkg/protocol/engine/mempool/spenddag/errors.go +++ b/pkg/protocol/engine/mempool/spenddag/errors.go @@ -4,7 +4,7 @@ import "github.com/iotaledger/hive.go/ierrors" var ( ErrExpected = ierrors.New("expected error") - ErrAlreadyPartOfConflictSet = ierrors.New("conflict already part of ConflictSet") + ErrAlreadyPartOfConflictSet = ierrors.New("spend already part of ConflictSet") ErrEntityEvicted = ierrors.New("tried to operate on evicted entity") ErrFatal = ierrors.New("fatal error") ) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddag.go index a0b697801..74d0eda1a 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddag.go @@ -37,7 +37,7 @@ type SpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] inter type ReadLockedSpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) - ConflictingSpends(spendID SpendID) (conflictingConflicts ds.Set[SpendID], exists bool) + ConflictingSpends(spendID SpendID) (conflictingSpends ds.Set[SpendID], exists bool) AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go index ed1b74983..359c25be8 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go @@ -80,7 +80,7 @@ func NewSortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.Vote } // Add adds the given Spend to the SortedSpends. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(conflict *Spend[SpendID, ResourceID, VoteRank]) bool { +func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(spend *Spend[SpendID, ResourceID, VoteRank]) bool { s.mutex.Lock() defer s.mutex.Unlock() @@ -88,8 +88,8 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(conflict *Spend[SpendI return false } - newMember, isNew := s.members.GetOrCreate(conflict.ID, func() *sortedSpend[SpendID, ResourceID, VoteRank] { - return newSortedSpend(s, conflict) + newMember, isNew := s.members.GetOrCreate(spend.ID, func() *sortedSpend[SpendID, ResourceID, VoteRank] { + return newSortedSpend(s, spend) }) if !isNew { return false @@ -128,7 +128,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(conflict *Spend[SpendI if newMember.IsPreferred() && newMember.Compare(s.heaviestPreferredMember) == weight.Heavier { s.heaviestPreferredMember = newMember - s.owner.setPreferredInstead(conflict) + s.owner.setPreferredInstead(spend) } return true diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go index a762d422b..1bdaef281 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go @@ -18,11 +18,11 @@ import ( iotago "github.com/iotaledger/iota.go/v4" ) -type SortedConflictSet = *SortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +type SortedSpendSet = *SortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -var NewSortedConflictSet = NewSortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +var NewSortedSpendSet = NewSortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func TestSortedConflict(t *testing.T) { +func TestSortedSpend(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -30,54 +30,54 @@ func TestSortedConflict(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestSpend(transactionID("conflict1"), nil, nil, weight.New().AddCumulativeWeight(12), pendingTasks, thresholdProvider) - conflict1.setAcceptanceState(acceptance.Rejected) - conflict2 := NewTestSpend(transactionID("conflict2"), nil, nil, weight.New().AddCumulativeWeight(10), pendingTasks, thresholdProvider) - conflict3 := NewTestSpend(transactionID("conflict3"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) - conflict3.setAcceptanceState(acceptance.Accepted) - conflict4 := NewTestSpend(transactionID("conflict4"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) - conflict4.setAcceptanceState(acceptance.Rejected) - conflict5 := NewTestSpend(transactionID("conflict5"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) - conflict6 := NewTestSpend(transactionID("conflict6"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) - conflict6.setAcceptanceState(acceptance.Accepted) - - sortedConflicts := NewSortedConflictSet(conflict1, pendingTasks) + spend1 := NewTestSpend(transactionID("spend1"), nil, nil, weight.New().AddCumulativeWeight(12), pendingTasks, thresholdProvider) + spend1.setAcceptanceState(acceptance.Rejected) + spend2 := NewTestSpend(transactionID("spend2"), nil, nil, weight.New().AddCumulativeWeight(10), pendingTasks, thresholdProvider) + spend3 := NewTestSpend(transactionID("spend3"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) + spend3.setAcceptanceState(acceptance.Accepted) + spend4 := NewTestSpend(transactionID("spend4"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) + spend4.setAcceptanceState(acceptance.Rejected) + spend5 := NewTestSpend(transactionID("spend5"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) + spend6 := NewTestSpend(transactionID("spend6"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) + spend6.setAcceptanceState(acceptance.Accepted) + + sortedSpends := NewSortedSpendSet(spend1, pendingTasks) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict1:0") + assertSortedSpendsOrder(t, sortedSpends, "spend1:0") - sortedConflicts.Add(conflict2) + sortedSpends.Add(spend2) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict2:0", "conflict1:0") + assertSortedSpendsOrder(t, sortedSpends, "spend2:0", "spend1:0") - sortedConflicts.Add(conflict3) + sortedSpends.Add(spend3) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict3:0", "conflict2:0", "conflict1:0") + assertSortedSpendsOrder(t, sortedSpends, "spend3:0", "spend2:0", "spend1:0") - sortedConflicts.Add(conflict4) + sortedSpends.Add(spend4) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict3:0", "conflict2:0", "conflict1:0", "conflict4:0") + assertSortedSpendsOrder(t, sortedSpends, "spend3:0", "spend2:0", "spend1:0", "spend4:0") - sortedConflicts.Add(conflict5) + sortedSpends.Add(spend5) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict3:0", "conflict5:0", "conflict2:0", "conflict1:0", "conflict4:0") + assertSortedSpendsOrder(t, sortedSpends, "spend3:0", "spend5:0", "spend2:0", "spend1:0", "spend4:0") - sortedConflicts.Add(conflict6) + sortedSpends.Add(spend6) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict6:0", "conflict3:0", "conflict5:0", "conflict2:0", "conflict1:0", "conflict4:0") + assertSortedSpendsOrder(t, sortedSpends, "spend6:0", "spend3:0", "spend5:0", "spend2:0", "spend1:0", "spend4:0") - conflict2.Weight.AddCumulativeWeight(3) - require.Equal(t, int64(13), conflict2.Weight.Value().CumulativeWeight()) + spend2.Weight.AddCumulativeWeight(3) + require.Equal(t, int64(13), spend2.Weight.Value().CumulativeWeight()) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict6:0", "conflict3:0", "conflict2:0", "conflict5:0", "conflict1:0", "conflict4:0") + assertSortedSpendsOrder(t, sortedSpends, "spend6:0", "spend3:0", "spend2:0", "spend5:0", "spend1:0", "spend4:0") - conflict2.Weight.RemoveCumulativeWeight(3) - require.Equal(t, int64(10), conflict2.Weight.Value().CumulativeWeight()) + spend2.Weight.RemoveCumulativeWeight(3) + require.Equal(t, int64(10), spend2.Weight.Value().CumulativeWeight()) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict6:0", "conflict3:0", "conflict5:0", "conflict2:0", "conflict1:0", "conflict4:0") + assertSortedSpendsOrder(t, sortedSpends, "spend6:0", "spend3:0", "spend5:0", "spend2:0", "spend1:0", "spend4:0") - conflict5.Weight.SetAcceptanceState(acceptance.Accepted) + spend5.Weight.SetAcceptanceState(acceptance.Accepted) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict5:0", "conflict6:0", "conflict3:0", "conflict2:0", "conflict1:0", "conflict4:0") + assertSortedSpendsOrder(t, sortedSpends, "spend5:0", "spend6:0", "spend3:0", "spend2:0", "spend1:0", "spend4:0") } func TestSortedDecreaseHeaviest(t *testing.T) { @@ -88,26 +88,26 @@ func TestSortedDecreaseHeaviest(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestSpend(transactionID("conflict1"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) - conflict1.setAcceptanceState(acceptance.Accepted) - conflict2 := NewTestSpend(transactionID("conflict2"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) + spend1 := NewTestSpend(transactionID("spend1"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) + spend1.setAcceptanceState(acceptance.Accepted) + spend2 := NewTestSpend(transactionID("spend2"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) - sortedConflicts := NewSortedConflictSet(conflict1, pendingTasks) + sortedSpends := NewSortedSpendSet(spend1, pendingTasks) - sortedConflicts.Add(conflict1) + sortedSpends.Add(spend1) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict1:0") + assertSortedSpendsOrder(t, sortedSpends, "spend1:0") - sortedConflicts.Add(conflict2) + sortedSpends.Add(spend2) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict1:0", "conflict2:0") + assertSortedSpendsOrder(t, sortedSpends, "spend1:0", "spend2:0") - conflict1.Weight.SetAcceptanceState(acceptance.Pending) + spend1.Weight.SetAcceptanceState(acceptance.Pending) pendingTasks.WaitIsZero() - assertSortedConflictsOrder(t, sortedConflicts, "conflict2:0", "conflict1:0") + assertSortedSpendsOrder(t, sortedSpends, "spend2:0", "spend1:0") } -func TestSortedConflictParallel(t *testing.T) { +func TestSortedSpendParallel(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -115,48 +115,48 @@ func TestSortedConflictParallel(t *testing.T) { return int64(weights.SeatCount()) }) - const conflictCount = 1000 + const spendCount = 1000 const updateCount = 100000 - conflicts := make(map[string]TestSpend) - parallelConflicts := make(map[string]TestSpend) - for i := 0; i < conflictCount; i++ { - alias := "conflict" + strconv.Itoa(i) + spends := make(map[string]TestSpend) + parallelSpends := make(map[string]TestSpend) + for i := 0; i < spendCount; i++ { + alias := "spend" + strconv.Itoa(i) - conflicts[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) - parallelConflicts[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) + spends[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) + parallelSpends[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) } - sortedConflicts := NewSortedConflictSet(conflicts["conflict0"], pendingTasks) - sortedParallelConflicts := NewSortedConflictSet(parallelConflicts["conflict0"], pendingTasks) - sortedParallelConflicts1 := NewSortedConflictSet(parallelConflicts["conflict0"], pendingTasks) + sortedSpends := NewSortedSpendSet(spends["spend0"], pendingTasks) + sortedParallelSpends := NewSortedSpendSet(parallelSpends["spend0"], pendingTasks) + sortedParallelSpends1 := NewSortedSpendSet(parallelSpends["spend0"], pendingTasks) - for i := 0; i < conflictCount; i++ { - alias := "conflict" + strconv.Itoa(i) + for i := 0; i < spendCount; i++ { + alias := "spend" + strconv.Itoa(i) - sortedConflicts.Add(conflicts[alias]) - sortedParallelConflicts.Add(parallelConflicts[alias]) - sortedParallelConflicts1.Add(parallelConflicts[alias]) + sortedSpends.Add(spends[alias]) + sortedParallelSpends.Add(parallelSpends[alias]) + sortedParallelSpends1.Add(parallelSpends[alias]) } - originalSortingBefore := sortedConflicts.String() - parallelSortingBefore := sortedParallelConflicts.String() + originalSortingBefore := sortedSpends.String() + parallelSortingBefore := sortedParallelSpends.String() require.Equal(t, originalSortingBefore, parallelSortingBefore) - permutations := make([]func(conflict TestSpend), 0) + permutations := make([]func(spend TestSpend), 0) for i := 0; i < updateCount; i++ { permutations = append(permutations, generateRandomWeightPermutation()) } var wg sync.WaitGroup for i, permutation := range permutations { - targetAlias := "conflict" + strconv.Itoa(i%conflictCount) + targetAlias := "spend" + strconv.Itoa(i%spendCount) - permutation(conflicts[targetAlias]) + permutation(spends[targetAlias]) wg.Add(1) - go func(permutation func(conflict TestSpend)) { - permutation(parallelConflicts[targetAlias]) + go func(permutation func(spend TestSpend)) { + permutation(parallelSpends[targetAlias]) wg.Done() }(permutation) @@ -166,45 +166,45 @@ func TestSortedConflictParallel(t *testing.T) { wg.Wait() pendingTasks.WaitIsZero() - originalSortingAfter := sortedConflicts.String() - parallelSortingAfter := sortedParallelConflicts.String() + originalSortingAfter := sortedSpends.String() + parallelSortingAfter := sortedParallelSpends.String() require.Equal(t, originalSortingAfter, parallelSortingAfter) require.NotEqualf(t, originalSortingBefore, originalSortingAfter, "original sorting should have changed") pendingTasks.WaitIsZero() - parallelSortingAfter = sortedParallelConflicts1.String() + parallelSortingAfter = sortedParallelSpends1.String() require.Equal(t, originalSortingAfter, parallelSortingAfter) require.NotEqualf(t, originalSortingBefore, originalSortingAfter, "original sorting should have changed") } -func generateRandomWeightPermutation() func(conflict TestSpend) { +func generateRandomWeightPermutation() func(spend TestSpend) { switch rand.Intn(2) { case 0: return generateRandomCumulativeWeightPermutation(int64(rand.Intn(100))) default: // return generateRandomConfirmationStatePermutation() - return func(conflict TestSpend) { + return func(spend TestSpend) { } } } -func generateRandomCumulativeWeightPermutation(delta int64) func(conflict TestSpend) { +func generateRandomCumulativeWeightPermutation(delta int64) func(spend TestSpend) { updateType := rand.Intn(100) - return func(conflict TestSpend) { + return func(spend TestSpend) { if updateType%2 == 0 { - conflict.Weight.AddCumulativeWeight(delta) + spend.Weight.AddCumulativeWeight(delta) } else { - conflict.Weight.RemoveCumulativeWeight(delta) + spend.Weight.RemoveCumulativeWeight(delta) } - conflict.Weight.AddCumulativeWeight(delta) + spend.Weight.AddCumulativeWeight(delta) } } -func assertSortedConflictsOrder(t *testing.T, sortedConflicts SortedConflictSet, aliases ...string) { - require.NoError(t, sortedConflicts.ForEach(func(c TestSpend) error { +func assertSortedSpendsOrder(t *testing.T, sortedSpends SortedSpendSet, aliases ...string) { + require.NoError(t, sortedSpends.ForEach(func(c TestSpend) error { currentAlias := aliases[0] aliases = aliases[1:] diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go index 637a587b8..b14ed0d8b 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go @@ -19,67 +19,67 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// Spend is a conflict that is part of a Spend DAG. +// Spend is a spend that is part of a Spend DAG. type Spend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { - // ID is the identifier of the Conflict. + // ID is the identifier of the Spend. ID SpendID - // Parents is the set of parents of the Conflict. + // Parents is the set of parents of the Spend. Parents ds.Set[*Spend[SpendID, ResourceID, VoteRank]] - // Children is the set of children of the Conflict. + // Children is the set of children of the Spend. Children ds.Set[*Spend[SpendID, ResourceID, VoteRank]] - // ConflictSets is the set of ConflictSets that the Conflict is part of. + // ConflictSets is the set of ConflictSets that the Spend is part of. ConflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]] - // ConflictingSpends is the set of conflicts that directly conflict with the Conflict. + // ConflictingSpends is the set of spends that directly conflict with the Spend. ConflictingSpends *SortedSpends[SpendID, ResourceID, VoteRank] - // Weight is the Weight of the Conflict. + // Weight is the Weight of the Spend. Weight *weight.Weight - // LatestVotes is the set of the latest votes of the Conflict. + // LatestVotes is the set of the latest votes of the Spend. LatestVotes *shrinkingmap.ShrinkingMap[account.SeatIndex, *vote.Vote[VoteRank]] - // AcceptanceStateUpdated is triggered when the AcceptanceState of the Conflict is updated. + // AcceptanceStateUpdated is triggered when the AcceptanceState of the Spend is updated. AcceptanceStateUpdated *event.Event2[acceptance.State, acceptance.State] - // PreferredInsteadUpdated is triggered when the preferred instead value of the Conflict is updated. + // PreferredInsteadUpdated is triggered when the preferred instead value of the Spend is updated. PreferredInsteadUpdated *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] - // LikedInsteadAdded is triggered when a liked instead reference is added to the Conflict. + // LikedInsteadAdded is triggered when a liked instead reference is added to the Spend. LikedInsteadAdded *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] - // LikedInsteadRemoved is triggered when a liked instead reference is removed from the Conflict. + // LikedInsteadRemoved is triggered when a liked instead reference is removed from the Spend. LikedInsteadRemoved *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] // childUnhookMethods is a mapping of children to their unhook functions. childUnhookMethods *shrinkingmap.ShrinkingMap[SpendID, func()] - // preferredInstead is the preferred instead value of the Conflict. + // preferredInstead is the preferred instead value of the Spend. preferredInstead *Spend[SpendID, ResourceID, VoteRank] // evicted evicted atomic.Bool - // preferredInsteadMutex is used to synchronize access to the preferred instead value of the Conflict. + // preferredInsteadMutex is used to synchronize access to the preferred instead value of the Spend. preferredInsteadMutex syncutils.RWMutex - // likedInstead is the set of liked instead Conflicts. + // likedInstead is the set of liked instead Spends. likedInstead ds.Set[*Spend[SpendID, ResourceID, VoteRank]] - // likedInsteadSources is a mapping of liked instead Conflicts to the set of parents that inherited them. + // likedInsteadSources is a mapping of liked instead Spends to the set of parents that inherited them. likedInsteadSources *shrinkingmap.ShrinkingMap[SpendID, ds.Set[*Spend[SpendID, ResourceID, VoteRank]]] // likedInsteadMutex and structureMutex are sometimes locked in different order by different goroutines, which could result in a deadlock // however, it's impossible to deadlock if we fork all transactions upon booking // deadlock happens when the likedInstead conflict changes and parents are updated at the same time, which is impossible in the current setup // because we won't process votes on a conflict we're just creating. - // likedInsteadMutex is used to synchronize access to the liked instead value of the Conflict. + // likedInsteadMutex is used to synchronize access to the liked instead value of the Spend. likedInsteadMutex syncutils.RWMutex - // structureMutex is used to synchronize access to the structure of the Conflict. + // structureMutex is used to synchronize access to the structure of the Spend. structureMutex syncutils.RWMutex // acceptanceThreshold is the function that is used to retrieve the acceptance threshold of the committee. @@ -127,14 +127,14 @@ func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp return c } -// JoinConflictSets registers the Conflict with the given ConflictSets. +// JoinConflictSets registers the Spend with the given ConflictSets. func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(conflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]]) (joinedConflictSets ds.Set[ResourceID], err error) { if conflictSets == nil { return ds.NewSet[ResourceID](), nil } if c.evicted.Load() { - return nil, ierrors.Errorf("tried to join conflict sets of evicted conflict: %w", spenddag.ErrEntityEvicted) + return nil, ierrors.Errorf("tried to join conflict sets of evicted spend: %w", spenddag.ErrEntityEvicted) } registerConflictingSpend := func(c *Spend[SpendID, ResourceID, VoteRank], spend *Spend[SpendID, ResourceID, VoteRank]) { @@ -179,7 +179,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) removeParent(parent *Spend[SpendI return removed } -// UpdateParents updates the parents of the Conflict. +// UpdateParents updates the parents of the Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) UpdateParents(addedParents ds.Set[*Spend[SpendID, ResourceID, VoteRank]], removedParents ds.Set[*Spend[SpendID, ResourceID, VoteRank]]) (updated bool) { c.structureMutex.Lock() defer c.structureMutex.Unlock() @@ -204,7 +204,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) UpdateParents(addedParents ds.Set } func (c *Spend[SpendID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRank]) { - // abort if the conflict has already been accepted or rejected + // abort if the spend has already been accepted or rejected if !c.Weight.AcceptanceState().IsPending() { return } @@ -230,22 +230,22 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRan } } -// IsPending returns true if the Conflict is pending. +// IsPending returns true if the Spend is pending. func (c *Spend[SpendID, ResourceID, VoteRank]) IsPending() bool { return c.Weight.Value().AcceptanceState().IsPending() } -// IsAccepted returns true if the Conflict is accepted. +// IsAccepted returns true if the Spend is accepted. func (c *Spend[SpendID, ResourceID, VoteRank]) IsAccepted() bool { return c.Weight.Value().AcceptanceState().IsAccepted() } -// IsRejected returns true if the Conflict is rejected. +// IsRejected returns true if the Spend is rejected. func (c *Spend[SpendID, ResourceID, VoteRank]) IsRejected() bool { return c.Weight.Value().AcceptanceState().IsRejected() } -// IsPreferred returns true if the Conflict is preferred instead of its conflicting Conflicts. +// IsPreferred returns true if the Spend is preferred instead of its conflicting Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) IsPreferred() bool { c.preferredInsteadMutex.RLock() defer c.preferredInsteadMutex.RUnlock() @@ -253,7 +253,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) IsPreferred() bool { return c.preferredInstead == c } -// PreferredInstead returns the preferred instead value of the Conflict. +// PreferredInstead returns the preferred instead value of the Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) PreferredInstead() *Spend[SpendID, ResourceID, VoteRank] { c.preferredInsteadMutex.RLock() defer c.preferredInsteadMutex.RUnlock() @@ -261,7 +261,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) PreferredInstead() *Spend[SpendID return c.preferredInstead } -// IsLiked returns true if the Conflict is liked instead of other conflicting Conflicts. +// IsLiked returns true if the Spend is liked instead of other conflicting Spends. func (c *Spend[SpendID, ResourceID, VoteRank]) IsLiked() bool { c.likedInsteadMutex.RLock() defer c.likedInsteadMutex.RUnlock() @@ -269,7 +269,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) IsLiked() bool { return c.IsPreferred() && c.likedInstead.IsEmpty() } -// LikedInstead returns the set of liked instead Conflicts. +// LikedInstead returns the set of liked instead Spends. func (c *Spend[SpendID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Spend[SpendID, ResourceID, VoteRank]] { c.likedInsteadMutex.RLock() defer c.likedInsteadMutex.RUnlock() @@ -277,7 +277,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Spend[Spen return c.likedInstead.Clone() } -// Shutdown shuts down the Conflict. +// Shutdown shuts down the Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) Shutdown() { c.ConflictingSpends.Shutdown() } @@ -292,12 +292,12 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []Spend switch c.Weight.AcceptanceState() { case acceptance.Rejected: - // evict the entire future cone of rejected conflicts + // evict the entire future cone of rejected spends c.Children.Range(func(childConflict *Spend[SpendID, ResourceID, VoteRank]) { evictedConflicts = append(evictedConflicts, childConflict.Evict()...) }) default: - // remove evicted conflict from parents of children (merge to master) + // remove evicted spend from parents of children (merge to master) c.Children.Range(func(childConflict *Spend[SpendID, ResourceID, VoteRank]) { childConflict.structureMutex.Lock() defer childConflict.structureMutex.Unlock() @@ -345,7 +345,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []Spend return evictedConflicts } -// Compare compares the Conflict to the given other Conflict. +// Compare compares the Spend to the given other Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) Compare(other *Spend[SpendID, ResourceID, VoteRank]) int { // no need to lock a mutex here, because the Weight is already thread-safe @@ -368,17 +368,17 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Compare(other *Spend[SpendID, Res return bytes.Compare(lo.PanicOnErr(c.ID.Bytes()), lo.PanicOnErr(other.ID.Bytes())) } -// String returns a human-readable representation of the Conflict. +// String returns a human-readable representation of the Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) String() string { // no need to lock a mutex here, because the Weight is already thread-safe - return stringify.Struct("Conflict", + return stringify.Struct("Spend", stringify.NewStructField("id", c.ID), stringify.NewStructField("weight", c.Weight), ) } -// registerChild registers the given child Conflict. +// registerChild registers the given child Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() @@ -417,14 +417,14 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendI } } -// unregisterChild unregisters the given child Conflict. -func (c *Spend[SpendID, ResourceID, VoteRank]) unregisterChild(conflict *Spend[SpendID, ResourceID, VoteRank]) { +// unregisterChild unregisters the given child Spend. +func (c *Spend[SpendID, ResourceID, VoteRank]) unregisterChild(spend *Spend[SpendID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() - if c.Children.Delete(conflict) { - if unhookFunc, exists := c.childUnhookMethods.Get(conflict.ID); exists { - c.childUnhookMethods.Delete(conflict.ID) + if c.Children.Delete(spend) { + if unhookFunc, exists := c.childUnhookMethods.Get(spend.ID); exists { + c.childUnhookMethods.Delete(spend.ID) unhookFunc() } @@ -472,7 +472,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) removeInheritedLikedInsteadRefere } } -// setPreferredInstead sets the preferred instead value of the Conflict. +// setPreferredInstead sets the preferred instead value of the Spend. func (c *Spend[SpendID, ResourceID, VoteRank]) setPreferredInstead(preferredInstead *Spend[SpendID, ResourceID, VoteRank]) (previousPreferredInstead *Spend[SpendID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() @@ -504,7 +504,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) setPreferredInstead(preferredInst return previousPreferredInstead } -// setAcceptanceState sets the acceptance state of the Conflict and returns the previous acceptance state (it triggers +// setAcceptanceState sets the acceptance state of the Spend and returns the previous acceptance state (it triggers // an AcceptanceStateUpdated event if the acceptance state was updated). func (c *Spend[SpendID, ResourceID, VoteRank]) setAcceptanceState(newState acceptance.State) (previousState acceptance.State) { if previousState = c.Weight.SetAcceptanceState(newState); previousState == newState { diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go index b6cc4b716..deffa1faa 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go @@ -24,16 +24,16 @@ type TestSpend = *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] //var NewTestSpend = NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func NewTestSpend(id iotago.TransactionID, parentConflicts ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], conflictSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { - conflict := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) - _, err := conflict.JoinSpendSets(conflictSets) +func NewTestSpend(id iotago.TransactionID, parentConflicts ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { + spend := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) + _, err := spend.JoinSpendSets(SpendSets) if err != nil { // TODO: change this panic(err) } - conflict.UpdateParents(parentConflicts, ds.NewSet[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) + spend.UpdateParents(parentConflicts, ds.NewSet[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) - return conflict + return spend } func TestConflict_SetRejected(t *testing.T) { @@ -44,17 +44,17 @@ func TestConflict_SetRejected(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestSpend(transactionID("Conflict2"), ds.NewSet(conflict1), nil, weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(conflict2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Conflict2"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(Spend2), nil, weight.New(), pendingTasks, thresholdProvider) - conflict1.setAcceptanceState(acceptance.Rejected) - require.True(t, conflict1.IsRejected()) - require.True(t, conflict2.IsRejected()) - require.True(t, conflict3.IsRejected()) + Spend1.setAcceptanceState(acceptance.Rejected) + require.True(t, Spend1.IsRejected()) + require.True(t, Spend2.IsRejected()) + require.True(t, Spend3.IsRejected()) - conflict4 := NewTestSpend(transactionID("Conflict4"), ds.NewSet(conflict1), nil, weight.New(), pendingTasks, thresholdProvider) - require.True(t, conflict4.IsRejected()) + Spend4 := NewTestSpend(transactionID("Conflict4"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) + require.True(t, Spend4.IsRejected()) } func TestConflict_UpdateParents(t *testing.T) { @@ -65,12 +65,12 @@ func TestConflict_UpdateParents(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestSpend(transactionID("Conflict2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(conflict1, conflict2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Conflict2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) - require.True(t, conflict3.Parents.Has(conflict1)) - require.True(t, conflict3.Parents.Has(conflict2)) + require.True(t, Spend3.Parents.Has(Spend1)) + require.True(t, Spend3.Parents.Has(Spend2)) } func TestConflict_SetAccepted(t *testing.T) { @@ -82,38 +82,38 @@ func TestConflict_SetAccepted(t *testing.T) { }) { - conflictSet1 := NewTestConflictSet(id("ConflictSet1")) - conflictSet2 := NewTestConflictSet(id("ConflictSet2")) + SpendSet1 := NewTestConflictSet(id("ConflictSet1")) + SpendSet2 := NewTestConflictSet(id("ConflictSet2")) - conflict1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(conflictSet1), weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(conflictSet1, conflictSet2), weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(conflictSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) - require.Equal(t, acceptance.Pending, conflict1.setAcceptanceState(acceptance.Accepted)) - require.True(t, conflict1.IsAccepted()) - require.True(t, conflict2.IsRejected()) - require.True(t, conflict3.IsPending()) + require.Equal(t, acceptance.Pending, Spend1.setAcceptanceState(acceptance.Accepted)) + require.True(t, Spend1.IsAccepted()) + require.True(t, Spend2.IsRejected()) + require.True(t, Spend3.IsPending()) // set acceptance twice to make sure that the event is not triggered twice // TODO: attach to the event and make sure that it's not triggered - require.Equal(t, acceptance.Accepted, conflict1.setAcceptanceState(acceptance.Accepted)) - require.True(t, conflict1.IsAccepted()) - require.True(t, conflict2.IsRejected()) - require.True(t, conflict3.IsPending()) + require.Equal(t, acceptance.Accepted, Spend1.setAcceptanceState(acceptance.Accepted)) + require.True(t, Spend1.IsAccepted()) + require.True(t, Spend2.IsRejected()) + require.True(t, Spend3.IsPending()) } { - conflictSet1 := NewTestConflictSet(id("ConflictSet1")) - conflictSet2 := NewTestConflictSet(id("ConflictSet2")) + SpendSet1 := NewTestConflictSet(id("ConflictSet1")) + SpendSet2 := NewTestConflictSet(id("ConflictSet2")) - conflict1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(conflictSet1), weight.New(), pendingTasks, thresholdProvider) - conflict2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(conflictSet1, conflictSet2), weight.New(), pendingTasks, thresholdProvider) - conflict3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(conflictSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) - conflict2.setAcceptanceState(acceptance.Accepted) - require.True(t, conflict1.IsRejected()) - require.True(t, conflict2.IsAccepted()) - require.True(t, conflict3.IsRejected()) + Spend2.setAcceptanceState(acceptance.Accepted) + require.True(t, Spend1.IsRejected()) + require.True(t, Spend2.IsAccepted()) + require.True(t, Spend3.IsRejected()) } } @@ -130,85 +130,85 @@ func TestConflict_SpendSets(t *testing.T) { green := NewTestConflictSet(id("green")) yellow := NewTestConflictSet(id("yellow")) - conflictA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) - conflictB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) - conflictC := NewTestSpend(transactionID("C"), nil, ds.NewSet(blue, green), weight.New().AddCumulativeWeight(5), pendingTasks, thresholdProvider) - conflictD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) - conflictE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(9), pendingTasks, thresholdProvider) + SpendA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) + SpendB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) + SpendC := NewTestSpend(transactionID("C"), nil, ds.NewSet(blue, green), weight.New().AddCumulativeWeight(5), pendingTasks, thresholdProvider) + SpendD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) + SpendE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(9), pendingTasks, thresholdProvider) preferredInsteadMap := map[TestSpend]TestSpend{ - conflictA: conflictA, - conflictB: conflictA, - conflictC: conflictC, - conflictD: conflictE, - conflictE: conflictE, + SpendA: SpendA, + SpendB: SpendA, + SpendC: SpendC, + SpendD: SpendE, + SpendE: SpendE, } pendingTasks.WaitIsZero() assertPreferredInstead(t, preferredInsteadMap) - conflictD.Weight.SetCumulativeWeight(10) + SpendD.Weight.SetCumulativeWeight(10) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictC: conflictD, - conflictD: conflictD, - conflictE: conflictD, + SpendC: SpendD, + SpendD: SpendD, + SpendE: SpendD, })) - conflictD.Weight.SetCumulativeWeight(0) + SpendD.Weight.SetCumulativeWeight(0) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictC: conflictC, - conflictD: conflictE, - conflictE: conflictE, + SpendC: SpendC, + SpendD: SpendE, + SpendE: SpendE, })) - conflictC.Weight.SetCumulativeWeight(8) + SpendC.Weight.SetCumulativeWeight(8) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictB: conflictC, + SpendB: SpendC, })) - conflictC.Weight.SetCumulativeWeight(8) + SpendC.Weight.SetCumulativeWeight(8) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictB: conflictC, + SpendB: SpendC, })) - conflictD.Weight.SetCumulativeWeight(3) + SpendD.Weight.SetCumulativeWeight(3) pendingTasks.WaitIsZero() assertPreferredInstead(t, preferredInsteadMap) - conflictE.Weight.SetCumulativeWeight(1) + SpendE.Weight.SetCumulativeWeight(1) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictD: conflictC, + SpendD: SpendC, })) - conflictE.Weight.SetCumulativeWeight(9) + SpendE.Weight.SetCumulativeWeight(9) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictD: conflictE, + SpendD: SpendE, })) - conflictF := NewTestSpend(transactionID("F"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(19), pendingTasks, thresholdProvider) + SpendF := NewTestSpend(transactionID("F"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(19), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ - conflictD: conflictF, - conflictE: conflictF, - conflictF: conflictF, + SpendD: SpendF, + SpendE: SpendF, + SpendF: SpendF, })) - assertCorrectOrder(t, conflictA, conflictB, conflictC, conflictD, conflictE, conflictF) + assertCorrectOrder(t, SpendA, SpendB, SpendC, SpendD, SpendE, SpendF) } func TestConflictParallel(t *testing.T) { @@ -223,7 +223,7 @@ func TestConflictParallel(t *testing.T) { const updateCount = 100000 - permutations := make([]func(conflict TestSpend), 0) + permutations := make([]func(Spend TestSpend), 0) for i := 0; i < updateCount; i++ { permutations = append(permutations, generateRandomConflictPermutation()) } @@ -235,7 +235,7 @@ func TestConflictParallel(t *testing.T) { permutation(sequentialConflicts[targetAlias]) wg.Add(1) - go func(permutation func(conflict TestSpend)) { + go func(permutation func(Spend TestSpend)) { permutation(parallelConflicts[targetAlias]) wg.Done() @@ -248,8 +248,8 @@ func TestConflictParallel(t *testing.T) { parallelPendingTasks.WaitIsZero() - lo.ForEach(lo.Keys(parallelConflicts), func(conflictAlias string) { - assert.EqualValuesf(t, sequentialConflicts[conflictAlias].PreferredInstead().ID, parallelConflicts[conflictAlias].PreferredInstead().ID, "parallel conflict %s prefers %s, but sequential conflict prefers %s", conflictAlias, parallelConflicts[conflictAlias].PreferredInstead().ID, sequentialConflicts[conflictAlias].PreferredInstead().ID) + lo.ForEach(lo.Keys(parallelConflicts), func(SpendAlias string) { + assert.EqualValuesf(t, sequentialConflicts[SpendAlias].PreferredInstead().ID, parallelConflicts[SpendAlias].PreferredInstead().ID, "parallel Spend %s prefers %s, but sequential Spend prefers %s", SpendAlias, parallelConflicts[SpendAlias].PreferredInstead().ID, sequentialConflicts[SpendAlias].PreferredInstead().ID) }) assertCorrectOrder(t, lo.Values(sequentialConflicts)...) @@ -268,19 +268,19 @@ func TestLikedInstead1(t *testing.T) { require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) - conflictSet1 := NewTestConflictSet(id("O1")) + SpendSet1 := NewTestConflictSet(id("O1")) - conflict1 := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) - conflict2 := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) - require.True(t, conflict1.IsPreferred()) - require.True(t, conflict1.IsLiked()) - require.Equal(t, 0, conflict1.LikedInstead().Size()) + require.True(t, Spend1.IsPreferred()) + require.True(t, Spend1.IsLiked()) + require.Equal(t, 0, Spend1.LikedInstead().Size()) - require.False(t, conflict2.IsPreferred()) - require.False(t, conflict2.IsLiked()) - require.Equal(t, 1, conflict2.LikedInstead().Size()) - require.True(t, conflict2.LikedInstead().Has(conflict1)) + require.False(t, Spend2.IsPreferred()) + require.False(t, Spend2.IsLiked()) + require.Equal(t, 1, Spend2.LikedInstead().Size()) + require.True(t, Spend2.LikedInstead().Has(Spend1)) } func TestLikedInsteadFromPreferredInstead(t *testing.T) { @@ -295,69 +295,69 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) - conflictSet1 := NewTestConflictSet(id("O1")) - conflictA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + SpendSet1 := NewTestConflictSet(id("O1")) + SpendA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) - require.True(t, conflictA.IsPreferred()) - require.True(t, conflictA.IsLiked()) - require.Equal(t, 0, conflictA.LikedInstead().Size()) + require.True(t, SpendA.IsPreferred()) + require.True(t, SpendA.IsLiked()) + require.Equal(t, 0, SpendA.LikedInstead().Size()) - require.False(t, conflictB.IsPreferred()) - require.False(t, conflictB.IsLiked()) - require.Equal(t, 1, conflictB.LikedInstead().Size()) - require.True(t, conflictB.LikedInstead().Has(conflictA)) + require.False(t, SpendB.IsPreferred()) + require.False(t, SpendB.IsLiked()) + require.Equal(t, 1, SpendB.LikedInstead().Size()) + require.True(t, SpendB.LikedInstead().Has(SpendA)) - conflictSet2 := NewTestConflictSet(id("O2")) - conflictC := NewTestSpend(transactionID("TxC"), ds.NewSet(conflictA), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictD := NewTestSpend(transactionID("TxD"), ds.NewSet(conflictA), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + SpendSet2 := NewTestConflictSet(id("O2")) + SpendC := NewTestSpend(transactionID("TxC"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendD := NewTestSpend(transactionID("TxD"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) - require.True(t, conflictC.IsPreferred()) - require.True(t, conflictC.IsLiked()) - require.Equal(t, 0, conflictC.LikedInstead().Size()) + require.True(t, SpendC.IsPreferred()) + require.True(t, SpendC.IsLiked()) + require.Equal(t, 0, SpendC.LikedInstead().Size()) - require.False(t, conflictD.IsPreferred()) - require.False(t, conflictD.IsLiked()) - require.Equal(t, 1, conflictD.LikedInstead().Size()) - require.True(t, conflictD.LikedInstead().Has(conflictC)) + require.False(t, SpendD.IsPreferred()) + require.False(t, SpendD.IsLiked()) + require.Equal(t, 1, SpendD.LikedInstead().Size()) + require.True(t, SpendD.LikedInstead().Has(SpendC)) - conflictB.Weight.SetCumulativeWeight(300) + SpendB.Weight.SetCumulativeWeight(300) pendingTasks.WaitIsZero() - require.True(t, conflictB.IsPreferred()) - require.True(t, conflictB.IsLiked()) - require.Equal(t, 0, conflictB.LikedInstead().Size()) + require.True(t, SpendB.IsPreferred()) + require.True(t, SpendB.IsLiked()) + require.Equal(t, 0, SpendB.LikedInstead().Size()) - require.False(t, conflictA.IsPreferred()) - require.False(t, conflictA.IsLiked()) - require.Equal(t, 1, conflictA.LikedInstead().Size()) - require.True(t, conflictA.LikedInstead().Has(conflictB)) + require.False(t, SpendA.IsPreferred()) + require.False(t, SpendA.IsLiked()) + require.Equal(t, 1, SpendA.LikedInstead().Size()) + require.True(t, SpendA.LikedInstead().Has(SpendB)) - require.False(t, conflictD.IsPreferred()) - require.False(t, conflictD.IsLiked()) - require.Equal(t, 1, conflictD.LikedInstead().Size()) - require.True(t, conflictD.LikedInstead().Has(conflictB)) + require.False(t, SpendD.IsPreferred()) + require.False(t, SpendD.IsLiked()) + require.Equal(t, 1, SpendD.LikedInstead().Size()) + require.True(t, SpendD.LikedInstead().Has(SpendB)) - conflictB.Weight.SetCumulativeWeight(100) + SpendB.Weight.SetCumulativeWeight(100) pendingTasks.WaitIsZero() - require.True(t, conflictA.IsPreferred()) - require.True(t, conflictA.IsLiked()) - require.Equal(t, 0, conflictA.LikedInstead().Size()) + require.True(t, SpendA.IsPreferred()) + require.True(t, SpendA.IsLiked()) + require.Equal(t, 0, SpendA.LikedInstead().Size()) - require.False(t, conflictB.IsPreferred()) - require.False(t, conflictB.IsLiked()) - require.Equal(t, 1, conflictB.LikedInstead().Size()) - require.True(t, conflictB.LikedInstead().Has(conflictA)) + require.False(t, SpendB.IsPreferred()) + require.False(t, SpendB.IsLiked()) + require.Equal(t, 1, SpendB.LikedInstead().Size()) + require.True(t, SpendB.LikedInstead().Has(SpendA)) - require.True(t, conflictC.IsPreferred()) - require.True(t, conflictC.IsLiked()) - require.Equal(t, 0, conflictC.LikedInstead().Size()) + require.True(t, SpendC.IsPreferred()) + require.True(t, SpendC.IsLiked()) + require.Equal(t, 0, SpendC.LikedInstead().Size()) - require.False(t, conflictD.IsPreferred()) - require.False(t, conflictD.IsLiked()) - require.Equal(t, 1, conflictD.LikedInstead().Size()) - require.True(t, conflictD.LikedInstead().Has(conflictC)) + require.False(t, SpendD.IsPreferred()) + require.False(t, SpendD.IsLiked()) + require.Equal(t, 1, SpendD.LikedInstead().Size()) + require.True(t, SpendD.LikedInstead().Has(SpendC)) } func TestLikedInstead21(t *testing.T) { @@ -372,80 +372,80 @@ func TestLikedInstead21(t *testing.T) { require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) - conflictSet1 := NewTestConflictSet(id("O1")) - conflictA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(conflictSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + SpendSet1 := NewTestConflictSet(id("O1")) + SpendA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) - require.True(t, conflictA.IsPreferred()) - require.True(t, conflictA.IsLiked()) - require.Equal(t, 0, conflictA.LikedInstead().Size()) + require.True(t, SpendA.IsPreferred()) + require.True(t, SpendA.IsLiked()) + require.Equal(t, 0, SpendA.LikedInstead().Size()) - require.False(t, conflictB.IsPreferred()) - require.False(t, conflictB.IsLiked()) - require.Equal(t, 1, conflictB.LikedInstead().Size()) - require.True(t, conflictB.LikedInstead().Has(conflictA)) + require.False(t, SpendB.IsPreferred()) + require.False(t, SpendB.IsLiked()) + require.Equal(t, 1, SpendB.LikedInstead().Size()) + require.True(t, SpendB.LikedInstead().Has(SpendA)) - conflictSet4 := NewTestConflictSet(id("O4")) - conflictF := NewTestSpend(transactionID("TxF"), ds.NewSet(conflictA), ds.NewSet(conflictSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) - conflictG := NewTestSpend(transactionID("TxG"), ds.NewSet(conflictA), ds.NewSet(conflictSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) + SpendSet4 := NewTestConflictSet(id("O4")) + SpendF := NewTestSpend(transactionID("TxF"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) + SpendG := NewTestSpend(transactionID("TxG"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) - require.True(t, conflictF.IsPreferred()) - require.True(t, conflictF.IsLiked()) - require.Equal(t, 0, conflictF.LikedInstead().Size()) + require.True(t, SpendF.IsPreferred()) + require.True(t, SpendF.IsLiked()) + require.Equal(t, 0, SpendF.LikedInstead().Size()) - require.False(t, conflictG.IsPreferred()) - require.False(t, conflictG.IsLiked()) - require.Equal(t, 1, conflictG.LikedInstead().Size()) - require.True(t, conflictG.LikedInstead().Has(conflictF)) + require.False(t, SpendG.IsPreferred()) + require.False(t, SpendG.IsLiked()) + require.Equal(t, 1, SpendG.LikedInstead().Size()) + require.True(t, SpendG.LikedInstead().Has(SpendF)) - conflictSet2 := NewTestConflictSet(id("O2")) - conflictC := NewTestSpend(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(conflictSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - conflictH := NewTestSpend(transactionID("TxH"), ds.NewSet(masterBranch, conflictA), ds.NewSet(conflictSet2, conflictSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) + SpendSet2 := NewTestConflictSet(id("O2")) + SpendC := NewTestSpend(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendH := NewTestSpend(transactionID("TxH"), ds.NewSet(masterBranch, SpendA), ds.NewSet(SpendSet2, SpendSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) - require.True(t, conflictC.IsPreferred()) - require.True(t, conflictC.IsLiked()) - require.Equal(t, 0, conflictC.LikedInstead().Size()) + require.True(t, SpendC.IsPreferred()) + require.True(t, SpendC.IsLiked()) + require.Equal(t, 0, SpendC.LikedInstead().Size()) - require.False(t, conflictH.IsPreferred()) - require.False(t, conflictH.IsLiked()) - require.Equal(t, 1, conflictH.LikedInstead().Size()) - require.True(t, conflictH.LikedInstead().Has(conflictC)) + require.False(t, SpendH.IsPreferred()) + require.False(t, SpendH.IsLiked()) + require.Equal(t, 1, SpendH.LikedInstead().Size()) + require.True(t, SpendH.LikedInstead().Has(SpendC)) - conflictSet3 := NewTestConflictSet(id("O12")) - conflictI := NewTestSpend(transactionID("TxI"), ds.NewSet(conflictF), ds.NewSet(conflictSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) - conflictJ := NewTestSpend(transactionID("TxJ"), ds.NewSet(conflictF), ds.NewSet(conflictSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) + SpendSet3 := NewTestConflictSet(id("O12")) + SpendI := NewTestSpend(transactionID("TxI"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) + SpendJ := NewTestSpend(transactionID("TxJ"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) - require.True(t, conflictJ.IsPreferred()) - require.True(t, conflictJ.IsLiked()) - require.Equal(t, 0, conflictJ.LikedInstead().Size()) + require.True(t, SpendJ.IsPreferred()) + require.True(t, SpendJ.IsLiked()) + require.Equal(t, 0, SpendJ.LikedInstead().Size()) - require.False(t, conflictI.IsPreferred()) - require.False(t, conflictI.IsLiked()) - require.Equal(t, 1, conflictI.LikedInstead().Size()) - require.True(t, conflictI.LikedInstead().Has(conflictJ)) + require.False(t, SpendI.IsPreferred()) + require.False(t, SpendI.IsLiked()) + require.Equal(t, 1, SpendI.LikedInstead().Size()) + require.True(t, SpendI.LikedInstead().Has(SpendJ)) - conflictH.Weight.SetCumulativeWeight(250) + SpendH.Weight.SetCumulativeWeight(250) pendingTasks.WaitIsZero() - require.True(t, conflictH.IsPreferred()) - require.True(t, conflictH.IsLiked()) - require.Equal(t, 0, conflictH.LikedInstead().Size()) + require.True(t, SpendH.IsPreferred()) + require.True(t, SpendH.IsLiked()) + require.Equal(t, 0, SpendH.LikedInstead().Size()) - require.False(t, conflictF.IsPreferred()) - require.False(t, conflictF.IsLiked()) - require.Equal(t, 1, conflictF.LikedInstead().Size()) - require.True(t, conflictF.LikedInstead().Has(conflictH)) + require.False(t, SpendF.IsPreferred()) + require.False(t, SpendF.IsLiked()) + require.Equal(t, 1, SpendF.LikedInstead().Size()) + require.True(t, SpendF.LikedInstead().Has(SpendH)) - require.False(t, conflictG.IsPreferred()) - require.False(t, conflictG.IsLiked()) - require.Equal(t, 1, conflictG.LikedInstead().Size()) - require.True(t, conflictG.LikedInstead().Has(conflictH)) + require.False(t, SpendG.IsPreferred()) + require.False(t, SpendG.IsLiked()) + require.Equal(t, 1, SpendG.LikedInstead().Size()) + require.True(t, SpendG.LikedInstead().Has(SpendH)) - require.True(t, conflictJ.IsPreferred()) - require.False(t, conflictJ.IsLiked()) - require.Equal(t, 1, conflictJ.LikedInstead().Size()) - require.True(t, conflictJ.LikedInstead().Has(conflictH)) + require.True(t, SpendJ.IsPreferred()) + require.False(t, SpendJ.IsLiked()) + require.Equal(t, 1, SpendJ.LikedInstead().Size()) + require.True(t, SpendJ.LikedInstead().Has(SpendH)) } func TestConflictSet_AllMembersEvicted(t *testing.T) { @@ -459,22 +459,22 @@ func TestConflictSet_AllMembersEvicted(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestSpend(transactionID("conflict1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) - evictedConflicts := conflict1.Evict() + Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) + evictedConflicts := Spend1.Evict() require.Len(t, evictedConflicts, 1) - require.Contains(t, evictedConflicts, conflict1.ID) + require.Contains(t, evictedConflicts, Spend1.ID) - // evict the conflict another time and make sure that none conflicts were evicted - evictedConflicts = conflict1.Evict() + // evict the Spend another time and make sure that none Spends were evicted + evictedConflicts = Spend1.Evict() require.Len(t, evictedConflicts, 0) - // conflict tries to join conflictset who's all members were evicted - conflict2 := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("conflict1"), weight.New(), pendingTasks, thresholdProvider) - _, err := conflict2.JoinSpendSets(ds.NewSet(yellow)) + // Spend tries to join Spendset who's all members were evicted + Spend2 := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("Spend1"), weight.New(), pendingTasks, thresholdProvider) + _, err := Spend2.JoinSpendSets(ds.NewSet(yellow)) require.Error(t, err) - // evicted conflict tries to join conflictset - _, err = conflict1.JoinSpendSets(ds.NewSet(green)) + // evicted Spend tries to join Spendset + _, err = Spend1.JoinSpendSets(ds.NewSet(green)) require.Error(t, err) } @@ -486,13 +486,13 @@ func TestConflict_Compare(t *testing.T) { return int64(weights.SeatCount()) }) - var conflict1, conflict2 TestSpend + var Spend1, Spend2 TestSpend - conflict1 = NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 = NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - require.Equal(t, weight.Heavier, conflict1.Compare(nil)) - require.Equal(t, weight.Lighter, conflict2.Compare(conflict1)) - require.Equal(t, weight.Equal, conflict2.Compare(nil)) + require.Equal(t, weight.Heavier, Spend1.Compare(nil)) + require.Equal(t, weight.Lighter, Spend2.Compare(Spend1)) + require.Equal(t, weight.Equal, Spend2.Compare(nil)) } func TestConflict_Inheritance(t *testing.T) { @@ -506,66 +506,66 @@ func TestConflict_Inheritance(t *testing.T) { return int64(weights.SeatCount()) }) - conflict1 := NewTestSpend(transactionID("conflict1"), nil, ds.NewSet(yellow), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) - conflict2 := NewTestSpend(transactionID("conflict2"), nil, ds.NewSet(green), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) - conflict3 := NewTestSpend(transactionID("conflict3"), ds.NewSet(conflict1, conflict2), nil, weight.New(), pendingTasks, thresholdProvider) - conflict4 := NewTestSpend(transactionID("conflict4"), nil, ds.NewSet(yellow, green), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(green), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Spend3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend4 := NewTestSpend(transactionID("Spend4"), nil, ds.NewSet(yellow, green), weight.New(), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() - require.True(t, conflict3.LikedInstead().IsEmpty()) + require.True(t, Spend3.LikedInstead().IsEmpty()) - conflict4.Weight.SetCumulativeWeight(10) + Spend4.Weight.SetCumulativeWeight(10) pendingTasks.WaitIsZero() - require.True(t, conflict3.LikedInstead().Has(conflict4)) + require.True(t, Spend3.LikedInstead().Has(Spend4)) // set it manually again, to make sure that it's idempotent - conflict2.setPreferredInstead(conflict4) + Spend2.setPreferredInstead(Spend4) pendingTasks.WaitIsZero() - require.True(t, conflict3.LikedInstead().Has(conflict4)) + require.True(t, Spend3.LikedInstead().Has(Spend4)) - // make sure that inheritance of LikedInstead works correctly for newly created conflicts - conflict5 := NewTestSpend(transactionID("conflict5"), ds.NewSet(conflict3), nil, weight.New(), pendingTasks, thresholdProvider) + // make sure that inheritance of LikedInstead works correctly for newly created Spends + Spend5 := NewTestSpend(transactionID("Spend5"), ds.NewSet(Spend3), nil, weight.New(), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() - require.True(t, conflict5.LikedInstead().Has(conflict4)) + require.True(t, Spend5.LikedInstead().Has(Spend4)) - conflict1.Weight.SetCumulativeWeight(15) + Spend1.Weight.SetCumulativeWeight(15) pendingTasks.WaitIsZero() - require.True(t, conflict3.LikedInstead().IsEmpty()) + require.True(t, Spend3.LikedInstead().IsEmpty()) } -func assertCorrectOrder(t *testing.T, conflicts ...TestSpend) { - sort.Slice(conflicts, func(i, j int) bool { - return conflicts[i].Compare(conflicts[j]) == weight.Heavier +func assertCorrectOrder(t *testing.T, spends ...TestSpend) { + sort.Slice(spends, func(i, j int) bool { + return spends[i].Compare(spends[j]) == weight.Heavier }) preferredConflicts := ds.NewSet[TestSpend]() unPreferredConflicts := ds.NewSet[TestSpend]() - for _, conflict := range conflicts { - if !unPreferredConflicts.Has(conflict) { - preferredConflicts.Add(conflict) - conflict.ConflictingSpends.Range(func(conflictingConflict *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { - if conflict != conflictingConflict { - unPreferredConflicts.Add(conflictingConflict) + for _, spend := range spends { + if !unPreferredConflicts.Has(spend) { + preferredConflicts.Add(spend) + spend.ConflictingSpends.Range(func(conflictingSpend *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { + if spend != conflictingSpend { + unPreferredConflicts.Add(conflictingSpend) } }, true) } } - for _, conflict := range conflicts { - if preferredConflicts.Has(conflict) { - require.True(t, conflict.IsPreferred(), "conflict %s should be preferred", conflict.ID) + for _, Spend := range spends { + if preferredConflicts.Has(Spend) { + require.True(t, Spend.IsPreferred(), "Spend %s should be preferred", Spend.ID) } - if unPreferredConflicts.Has(conflict) { - require.False(t, conflict.IsPreferred(), "conflict %s should be unPreferred", conflict.ID) + if unPreferredConflicts.Has(Spend) { + require.False(t, Spend.IsPreferred(), "Spend %s should be unPreferred", Spend.ID) } } _ = unPreferredConflicts.ForEach(func(unPreferredConflict TestSpend) (err error) { - // iterating in descending order, so the first preferred conflict - return unPreferredConflict.ConflictingSpends.ForEach(func(conflictingConflict TestSpend) error { - if conflictingConflict != unPreferredConflict && conflictingConflict.IsPreferred() { - require.Equal(t, conflictingConflict, unPreferredConflict.PreferredInstead()) + // iterating in descending order, so the first preferred Spend + return unPreferredConflict.ConflictingSpends.ForEach(func(SpendingConflict TestSpend) error { + if SpendingConflict != unPreferredConflict && SpendingConflict.IsPreferred() { + require.Equal(t, SpendingConflict, unPreferredConflict.PreferredInstead()) return ierrors.New("break the loop") } @@ -575,15 +575,15 @@ func assertCorrectOrder(t *testing.T, conflicts ...TestSpend) { }) } -func generateRandomConflictPermutation() func(conflict TestSpend) { +func generateRandomConflictPermutation() func(Spend TestSpend) { updateType := rand.Intn(100) delta := rand.Intn(100) - return func(conflict TestSpend) { + return func(Spend TestSpend) { if updateType%2 == 0 { - conflict.Weight.AddCumulativeWeight(int64(delta)) + Spend.Weight.AddCumulativeWeight(int64(delta)) } else { - conflict.Weight.RemoveCumulativeWeight(int64(delta)) + Spend.Weight.RemoveCumulativeWeight(int64(delta)) } } } @@ -600,23 +600,23 @@ func createConflicts(pendingTasks *syncutils.Counter) map[string]TestSpend { green := NewTestConflictSet(id("green")) yellow := NewTestConflictSet(id("yellow")) - conflictA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) - conflictB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) - conflictC := NewTestSpend(transactionID("C"), nil, ds.NewSet(green, blue), weight.New(), pendingTasks, thresholdProvider) - conflictD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New(), pendingTasks, thresholdProvider) - conflictE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) + SpendA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) + SpendB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) + SpendC := NewTestSpend(transactionID("C"), nil, ds.NewSet(green, blue), weight.New(), pendingTasks, thresholdProvider) + SpendD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New(), pendingTasks, thresholdProvider) + SpendE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) return map[string]TestSpend{ - "conflictA": conflictA, - "conflictB": conflictB, - "conflictC": conflictC, - "conflictD": conflictD, - "conflictE": conflictE, + "SpendA": SpendA, + "SpendB": SpendB, + "SpendC": SpendC, + "SpendD": SpendD, + "SpendE": SpendE, } } func assertPreferredInstead(t *testing.T, preferredInsteadMap map[TestSpend]TestSpend) { - for conflict, preferredInsteadConflict := range preferredInsteadMap { - assert.Equalf(t, preferredInsteadConflict.ID, conflict.PreferredInstead().ID, "conflict %s should prefer %s instead of %s", conflict.ID, preferredInsteadConflict.ID, conflict.PreferredInstead().ID) + for Spend, preferredInsteadConflict := range preferredInsteadMap { + assert.Equalf(t, preferredInsteadConflict.ID, Spend.PreferredInstead().ID, "Spend %s should prefer %s instead of %s", Spend.ID, preferredInsteadConflict.ID, Spend.PreferredInstead().ID) } } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index 3bbfe3326..434ff89b3 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -223,8 +223,8 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictingSpends(spendID Spen } conflictingSpends = ds.NewSet[SpendID]() - spend.ConflictingSpends.Range(func(conflictingConflict *Spend[SpendID, ResourceID, VoteRank]) { - conflictingSpends.Add(conflictingConflict.ID) + spend.ConflictingSpends.Range(func(conflictingSpend *Spend[SpendID, ResourceID, VoteRank]) { + conflictingSpends.Add(conflictingSpend.ID) }) return conflictingSpends, true diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go index 51aee6d30..1dc2775f3 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go @@ -53,13 +53,13 @@ func TestMemoryRelease(t *testing.T) { //t.Skip("skip memory test as for some reason it's failing") tf := newTestFramework(t) - createSpendSets := func(startSlot, conflictSetCount, evictionDelay, conflictsInConflictSet int, prevConflictSetAlias string) (int, string) { + createSpendSets := func(startSlot, conflictSetCount, evictionDelay, spendsInConflictSet int, prevConflictSetAlias string) (int, string) { slot := startSlot for ; slot < startSlot+conflictSetCount; slot++ { conflictSetAlias := fmt.Sprintf("conflictSet-%d", slot) - for conflictIndex := 0; conflictIndex < conflictsInConflictSet; conflictIndex++ { + for conflictIndex := 0; conflictIndex < spendsInConflictSet; conflictIndex++ { conflictAlias := fmt.Sprintf("conflictSet-%d:%d", slot, conflictIndex) - require.NoError(t, tf.CreateOrUpdateConflict(conflictAlias, []string{conflictSetAlias})) + require.NoError(t, tf.CreateOrUpdateSpend(conflictAlias, []string{conflictSetAlias})) if prevConflictSetAlias != "" { require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevConflictSetAlias, 0)}, []string{})) } @@ -67,7 +67,7 @@ func TestMemoryRelease(t *testing.T) { prevConflictSetAlias = conflictSetAlias if slotToEvict := slot - evictionDelay; slotToEvict >= 0 { - for conflictIndex := 0; conflictIndex < conflictsInConflictSet; conflictIndex++ { + for conflictIndex := 0; conflictIndex < spendsInConflictSet; conflictIndex++ { conflictAlias := fmt.Sprintf("conflictSet-%d:%d", slotToEvict, conflictIndex) tf.EvictSpend(conflictAlias) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go index 9359454fa..093b5f687 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go @@ -6,7 +6,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// heaviestConflict returns the largest Conflict from the given Conflicts. +// heaviestConflict returns the largest Conflict from the given Spends. func heaviestConflict[SpendID, ResourceID spenddag.IDType, VoterPower spenddag.VoteRankType[VoterPower]](conflicts ds.Set[*Spend[SpendID, ResourceID, VoterPower]]) *Spend[SpendID, ResourceID, VoterPower] { var result *Spend[SpendID, ResourceID, VoterPower] conflicts.Range(func(conflict *Spend[SpendID, ResourceID, VoterPower]) { diff --git a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go index a878b6e2d..23910df2f 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -9,79 +9,79 @@ type Assertions struct { f *Framework } -// Children asserts that the given conflict has the given children. -func (a *Assertions) Children(conflictAlias string, childAliases ...string) { - childIDs, exists := a.f.Instance.SpendChildren(a.f.SpendID(conflictAlias)) - require.True(a.f.test, exists, "Conflict %s does not exist", conflictAlias) +// Children asserts that the given spend has the given children. +func (a *Assertions) Children(spendAlias string, childAliases ...string) { + childIDs, exists := a.f.Instance.SpendChildren(a.f.SpendID(spendAlias)) + require.True(a.f.test, exists, "Conflict %s does not exist", spendAlias) - require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Conflict %s has wrong number of children", conflictAlias) + require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Conflict %s has wrong number of children", spendAlias) for _, childAlias := range childAliases { - require.True(a.f.test, childIDs.Has(a.f.SpendID(childAlias)), "Conflict %s does not have child %s", conflictAlias, childAlias) + require.True(a.f.test, childIDs.Has(a.f.SpendID(childAlias)), "Conflict %s does not have child %s", spendAlias, childAlias) } } -// Parents asserts that the given conflict has the given parents. -func (a *Assertions) Parents(conflictAlias string, parentAliases ...string) { - parents, exists := a.f.Instance.SpendParents(a.f.SpendID(conflictAlias)) - require.True(a.f.test, exists, "Conflict %s does not exist", conflictAlias) +// Parents asserts that the given spend has the given parents. +func (a *Assertions) Parents(spendAlias string, parentAliases ...string) { + parents, exists := a.f.Instance.SpendParents(a.f.SpendID(spendAlias)) + require.True(a.f.test, exists, "Conflict %s does not exist", spendAlias) - require.Equal(a.f.test, len(parentAliases), parents.Size(), "Conflict %s has wrong number of parents", conflictAlias) + require.Equal(a.f.test, len(parentAliases), parents.Size(), "Conflict %s has wrong number of parents", spendAlias) for _, parentAlias := range parentAliases { - require.True(a.f.test, parents.Has(a.f.SpendID(parentAlias)), "Conflict %s does not have parent %s", conflictAlias, parentAlias) + require.True(a.f.test, parents.Has(a.f.SpendID(parentAlias)), "Conflict %s does not have parent %s", spendAlias, parentAlias) } } -// LikedInstead asserts that the given conflicts return the given LikedInstead conflicts. -func (a *Assertions) LikedInstead(conflictAliases []string, likedInsteadAliases ...string) { - likedInsteadConflicts := a.f.LikedInstead(conflictAliases...) +// LikedInstead asserts that the given spends return the given LikedInstead spends. +func (a *Assertions) LikedInstead(spendAliases []string, likedInsteadAliases ...string) { + likedInsteadConflicts := a.f.LikedInstead(spendAliases...) - require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadConflicts.Size(), "LikedInstead returns wrong number of conflicts %d instead of %d", likedInsteadConflicts.Size(), len(likedInsteadAliases)) + require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadConflicts.Size(), "LikedInstead returns wrong number of spends %d instead of %d", likedInsteadConflicts.Size(), len(likedInsteadAliases)) } -// ConflictSetMembers asserts that the given resource has the given conflict set members. -func (a *Assertions) ConflictSetMembers(resourceAlias string, conflictAliases ...string) { +// ConflictSetMembers asserts that the given resource has the given spend set members. +func (a *Assertions) ConflictSetMembers(resourceAlias string, spendAliases ...string) { conflictSetMembers, exists := a.f.Instance.ConflictSetMembers(a.f.ResourceID(resourceAlias)) require.True(a.f.test, exists, "Resource %s does not exist", resourceAlias) - require.Equal(a.f.test, len(conflictAliases), conflictSetMembers.Size(), "Resource %s has wrong number of parents", resourceAlias) - for _, conflictAlias := range conflictAliases { - require.True(a.f.test, conflictSetMembers.Has(a.f.SpendID(conflictAlias)), "Resource %s does not have parent %s", resourceAlias, conflictAlias) + require.Equal(a.f.test, len(spendAliases), conflictSetMembers.Size(), "Resource %s has wrong number of parents", resourceAlias) + for _, spendAlias := range spendAliases { + require.True(a.f.test, conflictSetMembers.Has(a.f.SpendID(spendAlias)), "Resource %s does not have parent %s", resourceAlias, spendAlias) } } -// ConflictSets asserts that the given conflict has the given conflict sets. -func (a *Assertions) ConflictSets(conflictAlias string, resourceAliases ...string) { - conflictSets, exists := a.f.Instance.ConflictSets(a.f.SpendID(conflictAlias)) - require.True(a.f.test, exists, "Conflict %s does not exist", conflictAlias) +// ConflictSets asserts that the given spend has the given conflict sets. +func (a *Assertions) ConflictSets(spendAlias string, resourceAliases ...string) { + conflictSets, exists := a.f.Instance.ConflictSets(a.f.SpendID(spendAlias)) + require.True(a.f.test, exists, "Conflict %s does not exist", spendAlias) - require.Equal(a.f.test, len(resourceAliases), conflictSets.Size(), "Conflict %s has wrong number of conflict sets", conflictAlias) + require.Equal(a.f.test, len(resourceAliases), conflictSets.Size(), "Conflict %s has wrong number of conflict sets", spendAlias) for _, resourceAlias := range resourceAliases { - require.True(a.f.test, conflictSets.Has(a.f.ResourceID(resourceAlias)), "Conflict %s does not have conflict set %s", conflictAlias, resourceAlias) + require.True(a.f.test, conflictSets.Has(a.f.ResourceID(resourceAlias)), "Conflict %s does not have conflict set %s", spendAlias, resourceAlias) } } -// Pending asserts that the given conflicts are pending. +// Pending asserts that the given spends are pending. func (a *Assertions) Pending(aliases ...string) { for _, alias := range aliases { require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsPending(), "Conflict %s is not pending", alias) } } -// Accepted asserts that the given conflicts are accepted. +// Accepted asserts that the given spends are accepted. func (a *Assertions) Accepted(aliases ...string) { for _, alias := range aliases { require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsAccepted(), "Conflict %s is not accepted", alias) } } -// Rejected asserts that the given conflicts are rejected. +// Rejected asserts that the given spends are rejected. func (a *Assertions) Rejected(aliases ...string) { for _, alias := range aliases { require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsRejected(), "Conflict %s is not rejected", alias) } } -// ValidatorWeight asserts that the given conflict has the given validator weight. -func (a *Assertions) ValidatorWeight(conflictAlias string, weight int64) { - require.Equal(a.f.test, weight, a.f.Instance.SpendWeight(a.f.SpendID(conflictAlias)), "ValidatorWeight is %s instead of % for conflict %s", a.f.Instance.SpendWeight(a.f.SpendID(conflictAlias)), weight, conflictAlias) +// ValidatorWeight asserts that the given spend has the given validator weight. +func (a *Assertions) ValidatorWeight(spendAlias string, weight int64) { + require.Equal(a.f.test, weight, a.f.Instance.SpendWeight(a.f.SpendID(spendAlias)), "ValidatorWeight is %s instead of % for spend %s", a.f.Instance.SpendWeight(a.f.SpendID(spendAlias)), weight, spendAlias) } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go index 58bfd21e6..35cf20aa7 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -52,23 +52,23 @@ func NewFramework( return f } -// CreateOrUpdateConflict creates a new conflict or adds it to the given ConflictSets. -func (f *Framework) CreateOrUpdateConflict(alias string, resourceAliases []string) error { +// CreateOrUpdateSpend creates a new spend or adds it to the given ConflictSets. +func (f *Framework) CreateOrUpdateSpend(alias string, resourceAliases []string) error { f.Instance.CreateSpend(f.SpendID(alias)) return f.Instance.UpdateConflictingResources(f.SpendID(alias), f.ConflictSetIDs(resourceAliases...)) } -// UpdateConflictParents updates the parents of the conflict with the given alias. -func (f *Framework) UpdateSpendParents(conflictAlias string, addedParentIDs []string, removedParentIDs []string) error { - return f.Instance.UpdateSpendParents(f.SpendID(conflictAlias), f.SpendIDs(addedParentIDs...), f.SpendIDs(removedParentIDs...)) +// UpdateConflictParents updates the parents of the spend with the given alias. +func (f *Framework) UpdateSpendParents(spendAlias string, addedParentIDs []string, removedParentIDs []string) error { + return f.Instance.UpdateSpendParents(f.SpendID(spendAlias), f.SpendIDs(addedParentIDs...), f.SpendIDs(removedParentIDs...)) } -// LikedInstead returns the set of conflicts that are liked instead of the given conflicts. -func (f *Framework) LikedInstead(conflictAliases ...string) ds.Set[iotago.TransactionID] { +// LikedInstead returns the set of spends that are liked instead of the given spends. +func (f *Framework) LikedInstead(spendAliases ...string) ds.Set[iotago.TransactionID] { var result ds.Set[iotago.TransactionID] _ = f.Instance.ReadConsistent(func(spendDAG spenddag.ReadLockedSpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) error { - result = spendDAG.LikedInstead(f.SpendIDs(conflictAliases...)) + result = spendDAG.LikedInstead(f.SpendIDs(spendAliases...)) return nil }) @@ -76,19 +76,19 @@ func (f *Framework) LikedInstead(conflictAliases ...string) ds.Set[iotago.Transa return result } -// CastVotes casts the given votes for the given conflicts. -func (f *Framework) CastVotes(nodeAlias string, voteRank int, conflictAliases ...string) error { +// CastVotes casts the given votes for the given spends. +func (f *Framework) CastVotes(nodeAlias string, voteRank int, spendAliases ...string) error { seat, exists := f.Accounts.Get(nodeAlias) if !exists { return ierrors.Errorf("node with alias '%s' does not have a seat in the committee", nodeAlias) } - return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpendIDs(conflictAliases...)) + return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpendIDs(spendAliases...)) } -// EvictConflict evicts given conflict from the SpendDAG. -func (f *Framework) EvictSpend(conflictAlias string) { - f.Instance.EvictSpend(f.SpendID(conflictAlias)) +// EvictSpend evicts given spend from the SpendDAG. +func (f *Framework) EvictSpend(spendAlias string) { + f.Instance.EvictSpend(f.SpendID(spendAlias)) } // SpendIDs translates the given aliases into an AdvancedSet of iotago.TransactionIDs. diff --git a/pkg/protocol/engine/mempool/spenddag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go index 59e97adfc..d819492ef 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -32,17 +32,17 @@ func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { } func ExistingSpendJoinsConflictSets(t *testing.T, tf *Framework) { - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource2"})) tf.Assert.ConflictSetMembers("resource2", "conflict1", "conflict3") tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) tf.Assert.ConflictSetMembers("resource2", "conflict1", "conflict2", "conflict3") tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") @@ -51,15 +51,15 @@ func ExistingSpendJoinsConflictSets(t *testing.T, tf *Framework) { } func UpdateSpendParents(t *testing.T, tf *Framework) { - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource1", "resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource1", "resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1", "conflict2"}, []string{})) tf.Assert.Children("conflict1", "conflict3") tf.Assert.Parents("conflict3", "conflict1", "conflict2") - require.NoError(t, tf.CreateOrUpdateConflict("conflict2.5", []string{"conflict2.5"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2.5", []string{"conflict2.5"})) require.NoError(t, tf.UpdateSpendParents("conflict2.5", []string{"conflict1", "conflict2"}, []string{})) tf.Assert.Children("conflict1", "conflict2.5", "conflict3") tf.Assert.Children("conflict2", "conflict2.5", "conflict3") @@ -75,14 +75,14 @@ func UpdateSpendParents(t *testing.T, tf *Framework) { } func CreateSpend(t *testing.T, tf *Framework) { - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -99,8 +99,8 @@ func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { // Non-conflicting conflicts { - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) tf.Assert.ConflictSetMembers("resource1", "conflict1") tf.Assert.ConflictSetMembers("resource2", "conflict2") @@ -118,8 +118,8 @@ func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { // Regular conflict { - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource3"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource3"})) tf.Assert.ConflictSetMembers("resource3", "conflict3", "conflict4") @@ -135,16 +135,16 @@ func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { func LikedInstead(t *testing.T, tf *Framework) { tf.Accounts.CreateID("zero-weight") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CastVotes("zero-weight", 1, "conflict1")) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.LikedInstead([]string{"conflict1", "conflict2"}, "conflict1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) require.NoError(t, tf.CastVotes("zero-weight", 1, "conflict4")) @@ -157,16 +157,16 @@ func SpendAcceptance(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.ConflictSets("conflict1", "resource1") tf.Assert.ConflictSets("conflict2", "resource1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -192,16 +192,16 @@ func CastVotes(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.ConflictSets("conflict1", "resource1") tf.Assert.ConflictSets("conflict2", "resource1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -227,17 +227,17 @@ func CastVotesVoteRank(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID2") tf.Accounts.CreateID("nodeID3") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.ConflictSets("conflict1", "resource1") tf.Assert.ConflictSets("conflict2", "resource1") // create nested conflicts - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -281,16 +281,16 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.ConflictSets("conflict1", "resource1") tf.Assert.ConflictSets("conflict2", "resource1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -307,7 +307,7 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { tf.Assert.Accepted("conflict3") tf.Assert.Rejected("conflict4") - require.NoError(t, tf.CreateOrUpdateConflict("conflict5", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict5", []string{"resource1"})) tf.Assert.Rejected("conflict5") // Evict conflict and try to add non-existing parent to a rejected conflict - update is ignored because the parent is evicted. @@ -332,22 +332,22 @@ func JoinConflictSetTwice(t *testing.T, tf *Framework) { resourceAddedEventCount++ }) - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 1, resourceAddedEventCount) tf.Assert.ConflictSets("conflict1", "resource1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource2"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 2, resourceAddedEventCount) tf.Assert.ConflictSets("conflict1", "resource1", "resource2") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1", "resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1", "resource2"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 2, resourceAddedEventCount) tf.Assert.ConflictSets("conflict1", "resource1", "resource2") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1", "resource2", "resource3", "resource4"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1", "resource2", "resource3", "resource4"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 3, resourceAddedEventCount) tf.Assert.ConflictSets("conflict1", "resource1", "resource2", "resource3", "resource4") @@ -359,16 +359,16 @@ func EvictAcceptedSpend(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.ConflictSets("conflict1", "resource1") tf.Assert.ConflictSets("conflict2", "resource1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -376,10 +376,10 @@ func EvictAcceptedSpend(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict5", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict5", []string{"resource3"})) require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict2"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict6", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict6", []string{"resource3"})) require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") @@ -425,16 +425,16 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateConflict("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict2", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") tf.Assert.ConflictSets("conflict1", "resource1") tf.Assert.ConflictSets("conflict2", "resource1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict4", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") @@ -442,10 +442,10 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") - require.NoError(t, tf.CreateOrUpdateConflict("conflict5", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict5", []string{"resource3"})) require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict2"}, []string{})) - require.NoError(t, tf.CreateOrUpdateConflict("conflict6", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpend("conflict6", []string{"resource3"})) require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") diff --git a/pkg/protocol/engine/mempool/tests/testframework.go b/pkg/protocol/engine/mempool/tests/testframework.go index d8e5de00a..b8225b90f 100644 --- a/pkg/protocol/engine/mempool/tests/testframework.go +++ b/pkg/protocol/engine/mempool/tests/testframework.go @@ -243,16 +243,16 @@ func (t *TestFramework) RequireTransactionsEvicted(transactionAliases map[string } } -func (t *TestFramework) RequireSpendIDs(conflictMapping map[string][]string) { - for transactionAlias, conflictAliases := range conflictMapping { +func (t *TestFramework) RequireSpendIDs(spendMapping map[string][]string) { + for transactionAlias, spendAliases := range spendMapping { transactionMetadata, exists := t.Instance.TransactionMetadata(t.TransactionID(transactionAlias)) require.True(t.test, exists, "transaction %s does not exist", transactionAlias) spendIDs := transactionMetadata.SpendIDs() - require.Equal(t.test, len(conflictAliases), spendIDs.Size(), "%s has wrong number of SpendIDs", transactionAlias) + require.Equal(t.test, len(spendAliases), spendIDs.Size(), "%s has wrong number of SpendIDs", transactionAlias) - for _, conflictAlias := range conflictAliases { - require.True(t.test, spendIDs.Has(t.TransactionID(conflictAlias)), "transaction %s should have conflict %s, instead had %s", transactionAlias, conflictAlias, spendIDs) + for _, spendAlias := range spendAliases { + require.True(t.test, spendIDs.Has(t.TransactionID(spendAlias)), "transaction %s should have spend %s, instead had %s", transactionAlias, spendAlias, spendIDs) } } } diff --git a/pkg/protocol/engine/mempool/v1/inclusion_flags.go b/pkg/protocol/engine/mempool/v1/inclusion_flags.go index f97680af0..9e59a3653 100644 --- a/pkg/protocol/engine/mempool/v1/inclusion_flags.go +++ b/pkg/protocol/engine/mempool/v1/inclusion_flags.go @@ -27,7 +27,7 @@ func newInclusionFlags() *inclusionFlags { accepted: reactive.NewVariable[bool](), committedSlot: reactive.NewVariable[iotago.SlotIndex](), rejected: promise.NewEvent(), - // Make sure the oldest orphaned index doesn't get overridden by newer TX spending the orphaned conflict further. + // Make sure the oldest orphaned index doesn't get overridden by newer TX spending the orphaned spend further. orphanedSlot: reactive.NewVariable[iotago.SlotIndex](func(currentValue iotago.SlotIndex, newValue iotago.SlotIndex) iotago.SlotIndex { if currentValue != 0 { return currentValue From 2e2f2410d95e821fb68cffc7a0c793c91b912749 Mon Sep 17 00:00:00 2001 From: Piotr Macek <4007944+piotrm50@users.noreply.github.com> Date: Fri, 10 Nov 2023 23:10:40 +0100 Subject: [PATCH 09/18] Fix resource cleanup unit test to work with forking all transactions. --- pkg/protocol/engine/mempool/v1/mempool_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/protocol/engine/mempool/v1/mempool_test.go b/pkg/protocol/engine/mempool/v1/mempool_test.go index e11b1eab9..060ba92a6 100644 --- a/pkg/protocol/engine/mempool/v1/mempool_test.go +++ b/pkg/protocol/engine/mempool/v1/mempool_test.go @@ -56,6 +56,7 @@ func TestMempoolV1_ResourceCleanup(t *testing.T) { tf.RequireBooked(txAlias) tf.MarkAttachmentIncluded(blockAlias) + tf.SpendDAG.SetAccepted(tf.TransactionID(txAlias)) prevStateAlias = fmt.Sprintf("tx%d:0", index) From e6f736034520afe2711baeab69ce1f2ce4d2a0ad Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 15 Nov 2023 16:44:05 +0800 Subject: [PATCH 10/18] Resolve comments --- .../build/app.6eea8010fee08f23aca6.js | 1 + .../build/app.6eea8010fee08f23aca6.js.map | 1 + .../build/app.991aa07a823b10139416.js | 1 - .../build/app.991aa07a823b10139416.js.map | 1 - .../dashboard/frontend/build/index.html | 2 +- .../app/components/ExplorerAddressResult.tsx | 4 +- .../components/ExplorerBlockQueryResult.tsx | 12 +- .../ExplorerConflictQueryResult.tsx | 6 +- .../components/ExplorerOutputQueryResult.tsx | 4 +- .../frontend/src/app/stores/ExplorerStore.tsx | 20 +- .../engine/mempool/spenddag/events.go | 12 +- .../spenddag/spenddagv1/sorted_spend.go | 10 +- .../spenddag/spenddagv1/sorted_spends.go | 4 +- .../mempool/spenddag/spenddagv1/spend.go | 50 ++--- .../mempool/spenddag/spenddagv1/spend_test.go | 114 +++++------ .../mempool/spenddag/spenddagv1/spenddag.go | 52 ++--- .../mempool/spenddag/spenddagv1/utils.go | 10 +- .../mempool/spenddag/tests/assertions.go | 30 +-- pkg/protocol/engine/mempool/tests/tests.go | 180 +----------------- .../engine/mempool/v1/mempool_test.go | 2 +- 20 files changed, 171 insertions(+), 345 deletions(-) create mode 100644 components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js create mode 100644 components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map delete mode 100644 components/dashboard/frontend/build/app.991aa07a823b10139416.js delete mode 100644 components/dashboard/frontend/build/app.991aa07a823b10139416.js.map diff --git a/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js b/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js new file mode 100644 index 000000000..27ba7b96c --- /dev/null +++ b/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRG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MS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2NnB4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NiA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},298:function(e,t,n){var r={"./af":107,"./af.js":107,"./ar":108,"./ar-dz":109,"./ar-dz.js":109,"./ar-kw":110,"./ar-kw.js":110,"./ar-ly":111,"./ar-ly.js":111,"./ar-ma":112,"./ar-ma.js":112,"./ar-sa":113,"./ar-sa.js":113,"./ar-tn":114,"./ar-tn.js":114,"./ar.js":108,"./az":115,"./az.js":115,"./be":116,"./be.js":116,"./bg":117,"./bg.js":117,"./bm":118,"./bm.js":118,"./bn":119,"./bn-bd":120,"./bn-bd.js":120,"./bn.js":119,"./bo":121,"./bo.js":121,"./br":122,"./br.js":122,"./bs":123,"./bs.js":123,"./ca":124,"./ca.js":124,"./cs":125,"./cs.js":125,"./cv":126,"./cv.js":126,"./cy":127,"./cy.js":127,"./da":128,"./da.js":128,"./de":129,"./de-at":130,"./de-at.js":130,"./de-ch":131,"./de-ch.js":131,"./de.js":129,"./dv":132,"./dv.js":132,"./el":133,"./el.js":133,"./en-au":134,"./en-au.js":134,"./en-ca":135,"./en-ca.js":135,"./en-gb":136,"./en-gb.js":136,"./en-ie":137,"./en-ie.js":137,"./en-il":138,"./en-il.js":138,"./en-in":139,"./en-in.js":139,"./en-nz":140,"./en-nz.js":140,"./en-sg":141,"./en-sg.js":141,"./eo":142,"./eo.js":142,"./es":143,"./es-do":144,"./es-do.js":144,"./es-mx":145,"./es-mx.js":145,"./es-us":146,"./es-us.js":146,"./es.js":143,"./et":147,"./et.js":147,"./eu":148,"./eu.js":148,"./fa":149,"./fa.js":149,"./fi":150,"./fi.js":150,"./fil":151,"./fil.js":151,"./fo":152,"./fo.js":152,"./fr":153,"./fr-ca":154,"./fr-ca.js":154,"./fr-ch":155,"./fr-ch.js":155,"./fr.js":153,"./fy":156,"./fy.js":156,"./ga":157,"./ga.js":157,"./gd":158,"./gd.js":158,"./gl":159,"./gl.js":159,"./gom-deva":160,"./gom-deva.js":160,"./gom-latn":161,"./gom-latn.js":161,"./gu":162,"./gu.js":162,"./he":163,"./he.js":163,"./hi":164,"./hi.js":164,"./hr":165,"./hr.js":165,"./hu":166,"./hu.js":166,"./hy-am":167,"./hy-am.js":167,"./id":168,"./id.js":168,"./is":169,"./is.js":169,"./it":170,"./it-ch":171,"./it-ch.js":171,"./it.js":170,"./ja":172,"./ja.js":172,"./jv":173,"./jv.js":173,"./ka":174,"./ka.js":174,"./kk":175,"./kk.js":175,"./km":176,"./km.js":176,"./kn":177,"./kn.js":177,"./ko":178,"./ko.js":178,"./ku":179,"./ku.js":179,"./ky":180,"./ky.js":180,"./lb":181,"./lb.js":181,"./lo":182,"./lo.js":182,"./lt":183,"./lt.js":183,"./lv":184,"./lv.js":184,"./me":185,"./me.js":185,"./mi":186,"./mi.js":186,"./mk":187,"./mk.js":187,"./ml":188,"./ml.js":188,"./mn":189,"./mn.js":189,"./mr":190,"./mr.js":190,"./ms":191,"./ms-my":192,"./ms-my.js":192,"./ms.js":191,"./mt":193,"./mt.js":193,"./my":194,"./my.js":194,"./nb":195,"./nb.js":195,"./ne":196,"./ne.js":196,"./nl":197,"./nl-be":198,"./nl-be.js":198,"./nl.js":197,"./nn":199,"./nn.js":199,"./oc-lnc":200,"./oc-lnc.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tk":223,"./tk.js":223,"./tl-ph":224,"./tl-ph.js":224,"./tlh":225,"./tlh.js":225,"./tr":226,"./tr.js":226,"./tzl":227,"./tzl.js":227,"./tzm":228,"./tzm-latn":229,"./tzm-latn.js":229,"./tzm.js":228,"./ug-cn":230,"./ug-cn.js":230,"./uk":231,"./uk.js":231,"./ur":232,"./ur.js":232,"./uz":233,"./uz-latn":234,"./uz-latn.js":234,"./uz.js":233,"./vi":235,"./vi.js":235,"./x-pseudo":236,"./x-pseudo.js":236,"./yo":237,"./yo.js":237,"./zh-cn":238,"./zh-cn.js":238,"./zh-hk":239,"./zh-hk.js":239,"./zh-mo":240,"./zh-mo.js":240,"./zh-tw":241,"./zh-tw.js":241};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=s,e.exports=a,a.id=298},434:function(e,t,n){"use strict";n.r(t);var r=n(1),a=n(24),s=n(6),l=n(25),o=(n(297),n(285)),i=n(56),c=n(39),p=n(12),d=n(11),u=n(9),m=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let h=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Uptime: ",this.props.nodeStore.uptime)}};h=m([Object(s.b)("nodeStore"),s.c],h);var f=h,b=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let g=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Version: ",this.props.nodeStore.status.version)}};g=b([Object(s.b)("nodeStore"),s.c],g);var y=g,E=n(15),v=n(29),I={elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0},k=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const x=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let S=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Blocks Per Second"),r.createElement("small",null,"BPS: ",this.props.nodeStore.last_mps_metric.mps,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.mpsSeries,options:x})))}};S=k([Object(s.b)("nodeStore"),s.c],S);var j=S,O=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const w=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let C=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Current Tips"),r.createElement("small",null,"Tips: ",this.props.nodeStore.last_tips_metric.totaltips,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.tipsSeries,options:w})))}};C=O([Object(s.b)("nodeStore"),s.c],C);var D=C,R=n(2),_=n(28),N=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const T=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return _(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${_(Math.abs(e.value))}`}}}},I);let P=class extends r.Component{render(){let e=this.props.nodeStore.status.mem;return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Memory Usage"," ",_(e.heap_alloc)),r.createElement("small",null,"GC Cycles: ",e.num_gc," (Last Cycle: ",e.last_pause_gc/1e6,"ms) - "," ","Heap: "," ","[Obj: ",e.heap_objects,", In-Use: ",_(e.heap_sys-e.heap_idle),", Retained: ",_(e.heap_idle-e.heap_released),"]"),r.createElement(v.Line,{height:50,data:this.props.nodeStore.memSeries,options:T})))}};P=N([Object(s.b)("nodeStore"),s.c],P);var M=P,L=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const A=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let B=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Component Counter Blocks Per Second"),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("small",null,"BPS: ",this.props.nodeStore.last_component_counter_metric.store,"."),r.createElement("small",null,"Rate Setter - Estimate: ",this.props.nodeStore.last_rate_setter_metric.estimate)),r.createElement(v.Line,{height:50,data:this.props.nodeStore.componentSeries,options:A})))}};B=L([Object(s.b)("nodeStore"),s.c],B);var z=B,H=n(14),F=n(20),V=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Z=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"TangleTime Synced: ",this.props.nodeStore.status.tangleTime.synced?"Yes":"No"),r.createElement("small",null,r.createElement("div",null,r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Accepted Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.acceptedBlockID},this.props.nodeStore.status.tangleTime.acceptedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.confirmedBlockID},this.props.nodeStore.status.tangleTime.confirmedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Slot:",this.props.nodeStore.status.tangleTime.confirmedSlot)),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Committed Slot:",this.props.nodeStore.status.tangleTime.committedSlot)),r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.ATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.CTT/1e6),"dd.mm.yyyy HH:MM:ss"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Relative Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Relative Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RCTT/1e6),"dd.mm.yyyy HH:MM:ss")))))))}};Z=V([Object(s.b)("nodeStore"),s.c],Z);var U=Z,W=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let J=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Bootstrapped: ",this.props.nodeStore.status.tangleTime.bootstrapped?"Yes":"No")}};J=W([Object(s.b)("nodeStore"),s.c],J);var G=J,q=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let X=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Dashboard"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Node: ",this.props.nodeStore.status.id),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(f,null)))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(G,null)))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(y,null))))))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(U,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(j,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(z,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(M,null))))}};X=q([Object(s.b)("nodeStore"),s.c],X);var Q=n(16),K=n(23),$=n(22),Y=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ee=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Address or Block ID","aria-label":"Address or Block ID","aria-describedby":"basic-addon1",value:e,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:t})))))}};ee=Y([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ee);var te=n(71),ne=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let re=class extends r.Component{render(){let{blksLiveFeed:e}=this.props.explorerStore;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Live Feed"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{height:"500px",overflow:"auto"}},r.createElement("h6",null,"Blocks"),r.createElement(te.a,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("td",null,"Id"),r.createElement("td",null,"Payload Type"))),r.createElement("tbody",null,e))))))))}};re=ne([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],re);var ae=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let se=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.txID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/transaction/"+this.txID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Transaction ID","aria-label":"Transaction ID","aria-describedby":"basic-addon1",value:this.txID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};se=ae([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],se);var le=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let oe=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.outputID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/output/"+this.outputID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Output ID","aria-label":"Output ID","aria-describedby":"basic-addon1",value:this.outputID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};oe=le([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],oe);var ie=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ce=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.conflictID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/conflict/"+this.conflictID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Conflict ID","aria-label":"Conflict ID","aria-describedby":"basic-addon1",value:this.conflictID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ce=ie([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ce);var pe=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let de=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("p",null,"Search for addresses, blocks, transactions, outputs and conflicts."))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(ee,null)),r.createElement(u.a,null,r.createElement(se,null))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(oe,null)),r.createElement(u.a,null,r.createElement(ce,null))),r.createElement(re,null),r.createElement("small",null,"This explorer implementation is heavily inspired by ",r.createElement("a",{href:"https://thetangle.org"},"thetangle.org"),"."))}};de=pe([Object(s.b)("nodeStore"),s.c],de);var ue=n(288),me=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let he=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(ue.a,{inline:!0,as:"div"},r.createElement(K.a,{type:"text",onChange:this.updateSearch,placeholder:"Search the Tangle...",value:e,className:" mr-sm-2",disabled:t,onKeyUp:this.executeSearch}))}};he=me([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],he);var fe,be=n(17),ge=n(44),ye=n(3);!function(e){e[e.Status=0]="Status",e[e.BPSMetrics=1]="BPSMetrics",e[e.Block=2]="Block",e[e.NeighborStats=3]="NeighborStats",e[e.ComponentCounterMetrics=4]="ComponentCounterMetrics",e[e.TipsMetrics=5]="TipsMetrics",e[e.Vertex=6]="Vertex",e[e.TXAccepted=7]="TXAccepted",e[e.TipInfo=8]="TipInfo",e[e.Mana=9]="Mana",e[e.ManaMapOverall=10]="ManaMapOverall",e[e.ManaMapOnline=11]="ManaMapOnline",e[e.BlkManaDashboardAddress=12]="BlkManaDashboardAddress",e[e.RateSetter=13]="RateSetter",e[e.ConflictSet=14]="ConflictSet",e[e.Conflict=15]="Conflict",e[e.SlotInfo=16]="SlotInfo"}(fe||(fe={}));let Ee={};function ve(e,t){Ee[e]=t}function Ie(e){delete Ee[e]}var ke,xe,Se,je;!function(e){e[e.TaggedData=0]="TaggedData",e[e.Transaction=1]="Transaction",e[e.Faucet=3]="Faucet"}(ke||(ke={}));class Oe{}class we{}function Ce(e){switch(e){case ke.TaggedData:return"TaggedData";case ke.Transaction:return"Transaction";case ke.Faucet:return"Faucet";default:return"Unknown"}}class De extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.token.id},r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",this.props.token.id),r.createElement(R.a.Item,null,"Amount: ",this.props.token.amount)))}}class Re extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.address},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address Type: ",this.props.unlock.address.type)),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",this.props.unlock.address.pubKeyHash)))}}class _e extends r.Component{render(){return this.props.unlock.unixTime&&r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.unixTime},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}class Ne extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(R.a.Item,null,"Amount: ",this.props.unlock.amount)))}}class Te extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(R.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}function Pe(e){switch(e.type){case xe.Address:case xe.StateControllerAddress:case xe.GovernorAddress:return r.createElement(Re,{unlock:e});case xe.StorageDepositReturn:return r.createElement(Ne,{unlock:e});case xe.Expiration:return r.createElement(Te,{unlock:e});case xe.Timelock:return r.createElement(_e,{unlock:e})}}!function(e){e[e.Address=0]="Address",e[e.StorageDepositReturn=1]="StorageDepositReturn",e[e.Timelock=2]="Timelock",e[e.Expiration=3]="Expiration",e[e.StateControllerAddress=4]="StateControllerAddress",e[e.GovernorAddress=5]="GovernorAddress",e[e.ImmutableAlias=6]="ImmutableAlias"}(xe||(xe={}));class Me extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.address},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",this.props.feature.address)))}}class Le extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.data},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Data: ",this.props.feature.data)))}}class Ae extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.tag},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Data: ",this.props.feature.tag)))}}function Be(e){switch(e.type){case Se.Sender:case Se.Issuer:return r.createElement(Me,{feature:e.feature});case Se.Metadata:return r.createElement(Le,{feature:e.feature});case Se.Tag:return r.createElement(Ae,{feature:e.feature})}}!function(e){e[e.Sender=0]="Sender",e[e.Issuer=1]="Issuer",e[e.Metadata=2]="Metadata",e[e.Tag=3]="Tag"}(Se||(Se={}));class ze extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: BasicOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class He extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,{style:{wordBreak:"break-word"}},r.createElement(R.a.Item,null,"Type: AliasOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"AliasID: ",this.props.output.aliasId),r.createElement(R.a.Item,null,"StateIndex: ",this.props.output.stateIndex),r.createElement(R.a.Item,null,"State Metadata: ",this.props.output.stateMetadata," "),r.createElement(R.a.Item,null,"Foundry Counter: ",this.props.output.foundryCounter),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Fe extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: FoundryOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"Serial Number: ",this.props.output.serialNumber),r.createElement(R.a.Item,null,"Token Scheme: ",this.props.output.tokenScheme),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Ve extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: FoundryOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"NFT ID: ",this.props.output.nftId),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}function Ze(e){let t=e.outputID;switch(e.type){case je.Basic:return r.createElement(ze,{output:e.output,id:t});case je.Alias:return r.createElement(He,{output:e.output,id:t});case je.Foundry:return r.createElement(Fe,{output:e.output,id:t});case je.NFT:return r.createElement(Ve,{output:e.output,id:t});default:return}}!function(e){e[e.Treasury=2]="Treasury",e[e.Basic=3]="Basic",e[e.Alias=4]="Alias",e[e.Foundry=5]="Foundry",e[e.NFT=6]="NFT"}(je||(je={}));var Ue=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},We=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};const Ge="1111111111111111111111111111111111111111111111111111111111111111";class qe{}var Xe;!function(e){e[e.NotFound=1]="NotFound",e[e.BadRequest=2]="BadRequest"}(Xe||(Xe={}));class Qe{constructor(e){this.latest_blocks=[],this.blk=null,this.addr=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.conflict=null,this.conflictChildren=null,this.conflictConflicts=null,this.conflictVoters=null,this.tips=null,this.slotInfo=new qe,this.query_loading=!1,this.query_err=null,this.search="",this.search_result=null,this.searching=!1,this.searchAny=()=>Je(this,void 0,void 0,(function*(){this.updateSearching(!0);try{let e=yield fetch("/api/search/"+this.search),t=yield e.json();this.updateSearchResult(t)}catch(e){this.updateQueryError(e)}})),this.resetSearch=()=>{this.search_result=null,this.searching=!1},this.updateSearchResult=e=>{this.search_result=e,this.searching=!1;let t=this.search;this.search="",this.search_result.block?this.routerStore.push("/explorer/block/"+t):this.search_result.address?this.routerStore.push("/explorer/address/"+t):this.routerStore.push("/explorer/404/"+t)},this.updateSearch=e=>{this.search=e},this.updateSearching=e=>this.searching=e,this.searchBlock=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/block/"+e);this.updateBlock(t)})),this.searchAddress=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/address/"+e);this.updateAddress(t)})),this.getSlotDetails=e=>Je(this,void 0,void 0,(function*(){yield this.getSlotInfo(e)})),this.getTransaction=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/transaction/"+e);for(let e=0;eJe(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/attachments`);this.txAttachments=t})),this.getTransactionMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/metadata`);this.txMetadata=t})),this.getOutput=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/output/"+e);this.output=t})),this.getOutputMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/metadata`);this.outputMetadata=t})),this.getOutputConsumers=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/consumers`);this.outputConsumers=t})),this.getPendingMana=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/mana/pending?OutputID="+e);this.pendingMana=t})),this.getConflict=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/conflict/"+e);this.conflict=t})),this.getConflictChildren=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/children`);this.conflictChildren=t})),this.getConflictConflicts=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/conflicts`);this.conflictConflicts=t})),this.getConflictVoters=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/voters`);this.conflictVoters=t})),this.getSlotInfo=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/slot/commitment/"+e);this.slotInfo=t})),this.getTips=()=>Je(this,void 0,void 0,(function*(){const e=yield this.fetchJson("get","/api/tips");this.tips=e})),this.reset=()=>{this.blk=null,this.query_err=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.conflict=null,this.conflictChildren=null,this.conflictConflicts=null,this.tips=null,this.slotInfo=new qe},this.updateAddress=e=>{this.addr=e,this.query_err=null,this.query_loading=!1},this.updateBlock=e=>{switch(this.blk=e,this.blk.spendIDs=this.blk.spendIDs?this.blk.spendIDs:[],this.blk.addedSpendIDs=this.blk.addedSpendIDs?this.blk.addedSpendIDs:[],this.blk.subtractedSpendIDs=this.blk.subtractedSpendIDs?this.blk.subtractedSpendIDs:[],this.blk.strongChildren=this.blk.strongChildren?this.blk.strongChildren:[],this.blk.weakChildren=this.blk.weakChildren?this.blk.weakChildren:[],this.blk.shallowLikeChildren=this.blk.shallowLikeChildren?this.blk.shallowLikeChildren:[],this.blk.strongParents=this.blk.strongParents?this.blk.strongParents:[],this.blk.weakParents=this.blk.weakParents?this.blk.weakParents:[],this.blk.shallowLikedParents=this.blk.shallowLikedParents?this.blk.shallowLikedParents:[],this.query_err=null,this.query_loading=!1,e.payloadType){case ke.Transaction:case ke.TaggedData:this.payload=e.payload;break;case ke.Faucet:this.payload=e.payload;default:this.payload=e.payload}},this.updateQueryLoading=e=>this.query_loading=e,this.updateQueryError=e=>{this.query_err=e,this.query_loading=!1,this.searching=!1},this.addLiveFeedBlock=e=>{-1===this.latest_blocks.findIndex(t=>t.id==e.id)&&(this.latest_blocks.length>=50&&this.latest_blocks.shift(),this.latest_blocks.push(e))},this.routerStore=e,ve(fe.Block,this.addLiveFeedBlock)}get blksLiveFeed(){let e=[];for(let t=this.latest_blocks.length-1;t>=0;t--){let n=this.latest_blocks[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id)),r.createElement("td",null,Ce(n.payload_type))))}return e}get tipsList(){let e=[];if(this.tips)for(let t=0;t=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let et=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,e.content_title,": "," ",e.content)))}};et=Ye([Object(s.b)("explorerStore"),s.c],et);var tt,nt=n(0),rt=n(282);!function(e){e[e.Ed25519=0]="Ed25519",e[e.BLS=1]="BLS"}(tt||(tt={}));class at extends r.Component{render(){let e=this.props.signature;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Public Key: ",e.publicKey),r.createElement(R.a.Item,null,"Signature: ",e.signature)))))}}class st extends r.Component{renderSignatureComponent(){switch(this.props.block.signatureType){case tt.Ed25519:return r.createElement(at,{signature:this.props.block.signature})}}render(){let e=this.props.block;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,"Index: ",r.createElement(Q.a,{variant:"primary"},this.props.key),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: ",e.type),e.signatureType&&r.createElement(R.a.Item,null,"Signature Type: ",function(e){switch(e){case tt.Ed25519:return"Ed25519 Signature";case tt.BLS:return"BLS Signature";default:return"Unknown Signature Type"}}(e.signatureType)),this.renderSignatureComponent())))}}const lt={maxHeight:"1000px",overflow:"auto",width:"47%",fontSize:"85%"};class ot extends r.Component{render(){let e=this.props.txID,t=this.props.tx;return t&&e&&r.createElement("div",null,r.createElement("h4",null,"Transaction"),r.createElement("p",null," ",e," "),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginTop:"10px",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Transaction Essence")),r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",r.createElement("a",{href:"/explorer/transaction/"+e}," ",e)),r.createElement(R.a.Item,null,"Network ID: ",t.networkId),r.createElement(R.a.Item,null,"Creation Time: ",t.creationSlot),r.createElement(R.a.Item,null,r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",{className:"align-self-start input-output-list",style:lt},r.createElement("span",null,"Inputs"),r.createElement("hr",null),t.inputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),r.createElement("div",{className:"mb-2",key:"input"+t},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Output ID: ",e.referencedOutputID.hex)))))),r.createElement(nt.b.Provider,{value:{color:"#00a0ff",size:"2em"}},r.createElement("div",null,r.createElement(rt.a,null))),r.createElement("div",{style:lt},r.createElement("span",null,"Outputs"),r.createElement("hr",null),t.outputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),Ze(e)))))),t.payload&&r.createElement(R.a.Item,null,"Data payload: ",t.payload)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Unlock Blocks")),r.createElement(r.Fragment,null,t.unlocks.map((e,t)=>r.createElement(st,{block:e,key:t}))))))}}var it=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ct=class extends r.Component{render(){let{payload:e,blk:t}=this.props.explorerStore,n=t.txId,a=e;return r.createElement(p.a,null,r.createElement(ot,{txID:n,tx:a}))}};function pt(e){switch(e){case dt:return"MasterConflictID";case ut:return"UndefinedConflictID";case mt:return"LazyBookedConflictsConflictID";case ht:return"InvalidConflictID";default:return e}}ct=it([Object(s.b)("explorerStore"),s.c],ct);const dt="4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM",ut="11111111111111111111111111111111",mt="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF",ht="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG";var ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let bt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",e.address),r.createElement(R.a.Item,null,"Access Mana Pledge ID: ",e.accessManaPledgeID),r.createElement(R.a.Item,null,"Consensus Mana Pledge ID: ",e.consensusManaPledgeID),r.createElement(R.a.Item,null,"Nonce: ",e.nonce)))))}};bt=ft([Object(s.b)("explorerStore"),s.c],bt);var gt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let yt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Tag: ",e.tag),r.createElement(R.a.Item,null,"Data: ",e.data)))))}};yt=gt([Object(s.b)("explorerStore"),s.c],yt);var Et=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let vt=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchBlock(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchBlock(this.props.match.params.id),null}getPayloadType(){return Ce(this.props.explorerStore.blk.payloadType)}renderPayload(){switch(this.props.explorerStore.blk.payloadType){case ke.Transaction:return this.props.explorerStore.blk.objectivelyInvalid?r.createElement(et,null):r.createElement(ct,null);case ke.TaggedData:return r.createElement(yt,null);case ke.Faucet:return r.createElement(bt,null);default:return r.createElement(et,null)}}render(){let{id:e}=this.props.match.params,{blk:t,query_loading:n,query_err:a}=this.props.explorerStore;return e===Ge?r.createElement(p.a,null,r.createElement("h3",null,"Genesis Block"),r.createElement("p",null,"In the beginning there was the genesis.")):a?r.createElement(p.a,null,r.createElement("h3",null,"Block not available - 404"),r.createElement("p",null,"Block with ID ",e," not found.")):r.createElement(p.a,null,r.createElement("h3",null,"Block"),r.createElement("p",null,e," "," ",t&&r.createElement(r.Fragment,null,r.createElement("br",null),r.createElement("span",null,r.createElement(Q.a,{variant:"light",style:{marginRight:10}},"Issuance Time: ",F(new Date(1e3*t.issuanceTimestamp),"dd.mm.yyyy HH:MM:ss")),r.createElement(Q.a,{variant:"light"},"Solidification Time: ",F(new Date(1e3*t.solidificationTimestamp),"dd.mm.yyyy HH:MM:ss"))))),t&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Payload Type: ",this.getPayloadType()),r.createElement(R.a.Item,null,"Sequence Number: ",t.sequenceNumber),r.createElement(R.a.Item,null,"spendIDs:",r.createElement(R.a,null,t.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"AddedspendIDs:",r.createElement(R.a,null,t.addedSpendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"AddedConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"SubtractedspendIDs:",r.createElement(R.a,null,t.subtractedSpendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"SubtractedConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"Solid: ",t.solid?"Yes":"No"),r.createElement(R.a.Item,null,"Scheduled: ",t.scheduled?"Yes":"No"),r.createElement(R.a.Item,null,"Booked: ",t.booked?"Yes":"No"),r.createElement(R.a.Item,null,"Orphaned: ",t.orphaned?"Yes":"No"),r.createElement(R.a.Item,null,"Objectively Invalid: ",t.objectivelyInvalid?"Yes":"No"),r.createElement(R.a.Item,null,"Subjectively Invalid: ",t.subjectivelyInvalid?"Yes":"No"),r.createElement(R.a.Item,null,"Acceptance: ",t.acceptance?"Yes":"No"),r.createElement(R.a.Item,null,"Acceptance Time: ",F(new Date(1e3*t.acceptanceTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(R.a.Item,null,"Confirmation: ",t.confirmation?"Yes":"No"),r.createElement(R.a.Item,null,"Confirmation Time: ",F(new Date(1e3*t.confirmationTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(R.a.Item,null,"Confirmation by slot: ",t.confirmationBySlot?"Yes":"No"),r.createElement(R.a.Item,null,"Confirmation by slot time: ",F(new Date(1e3*t.confirmationBySlotTime),"dd.mm.yyyy HH:MM:ss"))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Slot Commitment"),r.createElement(R.a,null,r.createElement(R.a.Item,null,"CommitmentID: ",t.commitmentID),r.createElement(R.a.Item,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Index: ",t.commitment.index),r.createElement(R.a.Item,null,"prevID: ",t.commitment.prevID),r.createElement(R.a.Item,null,"rootsID: ",t.commitment.rootsID),r.createElement(R.a.Item,null,"Cumulative Weight: ",t.commitment.cumulativeWeight))),r.createElement(R.a.Item,null,"LatestConfirmedSlot: ",t.latestConfirmedSlot)))),!!t.rank&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Markers"),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Rank: ",t.rank),r.createElement(R.a.Item,null,"SequenceID: ",t.sequenceID),r.createElement(R.a.Item,null,"PastMarkerGap: ",t.pastMarkerGap),r.createElement(R.a.Item,null,"IsPastMarker: ",t.isPastMarker?"Yes":"No"),r.createElement(R.a.Item,null,"Past markers: ",t.pastMarkers)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"IssuerID: ",t.issuerID),r.createElement(R.a.Item,{style:{overflow:"auto"}},"Block Signature: ",t.signature)))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.strongParents.map((e,n)=>r.createElement(R.a.Item,{key:"Strong Parent"+n+1,className:"text-break"},"Strong Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongParents[n]},t.strongParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.weakParents.map((e,n)=>r.createElement(R.a.Item,{key:"Weak Parent"+n+1,className:"text-break"},"Weak Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakParents[n]},t.weakParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.shallowLikedParents.map((e,n)=>r.createElement(R.a.Item,{key:"Shallow Liked Parent"+n+1,className:"text-break"},"Shallow Liked Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikedParents[n]},t.shallowLikedParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.strongChildren.map((e,n)=>r.createElement(R.a.Item,{key:"Strong Child"+n+1,className:"text-break"},"Strong Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongChildren[n]},t.strongChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.weakChildren.map((e,n)=>r.createElement(R.a.Item,{key:"Weak Child"+n+1,className:"text-break"},"Weak Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakChildren[n]},t.weakChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.shallowLikeChildren.map((e,n)=>r.createElement(R.a.Item,{key:"ShallowLike Child"+n+1,className:"text-break"},"ShallowLike Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikeChildren[n]},t.shallowLikeChildren[n])))))),r.createElement(d.a,{className:"mb-3",style:{marginTop:"20px",marginBottom:"20px"}},r.createElement(u.a,null,r.createElement("h3",null,"Payload"))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,this.renderPayload()))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};vt=Et([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],vt);var It=n(289);function kt(e){let t="",n=Math.round(e);return t=n<1e3?n.toString(10)+" m":n<1e6?(n/1e3).toFixed(3)+" Km":n<1e9?(n/1e6).toFixed(3)+" Mm":n<1e12?(n/1e9).toFixed(3)+" Gm":n<1e15?(n/1e12).toFixed(3)+" Tm":(n/1e15).toFixed(3)+" Pm",t}var xt=n(281),St=n(99),jt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ot=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchAddress(this.props.match.params.id)}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchAddress(this.props.match.params.id),null}render(){let{id:e}=this.props.match.params,{addr:t,query_loading:n,query_err:a}=this.props.explorerStore,s=[],l=[],o=[];if(a)return r.createElement(p.a,null,r.createElement("h3",null,"Address not available - 404"),r.createElement("p",null,"Address ",e," not found."));if(t){t.explorerOutputs.forEach(e=>{e.metadata.consumerCount>0?s.push(e):l.push(e)});let e=(e,t)=>t.txTimestamp===e.txTimestamp?t.id.transactionID==e.id.transactionID?t.id.outputIndex-e.id.outputIndex:t.id.transactionID.localeCompare(e.id.transactionID):t.txTimestamp-e.txTimestamp;l.sort(e),s.sort(e)}return r.createElement(p.a,null,r.createElement("h3",{style:{marginBottom:"40px"}},"Address ",r.createElement("strong",null,e)," ",null!==t&&r.createElement("span",null,"(",t.explorerOutputs.length," Outputs)")),null!==t?r.createElement(r.Fragment,null,null!==t.explorerOutputs&&100===t.explorerOutputs.length&&r.createElement(It.a,{variant:"warning"},"Max. 100 outputs are shown."),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:7},r.createElement(R.a,null,r.createElement("h4",null,"Available Balances"),0===o.length?"There are no balances currently available.":r.createElement("div",null,r.createElement(xt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:9},r.createElement("strong",null,"Color")),r.createElement(u.a,null,r.createElement("strong",null,"Balance")))),o)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement("h4",null,"Unspent Outputs"),0===l.length?"There are no unspent outputs currently available.":r.createElement("div",null,l.map(e=>r.createElement(wt,{output:e})))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement("h4",null,"Spent Outputs"),0===s.length?"There are no spent outputs currently available.":r.createElement("div",null,s.map(e=>r.createElement(wt,{output:e}))))))):r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};Ot=jt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ot);class wt extends r.Component{constructor(e){super(e),this.state={enabled:!1}}render(){return r.createElement(R.a.Item,null,r.createElement(St.a,{variant:Dt(this.props.output.output.type),onClick:()=>{this.setState({enabled:!this.state.enabled})},block:!0},r.createElement(d.a,null,r.createElement(u.a,{xs:6,style:{textAlign:"left"}},this.props.output.id.base58," "),r.createElement(u.a,{style:{textAlign:"left"}},function(e){switch(e){case je.Basic:return"Basic Output";case je.Alias:return"Alias Output";case je.Foundry:return"Foundry Output";case je.NFT:return"NFT Output";default:return}}(this.props.output.output.type)," "),r.createElement(u.a,{style:{textAlign:"left"}},new Date(1e3*this.props.output.txTimestamp).toLocaleString()))),r.createElement(d.a,{style:{fontSize:"90%"}},r.createElement(u.a,null,this.state.enabled?Ze(this.props.output.output):null),r.createElement(u.a,null,this.state.enabled?r.createElement(Ct,{metadata:this.props.output.metadata,timestamp:this.props.output.txTimestamp,pendingMana:this.props.output.pendingMana}):null)))}}class Ct extends r.Component{render(){let e=this.props.metadata,t=this.props.timestamp,n=this.props.pendingMana;return r.createElement(R.a,null,"spendIDs:",r.createElement(R.a,null,e.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e))))),r.createElement(R.a.Item,null,"Pending mana: ",kt(n)),r.createElement(R.a.Item,null,"Timestamp: ",new Date(1e3*t).toLocaleString()),r.createElement(R.a.Item,null,"Consumer Count: ",e.consumerCount),e.confirmedConsumer&&r.createElement(R.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+e.confirmedConsumer},e.confirmedConsumer)," "))}}let Dt=e=>{switch(e){case je.Basic:case je.Alias:return"light";case je.Foundry:return"success";case je.NFT:return"info";default:return"danger"}};var Rt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let _t=class extends r.Component{render(){let{search:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer 404"),r.createElement("p",null,"The search via '",e,"' did not yield any results."))}};_t=Rt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],_t);var Nt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const Tt=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return _(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${_(Math.abs(e.value))}`}}}},I);let Pt=class extends r.Component{render(){let e=this.props.nodeStore.neighbor_metrics.get(this.props.identity),t=e.current;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,r.createElement("h5",null,t.id)),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush",as:"small"},r.createElement(R.a.Item,null,"Origin:"," ",t.connection_origin))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush",as:"small"},r.createElement(R.a.Item,null,"Address: ",t.address)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h6",null,"Network (Tx/Rx)"),r.createElement(Q.a,{pill:!0,variant:"light"},"Total: ",t.packets_written," / ",t.packets_read)," ",r.createElement(Q.a,{pill:!0,variant:"light"},"Current: ",_(e.currentNetIO&&e.currentNetIO.tx)," / ",_(e.currentNetIO&&e.currentNetIO.rx)),r.createElement(v.Line,{height:30,data:e.netIOSeries,options:Tt})))))))}};Pt=Nt([Object(s.b)("nodeStore"),s.c],Pt);var Mt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Lt=class extends r.Component{render(){let e=[];return this.props.nodeStore.neighbor_metrics.forEach((t,n)=>{e.push(r.createElement(Pt,{key:n,identity:n}))}),r.createElement(p.a,null,r.createElement("h3",null,"Neighbors ",e.length>0&&r.createElement("span",null,"(",e.length,")")),r.createElement("p",null,"Currently connected neighbors."),e)}};Lt=Mt([Object(s.b)("nodeStore"),s.c],Lt);var At=n(57),Bt=n(103),zt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ht=class extends r.Component{constructor(){super(...arguments),this.updateVerticesLimit=e=>{this.props.visualizerStore.updateVerticesLimit(e.target.value)},this.pauseResumeVisualizer=e=>{this.props.visualizerStore.pauseResume()},this.updateSearch=e=>{this.props.visualizerStore.updateSearch(e.target.value)},this.searchAndHighlight=e=>{"Enter"===e.key&&this.props.visualizerStore.searchAndHighlight()},this.toggleBackgroundDataCollection=()=>{this.props.nodeStore.collecting?this.props.nodeStore.unregisterHandlers():this.props.nodeStore.registerHandlers()}}componentDidMount(){this.props.visualizerStore.start()}componentWillUnmount(){this.props.visualizerStore.stop(),this.props.nodeStore.registerHandlers()}render(){let{vertices:e,finalized_count:t,selected:n,verticesLimit:a,tips_count:s,paused:l,search:o}=this.props.visualizerStore,{last_mps_metric:i,collecting:c}=this.props.nodeStore;return r.createElement(p.a,null,r.createElement("h3",null,"Visualizer"),r.createElement(d.a,{className:"mb-1"},r.createElement(u.a,{xs:5},r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Vertices Limit")),r.createElement(K.a,{placeholder:"limit",type:"number",value:a.toString(),onChange:this.updateVerticesLimit,"aria-label":"vertices-limit","aria-describedby":"vertices-limit"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Search Vertex")),r.createElement(K.a,{placeholder:"search",type:"text",value:o,onChange:this.updateSearch,"aria-label":"vertices-search",onKeyUp:this.searchAndHighlight,"aria-describedby":"vertices-search"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Ensures that only data needed for the visualizer is collected."))},r.createElement(St.a,{variant:"outline-secondary",onClick:this.toggleBackgroundDataCollection,size:"sm"},c?"Stop Background Data Collection":"Collect Background data")),r.createElement("br",null)),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Pauses/resumes rendering the graph."))},r.createElement(St.a,{onClick:this.pauseResumeVisualizer,size:"sm",variant:"outline-secondary"},l?"Resume Rendering":"Pause Rendering")))),r.createElement(u.a,{xs:{span:5,offset:2}},r.createElement("p",null,r.createElement(Q.a,{pill:!0,style:{background:"#b9b7bd",color:"white"}},"BLK Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#6c71c4",color:"white"}},"BLK Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#393e46",color:"white"}},"TX Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#fad02c",color:"white"}},"TX Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#cb4b16",color:"white"}},"Tip")," ",r.createElement(Q.a,{pill:!0,style:{background:"#b58900",color:"white"}},"Unknown"),r.createElement("br",null),"Vertices: ",e.size,", Tips: ",s,", Confirmed/UnConfirmed: ",t,"/",e.size-t,","," ","BPS: ",i.mps,r.createElement("br",null),"Selected: ",n?r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id.substr(0,10)):"-",r.createElement("br",null),n?n.strongParents&&r.createElement("span",null," Strong:"," ",n.strongParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.weakParents&&r.createElement("span",null," Weak:"," ",n.weakParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.shallowLikedParents&&r.createElement("span",null," Shallow Liked:"," ",n.shallowLikedParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):""))),r.createElement("div",{className:"visualizer",style:{zIndex:-1,position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#ededed"},id:"visualizer"}))}};Ht=zt([Object(s.b)("visualizerStore"),Object(s.b)("nodeStore"),s.c],Ht);var Ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Vt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTips()}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{tipsList:e}=this.props.explorerStore;return r.createElement(p.a,null,r.createElement("h3",null,"Tips"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BlockID"))),r.createElement("tbody",null,e)))}};Vt=Ft([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Vt);var Zt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ut=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransaction(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,tx:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Transaction not available - 404"),r.createElement("p",null,"Transaction with ID ",e," not found.")):r.createElement(ot,{txID:e,tx:n})}};Ut=Zt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ut);var Wt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Jt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionMetadata(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,txMetadata:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Metadata"),r.createElement("p",null," Metadata for transaction ID ",e," not found.")):r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Metadata"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ConflictIDs:",r.createElement(R.a,null,n.conflictIDs&&n.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement("a",{href:"/explorer/transaction/"+e},e))))),r.createElement(R.a.Item,null,"Booked: ",n.booked.toString()),r.createElement(R.a.Item,null,"Confirmation State: ",n.confirmationState)))}};Jt=Wt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Jt);var Gt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let qt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionAttachments(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txAttachments:e}=this.props.explorerStore;return r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Attachments"),e&&e.blockIDs&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,e.blockIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))}};qt=Gt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],qt);class Xt extends r.Component{render(){let{id:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement(Ut,{txId:e}),r.createElement(Jt,{txId:e}),r.createElement(qt,{txId:e}))}}var Qt;function Kt(e){switch(e){case Qt.Undefined:return"Undefined";case Qt.Rejected:return"Rejected";case Qt.Pending:return"Pending";case Qt.Accepted:return"Accepted";case Qt.Confirmed:return"Confirmed";default:return"Undefined Confirmation State"}}!function(e){e[e.Undefined=0]="Undefined",e[e.Rejected=1]="Rejected",e[e.Pending=2]="Pending",e[e.Accepted=3]="Accepted",e[e.Confirmed=4]="Confirmed"}(Qt||(Qt={}));var $t=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Yt=class extends r.Component{componentDidMount(){this.props.explorerStore.getOutput(this.props.match.params.id),this.props.explorerStore.getPendingMana(this.props.match.params.id),this.props.explorerStore.getOutputMetadata(this.props.match.params.id),this.props.explorerStore.getOutputConsumers(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,output:n,pendingMana:a,outputMetadata:s,outputConsumers:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Output not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Output"),n&&r.createElement("div",{className:"mb-2"},Ze(n),r.createElement(R.a,null,a&&r.createElement(R.a.Item,null,"Pending Mana",r.createElement("hr",null),r.createElement("div",null,"Value: ",kt(a.mana)),r.createElement("div",null,"Timestamp: ",new Date(1e3*a.timestamp).toLocaleString())))),r.createElement("h4",null,"Metadata"),s&&r.createElement("div",{className:"mb-2"},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+s.outputID.transactionID},s.outputID.transactionID)," "),"spendIDs:",r.createElement(R.a,null,s.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e))))),r.createElement(R.a.Item,null,"Consumer Count: ",s.consumerCount),r.createElement(R.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+s.confirmedConsumer},s.confirmedConsumer)," "),r.createElement(R.a.Item,null,"Confirmation State: ",Kt(s.confirmationState)),r.createElement(R.a.Item,null,"Confirmation State Time: ",new Date(1e3*s.confirmationStateTime).toLocaleString()))),r.createElement("h4",null,"Consumers"),l&&r.createElement("div",null,r.createElement(R.a,null,l.consumers.map((e,t)=>{return r.createElement(R.a.Item,{key:t},r.createElement("div",null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+e.transactionID},e.transactionID)),r.createElement("div",null,"Valid: ","true"===(n=e.valid)?r.createElement(Q.a,{variant:"success"},"True"):"false"===n?r.createElement(Q.a,{variant:"danger"},"False"):r.createElement(Q.a,{variant:"warning"},"Maybe")," "));var n}))))}};Yt=$t([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Yt);var en=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let tn=class extends r.Component{componentDidMount(){this.props.explorerStore.getConflict(this.props.match.params.id),this.props.explorerStore.getConflictChildren(this.props.match.params.id),this.props.explorerStore.getConflictConflicts(this.props.match.params.id),this.props.explorerStore.getConflictVoters(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,conflict:n,conflictChildren:a,conflictConflicts:s,conflictVoters:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Conflict not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Conflict"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",pt(n.id)),r.createElement(R.a.Item,null,"Parents:",r.createElement(R.a,null,n.parents.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"Conflicts:",n.spendIDs&&r.createElement(R.a,null,n.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))),r.createElement(R.a.Item,null,"ConfirmationState: ",Kt(n.confirmationState)),r.createElement(R.a.Item,null," Children:",a&&r.createElement(R.a,null,a.childConflicts.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e.conflictID},pt(e.conflictID)))))),r.createElement(R.a.Item,null," Conflicts:",s&&r.createElement(R.a,null,s.conflicts.map((e,t)=>r.createElement("div",{key:t},"OutputID: ",r.createElement("a",{href:"/explorer/output/"+e.outputID.base58},e.outputID.base58),r.createElement(R.a,{className:"mb-2"},e.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e},pt(e))))))))),r.createElement(R.a.Item,null," Voters:",l&&r.createElement(R.a,null,l.voters.map((e,t)=>r.createElement(R.a.Item,{key:e+t},e))))))}};tn=en([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],tn);var nn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let rn=class extends r.Component{render(){let{slotLiveFeed:e}=this.props.slotStore;return r.createElement(p.a,null,r.createElement("h3",null,"Slots"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Index"),r.createElement("th",null,"Commitment ID"))),r.createElement("tbody",null,e)))}};rn=nn([Object(s.b)("nodeStore"),Object(s.b)("slotStore"),s.c],rn);var an=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let sn=class extends r.Component{componentDidMount(){const e=this.props.match.params.commitment;this.props.explorerStore.getSlotDetails(e)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{commitment:e}=this.props.match.params,{query_err:t,slotInfo:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Slot not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Slot"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",e),r.createElement(R.a.Item,null,"Index: ",n.index),r.createElement(R.a.Item,null,"RootsID: ",n.rootsID),r.createElement(R.a.Item,null,"PrevEC: ",n.prevID),r.createElement(R.a.Item,null,"Cumulative Weight: ",n.cumulativeWeight),r.createElement(R.a.Item,null,"Blocks:",n.blocks&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.blocks.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))))),r.createElement(R.a.Item,null,"Transactions:",n.transactions&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.transactions.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/transaction/"+e},e)))))))))),r.createElement(R.a.Item,null," Created outputs:",n.createdOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.createdOutputs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e)))))))))),r.createElement(R.a.Item,null," Spent outputs:",n.spentOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.spentOutputs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))))))))))}};sn=an([Object(s.b)("explorerStore"),s.c],sn);var ln=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let on=class extends r.Component{renderDevTool(){0}componentDidMount(){this.props.nodeStore.connect()}render(){return r.createElement("div",{className:"container"},r.createElement(i.a,{expand:"lg",bg:"light",variant:"light",className:"mb-4"},r.createElement(i.a.Brand,null,"iota-core"),r.createElement(c.a,{className:"mr-auto"},r.createElement(ge.LinkContainer,{to:"/dashboard"},r.createElement(c.a.Link,null,"Dashboard")),r.createElement(ge.LinkContainer,{to:"/neighbors"},r.createElement(c.a.Link,null,"Neighbors")),r.createElement(ge.LinkContainer,{to:"/explorer"},r.createElement(c.a.Link,null,"Explorer")),r.createElement(ge.LinkContainer,{to:"/visualizer"},r.createElement(c.a.Link,null,"Visualizer")),r.createElement(ge.LinkContainer,{to:"/slots"},r.createElement(c.a.Link,null,"Slot")),r.createElement(ge.LinkContainer,{to:"/tips"},r.createElement(c.a.Link,null,"Tips"))),r.createElement(i.a.Collapse,{className:"justify-content-end"},r.createElement(he,null),r.createElement(i.a.Text,null,!this.props.nodeStore.websocketConnected&&r.createElement(Q.a,{variant:"danger"},"WS not connected!")))),r.createElement(be.g,null,r.createElement(be.d,{exact:!0,path:"/dashboard",component:X}),r.createElement(be.d,{exact:!0,path:"/neighbors",component:Lt}),r.createElement(be.d,{exact:!0,path:"/explorer/block/:id",component:vt}),r.createElement(be.d,{exact:!0,path:"/explorer/address/:id",component:Ot}),r.createElement(be.d,{exact:!0,path:"/explorer/transaction/:id",component:Xt}),r.createElement(be.d,{exact:!0,path:"/explorer/output/:id",component:Yt}),r.createElement(be.d,{exact:!0,path:"/explorer/conflict/:id",component:tn}),r.createElement(be.d,{exact:!0,path:"/explorer/slot/commitment/:commitment",component:sn}),r.createElement(be.d,{exact:!0,path:"/explorer/404/:search",component:_t}),r.createElement(be.d,{exact:!0,path:"/slots",component:rn}),r.createElement(be.d,{exact:!0,path:"/tips",component:Vt}),r.createElement(be.d,{exact:!0,path:"/explorer",component:de}),r.createElement(be.d,{exact:!0,path:"/visualizer",component:Ht}),r.createElement(be.d,{exact:!0,path:"/visualizer/history",component:Ht}),r.createElement(be.c,{to:"/dashboard"})),this.props.children,this.renderDevTool())}};on=ln([Object(s.b)("nodeStore"),Object(s.b)("routerStore"),s.c],on);const cn=Object(o.hot)(({history:e})=>r.createElement(on,{history:e}));var pn=n(102),dn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},un=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class mn{}class hn{constructor(){this.mem=new bn,this.scheduler=new En}}class fn{}class bn{}class gn{}class yn{}class En{}class vn{constructor(){this.collected=[],this.network_io=[]}addMetric(e){e.ts=F(Date.now(),"HH:MM:ss"),this.collected.push(e),this.collected.length>Sn&&this.collected.shift();let t=this.currentNetIO;t&&(this.network_io.length>Sn&&this.network_io.shift(),this.network_io.push(t))}get current(){return this.collected[this.collected.length-1]}get secondLast(){let e=this.collected.length-2;if(!(e<0))return this.collected[e]}get currentNetIO(){return this.current&&this.secondLast?{tx:this.current.packets_written-this.secondLast.packets_written,rx:this.current.packets_read-this.secondLast.packets_read,ts:F(new Date,"HH:MM:ss")}:null}get netIOSeries(){let e=Object.assign({},kn,xn("Tx","rgba(53, 180, 219,1)","rgba(53, 180, 219,0.4)")),t=Object.assign({},kn,xn("Rx","rgba(235, 134, 52)","rgba(235, 134, 52,0.4)")),n=[];for(let r=0;r{ve(fe.Status,this.updateStatus),ve(fe.BPSMetrics,e=>{this.addBPSMetric(this.updateLastBPSMetric(e))}),ve(fe.NeighborStats,this.updateNeighborMetrics),ve(fe.TipsMetrics,this.updateLastTipsMetric),ve(fe.ComponentCounterMetrics,this.updateLastComponentMetric),ve(fe.RateSetter,this.updateLastRateSetterMetric),this.updateCollecting(!0)},this.unregisterHandlers=()=>{Ie(fe.Status),Ie(fe.BPSMetrics),Ie(fe.NeighborStats),Ie(fe.TipsMetrics),Ie(fe.ComponentCounterMetrics),Ie(fe.RateSetter),this.updateCollecting(!1)},this.updateCollecting=e=>{this.collecting=e},this.updateWebSocketConnected=e=>this.websocketConnected=e,this.updateStatus=e=>{e.mem.ts=F(Date.now(),"HH:MM:ss"),this.collected_mem_metrics.length>Sn&&this.collected_mem_metrics.shift(),this.collected_mem_metrics.push(e.mem),this.status=e,e.scheduler.ts=F(Date.now(),"HH:MM:ss"),this.collected_scheduler_metrics.length>Sn&&this.collected_scheduler_metrics.shift(),this.collected_scheduler_metrics.push(e.scheduler)},this.updateNeighborMetrics=e=>{if(!e)return;let t=[];for(let n=0;n{e.ts=F(Date.now(),"HH:MM:ss"),this.last_rate_setter_metric=e,this.collected_rate_setter_metrics.length>Sn&&this.collected_rate_setter_metrics.shift(),this.collected_rate_setter_metrics.push(e)},this.updateLastBPSMetric=e=>{let t=new mn;return t.mps=e,t.ts=F(Date.now(),"HH:MM:ss"),this.last_mps_metric=t,t},this.addBPSMetric=e=>{this.collected_mps_metrics.length>Sn&&this.collected_mps_metrics.shift(),this.collected_mps_metrics.push(e)},this.updateLastTipsMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_tips_metric=e,this.collected_tips_metrics.length>Sn&&this.collected_tips_metrics.shift(),this.collected_tips_metrics.push(e)},this.updateLastComponentMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_component_counter_metric=e,this.collected_component_counter_metrics.length>Sn&&this.collected_component_counter_metrics.shift(),this.collected_component_counter_metrics.push(e)},this.status.tangleTime=new fn,this.status.tangleTime.ATT=0,this.status.tangleTime.RATT=0,this.status.tangleTime.CTT=0,this.status.tangleTime.RCTT=0,this.registerHandlers()}reset(){this.collected_mps_metrics=[],this.collected_mem_metrics=[],this.collected_scheduler_metrics=[],this.neighbor_metrics=new ye.ObservableMap,this.collected_tips_metrics=[],this.collected_component_counter_metrics=[]}reconnect(){this.updateWebSocketConnected(!1),setTimeout(()=>{this.connect()},5e3)}connect(){!function(e,t,n,r){let a=window.location,s="ws:";"https:"===a.protocol&&(s="wss:"),s+="//"+a.host+e;let l=new WebSocket(s);l.onopen=t,l.onclose=n,l.onerror=r,l.onmessage=e=>{let t=JSON.parse(e.data),n=Ee[t.type];n&&n(t.data)}}("/ws",()=>this.updateWebSocketConnected(!0),()=>this.reconnect(),()=>this.updateWebSocketConnected(!1))}get mpsSeries(){let e=Object.assign({},kn,xn("BPS","rgba(67, 196, 99,1)","rgba(67, 196, 99,0.4)")),t=[];for(let n=0;n1&&(a+=e+" Days, "),t>=0&&(a+=t<10?"0"+t+":":t+":"),n>=0&&(a+=n<10?"0"+n+":":n+":"),r>=0&&(a+=r<10?"0"+r:r),a}get memSeries(){let e=Object.assign({},kn,xn("Heap Sys","rgba(168, 50, 76,1)","rgba(168, 50, 76,0.4)")),t=Object.assign({},kn,xn("Heap Alloc","rgba(222, 49, 87,1)","rgba(222, 49, 87,0.4)")),n=Object.assign({},kn,xn("Heap Idle","rgba(222, 49, 182,1)","rgba(222, 49, 182,0.4)")),r=Object.assign({},kn,xn("Heap Released","rgba(250, 76, 252,1)","rgba(250, 76, 252,0.4)")),a=[];for(let s=0;s=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Dn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rn=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};!function(e){e[e.NotFound=0]="NotFound"}(On||(On={}));class _n{constructor(e){this.send_addr="",this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.sendResult=null,this.query_error="",this.sendReq=()=>Rn(this,void 0,void 0,(function*(){this.updateSending(!0);try{let e=yield fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);if(200!==e.status)return void this.updateQueryError(On.NotFound);let t=yield e.json();setTimeout(()=>{this.updateSendResult(t)},2e3)}catch(e){this.updateQueryError(e)}})),this.updateSendResult=e=>{this.sending=!1,this.sendResult=e,this.routerStore.history.push("/explorer/address/"+this.send_addr)},this.updateSend=e=>{this.send_addr=e},this.updateSendAccessManaNodeID=e=>{this.send_access_mana_node_id=e},this.updateSendConsensusManaNodeID=e=>{this.send_consensus_mana_node_id=e},this.updateSending=e=>{this.sending=e,this.query_error=""},this.reset=()=>{this.send_addr=null,this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.query_error=""},this.updateQueryError=e=>{this.sending=!1,this.query_error=e},this.routerStore=e}}Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_addr",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_access_mana_node_id",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_consensus_mana_node_id",void 0),Cn([ye.observable,Dn("design:type",Boolean)],_n.prototype,"sending",void 0),Cn([ye.observable,Dn("design:type",class{})],_n.prototype,"sendResult",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"query_error",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendResult",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSend",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendAccessManaNodeID",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendConsensusManaNodeID",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSending",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"reset",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateQueryError",void 0);var Nn=_n,Tn=n(35),Pn=n.n(Tn),Mn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Ln=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},An=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class Bn{}const zn="#b9b7bd",Hn="#6c71c4",Fn="#393e46",Vn="#fad02c",Zn="#cb4b16",Un="#b58900",Wn="#586e75",Jn="#e105f5",Gn="#51e05d",qn="#859900";class Xn{constructor(e){this.vertices=new ye.ObservableMap,this.verticesLimit=1500,this.finalized_count=0,this.tips_count=0,this.verticesIncomingOrder=[],this.draw=!1,this.selected_via_click=!1,this.selected_origin_color=0,this.search="",this.paused=!1,this.fetchHistory=()=>An(this,void 0,void 0,(function*(){try{let e=yield fetch("/api/visualizer/history");(yield e.json()).vertices.forEach(e=>{this.addVertex(e)})}catch(e){console.log("Fail to fetch history in visualizer",e)}})),this.updateSearch=e=>{this.search=e.trim()},this.searchAndHighlight=()=>{if(this.clearSelected(),!this.search)return;let e=this.vertices.keys(),t=null;for(const n of e)if(n.indexOf(this.search)>=0){t=n;break}t&&this.updateSelected(this.vertices.get(t),!1)},this.pauseResume=()=>{if(this.paused)return this.renderer.resume(),void(this.paused=!1);this.renderer.pause(),this.paused=!0},this.updateVerticesLimit=e=>{this.verticesLimit=e},this.updateTxStatus=e=>{let t=this.vertices.get(e.id);t&&(t.is_tx_accepted=e.is_tx_accepted,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t))},this.addVertex=e=>{let t=this.vertices.get(e.id);t?!t.is_blk_confirmed&&e.is_blk_confirmed&&this.finalized_count++:(e.is_blk_confirmed&&this.finalized_count++,this.verticesIncomingOrder.push(e.id),this.checkLimit()),this.vertices.set(e.id,e),this.draw&&this.drawVertex(e)},this.addTipInfo=e=>An(this,void 0,void 0,(function*(){let t=this.vertices.get(e.id);if(!t){t=new Bn,t.id=e.id;let n=yield fetch("/api/block/"+e.id);if(200===n.status){let e=yield n.json();t.strongParents=e.strongParents,t.weakParents=e.weakParents,t.shallowLikedParents=e.shallowLikedParents,t.is_blk_confirmed=e.acceptance}this.verticesIncomingOrder.push(t.id)}this.tips_count+=e.is_tip?1:t.is_tip?-1:0,t.is_tip=e.is_tip,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t)})),this.checkLimit=()=>{for(;this.verticesIncomingOrder.length>this.verticesLimit;){let e=this.verticesIncomingOrder.shift(),t=this.vertices.get(e);this.selected&&e===this.selected.id&&this.clearSelected(),this.draw&&this.graph.removeNode(e),t&&(t.is_blk_confirmed&&this.finalized_count--,t.is_tip&&this.tips_count--,this.vertices.delete(e))}},this.drawVertex=e=>{let t=this.graph.getNode(e.id);if(t){this.graphics.getNodeUI(e.id).color=$n(this.colorForVertexState(e))}else t=this.graph.addNode(e.id,e);e.strongParents&&this.linkParents(e,t,e.strongParents),e.weakParents&&this.linkParents(e,t,e.weakParents),e.shallowLikedParents&&this.linkParents(e,t,e.shallowLikedParents)},this.linkParents=(e,t,n)=>{n.forEach(n=>{if(n&&(!t.links||!t.links.some(e=>e.fromId===n))){this.graph.getNode(n)?this.graph.addLink(n,e.id):console.log("link not added, parent doesn't exist",n)}})},this.colorForVertexState=e=>e?e.is_blk_confirmed?e.is_tx?e.is_tx_accepted?Vn:Fn:Hn:e.is_tip?Zn:e.is_tx?Fn:zn:Un,this.start=()=>{this.draw=!0,this.graph=Pn.a.Graph.graph();let e=Pn.a.Graph.View.webglGraphics();const t=Pn.a.Graph.Layout.forceDirected(this.graph,{springLength:10,springCoeff:1e-4,stableThreshold:.15,gravity:-2,dragCoeff:.02,timeStep:20,theta:.8});e.node(e=>e.data?Pn.a.Graph.View.webglSquare(20,this.colorForVertexState(e.data)):Pn.a.Graph.View.webglSquare(10,this.colorForVertexState(e.data))),e.link(()=>Pn.a.Graph.View.webglLine(Wn));let n=document.getElementById("visualizer");this.renderer=Pn.a.Graph.View.renderer(this.graph,{container:n,graphics:e,layout:t});let r=Pn.a.Graph.webglInputEvents(e,this.graph);r.mouseEnter(e=>{this.clearSelected(!0),this.updateSelected(e.data)}).mouseLeave(e=>{this.clearSelected(!1)}),r.click(e=>{this.clearSelected(!0),this.updateSelected(e.data,!0)}),this.graphics=e,this.renderer.run(),this.verticesIncomingOrder.forEach(e=>{let t=this.vertices.get(e);t&&this.drawVertex(t)})},this.stop=()=>{this.draw=!1,this.renderer.dispose(),this.graph=null,this.paused=!1,this.selected=null},this.updateSelected=(e,t)=>{if(!e)return;this.selected=e,this.selected_via_click=!!t;let n=this.graphics.getNodeUI(e.id);this.selected_origin_color=n.color,n.color=$n(qn),n.size=30;let r=this.graph.getNode(e.id);Kn(this.graph,r,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Gn)},[]),Kn(this.graph,r,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Jn)},[])},this.resetLinks=()=>{this.graph.forEachLink((function(e){this.graphics.getLinkUI(e.id).color=$n(Wn)}))},this.clearSelected=e=>{if(!this.selected||this.selected_via_click&&!e)return;let t=this.graph.getNode(this.selected.id);if(!t)return void this.resetLinks();let n=this.graphics.getNodeUI(this.selected.id);n.color=this.selected_origin_color,n.size=20;Kn(this.graph,t,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),Kn(this.graph,t,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),this.selected=null,this.selected_via_click=!1},this.routerStore=e,ve(fe.Vertex,this.addVertex),ve(fe.TipInfo,this.addTipInfo),ve(fe.TXAccepted,this.updateTxStatus)}}Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"vertices",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"verticesLimit",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"finalized_count",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"tips_count",void 0),Mn([ye.observable,Ln("design:type",Bn)],Xn.prototype,"selected",void 0),Mn([ye.observable,Ln("design:type",String)],Xn.prototype,"search",void 0),Mn([ye.observable,Ln("design:type",Boolean)],Xn.prototype,"paused",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateSearch",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"searchAndHighlight",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"pauseResume",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateVerticesLimit",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateTxStatus",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"addVertex",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"addTipInfo",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"checkLimit",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateSelected",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"clearSelected",void 0);var Qn=Xn;function Kn(e,t,n,r,a=!1,s=[]){s.push(t);let l=0;for(;s.length>l;){const t=s[l++];if(n(t))return!0;if(!t.links)return;for(const n of t.links)r||n.toId!==t.id||s.includes(e.getNode(n.fromId))?r&&n.fromId===t.id&&!s.includes(e.getNode(n.toId))&&(a&&a(n),s.push(e.getNode(n.toId))):(a&&a(n),s.push(e.getNode(n.fromId)))}}function $n(e){let t=10414335;if("number"==typeof e)return e;if("string"==typeof e&&e)if(4===e.length&&(e=e.replace(/([^#])/g,"$1$1")),9===e.length)t=parseInt(e.substr(1),16);else{if(7!==e.length)throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;t=parseInt(e.substr(1),16)<<8|255}return t}var Yn=n(286),er=n.n(Yn),tr=n(287),nr=n.n(tr),rr=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},ar=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class sr{constructor(e,t,n){this.nodeID=e,this.time=t,this.txID=n}}class lr extends sr{constructor(e,t,n,r){super(e,t,n),this.amount=r}}class or extends sr{constructor(e,t,n,r){super(e,t,n),this.amount=r}}const ir=r.createElement("tr",null,r.createElement("td",{key:"emptyRow",colSpan:4},"There are no nodes to view with the current search parameters.")),cr=r.createElement(xt.a,{key:"emptyItem"},"There are no events to view with the current search parameters.");class pr{constructor(){this.manaValues=[],this.prevManaValues=[0,0],this.accessNetworkRichest=[],this.totalAccessNetwork=0,this.accessActiveRichest=[],this.totalAccessActive=0,this.consensusNetworkRichest=[],this.totalConsensusNetwork=0,this.consensusActiveRichest=[],this.totalConsensusActive=0,this.searchNode="",this.searchTxID="",this.accessEvents=[],this.consensusEvents=[],this.initAccessEvents=[],this.initConsensusEvents=[],this.lastRemovedAccessEventTime=null,this.lastRemovedConsensusEventTime=null,this.lastInitRemovedAccessEventTime=null,this.lastInitRemovedConsensusEventTime=null,this.eventsUpdated=!1,this.displayedAccessEvents=[],this.displayedConsensusEvents=[],this.nodeNotSyncedListItem=r.createElement(xt.a,null,"Wait for node to be synced to display mana events."),this.addNewManaValue=e=>{this.ownID=this.ownID?this.ownID:e.nodeID,100===this.manaValues.length&&this.manaValues.shift();let t=[new Date(1e3*e.time),e.access,e.consensus];this.manaValues.length>0&&(this.prevManaValues=[this.manaValues[this.manaValues.length-1][1],this.manaValues[this.manaValues.length-1][2]]),this.manaValues.push(t)},this.updateNetworkRichest=e=>{switch(e.manaType){case"Access":this.totalAccessNetwork=e.totalMana,this.accessNetworkRichest=e.nodes;break;case"Consensus":this.totalConsensusNetwork=e.totalMana,this.consensusNetworkRichest=e.nodes}},this.updateActiveRichest=e=>{switch(e.manaType){case"Access":this.totalAccessActive=e.totalMana,this.accessActiveRichest=e.nodes;break;case"Consensus":this.totalConsensusActive=e.totalMana,this.consensusActiveRichest=e.nodes}},this.updateAllowedPledgeIDs=e=>{this.allowedPledgeIDs=e},this.addNewInitPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.initAccessEvents,t.length>=100){let e=t.shift();this.lastInitRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.accessEvents,t.length>=100){let e=t.shift();this.lastRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.addNewInitRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.initDone=()=>{this.accessEvents=this.initAccessEvents,this.lastRemovedAccessEventTime=this.lastInitRemovedAccessEventTime,this.consensusEvents=this.initConsensusEvents,this.lastRemovedConsensusEventTime=this.lastInitRemovedConsensusEventTime,this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],setInterval(()=>{this.eventsUpdated&&(this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],this.eventsUpdated=!1)},500)},this.nodeList=(e,t)=>{if(null===e||null==e)return[];let n=[],a=(e,a)=>{n.push(r.createElement("tr",{key:e.shortNodeID,style:{backgroundColor:e.shortNodeID===this.ownID?"#e8ffff":"white"}},r.createElement("td",{style:{borderTopLeftRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomLeftRadius:e.shortNodeID===this.ownID?"10px":"0"}}," ",a+1," "),r.createElement("td",null,e.shortNodeID),r.createElement("td",null,kt(e.mana)),r.createElement("td",{style:{borderTopRightRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomRightRadius:e.shortNodeID===this.ownID?"10px":"0"}},(e.mana/t*100).toFixed(2),"%")))};return e.forEach((e,t)=>{this.passesNodeFilter(e.shortNodeID)&&a(e,t)}),n},this.computeEventList=e=>{let t=[];if(t.push(r.createElement(xt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"}),r.createElement(u.a,null,"NodeID"),r.createElement(u.a,null,"Tx ID"),r.createElement(u.a,{xs:5},"Time")))),null==e)return t;return e.reverse().forEach((e,n)=>{this.passesNodeFilter(e.nodeID)&&this.passesTxFilter(e.txID)&&((e,n)=>{if(e instanceof lr){let a=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Pledged"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana: ",r.createElement("strong",null,"+",kt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"To NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Pledge: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(xt.a,{style:{backgroundColor:"#41aea9",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"},r.createElement("img",{src:er.a,alt:"Plus",width:"20px",className:"d-block mx-auto"})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}else if(e instanceof or){let a=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Revoked"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana 1: ",r.createElement("strong",null,"-",kt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"From NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Revoke: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(xt.a,{style:{backgroundColor:"#213e3b",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1},r.createElement("img",{src:nr.a,alt:"Minus",width:"20px",className:""})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}})(e,n)}),t},this.passesNodeFilter=e=>0===this.searchNode.trim().length||!!e.toLowerCase().includes(this.searchNode.toLowerCase()),this.passesTxFilter=e=>0===this.searchTxID.trim().length||!!e.toLowerCase().includes(this.searchTxID.toLowerCase()),this.manaValues=[],ve(fe.Mana,this.addNewManaValue),ve(fe.ManaMapOverall,this.updateNetworkRichest),ve(fe.ManaMapOnline,this.updateActiveRichest)}updateNodeSearch(e){this.searchNode=e.trim()}updateTxSearch(e){this.searchTxID=e.trim()}get networkRichestFeedAccess(){let e=this.nodeList(this.accessNetworkRichest,this.totalAccessNetwork);return 0===e.length?[ir]:e}get networkRichestFeedConsensus(){let e=this.nodeList(this.consensusNetworkRichest,this.totalConsensusNetwork);return 0===e.length?[ir]:e}get activeRichestFeedAccess(){let e=this.nodeList(this.accessActiveRichest,this.totalAccessActive);return 0===e.length?[ir]:e}get activeRichestFeedConsensus(){let e=this.nodeList(this.consensusActiveRichest,this.totalConsensusActive);return 0===e.length?[ir]:e}get accessHistogramInput(){if(void 0===this.accessNetworkRichest||null===this.accessNetworkRichest)return[["",0]];let e=new Array;for(let t=0;te.shortNodeID===this.ownID;let n=this.accessNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.accessNetworkRichest.length-(n+1))/this.accessNetworkRichest.length*100}}return e}get consensusPercentile(){let e=0;if(void 0!==this.consensusNetworkRichest&&null!==this.consensusNetworkRichest){const t=e=>e.shortNodeID===this.ownID;let n=this.consensusNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.consensusNetworkRichest.length-(n+1))/this.consensusNetworkRichest.length*100}}return e}get accessEventList(){let e=this.computeEventList(this.displayedAccessEvents);return 1===e.length&&e.push(cr),e}get consensusEventList(){let e=this.computeEventList(this.displayedConsensusEvents);return 1===e.length&&e.push(cr),e}}rr([ye.observable,ar("design:type",Array)],pr.prototype,"manaValues",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"prevManaValues",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"accessNetworkRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalAccessNetwork",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"accessActiveRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalAccessActive",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"consensusNetworkRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalConsensusNetwork",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"consensusActiveRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalConsensusActive",void 0),rr([ye.observable,ar("design:type",Object)],pr.prototype,"searchNode",void 0),rr([ye.observable,ar("design:type",Object)],pr.prototype,"searchTxID",void 0),rr([ye.observable,ar("design:type",class{})],pr.prototype,"allowedPledgeIDs",void 0),rr([ye.observable,ar("design:type",Date)],pr.prototype,"lastRemovedAccessEventTime",void 0),rr([ye.observable,ar("design:type",Date)],pr.prototype,"lastRemovedConsensusEventTime",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"displayedAccessEvents",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"displayedConsensusEvents",void 0),rr([ye.action,ar("design:type",Function),ar("design:paramtypes",[String]),ar("design:returntype",void 0)],pr.prototype,"updateNodeSearch",null),rr([ye.action,ar("design:type",Function),ar("design:paramtypes",[String]),ar("design:returntype",void 0)],pr.prototype,"updateTxSearch",null),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewManaValue",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateNetworkRichest",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateActiveRichest",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateAllowedPledgeIDs",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewInitPledge",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewPledge",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewInitRevoke",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewRevoke",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"initDone",void 0),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"networkRichestFeedAccess",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"networkRichestFeedConsensus",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"activeRichestFeedAccess",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"activeRichestFeedConsensus",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessHistogramInput",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusHistogramInput",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessPercentile",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusPercentile",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessEventList",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusEventList",null);var dr=pr,ur=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},mr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hr=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class fr{constructor(){this.liveFeed=[],this.addLiveFeed=e=>hr(this,void 0,void 0,(function*(){-1===this.liveFeed.findIndex(t=>t.id==e.id)&&(this.liveFeed.length>=100&&this.liveFeed.shift(),this.liveFeed.push(e))})),ve(fe.SlotInfo,this.addLiveFeed)}get slotLiveFeed(){let e=[];for(let t=this.liveFeed.length-1;t>=0;t--){let n=this.liveFeed[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,n.index),r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/slot/commitment/"+n.id},n.id))))}return e}}ur([ye.observable,mr("design:type",Array)],fr.prototype,"liveFeed",void 0),ur([ye.action,mr("design:type",Object)],fr.prototype,"addLiveFeed",void 0),ur([ye.computed,mr("design:type",Object),mr("design:paramtypes",[])],fr.prototype,"slotLiveFeed",null);var br=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},gr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class yr{constructor(e,t){this.updateConflictSets=e=>{this.conflictSets.set(e.conflictSetID,e)},this.updateConflicts=e=>{this.conflicts.set(e.conflictID,e)},this.routerStore=e,this.nodeStore=t,this.conflictSets=new Map,this.conflicts=new Map,ve(fe.ConflictSet,this.updateConflictSets),ve(fe.Conflict,this.updateConflicts)}get conflictsLiveFeed(){let e=Array.from(this.conflictSets.values());e.sort((e,t)=>t.arrivalTime-e.arrivalTime||e.conflictSetID.localeCompare(t.conflictSetID));let t=[];for(let n of e){if(t.push(r.createElement("tr",{key:n.conflictSetID,onClick:()=>n.shown=!n.shown,style:{cursor:"pointer"}},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/output/"+n.conflictSetID},n.conflictSetID)),r.createElement("td",null,new Date(1e3*n.arrivalTime).toLocaleString()),r.createElement("td",null,n.resolved?"Yes":"No"),r.createElement("td",null,n.timeToResolve/1e6))),!n.shown)continue;let e=Array.from(this.conflicts.values());e.sort((e,t)=>e.issuingTime-t.issuingTime||e.conflictID.localeCompare(t.conflictID));let a=[];for(let t of e)for(let e of t.conflictSetIDs)e===n.conflictSetID&&a.push(r.createElement("tr",{key:t.conflictID,className:t.confirmationState>Qt.Accepted?"table-success":""},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/branch/"+t.conflictID},t.conflictID)),r.createElement("td",null,Kt(t.confirmationState)),r.createElement("td",null," ",new Date(1e3*t.issuingTime).toLocaleString()),r.createElement("td",null,t.issuerNodeID)));t.push(r.createElement("tr",{key:n.conflictSetID+"_branches"},r.createElement("td",{colSpan:4},r.createElement(te.a,{size:"sm"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BranchID"),r.createElement("th",null,"ConfirmationState"),r.createElement("th",null,"IssuingTime"),r.createElement("th",null,"Issuer NodeID"))),r.createElement("tbody",null,a)))))}return t}}br([ye.observable,gr("design:type",Map)],yr.prototype,"conflictSets",void 0),br([ye.observable,gr("design:type",Map)],yr.prototype,"conflicts",void 0),br([ye.action,gr("design:type",Object)],yr.prototype,"updateConflictSets",void 0),br([ye.action,gr("design:type",Object)],yr.prototype,"updateConflicts",void 0),br([ye.computed,gr("design:type",Object),gr("design:paramtypes",[])],yr.prototype,"conflictsLiveFeed",null);var Er=yr;const vr=new pn.RouterStore,Ir=new wn,kr={routerStore:vr,nodeStore:Ir,explorerStore:new Ke(vr),conflictsStore:new Er(vr,Ir),faucetStore:new Nn(vr),visualizerStore:new Qn(vr),manaStore:new dr,slotStore:new fr},xr=Object(l.a)(),Sr=Object(pn.syncHistoryWithStore)(xr,vr);a.render(r.createElement(s.a,Object.assign({},kr),r.createElement(be.e,{history:Sr},r.createElement(cn,{history:Sr}))),document.getElementById("root"))}},[[434,1,2]]]); \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map b/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map new file mode 100644 index 000000000..5e7f1f31c --- /dev/null +++ b/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./assets/plus.svg","webpack:///./assets/minus.svg","webpack:///../node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/components/Uptime.tsx","webpack:///./app/components/Version.tsx","webpack:///./app/misc/Chart.ts","webpack:///./app/components/BPSChart.tsx","webpack:///./app/components/TipsChart.tsx","webpack:///./app/components/MemChart.tsx","webpack:///./app/components/ComponentCounterChart.tsx","webpack:///./app/components/TangleTime.tsx","webpack:///./app/components/Bootstrapped.tsx","webpack:///./app/components/Dashboard.tsx","webpack:///./app/components/ExplorerSearchbar.tsx","webpack:///./app/components/ExplorerLiveFeed.tsx","webpack:///./app/components/ExplorerTransactionSearchbar.tsx","webpack:///./app/components/ExplorerOutputSearchbar.tsx","webpack:///./app/components/ExplorerConflictSearchbar.tsx","webpack:///./app/components/Explorer.tsx","webpack:///./app/components/NavExplorerSearchbar.tsx","webpack:///./app/misc/WS.ts","webpack:///./app/misc/Payload.ts","webpack:///./app/utils/condition.tsx","webpack:///./app/utils/feature.tsx","webpack:///./app/utils/output.tsx","webpack:///./app/components/NativeToken.tsx","webpack:///./app/components/Condition.tsx","webpack:///./app/components/Feature.tsx","webpack:///./app/components/BasicOutput.tsx","webpack:///./app/components/AliasOutput.tsx","webpack:///./app/components/FoundryOutput.tsx","webpack:///./app/components/NFTOutput.tsx","webpack:///./app/stores/ExplorerStore.tsx","webpack:///./app/components/BasicPayload.tsx","webpack:///./app/utils/unlock_block.ts","webpack:///./app/components/Ed25519Signature.tsx","webpack:///./app/components/UnlockBlock.tsx","webpack:///./app/components/Transaction.tsx","webpack:///./app/components/TransactionPayload.tsx","webpack:///./app/utils/conflict.ts","webpack:///./app/components/FaucetPayload.tsx","webpack:///./app/components/TaggedDataPayload.tsx","webpack:///./app/components/ExplorerBlockQueryResult.tsx","webpack:///./app/utils/index.ts","webpack:///./app/components/ExplorerAddressResult.tsx","webpack:///./app/components/Explorer404.tsx","webpack:///./app/components/Neighbor.tsx","webpack:///./app/components/Neighbors.tsx","webpack:///./app/components/Visualizer.tsx","webpack:///./app/components/Tips.tsx","webpack:///./app/components/ExplorerTransaction.tsx","webpack:///./app/components/ExplorerTransactionMetadata.tsx","webpack:///./app/components/ExplorerTransactionAttachments.tsx","webpack:///./app/components/ExplorerTransactionQueryResult.tsx","webpack:///./app/utils/confirmation_state.ts","webpack:///./app/components/ExplorerOutputQueryResult.tsx","webpack:///./app/components/ExplorerConflictQueryResult.tsx","webpack:///./app/components/SlotLiveFeed.tsx","webpack:///./app/components/ExplorerSlotQueryResult.tsx","webpack:///./app/components/Root.tsx","webpack:///./app/App.tsx","webpack:///./app/stores/NodeStore.ts","webpack:///./app/stores/FaucetStore.ts","webpack:///./app/stores/VisualizerStore.ts","webpack:///./app/stores/ManaStore.tsx","webpack:///./app/stores/SlotStore.tsx","webpack:///./app/stores/ConflictsStore.tsx","webpack:///./main.tsx"],"names":["module","exports","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","this","props","nodeStore","uptime","status","version","defaultChartOptions","elements","line","tension","animation","duration","hover","animationDuration","responsiveAnimationDuration","lineChartOptions","assign","scales","xAxes","ticks","autoSkip","maxTicksLimit","fontSize","minRotation","maxRotation","gridLines","display","yAxes","callback","value","index","values","Math","abs","beginAtZero","tooltips","callbacks","label","tooltipItem","data","datasets","datasetIndex","Card","Body","Title","last_mps_metric","mps","height","mpsSeries","options","last_tips_metric","totaltips","tipsSeries","showXLabels","prettysize","mem","heap_alloc","num_gc","last_pause_gc","heap_objects","heap_sys","heap_idle","heap_released","memSeries","style","flexDirection","last_component_counter_metric","store","last_rate_setter_metric","estimate","componentSeries","tangleTime","synced","className","to","acceptedBlockID","confirmedBlockID","confirmedSlot","committedSlot","dateformat","Date","ATT","CTT","RATT","RCTT","bootstrapped","Container","Row","Col","ListGroup","variant","Item","ComponentCounterChart","updateSearch","explorerStore","target","executeSearch","key","searchAny","search","searching","InputGroup","FormControl","placeholder","onChange","onKeyUp","disabled","blksLiveFeed","xs","Table","txID","routerStore","push","outputID","conflictID","href","Form","inline","as","type","WSMsgType","handlers","registerHandler","blkTypeID","handler","unregisterHandler","PayloadType","ConditionType","FeatureType","OutputType","Output","getPayloadType","p","TaggedData","Transaction","Faucet","token","amount","unlock","address","pubKeyHash","unixTime","returnAddress","conditionToComponent","cond","Address","StateControllerAddress","GovernorAddress","StorageDepositReturn","Expiration","Timelock","feature","tag","featureToComponent","feat","Sender","Issuer","Metadata","Tag","hex","output","nativeTokens","n","_","unlockConditions","c","features","f","transactionID","outputIndex","wordBreak","aliasId","stateIndex","stateMetadata","foundryCounter","serialNumber","tokenScheme","nftId","outputToComponent","Basic","Alias","Foundry","NFT","GenesisBlockID","SlotInfo","QueryError","latest_blocks","blk","addr","tx","txMetadata","txAttachments","outputMetadata","outputConsumers","pendingMana","conflict","conflictChildren","conflictConflicts","conflictVoters","tips","slotInfo","query_loading","query_err","search_result","updateSearching","res","fetch","result","json","updateSearchResult","err","updateQueryError","resetSearch","block","searchBlock","updateQueryLoading","fetchJson","updateBlock","searchAddress","updateAddress","getSlotDetails","getSlotInfo","getTransaction","i","inputs","length","inputID","referencedOutputID","referencedOutputRes","genOutput","getTransactionAttachments","attachments","getTransactionMetadata","getOutput","getOutputMetadata","getOutputConsumers","getPendingMana","getConflict","getConflictChildren","getConflictConflicts","getConflictVoters","getTips","reset","spendIDs","addedSpendIDs","subtractedSpendIDs","strongChildren","weakChildren","shallowLikeChildren","strongParents","weakParents","shallowLikedParents","payloadType","payload","loading","addLiveFeedBlock","findIndex","t","shift","Block","feed","payload_type","list","blkId","method","route","requestData","body","JSON","stringify","v","Uint8Array","Array","from","undefined","response","headers","ok","NotFound","BadRequest","content_title","content","SignatureType","signature","publicKey","signatureType","Ed25519","Badge","sigType","BLS","renderSignatureComponent","maxHeight","overflow","width","marginTop","marginBottom","paddingBottom","borderBottom","networkId","creationSlot","input","Provider","color","size","outputs","unlocks","txId","resolveBase58ConflictID","base58Conflict","MasterConflictInBase58","UndefinedConflictInBase58","LazyBookedConflictsConflictInBase58","InvalidConflictInBase58","accessManaPledgeID","consensusManaPledgeID","nonce","match","params","prevProps","prevState","objectivelyInvalid","marginRight","issuanceTimestamp","solidificationTimestamp","sequenceNumber","solid","scheduled","booked","orphaned","subjectivelyInvalid","acceptance","acceptanceTime","confirmation","confirmationTime","confirmationBySlot","confirmationBySlotTime","commitmentID","commitment","prevID","rootsID","cumulativeWeight","latestConfirmedSlot","rank","sequenceID","pastMarkerGap","isPastMarker","pastMarkers","issuerID","renderPayload","Spinner","displayManaUnit","mana","roundedMana","round","toString","toFixed","spent","unspent","available_balances","explorerOutputs","forEach","metadata","consumerCount","timestampCompareFn","a","b","txTimestamp","localeCompare","sort","Alert","ListGroupItem","textAlign","super","state","enabled","Button","getVariant","onClick","setState","base58","outputTypeToName","toLocaleString","timestamp","confirmedConsumer","outputType","neighborMetrics","neighbor_metrics","get","identity","last","current","connection_origin","pill","packets_written","packets_read","currentNetIO","rx","netIOSeries","neighborsEle","k","updateVerticesLimit","visualizerStore","pauseResumeVisualizer","pauseResume","searchAndHighlight","toggleBackgroundDataCollection","collecting","unregisterHandlers","registerHandlers","start","stop","vertices","finalized_count","selected","verticesLimit","tips_count","paused","Prepend","Text","OverlayTrigger","trigger","placement","overlay","Popover","Content","span","offset","background","substr","parent","zIndex","position","top","left","tipsList","bordered","conflictIDs","confirmationState","blockIDs","ConfirmationState","resolveConfirmationState","Undefined","Rejected","Pending","Accepted","Confirmed","confirmationStateTime","consumers","val","valid","parents","childConflicts","conflicts","j","voters","s","slotLiveFeed","slotStore","blocks","transactions","createdOutputs","spentOutputs","connect","Navbar","expand","bg","Brand","Nav","Link","Collapse","websocketConnected","exact","path","component","children","renderDevTool","App","history","BPSMetric","Status","MemoryMetrics","scheduler","SchedulerMetric","TipsMetric","RateSetterMetric","collected","network_io","metric","ts","now","maxMetricsDataPoints","netIO","secondLast","chartSeriesOpts","series","labels","ComponentCounterMetric","fill","lineTension","backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","pointBorderColor","pointBackgroundColor","pointBorderWidth","pointHoverBackgroundColor","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","pointHoverRadius","name","bgColor","collected_mps_metrics","collected_rate_setter_metrics","collected_scheduler_metrics","collected_mem_metrics","collected_tips_metrics","collected_component_counter_metrics","updateStatus","BPSMetrics","addBPSMetric","updateLastBPSMetric","NeighborStats","updateNeighborMetrics","TipsMetrics","updateLastTipsMetric","ComponentCounterMetrics","updateLastComponentMetric","RateSetter","updateLastRateSetterMetric","updateCollecting","updateWebSocketConnected","connected","updated","neighbMetrics","addMetric","set","includes","delete","mpsMetric","tipsMetric","componentCounterMetric","setTimeout","onOpen","onClose","onError","loc","window","location","uri","protocol","host","ws","WebSocket","onopen","onclose","onerror","onmessage","parse","connectWebSocket","reconnect","stored","solidified","solidifier","booker","bufferSize","currentBufferSize","deficit","day","hour","minute","seconds","floor","str","heapSys","heapAlloc","heapIdle","heapReleased","FaucetStore","send_addr","send_access_mana_node_id","send_consensus_mana_node_id","sending","sendResult","query_error","sendReq","updateSending","updateSendResult","updateSend","updateSendAccessManaNodeID","access_mana","updateSendConsensusManaNodeID","consensus_mana","Vertex","COLOR","verticesIncomingOrder","draw","selected_via_click","selected_origin_color","fetchHistory","addVertex","console","log","trim","clearSelected","iter","found","indexOf","updateSelected","renderer","resume","pause","num","updateTxStatus","vert","existing","is_tx_accepted","drawVertex","is_blk_confirmed","checkLimit","addTipInfo","tipInfo","is_tip","deleteId","graph","removeNode","node","getNode","graphics","getNodeUI","parseColor","colorForVertexState","addNode","linkParents","links","some","link","fromId","addLink","is_tx","Graph","View","webglGraphics","layout","Layout","forceDirected","springLength","springCoeff","stableThreshold","gravity","dragCoeff","timeStep","theta","webglSquare","webglLine","ele","document","getElementById","container","events","webglInputEvents","mouseEnter","mouseLeave","click","run","dispose","viaClick","nodeUI","vertexSize","dfsIterator","getLinkUI","resetLinks","forEachLink","force_clear","TipInfo","TXAccepted","cb","up","cbLinks","seenNodes","pointer","toId","parsedColor","replace","parseInt","ManaEvent","nodeID","time","PledgeEvent","RevokeEvent","emptyRow","colSpan","emptyListItem","manaValues","prevManaValues","accessNetworkRichest","totalAccessNetwork","accessActiveRichest","totalAccessActive","consensusNetworkRichest","totalConsensusNetwork","consensusActiveRichest","totalConsensusActive","searchNode","searchTxID","accessEvents","consensusEvents","initAccessEvents","initConsensusEvents","lastRemovedAccessEventTime","lastRemovedConsensusEventTime","lastInitRemovedAccessEventTime","lastInitRemovedConsensusEventTime","eventsUpdated","displayedAccessEvents","displayedConsensusEvents","nodeNotSyncedListItem","addNewManaValue","manaBlk","ownID","newManaData","access","consensus","updateNetworkRichest","manaType","totalMana","nodes","updateActiveRichest","updateAllowedPledgeIDs","allowedPledgeIDs","addNewInitPledge","lastRemoved","newData","addNewPledge","addNewInitRevoke","addNewRevoke","initDone","setInterval","nodeList","leaderBoard","manaSum","pushToFeed","shortNodeID","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","passesNodeFilter","computeEventList","evArr","reverse","event","passesTxFilter","element","popover","ev","navigator","clipboard","writeText","toLocaleTimeString","src","alt","substring","pushToEventFeed","toLowerCase","Mana","ManaMapOverall","ManaMapOnline","histInput","log10","per","isOwnID","liveFeed","addLiveFeed","info","updateConflictSets","conflictSets","conflictSetID","updateConflicts","Map","ConflictSet","Conflict","conflictsArr","x","y","arrivalTime","shown","cursor","resolved","timeToResolve","branchesArr","issuingTime","branches","branch","conflictSetIDs","issuerNodeID","stores","browserHistory"],"mappings":"2EAAAA,EAAOC,QAAU,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l0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+\"","var map = {\n\t\"./af\": 107,\n\t\"./af.js\": 107,\n\t\"./ar\": 108,\n\t\"./ar-dz\": 109,\n\t\"./ar-dz.js\": 109,\n\t\"./ar-kw\": 110,\n\t\"./ar-kw.js\": 110,\n\t\"./ar-ly\": 111,\n\t\"./ar-ly.js\": 111,\n\t\"./ar-ma\": 112,\n\t\"./ar-ma.js\": 112,\n\t\"./ar-sa\": 113,\n\t\"./ar-sa.js\": 113,\n\t\"./ar-tn\": 114,\n\t\"./ar-tn.js\": 114,\n\t\"./ar.js\": 108,\n\t\"./az\": 115,\n\t\"./az.js\": 115,\n\t\"./be\": 116,\n\t\"./be.js\": 116,\n\t\"./bg\": 117,\n\t\"./bg.js\": 117,\n\t\"./bm\": 118,\n\t\"./bm.js\": 118,\n\t\"./bn\": 119,\n\t\"./bn-bd\": 120,\n\t\"./bn-bd.js\": 120,\n\t\"./bn.js\": 119,\n\t\"./bo\": 121,\n\t\"./bo.js\": 121,\n\t\"./br\": 122,\n\t\"./br.js\": 122,\n\t\"./bs\": 123,\n\t\"./bs.js\": 123,\n\t\"./ca\": 124,\n\t\"./ca.js\": 124,\n\t\"./cs\": 125,\n\t\"./cs.js\": 125,\n\t\"./cv\": 126,\n\t\"./cv.js\": 126,\n\t\"./cy\": 127,\n\t\"./cy.js\": 127,\n\t\"./da\": 128,\n\t\"./da.js\": 128,\n\t\"./de\": 129,\n\t\"./de-at\": 130,\n\t\"./de-at.js\": 130,\n\t\"./de-ch\": 131,\n\t\"./de-ch.js\": 131,\n\t\"./de.js\": 129,\n\t\"./dv\": 132,\n\t\"./dv.js\": 132,\n\t\"./el\": 133,\n\t\"./el.js\": 133,\n\t\"./en-au\": 134,\n\t\"./en-au.js\": 134,\n\t\"./en-ca\": 135,\n\t\"./en-ca.js\": 135,\n\t\"./en-gb\": 136,\n\t\"./en-gb.js\": 136,\n\t\"./en-ie\": 137,\n\t\"./en-ie.js\": 137,\n\t\"./en-il\": 138,\n\t\"./en-il.js\": 138,\n\t\"./en-in\": 139,\n\t\"./en-in.js\": 139,\n\t\"./en-nz\": 140,\n\t\"./en-nz.js\": 140,\n\t\"./en-sg\": 141,\n\t\"./en-sg.js\": 141,\n\t\"./eo\": 142,\n\t\"./eo.js\": 142,\n\t\"./es\": 143,\n\t\"./es-do\": 144,\n\t\"./es-do.js\": 144,\n\t\"./es-mx\": 145,\n\t\"./es-mx.js\": 145,\n\t\"./es-us\": 146,\n\t\"./es-us.js\": 146,\n\t\"./es.js\": 143,\n\t\"./et\": 147,\n\t\"./et.js\": 147,\n\t\"./eu\": 148,\n\t\"./eu.js\": 148,\n\t\"./fa\": 149,\n\t\"./fa.js\": 149,\n\t\"./fi\": 150,\n\t\"./fi.js\": 150,\n\t\"./fil\": 151,\n\t\"./fil.js\": 151,\n\t\"./fo\": 152,\n\t\"./fo.js\": 152,\n\t\"./fr\": 153,\n\t\"./fr-ca\": 154,\n\t\"./fr-ca.js\": 154,\n\t\"./fr-ch\": 155,\n\t\"./fr-ch.js\": 155,\n\t\"./fr.js\": 153,\n\t\"./fy\": 156,\n\t\"./fy.js\": 156,\n\t\"./ga\": 157,\n\t\"./ga.js\": 157,\n\t\"./gd\": 158,\n\t\"./gd.js\": 158,\n\t\"./gl\": 159,\n\t\"./gl.js\": 159,\n\t\"./gom-deva\": 160,\n\t\"./gom-deva.js\": 160,\n\t\"./gom-latn\": 161,\n\t\"./gom-latn.js\": 161,\n\t\"./gu\": 162,\n\t\"./gu.js\": 162,\n\t\"./he\": 163,\n\t\"./he.js\": 163,\n\t\"./hi\": 164,\n\t\"./hi.js\": 164,\n\t\"./hr\": 165,\n\t\"./hr.js\": 165,\n\t\"./hu\": 166,\n\t\"./hu.js\": 166,\n\t\"./hy-am\": 167,\n\t\"./hy-am.js\": 167,\n\t\"./id\": 168,\n\t\"./id.js\": 168,\n\t\"./is\": 169,\n\t\"./is.js\": 169,\n\t\"./it\": 170,\n\t\"./it-ch\": 171,\n\t\"./it-ch.js\": 171,\n\t\"./it.js\": 170,\n\t\"./ja\": 172,\n\t\"./ja.js\": 172,\n\t\"./jv\": 173,\n\t\"./jv.js\": 173,\n\t\"./ka\": 174,\n\t\"./ka.js\": 174,\n\t\"./kk\": 175,\n\t\"./kk.js\": 175,\n\t\"./km\": 176,\n\t\"./km.js\": 176,\n\t\"./kn\": 177,\n\t\"./kn.js\": 177,\n\t\"./ko\": 178,\n\t\"./ko.js\": 178,\n\t\"./ku\": 179,\n\t\"./ku.js\": 179,\n\t\"./ky\": 180,\n\t\"./ky.js\": 180,\n\t\"./lb\": 181,\n\t\"./lb.js\": 181,\n\t\"./lo\": 182,\n\t\"./lo.js\": 182,\n\t\"./lt\": 183,\n\t\"./lt.js\": 183,\n\t\"./lv\": 184,\n\t\"./lv.js\": 184,\n\t\"./me\": 185,\n\t\"./me.js\": 185,\n\t\"./mi\": 186,\n\t\"./mi.js\": 186,\n\t\"./mk\": 187,\n\t\"./mk.js\": 187,\n\t\"./ml\": 188,\n\t\"./ml.js\": 188,\n\t\"./mn\": 189,\n\t\"./mn.js\": 189,\n\t\"./mr\": 190,\n\t\"./mr.js\": 190,\n\t\"./ms\": 191,\n\t\"./ms-my\": 192,\n\t\"./ms-my.js\": 192,\n\t\"./ms.js\": 191,\n\t\"./mt\": 193,\n\t\"./mt.js\": 193,\n\t\"./my\": 194,\n\t\"./my.js\": 194,\n\t\"./nb\": 195,\n\t\"./nb.js\": 195,\n\t\"./ne\": 196,\n\t\"./ne.js\": 196,\n\t\"./nl\": 197,\n\t\"./nl-be\": 198,\n\t\"./nl-be.js\": 198,\n\t\"./nl.js\": 197,\n\t\"./nn\": 199,\n\t\"./nn.js\": 199,\n\t\"./oc-lnc\": 200,\n\t\"./oc-lnc.js\": 200,\n\t\"./pa-in\": 201,\n\t\"./pa-in.js\": 201,\n\t\"./pl\": 202,\n\t\"./pl.js\": 202,\n\t\"./pt\": 203,\n\t\"./pt-br\": 204,\n\t\"./pt-br.js\": 204,\n\t\"./pt.js\": 203,\n\t\"./ro\": 205,\n\t\"./ro.js\": 205,\n\t\"./ru\": 206,\n\t\"./ru.js\": 206,\n\t\"./sd\": 207,\n\t\"./sd.js\": 207,\n\t\"./se\": 208,\n\t\"./se.js\": 208,\n\t\"./si\": 209,\n\t\"./si.js\": 209,\n\t\"./sk\": 210,\n\t\"./sk.js\": 210,\n\t\"./sl\": 211,\n\t\"./sl.js\": 211,\n\t\"./sq\": 212,\n\t\"./sq.js\": 212,\n\t\"./sr\": 213,\n\t\"./sr-cyrl\": 214,\n\t\"./sr-cyrl.js\": 214,\n\t\"./sr.js\": 213,\n\t\"./ss\": 215,\n\t\"./ss.js\": 215,\n\t\"./sv\": 216,\n\t\"./sv.js\": 216,\n\t\"./sw\": 217,\n\t\"./sw.js\": 217,\n\t\"./ta\": 218,\n\t\"./ta.js\": 218,\n\t\"./te\": 219,\n\t\"./te.js\": 219,\n\t\"./tet\": 220,\n\t\"./tet.js\": 220,\n\t\"./tg\": 221,\n\t\"./tg.js\": 221,\n\t\"./th\": 222,\n\t\"./th.js\": 222,\n\t\"./tk\": 223,\n\t\"./tk.js\": 223,\n\t\"./tl-ph\": 224,\n\t\"./tl-ph.js\": 224,\n\t\"./tlh\": 225,\n\t\"./tlh.js\": 225,\n\t\"./tr\": 226,\n\t\"./tr.js\": 226,\n\t\"./tzl\": 227,\n\t\"./tzl.js\": 227,\n\t\"./tzm\": 228,\n\t\"./tzm-latn\": 229,\n\t\"./tzm-latn.js\": 229,\n\t\"./tzm.js\": 228,\n\t\"./ug-cn\": 230,\n\t\"./ug-cn.js\": 230,\n\t\"./uk\": 231,\n\t\"./uk.js\": 231,\n\t\"./ur\": 232,\n\t\"./ur.js\": 232,\n\t\"./uz\": 233,\n\t\"./uz-latn\": 234,\n\t\"./uz-latn.js\": 234,\n\t\"./uz.js\": 233,\n\t\"./vi\": 235,\n\t\"./vi.js\": 235,\n\t\"./x-pseudo\": 236,\n\t\"./x-pseudo.js\": 236,\n\t\"./yo\": 237,\n\t\"./yo.js\": 237,\n\t\"./zh-cn\": 238,\n\t\"./zh-cn.js\": 238,\n\t\"./zh-hk\": 239,\n\t\"./zh-hk.js\": 239,\n\t\"./zh-mo\": 240,\n\t\"./zh-mo.js\": 240,\n\t\"./zh-tw\": 241,\n\t\"./zh-tw.js\": 241\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 298;","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Uptime extends React.Component {\r\n render() {\r\n return (\r\n \r\n Uptime: {this.props.nodeStore.uptime}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Version extends React.Component {\r\n render() {\r\n return (\r\n \r\n Version: {this.props.nodeStore.status.version}\r\n \r\n );\r\n }\r\n}\r\n","\r\n// includes chart options to increase performance, by disabling chart animations\r\nexport var defaultChartOptions = {\r\n elements: {\r\n line: {\r\n tension: 0\r\n }\r\n },\r\n animation: {\r\n duration: 0\r\n },\r\n hover: {\r\n animationDuration: 0\r\n },\r\n responsiveAnimationDuration: 0\r\n};","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class BPSChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Blocks Per Second\r\n \r\n BPS: {this.props.nodeStore.last_mps_metric.mps}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class TipsChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Current Tips\r\n \r\n Tips: {this.props.nodeStore.last_tips_metric.totaltips}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport * as prettysize from 'prettysize';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class MemChart extends React.Component {\r\n render() {\r\n let mem = this.props.nodeStore.status.mem;\r\n return (\r\n \r\n \r\n \r\n Memory Usage{' '}\r\n {prettysize(mem.heap_alloc)}\r\n \r\n \r\n GC Cycles: {mem.num_gc} (Last Cycle: {mem.last_pause_gc / 1000000}ms) - {' '}\r\n Heap: {' '}\r\n [Obj: {mem.heap_objects}, In-Use: {prettysize(mem.heap_sys-mem.heap_idle)},\r\n Retained: {prettysize(mem.heap_idle - mem.heap_released)}]\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Card from \"react-bootstrap/Card\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport {Line} from \"react-chartjs-2\";\nimport {defaultChartOptions} from \"../misc/Chart\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\nconst lineChartOptions = Object.assign({\n scales: {\n xAxes: [{\n ticks: {\n autoSkip: true,\n maxTicksLimit: 8,\n fontSize: 8,\n minRotation: 0,\n maxRotation: 0,\n },\n gridLines: {\n display: false\n }\n }],\n yAxes: [{\n gridLines: {\n display: false\n },\n ticks: {\n callback: function (value, index, values) {\n return Math.abs(value);\n },\n fontSize: 10,\n maxTicksLimit: 4,\n beginAtZero: true,\n },\n }],\n },\n tooltips: {\n callbacks: {\n label: function (tooltipItem, data) {\n let label = data.datasets[tooltipItem.datasetIndex].label;\n return `${label} ${Math.abs(tooltipItem.value)}`;\n }\n }\n }\n}, defaultChartOptions);\n\n@inject(\"nodeStore\")\n@observer\nexport default class StoreChart extends React.Component {\n render() {\n const infoStyle = {\n display: \"flex\",\n flexDirection: \"column\"\n };\n return (\n \n \n Component Counter Blocks Per Second\n
\n \n BPS: {this.props.nodeStore.last_component_counter_metric.store}.\n \n \n Rate Setter - Estimate: {this.props.nodeStore.last_rate_setter_metric.estimate}\n \n
\n\n \n
\n
\n );\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport Card from \"react-bootstrap/Card\";\nimport {Link} from 'react-router-dom';\nimport {inject, observer} from \"mobx-react\";\nimport * as dateformat from 'dateformat';\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class TangleTime extends React.Component {\n render() {\n return (\n \n \n TangleTime\n Synced: {this.props.nodeStore.status.tangleTime.synced ? \"Yes\" : \"No\"}\n \n
\n
\n
\n
Last Accepted Block: \n {this.props.nodeStore.status.tangleTime.acceptedBlockID}\n
\n
\n
\n
Last Confirmed Block: \n {this.props.nodeStore.status.tangleTime.confirmedBlockID}\n
\n
\n
\n
Last Confirmed Slot:\n {this.props.nodeStore.status.tangleTime.confirmedSlot}\n
\n
\n
\n
Last Committed Slot:\n {this.props.nodeStore.status.tangleTime.committedSlot}\n
\n
\n
\n
\n
\n Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.ATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.CTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n Relative Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Relative Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RCTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n
\n
\n )\n ;\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class Bootstrapped extends React.Component {\n render() {\n return (\n \n Bootstrapped: {this.props.nodeStore.status.tangleTime.bootstrapped ? \"Yes\" : \"No\"}\n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Uptime from \"./Uptime\";\r\nimport Version from \"./Version\";\r\nimport BPSChart from \"./BPSChart\";\r\nimport TipsChart from \"./TipsChart\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport MemChart from \"./MemChart\";\r\nimport ComponentCounterChart from \"./ComponentCounterChart\";\r\nimport TangleTime from \"./TangleTime\";\r\nimport Bootstrapped from \"./Bootstrapped\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Dashboard extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Dashboard

\r\n \r\n \r\n \r\n \r\n Node: {this.props.nodeStore.status.id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Table from \"react-bootstrap/Table\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerLiveFeed extends React.Component {\r\n render() {\r\n let {blksLiveFeed} = this.props.explorerStore;\r\n return (\r\n \r\n \r\n \r\n \r\n Live Feed\r\n \r\n \r\n
Blocks
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {blksLiveFeed}\r\n \r\n
IdPayload Type
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionSearchbar extends React.Component {\n txID: string;\n\n updateSearch = (e) => {\n this.txID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/transaction/${this.txID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputSearchbar extends React.Component {\n outputID: string;\n\n updateSearch = (e) => {\n this.outputID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/output/${this.outputID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerConflictSearchbar extends React.Component {\n conflictID: string;\n\n updateSearch = (e) => {\n this.conflictID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/conflict/${this.conflictID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerSearchbar} from \"./ExplorerSearchbar\";\r\nimport {ExplorerLiveFeed} from \"./ExplorerLiveFeed\";\r\nimport {ExplorerTransactionSearchbar} from \"./ExplorerTransactionSearchbar\";\r\nimport {ExplorerOutputSearchbar} from \"./ExplorerOutputSearchbar\";\r\nimport {ExplorerConflictSearchbar} from \"./ExplorerConflictSearchbar\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Explorer extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Tangle Explorer

\r\n \r\n \r\n

\r\n Search for addresses, blocks, transactions, outputs and conflicts.\r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This explorer implementation is heavily inspired by thetangle.org.\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport Form from \"react-bootstrap/Form\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class NavExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n return (\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum WSMsgType {\r\n Status,\r\n BPSMetrics,\r\n Block,\r\n NeighborStats,\r\n ComponentCounterMetrics,\r\n TipsMetrics,\r\n Vertex,\r\n TXAccepted,\r\n TipInfo,\r\n Mana,\r\n ManaMapOverall,\r\n ManaMapOnline,\r\n BlkManaDashboardAddress,\r\n RateSetter,\r\n ConflictSet,\r\n Conflict,\r\n SlotInfo,\r\n}\r\n\r\nexport interface WSBlock {\r\n type: number;\r\n data: any;\r\n}\r\n\r\ntype DataHandler = (data: any) => void;\r\n\r\nlet handlers = {};\r\n\r\nexport function registerHandler(blkTypeID: number, handler: DataHandler) {\r\n handlers[blkTypeID] = handler;\r\n}\r\n\r\nexport function unregisterHandler(blkTypeID: number) {\r\n delete handlers[blkTypeID];\r\n}\r\n\r\nexport function connectWebSocket(path: string, onOpen, onClose, onError) {\r\n let loc = window.location;\r\n let uri = 'ws:';\r\n\r\n if (loc.protocol === 'https:') {\r\n uri = 'wss:';\r\n }\r\n uri += '//' + loc.host + path;\r\n\r\n let ws = new WebSocket(uri);\r\n\r\n ws.onopen = onOpen;\r\n ws.onclose = onClose;\r\n ws.onerror = onError;\r\n\r\n ws.onmessage = (e) => {\r\n let blk: WSBlock = JSON.parse(e.data);\r\n let handler = handlers[blk.type];\r\n if (!handler) {\r\n return;\r\n }\r\n handler(blk.data);\r\n };\r\n}\r\n","export enum PayloadType {\r\n TaggedData = 0,\r\n Transaction = 1,\r\n Faucet = 3,\r\n}\r\n\r\n// BasicPayload\r\nexport class BasicPayload {\r\n content_title: string;\r\n content: string;\r\n}\r\n\r\nexport class TaggedDataPayload {\r\n tag: string;\r\n data: string;\r\n}\r\n\r\nexport class FaucetPayload {\r\n address: string;\r\n accessManaPledgeID: string;\r\n consensusManaPledgeID: string;\r\n nonce: number;\r\n}\r\n\r\nexport class TransactionPayload {\r\n networkId: number;\r\n creationSlot: number;\r\n inputs: Array;\r\n outputs: Array;\r\n payload: any;\r\n unlocks: Array;\r\n}\r\n\r\nexport class Input {\r\n type: string;\r\n referencedOutputID: OutputID;\r\n output: Output;\r\n}\r\n\r\nexport class Output {\r\n outputID: OutputID;\r\n type: number;\r\n output: \r\n BasicOutput|\r\n AliasOutput|\r\n FoundryOutput|\r\n NFTOutput;\r\n}\r\n\r\nexport class OutputID {\r\n hex: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class UnlockBlock {\r\n type: string;\r\n referencedIndex: number;\r\n signatureType: number;\r\n signature: SignatureEd25519;\r\n}\r\n\r\nexport class SignatureEd25519 {\r\n publicKey: string;\r\n signature: string;\r\n}\r\n\r\nexport class BasicOutput {\r\n amount: number\r\n nativeTokens?: Array;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n}\r\n\r\nexport class AliasOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n aliasId: string;\r\n stateIndex: number;\r\n stateMetadata?: string;\r\n foundryCounter: number;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class FoundryOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n serialNumber: number;\r\n tokenScheme: number; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class NFTOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n nftId: string; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class Balance {\r\n value: number;\r\n color: string;\r\n}\r\n\r\nexport class Conflict {\r\n tx_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\nexport class Timestamp {\r\n blk_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\n// @ts-ignore\r\nexport class Opinion {\r\n value: string;\r\n round: number;\r\n}\r\n\r\nexport class NativeToken {\r\n id: string;\r\n amount: number;\r\n}\r\n\r\n// address, stateController, Governor share the same struct\r\nexport class AddressUnlockCondition {\r\n type: number;\r\n address: Address;\r\n}\r\n\r\nexport class Address {\r\n type: number;\r\n pubKeyHash: string;\r\n}\r\nexport class StorageDepositReturnUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n amount: number;\r\n}\r\n\r\nexport class TimelockUnlockCondition {\r\n type: number;\r\n unixTime?: number;\r\n}\r\n\r\nexport class ExpirationUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n unixTime: number;\r\n}\r\n\r\nexport class Feature {\r\n type: number;\r\n feature:\r\n IssuerFeature |\r\n MetadataFeature |\r\n TagFeature;\r\n}\r\n\r\n// Issuer and sender share a struct\r\nexport class IssuerFeature {\r\n address: string\r\n}\r\n\r\nexport class MetadataFeature {\r\n data: string;\r\n}\r\n\r\nexport class TagFeature {\r\n tag: string;\r\n}\r\n\r\nexport function getPayloadType(p: number){\r\n switch (p) {\r\n case PayloadType.TaggedData:\r\n return \"TaggedData\"\r\n case PayloadType.Transaction:\r\n return \"Transaction\"\r\n case PayloadType.Faucet:\r\n return \"Faucet\"\r\n default:\r\n return \"Unknown\"\r\n }\r\n}\r\n","import { UnlockConditionAddress, UnlockConditionExpiration, UnlockConditionStorageDepositReturn, UnlockConditionTimelock } from \"app/components/Condition\";\nimport { AddressUnlockCondition, ExpirationUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum ConditionType {\n Address = 0,\n StorageDepositReturn,\n Timelock,\n Expiration,\n StateControllerAddress,\n GovernorAddress,\n ImmutableAlias,\n}\n\nexport function resolveConditionType(condType: number) {\n switch (condType) {\n case ConditionType.Address:\n return \"Address Condition\";\n case ConditionType.StorageDepositReturn:\n return \"StorageDepositReturn Condition\";\n case ConditionType.Timelock:\n return \"Timelock Condition\";\n case ConditionType.Expiration:\n return \"Expiration Condition\";\n case ConditionType.StateControllerAddress:\n return \"StateControllerAddress Condition\";\n case ConditionType.GovernorAddress:\n return \"GovernorAddress Condition\";\n case ConditionType.ImmutableAlias:\n return \"ImmutableAlias Condition\";\n default:\n return \"Unknown Condition Type\";\n }\n}\n\nexport function conditionToComponent(cond: \n AddressUnlockCondition |\n StorageDepositReturnUnlockCondition |\n TimelockUnlockCondition |\n ExpirationUnlockCondition) {\n switch (cond.type) {\n case ConditionType.Address:\n case ConditionType.StateControllerAddress:\n case ConditionType.GovernorAddress:\n return ;\n case ConditionType.StorageDepositReturn:\n return ;\n case ConditionType.Expiration:\n return ;\n case ConditionType.Timelock:\n return ;\n }\n}","import { FeatureIssuer, FeatureMetadata, FeatureTag } from \"app/components/Feature\";\nimport { Feature, IssuerFeature, MetadataFeature, TagFeature } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum FeatureType {\n Sender = 0,\n Issuer,\n Metadata,\n Tag,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case FeatureType.Sender:\n return \"Sender Feature\";\n case FeatureType.Issuer:\n return \"Issuer Feature\";\n case FeatureType.Metadata:\n return \"Metadata Feature\";\n case FeatureType.Tag:\n return \"Tag Feature\";\n default:\n return \"Unknown Feature Type\";\n }\n}\n\n\nexport function featureToComponent(feat: Feature) {\n switch (feat.type) {\n case FeatureType.Sender:\n case FeatureType.Issuer:\n return ;\n case FeatureType.Metadata:\n return ;\n case FeatureType.Tag:\n return ;\n }\n}","import {\n BasicOutput as BasicJSON,\n AliasOutput as AliasJSON,\n FoundryOutput as FoundryJSON,\n NFTOutput as NFTJSON,\n Output,\n} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport { BasicOutput } from \"app/components/BasicOutput\";\nimport { AliasOutput } from \"app/components/AliasOutput\";\nimport { FoundryOutput } from \"app/components/FoundryOutput\";\nimport { NFTOutput } from \"app/components/NFTOutput\";\n\nexport enum OutputType {\n Treasury = 2,\n Basic,\n Alias,\n Foundry,\n NFT,\n}\n\nexport function outputToComponent(output: Output) {\n let id = output.outputID\n switch (output.type) {\n case OutputType.Basic:\n return ;\n case OutputType.Alias:\n return ;\n case OutputType.Foundry:\n return ;\n case OutputType.NFT:\n return ;\n default:\n return;\n }\n}\n\n\nexport function outputTypeToName(type: number) {\n switch (type) {\n case OutputType.Basic:\n return \"Basic Output\";\n case OutputType.Alias:\n return \"Alias Output\";\n case OutputType.Foundry:\n return \"Foundry Output\";\n case OutputType.NFT:\n return \"NFT Output\";\n default:\n return;\n }\n}\n","import * as React from 'react';\nimport { NativeToken as NativeTokenJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\n\ninterface Props {\n token: NativeTokenJSON;\n}\n\nexport class NativeToken extends React.Component {\n render() {\n return (\n
\n \n ID: {this.props.token.id}\n Amount: {this.props.token.amount}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport { \n TimelockUnlockCondition, \n AddressUnlockCondition,\n StorageDepositReturnUnlockCondition,\nExpirationUnlockCondition} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface AddressProps { \n unlock: AddressUnlockCondition;\n}\n\nexport class UnlockConditionAddress extends React.Component {\n render() {\n return (\n
\n \n Address Type: {this.props.unlock.address.type}\n \n \n Address: {this.props.unlock.address.pubKeyHash}\n \n
\n );\n }\n}\n\ninterface TimelockProps { \n unlock: TimelockUnlockCondition;\n}\n\nexport class UnlockConditionTimelock extends React.Component {\n render() {\n\n return (\n this.props.unlock.unixTime &&\n
\n \n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}\n\ninterface StorageDepositReturnProps { \n unlock: StorageDepositReturnUnlockCondition;\n}\n\nexport class UnlockConditionStorageDepositReturn extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Amount: {this.props.unlock.amount}\n \n
\n );\n }\n}\n\ninterface ExpirationProps { \n unlock: ExpirationUnlockCondition;\n}\n\nexport class UnlockConditionExpiration extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}","import * as React from 'react';\nimport { \nIssuerFeature, MetadataFeature, TagFeature} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface IssuerProps { \n feature: IssuerFeature;\n}\n\nexport class FeatureIssuer extends React.Component {\n render() {\n return (\n
\n \n Address: {this.props.feature.address}\n \n
\n );\n }\n}\n\n\ninterface MetadataProps { \n feature: MetadataFeature;\n}\n\nexport class FeatureMetadata extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.data}\n \n
\n );\n }\n}\n\ninterface TagProps { \n feature: TagFeature;\n}\n\nexport class FeatureTag extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.tag}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {OutputID, BasicOutput as BasicOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: BasicOutputJSON\n id: OutputID;\n}\n\nexport class BasicOutput extends React.Component {\n render() {\n return (\n
\n \n Type: BasicOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {AliasOutput as AliasOutputJSON, OutputID} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: AliasOutputJSON\n id: OutputID;\n}\n\nexport class AliasOutput extends React.Component {\n render() {\n return (\n
\n \n Type: AliasOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n AliasID: {this.props.output.aliasId}\n StateIndex: {this.props.output.stateIndex}\n State Metadata: {this.props.output.stateMetadata} \n Foundry Counter: {this.props.output.foundryCounter}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n","import * as React from 'react';\nimport {OutputID, FoundryOutput as FoundryOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: FoundryOutputJSON\n id: OutputID;\n}\n\nexport class FoundryOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n Serial Number: {this.props.output.serialNumber}\n Token Scheme: {this.props.output.tokenScheme} \n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport {OutputID, NFTOutput as NFTOutputJSON} from \"../misc/Payload\";\nimport {conditionToComponent} from \"../utils/condition\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { featureToComponent } from 'app/utils/feature';\nimport { NativeToken } from './NativeToken';\n\ninterface Props {\n output: NFTOutputJSON\n id: OutputID;\n}\n\nexport class NFTOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n NFT ID: {this.props.output.nftId}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import { action, computed, observable } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport {\r\n BasicPayload,\r\n getPayloadType,\r\n Output,\r\n PayloadType,\r\n FaucetPayload,\r\n TransactionPayload,\r\n TaggedDataPayload,\r\n BasicOutput\r\n} from \"../misc/Payload\";\r\nimport * as React from \"react\";\r\nimport { Link } from 'react-router-dom';\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { OutputType } from 'app/utils/output';\r\n\r\nexport const GenesisBlockID = \"1111111111111111111111111111111111111111111111111111111111111111\";\r\nexport const GenesisTransactionID = \"11111111111111111111111111111111\";\r\n\r\nexport class Block {\r\n id: string;\r\n networkID: number;\r\n protocolVersion: number;\r\n solidificationTimestamp: number;\r\n issuanceTimestamp: number;\r\n sequenceNumber: number;\r\n issuerID: string;\r\n signature: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n strongChildren: Array;\r\n weakChildren: Array;\r\n shallowLikeChildren: Array;\r\n solid: boolean;\r\n spendIDs: Array;\r\n addedSpendIDs: Array;\r\n subtractedSpendIDs: Array;\r\n scheduled: boolean;\r\n booked: boolean;\r\n orphaned: boolean;\r\n objectivelyInvalid: boolean;\r\n subjectivelyInvalid: boolean;\r\n acceptance: boolean;\r\n acceptanceTime: number;\r\n confirmation: boolean;\r\n confirmationTime: number;\r\n confirmationBySlot: boolean;\r\n confirmationBySlotTime: number;\r\n payloadType: number;\r\n payload: any;\r\n txId: string;\r\n rank: number;\r\n sequenceID: number;\r\n isPastMarker: boolean;\r\n pastMarkerGap: number;\r\n pastMarkers: string;\r\n commitmentID: string\r\n commitment: Commitment;\r\n latestConfirmedSlot: number;\r\n}\r\n\r\nexport class Commitment {\r\n index: number;\r\n prevID: string;\r\n rootsID: string;\r\n cumulativeWeight: number;\r\n}\r\nexport class AddressResult {\r\n address: string;\r\n explorerOutputs: Array;\r\n}\r\n\r\nexport class ExplorerOutput {\r\n id: OutputID;\r\n output: Output;\r\n metadata: OutputMetadata\r\n txTimestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputID {\r\n base58: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class OutputMetadata {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n consumerCount: number;\r\n confirmedConsumer: string // tx id of confirmed consumer\r\n confirmationState: number\r\n confirmationStateTime: number\r\n}\r\n\r\nclass OutputConsumer {\r\n transactionID: string;\r\n valid: string;\r\n}\r\n\r\nclass OutputConsumers {\r\n outputID: OutputID;\r\n consumers: Array\r\n}\r\n\r\nclass TransactionMetadata {\r\n transactionID: string;\r\n spendIDs: string[];\r\n booked: boolean;\r\n bookedTime: number;\r\n confirmationState: string;\r\n confirmationStateTime: number;\r\n}\r\n\r\nclass PendingMana {\r\n mana: number;\r\n outputID: string;\r\n error: string;\r\n timestamp: number;\r\n}\r\n\r\nclass Conflict {\r\n id: string;\r\n parents: Array;\r\n spendIDs: Array;\r\n confirmationState: number;\r\n}\r\n\r\nclass ConflictChildren {\r\n conflictID: string;\r\n childConflicts: Array\r\n}\r\n\r\nclass ConflictChild {\r\n conflictID: string;\r\n type: string;\r\n}\r\n\r\nclass ConflictConflict {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n}\r\n\r\nclass ConflictConflicts {\r\n conflictID: string;\r\n conflicts: Array\r\n}\r\n\r\nclass ConflictVoters {\r\n conflictID: string;\r\n voters: Array\r\n}\r\n\r\nclass SlotInfo {\r\n id: string;\r\n index: number;\r\n rootsID: string;\r\n prevID: string;\r\n cumulativeWeight: number;\r\n blocks: Array;\r\n transactions: Array;\r\n createdOutputs: Array;\r\n spentOutputs: Array;\r\n}\r\n\r\nclass SearchResult {\r\n block: BlockRef;\r\n address: AddressResult;\r\n}\r\n\r\nclass BlockRef {\r\n id: string;\r\n payload_type: number;\r\n}\r\n\r\nclass Tips {\r\n tips: Array\r\n}\r\n\r\nconst liveFeedSize = 50;\r\n\r\nenum QueryError {\r\n NotFound = 1,\r\n BadRequest = 2\r\n}\r\n\r\nexport class ExplorerStore {\r\n // live feed\r\n @observable latest_blocks: Array = [];\r\n\r\n // queries\r\n @observable blk: Block = null;\r\n @observable addr: AddressResult = null;\r\n @observable tx: any = null;\r\n @observable txMetadata: any = null;\r\n @observable txAttachments: any = [];\r\n @observable output: any = null;\r\n @observable outputMetadata: OutputMetadata = null;\r\n @observable outputConsumers: OutputConsumers = null;\r\n @observable pendingMana: PendingMana = null;\r\n @observable conflict: Conflict = null;\r\n @observable conflictChildren: ConflictChildren = null;\r\n @observable conflictConflicts: ConflictConflicts = null;\r\n @observable conflictVoters: ConflictVoters = null;\r\n @observable tips: Tips = null;\r\n @observable slotInfo: SlotInfo = new SlotInfo;\r\n\r\n // loading\r\n @observable query_loading: boolean = false;\r\n @observable query_err: any = null;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n @observable search_result: SearchResult = null;\r\n @observable searching: boolean = false;\r\n @observable payload: any;\r\n @observable subpayload: any;\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Block, this.addLiveFeedBlock);\r\n }\r\n\r\n searchAny = async () => {\r\n this.updateSearching(true);\r\n try {\r\n let res = await fetch(`/api/search/${this.search}`);\r\n let result: SearchResult = await res.json();\r\n this.updateSearchResult(result);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n resetSearch = () => {\r\n this.search_result = null;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n updateSearchResult = (result: SearchResult) => {\r\n this.search_result = result;\r\n this.searching = false;\r\n let search = this.search;\r\n this.search = '';\r\n if (this.search_result.block) {\r\n this.routerStore.push(`/explorer/block/${search}`);\r\n return;\r\n }\r\n if (this.search_result.address) {\r\n this.routerStore.push(`/explorer/address/${search}`);\r\n return;\r\n }\r\n this.routerStore.push(`/explorer/404/${search}`);\r\n };\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search;\r\n };\r\n\r\n @action\r\n updateSearching = (searching: boolean) => this.searching = searching;\r\n\r\n searchBlock = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/block/${id}`)\r\n\r\n this.updateBlock(res);\r\n };\r\n\r\n searchAddress = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/address/${id}`)\r\n this.updateAddress(res);\r\n };\r\n\r\n getSlotDetails = async (id: string) => {\r\n await this.getSlotInfo(id);\r\n }\r\n\r\n @action\r\n getTransaction = async (id: string) => {\r\n const tx = await this.fetchJson(\"get\", `/api/transaction/${id}`)\r\n \r\n for (let i = 0; i < tx.inputs.length; i++) {\r\n let inputID = tx.inputs[i] ? tx.inputs[i].referencedOutputID.hex : GenesisBlockID\r\n try {\r\n let referencedOutputRes = await fetch(`/api/output/${inputID}`)\r\n if (referencedOutputRes.status === 404) {\r\n let genOutput = new Output();\r\n genOutput.output = new BasicOutput();\r\n genOutput.output.amount = 0;\r\n genOutput.type = OutputType.Basic;\r\n genOutput.outputID = tx.inputs[i].referencedOutputID;\r\n tx.inputs[i].output = genOutput;\r\n }\r\n if (referencedOutputRes.status === 200) {\r\n tx.inputs[i].output = await referencedOutputRes.json()\r\n }\r\n } catch (err) {\r\n // ignore\r\n }\r\n this.tx = tx;\r\n }\r\n }\r\n\r\n @action\r\n getTransactionAttachments = async (id: string) => {\r\n const attachments = await this.fetchJson(\"get\", `/api/transaction/${id}/attachments`)\r\n this.txAttachments = attachments;\r\n }\r\n\r\n @action\r\n getTransactionMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/transaction/${id}/metadata`)\r\n this.txMetadata = res;\r\n }\r\n\r\n @action\r\n getOutput = async (id: string) => {\r\n const output = await this.fetchJson(\"get\", `/api/output/${id}`)\r\n this.output = output;\r\n }\r\n\r\n @action\r\n getOutputMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/metadata`)\r\n this.outputMetadata = res;\r\n }\r\n\r\n @action\r\n getOutputConsumers = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/consumers`)\r\n this.outputConsumers = res;\r\n }\r\n\r\n @action\r\n getPendingMana = async (outputID: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/mana/pending?OutputID=${outputID}`)\r\n this.pendingMana = res;\r\n }\r\n\r\n @action\r\n getConflict = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}`)\r\n this.conflict = res;\r\n }\r\n\r\n @action\r\n getConflictChildren = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/children`)\r\n this.conflictChildren = res;\r\n }\r\n\r\n @action\r\n getConflictConflicts = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/conflicts`)\r\n this.conflictConflicts = res;\r\n }\r\n\r\n @action\r\n getConflictVoters = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/voters`)\r\n this.conflictVoters = res;\r\n }\r\n\r\n @action\r\n getSlotInfo = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/slot/commitment/${id}`)\r\n this.slotInfo = res;\r\n }\r\n\r\n @action\r\n getTips = async () => {\r\n const res = await this.fetchJson(\"get\", \"/api/tips\")\r\n this.tips = res;\r\n }\r\n\r\n @action\r\n reset = () => {\r\n this.blk = null;\r\n this.query_err = null;\r\n // reset all variables\r\n this.tx = null;\r\n this.txMetadata = null;\r\n this.txAttachments = [];\r\n this.output = null;\r\n this.outputMetadata = null;\r\n this.outputConsumers = null;\r\n this.pendingMana = null;\r\n this.conflict = null;\r\n this.conflictChildren = null;\r\n this.conflictConflicts = null;\r\n this.tips = null;\r\n this.slotInfo = new SlotInfo;\r\n };\r\n\r\n @action\r\n updateAddress = (addr: AddressResult) => {\r\n this.addr = addr;\r\n this.query_err = null;\r\n this.query_loading = false;\r\n };\r\n\r\n @action\r\n updateBlock = (blk: Block) => {\r\n this.blk = blk;\r\n this.blk.spendIDs = this.blk.spendIDs ? this.blk.spendIDs : []\r\n this.blk.addedSpendIDs = this.blk.addedSpendIDs ? this.blk.addedSpendIDs : []\r\n this.blk.subtractedSpendIDs = this.blk.subtractedSpendIDs ? this.blk.subtractedSpendIDs : []\r\n this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : []\r\n this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : []\r\n this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : []\r\n this.blk.strongParents = this.blk.strongParents ? this.blk.strongParents : []\r\n this.blk.weakParents = this.blk.weakParents ? this.blk.weakParents : []\r\n this.blk.shallowLikedParents = this.blk.shallowLikedParents ? this.blk.shallowLikedParents : []\r\n\r\n this.query_err = null;\r\n this.query_loading = false;\r\n switch (blk.payloadType) {\r\n case PayloadType.Transaction:\r\n this.payload = blk.payload as TransactionPayload\r\n break;\r\n case PayloadType.TaggedData:\r\n this.payload = blk.payload as TaggedDataPayload\r\n break;\r\n case PayloadType.Faucet:\r\n this.payload = blk.payload as FaucetPayload\r\n default:\r\n this.payload = blk.payload as BasicPayload\r\n break;\r\n }\r\n };\r\n\r\n @action\r\n updateQueryLoading = (loading: boolean) => this.query_loading = loading;\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.query_err = err;\r\n this.query_loading = false;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n addLiveFeedBlock = (blk: BlockRef) => {\r\n // prevent duplicates (should be fast with only size 10)\r\n if (this.latest_blocks.findIndex((t) => t.id == blk.id) === -1) {\r\n if (this.latest_blocks.length >= liveFeedSize) {\r\n this.latest_blocks.shift();\r\n }\r\n this.latest_blocks.push(blk);\r\n }\r\n };\r\n\r\n @computed\r\n get blksLiveFeed() {\r\n let feed = [];\r\n for (let i = this.latest_blocks.length - 1; i >= 0; i--) {\r\n let blk = this.latest_blocks[i];\r\n feed.push(\r\n \r\n \r\n \r\n {blk.id}\r\n \r\n \r\n \r\n {getPayloadType(blk.payload_type)}\r\n \r\n \r\n );\r\n }\r\n return feed;\r\n }\r\n\r\n @computed\r\n get tipsList() {\r\n let list = [];\r\n if (this.tips) {\r\n for (let i = 0; i < this.tips.tips.length; i++) {\r\n let blkId = this.tips.tips[i];\r\n list.push(\r\n \r\n \r\n \r\n {blkId}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return list;\r\n }\r\n\r\n async fetchJson(\r\n method: 'get' | 'delete',\r\n route: string,\r\n requestData?: T\r\n ): Promise {\r\n\r\n const body = requestData ? JSON.stringify(requestData, function (_, v) {\r\n // keep Uint8Array as it is\r\n if (v instanceof Uint8Array) {\r\n return Array.from(v);\r\n }\r\n return v;\r\n })\r\n : undefined;\r\n\r\n const response = await fetch(`${route}`, {\r\n method,\r\n headers: { 'Content-Type': 'application/json' },\r\n body\r\n });\r\n\r\n if (response.ok) {\r\n const responseData: U = await response.json();\r\n return responseData;\r\n }\r\n\r\n switch (response.status) {\r\n case 404:\r\n this.updateQueryError(QueryError.NotFound);\r\n break;\r\n case 400:\r\n this.updateQueryError(QueryError.BadRequest);\r\n break;\r\n default:\r\n this.updateQueryError('unexpected error')\r\n break;\r\n }\r\n return {} as U;\r\n }\r\n}\r\n\r\nexport default ExplorerStore;\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class BasicPayload extends React.Component {\r\n\r\n render() {\r\n let {payload} = this.props.explorerStore;\r\n return (\r\n payload &&\r\n \r\n \r\n \r\n {payload.content_title}: {' '} \r\n {payload.content}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum SignatureType {\n Ed25519 = 0,\n BLS = 1,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case SignatureType.Ed25519:\n return \"Ed25519 Signature\";\n case SignatureType.BLS:\n return \"BLS Signature\";\n default:\n return \"Unknown Signature Type\";\n }\n}","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport { Col, ListGroup } from 'react-bootstrap';\nimport { SignatureEd25519 } from 'app/misc/Payload';\n\ninterface Props {\n signature?: SignatureEd25519;\n}\n\nexport class Ed25519Signature extends React.Component {\n\n render() {\n let signature = this.props.signature;\n return (\n \n \n \n \n Public Key: {signature.publicKey}\n Signature: {signature.signature}\n \n \n \n \n );\n }\n}\n","import {UnlockBlock as unlockBlockJSON} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport Badge from \"react-bootstrap/Badge\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {SignatureType, resolveSignatureType} from \"../utils/unlock_block\";\nimport { Ed25519Signature } from \"./Ed25519Signature\";\n\ninterface UnlockProps {\n block: unlockBlockJSON;\n key: number;\n}\n\nexport class UnlockBlock extends React.Component {\n renderSignatureComponent() {\n switch (this.props.block.signatureType) {\n case SignatureType.Ed25519:\n return \n }\n }\n\n render() {\n let block = this.props.block;\n return (\n \n \n Index: {this.props.key}\n \n Type: {block.type}\n {\n block.signatureType && Signature Type: {resolveSignatureType(block.signatureType)}\n } \n {\n this.renderSignatureComponent()\n } \n \n \n \n );\n }\n}","import * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {outputToComponent} from \"../utils/output\";\nimport {IconContext} from \"react-icons\";\nimport {FaChevronCircleRight} from \"react-icons/fa\";\nimport {UnlockBlock} from \"./UnlockBlock\";\nimport {TransactionPayload} from \"../misc/Payload\";\n\nconst style = {\n maxHeight: \"1000px\",\n overflow: \"auto\",\n width: \"47%\",\n fontSize: \"85%\",\n}\n\ninterface Props {\n txID?: string;\n tx?: TransactionPayload;\n}\n\nexport class Transaction extends React.Component {\n render() {\n let txID = this.props.txID;\n let tx = this.props.tx;\n return (\n tx && txID &&\n
\n

Transaction

\n

{txID}

\n \n \n
Transaction Essence
\n \n ID: {txID}\n Network ID: {tx.networkId}\n Creation Time: {tx.creationSlot}\n \n
\n
\n Inputs\n
\n {tx.inputs.map((input, i) => {\n return (\n
\n Index: {i}\n
\n \n Output ID: {input.referencedOutputID.hex}\n \n
\n
\n )\n })}\n
\n \n
\n \n
\n
\n
\n Outputs\n
\n {tx.outputs.map((output, i) => {\n return (\n
\n Index: {i}\n {outputToComponent(output)}\n
\n )\n })}\n
\n
\n
\n { tx.payload && Data payload: {tx.payload}}\n
\n \n
\n \n \n
Unlock Blocks
\n \n {\n tx.unlocks.map((block,index) => (\n \n ))}\n \n \n
\n
\n );\n }\n}","import * as React from 'react';\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\r\nimport {Transaction} from \"./Transaction\";\r\n// import {ExplorerTransactionMetadata} from \"./ExplorerTransactionMetadata\";\r\nimport Container from \"react-bootstrap/Container\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class TransactionPayload extends React.Component {\r\n render() {\r\n let {payload, blk} = this.props.explorerStore;\r\n let txID = blk.txId;\r\n let tx = payload;\r\n\r\n return (\r\n \r\n {/* */}\r\n \r\n \r\n );\r\n }\r\n}\r\n","export function resolveBase58ConflictID(base58Conflict: string): string {\n switch (base58Conflict) {\n case MasterConflictInBase58:\n return \"MasterConflictID\";\n case UndefinedConflictInBase58:\n return \"UndefinedConflictID\";\n case LazyBookedConflictsConflictInBase58:\n return \"LazyBookedConflictsConflictID\";\n case InvalidConflictInBase58:\n return \"InvalidConflictID\";\n default:\n // otherwise it is a \"regular\" conflictID that doesn't have a distinct name\n return base58Conflict\n }\n}\n\n// base58 conflictIDs that have distinct names\nconst MasterConflictInBase58 = \"4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM\"\nconst UndefinedConflictInBase58 = \"11111111111111111111111111111111\"\nconst LazyBookedConflictsConflictInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF\"\nconst InvalidConflictInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG\"","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport {inject, observer} from \"mobx-react\";\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class FaucetPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n return (\n payload &&\n \n \n \n \n \n Address: {payload.address}\n \n \n Access Mana Pledge ID: {payload.accessManaPledgeID}\n \n \n Consensus Mana Pledge ID: {payload.consensusManaPledgeID}\n \n \n Nonce: {payload.nonce}\n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport { Col, ListGroup } from 'react-bootstrap';\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class TaggedDataPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n \n return (\n payload &&\n \n \n \n \n Tag: {payload.tag}\n Data: {payload.data}\n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport ExplorerStore, { GenesisBlockID } from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport * as dateformat from 'dateformat';\r\nimport { Link } from 'react-router-dom';\r\nimport { BasicPayload } from './BasicPayload'\r\nimport { TransactionPayload } from './TransactionPayload'\r\nimport { getPayloadType, PayloadType } from '../misc/Payload'\r\nimport { resolveBase58ConflictID } from \"../utils/conflict\";\r\nimport { FaucetPayload } from './FaucetPayload';\r\nimport { TaggedDataPayload } from './TaggedDataPayload';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerBlockQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.explorerStore.reset();\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n getPayloadType() {\r\n return getPayloadType(this.props.explorerStore.blk.payloadType)\r\n }\r\n\r\n renderPayload() {\r\n switch (this.props.explorerStore.blk.payloadType) {\r\n case PayloadType.Transaction:\r\n if (!this.props.explorerStore.blk.objectivelyInvalid) {\r\n return \r\n }\r\n return \r\n case PayloadType.TaggedData:\r\n return \r\n case PayloadType.Faucet:\r\n return \r\n default:\r\n return \r\n }\r\n }\r\n\r\n render() {\r\n let { id } = this.props.match.params;\r\n let { blk, query_loading, query_err } = this.props.explorerStore;\r\n\r\n if (id === GenesisBlockID) {\r\n return (\r\n \r\n

Genesis Block

\r\n

In the beginning there was the genesis.

\r\n
\r\n );\r\n }\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Block not available - 404

\r\n

\r\n Block with ID {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n return (\r\n \r\n

Block

\r\n

\r\n {id} {' '}\r\n {\r\n blk &&\r\n \r\n
\r\n \r\n \r\n Issuance Time: {dateformat(new Date(blk.issuanceTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Solidification Time: {dateformat(new Date(blk.solidificationTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n
\r\n }\r\n

\r\n {\r\n blk &&\r\n \r\n \r\n \r\n \r\n \r\n Payload Type: {this.getPayloadType()}\r\n \r\n \r\n Sequence Number: {blk.sequenceNumber}\r\n \r\n \r\n spendIDs:\r\n \r\n {\r\n blk.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n AddedspendIDs:\r\n \r\n {\r\n blk.addedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n SubtractedspendIDs:\r\n \r\n {\r\n blk.subtractedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n Solid: {blk.solid ? 'Yes' : 'No'}\r\n \r\n \r\n Scheduled: {blk.scheduled ? 'Yes' : 'No'}\r\n \r\n \r\n Booked: {blk.booked ? 'Yes' : 'No'}\r\n \r\n \r\n Orphaned: {blk.orphaned ? 'Yes' : 'No'}\r\n \r\n \r\n Objectively Invalid: {blk.objectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Subjectively Invalid: {blk.subjectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance: {blk.acceptance ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance\r\n Time: {dateformat(new Date(blk.acceptanceTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation: {blk.confirmation ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation\r\n Time: {dateformat(new Date(blk.confirmationTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation by slot: {blk.confirmationBySlot ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation by slot\r\n time: {dateformat(new Date(blk.confirmationBySlotTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n
Slot Commitment
\r\n \r\n \r\n CommitmentID: {blk.commitmentID}\r\n \r\n \r\n \r\n \r\n Index: {blk.commitment.index}\r\n \r\n \r\n prevID: {blk.commitment.prevID}\r\n \r\n \r\n rootsID: {blk.commitment.rootsID}\r\n \r\n \r\n Cumulative Weight: {blk.commitment.cumulativeWeight}\r\n \r\n \r\n \r\n \r\n LatestConfirmedSlot: {blk.latestConfirmedSlot}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n {\r\n !!blk.rank &&\r\n \r\n \r\n
Markers
\r\n \r\n \r\n Rank: {blk.rank}\r\n \r\n \r\n SequenceID: {blk.sequenceID}\r\n \r\n \r\n PastMarkerGap: {blk.pastMarkerGap}\r\n \r\n \r\n IsPastMarker: {blk.isPastMarker ? 'Yes' : 'No'}\r\n \r\n \r\n Past markers: {blk.pastMarkers}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n\r\n \r\n \r\n \r\n \r\n IssuerID: {blk.issuerID}\r\n \r\n \r\n Block Signature: {blk.signature}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongParents.map((value, index) => {\r\n return (\r\n \r\n Strong Parents {index + 1}: {' '}\r\n \r\n {blk.strongParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.weakParents.map((value, index) => {\r\n return (\r\n \r\n Weak Parents {index + 1}: {' '}\r\n \r\n {blk.weakParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.shallowLikedParents.map((value, index) => {\r\n return (\r\n \r\n Shallow Liked Parents {index + 1}: {' '}\r\n \r\n {blk.shallowLikedParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongChildren.map((value, index) => {\r\n return (\r\n \r\n Strong Child {index + 1}: {' '}\r\n \r\n {blk.strongChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.weakChildren.map((value, index) => {\r\n return (\r\n \r\n Weak Child {index + 1}: {' '}\r\n \r\n {blk.weakChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.shallowLikeChildren.map((value, index) => {\r\n return (\r\n \r\n ShallowLike Child {index + 1}: {' '}\r\n \r\n {blk.shallowLikeChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n

Payload

\r\n \r\n
\r\n \r\n \r\n {this.renderPayload()}\r\n \r\n \r\n
\r\n }\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","export function displayManaUnit(mana: number): string {\n let result = \"\"\n // round to nearest integer\n let roundedMana = Math.round(mana);\n if (roundedMana < 1000) {\n result = roundedMana.toString(10) + \" m\"; // mana\n } else if (roundedMana < 1000000) {\n result = (roundedMana / 1000).toFixed(3) + \" Km\"; // kilomana\n }\n else if (roundedMana < 1000000000) {\n result = (roundedMana / 1000000).toFixed(3) + \" Mm\"; // megamana\n }\n else if (roundedMana < 1000000000000) {\n result = (roundedMana / 1000000000).toFixed(3) + \" Gm\"; // gigamana\n }\n else if (roundedMana < 1000000000000000) {\n result = (roundedMana / 1000000000000).toFixed(3) + \" Tm\"; // terramana\n } else {\n result = (roundedMana / 1000000000000000).toFixed(3) + \" Pm\"; // petamana\n }\n return result\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore, ExplorerOutput, OutputMetadata} from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Alert from \"react-bootstrap/Alert\";\r\nimport {Link} from 'react-router-dom';\r\nimport {displayManaUnit} from \"../utils\";\r\nimport {OutputType, outputToComponent, outputTypeToName} from \"../utils/output\";\r\nimport {Button, ListGroupItem} from \"react-bootstrap\";\r\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerAddressQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n let {id} = this.props.match.params;\r\n let {addr, query_loading, query_err} = this.props.explorerStore;\r\n // spent outputs\r\n let spent: Array = [];\r\n // unspent outputs\r\n let unspent: Array = [];\r\n let available_balances = [];\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Address not available - 404

\r\n

\r\n Address {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n\r\n if (addr) {\r\n // separate spent from unspent\r\n addr.explorerOutputs.forEach((o) => {\r\n if (o.metadata.consumerCount > 0) {\r\n spent.push(o);\r\n } else {\r\n unspent.push(o);\r\n }\r\n })\r\n\r\n let timestampCompareFn = (a: ExplorerOutput, b: ExplorerOutput) => {\r\n if (b.txTimestamp === a.txTimestamp) {\r\n // outputs have the same timestamp\r\n if (b.id.transactionID == a.id.transactionID) {\r\n // outputs belong to the same tx, sort based on index\r\n return b.id.outputIndex - a.id.outputIndex;\r\n }\r\n // same timestamp, but different tx\r\n return b.id.transactionID.localeCompare(a.id.transactionID);\r\n }\r\n return b.txTimestamp - a.txTimestamp;\r\n }\r\n\r\n // sort outputs\r\n unspent.sort(timestampCompareFn)\r\n spent.sort(timestampCompareFn)\r\n }\r\n return (\r\n \r\n

Address {id} {addr !== null && ({addr.explorerOutputs.length} Outputs)}

\r\n {\r\n addr !== null ?\r\n \r\n {\r\n addr.explorerOutputs !== null && addr.explorerOutputs.length === 100 &&\r\n \r\n Max. 100 outputs are shown.\r\n \r\n }\r\n \r\n \r\n \r\n

Available Balances

\r\n {available_balances.length === 0? \"There are no balances currently available.\" :
\r\n \r\n \r\n \r\n Color\r\n \r\n \r\n Balance\r\n \r\n \r\n \r\n {available_balances}\r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Unspent Outputs

\r\n {unspent.length === 0? \"There are no unspent outputs currently available.\" :
\r\n {unspent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Spent Outputs

\r\n {spent.length === 0? \"There are no spent outputs currently available.\" :
\r\n {spent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\ninterface oProps {\r\n output: ExplorerOutput;\r\n}\r\n\r\nclass OutputButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n enabled: false\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n { this.setState({enabled: !this.state.enabled})}}\r\n block\r\n >\r\n \r\n {this.props.output.id.base58} \r\n {outputTypeToName(this.props.output.output.type)} \r\n {new Date(this.props.output.txTimestamp * 1000).toLocaleString()}\r\n \r\n \r\n \r\n \r\n {\r\n this.state.enabled? outputToComponent(this.props.output.output): null\r\n }\r\n \r\n \r\n {\r\n this.state.enabled? : null\r\n }\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\ninterface omProps {\r\n metadata: OutputMetadata;\r\n timestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputMeta extends React.Component {\r\n render() {\r\n let metadata = this.props.metadata;\r\n let timestamp = this.props.timestamp;\r\n let pendingMana = this.props.pendingMana;\r\n return (\r\n \r\n spendIDs: \r\n \r\n {\r\n metadata.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n Pending mana: {displayManaUnit(pendingMana)}\r\n Timestamp: {new Date(timestamp * 1000).toLocaleString()}\r\n Consumer Count: {metadata.consumerCount}\r\n { metadata.confirmedConsumer && Confirmed Consumer: {metadata.confirmedConsumer} }\r\n \r\n );\r\n }\r\n}\r\n\r\nlet getVariant = (outputType: number) => {\r\n switch (outputType) {\r\n case OutputType.Basic:\r\n return \"light\";\r\n case OutputType.Alias:\r\n return \"light\";\r\n case OutputType.Foundry:\r\n return \"success\";\r\n case OutputType.NFT:\r\n return \"info\";\r\n default:\r\n return \"danger\";\r\n }\r\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n search: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class Explorer404 extends React.Component {\r\n\r\n render() {\r\n let {search} = this.props.match.params;\r\n return (\r\n \r\n

Tangle Explorer 404

\r\n

\r\n The search via '{search}' did not yield any results.\r\n

\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport * as prettysize from 'prettysize';\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport {Line} from \"react-chartjs-2\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n identity: string;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbor extends React.Component {\r\n render() {\r\n let neighborMetrics = this.props.nodeStore.neighbor_metrics.get(this.props.identity);\r\n let last = neighborMetrics.current;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {last.id}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Origin:\r\n {' '}\r\n {last.connection_origin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Address: {last.address}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Network (Tx/Rx)
\r\n \r\n {'Total: '}\r\n {last.packets_written}\r\n {' / '}\r\n {last.packets_read}\r\n \r\n {' '}\r\n \r\n {'Current: '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.tx)}\r\n {' / '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.rx)}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Neighbor} from \"./Neighbor\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbors extends React.Component {\r\n render() {\r\n let neighborsEle = [];\r\n this.props.nodeStore.neighbor_metrics.forEach((v, k) => {\r\n neighborsEle.push();\r\n });\r\n return (\r\n \r\n

Neighbors {neighborsEle.length > 0 && ({neighborsEle.length})}

\r\n

\r\n Currently connected neighbors.\r\n

\r\n {neighborsEle}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { KeyboardEvent } from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport { Link } from 'react-router-dom';\r\nimport VisualizerStore from \"../stores/VisualizerStore\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Popover from \"react-bootstrap/Popover\";\r\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\r\n\r\ninterface Props {\r\n visualizerStore?: VisualizerStore;\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"visualizerStore\")\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Visualizer extends React.Component {\r\n\r\n componentDidMount(): void {\r\n this.props.visualizerStore.start();\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.props.visualizerStore.stop();\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n updateVerticesLimit = (e) => {\r\n this.props.visualizerStore.updateVerticesLimit(e.target.value);\r\n }\r\n\r\n pauseResumeVisualizer = (e) => {\r\n this.props.visualizerStore.pauseResume();\r\n }\r\n\r\n updateSearch = (e) => {\r\n this.props.visualizerStore.updateSearch(e.target.value);\r\n }\r\n\r\n searchAndHighlight = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.visualizerStore.searchAndHighlight();\r\n }\r\n\r\n toggleBackgroundDataCollection = () => {\r\n if (this.props.nodeStore.collecting) {\r\n this.props.nodeStore.unregisterHandlers();\r\n return;\r\n }\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n render() {\r\n let {\r\n vertices, finalized_count, selected,\r\n verticesLimit, tips_count, paused, search\r\n } = this.props.visualizerStore;\r\n let { last_mps_metric, collecting } = this.props.nodeStore;\r\n\r\n return (\r\n \r\n

Visualizer

\r\n \r\n \r\n \r\n \r\n Vertices Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n Search Vertex\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ensures that only data needed for the visualizer is collected.\r\n \r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Pauses/resumes rendering the graph.\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n BLK Pending\r\n \r\n {' '}\r\n \r\n BLK Confirmed\r\n \r\n {' '}\r\n \r\n TX Pending\r\n \r\n {' '}\r\n \r\n TX Confirmed\r\n \r\n {' '}\r\n \r\n Tip\r\n \r\n {' '}\r\n \r\n Unknown\r\n \r\n
\r\n Vertices: {vertices.size}, Tips: {tips_count},\r\n Confirmed/UnConfirmed: {finalized_count}/{vertices.size - finalized_count},{' '}\r\n BPS: {last_mps_metric.mps}\r\n
\r\n Selected: {selected ?\r\n \r\n {selected.id.substr(0, 10)}\r\n \r\n : \"-\"}\r\n
\r\n {\r\n selected ? selected.strongParents &&\r\n Strong:{' '}\r\n {selected.strongParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.weakParents &&\r\n Weak:{' '}\r\n {selected.weakParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.shallowLikedParents &&\r\n Shallow Liked:{' '}\r\n {selected.shallowLikedParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n

\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Table from \"react-bootstrap/Table\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class Tips extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTips();\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {tipsList} = this.props.explorerStore;\n return (\n \n

Tips

\n \n \n \n \n \n \n \n {tipsList}\n \n
BlockID
\n
\n );\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport {Transaction} from \"./Transaction\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransaction extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransaction(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, tx } = this.props.explorerStore;\n if (query_err) {\n return (\n \n

Transaction not available - 404

\n

\n Transaction with ID {txId} not found.\n

\n
\n );\n }\n return \n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n// import {resolveBase58ConflictID} from \"../utils/conflict\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionMetadata extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionMetadata(this.props.txId);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, txMetadata } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Metadata

\n

Metadata for transaction ID {txId} not found.

\n
\n );\n }\n return (\n
\n

Metadata

\n {txMetadata && \n \n ConflictIDs: \n \n { \n txMetadata.conflictIDs && txMetadata.conflictIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n \n Booked: {txMetadata.booked.toString()}\n {/* Booked time: {new Date(txMetadata.bookedTime * 1000).toLocaleString()} */}\n Confirmation State: {txMetadata.confirmationState}\n {/* Confirmation State Time: {new Date(txMetadata.confirmationStateTime * 1000).toLocaleString()} */}\n }\n
\n )\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionAttachments extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionAttachments(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txAttachments } = this.props.explorerStore;\n return (\n
\n

Attachments

\n {txAttachments && txAttachments.blockIDs && \n \n \n {txAttachments.blockIDs.map((blkId, i) => {\n return {blkId}\n })}\n \n \n }\n
\n )\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { ExplorerTransaction } from \"./ExplorerTransaction\"\nimport { ExplorerTransactionMetadata } from \"./ExplorerTransactionMetadata\"\nimport { ExplorerTransactionAttachments } from \"./ExplorerTransactionAttachments\"\n\n\ninterface Props {\n match?: {\n params: {\n id: string,\n }\n }\n}\n\nexport class ExplorerTransactionQueryResult extends React.Component {\n render() {\n let { id } = this.props.match.params;\n return (\n \n \n \n \n \n )\n }\n}","export enum ConfirmationState {\n Undefined = 0,\n Rejected,\n Pending,\n Accepted,\n Confirmed,\n}\n\nexport function resolveConfirmationState(sigType: number) {\n switch (sigType) {\n case ConfirmationState.Undefined:\n return \"Undefined\";\n case ConfirmationState.Rejected:\n return \"Rejected\";\n case ConfirmationState.Pending:\n return \"Pending\";\n case ConfirmationState.Accepted:\n return \"Accepted\";\n case ConfirmationState.Confirmed:\n return \"Confirmed\";\n default:\n return \"Undefined Confirmation State\";\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {Link} from 'react-router-dom';\nimport {displayManaUnit} from \"../utils\";\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\nimport {outputToComponent} from \"../utils/output\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getOutput(this.props.match.params.id);\n this.props.explorerStore.getPendingMana(this.props.match.params.id);\n this.props.explorerStore.getOutputMetadata(this.props.match.params.id);\n this.props.explorerStore.getOutputConsumers(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, output, pendingMana, outputMetadata, outputConsumers } = this.props.explorerStore;\n\n let renderTriBool = (val: string) => {\n if (val === \"true\"){\n return True\n }\n if (val === \"false\"){\n return False\n }\n return Maybe\n }\n\n if (query_err) {\n return (\n \n

Output not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Output

\n {output &&
\n {outputToComponent(output)}\n \n {pendingMana && \n Pending Mana\n
\n
Value: {displayManaUnit(pendingMana.mana)}
\n
Timestamp: {new Date(pendingMana.timestamp * 1000).toLocaleString()}
\n
}\n
\n
}\n\n

Metadata

\n {outputMetadata &&
\n \n Transaction ID: {outputMetadata.outputID.transactionID} \n spendIDs: \n \n {\n outputMetadata.spendIDs.map((value, index) => {\n return (\n \n \n {resolveBase58ConflictID(value)}\n \n \n )\n })\n }\n \n Consumer Count: {outputMetadata.consumerCount}\n Confirmed Consumer: {outputMetadata.confirmedConsumer} \n Confirmation State: {resolveConfirmationState(outputMetadata.confirmationState)}\n Confirmation State Time: {new Date(outputMetadata.confirmationStateTime * 1000).toLocaleString()}\n \n
}\n\n

Consumers

\n {outputConsumers &&
\n \n {outputConsumers.consumers.map((c,i) => \n
Transaction ID: {c.transactionID}
\n
Valid: {renderTriBool(c.valid)}
\n
)}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerConflictQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getConflict(this.props.match.params.id);\n this.props.explorerStore.getConflictChildren(this.props.match.params.id);\n this.props.explorerStore.getConflictConflicts(this.props.match.params.id);\n this.props.explorerStore.getConflictVoters(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, conflict, conflictChildren, conflictConflicts, conflictVoters } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Conflict not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Conflict

\n {conflict && \n ID: {resolveBase58ConflictID(conflict.id)}\n Parents:\n \n {conflict.parents.map((p,i) => {resolveBase58ConflictID(p)})}\n \n \n {Conflicts:\n {conflict.spendIDs && \n {conflict.spendIDs.map((c,i) => {c})}\n }\n }\n ConfirmationState: {resolveConfirmationState(conflict.confirmationState)}\n Children:\n {conflictChildren && \n {conflictChildren.childConflicts.map((c,i) => {resolveBase58ConflictID(c.conflictID)})}\n }\n \n { Conflicts:\n {conflictConflicts && \n {conflictConflicts.conflicts.map((c,i) =>
\n OutputID: {c.outputID.base58}\n \n {c.spendIDs.map((b,j) => \n {resolveBase58ConflictID(b)}\n )}\n \n
)}\n
}\n
}\n Voters:\n {conflictVoters && \n {conflictVoters.voters.map((s,i) => {s})}\n }\n \n
}\n
\n )\n }\n}\n","import { SlotStore } from '../stores/SlotStore';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from '../stores/NodeStore';\nimport * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { Table } from 'react-bootstrap';\n\ninterface Props {\n history: any;\n nodeStore?: NodeStore;\n slotStore?: SlotStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"slotStore\")\n@observer\nexport class SlotLiveFeed extends React.Component {\n render() {\n let {slotLiveFeed} = this.props.slotStore;\n return (\n \n

Slots

\n \n \n \n \n \n \n \n \n {slotLiveFeed}\n \n
IndexCommitment ID
\n
\n );\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { Card, Col, Row, Table } from 'react-bootstrap';\n\n\ninterface Props {\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n commitment: string,\n }\n }\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSlotQueryResult extends React.Component {\n componentDidMount() {\n const id = this.props.match.params.commitment;\n this.props.explorerStore.getSlotDetails(id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n\n render() {\n let {commitment} = this.props.match.params;\n let { query_err, slotInfo } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Slot not found - 404

\n {commitment}\n
\n );\n }\n return (\n \n

Slot

\n {slotInfo && \n ID: {commitment}\n Index: {slotInfo.index}\n RootsID: {slotInfo.rootsID}\n PrevEC: {slotInfo.prevID}\n Cumulative Weight: {slotInfo.cumulativeWeight}\n Blocks:\n {slotInfo.blocks && \n \n \n \n \n \n {slotInfo.blocks.map((b,i) => {b})}\n \n
\n \n
\n
\n
}\n
\n Transactions:\n {slotInfo.transactions && \n \n \n \n \n \n {slotInfo.transactions.map((t,i) => {t})}\n \n
\n \n
\n
\n
}\n
\n Created outputs:\n {slotInfo.createdOutputs && \n \n \n \n \n \n {slotInfo.createdOutputs.map((c,i) => {c})}\n \n
\n \n
\n
\n
}\n
\n Spent outputs:\n {slotInfo.spentOutputs && \n \n \n \n \n \n {slotInfo.spentOutputs.map((s,i) => {s})}\n \n
\n \n
\n
\n
}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from \"../stores/NodeStore\";\nimport Navbar from \"react-bootstrap/Navbar\";\nimport Nav from \"react-bootstrap/Nav\";\nimport {Dashboard} from \"./Dashboard\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {RouterStore} from 'mobx-react-router';\nimport {Explorer} from \"./Explorer\";\nimport {NavExplorerSearchbar} from \"./NavExplorerSearchbar\";\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {LinkContainer} from 'react-router-bootstrap';\nimport {ExplorerBlockQueryResult} from \"./ExplorerBlockQueryResult\";\nimport {ExplorerAddressQueryResult} from \"./ExplorerAddressResult\";\nimport {Explorer404} from \"./Explorer404\";\nimport {Neighbors} from \"./Neighbors\";\nimport {Visualizer} from \"./Visualizer\";\nimport {Tips} from \"./Tips\";\nimport {ExplorerTransactionQueryResult} from \"./ExplorerTransactionQueryResult\";\nimport {ExplorerOutputQueryResult} from \"./ExplorerOutputQueryResult\";\nimport {ExplorerConflictQueryResult} from \"./ExplorerConflictQueryResult\";\nimport { SlotLiveFeed } from './SlotLiveFeed';\nimport { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult';\n\ninterface Props {\n history: any;\n routerStore?: RouterStore;\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"routerStore\")\n@observer\nexport class Root extends React.Component {\n renderDevTool() {\n if (process.env.NODE_ENV !== 'production') {\n const DevTools = require('mobx-react-devtools').default;\n return ;\n }\n }\n\n componentDidMount(): void {\n this.props.nodeStore.connect();\n }\n\n render() {\n return (\n
\n \n iota-core\n \n \n \n \n {!this.props.nodeStore.websocketConnected &&\n WS not connected!\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.children}\n {this.renderDevTool()}\n
\n );\n }\n}\n","import * as React from 'react';\nimport {hot} from 'react-hot-loader/root';\nimport {Root} from './components/Root';\n\n// render react DOM\nexport const App = hot(({history}) => );\n","import {action, computed, observable, ObservableMap} from 'mobx';\r\nimport * as dateformat from 'dateformat';\r\nimport {connectWebSocket, registerHandler, unregisterHandler, WSMsgType} from \"../misc/WS\";\r\n\r\nclass BPSMetric {\r\n mps: number;\r\n ts: string;\r\n}\r\n\r\nclass Status {\r\n id: string;\r\n version: string;\r\n uptime: number;\r\n mem: MemoryMetrics = new MemoryMetrics();\r\n tangleTime: TangleTime;\r\n scheduler: SchedulerMetric = new SchedulerMetric();\r\n}\r\n\r\nclass TangleTime {\r\n synced: boolean;\r\n bootstrapped: boolean;\r\n ATT: number;\r\n RATT: number;\r\n CTT: number;\r\n RCTT: number;\r\n acceptedBlockID: string;\r\n confirmedBlockID: string;\r\n confirmedSlot: number;\r\n committedSlot: number;\r\n}\r\n\r\nclass MemoryMetrics {\r\n heap_sys: number;\r\n heap_alloc: number;\r\n heap_idle: number;\r\n heap_released: number;\r\n heap_objects: number;\r\n last_pause_gc: number;\r\n num_gc: number;\r\n ts: string;\r\n}\r\n\r\nclass TipsMetric {\r\n totaltips: number;\r\n ts: string;\r\n}\r\n\r\nclass NetworkIO {\r\n tx: number;\r\n rx: number;\r\n ts: string;\r\n}\r\n\r\nclass RateSetterMetric {\r\n size: number;\r\n estimate: string;\r\n rate: number;\r\n ts: string;\r\n}\r\n\r\nclass SchedulerMetric {\r\n running: number;\r\n rate: string;\r\n maxBufferSize: number;\r\n currentBufferSize: number;\r\n deficit: number;\r\n ts: string;\r\n\r\n}\r\n\r\nclass NeighborMetrics {\r\n @observable collected: Array = [];\r\n @observable network_io: Array = [];\r\n\r\n addMetric(metric: NeighborMetric) {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.collected.push(metric);\r\n if (this.collected.length > maxMetricsDataPoints) {\r\n this.collected.shift();\r\n }\r\n let netIO = this.currentNetIO;\r\n if (netIO) {\r\n if (this.network_io.length > maxMetricsDataPoints) {\r\n this.network_io.shift();\r\n }\r\n this.network_io.push(netIO);\r\n }\r\n }\r\n\r\n get current() {\r\n return this.collected[this.collected.length - 1];\r\n }\r\n\r\n get secondLast() {\r\n let index = this.collected.length - 2;\r\n if (index < 0) {\r\n return\r\n }\r\n return this.collected[index];\r\n }\r\n\r\n get currentNetIO(): NetworkIO {\r\n if (this.current && this.secondLast) {\r\n return {\r\n tx: this.current.packets_written - this.secondLast.packets_written,\r\n rx: this.current.packets_read - this.secondLast.packets_read,\r\n ts: dateformat(new Date(), \"HH:MM:ss\"),\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n @computed\r\n get netIOSeries() {\r\n let tx = Object.assign({}, chartSeriesOpts,\r\n series(\"Tx\", 'rgba(53, 180, 219,1)', 'rgba(53, 180, 219,0.4)')\r\n );\r\n let rx = Object.assign({}, chartSeriesOpts,\r\n series(\"Rx\", 'rgba(235, 134, 52)', 'rgba(235, 134, 52,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.network_io.length; i++) {\r\n let metric: NetworkIO = this.network_io[i];\r\n labels.push(metric.ts);\r\n tx.data.push(metric.tx);\r\n rx.data.push(-metric.rx);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [tx, rx],\r\n };\r\n }\r\n}\r\n\r\nclass NeighborMetric {\r\n id: string;\r\n address: string;\r\n connection_origin: number;\r\n packets_read: number;\r\n packets_written: number;\r\n ts: number;\r\n}\r\n\r\nclass ComponentCounterMetric {\r\n store: number;\r\n solidifier: number;\r\n scheduler: number;\r\n booker: number;\r\n ts: number;\r\n}\r\n\r\nconst chartSeriesOpts = {\r\n label: \"Incoming\", data: [],\r\n fill: true,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(58, 60, 171,0.4)',\r\n borderWidth: 1,\r\n borderColor: 'rgba(58, 60, 171,1)',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBorderColor: 'rgba(58, 60, 171,1)',\r\n pointBackgroundColor: '#fff',\r\n pointBorderWidth: 1,\r\n pointHoverBackgroundColor: 'rgba(58, 60, 171,1)',\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 0,\r\n pointHitRadius: 20,\r\n pointHoverRadius: 5,\r\n};\r\n\r\nfunction series(name: string, color: string, bgColor: string) {\r\n return {\r\n label: name, data: [],\r\n backgroundColor: bgColor,\r\n borderColor: color,\r\n pointBorderColor: color,\r\n pointHoverBackgroundColor: color,\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n }\r\n}\r\n\r\nconst statusWebSocketPath = \"/ws\";\r\n\r\nconst maxMetricsDataPoints = 900;\r\n\r\nexport class NodeStore {\r\n @observable status: Status = new Status();\r\n @observable websocketConnected: boolean = false;\r\n @observable last_mps_metric: BPSMetric = new BPSMetric();\r\n @observable collected_mps_metrics: Array = [];\r\n @observable collected_rate_setter_metrics: Array = [];\r\n @observable last_rate_setter_metric: RateSetterMetric = new RateSetterMetric();\r\n @observable collected_scheduler_metrics: Array = [];\r\n @observable collected_mem_metrics: Array = [];\r\n @observable neighbor_metrics = new ObservableMap();\r\n @observable last_tips_metric: TipsMetric = new TipsMetric();\r\n @observable collected_tips_metrics: Array = [];\r\n @observable last_component_counter_metric: ComponentCounterMetric = new ComponentCounterMetric();\r\n @observable collected_component_counter_metrics: Array = [];\r\n @observable collecting: boolean = true;\r\n\r\n constructor() {\r\n this.status.tangleTime = new TangleTime;\r\n this.status.tangleTime.ATT = 0;\r\n this.status.tangleTime.RATT = 0;\r\n this.status.tangleTime.CTT = 0;\r\n this.status.tangleTime.RCTT = 0;\r\n this.registerHandlers();\r\n }\r\n\r\n registerHandlers = () => {\r\n registerHandler(WSMsgType.Status, this.updateStatus);\r\n registerHandler(WSMsgType.BPSMetrics, (mps: number) => {\r\n this.addBPSMetric(this.updateLastBPSMetric(mps));\r\n });\r\n registerHandler(WSMsgType.NeighborStats, this.updateNeighborMetrics);\r\n registerHandler(WSMsgType.TipsMetrics, this.updateLastTipsMetric);\r\n registerHandler(WSMsgType.ComponentCounterMetrics, this.updateLastComponentMetric);\r\n registerHandler(WSMsgType.RateSetter, this.updateLastRateSetterMetric)\r\n\r\n this.updateCollecting(true);\r\n }\r\n\r\n unregisterHandlers = () => {\r\n unregisterHandler(WSMsgType.Status);\r\n unregisterHandler(WSMsgType.BPSMetrics);\r\n unregisterHandler(WSMsgType.NeighborStats);\r\n unregisterHandler(WSMsgType.TipsMetrics);\r\n unregisterHandler(WSMsgType.ComponentCounterMetrics);\r\n unregisterHandler(WSMsgType.RateSetter);\r\n this.updateCollecting(false);\r\n }\r\n\r\n @action\r\n updateCollecting = (collecting: boolean) => {\r\n this.collecting = collecting;\r\n }\r\n\r\n @action\r\n reset() {\r\n this.collected_mps_metrics = [];\r\n this.collected_mem_metrics = [];\r\n this.collected_scheduler_metrics = [];\r\n this.neighbor_metrics = new ObservableMap();\r\n this.collected_tips_metrics = [];\r\n this.collected_component_counter_metrics = [];\r\n }\r\n\r\n reconnect() {\r\n this.updateWebSocketConnected(false);\r\n setTimeout(() => {\r\n this.connect();\r\n }, 5000);\r\n }\r\n\r\n connect() {\r\n connectWebSocket(statusWebSocketPath,\r\n () => this.updateWebSocketConnected(true),\r\n () => this.reconnect(),\r\n () => this.updateWebSocketConnected(false))\r\n }\r\n\r\n @action\r\n updateWebSocketConnected = (connected: boolean) => this.websocketConnected = connected;\r\n\r\n @action\r\n updateStatus = (status: Status) => {\r\n status.mem.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_mem_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mem_metrics.shift();\r\n }\r\n this.collected_mem_metrics.push(status.mem);\r\n this.status = status;\r\n\r\n status.scheduler.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_scheduler_metrics.length > maxMetricsDataPoints) {\r\n this.collected_scheduler_metrics.shift();\r\n }\r\n this.collected_scheduler_metrics.push(status.scheduler);\r\n };\r\n\r\n\r\n @action\r\n updateNeighborMetrics = (neighborMetrics: Array) => {\r\n if (!neighborMetrics) {\r\n return;\r\n }\r\n let updated = [];\r\n for (let i = 0; i < neighborMetrics.length; i++) {\r\n let metric = neighborMetrics[i];\r\n let neighbMetrics: NeighborMetrics = this.neighbor_metrics.get(metric.id);\r\n if (!neighbMetrics) {\r\n neighbMetrics = new NeighborMetrics();\r\n }\r\n neighbMetrics.addMetric(metric);\r\n this.neighbor_metrics.set(metric.id, neighbMetrics);\r\n updated.push(metric.id);\r\n }\r\n // remove duplicates\r\n for (const k of this.neighbor_metrics.keys()) {\r\n if (!updated.includes(k)) {\r\n this.neighbor_metrics.delete(k);\r\n }\r\n }\r\n };\r\n\r\n @action\r\n updateLastRateSetterMetric = (metric: RateSetterMetric) => {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_rate_setter_metric = metric;\r\n if (this.collected_rate_setter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_rate_setter_metrics.shift();\r\n }\r\n this.collected_rate_setter_metrics.push(metric);\r\n };\r\n\r\n @action\r\n updateLastBPSMetric = (mps: number) => {\r\n let mpsMetric = new BPSMetric();\r\n mpsMetric.mps = mps;\r\n mpsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_mps_metric = mpsMetric;\r\n return mpsMetric;\r\n };\r\n\r\n @action\r\n addBPSMetric = (metric: BPSMetric) => {\r\n if (this.collected_mps_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mps_metrics.shift();\r\n }\r\n this.collected_mps_metrics.push(metric);\r\n }\r\n\r\n @action\r\n updateLastTipsMetric = (tipsMetric: TipsMetric) => {\r\n tipsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_tips_metric = tipsMetric;\r\n if (this.collected_tips_metrics.length > maxMetricsDataPoints) {\r\n this.collected_tips_metrics.shift();\r\n }\r\n this.collected_tips_metrics.push(tipsMetric);\r\n };\r\n\r\n @action\r\n updateLastComponentMetric = (componentCounterMetric: ComponentCounterMetric) => {\r\n componentCounterMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_component_counter_metric = componentCounterMetric;\r\n if (this.collected_component_counter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_component_counter_metrics.shift()\r\n }\r\n this.collected_component_counter_metrics.push(componentCounterMetric);\r\n };\r\n\r\n @computed\r\n get mpsSeries() {\r\n let mps = Object.assign({}, chartSeriesOpts,\r\n series(\"BPS\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mps_metrics.length; i++) {\r\n let metric: BPSMetric = this.collected_mps_metrics[i];\r\n labels.push(metric.ts);\r\n mps.data.push(metric.mps);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [mps],\r\n };\r\n }\r\n\r\n @computed\r\n get tipsSeries() {\r\n let totaltips = Object.assign({}, chartSeriesOpts,\r\n series(\"All tips\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_tips_metrics.length; i++) {\r\n let metric: TipsMetric = this.collected_tips_metrics[i];\r\n labels.push(metric.ts);\r\n totaltips.data.push(metric.totaltips);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [totaltips],\r\n };\r\n }\r\n\r\n @computed\r\n get componentSeries() {\r\n let stored = Object.assign({}, chartSeriesOpts,\r\n series(\"stored\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n let solidified = Object.assign({}, chartSeriesOpts,\r\n series(\"solidified\", 'rgba(165,209,253,1)', 'rgba(165,209,253,0.4)')\r\n );\r\n let scheduled = Object.assign({}, chartSeriesOpts,\r\n series(\"scheduled\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n let booked = Object.assign({}, chartSeriesOpts,\r\n series(\"booked\", 'rgba(5, 68, 94,1)', 'rgba(5, 68, 94,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_component_counter_metrics.length; i++) {\r\n let metric: ComponentCounterMetric = this.collected_component_counter_metrics[i];\r\n labels.push(metric.ts);\r\n stored.data.push(metric.store);\r\n solidified.data.push(metric.solidifier);\r\n scheduled.data.push(metric.scheduler);\r\n booked.data.push(metric.booker);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [stored, solidified, scheduled, booked],\r\n };\r\n }\r\n\r\n @computed\r\n get bufferSizeSeries() {\r\n let bufferSize = Object.assign({}, chartSeriesOpts,\r\n series(\"buffer size\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n bufferSize.data.push(metric.currentBufferSize);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [bufferSize],\r\n };\r\n }\r\n\r\n @computed\r\n get deficitSeries() {\r\n let deficit = Object.assign({}, chartSeriesOpts,\r\n series(\"deficit\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n deficit.data.push(metric.deficit);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [deficit],\r\n };\r\n }\r\n\r\n @computed\r\n get neighborsSeries() {\r\n return {};\r\n }\r\n\r\n @computed\r\n get uptime() {\r\n let day, hour, minute, seconds;\r\n seconds = Math.floor(this.status.uptime / 1000);\r\n minute = Math.floor(seconds / 60);\r\n seconds = seconds % 60;\r\n hour = Math.floor(minute / 60);\r\n minute = minute % 60;\r\n day = Math.floor(hour / 24);\r\n hour = hour % 24;\r\n let str = \"\";\r\n if (day == 1) {\r\n str += day + \" Day, \";\r\n }\r\n if (day > 1) {\r\n str += day + \" Days, \";\r\n }\r\n if (hour >= 0) {\r\n if (hour < 10) {\r\n str += \"0\" + hour + \":\";\r\n } else {\r\n str += hour + \":\";\r\n }\r\n }\r\n if (minute >= 0) {\r\n if (minute < 10) {\r\n str += \"0\" + minute + \":\";\r\n } else {\r\n str += minute + \":\";\r\n }\r\n }\r\n if (seconds >= 0) {\r\n if (seconds < 10) {\r\n str += \"0\" + seconds;\r\n } else {\r\n str += seconds;\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n @computed\r\n get memSeries() {\r\n let heapSys = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Sys\", 'rgba(168, 50, 76,1)', 'rgba(168, 50, 76,0.4)')\r\n );\r\n let heapAlloc = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Alloc\", 'rgba(222, 49, 87,1)', 'rgba(222, 49, 87,0.4)')\r\n );\r\n let heapIdle = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Idle\", 'rgba(222, 49, 182,1)', 'rgba(222, 49, 182,0.4)')\r\n );\r\n let heapReleased = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Released\", 'rgba(250, 76, 252,1)', 'rgba(250, 76, 252,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mem_metrics.length; i++) {\r\n let metric = this.collected_mem_metrics[i];\r\n labels.push(metric.ts);\r\n heapSys.data.push(metric.heap_sys);\r\n heapAlloc.data.push(metric.heap_alloc);\r\n heapIdle.data.push(metric.heap_idle);\r\n heapReleased.data.push(metric.heap_released);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [heapSys, heapAlloc, heapIdle, heapReleased],\r\n };\r\n }\r\n}\r\n\r\nexport default NodeStore;\r\n","import {action, observable} from 'mobx';\r\nimport {RouterStore} from \"mobx-react-router\";\r\n\r\nclass SendResult {\r\n BlkId: string;\r\n}\r\n\r\nenum QueryError {\r\n NotFound\r\n}\r\n\r\nexport class FaucetStore {\r\n // send request to faucet\r\n @observable send_addr: string = \"\";\r\n @observable send_access_mana_node_id: string = \"\";\r\n @observable send_consensus_mana_node_id: string = \"\";\r\n @observable sending: boolean = false;\r\n @observable sendResult: SendResult = null;\r\n @observable query_error: string = \"\";\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n }\r\n\r\n sendReq = async () => {\r\n this.updateSending(true);\r\n try {\r\n // send request\r\n let res = await fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);\r\n if (res.status !== 200) {\r\n this.updateQueryError(QueryError.NotFound);\r\n return;\r\n }\r\n let result: SendResult = await res.json();\r\n setTimeout(() => {\r\n this.updateSendResult(result);\r\n }, 2000);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n updateSendResult = (result: SendResult) => {\r\n this.sending = false;\r\n this.sendResult = result;\r\n this.routerStore.history.push(`/explorer/address/${this.send_addr}`);\r\n };\r\n\r\n @action\r\n updateSend = (send_addr: string) => {\r\n this.send_addr = send_addr;\r\n };\r\n\r\n @action\r\n updateSendAccessManaNodeID = (access_mana: string) => {\r\n this.send_access_mana_node_id = access_mana;\r\n }\r\n\r\n @action\r\n updateSendConsensusManaNodeID = (consensus_mana: string) => {\r\n this.send_consensus_mana_node_id = consensus_mana;\r\n }\r\n\r\n @action\r\n updateSending = (sending: boolean) => {\r\n this.sending = sending;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n reset = () => {\r\n this.send_addr = null;\r\n this.send_access_mana_node_id = \"\";\r\n this.send_consensus_mana_node_id = \"\";\r\n this.sending = false;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.sending = false;\r\n this.query_error = err;\r\n };\r\n}\r\n\r\nexport default FaucetStore;\r\n","import { action, observable, ObservableMap } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { default as Viva } from 'vivagraphjs';\r\nimport { Block } from './ExplorerStore';\r\n\r\nexport class Vertex {\r\n id: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n is_tip: boolean;\r\n is_blk_confirmed: boolean;\r\n is_tx_accepted: boolean;\r\n is_tx: boolean;\r\n}\r\n\r\nexport class TipInfo {\r\n id: string;\r\n is_tip: boolean;\r\n}\r\n\r\nclass history {\r\n vertices: Array;\r\n}\r\n\r\nconst COLOR = {\r\n BlockPending: \"#b9b7bd\",\r\n BlockConfirmed: \"#6c71c4\",\r\n TransactionPending: \"#393e46\",\r\n TransactionConfirmed: \"#fad02c\",\r\n Tip: \"#cb4b16\",\r\n Unknown: \"#b58900\",\r\n Line: \"#586e75\",\r\n SelectedPastConeLine: \"#e105f5\",\r\n SelectedFutureConeLine: \"#51e05d\",\r\n Selected: \"#859900\"\r\n}\r\n\r\nconst vertexSize = 20;\r\n\r\nexport class VisualizerStore {\r\n @observable vertices = new ObservableMap();\r\n @observable verticesLimit = 1500;\r\n @observable finalized_count = 0;\r\n @observable tips_count = 0;\r\n verticesIncomingOrder = [];\r\n draw: boolean = false;\r\n routerStore: RouterStore;\r\n\r\n // the currently selected vertex via hover\r\n @observable selected: Vertex;\r\n selected_via_click: boolean = false;\r\n selected_origin_color: number = 0;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n\r\n // viva graph objs\r\n graph;\r\n graphics;\r\n renderer;\r\n @observable paused: boolean = false;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Vertex, this.addVertex);\r\n registerHandler(WSMsgType.TipInfo, this.addTipInfo);\r\n registerHandler(WSMsgType.TXAccepted, this.updateTxStatus);\r\n // this.fetchHistory();\r\n }\r\n\r\n fetchHistory = async () => {\r\n try {\r\n let res = await fetch(`/api/visualizer/history`);\r\n let history: history = await res.json();\r\n history.vertices.forEach(v => {\r\n this.addVertex(v);\r\n });\r\n } catch (err) {\r\n console.log(\"Fail to fetch history in visualizer\", err);\r\n }\r\n return\r\n }\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search.trim();\r\n }\r\n\r\n @action\r\n searchAndHighlight = () => {\r\n this.clearSelected();\r\n if (!this.search) return;\r\n let iter: IterableIterator = this.vertices.keys();\r\n let found = null;\r\n for (const key of iter) {\r\n if (key.indexOf(this.search) >= 0) {\r\n found = key;\r\n break;\r\n }\r\n }\r\n if (!found) return;\r\n this.updateSelected(this.vertices.get(found), false);\r\n }\r\n\r\n @action\r\n pauseResume = () => {\r\n if (this.paused) {\r\n this.renderer.resume();\r\n this.paused = false;\r\n return;\r\n }\r\n this.renderer.pause();\r\n this.paused = true;\r\n }\r\n\r\n @action\r\n updateVerticesLimit = (num: number) => {\r\n this.verticesLimit = num;\r\n }\r\n\r\n @action\r\n updateTxStatus = (vert: Vertex) => { \r\n let existing = this.vertices.get(vert.id);\r\n if (!existing) {\r\n return\r\n }\r\n\r\n existing.is_tx_accepted = vert.is_tx_accepted;\r\n this.vertices.set(vert.id, existing);\r\n\r\n if (this.draw) {\r\n this.drawVertex(existing);\r\n }\r\n }\r\n\r\n @action\r\n addVertex = (vert: Vertex) => {\r\n let existing = this.vertices.get(vert.id);\r\n if (existing) {\r\n if (!existing.is_blk_confirmed && vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n } else {\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n this.verticesIncomingOrder.push(vert.id);\r\n this.checkLimit();\r\n }\r\n\r\n this.vertices.set(vert.id, vert);\r\n\r\n if (this.draw) {\r\n this.drawVertex(vert);\r\n }\r\n };\r\n\r\n @action\r\n addTipInfo = async (tipInfo: TipInfo) => {\r\n let v = this.vertices.get(tipInfo.id);\r\n if (!v) {\r\n v = new Vertex();\r\n v.id = tipInfo.id;\r\n\r\n // first seen as tip, get parents info\r\n let res = await fetch(`/api/block/${tipInfo.id}`);\r\n if (res.status === 200) {\r\n let blk: Block = await res.json();\r\n v.strongParents = blk.strongParents;\r\n v.weakParents = blk.weakParents;\r\n v.shallowLikedParents = blk.shallowLikedParents;\r\n v.is_blk_confirmed = blk.acceptance;\r\n }\r\n this.verticesIncomingOrder.push(v.id);\r\n }\r\n\r\n this.tips_count += tipInfo.is_tip ? 1 : v.is_tip ? -1 : 0;\r\n v.is_tip = tipInfo.is_tip;\r\n this.vertices.set(tipInfo.id, v);\r\n\r\n if (this.draw) {\r\n this.drawVertex(v);\r\n }\r\n };\r\n\r\n @action\r\n checkLimit = () => {\r\n while (this.verticesIncomingOrder.length > this.verticesLimit) {\r\n let deleteId = this.verticesIncomingOrder.shift();\r\n let vert = this.vertices.get(deleteId);\r\n // make sure we remove any markings if the vertex gets deleted\r\n if (this.selected && deleteId === this.selected.id) {\r\n this.clearSelected();\r\n }\r\n if (this.draw) {\r\n this.graph.removeNode(deleteId);\r\n }\r\n if (!vert) {\r\n continue;\r\n }\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count--;\r\n }\r\n if (vert.is_tip) {\r\n this.tips_count--;\r\n }\r\n this.vertices.delete(deleteId);\r\n }\r\n }\r\n\r\n drawVertex = (vert: Vertex) => {\r\n let node = this.graph.getNode(vert.id);\r\n if (node) {\r\n // update coloring\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n nodeUI.color = parseColor(this.colorForVertexState(vert));\r\n } else {\r\n node = this.graph.addNode(vert.id, vert);\r\n }\r\n\r\n if (vert.strongParents) {\r\n this.linkParents(vert, node, vert.strongParents)\r\n }\r\n\r\n if (vert.weakParents) {\r\n this.linkParents(vert, node, vert.weakParents)\r\n }\r\n\r\n if (vert.shallowLikedParents) {\r\n this.linkParents(vert, node, vert.shallowLikedParents)\r\n }\r\n }\r\n\r\n linkParents = (vert: Vertex, node: any, parents: Array) => {\r\n parents.forEach((value) => {\r\n // if value is valid AND (links is empty OR there is no between parent and children)\r\n if (value && ((!node.links || !node.links.some(link => link.fromId === value)))) {\r\n // draw the link only when the parent exists\r\n let parent = this.graph.getNode(value);\r\n if (parent) {\r\n this.graph.addLink(value, vert.id);\r\n } else {\r\n console.log(\"link not added, parent doesn't exist\", value);\r\n }\r\n }\r\n })\r\n }\r\n\r\n colorForVertexState = (vert: Vertex) => {\r\n if (!vert) {\r\n return COLOR.Unknown;\r\n }\r\n\r\n // finalized\r\n if (vert.is_blk_confirmed) {\r\n if (vert.is_tx) {\r\n if (vert.is_tx_accepted) {\r\n return COLOR.TransactionConfirmed;\r\n } else {\r\n return COLOR.TransactionPending;\r\n } \r\n }\r\n return COLOR.BlockConfirmed;\r\n }\r\n\r\n if (vert.is_tip) {\r\n return COLOR.Tip;\r\n }\r\n\r\n // pending\r\n if (vert.is_tx) {\r\n return COLOR.TransactionPending\r\n }\r\n return COLOR.BlockPending;\r\n }\r\n\r\n start = () => {\r\n this.draw = true;\r\n this.graph = Viva.Graph.graph();\r\n\r\n let graphics: any = Viva.Graph.View.webglGraphics();\r\n\r\n const layout = Viva.Graph.Layout.forceDirected(this.graph, {\r\n springLength: 10,\r\n springCoeff: 0.0001,\r\n stableThreshold: 0.15,\r\n gravity: -2,\r\n dragCoeff: 0.02,\r\n timeStep: 20,\r\n theta: 0.8,\r\n });\r\n\r\n graphics.node((node) => {\r\n if (!node.data) {\r\n return Viva.Graph.View.webglSquare(10, this.colorForVertexState(node.data));\r\n }\r\n return Viva.Graph.View.webglSquare(vertexSize, this.colorForVertexState(node.data));\r\n })\r\n graphics.link(() => Viva.Graph.View.webglLine(COLOR.Line));\r\n let ele = document.getElementById('visualizer');\r\n this.renderer = Viva.Graph.View.renderer(this.graph, {\r\n container: ele, graphics, layout,\r\n });\r\n\r\n let events = Viva.Graph.webglInputEvents(graphics, this.graph);\r\n\r\n events.mouseEnter((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data);\r\n }).mouseLeave((node) => {\r\n this.clearSelected(false);\r\n });\r\n\r\n events.click((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data, true);\r\n });\r\n\r\n this.graphics = graphics;\r\n this.renderer.run();\r\n\r\n // draw vertices by order\r\n this.verticesIncomingOrder.forEach((id) => {\r\n let v = this.vertices.get(id);\r\n if (v) {\r\n this.drawVertex(v);\r\n }\r\n })\r\n }\r\n\r\n stop = () => {\r\n this.draw = false;\r\n this.renderer.dispose();\r\n this.graph = null;\r\n this.paused = false;\r\n this.selected = null;\r\n }\r\n\r\n @action\r\n updateSelected = (vert: Vertex, viaClick?: boolean) => {\r\n if (!vert) return;\r\n\r\n this.selected = vert;\r\n this.selected_via_click = !!viaClick;\r\n\r\n // mutate links\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n this.selected_origin_color = nodeUI.color\r\n nodeUI.color = parseColor(COLOR.Selected);\r\n nodeUI.size = vertexSize * 1.5;\r\n\r\n let node = this.graph.getNode(vert.id);\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedFutureConeLine);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedPastConeLine);\r\n },\r\n seenForward\r\n );\r\n }\r\n\r\n resetLinks = () => {\r\n this.graph.forEachLink(function (link) {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n });\r\n }\r\n\r\n @action\r\n clearSelected = (force_clear?: boolean) => {\r\n if (!this.selected || (this.selected_via_click && !force_clear)) {\r\n return;\r\n }\r\n\r\n // clear link highlight\r\n let node = this.graph.getNode(this.selected.id);\r\n if (!node) {\r\n // clear links\r\n this.resetLinks();\r\n return;\r\n }\r\n\r\n let nodeUI = this.graphics.getNodeUI(this.selected.id);\r\n nodeUI.color = this.selected_origin_color;\r\n nodeUI.size = vertexSize;\r\n\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenForward\r\n );\r\n\r\n this.selected = null;\r\n this.selected_via_click = false;\r\n }\r\n\r\n}\r\n\r\nexport default VisualizerStore;\r\n\r\n// copied over and refactored from https://github.com/glumb/IOTAtangle\r\nfunction dfsIterator(graph, node, cb, up, cbLinks: any = false, seenNodes = []) {\r\n seenNodes.push(node);\r\n let pointer = 0;\r\n\r\n while (seenNodes.length > pointer) {\r\n const node = seenNodes[pointer++];\r\n\r\n if (cb(node)) return true;\r\n\r\n if (!node.links) {\r\n return\r\n }\r\n\r\n for (const link of node.links) {\r\n // parents\r\n if (!up && link.toId === node.id && !seenNodes.includes(graph.getNode(link.fromId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.fromId));\r\n continue;\r\n }\r\n\r\n // children\r\n if (up && link.fromId === node.id && !seenNodes.includes(graph.getNode(link.toId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.toId));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction parseColor(color): any {\r\n let parsedColor = 0x009ee8ff;\r\n\r\n if (typeof color === 'number') {\r\n return color;\r\n }\r\n\r\n if (typeof color === 'string' && color) {\r\n if (color.length === 4) {\r\n // #rgb, duplicate each letter except first #.\r\n color = color.replace(/([^#])/g, '$1$1');\r\n }\r\n if (color.length === 9) {\r\n // #rrggbbaa\r\n parsedColor = parseInt(color.substr(1), 16);\r\n } else if (color.length === 7) {\r\n // or #rrggbb.\r\n parsedColor = (parseInt(color.substr(1), 16) << 8) | 0xff;\r\n } else {\r\n throw 'Color expected in hex format with preceding \"#\". E.g. #00ff00. Got value: ' + color;\r\n }\r\n }\r\n\r\n return parsedColor;\r\n}\r\n","import {action, computed, observable} from 'mobx';\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Col, ListGroupItem, OverlayTrigger, Popover, Row} from \"react-bootstrap\";\nimport Plus from \"../../assets/plus.svg\";\nimport Minus from \"../../assets/minus.svg\";\nimport {displayManaUnit} from \"../utils\";\n\nclass ManaBlk {\n nodeID: string;\n access: number;\n consensus: number;\n // in s?\n time: number;\n}\n\nexport class Node {\n shortNodeID: string;\n nodeID: string;\n mana: number;\n}\n\nclass NetworkManaBlk {\n manaType: string;\n totalMana: number;\n nodes: Array;\n}\n\nexport class AllowedPledgeIDsBlk {\n accessFilter: PledgeIDFilter;\n consensusFilter: PledgeIDFilter;\n}\n\nexport class PledgeIDFilter {\n enabled: boolean;\n allowedNodeIDs: Array;\n}\n\nexport class AllowedNodeStr {\n shortID: string;\n fullID: string;\n}\n\nclass PledgeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass RevokeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass ManaEvent {\n nodeID: string;\n time: Date;\n txID: string;\n\n constructor(nodeID: string, time: Date, txID: string) {\n this.nodeID = nodeID;\n this.time = time;\n this.txID = txID;\n }\n}\n\nclass PledgeEvent extends ManaEvent{\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nclass RevokeEvent extends ManaEvent {\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nconst emptyRow = (\n There are no nodes to view with the current search parameters.\n)\nconst emptyListItem = (\n There are no events to view with the current search parameters.)\n\n// every 10 seconds, a new value arrives, so this is roughly 17 mins\nconst maxStoredManaValues = 100;\n// number of previous pledge/revoke events we keep track of. (/2 of plugins/dashboard/maxManaEventsBufferSize)\nconst maxEventsStored = 100;\n\nexport class ManaStore {\n // mana values\n @observable manaValues: Array = [];\n // first is accessm second consensus\n @observable prevManaValues: Array = [0,0];\n // list of richest access mana nodes in network, sorted in descending order\n @observable accessNetworkRichest: Array = [];\n @observable totalAccessNetwork: number = 0.0;\n // list of richest active access mana nodes in the network, sorted in descending order\n @observable accessActiveRichest: Array = [];\n @observable totalAccessActive: number = 0.0;\n // list of richest consensus mana nodes in their network, sorted in descending order\n @observable consensusNetworkRichest: Array = [];\n @observable totalConsensusNetwork: number = 0.0;\n // list of richest active consensus mana nodes in their network, sorted in descending order\n @observable consensusActiveRichest: Array = [];\n @observable totalConsensusActive: number = 0.0;\n\n @observable public searchNode = \"\";\n @observable public searchTxID = \"\";\n\n @observable public allowedPledgeIDs: AllowedPledgeIDsBlk;\n\n // internal arrays to store mana events\n accessEvents: Array = [];\n consensusEvents: Array = [];\n\n // internal arrays to store initial mana events\n initAccessEvents: Array = [];\n initConsensusEvents: Array = [];\n\n // info on latest removed events\n @observable lastRemovedAccessEventTime: Date = null;\n @observable lastRemovedConsensusEventTime: Date = null;\n\n lastInitRemovedAccessEventTime: Date = null;\n lastInitRemovedConsensusEventTime: Date = null;\n\n // only update displayed events when initial arrays were modified\n eventsUpdated: boolean = false;\n\n // mana events displayed in frontend\n @observable displayedAccessEvents: Array = [];\n @observable displayedConsensusEvents: Array = [];\n\n ownID: string;\n\n nodeNotSyncedListItem = (Wait for node to be synced to display mana events.);\n\n constructor() {\n this.manaValues = [];\n\n registerHandler(WSMsgType.Mana, this.addNewManaValue);\n registerHandler(WSMsgType.ManaMapOverall, this.updateNetworkRichest);\n registerHandler(WSMsgType.ManaMapOnline, this.updateActiveRichest);\n // registerHandler(WSMsgType.ManaAllowedPledge, this.updateAllowedPledgeIDs);\n // registerHandler(WSMsgType.ManaInitPledge, this.addNewInitPledge);\n // registerHandler(WSMsgType.ManaInitRevoke, this.addNewInitRevoke);\n // registerHandler(WSMsgType.ManaInitDone, this.initDone);\n // registerHandler(WSMsgType.ManaPledge, this.addNewPledge);\n // registerHandler(WSMsgType.ManaRevoke, this.addNewRevoke);\n };\n\n @action\n updateNodeSearch(searchNode: string): void {\n this.searchNode = searchNode.trim();\n }\n\n @action\n updateTxSearch(searchTxID: string): void {\n this.searchTxID = searchTxID.trim();\n }\n\n @action\n addNewManaValue = (manaBlk: ManaBlk) => {\n this.ownID = this.ownID? this.ownID : manaBlk.nodeID;\n if (this.manaValues.length === maxStoredManaValues) {\n // shift if we already have enough values\n this.manaValues.shift();\n }\n let newManaData = [new Date(manaBlk.time*1000), manaBlk.access, manaBlk.consensus];\n if (this.manaValues.length > 0){\n this.prevManaValues = [this.manaValues[this.manaValues.length -1][1] , this.manaValues[this.manaValues.length -1][2]]\n }\n this.manaValues.push(newManaData);\n }\n\n @action\n updateNetworkRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessNetwork = blk.totalMana;\n this.accessNetworkRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusNetwork = blk.totalMana;\n this.consensusNetworkRichest = blk.nodes;\n break;\n }\n }\n\n @action\n updateActiveRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessActive = blk.totalMana;\n this.accessActiveRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusActive = blk.totalMana;\n this.consensusActiveRichest = blk.nodes;\n break;\n }\n };\n\n @action\n updateAllowedPledgeIDs = (blk: AllowedPledgeIDsBlk) => {\n this.allowedPledgeIDs = blk;\n }\n\n @action\n addNewInitPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.initAccessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n }\n\n @action\n addNewPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.accessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n addNewInitRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n }\n\n @action\n addNewRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n initDone = () => {\n this.accessEvents = this.initAccessEvents;\n this.lastRemovedAccessEventTime = this.lastInitRemovedAccessEventTime;\n this.consensusEvents= this.initConsensusEvents;\n this.lastRemovedConsensusEventTime = this.lastInitRemovedConsensusEventTime;\n\n this.displayedAccessEvents = [...this.accessEvents]\n this.displayedConsensusEvents = [...this.consensusEvents]\n\n setInterval(() => {\n if (this.eventsUpdated) {\n this.displayedAccessEvents = [...this.accessEvents];\n this.displayedConsensusEvents = [...this.consensusEvents];\n this.eventsUpdated = false;\n }\n }, 500)\n }\n\n nodeList = (leaderBoard: Array, manaSum: number) => {\n if (leaderBoard === null || leaderBoard == undefined) {\n return []\n }\n let feed = [];\n let pushToFeed = (node: Node, i: number) => {\n feed.push(\n \n {i + 1} \n {node.shortNodeID}\n {displayManaUnit(node.mana)}\n {((node.mana / manaSum)*100.0).toFixed(2)}%\n \n );\n };\n let callback = (node: Node, i: number) => {\n if (this.passesNodeFilter(node.shortNodeID)){\n pushToFeed(node, i);\n }\n };\n leaderBoard.forEach(callback);\n return feed\n }\n\n @computed\n get networkRichestFeedAccess() {\n let result = this.nodeList(this.accessNetworkRichest, this.totalAccessNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get networkRichestFeedConsensus() {\n let result = this.nodeList(this.consensusNetworkRichest, this.totalConsensusNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedAccess() {\n let result = this.nodeList(this.accessActiveRichest, this.totalAccessActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedConsensus() {\n let result = this.nodeList(this.consensusActiveRichest, this.totalConsensusActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get accessHistogramInput() {\n if (this.accessNetworkRichest === undefined || this.accessNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.accessNetworkRichest.length; i++) {\n histInput.push(\n [this.accessNetworkRichest[i].shortNodeID, Math.log10(this.accessNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get consensusHistogramInput() {\n if (this.consensusNetworkRichest === undefined || this.consensusNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.consensusNetworkRichest.length; i++) {\n histInput.push(\n [this.consensusNetworkRichest[i].shortNodeID, Math.log10(this.consensusNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get accessPercentile() {\n let per = 0.0;\n // find id\n if (this.accessNetworkRichest !== undefined && this.accessNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.accessNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.accessNetworkRichest.length - (index + 1)) / this.accessNetworkRichest.length) * 100;\n break;\n }\n }\n return per\n }\n\n @computed\n get consensusPercentile() {\n let per = 0.0;\n // find id\n if ( this.consensusNetworkRichest !== undefined && this.consensusNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.consensusNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.consensusNetworkRichest.length - (index +1)) / this.consensusNetworkRichest.length) * 100;\n }\n }\n return per\n }\n\n computeEventList = (evArr: Array) => {\n let result = [];\n result.push(\n \n \n \n \n \n NodeID\n \n \n Tx ID\n \n \n Time\n \n \n \n )\n if (evArr === undefined || evArr === null) {\n return result\n }\n let pushToEventFeed = (element: ManaEvent, index) => {\n if (element instanceof PledgeEvent) {\n let popover = (ev: PledgeEvent) => {\n return (\n \n Mana Pledged\n \n
Base Mana: +{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
To NodeID: {ev.nodeID}
\n
Time of Pledge: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Plus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n } else if (element instanceof RevokeEvent){\n let popover = (ev: RevokeEvent) => {\n return (\n \n Mana Revoked\n \n
Base Mana 1: -{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
From NodeID: {ev.nodeID}
\n
Time of Revoke: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n // it's a revoke event then\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Minus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n }\n };\n // && this.passesTimeFilter(event.time) {\n let callback = (event: ManaEvent, i: number) => {\n if (this.passesNodeFilter(event.nodeID) && this.passesTxFilter(event.txID)){\n pushToEventFeed(event, i);\n }\n };\n // reverse traverse bc oldest event is the first\n evArr.reverse().forEach(callback)\n return result;\n }\n\n @computed\n get accessEventList() {\n let result = this.computeEventList(this.displayedAccessEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n @computed\n get consensusEventList() {\n let result = this.computeEventList(this.displayedConsensusEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n passesNodeFilter = (nodeID: string) : boolean => {\n if (this.searchNode.trim().length === 0) {\n // node filter is disabled, anything passes the filter\n return true;\n } else if (nodeID.toLowerCase().includes(this.searchNode.toLowerCase())){\n // node filter is enabled, nodeID contains search term\n return true;\n }\n // filter enabled but nodeID doesn't pass\n return false;\n }\n\n passesTxFilter = (txID: string) : boolean => {\n if (this.searchTxID.trim().length === 0) {\n // txID filter is disabled, anything passes the filter\n return true;\n } else if (txID.toLowerCase().includes(this.searchTxID.toLowerCase())){\n // txID filter is enabled, txID contains search term\n return true;\n }\n // filter enabled but txID doesn't pass\n return false;\n }\n}\n\nexport default ManaStore;\n","import {computed, action, observable} from \"mobx\";\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Link} from 'react-router-dom';\n\nconst liveFeedSize = 100;\n\nexport class SlotInfo {\n index: number;\n id: string;\n}\n\nexport class SlotStore {\n @observable liveFeed: Array = [];\n\n constructor() {\n registerHandler(WSMsgType.SlotInfo, this.addLiveFeed);\n }\n\n @action addLiveFeed = async (info: SlotInfo) => {\n if (this.liveFeed.findIndex((t) => t.id == info.id) === -1) {\n if (this.liveFeed.length >= liveFeedSize) {\n this.liveFeed.shift();\n }\n this.liveFeed.push(info);\n }\n }\n\n @computed\n get slotLiveFeed() {\n let feed = [];\n for (let i = this.liveFeed.length - 1; i >= 0; i--) {\n let info = this.liveFeed[i];\n feed.push(\n \n \n {info.index}\n \n \n \n {info.id}\n \n \n \n );\n }\n return feed;\n }\n}","import {action, computed, observable} from 'mobx';\r\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\r\nimport * as React from \"react\";\r\nimport {RouterStore,} from \"mobx-react-router\";\r\nimport {Link} from \"react-router-dom\";\r\nimport NodeStore from './NodeStore';\r\nimport {Table} from \"react-bootstrap\";\r\nimport {ConfirmationState, resolveConfirmationState} from \"../utils/confirmation_state\";\r\n\r\nexport class ConflictSet {\r\n conflictSetID: string;\r\n arrivalTime: number;\r\n resolved: boolean;\r\n timeToResolve: number;\r\n shown: boolean;\r\n}\r\n\r\nexport class Conflict {\r\n conflictID: string;\r\n conflictSetIDs: Array;\r\n confirmationState: number;\r\n issuingTime: number;\r\n issuerNodeID: string;\r\n}\r\n\r\n// const liveFeedSize = 10;\r\n\r\nexport class ConflictsStore {\r\n // live feed\r\n @observable conflictSets: Map;\r\n @observable conflicts: Map;\r\n \r\n routerStore: RouterStore;\r\n nodeStore: NodeStore;\r\n\r\n constructor(routerStore: RouterStore, nodeStore: NodeStore) {\r\n this.routerStore = routerStore;\r\n this.nodeStore = nodeStore;\r\n this.conflictSets = new Map;\r\n this.conflicts = new Map;\r\n registerHandler(WSMsgType.ConflictSet, this.updateConflictSets);\r\n registerHandler(WSMsgType.Conflict, this.updateConflicts);\r\n }\r\n\r\n @action\r\n updateConflictSets = (blk: ConflictSet) => {\r\n this.conflictSets.set(blk.conflictSetID, blk);\r\n };\r\n\r\n @action\r\n updateConflicts = (blk: Conflict) => {\r\n this.conflicts.set(blk.conflictID, blk);\r\n };\r\n \r\n @computed\r\n get conflictsLiveFeed() {\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let conflictsArr = Array.from(this.conflictSets.values());\r\n conflictsArr.sort((x: ConflictSet, y: ConflictSet): number => {\r\n return y.arrivalTime - x.arrivalTime || x.conflictSetID.localeCompare(y.conflictSetID);\r\n }\r\n )\r\n\r\n let feed = [];\r\n for (let conflict of conflictsArr) {\r\n feed.push(\r\n conflict.shown = !conflict.shown} style={{cursor:\"pointer\"}}>\r\n \r\n \r\n {conflict.conflictSetID}\r\n \r\n \r\n \r\n {new Date(conflict.arrivalTime * 1000).toLocaleString()}\r\n \r\n \r\n {conflict.resolved ? 'Yes' : 'No'}\r\n \r\n \r\n {conflict.timeToResolve/1000000}\r\n \r\n \r\n );\r\n\r\n // only render and show branches if it has been clicked\r\n if (!conflict.shown) {\r\n continue\r\n }\r\n\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let branchesArr = Array.from(this.conflicts.values());\r\n branchesArr.sort((x: Conflict, y: Conflict): number => {\r\n return x.issuingTime - y.issuingTime || x.conflictID.localeCompare(y.conflictID)\r\n }\r\n )\r\n\r\n let branches = [];\r\n for (let branch of branchesArr) {\r\n for(let conflictID of branch.conflictSetIDs){\r\n if (conflictID === conflict.conflictSetID) {\r\n branches.push(\r\n ConfirmationState.Accepted ? \"table-success\" : \"\"}>\r\n \r\n \r\n {branch.conflictID}\r\n \r\n \r\n {resolveConfirmationState(branch.confirmationState)}\r\n {new Date(branch.issuingTime * 1000).toLocaleString()}\r\n {branch.issuerNodeID}\r\n \r\n );\r\n }\r\n }\r\n }\r\n feed.push(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {branches}\r\n \r\n
BranchIDConfirmationStateIssuingTimeIssuer NodeID
\r\n \r\n \r\n );\r\n }\r\n\r\n return feed;\r\n }\r\n\r\n}\r\n\r\nexport default ConflictsStore;\r\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {Provider} from 'mobx-react';\nimport {createBrowserHistory} from 'history';\nimport 'chartjs-plugin-streaming';\nimport {App} from './app/App';\nimport {RouterStore, syncHistoryWithStore} from 'mobx-react-router';\nimport {Router} from 'react-router-dom';\nimport NodeStore from \"./app/stores/NodeStore\";\nimport ExplorerStore from \"./app/stores/ExplorerStore\";\nimport FaucetStore from \"./app/stores/FaucetStore\";\nimport VisualizerStore from \"./app/stores/VisualizerStore\";\nimport ManaStore from \"./app/stores/ManaStore\";\nimport {SlotStore} from \"./app/stores/SlotStore\";\nimport ConflictsStore from \"./app/stores/ConflictsStore\";\n\n// prepare MobX stores\nconst routerStore = new RouterStore();\nconst nodeStore = new NodeStore();\nconst explorerStore = new ExplorerStore(routerStore);\nconst conflictsStore = new ConflictsStore(routerStore, nodeStore);\nconst faucetStore = new FaucetStore(routerStore);\nconst visualizerStore = new VisualizerStore(routerStore);\nconst manaStore = new ManaStore();\nconst slotStore = new SlotStore();\nconst stores = {\n \"routerStore\": routerStore,\n \"nodeStore\": nodeStore,\n \"explorerStore\": explorerStore,\n \"conflictsStore\": conflictsStore,\n \"faucetStore\": faucetStore,\n \"visualizerStore\": visualizerStore,\n \"manaStore\": manaStore,\n \"slotStore\": slotStore\n};\n\nconst browserHistory = createBrowserHistory();\nconst history = syncHistoryWithStore(browserHistory, routerStore);\n\n// render react DOM\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.991aa07a823b10139416.js b/components/dashboard/frontend/build/app.991aa07a823b10139416.js deleted file mode 100644 index c9b6d7b57..000000000 --- a/components/dashboard/frontend/build/app.991aa07a823b10139416.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyA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vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2NnB4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NiA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},298:function(e,t,n){var r={"./af":107,"./af.js":107,"./ar":108,"./ar-dz":109,"./ar-dz.js":109,"./ar-kw":110,"./ar-kw.js":110,"./ar-ly":111,"./ar-ly.js":111,"./ar-ma":112,"./ar-ma.js":112,"./ar-sa":113,"./ar-sa.js":113,"./ar-tn":114,"./ar-tn.js":114,"./ar.js":108,"./az":115,"./az.js":115,"./be":116,"./be.js":116,"./bg":117,"./bg.js":117,"./bm":118,"./bm.js":118,"./bn":119,"./bn-bd":120,"./bn-bd.js":120,"./bn.js":119,"./bo":121,"./bo.js":121,"./br":122,"./br.js":122,"./bs":123,"./bs.js":123,"./ca":124,"./ca.js":124,"./cs":125,"./cs.js":125,"./cv":126,"./cv.js":126,"./cy":127,"./cy.js":127,"./da":128,"./da.js":128,"./de":129,"./de-at":130,"./de-at.js":130,"./de-ch":131,"./de-ch.js":131,"./de.js":129,"./dv":132,"./dv.js":132,"./el":133,"./el.js":133,"./en-au":134,"./en-au.js":134,"./en-ca":135,"./en-ca.js":135,"./en-gb":136,"./en-gb.js":136,"./en-ie":137,"./en-ie.js":137,"./en-il":138,"./en-il.js":138,"./en-in":139,"./en-in.js":139,"./en-nz":140,"./en-nz.js":140,"./en-sg":141,"./en-sg.js":141,"./eo":142,"./eo.js":142,"./es":143,"./es-do":144,"./es-do.js":144,"./es-mx":145,"./es-mx.js":145,"./es-us":146,"./es-us.js":146,"./es.js":143,"./et":147,"./et.js":147,"./eu":148,"./eu.js":148,"./fa":149,"./fa.js":149,"./fi":150,"./fi.js":150,"./fil":151,"./fil.js":151,"./fo":152,"./fo.js":152,"./fr":153,"./fr-ca":154,"./fr-ca.js":154,"./fr-ch":155,"./fr-ch.js":155,"./fr.js":153,"./fy":156,"./fy.js":156,"./ga":157,"./ga.js":157,"./gd":158,"./gd.js":158,"./gl":159,"./gl.js":159,"./gom-deva":160,"./gom-deva.js":160,"./gom-latn":161,"./gom-latn.js":161,"./gu":162,"./gu.js":162,"./he":163,"./he.js":163,"./hi":164,"./hi.js":164,"./hr":165,"./hr.js":165,"./hu":166,"./hu.js":166,"./hy-am":167,"./hy-am.js":167,"./id":168,"./id.js":168,"./is":169,"./is.js":169,"./it":170,"./it-ch":171,"./it-ch.js":171,"./it.js":170,"./ja":172,"./ja.js":172,"./jv":173,"./jv.js":173,"./ka":174,"./ka.js":174,"./kk":175,"./kk.js":175,"./km":176,"./km.js":176,"./kn":177,"./kn.js":177,"./ko":178,"./ko.js":178,"./ku":179,"./ku.js":179,"./ky":180,"./ky.js":180,"./lb":181,"./lb.js":181,"./lo":182,"./lo.js":182,"./lt":183,"./lt.js":183,"./lv":184,"./lv.js":184,"./me":185,"./me.js":185,"./mi":186,"./mi.js":186,"./mk":187,"./mk.js":187,"./ml":188,"./ml.js":188,"./mn":189,"./mn.js":189,"./mr":190,"./mr.js":190,"./ms":191,"./ms-my":192,"./ms-my.js":192,"./ms.js":191,"./mt":193,"./mt.js":193,"./my":194,"./my.js":194,"./nb":195,"./nb.js":195,"./ne":196,"./ne.js":196,"./nl":197,"./nl-be":198,"./nl-be.js":198,"./nl.js":197,"./nn":199,"./nn.js":199,"./oc-lnc":200,"./oc-lnc.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tk":223,"./tk.js":223,"./tl-ph":224,"./tl-ph.js":224,"./tlh":225,"./tlh.js":225,"./tr":226,"./tr.js":226,"./tzl":227,"./tzl.js":227,"./tzm":228,"./tzm-latn":229,"./tzm-latn.js":229,"./tzm.js":228,"./ug-cn":230,"./ug-cn.js":230,"./uk":231,"./uk.js":231,"./ur":232,"./ur.js":232,"./uz":233,"./uz-latn":234,"./uz-latn.js":234,"./uz.js":233,"./vi":235,"./vi.js":235,"./x-pseudo":236,"./x-pseudo.js":236,"./yo":237,"./yo.js":237,"./zh-cn":238,"./zh-cn.js":238,"./zh-hk":239,"./zh-hk.js":239,"./zh-mo":240,"./zh-mo.js":240,"./zh-tw":241,"./zh-tw.js":241};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=s,e.exports=a,a.id=298},434:function(e,t,n){"use strict";n.r(t);var r=n(1),a=n(24),s=n(6),l=n(25),o=(n(297),n(285)),i=n(56),c=n(39),p=n(12),d=n(11),u=n(9),m=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let h=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Uptime: ",this.props.nodeStore.uptime)}};h=m([Object(s.b)("nodeStore"),s.c],h);var f=h,b=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let g=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Version: ",this.props.nodeStore.status.version)}};g=b([Object(s.b)("nodeStore"),s.c],g);var y=g,E=n(15),v=n(29),I={elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0},k=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const x=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let S=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Blocks Per Second"),r.createElement("small",null,"BPS: ",this.props.nodeStore.last_mps_metric.mps,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.mpsSeries,options:x})))}};S=k([Object(s.b)("nodeStore"),s.c],S);var j=S,O=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const w=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let C=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Current Tips"),r.createElement("small",null,"Tips: ",this.props.nodeStore.last_tips_metric.totaltips,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.tipsSeries,options:w})))}};C=O([Object(s.b)("nodeStore"),s.c],C);var D=C,R=n(2),_=n(28),N=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const T=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return _(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${_(Math.abs(e.value))}`}}}},I);let P=class extends r.Component{render(){let e=this.props.nodeStore.status.mem;return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Memory Usage"," ",_(e.heap_alloc)),r.createElement("small",null,"GC Cycles: ",e.num_gc," (Last Cycle: ",e.last_pause_gc/1e6,"ms) - "," ","Heap: "," ","[Obj: ",e.heap_objects,", In-Use: ",_(e.heap_sys-e.heap_idle),", Retained: ",_(e.heap_idle-e.heap_released),"]"),r.createElement(v.Line,{height:50,data:this.props.nodeStore.memSeries,options:T})))}};P=N([Object(s.b)("nodeStore"),s.c],P);var M=P,L=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const A=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let B=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Component Counter Blocks Per Second"),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("small",null,"BPS: ",this.props.nodeStore.last_component_counter_metric.store,"."),r.createElement("small",null,"Rate Setter - Estimate: ",this.props.nodeStore.last_rate_setter_metric.estimate)),r.createElement(v.Line,{height:50,data:this.props.nodeStore.componentSeries,options:A})))}};B=L([Object(s.b)("nodeStore"),s.c],B);var z=B,H=n(14),F=n(20),V=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Z=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"TangleTime Synced: ",this.props.nodeStore.status.tangleTime.synced?"Yes":"No"),r.createElement("small",null,r.createElement("div",null,r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Accepted Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.acceptedBlockID},this.props.nodeStore.status.tangleTime.acceptedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.confirmedBlockID},this.props.nodeStore.status.tangleTime.confirmedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Slot:",this.props.nodeStore.status.tangleTime.confirmedSlot)),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Committed Slot:",this.props.nodeStore.status.tangleTime.committedSlot)),r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.ATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.CTT/1e6),"dd.mm.yyyy HH:MM:ss"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Relative Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Relative Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RCTT/1e6),"dd.mm.yyyy HH:MM:ss")))))))}};Z=V([Object(s.b)("nodeStore"),s.c],Z);var U=Z,W=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let J=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Bootstrapped: ",this.props.nodeStore.status.tangleTime.bootstrapped?"Yes":"No")}};J=W([Object(s.b)("nodeStore"),s.c],J);var G=J,q=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let X=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Dashboard"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Node: ",this.props.nodeStore.status.id),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(f,null)))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(G,null)))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(y,null))))))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(U,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(j,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(z,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(M,null))))}};X=q([Object(s.b)("nodeStore"),s.c],X);var Q=n(16),K=n(23),$=n(22),Y=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ee=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Address or Block ID","aria-label":"Address or Block ID","aria-describedby":"basic-addon1",value:e,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:t})))))}};ee=Y([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ee);var te=n(71),ne=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let re=class extends r.Component{render(){let{blksLiveFeed:e}=this.props.explorerStore;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Live Feed"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{height:"500px",overflow:"auto"}},r.createElement("h6",null,"Blocks"),r.createElement(te.a,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("td",null,"Id"),r.createElement("td",null,"Payload Type"))),r.createElement("tbody",null,e))))))))}};re=ne([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],re);var ae=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let se=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.txID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/transaction/"+this.txID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Transaction ID","aria-label":"Transaction ID","aria-describedby":"basic-addon1",value:this.txID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};se=ae([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],se);var le=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let oe=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.outputID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/output/"+this.outputID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Output ID","aria-label":"Output ID","aria-describedby":"basic-addon1",value:this.outputID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};oe=le([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],oe);var ie=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ce=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.conflictID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/conflict/"+this.conflictID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Conflict ID","aria-label":"Conflict ID","aria-describedby":"basic-addon1",value:this.conflictID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ce=ie([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ce);var pe=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let de=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("p",null,"Search for addresses, blocks, transactions, outputs and conflicts."))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(ee,null)),r.createElement(u.a,null,r.createElement(se,null))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(oe,null)),r.createElement(u.a,null,r.createElement(ce,null))),r.createElement(re,null),r.createElement("small",null,"This explorer implementation is heavily inspired by ",r.createElement("a",{href:"https://thetangle.org"},"thetangle.org"),"."))}};de=pe([Object(s.b)("nodeStore"),s.c],de);var ue=n(288),me=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let he=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(ue.a,{inline:!0,as:"div"},r.createElement(K.a,{type:"text",onChange:this.updateSearch,placeholder:"Search the Tangle...",value:e,className:" mr-sm-2",disabled:t,onKeyUp:this.executeSearch}))}};he=me([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],he);var fe,be=n(17),ge=n(44),ye=n(3);!function(e){e[e.Status=0]="Status",e[e.BPSMetrics=1]="BPSMetrics",e[e.Block=2]="Block",e[e.NeighborStats=3]="NeighborStats",e[e.ComponentCounterMetrics=4]="ComponentCounterMetrics",e[e.TipsMetrics=5]="TipsMetrics",e[e.Vertex=6]="Vertex",e[e.TXAccepted=7]="TXAccepted",e[e.TipInfo=8]="TipInfo",e[e.Mana=9]="Mana",e[e.ManaMapOverall=10]="ManaMapOverall",e[e.ManaMapOnline=11]="ManaMapOnline",e[e.BlkManaDashboardAddress=12]="BlkManaDashboardAddress",e[e.RateSetter=13]="RateSetter",e[e.ConflictSet=14]="ConflictSet",e[e.Conflict=15]="Conflict",e[e.SlotInfo=16]="SlotInfo"}(fe||(fe={}));let Ee={};function ve(e,t){Ee[e]=t}function Ie(e){delete Ee[e]}var ke,xe,Se,je;!function(e){e[e.TaggedData=0]="TaggedData",e[e.Transaction=1]="Transaction",e[e.Faucet=3]="Faucet"}(ke||(ke={}));class Oe{}class we{}function Ce(e){switch(e){case ke.TaggedData:return"TaggedData";case ke.Transaction:return"Transaction";case ke.Faucet:return"Faucet";default:return"Unknown"}}class De extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.token.id},r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",this.props.token.id),r.createElement(R.a.Item,null,"Amount: ",this.props.token.amount)))}}class Re extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.address},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address Type: ",this.props.unlock.address.type)),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",this.props.unlock.address.pubKeyHash)))}}class _e extends r.Component{render(){return this.props.unlock.unixTime&&r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.unixTime},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}class Ne extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(R.a.Item,null,"Amount: ",this.props.unlock.amount)))}}class Te extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(R.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}function Pe(e){switch(e.type){case xe.Address:case xe.StateControllerAddress:case xe.GovernorAddress:return r.createElement(Re,{unlock:e});case xe.StorageDepositReturn:return r.createElement(Ne,{unlock:e});case xe.Expiration:return r.createElement(Te,{unlock:e});case xe.Timelock:return r.createElement(_e,{unlock:e})}}!function(e){e[e.Address=0]="Address",e[e.StorageDepositReturn=1]="StorageDepositReturn",e[e.Timelock=2]="Timelock",e[e.Expiration=3]="Expiration",e[e.StateControllerAddress=4]="StateControllerAddress",e[e.GovernorAddress=5]="GovernorAddress",e[e.ImmutableAlias=6]="ImmutableAlias"}(xe||(xe={}));class Me extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.address},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",this.props.feature.address)))}}class Le extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.data},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Data: ",this.props.feature.data)))}}class Ae extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.tag},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Data: ",this.props.feature.tag)))}}function Be(e){switch(e.type){case Se.Sender:case Se.Issuer:return r.createElement(Me,{feature:e.feature});case Se.Metadata:return r.createElement(Le,{feature:e.feature});case Se.Tag:return r.createElement(Ae,{feature:e.feature})}}!function(e){e[e.Sender=0]="Sender",e[e.Issuer=1]="Issuer",e[e.Metadata=2]="Metadata",e[e.Tag=3]="Tag"}(Se||(Se={}));class ze extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: BasicOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class He extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,{style:{wordBreak:"break-word"}},r.createElement(R.a.Item,null,"Type: AliasOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"AliasID: ",this.props.output.aliasId),r.createElement(R.a.Item,null,"StateIndex: ",this.props.output.stateIndex),r.createElement(R.a.Item,null,"State Metadata: ",this.props.output.stateMetadata," "),r.createElement(R.a.Item,null,"Foundry Counter: ",this.props.output.foundryCounter),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Fe extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: FoundryOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"Serial Number: ",this.props.output.serialNumber),r.createElement(R.a.Item,null,"Token Scheme: ",this.props.output.tokenScheme),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Ve extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: FoundryOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"NFT ID: ",this.props.output.nftId),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}function Ze(e){let t=e.outputID;switch(e.type){case je.Basic:return r.createElement(ze,{output:e.output,id:t});case je.Alias:return r.createElement(He,{output:e.output,id:t});case je.Foundry:return r.createElement(Fe,{output:e.output,id:t});case je.NFT:return r.createElement(Ve,{output:e.output,id:t});default:return}}!function(e){e[e.Treasury=2]="Treasury",e[e.Basic=3]="Basic",e[e.Alias=4]="Alias",e[e.Foundry=5]="Foundry",e[e.NFT=6]="NFT"}(je||(je={}));var Ue=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},We=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};const Ge="1111111111111111111111111111111111111111111111111111111111111111";class qe{}var Xe;!function(e){e[e.NotFound=1]="NotFound",e[e.BadRequest=2]="BadRequest"}(Xe||(Xe={}));class Qe{constructor(e){this.latest_blocks=[],this.blk=null,this.addr=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.conflict=null,this.conflictChildren=null,this.conflictConflicts=null,this.conflictVoters=null,this.tips=null,this.slotInfo=new qe,this.query_loading=!1,this.query_err=null,this.search="",this.search_result=null,this.searching=!1,this.searchAny=()=>Je(this,void 0,void 0,(function*(){this.updateSearching(!0);try{let e=yield fetch("/api/search/"+this.search),t=yield e.json();this.updateSearchResult(t)}catch(e){this.updateQueryError(e)}})),this.resetSearch=()=>{this.search_result=null,this.searching=!1},this.updateSearchResult=e=>{this.search_result=e,this.searching=!1;let t=this.search;this.search="",this.search_result.block?this.routerStore.push("/explorer/block/"+t):this.search_result.address?this.routerStore.push("/explorer/address/"+t):this.routerStore.push("/explorer/404/"+t)},this.updateSearch=e=>{this.search=e},this.updateSearching=e=>this.searching=e,this.searchBlock=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/block/"+e);this.updateBlock(t)})),this.searchAddress=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/address/"+e);this.updateAddress(t)})),this.getSlotDetails=e=>Je(this,void 0,void 0,(function*(){yield this.getSlotInfo(e)})),this.getTransaction=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/transaction/"+e);for(let e=0;eJe(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/attachments`);this.txAttachments=t})),this.getTransactionMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/metadata`);this.txMetadata=t})),this.getOutput=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/output/"+e);this.output=t})),this.getOutputMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/metadata`);this.outputMetadata=t})),this.getOutputConsumers=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/consumers`);this.outputConsumers=t})),this.getPendingMana=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/mana/pending?OutputID="+e);this.pendingMana=t})),this.getConflict=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/conflict/"+e);this.conflict=t})),this.getConflictChildren=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/children`);this.conflictChildren=t})),this.getConflictConflicts=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/conflicts`);this.conflictConflicts=t})),this.getConflictVoters=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/voters`);this.conflictVoters=t})),this.getSlotInfo=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/slot/commitment/"+e);this.slotInfo=t})),this.getTips=()=>Je(this,void 0,void 0,(function*(){const e=yield this.fetchJson("get","/api/tips");this.tips=e})),this.reset=()=>{this.blk=null,this.query_err=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.conflict=null,this.conflictChildren=null,this.conflictConflicts=null,this.tips=null,this.slotInfo=new qe},this.updateAddress=e=>{this.addr=e,this.query_err=null,this.query_loading=!1},this.updateBlock=e=>{switch(this.blk=e,this.blk.conflictIDs=this.blk.conflictIDs?this.blk.conflictIDs:[],this.blk.addedConflictIDs=this.blk.addedConflictIDs?this.blk.addedConflictIDs:[],this.blk.subtractedConflictIDs=this.blk.subtractedConflictIDs?this.blk.subtractedConflictIDs:[],this.blk.strongChildren=this.blk.strongChildren?this.blk.strongChildren:[],this.blk.weakChildren=this.blk.weakChildren?this.blk.weakChildren:[],this.blk.shallowLikeChildren=this.blk.shallowLikeChildren?this.blk.shallowLikeChildren:[],this.blk.strongParents=this.blk.strongParents?this.blk.strongParents:[],this.blk.weakParents=this.blk.weakParents?this.blk.weakParents:[],this.blk.shallowLikedParents=this.blk.shallowLikedParents?this.blk.shallowLikedParents:[],this.query_err=null,this.query_loading=!1,e.payloadType){case ke.Transaction:case ke.TaggedData:this.payload=e.payload;break;case ke.Faucet:this.payload=e.payload;default:this.payload=e.payload}},this.updateQueryLoading=e=>this.query_loading=e,this.updateQueryError=e=>{this.query_err=e,this.query_loading=!1,this.searching=!1},this.addLiveFeedBlock=e=>{-1===this.latest_blocks.findIndex(t=>t.id==e.id)&&(this.latest_blocks.length>=50&&this.latest_blocks.shift(),this.latest_blocks.push(e))},this.routerStore=e,ve(fe.Block,this.addLiveFeedBlock)}get blksLiveFeed(){let e=[];for(let t=this.latest_blocks.length-1;t>=0;t--){let n=this.latest_blocks[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id)),r.createElement("td",null,Ce(n.payload_type))))}return e}get tipsList(){let e=[];if(this.tips)for(let t=0;t=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let et=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,e.content_title,": "," ",e.content)))}};et=Ye([Object(s.b)("explorerStore"),s.c],et);var tt,nt=n(0),rt=n(282);!function(e){e[e.Ed25519=0]="Ed25519",e[e.BLS=1]="BLS"}(tt||(tt={}));class at extends r.Component{render(){let e=this.props.signature;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Public Key: ",e.publicKey),r.createElement(R.a.Item,null,"Signature: ",e.signature)))))}}class st extends r.Component{renderSignatureComponent(){switch(this.props.block.signatureType){case tt.Ed25519:return r.createElement(at,{signature:this.props.block.signature})}}render(){let e=this.props.block;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,"Index: ",r.createElement(Q.a,{variant:"primary"},this.props.key),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: ",e.type),e.signatureType&&r.createElement(R.a.Item,null,"Signature Type: ",function(e){switch(e){case tt.Ed25519:return"Ed25519 Signature";case tt.BLS:return"BLS Signature";default:return"Unknown Signature Type"}}(e.signatureType)),this.renderSignatureComponent())))}}const lt={maxHeight:"1000px",overflow:"auto",width:"47%",fontSize:"85%"};class ot extends r.Component{render(){let e=this.props.txID,t=this.props.tx;return t&&e&&r.createElement("div",null,r.createElement("h4",null,"Transaction"),r.createElement("p",null," ",e," "),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginTop:"10px",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Transaction Essence")),r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",r.createElement("a",{href:"/explorer/transaction/"+e}," ",e)),r.createElement(R.a.Item,null,"Network ID: ",t.networkId),r.createElement(R.a.Item,null,"Creation Time: ",t.creationSlot),r.createElement(R.a.Item,null,r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",{className:"align-self-start input-output-list",style:lt},r.createElement("span",null,"Inputs"),r.createElement("hr",null),t.inputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),r.createElement("div",{className:"mb-2",key:"input"+t},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Output ID: ",e.referencedOutputID.hex)))))),r.createElement(nt.b.Provider,{value:{color:"#00a0ff",size:"2em"}},r.createElement("div",null,r.createElement(rt.a,null))),r.createElement("div",{style:lt},r.createElement("span",null,"Outputs"),r.createElement("hr",null),t.outputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),Ze(e)))))),t.payload&&r.createElement(R.a.Item,null,"Data payload: ",t.payload)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Unlock Blocks")),r.createElement(r.Fragment,null,t.unlocks.map((e,t)=>r.createElement(st,{block:e,key:t}))))))}}var it=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ct=class extends r.Component{render(){let{payload:e,blk:t}=this.props.explorerStore,n=t.txId,a=e;return r.createElement(p.a,null,r.createElement(ot,{txID:n,tx:a}))}};function pt(e){switch(e){case dt:return"MasterConflictID";case ut:return"UndefinedConflictID";case mt:return"LazyBookedConflictsConflictID";case ht:return"InvalidConflictID";default:return e}}ct=it([Object(s.b)("explorerStore"),s.c],ct);const dt="4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM",ut="11111111111111111111111111111111",mt="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF",ht="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG";var ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let bt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",e.address),r.createElement(R.a.Item,null,"Access Mana Pledge ID: ",e.accessManaPledgeID),r.createElement(R.a.Item,null,"Consensus Mana Pledge ID: ",e.consensusManaPledgeID),r.createElement(R.a.Item,null,"Nonce: ",e.nonce)))))}};bt=ft([Object(s.b)("explorerStore"),s.c],bt);var gt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let yt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Tag: ",e.tag),r.createElement(R.a.Item,null,"Data: ",e.data)))))}};yt=gt([Object(s.b)("explorerStore"),s.c],yt);var Et=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let vt=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchBlock(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchBlock(this.props.match.params.id),null}getPayloadType(){return Ce(this.props.explorerStore.blk.payloadType)}renderPayload(){switch(this.props.explorerStore.blk.payloadType){case ke.Transaction:return this.props.explorerStore.blk.objectivelyInvalid?r.createElement(et,null):r.createElement(ct,null);case ke.TaggedData:return r.createElement(yt,null);case ke.Faucet:return r.createElement(bt,null);default:return r.createElement(et,null)}}render(){let{id:e}=this.props.match.params,{blk:t,query_loading:n,query_err:a}=this.props.explorerStore;return e===Ge?r.createElement(p.a,null,r.createElement("h3",null,"Genesis Block"),r.createElement("p",null,"In the beginning there was the genesis.")):a?r.createElement(p.a,null,r.createElement("h3",null,"Block not available - 404"),r.createElement("p",null,"Block with ID ",e," not found.")):r.createElement(p.a,null,r.createElement("h3",null,"Block"),r.createElement("p",null,e," "," ",t&&r.createElement(r.Fragment,null,r.createElement("br",null),r.createElement("span",null,r.createElement(Q.a,{variant:"light",style:{marginRight:10}},"Issuance Time: ",F(new Date(1e3*t.issuanceTimestamp),"dd.mm.yyyy HH:MM:ss")),r.createElement(Q.a,{variant:"light"},"Solidification Time: ",F(new Date(1e3*t.solidificationTimestamp),"dd.mm.yyyy HH:MM:ss"))))),t&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Payload Type: ",this.getPayloadType()),r.createElement(R.a.Item,null,"Sequence Number: ",t.sequenceNumber),r.createElement(R.a.Item,null,"ConflictIDs:",r.createElement(R.a,null,t.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"AddedConflictIDs:",r.createElement(R.a,null,t.addedConflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"AddedConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"SubtractedConflictIDs:",r.createElement(R.a,null,t.subtractedConflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"SubtractedConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"Solid: ",t.solid?"Yes":"No"),r.createElement(R.a.Item,null,"Scheduled: ",t.scheduled?"Yes":"No"),r.createElement(R.a.Item,null,"Booked: ",t.booked?"Yes":"No"),r.createElement(R.a.Item,null,"Orphaned: ",t.orphaned?"Yes":"No"),r.createElement(R.a.Item,null,"Objectively Invalid: ",t.objectivelyInvalid?"Yes":"No"),r.createElement(R.a.Item,null,"Subjectively Invalid: ",t.subjectivelyInvalid?"Yes":"No"),r.createElement(R.a.Item,null,"Acceptance: ",t.acceptance?"Yes":"No"),r.createElement(R.a.Item,null,"Acceptance Time: ",F(new Date(1e3*t.acceptanceTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(R.a.Item,null,"Confirmation: ",t.confirmation?"Yes":"No"),r.createElement(R.a.Item,null,"Confirmation Time: ",F(new Date(1e3*t.confirmationTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(R.a.Item,null,"Confirmation by slot: ",t.confirmationBySlot?"Yes":"No"),r.createElement(R.a.Item,null,"Confirmation by slot time: ",F(new Date(1e3*t.confirmationBySlotTime),"dd.mm.yyyy HH:MM:ss"))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Slot Commitment"),r.createElement(R.a,null,r.createElement(R.a.Item,null,"CommitmentID: ",t.commitmentID),r.createElement(R.a.Item,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Index: ",t.commitment.index),r.createElement(R.a.Item,null,"prevID: ",t.commitment.prevID),r.createElement(R.a.Item,null,"rootsID: ",t.commitment.rootsID),r.createElement(R.a.Item,null,"Cumulative Weight: ",t.commitment.cumulativeWeight))),r.createElement(R.a.Item,null,"LatestConfirmedSlot: ",t.latestConfirmedSlot)))),!!t.rank&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Markers"),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Rank: ",t.rank),r.createElement(R.a.Item,null,"SequenceID: ",t.sequenceID),r.createElement(R.a.Item,null,"PastMarkerGap: ",t.pastMarkerGap),r.createElement(R.a.Item,null,"IsPastMarker: ",t.isPastMarker?"Yes":"No"),r.createElement(R.a.Item,null,"Past markers: ",t.pastMarkers)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"IssuerID: ",t.issuerID),r.createElement(R.a.Item,{style:{overflow:"auto"}},"Block Signature: ",t.signature)))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.strongParents.map((e,n)=>r.createElement(R.a.Item,{key:"Strong Parent"+n+1,className:"text-break"},"Strong Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongParents[n]},t.strongParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.weakParents.map((e,n)=>r.createElement(R.a.Item,{key:"Weak Parent"+n+1,className:"text-break"},"Weak Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakParents[n]},t.weakParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.shallowLikedParents.map((e,n)=>r.createElement(R.a.Item,{key:"Shallow Liked Parent"+n+1,className:"text-break"},"Shallow Liked Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikedParents[n]},t.shallowLikedParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.strongChildren.map((e,n)=>r.createElement(R.a.Item,{key:"Strong Child"+n+1,className:"text-break"},"Strong Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongChildren[n]},t.strongChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.weakChildren.map((e,n)=>r.createElement(R.a.Item,{key:"Weak Child"+n+1,className:"text-break"},"Weak Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakChildren[n]},t.weakChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.shallowLikeChildren.map((e,n)=>r.createElement(R.a.Item,{key:"ShallowLike Child"+n+1,className:"text-break"},"ShallowLike Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikeChildren[n]},t.shallowLikeChildren[n])))))),r.createElement(d.a,{className:"mb-3",style:{marginTop:"20px",marginBottom:"20px"}},r.createElement(u.a,null,r.createElement("h3",null,"Payload"))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,this.renderPayload()))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};vt=Et([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],vt);var It=n(289);function kt(e){let t="",n=Math.round(e);return t=n<1e3?n.toString(10)+" m":n<1e6?(n/1e3).toFixed(3)+" Km":n<1e9?(n/1e6).toFixed(3)+" Mm":n<1e12?(n/1e9).toFixed(3)+" Gm":n<1e15?(n/1e12).toFixed(3)+" Tm":(n/1e15).toFixed(3)+" Pm",t}var xt=n(281),St=n(99),jt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ot=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchAddress(this.props.match.params.id)}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchAddress(this.props.match.params.id),null}render(){let{id:e}=this.props.match.params,{addr:t,query_loading:n,query_err:a}=this.props.explorerStore,s=[],l=[],o=[];if(a)return r.createElement(p.a,null,r.createElement("h3",null,"Address not available - 404"),r.createElement("p",null,"Address ",e," not found."));if(t){t.explorerOutputs.forEach(e=>{e.metadata.consumerCount>0?s.push(e):l.push(e)});let e=(e,t)=>t.txTimestamp===e.txTimestamp?t.id.transactionID==e.id.transactionID?t.id.outputIndex-e.id.outputIndex:t.id.transactionID.localeCompare(e.id.transactionID):t.txTimestamp-e.txTimestamp;l.sort(e),s.sort(e)}return r.createElement(p.a,null,r.createElement("h3",{style:{marginBottom:"40px"}},"Address ",r.createElement("strong",null,e)," ",null!==t&&r.createElement("span",null,"(",t.explorerOutputs.length," Outputs)")),null!==t?r.createElement(r.Fragment,null,null!==t.explorerOutputs&&100===t.explorerOutputs.length&&r.createElement(It.a,{variant:"warning"},"Max. 100 outputs are shown."),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:7},r.createElement(R.a,null,r.createElement("h4",null,"Available Balances"),0===o.length?"There are no balances currently available.":r.createElement("div",null,r.createElement(xt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:9},r.createElement("strong",null,"Color")),r.createElement(u.a,null,r.createElement("strong",null,"Balance")))),o)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement("h4",null,"Unspent Outputs"),0===l.length?"There are no unspent outputs currently available.":r.createElement("div",null,l.map(e=>r.createElement(wt,{output:e})))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement("h4",null,"Spent Outputs"),0===s.length?"There are no spent outputs currently available.":r.createElement("div",null,s.map(e=>r.createElement(wt,{output:e}))))))):r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};Ot=jt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ot);class wt extends r.Component{constructor(e){super(e),this.state={enabled:!1}}render(){return r.createElement(R.a.Item,null,r.createElement(St.a,{variant:Dt(this.props.output.output.type),onClick:()=>{this.setState({enabled:!this.state.enabled})},block:!0},r.createElement(d.a,null,r.createElement(u.a,{xs:6,style:{textAlign:"left"}},this.props.output.id.base58," "),r.createElement(u.a,{style:{textAlign:"left"}},function(e){switch(e){case je.Basic:return"Basic Output";case je.Alias:return"Alias Output";case je.Foundry:return"Foundry Output";case je.NFT:return"NFT Output";default:return}}(this.props.output.output.type)," "),r.createElement(u.a,{style:{textAlign:"left"}},new Date(1e3*this.props.output.txTimestamp).toLocaleString()))),r.createElement(d.a,{style:{fontSize:"90%"}},r.createElement(u.a,null,this.state.enabled?Ze(this.props.output.output):null),r.createElement(u.a,null,this.state.enabled?r.createElement(Ct,{metadata:this.props.output.metadata,timestamp:this.props.output.txTimestamp,pendingMana:this.props.output.pendingMana}):null)))}}class Ct extends r.Component{render(){let e=this.props.metadata,t=this.props.timestamp,n=this.props.pendingMana;return r.createElement(R.a,null,"ConflictIDs:",r.createElement(R.a,null,e.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e))))),r.createElement(R.a.Item,null,"Pending mana: ",kt(n)),r.createElement(R.a.Item,null,"Timestamp: ",new Date(1e3*t).toLocaleString()),r.createElement(R.a.Item,null,"Consumer Count: ",e.consumerCount),e.confirmedConsumer&&r.createElement(R.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+e.confirmedConsumer},e.confirmedConsumer)," "))}}let Dt=e=>{switch(e){case je.Basic:case je.Alias:return"light";case je.Foundry:return"success";case je.NFT:return"info";default:return"danger"}};var Rt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let _t=class extends r.Component{render(){let{search:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer 404"),r.createElement("p",null,"The search via '",e,"' did not yield any results."))}};_t=Rt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],_t);var Nt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const Tt=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return _(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${_(Math.abs(e.value))}`}}}},I);let Pt=class extends r.Component{render(){let e=this.props.nodeStore.neighbor_metrics.get(this.props.identity),t=e.current;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,r.createElement("h5",null,t.id)),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush",as:"small"},r.createElement(R.a.Item,null,"Origin:"," ",t.connection_origin))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush",as:"small"},r.createElement(R.a.Item,null,"Address: ",t.address)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h6",null,"Network (Tx/Rx)"),r.createElement(Q.a,{pill:!0,variant:"light"},"Total: ",t.packets_written," / ",t.packets_read)," ",r.createElement(Q.a,{pill:!0,variant:"light"},"Current: ",_(e.currentNetIO&&e.currentNetIO.tx)," / ",_(e.currentNetIO&&e.currentNetIO.rx)),r.createElement(v.Line,{height:30,data:e.netIOSeries,options:Tt})))))))}};Pt=Nt([Object(s.b)("nodeStore"),s.c],Pt);var Mt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Lt=class extends r.Component{render(){let e=[];return this.props.nodeStore.neighbor_metrics.forEach((t,n)=>{e.push(r.createElement(Pt,{key:n,identity:n}))}),r.createElement(p.a,null,r.createElement("h3",null,"Neighbors ",e.length>0&&r.createElement("span",null,"(",e.length,")")),r.createElement("p",null,"Currently connected neighbors."),e)}};Lt=Mt([Object(s.b)("nodeStore"),s.c],Lt);var At=n(57),Bt=n(103),zt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ht=class extends r.Component{constructor(){super(...arguments),this.updateVerticesLimit=e=>{this.props.visualizerStore.updateVerticesLimit(e.target.value)},this.pauseResumeVisualizer=e=>{this.props.visualizerStore.pauseResume()},this.updateSearch=e=>{this.props.visualizerStore.updateSearch(e.target.value)},this.searchAndHighlight=e=>{"Enter"===e.key&&this.props.visualizerStore.searchAndHighlight()},this.toggleBackgroundDataCollection=()=>{this.props.nodeStore.collecting?this.props.nodeStore.unregisterHandlers():this.props.nodeStore.registerHandlers()}}componentDidMount(){this.props.visualizerStore.start()}componentWillUnmount(){this.props.visualizerStore.stop(),this.props.nodeStore.registerHandlers()}render(){let{vertices:e,finalized_count:t,selected:n,verticesLimit:a,tips_count:s,paused:l,search:o}=this.props.visualizerStore,{last_mps_metric:i,collecting:c}=this.props.nodeStore;return r.createElement(p.a,null,r.createElement("h3",null,"Visualizer"),r.createElement(d.a,{className:"mb-1"},r.createElement(u.a,{xs:5},r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Vertices Limit")),r.createElement(K.a,{placeholder:"limit",type:"number",value:a.toString(),onChange:this.updateVerticesLimit,"aria-label":"vertices-limit","aria-describedby":"vertices-limit"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Search Vertex")),r.createElement(K.a,{placeholder:"search",type:"text",value:o,onChange:this.updateSearch,"aria-label":"vertices-search",onKeyUp:this.searchAndHighlight,"aria-describedby":"vertices-search"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Ensures that only data needed for the visualizer is collected."))},r.createElement(St.a,{variant:"outline-secondary",onClick:this.toggleBackgroundDataCollection,size:"sm"},c?"Stop Background Data Collection":"Collect Background data")),r.createElement("br",null)),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Pauses/resumes rendering the graph."))},r.createElement(St.a,{onClick:this.pauseResumeVisualizer,size:"sm",variant:"outline-secondary"},l?"Resume Rendering":"Pause Rendering")))),r.createElement(u.a,{xs:{span:5,offset:2}},r.createElement("p",null,r.createElement(Q.a,{pill:!0,style:{background:"#b9b7bd",color:"white"}},"BLK Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#6c71c4",color:"white"}},"BLK Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#393e46",color:"white"}},"TX Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#fad02c",color:"white"}},"TX Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#cb4b16",color:"white"}},"Tip")," ",r.createElement(Q.a,{pill:!0,style:{background:"#b58900",color:"white"}},"Unknown"),r.createElement("br",null),"Vertices: ",e.size,", Tips: ",s,", Confirmed/UnConfirmed: ",t,"/",e.size-t,","," ","BPS: ",i.mps,r.createElement("br",null),"Selected: ",n?r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id.substr(0,10)):"-",r.createElement("br",null),n?n.strongParents&&r.createElement("span",null," Strong:"," ",n.strongParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.weakParents&&r.createElement("span",null," Weak:"," ",n.weakParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.shallowLikedParents&&r.createElement("span",null," Shallow Liked:"," ",n.shallowLikedParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):""))),r.createElement("div",{className:"visualizer",style:{zIndex:-1,position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#ededed"},id:"visualizer"}))}};Ht=zt([Object(s.b)("visualizerStore"),Object(s.b)("nodeStore"),s.c],Ht);var Ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Vt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTips()}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{tipsList:e}=this.props.explorerStore;return r.createElement(p.a,null,r.createElement("h3",null,"Tips"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BlockID"))),r.createElement("tbody",null,e)))}};Vt=Ft([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Vt);var Zt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ut=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransaction(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,tx:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Transaction not available - 404"),r.createElement("p",null,"Transaction with ID ",e," not found.")):r.createElement(ot,{txID:e,tx:n})}};Ut=Zt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ut);var Wt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Jt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionMetadata(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,txMetadata:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Metadata"),r.createElement("p",null," Metadata for transaction ID ",e," not found.")):r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Metadata"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ConflictIDs:",r.createElement(R.a,null,n.conflictIDs&&n.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement("a",{href:"/explorer/transaction/"+e},e))))),r.createElement(R.a.Item,null,"Booked: ",n.booked.toString()),r.createElement(R.a.Item,null,"Confirmation State: ",n.confirmationState)))}};Jt=Wt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Jt);var Gt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let qt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionAttachments(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txAttachments:e}=this.props.explorerStore;return r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Attachments"),e&&e.blockIDs&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,e.blockIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))}};qt=Gt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],qt);class Xt extends r.Component{render(){let{id:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement(Ut,{txId:e}),r.createElement(Jt,{txId:e}),r.createElement(qt,{txId:e}))}}var Qt;function Kt(e){switch(e){case Qt.Undefined:return"Undefined";case Qt.Rejected:return"Rejected";case Qt.Pending:return"Pending";case Qt.Accepted:return"Accepted";case Qt.Confirmed:return"Confirmed";default:return"Undefined Confirmation State"}}!function(e){e[e.Undefined=0]="Undefined",e[e.Rejected=1]="Rejected",e[e.Pending=2]="Pending",e[e.Accepted=3]="Accepted",e[e.Confirmed=4]="Confirmed"}(Qt||(Qt={}));var $t=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Yt=class extends r.Component{componentDidMount(){this.props.explorerStore.getOutput(this.props.match.params.id),this.props.explorerStore.getPendingMana(this.props.match.params.id),this.props.explorerStore.getOutputMetadata(this.props.match.params.id),this.props.explorerStore.getOutputConsumers(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,output:n,pendingMana:a,outputMetadata:s,outputConsumers:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Output not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Output"),n&&r.createElement("div",{className:"mb-2"},Ze(n),r.createElement(R.a,null,a&&r.createElement(R.a.Item,null,"Pending Mana",r.createElement("hr",null),r.createElement("div",null,"Value: ",kt(a.mana)),r.createElement("div",null,"Timestamp: ",new Date(1e3*a.timestamp).toLocaleString())))),r.createElement("h4",null,"Metadata"),s&&r.createElement("div",{className:"mb-2"},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+s.outputID.transactionID},s.outputID.transactionID)," "),"ConflictIDs:",r.createElement(R.a,null,s.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e))))),r.createElement(R.a.Item,null,"Consumer Count: ",s.consumerCount),r.createElement(R.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+s.confirmedConsumer},s.confirmedConsumer)," "),r.createElement(R.a.Item,null,"Confirmation State: ",Kt(s.confirmationState)),r.createElement(R.a.Item,null,"Confirmation State Time: ",new Date(1e3*s.confirmationStateTime).toLocaleString()))),r.createElement("h4",null,"Consumers"),l&&r.createElement("div",null,r.createElement(R.a,null,l.consumers.map((e,t)=>{return r.createElement(R.a.Item,{key:t},r.createElement("div",null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+e.transactionID},e.transactionID)),r.createElement("div",null,"Valid: ","true"===(n=e.valid)?r.createElement(Q.a,{variant:"success"},"True"):"false"===n?r.createElement(Q.a,{variant:"danger"},"False"):r.createElement(Q.a,{variant:"warning"},"Maybe")," "));var n}))))}};Yt=$t([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Yt);var en=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let tn=class extends r.Component{componentDidMount(){this.props.explorerStore.getConflict(this.props.match.params.id),this.props.explorerStore.getConflictChildren(this.props.match.params.id),this.props.explorerStore.getConflictConflicts(this.props.match.params.id),this.props.explorerStore.getConflictVoters(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,conflict:n,conflictChildren:a,conflictConflicts:s,conflictVoters:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Conflict not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Conflict"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",pt(n.id)),r.createElement(R.a.Item,null,"Parents:",r.createElement(R.a,null,n.parents.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"Conflicts:",n.conflictIDs&&r.createElement(R.a,null,n.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))),r.createElement(R.a.Item,null,"ConfirmationState: ",Kt(n.confirmationState)),r.createElement(R.a.Item,null," Children:",a&&r.createElement(R.a,null,a.childConflicts.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e.conflictID},pt(e.conflictID)))))),r.createElement(R.a.Item,null," Conflicts:",s&&r.createElement(R.a,null,s.conflicts.map((e,t)=>r.createElement("div",{key:t},"OutputID: ",r.createElement("a",{href:"/explorer/output/"+e.outputID.base58},e.outputID.base58),r.createElement(R.a,{className:"mb-2"},e.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e},pt(e))))))))),r.createElement(R.a.Item,null," Voters:",l&&r.createElement(R.a,null,l.voters.map((e,t)=>r.createElement(R.a.Item,{key:e+t},e))))))}};tn=en([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],tn);var nn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let rn=class extends r.Component{render(){let{slotLiveFeed:e}=this.props.slotStore;return r.createElement(p.a,null,r.createElement("h3",null,"Slots"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Index"),r.createElement("th",null,"Commitment ID"))),r.createElement("tbody",null,e)))}};rn=nn([Object(s.b)("nodeStore"),Object(s.b)("slotStore"),s.c],rn);var an=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let sn=class extends r.Component{componentDidMount(){const e=this.props.match.params.commitment;this.props.explorerStore.getSlotDetails(e)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{commitment:e}=this.props.match.params,{query_err:t,slotInfo:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Slot not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Slot"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",e),r.createElement(R.a.Item,null,"Index: ",n.index),r.createElement(R.a.Item,null,"RootsID: ",n.rootsID),r.createElement(R.a.Item,null,"PrevEC: ",n.prevID),r.createElement(R.a.Item,null,"Cumulative Weight: ",n.cumulativeWeight),r.createElement(R.a.Item,null,"Blocks:",n.blocks&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.blocks.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))))),r.createElement(R.a.Item,null,"Transactions:",n.transactions&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.transactions.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/transaction/"+e},e)))))))))),r.createElement(R.a.Item,null," Created outputs:",n.createdOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.createdOutputs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e)))))))))),r.createElement(R.a.Item,null," Spent outputs:",n.spentOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.spentOutputs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))))))))))}};sn=an([Object(s.b)("explorerStore"),s.c],sn);var ln=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let on=class extends r.Component{renderDevTool(){0}componentDidMount(){this.props.nodeStore.connect()}render(){return r.createElement("div",{className:"container"},r.createElement(i.a,{expand:"lg",bg:"light",variant:"light",className:"mb-4"},r.createElement(i.a.Brand,null,"iota-core"),r.createElement(c.a,{className:"mr-auto"},r.createElement(ge.LinkContainer,{to:"/dashboard"},r.createElement(c.a.Link,null,"Dashboard")),r.createElement(ge.LinkContainer,{to:"/neighbors"},r.createElement(c.a.Link,null,"Neighbors")),r.createElement(ge.LinkContainer,{to:"/explorer"},r.createElement(c.a.Link,null,"Explorer")),r.createElement(ge.LinkContainer,{to:"/visualizer"},r.createElement(c.a.Link,null,"Visualizer")),r.createElement(ge.LinkContainer,{to:"/slots"},r.createElement(c.a.Link,null,"Slot")),r.createElement(ge.LinkContainer,{to:"/tips"},r.createElement(c.a.Link,null,"Tips"))),r.createElement(i.a.Collapse,{className:"justify-content-end"},r.createElement(he,null),r.createElement(i.a.Text,null,!this.props.nodeStore.websocketConnected&&r.createElement(Q.a,{variant:"danger"},"WS not connected!")))),r.createElement(be.g,null,r.createElement(be.d,{exact:!0,path:"/dashboard",component:X}),r.createElement(be.d,{exact:!0,path:"/neighbors",component:Lt}),r.createElement(be.d,{exact:!0,path:"/explorer/block/:id",component:vt}),r.createElement(be.d,{exact:!0,path:"/explorer/address/:id",component:Ot}),r.createElement(be.d,{exact:!0,path:"/explorer/transaction/:id",component:Xt}),r.createElement(be.d,{exact:!0,path:"/explorer/output/:id",component:Yt}),r.createElement(be.d,{exact:!0,path:"/explorer/conflict/:id",component:tn}),r.createElement(be.d,{exact:!0,path:"/explorer/slot/commitment/:commitment",component:sn}),r.createElement(be.d,{exact:!0,path:"/explorer/404/:search",component:_t}),r.createElement(be.d,{exact:!0,path:"/slots",component:rn}),r.createElement(be.d,{exact:!0,path:"/tips",component:Vt}),r.createElement(be.d,{exact:!0,path:"/explorer",component:de}),r.createElement(be.d,{exact:!0,path:"/visualizer",component:Ht}),r.createElement(be.d,{exact:!0,path:"/visualizer/history",component:Ht}),r.createElement(be.c,{to:"/dashboard"})),this.props.children,this.renderDevTool())}};on=ln([Object(s.b)("nodeStore"),Object(s.b)("routerStore"),s.c],on);const cn=Object(o.hot)(({history:e})=>r.createElement(on,{history:e}));var pn=n(102),dn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},un=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class mn{}class hn{constructor(){this.mem=new bn,this.scheduler=new En}}class fn{}class bn{}class gn{}class yn{}class En{}class vn{constructor(){this.collected=[],this.network_io=[]}addMetric(e){e.ts=F(Date.now(),"HH:MM:ss"),this.collected.push(e),this.collected.length>Sn&&this.collected.shift();let t=this.currentNetIO;t&&(this.network_io.length>Sn&&this.network_io.shift(),this.network_io.push(t))}get current(){return this.collected[this.collected.length-1]}get secondLast(){let e=this.collected.length-2;if(!(e<0))return this.collected[e]}get currentNetIO(){return this.current&&this.secondLast?{tx:this.current.packets_written-this.secondLast.packets_written,rx:this.current.packets_read-this.secondLast.packets_read,ts:F(new Date,"HH:MM:ss")}:null}get netIOSeries(){let e=Object.assign({},kn,xn("Tx","rgba(53, 180, 219,1)","rgba(53, 180, 219,0.4)")),t=Object.assign({},kn,xn("Rx","rgba(235, 134, 52)","rgba(235, 134, 52,0.4)")),n=[];for(let r=0;r{ve(fe.Status,this.updateStatus),ve(fe.BPSMetrics,e=>{this.addBPSMetric(this.updateLastBPSMetric(e))}),ve(fe.NeighborStats,this.updateNeighborMetrics),ve(fe.TipsMetrics,this.updateLastTipsMetric),ve(fe.ComponentCounterMetrics,this.updateLastComponentMetric),ve(fe.RateSetter,this.updateLastRateSetterMetric),this.updateCollecting(!0)},this.unregisterHandlers=()=>{Ie(fe.Status),Ie(fe.BPSMetrics),Ie(fe.NeighborStats),Ie(fe.TipsMetrics),Ie(fe.ComponentCounterMetrics),Ie(fe.RateSetter),this.updateCollecting(!1)},this.updateCollecting=e=>{this.collecting=e},this.updateWebSocketConnected=e=>this.websocketConnected=e,this.updateStatus=e=>{e.mem.ts=F(Date.now(),"HH:MM:ss"),this.collected_mem_metrics.length>Sn&&this.collected_mem_metrics.shift(),this.collected_mem_metrics.push(e.mem),this.status=e,e.scheduler.ts=F(Date.now(),"HH:MM:ss"),this.collected_scheduler_metrics.length>Sn&&this.collected_scheduler_metrics.shift(),this.collected_scheduler_metrics.push(e.scheduler)},this.updateNeighborMetrics=e=>{if(!e)return;let t=[];for(let n=0;n{e.ts=F(Date.now(),"HH:MM:ss"),this.last_rate_setter_metric=e,this.collected_rate_setter_metrics.length>Sn&&this.collected_rate_setter_metrics.shift(),this.collected_rate_setter_metrics.push(e)},this.updateLastBPSMetric=e=>{let t=new mn;return t.mps=e,t.ts=F(Date.now(),"HH:MM:ss"),this.last_mps_metric=t,t},this.addBPSMetric=e=>{this.collected_mps_metrics.length>Sn&&this.collected_mps_metrics.shift(),this.collected_mps_metrics.push(e)},this.updateLastTipsMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_tips_metric=e,this.collected_tips_metrics.length>Sn&&this.collected_tips_metrics.shift(),this.collected_tips_metrics.push(e)},this.updateLastComponentMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_component_counter_metric=e,this.collected_component_counter_metrics.length>Sn&&this.collected_component_counter_metrics.shift(),this.collected_component_counter_metrics.push(e)},this.status.tangleTime=new fn,this.status.tangleTime.ATT=0,this.status.tangleTime.RATT=0,this.status.tangleTime.CTT=0,this.status.tangleTime.RCTT=0,this.registerHandlers()}reset(){this.collected_mps_metrics=[],this.collected_mem_metrics=[],this.collected_scheduler_metrics=[],this.neighbor_metrics=new ye.ObservableMap,this.collected_tips_metrics=[],this.collected_component_counter_metrics=[]}reconnect(){this.updateWebSocketConnected(!1),setTimeout(()=>{this.connect()},5e3)}connect(){!function(e,t,n,r){let a=window.location,s="ws:";"https:"===a.protocol&&(s="wss:"),s+="//"+a.host+e;let l=new WebSocket(s);l.onopen=t,l.onclose=n,l.onerror=r,l.onmessage=e=>{let t=JSON.parse(e.data),n=Ee[t.type];n&&n(t.data)}}("/ws",()=>this.updateWebSocketConnected(!0),()=>this.reconnect(),()=>this.updateWebSocketConnected(!1))}get mpsSeries(){let e=Object.assign({},kn,xn("BPS","rgba(67, 196, 99,1)","rgba(67, 196, 99,0.4)")),t=[];for(let n=0;n1&&(a+=e+" Days, "),t>=0&&(a+=t<10?"0"+t+":":t+":"),n>=0&&(a+=n<10?"0"+n+":":n+":"),r>=0&&(a+=r<10?"0"+r:r),a}get memSeries(){let e=Object.assign({},kn,xn("Heap Sys","rgba(168, 50, 76,1)","rgba(168, 50, 76,0.4)")),t=Object.assign({},kn,xn("Heap Alloc","rgba(222, 49, 87,1)","rgba(222, 49, 87,0.4)")),n=Object.assign({},kn,xn("Heap Idle","rgba(222, 49, 182,1)","rgba(222, 49, 182,0.4)")),r=Object.assign({},kn,xn("Heap Released","rgba(250, 76, 252,1)","rgba(250, 76, 252,0.4)")),a=[];for(let s=0;s=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Dn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rn=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};!function(e){e[e.NotFound=0]="NotFound"}(On||(On={}));class _n{constructor(e){this.send_addr="",this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.sendResult=null,this.query_error="",this.sendReq=()=>Rn(this,void 0,void 0,(function*(){this.updateSending(!0);try{let e=yield fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);if(200!==e.status)return void this.updateQueryError(On.NotFound);let t=yield e.json();setTimeout(()=>{this.updateSendResult(t)},2e3)}catch(e){this.updateQueryError(e)}})),this.updateSendResult=e=>{this.sending=!1,this.sendResult=e,this.routerStore.history.push("/explorer/address/"+this.send_addr)},this.updateSend=e=>{this.send_addr=e},this.updateSendAccessManaNodeID=e=>{this.send_access_mana_node_id=e},this.updateSendConsensusManaNodeID=e=>{this.send_consensus_mana_node_id=e},this.updateSending=e=>{this.sending=e,this.query_error=""},this.reset=()=>{this.send_addr=null,this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.query_error=""},this.updateQueryError=e=>{this.sending=!1,this.query_error=e},this.routerStore=e}}Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_addr",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_access_mana_node_id",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_consensus_mana_node_id",void 0),Cn([ye.observable,Dn("design:type",Boolean)],_n.prototype,"sending",void 0),Cn([ye.observable,Dn("design:type",class{})],_n.prototype,"sendResult",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"query_error",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendResult",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSend",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendAccessManaNodeID",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendConsensusManaNodeID",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSending",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"reset",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateQueryError",void 0);var Nn=_n,Tn=n(35),Pn=n.n(Tn),Mn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Ln=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},An=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class Bn{}const zn="#b9b7bd",Hn="#6c71c4",Fn="#393e46",Vn="#fad02c",Zn="#cb4b16",Un="#b58900",Wn="#586e75",Jn="#e105f5",Gn="#51e05d",qn="#859900";class Xn{constructor(e){this.vertices=new ye.ObservableMap,this.verticesLimit=1500,this.finalized_count=0,this.tips_count=0,this.verticesIncomingOrder=[],this.draw=!1,this.selected_via_click=!1,this.selected_origin_color=0,this.search="",this.paused=!1,this.fetchHistory=()=>An(this,void 0,void 0,(function*(){try{let e=yield fetch("/api/visualizer/history");(yield e.json()).vertices.forEach(e=>{this.addVertex(e)})}catch(e){console.log("Fail to fetch history in visualizer",e)}})),this.updateSearch=e=>{this.search=e.trim()},this.searchAndHighlight=()=>{if(this.clearSelected(),!this.search)return;let e=this.vertices.keys(),t=null;for(const n of e)if(n.indexOf(this.search)>=0){t=n;break}t&&this.updateSelected(this.vertices.get(t),!1)},this.pauseResume=()=>{if(this.paused)return this.renderer.resume(),void(this.paused=!1);this.renderer.pause(),this.paused=!0},this.updateVerticesLimit=e=>{this.verticesLimit=e},this.updateTxStatus=e=>{let t=this.vertices.get(e.id);t&&(t.is_tx_accepted=e.is_tx_accepted,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t))},this.addVertex=e=>{let t=this.vertices.get(e.id);t?!t.is_blk_confirmed&&e.is_blk_confirmed&&this.finalized_count++:(e.is_blk_confirmed&&this.finalized_count++,this.verticesIncomingOrder.push(e.id),this.checkLimit()),this.vertices.set(e.id,e),this.draw&&this.drawVertex(e)},this.addTipInfo=e=>An(this,void 0,void 0,(function*(){let t=this.vertices.get(e.id);if(!t){t=new Bn,t.id=e.id;let n=yield fetch("/api/block/"+e.id);if(200===n.status){let e=yield n.json();t.strongParents=e.strongParents,t.weakParents=e.weakParents,t.shallowLikedParents=e.shallowLikedParents,t.is_blk_confirmed=e.acceptance}this.verticesIncomingOrder.push(t.id)}this.tips_count+=e.is_tip?1:t.is_tip?-1:0,t.is_tip=e.is_tip,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t)})),this.checkLimit=()=>{for(;this.verticesIncomingOrder.length>this.verticesLimit;){let e=this.verticesIncomingOrder.shift(),t=this.vertices.get(e);this.selected&&e===this.selected.id&&this.clearSelected(),this.draw&&this.graph.removeNode(e),t&&(t.is_blk_confirmed&&this.finalized_count--,t.is_tip&&this.tips_count--,this.vertices.delete(e))}},this.drawVertex=e=>{let t=this.graph.getNode(e.id);if(t){this.graphics.getNodeUI(e.id).color=$n(this.colorForVertexState(e))}else t=this.graph.addNode(e.id,e);e.strongParents&&this.linkParents(e,t,e.strongParents),e.weakParents&&this.linkParents(e,t,e.weakParents),e.shallowLikedParents&&this.linkParents(e,t,e.shallowLikedParents)},this.linkParents=(e,t,n)=>{n.forEach(n=>{if(n&&(!t.links||!t.links.some(e=>e.fromId===n))){this.graph.getNode(n)?this.graph.addLink(n,e.id):console.log("link not added, parent doesn't exist",n)}})},this.colorForVertexState=e=>e?e.is_blk_confirmed?e.is_tx?e.is_tx_accepted?Vn:Fn:Hn:e.is_tip?Zn:e.is_tx?Fn:zn:Un,this.start=()=>{this.draw=!0,this.graph=Pn.a.Graph.graph();let e=Pn.a.Graph.View.webglGraphics();const t=Pn.a.Graph.Layout.forceDirected(this.graph,{springLength:10,springCoeff:1e-4,stableThreshold:.15,gravity:-2,dragCoeff:.02,timeStep:20,theta:.8});e.node(e=>e.data?Pn.a.Graph.View.webglSquare(20,this.colorForVertexState(e.data)):Pn.a.Graph.View.webglSquare(10,this.colorForVertexState(e.data))),e.link(()=>Pn.a.Graph.View.webglLine(Wn));let n=document.getElementById("visualizer");this.renderer=Pn.a.Graph.View.renderer(this.graph,{container:n,graphics:e,layout:t});let r=Pn.a.Graph.webglInputEvents(e,this.graph);r.mouseEnter(e=>{this.clearSelected(!0),this.updateSelected(e.data)}).mouseLeave(e=>{this.clearSelected(!1)}),r.click(e=>{this.clearSelected(!0),this.updateSelected(e.data,!0)}),this.graphics=e,this.renderer.run(),this.verticesIncomingOrder.forEach(e=>{let t=this.vertices.get(e);t&&this.drawVertex(t)})},this.stop=()=>{this.draw=!1,this.renderer.dispose(),this.graph=null,this.paused=!1,this.selected=null},this.updateSelected=(e,t)=>{if(!e)return;this.selected=e,this.selected_via_click=!!t;let n=this.graphics.getNodeUI(e.id);this.selected_origin_color=n.color,n.color=$n(qn),n.size=30;let r=this.graph.getNode(e.id);Kn(this.graph,r,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Gn)},[]),Kn(this.graph,r,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Jn)},[])},this.resetLinks=()=>{this.graph.forEachLink((function(e){this.graphics.getLinkUI(e.id).color=$n(Wn)}))},this.clearSelected=e=>{if(!this.selected||this.selected_via_click&&!e)return;let t=this.graph.getNode(this.selected.id);if(!t)return void this.resetLinks();let n=this.graphics.getNodeUI(this.selected.id);n.color=this.selected_origin_color,n.size=20;Kn(this.graph,t,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),Kn(this.graph,t,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),this.selected=null,this.selected_via_click=!1},this.routerStore=e,ve(fe.Vertex,this.addVertex),ve(fe.TipInfo,this.addTipInfo),ve(fe.TXAccepted,this.updateTxStatus)}}Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"vertices",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"verticesLimit",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"finalized_count",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"tips_count",void 0),Mn([ye.observable,Ln("design:type",Bn)],Xn.prototype,"selected",void 0),Mn([ye.observable,Ln("design:type",String)],Xn.prototype,"search",void 0),Mn([ye.observable,Ln("design:type",Boolean)],Xn.prototype,"paused",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateSearch",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"searchAndHighlight",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"pauseResume",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateVerticesLimit",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateTxStatus",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"addVertex",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"addTipInfo",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"checkLimit",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateSelected",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"clearSelected",void 0);var Qn=Xn;function Kn(e,t,n,r,a=!1,s=[]){s.push(t);let l=0;for(;s.length>l;){const t=s[l++];if(n(t))return!0;if(!t.links)return;for(const n of t.links)r||n.toId!==t.id||s.includes(e.getNode(n.fromId))?r&&n.fromId===t.id&&!s.includes(e.getNode(n.toId))&&(a&&a(n),s.push(e.getNode(n.toId))):(a&&a(n),s.push(e.getNode(n.fromId)))}}function $n(e){let t=10414335;if("number"==typeof e)return e;if("string"==typeof e&&e)if(4===e.length&&(e=e.replace(/([^#])/g,"$1$1")),9===e.length)t=parseInt(e.substr(1),16);else{if(7!==e.length)throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;t=parseInt(e.substr(1),16)<<8|255}return t}var Yn=n(286),er=n.n(Yn),tr=n(287),nr=n.n(tr),rr=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},ar=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class sr{constructor(e,t,n){this.nodeID=e,this.time=t,this.txID=n}}class lr extends sr{constructor(e,t,n,r){super(e,t,n),this.amount=r}}class or extends sr{constructor(e,t,n,r){super(e,t,n),this.amount=r}}const ir=r.createElement("tr",null,r.createElement("td",{key:"emptyRow",colSpan:4},"There are no nodes to view with the current search parameters.")),cr=r.createElement(xt.a,{key:"emptyItem"},"There are no events to view with the current search parameters.");class pr{constructor(){this.manaValues=[],this.prevManaValues=[0,0],this.accessNetworkRichest=[],this.totalAccessNetwork=0,this.accessActiveRichest=[],this.totalAccessActive=0,this.consensusNetworkRichest=[],this.totalConsensusNetwork=0,this.consensusActiveRichest=[],this.totalConsensusActive=0,this.searchNode="",this.searchTxID="",this.accessEvents=[],this.consensusEvents=[],this.initAccessEvents=[],this.initConsensusEvents=[],this.lastRemovedAccessEventTime=null,this.lastRemovedConsensusEventTime=null,this.lastInitRemovedAccessEventTime=null,this.lastInitRemovedConsensusEventTime=null,this.eventsUpdated=!1,this.displayedAccessEvents=[],this.displayedConsensusEvents=[],this.nodeNotSyncedListItem=r.createElement(xt.a,null,"Wait for node to be synced to display mana events."),this.addNewManaValue=e=>{this.ownID=this.ownID?this.ownID:e.nodeID,100===this.manaValues.length&&this.manaValues.shift();let t=[new Date(1e3*e.time),e.access,e.consensus];this.manaValues.length>0&&(this.prevManaValues=[this.manaValues[this.manaValues.length-1][1],this.manaValues[this.manaValues.length-1][2]]),this.manaValues.push(t)},this.updateNetworkRichest=e=>{switch(e.manaType){case"Access":this.totalAccessNetwork=e.totalMana,this.accessNetworkRichest=e.nodes;break;case"Consensus":this.totalConsensusNetwork=e.totalMana,this.consensusNetworkRichest=e.nodes}},this.updateActiveRichest=e=>{switch(e.manaType){case"Access":this.totalAccessActive=e.totalMana,this.accessActiveRichest=e.nodes;break;case"Consensus":this.totalConsensusActive=e.totalMana,this.consensusActiveRichest=e.nodes}},this.updateAllowedPledgeIDs=e=>{this.allowedPledgeIDs=e},this.addNewInitPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.initAccessEvents,t.length>=100){let e=t.shift();this.lastInitRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.accessEvents,t.length>=100){let e=t.shift();this.lastRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.addNewInitRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.initDone=()=>{this.accessEvents=this.initAccessEvents,this.lastRemovedAccessEventTime=this.lastInitRemovedAccessEventTime,this.consensusEvents=this.initConsensusEvents,this.lastRemovedConsensusEventTime=this.lastInitRemovedConsensusEventTime,this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],setInterval(()=>{this.eventsUpdated&&(this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],this.eventsUpdated=!1)},500)},this.nodeList=(e,t)=>{if(null===e||null==e)return[];let n=[],a=(e,a)=>{n.push(r.createElement("tr",{key:e.shortNodeID,style:{backgroundColor:e.shortNodeID===this.ownID?"#e8ffff":"white"}},r.createElement("td",{style:{borderTopLeftRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomLeftRadius:e.shortNodeID===this.ownID?"10px":"0"}}," ",a+1," "),r.createElement("td",null,e.shortNodeID),r.createElement("td",null,kt(e.mana)),r.createElement("td",{style:{borderTopRightRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomRightRadius:e.shortNodeID===this.ownID?"10px":"0"}},(e.mana/t*100).toFixed(2),"%")))};return e.forEach((e,t)=>{this.passesNodeFilter(e.shortNodeID)&&a(e,t)}),n},this.computeEventList=e=>{let t=[];if(t.push(r.createElement(xt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"}),r.createElement(u.a,null,"NodeID"),r.createElement(u.a,null,"Tx ID"),r.createElement(u.a,{xs:5},"Time")))),null==e)return t;return e.reverse().forEach((e,n)=>{this.passesNodeFilter(e.nodeID)&&this.passesTxFilter(e.txID)&&((e,n)=>{if(e instanceof lr){let a=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Pledged"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana: ",r.createElement("strong",null,"+",kt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"To NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Pledge: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(xt.a,{style:{backgroundColor:"#41aea9",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"},r.createElement("img",{src:er.a,alt:"Plus",width:"20px",className:"d-block mx-auto"})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}else if(e instanceof or){let a=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Revoked"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana 1: ",r.createElement("strong",null,"-",kt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"From NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Revoke: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(xt.a,{style:{backgroundColor:"#213e3b",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1},r.createElement("img",{src:nr.a,alt:"Minus",width:"20px",className:""})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}})(e,n)}),t},this.passesNodeFilter=e=>0===this.searchNode.trim().length||!!e.toLowerCase().includes(this.searchNode.toLowerCase()),this.passesTxFilter=e=>0===this.searchTxID.trim().length||!!e.toLowerCase().includes(this.searchTxID.toLowerCase()),this.manaValues=[],ve(fe.Mana,this.addNewManaValue),ve(fe.ManaMapOverall,this.updateNetworkRichest),ve(fe.ManaMapOnline,this.updateActiveRichest)}updateNodeSearch(e){this.searchNode=e.trim()}updateTxSearch(e){this.searchTxID=e.trim()}get networkRichestFeedAccess(){let e=this.nodeList(this.accessNetworkRichest,this.totalAccessNetwork);return 0===e.length?[ir]:e}get networkRichestFeedConsensus(){let e=this.nodeList(this.consensusNetworkRichest,this.totalConsensusNetwork);return 0===e.length?[ir]:e}get activeRichestFeedAccess(){let e=this.nodeList(this.accessActiveRichest,this.totalAccessActive);return 0===e.length?[ir]:e}get activeRichestFeedConsensus(){let e=this.nodeList(this.consensusActiveRichest,this.totalConsensusActive);return 0===e.length?[ir]:e}get accessHistogramInput(){if(void 0===this.accessNetworkRichest||null===this.accessNetworkRichest)return[["",0]];let e=new Array;for(let t=0;te.shortNodeID===this.ownID;let n=this.accessNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.accessNetworkRichest.length-(n+1))/this.accessNetworkRichest.length*100}}return e}get consensusPercentile(){let e=0;if(void 0!==this.consensusNetworkRichest&&null!==this.consensusNetworkRichest){const t=e=>e.shortNodeID===this.ownID;let n=this.consensusNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.consensusNetworkRichest.length-(n+1))/this.consensusNetworkRichest.length*100}}return e}get accessEventList(){let e=this.computeEventList(this.displayedAccessEvents);return 1===e.length&&e.push(cr),e}get consensusEventList(){let e=this.computeEventList(this.displayedConsensusEvents);return 1===e.length&&e.push(cr),e}}rr([ye.observable,ar("design:type",Array)],pr.prototype,"manaValues",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"prevManaValues",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"accessNetworkRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalAccessNetwork",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"accessActiveRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalAccessActive",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"consensusNetworkRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalConsensusNetwork",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"consensusActiveRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalConsensusActive",void 0),rr([ye.observable,ar("design:type",Object)],pr.prototype,"searchNode",void 0),rr([ye.observable,ar("design:type",Object)],pr.prototype,"searchTxID",void 0),rr([ye.observable,ar("design:type",class{})],pr.prototype,"allowedPledgeIDs",void 0),rr([ye.observable,ar("design:type",Date)],pr.prototype,"lastRemovedAccessEventTime",void 0),rr([ye.observable,ar("design:type",Date)],pr.prototype,"lastRemovedConsensusEventTime",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"displayedAccessEvents",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"displayedConsensusEvents",void 0),rr([ye.action,ar("design:type",Function),ar("design:paramtypes",[String]),ar("design:returntype",void 0)],pr.prototype,"updateNodeSearch",null),rr([ye.action,ar("design:type",Function),ar("design:paramtypes",[String]),ar("design:returntype",void 0)],pr.prototype,"updateTxSearch",null),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewManaValue",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateNetworkRichest",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateActiveRichest",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateAllowedPledgeIDs",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewInitPledge",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewPledge",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewInitRevoke",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewRevoke",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"initDone",void 0),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"networkRichestFeedAccess",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"networkRichestFeedConsensus",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"activeRichestFeedAccess",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"activeRichestFeedConsensus",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessHistogramInput",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusHistogramInput",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessPercentile",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusPercentile",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessEventList",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusEventList",null);var dr=pr,ur=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},mr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hr=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class fr{constructor(){this.liveFeed=[],this.addLiveFeed=e=>hr(this,void 0,void 0,(function*(){-1===this.liveFeed.findIndex(t=>t.id==e.id)&&(this.liveFeed.length>=100&&this.liveFeed.shift(),this.liveFeed.push(e))})),ve(fe.SlotInfo,this.addLiveFeed)}get slotLiveFeed(){let e=[];for(let t=this.liveFeed.length-1;t>=0;t--){let n=this.liveFeed[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,n.index),r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/slot/commitment/"+n.id},n.id))))}return e}}ur([ye.observable,mr("design:type",Array)],fr.prototype,"liveFeed",void 0),ur([ye.action,mr("design:type",Object)],fr.prototype,"addLiveFeed",void 0),ur([ye.computed,mr("design:type",Object),mr("design:paramtypes",[])],fr.prototype,"slotLiveFeed",null);var br=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},gr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class yr{constructor(e,t){this.updateConflictSets=e=>{this.conflictSets.set(e.conflictSetID,e)},this.updateConflicts=e=>{this.conflicts.set(e.conflictID,e)},this.routerStore=e,this.nodeStore=t,this.conflictSets=new Map,this.conflicts=new Map,ve(fe.ConflictSet,this.updateConflictSets),ve(fe.Conflict,this.updateConflicts)}get conflictsLiveFeed(){let e=Array.from(this.conflictSets.values());e.sort((e,t)=>t.arrivalTime-e.arrivalTime||e.conflictSetID.localeCompare(t.conflictSetID));let t=[];for(let n of e){if(t.push(r.createElement("tr",{key:n.conflictSetID,onClick:()=>n.shown=!n.shown,style:{cursor:"pointer"}},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/output/"+n.conflictSetID},n.conflictSetID)),r.createElement("td",null,new Date(1e3*n.arrivalTime).toLocaleString()),r.createElement("td",null,n.resolved?"Yes":"No"),r.createElement("td",null,n.timeToResolve/1e6))),!n.shown)continue;let e=Array.from(this.conflicts.values());e.sort((e,t)=>e.issuingTime-t.issuingTime||e.conflictID.localeCompare(t.conflictID));let a=[];for(let t of e)for(let e of t.conflictSetIDs)e===n.conflictSetID&&a.push(r.createElement("tr",{key:t.conflictID,className:t.confirmationState>Qt.Accepted?"table-success":""},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/branch/"+t.conflictID},t.conflictID)),r.createElement("td",null,Kt(t.confirmationState)),r.createElement("td",null," ",new Date(1e3*t.issuingTime).toLocaleString()),r.createElement("td",null,t.issuerNodeID)));t.push(r.createElement("tr",{key:n.conflictSetID+"_branches"},r.createElement("td",{colSpan:4},r.createElement(te.a,{size:"sm"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BranchID"),r.createElement("th",null,"ConfirmationState"),r.createElement("th",null,"IssuingTime"),r.createElement("th",null,"Issuer NodeID"))),r.createElement("tbody",null,a)))))}return t}}br([ye.observable,gr("design:type",Map)],yr.prototype,"conflictSets",void 0),br([ye.observable,gr("design:type",Map)],yr.prototype,"conflicts",void 0),br([ye.action,gr("design:type",Object)],yr.prototype,"updateConflictSets",void 0),br([ye.action,gr("design:type",Object)],yr.prototype,"updateConflicts",void 0),br([ye.computed,gr("design:type",Object),gr("design:paramtypes",[])],yr.prototype,"conflictsLiveFeed",null);var Er=yr;const vr=new pn.RouterStore,Ir=new wn,kr={routerStore:vr,nodeStore:Ir,explorerStore:new Ke(vr),conflictsStore:new Er(vr,Ir),faucetStore:new Nn(vr),visualizerStore:new Qn(vr),manaStore:new dr,slotStore:new fr},xr=Object(l.a)(),Sr=Object(pn.syncHistoryWithStore)(xr,vr);a.render(r.createElement(s.a,Object.assign({},kr),r.createElement(be.e,{history:Sr},r.createElement(cn,{history:Sr}))),document.getElementById("root"))}},[[434,1,2]]]); \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.991aa07a823b10139416.js.map b/components/dashboard/frontend/build/app.991aa07a823b10139416.js.map deleted file mode 100644 index 88dc0f024..000000000 --- a/components/dashboard/frontend/build/app.991aa07a823b10139416.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///./assets/plus.svg","webpack:///./assets/minus.svg","webpack:///../node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/components/Uptime.tsx","webpack:///./app/components/Version.tsx","webpack:///./app/misc/Chart.ts","webpack:///./app/components/BPSChart.tsx","webpack:///./app/components/TipsChart.tsx","webpack:///./app/components/MemChart.tsx","webpack:///./app/components/ComponentCounterChart.tsx","webpack:///./app/components/TangleTime.tsx","webpack:///./app/components/Bootstrapped.tsx","webpack:///./app/components/Dashboard.tsx","webpack:///./app/components/ExplorerSearchbar.tsx","webpack:///./app/components/ExplorerLiveFeed.tsx","webpack:///./app/components/ExplorerTransactionSearchbar.tsx","webpack:///./app/components/ExplorerOutputSearchbar.tsx","webpack:///./app/components/ExplorerConflictSearchbar.tsx","webpack:///./app/components/Explorer.tsx","webpack:///./app/components/NavExplorerSearchbar.tsx","webpack:///./app/misc/WS.ts","webpack:///./app/misc/Payload.ts","webpack:///./app/utils/condition.tsx","webpack:///./app/utils/feature.tsx","webpack:///./app/utils/output.tsx","webpack:///./app/components/NativeToken.tsx","webpack:///./app/components/Condition.tsx","webpack:///./app/components/Feature.tsx","webpack:///./app/components/BasicOutput.tsx","webpack:///./app/components/AliasOutput.tsx","webpack:///./app/components/FoundryOutput.tsx","webpack:///./app/components/NFTOutput.tsx","webpack:///./app/stores/ExplorerStore.tsx","webpack:///./app/components/BasicPayload.tsx","webpack:///./app/utils/unlock_block.ts","webpack:///./app/components/Ed25519Signature.tsx","webpack:///./app/components/UnlockBlock.tsx","webpack:///./app/components/Transaction.tsx","webpack:///./app/components/TransactionPayload.tsx","webpack:///./app/utils/conflict.ts","webpack:///./app/components/FaucetPayload.tsx","webpack:///./app/components/TaggedDataPayload.tsx","webpack:///./app/components/ExplorerBlockQueryResult.tsx","webpack:///./app/utils/index.ts","webpack:///./app/components/ExplorerAddressResult.tsx","webpack:///./app/components/Explorer404.tsx","webpack:///./app/components/Neighbor.tsx","webpack:///./app/components/Neighbors.tsx","webpack:///./app/components/Visualizer.tsx","webpack:///./app/components/Tips.tsx","webpack:///./app/components/ExplorerTransaction.tsx","webpack:///./app/components/ExplorerTransactionMetadata.tsx","webpack:///./app/components/ExplorerTransactionAttachments.tsx","webpack:///./app/components/ExplorerTransactionQueryResult.tsx","webpack:///./app/utils/confirmation_state.ts","webpack:///./app/components/ExplorerOutputQueryResult.tsx","webpack:///./app/components/ExplorerConflictQueryResult.tsx","webpack:///./app/components/SlotLiveFeed.tsx","webpack:///./app/components/ExplorerSlotQueryResult.tsx","webpack:///./app/components/Root.tsx","webpack:///./app/App.tsx","webpack:///./app/stores/NodeStore.ts","webpack:///./app/stores/FaucetStore.ts","webpack:///./app/stores/VisualizerStore.ts","webpack:///./app/stores/ManaStore.tsx","webpack:///./app/stores/SlotStore.tsx","webpack:///./app/stores/ConflictsStore.tsx","webpack:///./main.tsx"],"names":["module","exports","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","this","props","nodeStore","uptime","status","version","defaultChartOptions","elements","line","tension","animation","duration","hover","animationDuration","responsiveAnimationDuration","lineChartOptions","assign","scales","xAxes","ticks","autoSkip","maxTicksLimit","fontSize","minRotation","maxRotation","gridLines","display","yAxes","callback","value","index","values","Math","abs","beginAtZero","tooltips","callbacks","label","tooltipItem","data","datasets","datasetIndex","Card","Body","Title","last_mps_metric","mps","height","mpsSeries","options","last_tips_metric","totaltips","tipsSeries","showXLabels","prettysize","mem","heap_alloc","num_gc","last_pause_gc","heap_objects","heap_sys","heap_idle","heap_released","memSeries","style","flexDirection","last_component_counter_metric","store","last_rate_setter_metric","estimate","componentSeries","tangleTime","synced","className","to","acceptedBlockID","confirmedBlockID","confirmedSlot","committedSlot","dateformat","Date","ATT","CTT","RATT","RCTT","bootstrapped","Container","Row","Col","ListGroup","variant","Item","ComponentCounterChart","updateSearch","explorerStore","target","executeSearch","key","searchAny","search","searching","InputGroup","FormControl","placeholder","onChange","onKeyUp","disabled","blksLiveFeed","xs","Table","txID","routerStore","push","outputID","conflictID","href","Form","inline","as","type","WSMsgType","handlers","registerHandler","blkTypeID","handler","unregisterHandler","PayloadType","ConditionType","FeatureType","OutputType","Output","getPayloadType","p","TaggedData","Transaction","Faucet","token","amount","unlock","address","pubKeyHash","unixTime","returnAddress","conditionToComponent","cond","Address","StateControllerAddress","GovernorAddress","StorageDepositReturn","Expiration","Timelock","feature","tag","featureToComponent","feat","Sender","Issuer","Metadata","Tag","hex","output","nativeTokens","n","_","unlockConditions","c","features","f","transactionID","outputIndex","wordBreak","aliasId","stateIndex","stateMetadata","foundryCounter","serialNumber","tokenScheme","nftId","outputToComponent","Basic","Alias","Foundry","NFT","GenesisBlockID","SlotInfo","QueryError","latest_blocks","blk","addr","tx","txMetadata","txAttachments","outputMetadata","outputConsumers","pendingMana","conflict","conflictChildren","conflictConflicts","conflictVoters","tips","slotInfo","query_loading","query_err","search_result","updateSearching","res","fetch","result","json","updateSearchResult","err","updateQueryError","resetSearch","block","searchBlock","updateQueryLoading","fetchJson","updateBlock","searchAddress","updateAddress","getSlotDetails","getSlotInfo","getTransaction","i","inputs","length","inputID","referencedOutputID","referencedOutputRes","genOutput","getTransactionAttachments","attachments","getTransactionMetadata","getOutput","getOutputMetadata","getOutputConsumers","getPendingMana","getConflict","getConflictChildren","getConflictConflicts","getConflictVoters","getTips","reset","conflictIDs","addedConflictIDs","subtractedConflictIDs","strongChildren","weakChildren","shallowLikeChildren","strongParents","weakParents","shallowLikedParents","payloadType","payload","loading","addLiveFeedBlock","findIndex","t","shift","Block","feed","payload_type","list","blkId","method","route","requestData","body","JSON","stringify","v","Uint8Array","Array","from","undefined","response","headers","ok","NotFound","BadRequest","content_title","content","SignatureType","signature","publicKey","signatureType","Ed25519","Badge","sigType","BLS","renderSignatureComponent","maxHeight","overflow","width","marginTop","marginBottom","paddingBottom","borderBottom","networkId","creationSlot","input","Provider","color","size","outputs","unlocks","txId","resolveBase58ConflictID","base58Conflict","MasterConflictInBase58","UndefinedConflictInBase58","LazyBookedConflictsConflictInBase58","InvalidConflictInBase58","accessManaPledgeID","consensusManaPledgeID","nonce","match","params","prevProps","prevState","objectivelyInvalid","marginRight","issuanceTimestamp","solidificationTimestamp","sequenceNumber","solid","scheduled","booked","orphaned","subjectivelyInvalid","acceptance","acceptanceTime","confirmation","confirmationTime","confirmationBySlot","confirmationBySlotTime","commitmentID","commitment","prevID","rootsID","cumulativeWeight","latestConfirmedSlot","rank","sequenceID","pastMarkerGap","isPastMarker","pastMarkers","issuerID","renderPayload","Spinner","displayManaUnit","mana","roundedMana","round","toString","toFixed","spent","unspent","available_balances","explorerOutputs","forEach","metadata","consumerCount","timestampCompareFn","a","b","txTimestamp","localeCompare","sort","Alert","ListGroupItem","textAlign","super","state","enabled","Button","getVariant","onClick","setState","base58","outputTypeToName","toLocaleString","timestamp","confirmedConsumer","outputType","neighborMetrics","neighbor_metrics","get","identity","last","current","connection_origin","pill","packets_written","packets_read","currentNetIO","rx","netIOSeries","neighborsEle","k","updateVerticesLimit","visualizerStore","pauseResumeVisualizer","pauseResume","searchAndHighlight","toggleBackgroundDataCollection","collecting","unregisterHandlers","registerHandlers","start","stop","vertices","finalized_count","selected","verticesLimit","tips_count","paused","Prepend","Text","OverlayTrigger","trigger","placement","overlay","Popover","Content","span","offset","background","substr","parent","zIndex","position","top","left","tipsList","bordered","confirmationState","blockIDs","ConfirmationState","resolveConfirmationState","Undefined","Rejected","Pending","Accepted","Confirmed","confirmationStateTime","consumers","val","valid","parents","childConflicts","conflicts","j","voters","s","slotLiveFeed","slotStore","blocks","transactions","createdOutputs","spentOutputs","connect","Navbar","expand","bg","Brand","Nav","Link","Collapse","websocketConnected","exact","path","component","children","renderDevTool","App","history","BPSMetric","Status","MemoryMetrics","scheduler","SchedulerMetric","TipsMetric","RateSetterMetric","collected","network_io","metric","ts","now","maxMetricsDataPoints","netIO","secondLast","chartSeriesOpts","series","labels","ComponentCounterMetric","fill","lineTension","backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","pointBorderColor","pointBackgroundColor","pointBorderWidth","pointHoverBackgroundColor","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","pointHoverRadius","name","bgColor","collected_mps_metrics","collected_rate_setter_metrics","collected_scheduler_metrics","collected_mem_metrics","collected_tips_metrics","collected_component_counter_metrics","updateStatus","BPSMetrics","addBPSMetric","updateLastBPSMetric","NeighborStats","updateNeighborMetrics","TipsMetrics","updateLastTipsMetric","ComponentCounterMetrics","updateLastComponentMetric","RateSetter","updateLastRateSetterMetric","updateCollecting","updateWebSocketConnected","connected","updated","neighbMetrics","addMetric","set","includes","delete","mpsMetric","tipsMetric","componentCounterMetric","setTimeout","onOpen","onClose","onError","loc","window","location","uri","protocol","host","ws","WebSocket","onopen","onclose","onerror","onmessage","parse","connectWebSocket","reconnect","stored","solidified","solidifier","booker","bufferSize","currentBufferSize","deficit","day","hour","minute","seconds","floor","str","heapSys","heapAlloc","heapIdle","heapReleased","FaucetStore","send_addr","send_access_mana_node_id","send_consensus_mana_node_id","sending","sendResult","query_error","sendReq","updateSending","updateSendResult","updateSend","updateSendAccessManaNodeID","access_mana","updateSendConsensusManaNodeID","consensus_mana","Vertex","COLOR","verticesIncomingOrder","draw","selected_via_click","selected_origin_color","fetchHistory","addVertex","console","log","trim","clearSelected","iter","found","indexOf","updateSelected","renderer","resume","pause","num","updateTxStatus","vert","existing","is_tx_accepted","drawVertex","is_blk_confirmed","checkLimit","addTipInfo","tipInfo","is_tip","deleteId","graph","removeNode","node","getNode","graphics","getNodeUI","parseColor","colorForVertexState","addNode","linkParents","links","some","link","fromId","addLink","is_tx","Graph","View","webglGraphics","layout","Layout","forceDirected","springLength","springCoeff","stableThreshold","gravity","dragCoeff","timeStep","theta","webglSquare","webglLine","ele","document","getElementById","container","events","webglInputEvents","mouseEnter","mouseLeave","click","run","dispose","viaClick","nodeUI","vertexSize","dfsIterator","getLinkUI","resetLinks","forEachLink","force_clear","TipInfo","TXAccepted","cb","up","cbLinks","seenNodes","pointer","toId","parsedColor","replace","parseInt","ManaEvent","nodeID","time","PledgeEvent","RevokeEvent","emptyRow","colSpan","emptyListItem","manaValues","prevManaValues","accessNetworkRichest","totalAccessNetwork","accessActiveRichest","totalAccessActive","consensusNetworkRichest","totalConsensusNetwork","consensusActiveRichest","totalConsensusActive","searchNode","searchTxID","accessEvents","consensusEvents","initAccessEvents","initConsensusEvents","lastRemovedAccessEventTime","lastRemovedConsensusEventTime","lastInitRemovedAccessEventTime","lastInitRemovedConsensusEventTime","eventsUpdated","displayedAccessEvents","displayedConsensusEvents","nodeNotSyncedListItem","addNewManaValue","manaBlk","ownID","newManaData","access","consensus","updateNetworkRichest","manaType","totalMana","nodes","updateActiveRichest","updateAllowedPledgeIDs","allowedPledgeIDs","addNewInitPledge","lastRemoved","newData","addNewPledge","addNewInitRevoke","addNewRevoke","initDone","setInterval","nodeList","leaderBoard","manaSum","pushToFeed","shortNodeID","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","passesNodeFilter","computeEventList","evArr","reverse","event","passesTxFilter","element","popover","ev","navigator","clipboard","writeText","toLocaleTimeString","src","alt","substring","pushToEventFeed","toLowerCase","Mana","ManaMapOverall","ManaMapOnline","histInput","log10","per","isOwnID","liveFeed","addLiveFeed","info","updateConflictSets","conflictSets","conflictSetID","updateConflicts","Map","ConflictSet","Conflict","conflictsArr","x","y","arrivalTime","shown","cursor","resolved","timeToResolve","branchesArr","issuingTime","branches","branch","conflictSetIDs","issuerNodeID","stores","browserHistory"],"mappings":"2EAAAA,EAAOC,QAAU,k6B,kBCAjBD,EAAOC,QAAU,0vB,oBCAjB,IAAIC,EAAM,CACT,OAAQ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L2c+PC9zdmc+\"","var map = {\n\t\"./af\": 107,\n\t\"./af.js\": 107,\n\t\"./ar\": 108,\n\t\"./ar-dz\": 109,\n\t\"./ar-dz.js\": 109,\n\t\"./ar-kw\": 110,\n\t\"./ar-kw.js\": 110,\n\t\"./ar-ly\": 111,\n\t\"./ar-ly.js\": 111,\n\t\"./ar-ma\": 112,\n\t\"./ar-ma.js\": 112,\n\t\"./ar-sa\": 113,\n\t\"./ar-sa.js\": 113,\n\t\"./ar-tn\": 114,\n\t\"./ar-tn.js\": 114,\n\t\"./ar.js\": 108,\n\t\"./az\": 115,\n\t\"./az.js\": 115,\n\t\"./be\": 116,\n\t\"./be.js\": 116,\n\t\"./bg\": 117,\n\t\"./bg.js\": 117,\n\t\"./bm\": 118,\n\t\"./bm.js\": 118,\n\t\"./bn\": 119,\n\t\"./bn-bd\": 120,\n\t\"./bn-bd.js\": 120,\n\t\"./bn.js\": 119,\n\t\"./bo\": 121,\n\t\"./bo.js\": 121,\n\t\"./br\": 122,\n\t\"./br.js\": 122,\n\t\"./bs\": 123,\n\t\"./bs.js\": 123,\n\t\"./ca\": 124,\n\t\"./ca.js\": 124,\n\t\"./cs\": 125,\n\t\"./cs.js\": 125,\n\t\"./cv\": 126,\n\t\"./cv.js\": 126,\n\t\"./cy\": 127,\n\t\"./cy.js\": 127,\n\t\"./da\": 128,\n\t\"./da.js\": 128,\n\t\"./de\": 129,\n\t\"./de-at\": 130,\n\t\"./de-at.js\": 130,\n\t\"./de-ch\": 131,\n\t\"./de-ch.js\": 131,\n\t\"./de.js\": 129,\n\t\"./dv\": 132,\n\t\"./dv.js\": 132,\n\t\"./el\": 133,\n\t\"./el.js\": 133,\n\t\"./en-au\": 134,\n\t\"./en-au.js\": 134,\n\t\"./en-ca\": 135,\n\t\"./en-ca.js\": 135,\n\t\"./en-gb\": 136,\n\t\"./en-gb.js\": 136,\n\t\"./en-ie\": 137,\n\t\"./en-ie.js\": 137,\n\t\"./en-il\": 138,\n\t\"./en-il.js\": 138,\n\t\"./en-in\": 139,\n\t\"./en-in.js\": 139,\n\t\"./en-nz\": 140,\n\t\"./en-nz.js\": 140,\n\t\"./en-sg\": 141,\n\t\"./en-sg.js\": 141,\n\t\"./eo\": 142,\n\t\"./eo.js\": 142,\n\t\"./es\": 143,\n\t\"./es-do\": 144,\n\t\"./es-do.js\": 144,\n\t\"./es-mx\": 145,\n\t\"./es-mx.js\": 145,\n\t\"./es-us\": 146,\n\t\"./es-us.js\": 146,\n\t\"./es.js\": 143,\n\t\"./et\": 147,\n\t\"./et.js\": 147,\n\t\"./eu\": 148,\n\t\"./eu.js\": 148,\n\t\"./fa\": 149,\n\t\"./fa.js\": 149,\n\t\"./fi\": 150,\n\t\"./fi.js\": 150,\n\t\"./fil\": 151,\n\t\"./fil.js\": 151,\n\t\"./fo\": 152,\n\t\"./fo.js\": 152,\n\t\"./fr\": 153,\n\t\"./fr-ca\": 154,\n\t\"./fr-ca.js\": 154,\n\t\"./fr-ch\": 155,\n\t\"./fr-ch.js\": 155,\n\t\"./fr.js\": 153,\n\t\"./fy\": 156,\n\t\"./fy.js\": 156,\n\t\"./ga\": 157,\n\t\"./ga.js\": 157,\n\t\"./gd\": 158,\n\t\"./gd.js\": 158,\n\t\"./gl\": 159,\n\t\"./gl.js\": 159,\n\t\"./gom-deva\": 160,\n\t\"./gom-deva.js\": 160,\n\t\"./gom-latn\": 161,\n\t\"./gom-latn.js\": 161,\n\t\"./gu\": 162,\n\t\"./gu.js\": 162,\n\t\"./he\": 163,\n\t\"./he.js\": 163,\n\t\"./hi\": 164,\n\t\"./hi.js\": 164,\n\t\"./hr\": 165,\n\t\"./hr.js\": 165,\n\t\"./hu\": 166,\n\t\"./hu.js\": 166,\n\t\"./hy-am\": 167,\n\t\"./hy-am.js\": 167,\n\t\"./id\": 168,\n\t\"./id.js\": 168,\n\t\"./is\": 169,\n\t\"./is.js\": 169,\n\t\"./it\": 170,\n\t\"./it-ch\": 171,\n\t\"./it-ch.js\": 171,\n\t\"./it.js\": 170,\n\t\"./ja\": 172,\n\t\"./ja.js\": 172,\n\t\"./jv\": 173,\n\t\"./jv.js\": 173,\n\t\"./ka\": 174,\n\t\"./ka.js\": 174,\n\t\"./kk\": 175,\n\t\"./kk.js\": 175,\n\t\"./km\": 176,\n\t\"./km.js\": 176,\n\t\"./kn\": 177,\n\t\"./kn.js\": 177,\n\t\"./ko\": 178,\n\t\"./ko.js\": 178,\n\t\"./ku\": 179,\n\t\"./ku.js\": 179,\n\t\"./ky\": 180,\n\t\"./ky.js\": 180,\n\t\"./lb\": 181,\n\t\"./lb.js\": 181,\n\t\"./lo\": 182,\n\t\"./lo.js\": 182,\n\t\"./lt\": 183,\n\t\"./lt.js\": 183,\n\t\"./lv\": 184,\n\t\"./lv.js\": 184,\n\t\"./me\": 185,\n\t\"./me.js\": 185,\n\t\"./mi\": 186,\n\t\"./mi.js\": 186,\n\t\"./mk\": 187,\n\t\"./mk.js\": 187,\n\t\"./ml\": 188,\n\t\"./ml.js\": 188,\n\t\"./mn\": 189,\n\t\"./mn.js\": 189,\n\t\"./mr\": 190,\n\t\"./mr.js\": 190,\n\t\"./ms\": 191,\n\t\"./ms-my\": 192,\n\t\"./ms-my.js\": 192,\n\t\"./ms.js\": 191,\n\t\"./mt\": 193,\n\t\"./mt.js\": 193,\n\t\"./my\": 194,\n\t\"./my.js\": 194,\n\t\"./nb\": 195,\n\t\"./nb.js\": 195,\n\t\"./ne\": 196,\n\t\"./ne.js\": 196,\n\t\"./nl\": 197,\n\t\"./nl-be\": 198,\n\t\"./nl-be.js\": 198,\n\t\"./nl.js\": 197,\n\t\"./nn\": 199,\n\t\"./nn.js\": 199,\n\t\"./oc-lnc\": 200,\n\t\"./oc-lnc.js\": 200,\n\t\"./pa-in\": 201,\n\t\"./pa-in.js\": 201,\n\t\"./pl\": 202,\n\t\"./pl.js\": 202,\n\t\"./pt\": 203,\n\t\"./pt-br\": 204,\n\t\"./pt-br.js\": 204,\n\t\"./pt.js\": 203,\n\t\"./ro\": 205,\n\t\"./ro.js\": 205,\n\t\"./ru\": 206,\n\t\"./ru.js\": 206,\n\t\"./sd\": 207,\n\t\"./sd.js\": 207,\n\t\"./se\": 208,\n\t\"./se.js\": 208,\n\t\"./si\": 209,\n\t\"./si.js\": 209,\n\t\"./sk\": 210,\n\t\"./sk.js\": 210,\n\t\"./sl\": 211,\n\t\"./sl.js\": 211,\n\t\"./sq\": 212,\n\t\"./sq.js\": 212,\n\t\"./sr\": 213,\n\t\"./sr-cyrl\": 214,\n\t\"./sr-cyrl.js\": 214,\n\t\"./sr.js\": 213,\n\t\"./ss\": 215,\n\t\"./ss.js\": 215,\n\t\"./sv\": 216,\n\t\"./sv.js\": 216,\n\t\"./sw\": 217,\n\t\"./sw.js\": 217,\n\t\"./ta\": 218,\n\t\"./ta.js\": 218,\n\t\"./te\": 219,\n\t\"./te.js\": 219,\n\t\"./tet\": 220,\n\t\"./tet.js\": 220,\n\t\"./tg\": 221,\n\t\"./tg.js\": 221,\n\t\"./th\": 222,\n\t\"./th.js\": 222,\n\t\"./tk\": 223,\n\t\"./tk.js\": 223,\n\t\"./tl-ph\": 224,\n\t\"./tl-ph.js\": 224,\n\t\"./tlh\": 225,\n\t\"./tlh.js\": 225,\n\t\"./tr\": 226,\n\t\"./tr.js\": 226,\n\t\"./tzl\": 227,\n\t\"./tzl.js\": 227,\n\t\"./tzm\": 228,\n\t\"./tzm-latn\": 229,\n\t\"./tzm-latn.js\": 229,\n\t\"./tzm.js\": 228,\n\t\"./ug-cn\": 230,\n\t\"./ug-cn.js\": 230,\n\t\"./uk\": 231,\n\t\"./uk.js\": 231,\n\t\"./ur\": 232,\n\t\"./ur.js\": 232,\n\t\"./uz\": 233,\n\t\"./uz-latn\": 234,\n\t\"./uz-latn.js\": 234,\n\t\"./uz.js\": 233,\n\t\"./vi\": 235,\n\t\"./vi.js\": 235,\n\t\"./x-pseudo\": 236,\n\t\"./x-pseudo.js\": 236,\n\t\"./yo\": 237,\n\t\"./yo.js\": 237,\n\t\"./zh-cn\": 238,\n\t\"./zh-cn.js\": 238,\n\t\"./zh-hk\": 239,\n\t\"./zh-hk.js\": 239,\n\t\"./zh-mo\": 240,\n\t\"./zh-mo.js\": 240,\n\t\"./zh-tw\": 241,\n\t\"./zh-tw.js\": 241\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 298;","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Uptime extends React.Component {\r\n render() {\r\n return (\r\n \r\n Uptime: {this.props.nodeStore.uptime}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Version extends React.Component {\r\n render() {\r\n return (\r\n \r\n Version: {this.props.nodeStore.status.version}\r\n \r\n );\r\n }\r\n}\r\n","\r\n// includes chart options to increase performance, by disabling chart animations\r\nexport var defaultChartOptions = {\r\n elements: {\r\n line: {\r\n tension: 0\r\n }\r\n },\r\n animation: {\r\n duration: 0\r\n },\r\n hover: {\r\n animationDuration: 0\r\n },\r\n responsiveAnimationDuration: 0\r\n};","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class BPSChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Blocks Per Second\r\n \r\n BPS: {this.props.nodeStore.last_mps_metric.mps}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class TipsChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Current Tips\r\n \r\n Tips: {this.props.nodeStore.last_tips_metric.totaltips}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport * as prettysize from 'prettysize';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class MemChart extends React.Component {\r\n render() {\r\n let mem = this.props.nodeStore.status.mem;\r\n return (\r\n \r\n \r\n \r\n Memory Usage{' '}\r\n {prettysize(mem.heap_alloc)}\r\n \r\n \r\n GC Cycles: {mem.num_gc} (Last Cycle: {mem.last_pause_gc / 1000000}ms) - {' '}\r\n Heap: {' '}\r\n [Obj: {mem.heap_objects}, In-Use: {prettysize(mem.heap_sys-mem.heap_idle)},\r\n Retained: {prettysize(mem.heap_idle - mem.heap_released)}]\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Card from \"react-bootstrap/Card\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport {Line} from \"react-chartjs-2\";\nimport {defaultChartOptions} from \"../misc/Chart\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\nconst lineChartOptions = Object.assign({\n scales: {\n xAxes: [{\n ticks: {\n autoSkip: true,\n maxTicksLimit: 8,\n fontSize: 8,\n minRotation: 0,\n maxRotation: 0,\n },\n gridLines: {\n display: false\n }\n }],\n yAxes: [{\n gridLines: {\n display: false\n },\n ticks: {\n callback: function (value, index, values) {\n return Math.abs(value);\n },\n fontSize: 10,\n maxTicksLimit: 4,\n beginAtZero: true,\n },\n }],\n },\n tooltips: {\n callbacks: {\n label: function (tooltipItem, data) {\n let label = data.datasets[tooltipItem.datasetIndex].label;\n return `${label} ${Math.abs(tooltipItem.value)}`;\n }\n }\n }\n}, defaultChartOptions);\n\n@inject(\"nodeStore\")\n@observer\nexport default class StoreChart extends React.Component {\n render() {\n const infoStyle = {\n display: \"flex\",\n flexDirection: \"column\"\n };\n return (\n \n \n Component Counter Blocks Per Second\n
\n \n BPS: {this.props.nodeStore.last_component_counter_metric.store}.\n \n \n Rate Setter - Estimate: {this.props.nodeStore.last_rate_setter_metric.estimate}\n \n
\n\n \n
\n
\n );\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport Card from \"react-bootstrap/Card\";\nimport {Link} from 'react-router-dom';\nimport {inject, observer} from \"mobx-react\";\nimport * as dateformat from 'dateformat';\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class TangleTime extends React.Component {\n render() {\n return (\n \n \n TangleTime\n Synced: {this.props.nodeStore.status.tangleTime.synced ? \"Yes\" : \"No\"}\n \n
\n
\n
\n
Last Accepted Block: \n {this.props.nodeStore.status.tangleTime.acceptedBlockID}\n
\n
\n
\n
Last Confirmed Block: \n {this.props.nodeStore.status.tangleTime.confirmedBlockID}\n
\n
\n
\n
Last Confirmed Slot:\n {this.props.nodeStore.status.tangleTime.confirmedSlot}\n
\n
\n
\n
Last Committed Slot:\n {this.props.nodeStore.status.tangleTime.committedSlot}\n
\n
\n
\n
\n
\n Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.ATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.CTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n Relative Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Relative Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RCTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n
\n
\n )\n ;\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class Bootstrapped extends React.Component {\n render() {\n return (\n \n Bootstrapped: {this.props.nodeStore.status.tangleTime.bootstrapped ? \"Yes\" : \"No\"}\n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Uptime from \"./Uptime\";\r\nimport Version from \"./Version\";\r\nimport BPSChart from \"./BPSChart\";\r\nimport TipsChart from \"./TipsChart\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport MemChart from \"./MemChart\";\r\nimport ComponentCounterChart from \"./ComponentCounterChart\";\r\nimport TangleTime from \"./TangleTime\";\r\nimport Bootstrapped from \"./Bootstrapped\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Dashboard extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Dashboard

\r\n \r\n \r\n \r\n \r\n Node: {this.props.nodeStore.status.id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Table from \"react-bootstrap/Table\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerLiveFeed extends React.Component {\r\n render() {\r\n let {blksLiveFeed} = this.props.explorerStore;\r\n return (\r\n \r\n \r\n \r\n \r\n Live Feed\r\n \r\n \r\n
Blocks
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {blksLiveFeed}\r\n \r\n
IdPayload Type
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionSearchbar extends React.Component {\n txID: string;\n\n updateSearch = (e) => {\n this.txID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/transaction/${this.txID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputSearchbar extends React.Component {\n outputID: string;\n\n updateSearch = (e) => {\n this.outputID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/output/${this.outputID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerConflictSearchbar extends React.Component {\n conflictID: string;\n\n updateSearch = (e) => {\n this.conflictID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/conflict/${this.conflictID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerSearchbar} from \"./ExplorerSearchbar\";\r\nimport {ExplorerLiveFeed} from \"./ExplorerLiveFeed\";\r\nimport {ExplorerTransactionSearchbar} from \"./ExplorerTransactionSearchbar\";\r\nimport {ExplorerOutputSearchbar} from \"./ExplorerOutputSearchbar\";\r\nimport {ExplorerConflictSearchbar} from \"./ExplorerConflictSearchbar\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Explorer extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Tangle Explorer

\r\n \r\n \r\n

\r\n Search for addresses, blocks, transactions, outputs and conflicts.\r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This explorer implementation is heavily inspired by thetangle.org.\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport Form from \"react-bootstrap/Form\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class NavExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n return (\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum WSMsgType {\r\n Status,\r\n BPSMetrics,\r\n Block,\r\n NeighborStats,\r\n ComponentCounterMetrics,\r\n TipsMetrics,\r\n Vertex,\r\n TXAccepted,\r\n TipInfo,\r\n Mana,\r\n ManaMapOverall,\r\n ManaMapOnline,\r\n BlkManaDashboardAddress,\r\n RateSetter,\r\n ConflictSet,\r\n Conflict,\r\n SlotInfo,\r\n}\r\n\r\nexport interface WSBlock {\r\n type: number;\r\n data: any;\r\n}\r\n\r\ntype DataHandler = (data: any) => void;\r\n\r\nlet handlers = {};\r\n\r\nexport function registerHandler(blkTypeID: number, handler: DataHandler) {\r\n handlers[blkTypeID] = handler;\r\n}\r\n\r\nexport function unregisterHandler(blkTypeID: number) {\r\n delete handlers[blkTypeID];\r\n}\r\n\r\nexport function connectWebSocket(path: string, onOpen, onClose, onError) {\r\n let loc = window.location;\r\n let uri = 'ws:';\r\n\r\n if (loc.protocol === 'https:') {\r\n uri = 'wss:';\r\n }\r\n uri += '//' + loc.host + path;\r\n\r\n let ws = new WebSocket(uri);\r\n\r\n ws.onopen = onOpen;\r\n ws.onclose = onClose;\r\n ws.onerror = onError;\r\n\r\n ws.onmessage = (e) => {\r\n let blk: WSBlock = JSON.parse(e.data);\r\n let handler = handlers[blk.type];\r\n if (!handler) {\r\n return;\r\n }\r\n handler(blk.data);\r\n };\r\n}\r\n","export enum PayloadType {\r\n TaggedData = 0,\r\n Transaction = 1,\r\n Faucet = 3,\r\n}\r\n\r\n// BasicPayload\r\nexport class BasicPayload {\r\n content_title: string;\r\n content: string;\r\n}\r\n\r\nexport class TaggedDataPayload {\r\n tag: string;\r\n data: string;\r\n}\r\n\r\nexport class FaucetPayload {\r\n address: string;\r\n accessManaPledgeID: string;\r\n consensusManaPledgeID: string;\r\n nonce: number;\r\n}\r\n\r\nexport class TransactionPayload {\r\n networkId: number;\r\n creationSlot: number;\r\n inputs: Array;\r\n outputs: Array;\r\n payload: any;\r\n unlocks: Array;\r\n}\r\n\r\nexport class Input {\r\n type: string;\r\n referencedOutputID: OutputID;\r\n output: Output;\r\n}\r\n\r\nexport class Output {\r\n outputID: OutputID;\r\n type: number;\r\n output: \r\n BasicOutput|\r\n AliasOutput|\r\n FoundryOutput|\r\n NFTOutput;\r\n}\r\n\r\nexport class OutputID {\r\n hex: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class UnlockBlock {\r\n type: string;\r\n referencedIndex: number;\r\n signatureType: number;\r\n signature: SignatureEd25519;\r\n}\r\n\r\nexport class SignatureEd25519 {\r\n publicKey: string;\r\n signature: string;\r\n}\r\n\r\nexport class BasicOutput {\r\n amount: number\r\n nativeTokens?: Array;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n}\r\n\r\nexport class AliasOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n aliasId: string;\r\n stateIndex: number;\r\n stateMetadata?: string;\r\n foundryCounter: number;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class FoundryOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n serialNumber: number;\r\n tokenScheme: number; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class NFTOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n nftId: string; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class Balance {\r\n value: number;\r\n color: string;\r\n}\r\n\r\nexport class Conflict {\r\n tx_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\nexport class Timestamp {\r\n blk_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\n// @ts-ignore\r\nexport class Opinion {\r\n value: string;\r\n round: number;\r\n}\r\n\r\nexport class NativeToken {\r\n id: string;\r\n amount: number;\r\n}\r\n\r\n// address, stateController, Governor share the same struct\r\nexport class AddressUnlockCondition {\r\n type: number;\r\n address: Address;\r\n}\r\n\r\nexport class Address {\r\n type: number;\r\n pubKeyHash: string;\r\n}\r\nexport class StorageDepositReturnUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n amount: number;\r\n}\r\n\r\nexport class TimelockUnlockCondition {\r\n type: number;\r\n unixTime?: number;\r\n}\r\n\r\nexport class ExpirationUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n unixTime: number;\r\n}\r\n\r\nexport class Feature {\r\n type: number;\r\n feature:\r\n IssuerFeature |\r\n MetadataFeature |\r\n TagFeature;\r\n}\r\n\r\n// Issuer and sender share a struct\r\nexport class IssuerFeature {\r\n address: string\r\n}\r\n\r\nexport class MetadataFeature {\r\n data: string;\r\n}\r\n\r\nexport class TagFeature {\r\n tag: string;\r\n}\r\n\r\nexport function getPayloadType(p: number){\r\n switch (p) {\r\n case PayloadType.TaggedData:\r\n return \"TaggedData\"\r\n case PayloadType.Transaction:\r\n return \"Transaction\"\r\n case PayloadType.Faucet:\r\n return \"Faucet\"\r\n default:\r\n return \"Unknown\"\r\n }\r\n}\r\n","import { UnlockConditionAddress, UnlockConditionExpiration, UnlockConditionStorageDepositReturn, UnlockConditionTimelock } from \"app/components/Condition\";\nimport { AddressUnlockCondition, ExpirationUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum ConditionType {\n Address = 0,\n StorageDepositReturn,\n Timelock,\n Expiration,\n StateControllerAddress,\n GovernorAddress,\n ImmutableAlias,\n}\n\nexport function resolveConditionType(condType: number) {\n switch (condType) {\n case ConditionType.Address:\n return \"Address Condition\";\n case ConditionType.StorageDepositReturn:\n return \"StorageDepositReturn Condition\";\n case ConditionType.Timelock:\n return \"Timelock Condition\";\n case ConditionType.Expiration:\n return \"Expiration Condition\";\n case ConditionType.StateControllerAddress:\n return \"StateControllerAddress Condition\";\n case ConditionType.GovernorAddress:\n return \"GovernorAddress Condition\";\n case ConditionType.ImmutableAlias:\n return \"ImmutableAlias Condition\";\n default:\n return \"Unknown Condition Type\";\n }\n}\n\nexport function conditionToComponent(cond: \n AddressUnlockCondition |\n StorageDepositReturnUnlockCondition |\n TimelockUnlockCondition |\n ExpirationUnlockCondition) {\n switch (cond.type) {\n case ConditionType.Address:\n case ConditionType.StateControllerAddress:\n case ConditionType.GovernorAddress:\n return ;\n case ConditionType.StorageDepositReturn:\n return ;\n case ConditionType.Expiration:\n return ;\n case ConditionType.Timelock:\n return ;\n }\n}","import { FeatureIssuer, FeatureMetadata, FeatureTag } from \"app/components/Feature\";\nimport { Feature, IssuerFeature, MetadataFeature, TagFeature } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum FeatureType {\n Sender = 0,\n Issuer,\n Metadata,\n Tag,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case FeatureType.Sender:\n return \"Sender Feature\";\n case FeatureType.Issuer:\n return \"Issuer Feature\";\n case FeatureType.Metadata:\n return \"Metadata Feature\";\n case FeatureType.Tag:\n return \"Tag Feature\";\n default:\n return \"Unknown Feature Type\";\n }\n}\n\n\nexport function featureToComponent(feat: Feature) {\n switch (feat.type) {\n case FeatureType.Sender:\n case FeatureType.Issuer:\n return ;\n case FeatureType.Metadata:\n return ;\n case FeatureType.Tag:\n return ;\n }\n}","import {\n BasicOutput as BasicJSON,\n AliasOutput as AliasJSON,\n FoundryOutput as FoundryJSON,\n NFTOutput as NFTJSON,\n Output,\n} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport { BasicOutput } from \"app/components/BasicOutput\";\nimport { AliasOutput } from \"app/components/AliasOutput\";\nimport { FoundryOutput } from \"app/components/FoundryOutput\";\nimport { NFTOutput } from \"app/components/NFTOutput\";\n\nexport enum OutputType {\n Treasury = 2,\n Basic,\n Alias,\n Foundry,\n NFT,\n}\n\nexport function outputToComponent(output: Output) {\n let id = output.outputID\n switch (output.type) {\n case OutputType.Basic:\n return ;\n case OutputType.Alias:\n return ;\n case OutputType.Foundry:\n return ;\n case OutputType.NFT:\n return ;\n default:\n return;\n }\n}\n\n\nexport function outputTypeToName(type: number) {\n switch (type) {\n case OutputType.Basic:\n return \"Basic Output\";\n case OutputType.Alias:\n return \"Alias Output\";\n case OutputType.Foundry:\n return \"Foundry Output\";\n case OutputType.NFT:\n return \"NFT Output\";\n default:\n return;\n }\n}\n","import * as React from 'react';\nimport { NativeToken as NativeTokenJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\n\ninterface Props {\n token: NativeTokenJSON;\n}\n\nexport class NativeToken extends React.Component {\n render() {\n return (\n
\n \n ID: {this.props.token.id}\n Amount: {this.props.token.amount}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport { \n TimelockUnlockCondition, \n AddressUnlockCondition,\n StorageDepositReturnUnlockCondition,\nExpirationUnlockCondition} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface AddressProps { \n unlock: AddressUnlockCondition;\n}\n\nexport class UnlockConditionAddress extends React.Component {\n render() {\n return (\n
\n \n Address Type: {this.props.unlock.address.type}\n \n \n Address: {this.props.unlock.address.pubKeyHash}\n \n
\n );\n }\n}\n\ninterface TimelockProps { \n unlock: TimelockUnlockCondition;\n}\n\nexport class UnlockConditionTimelock extends React.Component {\n render() {\n\n return (\n this.props.unlock.unixTime &&\n
\n \n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}\n\ninterface StorageDepositReturnProps { \n unlock: StorageDepositReturnUnlockCondition;\n}\n\nexport class UnlockConditionStorageDepositReturn extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Amount: {this.props.unlock.amount}\n \n
\n );\n }\n}\n\ninterface ExpirationProps { \n unlock: ExpirationUnlockCondition;\n}\n\nexport class UnlockConditionExpiration extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}","import * as React from 'react';\nimport { \nIssuerFeature, MetadataFeature, TagFeature} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface IssuerProps { \n feature: IssuerFeature;\n}\n\nexport class FeatureIssuer extends React.Component {\n render() {\n return (\n
\n \n Address: {this.props.feature.address}\n \n
\n );\n }\n}\n\n\ninterface MetadataProps { \n feature: MetadataFeature;\n}\n\nexport class FeatureMetadata extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.data}\n \n
\n );\n }\n}\n\ninterface TagProps { \n feature: TagFeature;\n}\n\nexport class FeatureTag extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.tag}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {OutputID, BasicOutput as BasicOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: BasicOutputJSON\n id: OutputID;\n}\n\nexport class BasicOutput extends React.Component {\n render() {\n return (\n
\n \n Type: BasicOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {AliasOutput as AliasOutputJSON, OutputID} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: AliasOutputJSON\n id: OutputID;\n}\n\nexport class AliasOutput extends React.Component {\n render() {\n return (\n
\n \n Type: AliasOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n AliasID: {this.props.output.aliasId}\n StateIndex: {this.props.output.stateIndex}\n State Metadata: {this.props.output.stateMetadata} \n Foundry Counter: {this.props.output.foundryCounter}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n","import * as React from 'react';\nimport {OutputID, FoundryOutput as FoundryOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: FoundryOutputJSON\n id: OutputID;\n}\n\nexport class FoundryOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n Serial Number: {this.props.output.serialNumber}\n Token Scheme: {this.props.output.tokenScheme} \n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport {OutputID, NFTOutput as NFTOutputJSON} from \"../misc/Payload\";\nimport {conditionToComponent} from \"../utils/condition\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { featureToComponent } from 'app/utils/feature';\nimport { NativeToken } from './NativeToken';\n\ninterface Props {\n output: NFTOutputJSON\n id: OutputID;\n}\n\nexport class NFTOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n NFT ID: {this.props.output.nftId}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import { action, computed, observable } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport {\r\n BasicPayload,\r\n getPayloadType,\r\n Output,\r\n PayloadType,\r\n FaucetPayload,\r\n TransactionPayload,\r\n TaggedDataPayload,\r\n BasicOutput\r\n} from \"../misc/Payload\";\r\nimport * as React from \"react\";\r\nimport { Link } from 'react-router-dom';\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { OutputType } from 'app/utils/output';\r\n\r\nexport const GenesisBlockID = \"1111111111111111111111111111111111111111111111111111111111111111\";\r\nexport const GenesisTransactionID = \"11111111111111111111111111111111\";\r\n\r\nexport class Block {\r\n id: string;\r\n networkID: number;\r\n protocolVersion: number;\r\n solidificationTimestamp: number;\r\n issuanceTimestamp: number;\r\n sequenceNumber: number;\r\n issuerID: string;\r\n signature: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n strongChildren: Array;\r\n weakChildren: Array;\r\n shallowLikeChildren: Array;\r\n solid: boolean;\r\n conflictIDs: Array;\r\n addedConflictIDs: Array;\r\n subtractedConflictIDs: Array;\r\n scheduled: boolean;\r\n booked: boolean;\r\n orphaned: boolean;\r\n objectivelyInvalid: boolean;\r\n subjectivelyInvalid: boolean;\r\n acceptance: boolean;\r\n acceptanceTime: number;\r\n confirmation: boolean;\r\n confirmationTime: number;\r\n confirmationBySlot: boolean;\r\n confirmationBySlotTime: number;\r\n payloadType: number;\r\n payload: any;\r\n txId: string;\r\n rank: number;\r\n sequenceID: number;\r\n isPastMarker: boolean;\r\n pastMarkerGap: number;\r\n pastMarkers: string;\r\n commitmentID: string\r\n commitment: Commitment;\r\n latestConfirmedSlot: number;\r\n}\r\n\r\nexport class Commitment {\r\n index: number;\r\n prevID: string;\r\n rootsID: string;\r\n cumulativeWeight: number;\r\n}\r\nexport class AddressResult {\r\n address: string;\r\n explorerOutputs: Array;\r\n}\r\n\r\nexport class ExplorerOutput {\r\n id: OutputID;\r\n output: Output;\r\n metadata: OutputMetadata\r\n txTimestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputID {\r\n base58: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class OutputMetadata {\r\n outputID: OutputID;\r\n conflictIDs: Array;\r\n consumerCount: number;\r\n confirmedConsumer: string // tx id of confirmed consumer\r\n confirmationState: number\r\n confirmationStateTime: number\r\n}\r\n\r\nclass OutputConsumer {\r\n transactionID: string;\r\n valid: string;\r\n}\r\n\r\nclass OutputConsumers {\r\n outputID: OutputID;\r\n consumers: Array\r\n}\r\n\r\nclass TransactionMetadata {\r\n transactionID: string;\r\n conflictIDs: string[];\r\n booked: boolean;\r\n bookedTime: number;\r\n confirmationState: string;\r\n confirmationStateTime: number;\r\n}\r\n\r\nclass PendingMana {\r\n mana: number;\r\n outputID: string;\r\n error: string;\r\n timestamp: number;\r\n}\r\n\r\nclass Conflict {\r\n id: string;\r\n parents: Array;\r\n conflictIDs: Array;\r\n confirmationState: number;\r\n}\r\n\r\nclass ConflictChildren {\r\n conflictID: string;\r\n childConflicts: Array\r\n}\r\n\r\nclass ConflictChild {\r\n conflictID: string;\r\n type: string;\r\n}\r\n\r\nclass ConflictConflict {\r\n outputID: OutputID;\r\n conflictIDs: Array;\r\n}\r\n\r\nclass ConflictConflicts {\r\n conflictID: string;\r\n conflicts: Array\r\n}\r\n\r\nclass ConflictVoters {\r\n conflictID: string;\r\n voters: Array\r\n}\r\n\r\nclass SlotInfo {\r\n id: string;\r\n index: number;\r\n rootsID: string;\r\n prevID: string;\r\n cumulativeWeight: number;\r\n blocks: Array;\r\n transactions: Array;\r\n createdOutputs: Array;\r\n spentOutputs: Array;\r\n}\r\n\r\nclass SearchResult {\r\n block: BlockRef;\r\n address: AddressResult;\r\n}\r\n\r\nclass BlockRef {\r\n id: string;\r\n payload_type: number;\r\n}\r\n\r\nclass Tips {\r\n tips: Array\r\n}\r\n\r\nconst liveFeedSize = 50;\r\n\r\nenum QueryError {\r\n NotFound = 1,\r\n BadRequest = 2\r\n}\r\n\r\nexport class ExplorerStore {\r\n // live feed\r\n @observable latest_blocks: Array = [];\r\n\r\n // queries\r\n @observable blk: Block = null;\r\n @observable addr: AddressResult = null;\r\n @observable tx: any = null;\r\n @observable txMetadata: any = null;\r\n @observable txAttachments: any = [];\r\n @observable output: any = null;\r\n @observable outputMetadata: OutputMetadata = null;\r\n @observable outputConsumers: OutputConsumers = null;\r\n @observable pendingMana: PendingMana = null;\r\n @observable conflict: Conflict = null;\r\n @observable conflictChildren: ConflictChildren = null;\r\n @observable conflictConflicts: ConflictConflicts = null;\r\n @observable conflictVoters: ConflictVoters = null;\r\n @observable tips: Tips = null;\r\n @observable slotInfo: SlotInfo = new SlotInfo;\r\n\r\n // loading\r\n @observable query_loading: boolean = false;\r\n @observable query_err: any = null;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n @observable search_result: SearchResult = null;\r\n @observable searching: boolean = false;\r\n @observable payload: any;\r\n @observable subpayload: any;\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Block, this.addLiveFeedBlock);\r\n }\r\n\r\n searchAny = async () => {\r\n this.updateSearching(true);\r\n try {\r\n let res = await fetch(`/api/search/${this.search}`);\r\n let result: SearchResult = await res.json();\r\n this.updateSearchResult(result);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n resetSearch = () => {\r\n this.search_result = null;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n updateSearchResult = (result: SearchResult) => {\r\n this.search_result = result;\r\n this.searching = false;\r\n let search = this.search;\r\n this.search = '';\r\n if (this.search_result.block) {\r\n this.routerStore.push(`/explorer/block/${search}`);\r\n return;\r\n }\r\n if (this.search_result.address) {\r\n this.routerStore.push(`/explorer/address/${search}`);\r\n return;\r\n }\r\n this.routerStore.push(`/explorer/404/${search}`);\r\n };\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search;\r\n };\r\n\r\n @action\r\n updateSearching = (searching: boolean) => this.searching = searching;\r\n\r\n searchBlock = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/block/${id}`)\r\n\r\n this.updateBlock(res);\r\n };\r\n\r\n searchAddress = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/address/${id}`)\r\n this.updateAddress(res);\r\n };\r\n\r\n getSlotDetails = async (id: string) => {\r\n await this.getSlotInfo(id);\r\n }\r\n\r\n @action\r\n getTransaction = async (id: string) => {\r\n const tx = await this.fetchJson(\"get\", `/api/transaction/${id}`)\r\n \r\n for (let i = 0; i < tx.inputs.length; i++) {\r\n let inputID = tx.inputs[i] ? tx.inputs[i].referencedOutputID.hex : GenesisBlockID\r\n try {\r\n let referencedOutputRes = await fetch(`/api/output/${inputID}`)\r\n if (referencedOutputRes.status === 404) {\r\n let genOutput = new Output();\r\n genOutput.output = new BasicOutput();\r\n genOutput.output.amount = 0;\r\n genOutput.type = OutputType.Basic;\r\n genOutput.outputID = tx.inputs[i].referencedOutputID;\r\n tx.inputs[i].output = genOutput;\r\n }\r\n if (referencedOutputRes.status === 200) {\r\n tx.inputs[i].output = await referencedOutputRes.json()\r\n }\r\n } catch (err) {\r\n // ignore\r\n }\r\n this.tx = tx;\r\n }\r\n }\r\n\r\n @action\r\n getTransactionAttachments = async (id: string) => {\r\n const attachments = await this.fetchJson(\"get\", `/api/transaction/${id}/attachments`)\r\n this.txAttachments = attachments;\r\n }\r\n\r\n @action\r\n getTransactionMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/transaction/${id}/metadata`)\r\n this.txMetadata = res;\r\n }\r\n\r\n @action\r\n getOutput = async (id: string) => {\r\n const output = await this.fetchJson(\"get\", `/api/output/${id}`)\r\n this.output = output;\r\n }\r\n\r\n @action\r\n getOutputMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/metadata`)\r\n this.outputMetadata = res;\r\n }\r\n\r\n @action\r\n getOutputConsumers = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/consumers`)\r\n this.outputConsumers = res;\r\n }\r\n\r\n @action\r\n getPendingMana = async (outputID: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/mana/pending?OutputID=${outputID}`)\r\n this.pendingMana = res;\r\n }\r\n\r\n @action\r\n getConflict = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}`)\r\n this.conflict = res;\r\n }\r\n\r\n @action\r\n getConflictChildren = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/children`)\r\n this.conflictChildren = res;\r\n }\r\n\r\n @action\r\n getConflictConflicts = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/conflicts`)\r\n this.conflictConflicts = res;\r\n }\r\n\r\n @action\r\n getConflictVoters = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/voters`)\r\n this.conflictVoters = res;\r\n }\r\n\r\n @action\r\n getSlotInfo = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/slot/commitment/${id}`)\r\n this.slotInfo = res;\r\n }\r\n\r\n @action\r\n getTips = async () => {\r\n const res = await this.fetchJson(\"get\", \"/api/tips\")\r\n this.tips = res;\r\n }\r\n\r\n @action\r\n reset = () => {\r\n this.blk = null;\r\n this.query_err = null;\r\n // reset all variables\r\n this.tx = null;\r\n this.txMetadata = null;\r\n this.txAttachments = [];\r\n this.output = null;\r\n this.outputMetadata = null;\r\n this.outputConsumers = null;\r\n this.pendingMana = null;\r\n this.conflict = null;\r\n this.conflictChildren = null;\r\n this.conflictConflicts = null;\r\n this.tips = null;\r\n this.slotInfo = new SlotInfo;\r\n };\r\n\r\n @action\r\n updateAddress = (addr: AddressResult) => {\r\n this.addr = addr;\r\n this.query_err = null;\r\n this.query_loading = false;\r\n };\r\n\r\n @action\r\n updateBlock = (blk: Block) => {\r\n this.blk = blk;\r\n this.blk.conflictIDs = this.blk.conflictIDs ? this.blk.conflictIDs : []\r\n this.blk.addedConflictIDs = this.blk.addedConflictIDs ? this.blk.addedConflictIDs : []\r\n this.blk.subtractedConflictIDs = this.blk.subtractedConflictIDs ? this.blk.subtractedConflictIDs : []\r\n this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : []\r\n this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : []\r\n this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : []\r\n this.blk.strongParents = this.blk.strongParents ? this.blk.strongParents : []\r\n this.blk.weakParents = this.blk.weakParents ? this.blk.weakParents : []\r\n this.blk.shallowLikedParents = this.blk.shallowLikedParents ? this.blk.shallowLikedParents : []\r\n\r\n this.query_err = null;\r\n this.query_loading = false;\r\n switch (blk.payloadType) {\r\n case PayloadType.Transaction:\r\n this.payload = blk.payload as TransactionPayload\r\n break;\r\n case PayloadType.TaggedData:\r\n this.payload = blk.payload as TaggedDataPayload\r\n break;\r\n case PayloadType.Faucet:\r\n this.payload = blk.payload as FaucetPayload\r\n default:\r\n this.payload = blk.payload as BasicPayload\r\n break;\r\n }\r\n };\r\n\r\n @action\r\n updateQueryLoading = (loading: boolean) => this.query_loading = loading;\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.query_err = err;\r\n this.query_loading = false;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n addLiveFeedBlock = (blk: BlockRef) => {\r\n // prevent duplicates (should be fast with only size 10)\r\n if (this.latest_blocks.findIndex((t) => t.id == blk.id) === -1) {\r\n if (this.latest_blocks.length >= liveFeedSize) {\r\n this.latest_blocks.shift();\r\n }\r\n this.latest_blocks.push(blk);\r\n }\r\n };\r\n\r\n @computed\r\n get blksLiveFeed() {\r\n let feed = [];\r\n for (let i = this.latest_blocks.length - 1; i >= 0; i--) {\r\n let blk = this.latest_blocks[i];\r\n feed.push(\r\n \r\n \r\n \r\n {blk.id}\r\n \r\n \r\n \r\n {getPayloadType(blk.payload_type)}\r\n \r\n \r\n );\r\n }\r\n return feed;\r\n }\r\n\r\n @computed\r\n get tipsList() {\r\n let list = [];\r\n if (this.tips) {\r\n for (let i = 0; i < this.tips.tips.length; i++) {\r\n let blkId = this.tips.tips[i];\r\n list.push(\r\n \r\n \r\n \r\n {blkId}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return list;\r\n }\r\n\r\n async fetchJson(\r\n method: 'get' | 'delete',\r\n route: string,\r\n requestData?: T\r\n ): Promise {\r\n\r\n const body = requestData ? JSON.stringify(requestData, function (_, v) {\r\n // keep Uint8Array as it is\r\n if (v instanceof Uint8Array) {\r\n return Array.from(v);\r\n }\r\n return v;\r\n })\r\n : undefined;\r\n\r\n const response = await fetch(`${route}`, {\r\n method,\r\n headers: { 'Content-Type': 'application/json' },\r\n body\r\n });\r\n\r\n if (response.ok) {\r\n const responseData: U = await response.json();\r\n return responseData;\r\n }\r\n\r\n switch (response.status) {\r\n case 404:\r\n this.updateQueryError(QueryError.NotFound);\r\n break;\r\n case 400:\r\n this.updateQueryError(QueryError.BadRequest);\r\n break;\r\n default:\r\n this.updateQueryError('unexpected error')\r\n break;\r\n }\r\n return {} as U;\r\n }\r\n}\r\n\r\nexport default ExplorerStore;\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class BasicPayload extends React.Component {\r\n\r\n render() {\r\n let {payload} = this.props.explorerStore;\r\n return (\r\n payload &&\r\n \r\n \r\n \r\n {payload.content_title}: {' '} \r\n {payload.content}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum SignatureType {\n Ed25519 = 0,\n BLS = 1,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case SignatureType.Ed25519:\n return \"Ed25519 Signature\";\n case SignatureType.BLS:\n return \"BLS Signature\";\n default:\n return \"Unknown Signature Type\";\n }\n}","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport { Col, ListGroup } from 'react-bootstrap';\nimport { SignatureEd25519 } from 'app/misc/Payload';\n\ninterface Props {\n signature?: SignatureEd25519;\n}\n\nexport class Ed25519Signature extends React.Component {\n\n render() {\n let signature = this.props.signature;\n return (\n \n \n \n \n Public Key: {signature.publicKey}\n Signature: {signature.signature}\n \n \n \n \n );\n }\n}\n","import {UnlockBlock as unlockBlockJSON} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport Badge from \"react-bootstrap/Badge\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {SignatureType, resolveSignatureType} from \"../utils/unlock_block\";\nimport { Ed25519Signature } from \"./Ed25519Signature\";\n\ninterface UnlockProps {\n block: unlockBlockJSON;\n key: number;\n}\n\nexport class UnlockBlock extends React.Component {\n renderSignatureComponent() {\n switch (this.props.block.signatureType) {\n case SignatureType.Ed25519:\n return \n }\n }\n\n render() {\n let block = this.props.block;\n return (\n \n \n Index: {this.props.key}\n \n Type: {block.type}\n {\n block.signatureType && Signature Type: {resolveSignatureType(block.signatureType)}\n } \n {\n this.renderSignatureComponent()\n } \n \n \n \n );\n }\n}","import * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {outputToComponent} from \"../utils/output\";\nimport {IconContext} from \"react-icons\";\nimport {FaChevronCircleRight} from \"react-icons/fa\";\nimport {UnlockBlock} from \"./UnlockBlock\";\nimport {TransactionPayload} from \"../misc/Payload\";\n\nconst style = {\n maxHeight: \"1000px\",\n overflow: \"auto\",\n width: \"47%\",\n fontSize: \"85%\",\n}\n\ninterface Props {\n txID?: string;\n tx?: TransactionPayload;\n}\n\nexport class Transaction extends React.Component {\n render() {\n let txID = this.props.txID;\n let tx = this.props.tx;\n return (\n tx && txID &&\n
\n

Transaction

\n

{txID}

\n \n \n
Transaction Essence
\n \n ID: {txID}\n Network ID: {tx.networkId}\n Creation Time: {tx.creationSlot}\n \n
\n
\n Inputs\n
\n {tx.inputs.map((input, i) => {\n return (\n
\n Index: {i}\n
\n \n Output ID: {input.referencedOutputID.hex}\n \n
\n
\n )\n })}\n
\n \n
\n \n
\n
\n
\n Outputs\n
\n {tx.outputs.map((output, i) => {\n return (\n
\n Index: {i}\n {outputToComponent(output)}\n
\n )\n })}\n
\n
\n
\n { tx.payload && Data payload: {tx.payload}}\n
\n \n
\n \n \n
Unlock Blocks
\n \n {\n tx.unlocks.map((block,index) => (\n \n ))}\n \n \n
\n
\n );\n }\n}","import * as React from 'react';\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\r\nimport {Transaction} from \"./Transaction\";\r\n// import {ExplorerTransactionMetadata} from \"./ExplorerTransactionMetadata\";\r\nimport Container from \"react-bootstrap/Container\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class TransactionPayload extends React.Component {\r\n render() {\r\n let {payload, blk} = this.props.explorerStore;\r\n let txID = blk.txId;\r\n let tx = payload;\r\n\r\n return (\r\n \r\n {/* */}\r\n \r\n \r\n );\r\n }\r\n}\r\n","export function resolveBase58ConflictID(base58Conflict: string): string {\n switch (base58Conflict) {\n case MasterConflictInBase58:\n return \"MasterConflictID\";\n case UndefinedConflictInBase58:\n return \"UndefinedConflictID\";\n case LazyBookedConflictsConflictInBase58:\n return \"LazyBookedConflictsConflictID\";\n case InvalidConflictInBase58:\n return \"InvalidConflictID\";\n default:\n // otherwise it is a \"regular\" conflictID that doesn't have a distinct name\n return base58Conflict\n }\n}\n\n// base58 conflictIDs that have distinct names\nconst MasterConflictInBase58 = \"4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM\"\nconst UndefinedConflictInBase58 = \"11111111111111111111111111111111\"\nconst LazyBookedConflictsConflictInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF\"\nconst InvalidConflictInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG\"","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport {inject, observer} from \"mobx-react\";\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class FaucetPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n return (\n payload &&\n \n \n \n \n \n Address: {payload.address}\n \n \n Access Mana Pledge ID: {payload.accessManaPledgeID}\n \n \n Consensus Mana Pledge ID: {payload.consensusManaPledgeID}\n \n \n Nonce: {payload.nonce}\n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport { Col, ListGroup } from 'react-bootstrap';\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class TaggedDataPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n \n return (\n payload &&\n \n \n \n \n Tag: {payload.tag}\n Data: {payload.data}\n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport ExplorerStore, { GenesisBlockID } from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport * as dateformat from 'dateformat';\r\nimport { Link } from 'react-router-dom';\r\nimport { BasicPayload } from './BasicPayload'\r\nimport { TransactionPayload } from './TransactionPayload'\r\nimport { getPayloadType, PayloadType } from '../misc/Payload'\r\nimport { resolveBase58ConflictID } from \"../utils/conflict\";\r\nimport { FaucetPayload } from './FaucetPayload';\r\nimport { TaggedDataPayload } from './TaggedDataPayload';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerBlockQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.explorerStore.reset();\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n getPayloadType() {\r\n return getPayloadType(this.props.explorerStore.blk.payloadType)\r\n }\r\n\r\n renderPayload() {\r\n switch (this.props.explorerStore.blk.payloadType) {\r\n case PayloadType.Transaction:\r\n if (!this.props.explorerStore.blk.objectivelyInvalid) {\r\n return \r\n }\r\n return \r\n case PayloadType.TaggedData:\r\n return \r\n case PayloadType.Faucet:\r\n return \r\n default:\r\n return \r\n }\r\n }\r\n\r\n render() {\r\n let { id } = this.props.match.params;\r\n let { blk, query_loading, query_err } = this.props.explorerStore;\r\n\r\n if (id === GenesisBlockID) {\r\n return (\r\n \r\n

Genesis Block

\r\n

In the beginning there was the genesis.

\r\n
\r\n );\r\n }\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Block not available - 404

\r\n

\r\n Block with ID {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n return (\r\n \r\n

Block

\r\n

\r\n {id} {' '}\r\n {\r\n blk &&\r\n \r\n
\r\n \r\n \r\n Issuance Time: {dateformat(new Date(blk.issuanceTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Solidification Time: {dateformat(new Date(blk.solidificationTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n
\r\n }\r\n

\r\n {\r\n blk &&\r\n \r\n \r\n \r\n \r\n \r\n Payload Type: {this.getPayloadType()}\r\n \r\n \r\n Sequence Number: {blk.sequenceNumber}\r\n \r\n \r\n ConflictIDs:\r\n \r\n {\r\n blk.conflictIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n AddedConflictIDs:\r\n \r\n {\r\n blk.addedConflictIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n SubtractedConflictIDs:\r\n \r\n {\r\n blk.subtractedConflictIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n Solid: {blk.solid ? 'Yes' : 'No'}\r\n \r\n \r\n Scheduled: {blk.scheduled ? 'Yes' : 'No'}\r\n \r\n \r\n Booked: {blk.booked ? 'Yes' : 'No'}\r\n \r\n \r\n Orphaned: {blk.orphaned ? 'Yes' : 'No'}\r\n \r\n \r\n Objectively Invalid: {blk.objectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Subjectively Invalid: {blk.subjectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance: {blk.acceptance ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance\r\n Time: {dateformat(new Date(blk.acceptanceTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation: {blk.confirmation ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation\r\n Time: {dateformat(new Date(blk.confirmationTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation by slot: {blk.confirmationBySlot ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation by slot\r\n time: {dateformat(new Date(blk.confirmationBySlotTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n
Slot Commitment
\r\n \r\n \r\n CommitmentID: {blk.commitmentID}\r\n \r\n \r\n \r\n \r\n Index: {blk.commitment.index}\r\n \r\n \r\n prevID: {blk.commitment.prevID}\r\n \r\n \r\n rootsID: {blk.commitment.rootsID}\r\n \r\n \r\n Cumulative Weight: {blk.commitment.cumulativeWeight}\r\n \r\n \r\n \r\n \r\n LatestConfirmedSlot: {blk.latestConfirmedSlot}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n {\r\n !!blk.rank &&\r\n \r\n \r\n
Markers
\r\n \r\n \r\n Rank: {blk.rank}\r\n \r\n \r\n SequenceID: {blk.sequenceID}\r\n \r\n \r\n PastMarkerGap: {blk.pastMarkerGap}\r\n \r\n \r\n IsPastMarker: {blk.isPastMarker ? 'Yes' : 'No'}\r\n \r\n \r\n Past markers: {blk.pastMarkers}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n\r\n \r\n \r\n \r\n \r\n IssuerID: {blk.issuerID}\r\n \r\n \r\n Block Signature: {blk.signature}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongParents.map((value, index) => {\r\n return (\r\n \r\n Strong Parents {index + 1}: {' '}\r\n \r\n {blk.strongParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.weakParents.map((value, index) => {\r\n return (\r\n \r\n Weak Parents {index + 1}: {' '}\r\n \r\n {blk.weakParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.shallowLikedParents.map((value, index) => {\r\n return (\r\n \r\n Shallow Liked Parents {index + 1}: {' '}\r\n \r\n {blk.shallowLikedParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongChildren.map((value, index) => {\r\n return (\r\n \r\n Strong Child {index + 1}: {' '}\r\n \r\n {blk.strongChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.weakChildren.map((value, index) => {\r\n return (\r\n \r\n Weak Child {index + 1}: {' '}\r\n \r\n {blk.weakChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.shallowLikeChildren.map((value, index) => {\r\n return (\r\n \r\n ShallowLike Child {index + 1}: {' '}\r\n \r\n {blk.shallowLikeChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n

Payload

\r\n \r\n
\r\n \r\n \r\n {this.renderPayload()}\r\n \r\n \r\n
\r\n }\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","export function displayManaUnit(mana: number): string {\n let result = \"\"\n // round to nearest integer\n let roundedMana = Math.round(mana);\n if (roundedMana < 1000) {\n result = roundedMana.toString(10) + \" m\"; // mana\n } else if (roundedMana < 1000000) {\n result = (roundedMana / 1000).toFixed(3) + \" Km\"; // kilomana\n }\n else if (roundedMana < 1000000000) {\n result = (roundedMana / 1000000).toFixed(3) + \" Mm\"; // megamana\n }\n else if (roundedMana < 1000000000000) {\n result = (roundedMana / 1000000000).toFixed(3) + \" Gm\"; // gigamana\n }\n else if (roundedMana < 1000000000000000) {\n result = (roundedMana / 1000000000000).toFixed(3) + \" Tm\"; // terramana\n } else {\n result = (roundedMana / 1000000000000000).toFixed(3) + \" Pm\"; // petamana\n }\n return result\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore, ExplorerOutput, OutputMetadata} from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Alert from \"react-bootstrap/Alert\";\r\nimport {Link} from 'react-router-dom';\r\nimport {displayManaUnit} from \"../utils\";\r\nimport {OutputType, outputToComponent, outputTypeToName} from \"../utils/output\";\r\nimport {Button, ListGroupItem} from \"react-bootstrap\";\r\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerAddressQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n let {id} = this.props.match.params;\r\n let {addr, query_loading, query_err} = this.props.explorerStore;\r\n // spent outputs\r\n let spent: Array = [];\r\n // unspent outputs\r\n let unspent: Array = [];\r\n let available_balances = [];\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Address not available - 404

\r\n

\r\n Address {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n\r\n if (addr) {\r\n // separate spent from unspent\r\n addr.explorerOutputs.forEach((o) => {\r\n if (o.metadata.consumerCount > 0) {\r\n spent.push(o);\r\n } else {\r\n unspent.push(o);\r\n }\r\n })\r\n\r\n let timestampCompareFn = (a: ExplorerOutput, b: ExplorerOutput) => {\r\n if (b.txTimestamp === a.txTimestamp) {\r\n // outputs have the same timestamp\r\n if (b.id.transactionID == a.id.transactionID) {\r\n // outputs belong to the same tx, sort based on index\r\n return b.id.outputIndex - a.id.outputIndex;\r\n }\r\n // same timestamp, but different tx\r\n return b.id.transactionID.localeCompare(a.id.transactionID);\r\n }\r\n return b.txTimestamp - a.txTimestamp;\r\n }\r\n\r\n // sort outputs\r\n unspent.sort(timestampCompareFn)\r\n spent.sort(timestampCompareFn)\r\n }\r\n return (\r\n \r\n

Address {id} {addr !== null && ({addr.explorerOutputs.length} Outputs)}

\r\n {\r\n addr !== null ?\r\n \r\n {\r\n addr.explorerOutputs !== null && addr.explorerOutputs.length === 100 &&\r\n \r\n Max. 100 outputs are shown.\r\n \r\n }\r\n \r\n \r\n \r\n

Available Balances

\r\n {available_balances.length === 0? \"There are no balances currently available.\" :
\r\n \r\n \r\n \r\n Color\r\n \r\n \r\n Balance\r\n \r\n \r\n \r\n {available_balances}\r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Unspent Outputs

\r\n {unspent.length === 0? \"There are no unspent outputs currently available.\" :
\r\n {unspent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Spent Outputs

\r\n {spent.length === 0? \"There are no spent outputs currently available.\" :
\r\n {spent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\ninterface oProps {\r\n output: ExplorerOutput;\r\n}\r\n\r\nclass OutputButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n enabled: false\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n { this.setState({enabled: !this.state.enabled})}}\r\n block\r\n >\r\n \r\n {this.props.output.id.base58} \r\n {outputTypeToName(this.props.output.output.type)} \r\n {new Date(this.props.output.txTimestamp * 1000).toLocaleString()}\r\n \r\n \r\n \r\n \r\n {\r\n this.state.enabled? outputToComponent(this.props.output.output): null\r\n }\r\n \r\n \r\n {\r\n this.state.enabled? : null\r\n }\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\ninterface omProps {\r\n metadata: OutputMetadata;\r\n timestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputMeta extends React.Component {\r\n render() {\r\n let metadata = this.props.metadata;\r\n let timestamp = this.props.timestamp;\r\n let pendingMana = this.props.pendingMana;\r\n return (\r\n \r\n ConflictIDs: \r\n \r\n {\r\n metadata.conflictIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n Pending mana: {displayManaUnit(pendingMana)}\r\n Timestamp: {new Date(timestamp * 1000).toLocaleString()}\r\n Consumer Count: {metadata.consumerCount}\r\n { metadata.confirmedConsumer && Confirmed Consumer: {metadata.confirmedConsumer} }\r\n \r\n );\r\n }\r\n}\r\n\r\nlet getVariant = (outputType: number) => {\r\n switch (outputType) {\r\n case OutputType.Basic:\r\n return \"light\";\r\n case OutputType.Alias:\r\n return \"light\";\r\n case OutputType.Foundry:\r\n return \"success\";\r\n case OutputType.NFT:\r\n return \"info\";\r\n default:\r\n return \"danger\";\r\n }\r\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n search: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class Explorer404 extends React.Component {\r\n\r\n render() {\r\n let {search} = this.props.match.params;\r\n return (\r\n \r\n

Tangle Explorer 404

\r\n

\r\n The search via '{search}' did not yield any results.\r\n

\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport * as prettysize from 'prettysize';\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport {Line} from \"react-chartjs-2\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n identity: string;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbor extends React.Component {\r\n render() {\r\n let neighborMetrics = this.props.nodeStore.neighbor_metrics.get(this.props.identity);\r\n let last = neighborMetrics.current;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {last.id}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Origin:\r\n {' '}\r\n {last.connection_origin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Address: {last.address}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Network (Tx/Rx)
\r\n \r\n {'Total: '}\r\n {last.packets_written}\r\n {' / '}\r\n {last.packets_read}\r\n \r\n {' '}\r\n \r\n {'Current: '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.tx)}\r\n {' / '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.rx)}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Neighbor} from \"./Neighbor\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbors extends React.Component {\r\n render() {\r\n let neighborsEle = [];\r\n this.props.nodeStore.neighbor_metrics.forEach((v, k) => {\r\n neighborsEle.push();\r\n });\r\n return (\r\n \r\n

Neighbors {neighborsEle.length > 0 && ({neighborsEle.length})}

\r\n

\r\n Currently connected neighbors.\r\n

\r\n {neighborsEle}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { KeyboardEvent } from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport { Link } from 'react-router-dom';\r\nimport VisualizerStore from \"../stores/VisualizerStore\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Popover from \"react-bootstrap/Popover\";\r\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\r\n\r\ninterface Props {\r\n visualizerStore?: VisualizerStore;\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"visualizerStore\")\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Visualizer extends React.Component {\r\n\r\n componentDidMount(): void {\r\n this.props.visualizerStore.start();\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.props.visualizerStore.stop();\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n updateVerticesLimit = (e) => {\r\n this.props.visualizerStore.updateVerticesLimit(e.target.value);\r\n }\r\n\r\n pauseResumeVisualizer = (e) => {\r\n this.props.visualizerStore.pauseResume();\r\n }\r\n\r\n updateSearch = (e) => {\r\n this.props.visualizerStore.updateSearch(e.target.value);\r\n }\r\n\r\n searchAndHighlight = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.visualizerStore.searchAndHighlight();\r\n }\r\n\r\n toggleBackgroundDataCollection = () => {\r\n if (this.props.nodeStore.collecting) {\r\n this.props.nodeStore.unregisterHandlers();\r\n return;\r\n }\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n render() {\r\n let {\r\n vertices, finalized_count, selected,\r\n verticesLimit, tips_count, paused, search\r\n } = this.props.visualizerStore;\r\n let { last_mps_metric, collecting } = this.props.nodeStore;\r\n\r\n return (\r\n \r\n

Visualizer

\r\n \r\n \r\n \r\n \r\n Vertices Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n Search Vertex\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ensures that only data needed for the visualizer is collected.\r\n \r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Pauses/resumes rendering the graph.\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n BLK Pending\r\n \r\n {' '}\r\n \r\n BLK Confirmed\r\n \r\n {' '}\r\n \r\n TX Pending\r\n \r\n {' '}\r\n \r\n TX Confirmed\r\n \r\n {' '}\r\n \r\n Tip\r\n \r\n {' '}\r\n \r\n Unknown\r\n \r\n
\r\n Vertices: {vertices.size}, Tips: {tips_count},\r\n Confirmed/UnConfirmed: {finalized_count}/{vertices.size - finalized_count},{' '}\r\n BPS: {last_mps_metric.mps}\r\n
\r\n Selected: {selected ?\r\n \r\n {selected.id.substr(0, 10)}\r\n \r\n : \"-\"}\r\n
\r\n {\r\n selected ? selected.strongParents &&\r\n Strong:{' '}\r\n {selected.strongParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.weakParents &&\r\n Weak:{' '}\r\n {selected.weakParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.shallowLikedParents &&\r\n Shallow Liked:{' '}\r\n {selected.shallowLikedParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n

\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Table from \"react-bootstrap/Table\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class Tips extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTips();\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {tipsList} = this.props.explorerStore;\n return (\n \n

Tips

\n \n \n \n \n \n \n \n {tipsList}\n \n
BlockID
\n
\n );\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport {Transaction} from \"./Transaction\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransaction extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransaction(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, tx } = this.props.explorerStore;\n if (query_err) {\n return (\n \n

Transaction not available - 404

\n

\n Transaction with ID {txId} not found.\n

\n
\n );\n }\n return \n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n// import {resolveBase58ConflictID} from \"../utils/conflict\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionMetadata extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionMetadata(this.props.txId);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, txMetadata } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Metadata

\n

Metadata for transaction ID {txId} not found.

\n
\n );\n }\n return (\n
\n

Metadata

\n {txMetadata && \n \n ConflictIDs: \n \n { \n txMetadata.conflictIDs && txMetadata.conflictIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n \n Booked: {txMetadata.booked.toString()}\n {/* Booked time: {new Date(txMetadata.bookedTime * 1000).toLocaleString()} */}\n Confirmation State: {txMetadata.confirmationState}\n {/* Confirmation State Time: {new Date(txMetadata.confirmationStateTime * 1000).toLocaleString()} */}\n }\n
\n )\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionAttachments extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionAttachments(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txAttachments } = this.props.explorerStore;\n return (\n
\n

Attachments

\n {txAttachments && txAttachments.blockIDs && \n \n \n {txAttachments.blockIDs.map((blkId, i) => {\n return {blkId}\n })}\n \n \n }\n
\n )\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { ExplorerTransaction } from \"./ExplorerTransaction\"\nimport { ExplorerTransactionMetadata } from \"./ExplorerTransactionMetadata\"\nimport { ExplorerTransactionAttachments } from \"./ExplorerTransactionAttachments\"\n\n\ninterface Props {\n match?: {\n params: {\n id: string,\n }\n }\n}\n\nexport class ExplorerTransactionQueryResult extends React.Component {\n render() {\n let { id } = this.props.match.params;\n return (\n \n \n \n \n \n )\n }\n}","export enum ConfirmationState {\n Undefined = 0,\n Rejected,\n Pending,\n Accepted,\n Confirmed,\n}\n\nexport function resolveConfirmationState(sigType: number) {\n switch (sigType) {\n case ConfirmationState.Undefined:\n return \"Undefined\";\n case ConfirmationState.Rejected:\n return \"Rejected\";\n case ConfirmationState.Pending:\n return \"Pending\";\n case ConfirmationState.Accepted:\n return \"Accepted\";\n case ConfirmationState.Confirmed:\n return \"Confirmed\";\n default:\n return \"Undefined Confirmation State\";\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {Link} from 'react-router-dom';\nimport {displayManaUnit} from \"../utils\";\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\nimport {outputToComponent} from \"../utils/output\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getOutput(this.props.match.params.id);\n this.props.explorerStore.getPendingMana(this.props.match.params.id);\n this.props.explorerStore.getOutputMetadata(this.props.match.params.id);\n this.props.explorerStore.getOutputConsumers(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, output, pendingMana, outputMetadata, outputConsumers } = this.props.explorerStore;\n\n let renderTriBool = (val: string) => {\n if (val === \"true\"){\n return True\n }\n if (val === \"false\"){\n return False\n }\n return Maybe\n }\n\n if (query_err) {\n return (\n \n

Output not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Output

\n {output &&
\n {outputToComponent(output)}\n \n {pendingMana && \n Pending Mana\n
\n
Value: {displayManaUnit(pendingMana.mana)}
\n
Timestamp: {new Date(pendingMana.timestamp * 1000).toLocaleString()}
\n
}\n
\n
}\n\n

Metadata

\n {outputMetadata &&
\n \n Transaction ID: {outputMetadata.outputID.transactionID} \n ConflictIDs: \n \n {\n outputMetadata.conflictIDs.map((value, index) => {\n return (\n \n \n {resolveBase58ConflictID(value)}\n \n \n )\n })\n }\n \n Consumer Count: {outputMetadata.consumerCount}\n Confirmed Consumer: {outputMetadata.confirmedConsumer} \n Confirmation State: {resolveConfirmationState(outputMetadata.confirmationState)}\n Confirmation State Time: {new Date(outputMetadata.confirmationStateTime * 1000).toLocaleString()}\n \n
}\n\n

Consumers

\n {outputConsumers &&
\n \n {outputConsumers.consumers.map((c,i) => \n
Transaction ID: {c.transactionID}
\n
Valid: {renderTriBool(c.valid)}
\n
)}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerConflictQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getConflict(this.props.match.params.id);\n this.props.explorerStore.getConflictChildren(this.props.match.params.id);\n this.props.explorerStore.getConflictConflicts(this.props.match.params.id);\n this.props.explorerStore.getConflictVoters(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, conflict, conflictChildren, conflictConflicts, conflictVoters } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Conflict not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Conflict

\n {conflict && \n ID: {resolveBase58ConflictID(conflict.id)}\n Parents:\n \n {conflict.parents.map((p,i) => {resolveBase58ConflictID(p)})}\n \n \n {Conflicts:\n {conflict.conflictIDs && \n {conflict.conflictIDs.map((c,i) => {c})}\n }\n }\n ConfirmationState: {resolveConfirmationState(conflict.confirmationState)}\n Children:\n {conflictChildren && \n {conflictChildren.childConflicts.map((c,i) => {resolveBase58ConflictID(c.conflictID)})}\n }\n \n { Conflicts:\n {conflictConflicts && \n {conflictConflicts.conflicts.map((c,i) =>
\n OutputID: {c.outputID.base58}\n \n {c.conflictIDs.map((b,j) => \n {resolveBase58ConflictID(b)}\n )}\n \n
)}\n
}\n
}\n Voters:\n {conflictVoters && \n {conflictVoters.voters.map((s,i) => {s})}\n }\n \n
}\n
\n )\n }\n}\n","import { SlotStore } from '../stores/SlotStore';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from '../stores/NodeStore';\nimport * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { Table } from 'react-bootstrap';\n\ninterface Props {\n history: any;\n nodeStore?: NodeStore;\n slotStore?: SlotStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"slotStore\")\n@observer\nexport class SlotLiveFeed extends React.Component {\n render() {\n let {slotLiveFeed} = this.props.slotStore;\n return (\n \n

Slots

\n \n \n \n \n \n \n \n \n {slotLiveFeed}\n \n
IndexCommitment ID
\n
\n );\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { Card, Col, Row, Table } from 'react-bootstrap';\n\n\ninterface Props {\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n commitment: string,\n }\n }\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSlotQueryResult extends React.Component {\n componentDidMount() {\n const id = this.props.match.params.commitment;\n this.props.explorerStore.getSlotDetails(id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n\n render() {\n let {commitment} = this.props.match.params;\n let { query_err, slotInfo } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Slot not found - 404

\n {commitment}\n
\n );\n }\n return (\n \n

Slot

\n {slotInfo && \n ID: {commitment}\n Index: {slotInfo.index}\n RootsID: {slotInfo.rootsID}\n PrevEC: {slotInfo.prevID}\n Cumulative Weight: {slotInfo.cumulativeWeight}\n Blocks:\n {slotInfo.blocks && \n \n \n \n \n \n {slotInfo.blocks.map((b,i) => {b})}\n \n
\n \n
\n
\n
}\n
\n Transactions:\n {slotInfo.transactions && \n \n \n \n \n \n {slotInfo.transactions.map((t,i) => {t})}\n \n
\n \n
\n
\n
}\n
\n Created outputs:\n {slotInfo.createdOutputs && \n \n \n \n \n \n {slotInfo.createdOutputs.map((c,i) => {c})}\n \n
\n \n
\n
\n
}\n
\n Spent outputs:\n {slotInfo.spentOutputs && \n \n \n \n \n \n {slotInfo.spentOutputs.map((s,i) => {s})}\n \n
\n \n
\n
\n
}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from \"../stores/NodeStore\";\nimport Navbar from \"react-bootstrap/Navbar\";\nimport Nav from \"react-bootstrap/Nav\";\nimport {Dashboard} from \"./Dashboard\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {RouterStore} from 'mobx-react-router';\nimport {Explorer} from \"./Explorer\";\nimport {NavExplorerSearchbar} from \"./NavExplorerSearchbar\";\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {LinkContainer} from 'react-router-bootstrap';\nimport {ExplorerBlockQueryResult} from \"./ExplorerBlockQueryResult\";\nimport {ExplorerAddressQueryResult} from \"./ExplorerAddressResult\";\nimport {Explorer404} from \"./Explorer404\";\nimport {Neighbors} from \"./Neighbors\";\nimport {Visualizer} from \"./Visualizer\";\nimport {Tips} from \"./Tips\";\nimport {ExplorerTransactionQueryResult} from \"./ExplorerTransactionQueryResult\";\nimport {ExplorerOutputQueryResult} from \"./ExplorerOutputQueryResult\";\nimport {ExplorerConflictQueryResult} from \"./ExplorerConflictQueryResult\";\nimport { SlotLiveFeed } from './SlotLiveFeed';\nimport { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult';\n\ninterface Props {\n history: any;\n routerStore?: RouterStore;\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"routerStore\")\n@observer\nexport class Root extends React.Component {\n renderDevTool() {\n if (process.env.NODE_ENV !== 'production') {\n const DevTools = require('mobx-react-devtools').default;\n return ;\n }\n }\n\n componentDidMount(): void {\n this.props.nodeStore.connect();\n }\n\n render() {\n return (\n
\n \n iota-core\n \n \n \n \n {!this.props.nodeStore.websocketConnected &&\n WS not connected!\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.children}\n {this.renderDevTool()}\n
\n );\n }\n}\n","import * as React from 'react';\nimport {hot} from 'react-hot-loader/root';\nimport {Root} from './components/Root';\n\n// render react DOM\nexport const App = hot(({history}) => );\n","import {action, computed, observable, ObservableMap} from 'mobx';\r\nimport * as dateformat from 'dateformat';\r\nimport {connectWebSocket, registerHandler, unregisterHandler, WSMsgType} from \"../misc/WS\";\r\n\r\nclass BPSMetric {\r\n mps: number;\r\n ts: string;\r\n}\r\n\r\nclass Status {\r\n id: string;\r\n version: string;\r\n uptime: number;\r\n mem: MemoryMetrics = new MemoryMetrics();\r\n tangleTime: TangleTime;\r\n scheduler: SchedulerMetric = new SchedulerMetric();\r\n}\r\n\r\nclass TangleTime {\r\n synced: boolean;\r\n bootstrapped: boolean;\r\n ATT: number;\r\n RATT: number;\r\n CTT: number;\r\n RCTT: number;\r\n acceptedBlockID: string;\r\n confirmedBlockID: string;\r\n confirmedSlot: number;\r\n committedSlot: number;\r\n}\r\n\r\nclass MemoryMetrics {\r\n heap_sys: number;\r\n heap_alloc: number;\r\n heap_idle: number;\r\n heap_released: number;\r\n heap_objects: number;\r\n last_pause_gc: number;\r\n num_gc: number;\r\n ts: string;\r\n}\r\n\r\nclass TipsMetric {\r\n totaltips: number;\r\n ts: string;\r\n}\r\n\r\nclass NetworkIO {\r\n tx: number;\r\n rx: number;\r\n ts: string;\r\n}\r\n\r\nclass RateSetterMetric {\r\n size: number;\r\n estimate: string;\r\n rate: number;\r\n ts: string;\r\n}\r\n\r\nclass SchedulerMetric {\r\n running: number;\r\n rate: string;\r\n maxBufferSize: number;\r\n currentBufferSize: number;\r\n deficit: number;\r\n ts: string;\r\n\r\n}\r\n\r\nclass NeighborMetrics {\r\n @observable collected: Array = [];\r\n @observable network_io: Array = [];\r\n\r\n addMetric(metric: NeighborMetric) {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.collected.push(metric);\r\n if (this.collected.length > maxMetricsDataPoints) {\r\n this.collected.shift();\r\n }\r\n let netIO = this.currentNetIO;\r\n if (netIO) {\r\n if (this.network_io.length > maxMetricsDataPoints) {\r\n this.network_io.shift();\r\n }\r\n this.network_io.push(netIO);\r\n }\r\n }\r\n\r\n get current() {\r\n return this.collected[this.collected.length - 1];\r\n }\r\n\r\n get secondLast() {\r\n let index = this.collected.length - 2;\r\n if (index < 0) {\r\n return\r\n }\r\n return this.collected[index];\r\n }\r\n\r\n get currentNetIO(): NetworkIO {\r\n if (this.current && this.secondLast) {\r\n return {\r\n tx: this.current.packets_written - this.secondLast.packets_written,\r\n rx: this.current.packets_read - this.secondLast.packets_read,\r\n ts: dateformat(new Date(), \"HH:MM:ss\"),\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n @computed\r\n get netIOSeries() {\r\n let tx = Object.assign({}, chartSeriesOpts,\r\n series(\"Tx\", 'rgba(53, 180, 219,1)', 'rgba(53, 180, 219,0.4)')\r\n );\r\n let rx = Object.assign({}, chartSeriesOpts,\r\n series(\"Rx\", 'rgba(235, 134, 52)', 'rgba(235, 134, 52,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.network_io.length; i++) {\r\n let metric: NetworkIO = this.network_io[i];\r\n labels.push(metric.ts);\r\n tx.data.push(metric.tx);\r\n rx.data.push(-metric.rx);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [tx, rx],\r\n };\r\n }\r\n}\r\n\r\nclass NeighborMetric {\r\n id: string;\r\n address: string;\r\n connection_origin: number;\r\n packets_read: number;\r\n packets_written: number;\r\n ts: number;\r\n}\r\n\r\nclass ComponentCounterMetric {\r\n store: number;\r\n solidifier: number;\r\n scheduler: number;\r\n booker: number;\r\n ts: number;\r\n}\r\n\r\nconst chartSeriesOpts = {\r\n label: \"Incoming\", data: [],\r\n fill: true,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(58, 60, 171,0.4)',\r\n borderWidth: 1,\r\n borderColor: 'rgba(58, 60, 171,1)',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBorderColor: 'rgba(58, 60, 171,1)',\r\n pointBackgroundColor: '#fff',\r\n pointBorderWidth: 1,\r\n pointHoverBackgroundColor: 'rgba(58, 60, 171,1)',\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 0,\r\n pointHitRadius: 20,\r\n pointHoverRadius: 5,\r\n};\r\n\r\nfunction series(name: string, color: string, bgColor: string) {\r\n return {\r\n label: name, data: [],\r\n backgroundColor: bgColor,\r\n borderColor: color,\r\n pointBorderColor: color,\r\n pointHoverBackgroundColor: color,\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n }\r\n}\r\n\r\nconst statusWebSocketPath = \"/ws\";\r\n\r\nconst maxMetricsDataPoints = 900;\r\n\r\nexport class NodeStore {\r\n @observable status: Status = new Status();\r\n @observable websocketConnected: boolean = false;\r\n @observable last_mps_metric: BPSMetric = new BPSMetric();\r\n @observable collected_mps_metrics: Array = [];\r\n @observable collected_rate_setter_metrics: Array = [];\r\n @observable last_rate_setter_metric: RateSetterMetric = new RateSetterMetric();\r\n @observable collected_scheduler_metrics: Array = [];\r\n @observable collected_mem_metrics: Array = [];\r\n @observable neighbor_metrics = new ObservableMap();\r\n @observable last_tips_metric: TipsMetric = new TipsMetric();\r\n @observable collected_tips_metrics: Array = [];\r\n @observable last_component_counter_metric: ComponentCounterMetric = new ComponentCounterMetric();\r\n @observable collected_component_counter_metrics: Array = [];\r\n @observable collecting: boolean = true;\r\n\r\n constructor() {\r\n this.status.tangleTime = new TangleTime;\r\n this.status.tangleTime.ATT = 0;\r\n this.status.tangleTime.RATT = 0;\r\n this.status.tangleTime.CTT = 0;\r\n this.status.tangleTime.RCTT = 0;\r\n this.registerHandlers();\r\n }\r\n\r\n registerHandlers = () => {\r\n registerHandler(WSMsgType.Status, this.updateStatus);\r\n registerHandler(WSMsgType.BPSMetrics, (mps: number) => {\r\n this.addBPSMetric(this.updateLastBPSMetric(mps));\r\n });\r\n registerHandler(WSMsgType.NeighborStats, this.updateNeighborMetrics);\r\n registerHandler(WSMsgType.TipsMetrics, this.updateLastTipsMetric);\r\n registerHandler(WSMsgType.ComponentCounterMetrics, this.updateLastComponentMetric);\r\n registerHandler(WSMsgType.RateSetter, this.updateLastRateSetterMetric)\r\n\r\n this.updateCollecting(true);\r\n }\r\n\r\n unregisterHandlers = () => {\r\n unregisterHandler(WSMsgType.Status);\r\n unregisterHandler(WSMsgType.BPSMetrics);\r\n unregisterHandler(WSMsgType.NeighborStats);\r\n unregisterHandler(WSMsgType.TipsMetrics);\r\n unregisterHandler(WSMsgType.ComponentCounterMetrics);\r\n unregisterHandler(WSMsgType.RateSetter);\r\n this.updateCollecting(false);\r\n }\r\n\r\n @action\r\n updateCollecting = (collecting: boolean) => {\r\n this.collecting = collecting;\r\n }\r\n\r\n @action\r\n reset() {\r\n this.collected_mps_metrics = [];\r\n this.collected_mem_metrics = [];\r\n this.collected_scheduler_metrics = [];\r\n this.neighbor_metrics = new ObservableMap();\r\n this.collected_tips_metrics = [];\r\n this.collected_component_counter_metrics = [];\r\n }\r\n\r\n reconnect() {\r\n this.updateWebSocketConnected(false);\r\n setTimeout(() => {\r\n this.connect();\r\n }, 5000);\r\n }\r\n\r\n connect() {\r\n connectWebSocket(statusWebSocketPath,\r\n () => this.updateWebSocketConnected(true),\r\n () => this.reconnect(),\r\n () => this.updateWebSocketConnected(false))\r\n }\r\n\r\n @action\r\n updateWebSocketConnected = (connected: boolean) => this.websocketConnected = connected;\r\n\r\n @action\r\n updateStatus = (status: Status) => {\r\n status.mem.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_mem_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mem_metrics.shift();\r\n }\r\n this.collected_mem_metrics.push(status.mem);\r\n this.status = status;\r\n\r\n status.scheduler.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_scheduler_metrics.length > maxMetricsDataPoints) {\r\n this.collected_scheduler_metrics.shift();\r\n }\r\n this.collected_scheduler_metrics.push(status.scheduler);\r\n };\r\n\r\n\r\n @action\r\n updateNeighborMetrics = (neighborMetrics: Array) => {\r\n if (!neighborMetrics) {\r\n return;\r\n }\r\n let updated = [];\r\n for (let i = 0; i < neighborMetrics.length; i++) {\r\n let metric = neighborMetrics[i];\r\n let neighbMetrics: NeighborMetrics = this.neighbor_metrics.get(metric.id);\r\n if (!neighbMetrics) {\r\n neighbMetrics = new NeighborMetrics();\r\n }\r\n neighbMetrics.addMetric(metric);\r\n this.neighbor_metrics.set(metric.id, neighbMetrics);\r\n updated.push(metric.id);\r\n }\r\n // remove duplicates\r\n for (const k of this.neighbor_metrics.keys()) {\r\n if (!updated.includes(k)) {\r\n this.neighbor_metrics.delete(k);\r\n }\r\n }\r\n };\r\n\r\n @action\r\n updateLastRateSetterMetric = (metric: RateSetterMetric) => {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_rate_setter_metric = metric;\r\n if (this.collected_rate_setter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_rate_setter_metrics.shift();\r\n }\r\n this.collected_rate_setter_metrics.push(metric);\r\n };\r\n\r\n @action\r\n updateLastBPSMetric = (mps: number) => {\r\n let mpsMetric = new BPSMetric();\r\n mpsMetric.mps = mps;\r\n mpsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_mps_metric = mpsMetric;\r\n return mpsMetric;\r\n };\r\n\r\n @action\r\n addBPSMetric = (metric: BPSMetric) => {\r\n if (this.collected_mps_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mps_metrics.shift();\r\n }\r\n this.collected_mps_metrics.push(metric);\r\n }\r\n\r\n @action\r\n updateLastTipsMetric = (tipsMetric: TipsMetric) => {\r\n tipsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_tips_metric = tipsMetric;\r\n if (this.collected_tips_metrics.length > maxMetricsDataPoints) {\r\n this.collected_tips_metrics.shift();\r\n }\r\n this.collected_tips_metrics.push(tipsMetric);\r\n };\r\n\r\n @action\r\n updateLastComponentMetric = (componentCounterMetric: ComponentCounterMetric) => {\r\n componentCounterMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_component_counter_metric = componentCounterMetric;\r\n if (this.collected_component_counter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_component_counter_metrics.shift()\r\n }\r\n this.collected_component_counter_metrics.push(componentCounterMetric);\r\n };\r\n\r\n @computed\r\n get mpsSeries() {\r\n let mps = Object.assign({}, chartSeriesOpts,\r\n series(\"BPS\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mps_metrics.length; i++) {\r\n let metric: BPSMetric = this.collected_mps_metrics[i];\r\n labels.push(metric.ts);\r\n mps.data.push(metric.mps);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [mps],\r\n };\r\n }\r\n\r\n @computed\r\n get tipsSeries() {\r\n let totaltips = Object.assign({}, chartSeriesOpts,\r\n series(\"All tips\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_tips_metrics.length; i++) {\r\n let metric: TipsMetric = this.collected_tips_metrics[i];\r\n labels.push(metric.ts);\r\n totaltips.data.push(metric.totaltips);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [totaltips],\r\n };\r\n }\r\n\r\n @computed\r\n get componentSeries() {\r\n let stored = Object.assign({}, chartSeriesOpts,\r\n series(\"stored\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n let solidified = Object.assign({}, chartSeriesOpts,\r\n series(\"solidified\", 'rgba(165,209,253,1)', 'rgba(165,209,253,0.4)')\r\n );\r\n let scheduled = Object.assign({}, chartSeriesOpts,\r\n series(\"scheduled\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n let booked = Object.assign({}, chartSeriesOpts,\r\n series(\"booked\", 'rgba(5, 68, 94,1)', 'rgba(5, 68, 94,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_component_counter_metrics.length; i++) {\r\n let metric: ComponentCounterMetric = this.collected_component_counter_metrics[i];\r\n labels.push(metric.ts);\r\n stored.data.push(metric.store);\r\n solidified.data.push(metric.solidifier);\r\n scheduled.data.push(metric.scheduler);\r\n booked.data.push(metric.booker);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [stored, solidified, scheduled, booked],\r\n };\r\n }\r\n\r\n @computed\r\n get bufferSizeSeries() {\r\n let bufferSize = Object.assign({}, chartSeriesOpts,\r\n series(\"buffer size\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n bufferSize.data.push(metric.currentBufferSize);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [bufferSize],\r\n };\r\n }\r\n\r\n @computed\r\n get deficitSeries() {\r\n let deficit = Object.assign({}, chartSeriesOpts,\r\n series(\"deficit\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n deficit.data.push(metric.deficit);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [deficit],\r\n };\r\n }\r\n\r\n @computed\r\n get neighborsSeries() {\r\n return {};\r\n }\r\n\r\n @computed\r\n get uptime() {\r\n let day, hour, minute, seconds;\r\n seconds = Math.floor(this.status.uptime / 1000);\r\n minute = Math.floor(seconds / 60);\r\n seconds = seconds % 60;\r\n hour = Math.floor(minute / 60);\r\n minute = minute % 60;\r\n day = Math.floor(hour / 24);\r\n hour = hour % 24;\r\n let str = \"\";\r\n if (day == 1) {\r\n str += day + \" Day, \";\r\n }\r\n if (day > 1) {\r\n str += day + \" Days, \";\r\n }\r\n if (hour >= 0) {\r\n if (hour < 10) {\r\n str += \"0\" + hour + \":\";\r\n } else {\r\n str += hour + \":\";\r\n }\r\n }\r\n if (minute >= 0) {\r\n if (minute < 10) {\r\n str += \"0\" + minute + \":\";\r\n } else {\r\n str += minute + \":\";\r\n }\r\n }\r\n if (seconds >= 0) {\r\n if (seconds < 10) {\r\n str += \"0\" + seconds;\r\n } else {\r\n str += seconds;\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n @computed\r\n get memSeries() {\r\n let heapSys = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Sys\", 'rgba(168, 50, 76,1)', 'rgba(168, 50, 76,0.4)')\r\n );\r\n let heapAlloc = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Alloc\", 'rgba(222, 49, 87,1)', 'rgba(222, 49, 87,0.4)')\r\n );\r\n let heapIdle = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Idle\", 'rgba(222, 49, 182,1)', 'rgba(222, 49, 182,0.4)')\r\n );\r\n let heapReleased = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Released\", 'rgba(250, 76, 252,1)', 'rgba(250, 76, 252,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mem_metrics.length; i++) {\r\n let metric = this.collected_mem_metrics[i];\r\n labels.push(metric.ts);\r\n heapSys.data.push(metric.heap_sys);\r\n heapAlloc.data.push(metric.heap_alloc);\r\n heapIdle.data.push(metric.heap_idle);\r\n heapReleased.data.push(metric.heap_released);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [heapSys, heapAlloc, heapIdle, heapReleased],\r\n };\r\n }\r\n}\r\n\r\nexport default NodeStore;\r\n","import {action, observable} from 'mobx';\r\nimport {RouterStore} from \"mobx-react-router\";\r\n\r\nclass SendResult {\r\n BlkId: string;\r\n}\r\n\r\nenum QueryError {\r\n NotFound\r\n}\r\n\r\nexport class FaucetStore {\r\n // send request to faucet\r\n @observable send_addr: string = \"\";\r\n @observable send_access_mana_node_id: string = \"\";\r\n @observable send_consensus_mana_node_id: string = \"\";\r\n @observable sending: boolean = false;\r\n @observable sendResult: SendResult = null;\r\n @observable query_error: string = \"\";\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n }\r\n\r\n sendReq = async () => {\r\n this.updateSending(true);\r\n try {\r\n // send request\r\n let res = await fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);\r\n if (res.status !== 200) {\r\n this.updateQueryError(QueryError.NotFound);\r\n return;\r\n }\r\n let result: SendResult = await res.json();\r\n setTimeout(() => {\r\n this.updateSendResult(result);\r\n }, 2000);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n updateSendResult = (result: SendResult) => {\r\n this.sending = false;\r\n this.sendResult = result;\r\n this.routerStore.history.push(`/explorer/address/${this.send_addr}`);\r\n };\r\n\r\n @action\r\n updateSend = (send_addr: string) => {\r\n this.send_addr = send_addr;\r\n };\r\n\r\n @action\r\n updateSendAccessManaNodeID = (access_mana: string) => {\r\n this.send_access_mana_node_id = access_mana;\r\n }\r\n\r\n @action\r\n updateSendConsensusManaNodeID = (consensus_mana: string) => {\r\n this.send_consensus_mana_node_id = consensus_mana;\r\n }\r\n\r\n @action\r\n updateSending = (sending: boolean) => {\r\n this.sending = sending;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n reset = () => {\r\n this.send_addr = null;\r\n this.send_access_mana_node_id = \"\";\r\n this.send_consensus_mana_node_id = \"\";\r\n this.sending = false;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.sending = false;\r\n this.query_error = err;\r\n };\r\n}\r\n\r\nexport default FaucetStore;\r\n","import { action, observable, ObservableMap } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { default as Viva } from 'vivagraphjs';\r\nimport { Block } from './ExplorerStore';\r\n\r\nexport class Vertex {\r\n id: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n is_tip: boolean;\r\n is_blk_confirmed: boolean;\r\n is_tx_accepted: boolean;\r\n is_tx: boolean;\r\n}\r\n\r\nexport class TipInfo {\r\n id: string;\r\n is_tip: boolean;\r\n}\r\n\r\nclass history {\r\n vertices: Array;\r\n}\r\n\r\nconst COLOR = {\r\n BlockPending: \"#b9b7bd\",\r\n BlockConfirmed: \"#6c71c4\",\r\n TransactionPending: \"#393e46\",\r\n TransactionConfirmed: \"#fad02c\",\r\n Tip: \"#cb4b16\",\r\n Unknown: \"#b58900\",\r\n Line: \"#586e75\",\r\n SelectedPastConeLine: \"#e105f5\",\r\n SelectedFutureConeLine: \"#51e05d\",\r\n Selected: \"#859900\"\r\n}\r\n\r\nconst vertexSize = 20;\r\n\r\nexport class VisualizerStore {\r\n @observable vertices = new ObservableMap();\r\n @observable verticesLimit = 1500;\r\n @observable finalized_count = 0;\r\n @observable tips_count = 0;\r\n verticesIncomingOrder = [];\r\n draw: boolean = false;\r\n routerStore: RouterStore;\r\n\r\n // the currently selected vertex via hover\r\n @observable selected: Vertex;\r\n selected_via_click: boolean = false;\r\n selected_origin_color: number = 0;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n\r\n // viva graph objs\r\n graph;\r\n graphics;\r\n renderer;\r\n @observable paused: boolean = false;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Vertex, this.addVertex);\r\n registerHandler(WSMsgType.TipInfo, this.addTipInfo);\r\n registerHandler(WSMsgType.TXAccepted, this.updateTxStatus);\r\n // this.fetchHistory();\r\n }\r\n\r\n fetchHistory = async () => {\r\n try {\r\n let res = await fetch(`/api/visualizer/history`);\r\n let history: history = await res.json();\r\n history.vertices.forEach(v => {\r\n this.addVertex(v);\r\n });\r\n } catch (err) {\r\n console.log(\"Fail to fetch history in visualizer\", err);\r\n }\r\n return\r\n }\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search.trim();\r\n }\r\n\r\n @action\r\n searchAndHighlight = () => {\r\n this.clearSelected();\r\n if (!this.search) return;\r\n let iter: IterableIterator = this.vertices.keys();\r\n let found = null;\r\n for (const key of iter) {\r\n if (key.indexOf(this.search) >= 0) {\r\n found = key;\r\n break;\r\n }\r\n }\r\n if (!found) return;\r\n this.updateSelected(this.vertices.get(found), false);\r\n }\r\n\r\n @action\r\n pauseResume = () => {\r\n if (this.paused) {\r\n this.renderer.resume();\r\n this.paused = false;\r\n return;\r\n }\r\n this.renderer.pause();\r\n this.paused = true;\r\n }\r\n\r\n @action\r\n updateVerticesLimit = (num: number) => {\r\n this.verticesLimit = num;\r\n }\r\n\r\n @action\r\n updateTxStatus = (vert: Vertex) => { \r\n let existing = this.vertices.get(vert.id);\r\n if (!existing) {\r\n return\r\n }\r\n\r\n existing.is_tx_accepted = vert.is_tx_accepted;\r\n this.vertices.set(vert.id, existing);\r\n\r\n if (this.draw) {\r\n this.drawVertex(existing);\r\n }\r\n }\r\n\r\n @action\r\n addVertex = (vert: Vertex) => {\r\n let existing = this.vertices.get(vert.id);\r\n if (existing) {\r\n if (!existing.is_blk_confirmed && vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n } else {\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n this.verticesIncomingOrder.push(vert.id);\r\n this.checkLimit();\r\n }\r\n\r\n this.vertices.set(vert.id, vert);\r\n\r\n if (this.draw) {\r\n this.drawVertex(vert);\r\n }\r\n };\r\n\r\n @action\r\n addTipInfo = async (tipInfo: TipInfo) => {\r\n let v = this.vertices.get(tipInfo.id);\r\n if (!v) {\r\n v = new Vertex();\r\n v.id = tipInfo.id;\r\n\r\n // first seen as tip, get parents info\r\n let res = await fetch(`/api/block/${tipInfo.id}`);\r\n if (res.status === 200) {\r\n let blk: Block = await res.json();\r\n v.strongParents = blk.strongParents;\r\n v.weakParents = blk.weakParents;\r\n v.shallowLikedParents = blk.shallowLikedParents;\r\n v.is_blk_confirmed = blk.acceptance;\r\n }\r\n this.verticesIncomingOrder.push(v.id);\r\n }\r\n\r\n this.tips_count += tipInfo.is_tip ? 1 : v.is_tip ? -1 : 0;\r\n v.is_tip = tipInfo.is_tip;\r\n this.vertices.set(tipInfo.id, v);\r\n\r\n if (this.draw) {\r\n this.drawVertex(v);\r\n }\r\n };\r\n\r\n @action\r\n checkLimit = () => {\r\n while (this.verticesIncomingOrder.length > this.verticesLimit) {\r\n let deleteId = this.verticesIncomingOrder.shift();\r\n let vert = this.vertices.get(deleteId);\r\n // make sure we remove any markings if the vertex gets deleted\r\n if (this.selected && deleteId === this.selected.id) {\r\n this.clearSelected();\r\n }\r\n if (this.draw) {\r\n this.graph.removeNode(deleteId);\r\n }\r\n if (!vert) {\r\n continue;\r\n }\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count--;\r\n }\r\n if (vert.is_tip) {\r\n this.tips_count--;\r\n }\r\n this.vertices.delete(deleteId);\r\n }\r\n }\r\n\r\n drawVertex = (vert: Vertex) => {\r\n let node = this.graph.getNode(vert.id);\r\n if (node) {\r\n // update coloring\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n nodeUI.color = parseColor(this.colorForVertexState(vert));\r\n } else {\r\n node = this.graph.addNode(vert.id, vert);\r\n }\r\n\r\n if (vert.strongParents) {\r\n this.linkParents(vert, node, vert.strongParents)\r\n }\r\n\r\n if (vert.weakParents) {\r\n this.linkParents(vert, node, vert.weakParents)\r\n }\r\n\r\n if (vert.shallowLikedParents) {\r\n this.linkParents(vert, node, vert.shallowLikedParents)\r\n }\r\n }\r\n\r\n linkParents = (vert: Vertex, node: any, parents: Array) => {\r\n parents.forEach((value) => {\r\n // if value is valid AND (links is empty OR there is no between parent and children)\r\n if (value && ((!node.links || !node.links.some(link => link.fromId === value)))) {\r\n // draw the link only when the parent exists\r\n let parent = this.graph.getNode(value);\r\n if (parent) {\r\n this.graph.addLink(value, vert.id);\r\n } else {\r\n console.log(\"link not added, parent doesn't exist\", value);\r\n }\r\n }\r\n })\r\n }\r\n\r\n colorForVertexState = (vert: Vertex) => {\r\n if (!vert) {\r\n return COLOR.Unknown;\r\n }\r\n\r\n // finalized\r\n if (vert.is_blk_confirmed) {\r\n if (vert.is_tx) {\r\n if (vert.is_tx_accepted) {\r\n return COLOR.TransactionConfirmed;\r\n } else {\r\n return COLOR.TransactionPending;\r\n } \r\n }\r\n return COLOR.BlockConfirmed;\r\n }\r\n\r\n if (vert.is_tip) {\r\n return COLOR.Tip;\r\n }\r\n\r\n // pending\r\n if (vert.is_tx) {\r\n return COLOR.TransactionPending\r\n }\r\n return COLOR.BlockPending;\r\n }\r\n\r\n start = () => {\r\n this.draw = true;\r\n this.graph = Viva.Graph.graph();\r\n\r\n let graphics: any = Viva.Graph.View.webglGraphics();\r\n\r\n const layout = Viva.Graph.Layout.forceDirected(this.graph, {\r\n springLength: 10,\r\n springCoeff: 0.0001,\r\n stableThreshold: 0.15,\r\n gravity: -2,\r\n dragCoeff: 0.02,\r\n timeStep: 20,\r\n theta: 0.8,\r\n });\r\n\r\n graphics.node((node) => {\r\n if (!node.data) {\r\n return Viva.Graph.View.webglSquare(10, this.colorForVertexState(node.data));\r\n }\r\n return Viva.Graph.View.webglSquare(vertexSize, this.colorForVertexState(node.data));\r\n })\r\n graphics.link(() => Viva.Graph.View.webglLine(COLOR.Line));\r\n let ele = document.getElementById('visualizer');\r\n this.renderer = Viva.Graph.View.renderer(this.graph, {\r\n container: ele, graphics, layout,\r\n });\r\n\r\n let events = Viva.Graph.webglInputEvents(graphics, this.graph);\r\n\r\n events.mouseEnter((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data);\r\n }).mouseLeave((node) => {\r\n this.clearSelected(false);\r\n });\r\n\r\n events.click((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data, true);\r\n });\r\n\r\n this.graphics = graphics;\r\n this.renderer.run();\r\n\r\n // draw vertices by order\r\n this.verticesIncomingOrder.forEach((id) => {\r\n let v = this.vertices.get(id);\r\n if (v) {\r\n this.drawVertex(v);\r\n }\r\n })\r\n }\r\n\r\n stop = () => {\r\n this.draw = false;\r\n this.renderer.dispose();\r\n this.graph = null;\r\n this.paused = false;\r\n this.selected = null;\r\n }\r\n\r\n @action\r\n updateSelected = (vert: Vertex, viaClick?: boolean) => {\r\n if (!vert) return;\r\n\r\n this.selected = vert;\r\n this.selected_via_click = !!viaClick;\r\n\r\n // mutate links\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n this.selected_origin_color = nodeUI.color\r\n nodeUI.color = parseColor(COLOR.Selected);\r\n nodeUI.size = vertexSize * 1.5;\r\n\r\n let node = this.graph.getNode(vert.id);\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedFutureConeLine);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedPastConeLine);\r\n },\r\n seenForward\r\n );\r\n }\r\n\r\n resetLinks = () => {\r\n this.graph.forEachLink(function (link) {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n });\r\n }\r\n\r\n @action\r\n clearSelected = (force_clear?: boolean) => {\r\n if (!this.selected || (this.selected_via_click && !force_clear)) {\r\n return;\r\n }\r\n\r\n // clear link highlight\r\n let node = this.graph.getNode(this.selected.id);\r\n if (!node) {\r\n // clear links\r\n this.resetLinks();\r\n return;\r\n }\r\n\r\n let nodeUI = this.graphics.getNodeUI(this.selected.id);\r\n nodeUI.color = this.selected_origin_color;\r\n nodeUI.size = vertexSize;\r\n\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenForward\r\n );\r\n\r\n this.selected = null;\r\n this.selected_via_click = false;\r\n }\r\n\r\n}\r\n\r\nexport default VisualizerStore;\r\n\r\n// copied over and refactored from https://github.com/glumb/IOTAtangle\r\nfunction dfsIterator(graph, node, cb, up, cbLinks: any = false, seenNodes = []) {\r\n seenNodes.push(node);\r\n let pointer = 0;\r\n\r\n while (seenNodes.length > pointer) {\r\n const node = seenNodes[pointer++];\r\n\r\n if (cb(node)) return true;\r\n\r\n if (!node.links) {\r\n return\r\n }\r\n\r\n for (const link of node.links) {\r\n // parents\r\n if (!up && link.toId === node.id && !seenNodes.includes(graph.getNode(link.fromId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.fromId));\r\n continue;\r\n }\r\n\r\n // children\r\n if (up && link.fromId === node.id && !seenNodes.includes(graph.getNode(link.toId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.toId));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction parseColor(color): any {\r\n let parsedColor = 0x009ee8ff;\r\n\r\n if (typeof color === 'number') {\r\n return color;\r\n }\r\n\r\n if (typeof color === 'string' && color) {\r\n if (color.length === 4) {\r\n // #rgb, duplicate each letter except first #.\r\n color = color.replace(/([^#])/g, '$1$1');\r\n }\r\n if (color.length === 9) {\r\n // #rrggbbaa\r\n parsedColor = parseInt(color.substr(1), 16);\r\n } else if (color.length === 7) {\r\n // or #rrggbb.\r\n parsedColor = (parseInt(color.substr(1), 16) << 8) | 0xff;\r\n } else {\r\n throw 'Color expected in hex format with preceding \"#\". E.g. #00ff00. Got value: ' + color;\r\n }\r\n }\r\n\r\n return parsedColor;\r\n}\r\n","import {action, computed, observable} from 'mobx';\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Col, ListGroupItem, OverlayTrigger, Popover, Row} from \"react-bootstrap\";\nimport Plus from \"../../assets/plus.svg\";\nimport Minus from \"../../assets/minus.svg\";\nimport {displayManaUnit} from \"../utils\";\n\nclass ManaBlk {\n nodeID: string;\n access: number;\n consensus: number;\n // in s?\n time: number;\n}\n\nexport class Node {\n shortNodeID: string;\n nodeID: string;\n mana: number;\n}\n\nclass NetworkManaBlk {\n manaType: string;\n totalMana: number;\n nodes: Array;\n}\n\nexport class AllowedPledgeIDsBlk {\n accessFilter: PledgeIDFilter;\n consensusFilter: PledgeIDFilter;\n}\n\nexport class PledgeIDFilter {\n enabled: boolean;\n allowedNodeIDs: Array;\n}\n\nexport class AllowedNodeStr {\n shortID: string;\n fullID: string;\n}\n\nclass PledgeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass RevokeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass ManaEvent {\n nodeID: string;\n time: Date;\n txID: string;\n\n constructor(nodeID: string, time: Date, txID: string) {\n this.nodeID = nodeID;\n this.time = time;\n this.txID = txID;\n }\n}\n\nclass PledgeEvent extends ManaEvent{\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nclass RevokeEvent extends ManaEvent {\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nconst emptyRow = (\n There are no nodes to view with the current search parameters.\n)\nconst emptyListItem = (\n There are no events to view with the current search parameters.)\n\n// every 10 seconds, a new value arrives, so this is roughly 17 mins\nconst maxStoredManaValues = 100;\n// number of previous pledge/revoke events we keep track of. (/2 of plugins/dashboard/maxManaEventsBufferSize)\nconst maxEventsStored = 100;\n\nexport class ManaStore {\n // mana values\n @observable manaValues: Array = [];\n // first is accessm second consensus\n @observable prevManaValues: Array = [0,0];\n // list of richest access mana nodes in network, sorted in descending order\n @observable accessNetworkRichest: Array = [];\n @observable totalAccessNetwork: number = 0.0;\n // list of richest active access mana nodes in the network, sorted in descending order\n @observable accessActiveRichest: Array = [];\n @observable totalAccessActive: number = 0.0;\n // list of richest consensus mana nodes in their network, sorted in descending order\n @observable consensusNetworkRichest: Array = [];\n @observable totalConsensusNetwork: number = 0.0;\n // list of richest active consensus mana nodes in their network, sorted in descending order\n @observable consensusActiveRichest: Array = [];\n @observable totalConsensusActive: number = 0.0;\n\n @observable public searchNode = \"\";\n @observable public searchTxID = \"\";\n\n @observable public allowedPledgeIDs: AllowedPledgeIDsBlk;\n\n // internal arrays to store mana events\n accessEvents: Array = [];\n consensusEvents: Array = [];\n\n // internal arrays to store initial mana events\n initAccessEvents: Array = [];\n initConsensusEvents: Array = [];\n\n // info on latest removed events\n @observable lastRemovedAccessEventTime: Date = null;\n @observable lastRemovedConsensusEventTime: Date = null;\n\n lastInitRemovedAccessEventTime: Date = null;\n lastInitRemovedConsensusEventTime: Date = null;\n\n // only update displayed events when initial arrays were modified\n eventsUpdated: boolean = false;\n\n // mana events displayed in frontend\n @observable displayedAccessEvents: Array = [];\n @observable displayedConsensusEvents: Array = [];\n\n ownID: string;\n\n nodeNotSyncedListItem = (Wait for node to be synced to display mana events.);\n\n constructor() {\n this.manaValues = [];\n\n registerHandler(WSMsgType.Mana, this.addNewManaValue);\n registerHandler(WSMsgType.ManaMapOverall, this.updateNetworkRichest);\n registerHandler(WSMsgType.ManaMapOnline, this.updateActiveRichest);\n // registerHandler(WSMsgType.ManaAllowedPledge, this.updateAllowedPledgeIDs);\n // registerHandler(WSMsgType.ManaInitPledge, this.addNewInitPledge);\n // registerHandler(WSMsgType.ManaInitRevoke, this.addNewInitRevoke);\n // registerHandler(WSMsgType.ManaInitDone, this.initDone);\n // registerHandler(WSMsgType.ManaPledge, this.addNewPledge);\n // registerHandler(WSMsgType.ManaRevoke, this.addNewRevoke);\n };\n\n @action\n updateNodeSearch(searchNode: string): void {\n this.searchNode = searchNode.trim();\n }\n\n @action\n updateTxSearch(searchTxID: string): void {\n this.searchTxID = searchTxID.trim();\n }\n\n @action\n addNewManaValue = (manaBlk: ManaBlk) => {\n this.ownID = this.ownID? this.ownID : manaBlk.nodeID;\n if (this.manaValues.length === maxStoredManaValues) {\n // shift if we already have enough values\n this.manaValues.shift();\n }\n let newManaData = [new Date(manaBlk.time*1000), manaBlk.access, manaBlk.consensus];\n if (this.manaValues.length > 0){\n this.prevManaValues = [this.manaValues[this.manaValues.length -1][1] , this.manaValues[this.manaValues.length -1][2]]\n }\n this.manaValues.push(newManaData);\n }\n\n @action\n updateNetworkRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessNetwork = blk.totalMana;\n this.accessNetworkRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusNetwork = blk.totalMana;\n this.consensusNetworkRichest = blk.nodes;\n break;\n }\n }\n\n @action\n updateActiveRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessActive = blk.totalMana;\n this.accessActiveRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusActive = blk.totalMana;\n this.consensusActiveRichest = blk.nodes;\n break;\n }\n };\n\n @action\n updateAllowedPledgeIDs = (blk: AllowedPledgeIDsBlk) => {\n this.allowedPledgeIDs = blk;\n }\n\n @action\n addNewInitPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.initAccessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n }\n\n @action\n addNewPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.accessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n addNewInitRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n }\n\n @action\n addNewRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n initDone = () => {\n this.accessEvents = this.initAccessEvents;\n this.lastRemovedAccessEventTime = this.lastInitRemovedAccessEventTime;\n this.consensusEvents= this.initConsensusEvents;\n this.lastRemovedConsensusEventTime = this.lastInitRemovedConsensusEventTime;\n\n this.displayedAccessEvents = [...this.accessEvents]\n this.displayedConsensusEvents = [...this.consensusEvents]\n\n setInterval(() => {\n if (this.eventsUpdated) {\n this.displayedAccessEvents = [...this.accessEvents];\n this.displayedConsensusEvents = [...this.consensusEvents];\n this.eventsUpdated = false;\n }\n }, 500)\n }\n\n nodeList = (leaderBoard: Array, manaSum: number) => {\n if (leaderBoard === null || leaderBoard == undefined) {\n return []\n }\n let feed = [];\n let pushToFeed = (node: Node, i: number) => {\n feed.push(\n \n {i + 1} \n {node.shortNodeID}\n {displayManaUnit(node.mana)}\n {((node.mana / manaSum)*100.0).toFixed(2)}%\n \n );\n };\n let callback = (node: Node, i: number) => {\n if (this.passesNodeFilter(node.shortNodeID)){\n pushToFeed(node, i);\n }\n };\n leaderBoard.forEach(callback);\n return feed\n }\n\n @computed\n get networkRichestFeedAccess() {\n let result = this.nodeList(this.accessNetworkRichest, this.totalAccessNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get networkRichestFeedConsensus() {\n let result = this.nodeList(this.consensusNetworkRichest, this.totalConsensusNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedAccess() {\n let result = this.nodeList(this.accessActiveRichest, this.totalAccessActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedConsensus() {\n let result = this.nodeList(this.consensusActiveRichest, this.totalConsensusActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get accessHistogramInput() {\n if (this.accessNetworkRichest === undefined || this.accessNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.accessNetworkRichest.length; i++) {\n histInput.push(\n [this.accessNetworkRichest[i].shortNodeID, Math.log10(this.accessNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get consensusHistogramInput() {\n if (this.consensusNetworkRichest === undefined || this.consensusNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.consensusNetworkRichest.length; i++) {\n histInput.push(\n [this.consensusNetworkRichest[i].shortNodeID, Math.log10(this.consensusNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get accessPercentile() {\n let per = 0.0;\n // find id\n if (this.accessNetworkRichest !== undefined && this.accessNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.accessNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.accessNetworkRichest.length - (index + 1)) / this.accessNetworkRichest.length) * 100;\n break;\n }\n }\n return per\n }\n\n @computed\n get consensusPercentile() {\n let per = 0.0;\n // find id\n if ( this.consensusNetworkRichest !== undefined && this.consensusNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.consensusNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.consensusNetworkRichest.length - (index +1)) / this.consensusNetworkRichest.length) * 100;\n }\n }\n return per\n }\n\n computeEventList = (evArr: Array) => {\n let result = [];\n result.push(\n \n \n \n \n \n NodeID\n \n \n Tx ID\n \n \n Time\n \n \n \n )\n if (evArr === undefined || evArr === null) {\n return result\n }\n let pushToEventFeed = (element: ManaEvent, index) => {\n if (element instanceof PledgeEvent) {\n let popover = (ev: PledgeEvent) => {\n return (\n \n Mana Pledged\n \n
Base Mana: +{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
To NodeID: {ev.nodeID}
\n
Time of Pledge: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Plus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n } else if (element instanceof RevokeEvent){\n let popover = (ev: RevokeEvent) => {\n return (\n \n Mana Revoked\n \n
Base Mana 1: -{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
From NodeID: {ev.nodeID}
\n
Time of Revoke: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n // it's a revoke event then\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Minus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n }\n };\n // && this.passesTimeFilter(event.time) {\n let callback = (event: ManaEvent, i: number) => {\n if (this.passesNodeFilter(event.nodeID) && this.passesTxFilter(event.txID)){\n pushToEventFeed(event, i);\n }\n };\n // reverse traverse bc oldest event is the first\n evArr.reverse().forEach(callback)\n return result;\n }\n\n @computed\n get accessEventList() {\n let result = this.computeEventList(this.displayedAccessEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n @computed\n get consensusEventList() {\n let result = this.computeEventList(this.displayedConsensusEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n passesNodeFilter = (nodeID: string) : boolean => {\n if (this.searchNode.trim().length === 0) {\n // node filter is disabled, anything passes the filter\n return true;\n } else if (nodeID.toLowerCase().includes(this.searchNode.toLowerCase())){\n // node filter is enabled, nodeID contains search term\n return true;\n }\n // filter enabled but nodeID doesn't pass\n return false;\n }\n\n passesTxFilter = (txID: string) : boolean => {\n if (this.searchTxID.trim().length === 0) {\n // txID filter is disabled, anything passes the filter\n return true;\n } else if (txID.toLowerCase().includes(this.searchTxID.toLowerCase())){\n // txID filter is enabled, txID contains search term\n return true;\n }\n // filter enabled but txID doesn't pass\n return false;\n }\n}\n\nexport default ManaStore;\n","import {computed, action, observable} from \"mobx\";\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Link} from 'react-router-dom';\n\nconst liveFeedSize = 100;\n\nexport class SlotInfo {\n index: number;\n id: string;\n}\n\nexport class SlotStore {\n @observable liveFeed: Array = [];\n\n constructor() {\n registerHandler(WSMsgType.SlotInfo, this.addLiveFeed);\n }\n\n @action addLiveFeed = async (info: SlotInfo) => {\n if (this.liveFeed.findIndex((t) => t.id == info.id) === -1) {\n if (this.liveFeed.length >= liveFeedSize) {\n this.liveFeed.shift();\n }\n this.liveFeed.push(info);\n }\n }\n\n @computed\n get slotLiveFeed() {\n let feed = [];\n for (let i = this.liveFeed.length - 1; i >= 0; i--) {\n let info = this.liveFeed[i];\n feed.push(\n \n \n {info.index}\n \n \n \n {info.id}\n \n \n \n );\n }\n return feed;\n }\n}","import {action, computed, observable} from 'mobx';\r\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\r\nimport * as React from \"react\";\r\nimport {RouterStore,} from \"mobx-react-router\";\r\nimport {Link} from \"react-router-dom\";\r\nimport NodeStore from './NodeStore';\r\nimport {Table} from \"react-bootstrap\";\r\nimport {ConfirmationState, resolveConfirmationState} from \"../utils/confirmation_state\";\r\n\r\nexport class ConflictSet {\r\n conflictSetID: string;\r\n arrivalTime: number;\r\n resolved: boolean;\r\n timeToResolve: number;\r\n shown: boolean;\r\n}\r\n\r\nexport class Conflict {\r\n conflictID: string;\r\n conflictSetIDs: Array;\r\n confirmationState: number;\r\n issuingTime: number;\r\n issuerNodeID: string;\r\n}\r\n\r\n// const liveFeedSize = 10;\r\n\r\nexport class ConflictsStore {\r\n // live feed\r\n @observable conflictSets: Map;\r\n @observable conflicts: Map;\r\n \r\n routerStore: RouterStore;\r\n nodeStore: NodeStore;\r\n\r\n constructor(routerStore: RouterStore, nodeStore: NodeStore) {\r\n this.routerStore = routerStore;\r\n this.nodeStore = nodeStore;\r\n this.conflictSets = new Map;\r\n this.conflicts = new Map;\r\n registerHandler(WSMsgType.ConflictSet, this.updateConflictSets);\r\n registerHandler(WSMsgType.Conflict, this.updateConflicts);\r\n }\r\n\r\n @action\r\n updateConflictSets = (blk: ConflictSet) => {\r\n this.conflictSets.set(blk.conflictSetID, blk);\r\n };\r\n\r\n @action\r\n updateConflicts = (blk: Conflict) => {\r\n this.conflicts.set(blk.conflictID, blk);\r\n };\r\n \r\n @computed\r\n get conflictsLiveFeed() {\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let conflictsArr = Array.from(this.conflictSets.values());\r\n conflictsArr.sort((x: ConflictSet, y: ConflictSet): number => {\r\n return y.arrivalTime - x.arrivalTime || x.conflictSetID.localeCompare(y.conflictSetID);\r\n }\r\n )\r\n\r\n let feed = [];\r\n for (let conflict of conflictsArr) {\r\n feed.push(\r\n conflict.shown = !conflict.shown} style={{cursor:\"pointer\"}}>\r\n \r\n \r\n {conflict.conflictSetID}\r\n \r\n \r\n \r\n {new Date(conflict.arrivalTime * 1000).toLocaleString()}\r\n \r\n \r\n {conflict.resolved ? 'Yes' : 'No'}\r\n \r\n \r\n {conflict.timeToResolve/1000000}\r\n \r\n \r\n );\r\n\r\n // only render and show branches if it has been clicked\r\n if (!conflict.shown) {\r\n continue\r\n }\r\n\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let branchesArr = Array.from(this.conflicts.values());\r\n branchesArr.sort((x: Conflict, y: Conflict): number => {\r\n return x.issuingTime - y.issuingTime || x.conflictID.localeCompare(y.conflictID)\r\n }\r\n )\r\n\r\n let branches = [];\r\n for (let branch of branchesArr) {\r\n for(let conflictID of branch.conflictSetIDs){\r\n if (conflictID === conflict.conflictSetID) {\r\n branches.push(\r\n ConfirmationState.Accepted ? \"table-success\" : \"\"}>\r\n \r\n \r\n {branch.conflictID}\r\n \r\n \r\n {resolveConfirmationState(branch.confirmationState)}\r\n {new Date(branch.issuingTime * 1000).toLocaleString()}\r\n {branch.issuerNodeID}\r\n \r\n );\r\n }\r\n }\r\n }\r\n feed.push(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {branches}\r\n \r\n
BranchIDConfirmationStateIssuingTimeIssuer NodeID
\r\n \r\n \r\n );\r\n }\r\n\r\n return feed;\r\n }\r\n\r\n}\r\n\r\nexport default ConflictsStore;\r\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {Provider} from 'mobx-react';\nimport {createBrowserHistory} from 'history';\nimport 'chartjs-plugin-streaming';\nimport {App} from './app/App';\nimport {RouterStore, syncHistoryWithStore} from 'mobx-react-router';\nimport {Router} from 'react-router-dom';\nimport NodeStore from \"./app/stores/NodeStore\";\nimport ExplorerStore from \"./app/stores/ExplorerStore\";\nimport FaucetStore from \"./app/stores/FaucetStore\";\nimport VisualizerStore from \"./app/stores/VisualizerStore\";\nimport ManaStore from \"./app/stores/ManaStore\";\nimport {SlotStore} from \"./app/stores/SlotStore\";\nimport ConflictsStore from \"./app/stores/ConflictsStore\";\n\n// prepare MobX stores\nconst routerStore = new RouterStore();\nconst nodeStore = new NodeStore();\nconst explorerStore = new ExplorerStore(routerStore);\nconst conflictsStore = new ConflictsStore(routerStore, nodeStore);\nconst faucetStore = new FaucetStore(routerStore);\nconst visualizerStore = new VisualizerStore(routerStore);\nconst manaStore = new ManaStore();\nconst slotStore = new SlotStore();\nconst stores = {\n \"routerStore\": routerStore,\n \"nodeStore\": nodeStore,\n \"explorerStore\": explorerStore,\n \"conflictsStore\": conflictsStore,\n \"faucetStore\": faucetStore,\n \"visualizerStore\": visualizerStore,\n \"manaStore\": manaStore,\n \"slotStore\": slotStore\n};\n\nconst browserHistory = createBrowserHistory();\nconst history = syncHistoryWithStore(browserHistory, routerStore);\n\n// render react DOM\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/dashboard/frontend/build/index.html b/components/dashboard/frontend/build/index.html index e745619e5..a644c730c 100644 --- a/components/dashboard/frontend/build/index.html +++ b/components/dashboard/frontend/build/index.html @@ -1 +1 @@ - iota-core Dashboard
\ No newline at end of file + iota-core Dashboard
\ No newline at end of file diff --git a/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx index a8bb32b61..c8ef4d968 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx @@ -222,10 +222,10 @@ class OutputMeta extends React.Component { let pendingMana = this.props.pendingMana; return ( - ConflictIDs: + spendIDs: { - metadata.conflictIDs.map((value, index) => { + metadata.spendIDs.map((value, index) => { return ( diff --git a/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx index 4cda33eb9..a09f118ba 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx @@ -124,10 +124,10 @@ export class ExplorerBlockQueryResult extends React.Component { Sequence Number: {blk.sequenceNumber} - ConflictIDs: + spendIDs: { - blk.conflictIDs.map((value, index) => { + blk.spendIDs.map((value, index) => { return ( @@ -141,10 +141,10 @@ export class ExplorerBlockQueryResult extends React.Component { - AddedConflictIDs: + AddedspendIDs: { - blk.addedConflictIDs.map((value, index) => { + blk.addedSpendIDs.map((value, index) => { return ( @@ -158,10 +158,10 @@ export class ExplorerBlockQueryResult extends React.Component { - SubtractedConflictIDs: + SubtractedspendIDs: { - blk.subtractedConflictIDs.map((value, index) => { + blk.subtractedSpendIDs.map((value, index) => { return ( diff --git a/components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx index b8dd33d2b..91ccf469f 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx @@ -55,8 +55,8 @@ export class ExplorerConflictQueryResult extends React.Component { {Conflicts: - {conflict.conflictIDs && - {conflict.conflictIDs.map((c,i) => {c})} + {conflict.spendIDs && + {conflict.spendIDs.map((c,i) => {c})} } } ConfirmationState: {resolveConfirmationState(conflict.confirmationState)} @@ -70,7 +70,7 @@ export class ExplorerConflictQueryResult extends React.Component { {conflictConflicts.conflicts.map((c,i) =>
OutputID: {c.outputID.base58} - {c.conflictIDs.map((b,j) => + {c.spendIDs.map((b,j) => {resolveBase58ConflictID(b)} )} diff --git a/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx index 8eac33186..49e0a6e36 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx @@ -76,10 +76,10 @@ export class ExplorerOutputQueryResult extends React.Component { {outputMetadata &&
Transaction ID: {outputMetadata.outputID.transactionID} - ConflictIDs: + spendIDs: { - outputMetadata.conflictIDs.map((value, index) => { + outputMetadata.spendIDs.map((value, index) => { return ( diff --git a/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx b/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx index d9ddf8303..0fe2e33f6 100644 --- a/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx +++ b/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx @@ -34,9 +34,9 @@ export class Block { weakChildren: Array; shallowLikeChildren: Array; solid: boolean; - conflictIDs: Array; - addedConflictIDs: Array; - subtractedConflictIDs: Array; + spendIDs: Array; + addedSpendIDs: Array; + subtractedSpendIDs: Array; scheduled: boolean; booked: boolean; orphaned: boolean; @@ -88,7 +88,7 @@ class OutputID { export class OutputMetadata { outputID: OutputID; - conflictIDs: Array; + spendIDs: Array; consumerCount: number; confirmedConsumer: string // tx id of confirmed consumer confirmationState: number @@ -107,7 +107,7 @@ class OutputConsumers { class TransactionMetadata { transactionID: string; - conflictIDs: string[]; + spendIDs: string[]; booked: boolean; bookedTime: number; confirmationState: string; @@ -124,7 +124,7 @@ class PendingMana { class Conflict { id: string; parents: Array; - conflictIDs: Array; + spendIDs: Array; confirmationState: number; } @@ -140,7 +140,7 @@ class ConflictChild { class ConflictConflict { outputID: OutputID; - conflictIDs: Array; + spendIDs: Array; } class ConflictConflicts { @@ -411,9 +411,9 @@ export class ExplorerStore { @action updateBlock = (blk: Block) => { this.blk = blk; - this.blk.conflictIDs = this.blk.conflictIDs ? this.blk.conflictIDs : [] - this.blk.addedConflictIDs = this.blk.addedConflictIDs ? this.blk.addedConflictIDs : [] - this.blk.subtractedConflictIDs = this.blk.subtractedConflictIDs ? this.blk.subtractedConflictIDs : [] + this.blk.spendIDs = this.blk.spendIDs ? this.blk.spendIDs : [] + this.blk.addedSpendIDs = this.blk.addedSpendIDs ? this.blk.addedSpendIDs : [] + this.blk.subtractedSpendIDs = this.blk.subtractedSpendIDs ? this.blk.subtractedSpendIDs : [] this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : [] this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : [] this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : [] diff --git a/pkg/protocol/engine/mempool/spenddag/events.go b/pkg/protocol/engine/mempool/spenddag/events.go index 14d68bacc..1165b51e0 100644 --- a/pkg/protocol/engine/mempool/spenddag/events.go +++ b/pkg/protocol/engine/mempool/spenddag/events.go @@ -9,22 +9,22 @@ import ( // Events is a container that acts as a dictionary for the events of a SpendDAG. type Events[SpendID, ResourceID comparable] struct { - // SpendCreated is triggered when a new Conflict is created. + // SpendCreated is triggered when a new Spend is created. SpendCreated *event.Event1[SpendID] - // SpendEvicted is triggered when a Conflict is evicted from the SpendDAG. + // SpendEvicted is triggered when a Spend is evicted from the SpendDAG. SpendEvicted *event.Event1[SpendID] - // ConflictingResourcesAdded is triggered when the Conflict is added to a new ConflictSet. + // ConflictingResourcesAdded is triggered when the Spend is added to a new ConflictSet. ConflictingResourcesAdded *event.Event2[SpendID, ds.Set[ResourceID]] - // SpendParentsUpdated is triggered when the parents of a Conflict are updated. + // SpendParentsUpdated is triggered when the parents of a Spend are updated. SpendParentsUpdated *event.Event2[SpendID, ds.Set[SpendID]] - // SpendAccepted is an event that gets triggered whenever a Conflict is confirmed. + // SpendAccepted is an event that gets triggered whenever a Spend is confirmed. SpendAccepted *event.Event1[SpendID] - // SpendRejected is an event that gets triggered whenever a Conflict is rejected. + // SpendRejected is an event that gets triggered whenever a Spend is rejected. SpendRejected *event.Event1[SpendID] event.Group[Events[SpendID, ResourceID], *Events[SpendID, ResourceID]] diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go index d63bda286..8ce76b2e2 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go @@ -160,17 +160,17 @@ func (s *sortedSpend[SpendID, ResourceID, VoteRank]) weightUpdateApplied() bool } // queuePreferredInsteadUpdate notifies the sortedSet that the preferred instead flag of the Spend was updated. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queuePreferredInsteadUpdate(conflict *Spend[SpendID, ResourceID, VoteRank]) { +func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queuePreferredInsteadUpdate(spend *Spend[SpendID, ResourceID, VoteRank]) { s.preferredInsteadMutex.Lock() defer s.preferredInsteadMutex.Unlock() - if (s.queuedPreferredInstead == nil && s.currentPreferredInstead == conflict) || - (s.queuedPreferredInstead != nil && s.queuedPreferredInstead == conflict) || - s.sortedSet.owner.Spend == conflict { + if (s.queuedPreferredInstead == nil && s.currentPreferredInstead == spend) || + (s.queuedPreferredInstead != nil && s.queuedPreferredInstead == spend) || + s.sortedSet.owner.Spend == spend { return } - s.queuedPreferredInstead = conflict + s.queuedPreferredInstead = spend s.sortedSet.notifyPendingPreferredInsteadUpdate(s) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go index 359c25be8..b3c100e6a 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go @@ -267,14 +267,14 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyWeightUpdate(member * // fixMemberPosition fixes the position of the given member in the SortedSpends. func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPosition(member *sortedSpend[SpendID, ResourceID, VoteRank]) { - preferredConflict := member.PreferredInstead() + preferredSpend := member.PreferredInstead() memberIsPreferred := member.IsPreferred() // the member needs to be moved up in the list for currentMember := member.heavierMember; currentMember != nil && currentMember.Compare(member) == weight.Lighter; currentMember = member.heavierMember { s.swapNeighbors(member, currentMember) - if currentMember == s.heaviestPreferredMember && (preferredConflict == currentMember.Spend || memberIsPreferred || member == s.owner) { + if currentMember == s.heaviestPreferredMember && (preferredSpend == currentMember.Spend || memberIsPreferred || member == s.owner) { s.heaviestPreferredMember = member s.owner.setPreferredInstead(member.Spend) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go index b14ed0d8b..72728314d 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go @@ -74,8 +74,8 @@ type Spend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[V // likedInsteadMutex and structureMutex are sometimes locked in different order by different goroutines, which could result in a deadlock // however, it's impossible to deadlock if we fork all transactions upon booking - // deadlock happens when the likedInstead conflict changes and parents are updated at the same time, which is impossible in the current setup - // because we won't process votes on a conflict we're just creating. + // deadlock happens when the likedInstead spend changes and parents are updated at the same time, which is impossible in the current setup + // because we won't process votes on a spend we're just creating. // likedInsteadMutex is used to synchronize access to the liked instead value of the Spend. likedInsteadMutex syncutils.RWMutex @@ -117,7 +117,7 @@ func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp } }).Unhook - // in case the initial weight is enough to accept the conflict, accept it immediately + // in case the initial weight is enough to accept the spend, accept it immediately if threshold := c.acceptanceThreshold(); initialWeight.Value().ValidatorsWeight() >= threshold { c.setAcceptanceState(acceptance.Accepted) } @@ -127,7 +127,7 @@ func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp return c } -// JoinConflictSets registers the Spend with the given ConflictSets. +// JoinSpendSets registers the Spend with the given ConflictSets. func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(conflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]]) (joinedConflictSets ds.Set[ResourceID], err error) { if conflictSets == nil { return ds.NewSet[ResourceID](), nil @@ -282,8 +282,8 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Shutdown() { c.ConflictingSpends.Shutdown() } -// Evict cleans up the sortedConflict. -func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []SpendID) { +// Evict cleans up the sortedSpend. +func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedSpends []SpendID) { if firstEvictCall := !c.evicted.Swap(true); !firstEvictCall { return nil } @@ -293,24 +293,24 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []Spend switch c.Weight.AcceptanceState() { case acceptance.Rejected: // evict the entire future cone of rejected spends - c.Children.Range(func(childConflict *Spend[SpendID, ResourceID, VoteRank]) { - evictedConflicts = append(evictedConflicts, childConflict.Evict()...) + c.Children.Range(func(childSpend *Spend[SpendID, ResourceID, VoteRank]) { + evictedSpends = append(evictedSpends, childSpend.Evict()...) }) default: // remove evicted spend from parents of children (merge to master) - c.Children.Range(func(childConflict *Spend[SpendID, ResourceID, VoteRank]) { - childConflict.structureMutex.Lock() - defer childConflict.structureMutex.Unlock() + c.Children.Range(func(childSpend *Spend[SpendID, ResourceID, VoteRank]) { + childSpend.structureMutex.Lock() + defer childSpend.structureMutex.Unlock() - childConflict.removeParent(c) + childSpend.removeParent(c) }) } c.structureMutex.Lock() defer c.structureMutex.Unlock() - c.Parents.Range(func(parentConflict *Spend[SpendID, ResourceID, VoteRank]) { - parentConflict.unregisterChild(c) + c.Parents.Range(func(parentSpend *Spend[SpendID, ResourceID, VoteRank]) { + parentSpend.unregisterChild(c) }) c.Parents.Clear() @@ -319,13 +319,13 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []Spend }) c.ConflictSets.Clear() - for _, conflict := range c.ConflictingSpends.Shutdown() { - if conflict != c { - conflict.ConflictingSpends.Remove(c.ID) - c.ConflictingSpends.Remove(conflict.ID) + for _, spend := range c.ConflictingSpends.Shutdown() { + if spend != c { + spend.ConflictingSpends.Remove(c.ID) + c.ConflictingSpends.Remove(spend.ID) if c.IsAccepted() { - evictedConflicts = append(evictedConflicts, conflict.Evict()...) + evictedSpends = append(evictedSpends, spend.Evict()...) } } } @@ -340,9 +340,9 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedConflicts []Spend c.likedInsteadSources.Clear() c.preferredInstead = nil - evictedConflicts = append(evictedConflicts, c.ID) + evictedSpends = append(evictedSpends, c.ID) - return evictedConflicts + return evictedSpends } // Compare compares the Spend to the given other Spend. @@ -399,16 +399,16 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendI child.removeInheritedLikedInsteadReference(c, reference) }).Unhook, - c.LikedInsteadAdded.Hook(func(conflict *Spend[SpendID, ResourceID, VoteRank]) { + c.LikedInsteadAdded.Hook(func(spend *Spend[SpendID, ResourceID, VoteRank]) { child.structureMutex.Lock() defer child.structureMutex.Unlock() - child.addInheritedLikedInsteadReference(c, conflict) + child.addInheritedLikedInsteadReference(c, spend) }).Unhook, )) - for conflicts := c.likedInstead.Iterator(); conflicts.HasNext(); { - child.addInheritedLikedInsteadReference(c, conflicts.Next()) + for spends := c.likedInstead.Iterator(); spends.HasNext(); { + child.addInheritedLikedInsteadReference(c, spends.Next()) } if c.IsRejected() { diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go index deffa1faa..8aa17e264 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go @@ -24,19 +24,19 @@ type TestSpend = *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] //var NewTestSpend = NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func NewTestSpend(id iotago.TransactionID, parentConflicts ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { +func NewTestSpend(id iotago.TransactionID, parentSpends ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { spend := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) _, err := spend.JoinSpendSets(SpendSets) if err != nil { // TODO: change this panic(err) } - spend.UpdateParents(parentConflicts, ds.NewSet[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) + spend.UpdateParents(parentSpends, ds.NewSet[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) return spend } -func TestConflict_SetRejected(t *testing.T) { +func TestSpend_SetRejected(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -44,20 +44,20 @@ func TestConflict_SetRejected(t *testing.T) { return int64(weights.SeatCount()) }) - Spend1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Conflict2"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(Spend2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Spend1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Spend2"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Spend3"), ds.NewSet(Spend2), nil, weight.New(), pendingTasks, thresholdProvider) Spend1.setAcceptanceState(acceptance.Rejected) require.True(t, Spend1.IsRejected()) require.True(t, Spend2.IsRejected()) require.True(t, Spend3.IsRejected()) - Spend4 := NewTestSpend(transactionID("Conflict4"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) + Spend4 := NewTestSpend(transactionID("Spend4"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, Spend4.IsRejected()) } -func TestConflict_UpdateParents(t *testing.T) { +func TestSpend_UpdateParents(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -65,15 +65,15 @@ func TestConflict_UpdateParents(t *testing.T) { return int64(weights.SeatCount()) }) - Spend1 := NewTestSpend(transactionID("Conflict1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Conflict2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Conflict3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Spend1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Spend2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Spend3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, Spend3.Parents.Has(Spend1)) require.True(t, Spend3.Parents.Has(Spend2)) } -func TestConflict_SetAccepted(t *testing.T) { +func TestSpend_SetAccepted(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -82,12 +82,12 @@ func TestConflict_SetAccepted(t *testing.T) { }) { - SpendSet1 := NewTestConflictSet(id("ConflictSet1")) - SpendSet2 := NewTestConflictSet(id("ConflictSet2")) + ConflictSet1 := NewTestConflictSet(id("ConflictSet1")) + ConflictSet2 := NewTestConflictSet(id("ConflictSet2")) - Spend1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(ConflictSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(ConflictSet1, ConflictSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Spend3"), nil, ds.NewSet(ConflictSet2), weight.New(), pendingTasks, thresholdProvider) require.Equal(t, acceptance.Pending, Spend1.setAcceptanceState(acceptance.Accepted)) require.True(t, Spend1.IsAccepted()) @@ -106,9 +106,9 @@ func TestConflict_SetAccepted(t *testing.T) { SpendSet1 := NewTestConflictSet(id("ConflictSet1")) SpendSet2 := NewTestConflictSet(id("ConflictSet2")) - Spend1 := NewTestSpend(transactionID("Conflict1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Conflict2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Conflict3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Spend3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) Spend2.setAcceptanceState(acceptance.Accepted) require.True(t, Spend1.IsRejected()) @@ -117,7 +117,7 @@ func TestConflict_SetAccepted(t *testing.T) { } } -func TestConflict_SpendSets(t *testing.T) { +func TestSpend_ConflictSets(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -211,32 +211,32 @@ func TestConflict_SpendSets(t *testing.T) { assertCorrectOrder(t, SpendA, SpendB, SpendC, SpendD, SpendE, SpendF) } -func TestConflictParallel(t *testing.T) { +func TestSpendParallel(t *testing.T) { sequentialPendingTasks := syncutils.NewCounter() parallelPendingTasks := syncutils.NewCounter() - sequentialConflicts := createConflicts(sequentialPendingTasks) + sequentialSpends := createSpends(sequentialPendingTasks) sequentialPendingTasks.WaitIsZero() - parallelConflicts := createConflicts(parallelPendingTasks) + parallelSpends := createSpends(parallelPendingTasks) parallelPendingTasks.WaitIsZero() const updateCount = 100000 permutations := make([]func(Spend TestSpend), 0) for i := 0; i < updateCount; i++ { - permutations = append(permutations, generateRandomConflictPermutation()) + permutations = append(permutations, generateRandomSpendPermutation()) } var wg sync.WaitGroup for _, permutation := range permutations { - targetAlias := lo.Keys(parallelConflicts)[rand.Intn(len(parallelConflicts))] + targetAlias := lo.Keys(parallelSpends)[rand.Intn(len(parallelSpends))] - permutation(sequentialConflicts[targetAlias]) + permutation(sequentialSpends[targetAlias]) wg.Add(1) go func(permutation func(Spend TestSpend)) { - permutation(parallelConflicts[targetAlias]) + permutation(parallelSpends[targetAlias]) wg.Done() }(permutation) @@ -248,12 +248,12 @@ func TestConflictParallel(t *testing.T) { parallelPendingTasks.WaitIsZero() - lo.ForEach(lo.Keys(parallelConflicts), func(SpendAlias string) { - assert.EqualValuesf(t, sequentialConflicts[SpendAlias].PreferredInstead().ID, parallelConflicts[SpendAlias].PreferredInstead().ID, "parallel Spend %s prefers %s, but sequential Spend prefers %s", SpendAlias, parallelConflicts[SpendAlias].PreferredInstead().ID, sequentialConflicts[SpendAlias].PreferredInstead().ID) + lo.ForEach(lo.Keys(parallelSpends), func(SpendAlias string) { + assert.EqualValuesf(t, sequentialSpends[SpendAlias].PreferredInstead().ID, parallelSpends[SpendAlias].PreferredInstead().ID, "parallel Spend %s prefers %s, but sequential Spend prefers %s", SpendAlias, parallelSpends[SpendAlias].PreferredInstead().ID, sequentialSpends[SpendAlias].PreferredInstead().ID) }) - assertCorrectOrder(t, lo.Values(sequentialConflicts)...) - assertCorrectOrder(t, lo.Values(parallelConflicts)...) + assertCorrectOrder(t, lo.Values(sequentialSpends)...) + assertCorrectOrder(t, lo.Values(parallelSpends)...) } func TestLikedInstead1(t *testing.T) { @@ -460,13 +460,13 @@ func TestConflictSet_AllMembersEvicted(t *testing.T) { }) Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) - evictedConflicts := Spend1.Evict() - require.Len(t, evictedConflicts, 1) - require.Contains(t, evictedConflicts, Spend1.ID) + evictedSpends := Spend1.Evict() + require.Len(t, evictedSpends, 1) + require.Contains(t, evictedSpends, Spend1.ID) // evict the Spend another time and make sure that none Spends were evicted - evictedConflicts = Spend1.Evict() - require.Len(t, evictedConflicts, 0) + evictedSpends = Spend1.Evict() + require.Len(t, evictedSpends, 0) // Spend tries to join Spendset who's all members were evicted Spend2 := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("Spend1"), weight.New(), pendingTasks, thresholdProvider) @@ -478,7 +478,7 @@ func TestConflictSet_AllMembersEvicted(t *testing.T) { require.Error(t, err) } -func TestConflict_Compare(t *testing.T) { +func TestSpend_Compare(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -495,7 +495,7 @@ func TestConflict_Compare(t *testing.T) { require.Equal(t, weight.Equal, Spend2.Compare(nil)) } -func TestConflict_Inheritance(t *testing.T) { +func TestSpend_Inheritance(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -538,34 +538,34 @@ func assertCorrectOrder(t *testing.T, spends ...TestSpend) { return spends[i].Compare(spends[j]) == weight.Heavier }) - preferredConflicts := ds.NewSet[TestSpend]() - unPreferredConflicts := ds.NewSet[TestSpend]() + preferredSpends := ds.NewSet[TestSpend]() + unPreferredSpends := ds.NewSet[TestSpend]() for _, spend := range spends { - if !unPreferredConflicts.Has(spend) { - preferredConflicts.Add(spend) + if !unPreferredSpends.Has(spend) { + preferredSpends.Add(spend) spend.ConflictingSpends.Range(func(conflictingSpend *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { if spend != conflictingSpend { - unPreferredConflicts.Add(conflictingSpend) + unPreferredSpends.Add(conflictingSpend) } }, true) } } for _, Spend := range spends { - if preferredConflicts.Has(Spend) { + if preferredSpends.Has(Spend) { require.True(t, Spend.IsPreferred(), "Spend %s should be preferred", Spend.ID) } - if unPreferredConflicts.Has(Spend) { + if unPreferredSpends.Has(Spend) { require.False(t, Spend.IsPreferred(), "Spend %s should be unPreferred", Spend.ID) } } - _ = unPreferredConflicts.ForEach(func(unPreferredConflict TestSpend) (err error) { + _ = unPreferredSpends.ForEach(func(unPreferredSpend TestSpend) (err error) { // iterating in descending order, so the first preferred Spend - return unPreferredConflict.ConflictingSpends.ForEach(func(SpendingConflict TestSpend) error { - if SpendingConflict != unPreferredConflict && SpendingConflict.IsPreferred() { - require.Equal(t, SpendingConflict, unPreferredConflict.PreferredInstead()) + return unPreferredSpend.ConflictingSpends.ForEach(func(ConflictingSpend TestSpend) error { + if ConflictingSpend != unPreferredSpend && ConflictingSpend.IsPreferred() { + require.Equal(t, ConflictingSpend, unPreferredSpend.PreferredInstead()) return ierrors.New("break the loop") } @@ -575,20 +575,20 @@ func assertCorrectOrder(t *testing.T, spends ...TestSpend) { }) } -func generateRandomConflictPermutation() func(Spend TestSpend) { +func generateRandomSpendPermutation() func(spend TestSpend) { updateType := rand.Intn(100) delta := rand.Intn(100) - return func(Spend TestSpend) { + return func(spend TestSpend) { if updateType%2 == 0 { - Spend.Weight.AddCumulativeWeight(int64(delta)) + spend.Weight.AddCumulativeWeight(int64(delta)) } else { - Spend.Weight.RemoveCumulativeWeight(int64(delta)) + spend.Weight.RemoveCumulativeWeight(int64(delta)) } } } -func createConflicts(pendingTasks *syncutils.Counter) map[string]TestSpend { +func createSpends(pendingTasks *syncutils.Counter) map[string]TestSpend { weights := account.NewSeatedAccounts(account.NewAccounts()) thresholdProvider := acceptance.ThresholdProvider(func() int64 { @@ -616,7 +616,7 @@ func createConflicts(pendingTasks *syncutils.Counter) map[string]TestSpend { } func assertPreferredInstead(t *testing.T, preferredInsteadMap map[TestSpend]TestSpend) { - for Spend, preferredInsteadConflict := range preferredInsteadMap { - assert.Equalf(t, preferredInsteadConflict.ID, Spend.PreferredInstead().ID, "Spend %s should prefer %s instead of %s", Spend.ID, preferredInsteadConflict.ID, Spend.PreferredInstead().ID) + for Spend, preferredInsteadSpend := range preferredInsteadMap { + assert.Equalf(t, preferredInsteadSpend.ID, Spend.PreferredInstead().ID, "Spend %s should prefer %s instead of %s", Spend.ID, preferredInsteadSpend.ID, Spend.PreferredInstead().ID) } } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index 434ff89b3..f49bdd42b 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -172,8 +172,8 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateSpendParents(spendID Spe updated := currentSpend.UpdateParents(addedParents, removedParents) if updated { - _ = currentSpend.Parents.ForEach(func(parentConflict *Spend[SpendID, ResourceID, VoteRank]) (err error) { - newParents.Add(parentConflict.ID) + _ = currentSpend.Parents.ForEach(func(parentSpend *Spend[SpendID, ResourceID, VoteRank]) (err error) { + newParents.Add(parentSpend.ID) return nil }) } @@ -195,9 +195,9 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateSpendParents(spendID Spe func (c *SpendDAG[SpendID, ResourceID, VoteRank]) LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] { likedInstead := ds.NewSet[SpendID]() spendIDs.Range(func(spendID SpendID) { - if currentConflict, exists := c.spendsByID.Get(spendID); exists { - if likedConflict := heaviestConflict(currentConflict.LikedInstead()); likedConflict != nil { - likedInstead.Add(likedConflict.ID) + if currentSpend, exists := c.spendsByID.Get(spendID); exists { + if likedSpend := heaviestSpend(currentSpend.LikedInstead()); likedSpend != nil { + likedInstead.Add(likedSpend.ID) } } }) @@ -238,7 +238,7 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) AllSpendsSupported(seat accoun }) == nil } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendVoters(spendID SpendID) (conflictVoters ds.Set[account.SeatIndex]) { +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendVoters(spendID SpendID) (spendVoters ds.Set[account.SeatIndex]) { if spend, exists := c.spendsByID.Get(spendID); exists { return spend.Weight.Voters.Clone() } @@ -291,19 +291,19 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendChildren(spendID SpendID) return spendChildren, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictSetMembers(conflictSetID ResourceID) (conflicts ds.Set[SpendID], exists bool) { +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictSetMembers(conflictSetID ResourceID) (spends ds.Set[SpendID], exists bool) { conflictSet, exists := c.conflictSetsByID.Get(conflictSetID) if !exists { return nil, false } - conflicts = ds.NewSet[SpendID]() + spends = ds.NewSet[SpendID]() _ = conflictSet.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { - conflicts.Add(parent.ID) + spends.Add(parent.ID) return nil }) - return conflicts, true + return spends, true } func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendWeight(spendID SpendID) int64 { @@ -385,7 +385,7 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UnacceptedSpends(spendIDs ds.S return pendingSpendIDs } -// EvictConflict removes spend with given SpendID from spenddag. +// EvictSpend removes spend with given SpendID from spenddag. func (c *SpendDAG[SpendID, ResourceID, VoteRank]) EvictSpend(spendID SpendID) { for _, evictedSpendID := range func() []SpendID { c.mutex.RLock() @@ -406,7 +406,7 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) evictSpend(spendID SpendID) [] evictedSpendIDs := spend.Evict() - // remove the conflicts from the spenddag dictionary + // remove the spends from the spenddag dictionary for _, evictedSpendID := range evictedSpendIDs { c.spendsByID.Delete(evictedSpendID) } @@ -454,40 +454,40 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) determineVotes(spendIDs ds.Set revokedSpends = ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() revokedWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]() - revokeConflict := func(revokedConflict *Spend[SpendID, ResourceID, VoteRank]) error { - if revokedSpends.Add(revokedConflict) { - if supportedSpends.Has(revokedConflict) { - return ierrors.Errorf("applied conflicting votes (%s is supported and revoked)", revokedConflict.ID) + revokeSpend := func(revokedSpend *Spend[SpendID, ResourceID, VoteRank]) error { + if revokedSpends.Add(revokedSpend) { + if supportedSpends.Has(revokedSpend) { + return ierrors.Errorf("applied conflicting votes (%s is supported and revoked)", revokedSpend.ID) } - revokedWalker.PushAll(revokedConflict.Children.ToSlice()...) + revokedWalker.PushAll(revokedSpend.Children.ToSlice()...) } return nil } supportedWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]() - supportConflict := func(supportedConflict *Spend[SpendID, ResourceID, VoteRank]) error { - if supportedSpends.Add(supportedConflict) { - if err := supportedConflict.ConflictingSpends.ForEach(revokeConflict); err != nil { - return ierrors.Errorf("failed to collect conflicting conflicts: %w", err) + supportSpend := func(supportedSpend *Spend[SpendID, ResourceID, VoteRank]) error { + if supportedSpends.Add(supportedSpend) { + if err := supportedSpend.ConflictingSpends.ForEach(revokeSpend); err != nil { + return ierrors.Errorf("failed to collect conflicting spends: %w", err) } - supportedWalker.PushAll(supportedConflict.Parents.ToSlice()...) + supportedWalker.PushAll(supportedSpend.Parents.ToSlice()...) } return nil } for supportedWalker.PushAll(lo.Return1(c.spends(spendIDs, true)).ToSlice()...); supportedWalker.HasNext(); { - if err := supportConflict(supportedWalker.Next()); err != nil { - return nil, nil, ierrors.Errorf("failed to collect supported conflicts: %w", err) + if err := supportSpend(supportedWalker.Next()); err != nil { + return nil, nil, ierrors.Errorf("failed to collect supported spends: %w", err) } } for revokedWalker.HasNext() { - if revokedConflict := revokedWalker.Next(); revokedSpends.Add(revokedConflict) { - revokedWalker.PushAll(revokedConflict.Children.ToSlice()...) + if revokedSpend := revokedWalker.Next(); revokedSpends.Add(revokedSpend) { + revokedWalker.PushAll(revokedSpend.Children.ToSlice()...) } } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go index 093b5f687..be84ad572 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go @@ -6,12 +6,12 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// heaviestConflict returns the largest Conflict from the given Spends. -func heaviestConflict[SpendID, ResourceID spenddag.IDType, VoterPower spenddag.VoteRankType[VoterPower]](conflicts ds.Set[*Spend[SpendID, ResourceID, VoterPower]]) *Spend[SpendID, ResourceID, VoterPower] { +// heaviestSpend returns the largest Spend from the given Spends. +func heaviestSpend[SpendID, ResourceID spenddag.IDType, VoterPower spenddag.VoteRankType[VoterPower]](spends ds.Set[*Spend[SpendID, ResourceID, VoterPower]]) *Spend[SpendID, ResourceID, VoterPower] { var result *Spend[SpendID, ResourceID, VoterPower] - conflicts.Range(func(conflict *Spend[SpendID, ResourceID, VoterPower]) { - if conflict.Compare(result) == weight.Heavier { - result = conflict + spends.Range(func(spend *Spend[SpendID, ResourceID, VoterPower]) { + if spend.Compare(result) == weight.Heavier { + result = spend } }) diff --git a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go index 23910df2f..d76dde9db 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -4,7 +4,7 @@ import ( "github.com/stretchr/testify/require" ) -// Assertions provides a set of assertions for the ConflictDAG. +// Assertions provides a set of assertions for the SpendDAG. type Assertions struct { f *Framework } @@ -12,30 +12,30 @@ type Assertions struct { // Children asserts that the given spend has the given children. func (a *Assertions) Children(spendAlias string, childAliases ...string) { childIDs, exists := a.f.Instance.SpendChildren(a.f.SpendID(spendAlias)) - require.True(a.f.test, exists, "Conflict %s does not exist", spendAlias) + require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) - require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Conflict %s has wrong number of children", spendAlias) + require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Spend %s has wrong number of children", spendAlias) for _, childAlias := range childAliases { - require.True(a.f.test, childIDs.Has(a.f.SpendID(childAlias)), "Conflict %s does not have child %s", spendAlias, childAlias) + require.True(a.f.test, childIDs.Has(a.f.SpendID(childAlias)), "Spend %s does not have child %s", spendAlias, childAlias) } } // Parents asserts that the given spend has the given parents. func (a *Assertions) Parents(spendAlias string, parentAliases ...string) { parents, exists := a.f.Instance.SpendParents(a.f.SpendID(spendAlias)) - require.True(a.f.test, exists, "Conflict %s does not exist", spendAlias) + require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) - require.Equal(a.f.test, len(parentAliases), parents.Size(), "Conflict %s has wrong number of parents", spendAlias) + require.Equal(a.f.test, len(parentAliases), parents.Size(), "Spend %s has wrong number of parents", spendAlias) for _, parentAlias := range parentAliases { - require.True(a.f.test, parents.Has(a.f.SpendID(parentAlias)), "Conflict %s does not have parent %s", spendAlias, parentAlias) + require.True(a.f.test, parents.Has(a.f.SpendID(parentAlias)), "Spend %s does not have parent %s", spendAlias, parentAlias) } } // LikedInstead asserts that the given spends return the given LikedInstead spends. func (a *Assertions) LikedInstead(spendAliases []string, likedInsteadAliases ...string) { - likedInsteadConflicts := a.f.LikedInstead(spendAliases...) + likedInsteadSpends := a.f.LikedInstead(spendAliases...) - require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadConflicts.Size(), "LikedInstead returns wrong number of spends %d instead of %d", likedInsteadConflicts.Size(), len(likedInsteadAliases)) + require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadSpends.Size(), "LikedInstead returns wrong number of spends %d instead of %d", likedInsteadSpends.Size(), len(likedInsteadAliases)) } // ConflictSetMembers asserts that the given resource has the given spend set members. @@ -52,32 +52,32 @@ func (a *Assertions) ConflictSetMembers(resourceAlias string, spendAliases ...st // ConflictSets asserts that the given spend has the given conflict sets. func (a *Assertions) ConflictSets(spendAlias string, resourceAliases ...string) { conflictSets, exists := a.f.Instance.ConflictSets(a.f.SpendID(spendAlias)) - require.True(a.f.test, exists, "Conflict %s does not exist", spendAlias) + require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) - require.Equal(a.f.test, len(resourceAliases), conflictSets.Size(), "Conflict %s has wrong number of conflict sets", spendAlias) + require.Equal(a.f.test, len(resourceAliases), conflictSets.Size(), "Spend %s has wrong number of conflict sets", spendAlias) for _, resourceAlias := range resourceAliases { - require.True(a.f.test, conflictSets.Has(a.f.ResourceID(resourceAlias)), "Conflict %s does not have conflict set %s", spendAlias, resourceAlias) + require.True(a.f.test, conflictSets.Has(a.f.ResourceID(resourceAlias)), "Spend %s does not have conflict set %s", spendAlias, resourceAlias) } } // Pending asserts that the given spends are pending. func (a *Assertions) Pending(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsPending(), "Conflict %s is not pending", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsPending(), "Spend %s is not pending", alias) } } // Accepted asserts that the given spends are accepted. func (a *Assertions) Accepted(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsAccepted(), "Conflict %s is not accepted", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsAccepted(), "Spend %s is not accepted", alias) } } // Rejected asserts that the given spends are rejected. func (a *Assertions) Rejected(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsRejected(), "Conflict %s is not rejected", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsRejected(), "Spend %s is not rejected", alias) } } diff --git a/pkg/protocol/engine/mempool/tests/tests.go b/pkg/protocol/engine/mempool/tests/tests.go index 785c9501a..8ed8bc941 100644 --- a/pkg/protocol/engine/mempool/tests/tests.go +++ b/pkg/protocol/engine/mempool/tests/tests.go @@ -1,26 +1,23 @@ package mempooltests import ( - "fmt" "testing" "github.com/stretchr/testify/require" "github.com/iotaledger/hive.go/lo" "github.com/iotaledger/hive.go/runtime/debug" - "github.com/iotaledger/hive.go/runtime/memanalyzer" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/tpkg" ) const ( TestMemoryReleaseMaxMemoryIncreaseFactor = 1.20 ) -func TestAllWithForkingEverything(t *testing.T, frameworkProvider func(*testing.T) *TestFramework) { +func TestAll(t *testing.T, frameworkProvider func(*testing.T) *TestFramework) { for testName, testCase := range map[string]func(*testing.T, *TestFramework){ - "TestConflictPropagationForkAll": TestConflictPropagationForkAll, + "TestSpendPropagation": TestSpendPropagation, "TestSetTxOrphanageMultipleAttachments": TestSetTxOrphanageMultipleAttachments, "TestProcessTransactionWithReadOnlyInputs": TestProcessTransactionWithReadOnlyInputs, "TestProcessTransaction": TestProcessTransaction, @@ -166,66 +163,6 @@ func TestProcessTransactionsOutOfOrder(t *testing.T, tf *TestFramework) { }) } -func TestSetInclusionSlot(t *testing.T, tf *TestFramework) { - debug.SetEnabled(true) - defer debug.SetEnabled(false) - tf.CreateSignedTransaction("tx1", []string{"genesis"}, 1) - tf.CreateSignedTransaction("tx2", []string{"tx1:0"}, 1) - tf.CreateSignedTransaction("tx3", []string{"tx2:0"}, 1) - - require.NoError(t, tf.AttachTransaction("tx3-signed", "tx3", "block3", 3)) - require.NoError(t, tf.AttachTransaction("tx2-signed", "tx2", "block2", 2)) - require.NoError(t, tf.AttachTransaction("tx1-signed", "tx1", "block1", 1)) - - tf.RequireBooked("tx1", "tx2", "tx3") - - require.True(t, tf.MarkAttachmentIncluded("block2")) - - require.True(t, tf.MarkAttachmentIncluded("block1")) - - tf.RequireAccepted(map[string]bool{"tx1": true, "tx2": true, "tx3": false}) - - tx1Metadata, exists := tf.TransactionMetadata("tx1") - require.True(t, exists) - - tx2Metadata, exists := tf.TransactionMetadata("tx2") - require.True(t, exists) - - tx3Metadata, exists := tf.TransactionMetadata("tx3") - require.True(t, exists) - - tf.CommitSlot(1) - transactionDeletionState := map[string]bool{"tx1": false, "tx2": false, "tx3": false} - tf.RequireTransactionsEvicted(transactionDeletionState) - - attachmentDeletionState := map[string]bool{"block1": false, "block2": false, "block3": false} - tf.RequireAttachmentsEvicted(attachmentDeletionState) - - tf.Instance.Evict(1) - - tf.RequireAccepted(map[string]bool{"tx2": true, "tx3": false}) - tf.RequireBooked("tx3") - - tf.CommitSlot(2) - tf.RequireTransactionsEvicted(lo.MergeMaps(transactionDeletionState, map[string]bool{"tx2": false})) - tf.RequireAttachmentsEvicted(lo.MergeMaps(attachmentDeletionState, map[string]bool{"block1": true})) - - tf.Instance.Evict(2) - tf.RequireBooked("tx3") - - require.True(t, tf.MarkAttachmentIncluded("block3")) - tf.RequireAccepted(map[string]bool{"tx3": true}) - - tf.CommitSlot(3) - tf.RequireTransactionsEvicted(transactionDeletionState) - - require.False(t, lo.Return2(tx1Metadata.OrphanedSlot())) - require.False(t, lo.Return2(tx2Metadata.OrphanedSlot())) - require.False(t, lo.Return2(tx3Metadata.OrphanedSlot())) - - tf.RequireAttachmentsEvicted(lo.MergeMaps(attachmentDeletionState, map[string]bool{"block1": true, "block2": true, "block3": false})) -} - func TestSetTransactionOrphanage(t *testing.T, tf *TestFramework) { debug.SetEnabled(true) defer debug.SetEnabled(false) @@ -320,38 +257,7 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { tf.RequireAttachmentsEvicted(map[string]bool{"block1.1": true, "block1.2": true, "block2": false, "block3": false}) } -func TestStateDiff(t *testing.T, tf *TestFramework) { - debug.SetEnabled(true) - defer debug.SetEnabled(false) - tf.CreateSignedTransaction("tx1", []string{"genesis"}, 1) - tf.CreateSignedTransaction("tx2", []string{"tx1:0"}, 1) - tf.CreateSignedTransaction("tx3", []string{"tx2:0"}, 1) - - require.NoError(t, tf.AttachTransaction("tx3-signed", "tx3", "block3", 1)) - require.NoError(t, tf.AttachTransaction("tx2-signed", "tx2", "block2", 1)) - require.NoError(t, tf.AttachTransaction("tx1-signed", "tx1", "block1", 1)) - - tf.RequireBooked("tx1", "tx2", "tx3") - - acceptanceState := map[string]bool{} - - require.True(t, tf.MarkAttachmentIncluded("block1")) - - tf.RequireAccepted(lo.MergeMaps(acceptanceState, map[string]bool{"tx1": true, "tx2": false, "tx3": false})) - tf.AssertStateDiff(1, []string{"genesis"}, []string{"tx1:0"}, []string{"tx1"}) - - require.True(t, tf.MarkAttachmentIncluded("block2")) - - tf.RequireAccepted(lo.MergeMaps(acceptanceState, map[string]bool{"tx2": true})) - tf.AssertStateDiff(1, []string{"genesis"}, []string{"tx2:0"}, []string{"tx1", "tx2"}) - - require.True(t, tf.MarkAttachmentIncluded("block3")) - - tf.RequireAccepted(lo.MergeMaps(acceptanceState, map[string]bool{"tx3": true})) - tf.AssertStateDiff(1, []string{"genesis"}, []string{"tx3:0"}, []string{"tx1", "tx2", "tx3"}) -} - -func TestConflictPropagationForkAll(t *testing.T, tf *TestFramework) { +func TestSpendPropagation(t *testing.T, tf *TestFramework) { debug.SetEnabled(true) defer debug.SetEnabled(false) tf.CreateSignedTransaction("tx1", []string{"genesis"}, 1) @@ -383,38 +289,6 @@ func TestConflictPropagationForkAll(t *testing.T, tf *TestFramework) { tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) } -func TestConflictPropagationForkOnDoubleSpend(t *testing.T, tf *TestFramework) { - debug.SetEnabled(true) - defer debug.SetEnabled(false) - tf.CreateSignedTransaction("tx1", []string{"genesis"}, 1) - tf.CreateSignedTransaction("tx1*", []string{"genesis"}, 1) - - tf.CreateSignedTransaction("tx2", []string{"tx1:0"}, 1) - tf.CreateSignedTransaction("tx2*", []string{"tx1*:0"}, 1) - tf.CreateSignedTransaction("tx3", []string{"tx2:0"}, 1) - tf.CreateSignedTransaction("tx3*", []string{"tx2*:0"}, 1) - tf.CreateSignedTransaction("tx4", []string{"tx1:0"}, 1) - - require.NoError(t, tf.AttachTransaction("tx3-signed", "tx3", "block3", 3)) - require.NoError(t, tf.AttachTransaction("tx2-signed", "tx2", "block2", 2)) - require.NoError(t, tf.AttachTransaction("tx1-signed", "tx1", "block1", 1)) - - tf.RequireBooked("tx1", "tx2", "tx3") - tf.RequireSpendIDs(map[string][]string{"tx1": {}, "tx2": {}, "tx3": {}}) - - require.NoError(t, tf.AttachTransaction("tx3*-signed", "tx3*", "block3*", 3)) - require.NoError(t, tf.AttachTransaction("tx2*-signed", "tx2*", "block2*", 2)) - require.NoError(t, tf.AttachTransaction("tx1*-signed", "tx1*", "block1*", 1)) - - tf.RequireBooked("tx1*", "tx2*", "tx3*") - tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx1"}, "tx3": {"tx1"}, "tx1*": {"tx1*"}, "tx2*": {"tx1*"}, "tx3*": {"tx1*"}}) - - require.NoError(t, tf.AttachTransaction("tx4-signed", "tx4", "block4", 2)) - - tf.RequireBooked("tx4") - tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx2"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx1*"}, "tx3*": {"tx1*"}}) -} - func TestInvalidTransaction(t *testing.T, tf *TestFramework) { debug.SetEnabled(true) defer debug.SetEnabled(false) @@ -436,51 +310,3 @@ func TestStoreAttachmentInEvictedSlot(t *testing.T, tf *TestFramework) { require.False(t, lo.Return2(tf.TransactionMetadata("tx1"))) } - -func TestMemoryRelease(t *testing.T, tf *TestFramework) { - issueTransactions := func(startIndex int, transactionCount int, prevStateAlias string) (int, string) { - index := startIndex - for ; index < startIndex+transactionCount; index++ { - signedTxAlias := fmt.Sprintf("tx%d-signed", index) - txAlias := fmt.Sprintf("tx%d", index) - blockAlias := fmt.Sprintf("block%d", index) - tf.CreateSignedTransaction(txAlias, []string{prevStateAlias}, 2) - - require.NoError(t, tf.AttachTransaction(signedTxAlias, txAlias, blockAlias, iotago.SlotIndex(index))) - tf.RequireBooked(txAlias) - - tf.MarkAttachmentIncluded(blockAlias) - prevStateAlias = fmt.Sprintf("tx%d:0", index) - - tf.CommitSlot(iotago.SlotIndex(index)) - tf.Instance.Evict(iotago.SlotIndex(index)) - } - - return index, prevStateAlias - } - - fmt.Println("Memory report before:") - fmt.Println(memanalyzer.MemoryReport(tf.Instance)) - memStatsStart := memanalyzer.MemSize(tf) - - txIndex, prevStateAlias := issueTransactions(1, 20000, "genesis") - tf.WaitChildren() - - txIndex, _ = issueTransactions(txIndex, 20000, prevStateAlias) - - // Eviction is delayed by MCA, so we force Commit and Eviction. - for index := txIndex; index <= txIndex+int(tpkg.TestAPI.ProtocolParameters().MaxCommittableAge()); index++ { - tf.CommitSlot(iotago.SlotIndex(index)) - tf.Instance.Evict(iotago.SlotIndex(index)) - } - - tf.Cleanup() - - memStatsEnd := memanalyzer.MemSize(tf) - fmt.Println("Memory report after:") - - fmt.Println(memanalyzer.MemoryReport(tf.Instance)) - fmt.Println(memStatsEnd, memStatsStart) - - require.Less(t, float64(memStatsEnd), TestMemoryReleaseMaxMemoryIncreaseFactor*float64(memStatsStart), "the objects in the heap should not grow by more than 15%") -} diff --git a/pkg/protocol/engine/mempool/v1/mempool_test.go b/pkg/protocol/engine/mempool/v1/mempool_test.go index 060ba92a6..c1a4833c6 100644 --- a/pkg/protocol/engine/mempool/v1/mempool_test.go +++ b/pkg/protocol/engine/mempool/v1/mempool_test.go @@ -26,7 +26,7 @@ import ( ) func TestMemPoolV1_InterfaceWithForkingEverything(t *testing.T) { - mempooltests.TestAllWithForkingEverything(t, newTestFramework) + mempooltests.TestAll(t, newTestFramework) } func TestMempoolV1_ResourceCleanup(t *testing.T) { From c81bc25607c4975974a795fdd6270a082a54923e Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 15 Nov 2023 17:02:26 +0800 Subject: [PATCH 11/18] Fix unit test --- pkg/tests/booker_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/tests/booker_test.go b/pkg/tests/booker_test.go index bb352c829..1789fe136 100644 --- a/pkg/tests/booker_test.go +++ b/pkg/tests/booker_test.go @@ -96,7 +96,7 @@ func Test_WeightPropagation(t *testing.T) { ts.Block("block3-basic"): {"tx1"}, ts.Block("block4-basic"): {"tx2"}, }, node1, node2) - ts.AssertConflictsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) + ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) ts.AssertTransactionsInCachePending(wallet.Transactions("tx1", "tx2"), true, node1, node2) } @@ -111,7 +111,7 @@ func Test_WeightPropagation(t *testing.T) { // Make sure that neither approval (conflict weight), // nor witness (block weight) was not propagated using basic blocks and caused acceptance. - ts.AssertConflictsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) + ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) ts.AssertTransactionsInCacheAccepted(wallet.Transactions("tx2"), false, node1, node2) ts.AssertTransactionsInCacheRejected(wallet.Transactions("tx1"), false, node1, node2) ts.AssertTransactionsInCachePending(wallet.Transactions("tx1", "tx2"), true, node1, node2) From f63865cc9b611ea2e05090a8d7087348403ecbbb Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Mon, 20 Nov 2023 20:37:35 +0800 Subject: [PATCH 12/18] Rename ConflictSet to SpendSet --- .../engine/mempool/spenddag/errors.go | 8 +- .../engine/mempool/spenddag/events.go | 2 +- .../engine/mempool/spenddag/spenddag.go | 4 +- .../spenddag/spenddagv1/conflict_set.go | 72 ---------- .../spenddag/spenddagv1/conflict_set_test.go | 10 -- .../mempool/spenddag/spenddagv1/spend.go | 30 ++-- .../mempool/spenddag/spenddagv1/spend_set.go | 73 ++++++++++ .../spenddag/spenddagv1/spend_set_test.go | 10 ++ .../mempool/spenddag/spenddagv1/spend_test.go | 58 ++++---- .../mempool/spenddag/spenddagv1/spenddag.go | 60 ++++---- .../spenddag/spenddagv1/spenddag_test.go | 26 ++-- .../mempool/spenddag/tests/assertions.go | 20 +-- .../mempool/spenddag/tests/framework.go | 14 +- .../engine/mempool/spenddag/tests/tests.go | 130 +++++++++--------- pkg/protocol/engine/mempool/tests/tests.go | 24 ++-- 15 files changed, 271 insertions(+), 270 deletions(-) delete mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go delete mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go create mode 100644 pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set_test.go diff --git a/pkg/protocol/engine/mempool/spenddag/errors.go b/pkg/protocol/engine/mempool/spenddag/errors.go index beb901f92..852d78bcf 100644 --- a/pkg/protocol/engine/mempool/spenddag/errors.go +++ b/pkg/protocol/engine/mempool/spenddag/errors.go @@ -3,8 +3,8 @@ package spenddag import "github.com/iotaledger/hive.go/ierrors" var ( - ErrExpected = ierrors.New("expected error") - ErrAlreadyPartOfConflictSet = ierrors.New("spend already part of ConflictSet") - ErrEntityEvicted = ierrors.New("tried to operate on evicted entity") - ErrFatal = ierrors.New("fatal error") + ErrExpected = ierrors.New("expected error") + ErrAlreadyPartOfSpendSet = ierrors.New("spend already part of SpendSet") + ErrEntityEvicted = ierrors.New("tried to operate on evicted entity") + ErrFatal = ierrors.New("fatal error") ) diff --git a/pkg/protocol/engine/mempool/spenddag/events.go b/pkg/protocol/engine/mempool/spenddag/events.go index 1165b51e0..a66400081 100644 --- a/pkg/protocol/engine/mempool/spenddag/events.go +++ b/pkg/protocol/engine/mempool/spenddag/events.go @@ -15,7 +15,7 @@ type Events[SpendID, ResourceID comparable] struct { // SpendEvicted is triggered when a Spend is evicted from the SpendDAG. SpendEvicted *event.Event1[SpendID] - // ConflictingResourcesAdded is triggered when the Spend is added to a new ConflictSet. + // ConflictingResourcesAdded is triggered when the Spend is added to a new SpendSet. ConflictingResourcesAdded *event.Event2[SpendID, ds.Set[ResourceID]] // SpendParentsUpdated is triggered when the parents of a Spend are updated. diff --git a/pkg/protocol/engine/mempool/spenddag/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddag.go index 74d0eda1a..7682773b1 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddag.go @@ -25,9 +25,9 @@ type SpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] inter AllSpendsSupported(seat account.SeatIndex, spendIDs ds.Set[SpendID]) bool EvictSpend(spendID SpendID) - ConflictSets(spendID SpendID) (conflictSetIDs ds.Set[ResourceID], exists bool) + SpendSets(spendID SpendID) (spendSetIDs ds.Set[ResourceID], exists bool) SpendParents(spendID SpendID) (spendIDs ds.Set[SpendID], exists bool) - ConflictSetMembers(conflictSetID ResourceID) (spendIDs ds.Set[SpendID], exists bool) + SpendSetMembers(spendSetID ResourceID) (spendIDs ds.Set[SpendID], exists bool) SpendWeight(spendID SpendID) int64 SpendChildren(spendID SpendID) (spendIDs ds.Set[SpendID], exists bool) SpendVoters(spendID SpendID) (voters ds.Set[account.SeatIndex]) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go deleted file mode 100644 index a891f7d5d..000000000 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set.go +++ /dev/null @@ -1,72 +0,0 @@ -package spenddagv1 - -import ( - "github.com/iotaledger/hive.go/ds" - "github.com/iotaledger/hive.go/ds/reactive" - "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/runtime/syncutils" - "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" -) - -// ConflictSet represents a set of Spends that are conflicting with each other over a common Resource. -type ConflictSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { - // ID is the ID of the Resource that the Spends in this ConflictSet are conflicting over. - ID ResourceID - - // members is the set of Spends that are conflicting over the shared resource. - members ds.Set[*Spend[SpendID, ResourceID, VoteRank]] - - allMembersEvicted reactive.Variable[bool] - - mutex syncutils.RWMutex -} - -// NewConflictSet creates a new ConflictSet of Spends that are conflicting with each other over the given Resource. -func NewConflictSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id ResourceID) *ConflictSet[SpendID, ResourceID, VoteRank] { - return &ConflictSet[SpendID, ResourceID, VoteRank]{ - ID: id, - allMembersEvicted: reactive.NewVariable[bool](), - members: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), - } -} - -// Add adds a Spend to the ConflictSet and returns all other members of the set. -func (c *ConflictSet[SpendID, ResourceID, VoteRank]) Add(addedConflict *Spend[SpendID, ResourceID, VoteRank]) (otherMembers ds.Set[*Spend[SpendID, ResourceID, VoteRank]], err error) { - c.mutex.Lock() - defer c.mutex.Unlock() - - if c.allMembersEvicted.Get() { - return nil, ierrors.New("cannot join a ConflictSet whose all members are evicted") - } - - if otherMembers = c.members.Clone(); !c.members.Add(addedConflict) { - return nil, spenddag.ErrAlreadyPartOfConflictSet - } - - return otherMembers, nil - -} - -// Remove removes a Spend from the ConflictSet and returns all remaining members of the set. -func (c *ConflictSet[SpendID, ResourceID, VoteRank]) Remove(removedConflict *Spend[SpendID, ResourceID, VoteRank]) (removed bool) { - c.mutex.Lock() - defer c.mutex.Unlock() - - if removed = c.members.Delete(removedConflict); removed && c.members.IsEmpty() { - c.allMembersEvicted.Set(true) - } - - return removed -} - -func (c *ConflictSet[SpendID, ResourceID, VoteRank]) ForEach(callback func(parent *Spend[SpendID, ResourceID, VoteRank]) error) error { - c.mutex.RLock() - defer c.mutex.RUnlock() - - return c.members.ForEach(callback) -} - -// OnAllMembersEvicted executes a callback when all members of the ConflictSet are evicted and the ConflictSet itself can be evicted. -func (c *ConflictSet[SpendID, ResourceID, VoteRank]) OnAllMembersEvicted(callback func(prevValue, newValue bool)) { - c.allMembersEvicted.OnUpdate(callback) -} diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go deleted file mode 100644 index 8d2bf2a40..000000000 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/conflict_set_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package spenddagv1 - -import ( - "github.com/iotaledger/iota-core/pkg/core/vote" - iotago "github.com/iotaledger/iota.go/v4" -) - -type TestConflictSet = *ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank] - -var NewTestConflictSet = NewConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank] diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go index 72728314d..054b1c840 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go @@ -30,8 +30,8 @@ type Spend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[V // Children is the set of children of the Spend. Children ds.Set[*Spend[SpendID, ResourceID, VoteRank]] - // ConflictSets is the set of ConflictSets that the Spend is part of. - ConflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]] + // SpendSets is the set of SpendSets that the Spend is part of. + SpendSets ds.Set[*SpendSet[SpendID, ResourceID, VoteRank]] // ConflictingSpends is the set of spends that directly conflict with the Spend. ConflictingSpends *SortedSpends[SpendID, ResourceID, VoteRank] @@ -95,7 +95,7 @@ func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp ID: id, Parents: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), Children: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), - ConflictSets: ds.NewSet[*ConflictSet[SpendID, ResourceID, VoteRank]](), + SpendSets: ds.NewSet[*SpendSet[SpendID, ResourceID, VoteRank]](), Weight: initialWeight, LatestVotes: shrinkingmap.New[account.SeatIndex, *vote.Vote[VoteRank]](), AcceptanceStateUpdated: event.New2[acceptance.State, acceptance.State](), @@ -127,9 +127,9 @@ func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp return c } -// JoinSpendSets registers the Spend with the given ConflictSets. -func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(conflictSets ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]]) (joinedConflictSets ds.Set[ResourceID], err error) { - if conflictSets == nil { +// JoinSpendSets registers the Spend with the given SpendSets. +func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*SpendSet[SpendID, ResourceID, VoteRank]]) (joinedSpendSets ds.Set[ResourceID], err error) { + if spendSets == nil { return ds.NewSet[ResourceID](), nil } @@ -148,22 +148,22 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(conflictSets ds.Set } } - joinedConflictSets = ds.NewSet[ResourceID]() + joinedSpendSets = ds.NewSet[ResourceID]() - return joinedConflictSets, conflictSets.ForEach(func(conflictSet *ConflictSet[SpendID, ResourceID, VoteRank]) error { - otherConflicts, err := conflictSet.Add(c) - if err != nil && !ierrors.Is(err, spenddag.ErrAlreadyPartOfConflictSet) { + return joinedSpendSets, spendSets.ForEach(func(spendSet *SpendSet[SpendID, ResourceID, VoteRank]) error { + otherConflicts, err := spendSet.Add(c) + if err != nil && !ierrors.Is(err, spenddag.ErrAlreadyPartOfSpendSet) { return err } - if c.ConflictSets.Add(conflictSet) { + if c.SpendSets.Add(spendSet) { if otherConflicts != nil { otherConflicts.Range(func(otherConflict *Spend[SpendID, ResourceID, VoteRank]) { registerConflictingSpend(c, otherConflict) registerConflictingSpend(otherConflict, c) }) - joinedConflictSets.Add(conflictSet.ID) + joinedSpendSets.Add(spendSet.ID) } } @@ -314,10 +314,10 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedSpends []SpendID) }) c.Parents.Clear() - c.ConflictSets.Range(func(conflictSet *ConflictSet[SpendID, ResourceID, VoteRank]) { - conflictSet.Remove(c) + c.SpendSets.Range(func(spendSet *SpendSet[SpendID, ResourceID, VoteRank]) { + spendSet.Remove(c) }) - c.ConflictSets.Clear() + c.SpendSets.Clear() for _, spend := range c.ConflictingSpends.Shutdown() { if spend != c { diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go new file mode 100644 index 000000000..2768fa9f0 --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go @@ -0,0 +1,73 @@ +package spenddagv1 + +import ( + "github.com/iotaledger/hive.go/ds" + "github.com/iotaledger/hive.go/ds/reactive" + "github.com/iotaledger/hive.go/ierrors" + "github.com/iotaledger/hive.go/runtime/syncutils" + "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" +) + +// SpendSet represents a set of Spends of a Resource. +// If there's more than 1 Spend in a SpendSet, they are conflicting with each other over the shared Resource. +type SpendSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // ID is the ID of the Resource that the Spends in this SpendSet are conflicting over. + ID ResourceID + + // members is the set of Spends that are conflicting over the shared resource. + members ds.Set[*Spend[SpendID, ResourceID, VoteRank]] + + allMembersEvicted reactive.Variable[bool] + + mutex syncutils.RWMutex +} + +// NewSpendSet creates a new SpendSet of Spends that are conflicting with each other over the given Resource. +func NewSpendSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id ResourceID) *SpendSet[SpendID, ResourceID, VoteRank] { + return &SpendSet[SpendID, ResourceID, VoteRank]{ + ID: id, + allMembersEvicted: reactive.NewVariable[bool](), + members: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), + } +} + +// Add adds a Spend to the SpendSet and returns all other members of the set. +func (c *SpendSet[SpendID, ResourceID, VoteRank]) Add(addedConflict *Spend[SpendID, ResourceID, VoteRank]) (otherMembers ds.Set[*Spend[SpendID, ResourceID, VoteRank]], err error) { + c.mutex.Lock() + defer c.mutex.Unlock() + + if c.allMembersEvicted.Get() { + return nil, ierrors.New("cannot join a SpendSet whose all members are evicted") + } + + if otherMembers = c.members.Clone(); !c.members.Add(addedConflict) { + return nil, spenddag.ErrAlreadyPartOfSpendSet + } + + return otherMembers, nil + +} + +// Remove removes a Spend from the SpendSet and returns all remaining members of the set. +func (c *SpendSet[SpendID, ResourceID, VoteRank]) Remove(removedConflict *Spend[SpendID, ResourceID, VoteRank]) (removed bool) { + c.mutex.Lock() + defer c.mutex.Unlock() + + if removed = c.members.Delete(removedConflict); removed && c.members.IsEmpty() { + c.allMembersEvicted.Set(true) + } + + return removed +} + +func (c *SpendSet[SpendID, ResourceID, VoteRank]) ForEach(callback func(parent *Spend[SpendID, ResourceID, VoteRank]) error) error { + c.mutex.RLock() + defer c.mutex.RUnlock() + + return c.members.ForEach(callback) +} + +// OnAllMembersEvicted executes a callback when all members of the SpendSet are evicted and the SpendSet itself can be evicted. +func (c *SpendSet[SpendID, ResourceID, VoteRank]) OnAllMembersEvicted(callback func(prevValue, newValue bool)) { + c.allMembersEvicted.OnUpdate(callback) +} diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set_test.go new file mode 100644 index 000000000..07fb376b8 --- /dev/null +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set_test.go @@ -0,0 +1,10 @@ +package spenddagv1 + +import ( + "github.com/iotaledger/iota-core/pkg/core/vote" + iotago "github.com/iotaledger/iota.go/v4" +) + +type TestSpendSet = *SpendSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank] + +var NewTestSpendSet = NewSpendSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank] diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go index 8aa17e264..a05ca872e 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go @@ -24,7 +24,7 @@ type TestSpend = *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] //var NewTestSpend = NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func NewTestSpend(id iotago.TransactionID, parentSpends ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*ConflictSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { +func NewTestSpend(id iotago.TransactionID, parentSpends ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*SpendSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { spend := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) _, err := spend.JoinSpendSets(SpendSets) if err != nil { @@ -82,12 +82,12 @@ func TestSpend_SetAccepted(t *testing.T) { }) { - ConflictSet1 := NewTestConflictSet(id("ConflictSet1")) - ConflictSet2 := NewTestConflictSet(id("ConflictSet2")) + SpendSet1 := NewTestSpendSet(id("SpendSet1")) + SpendSet2 := NewTestSpendSet(id("SpendSet2")) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(ConflictSet1), weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(ConflictSet1, ConflictSet2), weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Spend3"), nil, ds.NewSet(ConflictSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpend(transactionID("Spend3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) require.Equal(t, acceptance.Pending, Spend1.setAcceptanceState(acceptance.Accepted)) require.True(t, Spend1.IsAccepted()) @@ -103,8 +103,8 @@ func TestSpend_SetAccepted(t *testing.T) { } { - SpendSet1 := NewTestConflictSet(id("ConflictSet1")) - SpendSet2 := NewTestConflictSet(id("ConflictSet2")) + SpendSet1 := NewTestSpendSet(id("SpendSet1")) + SpendSet2 := NewTestSpendSet(id("SpendSet2")) Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) @@ -117,7 +117,7 @@ func TestSpend_SetAccepted(t *testing.T) { } } -func TestSpend_ConflictSets(t *testing.T) { +func TestSpend_SpendSets(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -125,10 +125,10 @@ func TestSpend_ConflictSets(t *testing.T) { return int64(weights.SeatCount()) }) - red := NewTestConflictSet(id("red")) - blue := NewTestConflictSet(id("blue")) - green := NewTestConflictSet(id("green")) - yellow := NewTestConflictSet(id("yellow")) + red := NewTestSpendSet(id("red")) + blue := NewTestSpendSet(id("blue")) + green := NewTestSpendSet(id("green")) + yellow := NewTestSpendSet(id("yellow")) SpendA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) SpendB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) @@ -268,7 +268,7 @@ func TestLikedInstead1(t *testing.T) { require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) - SpendSet1 := NewTestConflictSet(id("O1")) + SpendSet1 := NewTestSpendSet(id("O1")) Spend1 := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) Spend2 := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) @@ -295,7 +295,7 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) - SpendSet1 := NewTestConflictSet(id("O1")) + SpendSet1 := NewTestSpendSet(id("O1")) SpendA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) SpendB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) @@ -308,7 +308,7 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { require.Equal(t, 1, SpendB.LikedInstead().Size()) require.True(t, SpendB.LikedInstead().Has(SpendA)) - SpendSet2 := NewTestConflictSet(id("O2")) + SpendSet2 := NewTestSpendSet(id("O2")) SpendC := NewTestSpend(transactionID("TxC"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) SpendD := NewTestSpend(transactionID("TxD"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) @@ -372,7 +372,7 @@ func TestLikedInstead21(t *testing.T) { require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) - SpendSet1 := NewTestConflictSet(id("O1")) + SpendSet1 := NewTestSpendSet(id("O1")) SpendA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) SpendB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) @@ -385,7 +385,7 @@ func TestLikedInstead21(t *testing.T) { require.Equal(t, 1, SpendB.LikedInstead().Size()) require.True(t, SpendB.LikedInstead().Has(SpendA)) - SpendSet4 := NewTestConflictSet(id("O4")) + SpendSet4 := NewTestSpendSet(id("O4")) SpendF := NewTestSpend(transactionID("TxF"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) SpendG := NewTestSpend(transactionID("TxG"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) @@ -398,7 +398,7 @@ func TestLikedInstead21(t *testing.T) { require.Equal(t, 1, SpendG.LikedInstead().Size()) require.True(t, SpendG.LikedInstead().Has(SpendF)) - SpendSet2 := NewTestConflictSet(id("O2")) + SpendSet2 := NewTestSpendSet(id("O2")) SpendC := NewTestSpend(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) SpendH := NewTestSpend(transactionID("TxH"), ds.NewSet(masterBranch, SpendA), ds.NewSet(SpendSet2, SpendSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) @@ -411,7 +411,7 @@ func TestLikedInstead21(t *testing.T) { require.Equal(t, 1, SpendH.LikedInstead().Size()) require.True(t, SpendH.LikedInstead().Has(SpendC)) - SpendSet3 := NewTestConflictSet(id("O12")) + SpendSet3 := NewTestSpendSet(id("O12")) SpendI := NewTestSpend(transactionID("TxI"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) SpendJ := NewTestSpend(transactionID("TxJ"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) @@ -448,12 +448,12 @@ func TestLikedInstead21(t *testing.T) { require.True(t, SpendJ.LikedInstead().Has(SpendH)) } -func TestConflictSet_AllMembersEvicted(t *testing.T) { +func TestSpendSet_AllMembersEvicted(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() - yellow := NewTestConflictSet(id("yellow")) - green := NewTestConflictSet(id("green")) + yellow := NewTestSpendSet(id("yellow")) + green := NewTestSpendSet(id("green")) thresholdProvider := acceptance.ThresholdProvider(func() int64 { return int64(weights.SeatCount()) @@ -499,8 +499,8 @@ func TestSpend_Inheritance(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() - yellow := NewTestConflictSet(id("yellow")) - green := NewTestConflictSet(id("green")) + yellow := NewTestSpendSet(id("yellow")) + green := NewTestSpendSet(id("green")) thresholdProvider := acceptance.ThresholdProvider(func() int64 { return int64(weights.SeatCount()) @@ -595,10 +595,10 @@ func createSpends(pendingTasks *syncutils.Counter) map[string]TestSpend { return int64(weights.SeatCount()) }) - red := NewTestConflictSet(id("red")) - blue := NewTestConflictSet(id("blue")) - green := NewTestConflictSet(id("green")) - yellow := NewTestConflictSet(id("yellow")) + red := NewTestSpendSet(id("red")) + blue := NewTestSpendSet(id("blue")) + green := NewTestSpendSet(id("green")) + yellow := NewTestSpendSet(id("yellow")) SpendA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) SpendB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index f49bdd42b..ed2924eec 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -29,8 +29,8 @@ type SpendDAG[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp spendUnhooks *shrinkingmap.ShrinkingMap[SpendID, func()] - // conflictSetsByID is a mapping of ResourceIDs to ConflictSets. - conflictSetsByID *shrinkingmap.ShrinkingMap[ResourceID, *ConflictSet[SpendID, ResourceID, VoteRank]] + // spendSetsByID is a mapping of ResourceIDs to SpendSets. + spendSetsByID *shrinkingmap.ShrinkingMap[ResourceID, *SpendSet[SpendID, ResourceID, VoteRank]] // pendingTasks is a counter that keeps track of the number of pending tasks. pendingTasks *syncutils.Counter @@ -47,12 +47,12 @@ func New[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[Vot return &SpendDAG[SpendID, ResourceID, VoteRank]{ events: spenddag.NewEvents[SpendID, ResourceID](), - seatCount: seatCount, - spendsByID: shrinkingmap.New[SpendID, *Spend[SpendID, ResourceID, VoteRank]](), - spendUnhooks: shrinkingmap.New[SpendID, func()](), - conflictSetsByID: shrinkingmap.New[ResourceID, *ConflictSet[SpendID, ResourceID, VoteRank]](), - pendingTasks: syncutils.NewCounter(), - votingMutex: syncutils.NewDAGMutex[account.SeatIndex](), + seatCount: seatCount, + spendsByID: shrinkingmap.New[SpendID, *Spend[SpendID, ResourceID, VoteRank]](), + spendUnhooks: shrinkingmap.New[SpendID, func()](), + spendSetsByID: shrinkingmap.New[ResourceID, *SpendSet[SpendID, ResourceID, VoteRank]](), + pendingTasks: syncutils.NewCounter(), + votingMutex: syncutils.NewDAGMutex[account.SeatIndex](), } } @@ -106,7 +106,7 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) CreateSpend(id SpendID) { } func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateConflictingResources(id SpendID, resourceIDs ds.Set[ResourceID]) error { - joinedConflictSets, err := func() (ds.Set[ResourceID], error) { + joinedSpendSets, err := func() (ds.Set[ResourceID], error) { c.mutex.RLock() defer c.mutex.RUnlock() @@ -115,15 +115,15 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateConflictingResources(id return nil, ierrors.Errorf("spend already evicted: %w", spenddag.ErrEntityEvicted) } - return spend.JoinSpendSets(c.conflictSets(resourceIDs)) + return spend.JoinSpendSets(c.spendSets(resourceIDs)) }() if err != nil { return ierrors.Errorf("spend %s failed to join spend sets: %w", id, err) } - if !joinedConflictSets.IsEmpty() { - c.events.ConflictingResourcesAdded.Trigger(id, joinedConflictSets) + if !joinedSpendSets.IsEmpty() { + c.events.ConflictingResourcesAdded.Trigger(id, joinedSpendSets) } return nil @@ -246,15 +246,15 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendVoters(spendID SpendID) ( return ds.NewSet[account.SeatIndex]() } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictSets(spendID SpendID) (spendSets ds.Set[ResourceID], exists bool) { +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendSets(spendID SpendID) (spendSets ds.Set[ResourceID], exists bool) { spend, exists := c.spendsByID.Get(spendID) if !exists { return nil, false } spendSets = ds.NewSet[ResourceID]() - _ = spend.ConflictSets.ForEach(func(conflictSet *ConflictSet[SpendID, ResourceID, VoteRank]) error { - spendSets.Add(conflictSet.ID) + _ = spend.SpendSets.ForEach(func(spendSet *SpendSet[SpendID, ResourceID, VoteRank]) error { + spendSets.Add(spendSet.ID) return nil }) @@ -291,14 +291,14 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendChildren(spendID SpendID) return spendChildren, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictSetMembers(conflictSetID ResourceID) (spends ds.Set[SpendID], exists bool) { - conflictSet, exists := c.conflictSetsByID.Get(conflictSetID) +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendSetMembers(spendSetID ResourceID) (spends ds.Set[SpendID], exists bool) { + spendSet, exists := c.spendSetsByID.Get(spendSetID) if !exists { return nil, false } spends = ds.NewSet[SpendID]() - _ = conflictSet.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { + _ = spendSet.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { spends.Add(parent.ID) return nil }) @@ -436,16 +436,16 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spends(ids ds.Set[SpendID], ig }) } -// conflictSets returns the ConflictSets that are associated with the given ResourceIDs. If createMissing is set to -// true, it will create an empty ConflictSets for each missing ResourceID. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) conflictSets(resourceIDs ds.Set[ResourceID]) ds.Set[*ConflictSet[SpendID, ResourceID, VoteRank]] { - conflictSets := ds.NewSet[*ConflictSet[SpendID, ResourceID, VoteRank]]() +// spendSets returns the SpendSets that are associated with the given ResourceIDs. If createMissing is set to +// true, it will create an empty SpendSets for each missing ResourceID. +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spendSets(resourceIDs ds.Set[ResourceID]) ds.Set[*SpendSet[SpendID, ResourceID, VoteRank]] { + spendSets := ds.NewSet[*SpendSet[SpendID, ResourceID, VoteRank]]() resourceIDs.Range(func(resourceID ResourceID) { - conflictSets.Add(lo.Return1(c.conflictSetsByID.GetOrCreate(resourceID, c.conflictSetFactory(resourceID)))) + spendSets.Add(lo.Return1(c.spendSetsByID.GetOrCreate(resourceID, c.spendSetFactory(resourceID)))) }) - return conflictSets + return spendSets } // determineVotes determines the Spends that are supported and revoked by the given SpendIDs. @@ -494,16 +494,16 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) determineVotes(spendIDs ds.Set return supportedSpends, revokedSpends, nil } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) conflictSetFactory(resourceID ResourceID) func() *ConflictSet[SpendID, ResourceID, VoteRank] { - return func() *ConflictSet[SpendID, ResourceID, VoteRank] { - conflictSet := NewConflictSet[SpendID, ResourceID, VoteRank](resourceID) +func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spendSetFactory(resourceID ResourceID) func() *SpendSet[SpendID, ResourceID, VoteRank] { + return func() *SpendSet[SpendID, ResourceID, VoteRank] { + spendSet := NewSpendSet[SpendID, ResourceID, VoteRank](resourceID) - conflictSet.OnAllMembersEvicted(func(prevValue bool, newValue bool) { + spendSet.OnAllMembersEvicted(func(prevValue bool, newValue bool) { if newValue && !prevValue { - c.conflictSetsByID.Delete(conflictSet.ID) + c.spendSetsByID.Delete(spendSet.ID) } }) - return conflictSet + return spendSet } } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go index 1dc2775f3..ba9fba66b 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go @@ -53,28 +53,28 @@ func TestMemoryRelease(t *testing.T) { //t.Skip("skip memory test as for some reason it's failing") tf := newTestFramework(t) - createSpendSets := func(startSlot, conflictSetCount, evictionDelay, spendsInConflictSet int, prevConflictSetAlias string) (int, string) { + createSpendSets := func(startSlot, spendSetCount, evictionDelay, spendsInSpendSet int, prevSpendSetAlias string) (int, string) { slot := startSlot - for ; slot < startSlot+conflictSetCount; slot++ { - conflictSetAlias := fmt.Sprintf("conflictSet-%d", slot) - for conflictIndex := 0; conflictIndex < spendsInConflictSet; conflictIndex++ { - conflictAlias := fmt.Sprintf("conflictSet-%d:%d", slot, conflictIndex) - require.NoError(t, tf.CreateOrUpdateSpend(conflictAlias, []string{conflictSetAlias})) - if prevConflictSetAlias != "" { - require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevConflictSetAlias, 0)}, []string{})) + for ; slot < startSlot+spendSetCount; slot++ { + spendSetAlias := fmt.Sprintf("spendSet-%d", slot) + for conflictIndex := 0; conflictIndex < spendsInSpendSet; conflictIndex++ { + conflictAlias := fmt.Sprintf("spendSet-%d:%d", slot, conflictIndex) + require.NoError(t, tf.CreateOrUpdateSpend(conflictAlias, []string{spendSetAlias})) + if prevSpendSetAlias != "" { + require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevSpendSetAlias, 0)}, []string{})) } } - prevConflictSetAlias = conflictSetAlias + prevSpendSetAlias = spendSetAlias if slotToEvict := slot - evictionDelay; slotToEvict >= 0 { - for conflictIndex := 0; conflictIndex < spendsInConflictSet; conflictIndex++ { - conflictAlias := fmt.Sprintf("conflictSet-%d:%d", slotToEvict, conflictIndex) + for conflictIndex := 0; conflictIndex < spendsInSpendSet; conflictIndex++ { + conflictAlias := fmt.Sprintf("spendSet-%d:%d", slotToEvict, conflictIndex) tf.EvictSpend(conflictAlias) } } } - return slot, prevConflictSetAlias + return slot, prevSpendSetAlias } _, prevAlias := createSpendSets(0, 30000, 1, 2, "") @@ -97,7 +97,7 @@ func TestMemoryRelease(t *testing.T) { time.Sleep(time.Second) - require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).conflictSetsByID.Size()) + require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendSetsByID.Size()) require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendsByID.Size()) require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendUnhooks.Size()) memStatsEnd := memanalyzer.MemSize(tf) diff --git a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go index d76dde9db..18893d671 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -38,25 +38,25 @@ func (a *Assertions) LikedInstead(spendAliases []string, likedInsteadAliases ... require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadSpends.Size(), "LikedInstead returns wrong number of spends %d instead of %d", likedInsteadSpends.Size(), len(likedInsteadAliases)) } -// ConflictSetMembers asserts that the given resource has the given spend set members. -func (a *Assertions) ConflictSetMembers(resourceAlias string, spendAliases ...string) { - conflictSetMembers, exists := a.f.Instance.ConflictSetMembers(a.f.ResourceID(resourceAlias)) +// SpendSetMembers asserts that the given resource has the given spend set members. +func (a *Assertions) SpendSetMembers(resourceAlias string, spendAliases ...string) { + spendSetMembers, exists := a.f.Instance.SpendSetMembers(a.f.ResourceID(resourceAlias)) require.True(a.f.test, exists, "Resource %s does not exist", resourceAlias) - require.Equal(a.f.test, len(spendAliases), conflictSetMembers.Size(), "Resource %s has wrong number of parents", resourceAlias) + require.Equal(a.f.test, len(spendAliases), spendSetMembers.Size(), "Resource %s has wrong number of parents", resourceAlias) for _, spendAlias := range spendAliases { - require.True(a.f.test, conflictSetMembers.Has(a.f.SpendID(spendAlias)), "Resource %s does not have parent %s", resourceAlias, spendAlias) + require.True(a.f.test, spendSetMembers.Has(a.f.SpendID(spendAlias)), "Resource %s does not have parent %s", resourceAlias, spendAlias) } } -// ConflictSets asserts that the given spend has the given conflict sets. -func (a *Assertions) ConflictSets(spendAlias string, resourceAliases ...string) { - conflictSets, exists := a.f.Instance.ConflictSets(a.f.SpendID(spendAlias)) +// SpendSets asserts that the given spend has the given conflict sets. +func (a *Assertions) SpendSets(spendAlias string, resourceAliases ...string) { + spendSets, exists := a.f.Instance.SpendSets(a.f.SpendID(spendAlias)) require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) - require.Equal(a.f.test, len(resourceAliases), conflictSets.Size(), "Spend %s has wrong number of conflict sets", spendAlias) + require.Equal(a.f.test, len(resourceAliases), spendSets.Size(), "Spend %s has wrong number of conflict sets", spendAlias) for _, resourceAlias := range resourceAliases { - require.True(a.f.test, conflictSets.Has(a.f.ResourceID(resourceAlias)), "Spend %s does not have conflict set %s", spendAlias, resourceAlias) + require.True(a.f.test, spendSets.Has(a.f.ResourceID(resourceAlias)), "Spend %s does not have conflict set %s", spendAlias, resourceAlias) } } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go index 35cf20aa7..2a59a2887 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -52,10 +52,10 @@ func NewFramework( return f } -// CreateOrUpdateSpend creates a new spend or adds it to the given ConflictSets. +// CreateOrUpdateSpend creates a new spend or adds it to the given SpendSets. func (f *Framework) CreateOrUpdateSpend(alias string, resourceAliases []string) error { f.Instance.CreateSpend(f.SpendID(alias)) - return f.Instance.UpdateConflictingResources(f.SpendID(alias), f.ConflictSetIDs(resourceAliases...)) + return f.Instance.UpdateConflictingResources(f.SpendID(alias), f.SpendSetIDs(resourceAliases...)) } @@ -101,12 +101,12 @@ func (f *Framework) SpendIDs(aliases ...string) ds.Set[iotago.TransactionID] { return spendIDs } -// ConflictSetIDs translates the given aliases into an AdvancedSet of iotago.OutputIDs. -func (f *Framework) ConflictSetIDs(aliases ...string) ds.Set[iotago.OutputID] { - conflictSetIDs := ds.NewSet[iotago.OutputID]() +// SpendSetIDs translates the given aliases into an AdvancedSet of iotago.OutputIDs. +func (f *Framework) SpendSetIDs(aliases ...string) ds.Set[iotago.OutputID] { + spendSetIDs := ds.NewSet[iotago.OutputID]() for _, alias := range aliases { - conflictSetIDs.Add(f.ResourceID(alias)) + spendSetIDs.Add(f.ResourceID(alias)) } - return conflictSetIDs + return spendSetIDs } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go index d819492ef..258f0c565 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -14,38 +14,38 @@ import ( func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { for testName, testCase := range map[string]func(*testing.T, *Framework){ - "CreateSpend": CreateSpend, - "ExistingSpendJoinsConflictSets": ExistingSpendJoinsConflictSets, - "JoinConflictSetTwice": JoinConflictSetTwice, - "UpdateSpendParents": UpdateSpendParents, - "LikedInstead": LikedInstead, - "CreateSpendWithoutMembers": CreateSpendWithoutMembers, - "SpendAcceptance": SpendAcceptance, - "CastVotes": CastVotes, - "CastVotes_VoteRank": CastVotesVoteRank, - "CastVotesAcceptance": CastVotesAcceptance, - "EvictAcceptedSpend": EvictAcceptedSpend, - "EvictRejectedSpend": EvictRejectedSpend, + "CreateSpend": CreateSpend, + "ExistingSpendJoinsSpendSets": ExistingSpendJoinsSpendSets, + "JoinSpendSetTwice": JoinSpendSetTwice, + "UpdateSpendParents": UpdateSpendParents, + "LikedInstead": LikedInstead, + "CreateSpendWithoutMembers": CreateSpendWithoutMembers, + "SpendAcceptance": SpendAcceptance, + "CastVotes": CastVotes, + "CastVotes_VoteRank": CastVotesVoteRank, + "CastVotesAcceptance": CastVotesAcceptance, + "EvictAcceptedSpend": EvictAcceptedSpend, + "EvictRejectedSpend": EvictRejectedSpend, } { t.Run(testName, func(t *testing.T) { testCase(t, frameworkProvider(t)) }) } } -func ExistingSpendJoinsConflictSets(t *testing.T, tf *Framework) { +func ExistingSpendJoinsSpendSets(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource2"})) - tf.Assert.ConflictSetMembers("resource2", "conflict1", "conflict3") - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource2", "conflict1", "conflict3") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) - tf.Assert.ConflictSetMembers("resource2", "conflict1", "conflict2", "conflict3") - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource2", "conflict1", "conflict2", "conflict3") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") tf.Assert.LikedInstead([]string{"conflict3"}, "conflict1") } @@ -77,7 +77,7 @@ func UpdateSpendParents(t *testing.T, tf *Framework) { func CreateSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) @@ -85,7 +85,7 @@ func CreateSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -102,8 +102,8 @@ func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1") - tf.Assert.ConflictSetMembers("resource2", "conflict2") + tf.Assert.SpendSetMembers("resource1", "conflict1") + tf.Assert.SpendSetMembers("resource2", "conflict2") tf.Assert.LikedInstead([]string{"conflict1"}) tf.Assert.LikedInstead([]string{"conflict2"}) @@ -121,7 +121,7 @@ func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource3"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource3"})) - tf.Assert.ConflictSetMembers("resource3", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource3", "conflict3", "conflict4") require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict3")) @@ -138,7 +138,7 @@ func LikedInstead(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CastVotes("zero-weight", 1, "conflict1")) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") tf.Assert.LikedInstead([]string{"conflict1", "conflict2"}, "conflict1") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) @@ -159,9 +159,9 @@ func SpendAcceptance(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.ConflictSets("conflict1", "resource1") - tf.Assert.ConflictSets("conflict2", "resource1") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) @@ -169,7 +169,7 @@ func SpendAcceptance(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -194,9 +194,9 @@ func CastVotes(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.ConflictSets("conflict1", "resource1") - tf.Assert.ConflictSets("conflict2", "resource1") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) @@ -204,7 +204,7 @@ func CastVotes(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -229,9 +229,9 @@ func CastVotesVoteRank(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.ConflictSets("conflict1", "resource1") - tf.Assert.ConflictSets("conflict2", "resource1") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict2", "resource1") // create nested conflicts require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) @@ -240,7 +240,7 @@ func CastVotesVoteRank(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -283,9 +283,9 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.ConflictSets("conflict1", "resource1") - tf.Assert.ConflictSets("conflict2", "resource1") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) @@ -293,7 +293,7 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -321,36 +321,36 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { require.ErrorIs(t, tf.UpdateSpendParents("conflict2", []string{"conflict1"}, []string{}), spenddag.ErrEntityEvicted) } -func JoinConflictSetTwice(t *testing.T, tf *Framework) { +func JoinSpendSetTwice(t *testing.T, tf *Framework) { var conflictCreatedEventCount, resourceAddedEventCount int tf.Instance.Events().SpendCreated.Hook(func(id iotago.TransactionID) { conflictCreatedEventCount++ }) tf.Instance.Events().ConflictingResourcesAdded.Hook(func(id iotago.TransactionID, resourceID ds.Set[iotago.OutputID]) { - fmt.Println("conflict joins conflictset", id, resourceID) + fmt.Println("conflict joins spendset", id, resourceID) resourceAddedEventCount++ }) require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 1, resourceAddedEventCount) - tf.Assert.ConflictSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict1", "resource1") require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource2"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 2, resourceAddedEventCount) - tf.Assert.ConflictSets("conflict1", "resource1", "resource2") + tf.Assert.SpendSets("conflict1", "resource1", "resource2") require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1", "resource2"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 2, resourceAddedEventCount) - tf.Assert.ConflictSets("conflict1", "resource1", "resource2") + tf.Assert.SpendSets("conflict1", "resource1", "resource2") require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1", "resource2", "resource3", "resource4"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 3, resourceAddedEventCount) - tf.Assert.ConflictSets("conflict1", "resource1", "resource2", "resource3", "resource4") + tf.Assert.SpendSets("conflict1", "resource1", "resource2", "resource3", "resource4") } func EvictAcceptedSpend(t *testing.T, tf *Framework) { @@ -361,9 +361,9 @@ func EvictAcceptedSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.ConflictSets("conflict1", "resource1") - tf.Assert.ConflictSets("conflict2", "resource1") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) @@ -371,7 +371,7 @@ func EvictAcceptedSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -382,7 +382,7 @@ func EvictAcceptedSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict6", []string{"resource3"})) require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) - tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") + tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") tf.Assert.Children("conflict2", "conflict5", "conflict6") tf.Assert.Parents("conflict5", "conflict2") tf.Assert.Parents("conflict6", "conflict2") @@ -406,9 +406,9 @@ func EvictAcceptedSpend(t *testing.T, tf *Framework) { require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) - require.False(t, lo.Return2(tf.Instance.ConflictSetMembers(tf.ResourceID("resource1")))) - require.False(t, lo.Return2(tf.Instance.ConflictSetMembers(tf.ResourceID("resource2")))) - tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") + require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource1")))) + require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource2")))) + tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") tf.Assert.Parents("conflict5") tf.Assert.Parents("conflict6") @@ -427,9 +427,9 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.ConflictSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.ConflictSets("conflict1", "resource1") - tf.Assert.ConflictSets("conflict2", "resource1") + tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("conflict2", "resource1") require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) @@ -437,7 +437,7 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - tf.Assert.ConflictSetMembers("resource2", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") tf.Assert.Children("conflict1", "conflict3", "conflict4") tf.Assert.Parents("conflict3", "conflict1") tf.Assert.Parents("conflict4", "conflict1") @@ -448,7 +448,7 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpend("conflict6", []string{"resource3"})) require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) - tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") + tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") tf.Assert.Children("conflict2", "conflict5", "conflict6") tf.Assert.Parents("conflict5", "conflict2") tf.Assert.Parents("conflict6", "conflict2") @@ -476,9 +476,9 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { tf.EvictSpend("conflict1") require.Equal(t, 3, conflictEvictedEventCount) - tf.Assert.ConflictSetMembers("resource1", "conflict2") - require.False(t, lo.Return2(tf.Instance.ConflictSetMembers(tf.ResourceID("resource2")))) - tf.Assert.ConflictSetMembers("resource3", "conflict5", "conflict6") + tf.Assert.SpendSetMembers("resource1", "conflict2") + require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource2")))) + tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") tf.Assert.Parents("conflict5", "conflict2") tf.Assert.Parents("conflict6", "conflict2") @@ -491,9 +491,9 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) require.Equal(t, 4, conflictEvictedEventCount) - tf.Assert.ConflictSetMembers("resource1", "conflict2") - require.False(t, lo.Return2(tf.Instance.ConflictSetMembers(tf.ResourceID("resource2")))) - tf.Assert.ConflictSetMembers("resource3", "conflict5") + tf.Assert.SpendSetMembers("resource1", "conflict2") + require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource2")))) + tf.Assert.SpendSetMembers("resource3", "conflict5") tf.Assert.Parents("conflict5", "conflict2") tf.Assert.Children("conflict2", "conflict5") diff --git a/pkg/protocol/engine/mempool/tests/tests.go b/pkg/protocol/engine/mempool/tests/tests.go index 8ed8bc941..41557a794 100644 --- a/pkg/protocol/engine/mempool/tests/tests.go +++ b/pkg/protocol/engine/mempool/tests/tests.go @@ -110,15 +110,15 @@ func TestProcessTransactionWithReadOnlyInputs(t *testing.T, tf *TestFramework) { return nil }) - conflictSetsTx1, exists := tf.SpendDAG.ConflictSets(tf.TransactionID("tx1")) + spendSetsTx1, exists := tf.SpendDAG.SpendSets(tf.TransactionID("tx1")) require.True(t, exists) - require.Equal(t, 1, conflictSetsTx1.Size()) - require.True(t, conflictSetsTx1.Has(tf.StateID("genesis"))) + require.Equal(t, 1, spendSetsTx1.Size()) + require.True(t, spendSetsTx1.Has(tf.StateID("genesis"))) - conflictSetsTx2, exists := tf.SpendDAG.ConflictSets(tf.TransactionID("tx2")) + spendSetsTx2, exists := tf.SpendDAG.SpendSets(tf.TransactionID("tx2")) require.True(t, exists) - require.Equal(t, 1, conflictSetsTx2.Size()) - require.True(t, conflictSetsTx2.Has(tf.StateID("tx1:0"))) + require.Equal(t, 1, spendSetsTx2.Size()) + require.True(t, spendSetsTx2.Has(tf.StateID("tx1:0"))) } func TestProcessTransactionsOutOfOrder(t *testing.T, tf *TestFramework) { @@ -237,9 +237,9 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { require.False(t, lo.Return2(tx2Metadata.OrphanedSlot())) require.False(t, lo.Return2(tx3Metadata.OrphanedSlot())) - require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx1")))) - require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx2")))) - require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx3")))) + require.True(t, lo.Return2(tf.SpendDAG.SpendSets(tf.TransactionID("tx1")))) + require.True(t, lo.Return2(tf.SpendDAG.SpendSets(tf.TransactionID("tx2")))) + require.True(t, lo.Return2(tf.SpendDAG.SpendSets(tf.TransactionID("tx3")))) tf.Instance.Evict(2) @@ -248,9 +248,9 @@ func TestSetTxOrphanageMultipleAttachments(t *testing.T, tf *TestFramework) { require.True(t, lo.Return2(tx3Metadata.OrphanedSlot())) // All conflicts still exist, as they are kept around until MCA - require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx1")))) - require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx2")))) - require.True(t, lo.Return2(tf.SpendDAG.ConflictSets(tf.TransactionID("tx3")))) + require.True(t, lo.Return2(tf.SpendDAG.SpendSets(tf.TransactionID("tx1")))) + require.True(t, lo.Return2(tf.SpendDAG.SpendSets(tf.TransactionID("tx2")))) + require.True(t, lo.Return2(tf.SpendDAG.SpendSets(tf.TransactionID("tx3")))) tf.RequireTransactionsEvicted(map[string]bool{"tx1": false, "tx2": false, "tx3": false}) From aa045a27e136e1c7990b010559b49e9d86bd040b Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Tue, 21 Nov 2023 19:57:39 +0800 Subject: [PATCH 13/18] Rename conflict to spend in dashboard frontend --- .../build/app.48ab2676b5153e0e40b7.js | 1 + .../build/app.48ab2676b5153e0e40b7.js.map | 1 + .../build/app.6eea8010fee08f23aca6.js | 1 - .../build/app.6eea8010fee08f23aca6.js.map | 1 - .../dashboard/frontend/build/index.html | 2 +- .../frontend/src/app/components/Explorer.tsx | 6 +- .../app/components/ExplorerAddressResult.tsx | 8 +- .../components/ExplorerBlockQueryResult.tsx | 20 ++--- .../components/ExplorerOutputQueryResult.tsx | 8 +- ...esult.tsx => ExplorerSpendQueryResult.tsx} | 48 ++++++------ ...archbar.tsx => ExplorerSpendSearchbar.tsx} | 14 ++-- .../ExplorerTransactionMetadata.tsx | 8 +- .../frontend/src/app/components/Root.tsx | 4 +- .../frontend/src/app/misc/Payload.ts | 2 +- .../dashboard/frontend/src/app/misc/WS.ts | 4 +- .../frontend/src/app/stores/ExplorerStore.tsx | 62 +++++++-------- .../{ConflictsStore.tsx => SpendsStore.tsx} | 76 +++++++++---------- .../frontend/src/app/utils/conflict.ts | 21 ----- .../dashboard/frontend/src/app/utils/spend.ts | 21 +++++ components/dashboard/frontend/src/main.tsx | 6 +- 20 files changed, 157 insertions(+), 157 deletions(-) create mode 100644 components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js create mode 100644 components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map delete mode 100644 components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js delete mode 100644 components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map rename components/dashboard/frontend/src/app/components/{ExplorerConflictQueryResult.tsx => ExplorerSpendQueryResult.tsx} (52%) rename components/dashboard/frontend/src/app/components/{ExplorerConflictSearchbar.tsx => ExplorerSpendSearchbar.tsx} (74%) rename components/dashboard/frontend/src/app/stores/{ConflictsStore.tsx => SpendsStore.tsx} (55%) delete mode 100644 components/dashboard/frontend/src/app/utils/conflict.ts create mode 100644 components/dashboard/frontend/src/app/utils/spend.ts diff --git a/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js b/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js new file mode 100644 index 000000000..5094397e7 --- /dev/null +++ b/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2N3B4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NyA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48cGF0aCBkPSJNIDMyLjM4IDE4IEwgMzIuMzggNDgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},287:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2NnB4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NiA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},298:function(e,t,n){var r={"./af":107,"./af.js":107,"./ar":108,"./ar-dz":109,"./ar-dz.js":109,"./ar-kw":110,"./ar-kw.js":110,"./ar-ly":111,"./ar-ly.js":111,"./ar-ma":112,"./ar-ma.js":112,"./ar-sa":113,"./ar-sa.js":113,"./ar-tn":114,"./ar-tn.js":114,"./ar.js":108,"./az":115,"./az.js":115,"./be":116,"./be.js":116,"./bg":117,"./bg.js":117,"./bm":118,"./bm.js":118,"./bn":119,"./bn-bd":120,"./bn-bd.js":120,"./bn.js":119,"./bo":121,"./bo.js":121,"./br":122,"./br.js":122,"./bs":123,"./bs.js":123,"./ca":124,"./ca.js":124,"./cs":125,"./cs.js":125,"./cv":126,"./cv.js":126,"./cy":127,"./cy.js":127,"./da":128,"./da.js":128,"./de":129,"./de-at":130,"./de-at.js":130,"./de-ch":131,"./de-ch.js":131,"./de.js":129,"./dv":132,"./dv.js":132,"./el":133,"./el.js":133,"./en-au":134,"./en-au.js":134,"./en-ca":135,"./en-ca.js":135,"./en-gb":136,"./en-gb.js":136,"./en-ie":137,"./en-ie.js":137,"./en-il":138,"./en-il.js":138,"./en-in":139,"./en-in.js":139,"./en-nz":140,"./en-nz.js":140,"./en-sg":141,"./en-sg.js":141,"./eo":142,"./eo.js":142,"./es":143,"./es-do":144,"./es-do.js":144,"./es-mx":145,"./es-mx.js":145,"./es-us":146,"./es-us.js":146,"./es.js":143,"./et":147,"./et.js":147,"./eu":148,"./eu.js":148,"./fa":149,"./fa.js":149,"./fi":150,"./fi.js":150,"./fil":151,"./fil.js":151,"./fo":152,"./fo.js":152,"./fr":153,"./fr-ca":154,"./fr-ca.js":154,"./fr-ch":155,"./fr-ch.js":155,"./fr.js":153,"./fy":156,"./fy.js":156,"./ga":157,"./ga.js":157,"./gd":158,"./gd.js":158,"./gl":159,"./gl.js":159,"./gom-deva":160,"./gom-deva.js":160,"./gom-latn":161,"./gom-latn.js":161,"./gu":162,"./gu.js":162,"./he":163,"./he.js":163,"./hi":164,"./hi.js":164,"./hr":165,"./hr.js":165,"./hu":166,"./hu.js":166,"./hy-am":167,"./hy-am.js":167,"./id":168,"./id.js":168,"./is":169,"./is.js":169,"./it":170,"./it-ch":171,"./it-ch.js":171,"./it.js":170,"./ja":172,"./ja.js":172,"./jv":173,"./jv.js":173,"./ka":174,"./ka.js":174,"./kk":175,"./kk.js":175,"./km":176,"./km.js":176,"./kn":177,"./kn.js":177,"./ko":178,"./ko.js":178,"./ku":179,"./ku.js":179,"./ky":180,"./ky.js":180,"./lb":181,"./lb.js":181,"./lo":182,"./lo.js":182,"./lt":183,"./lt.js":183,"./lv":184,"./lv.js":184,"./me":185,"./me.js":185,"./mi":186,"./mi.js":186,"./mk":187,"./mk.js":187,"./ml":188,"./ml.js":188,"./mn":189,"./mn.js":189,"./mr":190,"./mr.js":190,"./ms":191,"./ms-my":192,"./ms-my.js":192,"./ms.js":191,"./mt":193,"./mt.js":193,"./my":194,"./my.js":194,"./nb":195,"./nb.js":195,"./ne":196,"./ne.js":196,"./nl":197,"./nl-be":198,"./nl-be.js":198,"./nl.js":197,"./nn":199,"./nn.js":199,"./oc-lnc":200,"./oc-lnc.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tk":223,"./tk.js":223,"./tl-ph":224,"./tl-ph.js":224,"./tlh":225,"./tlh.js":225,"./tr":226,"./tr.js":226,"./tzl":227,"./tzl.js":227,"./tzm":228,"./tzm-latn":229,"./tzm-latn.js":229,"./tzm.js":228,"./ug-cn":230,"./ug-cn.js":230,"./uk":231,"./uk.js":231,"./ur":232,"./ur.js":232,"./uz":233,"./uz-latn":234,"./uz-latn.js":234,"./uz.js":233,"./vi":235,"./vi.js":235,"./x-pseudo":236,"./x-pseudo.js":236,"./yo":237,"./yo.js":237,"./zh-cn":238,"./zh-cn.js":238,"./zh-hk":239,"./zh-hk.js":239,"./zh-mo":240,"./zh-mo.js":240,"./zh-tw":241,"./zh-tw.js":241};function s(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=a,e.exports=s,s.id=298},434:function(e,t,n){"use strict";n.r(t);var r=n(1),s=n(24),a=n(6),l=n(25),o=(n(297),n(285)),i=n(56),c=n(39),p=n(12),d=n(11),u=n(9),m=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let h=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Uptime: ",this.props.nodeStore.uptime)}};h=m([Object(a.b)("nodeStore"),a.c],h);var b=h,g=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let y=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Version: ",this.props.nodeStore.status.version)}};y=g([Object(a.b)("nodeStore"),a.c],y);var f=y,E=n(15),v=n(29),I={elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0},S=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const k=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let x=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Blocks Per Second"),r.createElement("small",null,"BPS: ",this.props.nodeStore.last_mps_metric.mps,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.mpsSeries,options:k})))}};x=S([Object(a.b)("nodeStore"),a.c],x);var j=x,O=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const w=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let D=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Current Tips"),r.createElement("small",null,"Tips: ",this.props.nodeStore.last_tips_metric.totaltips,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.tipsSeries,options:w})))}};D=O([Object(a.b)("nodeStore"),a.c],D);var R=D,_=n(2),C=n(28),N=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const T=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return C(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${C(Math.abs(e.value))}`}}}},I);let P=class extends r.Component{render(){let e=this.props.nodeStore.status.mem;return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Memory Usage"," ",C(e.heap_alloc)),r.createElement("small",null,"GC Cycles: ",e.num_gc," (Last Cycle: ",e.last_pause_gc/1e6,"ms) - "," ","Heap: "," ","[Obj: ",e.heap_objects,", In-Use: ",C(e.heap_sys-e.heap_idle),", Retained: ",C(e.heap_idle-e.heap_released),"]"),r.createElement(v.Line,{height:50,data:this.props.nodeStore.memSeries,options:T})))}};P=N([Object(a.b)("nodeStore"),a.c],P);var M=P,L=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const A=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let B=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Component Counter Blocks Per Second"),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("small",null,"BPS: ",this.props.nodeStore.last_component_counter_metric.store,"."),r.createElement("small",null,"Rate Setter - Estimate: ",this.props.nodeStore.last_rate_setter_metric.estimate)),r.createElement(v.Line,{height:50,data:this.props.nodeStore.componentSeries,options:A})))}};B=L([Object(a.b)("nodeStore"),a.c],B);var z=B,H=n(14),F=n(20),V=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Z=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"TangleTime Synced: ",this.props.nodeStore.status.tangleTime.synced?"Yes":"No"),r.createElement("small",null,r.createElement("div",null,r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Accepted Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.acceptedBlockID},this.props.nodeStore.status.tangleTime.acceptedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.confirmedBlockID},this.props.nodeStore.status.tangleTime.confirmedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Slot:",this.props.nodeStore.status.tangleTime.confirmedSlot)),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Committed Slot:",this.props.nodeStore.status.tangleTime.committedSlot)),r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.ATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.CTT/1e6),"dd.mm.yyyy HH:MM:ss"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Relative Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Relative Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RCTT/1e6),"dd.mm.yyyy HH:MM:ss")))))))}};Z=V([Object(a.b)("nodeStore"),a.c],Z);var U=Z,W=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let J=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Bootstrapped: ",this.props.nodeStore.status.tangleTime.bootstrapped?"Yes":"No")}};J=W([Object(a.b)("nodeStore"),a.c],J);var G=J,q=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let X=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Dashboard"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Node: ",this.props.nodeStore.status.id),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement(_.a.Item,null,r.createElement(b,null)))),r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement(_.a.Item,null,r.createElement(G,null)))),r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement(_.a.Item,null,r.createElement(f,null))))))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(U,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(j,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(z,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(M,null))))}};X=q([Object(a.b)("nodeStore"),a.c],X);var Q=n(16),K=n(23),$=n(22),Y=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ee=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Address or Block ID","aria-label":"Address or Block ID","aria-describedby":"basic-addon1",value:e,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:t})))))}};ee=Y([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],ee);var te=n(71),ne=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let re=class extends r.Component{render(){let{blksLiveFeed:e}=this.props.explorerStore;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Live Feed"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{height:"500px",overflow:"auto"}},r.createElement("h6",null,"Blocks"),r.createElement(te.a,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("td",null,"Id"),r.createElement("td",null,"Payload Type"))),r.createElement("tbody",null,e))))))))}};re=ne([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],re);var se=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ae=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.txID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/transaction/"+this.txID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Transaction ID","aria-label":"Transaction ID","aria-describedby":"basic-addon1",value:this.txID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ae=se([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],ae);var le=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let oe=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.outputID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/output/"+this.outputID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Output ID","aria-label":"Output ID","aria-describedby":"basic-addon1",value:this.outputID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};oe=le([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],oe);var ie=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ce=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.spendID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/spend/"+this.spendID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Spend ID","aria-label":"Spend ID","aria-describedby":"basic-addon1",value:this.spendID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ce=ie([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],ce);var pe=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let de=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("p",null,"Search for addresses, blocks, transactions, outputs and spends."))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(ee,null)),r.createElement(u.a,null,r.createElement(ae,null))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(oe,null)),r.createElement(u.a,null,r.createElement(ce,null))),r.createElement(re,null),r.createElement("small",null,"This explorer implementation is heavily inspired by ",r.createElement("a",{href:"https://thetangle.org"},"thetangle.org"),"."))}};de=pe([Object(a.b)("nodeStore"),a.c],de);var ue=n(288),me=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let he=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(ue.a,{inline:!0,as:"div"},r.createElement(K.a,{type:"text",onChange:this.updateSearch,placeholder:"Search the Tangle...",value:e,className:" mr-sm-2",disabled:t,onKeyUp:this.executeSearch}))}};he=me([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],he);var be,ge=n(17),ye=n(44),fe=n(3);!function(e){e[e.Status=0]="Status",e[e.BPSMetrics=1]="BPSMetrics",e[e.Block=2]="Block",e[e.NeighborStats=3]="NeighborStats",e[e.ComponentCounterMetrics=4]="ComponentCounterMetrics",e[e.TipsMetrics=5]="TipsMetrics",e[e.Vertex=6]="Vertex",e[e.TXAccepted=7]="TXAccepted",e[e.TipInfo=8]="TipInfo",e[e.Mana=9]="Mana",e[e.ManaMapOverall=10]="ManaMapOverall",e[e.ManaMapOnline=11]="ManaMapOnline",e[e.BlkManaDashboardAddress=12]="BlkManaDashboardAddress",e[e.RateSetter=13]="RateSetter",e[e.SpendSet=14]="SpendSet",e[e.Spend=15]="Spend",e[e.SlotInfo=16]="SlotInfo"}(be||(be={}));let Ee={};function ve(e,t){Ee[e]=t}function Ie(e){delete Ee[e]}var Se,ke,xe,je;!function(e){e[e.TaggedData=0]="TaggedData",e[e.Transaction=1]="Transaction",e[e.Faucet=3]="Faucet"}(Se||(Se={}));class Oe{}class we{}function De(e){switch(e){case Se.TaggedData:return"TaggedData";case Se.Transaction:return"Transaction";case Se.Faucet:return"Faucet";default:return"Unknown"}}class Re extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.token.id},r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",this.props.token.id),r.createElement(_.a.Item,null,"Amount: ",this.props.token.amount)))}}class _e extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.address},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address Type: ",this.props.unlock.address.type)),r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address: ",this.props.unlock.address.pubKeyHash)))}}class Ce extends r.Component{render(){return this.props.unlock.unixTime&&r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.unixTime},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}class Ne extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(_.a.Item,null,"Amount: ",this.props.unlock.amount)))}}class Te extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(_.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}function Pe(e){switch(e.type){case ke.Address:case ke.StateControllerAddress:case ke.GovernorAddress:return r.createElement(_e,{unlock:e});case ke.StorageDepositReturn:return r.createElement(Ne,{unlock:e});case ke.Expiration:return r.createElement(Te,{unlock:e});case ke.Timelock:return r.createElement(Ce,{unlock:e})}}!function(e){e[e.Address=0]="Address",e[e.StorageDepositReturn=1]="StorageDepositReturn",e[e.Timelock=2]="Timelock",e[e.Expiration=3]="Expiration",e[e.StateControllerAddress=4]="StateControllerAddress",e[e.GovernorAddress=5]="GovernorAddress",e[e.ImmutableAlias=6]="ImmutableAlias"}(ke||(ke={}));class Me extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.address},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address: ",this.props.feature.address)))}}class Le extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.data},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Data: ",this.props.feature.data)))}}class Ae extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.tag},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Data: ",this.props.feature.tag)))}}function Be(e){switch(e.type){case xe.Sender:case xe.Issuer:return r.createElement(Me,{feature:e.feature});case xe.Metadata:return r.createElement(Le,{feature:e.feature});case xe.Tag:return r.createElement(Ae,{feature:e.feature})}}!function(e){e[e.Sender=0]="Sender",e[e.Issuer=1]="Issuer",e[e.Metadata=2]="Metadata",e[e.Tag=3]="Tag"}(xe||(xe={}));class ze extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: BasicOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class He extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,{style:{wordBreak:"break-word"}},r.createElement(_.a.Item,null,"Type: AliasOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(_.a.Item,null,"AliasID: ",this.props.output.aliasId),r.createElement(_.a.Item,null,"StateIndex: ",this.props.output.stateIndex),r.createElement(_.a.Item,null,"State Metadata: ",this.props.output.stateMetadata," "),r.createElement(_.a.Item,null,"Foundry Counter: ",this.props.output.foundryCounter),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Fe extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: FoundryOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(_.a.Item,null,"Serial Number: ",this.props.output.serialNumber),r.createElement(_.a.Item,null,"Token Scheme: ",this.props.output.tokenScheme),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Ve extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: FoundryOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(_.a.Item,null,"NFT ID: ",this.props.output.nftId),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}function Ze(e){let t=e.outputID;switch(e.type){case je.Basic:return r.createElement(ze,{output:e.output,id:t});case je.Alias:return r.createElement(He,{output:e.output,id:t});case je.Foundry:return r.createElement(Fe,{output:e.output,id:t});case je.NFT:return r.createElement(Ve,{output:e.output,id:t});default:return}}!function(e){e[e.Treasury=2]="Treasury",e[e.Basic=3]="Basic",e[e.Alias=4]="Alias",e[e.Foundry=5]="Foundry",e[e.NFT=6]="NFT"}(je||(je={}));var Ue=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},We=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};const Ge="1111111111111111111111111111111111111111111111111111111111111111";class qe{}var Xe;!function(e){e[e.NotFound=1]="NotFound",e[e.BadRequest=2]="BadRequest"}(Xe||(Xe={}));class Qe{constructor(e){this.latest_blocks=[],this.blk=null,this.addr=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.spend=null,this.spendChildren=null,this.spendSpends=null,this.spendVoters=null,this.tips=null,this.slotInfo=new qe,this.query_loading=!1,this.query_err=null,this.search="",this.search_result=null,this.searching=!1,this.searchAny=()=>Je(this,void 0,void 0,(function*(){this.updateSearching(!0);try{let e=yield fetch("/api/search/"+this.search),t=yield e.json();this.updateSearchResult(t)}catch(e){this.updateQueryError(e)}})),this.resetSearch=()=>{this.search_result=null,this.searching=!1},this.updateSearchResult=e=>{this.search_result=e,this.searching=!1;let t=this.search;this.search="",this.search_result.block?this.routerStore.push("/explorer/block/"+t):this.search_result.address?this.routerStore.push("/explorer/address/"+t):this.routerStore.push("/explorer/404/"+t)},this.updateSearch=e=>{this.search=e},this.updateSearching=e=>this.searching=e,this.searchBlock=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/block/"+e);this.updateBlock(t)})),this.searchAddress=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/address/"+e);this.updateAddress(t)})),this.getSlotDetails=e=>Je(this,void 0,void 0,(function*(){yield this.getSlotInfo(e)})),this.getTransaction=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/transaction/"+e);for(let e=0;eJe(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/attachments`);this.txAttachments=t})),this.getTransactionMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/metadata`);this.txMetadata=t})),this.getOutput=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/output/"+e);this.output=t})),this.getOutputMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/metadata`);this.outputMetadata=t})),this.getOutputConsumers=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/consumers`);this.outputConsumers=t})),this.getPendingMana=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/mana/pending?OutputID="+e);this.pendingMana=t})),this.getSpend=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/spend/"+e);this.spend=t})),this.getSpendChildren=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/spend/${e}/children`);this.spendChildren=t})),this.getSpendSpends=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/spend/${e}/spends`);this.spendSpends=t})),this.getSpendVoters=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/spend/${e}/voters`);this.spendVoters=t})),this.getSlotInfo=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/slot/commitment/"+e);this.slotInfo=t})),this.getTips=()=>Je(this,void 0,void 0,(function*(){const e=yield this.fetchJson("get","/api/tips");this.tips=e})),this.reset=()=>{this.blk=null,this.query_err=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.spend=null,this.spendChildren=null,this.spendSpends=null,this.tips=null,this.slotInfo=new qe},this.updateAddress=e=>{this.addr=e,this.query_err=null,this.query_loading=!1},this.updateBlock=e=>{switch(this.blk=e,this.blk.spendIDs=this.blk.spendIDs?this.blk.spendIDs:[],this.blk.addedSpendIDs=this.blk.addedSpendIDs?this.blk.addedSpendIDs:[],this.blk.subtractedSpendIDs=this.blk.subtractedSpendIDs?this.blk.subtractedSpendIDs:[],this.blk.strongChildren=this.blk.strongChildren?this.blk.strongChildren:[],this.blk.weakChildren=this.blk.weakChildren?this.blk.weakChildren:[],this.blk.shallowLikeChildren=this.blk.shallowLikeChildren?this.blk.shallowLikeChildren:[],this.blk.strongParents=this.blk.strongParents?this.blk.strongParents:[],this.blk.weakParents=this.blk.weakParents?this.blk.weakParents:[],this.blk.shallowLikedParents=this.blk.shallowLikedParents?this.blk.shallowLikedParents:[],this.query_err=null,this.query_loading=!1,e.payloadType){case Se.Transaction:case Se.TaggedData:this.payload=e.payload;break;case Se.Faucet:this.payload=e.payload;default:this.payload=e.payload}},this.updateQueryLoading=e=>this.query_loading=e,this.updateQueryError=e=>{this.query_err=e,this.query_loading=!1,this.searching=!1},this.addLiveFeedBlock=e=>{-1===this.latest_blocks.findIndex(t=>t.id==e.id)&&(this.latest_blocks.length>=50&&this.latest_blocks.shift(),this.latest_blocks.push(e))},this.routerStore=e,ve(be.Block,this.addLiveFeedBlock)}get blksLiveFeed(){let e=[];for(let t=this.latest_blocks.length-1;t>=0;t--){let n=this.latest_blocks[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id)),r.createElement("td",null,De(n.payload_type))))}return e}get tipsList(){let e=[];if(this.tips)for(let t=0;t=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let et=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,e.content_title,": "," ",e.content)))}};et=Ye([Object(a.b)("explorerStore"),a.c],et);var tt,nt=n(0),rt=n(282);!function(e){e[e.Ed25519=0]="Ed25519",e[e.BLS=1]="BLS"}(tt||(tt={}));class st extends r.Component{render(){let e=this.props.signature;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Public Key: ",e.publicKey),r.createElement(_.a.Item,null,"Signature: ",e.signature)))))}}class at extends r.Component{renderSignatureComponent(){switch(this.props.block.signatureType){case tt.Ed25519:return r.createElement(st,{signature:this.props.block.signature})}}render(){let e=this.props.block;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,"Index: ",r.createElement(Q.a,{variant:"primary"},this.props.key),r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: ",e.type),e.signatureType&&r.createElement(_.a.Item,null,"Signature Type: ",function(e){switch(e){case tt.Ed25519:return"Ed25519 Signature";case tt.BLS:return"BLS Signature";default:return"Unknown Signature Type"}}(e.signatureType)),this.renderSignatureComponent())))}}const lt={maxHeight:"1000px",overflow:"auto",width:"47%",fontSize:"85%"};class ot extends r.Component{render(){let e=this.props.txID,t=this.props.tx;return t&&e&&r.createElement("div",null,r.createElement("h4",null,"Transaction"),r.createElement("p",null," ",e," "),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginTop:"10px",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Transaction Essence")),r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",r.createElement("a",{href:"/explorer/transaction/"+e}," ",e)),r.createElement(_.a.Item,null,"Network ID: ",t.networkId),r.createElement(_.a.Item,null,"Creation Time: ",t.creationSlot),r.createElement(_.a.Item,null,r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",{className:"align-self-start input-output-list",style:lt},r.createElement("span",null,"Inputs"),r.createElement("hr",null),t.inputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),r.createElement("div",{className:"mb-2",key:"input"+t},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Output ID: ",e.referencedOutputID.hex)))))),r.createElement(nt.b.Provider,{value:{color:"#00a0ff",size:"2em"}},r.createElement("div",null,r.createElement(rt.a,null))),r.createElement("div",{style:lt},r.createElement("span",null,"Outputs"),r.createElement("hr",null),t.outputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),Ze(e)))))),t.payload&&r.createElement(_.a.Item,null,"Data payload: ",t.payload)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Unlock Blocks")),r.createElement(r.Fragment,null,t.unlocks.map((e,t)=>r.createElement(at,{block:e,key:t}))))))}}var it=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ct=class extends r.Component{render(){let{payload:e,blk:t}=this.props.explorerStore,n=t.txId,s=e;return r.createElement(p.a,null,r.createElement(ot,{txID:n,tx:s}))}};function pt(e){switch(e){case dt:return"MasterSpendID";case ut:return"UndefinedSpendID";case mt:return"LazyBookedSpendsSpendID";case ht:return"InvalidSpendID";default:return e}}ct=it([Object(a.b)("explorerStore"),a.c],ct);const dt="4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM",ut="11111111111111111111111111111111",mt="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF",ht="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG";var bt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let gt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address: ",e.address),r.createElement(_.a.Item,null,"Access Mana Pledge ID: ",e.accessManaPledgeID),r.createElement(_.a.Item,null,"Consensus Mana Pledge ID: ",e.consensusManaPledgeID),r.createElement(_.a.Item,null,"Nonce: ",e.nonce)))))}};gt=bt([Object(a.b)("explorerStore"),a.c],gt);var yt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ft=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Tag: ",e.tag),r.createElement(_.a.Item,null,"Data: ",e.data)))))}};ft=yt([Object(a.b)("explorerStore"),a.c],ft);var Et=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let vt=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchBlock(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchBlock(this.props.match.params.id),null}getPayloadType(){return De(this.props.explorerStore.blk.payloadType)}renderPayload(){switch(this.props.explorerStore.blk.payloadType){case Se.Transaction:return this.props.explorerStore.blk.objectivelyInvalid?r.createElement(et,null):r.createElement(ct,null);case Se.TaggedData:return r.createElement(ft,null);case Se.Faucet:return r.createElement(gt,null);default:return r.createElement(et,null)}}render(){let{id:e}=this.props.match.params,{blk:t,query_loading:n,query_err:s}=this.props.explorerStore;return e===Ge?r.createElement(p.a,null,r.createElement("h3",null,"Genesis Block"),r.createElement("p",null,"In the beginning there was the genesis.")):s?r.createElement(p.a,null,r.createElement("h3",null,"Block not available - 404"),r.createElement("p",null,"Block with ID ",e," not found.")):r.createElement(p.a,null,r.createElement("h3",null,"Block"),r.createElement("p",null,e," "," ",t&&r.createElement(r.Fragment,null,r.createElement("br",null),r.createElement("span",null,r.createElement(Q.a,{variant:"light",style:{marginRight:10}},"Issuance Time: ",F(new Date(1e3*t.issuanceTimestamp),"dd.mm.yyyy HH:MM:ss")),r.createElement(Q.a,{variant:"light"},"Solidification Time: ",F(new Date(1e3*t.solidificationTimestamp),"dd.mm.yyyy HH:MM:ss"))))),t&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Payload Type: ",this.getPayloadType()),r.createElement(_.a.Item,null,"Sequence Number: ",t.sequenceNumber),r.createElement(_.a.Item,null,"spendIDs:",r.createElement(_.a,null,t.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"AddedspendIDs:",r.createElement(_.a,null,t.addedSpendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"AddedSpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"SubtractedspendIDs:",r.createElement(_.a,null,t.subtractedSpendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SubtractedSpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"Solid: ",t.solid?"Yes":"No"),r.createElement(_.a.Item,null,"Scheduled: ",t.scheduled?"Yes":"No"),r.createElement(_.a.Item,null,"Booked: ",t.booked?"Yes":"No"),r.createElement(_.a.Item,null,"Orphaned: ",t.orphaned?"Yes":"No"),r.createElement(_.a.Item,null,"Objectively Invalid: ",t.objectivelyInvalid?"Yes":"No"),r.createElement(_.a.Item,null,"Subjectively Invalid: ",t.subjectivelyInvalid?"Yes":"No"),r.createElement(_.a.Item,null,"Acceptance: ",t.acceptance?"Yes":"No"),r.createElement(_.a.Item,null,"Acceptance Time: ",F(new Date(1e3*t.acceptanceTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(_.a.Item,null,"Confirmation: ",t.confirmation?"Yes":"No"),r.createElement(_.a.Item,null,"Confirmation Time: ",F(new Date(1e3*t.confirmationTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(_.a.Item,null,"Confirmation by slot: ",t.confirmationBySlot?"Yes":"No"),r.createElement(_.a.Item,null,"Confirmation by slot time: ",F(new Date(1e3*t.confirmationBySlotTime),"dd.mm.yyyy HH:MM:ss"))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Slot Commitment"),r.createElement(_.a,null,r.createElement(_.a.Item,null,"CommitmentID: ",t.commitmentID),r.createElement(_.a.Item,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Index: ",t.commitment.index),r.createElement(_.a.Item,null,"prevID: ",t.commitment.prevID),r.createElement(_.a.Item,null,"rootsID: ",t.commitment.rootsID),r.createElement(_.a.Item,null,"Cumulative Weight: ",t.commitment.cumulativeWeight))),r.createElement(_.a.Item,null,"LatestConfirmedSlot: ",t.latestConfirmedSlot)))),!!t.rank&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Markers"),r.createElement(_.a,null,r.createElement(_.a.Item,null,"Rank: ",t.rank),r.createElement(_.a.Item,null,"SequenceID: ",t.sequenceID),r.createElement(_.a.Item,null,"PastMarkerGap: ",t.pastMarkerGap),r.createElement(_.a.Item,null,"IsPastMarker: ",t.isPastMarker?"Yes":"No"),r.createElement(_.a.Item,null,"Past markers: ",t.pastMarkers)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"IssuerID: ",t.issuerID),r.createElement(_.a.Item,{style:{overflow:"auto"}},"Block Signature: ",t.signature)))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.strongParents.map((e,n)=>r.createElement(_.a.Item,{key:"Strong Parent"+n+1,className:"text-break"},"Strong Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongParents[n]},t.strongParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.weakParents.map((e,n)=>r.createElement(_.a.Item,{key:"Weak Parent"+n+1,className:"text-break"},"Weak Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakParents[n]},t.weakParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.shallowLikedParents.map((e,n)=>r.createElement(_.a.Item,{key:"Shallow Liked Parent"+n+1,className:"text-break"},"Shallow Liked Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikedParents[n]},t.shallowLikedParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.strongChildren.map((e,n)=>r.createElement(_.a.Item,{key:"Strong Child"+n+1,className:"text-break"},"Strong Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongChildren[n]},t.strongChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.weakChildren.map((e,n)=>r.createElement(_.a.Item,{key:"Weak Child"+n+1,className:"text-break"},"Weak Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakChildren[n]},t.weakChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.shallowLikeChildren.map((e,n)=>r.createElement(_.a.Item,{key:"ShallowLike Child"+n+1,className:"text-break"},"ShallowLike Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikeChildren[n]},t.shallowLikeChildren[n])))))),r.createElement(d.a,{className:"mb-3",style:{marginTop:"20px",marginBottom:"20px"}},r.createElement(u.a,null,r.createElement("h3",null,"Payload"))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,this.renderPayload()))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};vt=Et([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],vt);var It=n(289);function St(e){let t="",n=Math.round(e);return t=n<1e3?n.toString(10)+" m":n<1e6?(n/1e3).toFixed(3)+" Km":n<1e9?(n/1e6).toFixed(3)+" Mm":n<1e12?(n/1e9).toFixed(3)+" Gm":n<1e15?(n/1e12).toFixed(3)+" Tm":(n/1e15).toFixed(3)+" Pm",t}var kt=n(281),xt=n(99),jt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ot=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchAddress(this.props.match.params.id)}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchAddress(this.props.match.params.id),null}render(){let{id:e}=this.props.match.params,{addr:t,query_loading:n,query_err:s}=this.props.explorerStore,a=[],l=[],o=[];if(s)return r.createElement(p.a,null,r.createElement("h3",null,"Address not available - 404"),r.createElement("p",null,"Address ",e," not found."));if(t){t.explorerOutputs.forEach(e=>{e.metadata.consumerCount>0?a.push(e):l.push(e)});let e=(e,t)=>t.txTimestamp===e.txTimestamp?t.id.transactionID==e.id.transactionID?t.id.outputIndex-e.id.outputIndex:t.id.transactionID.localeCompare(e.id.transactionID):t.txTimestamp-e.txTimestamp;l.sort(e),a.sort(e)}return r.createElement(p.a,null,r.createElement("h3",{style:{marginBottom:"40px"}},"Address ",r.createElement("strong",null,e)," ",null!==t&&r.createElement("span",null,"(",t.explorerOutputs.length," Outputs)")),null!==t?r.createElement(r.Fragment,null,null!==t.explorerOutputs&&100===t.explorerOutputs.length&&r.createElement(It.a,{variant:"warning"},"Max. 100 outputs are shown."),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:7},r.createElement(_.a,null,r.createElement("h4",null,"Available Balances"),0===o.length?"There are no balances currently available.":r.createElement("div",null,r.createElement(kt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:9},r.createElement("strong",null,"Color")),r.createElement(u.a,null,r.createElement("strong",null,"Balance")))),o)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement("h4",null,"Unspent Outputs"),0===l.length?"There are no unspent outputs currently available.":r.createElement("div",null,l.map(e=>r.createElement(wt,{output:e})))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement("h4",null,"Spent Outputs"),0===a.length?"There are no spent outputs currently available.":r.createElement("div",null,a.map(e=>r.createElement(wt,{output:e}))))))):r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};Ot=jt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Ot);class wt extends r.Component{constructor(e){super(e),this.state={enabled:!1}}render(){return r.createElement(_.a.Item,null,r.createElement(xt.a,{variant:Rt(this.props.output.output.type),onClick:()=>{this.setState({enabled:!this.state.enabled})},block:!0},r.createElement(d.a,null,r.createElement(u.a,{xs:6,style:{textAlign:"left"}},this.props.output.id.base58," "),r.createElement(u.a,{style:{textAlign:"left"}},function(e){switch(e){case je.Basic:return"Basic Output";case je.Alias:return"Alias Output";case je.Foundry:return"Foundry Output";case je.NFT:return"NFT Output";default:return}}(this.props.output.output.type)," "),r.createElement(u.a,{style:{textAlign:"left"}},new Date(1e3*this.props.output.txTimestamp).toLocaleString()))),r.createElement(d.a,{style:{fontSize:"90%"}},r.createElement(u.a,null,this.state.enabled?Ze(this.props.output.output):null),r.createElement(u.a,null,this.state.enabled?r.createElement(Dt,{metadata:this.props.output.metadata,timestamp:this.props.output.txTimestamp,pendingMana:this.props.output.pendingMana}):null)))}}class Dt extends r.Component{render(){let e=this.props.metadata,t=this.props.timestamp,n=this.props.pendingMana;return r.createElement(_.a,null,"spendIDs:",r.createElement(_.a,null,e.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e))))),r.createElement(_.a.Item,null,"Pending mana: ",St(n)),r.createElement(_.a.Item,null,"Timestamp: ",new Date(1e3*t).toLocaleString()),r.createElement(_.a.Item,null,"Consumer Count: ",e.consumerCount),e.confirmedConsumer&&r.createElement(_.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+e.confirmedConsumer},e.confirmedConsumer)," "))}}let Rt=e=>{switch(e){case je.Basic:case je.Alias:return"light";case je.Foundry:return"success";case je.NFT:return"info";default:return"danger"}};var _t=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ct=class extends r.Component{render(){let{search:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer 404"),r.createElement("p",null,"The search via '",e,"' did not yield any results."))}};Ct=_t([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Ct);var Nt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const Tt=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return C(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${C(Math.abs(e.value))}`}}}},I);let Pt=class extends r.Component{render(){let e=this.props.nodeStore.neighbor_metrics.get(this.props.identity),t=e.current;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,r.createElement("h5",null,t.id)),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,{variant:"flush",as:"small"},r.createElement(_.a.Item,null,"Origin:"," ",t.connection_origin))),r.createElement(u.a,null,r.createElement(_.a,{variant:"flush",as:"small"},r.createElement(_.a.Item,null,"Address: ",t.address)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h6",null,"Network (Tx/Rx)"),r.createElement(Q.a,{pill:!0,variant:"light"},"Total: ",t.packets_written," / ",t.packets_read)," ",r.createElement(Q.a,{pill:!0,variant:"light"},"Current: ",C(e.currentNetIO&&e.currentNetIO.tx)," / ",C(e.currentNetIO&&e.currentNetIO.rx)),r.createElement(v.Line,{height:30,data:e.netIOSeries,options:Tt})))))))}};Pt=Nt([Object(a.b)("nodeStore"),a.c],Pt);var Mt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Lt=class extends r.Component{render(){let e=[];return this.props.nodeStore.neighbor_metrics.forEach((t,n)=>{e.push(r.createElement(Pt,{key:n,identity:n}))}),r.createElement(p.a,null,r.createElement("h3",null,"Neighbors ",e.length>0&&r.createElement("span",null,"(",e.length,")")),r.createElement("p",null,"Currently connected neighbors."),e)}};Lt=Mt([Object(a.b)("nodeStore"),a.c],Lt);var At=n(57),Bt=n(103),zt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ht=class extends r.Component{constructor(){super(...arguments),this.updateVerticesLimit=e=>{this.props.visualizerStore.updateVerticesLimit(e.target.value)},this.pauseResumeVisualizer=e=>{this.props.visualizerStore.pauseResume()},this.updateSearch=e=>{this.props.visualizerStore.updateSearch(e.target.value)},this.searchAndHighlight=e=>{"Enter"===e.key&&this.props.visualizerStore.searchAndHighlight()},this.toggleBackgroundDataCollection=()=>{this.props.nodeStore.collecting?this.props.nodeStore.unregisterHandlers():this.props.nodeStore.registerHandlers()}}componentDidMount(){this.props.visualizerStore.start()}componentWillUnmount(){this.props.visualizerStore.stop(),this.props.nodeStore.registerHandlers()}render(){let{vertices:e,finalized_count:t,selected:n,verticesLimit:s,tips_count:a,paused:l,search:o}=this.props.visualizerStore,{last_mps_metric:i,collecting:c}=this.props.nodeStore;return r.createElement(p.a,null,r.createElement("h3",null,"Visualizer"),r.createElement(d.a,{className:"mb-1"},r.createElement(u.a,{xs:5},r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Vertices Limit")),r.createElement(K.a,{placeholder:"limit",type:"number",value:s.toString(),onChange:this.updateVerticesLimit,"aria-label":"vertices-limit","aria-describedby":"vertices-limit"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Search Vertex")),r.createElement(K.a,{placeholder:"search",type:"text",value:o,onChange:this.updateSearch,"aria-label":"vertices-search",onKeyUp:this.searchAndHighlight,"aria-describedby":"vertices-search"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Ensures that only data needed for the visualizer is collected."))},r.createElement(xt.a,{variant:"outline-secondary",onClick:this.toggleBackgroundDataCollection,size:"sm"},c?"Stop Background Data Collection":"Collect Background data")),r.createElement("br",null)),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Pauses/resumes rendering the graph."))},r.createElement(xt.a,{onClick:this.pauseResumeVisualizer,size:"sm",variant:"outline-secondary"},l?"Resume Rendering":"Pause Rendering")))),r.createElement(u.a,{xs:{span:5,offset:2}},r.createElement("p",null,r.createElement(Q.a,{pill:!0,style:{background:"#b9b7bd",color:"white"}},"BLK Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#6c71c4",color:"white"}},"BLK Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#393e46",color:"white"}},"TX Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#fad02c",color:"white"}},"TX Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#cb4b16",color:"white"}},"Tip")," ",r.createElement(Q.a,{pill:!0,style:{background:"#b58900",color:"white"}},"Unknown"),r.createElement("br",null),"Vertices: ",e.size,", Tips: ",a,", Confirmed/UnConfirmed: ",t,"/",e.size-t,","," ","BPS: ",i.mps,r.createElement("br",null),"Selected: ",n?r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id.substr(0,10)):"-",r.createElement("br",null),n?n.strongParents&&r.createElement("span",null," Strong:"," ",n.strongParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.weakParents&&r.createElement("span",null," Weak:"," ",n.weakParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.shallowLikedParents&&r.createElement("span",null," Shallow Liked:"," ",n.shallowLikedParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):""))),r.createElement("div",{className:"visualizer",style:{zIndex:-1,position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#ededed"},id:"visualizer"}))}};Ht=zt([Object(a.b)("visualizerStore"),Object(a.b)("nodeStore"),a.c],Ht);var Ft=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Vt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTips()}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{tipsList:e}=this.props.explorerStore;return r.createElement(p.a,null,r.createElement("h3",null,"Tips"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BlockID"))),r.createElement("tbody",null,e)))}};Vt=Ft([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Vt);var Zt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ut=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransaction(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,tx:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Transaction not available - 404"),r.createElement("p",null,"Transaction with ID ",e," not found.")):r.createElement(ot,{txID:e,tx:n})}};Ut=Zt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Ut);var Wt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Jt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionMetadata(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,txMetadata:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Metadata"),r.createElement("p",null," Metadata for transaction ID ",e," not found.")):r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Metadata"),n&&r.createElement(_.a,null,r.createElement(_.a.Item,null,"SpendIDs:",r.createElement(_.a,null,n.spendIDs&&n.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement("a",{href:"/explorer/transaction/"+e},e))))),r.createElement(_.a.Item,null,"Booked: ",n.booked.toString()),r.createElement(_.a.Item,null,"Confirmation State: ",n.confirmationState)))}};Jt=Wt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Jt);var Gt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let qt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionAttachments(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txAttachments:e}=this.props.explorerStore;return r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Attachments"),e&&e.blockIDs&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,e.blockIDs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))}};qt=Gt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],qt);class Xt extends r.Component{render(){let{id:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement(Ut,{txId:e}),r.createElement(Jt,{txId:e}),r.createElement(qt,{txId:e}))}}var Qt;function Kt(e){switch(e){case Qt.Undefined:return"Undefined";case Qt.Rejected:return"Rejected";case Qt.Pending:return"Pending";case Qt.Accepted:return"Accepted";case Qt.Confirmed:return"Confirmed";default:return"Undefined Confirmation State"}}!function(e){e[e.Undefined=0]="Undefined",e[e.Rejected=1]="Rejected",e[e.Pending=2]="Pending",e[e.Accepted=3]="Accepted",e[e.Confirmed=4]="Confirmed"}(Qt||(Qt={}));var $t=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Yt=class extends r.Component{componentDidMount(){this.props.explorerStore.getOutput(this.props.match.params.id),this.props.explorerStore.getPendingMana(this.props.match.params.id),this.props.explorerStore.getOutputMetadata(this.props.match.params.id),this.props.explorerStore.getOutputConsumers(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,output:n,pendingMana:s,outputMetadata:a,outputConsumers:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Output not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Output"),n&&r.createElement("div",{className:"mb-2"},Ze(n),r.createElement(_.a,null,s&&r.createElement(_.a.Item,null,"Pending Mana",r.createElement("hr",null),r.createElement("div",null,"Value: ",St(s.mana)),r.createElement("div",null,"Timestamp: ",new Date(1e3*s.timestamp).toLocaleString())))),r.createElement("h4",null,"Metadata"),a&&r.createElement("div",{className:"mb-2"},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+a.outputID.transactionID},a.outputID.transactionID)," "),"spendIDs:",r.createElement(_.a,null,a.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e))))),r.createElement(_.a.Item,null,"Consumer Count: ",a.consumerCount),r.createElement(_.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+a.confirmedConsumer},a.confirmedConsumer)," "),r.createElement(_.a.Item,null,"Confirmation State: ",Kt(a.confirmationState)),r.createElement(_.a.Item,null,"Confirmation State Time: ",new Date(1e3*a.confirmationStateTime).toLocaleString()))),r.createElement("h4",null,"Consumers"),l&&r.createElement("div",null,r.createElement(_.a,null,l.consumers.map((e,t)=>{return r.createElement(_.a.Item,{key:t},r.createElement("div",null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+e.transactionID},e.transactionID)),r.createElement("div",null,"Valid: ","true"===(n=e.valid)?r.createElement(Q.a,{variant:"success"},"True"):"false"===n?r.createElement(Q.a,{variant:"danger"},"False"):r.createElement(Q.a,{variant:"warning"},"Maybe")," "));var n}))))}};Yt=$t([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Yt);var en=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let tn=class extends r.Component{componentDidMount(){this.props.explorerStore.getSpend(this.props.match.params.id),this.props.explorerStore.getSpendChildren(this.props.match.params.id),this.props.explorerStore.getSpendSpends(this.props.match.params.id),this.props.explorerStore.getSpendVoters(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,spend:n,spendChildren:s,spendSpends:a,spendVoters:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Spend not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Spend"),n&&r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",pt(n.id)),r.createElement(_.a.Item,null,"Parents:",r.createElement(_.a,null,n.parents.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"Spends:",n.spendIDs&&r.createElement(_.a,null,n.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))),r.createElement(_.a.Item,null,"ConfirmationState: ",Kt(n.confirmationState)),r.createElement(_.a.Item,null," Children:",s&&r.createElement(_.a,null,s.childSpends.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/spend/"+e.spendID},pt(e.spendID)))))),r.createElement(_.a.Item,null," Spends:",a&&r.createElement(_.a,null,a.spends.map((e,t)=>r.createElement("div",{key:t},"OutputID: ",r.createElement("a",{href:"/explorer/output/"+e.outputID.base58},e.outputID.base58),r.createElement(_.a,{className:"mb-2"},e.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/spend/"+e},pt(e))))))))),r.createElement(_.a.Item,null," Voters:",l&&r.createElement(_.a,null,l.voters.map((e,t)=>r.createElement(_.a.Item,{key:e+t},e))))))}};tn=en([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],tn);var nn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let rn=class extends r.Component{render(){let{slotLiveFeed:e}=this.props.slotStore;return r.createElement(p.a,null,r.createElement("h3",null,"Slots"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Index"),r.createElement("th",null,"Commitment ID"))),r.createElement("tbody",null,e)))}};rn=nn([Object(a.b)("nodeStore"),Object(a.b)("slotStore"),a.c],rn);var sn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let an=class extends r.Component{componentDidMount(){const e=this.props.match.params.commitment;this.props.explorerStore.getSlotDetails(e)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{commitment:e}=this.props.match.params,{query_err:t,slotInfo:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Slot not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Slot"),n&&r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",e),r.createElement(_.a.Item,null,"Index: ",n.index),r.createElement(_.a.Item,null,"RootsID: ",n.rootsID),r.createElement(_.a.Item,null,"PrevEC: ",n.prevID),r.createElement(_.a.Item,null,"Cumulative Weight: ",n.cumulativeWeight),r.createElement(_.a.Item,null,"Blocks:",n.blocks&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.blocks.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))))),r.createElement(_.a.Item,null,"Transactions:",n.transactions&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.transactions.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/transaction/"+e},e)))))))))),r.createElement(_.a.Item,null," Created outputs:",n.createdOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.createdOutputs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e)))))))))),r.createElement(_.a.Item,null," Spent outputs:",n.spentOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.spentOutputs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))))))))))}};an=sn([Object(a.b)("explorerStore"),a.c],an);var ln=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let on=class extends r.Component{renderDevTool(){0}componentDidMount(){this.props.nodeStore.connect()}render(){return r.createElement("div",{className:"container"},r.createElement(i.a,{expand:"lg",bg:"light",variant:"light",className:"mb-4"},r.createElement(i.a.Brand,null,"iota-core"),r.createElement(c.a,{className:"mr-auto"},r.createElement(ye.LinkContainer,{to:"/dashboard"},r.createElement(c.a.Link,null,"Dashboard")),r.createElement(ye.LinkContainer,{to:"/neighbors"},r.createElement(c.a.Link,null,"Neighbors")),r.createElement(ye.LinkContainer,{to:"/explorer"},r.createElement(c.a.Link,null,"Explorer")),r.createElement(ye.LinkContainer,{to:"/visualizer"},r.createElement(c.a.Link,null,"Visualizer")),r.createElement(ye.LinkContainer,{to:"/slots"},r.createElement(c.a.Link,null,"Slot")),r.createElement(ye.LinkContainer,{to:"/tips"},r.createElement(c.a.Link,null,"Tips"))),r.createElement(i.a.Collapse,{className:"justify-content-end"},r.createElement(he,null),r.createElement(i.a.Text,null,!this.props.nodeStore.websocketConnected&&r.createElement(Q.a,{variant:"danger"},"WS not connected!")))),r.createElement(ge.g,null,r.createElement(ge.d,{exact:!0,path:"/dashboard",component:X}),r.createElement(ge.d,{exact:!0,path:"/neighbors",component:Lt}),r.createElement(ge.d,{exact:!0,path:"/explorer/block/:id",component:vt}),r.createElement(ge.d,{exact:!0,path:"/explorer/address/:id",component:Ot}),r.createElement(ge.d,{exact:!0,path:"/explorer/transaction/:id",component:Xt}),r.createElement(ge.d,{exact:!0,path:"/explorer/output/:id",component:Yt}),r.createElement(ge.d,{exact:!0,path:"/explorer/spend/:id",component:tn}),r.createElement(ge.d,{exact:!0,path:"/explorer/slot/commitment/:commitment",component:an}),r.createElement(ge.d,{exact:!0,path:"/explorer/404/:search",component:Ct}),r.createElement(ge.d,{exact:!0,path:"/slots",component:rn}),r.createElement(ge.d,{exact:!0,path:"/tips",component:Vt}),r.createElement(ge.d,{exact:!0,path:"/explorer",component:de}),r.createElement(ge.d,{exact:!0,path:"/visualizer",component:Ht}),r.createElement(ge.d,{exact:!0,path:"/visualizer/history",component:Ht}),r.createElement(ge.c,{to:"/dashboard"})),this.props.children,this.renderDevTool())}};on=ln([Object(a.b)("nodeStore"),Object(a.b)("routerStore"),a.c],on);const cn=Object(o.hot)(({history:e})=>r.createElement(on,{history:e}));var pn=n(102),dn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},un=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class mn{}class hn{constructor(){this.mem=new gn,this.scheduler=new En}}class bn{}class gn{}class yn{}class fn{}class En{}class vn{constructor(){this.collected=[],this.network_io=[]}addMetric(e){e.ts=F(Date.now(),"HH:MM:ss"),this.collected.push(e),this.collected.length>xn&&this.collected.shift();let t=this.currentNetIO;t&&(this.network_io.length>xn&&this.network_io.shift(),this.network_io.push(t))}get current(){return this.collected[this.collected.length-1]}get secondLast(){let e=this.collected.length-2;if(!(e<0))return this.collected[e]}get currentNetIO(){return this.current&&this.secondLast?{tx:this.current.packets_written-this.secondLast.packets_written,rx:this.current.packets_read-this.secondLast.packets_read,ts:F(new Date,"HH:MM:ss")}:null}get netIOSeries(){let e=Object.assign({},Sn,kn("Tx","rgba(53, 180, 219,1)","rgba(53, 180, 219,0.4)")),t=Object.assign({},Sn,kn("Rx","rgba(235, 134, 52)","rgba(235, 134, 52,0.4)")),n=[];for(let r=0;r{ve(be.Status,this.updateStatus),ve(be.BPSMetrics,e=>{this.addBPSMetric(this.updateLastBPSMetric(e))}),ve(be.NeighborStats,this.updateNeighborMetrics),ve(be.TipsMetrics,this.updateLastTipsMetric),ve(be.ComponentCounterMetrics,this.updateLastComponentMetric),ve(be.RateSetter,this.updateLastRateSetterMetric),this.updateCollecting(!0)},this.unregisterHandlers=()=>{Ie(be.Status),Ie(be.BPSMetrics),Ie(be.NeighborStats),Ie(be.TipsMetrics),Ie(be.ComponentCounterMetrics),Ie(be.RateSetter),this.updateCollecting(!1)},this.updateCollecting=e=>{this.collecting=e},this.updateWebSocketConnected=e=>this.websocketConnected=e,this.updateStatus=e=>{e.mem.ts=F(Date.now(),"HH:MM:ss"),this.collected_mem_metrics.length>xn&&this.collected_mem_metrics.shift(),this.collected_mem_metrics.push(e.mem),this.status=e,e.scheduler.ts=F(Date.now(),"HH:MM:ss"),this.collected_scheduler_metrics.length>xn&&this.collected_scheduler_metrics.shift(),this.collected_scheduler_metrics.push(e.scheduler)},this.updateNeighborMetrics=e=>{if(!e)return;let t=[];for(let n=0;n{e.ts=F(Date.now(),"HH:MM:ss"),this.last_rate_setter_metric=e,this.collected_rate_setter_metrics.length>xn&&this.collected_rate_setter_metrics.shift(),this.collected_rate_setter_metrics.push(e)},this.updateLastBPSMetric=e=>{let t=new mn;return t.mps=e,t.ts=F(Date.now(),"HH:MM:ss"),this.last_mps_metric=t,t},this.addBPSMetric=e=>{this.collected_mps_metrics.length>xn&&this.collected_mps_metrics.shift(),this.collected_mps_metrics.push(e)},this.updateLastTipsMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_tips_metric=e,this.collected_tips_metrics.length>xn&&this.collected_tips_metrics.shift(),this.collected_tips_metrics.push(e)},this.updateLastComponentMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_component_counter_metric=e,this.collected_component_counter_metrics.length>xn&&this.collected_component_counter_metrics.shift(),this.collected_component_counter_metrics.push(e)},this.status.tangleTime=new bn,this.status.tangleTime.ATT=0,this.status.tangleTime.RATT=0,this.status.tangleTime.CTT=0,this.status.tangleTime.RCTT=0,this.registerHandlers()}reset(){this.collected_mps_metrics=[],this.collected_mem_metrics=[],this.collected_scheduler_metrics=[],this.neighbor_metrics=new fe.ObservableMap,this.collected_tips_metrics=[],this.collected_component_counter_metrics=[]}reconnect(){this.updateWebSocketConnected(!1),setTimeout(()=>{this.connect()},5e3)}connect(){!function(e,t,n,r){let s=window.location,a="ws:";"https:"===s.protocol&&(a="wss:"),a+="//"+s.host+e;let l=new WebSocket(a);l.onopen=t,l.onclose=n,l.onerror=r,l.onmessage=e=>{let t=JSON.parse(e.data),n=Ee[t.type];n&&n(t.data)}}("/ws",()=>this.updateWebSocketConnected(!0),()=>this.reconnect(),()=>this.updateWebSocketConnected(!1))}get mpsSeries(){let e=Object.assign({},Sn,kn("BPS","rgba(67, 196, 99,1)","rgba(67, 196, 99,0.4)")),t=[];for(let n=0;n1&&(s+=e+" Days, "),t>=0&&(s+=t<10?"0"+t+":":t+":"),n>=0&&(s+=n<10?"0"+n+":":n+":"),r>=0&&(s+=r<10?"0"+r:r),s}get memSeries(){let e=Object.assign({},Sn,kn("Heap Sys","rgba(168, 50, 76,1)","rgba(168, 50, 76,0.4)")),t=Object.assign({},Sn,kn("Heap Alloc","rgba(222, 49, 87,1)","rgba(222, 49, 87,0.4)")),n=Object.assign({},Sn,kn("Heap Idle","rgba(222, 49, 182,1)","rgba(222, 49, 182,0.4)")),r=Object.assign({},Sn,kn("Heap Released","rgba(250, 76, 252,1)","rgba(250, 76, 252,0.4)")),s=[];for(let a=0;a=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},Rn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},_n=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};!function(e){e[e.NotFound=0]="NotFound"}(On||(On={}));class Cn{constructor(e){this.send_addr="",this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.sendResult=null,this.query_error="",this.sendReq=()=>_n(this,void 0,void 0,(function*(){this.updateSending(!0);try{let e=yield fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);if(200!==e.status)return void this.updateQueryError(On.NotFound);let t=yield e.json();setTimeout(()=>{this.updateSendResult(t)},2e3)}catch(e){this.updateQueryError(e)}})),this.updateSendResult=e=>{this.sending=!1,this.sendResult=e,this.routerStore.history.push("/explorer/address/"+this.send_addr)},this.updateSend=e=>{this.send_addr=e},this.updateSendAccessManaNodeID=e=>{this.send_access_mana_node_id=e},this.updateSendConsensusManaNodeID=e=>{this.send_consensus_mana_node_id=e},this.updateSending=e=>{this.sending=e,this.query_error=""},this.reset=()=>{this.send_addr=null,this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.query_error=""},this.updateQueryError=e=>{this.sending=!1,this.query_error=e},this.routerStore=e}}Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"send_addr",void 0),Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"send_access_mana_node_id",void 0),Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"send_consensus_mana_node_id",void 0),Dn([fe.observable,Rn("design:type",Boolean)],Cn.prototype,"sending",void 0),Dn([fe.observable,Rn("design:type",class{})],Cn.prototype,"sendResult",void 0),Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"query_error",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSendResult",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSend",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSendAccessManaNodeID",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSendConsensusManaNodeID",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSending",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"reset",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateQueryError",void 0);var Nn=Cn,Tn=n(35),Pn=n.n(Tn),Mn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},Ln=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},An=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class Bn{}const zn="#b9b7bd",Hn="#6c71c4",Fn="#393e46",Vn="#fad02c",Zn="#cb4b16",Un="#b58900",Wn="#586e75",Jn="#e105f5",Gn="#51e05d",qn="#859900";class Xn{constructor(e){this.vertices=new fe.ObservableMap,this.verticesLimit=1500,this.finalized_count=0,this.tips_count=0,this.verticesIncomingOrder=[],this.draw=!1,this.selected_via_click=!1,this.selected_origin_color=0,this.search="",this.paused=!1,this.fetchHistory=()=>An(this,void 0,void 0,(function*(){try{let e=yield fetch("/api/visualizer/history");(yield e.json()).vertices.forEach(e=>{this.addVertex(e)})}catch(e){console.log("Fail to fetch history in visualizer",e)}})),this.updateSearch=e=>{this.search=e.trim()},this.searchAndHighlight=()=>{if(this.clearSelected(),!this.search)return;let e=this.vertices.keys(),t=null;for(const n of e)if(n.indexOf(this.search)>=0){t=n;break}t&&this.updateSelected(this.vertices.get(t),!1)},this.pauseResume=()=>{if(this.paused)return this.renderer.resume(),void(this.paused=!1);this.renderer.pause(),this.paused=!0},this.updateVerticesLimit=e=>{this.verticesLimit=e},this.updateTxStatus=e=>{let t=this.vertices.get(e.id);t&&(t.is_tx_accepted=e.is_tx_accepted,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t))},this.addVertex=e=>{let t=this.vertices.get(e.id);t?!t.is_blk_confirmed&&e.is_blk_confirmed&&this.finalized_count++:(e.is_blk_confirmed&&this.finalized_count++,this.verticesIncomingOrder.push(e.id),this.checkLimit()),this.vertices.set(e.id,e),this.draw&&this.drawVertex(e)},this.addTipInfo=e=>An(this,void 0,void 0,(function*(){let t=this.vertices.get(e.id);if(!t){t=new Bn,t.id=e.id;let n=yield fetch("/api/block/"+e.id);if(200===n.status){let e=yield n.json();t.strongParents=e.strongParents,t.weakParents=e.weakParents,t.shallowLikedParents=e.shallowLikedParents,t.is_blk_confirmed=e.acceptance}this.verticesIncomingOrder.push(t.id)}this.tips_count+=e.is_tip?1:t.is_tip?-1:0,t.is_tip=e.is_tip,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t)})),this.checkLimit=()=>{for(;this.verticesIncomingOrder.length>this.verticesLimit;){let e=this.verticesIncomingOrder.shift(),t=this.vertices.get(e);this.selected&&e===this.selected.id&&this.clearSelected(),this.draw&&this.graph.removeNode(e),t&&(t.is_blk_confirmed&&this.finalized_count--,t.is_tip&&this.tips_count--,this.vertices.delete(e))}},this.drawVertex=e=>{let t=this.graph.getNode(e.id);if(t){this.graphics.getNodeUI(e.id).color=$n(this.colorForVertexState(e))}else t=this.graph.addNode(e.id,e);e.strongParents&&this.linkParents(e,t,e.strongParents),e.weakParents&&this.linkParents(e,t,e.weakParents),e.shallowLikedParents&&this.linkParents(e,t,e.shallowLikedParents)},this.linkParents=(e,t,n)=>{n.forEach(n=>{if(n&&(!t.links||!t.links.some(e=>e.fromId===n))){this.graph.getNode(n)?this.graph.addLink(n,e.id):console.log("link not added, parent doesn't exist",n)}})},this.colorForVertexState=e=>e?e.is_blk_confirmed?e.is_tx?e.is_tx_accepted?Vn:Fn:Hn:e.is_tip?Zn:e.is_tx?Fn:zn:Un,this.start=()=>{this.draw=!0,this.graph=Pn.a.Graph.graph();let e=Pn.a.Graph.View.webglGraphics();const t=Pn.a.Graph.Layout.forceDirected(this.graph,{springLength:10,springCoeff:1e-4,stableThreshold:.15,gravity:-2,dragCoeff:.02,timeStep:20,theta:.8});e.node(e=>e.data?Pn.a.Graph.View.webglSquare(20,this.colorForVertexState(e.data)):Pn.a.Graph.View.webglSquare(10,this.colorForVertexState(e.data))),e.link(()=>Pn.a.Graph.View.webglLine(Wn));let n=document.getElementById("visualizer");this.renderer=Pn.a.Graph.View.renderer(this.graph,{container:n,graphics:e,layout:t});let r=Pn.a.Graph.webglInputEvents(e,this.graph);r.mouseEnter(e=>{this.clearSelected(!0),this.updateSelected(e.data)}).mouseLeave(e=>{this.clearSelected(!1)}),r.click(e=>{this.clearSelected(!0),this.updateSelected(e.data,!0)}),this.graphics=e,this.renderer.run(),this.verticesIncomingOrder.forEach(e=>{let t=this.vertices.get(e);t&&this.drawVertex(t)})},this.stop=()=>{this.draw=!1,this.renderer.dispose(),this.graph=null,this.paused=!1,this.selected=null},this.updateSelected=(e,t)=>{if(!e)return;this.selected=e,this.selected_via_click=!!t;let n=this.graphics.getNodeUI(e.id);this.selected_origin_color=n.color,n.color=$n(qn),n.size=30;let r=this.graph.getNode(e.id);Kn(this.graph,r,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Gn)},[]),Kn(this.graph,r,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Jn)},[])},this.resetLinks=()=>{this.graph.forEachLink((function(e){this.graphics.getLinkUI(e.id).color=$n(Wn)}))},this.clearSelected=e=>{if(!this.selected||this.selected_via_click&&!e)return;let t=this.graph.getNode(this.selected.id);if(!t)return void this.resetLinks();let n=this.graphics.getNodeUI(this.selected.id);n.color=this.selected_origin_color,n.size=20;Kn(this.graph,t,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),Kn(this.graph,t,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),this.selected=null,this.selected_via_click=!1},this.routerStore=e,ve(be.Vertex,this.addVertex),ve(be.TipInfo,this.addTipInfo),ve(be.TXAccepted,this.updateTxStatus)}}Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"vertices",void 0),Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"verticesLimit",void 0),Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"finalized_count",void 0),Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"tips_count",void 0),Mn([fe.observable,Ln("design:type",Bn)],Xn.prototype,"selected",void 0),Mn([fe.observable,Ln("design:type",String)],Xn.prototype,"search",void 0),Mn([fe.observable,Ln("design:type",Boolean)],Xn.prototype,"paused",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateSearch",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"searchAndHighlight",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"pauseResume",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateVerticesLimit",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateTxStatus",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"addVertex",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"addTipInfo",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"checkLimit",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateSelected",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"clearSelected",void 0);var Qn=Xn;function Kn(e,t,n,r,s=!1,a=[]){a.push(t);let l=0;for(;a.length>l;){const t=a[l++];if(n(t))return!0;if(!t.links)return;for(const n of t.links)r||n.toId!==t.id||a.includes(e.getNode(n.fromId))?r&&n.fromId===t.id&&!a.includes(e.getNode(n.toId))&&(s&&s(n),a.push(e.getNode(n.toId))):(s&&s(n),a.push(e.getNode(n.fromId)))}}function $n(e){let t=10414335;if("number"==typeof e)return e;if("string"==typeof e&&e)if(4===e.length&&(e=e.replace(/([^#])/g,"$1$1")),9===e.length)t=parseInt(e.substr(1),16);else{if(7!==e.length)throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;t=parseInt(e.substr(1),16)<<8|255}return t}var Yn=n(286),er=n.n(Yn),tr=n(287),nr=n.n(tr),rr=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},sr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ar{constructor(e,t,n){this.nodeID=e,this.time=t,this.txID=n}}class lr extends ar{constructor(e,t,n,r){super(e,t,n),this.amount=r}}class or extends ar{constructor(e,t,n,r){super(e,t,n),this.amount=r}}const ir=r.createElement("tr",null,r.createElement("td",{key:"emptyRow",colSpan:4},"There are no nodes to view with the current search parameters.")),cr=r.createElement(kt.a,{key:"emptyItem"},"There are no events to view with the current search parameters.");class pr{constructor(){this.manaValues=[],this.prevManaValues=[0,0],this.accessNetworkRichest=[],this.totalAccessNetwork=0,this.accessActiveRichest=[],this.totalAccessActive=0,this.consensusNetworkRichest=[],this.totalConsensusNetwork=0,this.consensusActiveRichest=[],this.totalConsensusActive=0,this.searchNode="",this.searchTxID="",this.accessEvents=[],this.consensusEvents=[],this.initAccessEvents=[],this.initConsensusEvents=[],this.lastRemovedAccessEventTime=null,this.lastRemovedConsensusEventTime=null,this.lastInitRemovedAccessEventTime=null,this.lastInitRemovedConsensusEventTime=null,this.eventsUpdated=!1,this.displayedAccessEvents=[],this.displayedConsensusEvents=[],this.nodeNotSyncedListItem=r.createElement(kt.a,null,"Wait for node to be synced to display mana events."),this.addNewManaValue=e=>{this.ownID=this.ownID?this.ownID:e.nodeID,100===this.manaValues.length&&this.manaValues.shift();let t=[new Date(1e3*e.time),e.access,e.consensus];this.manaValues.length>0&&(this.prevManaValues=[this.manaValues[this.manaValues.length-1][1],this.manaValues[this.manaValues.length-1][2]]),this.manaValues.push(t)},this.updateNetworkRichest=e=>{switch(e.manaType){case"Access":this.totalAccessNetwork=e.totalMana,this.accessNetworkRichest=e.nodes;break;case"Consensus":this.totalConsensusNetwork=e.totalMana,this.consensusNetworkRichest=e.nodes}},this.updateActiveRichest=e=>{switch(e.manaType){case"Access":this.totalAccessActive=e.totalMana,this.accessActiveRichest=e.nodes;break;case"Consensus":this.totalConsensusActive=e.totalMana,this.consensusActiveRichest=e.nodes}},this.updateAllowedPledgeIDs=e=>{this.allowedPledgeIDs=e},this.addNewInitPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.initAccessEvents,t.length>=100){let e=t.shift();this.lastInitRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.accessEvents,t.length>=100){let e=t.shift();this.lastRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.addNewInitRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.initDone=()=>{this.accessEvents=this.initAccessEvents,this.lastRemovedAccessEventTime=this.lastInitRemovedAccessEventTime,this.consensusEvents=this.initConsensusEvents,this.lastRemovedConsensusEventTime=this.lastInitRemovedConsensusEventTime,this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],setInterval(()=>{this.eventsUpdated&&(this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],this.eventsUpdated=!1)},500)},this.nodeList=(e,t)=>{if(null===e||null==e)return[];let n=[],s=(e,s)=>{n.push(r.createElement("tr",{key:e.shortNodeID,style:{backgroundColor:e.shortNodeID===this.ownID?"#e8ffff":"white"}},r.createElement("td",{style:{borderTopLeftRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomLeftRadius:e.shortNodeID===this.ownID?"10px":"0"}}," ",s+1," "),r.createElement("td",null,e.shortNodeID),r.createElement("td",null,St(e.mana)),r.createElement("td",{style:{borderTopRightRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomRightRadius:e.shortNodeID===this.ownID?"10px":"0"}},(e.mana/t*100).toFixed(2),"%")))};return e.forEach((e,t)=>{this.passesNodeFilter(e.shortNodeID)&&s(e,t)}),n},this.computeEventList=e=>{let t=[];if(t.push(r.createElement(kt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"}),r.createElement(u.a,null,"NodeID"),r.createElement(u.a,null,"Tx ID"),r.createElement(u.a,{xs:5},"Time")))),null==e)return t;return e.reverse().forEach((e,n)=>{this.passesNodeFilter(e.nodeID)&&this.passesTxFilter(e.txID)&&((e,n)=>{if(e instanceof lr){let s=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Pledged"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana: ",r.createElement("strong",null,"+",St(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"To NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Pledge: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:s(e)},r.createElement(kt.a,{style:{backgroundColor:"#41aea9",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"},r.createElement("img",{src:er.a,alt:"Plus",width:"20px",className:"d-block mx-auto"})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}else if(e instanceof or){let s=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Revoked"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana 1: ",r.createElement("strong",null,"-",St(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"From NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Revoke: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:s(e)},r.createElement(kt.a,{style:{backgroundColor:"#213e3b",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1},r.createElement("img",{src:nr.a,alt:"Minus",width:"20px",className:""})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}})(e,n)}),t},this.passesNodeFilter=e=>0===this.searchNode.trim().length||!!e.toLowerCase().includes(this.searchNode.toLowerCase()),this.passesTxFilter=e=>0===this.searchTxID.trim().length||!!e.toLowerCase().includes(this.searchTxID.toLowerCase()),this.manaValues=[],ve(be.Mana,this.addNewManaValue),ve(be.ManaMapOverall,this.updateNetworkRichest),ve(be.ManaMapOnline,this.updateActiveRichest)}updateNodeSearch(e){this.searchNode=e.trim()}updateTxSearch(e){this.searchTxID=e.trim()}get networkRichestFeedAccess(){let e=this.nodeList(this.accessNetworkRichest,this.totalAccessNetwork);return 0===e.length?[ir]:e}get networkRichestFeedConsensus(){let e=this.nodeList(this.consensusNetworkRichest,this.totalConsensusNetwork);return 0===e.length?[ir]:e}get activeRichestFeedAccess(){let e=this.nodeList(this.accessActiveRichest,this.totalAccessActive);return 0===e.length?[ir]:e}get activeRichestFeedConsensus(){let e=this.nodeList(this.consensusActiveRichest,this.totalConsensusActive);return 0===e.length?[ir]:e}get accessHistogramInput(){if(void 0===this.accessNetworkRichest||null===this.accessNetworkRichest)return[["",0]];let e=new Array;for(let t=0;te.shortNodeID===this.ownID;let n=this.accessNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.accessNetworkRichest.length-(n+1))/this.accessNetworkRichest.length*100}}return e}get consensusPercentile(){let e=0;if(void 0!==this.consensusNetworkRichest&&null!==this.consensusNetworkRichest){const t=e=>e.shortNodeID===this.ownID;let n=this.consensusNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.consensusNetworkRichest.length-(n+1))/this.consensusNetworkRichest.length*100}}return e}get accessEventList(){let e=this.computeEventList(this.displayedAccessEvents);return 1===e.length&&e.push(cr),e}get consensusEventList(){let e=this.computeEventList(this.displayedConsensusEvents);return 1===e.length&&e.push(cr),e}}rr([fe.observable,sr("design:type",Array)],pr.prototype,"manaValues",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"prevManaValues",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"accessNetworkRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalAccessNetwork",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"accessActiveRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalAccessActive",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"consensusNetworkRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalConsensusNetwork",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"consensusActiveRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalConsensusActive",void 0),rr([fe.observable,sr("design:type",Object)],pr.prototype,"searchNode",void 0),rr([fe.observable,sr("design:type",Object)],pr.prototype,"searchTxID",void 0),rr([fe.observable,sr("design:type",class{})],pr.prototype,"allowedPledgeIDs",void 0),rr([fe.observable,sr("design:type",Date)],pr.prototype,"lastRemovedAccessEventTime",void 0),rr([fe.observable,sr("design:type",Date)],pr.prototype,"lastRemovedConsensusEventTime",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"displayedAccessEvents",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"displayedConsensusEvents",void 0),rr([fe.action,sr("design:type",Function),sr("design:paramtypes",[String]),sr("design:returntype",void 0)],pr.prototype,"updateNodeSearch",null),rr([fe.action,sr("design:type",Function),sr("design:paramtypes",[String]),sr("design:returntype",void 0)],pr.prototype,"updateTxSearch",null),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewManaValue",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"updateNetworkRichest",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"updateActiveRichest",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"updateAllowedPledgeIDs",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewInitPledge",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewPledge",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewInitRevoke",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewRevoke",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"initDone",void 0),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"networkRichestFeedAccess",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"networkRichestFeedConsensus",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"activeRichestFeedAccess",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"activeRichestFeedConsensus",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"accessHistogramInput",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"consensusHistogramInput",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"accessPercentile",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"consensusPercentile",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"accessEventList",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"consensusEventList",null);var dr=pr,ur=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},mr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hr=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class br{constructor(){this.liveFeed=[],this.addLiveFeed=e=>hr(this,void 0,void 0,(function*(){-1===this.liveFeed.findIndex(t=>t.id==e.id)&&(this.liveFeed.length>=100&&this.liveFeed.shift(),this.liveFeed.push(e))})),ve(be.SlotInfo,this.addLiveFeed)}get slotLiveFeed(){let e=[];for(let t=this.liveFeed.length-1;t>=0;t--){let n=this.liveFeed[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,n.index),r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/slot/commitment/"+n.id},n.id))))}return e}}ur([fe.observable,mr("design:type",Array)],br.prototype,"liveFeed",void 0),ur([fe.action,mr("design:type",Object)],br.prototype,"addLiveFeed",void 0),ur([fe.computed,mr("design:type",Object),mr("design:paramtypes",[])],br.prototype,"slotLiveFeed",null);var gr=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},yr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class fr{constructor(e,t){this.updateSpendSets=e=>{this.spendSets.set(e.spendSetID,e)},this.updateSpends=e=>{this.spends.set(e.spendID,e)},this.routerStore=e,this.nodeStore=t,this.spendSets=new Map,this.spends=new Map,ve(be.SpendSet,this.updateSpendSets),ve(be.Spend,this.updateSpends)}get spendsLiveFeed(){let e=Array.from(this.spendSets.values());e.sort((e,t)=>t.arrivalTime-e.arrivalTime||e.spendSetID.localeCompare(t.spendSetID));let t=[];for(let n of e){if(t.push(r.createElement("tr",{key:n.spendSetID,onClick:()=>n.shown=!n.shown,style:{cursor:"pointer"}},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/output/"+n.spendSetID},n.spendSetID)),r.createElement("td",null,new Date(1e3*n.arrivalTime).toLocaleString()),r.createElement("td",null,n.resolved?"Yes":"No"),r.createElement("td",null,n.timeToResolve/1e6))),!n.shown)continue;let e=Array.from(this.spends.values());e.sort((e,t)=>e.issuingTime-t.issuingTime||e.spendID.localeCompare(t.spendID));let s=[];for(let t of e)for(let e of t.spendSetIDs)e===n.spendSetID&&s.push(r.createElement("tr",{key:t.spendID,className:t.confirmationState>Qt.Accepted?"table-success":""},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/branch/"+t.spendID},t.spendID)),r.createElement("td",null,Kt(t.confirmationState)),r.createElement("td",null," ",new Date(1e3*t.issuingTime).toLocaleString()),r.createElement("td",null,t.issuerNodeID)));t.push(r.createElement("tr",{key:n.spendSetID+"_branches"},r.createElement("td",{colSpan:4},r.createElement(te.a,{size:"sm"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BranchID"),r.createElement("th",null,"ConfirmationState"),r.createElement("th",null,"IssuingTime"),r.createElement("th",null,"Issuer NodeID"))),r.createElement("tbody",null,s)))))}return t}}gr([fe.observable,yr("design:type",Map)],fr.prototype,"spendSets",void 0),gr([fe.observable,yr("design:type",Map)],fr.prototype,"spends",void 0),gr([fe.action,yr("design:type",Object)],fr.prototype,"updateSpendSets",void 0),gr([fe.action,yr("design:type",Object)],fr.prototype,"updateSpends",void 0),gr([fe.computed,yr("design:type",Object),yr("design:paramtypes",[])],fr.prototype,"spendsLiveFeed",null);var Er=fr;const vr=new pn.RouterStore,Ir=new wn,Sr={routerStore:vr,nodeStore:Ir,explorerStore:new Ke(vr),spendsStore:new Er(vr,Ir),faucetStore:new Nn(vr),visualizerStore:new Qn(vr),manaStore:new dr,slotStore:new br},kr=Object(l.a)(),xr=Object(pn.syncHistoryWithStore)(kr,vr);s.render(r.createElement(a.a,Object.assign({},Sr),r.createElement(ge.e,{history:xr},r.createElement(cn,{history:xr}))),document.getElementById("root"))}},[[434,1,2]]]); \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map b/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map new file mode 100644 index 000000000..cb26c36d1 --- /dev/null +++ b/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./assets/plus.svg","webpack:///./assets/minus.svg","webpack:///../node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/components/Uptime.tsx","webpack:///./app/components/Version.tsx","webpack:///./app/misc/Chart.ts","webpack:///./app/components/BPSChart.tsx","webpack:///./app/components/TipsChart.tsx","webpack:///./app/components/MemChart.tsx","webpack:///./app/components/ComponentCounterChart.tsx","webpack:///./app/components/TangleTime.tsx","webpack:///./app/components/Bootstrapped.tsx","webpack:///./app/components/Dashboard.tsx","webpack:///./app/components/ExplorerSearchbar.tsx","webpack:///./app/components/ExplorerLiveFeed.tsx","webpack:///./app/components/ExplorerTransactionSearchbar.tsx","webpack:///./app/components/ExplorerOutputSearchbar.tsx","webpack:///./app/components/ExplorerSpendSearchbar.tsx","webpack:///./app/components/Explorer.tsx","webpack:///./app/components/NavExplorerSearchbar.tsx","webpack:///./app/misc/WS.ts","webpack:///./app/misc/Payload.ts","webpack:///./app/utils/condition.tsx","webpack:///./app/utils/feature.tsx","webpack:///./app/utils/output.tsx","webpack:///./app/components/NativeToken.tsx","webpack:///./app/components/Condition.tsx","webpack:///./app/components/Feature.tsx","webpack:///./app/components/BasicOutput.tsx","webpack:///./app/components/AliasOutput.tsx","webpack:///./app/components/FoundryOutput.tsx","webpack:///./app/components/NFTOutput.tsx","webpack:///./app/stores/ExplorerStore.tsx","webpack:///./app/components/BasicPayload.tsx","webpack:///./app/utils/unlock_block.ts","webpack:///./app/components/Ed25519Signature.tsx","webpack:///./app/components/UnlockBlock.tsx","webpack:///./app/components/Transaction.tsx","webpack:///./app/components/TransactionPayload.tsx","webpack:///./app/utils/spend.ts","webpack:///./app/components/FaucetPayload.tsx","webpack:///./app/components/TaggedDataPayload.tsx","webpack:///./app/components/ExplorerBlockQueryResult.tsx","webpack:///./app/utils/index.ts","webpack:///./app/components/ExplorerAddressResult.tsx","webpack:///./app/components/Explorer404.tsx","webpack:///./app/components/Neighbor.tsx","webpack:///./app/components/Neighbors.tsx","webpack:///./app/components/Visualizer.tsx","webpack:///./app/components/Tips.tsx","webpack:///./app/components/ExplorerTransaction.tsx","webpack:///./app/components/ExplorerTransactionMetadata.tsx","webpack:///./app/components/ExplorerTransactionAttachments.tsx","webpack:///./app/components/ExplorerTransactionQueryResult.tsx","webpack:///./app/utils/confirmation_state.ts","webpack:///./app/components/ExplorerOutputQueryResult.tsx","webpack:///./app/components/ExplorerSpendQueryResult.tsx","webpack:///./app/components/SlotLiveFeed.tsx","webpack:///./app/components/ExplorerSlotQueryResult.tsx","webpack:///./app/components/Root.tsx","webpack:///./app/App.tsx","webpack:///./app/stores/NodeStore.ts","webpack:///./app/stores/FaucetStore.ts","webpack:///./app/stores/VisualizerStore.ts","webpack:///./app/stores/ManaStore.tsx","webpack:///./app/stores/SlotStore.tsx","webpack:///./app/stores/SpendsStore.tsx","webpack:///./main.tsx"],"names":["module","exports","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","this","props","nodeStore","uptime","status","version","defaultChartOptions","elements","line","tension","animation","duration","hover","animationDuration","responsiveAnimationDuration","lineChartOptions","assign","scales","xAxes","ticks","autoSkip","maxTicksLimit","fontSize","minRotation","maxRotation","gridLines","display","yAxes","callback","value","index","values","Math","abs","beginAtZero","tooltips","callbacks","label","tooltipItem","data","datasets","datasetIndex","Card","Body","Title","last_mps_metric","mps","height","mpsSeries","options","last_tips_metric","totaltips","tipsSeries","showXLabels","prettysize","mem","heap_alloc","num_gc","last_pause_gc","heap_objects","heap_sys","heap_idle","heap_released","memSeries","style","flexDirection","last_component_counter_metric","store","last_rate_setter_metric","estimate","componentSeries","tangleTime","synced","className","to","acceptedBlockID","confirmedBlockID","confirmedSlot","committedSlot","dateformat","Date","ATT","CTT","RATT","RCTT","bootstrapped","Container","Row","Col","ListGroup","variant","Item","ComponentCounterChart","updateSearch","explorerStore","target","executeSearch","key","searchAny","search","searching","InputGroup","FormControl","placeholder","onChange","onKeyUp","disabled","blksLiveFeed","xs","Table","txID","routerStore","push","outputID","spendID","href","Form","inline","as","type","WSMsgType","handlers","registerHandler","blkTypeID","handler","unregisterHandler","PayloadType","ConditionType","FeatureType","OutputType","Output","getPayloadType","p","TaggedData","Transaction","Faucet","token","amount","unlock","address","pubKeyHash","unixTime","returnAddress","conditionToComponent","cond","Address","StateControllerAddress","GovernorAddress","StorageDepositReturn","Expiration","Timelock","feature","tag","featureToComponent","feat","Sender","Issuer","Metadata","Tag","hex","output","nativeTokens","n","_","unlockConditions","c","features","f","transactionID","outputIndex","wordBreak","aliasId","stateIndex","stateMetadata","foundryCounter","serialNumber","tokenScheme","nftId","outputToComponent","Basic","Alias","Foundry","NFT","GenesisBlockID","SlotInfo","QueryError","latest_blocks","blk","addr","tx","txMetadata","txAttachments","outputMetadata","outputConsumers","pendingMana","spend","spendChildren","spendSpends","spendVoters","tips","slotInfo","query_loading","query_err","search_result","updateSearching","res","fetch","result","json","updateSearchResult","err","updateQueryError","resetSearch","block","searchBlock","updateQueryLoading","fetchJson","updateBlock","searchAddress","updateAddress","getSlotDetails","getSlotInfo","getTransaction","i","inputs","length","inputID","referencedOutputID","referencedOutputRes","genOutput","getTransactionAttachments","attachments","getTransactionMetadata","getOutput","getOutputMetadata","getOutputConsumers","getPendingMana","getSpend","getSpendChildren","getSpendSpends","getSpendVoters","getTips","reset","spendIDs","addedSpendIDs","subtractedSpendIDs","strongChildren","weakChildren","shallowLikeChildren","strongParents","weakParents","shallowLikedParents","payloadType","payload","loading","addLiveFeedBlock","findIndex","t","shift","Block","feed","payload_type","list","blkId","method","route","requestData","body","JSON","stringify","v","Uint8Array","Array","from","undefined","response","headers","ok","NotFound","BadRequest","content_title","content","SignatureType","signature","publicKey","signatureType","Ed25519","Badge","sigType","BLS","renderSignatureComponent","maxHeight","overflow","width","marginTop","marginBottom","paddingBottom","borderBottom","networkId","creationSlot","input","Provider","color","size","outputs","unlocks","txId","resolveBase58SpendID","base58Spend","MasterSpendInBase58","UndefinedSpendInBase58","LazyBookedSpendsSpendInBase58","InvalidSpendInBase58","accessManaPledgeID","consensusManaPledgeID","nonce","match","params","prevProps","prevState","objectivelyInvalid","marginRight","issuanceTimestamp","solidificationTimestamp","sequenceNumber","solid","scheduled","booked","orphaned","subjectivelyInvalid","acceptance","acceptanceTime","confirmation","confirmationTime","confirmationBySlot","confirmationBySlotTime","commitmentID","commitment","prevID","rootsID","cumulativeWeight","latestConfirmedSlot","rank","sequenceID","pastMarkerGap","isPastMarker","pastMarkers","issuerID","renderPayload","Spinner","displayManaUnit","mana","roundedMana","round","toString","toFixed","spent","unspent","available_balances","explorerOutputs","forEach","metadata","consumerCount","timestampCompareFn","a","b","txTimestamp","localeCompare","sort","Alert","ListGroupItem","textAlign","super","state","enabled","Button","getVariant","onClick","setState","base58","outputTypeToName","toLocaleString","timestamp","confirmedConsumer","outputType","neighborMetrics","neighbor_metrics","get","identity","last","current","connection_origin","pill","packets_written","packets_read","currentNetIO","rx","netIOSeries","neighborsEle","k","updateVerticesLimit","visualizerStore","pauseResumeVisualizer","pauseResume","searchAndHighlight","toggleBackgroundDataCollection","collecting","unregisterHandlers","registerHandlers","start","stop","vertices","finalized_count","selected","verticesLimit","tips_count","paused","Prepend","Text","OverlayTrigger","trigger","placement","overlay","Popover","Content","span","offset","background","substr","parent","zIndex","position","top","left","tipsList","bordered","confirmationState","blockIDs","ConfirmationState","resolveConfirmationState","Undefined","Rejected","Pending","Accepted","Confirmed","confirmationStateTime","consumers","val","valid","parents","childSpends","spends","j","voters","s","slotLiveFeed","slotStore","blocks","transactions","createdOutputs","spentOutputs","connect","Navbar","expand","bg","Brand","Nav","Link","Collapse","websocketConnected","exact","path","component","children","renderDevTool","App","history","BPSMetric","Status","MemoryMetrics","scheduler","SchedulerMetric","TipsMetric","RateSetterMetric","collected","network_io","metric","ts","now","maxMetricsDataPoints","netIO","secondLast","chartSeriesOpts","series","labels","ComponentCounterMetric","fill","lineTension","backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","pointBorderColor","pointBackgroundColor","pointBorderWidth","pointHoverBackgroundColor","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","pointHoverRadius","name","bgColor","collected_mps_metrics","collected_rate_setter_metrics","collected_scheduler_metrics","collected_mem_metrics","collected_tips_metrics","collected_component_counter_metrics","updateStatus","BPSMetrics","addBPSMetric","updateLastBPSMetric","NeighborStats","updateNeighborMetrics","TipsMetrics","updateLastTipsMetric","ComponentCounterMetrics","updateLastComponentMetric","RateSetter","updateLastRateSetterMetric","updateCollecting","updateWebSocketConnected","connected","updated","neighbMetrics","addMetric","set","includes","delete","mpsMetric","tipsMetric","componentCounterMetric","setTimeout","onOpen","onClose","onError","loc","window","location","uri","protocol","host","ws","WebSocket","onopen","onclose","onerror","onmessage","parse","connectWebSocket","reconnect","stored","solidified","solidifier","booker","bufferSize","currentBufferSize","deficit","day","hour","minute","seconds","floor","str","heapSys","heapAlloc","heapIdle","heapReleased","FaucetStore","send_addr","send_access_mana_node_id","send_consensus_mana_node_id","sending","sendResult","query_error","sendReq","updateSending","updateSendResult","updateSend","updateSendAccessManaNodeID","access_mana","updateSendConsensusManaNodeID","consensus_mana","Vertex","COLOR","verticesIncomingOrder","draw","selected_via_click","selected_origin_color","fetchHistory","addVertex","console","log","trim","clearSelected","iter","found","indexOf","updateSelected","renderer","resume","pause","num","updateTxStatus","vert","existing","is_tx_accepted","drawVertex","is_blk_confirmed","checkLimit","addTipInfo","tipInfo","is_tip","deleteId","graph","removeNode","node","getNode","graphics","getNodeUI","parseColor","colorForVertexState","addNode","linkParents","links","some","link","fromId","addLink","is_tx","Graph","View","webglGraphics","layout","Layout","forceDirected","springLength","springCoeff","stableThreshold","gravity","dragCoeff","timeStep","theta","webglSquare","webglLine","ele","document","getElementById","container","events","webglInputEvents","mouseEnter","mouseLeave","click","run","dispose","viaClick","nodeUI","vertexSize","dfsIterator","getLinkUI","resetLinks","forEachLink","force_clear","TipInfo","TXAccepted","cb","up","cbLinks","seenNodes","pointer","toId","parsedColor","replace","parseInt","ManaEvent","nodeID","time","PledgeEvent","RevokeEvent","emptyRow","colSpan","emptyListItem","manaValues","prevManaValues","accessNetworkRichest","totalAccessNetwork","accessActiveRichest","totalAccessActive","consensusNetworkRichest","totalConsensusNetwork","consensusActiveRichest","totalConsensusActive","searchNode","searchTxID","accessEvents","consensusEvents","initAccessEvents","initConsensusEvents","lastRemovedAccessEventTime","lastRemovedConsensusEventTime","lastInitRemovedAccessEventTime","lastInitRemovedConsensusEventTime","eventsUpdated","displayedAccessEvents","displayedConsensusEvents","nodeNotSyncedListItem","addNewManaValue","manaBlk","ownID","newManaData","access","consensus","updateNetworkRichest","manaType","totalMana","nodes","updateActiveRichest","updateAllowedPledgeIDs","allowedPledgeIDs","addNewInitPledge","lastRemoved","newData","addNewPledge","addNewInitRevoke","addNewRevoke","initDone","setInterval","nodeList","leaderBoard","manaSum","pushToFeed","shortNodeID","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","passesNodeFilter","computeEventList","evArr","reverse","event","passesTxFilter","element","popover","ev","navigator","clipboard","writeText","toLocaleTimeString","src","alt","substring","pushToEventFeed","toLowerCase","Mana","ManaMapOverall","ManaMapOnline","histInput","log10","per","isOwnID","liveFeed","addLiveFeed","info","updateSpendSets","spendSets","spendSetID","updateSpends","Map","SpendSet","Spend","spendsArr","x","y","arrivalTime","shown","cursor","resolved","timeToResolve","branchesArr","issuingTime","branches","branch","spendSetIDs","issuerNodeID","stores","browserHistory"],"mappings":"2EAAAA,EAAOC,QAAU,k6B,kBCAjBD,EAAOC,QAAU,0vB,oBCAjB,IAAIC,EAAM,CACT,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,aAAc,IACd,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,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bD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+\"","var map = {\n\t\"./af\": 107,\n\t\"./af.js\": 107,\n\t\"./ar\": 108,\n\t\"./ar-dz\": 109,\n\t\"./ar-dz.js\": 109,\n\t\"./ar-kw\": 110,\n\t\"./ar-kw.js\": 110,\n\t\"./ar-ly\": 111,\n\t\"./ar-ly.js\": 111,\n\t\"./ar-ma\": 112,\n\t\"./ar-ma.js\": 112,\n\t\"./ar-sa\": 113,\n\t\"./ar-sa.js\": 113,\n\t\"./ar-tn\": 114,\n\t\"./ar-tn.js\": 114,\n\t\"./ar.js\": 108,\n\t\"./az\": 115,\n\t\"./az.js\": 115,\n\t\"./be\": 116,\n\t\"./be.js\": 116,\n\t\"./bg\": 117,\n\t\"./bg.js\": 117,\n\t\"./bm\": 118,\n\t\"./bm.js\": 118,\n\t\"./bn\": 119,\n\t\"./bn-bd\": 120,\n\t\"./bn-bd.js\": 120,\n\t\"./bn.js\": 119,\n\t\"./bo\": 121,\n\t\"./bo.js\": 121,\n\t\"./br\": 122,\n\t\"./br.js\": 122,\n\t\"./bs\": 123,\n\t\"./bs.js\": 123,\n\t\"./ca\": 124,\n\t\"./ca.js\": 124,\n\t\"./cs\": 125,\n\t\"./cs.js\": 125,\n\t\"./cv\": 126,\n\t\"./cv.js\": 126,\n\t\"./cy\": 127,\n\t\"./cy.js\": 127,\n\t\"./da\": 128,\n\t\"./da.js\": 128,\n\t\"./de\": 129,\n\t\"./de-at\": 130,\n\t\"./de-at.js\": 130,\n\t\"./de-ch\": 131,\n\t\"./de-ch.js\": 131,\n\t\"./de.js\": 129,\n\t\"./dv\": 132,\n\t\"./dv.js\": 132,\n\t\"./el\": 133,\n\t\"./el.js\": 133,\n\t\"./en-au\": 134,\n\t\"./en-au.js\": 134,\n\t\"./en-ca\": 135,\n\t\"./en-ca.js\": 135,\n\t\"./en-gb\": 136,\n\t\"./en-gb.js\": 136,\n\t\"./en-ie\": 137,\n\t\"./en-ie.js\": 137,\n\t\"./en-il\": 138,\n\t\"./en-il.js\": 138,\n\t\"./en-in\": 139,\n\t\"./en-in.js\": 139,\n\t\"./en-nz\": 140,\n\t\"./en-nz.js\": 140,\n\t\"./en-sg\": 141,\n\t\"./en-sg.js\": 141,\n\t\"./eo\": 142,\n\t\"./eo.js\": 142,\n\t\"./es\": 143,\n\t\"./es-do\": 144,\n\t\"./es-do.js\": 144,\n\t\"./es-mx\": 145,\n\t\"./es-mx.js\": 145,\n\t\"./es-us\": 146,\n\t\"./es-us.js\": 146,\n\t\"./es.js\": 143,\n\t\"./et\": 147,\n\t\"./et.js\": 147,\n\t\"./eu\": 148,\n\t\"./eu.js\": 148,\n\t\"./fa\": 149,\n\t\"./fa.js\": 149,\n\t\"./fi\": 150,\n\t\"./fi.js\": 150,\n\t\"./fil\": 151,\n\t\"./fil.js\": 151,\n\t\"./fo\": 152,\n\t\"./fo.js\": 152,\n\t\"./fr\": 153,\n\t\"./fr-ca\": 154,\n\t\"./fr-ca.js\": 154,\n\t\"./fr-ch\": 155,\n\t\"./fr-ch.js\": 155,\n\t\"./fr.js\": 153,\n\t\"./fy\": 156,\n\t\"./fy.js\": 156,\n\t\"./ga\": 157,\n\t\"./ga.js\": 157,\n\t\"./gd\": 158,\n\t\"./gd.js\": 158,\n\t\"./gl\": 159,\n\t\"./gl.js\": 159,\n\t\"./gom-deva\": 160,\n\t\"./gom-deva.js\": 160,\n\t\"./gom-latn\": 161,\n\t\"./gom-latn.js\": 161,\n\t\"./gu\": 162,\n\t\"./gu.js\": 162,\n\t\"./he\": 163,\n\t\"./he.js\": 163,\n\t\"./hi\": 164,\n\t\"./hi.js\": 164,\n\t\"./hr\": 165,\n\t\"./hr.js\": 165,\n\t\"./hu\": 166,\n\t\"./hu.js\": 166,\n\t\"./hy-am\": 167,\n\t\"./hy-am.js\": 167,\n\t\"./id\": 168,\n\t\"./id.js\": 168,\n\t\"./is\": 169,\n\t\"./is.js\": 169,\n\t\"./it\": 170,\n\t\"./it-ch\": 171,\n\t\"./it-ch.js\": 171,\n\t\"./it.js\": 170,\n\t\"./ja\": 172,\n\t\"./ja.js\": 172,\n\t\"./jv\": 173,\n\t\"./jv.js\": 173,\n\t\"./ka\": 174,\n\t\"./ka.js\": 174,\n\t\"./kk\": 175,\n\t\"./kk.js\": 175,\n\t\"./km\": 176,\n\t\"./km.js\": 176,\n\t\"./kn\": 177,\n\t\"./kn.js\": 177,\n\t\"./ko\": 178,\n\t\"./ko.js\": 178,\n\t\"./ku\": 179,\n\t\"./ku.js\": 179,\n\t\"./ky\": 180,\n\t\"./ky.js\": 180,\n\t\"./lb\": 181,\n\t\"./lb.js\": 181,\n\t\"./lo\": 182,\n\t\"./lo.js\": 182,\n\t\"./lt\": 183,\n\t\"./lt.js\": 183,\n\t\"./lv\": 184,\n\t\"./lv.js\": 184,\n\t\"./me\": 185,\n\t\"./me.js\": 185,\n\t\"./mi\": 186,\n\t\"./mi.js\": 186,\n\t\"./mk\": 187,\n\t\"./mk.js\": 187,\n\t\"./ml\": 188,\n\t\"./ml.js\": 188,\n\t\"./mn\": 189,\n\t\"./mn.js\": 189,\n\t\"./mr\": 190,\n\t\"./mr.js\": 190,\n\t\"./ms\": 191,\n\t\"./ms-my\": 192,\n\t\"./ms-my.js\": 192,\n\t\"./ms.js\": 191,\n\t\"./mt\": 193,\n\t\"./mt.js\": 193,\n\t\"./my\": 194,\n\t\"./my.js\": 194,\n\t\"./nb\": 195,\n\t\"./nb.js\": 195,\n\t\"./ne\": 196,\n\t\"./ne.js\": 196,\n\t\"./nl\": 197,\n\t\"./nl-be\": 198,\n\t\"./nl-be.js\": 198,\n\t\"./nl.js\": 197,\n\t\"./nn\": 199,\n\t\"./nn.js\": 199,\n\t\"./oc-lnc\": 200,\n\t\"./oc-lnc.js\": 200,\n\t\"./pa-in\": 201,\n\t\"./pa-in.js\": 201,\n\t\"./pl\": 202,\n\t\"./pl.js\": 202,\n\t\"./pt\": 203,\n\t\"./pt-br\": 204,\n\t\"./pt-br.js\": 204,\n\t\"./pt.js\": 203,\n\t\"./ro\": 205,\n\t\"./ro.js\": 205,\n\t\"./ru\": 206,\n\t\"./ru.js\": 206,\n\t\"./sd\": 207,\n\t\"./sd.js\": 207,\n\t\"./se\": 208,\n\t\"./se.js\": 208,\n\t\"./si\": 209,\n\t\"./si.js\": 209,\n\t\"./sk\": 210,\n\t\"./sk.js\": 210,\n\t\"./sl\": 211,\n\t\"./sl.js\": 211,\n\t\"./sq\": 212,\n\t\"./sq.js\": 212,\n\t\"./sr\": 213,\n\t\"./sr-cyrl\": 214,\n\t\"./sr-cyrl.js\": 214,\n\t\"./sr.js\": 213,\n\t\"./ss\": 215,\n\t\"./ss.js\": 215,\n\t\"./sv\": 216,\n\t\"./sv.js\": 216,\n\t\"./sw\": 217,\n\t\"./sw.js\": 217,\n\t\"./ta\": 218,\n\t\"./ta.js\": 218,\n\t\"./te\": 219,\n\t\"./te.js\": 219,\n\t\"./tet\": 220,\n\t\"./tet.js\": 220,\n\t\"./tg\": 221,\n\t\"./tg.js\": 221,\n\t\"./th\": 222,\n\t\"./th.js\": 222,\n\t\"./tk\": 223,\n\t\"./tk.js\": 223,\n\t\"./tl-ph\": 224,\n\t\"./tl-ph.js\": 224,\n\t\"./tlh\": 225,\n\t\"./tlh.js\": 225,\n\t\"./tr\": 226,\n\t\"./tr.js\": 226,\n\t\"./tzl\": 227,\n\t\"./tzl.js\": 227,\n\t\"./tzm\": 228,\n\t\"./tzm-latn\": 229,\n\t\"./tzm-latn.js\": 229,\n\t\"./tzm.js\": 228,\n\t\"./ug-cn\": 230,\n\t\"./ug-cn.js\": 230,\n\t\"./uk\": 231,\n\t\"./uk.js\": 231,\n\t\"./ur\": 232,\n\t\"./ur.js\": 232,\n\t\"./uz\": 233,\n\t\"./uz-latn\": 234,\n\t\"./uz-latn.js\": 234,\n\t\"./uz.js\": 233,\n\t\"./vi\": 235,\n\t\"./vi.js\": 235,\n\t\"./x-pseudo\": 236,\n\t\"./x-pseudo.js\": 236,\n\t\"./yo\": 237,\n\t\"./yo.js\": 237,\n\t\"./zh-cn\": 238,\n\t\"./zh-cn.js\": 238,\n\t\"./zh-hk\": 239,\n\t\"./zh-hk.js\": 239,\n\t\"./zh-mo\": 240,\n\t\"./zh-mo.js\": 240,\n\t\"./zh-tw\": 241,\n\t\"./zh-tw.js\": 241\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 298;","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Uptime extends React.Component {\r\n render() {\r\n return (\r\n \r\n Uptime: {this.props.nodeStore.uptime}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Version extends React.Component {\r\n render() {\r\n return (\r\n \r\n Version: {this.props.nodeStore.status.version}\r\n \r\n );\r\n }\r\n}\r\n","\r\n// includes chart options to increase performance, by disabling chart animations\r\nexport var defaultChartOptions = {\r\n elements: {\r\n line: {\r\n tension: 0\r\n }\r\n },\r\n animation: {\r\n duration: 0\r\n },\r\n hover: {\r\n animationDuration: 0\r\n },\r\n responsiveAnimationDuration: 0\r\n};","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class BPSChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Blocks Per Second\r\n \r\n BPS: {this.props.nodeStore.last_mps_metric.mps}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class TipsChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Current Tips\r\n \r\n Tips: {this.props.nodeStore.last_tips_metric.totaltips}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport * as prettysize from 'prettysize';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class MemChart extends React.Component {\r\n render() {\r\n let mem = this.props.nodeStore.status.mem;\r\n return (\r\n \r\n \r\n \r\n Memory Usage{' '}\r\n {prettysize(mem.heap_alloc)}\r\n \r\n \r\n GC Cycles: {mem.num_gc} (Last Cycle: {mem.last_pause_gc / 1000000}ms) - {' '}\r\n Heap: {' '}\r\n [Obj: {mem.heap_objects}, In-Use: {prettysize(mem.heap_sys-mem.heap_idle)},\r\n Retained: {prettysize(mem.heap_idle - mem.heap_released)}]\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Card from \"react-bootstrap/Card\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport {Line} from \"react-chartjs-2\";\nimport {defaultChartOptions} from \"../misc/Chart\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\nconst lineChartOptions = Object.assign({\n scales: {\n xAxes: [{\n ticks: {\n autoSkip: true,\n maxTicksLimit: 8,\n fontSize: 8,\n minRotation: 0,\n maxRotation: 0,\n },\n gridLines: {\n display: false\n }\n }],\n yAxes: [{\n gridLines: {\n display: false\n },\n ticks: {\n callback: function (value, index, values) {\n return Math.abs(value);\n },\n fontSize: 10,\n maxTicksLimit: 4,\n beginAtZero: true,\n },\n }],\n },\n tooltips: {\n callbacks: {\n label: function (tooltipItem, data) {\n let label = data.datasets[tooltipItem.datasetIndex].label;\n return `${label} ${Math.abs(tooltipItem.value)}`;\n }\n }\n }\n}, defaultChartOptions);\n\n@inject(\"nodeStore\")\n@observer\nexport default class StoreChart extends React.Component {\n render() {\n const infoStyle = {\n display: \"flex\",\n flexDirection: \"column\"\n };\n return (\n \n \n Component Counter Blocks Per Second\n
\n \n BPS: {this.props.nodeStore.last_component_counter_metric.store}.\n \n \n Rate Setter - Estimate: {this.props.nodeStore.last_rate_setter_metric.estimate}\n \n
\n\n \n
\n
\n );\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport Card from \"react-bootstrap/Card\";\nimport {Link} from 'react-router-dom';\nimport {inject, observer} from \"mobx-react\";\nimport * as dateformat from 'dateformat';\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class TangleTime extends React.Component {\n render() {\n return (\n \n \n TangleTime\n Synced: {this.props.nodeStore.status.tangleTime.synced ? \"Yes\" : \"No\"}\n \n
\n
\n
\n
Last Accepted Block: \n {this.props.nodeStore.status.tangleTime.acceptedBlockID}\n
\n
\n
\n
Last Confirmed Block: \n {this.props.nodeStore.status.tangleTime.confirmedBlockID}\n
\n
\n
\n
Last Confirmed Slot:\n {this.props.nodeStore.status.tangleTime.confirmedSlot}\n
\n
\n
\n
Last Committed Slot:\n {this.props.nodeStore.status.tangleTime.committedSlot}\n
\n
\n
\n
\n
\n Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.ATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.CTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n Relative Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Relative Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RCTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n
\n
\n )\n ;\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class Bootstrapped extends React.Component {\n render() {\n return (\n \n Bootstrapped: {this.props.nodeStore.status.tangleTime.bootstrapped ? \"Yes\" : \"No\"}\n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Uptime from \"./Uptime\";\r\nimport Version from \"./Version\";\r\nimport BPSChart from \"./BPSChart\";\r\nimport TipsChart from \"./TipsChart\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport MemChart from \"./MemChart\";\r\nimport ComponentCounterChart from \"./ComponentCounterChart\";\r\nimport TangleTime from \"./TangleTime\";\r\nimport Bootstrapped from \"./Bootstrapped\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Dashboard extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Dashboard

\r\n \r\n \r\n \r\n \r\n Node: {this.props.nodeStore.status.id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Table from \"react-bootstrap/Table\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerLiveFeed extends React.Component {\r\n render() {\r\n let {blksLiveFeed} = this.props.explorerStore;\r\n return (\r\n \r\n \r\n \r\n \r\n Live Feed\r\n \r\n \r\n
Blocks
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {blksLiveFeed}\r\n \r\n
IdPayload Type
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionSearchbar extends React.Component {\n txID: string;\n\n updateSearch = (e) => {\n this.txID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/transaction/${this.txID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputSearchbar extends React.Component {\n outputID: string;\n\n updateSearch = (e) => {\n this.outputID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/output/${this.outputID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSpendSearchbar extends React.Component {\n spendID: string;\n\n updateSearch = (e) => {\n this.spendID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/spend/${this.spendID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerSearchbar} from \"./ExplorerSearchbar\";\r\nimport {ExplorerLiveFeed} from \"./ExplorerLiveFeed\";\r\nimport {ExplorerTransactionSearchbar} from \"./ExplorerTransactionSearchbar\";\r\nimport {ExplorerOutputSearchbar} from \"./ExplorerOutputSearchbar\";\r\nimport {ExplorerSpendSearchbar} from \"./ExplorerSpendSearchbar\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Explorer extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Tangle Explorer

\r\n \r\n \r\n

\r\n Search for addresses, blocks, transactions, outputs and spends.\r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This explorer implementation is heavily inspired by thetangle.org.\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport Form from \"react-bootstrap/Form\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class NavExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n return (\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum WSMsgType {\r\n Status,\r\n BPSMetrics,\r\n Block,\r\n NeighborStats,\r\n ComponentCounterMetrics,\r\n TipsMetrics,\r\n Vertex,\r\n TXAccepted,\r\n TipInfo,\r\n Mana,\r\n ManaMapOverall,\r\n ManaMapOnline,\r\n BlkManaDashboardAddress,\r\n RateSetter,\r\n SpendSet,\r\n Spend,\r\n SlotInfo,\r\n}\r\n\r\nexport interface WSBlock {\r\n type: number;\r\n data: any;\r\n}\r\n\r\ntype DataHandler = (data: any) => void;\r\n\r\nlet handlers = {};\r\n\r\nexport function registerHandler(blkTypeID: number, handler: DataHandler) {\r\n handlers[blkTypeID] = handler;\r\n}\r\n\r\nexport function unregisterHandler(blkTypeID: number) {\r\n delete handlers[blkTypeID];\r\n}\r\n\r\nexport function connectWebSocket(path: string, onOpen, onClose, onError) {\r\n let loc = window.location;\r\n let uri = 'ws:';\r\n\r\n if (loc.protocol === 'https:') {\r\n uri = 'wss:';\r\n }\r\n uri += '//' + loc.host + path;\r\n\r\n let ws = new WebSocket(uri);\r\n\r\n ws.onopen = onOpen;\r\n ws.onclose = onClose;\r\n ws.onerror = onError;\r\n\r\n ws.onmessage = (e) => {\r\n let blk: WSBlock = JSON.parse(e.data);\r\n let handler = handlers[blk.type];\r\n if (!handler) {\r\n return;\r\n }\r\n handler(blk.data);\r\n };\r\n}\r\n","export enum PayloadType {\r\n TaggedData = 0,\r\n Transaction = 1,\r\n Faucet = 3,\r\n}\r\n\r\n// BasicPayload\r\nexport class BasicPayload {\r\n content_title: string;\r\n content: string;\r\n}\r\n\r\nexport class TaggedDataPayload {\r\n tag: string;\r\n data: string;\r\n}\r\n\r\nexport class FaucetPayload {\r\n address: string;\r\n accessManaPledgeID: string;\r\n consensusManaPledgeID: string;\r\n nonce: number;\r\n}\r\n\r\nexport class TransactionPayload {\r\n networkId: number;\r\n creationSlot: number;\r\n inputs: Array;\r\n outputs: Array;\r\n payload: any;\r\n unlocks: Array;\r\n}\r\n\r\nexport class Input {\r\n type: string;\r\n referencedOutputID: OutputID;\r\n output: Output;\r\n}\r\n\r\nexport class Output {\r\n outputID: OutputID;\r\n type: number;\r\n output: \r\n BasicOutput|\r\n AliasOutput|\r\n FoundryOutput|\r\n NFTOutput;\r\n}\r\n\r\nexport class OutputID {\r\n hex: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class UnlockBlock {\r\n type: string;\r\n referencedIndex: number;\r\n signatureType: number;\r\n signature: SignatureEd25519;\r\n}\r\n\r\nexport class SignatureEd25519 {\r\n publicKey: string;\r\n signature: string;\r\n}\r\n\r\nexport class BasicOutput {\r\n amount: number\r\n nativeTokens?: Array;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n}\r\n\r\nexport class AliasOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n aliasId: string;\r\n stateIndex: number;\r\n stateMetadata?: string;\r\n foundryCounter: number;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class FoundryOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n serialNumber: number;\r\n tokenScheme: number; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class NFTOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n nftId: string; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class Balance {\r\n value: number;\r\n color: string;\r\n}\r\n\r\nexport class Spend {\r\n tx_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\nexport class Timestamp {\r\n blk_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\n// @ts-ignore\r\nexport class Opinion {\r\n value: string;\r\n round: number;\r\n}\r\n\r\nexport class NativeToken {\r\n id: string;\r\n amount: number;\r\n}\r\n\r\n// address, stateController, Governor share the same struct\r\nexport class AddressUnlockCondition {\r\n type: number;\r\n address: Address;\r\n}\r\n\r\nexport class Address {\r\n type: number;\r\n pubKeyHash: string;\r\n}\r\nexport class StorageDepositReturnUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n amount: number;\r\n}\r\n\r\nexport class TimelockUnlockCondition {\r\n type: number;\r\n unixTime?: number;\r\n}\r\n\r\nexport class ExpirationUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n unixTime: number;\r\n}\r\n\r\nexport class Feature {\r\n type: number;\r\n feature:\r\n IssuerFeature |\r\n MetadataFeature |\r\n TagFeature;\r\n}\r\n\r\n// Issuer and sender share a struct\r\nexport class IssuerFeature {\r\n address: string\r\n}\r\n\r\nexport class MetadataFeature {\r\n data: string;\r\n}\r\n\r\nexport class TagFeature {\r\n tag: string;\r\n}\r\n\r\nexport function getPayloadType(p: number){\r\n switch (p) {\r\n case PayloadType.TaggedData:\r\n return \"TaggedData\"\r\n case PayloadType.Transaction:\r\n return \"Transaction\"\r\n case PayloadType.Faucet:\r\n return \"Faucet\"\r\n default:\r\n return \"Unknown\"\r\n }\r\n}\r\n","import { UnlockConditionAddress, UnlockConditionExpiration, UnlockConditionStorageDepositReturn, UnlockConditionTimelock } from \"app/components/Condition\";\nimport { AddressUnlockCondition, ExpirationUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum ConditionType {\n Address = 0,\n StorageDepositReturn,\n Timelock,\n Expiration,\n StateControllerAddress,\n GovernorAddress,\n ImmutableAlias,\n}\n\nexport function resolveConditionType(condType: number) {\n switch (condType) {\n case ConditionType.Address:\n return \"Address Condition\";\n case ConditionType.StorageDepositReturn:\n return \"StorageDepositReturn Condition\";\n case ConditionType.Timelock:\n return \"Timelock Condition\";\n case ConditionType.Expiration:\n return \"Expiration Condition\";\n case ConditionType.StateControllerAddress:\n return \"StateControllerAddress Condition\";\n case ConditionType.GovernorAddress:\n return \"GovernorAddress Condition\";\n case ConditionType.ImmutableAlias:\n return \"ImmutableAlias Condition\";\n default:\n return \"Unknown Condition Type\";\n }\n}\n\nexport function conditionToComponent(cond: \n AddressUnlockCondition |\n StorageDepositReturnUnlockCondition |\n TimelockUnlockCondition |\n ExpirationUnlockCondition) {\n switch (cond.type) {\n case ConditionType.Address:\n case ConditionType.StateControllerAddress:\n case ConditionType.GovernorAddress:\n return ;\n case ConditionType.StorageDepositReturn:\n return ;\n case ConditionType.Expiration:\n return ;\n case ConditionType.Timelock:\n return ;\n }\n}","import { FeatureIssuer, FeatureMetadata, FeatureTag } from \"app/components/Feature\";\nimport { Feature, IssuerFeature, MetadataFeature, TagFeature } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum FeatureType {\n Sender = 0,\n Issuer,\n Metadata,\n Tag,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case FeatureType.Sender:\n return \"Sender Feature\";\n case FeatureType.Issuer:\n return \"Issuer Feature\";\n case FeatureType.Metadata:\n return \"Metadata Feature\";\n case FeatureType.Tag:\n return \"Tag Feature\";\n default:\n return \"Unknown Feature Type\";\n }\n}\n\n\nexport function featureToComponent(feat: Feature) {\n switch (feat.type) {\n case FeatureType.Sender:\n case FeatureType.Issuer:\n return ;\n case FeatureType.Metadata:\n return ;\n case FeatureType.Tag:\n return ;\n }\n}","import {\n BasicOutput as BasicJSON,\n AliasOutput as AliasJSON,\n FoundryOutput as FoundryJSON,\n NFTOutput as NFTJSON,\n Output,\n} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport { BasicOutput } from \"app/components/BasicOutput\";\nimport { AliasOutput } from \"app/components/AliasOutput\";\nimport { FoundryOutput } from \"app/components/FoundryOutput\";\nimport { NFTOutput } from \"app/components/NFTOutput\";\n\nexport enum OutputType {\n Treasury = 2,\n Basic,\n Alias,\n Foundry,\n NFT,\n}\n\nexport function outputToComponent(output: Output) {\n let id = output.outputID\n switch (output.type) {\n case OutputType.Basic:\n return ;\n case OutputType.Alias:\n return ;\n case OutputType.Foundry:\n return ;\n case OutputType.NFT:\n return ;\n default:\n return;\n }\n}\n\n\nexport function outputTypeToName(type: number) {\n switch (type) {\n case OutputType.Basic:\n return \"Basic Output\";\n case OutputType.Alias:\n return \"Alias Output\";\n case OutputType.Foundry:\n return \"Foundry Output\";\n case OutputType.NFT:\n return \"NFT Output\";\n default:\n return;\n }\n}\n","import * as React from 'react';\nimport { NativeToken as NativeTokenJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\n\ninterface Props {\n token: NativeTokenJSON;\n}\n\nexport class NativeToken extends React.Component {\n render() {\n return (\n
\n \n ID: {this.props.token.id}\n Amount: {this.props.token.amount}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport { \n TimelockUnlockCondition, \n AddressUnlockCondition,\n StorageDepositReturnUnlockCondition,\nExpirationUnlockCondition} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface AddressProps { \n unlock: AddressUnlockCondition;\n}\n\nexport class UnlockConditionAddress extends React.Component {\n render() {\n return (\n
\n \n Address Type: {this.props.unlock.address.type}\n \n \n Address: {this.props.unlock.address.pubKeyHash}\n \n
\n );\n }\n}\n\ninterface TimelockProps { \n unlock: TimelockUnlockCondition;\n}\n\nexport class UnlockConditionTimelock extends React.Component {\n render() {\n\n return (\n this.props.unlock.unixTime &&\n
\n \n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}\n\ninterface StorageDepositReturnProps { \n unlock: StorageDepositReturnUnlockCondition;\n}\n\nexport class UnlockConditionStorageDepositReturn extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Amount: {this.props.unlock.amount}\n \n
\n );\n }\n}\n\ninterface ExpirationProps { \n unlock: ExpirationUnlockCondition;\n}\n\nexport class UnlockConditionExpiration extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}","import * as React from 'react';\nimport { \nIssuerFeature, MetadataFeature, TagFeature} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface IssuerProps { \n feature: IssuerFeature;\n}\n\nexport class FeatureIssuer extends React.Component {\n render() {\n return (\n
\n \n Address: {this.props.feature.address}\n \n
\n );\n }\n}\n\n\ninterface MetadataProps { \n feature: MetadataFeature;\n}\n\nexport class FeatureMetadata extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.data}\n \n
\n );\n }\n}\n\ninterface TagProps { \n feature: TagFeature;\n}\n\nexport class FeatureTag extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.tag}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {OutputID, BasicOutput as BasicOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: BasicOutputJSON\n id: OutputID;\n}\n\nexport class BasicOutput extends React.Component {\n render() {\n return (\n
\n \n Type: BasicOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {AliasOutput as AliasOutputJSON, OutputID} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: AliasOutputJSON\n id: OutputID;\n}\n\nexport class AliasOutput extends React.Component {\n render() {\n return (\n
\n \n Type: AliasOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n AliasID: {this.props.output.aliasId}\n StateIndex: {this.props.output.stateIndex}\n State Metadata: {this.props.output.stateMetadata} \n Foundry Counter: {this.props.output.foundryCounter}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n","import * as React from 'react';\nimport {OutputID, FoundryOutput as FoundryOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: FoundryOutputJSON\n id: OutputID;\n}\n\nexport class FoundryOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n Serial Number: {this.props.output.serialNumber}\n Token Scheme: {this.props.output.tokenScheme} \n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport {OutputID, NFTOutput as NFTOutputJSON} from \"../misc/Payload\";\nimport {conditionToComponent} from \"../utils/condition\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { featureToComponent } from 'app/utils/feature';\nimport { NativeToken } from './NativeToken';\n\ninterface Props {\n output: NFTOutputJSON\n id: OutputID;\n}\n\nexport class NFTOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n NFT ID: {this.props.output.nftId}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import { action, computed, observable } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport {\r\n BasicPayload,\r\n getPayloadType,\r\n Output,\r\n PayloadType,\r\n FaucetPayload,\r\n TransactionPayload,\r\n TaggedDataPayload,\r\n BasicOutput\r\n} from \"../misc/Payload\";\r\nimport * as React from \"react\";\r\nimport { Link } from 'react-router-dom';\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { OutputType } from 'app/utils/output';\r\n\r\nexport const GenesisBlockID = \"1111111111111111111111111111111111111111111111111111111111111111\";\r\nexport const GenesisTransactionID = \"11111111111111111111111111111111\";\r\n\r\nexport class Block {\r\n id: string;\r\n networkID: number;\r\n protocolVersion: number;\r\n solidificationTimestamp: number;\r\n issuanceTimestamp: number;\r\n sequenceNumber: number;\r\n issuerID: string;\r\n signature: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n strongChildren: Array;\r\n weakChildren: Array;\r\n shallowLikeChildren: Array;\r\n solid: boolean;\r\n spendIDs: Array;\r\n addedSpendIDs: Array;\r\n subtractedSpendIDs: Array;\r\n scheduled: boolean;\r\n booked: boolean;\r\n orphaned: boolean;\r\n objectivelyInvalid: boolean;\r\n subjectivelyInvalid: boolean;\r\n acceptance: boolean;\r\n acceptanceTime: number;\r\n confirmation: boolean;\r\n confirmationTime: number;\r\n confirmationBySlot: boolean;\r\n confirmationBySlotTime: number;\r\n payloadType: number;\r\n payload: any;\r\n txId: string;\r\n rank: number;\r\n sequenceID: number;\r\n isPastMarker: boolean;\r\n pastMarkerGap: number;\r\n pastMarkers: string;\r\n commitmentID: string\r\n commitment: Commitment;\r\n latestConfirmedSlot: number;\r\n}\r\n\r\nexport class Commitment {\r\n index: number;\r\n prevID: string;\r\n rootsID: string;\r\n cumulativeWeight: number;\r\n}\r\nexport class AddressResult {\r\n address: string;\r\n explorerOutputs: Array;\r\n}\r\n\r\nexport class ExplorerOutput {\r\n id: OutputID;\r\n output: Output;\r\n metadata: OutputMetadata\r\n txTimestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputID {\r\n base58: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class OutputMetadata {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n consumerCount: number;\r\n confirmedConsumer: string // tx id of confirmed consumer\r\n confirmationState: number\r\n confirmationStateTime: number\r\n}\r\n\r\nclass OutputConsumer {\r\n transactionID: string;\r\n valid: string;\r\n}\r\n\r\nclass OutputConsumers {\r\n outputID: OutputID;\r\n consumers: Array\r\n}\r\n\r\nclass TransactionMetadata {\r\n transactionID: string;\r\n spendIDs: string[];\r\n booked: boolean;\r\n bookedTime: number;\r\n confirmationState: string;\r\n confirmationStateTime: number;\r\n}\r\n\r\nclass PendingMana {\r\n mana: number;\r\n outputID: string;\r\n error: string;\r\n timestamp: number;\r\n}\r\n\r\nclass Spend {\r\n id: string;\r\n parents: Array;\r\n spendIDs: Array;\r\n confirmationState: number;\r\n}\r\n\r\nclass SpendChildren {\r\n spendID: string;\r\n childSpends: Array\r\n}\r\n\r\nclass SpendChild {\r\n spendID: string;\r\n type: string;\r\n}\r\n\r\nclass SpendSpend {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n}\r\n\r\nclass SpendSpends {\r\n spendID: string;\r\n spends: Array\r\n}\r\n\r\nclass SpendVoters {\r\n spendID: string;\r\n voters: Array\r\n}\r\n\r\nclass SlotInfo {\r\n id: string;\r\n index: number;\r\n rootsID: string;\r\n prevID: string;\r\n cumulativeWeight: number;\r\n blocks: Array;\r\n transactions: Array;\r\n createdOutputs: Array;\r\n spentOutputs: Array;\r\n}\r\n\r\nclass SearchResult {\r\n block: BlockRef;\r\n address: AddressResult;\r\n}\r\n\r\nclass BlockRef {\r\n id: string;\r\n payload_type: number;\r\n}\r\n\r\nclass Tips {\r\n tips: Array\r\n}\r\n\r\nconst liveFeedSize = 50;\r\n\r\nenum QueryError {\r\n NotFound = 1,\r\n BadRequest = 2\r\n}\r\n\r\nexport class ExplorerStore {\r\n // live feed\r\n @observable latest_blocks: Array = [];\r\n\r\n // queries\r\n @observable blk: Block = null;\r\n @observable addr: AddressResult = null;\r\n @observable tx: any = null;\r\n @observable txMetadata: any = null;\r\n @observable txAttachments: any = [];\r\n @observable output: any = null;\r\n @observable outputMetadata: OutputMetadata = null;\r\n @observable outputConsumers: OutputConsumers = null;\r\n @observable pendingMana: PendingMana = null;\r\n @observable spend: Spend = null;\r\n @observable spendChildren: SpendChildren = null;\r\n @observable spendSpends: SpendSpends = null;\r\n @observable spendVoters: SpendVoters = null;\r\n @observable tips: Tips = null;\r\n @observable slotInfo: SlotInfo = new SlotInfo;\r\n\r\n // loading\r\n @observable query_loading: boolean = false;\r\n @observable query_err: any = null;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n @observable search_result: SearchResult = null;\r\n @observable searching: boolean = false;\r\n @observable payload: any;\r\n @observable subpayload: any;\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Block, this.addLiveFeedBlock);\r\n }\r\n\r\n searchAny = async () => {\r\n this.updateSearching(true);\r\n try {\r\n let res = await fetch(`/api/search/${this.search}`);\r\n let result: SearchResult = await res.json();\r\n this.updateSearchResult(result);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n resetSearch = () => {\r\n this.search_result = null;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n updateSearchResult = (result: SearchResult) => {\r\n this.search_result = result;\r\n this.searching = false;\r\n let search = this.search;\r\n this.search = '';\r\n if (this.search_result.block) {\r\n this.routerStore.push(`/explorer/block/${search}`);\r\n return;\r\n }\r\n if (this.search_result.address) {\r\n this.routerStore.push(`/explorer/address/${search}`);\r\n return;\r\n }\r\n this.routerStore.push(`/explorer/404/${search}`);\r\n };\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search;\r\n };\r\n\r\n @action\r\n updateSearching = (searching: boolean) => this.searching = searching;\r\n\r\n searchBlock = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/block/${id}`)\r\n\r\n this.updateBlock(res);\r\n };\r\n\r\n searchAddress = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/address/${id}`)\r\n this.updateAddress(res);\r\n };\r\n\r\n getSlotDetails = async (id: string) => {\r\n await this.getSlotInfo(id);\r\n }\r\n\r\n @action\r\n getTransaction = async (id: string) => {\r\n const tx = await this.fetchJson(\"get\", `/api/transaction/${id}`)\r\n \r\n for (let i = 0; i < tx.inputs.length; i++) {\r\n let inputID = tx.inputs[i] ? tx.inputs[i].referencedOutputID.hex : GenesisBlockID\r\n try {\r\n let referencedOutputRes = await fetch(`/api/output/${inputID}`)\r\n if (referencedOutputRes.status === 404) {\r\n let genOutput = new Output();\r\n genOutput.output = new BasicOutput();\r\n genOutput.output.amount = 0;\r\n genOutput.type = OutputType.Basic;\r\n genOutput.outputID = tx.inputs[i].referencedOutputID;\r\n tx.inputs[i].output = genOutput;\r\n }\r\n if (referencedOutputRes.status === 200) {\r\n tx.inputs[i].output = await referencedOutputRes.json()\r\n }\r\n } catch (err) {\r\n // ignore\r\n }\r\n this.tx = tx;\r\n }\r\n }\r\n\r\n @action\r\n getTransactionAttachments = async (id: string) => {\r\n const attachments = await this.fetchJson(\"get\", `/api/transaction/${id}/attachments`)\r\n this.txAttachments = attachments;\r\n }\r\n\r\n @action\r\n getTransactionMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/transaction/${id}/metadata`)\r\n this.txMetadata = res;\r\n }\r\n\r\n @action\r\n getOutput = async (id: string) => {\r\n const output = await this.fetchJson(\"get\", `/api/output/${id}`)\r\n this.output = output;\r\n }\r\n\r\n @action\r\n getOutputMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/metadata`)\r\n this.outputMetadata = res;\r\n }\r\n\r\n @action\r\n getOutputConsumers = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/consumers`)\r\n this.outputConsumers = res;\r\n }\r\n\r\n @action\r\n getPendingMana = async (outputID: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/mana/pending?OutputID=${outputID}`)\r\n this.pendingMana = res;\r\n }\r\n\r\n @action\r\n getSpend = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}`)\r\n this.spend = res;\r\n }\r\n\r\n @action\r\n getSpendChildren = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}/children`)\r\n this.spendChildren = res;\r\n }\r\n\r\n @action\r\n getSpendSpends = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}/spends`)\r\n this.spendSpends = res;\r\n }\r\n\r\n @action\r\n getSpendVoters = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}/voters`)\r\n this.spendVoters = res;\r\n }\r\n\r\n @action\r\n getSlotInfo = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/slot/commitment/${id}`)\r\n this.slotInfo = res;\r\n }\r\n\r\n @action\r\n getTips = async () => {\r\n const res = await this.fetchJson(\"get\", \"/api/tips\")\r\n this.tips = res;\r\n }\r\n\r\n @action\r\n reset = () => {\r\n this.blk = null;\r\n this.query_err = null;\r\n // reset all variables\r\n this.tx = null;\r\n this.txMetadata = null;\r\n this.txAttachments = [];\r\n this.output = null;\r\n this.outputMetadata = null;\r\n this.outputConsumers = null;\r\n this.pendingMana = null;\r\n this.spend = null;\r\n this.spendChildren = null;\r\n this.spendSpends = null;\r\n this.tips = null;\r\n this.slotInfo = new SlotInfo;\r\n };\r\n\r\n @action\r\n updateAddress = (addr: AddressResult) => {\r\n this.addr = addr;\r\n this.query_err = null;\r\n this.query_loading = false;\r\n };\r\n\r\n @action\r\n updateBlock = (blk: Block) => {\r\n this.blk = blk;\r\n this.blk.spendIDs = this.blk.spendIDs ? this.blk.spendIDs : []\r\n this.blk.addedSpendIDs = this.blk.addedSpendIDs ? this.blk.addedSpendIDs : []\r\n this.blk.subtractedSpendIDs = this.blk.subtractedSpendIDs ? this.blk.subtractedSpendIDs : []\r\n this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : []\r\n this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : []\r\n this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : []\r\n this.blk.strongParents = this.blk.strongParents ? this.blk.strongParents : []\r\n this.blk.weakParents = this.blk.weakParents ? this.blk.weakParents : []\r\n this.blk.shallowLikedParents = this.blk.shallowLikedParents ? this.blk.shallowLikedParents : []\r\n\r\n this.query_err = null;\r\n this.query_loading = false;\r\n switch (blk.payloadType) {\r\n case PayloadType.Transaction:\r\n this.payload = blk.payload as TransactionPayload\r\n break;\r\n case PayloadType.TaggedData:\r\n this.payload = blk.payload as TaggedDataPayload\r\n break;\r\n case PayloadType.Faucet:\r\n this.payload = blk.payload as FaucetPayload\r\n default:\r\n this.payload = blk.payload as BasicPayload\r\n break;\r\n }\r\n };\r\n\r\n @action\r\n updateQueryLoading = (loading: boolean) => this.query_loading = loading;\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.query_err = err;\r\n this.query_loading = false;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n addLiveFeedBlock = (blk: BlockRef) => {\r\n // prevent duplicates (should be fast with only size 10)\r\n if (this.latest_blocks.findIndex((t) => t.id == blk.id) === -1) {\r\n if (this.latest_blocks.length >= liveFeedSize) {\r\n this.latest_blocks.shift();\r\n }\r\n this.latest_blocks.push(blk);\r\n }\r\n };\r\n\r\n @computed\r\n get blksLiveFeed() {\r\n let feed = [];\r\n for (let i = this.latest_blocks.length - 1; i >= 0; i--) {\r\n let blk = this.latest_blocks[i];\r\n feed.push(\r\n \r\n \r\n \r\n {blk.id}\r\n \r\n \r\n \r\n {getPayloadType(blk.payload_type)}\r\n \r\n \r\n );\r\n }\r\n return feed;\r\n }\r\n\r\n @computed\r\n get tipsList() {\r\n let list = [];\r\n if (this.tips) {\r\n for (let i = 0; i < this.tips.tips.length; i++) {\r\n let blkId = this.tips.tips[i];\r\n list.push(\r\n \r\n \r\n \r\n {blkId}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return list;\r\n }\r\n\r\n async fetchJson(\r\n method: 'get' | 'delete',\r\n route: string,\r\n requestData?: T\r\n ): Promise {\r\n\r\n const body = requestData ? JSON.stringify(requestData, function (_, v) {\r\n // keep Uint8Array as it is\r\n if (v instanceof Uint8Array) {\r\n return Array.from(v);\r\n }\r\n return v;\r\n })\r\n : undefined;\r\n\r\n const response = await fetch(`${route}`, {\r\n method,\r\n headers: { 'Content-Type': 'application/json' },\r\n body\r\n });\r\n\r\n if (response.ok) {\r\n const responseData: U = await response.json();\r\n return responseData;\r\n }\r\n\r\n switch (response.status) {\r\n case 404:\r\n this.updateQueryError(QueryError.NotFound);\r\n break;\r\n case 400:\r\n this.updateQueryError(QueryError.BadRequest);\r\n break;\r\n default:\r\n this.updateQueryError('unexpected error')\r\n break;\r\n }\r\n return {} as U;\r\n }\r\n}\r\n\r\nexport default ExplorerStore;\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class BasicPayload extends React.Component {\r\n\r\n render() {\r\n let {payload} = this.props.explorerStore;\r\n return (\r\n payload &&\r\n \r\n \r\n \r\n {payload.content_title}: {' '} \r\n {payload.content}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum SignatureType {\n Ed25519 = 0,\n BLS = 1,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case SignatureType.Ed25519:\n return \"Ed25519 Signature\";\n case SignatureType.BLS:\n return \"BLS Signature\";\n default:\n return \"Unknown Signature Type\";\n }\n}","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport { Col, ListGroup } from 'react-bootstrap';\nimport { SignatureEd25519 } from 'app/misc/Payload';\n\ninterface Props {\n signature?: SignatureEd25519;\n}\n\nexport class Ed25519Signature extends React.Component {\n\n render() {\n let signature = this.props.signature;\n return (\n \n \n \n \n Public Key: {signature.publicKey}\n Signature: {signature.signature}\n \n \n \n \n );\n }\n}\n","import {UnlockBlock as unlockBlockJSON} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport Badge from \"react-bootstrap/Badge\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {SignatureType, resolveSignatureType} from \"../utils/unlock_block\";\nimport { Ed25519Signature } from \"./Ed25519Signature\";\n\ninterface UnlockProps {\n block: unlockBlockJSON;\n key: number;\n}\n\nexport class UnlockBlock extends React.Component {\n renderSignatureComponent() {\n switch (this.props.block.signatureType) {\n case SignatureType.Ed25519:\n return \n }\n }\n\n render() {\n let block = this.props.block;\n return (\n \n \n Index: {this.props.key}\n \n Type: {block.type}\n {\n block.signatureType && Signature Type: {resolveSignatureType(block.signatureType)}\n } \n {\n this.renderSignatureComponent()\n } \n \n \n \n );\n }\n}","import * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {outputToComponent} from \"../utils/output\";\nimport {IconContext} from \"react-icons\";\nimport {FaChevronCircleRight} from \"react-icons/fa\";\nimport {UnlockBlock} from \"./UnlockBlock\";\nimport {TransactionPayload} from \"../misc/Payload\";\n\nconst style = {\n maxHeight: \"1000px\",\n overflow: \"auto\",\n width: \"47%\",\n fontSize: \"85%\",\n}\n\ninterface Props {\n txID?: string;\n tx?: TransactionPayload;\n}\n\nexport class Transaction extends React.Component {\n render() {\n let txID = this.props.txID;\n let tx = this.props.tx;\n return (\n tx && txID &&\n
\n

Transaction

\n

{txID}

\n \n \n
Transaction Essence
\n \n ID: {txID}\n Network ID: {tx.networkId}\n Creation Time: {tx.creationSlot}\n \n
\n
\n Inputs\n
\n {tx.inputs.map((input, i) => {\n return (\n
\n Index: {i}\n
\n \n Output ID: {input.referencedOutputID.hex}\n \n
\n
\n )\n })}\n
\n \n
\n \n
\n
\n
\n Outputs\n
\n {tx.outputs.map((output, i) => {\n return (\n
\n Index: {i}\n {outputToComponent(output)}\n
\n )\n })}\n
\n
\n
\n { tx.payload && Data payload: {tx.payload}}\n
\n \n
\n \n \n
Unlock Blocks
\n \n {\n tx.unlocks.map((block,index) => (\n \n ))}\n \n \n
\n
\n );\n }\n}","import * as React from 'react';\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\r\nimport {Transaction} from \"./Transaction\";\r\n// import {ExplorerTransactionMetadata} from \"./ExplorerTransactionMetadata\";\r\nimport Container from \"react-bootstrap/Container\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class TransactionPayload extends React.Component {\r\n render() {\r\n let {payload, blk} = this.props.explorerStore;\r\n let txID = blk.txId;\r\n let tx = payload;\r\n\r\n return (\r\n \r\n {/* */}\r\n \r\n \r\n );\r\n }\r\n}\r\n","export function resolveBase58SpendID(base58Spend: string): string {\n switch (base58Spend) {\n case MasterSpendInBase58:\n return \"MasterSpendID\";\n case UndefinedSpendInBase58:\n return \"UndefinedSpendID\";\n case LazyBookedSpendsSpendInBase58:\n return \"LazyBookedSpendsSpendID\";\n case InvalidSpendInBase58:\n return \"InvalidSpendID\";\n default:\n // otherwise it is a \"regular\" spendID that doesn't have a distinct name\n return base58Spend\n }\n}\n\n// base58 spendIDs that have distinct names\nconst MasterSpendInBase58 = \"4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM\"\nconst UndefinedSpendInBase58 = \"11111111111111111111111111111111\"\nconst LazyBookedSpendsSpendInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF\"\nconst InvalidSpendInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG\"","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport {inject, observer} from \"mobx-react\";\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class FaucetPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n return (\n payload &&\n \n \n \n \n \n Address: {payload.address}\n \n \n Access Mana Pledge ID: {payload.accessManaPledgeID}\n \n \n Consensus Mana Pledge ID: {payload.consensusManaPledgeID}\n \n \n Nonce: {payload.nonce}\n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport { Col, ListGroup } from 'react-bootstrap';\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class TaggedDataPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n \n return (\n payload &&\n \n \n \n \n Tag: {payload.tag}\n Data: {payload.data}\n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport ExplorerStore, { GenesisBlockID } from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport * as dateformat from 'dateformat';\r\nimport { Link } from 'react-router-dom';\r\nimport { BasicPayload } from './BasicPayload'\r\nimport { TransactionPayload } from './TransactionPayload'\r\nimport { getPayloadType, PayloadType } from '../misc/Payload'\r\nimport { resolveBase58SpendID } from \"../utils/spend\";\r\nimport { FaucetPayload } from './FaucetPayload';\r\nimport { TaggedDataPayload } from './TaggedDataPayload';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerBlockQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.explorerStore.reset();\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n getPayloadType() {\r\n return getPayloadType(this.props.explorerStore.blk.payloadType)\r\n }\r\n\r\n renderPayload() {\r\n switch (this.props.explorerStore.blk.payloadType) {\r\n case PayloadType.Transaction:\r\n if (!this.props.explorerStore.blk.objectivelyInvalid) {\r\n return \r\n }\r\n return \r\n case PayloadType.TaggedData:\r\n return \r\n case PayloadType.Faucet:\r\n return \r\n default:\r\n return \r\n }\r\n }\r\n\r\n render() {\r\n let { id } = this.props.match.params;\r\n let { blk, query_loading, query_err } = this.props.explorerStore;\r\n\r\n if (id === GenesisBlockID) {\r\n return (\r\n \r\n

Genesis Block

\r\n

In the beginning there was the genesis.

\r\n
\r\n );\r\n }\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Block not available - 404

\r\n

\r\n Block with ID {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n return (\r\n \r\n

Block

\r\n

\r\n {id} {' '}\r\n {\r\n blk &&\r\n \r\n
\r\n \r\n \r\n Issuance Time: {dateformat(new Date(blk.issuanceTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Solidification Time: {dateformat(new Date(blk.solidificationTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n
\r\n }\r\n

\r\n {\r\n blk &&\r\n \r\n \r\n \r\n \r\n \r\n Payload Type: {this.getPayloadType()}\r\n \r\n \r\n Sequence Number: {blk.sequenceNumber}\r\n \r\n \r\n spendIDs:\r\n \r\n {\r\n blk.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n AddedspendIDs:\r\n \r\n {\r\n blk.addedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n SubtractedspendIDs:\r\n \r\n {\r\n blk.subtractedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n Solid: {blk.solid ? 'Yes' : 'No'}\r\n \r\n \r\n Scheduled: {blk.scheduled ? 'Yes' : 'No'}\r\n \r\n \r\n Booked: {blk.booked ? 'Yes' : 'No'}\r\n \r\n \r\n Orphaned: {blk.orphaned ? 'Yes' : 'No'}\r\n \r\n \r\n Objectively Invalid: {blk.objectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Subjectively Invalid: {blk.subjectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance: {blk.acceptance ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance\r\n Time: {dateformat(new Date(blk.acceptanceTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation: {blk.confirmation ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation\r\n Time: {dateformat(new Date(blk.confirmationTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation by slot: {blk.confirmationBySlot ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation by slot\r\n time: {dateformat(new Date(blk.confirmationBySlotTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n
Slot Commitment
\r\n \r\n \r\n CommitmentID: {blk.commitmentID}\r\n \r\n \r\n \r\n \r\n Index: {blk.commitment.index}\r\n \r\n \r\n prevID: {blk.commitment.prevID}\r\n \r\n \r\n rootsID: {blk.commitment.rootsID}\r\n \r\n \r\n Cumulative Weight: {blk.commitment.cumulativeWeight}\r\n \r\n \r\n \r\n \r\n LatestConfirmedSlot: {blk.latestConfirmedSlot}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n {\r\n !!blk.rank &&\r\n \r\n \r\n
Markers
\r\n \r\n \r\n Rank: {blk.rank}\r\n \r\n \r\n SequenceID: {blk.sequenceID}\r\n \r\n \r\n PastMarkerGap: {blk.pastMarkerGap}\r\n \r\n \r\n IsPastMarker: {blk.isPastMarker ? 'Yes' : 'No'}\r\n \r\n \r\n Past markers: {blk.pastMarkers}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n\r\n \r\n \r\n \r\n \r\n IssuerID: {blk.issuerID}\r\n \r\n \r\n Block Signature: {blk.signature}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongParents.map((value, index) => {\r\n return (\r\n \r\n Strong Parents {index + 1}: {' '}\r\n \r\n {blk.strongParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.weakParents.map((value, index) => {\r\n return (\r\n \r\n Weak Parents {index + 1}: {' '}\r\n \r\n {blk.weakParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.shallowLikedParents.map((value, index) => {\r\n return (\r\n \r\n Shallow Liked Parents {index + 1}: {' '}\r\n \r\n {blk.shallowLikedParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongChildren.map((value, index) => {\r\n return (\r\n \r\n Strong Child {index + 1}: {' '}\r\n \r\n {blk.strongChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.weakChildren.map((value, index) => {\r\n return (\r\n \r\n Weak Child {index + 1}: {' '}\r\n \r\n {blk.weakChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.shallowLikeChildren.map((value, index) => {\r\n return (\r\n \r\n ShallowLike Child {index + 1}: {' '}\r\n \r\n {blk.shallowLikeChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n

Payload

\r\n \r\n
\r\n \r\n \r\n {this.renderPayload()}\r\n \r\n \r\n
\r\n }\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","export function displayManaUnit(mana: number): string {\n let result = \"\"\n // round to nearest integer\n let roundedMana = Math.round(mana);\n if (roundedMana < 1000) {\n result = roundedMana.toString(10) + \" m\"; // mana\n } else if (roundedMana < 1000000) {\n result = (roundedMana / 1000).toFixed(3) + \" Km\"; // kilomana\n }\n else if (roundedMana < 1000000000) {\n result = (roundedMana / 1000000).toFixed(3) + \" Mm\"; // megamana\n }\n else if (roundedMana < 1000000000000) {\n result = (roundedMana / 1000000000).toFixed(3) + \" Gm\"; // gigamana\n }\n else if (roundedMana < 1000000000000000) {\n result = (roundedMana / 1000000000000).toFixed(3) + \" Tm\"; // terramana\n } else {\n result = (roundedMana / 1000000000000000).toFixed(3) + \" Pm\"; // petamana\n }\n return result\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore, ExplorerOutput, OutputMetadata} from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Alert from \"react-bootstrap/Alert\";\r\nimport {Link} from 'react-router-dom';\r\nimport {displayManaUnit} from \"../utils\";\r\nimport {OutputType, outputToComponent, outputTypeToName} from \"../utils/output\";\r\nimport {Button, ListGroupItem} from \"react-bootstrap\";\r\nimport {resolveBase58SpendID as resolveBase58SpendID} from \"../utils/spend\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerAddressQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n let {id} = this.props.match.params;\r\n let {addr, query_loading, query_err} = this.props.explorerStore;\r\n // spent outputs\r\n let spent: Array = [];\r\n // unspent outputs\r\n let unspent: Array = [];\r\n let available_balances = [];\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Address not available - 404

\r\n

\r\n Address {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n\r\n if (addr) {\r\n // separate spent from unspent\r\n addr.explorerOutputs.forEach((o) => {\r\n if (o.metadata.consumerCount > 0) {\r\n spent.push(o);\r\n } else {\r\n unspent.push(o);\r\n }\r\n })\r\n\r\n let timestampCompareFn = (a: ExplorerOutput, b: ExplorerOutput) => {\r\n if (b.txTimestamp === a.txTimestamp) {\r\n // outputs have the same timestamp\r\n if (b.id.transactionID == a.id.transactionID) {\r\n // outputs belong to the same tx, sort based on index\r\n return b.id.outputIndex - a.id.outputIndex;\r\n }\r\n // same timestamp, but different tx\r\n return b.id.transactionID.localeCompare(a.id.transactionID);\r\n }\r\n return b.txTimestamp - a.txTimestamp;\r\n }\r\n\r\n // sort outputs\r\n unspent.sort(timestampCompareFn)\r\n spent.sort(timestampCompareFn)\r\n }\r\n return (\r\n \r\n

Address {id} {addr !== null && ({addr.explorerOutputs.length} Outputs)}

\r\n {\r\n addr !== null ?\r\n \r\n {\r\n addr.explorerOutputs !== null && addr.explorerOutputs.length === 100 &&\r\n \r\n Max. 100 outputs are shown.\r\n \r\n }\r\n \r\n \r\n \r\n

Available Balances

\r\n {available_balances.length === 0? \"There are no balances currently available.\" :
\r\n \r\n \r\n \r\n Color\r\n \r\n \r\n Balance\r\n \r\n \r\n \r\n {available_balances}\r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Unspent Outputs

\r\n {unspent.length === 0? \"There are no unspent outputs currently available.\" :
\r\n {unspent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Spent Outputs

\r\n {spent.length === 0? \"There are no spent outputs currently available.\" :
\r\n {spent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\ninterface oProps {\r\n output: ExplorerOutput;\r\n}\r\n\r\nclass OutputButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n enabled: false\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n { this.setState({enabled: !this.state.enabled})}}\r\n block\r\n >\r\n \r\n {this.props.output.id.base58} \r\n {outputTypeToName(this.props.output.output.type)} \r\n {new Date(this.props.output.txTimestamp * 1000).toLocaleString()}\r\n \r\n \r\n \r\n \r\n {\r\n this.state.enabled? outputToComponent(this.props.output.output): null\r\n }\r\n \r\n \r\n {\r\n this.state.enabled? : null\r\n }\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\ninterface omProps {\r\n metadata: OutputMetadata;\r\n timestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputMeta extends React.Component {\r\n render() {\r\n let metadata = this.props.metadata;\r\n let timestamp = this.props.timestamp;\r\n let pendingMana = this.props.pendingMana;\r\n return (\r\n \r\n spendIDs: \r\n \r\n {\r\n metadata.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n Pending mana: {displayManaUnit(pendingMana)}\r\n Timestamp: {new Date(timestamp * 1000).toLocaleString()}\r\n Consumer Count: {metadata.consumerCount}\r\n { metadata.confirmedConsumer && Confirmed Consumer: {metadata.confirmedConsumer} }\r\n \r\n );\r\n }\r\n}\r\n\r\nlet getVariant = (outputType: number) => {\r\n switch (outputType) {\r\n case OutputType.Basic:\r\n return \"light\";\r\n case OutputType.Alias:\r\n return \"light\";\r\n case OutputType.Foundry:\r\n return \"success\";\r\n case OutputType.NFT:\r\n return \"info\";\r\n default:\r\n return \"danger\";\r\n }\r\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n search: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class Explorer404 extends React.Component {\r\n\r\n render() {\r\n let {search} = this.props.match.params;\r\n return (\r\n \r\n

Tangle Explorer 404

\r\n

\r\n The search via '{search}' did not yield any results.\r\n

\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport * as prettysize from 'prettysize';\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport {Line} from \"react-chartjs-2\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n identity: string;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbor extends React.Component {\r\n render() {\r\n let neighborMetrics = this.props.nodeStore.neighbor_metrics.get(this.props.identity);\r\n let last = neighborMetrics.current;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {last.id}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Origin:\r\n {' '}\r\n {last.connection_origin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Address: {last.address}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Network (Tx/Rx)
\r\n \r\n {'Total: '}\r\n {last.packets_written}\r\n {' / '}\r\n {last.packets_read}\r\n \r\n {' '}\r\n \r\n {'Current: '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.tx)}\r\n {' / '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.rx)}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Neighbor} from \"./Neighbor\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbors extends React.Component {\r\n render() {\r\n let neighborsEle = [];\r\n this.props.nodeStore.neighbor_metrics.forEach((v, k) => {\r\n neighborsEle.push();\r\n });\r\n return (\r\n \r\n

Neighbors {neighborsEle.length > 0 && ({neighborsEle.length})}

\r\n

\r\n Currently connected neighbors.\r\n

\r\n {neighborsEle}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { KeyboardEvent } from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport { Link } from 'react-router-dom';\r\nimport VisualizerStore from \"../stores/VisualizerStore\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Popover from \"react-bootstrap/Popover\";\r\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\r\n\r\ninterface Props {\r\n visualizerStore?: VisualizerStore;\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"visualizerStore\")\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Visualizer extends React.Component {\r\n\r\n componentDidMount(): void {\r\n this.props.visualizerStore.start();\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.props.visualizerStore.stop();\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n updateVerticesLimit = (e) => {\r\n this.props.visualizerStore.updateVerticesLimit(e.target.value);\r\n }\r\n\r\n pauseResumeVisualizer = (e) => {\r\n this.props.visualizerStore.pauseResume();\r\n }\r\n\r\n updateSearch = (e) => {\r\n this.props.visualizerStore.updateSearch(e.target.value);\r\n }\r\n\r\n searchAndHighlight = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.visualizerStore.searchAndHighlight();\r\n }\r\n\r\n toggleBackgroundDataCollection = () => {\r\n if (this.props.nodeStore.collecting) {\r\n this.props.nodeStore.unregisterHandlers();\r\n return;\r\n }\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n render() {\r\n let {\r\n vertices, finalized_count, selected,\r\n verticesLimit, tips_count, paused, search\r\n } = this.props.visualizerStore;\r\n let { last_mps_metric, collecting } = this.props.nodeStore;\r\n\r\n return (\r\n \r\n

Visualizer

\r\n \r\n \r\n \r\n \r\n Vertices Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n Search Vertex\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ensures that only data needed for the visualizer is collected.\r\n \r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Pauses/resumes rendering the graph.\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n BLK Pending\r\n \r\n {' '}\r\n \r\n BLK Confirmed\r\n \r\n {' '}\r\n \r\n TX Pending\r\n \r\n {' '}\r\n \r\n TX Confirmed\r\n \r\n {' '}\r\n \r\n Tip\r\n \r\n {' '}\r\n \r\n Unknown\r\n \r\n
\r\n Vertices: {vertices.size}, Tips: {tips_count},\r\n Confirmed/UnConfirmed: {finalized_count}/{vertices.size - finalized_count},{' '}\r\n BPS: {last_mps_metric.mps}\r\n
\r\n Selected: {selected ?\r\n \r\n {selected.id.substr(0, 10)}\r\n \r\n : \"-\"}\r\n
\r\n {\r\n selected ? selected.strongParents &&\r\n Strong:{' '}\r\n {selected.strongParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.weakParents &&\r\n Weak:{' '}\r\n {selected.weakParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.shallowLikedParents &&\r\n Shallow Liked:{' '}\r\n {selected.shallowLikedParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n

\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Table from \"react-bootstrap/Table\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class Tips extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTips();\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {tipsList} = this.props.explorerStore;\n return (\n \n

Tips

\n \n \n \n \n \n \n \n {tipsList}\n \n
BlockID
\n
\n );\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport {Transaction} from \"./Transaction\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransaction extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransaction(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, tx } = this.props.explorerStore;\n if (query_err) {\n return (\n \n

Transaction not available - 404

\n

\n Transaction with ID {txId} not found.\n

\n
\n );\n }\n return \n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n// import {resolveBase58SpendID} from \"../utils/spend\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionMetadata extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionMetadata(this.props.txId);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, txMetadata } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Metadata

\n

Metadata for transaction ID {txId} not found.

\n
\n );\n }\n return (\n
\n

Metadata

\n {txMetadata && \n \n SpendIDs: \n \n { \n txMetadata.spendIDs && txMetadata.spendIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n \n Booked: {txMetadata.booked.toString()}\n {/* Booked time: {new Date(txMetadata.bookedTime * 1000).toLocaleString()} */}\n Confirmation State: {txMetadata.confirmationState}\n {/* Confirmation State Time: {new Date(txMetadata.confirmationStateTime * 1000).toLocaleString()} */}\n }\n
\n )\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionAttachments extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionAttachments(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txAttachments } = this.props.explorerStore;\n return (\n
\n

Attachments

\n {txAttachments && txAttachments.blockIDs && \n \n \n {txAttachments.blockIDs.map((blkId, i) => {\n return {blkId}\n })}\n \n \n }\n
\n )\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { ExplorerTransaction } from \"./ExplorerTransaction\"\nimport { ExplorerTransactionMetadata } from \"./ExplorerTransactionMetadata\"\nimport { ExplorerTransactionAttachments } from \"./ExplorerTransactionAttachments\"\n\n\ninterface Props {\n match?: {\n params: {\n id: string,\n }\n }\n}\n\nexport class ExplorerTransactionQueryResult extends React.Component {\n render() {\n let { id } = this.props.match.params;\n return (\n \n \n \n \n \n )\n }\n}","export enum ConfirmationState {\n Undefined = 0,\n Rejected,\n Pending,\n Accepted,\n Confirmed,\n}\n\nexport function resolveConfirmationState(sigType: number) {\n switch (sigType) {\n case ConfirmationState.Undefined:\n return \"Undefined\";\n case ConfirmationState.Rejected:\n return \"Rejected\";\n case ConfirmationState.Pending:\n return \"Pending\";\n case ConfirmationState.Accepted:\n return \"Accepted\";\n case ConfirmationState.Confirmed:\n return \"Confirmed\";\n default:\n return \"Undefined Confirmation State\";\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {Link} from 'react-router-dom';\nimport {displayManaUnit} from \"../utils\";\nimport {resolveBase58SpendID} from \"../utils/spend\";\nimport {outputToComponent} from \"../utils/output\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getOutput(this.props.match.params.id);\n this.props.explorerStore.getPendingMana(this.props.match.params.id);\n this.props.explorerStore.getOutputMetadata(this.props.match.params.id);\n this.props.explorerStore.getOutputConsumers(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, output, pendingMana, outputMetadata, outputConsumers } = this.props.explorerStore;\n\n let renderTriBool = (val: string) => {\n if (val === \"true\"){\n return True\n }\n if (val === \"false\"){\n return False\n }\n return Maybe\n }\n\n if (query_err) {\n return (\n \n

Output not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Output

\n {output &&
\n {outputToComponent(output)}\n \n {pendingMana && \n Pending Mana\n
\n
Value: {displayManaUnit(pendingMana.mana)}
\n
Timestamp: {new Date(pendingMana.timestamp * 1000).toLocaleString()}
\n
}\n
\n
}\n\n

Metadata

\n {outputMetadata &&
\n \n Transaction ID: {outputMetadata.outputID.transactionID} \n spendIDs: \n \n {\n outputMetadata.spendIDs.map((value, index) => {\n return (\n \n \n {resolveBase58SpendID(value)}\n \n \n )\n })\n }\n \n Consumer Count: {outputMetadata.consumerCount}\n Confirmed Consumer: {outputMetadata.confirmedConsumer} \n Confirmation State: {resolveConfirmationState(outputMetadata.confirmationState)}\n Confirmation State Time: {new Date(outputMetadata.confirmationStateTime * 1000).toLocaleString()}\n \n
}\n\n

Consumers

\n {outputConsumers &&
\n \n {outputConsumers.consumers.map((c,i) => \n
Transaction ID: {c.transactionID}
\n
Valid: {renderTriBool(c.valid)}
\n
)}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {resolveBase58SpendID} from \"../utils/spend\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSpendQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getSpend(this.props.match.params.id);\n this.props.explorerStore.getSpendChildren(this.props.match.params.id);\n this.props.explorerStore.getSpendSpends(this.props.match.params.id);\n this.props.explorerStore.getSpendVoters(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, spend, spendChildren, spendSpends, spendVoters } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Spend not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Spend

\n {spend && \n ID: {resolveBase58SpendID(spend.id)}\n Parents:\n \n {spend.parents.map((p,i) => {resolveBase58SpendID(p)})}\n \n \n {Spends:\n {spend.spendIDs && \n {spend.spendIDs.map((c,i) => {c})}\n }\n }\n ConfirmationState: {resolveConfirmationState(spend.confirmationState)}\n Children:\n {spendChildren && \n {spendChildren.childSpends.map((c,i) => {resolveBase58SpendID(c.spendID)})}\n }\n \n { Spends:\n {spendSpends && \n {spendSpends.spends.map((c,i) =>
\n OutputID: {c.outputID.base58}\n \n {c.spendIDs.map((b,j) => \n {resolveBase58SpendID(b)}\n )}\n \n
)}\n
}\n
}\n Voters:\n {spendVoters && \n {spendVoters.voters.map((s,i) => {s})}\n }\n \n
}\n
\n )\n }\n}\n","import { SlotStore } from '../stores/SlotStore';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from '../stores/NodeStore';\nimport * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { Table } from 'react-bootstrap';\n\ninterface Props {\n history: any;\n nodeStore?: NodeStore;\n slotStore?: SlotStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"slotStore\")\n@observer\nexport class SlotLiveFeed extends React.Component {\n render() {\n let {slotLiveFeed} = this.props.slotStore;\n return (\n \n

Slots

\n \n \n \n \n \n \n \n \n {slotLiveFeed}\n \n
IndexCommitment ID
\n
\n );\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { Card, Col, Row, Table } from 'react-bootstrap';\n\n\ninterface Props {\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n commitment: string,\n }\n }\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSlotQueryResult extends React.Component {\n componentDidMount() {\n const id = this.props.match.params.commitment;\n this.props.explorerStore.getSlotDetails(id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n\n render() {\n let {commitment} = this.props.match.params;\n let { query_err, slotInfo } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Slot not found - 404

\n {commitment}\n
\n );\n }\n return (\n \n

Slot

\n {slotInfo && \n ID: {commitment}\n Index: {slotInfo.index}\n RootsID: {slotInfo.rootsID}\n PrevEC: {slotInfo.prevID}\n Cumulative Weight: {slotInfo.cumulativeWeight}\n Blocks:\n {slotInfo.blocks && \n \n \n \n \n \n {slotInfo.blocks.map((b,i) => {b})}\n \n
\n \n
\n
\n
}\n
\n Transactions:\n {slotInfo.transactions && \n \n \n \n \n \n {slotInfo.transactions.map((t,i) => {t})}\n \n
\n \n
\n
\n
}\n
\n Created outputs:\n {slotInfo.createdOutputs && \n \n \n \n \n \n {slotInfo.createdOutputs.map((c,i) => {c})}\n \n
\n \n
\n
\n
}\n
\n Spent outputs:\n {slotInfo.spentOutputs && \n \n \n \n \n \n {slotInfo.spentOutputs.map((s,i) => {s})}\n \n
\n \n
\n
\n
}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from \"../stores/NodeStore\";\nimport Navbar from \"react-bootstrap/Navbar\";\nimport Nav from \"react-bootstrap/Nav\";\nimport {Dashboard} from \"./Dashboard\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {RouterStore} from 'mobx-react-router';\nimport {Explorer} from \"./Explorer\";\nimport {NavExplorerSearchbar} from \"./NavExplorerSearchbar\";\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {LinkContainer} from 'react-router-bootstrap';\nimport {ExplorerBlockQueryResult} from \"./ExplorerBlockQueryResult\";\nimport {ExplorerAddressQueryResult} from \"./ExplorerAddressResult\";\nimport {Explorer404} from \"./Explorer404\";\nimport {Neighbors} from \"./Neighbors\";\nimport {Visualizer} from \"./Visualizer\";\nimport {Tips} from \"./Tips\";\nimport {ExplorerTransactionQueryResult} from \"./ExplorerTransactionQueryResult\";\nimport {ExplorerOutputQueryResult} from \"./ExplorerOutputQueryResult\";\nimport {ExplorerSpendQueryResult} from \"./ExplorerSpendQueryResult\";\nimport { SlotLiveFeed } from './SlotLiveFeed';\nimport { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult';\n\ninterface Props {\n history: any;\n routerStore?: RouterStore;\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"routerStore\")\n@observer\nexport class Root extends React.Component {\n renderDevTool() {\n if (process.env.NODE_ENV !== 'production') {\n const DevTools = require('mobx-react-devtools').default;\n return ;\n }\n }\n\n componentDidMount(): void {\n this.props.nodeStore.connect();\n }\n\n render() {\n return (\n
\n \n iota-core\n \n \n \n \n {!this.props.nodeStore.websocketConnected &&\n WS not connected!\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.children}\n {this.renderDevTool()}\n
\n );\n }\n}\n","import * as React from 'react';\nimport {hot} from 'react-hot-loader/root';\nimport {Root} from './components/Root';\n\n// render react DOM\nexport const App = hot(({history}) => );\n","import {action, computed, observable, ObservableMap} from 'mobx';\r\nimport * as dateformat from 'dateformat';\r\nimport {connectWebSocket, registerHandler, unregisterHandler, WSMsgType} from \"../misc/WS\";\r\n\r\nclass BPSMetric {\r\n mps: number;\r\n ts: string;\r\n}\r\n\r\nclass Status {\r\n id: string;\r\n version: string;\r\n uptime: number;\r\n mem: MemoryMetrics = new MemoryMetrics();\r\n tangleTime: TangleTime;\r\n scheduler: SchedulerMetric = new SchedulerMetric();\r\n}\r\n\r\nclass TangleTime {\r\n synced: boolean;\r\n bootstrapped: boolean;\r\n ATT: number;\r\n RATT: number;\r\n CTT: number;\r\n RCTT: number;\r\n acceptedBlockID: string;\r\n confirmedBlockID: string;\r\n confirmedSlot: number;\r\n committedSlot: number;\r\n}\r\n\r\nclass MemoryMetrics {\r\n heap_sys: number;\r\n heap_alloc: number;\r\n heap_idle: number;\r\n heap_released: number;\r\n heap_objects: number;\r\n last_pause_gc: number;\r\n num_gc: number;\r\n ts: string;\r\n}\r\n\r\nclass TipsMetric {\r\n totaltips: number;\r\n ts: string;\r\n}\r\n\r\nclass NetworkIO {\r\n tx: number;\r\n rx: number;\r\n ts: string;\r\n}\r\n\r\nclass RateSetterMetric {\r\n size: number;\r\n estimate: string;\r\n rate: number;\r\n ts: string;\r\n}\r\n\r\nclass SchedulerMetric {\r\n running: number;\r\n rate: string;\r\n maxBufferSize: number;\r\n currentBufferSize: number;\r\n deficit: number;\r\n ts: string;\r\n\r\n}\r\n\r\nclass NeighborMetrics {\r\n @observable collected: Array = [];\r\n @observable network_io: Array = [];\r\n\r\n addMetric(metric: NeighborMetric) {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.collected.push(metric);\r\n if (this.collected.length > maxMetricsDataPoints) {\r\n this.collected.shift();\r\n }\r\n let netIO = this.currentNetIO;\r\n if (netIO) {\r\n if (this.network_io.length > maxMetricsDataPoints) {\r\n this.network_io.shift();\r\n }\r\n this.network_io.push(netIO);\r\n }\r\n }\r\n\r\n get current() {\r\n return this.collected[this.collected.length - 1];\r\n }\r\n\r\n get secondLast() {\r\n let index = this.collected.length - 2;\r\n if (index < 0) {\r\n return\r\n }\r\n return this.collected[index];\r\n }\r\n\r\n get currentNetIO(): NetworkIO {\r\n if (this.current && this.secondLast) {\r\n return {\r\n tx: this.current.packets_written - this.secondLast.packets_written,\r\n rx: this.current.packets_read - this.secondLast.packets_read,\r\n ts: dateformat(new Date(), \"HH:MM:ss\"),\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n @computed\r\n get netIOSeries() {\r\n let tx = Object.assign({}, chartSeriesOpts,\r\n series(\"Tx\", 'rgba(53, 180, 219,1)', 'rgba(53, 180, 219,0.4)')\r\n );\r\n let rx = Object.assign({}, chartSeriesOpts,\r\n series(\"Rx\", 'rgba(235, 134, 52)', 'rgba(235, 134, 52,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.network_io.length; i++) {\r\n let metric: NetworkIO = this.network_io[i];\r\n labels.push(metric.ts);\r\n tx.data.push(metric.tx);\r\n rx.data.push(-metric.rx);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [tx, rx],\r\n };\r\n }\r\n}\r\n\r\nclass NeighborMetric {\r\n id: string;\r\n address: string;\r\n connection_origin: number;\r\n packets_read: number;\r\n packets_written: number;\r\n ts: number;\r\n}\r\n\r\nclass ComponentCounterMetric {\r\n store: number;\r\n solidifier: number;\r\n scheduler: number;\r\n booker: number;\r\n ts: number;\r\n}\r\n\r\nconst chartSeriesOpts = {\r\n label: \"Incoming\", data: [],\r\n fill: true,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(58, 60, 171,0.4)',\r\n borderWidth: 1,\r\n borderColor: 'rgba(58, 60, 171,1)',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBorderColor: 'rgba(58, 60, 171,1)',\r\n pointBackgroundColor: '#fff',\r\n pointBorderWidth: 1,\r\n pointHoverBackgroundColor: 'rgba(58, 60, 171,1)',\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 0,\r\n pointHitRadius: 20,\r\n pointHoverRadius: 5,\r\n};\r\n\r\nfunction series(name: string, color: string, bgColor: string) {\r\n return {\r\n label: name, data: [],\r\n backgroundColor: bgColor,\r\n borderColor: color,\r\n pointBorderColor: color,\r\n pointHoverBackgroundColor: color,\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n }\r\n}\r\n\r\nconst statusWebSocketPath = \"/ws\";\r\n\r\nconst maxMetricsDataPoints = 900;\r\n\r\nexport class NodeStore {\r\n @observable status: Status = new Status();\r\n @observable websocketConnected: boolean = false;\r\n @observable last_mps_metric: BPSMetric = new BPSMetric();\r\n @observable collected_mps_metrics: Array = [];\r\n @observable collected_rate_setter_metrics: Array = [];\r\n @observable last_rate_setter_metric: RateSetterMetric = new RateSetterMetric();\r\n @observable collected_scheduler_metrics: Array = [];\r\n @observable collected_mem_metrics: Array = [];\r\n @observable neighbor_metrics = new ObservableMap();\r\n @observable last_tips_metric: TipsMetric = new TipsMetric();\r\n @observable collected_tips_metrics: Array = [];\r\n @observable last_component_counter_metric: ComponentCounterMetric = new ComponentCounterMetric();\r\n @observable collected_component_counter_metrics: Array = [];\r\n @observable collecting: boolean = true;\r\n\r\n constructor() {\r\n this.status.tangleTime = new TangleTime;\r\n this.status.tangleTime.ATT = 0;\r\n this.status.tangleTime.RATT = 0;\r\n this.status.tangleTime.CTT = 0;\r\n this.status.tangleTime.RCTT = 0;\r\n this.registerHandlers();\r\n }\r\n\r\n registerHandlers = () => {\r\n registerHandler(WSMsgType.Status, this.updateStatus);\r\n registerHandler(WSMsgType.BPSMetrics, (mps: number) => {\r\n this.addBPSMetric(this.updateLastBPSMetric(mps));\r\n });\r\n registerHandler(WSMsgType.NeighborStats, this.updateNeighborMetrics);\r\n registerHandler(WSMsgType.TipsMetrics, this.updateLastTipsMetric);\r\n registerHandler(WSMsgType.ComponentCounterMetrics, this.updateLastComponentMetric);\r\n registerHandler(WSMsgType.RateSetter, this.updateLastRateSetterMetric)\r\n\r\n this.updateCollecting(true);\r\n }\r\n\r\n unregisterHandlers = () => {\r\n unregisterHandler(WSMsgType.Status);\r\n unregisterHandler(WSMsgType.BPSMetrics);\r\n unregisterHandler(WSMsgType.NeighborStats);\r\n unregisterHandler(WSMsgType.TipsMetrics);\r\n unregisterHandler(WSMsgType.ComponentCounterMetrics);\r\n unregisterHandler(WSMsgType.RateSetter);\r\n this.updateCollecting(false);\r\n }\r\n\r\n @action\r\n updateCollecting = (collecting: boolean) => {\r\n this.collecting = collecting;\r\n }\r\n\r\n @action\r\n reset() {\r\n this.collected_mps_metrics = [];\r\n this.collected_mem_metrics = [];\r\n this.collected_scheduler_metrics = [];\r\n this.neighbor_metrics = new ObservableMap();\r\n this.collected_tips_metrics = [];\r\n this.collected_component_counter_metrics = [];\r\n }\r\n\r\n reconnect() {\r\n this.updateWebSocketConnected(false);\r\n setTimeout(() => {\r\n this.connect();\r\n }, 5000);\r\n }\r\n\r\n connect() {\r\n connectWebSocket(statusWebSocketPath,\r\n () => this.updateWebSocketConnected(true),\r\n () => this.reconnect(),\r\n () => this.updateWebSocketConnected(false))\r\n }\r\n\r\n @action\r\n updateWebSocketConnected = (connected: boolean) => this.websocketConnected = connected;\r\n\r\n @action\r\n updateStatus = (status: Status) => {\r\n status.mem.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_mem_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mem_metrics.shift();\r\n }\r\n this.collected_mem_metrics.push(status.mem);\r\n this.status = status;\r\n\r\n status.scheduler.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_scheduler_metrics.length > maxMetricsDataPoints) {\r\n this.collected_scheduler_metrics.shift();\r\n }\r\n this.collected_scheduler_metrics.push(status.scheduler);\r\n };\r\n\r\n\r\n @action\r\n updateNeighborMetrics = (neighborMetrics: Array) => {\r\n if (!neighborMetrics) {\r\n return;\r\n }\r\n let updated = [];\r\n for (let i = 0; i < neighborMetrics.length; i++) {\r\n let metric = neighborMetrics[i];\r\n let neighbMetrics: NeighborMetrics = this.neighbor_metrics.get(metric.id);\r\n if (!neighbMetrics) {\r\n neighbMetrics = new NeighborMetrics();\r\n }\r\n neighbMetrics.addMetric(metric);\r\n this.neighbor_metrics.set(metric.id, neighbMetrics);\r\n updated.push(metric.id);\r\n }\r\n // remove duplicates\r\n for (const k of this.neighbor_metrics.keys()) {\r\n if (!updated.includes(k)) {\r\n this.neighbor_metrics.delete(k);\r\n }\r\n }\r\n };\r\n\r\n @action\r\n updateLastRateSetterMetric = (metric: RateSetterMetric) => {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_rate_setter_metric = metric;\r\n if (this.collected_rate_setter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_rate_setter_metrics.shift();\r\n }\r\n this.collected_rate_setter_metrics.push(metric);\r\n };\r\n\r\n @action\r\n updateLastBPSMetric = (mps: number) => {\r\n let mpsMetric = new BPSMetric();\r\n mpsMetric.mps = mps;\r\n mpsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_mps_metric = mpsMetric;\r\n return mpsMetric;\r\n };\r\n\r\n @action\r\n addBPSMetric = (metric: BPSMetric) => {\r\n if (this.collected_mps_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mps_metrics.shift();\r\n }\r\n this.collected_mps_metrics.push(metric);\r\n }\r\n\r\n @action\r\n updateLastTipsMetric = (tipsMetric: TipsMetric) => {\r\n tipsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_tips_metric = tipsMetric;\r\n if (this.collected_tips_metrics.length > maxMetricsDataPoints) {\r\n this.collected_tips_metrics.shift();\r\n }\r\n this.collected_tips_metrics.push(tipsMetric);\r\n };\r\n\r\n @action\r\n updateLastComponentMetric = (componentCounterMetric: ComponentCounterMetric) => {\r\n componentCounterMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_component_counter_metric = componentCounterMetric;\r\n if (this.collected_component_counter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_component_counter_metrics.shift()\r\n }\r\n this.collected_component_counter_metrics.push(componentCounterMetric);\r\n };\r\n\r\n @computed\r\n get mpsSeries() {\r\n let mps = Object.assign({}, chartSeriesOpts,\r\n series(\"BPS\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mps_metrics.length; i++) {\r\n let metric: BPSMetric = this.collected_mps_metrics[i];\r\n labels.push(metric.ts);\r\n mps.data.push(metric.mps);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [mps],\r\n };\r\n }\r\n\r\n @computed\r\n get tipsSeries() {\r\n let totaltips = Object.assign({}, chartSeriesOpts,\r\n series(\"All tips\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_tips_metrics.length; i++) {\r\n let metric: TipsMetric = this.collected_tips_metrics[i];\r\n labels.push(metric.ts);\r\n totaltips.data.push(metric.totaltips);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [totaltips],\r\n };\r\n }\r\n\r\n @computed\r\n get componentSeries() {\r\n let stored = Object.assign({}, chartSeriesOpts,\r\n series(\"stored\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n let solidified = Object.assign({}, chartSeriesOpts,\r\n series(\"solidified\", 'rgba(165,209,253,1)', 'rgba(165,209,253,0.4)')\r\n );\r\n let scheduled = Object.assign({}, chartSeriesOpts,\r\n series(\"scheduled\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n let booked = Object.assign({}, chartSeriesOpts,\r\n series(\"booked\", 'rgba(5, 68, 94,1)', 'rgba(5, 68, 94,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_component_counter_metrics.length; i++) {\r\n let metric: ComponentCounterMetric = this.collected_component_counter_metrics[i];\r\n labels.push(metric.ts);\r\n stored.data.push(metric.store);\r\n solidified.data.push(metric.solidifier);\r\n scheduled.data.push(metric.scheduler);\r\n booked.data.push(metric.booker);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [stored, solidified, scheduled, booked],\r\n };\r\n }\r\n\r\n @computed\r\n get bufferSizeSeries() {\r\n let bufferSize = Object.assign({}, chartSeriesOpts,\r\n series(\"buffer size\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n bufferSize.data.push(metric.currentBufferSize);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [bufferSize],\r\n };\r\n }\r\n\r\n @computed\r\n get deficitSeries() {\r\n let deficit = Object.assign({}, chartSeriesOpts,\r\n series(\"deficit\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n deficit.data.push(metric.deficit);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [deficit],\r\n };\r\n }\r\n\r\n @computed\r\n get neighborsSeries() {\r\n return {};\r\n }\r\n\r\n @computed\r\n get uptime() {\r\n let day, hour, minute, seconds;\r\n seconds = Math.floor(this.status.uptime / 1000);\r\n minute = Math.floor(seconds / 60);\r\n seconds = seconds % 60;\r\n hour = Math.floor(minute / 60);\r\n minute = minute % 60;\r\n day = Math.floor(hour / 24);\r\n hour = hour % 24;\r\n let str = \"\";\r\n if (day == 1) {\r\n str += day + \" Day, \";\r\n }\r\n if (day > 1) {\r\n str += day + \" Days, \";\r\n }\r\n if (hour >= 0) {\r\n if (hour < 10) {\r\n str += \"0\" + hour + \":\";\r\n } else {\r\n str += hour + \":\";\r\n }\r\n }\r\n if (minute >= 0) {\r\n if (minute < 10) {\r\n str += \"0\" + minute + \":\";\r\n } else {\r\n str += minute + \":\";\r\n }\r\n }\r\n if (seconds >= 0) {\r\n if (seconds < 10) {\r\n str += \"0\" + seconds;\r\n } else {\r\n str += seconds;\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n @computed\r\n get memSeries() {\r\n let heapSys = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Sys\", 'rgba(168, 50, 76,1)', 'rgba(168, 50, 76,0.4)')\r\n );\r\n let heapAlloc = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Alloc\", 'rgba(222, 49, 87,1)', 'rgba(222, 49, 87,0.4)')\r\n );\r\n let heapIdle = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Idle\", 'rgba(222, 49, 182,1)', 'rgba(222, 49, 182,0.4)')\r\n );\r\n let heapReleased = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Released\", 'rgba(250, 76, 252,1)', 'rgba(250, 76, 252,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mem_metrics.length; i++) {\r\n let metric = this.collected_mem_metrics[i];\r\n labels.push(metric.ts);\r\n heapSys.data.push(metric.heap_sys);\r\n heapAlloc.data.push(metric.heap_alloc);\r\n heapIdle.data.push(metric.heap_idle);\r\n heapReleased.data.push(metric.heap_released);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [heapSys, heapAlloc, heapIdle, heapReleased],\r\n };\r\n }\r\n}\r\n\r\nexport default NodeStore;\r\n","import {action, observable} from 'mobx';\r\nimport {RouterStore} from \"mobx-react-router\";\r\n\r\nclass SendResult {\r\n BlkId: string;\r\n}\r\n\r\nenum QueryError {\r\n NotFound\r\n}\r\n\r\nexport class FaucetStore {\r\n // send request to faucet\r\n @observable send_addr: string = \"\";\r\n @observable send_access_mana_node_id: string = \"\";\r\n @observable send_consensus_mana_node_id: string = \"\";\r\n @observable sending: boolean = false;\r\n @observable sendResult: SendResult = null;\r\n @observable query_error: string = \"\";\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n }\r\n\r\n sendReq = async () => {\r\n this.updateSending(true);\r\n try {\r\n // send request\r\n let res = await fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);\r\n if (res.status !== 200) {\r\n this.updateQueryError(QueryError.NotFound);\r\n return;\r\n }\r\n let result: SendResult = await res.json();\r\n setTimeout(() => {\r\n this.updateSendResult(result);\r\n }, 2000);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n updateSendResult = (result: SendResult) => {\r\n this.sending = false;\r\n this.sendResult = result;\r\n this.routerStore.history.push(`/explorer/address/${this.send_addr}`);\r\n };\r\n\r\n @action\r\n updateSend = (send_addr: string) => {\r\n this.send_addr = send_addr;\r\n };\r\n\r\n @action\r\n updateSendAccessManaNodeID = (access_mana: string) => {\r\n this.send_access_mana_node_id = access_mana;\r\n }\r\n\r\n @action\r\n updateSendConsensusManaNodeID = (consensus_mana: string) => {\r\n this.send_consensus_mana_node_id = consensus_mana;\r\n }\r\n\r\n @action\r\n updateSending = (sending: boolean) => {\r\n this.sending = sending;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n reset = () => {\r\n this.send_addr = null;\r\n this.send_access_mana_node_id = \"\";\r\n this.send_consensus_mana_node_id = \"\";\r\n this.sending = false;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.sending = false;\r\n this.query_error = err;\r\n };\r\n}\r\n\r\nexport default FaucetStore;\r\n","import { action, observable, ObservableMap } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { default as Viva } from 'vivagraphjs';\r\nimport { Block } from './ExplorerStore';\r\n\r\nexport class Vertex {\r\n id: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n is_tip: boolean;\r\n is_blk_confirmed: boolean;\r\n is_tx_accepted: boolean;\r\n is_tx: boolean;\r\n}\r\n\r\nexport class TipInfo {\r\n id: string;\r\n is_tip: boolean;\r\n}\r\n\r\nclass history {\r\n vertices: Array;\r\n}\r\n\r\nconst COLOR = {\r\n BlockPending: \"#b9b7bd\",\r\n BlockConfirmed: \"#6c71c4\",\r\n TransactionPending: \"#393e46\",\r\n TransactionConfirmed: \"#fad02c\",\r\n Tip: \"#cb4b16\",\r\n Unknown: \"#b58900\",\r\n Line: \"#586e75\",\r\n SelectedPastConeLine: \"#e105f5\",\r\n SelectedFutureConeLine: \"#51e05d\",\r\n Selected: \"#859900\"\r\n}\r\n\r\nconst vertexSize = 20;\r\n\r\nexport class VisualizerStore {\r\n @observable vertices = new ObservableMap();\r\n @observable verticesLimit = 1500;\r\n @observable finalized_count = 0;\r\n @observable tips_count = 0;\r\n verticesIncomingOrder = [];\r\n draw: boolean = false;\r\n routerStore: RouterStore;\r\n\r\n // the currently selected vertex via hover\r\n @observable selected: Vertex;\r\n selected_via_click: boolean = false;\r\n selected_origin_color: number = 0;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n\r\n // viva graph objs\r\n graph;\r\n graphics;\r\n renderer;\r\n @observable paused: boolean = false;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Vertex, this.addVertex);\r\n registerHandler(WSMsgType.TipInfo, this.addTipInfo);\r\n registerHandler(WSMsgType.TXAccepted, this.updateTxStatus);\r\n // this.fetchHistory();\r\n }\r\n\r\n fetchHistory = async () => {\r\n try {\r\n let res = await fetch(`/api/visualizer/history`);\r\n let history: history = await res.json();\r\n history.vertices.forEach(v => {\r\n this.addVertex(v);\r\n });\r\n } catch (err) {\r\n console.log(\"Fail to fetch history in visualizer\", err);\r\n }\r\n return\r\n }\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search.trim();\r\n }\r\n\r\n @action\r\n searchAndHighlight = () => {\r\n this.clearSelected();\r\n if (!this.search) return;\r\n let iter: IterableIterator = this.vertices.keys();\r\n let found = null;\r\n for (const key of iter) {\r\n if (key.indexOf(this.search) >= 0) {\r\n found = key;\r\n break;\r\n }\r\n }\r\n if (!found) return;\r\n this.updateSelected(this.vertices.get(found), false);\r\n }\r\n\r\n @action\r\n pauseResume = () => {\r\n if (this.paused) {\r\n this.renderer.resume();\r\n this.paused = false;\r\n return;\r\n }\r\n this.renderer.pause();\r\n this.paused = true;\r\n }\r\n\r\n @action\r\n updateVerticesLimit = (num: number) => {\r\n this.verticesLimit = num;\r\n }\r\n\r\n @action\r\n updateTxStatus = (vert: Vertex) => { \r\n let existing = this.vertices.get(vert.id);\r\n if (!existing) {\r\n return\r\n }\r\n\r\n existing.is_tx_accepted = vert.is_tx_accepted;\r\n this.vertices.set(vert.id, existing);\r\n\r\n if (this.draw) {\r\n this.drawVertex(existing);\r\n }\r\n }\r\n\r\n @action\r\n addVertex = (vert: Vertex) => {\r\n let existing = this.vertices.get(vert.id);\r\n if (existing) {\r\n if (!existing.is_blk_confirmed && vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n } else {\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n this.verticesIncomingOrder.push(vert.id);\r\n this.checkLimit();\r\n }\r\n\r\n this.vertices.set(vert.id, vert);\r\n\r\n if (this.draw) {\r\n this.drawVertex(vert);\r\n }\r\n };\r\n\r\n @action\r\n addTipInfo = async (tipInfo: TipInfo) => {\r\n let v = this.vertices.get(tipInfo.id);\r\n if (!v) {\r\n v = new Vertex();\r\n v.id = tipInfo.id;\r\n\r\n // first seen as tip, get parents info\r\n let res = await fetch(`/api/block/${tipInfo.id}`);\r\n if (res.status === 200) {\r\n let blk: Block = await res.json();\r\n v.strongParents = blk.strongParents;\r\n v.weakParents = blk.weakParents;\r\n v.shallowLikedParents = blk.shallowLikedParents;\r\n v.is_blk_confirmed = blk.acceptance;\r\n }\r\n this.verticesIncomingOrder.push(v.id);\r\n }\r\n\r\n this.tips_count += tipInfo.is_tip ? 1 : v.is_tip ? -1 : 0;\r\n v.is_tip = tipInfo.is_tip;\r\n this.vertices.set(tipInfo.id, v);\r\n\r\n if (this.draw) {\r\n this.drawVertex(v);\r\n }\r\n };\r\n\r\n @action\r\n checkLimit = () => {\r\n while (this.verticesIncomingOrder.length > this.verticesLimit) {\r\n let deleteId = this.verticesIncomingOrder.shift();\r\n let vert = this.vertices.get(deleteId);\r\n // make sure we remove any markings if the vertex gets deleted\r\n if (this.selected && deleteId === this.selected.id) {\r\n this.clearSelected();\r\n }\r\n if (this.draw) {\r\n this.graph.removeNode(deleteId);\r\n }\r\n if (!vert) {\r\n continue;\r\n }\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count--;\r\n }\r\n if (vert.is_tip) {\r\n this.tips_count--;\r\n }\r\n this.vertices.delete(deleteId);\r\n }\r\n }\r\n\r\n drawVertex = (vert: Vertex) => {\r\n let node = this.graph.getNode(vert.id);\r\n if (node) {\r\n // update coloring\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n nodeUI.color = parseColor(this.colorForVertexState(vert));\r\n } else {\r\n node = this.graph.addNode(vert.id, vert);\r\n }\r\n\r\n if (vert.strongParents) {\r\n this.linkParents(vert, node, vert.strongParents)\r\n }\r\n\r\n if (vert.weakParents) {\r\n this.linkParents(vert, node, vert.weakParents)\r\n }\r\n\r\n if (vert.shallowLikedParents) {\r\n this.linkParents(vert, node, vert.shallowLikedParents)\r\n }\r\n }\r\n\r\n linkParents = (vert: Vertex, node: any, parents: Array) => {\r\n parents.forEach((value) => {\r\n // if value is valid AND (links is empty OR there is no between parent and children)\r\n if (value && ((!node.links || !node.links.some(link => link.fromId === value)))) {\r\n // draw the link only when the parent exists\r\n let parent = this.graph.getNode(value);\r\n if (parent) {\r\n this.graph.addLink(value, vert.id);\r\n } else {\r\n console.log(\"link not added, parent doesn't exist\", value);\r\n }\r\n }\r\n })\r\n }\r\n\r\n colorForVertexState = (vert: Vertex) => {\r\n if (!vert) {\r\n return COLOR.Unknown;\r\n }\r\n\r\n // finalized\r\n if (vert.is_blk_confirmed) {\r\n if (vert.is_tx) {\r\n if (vert.is_tx_accepted) {\r\n return COLOR.TransactionConfirmed;\r\n } else {\r\n return COLOR.TransactionPending;\r\n } \r\n }\r\n return COLOR.BlockConfirmed;\r\n }\r\n\r\n if (vert.is_tip) {\r\n return COLOR.Tip;\r\n }\r\n\r\n // pending\r\n if (vert.is_tx) {\r\n return COLOR.TransactionPending\r\n }\r\n return COLOR.BlockPending;\r\n }\r\n\r\n start = () => {\r\n this.draw = true;\r\n this.graph = Viva.Graph.graph();\r\n\r\n let graphics: any = Viva.Graph.View.webglGraphics();\r\n\r\n const layout = Viva.Graph.Layout.forceDirected(this.graph, {\r\n springLength: 10,\r\n springCoeff: 0.0001,\r\n stableThreshold: 0.15,\r\n gravity: -2,\r\n dragCoeff: 0.02,\r\n timeStep: 20,\r\n theta: 0.8,\r\n });\r\n\r\n graphics.node((node) => {\r\n if (!node.data) {\r\n return Viva.Graph.View.webglSquare(10, this.colorForVertexState(node.data));\r\n }\r\n return Viva.Graph.View.webglSquare(vertexSize, this.colorForVertexState(node.data));\r\n })\r\n graphics.link(() => Viva.Graph.View.webglLine(COLOR.Line));\r\n let ele = document.getElementById('visualizer');\r\n this.renderer = Viva.Graph.View.renderer(this.graph, {\r\n container: ele, graphics, layout,\r\n });\r\n\r\n let events = Viva.Graph.webglInputEvents(graphics, this.graph);\r\n\r\n events.mouseEnter((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data);\r\n }).mouseLeave((node) => {\r\n this.clearSelected(false);\r\n });\r\n\r\n events.click((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data, true);\r\n });\r\n\r\n this.graphics = graphics;\r\n this.renderer.run();\r\n\r\n // draw vertices by order\r\n this.verticesIncomingOrder.forEach((id) => {\r\n let v = this.vertices.get(id);\r\n if (v) {\r\n this.drawVertex(v);\r\n }\r\n })\r\n }\r\n\r\n stop = () => {\r\n this.draw = false;\r\n this.renderer.dispose();\r\n this.graph = null;\r\n this.paused = false;\r\n this.selected = null;\r\n }\r\n\r\n @action\r\n updateSelected = (vert: Vertex, viaClick?: boolean) => {\r\n if (!vert) return;\r\n\r\n this.selected = vert;\r\n this.selected_via_click = !!viaClick;\r\n\r\n // mutate links\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n this.selected_origin_color = nodeUI.color\r\n nodeUI.color = parseColor(COLOR.Selected);\r\n nodeUI.size = vertexSize * 1.5;\r\n\r\n let node = this.graph.getNode(vert.id);\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedFutureConeLine);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedPastConeLine);\r\n },\r\n seenForward\r\n );\r\n }\r\n\r\n resetLinks = () => {\r\n this.graph.forEachLink(function (link) {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n });\r\n }\r\n\r\n @action\r\n clearSelected = (force_clear?: boolean) => {\r\n if (!this.selected || (this.selected_via_click && !force_clear)) {\r\n return;\r\n }\r\n\r\n // clear link highlight\r\n let node = this.graph.getNode(this.selected.id);\r\n if (!node) {\r\n // clear links\r\n this.resetLinks();\r\n return;\r\n }\r\n\r\n let nodeUI = this.graphics.getNodeUI(this.selected.id);\r\n nodeUI.color = this.selected_origin_color;\r\n nodeUI.size = vertexSize;\r\n\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenForward\r\n );\r\n\r\n this.selected = null;\r\n this.selected_via_click = false;\r\n }\r\n\r\n}\r\n\r\nexport default VisualizerStore;\r\n\r\n// copied over and refactored from https://github.com/glumb/IOTAtangle\r\nfunction dfsIterator(graph, node, cb, up, cbLinks: any = false, seenNodes = []) {\r\n seenNodes.push(node);\r\n let pointer = 0;\r\n\r\n while (seenNodes.length > pointer) {\r\n const node = seenNodes[pointer++];\r\n\r\n if (cb(node)) return true;\r\n\r\n if (!node.links) {\r\n return\r\n }\r\n\r\n for (const link of node.links) {\r\n // parents\r\n if (!up && link.toId === node.id && !seenNodes.includes(graph.getNode(link.fromId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.fromId));\r\n continue;\r\n }\r\n\r\n // children\r\n if (up && link.fromId === node.id && !seenNodes.includes(graph.getNode(link.toId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.toId));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction parseColor(color): any {\r\n let parsedColor = 0x009ee8ff;\r\n\r\n if (typeof color === 'number') {\r\n return color;\r\n }\r\n\r\n if (typeof color === 'string' && color) {\r\n if (color.length === 4) {\r\n // #rgb, duplicate each letter except first #.\r\n color = color.replace(/([^#])/g, '$1$1');\r\n }\r\n if (color.length === 9) {\r\n // #rrggbbaa\r\n parsedColor = parseInt(color.substr(1), 16);\r\n } else if (color.length === 7) {\r\n // or #rrggbb.\r\n parsedColor = (parseInt(color.substr(1), 16) << 8) | 0xff;\r\n } else {\r\n throw 'Color expected in hex format with preceding \"#\". E.g. #00ff00. Got value: ' + color;\r\n }\r\n }\r\n\r\n return parsedColor;\r\n}\r\n","import {action, computed, observable} from 'mobx';\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Col, ListGroupItem, OverlayTrigger, Popover, Row} from \"react-bootstrap\";\nimport Plus from \"../../assets/plus.svg\";\nimport Minus from \"../../assets/minus.svg\";\nimport {displayManaUnit} from \"../utils\";\n\nclass ManaBlk {\n nodeID: string;\n access: number;\n consensus: number;\n // in s?\n time: number;\n}\n\nexport class Node {\n shortNodeID: string;\n nodeID: string;\n mana: number;\n}\n\nclass NetworkManaBlk {\n manaType: string;\n totalMana: number;\n nodes: Array;\n}\n\nexport class AllowedPledgeIDsBlk {\n accessFilter: PledgeIDFilter;\n consensusFilter: PledgeIDFilter;\n}\n\nexport class PledgeIDFilter {\n enabled: boolean;\n allowedNodeIDs: Array;\n}\n\nexport class AllowedNodeStr {\n shortID: string;\n fullID: string;\n}\n\nclass PledgeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass RevokeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass ManaEvent {\n nodeID: string;\n time: Date;\n txID: string;\n\n constructor(nodeID: string, time: Date, txID: string) {\n this.nodeID = nodeID;\n this.time = time;\n this.txID = txID;\n }\n}\n\nclass PledgeEvent extends ManaEvent{\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nclass RevokeEvent extends ManaEvent {\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nconst emptyRow = (\n There are no nodes to view with the current search parameters.\n)\nconst emptyListItem = (\n There are no events to view with the current search parameters.)\n\n// every 10 seconds, a new value arrives, so this is roughly 17 mins\nconst maxStoredManaValues = 100;\n// number of previous pledge/revoke events we keep track of. (/2 of plugins/dashboard/maxManaEventsBufferSize)\nconst maxEventsStored = 100;\n\nexport class ManaStore {\n // mana values\n @observable manaValues: Array = [];\n // first is accessm second consensus\n @observable prevManaValues: Array = [0,0];\n // list of richest access mana nodes in network, sorted in descending order\n @observable accessNetworkRichest: Array = [];\n @observable totalAccessNetwork: number = 0.0;\n // list of richest active access mana nodes in the network, sorted in descending order\n @observable accessActiveRichest: Array = [];\n @observable totalAccessActive: number = 0.0;\n // list of richest consensus mana nodes in their network, sorted in descending order\n @observable consensusNetworkRichest: Array = [];\n @observable totalConsensusNetwork: number = 0.0;\n // list of richest active consensus mana nodes in their network, sorted in descending order\n @observable consensusActiveRichest: Array = [];\n @observable totalConsensusActive: number = 0.0;\n\n @observable public searchNode = \"\";\n @observable public searchTxID = \"\";\n\n @observable public allowedPledgeIDs: AllowedPledgeIDsBlk;\n\n // internal arrays to store mana events\n accessEvents: Array = [];\n consensusEvents: Array = [];\n\n // internal arrays to store initial mana events\n initAccessEvents: Array = [];\n initConsensusEvents: Array = [];\n\n // info on latest removed events\n @observable lastRemovedAccessEventTime: Date = null;\n @observable lastRemovedConsensusEventTime: Date = null;\n\n lastInitRemovedAccessEventTime: Date = null;\n lastInitRemovedConsensusEventTime: Date = null;\n\n // only update displayed events when initial arrays were modified\n eventsUpdated: boolean = false;\n\n // mana events displayed in frontend\n @observable displayedAccessEvents: Array = [];\n @observable displayedConsensusEvents: Array = [];\n\n ownID: string;\n\n nodeNotSyncedListItem = (Wait for node to be synced to display mana events.);\n\n constructor() {\n this.manaValues = [];\n\n registerHandler(WSMsgType.Mana, this.addNewManaValue);\n registerHandler(WSMsgType.ManaMapOverall, this.updateNetworkRichest);\n registerHandler(WSMsgType.ManaMapOnline, this.updateActiveRichest);\n // registerHandler(WSMsgType.ManaAllowedPledge, this.updateAllowedPledgeIDs);\n // registerHandler(WSMsgType.ManaInitPledge, this.addNewInitPledge);\n // registerHandler(WSMsgType.ManaInitRevoke, this.addNewInitRevoke);\n // registerHandler(WSMsgType.ManaInitDone, this.initDone);\n // registerHandler(WSMsgType.ManaPledge, this.addNewPledge);\n // registerHandler(WSMsgType.ManaRevoke, this.addNewRevoke);\n };\n\n @action\n updateNodeSearch(searchNode: string): void {\n this.searchNode = searchNode.trim();\n }\n\n @action\n updateTxSearch(searchTxID: string): void {\n this.searchTxID = searchTxID.trim();\n }\n\n @action\n addNewManaValue = (manaBlk: ManaBlk) => {\n this.ownID = this.ownID? this.ownID : manaBlk.nodeID;\n if (this.manaValues.length === maxStoredManaValues) {\n // shift if we already have enough values\n this.manaValues.shift();\n }\n let newManaData = [new Date(manaBlk.time*1000), manaBlk.access, manaBlk.consensus];\n if (this.manaValues.length > 0){\n this.prevManaValues = [this.manaValues[this.manaValues.length -1][1] , this.manaValues[this.manaValues.length -1][2]]\n }\n this.manaValues.push(newManaData);\n }\n\n @action\n updateNetworkRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessNetwork = blk.totalMana;\n this.accessNetworkRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusNetwork = blk.totalMana;\n this.consensusNetworkRichest = blk.nodes;\n break;\n }\n }\n\n @action\n updateActiveRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessActive = blk.totalMana;\n this.accessActiveRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusActive = blk.totalMana;\n this.consensusActiveRichest = blk.nodes;\n break;\n }\n };\n\n @action\n updateAllowedPledgeIDs = (blk: AllowedPledgeIDsBlk) => {\n this.allowedPledgeIDs = blk;\n }\n\n @action\n addNewInitPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.initAccessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n }\n\n @action\n addNewPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.accessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n addNewInitRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n }\n\n @action\n addNewRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n initDone = () => {\n this.accessEvents = this.initAccessEvents;\n this.lastRemovedAccessEventTime = this.lastInitRemovedAccessEventTime;\n this.consensusEvents= this.initConsensusEvents;\n this.lastRemovedConsensusEventTime = this.lastInitRemovedConsensusEventTime;\n\n this.displayedAccessEvents = [...this.accessEvents]\n this.displayedConsensusEvents = [...this.consensusEvents]\n\n setInterval(() => {\n if (this.eventsUpdated) {\n this.displayedAccessEvents = [...this.accessEvents];\n this.displayedConsensusEvents = [...this.consensusEvents];\n this.eventsUpdated = false;\n }\n }, 500)\n }\n\n nodeList = (leaderBoard: Array, manaSum: number) => {\n if (leaderBoard === null || leaderBoard == undefined) {\n return []\n }\n let feed = [];\n let pushToFeed = (node: Node, i: number) => {\n feed.push(\n \n {i + 1} \n {node.shortNodeID}\n {displayManaUnit(node.mana)}\n {((node.mana / manaSum)*100.0).toFixed(2)}%\n \n );\n };\n let callback = (node: Node, i: number) => {\n if (this.passesNodeFilter(node.shortNodeID)){\n pushToFeed(node, i);\n }\n };\n leaderBoard.forEach(callback);\n return feed\n }\n\n @computed\n get networkRichestFeedAccess() {\n let result = this.nodeList(this.accessNetworkRichest, this.totalAccessNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get networkRichestFeedConsensus() {\n let result = this.nodeList(this.consensusNetworkRichest, this.totalConsensusNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedAccess() {\n let result = this.nodeList(this.accessActiveRichest, this.totalAccessActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedConsensus() {\n let result = this.nodeList(this.consensusActiveRichest, this.totalConsensusActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get accessHistogramInput() {\n if (this.accessNetworkRichest === undefined || this.accessNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.accessNetworkRichest.length; i++) {\n histInput.push(\n [this.accessNetworkRichest[i].shortNodeID, Math.log10(this.accessNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get consensusHistogramInput() {\n if (this.consensusNetworkRichest === undefined || this.consensusNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.consensusNetworkRichest.length; i++) {\n histInput.push(\n [this.consensusNetworkRichest[i].shortNodeID, Math.log10(this.consensusNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get accessPercentile() {\n let per = 0.0;\n // find id\n if (this.accessNetworkRichest !== undefined && this.accessNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.accessNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.accessNetworkRichest.length - (index + 1)) / this.accessNetworkRichest.length) * 100;\n break;\n }\n }\n return per\n }\n\n @computed\n get consensusPercentile() {\n let per = 0.0;\n // find id\n if ( this.consensusNetworkRichest !== undefined && this.consensusNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.consensusNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.consensusNetworkRichest.length - (index +1)) / this.consensusNetworkRichest.length) * 100;\n }\n }\n return per\n }\n\n computeEventList = (evArr: Array) => {\n let result = [];\n result.push(\n \n \n \n \n \n NodeID\n \n \n Tx ID\n \n \n Time\n \n \n \n )\n if (evArr === undefined || evArr === null) {\n return result\n }\n let pushToEventFeed = (element: ManaEvent, index) => {\n if (element instanceof PledgeEvent) {\n let popover = (ev: PledgeEvent) => {\n return (\n \n Mana Pledged\n \n
Base Mana: +{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
To NodeID: {ev.nodeID}
\n
Time of Pledge: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Plus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n } else if (element instanceof RevokeEvent){\n let popover = (ev: RevokeEvent) => {\n return (\n \n Mana Revoked\n \n
Base Mana 1: -{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
From NodeID: {ev.nodeID}
\n
Time of Revoke: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n // it's a revoke event then\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Minus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n }\n };\n // && this.passesTimeFilter(event.time) {\n let callback = (event: ManaEvent, i: number) => {\n if (this.passesNodeFilter(event.nodeID) && this.passesTxFilter(event.txID)){\n pushToEventFeed(event, i);\n }\n };\n // reverse traverse bc oldest event is the first\n evArr.reverse().forEach(callback)\n return result;\n }\n\n @computed\n get accessEventList() {\n let result = this.computeEventList(this.displayedAccessEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n @computed\n get consensusEventList() {\n let result = this.computeEventList(this.displayedConsensusEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n passesNodeFilter = (nodeID: string) : boolean => {\n if (this.searchNode.trim().length === 0) {\n // node filter is disabled, anything passes the filter\n return true;\n } else if (nodeID.toLowerCase().includes(this.searchNode.toLowerCase())){\n // node filter is enabled, nodeID contains search term\n return true;\n }\n // filter enabled but nodeID doesn't pass\n return false;\n }\n\n passesTxFilter = (txID: string) : boolean => {\n if (this.searchTxID.trim().length === 0) {\n // txID filter is disabled, anything passes the filter\n return true;\n } else if (txID.toLowerCase().includes(this.searchTxID.toLowerCase())){\n // txID filter is enabled, txID contains search term\n return true;\n }\n // filter enabled but txID doesn't pass\n return false;\n }\n}\n\nexport default ManaStore;\n","import {computed, action, observable} from \"mobx\";\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Link} from 'react-router-dom';\n\nconst liveFeedSize = 100;\n\nexport class SlotInfo {\n index: number;\n id: string;\n}\n\nexport class SlotStore {\n @observable liveFeed: Array = [];\n\n constructor() {\n registerHandler(WSMsgType.SlotInfo, this.addLiveFeed);\n }\n\n @action addLiveFeed = async (info: SlotInfo) => {\n if (this.liveFeed.findIndex((t) => t.id == info.id) === -1) {\n if (this.liveFeed.length >= liveFeedSize) {\n this.liveFeed.shift();\n }\n this.liveFeed.push(info);\n }\n }\n\n @computed\n get slotLiveFeed() {\n let feed = [];\n for (let i = this.liveFeed.length - 1; i >= 0; i--) {\n let info = this.liveFeed[i];\n feed.push(\n \n \n {info.index}\n \n \n \n {info.id}\n \n \n \n );\n }\n return feed;\n }\n}","import {action, computed, observable} from 'mobx';\r\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\r\nimport * as React from \"react\";\r\nimport {RouterStore,} from \"mobx-react-router\";\r\nimport {Link} from \"react-router-dom\";\r\nimport NodeStore from './NodeStore';\r\nimport {Table} from \"react-bootstrap\";\r\nimport {ConfirmationState, resolveConfirmationState} from \"../utils/confirmation_state\";\r\n\r\nexport class SpendSet {\r\n spendSetID: string;\r\n arrivalTime: number;\r\n resolved: boolean;\r\n timeToResolve: number;\r\n shown: boolean;\r\n}\r\n\r\nexport class Spend {\r\n spendID: string;\r\n spendSetIDs: Array;\r\n confirmationState: number;\r\n issuingTime: number;\r\n issuerNodeID: string;\r\n}\r\n\r\n// const liveFeedSize = 10;\r\n\r\nexport class SpendsStore {\r\n // live feed\r\n @observable spendSets: Map;\r\n @observable spends: Map;\r\n \r\n routerStore: RouterStore;\r\n nodeStore: NodeStore;\r\n\r\n constructor(routerStore: RouterStore, nodeStore: NodeStore) {\r\n this.routerStore = routerStore;\r\n this.nodeStore = nodeStore;\r\n this.spendSets = new Map;\r\n this.spends = new Map;\r\n registerHandler(WSMsgType.SpendSet, this.updateSpendSets);\r\n registerHandler(WSMsgType.Spend, this.updateSpends);\r\n }\r\n\r\n @action\r\n updateSpendSets = (blk: SpendSet) => {\r\n this.spendSets.set(blk.spendSetID, blk);\r\n };\r\n\r\n @action\r\n updateSpends = (blk: Spend) => {\r\n this.spends.set(blk.spendID, blk);\r\n };\r\n \r\n @computed\r\n get spendsLiveFeed() {\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let spendsArr = Array.from(this.spendSets.values());\r\n spendsArr.sort((x: SpendSet, y: SpendSet): number => {\r\n return y.arrivalTime - x.arrivalTime || x.spendSetID.localeCompare(y.spendSetID);\r\n }\r\n )\r\n\r\n let feed = [];\r\n for (let spend of spendsArr) {\r\n feed.push(\r\n spend.shown = !spend.shown} style={{cursor:\"pointer\"}}>\r\n \r\n \r\n {spend.spendSetID}\r\n \r\n \r\n \r\n {new Date(spend.arrivalTime * 1000).toLocaleString()}\r\n \r\n \r\n {spend.resolved ? 'Yes' : 'No'}\r\n \r\n \r\n {spend.timeToResolve/1000000}\r\n \r\n \r\n );\r\n\r\n // only render and show branches if it has been clicked\r\n if (!spend.shown) {\r\n continue\r\n }\r\n\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let branchesArr = Array.from(this.spends.values());\r\n branchesArr.sort((x: Spend, y: Spend): number => {\r\n return x.issuingTime - y.issuingTime || x.spendID.localeCompare(y.spendID)\r\n }\r\n )\r\n\r\n let branches = [];\r\n for (let branch of branchesArr) {\r\n for(let spendID of branch.spendSetIDs){\r\n if (spendID === spend.spendSetID) {\r\n branches.push(\r\n ConfirmationState.Accepted ? \"table-success\" : \"\"}>\r\n \r\n \r\n {branch.spendID}\r\n \r\n \r\n {resolveConfirmationState(branch.confirmationState)}\r\n {new Date(branch.issuingTime * 1000).toLocaleString()}\r\n {branch.issuerNodeID}\r\n \r\n );\r\n }\r\n }\r\n }\r\n feed.push(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {branches}\r\n \r\n
BranchIDConfirmationStateIssuingTimeIssuer NodeID
\r\n \r\n \r\n );\r\n }\r\n\r\n return feed;\r\n }\r\n\r\n}\r\n\r\nexport default SpendsStore;\r\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {Provider} from 'mobx-react';\nimport {createBrowserHistory} from 'history';\nimport 'chartjs-plugin-streaming';\nimport {App} from './app/App';\nimport {RouterStore, syncHistoryWithStore} from 'mobx-react-router';\nimport {Router} from 'react-router-dom';\nimport NodeStore from \"./app/stores/NodeStore\";\nimport ExplorerStore from \"./app/stores/ExplorerStore\";\nimport FaucetStore from \"./app/stores/FaucetStore\";\nimport VisualizerStore from \"./app/stores/VisualizerStore\";\nimport ManaStore from \"./app/stores/ManaStore\";\nimport {SlotStore} from \"./app/stores/SlotStore\";\nimport SpendsStore from \"./app/stores/SpendsStore\";\n\n// prepare MobX stores\nconst routerStore = new RouterStore();\nconst nodeStore = new NodeStore();\nconst explorerStore = new ExplorerStore(routerStore);\nconst spendsStore = new SpendsStore(routerStore, nodeStore);\nconst faucetStore = new FaucetStore(routerStore);\nconst visualizerStore = new VisualizerStore(routerStore);\nconst manaStore = new ManaStore();\nconst slotStore = new SlotStore();\nconst stores = {\n \"routerStore\": routerStore,\n \"nodeStore\": nodeStore,\n \"explorerStore\": explorerStore,\n \"spendsStore\": spendsStore,\n \"faucetStore\": faucetStore,\n \"visualizerStore\": visualizerStore,\n \"manaStore\": manaStore,\n \"slotStore\": slotStore\n};\n\nconst browserHistory = createBrowserHistory();\nconst history = syncHistoryWithStore(browserHistory, routerStore);\n\n// render react DOM\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js b/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js deleted file mode 100644 index 27ba7b96c..000000000 --- a/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgi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VEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2NnB4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NiA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},298:function(e,t,n){var r={"./af":107,"./af.js":107,"./ar":108,"./ar-dz":109,"./ar-dz.js":109,"./ar-kw":110,"./ar-kw.js":110,"./ar-ly":111,"./ar-ly.js":111,"./ar-ma":112,"./ar-ma.js":112,"./ar-sa":113,"./ar-sa.js":113,"./ar-tn":114,"./ar-tn.js":114,"./ar.js":108,"./az":115,"./az.js":115,"./be":116,"./be.js":116,"./bg":117,"./bg.js":117,"./bm":118,"./bm.js":118,"./bn":119,"./bn-bd":120,"./bn-bd.js":120,"./bn.js":119,"./bo":121,"./bo.js":121,"./br":122,"./br.js":122,"./bs":123,"./bs.js":123,"./ca":124,"./ca.js":124,"./cs":125,"./cs.js":125,"./cv":126,"./cv.js":126,"./cy":127,"./cy.js":127,"./da":128,"./da.js":128,"./de":129,"./de-at":130,"./de-at.js":130,"./de-ch":131,"./de-ch.js":131,"./de.js":129,"./dv":132,"./dv.js":132,"./el":133,"./el.js":133,"./en-au":134,"./en-au.js":134,"./en-ca":135,"./en-ca.js":135,"./en-gb":136,"./en-gb.js":136,"./en-ie":137,"./en-ie.js":137,"./en-il":138,"./en-il.js":138,"./en-in":139,"./en-in.js":139,"./en-nz":140,"./en-nz.js":140,"./en-sg":141,"./en-sg.js":141,"./eo":142,"./eo.js":142,"./es":143,"./es-do":144,"./es-do.js":144,"./es-mx":145,"./es-mx.js":145,"./es-us":146,"./es-us.js":146,"./es.js":143,"./et":147,"./et.js":147,"./eu":148,"./eu.js":148,"./fa":149,"./fa.js":149,"./fi":150,"./fi.js":150,"./fil":151,"./fil.js":151,"./fo":152,"./fo.js":152,"./fr":153,"./fr-ca":154,"./fr-ca.js":154,"./fr-ch":155,"./fr-ch.js":155,"./fr.js":153,"./fy":156,"./fy.js":156,"./ga":157,"./ga.js":157,"./gd":158,"./gd.js":158,"./gl":159,"./gl.js":159,"./gom-deva":160,"./gom-deva.js":160,"./gom-latn":161,"./gom-latn.js":161,"./gu":162,"./gu.js":162,"./he":163,"./he.js":163,"./hi":164,"./hi.js":164,"./hr":165,"./hr.js":165,"./hu":166,"./hu.js":166,"./hy-am":167,"./hy-am.js":167,"./id":168,"./id.js":168,"./is":169,"./is.js":169,"./it":170,"./it-ch":171,"./it-ch.js":171,"./it.js":170,"./ja":172,"./ja.js":172,"./jv":173,"./jv.js":173,"./ka":174,"./ka.js":174,"./kk":175,"./kk.js":175,"./km":176,"./km.js":176,"./kn":177,"./kn.js":177,"./ko":178,"./ko.js":178,"./ku":179,"./ku.js":179,"./ky":180,"./ky.js":180,"./lb":181,"./lb.js":181,"./lo":182,"./lo.js":182,"./lt":183,"./lt.js":183,"./lv":184,"./lv.js":184,"./me":185,"./me.js":185,"./mi":186,"./mi.js":186,"./mk":187,"./mk.js":187,"./ml":188,"./ml.js":188,"./mn":189,"./mn.js":189,"./mr":190,"./mr.js":190,"./ms":191,"./ms-my":192,"./ms-my.js":192,"./ms.js":191,"./mt":193,"./mt.js":193,"./my":194,"./my.js":194,"./nb":195,"./nb.js":195,"./ne":196,"./ne.js":196,"./nl":197,"./nl-be":198,"./nl-be.js":198,"./nl.js":197,"./nn":199,"./nn.js":199,"./oc-lnc":200,"./oc-lnc.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tk":223,"./tk.js":223,"./tl-ph":224,"./tl-ph.js":224,"./tlh":225,"./tlh.js":225,"./tr":226,"./tr.js":226,"./tzl":227,"./tzl.js":227,"./tzm":228,"./tzm-latn":229,"./tzm-latn.js":229,"./tzm.js":228,"./ug-cn":230,"./ug-cn.js":230,"./uk":231,"./uk.js":231,"./ur":232,"./ur.js":232,"./uz":233,"./uz-latn":234,"./uz-latn.js":234,"./uz.js":233,"./vi":235,"./vi.js":235,"./x-pseudo":236,"./x-pseudo.js":236,"./yo":237,"./yo.js":237,"./zh-cn":238,"./zh-cn.js":238,"./zh-hk":239,"./zh-hk.js":239,"./zh-mo":240,"./zh-mo.js":240,"./zh-tw":241,"./zh-tw.js":241};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=s,e.exports=a,a.id=298},434:function(e,t,n){"use strict";n.r(t);var r=n(1),a=n(24),s=n(6),l=n(25),o=(n(297),n(285)),i=n(56),c=n(39),p=n(12),d=n(11),u=n(9),m=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let h=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Uptime: ",this.props.nodeStore.uptime)}};h=m([Object(s.b)("nodeStore"),s.c],h);var f=h,b=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let g=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Version: ",this.props.nodeStore.status.version)}};g=b([Object(s.b)("nodeStore"),s.c],g);var y=g,E=n(15),v=n(29),I={elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0},k=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const x=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let S=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Blocks Per Second"),r.createElement("small",null,"BPS: ",this.props.nodeStore.last_mps_metric.mps,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.mpsSeries,options:x})))}};S=k([Object(s.b)("nodeStore"),s.c],S);var j=S,O=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const w=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let C=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Current Tips"),r.createElement("small",null,"Tips: ",this.props.nodeStore.last_tips_metric.totaltips,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.tipsSeries,options:w})))}};C=O([Object(s.b)("nodeStore"),s.c],C);var D=C,R=n(2),_=n(28),N=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const T=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return _(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${_(Math.abs(e.value))}`}}}},I);let P=class extends r.Component{render(){let e=this.props.nodeStore.status.mem;return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Memory Usage"," ",_(e.heap_alloc)),r.createElement("small",null,"GC Cycles: ",e.num_gc," (Last Cycle: ",e.last_pause_gc/1e6,"ms) - "," ","Heap: "," ","[Obj: ",e.heap_objects,", In-Use: ",_(e.heap_sys-e.heap_idle),", Retained: ",_(e.heap_idle-e.heap_released),"]"),r.createElement(v.Line,{height:50,data:this.props.nodeStore.memSeries,options:T})))}};P=N([Object(s.b)("nodeStore"),s.c],P);var M=P,L=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const A=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let B=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Component Counter Blocks Per Second"),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("small",null,"BPS: ",this.props.nodeStore.last_component_counter_metric.store,"."),r.createElement("small",null,"Rate Setter - Estimate: ",this.props.nodeStore.last_rate_setter_metric.estimate)),r.createElement(v.Line,{height:50,data:this.props.nodeStore.componentSeries,options:A})))}};B=L([Object(s.b)("nodeStore"),s.c],B);var z=B,H=n(14),F=n(20),V=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Z=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"TangleTime Synced: ",this.props.nodeStore.status.tangleTime.synced?"Yes":"No"),r.createElement("small",null,r.createElement("div",null,r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Accepted Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.acceptedBlockID},this.props.nodeStore.status.tangleTime.acceptedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.confirmedBlockID},this.props.nodeStore.status.tangleTime.confirmedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Slot:",this.props.nodeStore.status.tangleTime.confirmedSlot)),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Committed Slot:",this.props.nodeStore.status.tangleTime.committedSlot)),r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.ATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.CTT/1e6),"dd.mm.yyyy HH:MM:ss"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Relative Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Relative Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RCTT/1e6),"dd.mm.yyyy HH:MM:ss")))))))}};Z=V([Object(s.b)("nodeStore"),s.c],Z);var U=Z,W=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let J=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Bootstrapped: ",this.props.nodeStore.status.tangleTime.bootstrapped?"Yes":"No")}};J=W([Object(s.b)("nodeStore"),s.c],J);var G=J,q=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let X=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Dashboard"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Node: ",this.props.nodeStore.status.id),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(f,null)))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(G,null)))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement(R.a.Item,null,r.createElement(y,null))))))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(U,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(j,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(z,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(M,null))))}};X=q([Object(s.b)("nodeStore"),s.c],X);var Q=n(16),K=n(23),$=n(22),Y=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ee=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Address or Block ID","aria-label":"Address or Block ID","aria-describedby":"basic-addon1",value:e,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:t})))))}};ee=Y([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ee);var te=n(71),ne=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let re=class extends r.Component{render(){let{blksLiveFeed:e}=this.props.explorerStore;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Live Feed"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{height:"500px",overflow:"auto"}},r.createElement("h6",null,"Blocks"),r.createElement(te.a,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("td",null,"Id"),r.createElement("td",null,"Payload Type"))),r.createElement("tbody",null,e))))))))}};re=ne([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],re);var ae=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let se=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.txID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/transaction/"+this.txID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Transaction ID","aria-label":"Transaction ID","aria-describedby":"basic-addon1",value:this.txID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};se=ae([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],se);var le=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let oe=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.outputID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/output/"+this.outputID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Output ID","aria-label":"Output ID","aria-describedby":"basic-addon1",value:this.outputID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};oe=le([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],oe);var ie=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ce=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.conflictID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/conflict/"+this.conflictID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Conflict ID","aria-label":"Conflict ID","aria-describedby":"basic-addon1",value:this.conflictID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ce=ie([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ce);var pe=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let de=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("p",null,"Search for addresses, blocks, transactions, outputs and conflicts."))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(ee,null)),r.createElement(u.a,null,r.createElement(se,null))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(oe,null)),r.createElement(u.a,null,r.createElement(ce,null))),r.createElement(re,null),r.createElement("small",null,"This explorer implementation is heavily inspired by ",r.createElement("a",{href:"https://thetangle.org"},"thetangle.org"),"."))}};de=pe([Object(s.b)("nodeStore"),s.c],de);var ue=n(288),me=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let he=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(ue.a,{inline:!0,as:"div"},r.createElement(K.a,{type:"text",onChange:this.updateSearch,placeholder:"Search the Tangle...",value:e,className:" mr-sm-2",disabled:t,onKeyUp:this.executeSearch}))}};he=me([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],he);var fe,be=n(17),ge=n(44),ye=n(3);!function(e){e[e.Status=0]="Status",e[e.BPSMetrics=1]="BPSMetrics",e[e.Block=2]="Block",e[e.NeighborStats=3]="NeighborStats",e[e.ComponentCounterMetrics=4]="ComponentCounterMetrics",e[e.TipsMetrics=5]="TipsMetrics",e[e.Vertex=6]="Vertex",e[e.TXAccepted=7]="TXAccepted",e[e.TipInfo=8]="TipInfo",e[e.Mana=9]="Mana",e[e.ManaMapOverall=10]="ManaMapOverall",e[e.ManaMapOnline=11]="ManaMapOnline",e[e.BlkManaDashboardAddress=12]="BlkManaDashboardAddress",e[e.RateSetter=13]="RateSetter",e[e.ConflictSet=14]="ConflictSet",e[e.Conflict=15]="Conflict",e[e.SlotInfo=16]="SlotInfo"}(fe||(fe={}));let Ee={};function ve(e,t){Ee[e]=t}function Ie(e){delete Ee[e]}var ke,xe,Se,je;!function(e){e[e.TaggedData=0]="TaggedData",e[e.Transaction=1]="Transaction",e[e.Faucet=3]="Faucet"}(ke||(ke={}));class Oe{}class we{}function Ce(e){switch(e){case ke.TaggedData:return"TaggedData";case ke.Transaction:return"Transaction";case ke.Faucet:return"Faucet";default:return"Unknown"}}class De extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.token.id},r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",this.props.token.id),r.createElement(R.a.Item,null,"Amount: ",this.props.token.amount)))}}class Re extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.address},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address Type: ",this.props.unlock.address.type)),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",this.props.unlock.address.pubKeyHash)))}}class _e extends r.Component{render(){return this.props.unlock.unixTime&&r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.unixTime},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}class Ne extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(R.a.Item,null,"Amount: ",this.props.unlock.amount)))}}class Te extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(R.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}function Pe(e){switch(e.type){case xe.Address:case xe.StateControllerAddress:case xe.GovernorAddress:return r.createElement(Re,{unlock:e});case xe.StorageDepositReturn:return r.createElement(Ne,{unlock:e});case xe.Expiration:return r.createElement(Te,{unlock:e});case xe.Timelock:return r.createElement(_e,{unlock:e})}}!function(e){e[e.Address=0]="Address",e[e.StorageDepositReturn=1]="StorageDepositReturn",e[e.Timelock=2]="Timelock",e[e.Expiration=3]="Expiration",e[e.StateControllerAddress=4]="StateControllerAddress",e[e.GovernorAddress=5]="GovernorAddress",e[e.ImmutableAlias=6]="ImmutableAlias"}(xe||(xe={}));class Me extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.address},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",this.props.feature.address)))}}class Le extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.data},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Data: ",this.props.feature.data)))}}class Ae extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.tag},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Data: ",this.props.feature.tag)))}}function Be(e){switch(e.type){case Se.Sender:case Se.Issuer:return r.createElement(Me,{feature:e.feature});case Se.Metadata:return r.createElement(Le,{feature:e.feature});case Se.Tag:return r.createElement(Ae,{feature:e.feature})}}!function(e){e[e.Sender=0]="Sender",e[e.Issuer=1]="Issuer",e[e.Metadata=2]="Metadata",e[e.Tag=3]="Tag"}(Se||(Se={}));class ze extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: BasicOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class He extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,{style:{wordBreak:"break-word"}},r.createElement(R.a.Item,null,"Type: AliasOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"AliasID: ",this.props.output.aliasId),r.createElement(R.a.Item,null,"StateIndex: ",this.props.output.stateIndex),r.createElement(R.a.Item,null,"State Metadata: ",this.props.output.stateMetadata," "),r.createElement(R.a.Item,null,"Foundry Counter: ",this.props.output.foundryCounter),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Fe extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: FoundryOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"Serial Number: ",this.props.output.serialNumber),r.createElement(R.a.Item,null,"Token Scheme: ",this.props.output.tokenScheme),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Ve extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: FoundryOutput"),r.createElement(R.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(R.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(R.a.Item,null,"NFT ID: ",this.props.output.nftId),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(De,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(R.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(R.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}function Ze(e){let t=e.outputID;switch(e.type){case je.Basic:return r.createElement(ze,{output:e.output,id:t});case je.Alias:return r.createElement(He,{output:e.output,id:t});case je.Foundry:return r.createElement(Fe,{output:e.output,id:t});case je.NFT:return r.createElement(Ve,{output:e.output,id:t});default:return}}!function(e){e[e.Treasury=2]="Treasury",e[e.Basic=3]="Basic",e[e.Alias=4]="Alias",e[e.Foundry=5]="Foundry",e[e.NFT=6]="NFT"}(je||(je={}));var Ue=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},We=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};const Ge="1111111111111111111111111111111111111111111111111111111111111111";class qe{}var Xe;!function(e){e[e.NotFound=1]="NotFound",e[e.BadRequest=2]="BadRequest"}(Xe||(Xe={}));class Qe{constructor(e){this.latest_blocks=[],this.blk=null,this.addr=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.conflict=null,this.conflictChildren=null,this.conflictConflicts=null,this.conflictVoters=null,this.tips=null,this.slotInfo=new qe,this.query_loading=!1,this.query_err=null,this.search="",this.search_result=null,this.searching=!1,this.searchAny=()=>Je(this,void 0,void 0,(function*(){this.updateSearching(!0);try{let e=yield fetch("/api/search/"+this.search),t=yield e.json();this.updateSearchResult(t)}catch(e){this.updateQueryError(e)}})),this.resetSearch=()=>{this.search_result=null,this.searching=!1},this.updateSearchResult=e=>{this.search_result=e,this.searching=!1;let t=this.search;this.search="",this.search_result.block?this.routerStore.push("/explorer/block/"+t):this.search_result.address?this.routerStore.push("/explorer/address/"+t):this.routerStore.push("/explorer/404/"+t)},this.updateSearch=e=>{this.search=e},this.updateSearching=e=>this.searching=e,this.searchBlock=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/block/"+e);this.updateBlock(t)})),this.searchAddress=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/address/"+e);this.updateAddress(t)})),this.getSlotDetails=e=>Je(this,void 0,void 0,(function*(){yield this.getSlotInfo(e)})),this.getTransaction=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/transaction/"+e);for(let e=0;eJe(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/attachments`);this.txAttachments=t})),this.getTransactionMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/metadata`);this.txMetadata=t})),this.getOutput=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/output/"+e);this.output=t})),this.getOutputMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/metadata`);this.outputMetadata=t})),this.getOutputConsumers=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/consumers`);this.outputConsumers=t})),this.getPendingMana=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/mana/pending?OutputID="+e);this.pendingMana=t})),this.getConflict=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/conflict/"+e);this.conflict=t})),this.getConflictChildren=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/children`);this.conflictChildren=t})),this.getConflictConflicts=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/conflicts`);this.conflictConflicts=t})),this.getConflictVoters=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/conflict/${e}/voters`);this.conflictVoters=t})),this.getSlotInfo=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/slot/commitment/"+e);this.slotInfo=t})),this.getTips=()=>Je(this,void 0,void 0,(function*(){const e=yield this.fetchJson("get","/api/tips");this.tips=e})),this.reset=()=>{this.blk=null,this.query_err=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.conflict=null,this.conflictChildren=null,this.conflictConflicts=null,this.tips=null,this.slotInfo=new qe},this.updateAddress=e=>{this.addr=e,this.query_err=null,this.query_loading=!1},this.updateBlock=e=>{switch(this.blk=e,this.blk.spendIDs=this.blk.spendIDs?this.blk.spendIDs:[],this.blk.addedSpendIDs=this.blk.addedSpendIDs?this.blk.addedSpendIDs:[],this.blk.subtractedSpendIDs=this.blk.subtractedSpendIDs?this.blk.subtractedSpendIDs:[],this.blk.strongChildren=this.blk.strongChildren?this.blk.strongChildren:[],this.blk.weakChildren=this.blk.weakChildren?this.blk.weakChildren:[],this.blk.shallowLikeChildren=this.blk.shallowLikeChildren?this.blk.shallowLikeChildren:[],this.blk.strongParents=this.blk.strongParents?this.blk.strongParents:[],this.blk.weakParents=this.blk.weakParents?this.blk.weakParents:[],this.blk.shallowLikedParents=this.blk.shallowLikedParents?this.blk.shallowLikedParents:[],this.query_err=null,this.query_loading=!1,e.payloadType){case ke.Transaction:case ke.TaggedData:this.payload=e.payload;break;case ke.Faucet:this.payload=e.payload;default:this.payload=e.payload}},this.updateQueryLoading=e=>this.query_loading=e,this.updateQueryError=e=>{this.query_err=e,this.query_loading=!1,this.searching=!1},this.addLiveFeedBlock=e=>{-1===this.latest_blocks.findIndex(t=>t.id==e.id)&&(this.latest_blocks.length>=50&&this.latest_blocks.shift(),this.latest_blocks.push(e))},this.routerStore=e,ve(fe.Block,this.addLiveFeedBlock)}get blksLiveFeed(){let e=[];for(let t=this.latest_blocks.length-1;t>=0;t--){let n=this.latest_blocks[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id)),r.createElement("td",null,Ce(n.payload_type))))}return e}get tipsList(){let e=[];if(this.tips)for(let t=0;t=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let et=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,e.content_title,": "," ",e.content)))}};et=Ye([Object(s.b)("explorerStore"),s.c],et);var tt,nt=n(0),rt=n(282);!function(e){e[e.Ed25519=0]="Ed25519",e[e.BLS=1]="BLS"}(tt||(tt={}));class at extends r.Component{render(){let e=this.props.signature;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Public Key: ",e.publicKey),r.createElement(R.a.Item,null,"Signature: ",e.signature)))))}}class st extends r.Component{renderSignatureComponent(){switch(this.props.block.signatureType){case tt.Ed25519:return r.createElement(at,{signature:this.props.block.signature})}}render(){let e=this.props.block;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,"Index: ",r.createElement(Q.a,{variant:"primary"},this.props.key),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Type: ",e.type),e.signatureType&&r.createElement(R.a.Item,null,"Signature Type: ",function(e){switch(e){case tt.Ed25519:return"Ed25519 Signature";case tt.BLS:return"BLS Signature";default:return"Unknown Signature Type"}}(e.signatureType)),this.renderSignatureComponent())))}}const lt={maxHeight:"1000px",overflow:"auto",width:"47%",fontSize:"85%"};class ot extends r.Component{render(){let e=this.props.txID,t=this.props.tx;return t&&e&&r.createElement("div",null,r.createElement("h4",null,"Transaction"),r.createElement("p",null," ",e," "),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginTop:"10px",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Transaction Essence")),r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",r.createElement("a",{href:"/explorer/transaction/"+e}," ",e)),r.createElement(R.a.Item,null,"Network ID: ",t.networkId),r.createElement(R.a.Item,null,"Creation Time: ",t.creationSlot),r.createElement(R.a.Item,null,r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",{className:"align-self-start input-output-list",style:lt},r.createElement("span",null,"Inputs"),r.createElement("hr",null),t.inputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),r.createElement("div",{className:"mb-2",key:"input"+t},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Output ID: ",e.referencedOutputID.hex)))))),r.createElement(nt.b.Provider,{value:{color:"#00a0ff",size:"2em"}},r.createElement("div",null,r.createElement(rt.a,null))),r.createElement("div",{style:lt},r.createElement("span",null,"Outputs"),r.createElement("hr",null),t.outputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),Ze(e)))))),t.payload&&r.createElement(R.a.Item,null,"Data payload: ",t.payload)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Unlock Blocks")),r.createElement(r.Fragment,null,t.unlocks.map((e,t)=>r.createElement(st,{block:e,key:t}))))))}}var it=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ct=class extends r.Component{render(){let{payload:e,blk:t}=this.props.explorerStore,n=t.txId,a=e;return r.createElement(p.a,null,r.createElement(ot,{txID:n,tx:a}))}};function pt(e){switch(e){case dt:return"MasterConflictID";case ut:return"UndefinedConflictID";case mt:return"LazyBookedConflictsConflictID";case ht:return"InvalidConflictID";default:return e}}ct=it([Object(s.b)("explorerStore"),s.c],ct);const dt="4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM",ut="11111111111111111111111111111111",mt="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF",ht="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG";var ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let bt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Address: ",e.address),r.createElement(R.a.Item,null,"Access Mana Pledge ID: ",e.accessManaPledgeID),r.createElement(R.a.Item,null,"Consensus Mana Pledge ID: ",e.consensusManaPledgeID),r.createElement(R.a.Item,null,"Nonce: ",e.nonce)))))}};bt=ft([Object(s.b)("explorerStore"),s.c],bt);var gt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let yt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Tag: ",e.tag),r.createElement(R.a.Item,null,"Data: ",e.data)))))}};yt=gt([Object(s.b)("explorerStore"),s.c],yt);var Et=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let vt=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchBlock(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchBlock(this.props.match.params.id),null}getPayloadType(){return Ce(this.props.explorerStore.blk.payloadType)}renderPayload(){switch(this.props.explorerStore.blk.payloadType){case ke.Transaction:return this.props.explorerStore.blk.objectivelyInvalid?r.createElement(et,null):r.createElement(ct,null);case ke.TaggedData:return r.createElement(yt,null);case ke.Faucet:return r.createElement(bt,null);default:return r.createElement(et,null)}}render(){let{id:e}=this.props.match.params,{blk:t,query_loading:n,query_err:a}=this.props.explorerStore;return e===Ge?r.createElement(p.a,null,r.createElement("h3",null,"Genesis Block"),r.createElement("p",null,"In the beginning there was the genesis.")):a?r.createElement(p.a,null,r.createElement("h3",null,"Block not available - 404"),r.createElement("p",null,"Block with ID ",e," not found.")):r.createElement(p.a,null,r.createElement("h3",null,"Block"),r.createElement("p",null,e," "," ",t&&r.createElement(r.Fragment,null,r.createElement("br",null),r.createElement("span",null,r.createElement(Q.a,{variant:"light",style:{marginRight:10}},"Issuance Time: ",F(new Date(1e3*t.issuanceTimestamp),"dd.mm.yyyy HH:MM:ss")),r.createElement(Q.a,{variant:"light"},"Solidification Time: ",F(new Date(1e3*t.solidificationTimestamp),"dd.mm.yyyy HH:MM:ss"))))),t&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Payload Type: ",this.getPayloadType()),r.createElement(R.a.Item,null,"Sequence Number: ",t.sequenceNumber),r.createElement(R.a.Item,null,"spendIDs:",r.createElement(R.a,null,t.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"AddedspendIDs:",r.createElement(R.a,null,t.addedSpendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"AddedConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"SubtractedspendIDs:",r.createElement(R.a,null,t.subtractedSpendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"SubtractedConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"Solid: ",t.solid?"Yes":"No"),r.createElement(R.a.Item,null,"Scheduled: ",t.scheduled?"Yes":"No"),r.createElement(R.a.Item,null,"Booked: ",t.booked?"Yes":"No"),r.createElement(R.a.Item,null,"Orphaned: ",t.orphaned?"Yes":"No"),r.createElement(R.a.Item,null,"Objectively Invalid: ",t.objectivelyInvalid?"Yes":"No"),r.createElement(R.a.Item,null,"Subjectively Invalid: ",t.subjectivelyInvalid?"Yes":"No"),r.createElement(R.a.Item,null,"Acceptance: ",t.acceptance?"Yes":"No"),r.createElement(R.a.Item,null,"Acceptance Time: ",F(new Date(1e3*t.acceptanceTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(R.a.Item,null,"Confirmation: ",t.confirmation?"Yes":"No"),r.createElement(R.a.Item,null,"Confirmation Time: ",F(new Date(1e3*t.confirmationTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(R.a.Item,null,"Confirmation by slot: ",t.confirmationBySlot?"Yes":"No"),r.createElement(R.a.Item,null,"Confirmation by slot time: ",F(new Date(1e3*t.confirmationBySlotTime),"dd.mm.yyyy HH:MM:ss"))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Slot Commitment"),r.createElement(R.a,null,r.createElement(R.a.Item,null,"CommitmentID: ",t.commitmentID),r.createElement(R.a.Item,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"Index: ",t.commitment.index),r.createElement(R.a.Item,null,"prevID: ",t.commitment.prevID),r.createElement(R.a.Item,null,"rootsID: ",t.commitment.rootsID),r.createElement(R.a.Item,null,"Cumulative Weight: ",t.commitment.cumulativeWeight))),r.createElement(R.a.Item,null,"LatestConfirmedSlot: ",t.latestConfirmedSlot)))),!!t.rank&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Markers"),r.createElement(R.a,null,r.createElement(R.a.Item,null,"Rank: ",t.rank),r.createElement(R.a.Item,null,"SequenceID: ",t.sequenceID),r.createElement(R.a.Item,null,"PastMarkerGap: ",t.pastMarkerGap),r.createElement(R.a.Item,null,"IsPastMarker: ",t.isPastMarker?"Yes":"No"),r.createElement(R.a.Item,null,"Past markers: ",t.pastMarkers)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,r.createElement(R.a.Item,null,"IssuerID: ",t.issuerID),r.createElement(R.a.Item,{style:{overflow:"auto"}},"Block Signature: ",t.signature)))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.strongParents.map((e,n)=>r.createElement(R.a.Item,{key:"Strong Parent"+n+1,className:"text-break"},"Strong Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongParents[n]},t.strongParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.weakParents.map((e,n)=>r.createElement(R.a.Item,{key:"Weak Parent"+n+1,className:"text-break"},"Weak Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakParents[n]},t.weakParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.shallowLikedParents.map((e,n)=>r.createElement(R.a.Item,{key:"Shallow Liked Parent"+n+1,className:"text-break"},"Shallow Liked Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikedParents[n]},t.shallowLikedParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.strongChildren.map((e,n)=>r.createElement(R.a.Item,{key:"Strong Child"+n+1,className:"text-break"},"Strong Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongChildren[n]},t.strongChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.weakChildren.map((e,n)=>r.createElement(R.a.Item,{key:"Weak Child"+n+1,className:"text-break"},"Weak Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakChildren[n]},t.weakChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(R.a,null,t.shallowLikeChildren.map((e,n)=>r.createElement(R.a.Item,{key:"ShallowLike Child"+n+1,className:"text-break"},"ShallowLike Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikeChildren[n]},t.shallowLikeChildren[n])))))),r.createElement(d.a,{className:"mb-3",style:{marginTop:"20px",marginBottom:"20px"}},r.createElement(u.a,null,r.createElement("h3",null,"Payload"))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,this.renderPayload()))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};vt=Et([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],vt);var It=n(289);function kt(e){let t="",n=Math.round(e);return t=n<1e3?n.toString(10)+" m":n<1e6?(n/1e3).toFixed(3)+" Km":n<1e9?(n/1e6).toFixed(3)+" Mm":n<1e12?(n/1e9).toFixed(3)+" Gm":n<1e15?(n/1e12).toFixed(3)+" Tm":(n/1e15).toFixed(3)+" Pm",t}var xt=n(281),St=n(99),jt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ot=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchAddress(this.props.match.params.id)}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchAddress(this.props.match.params.id),null}render(){let{id:e}=this.props.match.params,{addr:t,query_loading:n,query_err:a}=this.props.explorerStore,s=[],l=[],o=[];if(a)return r.createElement(p.a,null,r.createElement("h3",null,"Address not available - 404"),r.createElement("p",null,"Address ",e," not found."));if(t){t.explorerOutputs.forEach(e=>{e.metadata.consumerCount>0?s.push(e):l.push(e)});let e=(e,t)=>t.txTimestamp===e.txTimestamp?t.id.transactionID==e.id.transactionID?t.id.outputIndex-e.id.outputIndex:t.id.transactionID.localeCompare(e.id.transactionID):t.txTimestamp-e.txTimestamp;l.sort(e),s.sort(e)}return r.createElement(p.a,null,r.createElement("h3",{style:{marginBottom:"40px"}},"Address ",r.createElement("strong",null,e)," ",null!==t&&r.createElement("span",null,"(",t.explorerOutputs.length," Outputs)")),null!==t?r.createElement(r.Fragment,null,null!==t.explorerOutputs&&100===t.explorerOutputs.length&&r.createElement(It.a,{variant:"warning"},"Max. 100 outputs are shown."),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:7},r.createElement(R.a,null,r.createElement("h4",null,"Available Balances"),0===o.length?"There are no balances currently available.":r.createElement("div",null,r.createElement(xt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:9},r.createElement("strong",null,"Color")),r.createElement(u.a,null,r.createElement("strong",null,"Balance")))),o)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement("h4",null,"Unspent Outputs"),0===l.length?"There are no unspent outputs currently available.":r.createElement("div",null,l.map(e=>r.createElement(wt,{output:e})))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush"},r.createElement("h4",null,"Spent Outputs"),0===s.length?"There are no spent outputs currently available.":r.createElement("div",null,s.map(e=>r.createElement(wt,{output:e}))))))):r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};Ot=jt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ot);class wt extends r.Component{constructor(e){super(e),this.state={enabled:!1}}render(){return r.createElement(R.a.Item,null,r.createElement(St.a,{variant:Dt(this.props.output.output.type),onClick:()=>{this.setState({enabled:!this.state.enabled})},block:!0},r.createElement(d.a,null,r.createElement(u.a,{xs:6,style:{textAlign:"left"}},this.props.output.id.base58," "),r.createElement(u.a,{style:{textAlign:"left"}},function(e){switch(e){case je.Basic:return"Basic Output";case je.Alias:return"Alias Output";case je.Foundry:return"Foundry Output";case je.NFT:return"NFT Output";default:return}}(this.props.output.output.type)," "),r.createElement(u.a,{style:{textAlign:"left"}},new Date(1e3*this.props.output.txTimestamp).toLocaleString()))),r.createElement(d.a,{style:{fontSize:"90%"}},r.createElement(u.a,null,this.state.enabled?Ze(this.props.output.output):null),r.createElement(u.a,null,this.state.enabled?r.createElement(Ct,{metadata:this.props.output.metadata,timestamp:this.props.output.txTimestamp,pendingMana:this.props.output.pendingMana}):null)))}}class Ct extends r.Component{render(){let e=this.props.metadata,t=this.props.timestamp,n=this.props.pendingMana;return r.createElement(R.a,null,"spendIDs:",r.createElement(R.a,null,e.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e))))),r.createElement(R.a.Item,null,"Pending mana: ",kt(n)),r.createElement(R.a.Item,null,"Timestamp: ",new Date(1e3*t).toLocaleString()),r.createElement(R.a.Item,null,"Consumer Count: ",e.consumerCount),e.confirmedConsumer&&r.createElement(R.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+e.confirmedConsumer},e.confirmedConsumer)," "))}}let Dt=e=>{switch(e){case je.Basic:case je.Alias:return"light";case je.Foundry:return"success";case je.NFT:return"info";default:return"danger"}};var Rt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let _t=class extends r.Component{render(){let{search:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer 404"),r.createElement("p",null,"The search via '",e,"' did not yield any results."))}};_t=Rt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],_t);var Nt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const Tt=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return _(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${_(Math.abs(e.value))}`}}}},I);let Pt=class extends r.Component{render(){let e=this.props.nodeStore.neighbor_metrics.get(this.props.identity),t=e.current;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,r.createElement("h5",null,t.id)),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,{variant:"flush",as:"small"},r.createElement(R.a.Item,null,"Origin:"," ",t.connection_origin))),r.createElement(u.a,null,r.createElement(R.a,{variant:"flush",as:"small"},r.createElement(R.a.Item,null,"Address: ",t.address)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h6",null,"Network (Tx/Rx)"),r.createElement(Q.a,{pill:!0,variant:"light"},"Total: ",t.packets_written," / ",t.packets_read)," ",r.createElement(Q.a,{pill:!0,variant:"light"},"Current: ",_(e.currentNetIO&&e.currentNetIO.tx)," / ",_(e.currentNetIO&&e.currentNetIO.rx)),r.createElement(v.Line,{height:30,data:e.netIOSeries,options:Tt})))))))}};Pt=Nt([Object(s.b)("nodeStore"),s.c],Pt);var Mt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Lt=class extends r.Component{render(){let e=[];return this.props.nodeStore.neighbor_metrics.forEach((t,n)=>{e.push(r.createElement(Pt,{key:n,identity:n}))}),r.createElement(p.a,null,r.createElement("h3",null,"Neighbors ",e.length>0&&r.createElement("span",null,"(",e.length,")")),r.createElement("p",null,"Currently connected neighbors."),e)}};Lt=Mt([Object(s.b)("nodeStore"),s.c],Lt);var At=n(57),Bt=n(103),zt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ht=class extends r.Component{constructor(){super(...arguments),this.updateVerticesLimit=e=>{this.props.visualizerStore.updateVerticesLimit(e.target.value)},this.pauseResumeVisualizer=e=>{this.props.visualizerStore.pauseResume()},this.updateSearch=e=>{this.props.visualizerStore.updateSearch(e.target.value)},this.searchAndHighlight=e=>{"Enter"===e.key&&this.props.visualizerStore.searchAndHighlight()},this.toggleBackgroundDataCollection=()=>{this.props.nodeStore.collecting?this.props.nodeStore.unregisterHandlers():this.props.nodeStore.registerHandlers()}}componentDidMount(){this.props.visualizerStore.start()}componentWillUnmount(){this.props.visualizerStore.stop(),this.props.nodeStore.registerHandlers()}render(){let{vertices:e,finalized_count:t,selected:n,verticesLimit:a,tips_count:s,paused:l,search:o}=this.props.visualizerStore,{last_mps_metric:i,collecting:c}=this.props.nodeStore;return r.createElement(p.a,null,r.createElement("h3",null,"Visualizer"),r.createElement(d.a,{className:"mb-1"},r.createElement(u.a,{xs:5},r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Vertices Limit")),r.createElement(K.a,{placeholder:"limit",type:"number",value:a.toString(),onChange:this.updateVerticesLimit,"aria-label":"vertices-limit","aria-describedby":"vertices-limit"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Search Vertex")),r.createElement(K.a,{placeholder:"search",type:"text",value:o,onChange:this.updateSearch,"aria-label":"vertices-search",onKeyUp:this.searchAndHighlight,"aria-describedby":"vertices-search"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Ensures that only data needed for the visualizer is collected."))},r.createElement(St.a,{variant:"outline-secondary",onClick:this.toggleBackgroundDataCollection,size:"sm"},c?"Stop Background Data Collection":"Collect Background data")),r.createElement("br",null)),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Pauses/resumes rendering the graph."))},r.createElement(St.a,{onClick:this.pauseResumeVisualizer,size:"sm",variant:"outline-secondary"},l?"Resume Rendering":"Pause Rendering")))),r.createElement(u.a,{xs:{span:5,offset:2}},r.createElement("p",null,r.createElement(Q.a,{pill:!0,style:{background:"#b9b7bd",color:"white"}},"BLK Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#6c71c4",color:"white"}},"BLK Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#393e46",color:"white"}},"TX Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#fad02c",color:"white"}},"TX Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#cb4b16",color:"white"}},"Tip")," ",r.createElement(Q.a,{pill:!0,style:{background:"#b58900",color:"white"}},"Unknown"),r.createElement("br",null),"Vertices: ",e.size,", Tips: ",s,", Confirmed/UnConfirmed: ",t,"/",e.size-t,","," ","BPS: ",i.mps,r.createElement("br",null),"Selected: ",n?r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id.substr(0,10)):"-",r.createElement("br",null),n?n.strongParents&&r.createElement("span",null," Strong:"," ",n.strongParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.weakParents&&r.createElement("span",null," Weak:"," ",n.weakParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.shallowLikedParents&&r.createElement("span",null," Shallow Liked:"," ",n.shallowLikedParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):""))),r.createElement("div",{className:"visualizer",style:{zIndex:-1,position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#ededed"},id:"visualizer"}))}};Ht=zt([Object(s.b)("visualizerStore"),Object(s.b)("nodeStore"),s.c],Ht);var Ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Vt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTips()}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{tipsList:e}=this.props.explorerStore;return r.createElement(p.a,null,r.createElement("h3",null,"Tips"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BlockID"))),r.createElement("tbody",null,e)))}};Vt=Ft([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Vt);var Zt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ut=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransaction(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,tx:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Transaction not available - 404"),r.createElement("p",null,"Transaction with ID ",e," not found.")):r.createElement(ot,{txID:e,tx:n})}};Ut=Zt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ut);var Wt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Jt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionMetadata(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,txMetadata:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Metadata"),r.createElement("p",null," Metadata for transaction ID ",e," not found.")):r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Metadata"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ConflictIDs:",r.createElement(R.a,null,n.conflictIDs&&n.conflictIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement("a",{href:"/explorer/transaction/"+e},e))))),r.createElement(R.a.Item,null,"Booked: ",n.booked.toString()),r.createElement(R.a.Item,null,"Confirmation State: ",n.confirmationState)))}};Jt=Wt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Jt);var Gt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let qt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionAttachments(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txAttachments:e}=this.props.explorerStore;return r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Attachments"),e&&e.blockIDs&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R.a,null,e.blockIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))}};qt=Gt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],qt);class Xt extends r.Component{render(){let{id:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement(Ut,{txId:e}),r.createElement(Jt,{txId:e}),r.createElement(qt,{txId:e}))}}var Qt;function Kt(e){switch(e){case Qt.Undefined:return"Undefined";case Qt.Rejected:return"Rejected";case Qt.Pending:return"Pending";case Qt.Accepted:return"Accepted";case Qt.Confirmed:return"Confirmed";default:return"Undefined Confirmation State"}}!function(e){e[e.Undefined=0]="Undefined",e[e.Rejected=1]="Rejected",e[e.Pending=2]="Pending",e[e.Accepted=3]="Accepted",e[e.Confirmed=4]="Confirmed"}(Qt||(Qt={}));var $t=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Yt=class extends r.Component{componentDidMount(){this.props.explorerStore.getOutput(this.props.match.params.id),this.props.explorerStore.getPendingMana(this.props.match.params.id),this.props.explorerStore.getOutputMetadata(this.props.match.params.id),this.props.explorerStore.getOutputConsumers(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,output:n,pendingMana:a,outputMetadata:s,outputConsumers:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Output not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Output"),n&&r.createElement("div",{className:"mb-2"},Ze(n),r.createElement(R.a,null,a&&r.createElement(R.a.Item,null,"Pending Mana",r.createElement("hr",null),r.createElement("div",null,"Value: ",kt(a.mana)),r.createElement("div",null,"Timestamp: ",new Date(1e3*a.timestamp).toLocaleString())))),r.createElement("h4",null,"Metadata"),s&&r.createElement("div",{className:"mb-2"},r.createElement(R.a,null,r.createElement(R.a.Item,null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+s.outputID.transactionID},s.outputID.transactionID)," "),"spendIDs:",r.createElement(R.a,null,s.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:"ConflictID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/conflict/"+e},pt(e))))),r.createElement(R.a.Item,null,"Consumer Count: ",s.consumerCount),r.createElement(R.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+s.confirmedConsumer},s.confirmedConsumer)," "),r.createElement(R.a.Item,null,"Confirmation State: ",Kt(s.confirmationState)),r.createElement(R.a.Item,null,"Confirmation State Time: ",new Date(1e3*s.confirmationStateTime).toLocaleString()))),r.createElement("h4",null,"Consumers"),l&&r.createElement("div",null,r.createElement(R.a,null,l.consumers.map((e,t)=>{return r.createElement(R.a.Item,{key:t},r.createElement("div",null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+e.transactionID},e.transactionID)),r.createElement("div",null,"Valid: ","true"===(n=e.valid)?r.createElement(Q.a,{variant:"success"},"True"):"false"===n?r.createElement(Q.a,{variant:"danger"},"False"):r.createElement(Q.a,{variant:"warning"},"Maybe")," "));var n}))))}};Yt=$t([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Yt);var en=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let tn=class extends r.Component{componentDidMount(){this.props.explorerStore.getConflict(this.props.match.params.id),this.props.explorerStore.getConflictChildren(this.props.match.params.id),this.props.explorerStore.getConflictConflicts(this.props.match.params.id),this.props.explorerStore.getConflictVoters(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,conflict:n,conflictChildren:a,conflictConflicts:s,conflictVoters:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Conflict not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Conflict"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",pt(n.id)),r.createElement(R.a.Item,null,"Parents:",r.createElement(R.a,null,n.parents.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e},pt(e)))))),r.createElement(R.a.Item,null,"Conflicts:",n.spendIDs&&r.createElement(R.a,null,n.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))),r.createElement(R.a.Item,null,"ConfirmationState: ",Kt(n.confirmationState)),r.createElement(R.a.Item,null," Children:",a&&r.createElement(R.a,null,a.childConflicts.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e.conflictID},pt(e.conflictID)))))),r.createElement(R.a.Item,null," Conflicts:",s&&r.createElement(R.a,null,s.conflicts.map((e,t)=>r.createElement("div",{key:t},"OutputID: ",r.createElement("a",{href:"/explorer/output/"+e.outputID.base58},e.outputID.base58),r.createElement(R.a,{className:"mb-2"},e.spendIDs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/conflict/"+e},pt(e))))))))),r.createElement(R.a.Item,null," Voters:",l&&r.createElement(R.a,null,l.voters.map((e,t)=>r.createElement(R.a.Item,{key:e+t},e))))))}};tn=en([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],tn);var nn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let rn=class extends r.Component{render(){let{slotLiveFeed:e}=this.props.slotStore;return r.createElement(p.a,null,r.createElement("h3",null,"Slots"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Index"),r.createElement("th",null,"Commitment ID"))),r.createElement("tbody",null,e)))}};rn=nn([Object(s.b)("nodeStore"),Object(s.b)("slotStore"),s.c],rn);var an=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let sn=class extends r.Component{componentDidMount(){const e=this.props.match.params.commitment;this.props.explorerStore.getSlotDetails(e)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{commitment:e}=this.props.match.params,{query_err:t,slotInfo:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Slot not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Slot"),n&&r.createElement(R.a,null,r.createElement(R.a.Item,null,"ID: ",e),r.createElement(R.a.Item,null,"Index: ",n.index),r.createElement(R.a.Item,null,"RootsID: ",n.rootsID),r.createElement(R.a.Item,null,"PrevEC: ",n.prevID),r.createElement(R.a.Item,null,"Cumulative Weight: ",n.cumulativeWeight),r.createElement(R.a.Item,null,"Blocks:",n.blocks&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.blocks.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))))),r.createElement(R.a.Item,null,"Transactions:",n.transactions&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.transactions.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/transaction/"+e},e)))))))))),r.createElement(R.a.Item,null," Created outputs:",n.createdOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.createdOutputs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e)))))))))),r.createElement(R.a.Item,null," Spent outputs:",n.spentOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.spentOutputs.map((e,t)=>r.createElement(R.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))))))))))}};sn=an([Object(s.b)("explorerStore"),s.c],sn);var ln=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let on=class extends r.Component{renderDevTool(){0}componentDidMount(){this.props.nodeStore.connect()}render(){return r.createElement("div",{className:"container"},r.createElement(i.a,{expand:"lg",bg:"light",variant:"light",className:"mb-4"},r.createElement(i.a.Brand,null,"iota-core"),r.createElement(c.a,{className:"mr-auto"},r.createElement(ge.LinkContainer,{to:"/dashboard"},r.createElement(c.a.Link,null,"Dashboard")),r.createElement(ge.LinkContainer,{to:"/neighbors"},r.createElement(c.a.Link,null,"Neighbors")),r.createElement(ge.LinkContainer,{to:"/explorer"},r.createElement(c.a.Link,null,"Explorer")),r.createElement(ge.LinkContainer,{to:"/visualizer"},r.createElement(c.a.Link,null,"Visualizer")),r.createElement(ge.LinkContainer,{to:"/slots"},r.createElement(c.a.Link,null,"Slot")),r.createElement(ge.LinkContainer,{to:"/tips"},r.createElement(c.a.Link,null,"Tips"))),r.createElement(i.a.Collapse,{className:"justify-content-end"},r.createElement(he,null),r.createElement(i.a.Text,null,!this.props.nodeStore.websocketConnected&&r.createElement(Q.a,{variant:"danger"},"WS not connected!")))),r.createElement(be.g,null,r.createElement(be.d,{exact:!0,path:"/dashboard",component:X}),r.createElement(be.d,{exact:!0,path:"/neighbors",component:Lt}),r.createElement(be.d,{exact:!0,path:"/explorer/block/:id",component:vt}),r.createElement(be.d,{exact:!0,path:"/explorer/address/:id",component:Ot}),r.createElement(be.d,{exact:!0,path:"/explorer/transaction/:id",component:Xt}),r.createElement(be.d,{exact:!0,path:"/explorer/output/:id",component:Yt}),r.createElement(be.d,{exact:!0,path:"/explorer/conflict/:id",component:tn}),r.createElement(be.d,{exact:!0,path:"/explorer/slot/commitment/:commitment",component:sn}),r.createElement(be.d,{exact:!0,path:"/explorer/404/:search",component:_t}),r.createElement(be.d,{exact:!0,path:"/slots",component:rn}),r.createElement(be.d,{exact:!0,path:"/tips",component:Vt}),r.createElement(be.d,{exact:!0,path:"/explorer",component:de}),r.createElement(be.d,{exact:!0,path:"/visualizer",component:Ht}),r.createElement(be.d,{exact:!0,path:"/visualizer/history",component:Ht}),r.createElement(be.c,{to:"/dashboard"})),this.props.children,this.renderDevTool())}};on=ln([Object(s.b)("nodeStore"),Object(s.b)("routerStore"),s.c],on);const cn=Object(o.hot)(({history:e})=>r.createElement(on,{history:e}));var pn=n(102),dn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},un=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class mn{}class hn{constructor(){this.mem=new bn,this.scheduler=new En}}class fn{}class bn{}class gn{}class yn{}class En{}class vn{constructor(){this.collected=[],this.network_io=[]}addMetric(e){e.ts=F(Date.now(),"HH:MM:ss"),this.collected.push(e),this.collected.length>Sn&&this.collected.shift();let t=this.currentNetIO;t&&(this.network_io.length>Sn&&this.network_io.shift(),this.network_io.push(t))}get current(){return this.collected[this.collected.length-1]}get secondLast(){let e=this.collected.length-2;if(!(e<0))return this.collected[e]}get currentNetIO(){return this.current&&this.secondLast?{tx:this.current.packets_written-this.secondLast.packets_written,rx:this.current.packets_read-this.secondLast.packets_read,ts:F(new Date,"HH:MM:ss")}:null}get netIOSeries(){let e=Object.assign({},kn,xn("Tx","rgba(53, 180, 219,1)","rgba(53, 180, 219,0.4)")),t=Object.assign({},kn,xn("Rx","rgba(235, 134, 52)","rgba(235, 134, 52,0.4)")),n=[];for(let r=0;r{ve(fe.Status,this.updateStatus),ve(fe.BPSMetrics,e=>{this.addBPSMetric(this.updateLastBPSMetric(e))}),ve(fe.NeighborStats,this.updateNeighborMetrics),ve(fe.TipsMetrics,this.updateLastTipsMetric),ve(fe.ComponentCounterMetrics,this.updateLastComponentMetric),ve(fe.RateSetter,this.updateLastRateSetterMetric),this.updateCollecting(!0)},this.unregisterHandlers=()=>{Ie(fe.Status),Ie(fe.BPSMetrics),Ie(fe.NeighborStats),Ie(fe.TipsMetrics),Ie(fe.ComponentCounterMetrics),Ie(fe.RateSetter),this.updateCollecting(!1)},this.updateCollecting=e=>{this.collecting=e},this.updateWebSocketConnected=e=>this.websocketConnected=e,this.updateStatus=e=>{e.mem.ts=F(Date.now(),"HH:MM:ss"),this.collected_mem_metrics.length>Sn&&this.collected_mem_metrics.shift(),this.collected_mem_metrics.push(e.mem),this.status=e,e.scheduler.ts=F(Date.now(),"HH:MM:ss"),this.collected_scheduler_metrics.length>Sn&&this.collected_scheduler_metrics.shift(),this.collected_scheduler_metrics.push(e.scheduler)},this.updateNeighborMetrics=e=>{if(!e)return;let t=[];for(let n=0;n{e.ts=F(Date.now(),"HH:MM:ss"),this.last_rate_setter_metric=e,this.collected_rate_setter_metrics.length>Sn&&this.collected_rate_setter_metrics.shift(),this.collected_rate_setter_metrics.push(e)},this.updateLastBPSMetric=e=>{let t=new mn;return t.mps=e,t.ts=F(Date.now(),"HH:MM:ss"),this.last_mps_metric=t,t},this.addBPSMetric=e=>{this.collected_mps_metrics.length>Sn&&this.collected_mps_metrics.shift(),this.collected_mps_metrics.push(e)},this.updateLastTipsMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_tips_metric=e,this.collected_tips_metrics.length>Sn&&this.collected_tips_metrics.shift(),this.collected_tips_metrics.push(e)},this.updateLastComponentMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_component_counter_metric=e,this.collected_component_counter_metrics.length>Sn&&this.collected_component_counter_metrics.shift(),this.collected_component_counter_metrics.push(e)},this.status.tangleTime=new fn,this.status.tangleTime.ATT=0,this.status.tangleTime.RATT=0,this.status.tangleTime.CTT=0,this.status.tangleTime.RCTT=0,this.registerHandlers()}reset(){this.collected_mps_metrics=[],this.collected_mem_metrics=[],this.collected_scheduler_metrics=[],this.neighbor_metrics=new ye.ObservableMap,this.collected_tips_metrics=[],this.collected_component_counter_metrics=[]}reconnect(){this.updateWebSocketConnected(!1),setTimeout(()=>{this.connect()},5e3)}connect(){!function(e,t,n,r){let a=window.location,s="ws:";"https:"===a.protocol&&(s="wss:"),s+="//"+a.host+e;let l=new WebSocket(s);l.onopen=t,l.onclose=n,l.onerror=r,l.onmessage=e=>{let t=JSON.parse(e.data),n=Ee[t.type];n&&n(t.data)}}("/ws",()=>this.updateWebSocketConnected(!0),()=>this.reconnect(),()=>this.updateWebSocketConnected(!1))}get mpsSeries(){let e=Object.assign({},kn,xn("BPS","rgba(67, 196, 99,1)","rgba(67, 196, 99,0.4)")),t=[];for(let n=0;n1&&(a+=e+" Days, "),t>=0&&(a+=t<10?"0"+t+":":t+":"),n>=0&&(a+=n<10?"0"+n+":":n+":"),r>=0&&(a+=r<10?"0"+r:r),a}get memSeries(){let e=Object.assign({},kn,xn("Heap Sys","rgba(168, 50, 76,1)","rgba(168, 50, 76,0.4)")),t=Object.assign({},kn,xn("Heap Alloc","rgba(222, 49, 87,1)","rgba(222, 49, 87,0.4)")),n=Object.assign({},kn,xn("Heap Idle","rgba(222, 49, 182,1)","rgba(222, 49, 182,0.4)")),r=Object.assign({},kn,xn("Heap Released","rgba(250, 76, 252,1)","rgba(250, 76, 252,0.4)")),a=[];for(let s=0;s=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Dn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rn=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};!function(e){e[e.NotFound=0]="NotFound"}(On||(On={}));class _n{constructor(e){this.send_addr="",this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.sendResult=null,this.query_error="",this.sendReq=()=>Rn(this,void 0,void 0,(function*(){this.updateSending(!0);try{let e=yield fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);if(200!==e.status)return void this.updateQueryError(On.NotFound);let t=yield e.json();setTimeout(()=>{this.updateSendResult(t)},2e3)}catch(e){this.updateQueryError(e)}})),this.updateSendResult=e=>{this.sending=!1,this.sendResult=e,this.routerStore.history.push("/explorer/address/"+this.send_addr)},this.updateSend=e=>{this.send_addr=e},this.updateSendAccessManaNodeID=e=>{this.send_access_mana_node_id=e},this.updateSendConsensusManaNodeID=e=>{this.send_consensus_mana_node_id=e},this.updateSending=e=>{this.sending=e,this.query_error=""},this.reset=()=>{this.send_addr=null,this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.query_error=""},this.updateQueryError=e=>{this.sending=!1,this.query_error=e},this.routerStore=e}}Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_addr",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_access_mana_node_id",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"send_consensus_mana_node_id",void 0),Cn([ye.observable,Dn("design:type",Boolean)],_n.prototype,"sending",void 0),Cn([ye.observable,Dn("design:type",class{})],_n.prototype,"sendResult",void 0),Cn([ye.observable,Dn("design:type",String)],_n.prototype,"query_error",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendResult",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSend",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendAccessManaNodeID",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSendConsensusManaNodeID",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateSending",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"reset",void 0),Cn([ye.action,Dn("design:type",Object)],_n.prototype,"updateQueryError",void 0);var Nn=_n,Tn=n(35),Pn=n.n(Tn),Mn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Ln=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},An=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class Bn{}const zn="#b9b7bd",Hn="#6c71c4",Fn="#393e46",Vn="#fad02c",Zn="#cb4b16",Un="#b58900",Wn="#586e75",Jn="#e105f5",Gn="#51e05d",qn="#859900";class Xn{constructor(e){this.vertices=new ye.ObservableMap,this.verticesLimit=1500,this.finalized_count=0,this.tips_count=0,this.verticesIncomingOrder=[],this.draw=!1,this.selected_via_click=!1,this.selected_origin_color=0,this.search="",this.paused=!1,this.fetchHistory=()=>An(this,void 0,void 0,(function*(){try{let e=yield fetch("/api/visualizer/history");(yield e.json()).vertices.forEach(e=>{this.addVertex(e)})}catch(e){console.log("Fail to fetch history in visualizer",e)}})),this.updateSearch=e=>{this.search=e.trim()},this.searchAndHighlight=()=>{if(this.clearSelected(),!this.search)return;let e=this.vertices.keys(),t=null;for(const n of e)if(n.indexOf(this.search)>=0){t=n;break}t&&this.updateSelected(this.vertices.get(t),!1)},this.pauseResume=()=>{if(this.paused)return this.renderer.resume(),void(this.paused=!1);this.renderer.pause(),this.paused=!0},this.updateVerticesLimit=e=>{this.verticesLimit=e},this.updateTxStatus=e=>{let t=this.vertices.get(e.id);t&&(t.is_tx_accepted=e.is_tx_accepted,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t))},this.addVertex=e=>{let t=this.vertices.get(e.id);t?!t.is_blk_confirmed&&e.is_blk_confirmed&&this.finalized_count++:(e.is_blk_confirmed&&this.finalized_count++,this.verticesIncomingOrder.push(e.id),this.checkLimit()),this.vertices.set(e.id,e),this.draw&&this.drawVertex(e)},this.addTipInfo=e=>An(this,void 0,void 0,(function*(){let t=this.vertices.get(e.id);if(!t){t=new Bn,t.id=e.id;let n=yield fetch("/api/block/"+e.id);if(200===n.status){let e=yield n.json();t.strongParents=e.strongParents,t.weakParents=e.weakParents,t.shallowLikedParents=e.shallowLikedParents,t.is_blk_confirmed=e.acceptance}this.verticesIncomingOrder.push(t.id)}this.tips_count+=e.is_tip?1:t.is_tip?-1:0,t.is_tip=e.is_tip,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t)})),this.checkLimit=()=>{for(;this.verticesIncomingOrder.length>this.verticesLimit;){let e=this.verticesIncomingOrder.shift(),t=this.vertices.get(e);this.selected&&e===this.selected.id&&this.clearSelected(),this.draw&&this.graph.removeNode(e),t&&(t.is_blk_confirmed&&this.finalized_count--,t.is_tip&&this.tips_count--,this.vertices.delete(e))}},this.drawVertex=e=>{let t=this.graph.getNode(e.id);if(t){this.graphics.getNodeUI(e.id).color=$n(this.colorForVertexState(e))}else t=this.graph.addNode(e.id,e);e.strongParents&&this.linkParents(e,t,e.strongParents),e.weakParents&&this.linkParents(e,t,e.weakParents),e.shallowLikedParents&&this.linkParents(e,t,e.shallowLikedParents)},this.linkParents=(e,t,n)=>{n.forEach(n=>{if(n&&(!t.links||!t.links.some(e=>e.fromId===n))){this.graph.getNode(n)?this.graph.addLink(n,e.id):console.log("link not added, parent doesn't exist",n)}})},this.colorForVertexState=e=>e?e.is_blk_confirmed?e.is_tx?e.is_tx_accepted?Vn:Fn:Hn:e.is_tip?Zn:e.is_tx?Fn:zn:Un,this.start=()=>{this.draw=!0,this.graph=Pn.a.Graph.graph();let e=Pn.a.Graph.View.webglGraphics();const t=Pn.a.Graph.Layout.forceDirected(this.graph,{springLength:10,springCoeff:1e-4,stableThreshold:.15,gravity:-2,dragCoeff:.02,timeStep:20,theta:.8});e.node(e=>e.data?Pn.a.Graph.View.webglSquare(20,this.colorForVertexState(e.data)):Pn.a.Graph.View.webglSquare(10,this.colorForVertexState(e.data))),e.link(()=>Pn.a.Graph.View.webglLine(Wn));let n=document.getElementById("visualizer");this.renderer=Pn.a.Graph.View.renderer(this.graph,{container:n,graphics:e,layout:t});let r=Pn.a.Graph.webglInputEvents(e,this.graph);r.mouseEnter(e=>{this.clearSelected(!0),this.updateSelected(e.data)}).mouseLeave(e=>{this.clearSelected(!1)}),r.click(e=>{this.clearSelected(!0),this.updateSelected(e.data,!0)}),this.graphics=e,this.renderer.run(),this.verticesIncomingOrder.forEach(e=>{let t=this.vertices.get(e);t&&this.drawVertex(t)})},this.stop=()=>{this.draw=!1,this.renderer.dispose(),this.graph=null,this.paused=!1,this.selected=null},this.updateSelected=(e,t)=>{if(!e)return;this.selected=e,this.selected_via_click=!!t;let n=this.graphics.getNodeUI(e.id);this.selected_origin_color=n.color,n.color=$n(qn),n.size=30;let r=this.graph.getNode(e.id);Kn(this.graph,r,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Gn)},[]),Kn(this.graph,r,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Jn)},[])},this.resetLinks=()=>{this.graph.forEachLink((function(e){this.graphics.getLinkUI(e.id).color=$n(Wn)}))},this.clearSelected=e=>{if(!this.selected||this.selected_via_click&&!e)return;let t=this.graph.getNode(this.selected.id);if(!t)return void this.resetLinks();let n=this.graphics.getNodeUI(this.selected.id);n.color=this.selected_origin_color,n.size=20;Kn(this.graph,t,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),Kn(this.graph,t,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),this.selected=null,this.selected_via_click=!1},this.routerStore=e,ve(fe.Vertex,this.addVertex),ve(fe.TipInfo,this.addTipInfo),ve(fe.TXAccepted,this.updateTxStatus)}}Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"vertices",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"verticesLimit",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"finalized_count",void 0),Mn([ye.observable,Ln("design:type",Object)],Xn.prototype,"tips_count",void 0),Mn([ye.observable,Ln("design:type",Bn)],Xn.prototype,"selected",void 0),Mn([ye.observable,Ln("design:type",String)],Xn.prototype,"search",void 0),Mn([ye.observable,Ln("design:type",Boolean)],Xn.prototype,"paused",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateSearch",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"searchAndHighlight",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"pauseResume",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateVerticesLimit",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateTxStatus",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"addVertex",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"addTipInfo",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"checkLimit",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"updateSelected",void 0),Mn([ye.action,Ln("design:type",Object)],Xn.prototype,"clearSelected",void 0);var Qn=Xn;function Kn(e,t,n,r,a=!1,s=[]){s.push(t);let l=0;for(;s.length>l;){const t=s[l++];if(n(t))return!0;if(!t.links)return;for(const n of t.links)r||n.toId!==t.id||s.includes(e.getNode(n.fromId))?r&&n.fromId===t.id&&!s.includes(e.getNode(n.toId))&&(a&&a(n),s.push(e.getNode(n.toId))):(a&&a(n),s.push(e.getNode(n.fromId)))}}function $n(e){let t=10414335;if("number"==typeof e)return e;if("string"==typeof e&&e)if(4===e.length&&(e=e.replace(/([^#])/g,"$1$1")),9===e.length)t=parseInt(e.substr(1),16);else{if(7!==e.length)throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;t=parseInt(e.substr(1),16)<<8|255}return t}var Yn=n(286),er=n.n(Yn),tr=n(287),nr=n.n(tr),rr=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},ar=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class sr{constructor(e,t,n){this.nodeID=e,this.time=t,this.txID=n}}class lr extends sr{constructor(e,t,n,r){super(e,t,n),this.amount=r}}class or extends sr{constructor(e,t,n,r){super(e,t,n),this.amount=r}}const ir=r.createElement("tr",null,r.createElement("td",{key:"emptyRow",colSpan:4},"There are no nodes to view with the current search parameters.")),cr=r.createElement(xt.a,{key:"emptyItem"},"There are no events to view with the current search parameters.");class pr{constructor(){this.manaValues=[],this.prevManaValues=[0,0],this.accessNetworkRichest=[],this.totalAccessNetwork=0,this.accessActiveRichest=[],this.totalAccessActive=0,this.consensusNetworkRichest=[],this.totalConsensusNetwork=0,this.consensusActiveRichest=[],this.totalConsensusActive=0,this.searchNode="",this.searchTxID="",this.accessEvents=[],this.consensusEvents=[],this.initAccessEvents=[],this.initConsensusEvents=[],this.lastRemovedAccessEventTime=null,this.lastRemovedConsensusEventTime=null,this.lastInitRemovedAccessEventTime=null,this.lastInitRemovedConsensusEventTime=null,this.eventsUpdated=!1,this.displayedAccessEvents=[],this.displayedConsensusEvents=[],this.nodeNotSyncedListItem=r.createElement(xt.a,null,"Wait for node to be synced to display mana events."),this.addNewManaValue=e=>{this.ownID=this.ownID?this.ownID:e.nodeID,100===this.manaValues.length&&this.manaValues.shift();let t=[new Date(1e3*e.time),e.access,e.consensus];this.manaValues.length>0&&(this.prevManaValues=[this.manaValues[this.manaValues.length-1][1],this.manaValues[this.manaValues.length-1][2]]),this.manaValues.push(t)},this.updateNetworkRichest=e=>{switch(e.manaType){case"Access":this.totalAccessNetwork=e.totalMana,this.accessNetworkRichest=e.nodes;break;case"Consensus":this.totalConsensusNetwork=e.totalMana,this.consensusNetworkRichest=e.nodes}},this.updateActiveRichest=e=>{switch(e.manaType){case"Access":this.totalAccessActive=e.totalMana,this.accessActiveRichest=e.nodes;break;case"Consensus":this.totalConsensusActive=e.totalMana,this.consensusActiveRichest=e.nodes}},this.updateAllowedPledgeIDs=e=>{this.allowedPledgeIDs=e},this.addNewInitPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.initAccessEvents,t.length>=100){let e=t.shift();this.lastInitRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.accessEvents,t.length>=100){let e=t.shift();this.lastRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.addNewInitRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.initDone=()=>{this.accessEvents=this.initAccessEvents,this.lastRemovedAccessEventTime=this.lastInitRemovedAccessEventTime,this.consensusEvents=this.initConsensusEvents,this.lastRemovedConsensusEventTime=this.lastInitRemovedConsensusEventTime,this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],setInterval(()=>{this.eventsUpdated&&(this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],this.eventsUpdated=!1)},500)},this.nodeList=(e,t)=>{if(null===e||null==e)return[];let n=[],a=(e,a)=>{n.push(r.createElement("tr",{key:e.shortNodeID,style:{backgroundColor:e.shortNodeID===this.ownID?"#e8ffff":"white"}},r.createElement("td",{style:{borderTopLeftRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomLeftRadius:e.shortNodeID===this.ownID?"10px":"0"}}," ",a+1," "),r.createElement("td",null,e.shortNodeID),r.createElement("td",null,kt(e.mana)),r.createElement("td",{style:{borderTopRightRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomRightRadius:e.shortNodeID===this.ownID?"10px":"0"}},(e.mana/t*100).toFixed(2),"%")))};return e.forEach((e,t)=>{this.passesNodeFilter(e.shortNodeID)&&a(e,t)}),n},this.computeEventList=e=>{let t=[];if(t.push(r.createElement(xt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"}),r.createElement(u.a,null,"NodeID"),r.createElement(u.a,null,"Tx ID"),r.createElement(u.a,{xs:5},"Time")))),null==e)return t;return e.reverse().forEach((e,n)=>{this.passesNodeFilter(e.nodeID)&&this.passesTxFilter(e.txID)&&((e,n)=>{if(e instanceof lr){let a=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Pledged"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana: ",r.createElement("strong",null,"+",kt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"To NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Pledge: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(xt.a,{style:{backgroundColor:"#41aea9",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"},r.createElement("img",{src:er.a,alt:"Plus",width:"20px",className:"d-block mx-auto"})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}else if(e instanceof or){let a=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Revoked"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana 1: ",r.createElement("strong",null,"-",kt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"From NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Revoke: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(xt.a,{style:{backgroundColor:"#213e3b",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1},r.createElement("img",{src:nr.a,alt:"Minus",width:"20px",className:""})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}})(e,n)}),t},this.passesNodeFilter=e=>0===this.searchNode.trim().length||!!e.toLowerCase().includes(this.searchNode.toLowerCase()),this.passesTxFilter=e=>0===this.searchTxID.trim().length||!!e.toLowerCase().includes(this.searchTxID.toLowerCase()),this.manaValues=[],ve(fe.Mana,this.addNewManaValue),ve(fe.ManaMapOverall,this.updateNetworkRichest),ve(fe.ManaMapOnline,this.updateActiveRichest)}updateNodeSearch(e){this.searchNode=e.trim()}updateTxSearch(e){this.searchTxID=e.trim()}get networkRichestFeedAccess(){let e=this.nodeList(this.accessNetworkRichest,this.totalAccessNetwork);return 0===e.length?[ir]:e}get networkRichestFeedConsensus(){let e=this.nodeList(this.consensusNetworkRichest,this.totalConsensusNetwork);return 0===e.length?[ir]:e}get activeRichestFeedAccess(){let e=this.nodeList(this.accessActiveRichest,this.totalAccessActive);return 0===e.length?[ir]:e}get activeRichestFeedConsensus(){let e=this.nodeList(this.consensusActiveRichest,this.totalConsensusActive);return 0===e.length?[ir]:e}get accessHistogramInput(){if(void 0===this.accessNetworkRichest||null===this.accessNetworkRichest)return[["",0]];let e=new Array;for(let t=0;te.shortNodeID===this.ownID;let n=this.accessNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.accessNetworkRichest.length-(n+1))/this.accessNetworkRichest.length*100}}return e}get consensusPercentile(){let e=0;if(void 0!==this.consensusNetworkRichest&&null!==this.consensusNetworkRichest){const t=e=>e.shortNodeID===this.ownID;let n=this.consensusNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.consensusNetworkRichest.length-(n+1))/this.consensusNetworkRichest.length*100}}return e}get accessEventList(){let e=this.computeEventList(this.displayedAccessEvents);return 1===e.length&&e.push(cr),e}get consensusEventList(){let e=this.computeEventList(this.displayedConsensusEvents);return 1===e.length&&e.push(cr),e}}rr([ye.observable,ar("design:type",Array)],pr.prototype,"manaValues",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"prevManaValues",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"accessNetworkRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalAccessNetwork",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"accessActiveRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalAccessActive",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"consensusNetworkRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalConsensusNetwork",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"consensusActiveRichest",void 0),rr([ye.observable,ar("design:type",Number)],pr.prototype,"totalConsensusActive",void 0),rr([ye.observable,ar("design:type",Object)],pr.prototype,"searchNode",void 0),rr([ye.observable,ar("design:type",Object)],pr.prototype,"searchTxID",void 0),rr([ye.observable,ar("design:type",class{})],pr.prototype,"allowedPledgeIDs",void 0),rr([ye.observable,ar("design:type",Date)],pr.prototype,"lastRemovedAccessEventTime",void 0),rr([ye.observable,ar("design:type",Date)],pr.prototype,"lastRemovedConsensusEventTime",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"displayedAccessEvents",void 0),rr([ye.observable,ar("design:type",Array)],pr.prototype,"displayedConsensusEvents",void 0),rr([ye.action,ar("design:type",Function),ar("design:paramtypes",[String]),ar("design:returntype",void 0)],pr.prototype,"updateNodeSearch",null),rr([ye.action,ar("design:type",Function),ar("design:paramtypes",[String]),ar("design:returntype",void 0)],pr.prototype,"updateTxSearch",null),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewManaValue",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateNetworkRichest",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateActiveRichest",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"updateAllowedPledgeIDs",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewInitPledge",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewPledge",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewInitRevoke",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"addNewRevoke",void 0),rr([ye.action,ar("design:type",Object)],pr.prototype,"initDone",void 0),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"networkRichestFeedAccess",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"networkRichestFeedConsensus",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"activeRichestFeedAccess",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"activeRichestFeedConsensus",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessHistogramInput",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusHistogramInput",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessPercentile",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusPercentile",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"accessEventList",null),rr([ye.computed,ar("design:type",Object),ar("design:paramtypes",[])],pr.prototype,"consensusEventList",null);var dr=pr,ur=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},mr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hr=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class fr{constructor(){this.liveFeed=[],this.addLiveFeed=e=>hr(this,void 0,void 0,(function*(){-1===this.liveFeed.findIndex(t=>t.id==e.id)&&(this.liveFeed.length>=100&&this.liveFeed.shift(),this.liveFeed.push(e))})),ve(fe.SlotInfo,this.addLiveFeed)}get slotLiveFeed(){let e=[];for(let t=this.liveFeed.length-1;t>=0;t--){let n=this.liveFeed[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,n.index),r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/slot/commitment/"+n.id},n.id))))}return e}}ur([ye.observable,mr("design:type",Array)],fr.prototype,"liveFeed",void 0),ur([ye.action,mr("design:type",Object)],fr.prototype,"addLiveFeed",void 0),ur([ye.computed,mr("design:type",Object),mr("design:paramtypes",[])],fr.prototype,"slotLiveFeed",null);var br=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},gr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class yr{constructor(e,t){this.updateConflictSets=e=>{this.conflictSets.set(e.conflictSetID,e)},this.updateConflicts=e=>{this.conflicts.set(e.conflictID,e)},this.routerStore=e,this.nodeStore=t,this.conflictSets=new Map,this.conflicts=new Map,ve(fe.ConflictSet,this.updateConflictSets),ve(fe.Conflict,this.updateConflicts)}get conflictsLiveFeed(){let e=Array.from(this.conflictSets.values());e.sort((e,t)=>t.arrivalTime-e.arrivalTime||e.conflictSetID.localeCompare(t.conflictSetID));let t=[];for(let n of e){if(t.push(r.createElement("tr",{key:n.conflictSetID,onClick:()=>n.shown=!n.shown,style:{cursor:"pointer"}},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/output/"+n.conflictSetID},n.conflictSetID)),r.createElement("td",null,new Date(1e3*n.arrivalTime).toLocaleString()),r.createElement("td",null,n.resolved?"Yes":"No"),r.createElement("td",null,n.timeToResolve/1e6))),!n.shown)continue;let e=Array.from(this.conflicts.values());e.sort((e,t)=>e.issuingTime-t.issuingTime||e.conflictID.localeCompare(t.conflictID));let a=[];for(let t of e)for(let e of t.conflictSetIDs)e===n.conflictSetID&&a.push(r.createElement("tr",{key:t.conflictID,className:t.confirmationState>Qt.Accepted?"table-success":""},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/branch/"+t.conflictID},t.conflictID)),r.createElement("td",null,Kt(t.confirmationState)),r.createElement("td",null," ",new Date(1e3*t.issuingTime).toLocaleString()),r.createElement("td",null,t.issuerNodeID)));t.push(r.createElement("tr",{key:n.conflictSetID+"_branches"},r.createElement("td",{colSpan:4},r.createElement(te.a,{size:"sm"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BranchID"),r.createElement("th",null,"ConfirmationState"),r.createElement("th",null,"IssuingTime"),r.createElement("th",null,"Issuer NodeID"))),r.createElement("tbody",null,a)))))}return t}}br([ye.observable,gr("design:type",Map)],yr.prototype,"conflictSets",void 0),br([ye.observable,gr("design:type",Map)],yr.prototype,"conflicts",void 0),br([ye.action,gr("design:type",Object)],yr.prototype,"updateConflictSets",void 0),br([ye.action,gr("design:type",Object)],yr.prototype,"updateConflicts",void 0),br([ye.computed,gr("design:type",Object),gr("design:paramtypes",[])],yr.prototype,"conflictsLiveFeed",null);var Er=yr;const vr=new pn.RouterStore,Ir=new wn,kr={routerStore:vr,nodeStore:Ir,explorerStore:new Ke(vr),conflictsStore:new Er(vr,Ir),faucetStore:new Nn(vr),visualizerStore:new Qn(vr),manaStore:new dr,slotStore:new fr},xr=Object(l.a)(),Sr=Object(pn.syncHistoryWithStore)(xr,vr);a.render(r.createElement(s.a,Object.assign({},kr),r.createElement(be.e,{history:Sr},r.createElement(cn,{history:Sr}))),document.getElementById("root"))}},[[434,1,2]]]); \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map b/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map deleted file mode 100644 index 5e7f1f31c..000000000 --- a/components/dashboard/frontend/build/app.6eea8010fee08f23aca6.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///./assets/plus.svg","webpack:///./assets/minus.svg","webpack:///../node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/components/Uptime.tsx","webpack:///./app/components/Version.tsx","webpack:///./app/misc/Chart.ts","webpack:///./app/components/BPSChart.tsx","webpack:///./app/components/TipsChart.tsx","webpack:///./app/components/MemChart.tsx","webpack:///./app/components/ComponentCounterChart.tsx","webpack:///./app/components/TangleTime.tsx","webpack:///./app/components/Bootstrapped.tsx","webpack:///./app/components/Dashboard.tsx","webpack:///./app/components/ExplorerSearchbar.tsx","webpack:///./app/components/ExplorerLiveFeed.tsx","webpack:///./app/components/ExplorerTransactionSearchbar.tsx","webpack:///./app/components/ExplorerOutputSearchbar.tsx","webpack:///./app/components/ExplorerConflictSearchbar.tsx","webpack:///./app/components/Explorer.tsx","webpack:///./app/components/NavExplorerSearchbar.tsx","webpack:///./app/misc/WS.ts","webpack:///./app/misc/Payload.ts","webpack:///./app/utils/condition.tsx","webpack:///./app/utils/feature.tsx","webpack:///./app/utils/output.tsx","webpack:///./app/components/NativeToken.tsx","webpack:///./app/components/Condition.tsx","webpack:///./app/components/Feature.tsx","webpack:///./app/components/BasicOutput.tsx","webpack:///./app/components/AliasOutput.tsx","webpack:///./app/components/FoundryOutput.tsx","webpack:///./app/components/NFTOutput.tsx","webpack:///./app/stores/ExplorerStore.tsx","webpack:///./app/components/BasicPayload.tsx","webpack:///./app/utils/unlock_block.ts","webpack:///./app/components/Ed25519Signature.tsx","webpack:///./app/components/UnlockBlock.tsx","webpack:///./app/components/Transaction.tsx","webpack:///./app/components/TransactionPayload.tsx","webpack:///./app/utils/conflict.ts","webpack:///./app/components/FaucetPayload.tsx","webpack:///./app/components/TaggedDataPayload.tsx","webpack:///./app/components/ExplorerBlockQueryResult.tsx","webpack:///./app/utils/index.ts","webpack:///./app/components/ExplorerAddressResult.tsx","webpack:///./app/components/Explorer404.tsx","webpack:///./app/components/Neighbor.tsx","webpack:///./app/components/Neighbors.tsx","webpack:///./app/components/Visualizer.tsx","webpack:///./app/components/Tips.tsx","webpack:///./app/components/ExplorerTransaction.tsx","webpack:///./app/components/ExplorerTransactionMetadata.tsx","webpack:///./app/components/ExplorerTransactionAttachments.tsx","webpack:///./app/components/ExplorerTransactionQueryResult.tsx","webpack:///./app/utils/confirmation_state.ts","webpack:///./app/components/ExplorerOutputQueryResult.tsx","webpack:///./app/components/ExplorerConflictQueryResult.tsx","webpack:///./app/components/SlotLiveFeed.tsx","webpack:///./app/components/ExplorerSlotQueryResult.tsx","webpack:///./app/components/Root.tsx","webpack:///./app/App.tsx","webpack:///./app/stores/NodeStore.ts","webpack:///./app/stores/FaucetStore.ts","webpack:///./app/stores/VisualizerStore.ts","webpack:///./app/stores/ManaStore.tsx","webpack:///./app/stores/SlotStore.tsx","webpack:///./app/stores/ConflictsStore.tsx","webpack:///./main.tsx"],"names":["module","exports","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","this","props","nodeStore","uptime","status","version","defaultChartOptions","elements","line","tension","animation","duration","hover","animationDuration","responsiveAnimationDuration","lineChartOptions","assign","scales","xAxes","ticks","autoSkip","maxTicksLimit","fontSize","minRotation","maxRotation","gridLines","display","yAxes","callback","value","index","values","Math","abs","beginAtZero","tooltips","callbacks","label","tooltipItem","data","datasets","datasetIndex","Card","Body","Title","last_mps_metric","mps","height","mpsSeries","options","last_tips_metric","totaltips","tipsSeries","showXLabels","prettysize","mem","heap_alloc","num_gc","last_pause_gc","heap_objects","heap_sys","heap_idle","heap_released","memSeries","style","flexDirection","last_component_counter_metric","store","last_rate_setter_metric","estimate","componentSeries","tangleTime","synced","className","to","acceptedBlockID","confirmedBlockID","confirmedSlot","committedSlot","dateformat","Date","ATT","CTT","RATT","RCTT","bootstrapped","Container","Row","Col","ListGroup","variant","Item","ComponentCounterChart","updateSearch","explorerStore","target","executeSearch","key","searchAny","search","searching","InputGroup","FormControl","placeholder","onChange","onKeyUp","disabled","blksLiveFeed","xs","Table","txID","routerStore","push","outputID","conflictID","href","Form","inline","as","type","WSMsgType","handlers","registerHandler","blkTypeID","handler","unregisterHandler","PayloadType","ConditionType","FeatureType","OutputType","Output","getPayloadType","p","TaggedData","Transaction","Faucet","token","amount","unlock","address","pubKeyHash","unixTime","returnAddress","conditionToComponent","cond","Address","StateControllerAddress","GovernorAddress","StorageDepositReturn","Expiration","Timelock","feature","tag","featureToComponent","feat","Sender","Issuer","Metadata","Tag","hex","output","nativeTokens","n","_","unlockConditions","c","features","f","transactionID","outputIndex","wordBreak","aliasId","stateIndex","stateMetadata","foundryCounter","serialNumber","tokenScheme","nftId","outputToComponent","Basic","Alias","Foundry","NFT","GenesisBlockID","SlotInfo","QueryError","latest_blocks","blk","addr","tx","txMetadata","txAttachments","outputMetadata","outputConsumers","pendingMana","conflict","conflictChildren","conflictConflicts","conflictVoters","tips","slotInfo","query_loading","query_err","search_result","updateSearching","res","fetch","result","json","updateSearchResult","err","updateQueryError","resetSearch","block","searchBlock","updateQueryLoading","fetchJson","updateBlock","searchAddress","updateAddress","getSlotDetails","getSlotInfo","getTransaction","i","inputs","length","inputID","referencedOutputID","referencedOutputRes","genOutput","getTransactionAttachments","attachments","getTransactionMetadata","getOutput","getOutputMetadata","getOutputConsumers","getPendingMana","getConflict","getConflictChildren","getConflictConflicts","getConflictVoters","getTips","reset","spendIDs","addedSpendIDs","subtractedSpendIDs","strongChildren","weakChildren","shallowLikeChildren","strongParents","weakParents","shallowLikedParents","payloadType","payload","loading","addLiveFeedBlock","findIndex","t","shift","Block","feed","payload_type","list","blkId","method","route","requestData","body","JSON","stringify","v","Uint8Array","Array","from","undefined","response","headers","ok","NotFound","BadRequest","content_title","content","SignatureType","signature","publicKey","signatureType","Ed25519","Badge","sigType","BLS","renderSignatureComponent","maxHeight","overflow","width","marginTop","marginBottom","paddingBottom","borderBottom","networkId","creationSlot","input","Provider","color","size","outputs","unlocks","txId","resolveBase58ConflictID","base58Conflict","MasterConflictInBase58","UndefinedConflictInBase58","LazyBookedConflictsConflictInBase58","InvalidConflictInBase58","accessManaPledgeID","consensusManaPledgeID","nonce","match","params","prevProps","prevState","objectivelyInvalid","marginRight","issuanceTimestamp","solidificationTimestamp","sequenceNumber","solid","scheduled","booked","orphaned","subjectivelyInvalid","acceptance","acceptanceTime","confirmation","confirmationTime","confirmationBySlot","confirmationBySlotTime","commitmentID","commitment","prevID","rootsID","cumulativeWeight","latestConfirmedSlot","rank","sequenceID","pastMarkerGap","isPastMarker","pastMarkers","issuerID","renderPayload","Spinner","displayManaUnit","mana","roundedMana","round","toString","toFixed","spent","unspent","available_balances","explorerOutputs","forEach","metadata","consumerCount","timestampCompareFn","a","b","txTimestamp","localeCompare","sort","Alert","ListGroupItem","textAlign","super","state","enabled","Button","getVariant","onClick","setState","base58","outputTypeToName","toLocaleString","timestamp","confirmedConsumer","outputType","neighborMetrics","neighbor_metrics","get","identity","last","current","connection_origin","pill","packets_written","packets_read","currentNetIO","rx","netIOSeries","neighborsEle","k","updateVerticesLimit","visualizerStore","pauseResumeVisualizer","pauseResume","searchAndHighlight","toggleBackgroundDataCollection","collecting","unregisterHandlers","registerHandlers","start","stop","vertices","finalized_count","selected","verticesLimit","tips_count","paused","Prepend","Text","OverlayTrigger","trigger","placement","overlay","Popover","Content","span","offset","background","substr","parent","zIndex","position","top","left","tipsList","bordered","conflictIDs","confirmationState","blockIDs","ConfirmationState","resolveConfirmationState","Undefined","Rejected","Pending","Accepted","Confirmed","confirmationStateTime","consumers","val","valid","parents","childConflicts","conflicts","j","voters","s","slotLiveFeed","slotStore","blocks","transactions","createdOutputs","spentOutputs","connect","Navbar","expand","bg","Brand","Nav","Link","Collapse","websocketConnected","exact","path","component","children","renderDevTool","App","history","BPSMetric","Status","MemoryMetrics","scheduler","SchedulerMetric","TipsMetric","RateSetterMetric","collected","network_io","metric","ts","now","maxMetricsDataPoints","netIO","secondLast","chartSeriesOpts","series","labels","ComponentCounterMetric","fill","lineTension","backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","pointBorderColor","pointBackgroundColor","pointBorderWidth","pointHoverBackgroundColor","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","pointHoverRadius","name","bgColor","collected_mps_metrics","collected_rate_setter_metrics","collected_scheduler_metrics","collected_mem_metrics","collected_tips_metrics","collected_component_counter_metrics","updateStatus","BPSMetrics","addBPSMetric","updateLastBPSMetric","NeighborStats","updateNeighborMetrics","TipsMetrics","updateLastTipsMetric","ComponentCounterMetrics","updateLastComponentMetric","RateSetter","updateLastRateSetterMetric","updateCollecting","updateWebSocketConnected","connected","updated","neighbMetrics","addMetric","set","includes","delete","mpsMetric","tipsMetric","componentCounterMetric","setTimeout","onOpen","onClose","onError","loc","window","location","uri","protocol","host","ws","WebSocket","onopen","onclose","onerror","onmessage","parse","connectWebSocket","reconnect","stored","solidified","solidifier","booker","bufferSize","currentBufferSize","deficit","day","hour","minute","seconds","floor","str","heapSys","heapAlloc","heapIdle","heapReleased","FaucetStore","send_addr","send_access_mana_node_id","send_consensus_mana_node_id","sending","sendResult","query_error","sendReq","updateSending","updateSendResult","updateSend","updateSendAccessManaNodeID","access_mana","updateSendConsensusManaNodeID","consensus_mana","Vertex","COLOR","verticesIncomingOrder","draw","selected_via_click","selected_origin_color","fetchHistory","addVertex","console","log","trim","clearSelected","iter","found","indexOf","updateSelected","renderer","resume","pause","num","updateTxStatus","vert","existing","is_tx_accepted","drawVertex","is_blk_confirmed","checkLimit","addTipInfo","tipInfo","is_tip","deleteId","graph","removeNode","node","getNode","graphics","getNodeUI","parseColor","colorForVertexState","addNode","linkParents","links","some","link","fromId","addLink","is_tx","Graph","View","webglGraphics","layout","Layout","forceDirected","springLength","springCoeff","stableThreshold","gravity","dragCoeff","timeStep","theta","webglSquare","webglLine","ele","document","getElementById","container","events","webglInputEvents","mouseEnter","mouseLeave","click","run","dispose","viaClick","nodeUI","vertexSize","dfsIterator","getLinkUI","resetLinks","forEachLink","force_clear","TipInfo","TXAccepted","cb","up","cbLinks","seenNodes","pointer","toId","parsedColor","replace","parseInt","ManaEvent","nodeID","time","PledgeEvent","RevokeEvent","emptyRow","colSpan","emptyListItem","manaValues","prevManaValues","accessNetworkRichest","totalAccessNetwork","accessActiveRichest","totalAccessActive","consensusNetworkRichest","totalConsensusNetwork","consensusActiveRichest","totalConsensusActive","searchNode","searchTxID","accessEvents","consensusEvents","initAccessEvents","initConsensusEvents","lastRemovedAccessEventTime","lastRemovedConsensusEventTime","lastInitRemovedAccessEventTime","lastInitRemovedConsensusEventTime","eventsUpdated","displayedAccessEvents","displayedConsensusEvents","nodeNotSyncedListItem","addNewManaValue","manaBlk","ownID","newManaData","access","consensus","updateNetworkRichest","manaType","totalMana","nodes","updateActiveRichest","updateAllowedPledgeIDs","allowedPledgeIDs","addNewInitPledge","lastRemoved","newData","addNewPledge","addNewInitRevoke","addNewRevoke","initDone","setInterval","nodeList","leaderBoard","manaSum","pushToFeed","shortNodeID","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","passesNodeFilter","computeEventList","evArr","reverse","event","passesTxFilter","element","popover","ev","navigator","clipboard","writeText","toLocaleTimeString","src","alt","substring","pushToEventFeed","toLowerCase","Mana","ManaMapOverall","ManaMapOnline","histInput","log10","per","isOwnID","liveFeed","addLiveFeed","info","updateConflictSets","conflictSets","conflictSetID","updateConflicts","Map","ConflictSet","Conflict","conflictsArr","x","y","arrivalTime","shown","cursor","resolved","timeToResolve","branchesArr","issuingTime","branches","branch","conflictSetIDs","issuerNodeID","stores","browserHistory"],"mappings":"2EAAAA,EAAOC,QAAU,k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0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+\"","var map = {\n\t\"./af\": 107,\n\t\"./af.js\": 107,\n\t\"./ar\": 108,\n\t\"./ar-dz\": 109,\n\t\"./ar-dz.js\": 109,\n\t\"./ar-kw\": 110,\n\t\"./ar-kw.js\": 110,\n\t\"./ar-ly\": 111,\n\t\"./ar-ly.js\": 111,\n\t\"./ar-ma\": 112,\n\t\"./ar-ma.js\": 112,\n\t\"./ar-sa\": 113,\n\t\"./ar-sa.js\": 113,\n\t\"./ar-tn\": 114,\n\t\"./ar-tn.js\": 114,\n\t\"./ar.js\": 108,\n\t\"./az\": 115,\n\t\"./az.js\": 115,\n\t\"./be\": 116,\n\t\"./be.js\": 116,\n\t\"./bg\": 117,\n\t\"./bg.js\": 117,\n\t\"./bm\": 118,\n\t\"./bm.js\": 118,\n\t\"./bn\": 119,\n\t\"./bn-bd\": 120,\n\t\"./bn-bd.js\": 120,\n\t\"./bn.js\": 119,\n\t\"./bo\": 121,\n\t\"./bo.js\": 121,\n\t\"./br\": 122,\n\t\"./br.js\": 122,\n\t\"./bs\": 123,\n\t\"./bs.js\": 123,\n\t\"./ca\": 124,\n\t\"./ca.js\": 124,\n\t\"./cs\": 125,\n\t\"./cs.js\": 125,\n\t\"./cv\": 126,\n\t\"./cv.js\": 126,\n\t\"./cy\": 127,\n\t\"./cy.js\": 127,\n\t\"./da\": 128,\n\t\"./da.js\": 128,\n\t\"./de\": 129,\n\t\"./de-at\": 130,\n\t\"./de-at.js\": 130,\n\t\"./de-ch\": 131,\n\t\"./de-ch.js\": 131,\n\t\"./de.js\": 129,\n\t\"./dv\": 132,\n\t\"./dv.js\": 132,\n\t\"./el\": 133,\n\t\"./el.js\": 133,\n\t\"./en-au\": 134,\n\t\"./en-au.js\": 134,\n\t\"./en-ca\": 135,\n\t\"./en-ca.js\": 135,\n\t\"./en-gb\": 136,\n\t\"./en-gb.js\": 136,\n\t\"./en-ie\": 137,\n\t\"./en-ie.js\": 137,\n\t\"./en-il\": 138,\n\t\"./en-il.js\": 138,\n\t\"./en-in\": 139,\n\t\"./en-in.js\": 139,\n\t\"./en-nz\": 140,\n\t\"./en-nz.js\": 140,\n\t\"./en-sg\": 141,\n\t\"./en-sg.js\": 141,\n\t\"./eo\": 142,\n\t\"./eo.js\": 142,\n\t\"./es\": 143,\n\t\"./es-do\": 144,\n\t\"./es-do.js\": 144,\n\t\"./es-mx\": 145,\n\t\"./es-mx.js\": 145,\n\t\"./es-us\": 146,\n\t\"./es-us.js\": 146,\n\t\"./es.js\": 143,\n\t\"./et\": 147,\n\t\"./et.js\": 147,\n\t\"./eu\": 148,\n\t\"./eu.js\": 148,\n\t\"./fa\": 149,\n\t\"./fa.js\": 149,\n\t\"./fi\": 150,\n\t\"./fi.js\": 150,\n\t\"./fil\": 151,\n\t\"./fil.js\": 151,\n\t\"./fo\": 152,\n\t\"./fo.js\": 152,\n\t\"./fr\": 153,\n\t\"./fr-ca\": 154,\n\t\"./fr-ca.js\": 154,\n\t\"./fr-ch\": 155,\n\t\"./fr-ch.js\": 155,\n\t\"./fr.js\": 153,\n\t\"./fy\": 156,\n\t\"./fy.js\": 156,\n\t\"./ga\": 157,\n\t\"./ga.js\": 157,\n\t\"./gd\": 158,\n\t\"./gd.js\": 158,\n\t\"./gl\": 159,\n\t\"./gl.js\": 159,\n\t\"./gom-deva\": 160,\n\t\"./gom-deva.js\": 160,\n\t\"./gom-latn\": 161,\n\t\"./gom-latn.js\": 161,\n\t\"./gu\": 162,\n\t\"./gu.js\": 162,\n\t\"./he\": 163,\n\t\"./he.js\": 163,\n\t\"./hi\": 164,\n\t\"./hi.js\": 164,\n\t\"./hr\": 165,\n\t\"./hr.js\": 165,\n\t\"./hu\": 166,\n\t\"./hu.js\": 166,\n\t\"./hy-am\": 167,\n\t\"./hy-am.js\": 167,\n\t\"./id\": 168,\n\t\"./id.js\": 168,\n\t\"./is\": 169,\n\t\"./is.js\": 169,\n\t\"./it\": 170,\n\t\"./it-ch\": 171,\n\t\"./it-ch.js\": 171,\n\t\"./it.js\": 170,\n\t\"./ja\": 172,\n\t\"./ja.js\": 172,\n\t\"./jv\": 173,\n\t\"./jv.js\": 173,\n\t\"./ka\": 174,\n\t\"./ka.js\": 174,\n\t\"./kk\": 175,\n\t\"./kk.js\": 175,\n\t\"./km\": 176,\n\t\"./km.js\": 176,\n\t\"./kn\": 177,\n\t\"./kn.js\": 177,\n\t\"./ko\": 178,\n\t\"./ko.js\": 178,\n\t\"./ku\": 179,\n\t\"./ku.js\": 179,\n\t\"./ky\": 180,\n\t\"./ky.js\": 180,\n\t\"./lb\": 181,\n\t\"./lb.js\": 181,\n\t\"./lo\": 182,\n\t\"./lo.js\": 182,\n\t\"./lt\": 183,\n\t\"./lt.js\": 183,\n\t\"./lv\": 184,\n\t\"./lv.js\": 184,\n\t\"./me\": 185,\n\t\"./me.js\": 185,\n\t\"./mi\": 186,\n\t\"./mi.js\": 186,\n\t\"./mk\": 187,\n\t\"./mk.js\": 187,\n\t\"./ml\": 188,\n\t\"./ml.js\": 188,\n\t\"./mn\": 189,\n\t\"./mn.js\": 189,\n\t\"./mr\": 190,\n\t\"./mr.js\": 190,\n\t\"./ms\": 191,\n\t\"./ms-my\": 192,\n\t\"./ms-my.js\": 192,\n\t\"./ms.js\": 191,\n\t\"./mt\": 193,\n\t\"./mt.js\": 193,\n\t\"./my\": 194,\n\t\"./my.js\": 194,\n\t\"./nb\": 195,\n\t\"./nb.js\": 195,\n\t\"./ne\": 196,\n\t\"./ne.js\": 196,\n\t\"./nl\": 197,\n\t\"./nl-be\": 198,\n\t\"./nl-be.js\": 198,\n\t\"./nl.js\": 197,\n\t\"./nn\": 199,\n\t\"./nn.js\": 199,\n\t\"./oc-lnc\": 200,\n\t\"./oc-lnc.js\": 200,\n\t\"./pa-in\": 201,\n\t\"./pa-in.js\": 201,\n\t\"./pl\": 202,\n\t\"./pl.js\": 202,\n\t\"./pt\": 203,\n\t\"./pt-br\": 204,\n\t\"./pt-br.js\": 204,\n\t\"./pt.js\": 203,\n\t\"./ro\": 205,\n\t\"./ro.js\": 205,\n\t\"./ru\": 206,\n\t\"./ru.js\": 206,\n\t\"./sd\": 207,\n\t\"./sd.js\": 207,\n\t\"./se\": 208,\n\t\"./se.js\": 208,\n\t\"./si\": 209,\n\t\"./si.js\": 209,\n\t\"./sk\": 210,\n\t\"./sk.js\": 210,\n\t\"./sl\": 211,\n\t\"./sl.js\": 211,\n\t\"./sq\": 212,\n\t\"./sq.js\": 212,\n\t\"./sr\": 213,\n\t\"./sr-cyrl\": 214,\n\t\"./sr-cyrl.js\": 214,\n\t\"./sr.js\": 213,\n\t\"./ss\": 215,\n\t\"./ss.js\": 215,\n\t\"./sv\": 216,\n\t\"./sv.js\": 216,\n\t\"./sw\": 217,\n\t\"./sw.js\": 217,\n\t\"./ta\": 218,\n\t\"./ta.js\": 218,\n\t\"./te\": 219,\n\t\"./te.js\": 219,\n\t\"./tet\": 220,\n\t\"./tet.js\": 220,\n\t\"./tg\": 221,\n\t\"./tg.js\": 221,\n\t\"./th\": 222,\n\t\"./th.js\": 222,\n\t\"./tk\": 223,\n\t\"./tk.js\": 223,\n\t\"./tl-ph\": 224,\n\t\"./tl-ph.js\": 224,\n\t\"./tlh\": 225,\n\t\"./tlh.js\": 225,\n\t\"./tr\": 226,\n\t\"./tr.js\": 226,\n\t\"./tzl\": 227,\n\t\"./tzl.js\": 227,\n\t\"./tzm\": 228,\n\t\"./tzm-latn\": 229,\n\t\"./tzm-latn.js\": 229,\n\t\"./tzm.js\": 228,\n\t\"./ug-cn\": 230,\n\t\"./ug-cn.js\": 230,\n\t\"./uk\": 231,\n\t\"./uk.js\": 231,\n\t\"./ur\": 232,\n\t\"./ur.js\": 232,\n\t\"./uz\": 233,\n\t\"./uz-latn\": 234,\n\t\"./uz-latn.js\": 234,\n\t\"./uz.js\": 233,\n\t\"./vi\": 235,\n\t\"./vi.js\": 235,\n\t\"./x-pseudo\": 236,\n\t\"./x-pseudo.js\": 236,\n\t\"./yo\": 237,\n\t\"./yo.js\": 237,\n\t\"./zh-cn\": 238,\n\t\"./zh-cn.js\": 238,\n\t\"./zh-hk\": 239,\n\t\"./zh-hk.js\": 239,\n\t\"./zh-mo\": 240,\n\t\"./zh-mo.js\": 240,\n\t\"./zh-tw\": 241,\n\t\"./zh-tw.js\": 241\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 298;","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Uptime extends React.Component {\r\n render() {\r\n return (\r\n \r\n Uptime: {this.props.nodeStore.uptime}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Version extends React.Component {\r\n render() {\r\n return (\r\n \r\n Version: {this.props.nodeStore.status.version}\r\n \r\n );\r\n }\r\n}\r\n","\r\n// includes chart options to increase performance, by disabling chart animations\r\nexport var defaultChartOptions = {\r\n elements: {\r\n line: {\r\n tension: 0\r\n }\r\n },\r\n animation: {\r\n duration: 0\r\n },\r\n hover: {\r\n animationDuration: 0\r\n },\r\n responsiveAnimationDuration: 0\r\n};","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class BPSChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Blocks Per Second\r\n \r\n BPS: {this.props.nodeStore.last_mps_metric.mps}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class TipsChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Current Tips\r\n \r\n Tips: {this.props.nodeStore.last_tips_metric.totaltips}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport * as prettysize from 'prettysize';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class MemChart extends React.Component {\r\n render() {\r\n let mem = this.props.nodeStore.status.mem;\r\n return (\r\n \r\n \r\n \r\n Memory Usage{' '}\r\n {prettysize(mem.heap_alloc)}\r\n \r\n \r\n GC Cycles: {mem.num_gc} (Last Cycle: {mem.last_pause_gc / 1000000}ms) - {' '}\r\n Heap: {' '}\r\n [Obj: {mem.heap_objects}, In-Use: {prettysize(mem.heap_sys-mem.heap_idle)},\r\n Retained: {prettysize(mem.heap_idle - mem.heap_released)}]\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Card from \"react-bootstrap/Card\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport {Line} from \"react-chartjs-2\";\nimport {defaultChartOptions} from \"../misc/Chart\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\nconst lineChartOptions = Object.assign({\n scales: {\n xAxes: [{\n ticks: {\n autoSkip: true,\n maxTicksLimit: 8,\n fontSize: 8,\n minRotation: 0,\n maxRotation: 0,\n },\n gridLines: {\n display: false\n }\n }],\n yAxes: [{\n gridLines: {\n display: false\n },\n ticks: {\n callback: function (value, index, values) {\n return Math.abs(value);\n },\n fontSize: 10,\n maxTicksLimit: 4,\n beginAtZero: true,\n },\n }],\n },\n tooltips: {\n callbacks: {\n label: function (tooltipItem, data) {\n let label = data.datasets[tooltipItem.datasetIndex].label;\n return `${label} ${Math.abs(tooltipItem.value)}`;\n }\n }\n }\n}, defaultChartOptions);\n\n@inject(\"nodeStore\")\n@observer\nexport default class StoreChart extends React.Component {\n render() {\n const infoStyle = {\n display: \"flex\",\n flexDirection: \"column\"\n };\n return (\n \n \n Component Counter Blocks Per Second\n
\n \n BPS: {this.props.nodeStore.last_component_counter_metric.store}.\n \n \n Rate Setter - Estimate: {this.props.nodeStore.last_rate_setter_metric.estimate}\n \n
\n\n \n
\n
\n );\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport Card from \"react-bootstrap/Card\";\nimport {Link} from 'react-router-dom';\nimport {inject, observer} from \"mobx-react\";\nimport * as dateformat from 'dateformat';\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class TangleTime extends React.Component {\n render() {\n return (\n \n \n TangleTime\n Synced: {this.props.nodeStore.status.tangleTime.synced ? \"Yes\" : \"No\"}\n \n
\n
\n
\n
Last Accepted Block: \n {this.props.nodeStore.status.tangleTime.acceptedBlockID}\n
\n
\n
\n
Last Confirmed Block: \n {this.props.nodeStore.status.tangleTime.confirmedBlockID}\n
\n
\n
\n
Last Confirmed Slot:\n {this.props.nodeStore.status.tangleTime.confirmedSlot}\n
\n
\n
\n
Last Committed Slot:\n {this.props.nodeStore.status.tangleTime.committedSlot}\n
\n
\n
\n
\n
\n Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.ATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.CTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n Relative Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Relative Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RCTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n
\n
\n )\n ;\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class Bootstrapped extends React.Component {\n render() {\n return (\n \n Bootstrapped: {this.props.nodeStore.status.tangleTime.bootstrapped ? \"Yes\" : \"No\"}\n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Uptime from \"./Uptime\";\r\nimport Version from \"./Version\";\r\nimport BPSChart from \"./BPSChart\";\r\nimport TipsChart from \"./TipsChart\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport MemChart from \"./MemChart\";\r\nimport ComponentCounterChart from \"./ComponentCounterChart\";\r\nimport TangleTime from \"./TangleTime\";\r\nimport Bootstrapped from \"./Bootstrapped\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Dashboard extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Dashboard

\r\n \r\n \r\n \r\n \r\n Node: {this.props.nodeStore.status.id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Table from \"react-bootstrap/Table\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerLiveFeed extends React.Component {\r\n render() {\r\n let {blksLiveFeed} = this.props.explorerStore;\r\n return (\r\n \r\n \r\n \r\n \r\n Live Feed\r\n \r\n \r\n
Blocks
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {blksLiveFeed}\r\n \r\n
IdPayload Type
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionSearchbar extends React.Component {\n txID: string;\n\n updateSearch = (e) => {\n this.txID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/transaction/${this.txID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputSearchbar extends React.Component {\n outputID: string;\n\n updateSearch = (e) => {\n this.outputID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/output/${this.outputID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerConflictSearchbar extends React.Component {\n conflictID: string;\n\n updateSearch = (e) => {\n this.conflictID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/conflict/${this.conflictID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerSearchbar} from \"./ExplorerSearchbar\";\r\nimport {ExplorerLiveFeed} from \"./ExplorerLiveFeed\";\r\nimport {ExplorerTransactionSearchbar} from \"./ExplorerTransactionSearchbar\";\r\nimport {ExplorerOutputSearchbar} from \"./ExplorerOutputSearchbar\";\r\nimport {ExplorerConflictSearchbar} from \"./ExplorerConflictSearchbar\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Explorer extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Tangle Explorer

\r\n \r\n \r\n

\r\n Search for addresses, blocks, transactions, outputs and conflicts.\r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This explorer implementation is heavily inspired by thetangle.org.\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport Form from \"react-bootstrap/Form\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class NavExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n return (\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum WSMsgType {\r\n Status,\r\n BPSMetrics,\r\n Block,\r\n NeighborStats,\r\n ComponentCounterMetrics,\r\n TipsMetrics,\r\n Vertex,\r\n TXAccepted,\r\n TipInfo,\r\n Mana,\r\n ManaMapOverall,\r\n ManaMapOnline,\r\n BlkManaDashboardAddress,\r\n RateSetter,\r\n ConflictSet,\r\n Conflict,\r\n SlotInfo,\r\n}\r\n\r\nexport interface WSBlock {\r\n type: number;\r\n data: any;\r\n}\r\n\r\ntype DataHandler = (data: any) => void;\r\n\r\nlet handlers = {};\r\n\r\nexport function registerHandler(blkTypeID: number, handler: DataHandler) {\r\n handlers[blkTypeID] = handler;\r\n}\r\n\r\nexport function unregisterHandler(blkTypeID: number) {\r\n delete handlers[blkTypeID];\r\n}\r\n\r\nexport function connectWebSocket(path: string, onOpen, onClose, onError) {\r\n let loc = window.location;\r\n let uri = 'ws:';\r\n\r\n if (loc.protocol === 'https:') {\r\n uri = 'wss:';\r\n }\r\n uri += '//' + loc.host + path;\r\n\r\n let ws = new WebSocket(uri);\r\n\r\n ws.onopen = onOpen;\r\n ws.onclose = onClose;\r\n ws.onerror = onError;\r\n\r\n ws.onmessage = (e) => {\r\n let blk: WSBlock = JSON.parse(e.data);\r\n let handler = handlers[blk.type];\r\n if (!handler) {\r\n return;\r\n }\r\n handler(blk.data);\r\n };\r\n}\r\n","export enum PayloadType {\r\n TaggedData = 0,\r\n Transaction = 1,\r\n Faucet = 3,\r\n}\r\n\r\n// BasicPayload\r\nexport class BasicPayload {\r\n content_title: string;\r\n content: string;\r\n}\r\n\r\nexport class TaggedDataPayload {\r\n tag: string;\r\n data: string;\r\n}\r\n\r\nexport class FaucetPayload {\r\n address: string;\r\n accessManaPledgeID: string;\r\n consensusManaPledgeID: string;\r\n nonce: number;\r\n}\r\n\r\nexport class TransactionPayload {\r\n networkId: number;\r\n creationSlot: number;\r\n inputs: Array;\r\n outputs: Array;\r\n payload: any;\r\n unlocks: Array;\r\n}\r\n\r\nexport class Input {\r\n type: string;\r\n referencedOutputID: OutputID;\r\n output: Output;\r\n}\r\n\r\nexport class Output {\r\n outputID: OutputID;\r\n type: number;\r\n output: \r\n BasicOutput|\r\n AliasOutput|\r\n FoundryOutput|\r\n NFTOutput;\r\n}\r\n\r\nexport class OutputID {\r\n hex: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class UnlockBlock {\r\n type: string;\r\n referencedIndex: number;\r\n signatureType: number;\r\n signature: SignatureEd25519;\r\n}\r\n\r\nexport class SignatureEd25519 {\r\n publicKey: string;\r\n signature: string;\r\n}\r\n\r\nexport class BasicOutput {\r\n amount: number\r\n nativeTokens?: Array;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n}\r\n\r\nexport class AliasOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n aliasId: string;\r\n stateIndex: number;\r\n stateMetadata?: string;\r\n foundryCounter: number;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class FoundryOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n serialNumber: number;\r\n tokenScheme: number; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class NFTOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n nftId: string; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class Balance {\r\n value: number;\r\n color: string;\r\n}\r\n\r\nexport class Conflict {\r\n tx_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\nexport class Timestamp {\r\n blk_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\n// @ts-ignore\r\nexport class Opinion {\r\n value: string;\r\n round: number;\r\n}\r\n\r\nexport class NativeToken {\r\n id: string;\r\n amount: number;\r\n}\r\n\r\n// address, stateController, Governor share the same struct\r\nexport class AddressUnlockCondition {\r\n type: number;\r\n address: Address;\r\n}\r\n\r\nexport class Address {\r\n type: number;\r\n pubKeyHash: string;\r\n}\r\nexport class StorageDepositReturnUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n amount: number;\r\n}\r\n\r\nexport class TimelockUnlockCondition {\r\n type: number;\r\n unixTime?: number;\r\n}\r\n\r\nexport class ExpirationUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n unixTime: number;\r\n}\r\n\r\nexport class Feature {\r\n type: number;\r\n feature:\r\n IssuerFeature |\r\n MetadataFeature |\r\n TagFeature;\r\n}\r\n\r\n// Issuer and sender share a struct\r\nexport class IssuerFeature {\r\n address: string\r\n}\r\n\r\nexport class MetadataFeature {\r\n data: string;\r\n}\r\n\r\nexport class TagFeature {\r\n tag: string;\r\n}\r\n\r\nexport function getPayloadType(p: number){\r\n switch (p) {\r\n case PayloadType.TaggedData:\r\n return \"TaggedData\"\r\n case PayloadType.Transaction:\r\n return \"Transaction\"\r\n case PayloadType.Faucet:\r\n return \"Faucet\"\r\n default:\r\n return \"Unknown\"\r\n }\r\n}\r\n","import { UnlockConditionAddress, UnlockConditionExpiration, UnlockConditionStorageDepositReturn, UnlockConditionTimelock } from \"app/components/Condition\";\nimport { AddressUnlockCondition, ExpirationUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum ConditionType {\n Address = 0,\n StorageDepositReturn,\n Timelock,\n Expiration,\n StateControllerAddress,\n GovernorAddress,\n ImmutableAlias,\n}\n\nexport function resolveConditionType(condType: number) {\n switch (condType) {\n case ConditionType.Address:\n return \"Address Condition\";\n case ConditionType.StorageDepositReturn:\n return \"StorageDepositReturn Condition\";\n case ConditionType.Timelock:\n return \"Timelock Condition\";\n case ConditionType.Expiration:\n return \"Expiration Condition\";\n case ConditionType.StateControllerAddress:\n return \"StateControllerAddress Condition\";\n case ConditionType.GovernorAddress:\n return \"GovernorAddress Condition\";\n case ConditionType.ImmutableAlias:\n return \"ImmutableAlias Condition\";\n default:\n return \"Unknown Condition Type\";\n }\n}\n\nexport function conditionToComponent(cond: \n AddressUnlockCondition |\n StorageDepositReturnUnlockCondition |\n TimelockUnlockCondition |\n ExpirationUnlockCondition) {\n switch (cond.type) {\n case ConditionType.Address:\n case ConditionType.StateControllerAddress:\n case ConditionType.GovernorAddress:\n return ;\n case ConditionType.StorageDepositReturn:\n return ;\n case ConditionType.Expiration:\n return ;\n case ConditionType.Timelock:\n return ;\n }\n}","import { FeatureIssuer, FeatureMetadata, FeatureTag } from \"app/components/Feature\";\nimport { Feature, IssuerFeature, MetadataFeature, TagFeature } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum FeatureType {\n Sender = 0,\n Issuer,\n Metadata,\n Tag,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case FeatureType.Sender:\n return \"Sender Feature\";\n case FeatureType.Issuer:\n return \"Issuer Feature\";\n case FeatureType.Metadata:\n return \"Metadata Feature\";\n case FeatureType.Tag:\n return \"Tag Feature\";\n default:\n return \"Unknown Feature Type\";\n }\n}\n\n\nexport function featureToComponent(feat: Feature) {\n switch (feat.type) {\n case FeatureType.Sender:\n case FeatureType.Issuer:\n return ;\n case FeatureType.Metadata:\n return ;\n case FeatureType.Tag:\n return ;\n }\n}","import {\n BasicOutput as BasicJSON,\n AliasOutput as AliasJSON,\n FoundryOutput as FoundryJSON,\n NFTOutput as NFTJSON,\n Output,\n} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport { BasicOutput } from \"app/components/BasicOutput\";\nimport { AliasOutput } from \"app/components/AliasOutput\";\nimport { FoundryOutput } from \"app/components/FoundryOutput\";\nimport { NFTOutput } from \"app/components/NFTOutput\";\n\nexport enum OutputType {\n Treasury = 2,\n Basic,\n Alias,\n Foundry,\n NFT,\n}\n\nexport function outputToComponent(output: Output) {\n let id = output.outputID\n switch (output.type) {\n case OutputType.Basic:\n return ;\n case OutputType.Alias:\n return ;\n case OutputType.Foundry:\n return ;\n case OutputType.NFT:\n return ;\n default:\n return;\n }\n}\n\n\nexport function outputTypeToName(type: number) {\n switch (type) {\n case OutputType.Basic:\n return \"Basic Output\";\n case OutputType.Alias:\n return \"Alias Output\";\n case OutputType.Foundry:\n return \"Foundry Output\";\n case OutputType.NFT:\n return \"NFT Output\";\n default:\n return;\n }\n}\n","import * as React from 'react';\nimport { NativeToken as NativeTokenJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\n\ninterface Props {\n token: NativeTokenJSON;\n}\n\nexport class NativeToken extends React.Component {\n render() {\n return (\n
\n \n ID: {this.props.token.id}\n Amount: {this.props.token.amount}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport { \n TimelockUnlockCondition, \n AddressUnlockCondition,\n StorageDepositReturnUnlockCondition,\nExpirationUnlockCondition} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface AddressProps { \n unlock: AddressUnlockCondition;\n}\n\nexport class UnlockConditionAddress extends React.Component {\n render() {\n return (\n
\n \n Address Type: {this.props.unlock.address.type}\n \n \n Address: {this.props.unlock.address.pubKeyHash}\n \n
\n );\n }\n}\n\ninterface TimelockProps { \n unlock: TimelockUnlockCondition;\n}\n\nexport class UnlockConditionTimelock extends React.Component {\n render() {\n\n return (\n this.props.unlock.unixTime &&\n
\n \n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}\n\ninterface StorageDepositReturnProps { \n unlock: StorageDepositReturnUnlockCondition;\n}\n\nexport class UnlockConditionStorageDepositReturn extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Amount: {this.props.unlock.amount}\n \n
\n );\n }\n}\n\ninterface ExpirationProps { \n unlock: ExpirationUnlockCondition;\n}\n\nexport class UnlockConditionExpiration extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}","import * as React from 'react';\nimport { \nIssuerFeature, MetadataFeature, TagFeature} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface IssuerProps { \n feature: IssuerFeature;\n}\n\nexport class FeatureIssuer extends React.Component {\n render() {\n return (\n
\n \n Address: {this.props.feature.address}\n \n
\n );\n }\n}\n\n\ninterface MetadataProps { \n feature: MetadataFeature;\n}\n\nexport class FeatureMetadata extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.data}\n \n
\n );\n }\n}\n\ninterface TagProps { \n feature: TagFeature;\n}\n\nexport class FeatureTag extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.tag}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {OutputID, BasicOutput as BasicOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: BasicOutputJSON\n id: OutputID;\n}\n\nexport class BasicOutput extends React.Component {\n render() {\n return (\n
\n \n Type: BasicOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {AliasOutput as AliasOutputJSON, OutputID} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: AliasOutputJSON\n id: OutputID;\n}\n\nexport class AliasOutput extends React.Component {\n render() {\n return (\n
\n \n Type: AliasOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n AliasID: {this.props.output.aliasId}\n StateIndex: {this.props.output.stateIndex}\n State Metadata: {this.props.output.stateMetadata} \n Foundry Counter: {this.props.output.foundryCounter}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n","import * as React from 'react';\nimport {OutputID, FoundryOutput as FoundryOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: FoundryOutputJSON\n id: OutputID;\n}\n\nexport class FoundryOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n Serial Number: {this.props.output.serialNumber}\n Token Scheme: {this.props.output.tokenScheme} \n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport {OutputID, NFTOutput as NFTOutputJSON} from \"../misc/Payload\";\nimport {conditionToComponent} from \"../utils/condition\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { featureToComponent } from 'app/utils/feature';\nimport { NativeToken } from './NativeToken';\n\ninterface Props {\n output: NFTOutputJSON\n id: OutputID;\n}\n\nexport class NFTOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n NFT ID: {this.props.output.nftId}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import { action, computed, observable } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport {\r\n BasicPayload,\r\n getPayloadType,\r\n Output,\r\n PayloadType,\r\n FaucetPayload,\r\n TransactionPayload,\r\n TaggedDataPayload,\r\n BasicOutput\r\n} from \"../misc/Payload\";\r\nimport * as React from \"react\";\r\nimport { Link } from 'react-router-dom';\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { OutputType } from 'app/utils/output';\r\n\r\nexport const GenesisBlockID = \"1111111111111111111111111111111111111111111111111111111111111111\";\r\nexport const GenesisTransactionID = \"11111111111111111111111111111111\";\r\n\r\nexport class Block {\r\n id: string;\r\n networkID: number;\r\n protocolVersion: number;\r\n solidificationTimestamp: number;\r\n issuanceTimestamp: number;\r\n sequenceNumber: number;\r\n issuerID: string;\r\n signature: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n strongChildren: Array;\r\n weakChildren: Array;\r\n shallowLikeChildren: Array;\r\n solid: boolean;\r\n spendIDs: Array;\r\n addedSpendIDs: Array;\r\n subtractedSpendIDs: Array;\r\n scheduled: boolean;\r\n booked: boolean;\r\n orphaned: boolean;\r\n objectivelyInvalid: boolean;\r\n subjectivelyInvalid: boolean;\r\n acceptance: boolean;\r\n acceptanceTime: number;\r\n confirmation: boolean;\r\n confirmationTime: number;\r\n confirmationBySlot: boolean;\r\n confirmationBySlotTime: number;\r\n payloadType: number;\r\n payload: any;\r\n txId: string;\r\n rank: number;\r\n sequenceID: number;\r\n isPastMarker: boolean;\r\n pastMarkerGap: number;\r\n pastMarkers: string;\r\n commitmentID: string\r\n commitment: Commitment;\r\n latestConfirmedSlot: number;\r\n}\r\n\r\nexport class Commitment {\r\n index: number;\r\n prevID: string;\r\n rootsID: string;\r\n cumulativeWeight: number;\r\n}\r\nexport class AddressResult {\r\n address: string;\r\n explorerOutputs: Array;\r\n}\r\n\r\nexport class ExplorerOutput {\r\n id: OutputID;\r\n output: Output;\r\n metadata: OutputMetadata\r\n txTimestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputID {\r\n base58: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class OutputMetadata {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n consumerCount: number;\r\n confirmedConsumer: string // tx id of confirmed consumer\r\n confirmationState: number\r\n confirmationStateTime: number\r\n}\r\n\r\nclass OutputConsumer {\r\n transactionID: string;\r\n valid: string;\r\n}\r\n\r\nclass OutputConsumers {\r\n outputID: OutputID;\r\n consumers: Array\r\n}\r\n\r\nclass TransactionMetadata {\r\n transactionID: string;\r\n spendIDs: string[];\r\n booked: boolean;\r\n bookedTime: number;\r\n confirmationState: string;\r\n confirmationStateTime: number;\r\n}\r\n\r\nclass PendingMana {\r\n mana: number;\r\n outputID: string;\r\n error: string;\r\n timestamp: number;\r\n}\r\n\r\nclass Conflict {\r\n id: string;\r\n parents: Array;\r\n spendIDs: Array;\r\n confirmationState: number;\r\n}\r\n\r\nclass ConflictChildren {\r\n conflictID: string;\r\n childConflicts: Array\r\n}\r\n\r\nclass ConflictChild {\r\n conflictID: string;\r\n type: string;\r\n}\r\n\r\nclass ConflictConflict {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n}\r\n\r\nclass ConflictConflicts {\r\n conflictID: string;\r\n conflicts: Array\r\n}\r\n\r\nclass ConflictVoters {\r\n conflictID: string;\r\n voters: Array\r\n}\r\n\r\nclass SlotInfo {\r\n id: string;\r\n index: number;\r\n rootsID: string;\r\n prevID: string;\r\n cumulativeWeight: number;\r\n blocks: Array;\r\n transactions: Array;\r\n createdOutputs: Array;\r\n spentOutputs: Array;\r\n}\r\n\r\nclass SearchResult {\r\n block: BlockRef;\r\n address: AddressResult;\r\n}\r\n\r\nclass BlockRef {\r\n id: string;\r\n payload_type: number;\r\n}\r\n\r\nclass Tips {\r\n tips: Array\r\n}\r\n\r\nconst liveFeedSize = 50;\r\n\r\nenum QueryError {\r\n NotFound = 1,\r\n BadRequest = 2\r\n}\r\n\r\nexport class ExplorerStore {\r\n // live feed\r\n @observable latest_blocks: Array = [];\r\n\r\n // queries\r\n @observable blk: Block = null;\r\n @observable addr: AddressResult = null;\r\n @observable tx: any = null;\r\n @observable txMetadata: any = null;\r\n @observable txAttachments: any = [];\r\n @observable output: any = null;\r\n @observable outputMetadata: OutputMetadata = null;\r\n @observable outputConsumers: OutputConsumers = null;\r\n @observable pendingMana: PendingMana = null;\r\n @observable conflict: Conflict = null;\r\n @observable conflictChildren: ConflictChildren = null;\r\n @observable conflictConflicts: ConflictConflicts = null;\r\n @observable conflictVoters: ConflictVoters = null;\r\n @observable tips: Tips = null;\r\n @observable slotInfo: SlotInfo = new SlotInfo;\r\n\r\n // loading\r\n @observable query_loading: boolean = false;\r\n @observable query_err: any = null;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n @observable search_result: SearchResult = null;\r\n @observable searching: boolean = false;\r\n @observable payload: any;\r\n @observable subpayload: any;\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Block, this.addLiveFeedBlock);\r\n }\r\n\r\n searchAny = async () => {\r\n this.updateSearching(true);\r\n try {\r\n let res = await fetch(`/api/search/${this.search}`);\r\n let result: SearchResult = await res.json();\r\n this.updateSearchResult(result);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n resetSearch = () => {\r\n this.search_result = null;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n updateSearchResult = (result: SearchResult) => {\r\n this.search_result = result;\r\n this.searching = false;\r\n let search = this.search;\r\n this.search = '';\r\n if (this.search_result.block) {\r\n this.routerStore.push(`/explorer/block/${search}`);\r\n return;\r\n }\r\n if (this.search_result.address) {\r\n this.routerStore.push(`/explorer/address/${search}`);\r\n return;\r\n }\r\n this.routerStore.push(`/explorer/404/${search}`);\r\n };\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search;\r\n };\r\n\r\n @action\r\n updateSearching = (searching: boolean) => this.searching = searching;\r\n\r\n searchBlock = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/block/${id}`)\r\n\r\n this.updateBlock(res);\r\n };\r\n\r\n searchAddress = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/address/${id}`)\r\n this.updateAddress(res);\r\n };\r\n\r\n getSlotDetails = async (id: string) => {\r\n await this.getSlotInfo(id);\r\n }\r\n\r\n @action\r\n getTransaction = async (id: string) => {\r\n const tx = await this.fetchJson(\"get\", `/api/transaction/${id}`)\r\n \r\n for (let i = 0; i < tx.inputs.length; i++) {\r\n let inputID = tx.inputs[i] ? tx.inputs[i].referencedOutputID.hex : GenesisBlockID\r\n try {\r\n let referencedOutputRes = await fetch(`/api/output/${inputID}`)\r\n if (referencedOutputRes.status === 404) {\r\n let genOutput = new Output();\r\n genOutput.output = new BasicOutput();\r\n genOutput.output.amount = 0;\r\n genOutput.type = OutputType.Basic;\r\n genOutput.outputID = tx.inputs[i].referencedOutputID;\r\n tx.inputs[i].output = genOutput;\r\n }\r\n if (referencedOutputRes.status === 200) {\r\n tx.inputs[i].output = await referencedOutputRes.json()\r\n }\r\n } catch (err) {\r\n // ignore\r\n }\r\n this.tx = tx;\r\n }\r\n }\r\n\r\n @action\r\n getTransactionAttachments = async (id: string) => {\r\n const attachments = await this.fetchJson(\"get\", `/api/transaction/${id}/attachments`)\r\n this.txAttachments = attachments;\r\n }\r\n\r\n @action\r\n getTransactionMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/transaction/${id}/metadata`)\r\n this.txMetadata = res;\r\n }\r\n\r\n @action\r\n getOutput = async (id: string) => {\r\n const output = await this.fetchJson(\"get\", `/api/output/${id}`)\r\n this.output = output;\r\n }\r\n\r\n @action\r\n getOutputMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/metadata`)\r\n this.outputMetadata = res;\r\n }\r\n\r\n @action\r\n getOutputConsumers = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/consumers`)\r\n this.outputConsumers = res;\r\n }\r\n\r\n @action\r\n getPendingMana = async (outputID: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/mana/pending?OutputID=${outputID}`)\r\n this.pendingMana = res;\r\n }\r\n\r\n @action\r\n getConflict = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}`)\r\n this.conflict = res;\r\n }\r\n\r\n @action\r\n getConflictChildren = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/children`)\r\n this.conflictChildren = res;\r\n }\r\n\r\n @action\r\n getConflictConflicts = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/conflicts`)\r\n this.conflictConflicts = res;\r\n }\r\n\r\n @action\r\n getConflictVoters = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/conflict/${id}/voters`)\r\n this.conflictVoters = res;\r\n }\r\n\r\n @action\r\n getSlotInfo = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/slot/commitment/${id}`)\r\n this.slotInfo = res;\r\n }\r\n\r\n @action\r\n getTips = async () => {\r\n const res = await this.fetchJson(\"get\", \"/api/tips\")\r\n this.tips = res;\r\n }\r\n\r\n @action\r\n reset = () => {\r\n this.blk = null;\r\n this.query_err = null;\r\n // reset all variables\r\n this.tx = null;\r\n this.txMetadata = null;\r\n this.txAttachments = [];\r\n this.output = null;\r\n this.outputMetadata = null;\r\n this.outputConsumers = null;\r\n this.pendingMana = null;\r\n this.conflict = null;\r\n this.conflictChildren = null;\r\n this.conflictConflicts = null;\r\n this.tips = null;\r\n this.slotInfo = new SlotInfo;\r\n };\r\n\r\n @action\r\n updateAddress = (addr: AddressResult) => {\r\n this.addr = addr;\r\n this.query_err = null;\r\n this.query_loading = false;\r\n };\r\n\r\n @action\r\n updateBlock = (blk: Block) => {\r\n this.blk = blk;\r\n this.blk.spendIDs = this.blk.spendIDs ? this.blk.spendIDs : []\r\n this.blk.addedSpendIDs = this.blk.addedSpendIDs ? this.blk.addedSpendIDs : []\r\n this.blk.subtractedSpendIDs = this.blk.subtractedSpendIDs ? this.blk.subtractedSpendIDs : []\r\n this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : []\r\n this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : []\r\n this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : []\r\n this.blk.strongParents = this.blk.strongParents ? this.blk.strongParents : []\r\n this.blk.weakParents = this.blk.weakParents ? this.blk.weakParents : []\r\n this.blk.shallowLikedParents = this.blk.shallowLikedParents ? this.blk.shallowLikedParents : []\r\n\r\n this.query_err = null;\r\n this.query_loading = false;\r\n switch (blk.payloadType) {\r\n case PayloadType.Transaction:\r\n this.payload = blk.payload as TransactionPayload\r\n break;\r\n case PayloadType.TaggedData:\r\n this.payload = blk.payload as TaggedDataPayload\r\n break;\r\n case PayloadType.Faucet:\r\n this.payload = blk.payload as FaucetPayload\r\n default:\r\n this.payload = blk.payload as BasicPayload\r\n break;\r\n }\r\n };\r\n\r\n @action\r\n updateQueryLoading = (loading: boolean) => this.query_loading = loading;\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.query_err = err;\r\n this.query_loading = false;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n addLiveFeedBlock = (blk: BlockRef) => {\r\n // prevent duplicates (should be fast with only size 10)\r\n if (this.latest_blocks.findIndex((t) => t.id == blk.id) === -1) {\r\n if (this.latest_blocks.length >= liveFeedSize) {\r\n this.latest_blocks.shift();\r\n }\r\n this.latest_blocks.push(blk);\r\n }\r\n };\r\n\r\n @computed\r\n get blksLiveFeed() {\r\n let feed = [];\r\n for (let i = this.latest_blocks.length - 1; i >= 0; i--) {\r\n let blk = this.latest_blocks[i];\r\n feed.push(\r\n \r\n \r\n \r\n {blk.id}\r\n \r\n \r\n \r\n {getPayloadType(blk.payload_type)}\r\n \r\n \r\n );\r\n }\r\n return feed;\r\n }\r\n\r\n @computed\r\n get tipsList() {\r\n let list = [];\r\n if (this.tips) {\r\n for (let i = 0; i < this.tips.tips.length; i++) {\r\n let blkId = this.tips.tips[i];\r\n list.push(\r\n \r\n \r\n \r\n {blkId}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return list;\r\n }\r\n\r\n async fetchJson(\r\n method: 'get' | 'delete',\r\n route: string,\r\n requestData?: T\r\n ): Promise {\r\n\r\n const body = requestData ? JSON.stringify(requestData, function (_, v) {\r\n // keep Uint8Array as it is\r\n if (v instanceof Uint8Array) {\r\n return Array.from(v);\r\n }\r\n return v;\r\n })\r\n : undefined;\r\n\r\n const response = await fetch(`${route}`, {\r\n method,\r\n headers: { 'Content-Type': 'application/json' },\r\n body\r\n });\r\n\r\n if (response.ok) {\r\n const responseData: U = await response.json();\r\n return responseData;\r\n }\r\n\r\n switch (response.status) {\r\n case 404:\r\n this.updateQueryError(QueryError.NotFound);\r\n break;\r\n case 400:\r\n this.updateQueryError(QueryError.BadRequest);\r\n break;\r\n default:\r\n this.updateQueryError('unexpected error')\r\n break;\r\n }\r\n return {} as U;\r\n }\r\n}\r\n\r\nexport default ExplorerStore;\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class BasicPayload extends React.Component {\r\n\r\n render() {\r\n let {payload} = this.props.explorerStore;\r\n return (\r\n payload &&\r\n \r\n \r\n \r\n {payload.content_title}: {' '} \r\n {payload.content}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum SignatureType {\n Ed25519 = 0,\n BLS = 1,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case SignatureType.Ed25519:\n return \"Ed25519 Signature\";\n case SignatureType.BLS:\n return \"BLS Signature\";\n default:\n return \"Unknown Signature Type\";\n }\n}","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport { Col, ListGroup } from 'react-bootstrap';\nimport { SignatureEd25519 } from 'app/misc/Payload';\n\ninterface Props {\n signature?: SignatureEd25519;\n}\n\nexport class Ed25519Signature extends React.Component {\n\n render() {\n let signature = this.props.signature;\n return (\n \n \n \n \n Public Key: {signature.publicKey}\n Signature: {signature.signature}\n \n \n \n \n );\n }\n}\n","import {UnlockBlock as unlockBlockJSON} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport Badge from \"react-bootstrap/Badge\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {SignatureType, resolveSignatureType} from \"../utils/unlock_block\";\nimport { Ed25519Signature } from \"./Ed25519Signature\";\n\ninterface UnlockProps {\n block: unlockBlockJSON;\n key: number;\n}\n\nexport class UnlockBlock extends React.Component {\n renderSignatureComponent() {\n switch (this.props.block.signatureType) {\n case SignatureType.Ed25519:\n return \n }\n }\n\n render() {\n let block = this.props.block;\n return (\n \n \n Index: {this.props.key}\n \n Type: {block.type}\n {\n block.signatureType && Signature Type: {resolveSignatureType(block.signatureType)}\n } \n {\n this.renderSignatureComponent()\n } \n \n \n \n );\n }\n}","import * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {outputToComponent} from \"../utils/output\";\nimport {IconContext} from \"react-icons\";\nimport {FaChevronCircleRight} from \"react-icons/fa\";\nimport {UnlockBlock} from \"./UnlockBlock\";\nimport {TransactionPayload} from \"../misc/Payload\";\n\nconst style = {\n maxHeight: \"1000px\",\n overflow: \"auto\",\n width: \"47%\",\n fontSize: \"85%\",\n}\n\ninterface Props {\n txID?: string;\n tx?: TransactionPayload;\n}\n\nexport class Transaction extends React.Component {\n render() {\n let txID = this.props.txID;\n let tx = this.props.tx;\n return (\n tx && txID &&\n
\n

Transaction

\n

{txID}

\n \n \n
Transaction Essence
\n \n ID: {txID}\n Network ID: {tx.networkId}\n Creation Time: {tx.creationSlot}\n \n
\n
\n Inputs\n
\n {tx.inputs.map((input, i) => {\n return (\n
\n Index: {i}\n
\n \n Output ID: {input.referencedOutputID.hex}\n \n
\n
\n )\n })}\n
\n \n
\n \n
\n
\n
\n Outputs\n
\n {tx.outputs.map((output, i) => {\n return (\n
\n Index: {i}\n {outputToComponent(output)}\n
\n )\n })}\n
\n
\n
\n { tx.payload && Data payload: {tx.payload}}\n
\n \n
\n \n \n
Unlock Blocks
\n \n {\n tx.unlocks.map((block,index) => (\n \n ))}\n \n \n
\n
\n );\n }\n}","import * as React from 'react';\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\r\nimport {Transaction} from \"./Transaction\";\r\n// import {ExplorerTransactionMetadata} from \"./ExplorerTransactionMetadata\";\r\nimport Container from \"react-bootstrap/Container\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class TransactionPayload extends React.Component {\r\n render() {\r\n let {payload, blk} = this.props.explorerStore;\r\n let txID = blk.txId;\r\n let tx = payload;\r\n\r\n return (\r\n \r\n {/* */}\r\n \r\n \r\n );\r\n }\r\n}\r\n","export function resolveBase58ConflictID(base58Conflict: string): string {\n switch (base58Conflict) {\n case MasterConflictInBase58:\n return \"MasterConflictID\";\n case UndefinedConflictInBase58:\n return \"UndefinedConflictID\";\n case LazyBookedConflictsConflictInBase58:\n return \"LazyBookedConflictsConflictID\";\n case InvalidConflictInBase58:\n return \"InvalidConflictID\";\n default:\n // otherwise it is a \"regular\" conflictID that doesn't have a distinct name\n return base58Conflict\n }\n}\n\n// base58 conflictIDs that have distinct names\nconst MasterConflictInBase58 = \"4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM\"\nconst UndefinedConflictInBase58 = \"11111111111111111111111111111111\"\nconst LazyBookedConflictsConflictInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF\"\nconst InvalidConflictInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG\"","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport {inject, observer} from \"mobx-react\";\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class FaucetPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n return (\n payload &&\n \n \n \n \n \n Address: {payload.address}\n \n \n Access Mana Pledge ID: {payload.accessManaPledgeID}\n \n \n Consensus Mana Pledge ID: {payload.consensusManaPledgeID}\n \n \n Nonce: {payload.nonce}\n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport { Col, ListGroup } from 'react-bootstrap';\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class TaggedDataPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n \n return (\n payload &&\n \n \n \n \n Tag: {payload.tag}\n Data: {payload.data}\n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport ExplorerStore, { GenesisBlockID } from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport * as dateformat from 'dateformat';\r\nimport { Link } from 'react-router-dom';\r\nimport { BasicPayload } from './BasicPayload'\r\nimport { TransactionPayload } from './TransactionPayload'\r\nimport { getPayloadType, PayloadType } from '../misc/Payload'\r\nimport { resolveBase58ConflictID } from \"../utils/conflict\";\r\nimport { FaucetPayload } from './FaucetPayload';\r\nimport { TaggedDataPayload } from './TaggedDataPayload';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerBlockQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.explorerStore.reset();\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n getPayloadType() {\r\n return getPayloadType(this.props.explorerStore.blk.payloadType)\r\n }\r\n\r\n renderPayload() {\r\n switch (this.props.explorerStore.blk.payloadType) {\r\n case PayloadType.Transaction:\r\n if (!this.props.explorerStore.blk.objectivelyInvalid) {\r\n return \r\n }\r\n return \r\n case PayloadType.TaggedData:\r\n return \r\n case PayloadType.Faucet:\r\n return \r\n default:\r\n return \r\n }\r\n }\r\n\r\n render() {\r\n let { id } = this.props.match.params;\r\n let { blk, query_loading, query_err } = this.props.explorerStore;\r\n\r\n if (id === GenesisBlockID) {\r\n return (\r\n \r\n

Genesis Block

\r\n

In the beginning there was the genesis.

\r\n
\r\n );\r\n }\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Block not available - 404

\r\n

\r\n Block with ID {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n return (\r\n \r\n

Block

\r\n

\r\n {id} {' '}\r\n {\r\n blk &&\r\n \r\n
\r\n \r\n \r\n Issuance Time: {dateformat(new Date(blk.issuanceTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Solidification Time: {dateformat(new Date(blk.solidificationTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n
\r\n }\r\n

\r\n {\r\n blk &&\r\n \r\n \r\n \r\n \r\n \r\n Payload Type: {this.getPayloadType()}\r\n \r\n \r\n Sequence Number: {blk.sequenceNumber}\r\n \r\n \r\n spendIDs:\r\n \r\n {\r\n blk.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n AddedspendIDs:\r\n \r\n {\r\n blk.addedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n SubtractedspendIDs:\r\n \r\n {\r\n blk.subtractedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n Solid: {blk.solid ? 'Yes' : 'No'}\r\n \r\n \r\n Scheduled: {blk.scheduled ? 'Yes' : 'No'}\r\n \r\n \r\n Booked: {blk.booked ? 'Yes' : 'No'}\r\n \r\n \r\n Orphaned: {blk.orphaned ? 'Yes' : 'No'}\r\n \r\n \r\n Objectively Invalid: {blk.objectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Subjectively Invalid: {blk.subjectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance: {blk.acceptance ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance\r\n Time: {dateformat(new Date(blk.acceptanceTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation: {blk.confirmation ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation\r\n Time: {dateformat(new Date(blk.confirmationTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation by slot: {blk.confirmationBySlot ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation by slot\r\n time: {dateformat(new Date(blk.confirmationBySlotTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n
Slot Commitment
\r\n \r\n \r\n CommitmentID: {blk.commitmentID}\r\n \r\n \r\n \r\n \r\n Index: {blk.commitment.index}\r\n \r\n \r\n prevID: {blk.commitment.prevID}\r\n \r\n \r\n rootsID: {blk.commitment.rootsID}\r\n \r\n \r\n Cumulative Weight: {blk.commitment.cumulativeWeight}\r\n \r\n \r\n \r\n \r\n LatestConfirmedSlot: {blk.latestConfirmedSlot}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n {\r\n !!blk.rank &&\r\n \r\n \r\n
Markers
\r\n \r\n \r\n Rank: {blk.rank}\r\n \r\n \r\n SequenceID: {blk.sequenceID}\r\n \r\n \r\n PastMarkerGap: {blk.pastMarkerGap}\r\n \r\n \r\n IsPastMarker: {blk.isPastMarker ? 'Yes' : 'No'}\r\n \r\n \r\n Past markers: {blk.pastMarkers}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n\r\n \r\n \r\n \r\n \r\n IssuerID: {blk.issuerID}\r\n \r\n \r\n Block Signature: {blk.signature}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongParents.map((value, index) => {\r\n return (\r\n \r\n Strong Parents {index + 1}: {' '}\r\n \r\n {blk.strongParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.weakParents.map((value, index) => {\r\n return (\r\n \r\n Weak Parents {index + 1}: {' '}\r\n \r\n {blk.weakParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.shallowLikedParents.map((value, index) => {\r\n return (\r\n \r\n Shallow Liked Parents {index + 1}: {' '}\r\n \r\n {blk.shallowLikedParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongChildren.map((value, index) => {\r\n return (\r\n \r\n Strong Child {index + 1}: {' '}\r\n \r\n {blk.strongChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.weakChildren.map((value, index) => {\r\n return (\r\n \r\n Weak Child {index + 1}: {' '}\r\n \r\n {blk.weakChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.shallowLikeChildren.map((value, index) => {\r\n return (\r\n \r\n ShallowLike Child {index + 1}: {' '}\r\n \r\n {blk.shallowLikeChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n

Payload

\r\n \r\n
\r\n \r\n \r\n {this.renderPayload()}\r\n \r\n \r\n
\r\n }\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","export function displayManaUnit(mana: number): string {\n let result = \"\"\n // round to nearest integer\n let roundedMana = Math.round(mana);\n if (roundedMana < 1000) {\n result = roundedMana.toString(10) + \" m\"; // mana\n } else if (roundedMana < 1000000) {\n result = (roundedMana / 1000).toFixed(3) + \" Km\"; // kilomana\n }\n else if (roundedMana < 1000000000) {\n result = (roundedMana / 1000000).toFixed(3) + \" Mm\"; // megamana\n }\n else if (roundedMana < 1000000000000) {\n result = (roundedMana / 1000000000).toFixed(3) + \" Gm\"; // gigamana\n }\n else if (roundedMana < 1000000000000000) {\n result = (roundedMana / 1000000000000).toFixed(3) + \" Tm\"; // terramana\n } else {\n result = (roundedMana / 1000000000000000).toFixed(3) + \" Pm\"; // petamana\n }\n return result\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore, ExplorerOutput, OutputMetadata} from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Alert from \"react-bootstrap/Alert\";\r\nimport {Link} from 'react-router-dom';\r\nimport {displayManaUnit} from \"../utils\";\r\nimport {OutputType, outputToComponent, outputTypeToName} from \"../utils/output\";\r\nimport {Button, ListGroupItem} from \"react-bootstrap\";\r\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerAddressQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n let {id} = this.props.match.params;\r\n let {addr, query_loading, query_err} = this.props.explorerStore;\r\n // spent outputs\r\n let spent: Array = [];\r\n // unspent outputs\r\n let unspent: Array = [];\r\n let available_balances = [];\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Address not available - 404

\r\n

\r\n Address {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n\r\n if (addr) {\r\n // separate spent from unspent\r\n addr.explorerOutputs.forEach((o) => {\r\n if (o.metadata.consumerCount > 0) {\r\n spent.push(o);\r\n } else {\r\n unspent.push(o);\r\n }\r\n })\r\n\r\n let timestampCompareFn = (a: ExplorerOutput, b: ExplorerOutput) => {\r\n if (b.txTimestamp === a.txTimestamp) {\r\n // outputs have the same timestamp\r\n if (b.id.transactionID == a.id.transactionID) {\r\n // outputs belong to the same tx, sort based on index\r\n return b.id.outputIndex - a.id.outputIndex;\r\n }\r\n // same timestamp, but different tx\r\n return b.id.transactionID.localeCompare(a.id.transactionID);\r\n }\r\n return b.txTimestamp - a.txTimestamp;\r\n }\r\n\r\n // sort outputs\r\n unspent.sort(timestampCompareFn)\r\n spent.sort(timestampCompareFn)\r\n }\r\n return (\r\n \r\n

Address {id} {addr !== null && ({addr.explorerOutputs.length} Outputs)}

\r\n {\r\n addr !== null ?\r\n \r\n {\r\n addr.explorerOutputs !== null && addr.explorerOutputs.length === 100 &&\r\n \r\n Max. 100 outputs are shown.\r\n \r\n }\r\n \r\n \r\n \r\n

Available Balances

\r\n {available_balances.length === 0? \"There are no balances currently available.\" :
\r\n \r\n \r\n \r\n Color\r\n \r\n \r\n Balance\r\n \r\n \r\n \r\n {available_balances}\r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Unspent Outputs

\r\n {unspent.length === 0? \"There are no unspent outputs currently available.\" :
\r\n {unspent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Spent Outputs

\r\n {spent.length === 0? \"There are no spent outputs currently available.\" :
\r\n {spent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\ninterface oProps {\r\n output: ExplorerOutput;\r\n}\r\n\r\nclass OutputButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n enabled: false\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n { this.setState({enabled: !this.state.enabled})}}\r\n block\r\n >\r\n \r\n {this.props.output.id.base58} \r\n {outputTypeToName(this.props.output.output.type)} \r\n {new Date(this.props.output.txTimestamp * 1000).toLocaleString()}\r\n \r\n \r\n \r\n \r\n {\r\n this.state.enabled? outputToComponent(this.props.output.output): null\r\n }\r\n \r\n \r\n {\r\n this.state.enabled? : null\r\n }\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\ninterface omProps {\r\n metadata: OutputMetadata;\r\n timestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputMeta extends React.Component {\r\n render() {\r\n let metadata = this.props.metadata;\r\n let timestamp = this.props.timestamp;\r\n let pendingMana = this.props.pendingMana;\r\n return (\r\n \r\n spendIDs: \r\n \r\n {\r\n metadata.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58ConflictID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n Pending mana: {displayManaUnit(pendingMana)}\r\n Timestamp: {new Date(timestamp * 1000).toLocaleString()}\r\n Consumer Count: {metadata.consumerCount}\r\n { metadata.confirmedConsumer && Confirmed Consumer: {metadata.confirmedConsumer} }\r\n \r\n );\r\n }\r\n}\r\n\r\nlet getVariant = (outputType: number) => {\r\n switch (outputType) {\r\n case OutputType.Basic:\r\n return \"light\";\r\n case OutputType.Alias:\r\n return \"light\";\r\n case OutputType.Foundry:\r\n return \"success\";\r\n case OutputType.NFT:\r\n return \"info\";\r\n default:\r\n return \"danger\";\r\n }\r\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n search: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class Explorer404 extends React.Component {\r\n\r\n render() {\r\n let {search} = this.props.match.params;\r\n return (\r\n \r\n

Tangle Explorer 404

\r\n

\r\n The search via '{search}' did not yield any results.\r\n

\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport * as prettysize from 'prettysize';\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport {Line} from \"react-chartjs-2\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n identity: string;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbor extends React.Component {\r\n render() {\r\n let neighborMetrics = this.props.nodeStore.neighbor_metrics.get(this.props.identity);\r\n let last = neighborMetrics.current;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {last.id}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Origin:\r\n {' '}\r\n {last.connection_origin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Address: {last.address}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Network (Tx/Rx)
\r\n \r\n {'Total: '}\r\n {last.packets_written}\r\n {' / '}\r\n {last.packets_read}\r\n \r\n {' '}\r\n \r\n {'Current: '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.tx)}\r\n {' / '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.rx)}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Neighbor} from \"./Neighbor\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbors extends React.Component {\r\n render() {\r\n let neighborsEle = [];\r\n this.props.nodeStore.neighbor_metrics.forEach((v, k) => {\r\n neighborsEle.push();\r\n });\r\n return (\r\n \r\n

Neighbors {neighborsEle.length > 0 && ({neighborsEle.length})}

\r\n

\r\n Currently connected neighbors.\r\n

\r\n {neighborsEle}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { KeyboardEvent } from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport { Link } from 'react-router-dom';\r\nimport VisualizerStore from \"../stores/VisualizerStore\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Popover from \"react-bootstrap/Popover\";\r\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\r\n\r\ninterface Props {\r\n visualizerStore?: VisualizerStore;\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"visualizerStore\")\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Visualizer extends React.Component {\r\n\r\n componentDidMount(): void {\r\n this.props.visualizerStore.start();\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.props.visualizerStore.stop();\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n updateVerticesLimit = (e) => {\r\n this.props.visualizerStore.updateVerticesLimit(e.target.value);\r\n }\r\n\r\n pauseResumeVisualizer = (e) => {\r\n this.props.visualizerStore.pauseResume();\r\n }\r\n\r\n updateSearch = (e) => {\r\n this.props.visualizerStore.updateSearch(e.target.value);\r\n }\r\n\r\n searchAndHighlight = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.visualizerStore.searchAndHighlight();\r\n }\r\n\r\n toggleBackgroundDataCollection = () => {\r\n if (this.props.nodeStore.collecting) {\r\n this.props.nodeStore.unregisterHandlers();\r\n return;\r\n }\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n render() {\r\n let {\r\n vertices, finalized_count, selected,\r\n verticesLimit, tips_count, paused, search\r\n } = this.props.visualizerStore;\r\n let { last_mps_metric, collecting } = this.props.nodeStore;\r\n\r\n return (\r\n \r\n

Visualizer

\r\n \r\n \r\n \r\n \r\n Vertices Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n Search Vertex\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ensures that only data needed for the visualizer is collected.\r\n \r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Pauses/resumes rendering the graph.\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n BLK Pending\r\n \r\n {' '}\r\n \r\n BLK Confirmed\r\n \r\n {' '}\r\n \r\n TX Pending\r\n \r\n {' '}\r\n \r\n TX Confirmed\r\n \r\n {' '}\r\n \r\n Tip\r\n \r\n {' '}\r\n \r\n Unknown\r\n \r\n
\r\n Vertices: {vertices.size}, Tips: {tips_count},\r\n Confirmed/UnConfirmed: {finalized_count}/{vertices.size - finalized_count},{' '}\r\n BPS: {last_mps_metric.mps}\r\n
\r\n Selected: {selected ?\r\n \r\n {selected.id.substr(0, 10)}\r\n \r\n : \"-\"}\r\n
\r\n {\r\n selected ? selected.strongParents &&\r\n Strong:{' '}\r\n {selected.strongParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.weakParents &&\r\n Weak:{' '}\r\n {selected.weakParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.shallowLikedParents &&\r\n Shallow Liked:{' '}\r\n {selected.shallowLikedParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n

\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Table from \"react-bootstrap/Table\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class Tips extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTips();\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {tipsList} = this.props.explorerStore;\n return (\n \n

Tips

\n \n \n \n \n \n \n \n {tipsList}\n \n
BlockID
\n
\n );\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport {Transaction} from \"./Transaction\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransaction extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransaction(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, tx } = this.props.explorerStore;\n if (query_err) {\n return (\n \n

Transaction not available - 404

\n

\n Transaction with ID {txId} not found.\n

\n
\n );\n }\n return \n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n// import {resolveBase58ConflictID} from \"../utils/conflict\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionMetadata extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionMetadata(this.props.txId);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, txMetadata } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Metadata

\n

Metadata for transaction ID {txId} not found.

\n
\n );\n }\n return (\n
\n

Metadata

\n {txMetadata && \n \n ConflictIDs: \n \n { \n txMetadata.conflictIDs && txMetadata.conflictIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n \n Booked: {txMetadata.booked.toString()}\n {/* Booked time: {new Date(txMetadata.bookedTime * 1000).toLocaleString()} */}\n Confirmation State: {txMetadata.confirmationState}\n {/* Confirmation State Time: {new Date(txMetadata.confirmationStateTime * 1000).toLocaleString()} */}\n }\n
\n )\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionAttachments extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionAttachments(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txAttachments } = this.props.explorerStore;\n return (\n
\n

Attachments

\n {txAttachments && txAttachments.blockIDs && \n \n \n {txAttachments.blockIDs.map((blkId, i) => {\n return {blkId}\n })}\n \n \n }\n
\n )\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { ExplorerTransaction } from \"./ExplorerTransaction\"\nimport { ExplorerTransactionMetadata } from \"./ExplorerTransactionMetadata\"\nimport { ExplorerTransactionAttachments } from \"./ExplorerTransactionAttachments\"\n\n\ninterface Props {\n match?: {\n params: {\n id: string,\n }\n }\n}\n\nexport class ExplorerTransactionQueryResult extends React.Component {\n render() {\n let { id } = this.props.match.params;\n return (\n \n \n \n \n \n )\n }\n}","export enum ConfirmationState {\n Undefined = 0,\n Rejected,\n Pending,\n Accepted,\n Confirmed,\n}\n\nexport function resolveConfirmationState(sigType: number) {\n switch (sigType) {\n case ConfirmationState.Undefined:\n return \"Undefined\";\n case ConfirmationState.Rejected:\n return \"Rejected\";\n case ConfirmationState.Pending:\n return \"Pending\";\n case ConfirmationState.Accepted:\n return \"Accepted\";\n case ConfirmationState.Confirmed:\n return \"Confirmed\";\n default:\n return \"Undefined Confirmation State\";\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {Link} from 'react-router-dom';\nimport {displayManaUnit} from \"../utils\";\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\nimport {outputToComponent} from \"../utils/output\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getOutput(this.props.match.params.id);\n this.props.explorerStore.getPendingMana(this.props.match.params.id);\n this.props.explorerStore.getOutputMetadata(this.props.match.params.id);\n this.props.explorerStore.getOutputConsumers(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, output, pendingMana, outputMetadata, outputConsumers } = this.props.explorerStore;\n\n let renderTriBool = (val: string) => {\n if (val === \"true\"){\n return True\n }\n if (val === \"false\"){\n return False\n }\n return Maybe\n }\n\n if (query_err) {\n return (\n \n

Output not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Output

\n {output &&
\n {outputToComponent(output)}\n \n {pendingMana && \n Pending Mana\n
\n
Value: {displayManaUnit(pendingMana.mana)}
\n
Timestamp: {new Date(pendingMana.timestamp * 1000).toLocaleString()}
\n
}\n
\n
}\n\n

Metadata

\n {outputMetadata &&
\n \n Transaction ID: {outputMetadata.outputID.transactionID} \n spendIDs: \n \n {\n outputMetadata.spendIDs.map((value, index) => {\n return (\n \n \n {resolveBase58ConflictID(value)}\n \n \n )\n })\n }\n \n Consumer Count: {outputMetadata.consumerCount}\n Confirmed Consumer: {outputMetadata.confirmedConsumer} \n Confirmation State: {resolveConfirmationState(outputMetadata.confirmationState)}\n Confirmation State Time: {new Date(outputMetadata.confirmationStateTime * 1000).toLocaleString()}\n \n
}\n\n

Consumers

\n {outputConsumers &&
\n \n {outputConsumers.consumers.map((c,i) => \n
Transaction ID: {c.transactionID}
\n
Valid: {renderTriBool(c.valid)}
\n
)}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {resolveBase58ConflictID} from \"../utils/conflict\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerConflictQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getConflict(this.props.match.params.id);\n this.props.explorerStore.getConflictChildren(this.props.match.params.id);\n this.props.explorerStore.getConflictConflicts(this.props.match.params.id);\n this.props.explorerStore.getConflictVoters(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, conflict, conflictChildren, conflictConflicts, conflictVoters } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Conflict not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Conflict

\n {conflict && \n ID: {resolveBase58ConflictID(conflict.id)}\n Parents:\n \n {conflict.parents.map((p,i) => {resolveBase58ConflictID(p)})}\n \n \n {Conflicts:\n {conflict.spendIDs && \n {conflict.spendIDs.map((c,i) => {c})}\n }\n }\n ConfirmationState: {resolveConfirmationState(conflict.confirmationState)}\n Children:\n {conflictChildren && \n {conflictChildren.childConflicts.map((c,i) => {resolveBase58ConflictID(c.conflictID)})}\n }\n \n { Conflicts:\n {conflictConflicts && \n {conflictConflicts.conflicts.map((c,i) =>
\n OutputID: {c.outputID.base58}\n \n {c.spendIDs.map((b,j) => \n {resolveBase58ConflictID(b)}\n )}\n \n
)}\n
}\n
}\n Voters:\n {conflictVoters && \n {conflictVoters.voters.map((s,i) => {s})}\n }\n \n
}\n
\n )\n }\n}\n","import { SlotStore } from '../stores/SlotStore';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from '../stores/NodeStore';\nimport * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { Table } from 'react-bootstrap';\n\ninterface Props {\n history: any;\n nodeStore?: NodeStore;\n slotStore?: SlotStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"slotStore\")\n@observer\nexport class SlotLiveFeed extends React.Component {\n render() {\n let {slotLiveFeed} = this.props.slotStore;\n return (\n \n

Slots

\n \n \n \n \n \n \n \n \n {slotLiveFeed}\n \n
IndexCommitment ID
\n
\n );\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { Card, Col, Row, Table } from 'react-bootstrap';\n\n\ninterface Props {\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n commitment: string,\n }\n }\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSlotQueryResult extends React.Component {\n componentDidMount() {\n const id = this.props.match.params.commitment;\n this.props.explorerStore.getSlotDetails(id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n\n render() {\n let {commitment} = this.props.match.params;\n let { query_err, slotInfo } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Slot not found - 404

\n {commitment}\n
\n );\n }\n return (\n \n

Slot

\n {slotInfo && \n ID: {commitment}\n Index: {slotInfo.index}\n RootsID: {slotInfo.rootsID}\n PrevEC: {slotInfo.prevID}\n Cumulative Weight: {slotInfo.cumulativeWeight}\n Blocks:\n {slotInfo.blocks && \n \n \n \n \n \n {slotInfo.blocks.map((b,i) => {b})}\n \n
\n \n
\n
\n
}\n
\n Transactions:\n {slotInfo.transactions && \n \n \n \n \n \n {slotInfo.transactions.map((t,i) => {t})}\n \n
\n \n
\n
\n
}\n
\n Created outputs:\n {slotInfo.createdOutputs && \n \n \n \n \n \n {slotInfo.createdOutputs.map((c,i) => {c})}\n \n
\n \n
\n
\n
}\n
\n Spent outputs:\n {slotInfo.spentOutputs && \n \n \n \n \n \n {slotInfo.spentOutputs.map((s,i) => {s})}\n \n
\n \n
\n
\n
}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from \"../stores/NodeStore\";\nimport Navbar from \"react-bootstrap/Navbar\";\nimport Nav from \"react-bootstrap/Nav\";\nimport {Dashboard} from \"./Dashboard\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {RouterStore} from 'mobx-react-router';\nimport {Explorer} from \"./Explorer\";\nimport {NavExplorerSearchbar} from \"./NavExplorerSearchbar\";\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {LinkContainer} from 'react-router-bootstrap';\nimport {ExplorerBlockQueryResult} from \"./ExplorerBlockQueryResult\";\nimport {ExplorerAddressQueryResult} from \"./ExplorerAddressResult\";\nimport {Explorer404} from \"./Explorer404\";\nimport {Neighbors} from \"./Neighbors\";\nimport {Visualizer} from \"./Visualizer\";\nimport {Tips} from \"./Tips\";\nimport {ExplorerTransactionQueryResult} from \"./ExplorerTransactionQueryResult\";\nimport {ExplorerOutputQueryResult} from \"./ExplorerOutputQueryResult\";\nimport {ExplorerConflictQueryResult} from \"./ExplorerConflictQueryResult\";\nimport { SlotLiveFeed } from './SlotLiveFeed';\nimport { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult';\n\ninterface Props {\n history: any;\n routerStore?: RouterStore;\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"routerStore\")\n@observer\nexport class Root extends React.Component {\n renderDevTool() {\n if (process.env.NODE_ENV !== 'production') {\n const DevTools = require('mobx-react-devtools').default;\n return ;\n }\n }\n\n componentDidMount(): void {\n this.props.nodeStore.connect();\n }\n\n render() {\n return (\n
\n \n iota-core\n \n \n \n \n {!this.props.nodeStore.websocketConnected &&\n WS not connected!\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.children}\n {this.renderDevTool()}\n
\n );\n }\n}\n","import * as React from 'react';\nimport {hot} from 'react-hot-loader/root';\nimport {Root} from './components/Root';\n\n// render react DOM\nexport const App = hot(({history}) => );\n","import {action, computed, observable, ObservableMap} from 'mobx';\r\nimport * as dateformat from 'dateformat';\r\nimport {connectWebSocket, registerHandler, unregisterHandler, WSMsgType} from \"../misc/WS\";\r\n\r\nclass BPSMetric {\r\n mps: number;\r\n ts: string;\r\n}\r\n\r\nclass Status {\r\n id: string;\r\n version: string;\r\n uptime: number;\r\n mem: MemoryMetrics = new MemoryMetrics();\r\n tangleTime: TangleTime;\r\n scheduler: SchedulerMetric = new SchedulerMetric();\r\n}\r\n\r\nclass TangleTime {\r\n synced: boolean;\r\n bootstrapped: boolean;\r\n ATT: number;\r\n RATT: number;\r\n CTT: number;\r\n RCTT: number;\r\n acceptedBlockID: string;\r\n confirmedBlockID: string;\r\n confirmedSlot: number;\r\n committedSlot: number;\r\n}\r\n\r\nclass MemoryMetrics {\r\n heap_sys: number;\r\n heap_alloc: number;\r\n heap_idle: number;\r\n heap_released: number;\r\n heap_objects: number;\r\n last_pause_gc: number;\r\n num_gc: number;\r\n ts: string;\r\n}\r\n\r\nclass TipsMetric {\r\n totaltips: number;\r\n ts: string;\r\n}\r\n\r\nclass NetworkIO {\r\n tx: number;\r\n rx: number;\r\n ts: string;\r\n}\r\n\r\nclass RateSetterMetric {\r\n size: number;\r\n estimate: string;\r\n rate: number;\r\n ts: string;\r\n}\r\n\r\nclass SchedulerMetric {\r\n running: number;\r\n rate: string;\r\n maxBufferSize: number;\r\n currentBufferSize: number;\r\n deficit: number;\r\n ts: string;\r\n\r\n}\r\n\r\nclass NeighborMetrics {\r\n @observable collected: Array = [];\r\n @observable network_io: Array = [];\r\n\r\n addMetric(metric: NeighborMetric) {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.collected.push(metric);\r\n if (this.collected.length > maxMetricsDataPoints) {\r\n this.collected.shift();\r\n }\r\n let netIO = this.currentNetIO;\r\n if (netIO) {\r\n if (this.network_io.length > maxMetricsDataPoints) {\r\n this.network_io.shift();\r\n }\r\n this.network_io.push(netIO);\r\n }\r\n }\r\n\r\n get current() {\r\n return this.collected[this.collected.length - 1];\r\n }\r\n\r\n get secondLast() {\r\n let index = this.collected.length - 2;\r\n if (index < 0) {\r\n return\r\n }\r\n return this.collected[index];\r\n }\r\n\r\n get currentNetIO(): NetworkIO {\r\n if (this.current && this.secondLast) {\r\n return {\r\n tx: this.current.packets_written - this.secondLast.packets_written,\r\n rx: this.current.packets_read - this.secondLast.packets_read,\r\n ts: dateformat(new Date(), \"HH:MM:ss\"),\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n @computed\r\n get netIOSeries() {\r\n let tx = Object.assign({}, chartSeriesOpts,\r\n series(\"Tx\", 'rgba(53, 180, 219,1)', 'rgba(53, 180, 219,0.4)')\r\n );\r\n let rx = Object.assign({}, chartSeriesOpts,\r\n series(\"Rx\", 'rgba(235, 134, 52)', 'rgba(235, 134, 52,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.network_io.length; i++) {\r\n let metric: NetworkIO = this.network_io[i];\r\n labels.push(metric.ts);\r\n tx.data.push(metric.tx);\r\n rx.data.push(-metric.rx);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [tx, rx],\r\n };\r\n }\r\n}\r\n\r\nclass NeighborMetric {\r\n id: string;\r\n address: string;\r\n connection_origin: number;\r\n packets_read: number;\r\n packets_written: number;\r\n ts: number;\r\n}\r\n\r\nclass ComponentCounterMetric {\r\n store: number;\r\n solidifier: number;\r\n scheduler: number;\r\n booker: number;\r\n ts: number;\r\n}\r\n\r\nconst chartSeriesOpts = {\r\n label: \"Incoming\", data: [],\r\n fill: true,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(58, 60, 171,0.4)',\r\n borderWidth: 1,\r\n borderColor: 'rgba(58, 60, 171,1)',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBorderColor: 'rgba(58, 60, 171,1)',\r\n pointBackgroundColor: '#fff',\r\n pointBorderWidth: 1,\r\n pointHoverBackgroundColor: 'rgba(58, 60, 171,1)',\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 0,\r\n pointHitRadius: 20,\r\n pointHoverRadius: 5,\r\n};\r\n\r\nfunction series(name: string, color: string, bgColor: string) {\r\n return {\r\n label: name, data: [],\r\n backgroundColor: bgColor,\r\n borderColor: color,\r\n pointBorderColor: color,\r\n pointHoverBackgroundColor: color,\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n }\r\n}\r\n\r\nconst statusWebSocketPath = \"/ws\";\r\n\r\nconst maxMetricsDataPoints = 900;\r\n\r\nexport class NodeStore {\r\n @observable status: Status = new Status();\r\n @observable websocketConnected: boolean = false;\r\n @observable last_mps_metric: BPSMetric = new BPSMetric();\r\n @observable collected_mps_metrics: Array = [];\r\n @observable collected_rate_setter_metrics: Array = [];\r\n @observable last_rate_setter_metric: RateSetterMetric = new RateSetterMetric();\r\n @observable collected_scheduler_metrics: Array = [];\r\n @observable collected_mem_metrics: Array = [];\r\n @observable neighbor_metrics = new ObservableMap();\r\n @observable last_tips_metric: TipsMetric = new TipsMetric();\r\n @observable collected_tips_metrics: Array = [];\r\n @observable last_component_counter_metric: ComponentCounterMetric = new ComponentCounterMetric();\r\n @observable collected_component_counter_metrics: Array = [];\r\n @observable collecting: boolean = true;\r\n\r\n constructor() {\r\n this.status.tangleTime = new TangleTime;\r\n this.status.tangleTime.ATT = 0;\r\n this.status.tangleTime.RATT = 0;\r\n this.status.tangleTime.CTT = 0;\r\n this.status.tangleTime.RCTT = 0;\r\n this.registerHandlers();\r\n }\r\n\r\n registerHandlers = () => {\r\n registerHandler(WSMsgType.Status, this.updateStatus);\r\n registerHandler(WSMsgType.BPSMetrics, (mps: number) => {\r\n this.addBPSMetric(this.updateLastBPSMetric(mps));\r\n });\r\n registerHandler(WSMsgType.NeighborStats, this.updateNeighborMetrics);\r\n registerHandler(WSMsgType.TipsMetrics, this.updateLastTipsMetric);\r\n registerHandler(WSMsgType.ComponentCounterMetrics, this.updateLastComponentMetric);\r\n registerHandler(WSMsgType.RateSetter, this.updateLastRateSetterMetric)\r\n\r\n this.updateCollecting(true);\r\n }\r\n\r\n unregisterHandlers = () => {\r\n unregisterHandler(WSMsgType.Status);\r\n unregisterHandler(WSMsgType.BPSMetrics);\r\n unregisterHandler(WSMsgType.NeighborStats);\r\n unregisterHandler(WSMsgType.TipsMetrics);\r\n unregisterHandler(WSMsgType.ComponentCounterMetrics);\r\n unregisterHandler(WSMsgType.RateSetter);\r\n this.updateCollecting(false);\r\n }\r\n\r\n @action\r\n updateCollecting = (collecting: boolean) => {\r\n this.collecting = collecting;\r\n }\r\n\r\n @action\r\n reset() {\r\n this.collected_mps_metrics = [];\r\n this.collected_mem_metrics = [];\r\n this.collected_scheduler_metrics = [];\r\n this.neighbor_metrics = new ObservableMap();\r\n this.collected_tips_metrics = [];\r\n this.collected_component_counter_metrics = [];\r\n }\r\n\r\n reconnect() {\r\n this.updateWebSocketConnected(false);\r\n setTimeout(() => {\r\n this.connect();\r\n }, 5000);\r\n }\r\n\r\n connect() {\r\n connectWebSocket(statusWebSocketPath,\r\n () => this.updateWebSocketConnected(true),\r\n () => this.reconnect(),\r\n () => this.updateWebSocketConnected(false))\r\n }\r\n\r\n @action\r\n updateWebSocketConnected = (connected: boolean) => this.websocketConnected = connected;\r\n\r\n @action\r\n updateStatus = (status: Status) => {\r\n status.mem.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_mem_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mem_metrics.shift();\r\n }\r\n this.collected_mem_metrics.push(status.mem);\r\n this.status = status;\r\n\r\n status.scheduler.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_scheduler_metrics.length > maxMetricsDataPoints) {\r\n this.collected_scheduler_metrics.shift();\r\n }\r\n this.collected_scheduler_metrics.push(status.scheduler);\r\n };\r\n\r\n\r\n @action\r\n updateNeighborMetrics = (neighborMetrics: Array) => {\r\n if (!neighborMetrics) {\r\n return;\r\n }\r\n let updated = [];\r\n for (let i = 0; i < neighborMetrics.length; i++) {\r\n let metric = neighborMetrics[i];\r\n let neighbMetrics: NeighborMetrics = this.neighbor_metrics.get(metric.id);\r\n if (!neighbMetrics) {\r\n neighbMetrics = new NeighborMetrics();\r\n }\r\n neighbMetrics.addMetric(metric);\r\n this.neighbor_metrics.set(metric.id, neighbMetrics);\r\n updated.push(metric.id);\r\n }\r\n // remove duplicates\r\n for (const k of this.neighbor_metrics.keys()) {\r\n if (!updated.includes(k)) {\r\n this.neighbor_metrics.delete(k);\r\n }\r\n }\r\n };\r\n\r\n @action\r\n updateLastRateSetterMetric = (metric: RateSetterMetric) => {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_rate_setter_metric = metric;\r\n if (this.collected_rate_setter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_rate_setter_metrics.shift();\r\n }\r\n this.collected_rate_setter_metrics.push(metric);\r\n };\r\n\r\n @action\r\n updateLastBPSMetric = (mps: number) => {\r\n let mpsMetric = new BPSMetric();\r\n mpsMetric.mps = mps;\r\n mpsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_mps_metric = mpsMetric;\r\n return mpsMetric;\r\n };\r\n\r\n @action\r\n addBPSMetric = (metric: BPSMetric) => {\r\n if (this.collected_mps_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mps_metrics.shift();\r\n }\r\n this.collected_mps_metrics.push(metric);\r\n }\r\n\r\n @action\r\n updateLastTipsMetric = (tipsMetric: TipsMetric) => {\r\n tipsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_tips_metric = tipsMetric;\r\n if (this.collected_tips_metrics.length > maxMetricsDataPoints) {\r\n this.collected_tips_metrics.shift();\r\n }\r\n this.collected_tips_metrics.push(tipsMetric);\r\n };\r\n\r\n @action\r\n updateLastComponentMetric = (componentCounterMetric: ComponentCounterMetric) => {\r\n componentCounterMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_component_counter_metric = componentCounterMetric;\r\n if (this.collected_component_counter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_component_counter_metrics.shift()\r\n }\r\n this.collected_component_counter_metrics.push(componentCounterMetric);\r\n };\r\n\r\n @computed\r\n get mpsSeries() {\r\n let mps = Object.assign({}, chartSeriesOpts,\r\n series(\"BPS\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mps_metrics.length; i++) {\r\n let metric: BPSMetric = this.collected_mps_metrics[i];\r\n labels.push(metric.ts);\r\n mps.data.push(metric.mps);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [mps],\r\n };\r\n }\r\n\r\n @computed\r\n get tipsSeries() {\r\n let totaltips = Object.assign({}, chartSeriesOpts,\r\n series(\"All tips\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_tips_metrics.length; i++) {\r\n let metric: TipsMetric = this.collected_tips_metrics[i];\r\n labels.push(metric.ts);\r\n totaltips.data.push(metric.totaltips);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [totaltips],\r\n };\r\n }\r\n\r\n @computed\r\n get componentSeries() {\r\n let stored = Object.assign({}, chartSeriesOpts,\r\n series(\"stored\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n let solidified = Object.assign({}, chartSeriesOpts,\r\n series(\"solidified\", 'rgba(165,209,253,1)', 'rgba(165,209,253,0.4)')\r\n );\r\n let scheduled = Object.assign({}, chartSeriesOpts,\r\n series(\"scheduled\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n let booked = Object.assign({}, chartSeriesOpts,\r\n series(\"booked\", 'rgba(5, 68, 94,1)', 'rgba(5, 68, 94,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_component_counter_metrics.length; i++) {\r\n let metric: ComponentCounterMetric = this.collected_component_counter_metrics[i];\r\n labels.push(metric.ts);\r\n stored.data.push(metric.store);\r\n solidified.data.push(metric.solidifier);\r\n scheduled.data.push(metric.scheduler);\r\n booked.data.push(metric.booker);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [stored, solidified, scheduled, booked],\r\n };\r\n }\r\n\r\n @computed\r\n get bufferSizeSeries() {\r\n let bufferSize = Object.assign({}, chartSeriesOpts,\r\n series(\"buffer size\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n bufferSize.data.push(metric.currentBufferSize);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [bufferSize],\r\n };\r\n }\r\n\r\n @computed\r\n get deficitSeries() {\r\n let deficit = Object.assign({}, chartSeriesOpts,\r\n series(\"deficit\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n deficit.data.push(metric.deficit);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [deficit],\r\n };\r\n }\r\n\r\n @computed\r\n get neighborsSeries() {\r\n return {};\r\n }\r\n\r\n @computed\r\n get uptime() {\r\n let day, hour, minute, seconds;\r\n seconds = Math.floor(this.status.uptime / 1000);\r\n minute = Math.floor(seconds / 60);\r\n seconds = seconds % 60;\r\n hour = Math.floor(minute / 60);\r\n minute = minute % 60;\r\n day = Math.floor(hour / 24);\r\n hour = hour % 24;\r\n let str = \"\";\r\n if (day == 1) {\r\n str += day + \" Day, \";\r\n }\r\n if (day > 1) {\r\n str += day + \" Days, \";\r\n }\r\n if (hour >= 0) {\r\n if (hour < 10) {\r\n str += \"0\" + hour + \":\";\r\n } else {\r\n str += hour + \":\";\r\n }\r\n }\r\n if (minute >= 0) {\r\n if (minute < 10) {\r\n str += \"0\" + minute + \":\";\r\n } else {\r\n str += minute + \":\";\r\n }\r\n }\r\n if (seconds >= 0) {\r\n if (seconds < 10) {\r\n str += \"0\" + seconds;\r\n } else {\r\n str += seconds;\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n @computed\r\n get memSeries() {\r\n let heapSys = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Sys\", 'rgba(168, 50, 76,1)', 'rgba(168, 50, 76,0.4)')\r\n );\r\n let heapAlloc = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Alloc\", 'rgba(222, 49, 87,1)', 'rgba(222, 49, 87,0.4)')\r\n );\r\n let heapIdle = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Idle\", 'rgba(222, 49, 182,1)', 'rgba(222, 49, 182,0.4)')\r\n );\r\n let heapReleased = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Released\", 'rgba(250, 76, 252,1)', 'rgba(250, 76, 252,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mem_metrics.length; i++) {\r\n let metric = this.collected_mem_metrics[i];\r\n labels.push(metric.ts);\r\n heapSys.data.push(metric.heap_sys);\r\n heapAlloc.data.push(metric.heap_alloc);\r\n heapIdle.data.push(metric.heap_idle);\r\n heapReleased.data.push(metric.heap_released);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [heapSys, heapAlloc, heapIdle, heapReleased],\r\n };\r\n }\r\n}\r\n\r\nexport default NodeStore;\r\n","import {action, observable} from 'mobx';\r\nimport {RouterStore} from \"mobx-react-router\";\r\n\r\nclass SendResult {\r\n BlkId: string;\r\n}\r\n\r\nenum QueryError {\r\n NotFound\r\n}\r\n\r\nexport class FaucetStore {\r\n // send request to faucet\r\n @observable send_addr: string = \"\";\r\n @observable send_access_mana_node_id: string = \"\";\r\n @observable send_consensus_mana_node_id: string = \"\";\r\n @observable sending: boolean = false;\r\n @observable sendResult: SendResult = null;\r\n @observable query_error: string = \"\";\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n }\r\n\r\n sendReq = async () => {\r\n this.updateSending(true);\r\n try {\r\n // send request\r\n let res = await fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);\r\n if (res.status !== 200) {\r\n this.updateQueryError(QueryError.NotFound);\r\n return;\r\n }\r\n let result: SendResult = await res.json();\r\n setTimeout(() => {\r\n this.updateSendResult(result);\r\n }, 2000);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n updateSendResult = (result: SendResult) => {\r\n this.sending = false;\r\n this.sendResult = result;\r\n this.routerStore.history.push(`/explorer/address/${this.send_addr}`);\r\n };\r\n\r\n @action\r\n updateSend = (send_addr: string) => {\r\n this.send_addr = send_addr;\r\n };\r\n\r\n @action\r\n updateSendAccessManaNodeID = (access_mana: string) => {\r\n this.send_access_mana_node_id = access_mana;\r\n }\r\n\r\n @action\r\n updateSendConsensusManaNodeID = (consensus_mana: string) => {\r\n this.send_consensus_mana_node_id = consensus_mana;\r\n }\r\n\r\n @action\r\n updateSending = (sending: boolean) => {\r\n this.sending = sending;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n reset = () => {\r\n this.send_addr = null;\r\n this.send_access_mana_node_id = \"\";\r\n this.send_consensus_mana_node_id = \"\";\r\n this.sending = false;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.sending = false;\r\n this.query_error = err;\r\n };\r\n}\r\n\r\nexport default FaucetStore;\r\n","import { action, observable, ObservableMap } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { default as Viva } from 'vivagraphjs';\r\nimport { Block } from './ExplorerStore';\r\n\r\nexport class Vertex {\r\n id: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n is_tip: boolean;\r\n is_blk_confirmed: boolean;\r\n is_tx_accepted: boolean;\r\n is_tx: boolean;\r\n}\r\n\r\nexport class TipInfo {\r\n id: string;\r\n is_tip: boolean;\r\n}\r\n\r\nclass history {\r\n vertices: Array;\r\n}\r\n\r\nconst COLOR = {\r\n BlockPending: \"#b9b7bd\",\r\n BlockConfirmed: \"#6c71c4\",\r\n TransactionPending: \"#393e46\",\r\n TransactionConfirmed: \"#fad02c\",\r\n Tip: \"#cb4b16\",\r\n Unknown: \"#b58900\",\r\n Line: \"#586e75\",\r\n SelectedPastConeLine: \"#e105f5\",\r\n SelectedFutureConeLine: \"#51e05d\",\r\n Selected: \"#859900\"\r\n}\r\n\r\nconst vertexSize = 20;\r\n\r\nexport class VisualizerStore {\r\n @observable vertices = new ObservableMap();\r\n @observable verticesLimit = 1500;\r\n @observable finalized_count = 0;\r\n @observable tips_count = 0;\r\n verticesIncomingOrder = [];\r\n draw: boolean = false;\r\n routerStore: RouterStore;\r\n\r\n // the currently selected vertex via hover\r\n @observable selected: Vertex;\r\n selected_via_click: boolean = false;\r\n selected_origin_color: number = 0;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n\r\n // viva graph objs\r\n graph;\r\n graphics;\r\n renderer;\r\n @observable paused: boolean = false;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Vertex, this.addVertex);\r\n registerHandler(WSMsgType.TipInfo, this.addTipInfo);\r\n registerHandler(WSMsgType.TXAccepted, this.updateTxStatus);\r\n // this.fetchHistory();\r\n }\r\n\r\n fetchHistory = async () => {\r\n try {\r\n let res = await fetch(`/api/visualizer/history`);\r\n let history: history = await res.json();\r\n history.vertices.forEach(v => {\r\n this.addVertex(v);\r\n });\r\n } catch (err) {\r\n console.log(\"Fail to fetch history in visualizer\", err);\r\n }\r\n return\r\n }\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search.trim();\r\n }\r\n\r\n @action\r\n searchAndHighlight = () => {\r\n this.clearSelected();\r\n if (!this.search) return;\r\n let iter: IterableIterator = this.vertices.keys();\r\n let found = null;\r\n for (const key of iter) {\r\n if (key.indexOf(this.search) >= 0) {\r\n found = key;\r\n break;\r\n }\r\n }\r\n if (!found) return;\r\n this.updateSelected(this.vertices.get(found), false);\r\n }\r\n\r\n @action\r\n pauseResume = () => {\r\n if (this.paused) {\r\n this.renderer.resume();\r\n this.paused = false;\r\n return;\r\n }\r\n this.renderer.pause();\r\n this.paused = true;\r\n }\r\n\r\n @action\r\n updateVerticesLimit = (num: number) => {\r\n this.verticesLimit = num;\r\n }\r\n\r\n @action\r\n updateTxStatus = (vert: Vertex) => { \r\n let existing = this.vertices.get(vert.id);\r\n if (!existing) {\r\n return\r\n }\r\n\r\n existing.is_tx_accepted = vert.is_tx_accepted;\r\n this.vertices.set(vert.id, existing);\r\n\r\n if (this.draw) {\r\n this.drawVertex(existing);\r\n }\r\n }\r\n\r\n @action\r\n addVertex = (vert: Vertex) => {\r\n let existing = this.vertices.get(vert.id);\r\n if (existing) {\r\n if (!existing.is_blk_confirmed && vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n } else {\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n this.verticesIncomingOrder.push(vert.id);\r\n this.checkLimit();\r\n }\r\n\r\n this.vertices.set(vert.id, vert);\r\n\r\n if (this.draw) {\r\n this.drawVertex(vert);\r\n }\r\n };\r\n\r\n @action\r\n addTipInfo = async (tipInfo: TipInfo) => {\r\n let v = this.vertices.get(tipInfo.id);\r\n if (!v) {\r\n v = new Vertex();\r\n v.id = tipInfo.id;\r\n\r\n // first seen as tip, get parents info\r\n let res = await fetch(`/api/block/${tipInfo.id}`);\r\n if (res.status === 200) {\r\n let blk: Block = await res.json();\r\n v.strongParents = blk.strongParents;\r\n v.weakParents = blk.weakParents;\r\n v.shallowLikedParents = blk.shallowLikedParents;\r\n v.is_blk_confirmed = blk.acceptance;\r\n }\r\n this.verticesIncomingOrder.push(v.id);\r\n }\r\n\r\n this.tips_count += tipInfo.is_tip ? 1 : v.is_tip ? -1 : 0;\r\n v.is_tip = tipInfo.is_tip;\r\n this.vertices.set(tipInfo.id, v);\r\n\r\n if (this.draw) {\r\n this.drawVertex(v);\r\n }\r\n };\r\n\r\n @action\r\n checkLimit = () => {\r\n while (this.verticesIncomingOrder.length > this.verticesLimit) {\r\n let deleteId = this.verticesIncomingOrder.shift();\r\n let vert = this.vertices.get(deleteId);\r\n // make sure we remove any markings if the vertex gets deleted\r\n if (this.selected && deleteId === this.selected.id) {\r\n this.clearSelected();\r\n }\r\n if (this.draw) {\r\n this.graph.removeNode(deleteId);\r\n }\r\n if (!vert) {\r\n continue;\r\n }\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count--;\r\n }\r\n if (vert.is_tip) {\r\n this.tips_count--;\r\n }\r\n this.vertices.delete(deleteId);\r\n }\r\n }\r\n\r\n drawVertex = (vert: Vertex) => {\r\n let node = this.graph.getNode(vert.id);\r\n if (node) {\r\n // update coloring\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n nodeUI.color = parseColor(this.colorForVertexState(vert));\r\n } else {\r\n node = this.graph.addNode(vert.id, vert);\r\n }\r\n\r\n if (vert.strongParents) {\r\n this.linkParents(vert, node, vert.strongParents)\r\n }\r\n\r\n if (vert.weakParents) {\r\n this.linkParents(vert, node, vert.weakParents)\r\n }\r\n\r\n if (vert.shallowLikedParents) {\r\n this.linkParents(vert, node, vert.shallowLikedParents)\r\n }\r\n }\r\n\r\n linkParents = (vert: Vertex, node: any, parents: Array) => {\r\n parents.forEach((value) => {\r\n // if value is valid AND (links is empty OR there is no between parent and children)\r\n if (value && ((!node.links || !node.links.some(link => link.fromId === value)))) {\r\n // draw the link only when the parent exists\r\n let parent = this.graph.getNode(value);\r\n if (parent) {\r\n this.graph.addLink(value, vert.id);\r\n } else {\r\n console.log(\"link not added, parent doesn't exist\", value);\r\n }\r\n }\r\n })\r\n }\r\n\r\n colorForVertexState = (vert: Vertex) => {\r\n if (!vert) {\r\n return COLOR.Unknown;\r\n }\r\n\r\n // finalized\r\n if (vert.is_blk_confirmed) {\r\n if (vert.is_tx) {\r\n if (vert.is_tx_accepted) {\r\n return COLOR.TransactionConfirmed;\r\n } else {\r\n return COLOR.TransactionPending;\r\n } \r\n }\r\n return COLOR.BlockConfirmed;\r\n }\r\n\r\n if (vert.is_tip) {\r\n return COLOR.Tip;\r\n }\r\n\r\n // pending\r\n if (vert.is_tx) {\r\n return COLOR.TransactionPending\r\n }\r\n return COLOR.BlockPending;\r\n }\r\n\r\n start = () => {\r\n this.draw = true;\r\n this.graph = Viva.Graph.graph();\r\n\r\n let graphics: any = Viva.Graph.View.webglGraphics();\r\n\r\n const layout = Viva.Graph.Layout.forceDirected(this.graph, {\r\n springLength: 10,\r\n springCoeff: 0.0001,\r\n stableThreshold: 0.15,\r\n gravity: -2,\r\n dragCoeff: 0.02,\r\n timeStep: 20,\r\n theta: 0.8,\r\n });\r\n\r\n graphics.node((node) => {\r\n if (!node.data) {\r\n return Viva.Graph.View.webglSquare(10, this.colorForVertexState(node.data));\r\n }\r\n return Viva.Graph.View.webglSquare(vertexSize, this.colorForVertexState(node.data));\r\n })\r\n graphics.link(() => Viva.Graph.View.webglLine(COLOR.Line));\r\n let ele = document.getElementById('visualizer');\r\n this.renderer = Viva.Graph.View.renderer(this.graph, {\r\n container: ele, graphics, layout,\r\n });\r\n\r\n let events = Viva.Graph.webglInputEvents(graphics, this.graph);\r\n\r\n events.mouseEnter((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data);\r\n }).mouseLeave((node) => {\r\n this.clearSelected(false);\r\n });\r\n\r\n events.click((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data, true);\r\n });\r\n\r\n this.graphics = graphics;\r\n this.renderer.run();\r\n\r\n // draw vertices by order\r\n this.verticesIncomingOrder.forEach((id) => {\r\n let v = this.vertices.get(id);\r\n if (v) {\r\n this.drawVertex(v);\r\n }\r\n })\r\n }\r\n\r\n stop = () => {\r\n this.draw = false;\r\n this.renderer.dispose();\r\n this.graph = null;\r\n this.paused = false;\r\n this.selected = null;\r\n }\r\n\r\n @action\r\n updateSelected = (vert: Vertex, viaClick?: boolean) => {\r\n if (!vert) return;\r\n\r\n this.selected = vert;\r\n this.selected_via_click = !!viaClick;\r\n\r\n // mutate links\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n this.selected_origin_color = nodeUI.color\r\n nodeUI.color = parseColor(COLOR.Selected);\r\n nodeUI.size = vertexSize * 1.5;\r\n\r\n let node = this.graph.getNode(vert.id);\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedFutureConeLine);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedPastConeLine);\r\n },\r\n seenForward\r\n );\r\n }\r\n\r\n resetLinks = () => {\r\n this.graph.forEachLink(function (link) {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n });\r\n }\r\n\r\n @action\r\n clearSelected = (force_clear?: boolean) => {\r\n if (!this.selected || (this.selected_via_click && !force_clear)) {\r\n return;\r\n }\r\n\r\n // clear link highlight\r\n let node = this.graph.getNode(this.selected.id);\r\n if (!node) {\r\n // clear links\r\n this.resetLinks();\r\n return;\r\n }\r\n\r\n let nodeUI = this.graphics.getNodeUI(this.selected.id);\r\n nodeUI.color = this.selected_origin_color;\r\n nodeUI.size = vertexSize;\r\n\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenForward\r\n );\r\n\r\n this.selected = null;\r\n this.selected_via_click = false;\r\n }\r\n\r\n}\r\n\r\nexport default VisualizerStore;\r\n\r\n// copied over and refactored from https://github.com/glumb/IOTAtangle\r\nfunction dfsIterator(graph, node, cb, up, cbLinks: any = false, seenNodes = []) {\r\n seenNodes.push(node);\r\n let pointer = 0;\r\n\r\n while (seenNodes.length > pointer) {\r\n const node = seenNodes[pointer++];\r\n\r\n if (cb(node)) return true;\r\n\r\n if (!node.links) {\r\n return\r\n }\r\n\r\n for (const link of node.links) {\r\n // parents\r\n if (!up && link.toId === node.id && !seenNodes.includes(graph.getNode(link.fromId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.fromId));\r\n continue;\r\n }\r\n\r\n // children\r\n if (up && link.fromId === node.id && !seenNodes.includes(graph.getNode(link.toId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.toId));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction parseColor(color): any {\r\n let parsedColor = 0x009ee8ff;\r\n\r\n if (typeof color === 'number') {\r\n return color;\r\n }\r\n\r\n if (typeof color === 'string' && color) {\r\n if (color.length === 4) {\r\n // #rgb, duplicate each letter except first #.\r\n color = color.replace(/([^#])/g, '$1$1');\r\n }\r\n if (color.length === 9) {\r\n // #rrggbbaa\r\n parsedColor = parseInt(color.substr(1), 16);\r\n } else if (color.length === 7) {\r\n // or #rrggbb.\r\n parsedColor = (parseInt(color.substr(1), 16) << 8) | 0xff;\r\n } else {\r\n throw 'Color expected in hex format with preceding \"#\". E.g. #00ff00. Got value: ' + color;\r\n }\r\n }\r\n\r\n return parsedColor;\r\n}\r\n","import {action, computed, observable} from 'mobx';\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Col, ListGroupItem, OverlayTrigger, Popover, Row} from \"react-bootstrap\";\nimport Plus from \"../../assets/plus.svg\";\nimport Minus from \"../../assets/minus.svg\";\nimport {displayManaUnit} from \"../utils\";\n\nclass ManaBlk {\n nodeID: string;\n access: number;\n consensus: number;\n // in s?\n time: number;\n}\n\nexport class Node {\n shortNodeID: string;\n nodeID: string;\n mana: number;\n}\n\nclass NetworkManaBlk {\n manaType: string;\n totalMana: number;\n nodes: Array;\n}\n\nexport class AllowedPledgeIDsBlk {\n accessFilter: PledgeIDFilter;\n consensusFilter: PledgeIDFilter;\n}\n\nexport class PledgeIDFilter {\n enabled: boolean;\n allowedNodeIDs: Array;\n}\n\nexport class AllowedNodeStr {\n shortID: string;\n fullID: string;\n}\n\nclass PledgeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass RevokeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass ManaEvent {\n nodeID: string;\n time: Date;\n txID: string;\n\n constructor(nodeID: string, time: Date, txID: string) {\n this.nodeID = nodeID;\n this.time = time;\n this.txID = txID;\n }\n}\n\nclass PledgeEvent extends ManaEvent{\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nclass RevokeEvent extends ManaEvent {\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nconst emptyRow = (\n There are no nodes to view with the current search parameters.\n)\nconst emptyListItem = (\n There are no events to view with the current search parameters.)\n\n// every 10 seconds, a new value arrives, so this is roughly 17 mins\nconst maxStoredManaValues = 100;\n// number of previous pledge/revoke events we keep track of. (/2 of plugins/dashboard/maxManaEventsBufferSize)\nconst maxEventsStored = 100;\n\nexport class ManaStore {\n // mana values\n @observable manaValues: Array = [];\n // first is accessm second consensus\n @observable prevManaValues: Array = [0,0];\n // list of richest access mana nodes in network, sorted in descending order\n @observable accessNetworkRichest: Array = [];\n @observable totalAccessNetwork: number = 0.0;\n // list of richest active access mana nodes in the network, sorted in descending order\n @observable accessActiveRichest: Array = [];\n @observable totalAccessActive: number = 0.0;\n // list of richest consensus mana nodes in their network, sorted in descending order\n @observable consensusNetworkRichest: Array = [];\n @observable totalConsensusNetwork: number = 0.0;\n // list of richest active consensus mana nodes in their network, sorted in descending order\n @observable consensusActiveRichest: Array = [];\n @observable totalConsensusActive: number = 0.0;\n\n @observable public searchNode = \"\";\n @observable public searchTxID = \"\";\n\n @observable public allowedPledgeIDs: AllowedPledgeIDsBlk;\n\n // internal arrays to store mana events\n accessEvents: Array = [];\n consensusEvents: Array = [];\n\n // internal arrays to store initial mana events\n initAccessEvents: Array = [];\n initConsensusEvents: Array = [];\n\n // info on latest removed events\n @observable lastRemovedAccessEventTime: Date = null;\n @observable lastRemovedConsensusEventTime: Date = null;\n\n lastInitRemovedAccessEventTime: Date = null;\n lastInitRemovedConsensusEventTime: Date = null;\n\n // only update displayed events when initial arrays were modified\n eventsUpdated: boolean = false;\n\n // mana events displayed in frontend\n @observable displayedAccessEvents: Array = [];\n @observable displayedConsensusEvents: Array = [];\n\n ownID: string;\n\n nodeNotSyncedListItem = (Wait for node to be synced to display mana events.);\n\n constructor() {\n this.manaValues = [];\n\n registerHandler(WSMsgType.Mana, this.addNewManaValue);\n registerHandler(WSMsgType.ManaMapOverall, this.updateNetworkRichest);\n registerHandler(WSMsgType.ManaMapOnline, this.updateActiveRichest);\n // registerHandler(WSMsgType.ManaAllowedPledge, this.updateAllowedPledgeIDs);\n // registerHandler(WSMsgType.ManaInitPledge, this.addNewInitPledge);\n // registerHandler(WSMsgType.ManaInitRevoke, this.addNewInitRevoke);\n // registerHandler(WSMsgType.ManaInitDone, this.initDone);\n // registerHandler(WSMsgType.ManaPledge, this.addNewPledge);\n // registerHandler(WSMsgType.ManaRevoke, this.addNewRevoke);\n };\n\n @action\n updateNodeSearch(searchNode: string): void {\n this.searchNode = searchNode.trim();\n }\n\n @action\n updateTxSearch(searchTxID: string): void {\n this.searchTxID = searchTxID.trim();\n }\n\n @action\n addNewManaValue = (manaBlk: ManaBlk) => {\n this.ownID = this.ownID? this.ownID : manaBlk.nodeID;\n if (this.manaValues.length === maxStoredManaValues) {\n // shift if we already have enough values\n this.manaValues.shift();\n }\n let newManaData = [new Date(manaBlk.time*1000), manaBlk.access, manaBlk.consensus];\n if (this.manaValues.length > 0){\n this.prevManaValues = [this.manaValues[this.manaValues.length -1][1] , this.manaValues[this.manaValues.length -1][2]]\n }\n this.manaValues.push(newManaData);\n }\n\n @action\n updateNetworkRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessNetwork = blk.totalMana;\n this.accessNetworkRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusNetwork = blk.totalMana;\n this.consensusNetworkRichest = blk.nodes;\n break;\n }\n }\n\n @action\n updateActiveRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessActive = blk.totalMana;\n this.accessActiveRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusActive = blk.totalMana;\n this.consensusActiveRichest = blk.nodes;\n break;\n }\n };\n\n @action\n updateAllowedPledgeIDs = (blk: AllowedPledgeIDsBlk) => {\n this.allowedPledgeIDs = blk;\n }\n\n @action\n addNewInitPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.initAccessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n }\n\n @action\n addNewPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.accessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n addNewInitRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n }\n\n @action\n addNewRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n initDone = () => {\n this.accessEvents = this.initAccessEvents;\n this.lastRemovedAccessEventTime = this.lastInitRemovedAccessEventTime;\n this.consensusEvents= this.initConsensusEvents;\n this.lastRemovedConsensusEventTime = this.lastInitRemovedConsensusEventTime;\n\n this.displayedAccessEvents = [...this.accessEvents]\n this.displayedConsensusEvents = [...this.consensusEvents]\n\n setInterval(() => {\n if (this.eventsUpdated) {\n this.displayedAccessEvents = [...this.accessEvents];\n this.displayedConsensusEvents = [...this.consensusEvents];\n this.eventsUpdated = false;\n }\n }, 500)\n }\n\n nodeList = (leaderBoard: Array, manaSum: number) => {\n if (leaderBoard === null || leaderBoard == undefined) {\n return []\n }\n let feed = [];\n let pushToFeed = (node: Node, i: number) => {\n feed.push(\n \n {i + 1} \n {node.shortNodeID}\n {displayManaUnit(node.mana)}\n {((node.mana / manaSum)*100.0).toFixed(2)}%\n \n );\n };\n let callback = (node: Node, i: number) => {\n if (this.passesNodeFilter(node.shortNodeID)){\n pushToFeed(node, i);\n }\n };\n leaderBoard.forEach(callback);\n return feed\n }\n\n @computed\n get networkRichestFeedAccess() {\n let result = this.nodeList(this.accessNetworkRichest, this.totalAccessNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get networkRichestFeedConsensus() {\n let result = this.nodeList(this.consensusNetworkRichest, this.totalConsensusNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedAccess() {\n let result = this.nodeList(this.accessActiveRichest, this.totalAccessActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedConsensus() {\n let result = this.nodeList(this.consensusActiveRichest, this.totalConsensusActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get accessHistogramInput() {\n if (this.accessNetworkRichest === undefined || this.accessNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.accessNetworkRichest.length; i++) {\n histInput.push(\n [this.accessNetworkRichest[i].shortNodeID, Math.log10(this.accessNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get consensusHistogramInput() {\n if (this.consensusNetworkRichest === undefined || this.consensusNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.consensusNetworkRichest.length; i++) {\n histInput.push(\n [this.consensusNetworkRichest[i].shortNodeID, Math.log10(this.consensusNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get accessPercentile() {\n let per = 0.0;\n // find id\n if (this.accessNetworkRichest !== undefined && this.accessNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.accessNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.accessNetworkRichest.length - (index + 1)) / this.accessNetworkRichest.length) * 100;\n break;\n }\n }\n return per\n }\n\n @computed\n get consensusPercentile() {\n let per = 0.0;\n // find id\n if ( this.consensusNetworkRichest !== undefined && this.consensusNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.consensusNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.consensusNetworkRichest.length - (index +1)) / this.consensusNetworkRichest.length) * 100;\n }\n }\n return per\n }\n\n computeEventList = (evArr: Array) => {\n let result = [];\n result.push(\n \n \n \n \n \n NodeID\n \n \n Tx ID\n \n \n Time\n \n \n \n )\n if (evArr === undefined || evArr === null) {\n return result\n }\n let pushToEventFeed = (element: ManaEvent, index) => {\n if (element instanceof PledgeEvent) {\n let popover = (ev: PledgeEvent) => {\n return (\n \n Mana Pledged\n \n
Base Mana: +{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
To NodeID: {ev.nodeID}
\n
Time of Pledge: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Plus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n } else if (element instanceof RevokeEvent){\n let popover = (ev: RevokeEvent) => {\n return (\n \n Mana Revoked\n \n
Base Mana 1: -{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
From NodeID: {ev.nodeID}
\n
Time of Revoke: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n // it's a revoke event then\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Minus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n }\n };\n // && this.passesTimeFilter(event.time) {\n let callback = (event: ManaEvent, i: number) => {\n if (this.passesNodeFilter(event.nodeID) && this.passesTxFilter(event.txID)){\n pushToEventFeed(event, i);\n }\n };\n // reverse traverse bc oldest event is the first\n evArr.reverse().forEach(callback)\n return result;\n }\n\n @computed\n get accessEventList() {\n let result = this.computeEventList(this.displayedAccessEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n @computed\n get consensusEventList() {\n let result = this.computeEventList(this.displayedConsensusEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n passesNodeFilter = (nodeID: string) : boolean => {\n if (this.searchNode.trim().length === 0) {\n // node filter is disabled, anything passes the filter\n return true;\n } else if (nodeID.toLowerCase().includes(this.searchNode.toLowerCase())){\n // node filter is enabled, nodeID contains search term\n return true;\n }\n // filter enabled but nodeID doesn't pass\n return false;\n }\n\n passesTxFilter = (txID: string) : boolean => {\n if (this.searchTxID.trim().length === 0) {\n // txID filter is disabled, anything passes the filter\n return true;\n } else if (txID.toLowerCase().includes(this.searchTxID.toLowerCase())){\n // txID filter is enabled, txID contains search term\n return true;\n }\n // filter enabled but txID doesn't pass\n return false;\n }\n}\n\nexport default ManaStore;\n","import {computed, action, observable} from \"mobx\";\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Link} from 'react-router-dom';\n\nconst liveFeedSize = 100;\n\nexport class SlotInfo {\n index: number;\n id: string;\n}\n\nexport class SlotStore {\n @observable liveFeed: Array = [];\n\n constructor() {\n registerHandler(WSMsgType.SlotInfo, this.addLiveFeed);\n }\n\n @action addLiveFeed = async (info: SlotInfo) => {\n if (this.liveFeed.findIndex((t) => t.id == info.id) === -1) {\n if (this.liveFeed.length >= liveFeedSize) {\n this.liveFeed.shift();\n }\n this.liveFeed.push(info);\n }\n }\n\n @computed\n get slotLiveFeed() {\n let feed = [];\n for (let i = this.liveFeed.length - 1; i >= 0; i--) {\n let info = this.liveFeed[i];\n feed.push(\n \n \n {info.index}\n \n \n \n {info.id}\n \n \n \n );\n }\n return feed;\n }\n}","import {action, computed, observable} from 'mobx';\r\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\r\nimport * as React from \"react\";\r\nimport {RouterStore,} from \"mobx-react-router\";\r\nimport {Link} from \"react-router-dom\";\r\nimport NodeStore from './NodeStore';\r\nimport {Table} from \"react-bootstrap\";\r\nimport {ConfirmationState, resolveConfirmationState} from \"../utils/confirmation_state\";\r\n\r\nexport class ConflictSet {\r\n conflictSetID: string;\r\n arrivalTime: number;\r\n resolved: boolean;\r\n timeToResolve: number;\r\n shown: boolean;\r\n}\r\n\r\nexport class Conflict {\r\n conflictID: string;\r\n conflictSetIDs: Array;\r\n confirmationState: number;\r\n issuingTime: number;\r\n issuerNodeID: string;\r\n}\r\n\r\n// const liveFeedSize = 10;\r\n\r\nexport class ConflictsStore {\r\n // live feed\r\n @observable conflictSets: Map;\r\n @observable conflicts: Map;\r\n \r\n routerStore: RouterStore;\r\n nodeStore: NodeStore;\r\n\r\n constructor(routerStore: RouterStore, nodeStore: NodeStore) {\r\n this.routerStore = routerStore;\r\n this.nodeStore = nodeStore;\r\n this.conflictSets = new Map;\r\n this.conflicts = new Map;\r\n registerHandler(WSMsgType.ConflictSet, this.updateConflictSets);\r\n registerHandler(WSMsgType.Conflict, this.updateConflicts);\r\n }\r\n\r\n @action\r\n updateConflictSets = (blk: ConflictSet) => {\r\n this.conflictSets.set(blk.conflictSetID, blk);\r\n };\r\n\r\n @action\r\n updateConflicts = (blk: Conflict) => {\r\n this.conflicts.set(blk.conflictID, blk);\r\n };\r\n \r\n @computed\r\n get conflictsLiveFeed() {\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let conflictsArr = Array.from(this.conflictSets.values());\r\n conflictsArr.sort((x: ConflictSet, y: ConflictSet): number => {\r\n return y.arrivalTime - x.arrivalTime || x.conflictSetID.localeCompare(y.conflictSetID);\r\n }\r\n )\r\n\r\n let feed = [];\r\n for (let conflict of conflictsArr) {\r\n feed.push(\r\n conflict.shown = !conflict.shown} style={{cursor:\"pointer\"}}>\r\n \r\n \r\n {conflict.conflictSetID}\r\n \r\n \r\n \r\n {new Date(conflict.arrivalTime * 1000).toLocaleString()}\r\n \r\n \r\n {conflict.resolved ? 'Yes' : 'No'}\r\n \r\n \r\n {conflict.timeToResolve/1000000}\r\n \r\n \r\n );\r\n\r\n // only render and show branches if it has been clicked\r\n if (!conflict.shown) {\r\n continue\r\n }\r\n\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let branchesArr = Array.from(this.conflicts.values());\r\n branchesArr.sort((x: Conflict, y: Conflict): number => {\r\n return x.issuingTime - y.issuingTime || x.conflictID.localeCompare(y.conflictID)\r\n }\r\n )\r\n\r\n let branches = [];\r\n for (let branch of branchesArr) {\r\n for(let conflictID of branch.conflictSetIDs){\r\n if (conflictID === conflict.conflictSetID) {\r\n branches.push(\r\n ConfirmationState.Accepted ? \"table-success\" : \"\"}>\r\n \r\n \r\n {branch.conflictID}\r\n \r\n \r\n {resolveConfirmationState(branch.confirmationState)}\r\n {new Date(branch.issuingTime * 1000).toLocaleString()}\r\n {branch.issuerNodeID}\r\n \r\n );\r\n }\r\n }\r\n }\r\n feed.push(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {branches}\r\n \r\n
BranchIDConfirmationStateIssuingTimeIssuer NodeID
\r\n \r\n \r\n );\r\n }\r\n\r\n return feed;\r\n }\r\n\r\n}\r\n\r\nexport default ConflictsStore;\r\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {Provider} from 'mobx-react';\nimport {createBrowserHistory} from 'history';\nimport 'chartjs-plugin-streaming';\nimport {App} from './app/App';\nimport {RouterStore, syncHistoryWithStore} from 'mobx-react-router';\nimport {Router} from 'react-router-dom';\nimport NodeStore from \"./app/stores/NodeStore\";\nimport ExplorerStore from \"./app/stores/ExplorerStore\";\nimport FaucetStore from \"./app/stores/FaucetStore\";\nimport VisualizerStore from \"./app/stores/VisualizerStore\";\nimport ManaStore from \"./app/stores/ManaStore\";\nimport {SlotStore} from \"./app/stores/SlotStore\";\nimport ConflictsStore from \"./app/stores/ConflictsStore\";\n\n// prepare MobX stores\nconst routerStore = new RouterStore();\nconst nodeStore = new NodeStore();\nconst explorerStore = new ExplorerStore(routerStore);\nconst conflictsStore = new ConflictsStore(routerStore, nodeStore);\nconst faucetStore = new FaucetStore(routerStore);\nconst visualizerStore = new VisualizerStore(routerStore);\nconst manaStore = new ManaStore();\nconst slotStore = new SlotStore();\nconst stores = {\n \"routerStore\": routerStore,\n \"nodeStore\": nodeStore,\n \"explorerStore\": explorerStore,\n \"conflictsStore\": conflictsStore,\n \"faucetStore\": faucetStore,\n \"visualizerStore\": visualizerStore,\n \"manaStore\": manaStore,\n \"slotStore\": slotStore\n};\n\nconst browserHistory = createBrowserHistory();\nconst history = syncHistoryWithStore(browserHistory, routerStore);\n\n// render react DOM\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/dashboard/frontend/build/index.html b/components/dashboard/frontend/build/index.html index a644c730c..b397f8f8c 100644 --- a/components/dashboard/frontend/build/index.html +++ b/components/dashboard/frontend/build/index.html @@ -1 +1 @@ - iota-core Dashboard
\ No newline at end of file + iota-core Dashboard
\ No newline at end of file diff --git a/components/dashboard/frontend/src/app/components/Explorer.tsx b/components/dashboard/frontend/src/app/components/Explorer.tsx index 9a1466c9c..8076090db 100644 --- a/components/dashboard/frontend/src/app/components/Explorer.tsx +++ b/components/dashboard/frontend/src/app/components/Explorer.tsx @@ -8,7 +8,7 @@ import {ExplorerSearchbar} from "./ExplorerSearchbar"; import {ExplorerLiveFeed} from "./ExplorerLiveFeed"; import {ExplorerTransactionSearchbar} from "./ExplorerTransactionSearchbar"; import {ExplorerOutputSearchbar} from "./ExplorerOutputSearchbar"; -import {ExplorerConflictSearchbar} from "./ExplorerConflictSearchbar"; +import {ExplorerSpendSearchbar} from "./ExplorerSpendSearchbar"; interface Props { nodeStore?: NodeStore; @@ -24,7 +24,7 @@ export class Explorer extends React.Component {

- Search for addresses, blocks, transactions, outputs and conflicts. + Search for addresses, blocks, transactions, outputs and spends.

@@ -41,7 +41,7 @@ export class Explorer extends React.Component { - + diff --git a/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx index c8ef4d968..3b12c8268 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerAddressResult.tsx @@ -12,7 +12,7 @@ import {Link} from 'react-router-dom'; import {displayManaUnit} from "../utils"; import {OutputType, outputToComponent, outputTypeToName} from "../utils/output"; import {Button, ListGroupItem} from "react-bootstrap"; -import {resolveBase58ConflictID} from "../utils/conflict"; +import {resolveBase58SpendID as resolveBase58SpendID} from "../utils/spend"; interface Props { nodeStore?: NodeStore; @@ -227,9 +227,9 @@ class OutputMeta extends React.Component { { metadata.spendIDs.map((value, index) => { return ( - - - {resolveBase58ConflictID(value)} + + + {resolveBase58SpendID(value)} ) diff --git a/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx index a09f118ba..9c34fa2d6 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerBlockQueryResult.tsx @@ -13,7 +13,7 @@ import { Link } from 'react-router-dom'; import { BasicPayload } from './BasicPayload' import { TransactionPayload } from './TransactionPayload' import { getPayloadType, PayloadType } from '../misc/Payload' -import { resolveBase58ConflictID } from "../utils/conflict"; +import { resolveBase58SpendID } from "../utils/spend"; import { FaucetPayload } from './FaucetPayload'; import { TaggedDataPayload } from './TaggedDataPayload'; @@ -129,10 +129,10 @@ export class ExplorerBlockQueryResult extends React.Component { { blk.spendIDs.map((value, index) => { return ( - - - {resolveBase58ConflictID(value)} + + {resolveBase58SpendID(value)} ) @@ -146,10 +146,10 @@ export class ExplorerBlockQueryResult extends React.Component { { blk.addedSpendIDs.map((value, index) => { return ( - - - {resolveBase58ConflictID(value)} + + {resolveBase58SpendID(value)} ) @@ -163,10 +163,10 @@ export class ExplorerBlockQueryResult extends React.Component { { blk.subtractedSpendIDs.map((value, index) => { return ( - - - {resolveBase58ConflictID(value)} + + {resolveBase58SpendID(value)} ) diff --git a/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx index 49e0a6e36..d11bd5415 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerOutputQueryResult.tsx @@ -7,7 +7,7 @@ import ExplorerStore from "../stores/ExplorerStore"; import Badge from "react-bootstrap/Badge"; import {Link} from 'react-router-dom'; import {displayManaUnit} from "../utils"; -import {resolveBase58ConflictID} from "../utils/conflict"; +import {resolveBase58SpendID} from "../utils/spend"; import {outputToComponent} from "../utils/output"; import {resolveConfirmationState} from "../utils/confirmation_state"; @@ -81,9 +81,9 @@ export class ExplorerOutputQueryResult extends React.Component { { outputMetadata.spendIDs.map((value, index) => { return ( - - - {resolveBase58ConflictID(value)} + + + {resolveBase58SpendID(value)} ) diff --git a/components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx b/components/dashboard/frontend/src/app/components/ExplorerSpendQueryResult.tsx similarity index 52% rename from components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx rename to components/dashboard/frontend/src/app/components/ExplorerSpendQueryResult.tsx index 91ccf469f..d59f7f007 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerConflictQueryResult.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerSpendQueryResult.tsx @@ -4,7 +4,7 @@ import NodeStore from "../stores/NodeStore"; import { inject, observer } from "mobx-react"; import ExplorerStore from "../stores/ExplorerStore"; import ListGroup from "react-bootstrap/ListGroup"; -import {resolveBase58ConflictID} from "../utils/conflict"; +import {resolveBase58SpendID} from "../utils/spend"; import {resolveConfirmationState} from "../utils/confirmation_state"; @@ -21,12 +21,12 @@ interface Props { @inject("nodeStore") @inject("explorerStore") @observer -export class ExplorerConflictQueryResult extends React.Component { +export class ExplorerSpendQueryResult extends React.Component { componentDidMount() { - this.props.explorerStore.getConflict(this.props.match.params.id); - this.props.explorerStore.getConflictChildren(this.props.match.params.id); - this.props.explorerStore.getConflictConflicts(this.props.match.params.id); - this.props.explorerStore.getConflictVoters(this.props.match.params.id); + this.props.explorerStore.getSpend(this.props.match.params.id); + this.props.explorerStore.getSpendChildren(this.props.match.params.id); + this.props.explorerStore.getSpendSpends(this.props.match.params.id); + this.props.explorerStore.getSpendVoters(this.props.match.params.id); } componentWillUnmount() { @@ -34,52 +34,52 @@ export class ExplorerConflictQueryResult extends React.Component { } render() { let {id} = this.props.match.params; - let { query_err, conflict, conflictChildren, conflictConflicts, conflictVoters } = this.props.explorerStore; + let { query_err, spend, spendChildren, spendSpends, spendVoters } = this.props.explorerStore; if (query_err) { return ( -

Conflict not found - 404

+

Spend not found - 404

{id}
); } return ( -

Conflict

- {conflict && - ID: {resolveBase58ConflictID(conflict.id)} +

Spend

+ {spend && + ID: {resolveBase58SpendID(spend.id)} Parents: - {conflict.parents.map((p,i) => {resolveBase58ConflictID(p)})} + {spend.parents.map((p,i) => {resolveBase58SpendID(p)})} - {Conflicts: - {conflict.spendIDs && - {conflict.spendIDs.map((c,i) => {c})} + {Spends: + {spend.spendIDs && + {spend.spendIDs.map((c,i) => {c})} } } - ConfirmationState: {resolveConfirmationState(conflict.confirmationState)} + ConfirmationState: {resolveConfirmationState(spend.confirmationState)} Children: - {conflictChildren && - {conflictChildren.childConflicts.map((c,i) => {resolveBase58ConflictID(c.conflictID)})} + {spendChildren && + {spendChildren.childSpends.map((c,i) => {resolveBase58SpendID(c.spendID)})} } - { Conflicts: - {conflictConflicts && - {conflictConflicts.conflicts.map((c,i) =>
+ { Spends: + {spendSpends && + {spendSpends.spends.map((c,i) => )} } } Voters: - {conflictVoters && - {conflictVoters.voters.map((s,i) => {s})} + {spendVoters && + {spendVoters.voters.map((s,i) => {s})} } } diff --git a/components/dashboard/frontend/src/app/components/ExplorerConflictSearchbar.tsx b/components/dashboard/frontend/src/app/components/ExplorerSpendSearchbar.tsx similarity index 74% rename from components/dashboard/frontend/src/app/components/ExplorerConflictSearchbar.tsx rename to components/dashboard/frontend/src/app/components/ExplorerSpendSearchbar.tsx index f5fd60e79..311a31305 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerConflictSearchbar.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerSpendSearchbar.tsx @@ -16,16 +16,16 @@ interface Props { @inject("nodeStore") @inject("explorerStore") @observer -export class ExplorerConflictSearchbar extends React.Component { - conflictID: string; +export class ExplorerSpendSearchbar extends React.Component { + spendID: string; updateSearch = (e) => { - this.conflictID =e.target.value; + this.spendID =e.target.value; }; executeSearch = (e: KeyboardEvent) => { if (e.key !== 'Enter') return; - this.props.explorerStore.routerStore.push(`/explorer/conflict/${this.conflictID}`); + this.props.explorerStore.routerStore.push(`/explorer/spend/${this.spendID}`); }; render() { @@ -37,10 +37,10 @@ export class ExplorerConflictSearchbar extends React.Component { diff --git a/components/dashboard/frontend/src/app/components/ExplorerTransactionMetadata.tsx b/components/dashboard/frontend/src/app/components/ExplorerTransactionMetadata.tsx index 56ec403cb..726482661 100644 --- a/components/dashboard/frontend/src/app/components/ExplorerTransactionMetadata.tsx +++ b/components/dashboard/frontend/src/app/components/ExplorerTransactionMetadata.tsx @@ -4,7 +4,7 @@ import NodeStore from "../stores/NodeStore"; import { inject, observer } from "mobx-react"; import ExplorerStore from "../stores/ExplorerStore"; import ListGroup from "react-bootstrap/ListGroup"; -// import {resolveBase58ConflictID} from "../utils/conflict"; +// import {resolveBase58SpendID} from "../utils/spend"; interface Props { nodeStore?: NodeStore; @@ -40,12 +40,12 @@ export class ExplorerTransactionMetadata extends React.Component {

Metadata

{txMetadata && - ConflictIDs: + SpendIDs: { - txMetadata.conflictIDs && txMetadata.conflictIDs.map((value, index) => { + txMetadata.spendIDs && txMetadata.spendIDs.map((value, index) => { return ( - + {value} ) diff --git a/components/dashboard/frontend/src/app/components/Root.tsx b/components/dashboard/frontend/src/app/components/Root.tsx index 883fa9e83..938d74613 100644 --- a/components/dashboard/frontend/src/app/components/Root.tsx +++ b/components/dashboard/frontend/src/app/components/Root.tsx @@ -18,7 +18,7 @@ import {Visualizer} from "./Visualizer"; import {Tips} from "./Tips"; import {ExplorerTransactionQueryResult} from "./ExplorerTransactionQueryResult"; import {ExplorerOutputQueryResult} from "./ExplorerOutputQueryResult"; -import {ExplorerConflictQueryResult} from "./ExplorerConflictQueryResult"; +import {ExplorerSpendQueryResult} from "./ExplorerSpendQueryResult"; import { SlotLiveFeed } from './SlotLiveFeed'; import { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult'; @@ -92,7 +92,7 @@ export class Root extends React.Component { - + diff --git a/components/dashboard/frontend/src/app/misc/Payload.ts b/components/dashboard/frontend/src/app/misc/Payload.ts index 35f39c365..46a5086bb 100644 --- a/components/dashboard/frontend/src/app/misc/Payload.ts +++ b/components/dashboard/frontend/src/app/misc/Payload.ts @@ -108,7 +108,7 @@ export class Balance { color: string; } -export class Conflict { +export class Spend { tx_id: string; opinion: Opinion; } diff --git a/components/dashboard/frontend/src/app/misc/WS.ts b/components/dashboard/frontend/src/app/misc/WS.ts index 6e2b62e8e..da7ac252c 100644 --- a/components/dashboard/frontend/src/app/misc/WS.ts +++ b/components/dashboard/frontend/src/app/misc/WS.ts @@ -13,8 +13,8 @@ export enum WSMsgType { ManaMapOnline, BlkManaDashboardAddress, RateSetter, - ConflictSet, - Conflict, + SpendSet, + Spend, SlotInfo, } diff --git a/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx b/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx index 0fe2e33f6..53099b5fc 100644 --- a/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx +++ b/components/dashboard/frontend/src/app/stores/ExplorerStore.tsx @@ -121,35 +121,35 @@ class PendingMana { timestamp: number; } -class Conflict { +class Spend { id: string; parents: Array; spendIDs: Array; confirmationState: number; } -class ConflictChildren { - conflictID: string; - childConflicts: Array +class SpendChildren { + spendID: string; + childSpends: Array } -class ConflictChild { - conflictID: string; +class SpendChild { + spendID: string; type: string; } -class ConflictConflict { +class SpendSpend { outputID: OutputID; spendIDs: Array; } -class ConflictConflicts { - conflictID: string; - conflicts: Array +class SpendSpends { + spendID: string; + spends: Array } -class ConflictVoters { - conflictID: string; +class SpendVoters { + spendID: string; voters: Array } @@ -200,10 +200,10 @@ export class ExplorerStore { @observable outputMetadata: OutputMetadata = null; @observable outputConsumers: OutputConsumers = null; @observable pendingMana: PendingMana = null; - @observable conflict: Conflict = null; - @observable conflictChildren: ConflictChildren = null; - @observable conflictConflicts: ConflictConflicts = null; - @observable conflictVoters: ConflictVoters = null; + @observable spend: Spend = null; + @observable spendChildren: SpendChildren = null; + @observable spendSpends: SpendSpends = null; + @observable spendVoters: SpendVoters = null; @observable tips: Tips = null; @observable slotInfo: SlotInfo = new SlotInfo; @@ -347,27 +347,27 @@ export class ExplorerStore { } @action - getConflict = async (id: string) => { - const res = await this.fetchJson("get", `/api/conflict/${id}`) - this.conflict = res; + getSpend = async (id: string) => { + const res = await this.fetchJson("get", `/api/spend/${id}`) + this.spend = res; } @action - getConflictChildren = async (id: string) => { - const res = await this.fetchJson("get", `/api/conflict/${id}/children`) - this.conflictChildren = res; + getSpendChildren = async (id: string) => { + const res = await this.fetchJson("get", `/api/spend/${id}/children`) + this.spendChildren = res; } @action - getConflictConflicts = async (id: string) => { - const res = await this.fetchJson("get", `/api/conflict/${id}/conflicts`) - this.conflictConflicts = res; + getSpendSpends = async (id: string) => { + const res = await this.fetchJson("get", `/api/spend/${id}/spends`) + this.spendSpends = res; } @action - getConflictVoters = async (id: string) => { - const res = await this.fetchJson("get", `/api/conflict/${id}/voters`) - this.conflictVoters = res; + getSpendVoters = async (id: string) => { + const res = await this.fetchJson("get", `/api/spend/${id}/voters`) + this.spendVoters = res; } @action @@ -394,9 +394,9 @@ export class ExplorerStore { this.outputMetadata = null; this.outputConsumers = null; this.pendingMana = null; - this.conflict = null; - this.conflictChildren = null; - this.conflictConflicts = null; + this.spend = null; + this.spendChildren = null; + this.spendSpends = null; this.tips = null; this.slotInfo = new SlotInfo; }; diff --git a/components/dashboard/frontend/src/app/stores/ConflictsStore.tsx b/components/dashboard/frontend/src/app/stores/SpendsStore.tsx similarity index 55% rename from components/dashboard/frontend/src/app/stores/ConflictsStore.tsx rename to components/dashboard/frontend/src/app/stores/SpendsStore.tsx index 1e939cfe2..c22b664dd 100644 --- a/components/dashboard/frontend/src/app/stores/ConflictsStore.tsx +++ b/components/dashboard/frontend/src/app/stores/SpendsStore.tsx @@ -7,17 +7,17 @@ import NodeStore from './NodeStore'; import {Table} from "react-bootstrap"; import {ConfirmationState, resolveConfirmationState} from "../utils/confirmation_state"; -export class ConflictSet { - conflictSetID: string; +export class SpendSet { + spendSetID: string; arrivalTime: number; resolved: boolean; timeToResolve: number; shown: boolean; } -export class Conflict { - conflictID: string; - conflictSetIDs: Array; +export class Spend { + spendID: string; + spendSetIDs: Array; confirmationState: number; issuingTime: number; issuerNodeID: string; @@ -25,10 +25,10 @@ export class Conflict { // const liveFeedSize = 10; -export class ConflictsStore { +export class SpendsStore { // live feed - @observable conflictSets: Map; - @observable conflicts: Map; + @observable spendSets: Map; + @observable spends: Map; routerStore: RouterStore; nodeStore: NodeStore; @@ -36,73 +36,73 @@ export class ConflictsStore { constructor(routerStore: RouterStore, nodeStore: NodeStore) { this.routerStore = routerStore; this.nodeStore = nodeStore; - this.conflictSets = new Map; - this.conflicts = new Map; - registerHandler(WSMsgType.ConflictSet, this.updateConflictSets); - registerHandler(WSMsgType.Conflict, this.updateConflicts); + this.spendSets = new Map; + this.spends = new Map; + registerHandler(WSMsgType.SpendSet, this.updateSpendSets); + registerHandler(WSMsgType.Spend, this.updateSpends); } @action - updateConflictSets = (blk: ConflictSet) => { - this.conflictSets.set(blk.conflictSetID, blk); + updateSpendSets = (blk: SpendSet) => { + this.spendSets.set(blk.spendSetID, blk); }; @action - updateConflicts = (blk: Conflict) => { - this.conflicts.set(blk.conflictID, blk); + updateSpends = (blk: Spend) => { + this.spends.set(blk.spendID, blk); }; @computed - get conflictsLiveFeed() { + get spendsLiveFeed() { // sort branches by time and ID to prevent "jumping" - let conflictsArr = Array.from(this.conflictSets.values()); - conflictsArr.sort((x: ConflictSet, y: ConflictSet): number => { - return y.arrivalTime - x.arrivalTime || x.conflictSetID.localeCompare(y.conflictSetID); + let spendsArr = Array.from(this.spendSets.values()); + spendsArr.sort((x: SpendSet, y: SpendSet): number => { + return y.arrivalTime - x.arrivalTime || x.spendSetID.localeCompare(y.spendSetID); } ) let feed = []; - for (let conflict of conflictsArr) { + for (let spend of spendsArr) { feed.push( - conflict.shown = !conflict.shown} style={{cursor:"pointer"}}> + spend.shown = !spend.shown} style={{cursor:"pointer"}}> - - {conflict.conflictSetID} + + {spend.spendSetID} - {new Date(conflict.arrivalTime * 1000).toLocaleString()} + {new Date(spend.arrivalTime * 1000).toLocaleString()} - {conflict.resolved ? 'Yes' : 'No'} + {spend.resolved ? 'Yes' : 'No'} - {conflict.timeToResolve/1000000} + {spend.timeToResolve/1000000} ); // only render and show branches if it has been clicked - if (!conflict.shown) { + if (!spend.shown) { continue } // sort branches by time and ID to prevent "jumping" - let branchesArr = Array.from(this.conflicts.values()); - branchesArr.sort((x: Conflict, y: Conflict): number => { - return x.issuingTime - y.issuingTime || x.conflictID.localeCompare(y.conflictID) + let branchesArr = Array.from(this.spends.values()); + branchesArr.sort((x: Spend, y: Spend): number => { + return x.issuingTime - y.issuingTime || x.spendID.localeCompare(y.spendID) } ) let branches = []; for (let branch of branchesArr) { - for(let conflictID of branch.conflictSetIDs){ - if (conflictID === conflict.conflictSetID) { + for(let spendID of branch.spendSetIDs){ + if (spendID === spend.spendSetID) { branches.push( - ConfirmationState.Accepted ? "table-success" : ""}> + ConfirmationState.Accepted ? "table-success" : ""}> - - {branch.conflictID} + + {branch.spendID} {resolveConfirmationState(branch.confirmationState)} @@ -114,7 +114,7 @@ export class ConflictsStore { } } feed.push( - + @@ -139,4 +139,4 @@ export class ConflictsStore { } -export default ConflictsStore; +export default SpendsStore; diff --git a/components/dashboard/frontend/src/app/utils/conflict.ts b/components/dashboard/frontend/src/app/utils/conflict.ts deleted file mode 100644 index ce8a606ca..000000000 --- a/components/dashboard/frontend/src/app/utils/conflict.ts +++ /dev/null @@ -1,21 +0,0 @@ -export function resolveBase58ConflictID(base58Conflict: string): string { - switch (base58Conflict) { - case MasterConflictInBase58: - return "MasterConflictID"; - case UndefinedConflictInBase58: - return "UndefinedConflictID"; - case LazyBookedConflictsConflictInBase58: - return "LazyBookedConflictsConflictID"; - case InvalidConflictInBase58: - return "InvalidConflictID"; - default: - // otherwise it is a "regular" conflictID that doesn't have a distinct name - return base58Conflict - } -} - -// base58 conflictIDs that have distinct names -const MasterConflictInBase58 = "4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM" -const UndefinedConflictInBase58 = "11111111111111111111111111111111" -const LazyBookedConflictsConflictInBase58 = "JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF" -const InvalidConflictInBase58 = "JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG" \ No newline at end of file diff --git a/components/dashboard/frontend/src/app/utils/spend.ts b/components/dashboard/frontend/src/app/utils/spend.ts new file mode 100644 index 000000000..8cf945acc --- /dev/null +++ b/components/dashboard/frontend/src/app/utils/spend.ts @@ -0,0 +1,21 @@ +export function resolveBase58SpendID(base58Spend: string): string { + switch (base58Spend) { + case MasterSpendInBase58: + return "MasterSpendID"; + case UndefinedSpendInBase58: + return "UndefinedSpendID"; + case LazyBookedSpendsSpendInBase58: + return "LazyBookedSpendsSpendID"; + case InvalidSpendInBase58: + return "InvalidSpendID"; + default: + // otherwise it is a "regular" spendID that doesn't have a distinct name + return base58Spend + } +} + +// base58 spendIDs that have distinct names +const MasterSpendInBase58 = "4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM" +const UndefinedSpendInBase58 = "11111111111111111111111111111111" +const LazyBookedSpendsSpendInBase58 = "JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF" +const InvalidSpendInBase58 = "JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG" \ No newline at end of file diff --git a/components/dashboard/frontend/src/main.tsx b/components/dashboard/frontend/src/main.tsx index 49866cd7d..3b4fc8346 100644 --- a/components/dashboard/frontend/src/main.tsx +++ b/components/dashboard/frontend/src/main.tsx @@ -12,13 +12,13 @@ import FaucetStore from "./app/stores/FaucetStore"; import VisualizerStore from "./app/stores/VisualizerStore"; import ManaStore from "./app/stores/ManaStore"; import {SlotStore} from "./app/stores/SlotStore"; -import ConflictsStore from "./app/stores/ConflictsStore"; +import SpendsStore from "./app/stores/SpendsStore"; // prepare MobX stores const routerStore = new RouterStore(); const nodeStore = new NodeStore(); const explorerStore = new ExplorerStore(routerStore); -const conflictsStore = new ConflictsStore(routerStore, nodeStore); +const spendsStore = new SpendsStore(routerStore, nodeStore); const faucetStore = new FaucetStore(routerStore); const visualizerStore = new VisualizerStore(routerStore); const manaStore = new ManaStore(); @@ -27,7 +27,7 @@ const stores = { "routerStore": routerStore, "nodeStore": nodeStore, "explorerStore": explorerStore, - "conflictsStore": conflictsStore, + "spendsStore": spendsStore, "faucetStore": faucetStore, "visualizerStore": visualizerStore, "manaStore": manaStore, From 311b2efbf20d6225eae1e21d8b3d14624025ca3c Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 21 Nov 2023 15:16:29 +0000 Subject: [PATCH 14/18] spend -> spender --- components/debugapi/debug_models.go | 14 +- pkg/core/acceptance/state.go | 6 +- pkg/core/weight/value.go | 4 +- pkg/protocol/engine/blocks/block.go | 36 +- .../engine/booker/inmemorybooker/booker.go | 54 +- pkg/protocol/engine/ledger/ledger/ledger.go | 10 +- .../engine/mempool/spenddag/errors.go | 2 +- .../engine/mempool/spenddag/events.go | 46 +- .../engine/mempool/spenddag/spenddag.go | 54 +- .../spenddag/spenddagv1/sorted_spend.go | 98 +-- .../spenddag/spenddagv1/sorted_spends.go | 130 ++-- .../spenddag/spenddagv1/sorted_spends_test.go | 94 +-- .../mempool/spenddag/spenddagv1/spend.go | 227 +++---- .../mempool/spenddag/spenddagv1/spend_set.go | 36 +- .../mempool/spenddag/spenddagv1/spend_test.go | 210 +++--- .../mempool/spenddag/spenddagv1/spenddag.go | 316 ++++----- .../spenddag/spenddagv1/spenddag_test.go | 20 +- .../mempool/spenddag/spenddagv1/utils.go | 12 +- .../mempool/spenddag/tests/assertions.go | 42 +- .../mempool/spenddag/tests/framework.go | 40 +- .../engine/mempool/spenddag/tests/tests.go | 624 +++++++++--------- pkg/protocol/engine/mempool/state_metadata.go | 2 +- .../engine/mempool/tests/testframework.go | 8 +- pkg/protocol/engine/mempool/tests/tests.go | 6 +- .../engine/mempool/transaction_metadata.go | 2 +- pkg/protocol/engine/mempool/v1/mempool.go | 10 +- .../engine/mempool/v1/state_metadata.go | 10 +- .../engine/mempool/v1/transaction_metadata.go | 36 +- .../engine/tipselection/v1/tip_selection.go | 18 +- pkg/tests/booker_test.go | 2 +- pkg/testsuite/blocks.go | 12 +- pkg/testsuite/mock/node.go | 16 +- pkg/testsuite/transactions.go | 12 +- 33 files changed, 1105 insertions(+), 1104 deletions(-) diff --git a/components/debugapi/debug_models.go b/components/debugapi/debug_models.go index c912af5ad..b754169ba 100644 --- a/components/debugapi/debug_models.go +++ b/components/debugapi/debug_models.go @@ -29,11 +29,11 @@ type ( Confirmed bool `json:"confirmed"` Witnesses []string `json:"witnesses"` - // spendIDs are the all spendIDs of the block inherited from the parents + payloadSpendIDs. - SpendIDs []iotago.TransactionID `json:"spendIDs"` - // payloadSpendIDs are the spendIDs of the block's payload (in case it is a transaction, otherwise empty). - PayloadSpendIDs []iotago.TransactionID `json:"payloadSpendIDs"` - String string `json:"string"` + // spenderIDs are the all spenderIDs of the block inherited from the parents + payloadSpenderIDs. + SpenderIDs []iotago.TransactionID `json:"spenderIDs"` + // payloadSpenderIDs are the spenderIDs of the block's payload (in case it is a transaction, otherwise empty). + PayloadSpenderIDs []iotago.TransactionID `json:"payloadSpenderIDs"` + String string `json:"string"` } Validator struct { @@ -82,8 +82,8 @@ func BlockMetadataResponseFromBlock(block *blocks.Block) *BlockMetadataResponse PreConfirmed: block.IsPreConfirmed(), Confirmed: block.IsConfirmed(), Witnesses: lo.Map(block.Witnesses(), func(seatIndex account.SeatIndex) string { return fmt.Sprintf("%d", seatIndex) }), - SpendIDs: block.SpendIDs().ToSlice(), - PayloadSpendIDs: block.PayloadSpendIDs().ToSlice(), + SpenderIDs: block.SpenderIDs().ToSlice(), + PayloadSpenderIDs: block.PayloadSpenderIDs().ToSlice(), String: block.String(), } } diff --git a/pkg/core/acceptance/state.go b/pkg/core/acceptance/state.go index 9bb7d0c2f..6212fac73 100644 --- a/pkg/core/acceptance/state.go +++ b/pkg/core/acceptance/state.go @@ -5,13 +5,13 @@ import ( ) const ( - // Pending is the state of pending spends. + // Pending is the state of pending spenders. Pending State = iota - // Accepted is the state of accepted spends. + // Accepted is the state of accepted spenders. Accepted - // Rejected is the state of rejected spends. + // Rejected is the state of rejected spenders. Rejected ) diff --git a/pkg/core/weight/value.go b/pkg/core/weight/value.go index 1945a4c0b..2bcb0706d 100644 --- a/pkg/core/weight/value.go +++ b/pkg/core/weight/value.go @@ -5,7 +5,7 @@ import ( "github.com/iotaledger/iota-core/pkg/core/acceptance" ) -// Value represents an immutable multi-tiered weight value, which is used to determine the order of Conflicts. +// Value represents an immutable multi-tiered weight value, which is used to determine the order of spenders. type Value struct { // cumulativeWeight is the lowest tier which accrues weight in a cumulative manner (i.e. PoW or burned mana). cumulativeWeight int64 @@ -13,7 +13,7 @@ type Value struct { // validatorsWeight is the second tier which tracks weight in a non-cumulative manner (BFT style). validatorsWeight int64 - // acceptanceState is the final tier which determines the decision of the Conflict. + // acceptanceState is the final tier which determines the decision of the spender. acceptanceState acceptance.State } diff --git a/pkg/protocol/engine/blocks/block.go b/pkg/protocol/engine/blocks/block.go index 74e5c1200..bba486056 100644 --- a/pkg/protocol/engine/blocks/block.go +++ b/pkg/protocol/engine/blocks/block.go @@ -28,10 +28,10 @@ type Block struct { // Booker block booked reactive.Variable[bool] witnesses ds.Set[account.SeatIndex] - // spendIDs are the all spendIDs of the block inherited from the parents + payloadSpendIDs. - spendIDs ds.Set[iotago.TransactionID] - // payloadSpendIDs are the spendIDs of the block's payload (in case it is a transaction, otherwise empty). - payloadSpendIDs ds.Set[iotago.TransactionID] + // spenderIDs are the all spenderIDs of the block inherited from the parents + payloadSpenderIDs. + spenderIDs ds.Set[iotago.TransactionID] + // payloadSpenderIDs are the spenderIDs of the block's payload (in case it is a transaction, otherwise empty). + payloadSpenderIDs ds.Set[iotago.TransactionID] // BlockGadget block preAccepted bool @@ -77,8 +77,8 @@ func (r *rootBlock) String() string { func NewBlock(data *model.Block) *Block { return &Block{ witnesses: ds.NewSet[account.SeatIndex](), - spendIDs: ds.NewSet[iotago.TransactionID](), - payloadSpendIDs: ds.NewSet[iotago.TransactionID](), + spenderIDs: ds.NewSet[iotago.TransactionID](), + payloadSpenderIDs: ds.NewSet[iotago.TransactionID](), acceptanceRatifiers: ds.NewSet[account.SeatIndex](), confirmationRatifiers: ds.NewSet[account.SeatIndex](), modelBlock: data, @@ -94,8 +94,8 @@ func NewBlock(data *model.Block) *Block { func NewRootBlock(blockID iotago.BlockID, commitmentID iotago.CommitmentID, issuingTime time.Time) *Block { b := &Block{ witnesses: ds.NewSet[account.SeatIndex](), - spendIDs: ds.NewSet[iotago.TransactionID](), - payloadSpendIDs: ds.NewSet[iotago.TransactionID](), + spenderIDs: ds.NewSet[iotago.TransactionID](), + payloadSpenderIDs: ds.NewSet[iotago.TransactionID](), acceptanceRatifiers: ds.NewSet[account.SeatIndex](), confirmationRatifiers: ds.NewSet[account.SeatIndex](), @@ -127,8 +127,8 @@ func NewMissingBlock(blockID iotago.BlockID) *Block { missing: true, missingBlockID: blockID, witnesses: ds.NewSet[account.SeatIndex](), - spendIDs: ds.NewSet[iotago.TransactionID](), - payloadSpendIDs: ds.NewSet[iotago.TransactionID](), + spenderIDs: ds.NewSet[iotago.TransactionID](), + payloadSpenderIDs: ds.NewSet[iotago.TransactionID](), acceptanceRatifiers: ds.NewSet[account.SeatIndex](), confirmationRatifiers: ds.NewSet[account.SeatIndex](), solid: reactive.NewVariable[bool](), @@ -395,32 +395,32 @@ func (b *Block) Witnesses() []account.SeatIndex { return b.witnesses.ToSlice() } -func (b *Block) SpendIDs() ds.Set[iotago.TransactionID] { +func (b *Block) SpenderIDs() ds.Set[iotago.TransactionID] { b.mutex.RLock() defer b.mutex.RUnlock() - return b.spendIDs + return b.spenderIDs } -func (b *Block) SetSpendIDs(spendIDs ds.Set[iotago.TransactionID]) { +func (b *Block) SetSpenderIDs(spenderIDs ds.Set[iotago.TransactionID]) { b.mutex.Lock() defer b.mutex.Unlock() - b.spendIDs = spendIDs + b.spenderIDs = spenderIDs } -func (b *Block) PayloadSpendIDs() ds.Set[iotago.TransactionID] { +func (b *Block) PayloadSpenderIDs() ds.Set[iotago.TransactionID] { b.mutex.RLock() defer b.mutex.RUnlock() - return b.payloadSpendIDs + return b.payloadSpenderIDs } -func (b *Block) SetPayloadSpendIDs(payloadSpendIDs ds.Set[iotago.TransactionID]) { +func (b *Block) SetPayloadSpenderIDs(payloadSpenderIDs ds.Set[iotago.TransactionID]) { b.mutex.Lock() defer b.mutex.Unlock() - b.payloadSpendIDs = payloadSpendIDs + b.payloadSpenderIDs = payloadSpenderIDs } // IsPreAccepted returns true if the Block was preAccepted. diff --git a/pkg/protocol/engine/booker/inmemorybooker/booker.go b/pkg/protocol/engine/booker/inmemorybooker/booker.go index 6261e7306..0547f4601 100644 --- a/pkg/protocol/engine/booker/inmemorybooker/booker.go +++ b/pkg/protocol/engine/booker/inmemorybooker/booker.go @@ -108,7 +108,7 @@ func (b *Booker) Queue(block *blocks.Block) error { } transactionMetadata.OnBooked(func() { - block.SetPayloadSpendIDs(transactionMetadata.SpendIDs()) + block.SetPayloadSpenderIDs(transactionMetadata.SpenderIDs()) b.setupBlock(block) }) }) @@ -158,37 +158,37 @@ func (b *Booker) setRetainBlockFailureFunc(retainBlockFailure func(iotago.BlockI } func (b *Booker) book(block *blocks.Block) error { - spendsToInherit, err := b.inheritSpends(block) + spendersToInherit, err := b.inheritSpenders(block) if err != nil { - return ierrors.Wrapf(err, "failed to inherit spends for block %s", block.ID()) + return ierrors.Wrapf(err, "failed to inherit spenders for block %s", block.ID()) } - // The block does not inherit spends that have been orphaned with respect to its commitment. - for it := spendsToInherit.Iterator(); it.HasNext(); { - spendID := it.Next() + // The block does not inherit spenders that have been orphaned with respect to its commitment. + for it := spendersToInherit.Iterator(); it.HasNext(); { + spenderID := it.Next() - txMetadata, exists := b.ledger.MemPool().TransactionMetadata(spendID) + txMetadata, exists := b.ledger.MemPool().TransactionMetadata(spenderID) if !exists { - return ierrors.Errorf("failed to load transaction %s for block %s", spendID.String(), block.ID()) + return ierrors.Errorf("failed to load transaction %s for block %s", spenderID.String(), block.ID()) } if orphanedSlot, orphaned := txMetadata.OrphanedSlot(); orphaned && orphanedSlot <= block.SlotCommitmentID().Slot() { - // Merge-to-master orphaned spends. - spendsToInherit.Delete(spendID) + // Merge-to-master orphaned spenders. + spendersToInherit.Delete(spenderID) } } - block.SetSpendIDs(spendsToInherit) + block.SetSpenderIDs(spendersToInherit) block.SetBooked() b.events.BlockBooked.Trigger(block) return nil } -func (b *Booker) inheritSpends(block *blocks.Block) (spendIDs ds.Set[iotago.TransactionID], err error) { - spendIDsToInherit := ds.NewSet[iotago.TransactionID]() +func (b *Booker) inheritSpenders(block *blocks.Block) (spenderIDs ds.Set[iotago.TransactionID], err error) { + spenderIDsToInherit := ds.NewSet[iotago.TransactionID]() - // Inherit spendIDs from parents based on the parent type. + // Inherit spenderIDs from parents based on the parent type. for _, parent := range block.ParentsWithType() { parentBlock, exists := b.blockCache.Block(parent.ID) if !exists { @@ -198,30 +198,30 @@ func (b *Booker) inheritSpends(block *blocks.Block) (spendIDs ds.Set[iotago.Tran switch parent.Type { case iotago.StrongParentType: - spendIDsToInherit.AddAll(parentBlock.SpendIDs()) + spenderIDsToInherit.AddAll(parentBlock.SpenderIDs()) case iotago.WeakParentType: - spendIDsToInherit.AddAll(parentBlock.PayloadSpendIDs()) + spenderIDsToInherit.AddAll(parentBlock.PayloadSpenderIDs()) case iotago.ShallowLikeParentType: // Check whether the parent contains a conflicting TX, // otherwise reference is invalid and the block should be marked as invalid as well. - if signedTransaction, hasTx := parentBlock.SignedTransaction(); !hasTx || !parentBlock.PayloadSpendIDs().Has(lo.PanicOnErr(signedTransaction.Transaction.ID())) { + if signedTransaction, hasTx := parentBlock.SignedTransaction(); !hasTx || !parentBlock.PayloadSpenderIDs().Has(lo.PanicOnErr(signedTransaction.Transaction.ID())) { return nil, ierrors.Wrapf(err, "shallow like parent %s does not contain a conflicting transaction", parent.ID.String()) } - spendIDsToInherit.AddAll(parentBlock.PayloadSpendIDs()) - // remove all conflicting spends from spendIDsToInherit - for _, spendID := range parentBlock.PayloadSpendIDs().ToSlice() { - if conflictingSpends, exists := b.spendDAG.ConflictingSpends(spendID); exists { - spendIDsToInherit.DeleteAll(b.spendDAG.FutureCone(conflictingSpends)) + spenderIDsToInherit.AddAll(parentBlock.PayloadSpenderIDs()) + // remove all conflicting spenders from spenderIDsToInherit + for _, spenderID := range parentBlock.PayloadSpenderIDs().ToSlice() { + if conflictingSpends, exists := b.spendDAG.ConflictingSpenders(spenderID); exists { + spenderIDsToInherit.DeleteAll(b.spendDAG.FutureCone(conflictingSpends)) } } } } - // Add all spends from the block's payload itself. - // Forking on booking: we determine the block's PayloadSpendIDs by treating each TX as a conflict. - spendIDsToInherit.AddAll(block.PayloadSpendIDs()) + // Add all spenders from the block's payload itself. + // Forking on booking: we determine the block's PayloadSpenderIDs by treating each TX as a spender. + spenderIDsToInherit.AddAll(block.PayloadSpenderIDs()) - // Only inherit spends that are not yet accepted (aka merge to master). - return b.spendDAG.UnacceptedSpends(spendIDsToInherit), nil + // Only inherit spenders that are not yet accepted (aka merge to master). + return b.spendDAG.UnacceptedSpenders(spenderIDsToInherit), nil } diff --git a/pkg/protocol/engine/ledger/ledger/ledger.go b/pkg/protocol/engine/ledger/ledger/ledger.go index 710926e5f..4112bd8a4 100644 --- a/pkg/protocol/engine/ledger/ledger/ledger.go +++ b/pkg/protocol/engine/ledger/ledger/ledger.go @@ -156,13 +156,13 @@ func (l *Ledger) CommitSlot(slot iotago.SlotIndex) (stateRoot iotago.Identifier, // collect outputs and allotments from the "uncompacted" stateDiff // outputs need to be processed in the "uncompacted" version of the state diff, as we need to be able to store // and retrieve intermediate outputs to show to the user - spends, outputs, accountDiffs, err := l.processStateDiffTransactions(stateDiff) + spenders, outputs, accountDiffs, err := l.processStateDiffTransactions(stateDiff) if err != nil { return iotago.Identifier{}, iotago.Identifier{}, iotago.Identifier{}, nil, nil, ierrors.Errorf("failed to process state diff transactions in slot %d: %w", slot, err) } // Now we process the collected account changes, for that we consume the "compacted" state diff to get the overall - // account changes at UTXO level without needing to worry about multiple spends of the same account in the same slot, + // account changes at UTXO level without needing to worry about multiple spenders of the same account in the same slot, // we only care about the initial account output to be consumed and the final account output to be created. // output side createdAccounts, consumedAccounts, destroyedAccounts, err := l.processCreatedAndConsumedAccountOutputs(stateDiff, accountDiffs) @@ -174,7 +174,7 @@ func (l *Ledger) CommitSlot(slot iotago.SlotIndex) (stateRoot iotago.Identifier, // Commit the changes // Update the UTXO ledger - if err = l.utxoLedger.ApplyDiff(slot, outputs, spends); err != nil { + if err = l.utxoLedger.ApplyDiff(slot, outputs, spenders); err != nil { return iotago.Identifier{}, iotago.Identifier{}, iotago.Identifier{}, nil, nil, ierrors.Errorf("failed to apply diff to UTXO ledger for slot %d: %w", slot, err) } @@ -204,7 +204,7 @@ func (l *Ledger) CommitSlot(slot iotago.SlotIndex) (stateRoot iotago.Identifier, return true }) - return l.utxoLedger.StateTreeRoot(), stateDiff.Mutations().Root(), l.accountsLedger.AccountsTreeRoot(), outputs, spends, nil + return l.utxoLedger.StateTreeRoot(), stateDiff.Mutations().Root(), l.accountsLedger.AccountsTreeRoot(), outputs, spenders, nil } func (l *Ledger) AddAccount(output *utxoledger.Output, blockIssuanceCredits iotago.BlockIssuanceCredits) error { @@ -769,7 +769,7 @@ func (l *Ledger) blockPreAccepted(block *blocks.Block) { return } - if err := l.spendDAG.CastVotes(vote.NewVote(seat, voteRank), block.SpendIDs()); err != nil { + if err := l.spendDAG.CastVotes(vote.NewVote(seat, voteRank), block.SpenderIDs()); err != nil { l.errorHandler(ierrors.Wrapf(err, "failed to cast votes for block %s", block.ID())) } } diff --git a/pkg/protocol/engine/mempool/spenddag/errors.go b/pkg/protocol/engine/mempool/spenddag/errors.go index 852d78bcf..7f2d5e101 100644 --- a/pkg/protocol/engine/mempool/spenddag/errors.go +++ b/pkg/protocol/engine/mempool/spenddag/errors.go @@ -4,7 +4,7 @@ import "github.com/iotaledger/hive.go/ierrors" var ( ErrExpected = ierrors.New("expected error") - ErrAlreadyPartOfSpendSet = ierrors.New("spend already part of SpendSet") + ErrAlreadyPartOfSpendSet = ierrors.New("spender already part of SpendSet") ErrEntityEvicted = ierrors.New("tried to operate on evicted entity") ErrFatal = ierrors.New("fatal error") ) diff --git a/pkg/protocol/engine/mempool/spenddag/events.go b/pkg/protocol/engine/mempool/spenddag/events.go index a66400081..6ec0b7d9e 100644 --- a/pkg/protocol/engine/mempool/spenddag/events.go +++ b/pkg/protocol/engine/mempool/spenddag/events.go @@ -8,38 +8,38 @@ import ( // region Events /////////////////////////////////////////////////////////////////////////////////////////////////////// // Events is a container that acts as a dictionary for the events of a SpendDAG. -type Events[SpendID, ResourceID comparable] struct { - // SpendCreated is triggered when a new Spend is created. - SpendCreated *event.Event1[SpendID] +type Events[SpenderID, ResourceID comparable] struct { + // SpenderCreated is triggered when a new Spender is created. + SpenderCreated *event.Event1[SpenderID] - // SpendEvicted is triggered when a Spend is evicted from the SpendDAG. - SpendEvicted *event.Event1[SpendID] + // SpenderEvicted is triggered when a Spender is evicted from the SpendDAG. + SpenderEvicted *event.Event1[SpenderID] - // ConflictingResourcesAdded is triggered when the Spend is added to a new SpendSet. - ConflictingResourcesAdded *event.Event2[SpendID, ds.Set[ResourceID]] + // SpentResourcesAdded is triggered when the Spender is added to a new SpendSet. + SpentResourcesAdded *event.Event2[SpenderID, ds.Set[ResourceID]] - // SpendParentsUpdated is triggered when the parents of a Spend are updated. - SpendParentsUpdated *event.Event2[SpendID, ds.Set[SpendID]] + // SpenderParentsUpdated is triggered when the parents of a Spender are updated. + SpenderParentsUpdated *event.Event2[SpenderID, ds.Set[SpenderID]] - // SpendAccepted is an event that gets triggered whenever a Spend is confirmed. - SpendAccepted *event.Event1[SpendID] + // SpenderAccepted is an event that gets triggered whenever a Spender is confirmed. + SpenderAccepted *event.Event1[SpenderID] - // SpendRejected is an event that gets triggered whenever a Spend is rejected. - SpendRejected *event.Event1[SpendID] + // SpenderRejected is an event that gets triggered whenever a Spender is rejected. + SpenderRejected *event.Event1[SpenderID] - event.Group[Events[SpendID, ResourceID], *Events[SpendID, ResourceID]] + event.Group[Events[SpenderID, ResourceID], *Events[SpenderID, ResourceID]] } // NewEvents contains the constructor of the Events object (it is generated by a generic factory). -func NewEvents[SpendID, ResourceID comparable](optsLinkTarget ...*Events[SpendID, ResourceID]) (events *Events[SpendID, ResourceID]) { - return event.CreateGroupConstructor(func() (self *Events[SpendID, ResourceID]) { - return &Events[SpendID, ResourceID]{ - SpendCreated: event.New1[SpendID](), - SpendEvicted: event.New1[SpendID](), - ConflictingResourcesAdded: event.New2[SpendID, ds.Set[ResourceID]](), - SpendParentsUpdated: event.New2[SpendID, ds.Set[SpendID]](), - SpendAccepted: event.New1[SpendID](), - SpendRejected: event.New1[SpendID](), +func NewEvents[SpenderID, ResourceID comparable](optsLinkTarget ...*Events[SpenderID, ResourceID]) (events *Events[SpenderID, ResourceID]) { + return event.CreateGroupConstructor(func() (self *Events[SpenderID, ResourceID]) { + return &Events[SpenderID, ResourceID]{ + SpenderCreated: event.New1[SpenderID](), + SpenderEvicted: event.New1[SpenderID](), + SpentResourcesAdded: event.New2[SpenderID, ds.Set[ResourceID]](), + SpenderParentsUpdated: event.New2[SpenderID, ds.Set[SpenderID]](), + SpenderAccepted: event.New1[SpenderID](), + SpenderRejected: event.New1[SpenderID](), } })(optsLinkTarget...) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddag.go index 7682773b1..e6b10f855 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddag.go @@ -7,37 +7,37 @@ import ( "github.com/iotaledger/iota-core/pkg/core/vote" ) -type SpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { +type SpendDAG[SpenderID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { Shutdown() - Events() *Events[SpendID, ResourceID] + Events() *Events[SpenderID, ResourceID] - CreateSpend(id SpendID) - UpdateConflictingResources(id SpendID, resourceIDs ds.Set[ResourceID]) error + CreateSpender(id SpenderID) + UpdateSpentResources(id SpenderID, resourceIDs ds.Set[ResourceID]) error - ReadConsistent(callback func(spendDAG ReadLockedSpendDAG[SpendID, ResourceID, VoteRank]) error) error - UpdateSpendParents(spendID SpendID, addedParentIDs, removedParentIDs ds.Set[SpendID]) error - FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) - ConflictingSpends(spendID SpendID) (conflictingSpends ds.Set[SpendID], exists bool) - CastVotes(vote *vote.Vote[VoteRank], spendIDs ds.Set[SpendID]) error - AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State - SetAccepted(spendID SpendID) - UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] - AllSpendsSupported(seat account.SeatIndex, spendIDs ds.Set[SpendID]) bool - EvictSpend(spendID SpendID) + ReadConsistent(callback func(spendDAG ReadLockedSpendDAG[SpenderID, ResourceID, VoteRank]) error) error + UpdateSpendParents(spenderID SpenderID, addedParentIDs, removedParentIDs ds.Set[SpenderID]) error + FutureCone(spenderIDs ds.Set[SpenderID]) (futureCone ds.Set[SpenderID]) + ConflictingSpenders(spenderID SpenderID) (conflictingSpends ds.Set[SpenderID], exists bool) + CastVotes(vote *vote.Vote[VoteRank], spenderIDs ds.Set[SpenderID]) error + AcceptanceState(spenderIDs ds.Set[SpenderID]) acceptance.State + SetAccepted(spenderID SpenderID) + UnacceptedSpenders(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] + AllSpendsSupported(seat account.SeatIndex, spenderIDs ds.Set[SpenderID]) bool + EvictSpender(spenderID SpenderID) - SpendSets(spendID SpendID) (spendSetIDs ds.Set[ResourceID], exists bool) - SpendParents(spendID SpendID) (spendIDs ds.Set[SpendID], exists bool) - SpendSetMembers(spendSetID ResourceID) (spendIDs ds.Set[SpendID], exists bool) - SpendWeight(spendID SpendID) int64 - SpendChildren(spendID SpendID) (spendIDs ds.Set[SpendID], exists bool) - SpendVoters(spendID SpendID) (voters ds.Set[account.SeatIndex]) - LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] + SpendSets(spenderID SpenderID) (spendSetIDs ds.Set[ResourceID], exists bool) + SpendParents(spenderID SpenderID) (spenderIDs ds.Set[SpenderID], exists bool) + SpendSetMembers(spendSetID ResourceID) (spenderIDs ds.Set[SpenderID], exists bool) + SpendWeight(spenderID SpenderID) int64 + SpendChildren(spenderID SpenderID) (spenderIDs ds.Set[SpenderID], exists bool) + SpendVoters(spenderID SpenderID) (voters ds.Set[account.SeatIndex]) + LikedInstead(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] } -type ReadLockedSpendDAG[SpendID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { - LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] - FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) - ConflictingSpends(spendID SpendID) (conflictingSpends ds.Set[SpendID], exists bool) - AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State - UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] +type ReadLockedSpendDAG[SpenderID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] interface { + LikedInstead(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] + FutureCone(spenderIDs ds.Set[SpenderID]) (futureCone ds.Set[SpenderID]) + ConflictingSpenders(spenderID SpenderID) (conflictingSpends ds.Set[SpenderID], exists bool) + AcceptanceState(spenderIDs ds.Set[SpenderID]) acceptance.State + UnacceptedSpenders(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go index 8ce76b2e2..ca8b774d9 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go @@ -11,76 +11,76 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// sortedSpend is a wrapped Spend that contains additional information for the SortedSpends. -type sortedSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { - // sortedSet is the SortedSpends that contains this sortedSpend. - sortedSet *SortedSpends[SpendID, ResourceID, VoteRank] +// sortedSpend is a wrapped Spender that contains additional information for the SortedSpenders. +type sortedSpender[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // sortedSet is the SortedSpenders that contains this sortedSpender. + sortedSet *SortedSpenders[SpenderID, ResourceID, VoteRank] - // lighterMember is the sortedSpend that is lighter than this one. - lighterMember *sortedSpend[SpendID, ResourceID, VoteRank] + // lighterMember is the sortedSpender that is lighter than this one. + lighterMember *sortedSpender[SpenderID, ResourceID, VoteRank] - // heavierMember is the sortedSpend that is heavierMember than this one. - heavierMember *sortedSpend[SpendID, ResourceID, VoteRank] + // heavierMember is the sortedSpender that is heavierMember than this one. + heavierMember *sortedSpender[SpenderID, ResourceID, VoteRank] - // currentWeight is the current weight of the Spend. + // currentWeight is the current weight of the Spender. currentWeight weight.Value - // queuedWeight is the weight that is queued to be applied to the Spend. + // queuedWeight is the weight that is queued to be applied to the Spender. queuedWeight *weight.Value // weightMutex is used to protect the currentWeight and queuedWeight. weightMutex syncutils.RWMutex - // currentPreferredInstead is the current PreferredInstead value of the Spend. - currentPreferredInstead *Spend[SpendID, ResourceID, VoteRank] + // currentPreferredInstead is the current PreferredInstead value of the Spender. + currentPreferredInstead *Spender[SpenderID, ResourceID, VoteRank] - // queuedPreferredInstead is the PreferredInstead value that is queued to be applied to the Spend. - queuedPreferredInstead *Spend[SpendID, ResourceID, VoteRank] + // queuedPreferredInstead is the PreferredInstead value that is queued to be applied to the Spender. + queuedPreferredInstead *Spender[SpenderID, ResourceID, VoteRank] // preferredMutex is used to protect the currentPreferredInstead and queuedPreferredInstead. preferredInsteadMutex syncutils.RWMutex onAcceptanceStateUpdatedHook *event.Hook[func(acceptance.State, acceptance.State)] - // onWeightUpdatedHook is the hook that is triggered when the weight of the Spend is updated. + // onWeightUpdatedHook is the hook that is triggered when the weight of the Spender is updated. onWeightUpdatedHook *event.Hook[func(weight.Value)] - // onPreferredUpdatedHook is the hook that is triggered when the PreferredInstead value of the Spend is updated. - onPreferredUpdatedHook *event.Hook[func(*Spend[SpendID, ResourceID, VoteRank])] + // onPreferredUpdatedHook is the hook that is triggered when the PreferredInstead value of the Spender is updated. + onPreferredUpdatedHook *event.Hook[func(*Spender[SpenderID, ResourceID, VoteRank])] - // Spend is the wrapped Spend. - *Spend[SpendID, ResourceID, VoteRank] + // Spender is the wrapped Spender. + *Spender[SpenderID, ResourceID, VoteRank] } -// newSortedSpend creates a new sortedSpend. -func newSortedSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](set *SortedSpends[SpendID, ResourceID, VoteRank], spend *Spend[SpendID, ResourceID, VoteRank]) *sortedSpend[SpendID, ResourceID, VoteRank] { - s := &sortedSpend[SpendID, ResourceID, VoteRank]{ +// newSortedSpender creates a new sortedSpender. +func newSortedSpender[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](set *SortedSpenders[SpenderID, ResourceID, VoteRank], spender *Spender[SpenderID, ResourceID, VoteRank]) *sortedSpender[SpenderID, ResourceID, VoteRank] { + s := &sortedSpender[SpenderID, ResourceID, VoteRank]{ sortedSet: set, - currentWeight: spend.Weight.Value(), - currentPreferredInstead: spend.PreferredInstead(), - Spend: spend, + currentWeight: spender.Weight.Value(), + currentPreferredInstead: spender.PreferredInstead(), + Spender: spender, } if set.owner != nil { - s.onAcceptanceStateUpdatedHook = spend.AcceptanceStateUpdated.Hook(s.onAcceptanceStateUpdated) + s.onAcceptanceStateUpdatedHook = spender.AcceptanceStateUpdated.Hook(s.onAcceptanceStateUpdated) } - s.onWeightUpdatedHook = spend.Weight.OnUpdate.Hook(s.queueWeightUpdate) - s.onPreferredUpdatedHook = spend.PreferredInsteadUpdated.Hook(s.queuePreferredInsteadUpdate) + s.onWeightUpdatedHook = spender.Weight.OnUpdate.Hook(s.queueWeightUpdate) + s.onPreferredUpdatedHook = spender.PreferredInsteadUpdated.Hook(s.queuePreferredInsteadUpdate) return s } -// Weight returns the current weight of the sortedSpend. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Weight() weight.Value { +// Weight returns the current weight of the sortedSpender. +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) Weight() weight.Value { s.weightMutex.RLock() defer s.weightMutex.RUnlock() return s.currentWeight } -// Compare compares the sortedSpend to another sortedSpend. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Compare(other *sortedSpend[SpendID, ResourceID, VoteRank]) int { +// Compare compares the sortedSpend to another sortedSpender. +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) Compare(other *sortedSpender[SpenderID, ResourceID, VoteRank]) int { if result := s.Weight().Compare(other.Weight()); result != weight.Equal { return result } @@ -88,21 +88,21 @@ func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Compare(other *sortedSpend[ return bytes.Compare(lo.PanicOnErr(s.ID.Bytes()), lo.PanicOnErr(other.ID.Bytes())) } -// PreferredInstead returns the current preferred instead value of the sortedSpend. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) PreferredInstead() *Spend[SpendID, ResourceID, VoteRank] { +// PreferredInstead returns the current preferred instead value of the sortedSpender. +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) PreferredInstead() *Spender[SpenderID, ResourceID, VoteRank] { s.preferredInsteadMutex.RLock() defer s.preferredInsteadMutex.RUnlock() return s.currentPreferredInstead } -// IsPreferred returns true if the sortedSpend is preferred instead of its Spends. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) IsPreferred() bool { - return s.PreferredInstead() == s.Spend +// IsPreferred returns true if the sortedSpender is preferred instead of its Spenders. +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) IsPreferred() bool { + return s.PreferredInstead() == s.Spender } -// Unhook cleans up the sortedSpend. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Unhook() { +// Unhook cleans up the sortedSpender. +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) Unhook() { if s.onAcceptanceStateUpdatedHook != nil { s.onAcceptanceStateUpdatedHook.Unhook() s.onAcceptanceStateUpdatedHook = nil @@ -119,14 +119,14 @@ func (s *sortedSpend[SpendID, ResourceID, VoteRank]) Unhook() { } } -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) onAcceptanceStateUpdated(_ acceptance.State, newState acceptance.State) { +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) onAcceptanceStateUpdated(_ acceptance.State, newState acceptance.State) { if newState.IsAccepted() { s.sortedSet.owner.setAcceptanceState(acceptance.Rejected) } } -// queueWeightUpdate queues a weight update for the sortedSpend. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queueWeightUpdate(newWeight weight.Value) { +// queueWeightUpdate queues a weight update for the sortedSpender. +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) queueWeightUpdate(newWeight weight.Value) { s.weightMutex.Lock() defer s.weightMutex.Unlock() @@ -139,7 +139,7 @@ func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queueWeightUpdate(newWeight } // weightUpdateApplied tries to apply a queued weight update to the sortedSpend and returns true if successful. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) weightUpdateApplied() bool { +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) weightUpdateApplied() bool { s.weightMutex.Lock() defer s.weightMutex.Unlock() @@ -160,23 +160,23 @@ func (s *sortedSpend[SpendID, ResourceID, VoteRank]) weightUpdateApplied() bool } // queuePreferredInsteadUpdate notifies the sortedSet that the preferred instead flag of the Spend was updated. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) queuePreferredInsteadUpdate(spend *Spend[SpendID, ResourceID, VoteRank]) { +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) queuePreferredInsteadUpdate(spender *Spender[SpenderID, ResourceID, VoteRank]) { s.preferredInsteadMutex.Lock() defer s.preferredInsteadMutex.Unlock() - if (s.queuedPreferredInstead == nil && s.currentPreferredInstead == spend) || - (s.queuedPreferredInstead != nil && s.queuedPreferredInstead == spend) || - s.sortedSet.owner.Spend == spend { + if (s.queuedPreferredInstead == nil && s.currentPreferredInstead == spender) || + (s.queuedPreferredInstead != nil && s.queuedPreferredInstead == spender) || + s.sortedSet.owner.Spender == spender { return } - s.queuedPreferredInstead = spend + s.queuedPreferredInstead = spender s.sortedSet.notifyPendingPreferredInsteadUpdate(s) } // preferredInsteadUpdateApplied tries to apply a queued preferred instead update to the sortedSpend and returns // true if successful. -func (s *sortedSpend[SpendID, ResourceID, VoteRank]) preferredInsteadUpdateApplied() bool { +func (s *sortedSpender[SpenderID, ResourceID, VoteRank]) preferredInsteadUpdateApplied() bool { s.preferredInsteadMutex.Lock() defer s.preferredInsteadMutex.Unlock() diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go index b3c100e6a..56dce05d5 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go @@ -12,22 +12,22 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// SortedSpends is a set of Spends that is sorted by their weight. -type SortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { +// SortedSpenders is a set of Spenders that is sorted by their weight. +type SortedSpenders[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { // owner is the Spend that owns this SortedSpends. - owner *sortedSpend[SpendID, ResourceID, VoteRank] + owner *sortedSpender[SpenderID, ResourceID, VoteRank] - // members is a map of SpendIDs to their corresponding sortedSpend. - members *shrinkingmap.ShrinkingMap[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]] + // members is a map of SpenderIDs to their corresponding sortedSpender. + members *shrinkingmap.ShrinkingMap[SpenderID, *sortedSpender[SpenderID, ResourceID, VoteRank]] // heaviestMember is the heaviest member of the SortedSpends. - heaviestMember *sortedSpend[SpendID, ResourceID, VoteRank] + heaviestMember *sortedSpender[SpenderID, ResourceID, VoteRank] // heaviestPreferredMember is the heaviest preferred member of the SortedSpends. - heaviestPreferredMember *sortedSpend[SpendID, ResourceID, VoteRank] + heaviestPreferredMember *sortedSpender[SpenderID, ResourceID, VoteRank] - // pendingWeightUpdates is a collection of Spends that have a pending weight update. - pendingWeightUpdates *shrinkingmap.ShrinkingMap[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]] + // pendingWeightUpdates is a collection of Spenders that have a pending weight update. + pendingWeightUpdates *shrinkingmap.ShrinkingMap[SpenderID, *sortedSpender[SpenderID, ResourceID, VoteRank]] // pendingWeightUpdatesSignal is a signal that is used to notify the fixMemberPositionWorker about pending weight // updates. @@ -36,8 +36,8 @@ type SortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRan // pendingWeightUpdatesMutex is a mutex that is used to synchronize access to the pendingWeightUpdates. pendingWeightUpdatesMutex syncutils.RWMutex - // pendingPreferredInsteadUpdates is a collection of Spends that have a pending preferred instead update. - pendingPreferredInsteadUpdates *shrinkingmap.ShrinkingMap[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]] + // pendingPreferredInsteadUpdates is a collection of Spenders that have a pending preferred instead update. + pendingPreferredInsteadUpdates *shrinkingmap.ShrinkingMap[SpenderID, *sortedSpender[SpenderID, ResourceID, VoteRank]] // pendingPreferredInsteadSignal is a signal that is used to notify the fixPreferredInsteadWorker about pending // preferred instead updates. @@ -49,25 +49,25 @@ type SortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRan // pendingUpdatesCounter is a counter that keeps track of the number of pending weight updates. pendingUpdatesCounter *syncutils.Counter - // isShutdown is used to signal that the SortedSpends is shutting down. + // isShutdown is used to signal that the SortedSpenders is shutting down. isShutdown atomic.Bool // mutex is used to synchronize access to the SortedSpends. mutex syncutils.RWMutex } -// NewSortedSpends creates a new SortedSpends that is owned by the given Spend. -func NewSortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](owner *Spend[SpendID, ResourceID, VoteRank], pendingUpdatesCounter *syncutils.Counter) *SortedSpends[SpendID, ResourceID, VoteRank] { - s := &SortedSpends[SpendID, ResourceID, VoteRank]{ - members: shrinkingmap.New[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]](), - pendingWeightUpdates: shrinkingmap.New[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]](), +// NewSortedSpenders creates a new SortedSpenders that is owned by the given Spender. +func NewSortedSpenders[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](owner *Spender[SpenderID, ResourceID, VoteRank], pendingUpdatesCounter *syncutils.Counter) *SortedSpenders[SpenderID, ResourceID, VoteRank] { + s := &SortedSpenders[SpenderID, ResourceID, VoteRank]{ + members: shrinkingmap.New[SpenderID, *sortedSpender[SpenderID, ResourceID, VoteRank]](), + pendingWeightUpdates: shrinkingmap.New[SpenderID, *sortedSpender[SpenderID, ResourceID, VoteRank]](), pendingUpdatesCounter: pendingUpdatesCounter, - pendingPreferredInsteadUpdates: shrinkingmap.New[SpendID, *sortedSpend[SpendID, ResourceID, VoteRank]](), + pendingPreferredInsteadUpdates: shrinkingmap.New[SpenderID, *sortedSpender[SpenderID, ResourceID, VoteRank]](), } s.pendingWeightUpdatesSignal = sync.NewCond(&s.pendingWeightUpdatesMutex) s.pendingPreferredInsteadSignal = sync.NewCond(&s.pendingPreferredInsteadMutex) - s.owner = newSortedSpend[SpendID, ResourceID, VoteRank](s, owner) + s.owner = newSortedSpender[SpenderID, ResourceID, VoteRank](s, owner) s.members.Set(owner.ID, s.owner) s.heaviestMember = s.owner @@ -80,7 +80,7 @@ func NewSortedSpends[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.Vote } // Add adds the given Spend to the SortedSpends. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(spend *Spend[SpendID, ResourceID, VoteRank]) bool { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) Add(spender *Spender[SpenderID, ResourceID, VoteRank]) bool { s.mutex.Lock() defer s.mutex.Unlock() @@ -88,8 +88,8 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(spend *Spend[SpendID, return false } - newMember, isNew := s.members.GetOrCreate(spend.ID, func() *sortedSpend[SpendID, ResourceID, VoteRank] { - return newSortedSpend(s, spend) + newMember, isNew := s.members.GetOrCreate(spender.ID, func() *sortedSpender[SpenderID, ResourceID, VoteRank] { + return newSortedSpender(s, spender) }) if !isNew { return false @@ -128,14 +128,14 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Add(spend *Spend[SpendID, if newMember.IsPreferred() && newMember.Compare(s.heaviestPreferredMember) == weight.Heavier { s.heaviestPreferredMember = newMember - s.owner.setPreferredInstead(spend) + s.owner.setPreferredInstead(spender) } return true } // ForEach iterates over all Spends of the SortedSpends and calls the given callback for each of them. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) ForEach(callback func(*Spend[SpendID, ResourceID, VoteRank]) error, optIncludeOwner ...bool) error { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) ForEach(callback func(*Spender[SpenderID, ResourceID, VoteRank]) error, optIncludeOwner ...bool) error { s.mutex.RLock() defer s.mutex.RUnlock() @@ -144,7 +144,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) ForEach(callback func(*Spe continue } - if err := callback(currentMember.Spend); err != nil { + if err := callback(currentMember.Spender); err != nil { return err } } @@ -154,7 +154,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) ForEach(callback func(*Spe // Range iterates over all Spends of the SortedSpends and calls the given callback for each of them (without // manual error handling). -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Range(callback func(*Spend[SpendID, ResourceID, VoteRank]), optIncludeOwner ...bool) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) Range(callback func(*Spender[SpenderID, ResourceID, VoteRank]), optIncludeOwner ...bool) { s.mutex.RLock() defer s.mutex.RUnlock() @@ -163,61 +163,61 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Range(callback func(*Spend continue } - callback(currentMember.Spend) + callback(currentMember.Spender) } } // Remove removes the Spend with the given ID from the SortedSpends. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Remove(id SpendID) bool { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) Remove(id SpenderID) bool { s.mutex.Lock() defer s.mutex.Unlock() - spend, exists := s.members.Get(id) + sortedSpender, exists := s.members.Get(id) if !exists || !s.members.Delete(id) { return false } - spend.Unhook() + sortedSpender.Unhook() - if spend.heavierMember != nil { - spend.heavierMember.lighterMember = spend.lighterMember + if sortedSpender.heavierMember != nil { + sortedSpender.heavierMember.lighterMember = sortedSpender.lighterMember } - if spend.lighterMember != nil { - spend.lighterMember.heavierMember = spend.heavierMember + if sortedSpender.lighterMember != nil { + sortedSpender.lighterMember.heavierMember = sortedSpender.heavierMember } - if s.heaviestMember == spend { - s.heaviestMember = spend.lighterMember + if s.heaviestMember == sortedSpender { + s.heaviestMember = sortedSpender.lighterMember } - if s.heaviestPreferredMember == spend { - s.findLowerHeaviestPreferredMember(spend.lighterMember) + if s.heaviestPreferredMember == sortedSpender { + s.findLowerHeaviestPreferredMember(sortedSpender.lighterMember) } - spend.lighterMember = nil - spend.heavierMember = nil + sortedSpender.lighterMember = nil + sortedSpender.heavierMember = nil return true } // String returns a human-readable representation of the SortedSpends. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) String() string { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) String() string { structBuilder := stringify.NewStructBuilder("SortedSpends", stringify.NewStructField("owner", s.owner.ID), stringify.NewStructField("heaviestMember", s.heaviestMember.ID), stringify.NewStructField("heaviestPreferredMember", s.heaviestPreferredMember.ID), ) - s.Range(func(spend *Spend[SpendID, ResourceID, VoteRank]) { - structBuilder.AddField(stringify.NewStructField(spend.ID.String(), spend)) + s.Range(func(spender *Spender[SpenderID, ResourceID, VoteRank]) { + structBuilder.AddField(stringify.NewStructField(spender.ID.String(), spender)) }, true) return structBuilder.String() } // notifyPendingWeightUpdate notifies the SortedSpends about a pending weight update of the given member. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) notifyPendingWeightUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) notifyPendingWeightUpdate(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { s.pendingWeightUpdatesMutex.Lock() defer s.pendingWeightUpdatesMutex.Unlock() @@ -229,7 +229,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) notifyPendingWeightUpdate( } // fixMemberPositionWorker is a worker that fixes the position of sortedSetMembers that need to be updated. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPositionWorker() { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) fixMemberPositionWorker() { for member := s.nextPendingWeightUpdate(); member != nil; member = s.nextPendingWeightUpdate() { s.applyWeightUpdate(member) @@ -238,7 +238,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPositionWorker() } // nextPendingWeightUpdate returns the next member that needs to be updated (or nil if the shutdown flag is set). -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) nextPendingWeightUpdate() *sortedSpend[SpendID, ResourceID, VoteRank] { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) nextPendingWeightUpdate() *sortedSpender[SpenderID, ResourceID, VoteRank] { s.pendingWeightUpdatesMutex.Lock() defer s.pendingWeightUpdatesMutex.Unlock() @@ -256,7 +256,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) nextPendingWeightUpdate() } // applyWeightUpdate applies the weight update of the given member. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyWeightUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) applyWeightUpdate(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { s.mutex.Lock() defer s.mutex.Unlock() @@ -266,7 +266,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyWeightUpdate(member * } // fixMemberPosition fixes the position of the given member in the SortedSpends. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPosition(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) fixMemberPosition(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { preferredSpend := member.PreferredInstead() memberIsPreferred := member.IsPreferred() @@ -274,9 +274,9 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPosition(member * for currentMember := member.heavierMember; currentMember != nil && currentMember.Compare(member) == weight.Lighter; currentMember = member.heavierMember { s.swapNeighbors(member, currentMember) - if currentMember == s.heaviestPreferredMember && (preferredSpend == currentMember.Spend || memberIsPreferred || member == s.owner) { + if currentMember == s.heaviestPreferredMember && (preferredSpend == currentMember.Spender || memberIsPreferred || member == s.owner) { s.heaviestPreferredMember = member - s.owner.setPreferredInstead(member.Spend) + s.owner.setPreferredInstead(member.Spender) } } @@ -284,15 +284,15 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixMemberPosition(member * for currentMember := member.lighterMember; currentMember != nil && currentMember.Compare(member) == weight.Heavier; currentMember = member.lighterMember { s.swapNeighbors(currentMember, member) - if member == s.heaviestPreferredMember && (currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Spend || currentMember == s.owner) { + if member == s.heaviestPreferredMember && (currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Spender || currentMember == s.owner) { s.heaviestPreferredMember = currentMember - s.owner.setPreferredInstead(currentMember.Spend) + s.owner.setPreferredInstead(currentMember.Spender) } } } // notifyPreferredInsteadUpdate notifies the SortedSpends about a member that changed its preferred instead flag. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) notifyPendingPreferredInsteadUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) notifyPendingPreferredInsteadUpdate(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { s.pendingPreferredInsteadMutex.Lock() defer s.pendingPreferredInsteadMutex.Unlock() @@ -304,7 +304,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) notifyPendingPreferredInst } // fixMemberPositionWorker is a worker that fixes the position of sortedSetMembers that need to be updated. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixHeaviestPreferredMemberWorker() { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) fixHeaviestPreferredMemberWorker() { for member := s.nextPendingPreferredMemberUpdate(); member != nil; member = s.nextPendingPreferredMemberUpdate() { s.applyPreferredInsteadUpdate(member) @@ -313,7 +313,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixHeaviestPreferredMember } // nextPendingWeightUpdate returns the next member that needs to be updated (or nil if the shutdown flag is set). -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) nextPendingPreferredMemberUpdate() *sortedSpend[SpendID, ResourceID, VoteRank] { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) nextPendingPreferredMemberUpdate() *sortedSpender[SpenderID, ResourceID, VoteRank] { s.pendingPreferredInsteadMutex.Lock() defer s.pendingPreferredInsteadMutex.Unlock() @@ -331,7 +331,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) nextPendingPreferredMember } // applyPreferredInsteadUpdate applies the preferred instead update of the given member. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyPreferredInsteadUpdate(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) applyPreferredInsteadUpdate(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { s.mutex.Lock() defer s.mutex.Unlock() @@ -341,11 +341,11 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) applyPreferredInsteadUpdat } // fixHeaviestPreferredMember fixes the heaviest preferred member of the SortedSpends after updating the given member. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixHeaviestPreferredMember(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) fixHeaviestPreferredMember(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { if member.IsPreferred() { if member.Compare(s.heaviestPreferredMember) == weight.Heavier { s.heaviestPreferredMember = member - s.owner.setPreferredInstead(member.Spend) + s.owner.setPreferredInstead(member.Spender) } return @@ -356,11 +356,11 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) fixHeaviestPreferredMember } } -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) findLowerHeaviestPreferredMember(member *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) findLowerHeaviestPreferredMember(member *sortedSpender[SpenderID, ResourceID, VoteRank]) { for currentMember := member; currentMember != nil; currentMember = currentMember.lighterMember { - if currentMember == s.owner || currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Spend { + if currentMember == s.owner || currentMember.IsPreferred() || currentMember.PreferredInstead() == member.Spender { s.heaviestPreferredMember = currentMember - s.owner.setPreferredInstead(currentMember.Spend) + s.owner.setPreferredInstead(currentMember.Spender) return } @@ -370,7 +370,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) findLowerHeaviestPreferred } // swapNeighbors swaps the given members in the SortedSpends. -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) swapNeighbors(heavierMember *sortedSpend[SpendID, ResourceID, VoteRank], lighterMember *sortedSpend[SpendID, ResourceID, VoteRank]) { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) swapNeighbors(heavierMember *sortedSpender[SpenderID, ResourceID, VoteRank], lighterMember *sortedSpender[SpenderID, ResourceID, VoteRank]) { if heavierMember.lighterMember != nil { heavierMember.lighterMember.heavierMember = lighterMember } @@ -388,7 +388,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) swapNeighbors(heavierMembe } } -func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Shutdown() []*Spend[SpendID, ResourceID, VoteRank] { +func (s *SortedSpenders[SpenderID, ResourceID, VoteRank]) Shutdown() []*Spender[SpenderID, ResourceID, VoteRank] { s.mutex.Lock() defer s.mutex.Unlock() s.pendingWeightUpdatesMutex.Lock() @@ -404,7 +404,7 @@ func (s *SortedSpends[SpendID, ResourceID, VoteRank]) Shutdown() []*Spend[SpendI s.pendingPreferredInsteadSignal.Broadcast() s.pendingWeightUpdatesSignal.Broadcast() - return lo.Map(s.members.Values(), func(spend *sortedSpend[SpendID, ResourceID, VoteRank]) *Spend[SpendID, ResourceID, VoteRank] { - return spend.Spend + return lo.Map(s.members.Values(), func(sortedSpender *sortedSpender[SpenderID, ResourceID, VoteRank]) *Spender[SpenderID, ResourceID, VoteRank] { + return sortedSpender.Spender }) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go index 1bdaef281..79ca7cd96 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go @@ -18,11 +18,11 @@ import ( iotago "github.com/iotaledger/iota.go/v4" ) -type SortedSpendSet = *SortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +type SortedSpendSet = *SortedSpenders[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -var NewSortedSpendSet = NewSortedSpends[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +var NewSortedSpendSet = NewSortedSpenders[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func TestSortedSpend(t *testing.T) { +func TestSortedSpender(t *testing.T) { weights := account.NewSeatedAccounts(account.NewAccounts()) pendingTasks := syncutils.NewCounter() @@ -30,54 +30,54 @@ func TestSortedSpend(t *testing.T) { return int64(weights.SeatCount()) }) - spend1 := NewTestSpend(transactionID("spend1"), nil, nil, weight.New().AddCumulativeWeight(12), pendingTasks, thresholdProvider) + spend1 := NewTestSpender(transactionID("spender1"), nil, nil, weight.New().AddCumulativeWeight(12), pendingTasks, thresholdProvider) spend1.setAcceptanceState(acceptance.Rejected) - spend2 := NewTestSpend(transactionID("spend2"), nil, nil, weight.New().AddCumulativeWeight(10), pendingTasks, thresholdProvider) - spend3 := NewTestSpend(transactionID("spend3"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) + spend2 := NewTestSpender(transactionID("spender2"), nil, nil, weight.New().AddCumulativeWeight(10), pendingTasks, thresholdProvider) + spend3 := NewTestSpender(transactionID("spender3"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) spend3.setAcceptanceState(acceptance.Accepted) - spend4 := NewTestSpend(transactionID("spend4"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) + spend4 := NewTestSpender(transactionID("spender4"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) spend4.setAcceptanceState(acceptance.Rejected) - spend5 := NewTestSpend(transactionID("spend5"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) - spend6 := NewTestSpend(transactionID("spend6"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) + spend5 := NewTestSpender(transactionID("spender5"), nil, nil, weight.New().AddCumulativeWeight(11), pendingTasks, thresholdProvider) + spend6 := NewTestSpender(transactionID("spender6"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) spend6.setAcceptanceState(acceptance.Accepted) sortedSpends := NewSortedSpendSet(spend1, pendingTasks) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend1:0") + assertSortedSpendsOrder(t, sortedSpends, "spender1:0") sortedSpends.Add(spend2) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend2:0", "spend1:0") + assertSortedSpendsOrder(t, sortedSpends, "spender2:0", "spender1:0") sortedSpends.Add(spend3) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend3:0", "spend2:0", "spend1:0") + assertSortedSpendsOrder(t, sortedSpends, "spender3:0", "spender2:0", "spender1:0") sortedSpends.Add(spend4) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend3:0", "spend2:0", "spend1:0", "spend4:0") + assertSortedSpendsOrder(t, sortedSpends, "spender3:0", "spender2:0", "spender1:0", "spender4:0") sortedSpends.Add(spend5) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend3:0", "spend5:0", "spend2:0", "spend1:0", "spend4:0") + assertSortedSpendsOrder(t, sortedSpends, "spender3:0", "spender5:0", "spender2:0", "spender1:0", "spender4:0") sortedSpends.Add(spend6) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend6:0", "spend3:0", "spend5:0", "spend2:0", "spend1:0", "spend4:0") + assertSortedSpendsOrder(t, sortedSpends, "spender6:0", "spender3:0", "spender5:0", "spender2:0", "spender1:0", "spender4:0") spend2.Weight.AddCumulativeWeight(3) require.Equal(t, int64(13), spend2.Weight.Value().CumulativeWeight()) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend6:0", "spend3:0", "spend2:0", "spend5:0", "spend1:0", "spend4:0") + assertSortedSpendsOrder(t, sortedSpends, "spender6:0", "spender3:0", "spender2:0", "spender5:0", "spender1:0", "spender4:0") spend2.Weight.RemoveCumulativeWeight(3) require.Equal(t, int64(10), spend2.Weight.Value().CumulativeWeight()) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend6:0", "spend3:0", "spend5:0", "spend2:0", "spend1:0", "spend4:0") + assertSortedSpendsOrder(t, sortedSpends, "spender6:0", "spender3:0", "spender5:0", "spender2:0", "spender1:0", "spender4:0") spend5.Weight.SetAcceptanceState(acceptance.Accepted) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend5:0", "spend6:0", "spend3:0", "spend2:0", "spend1:0", "spend4:0") + assertSortedSpendsOrder(t, sortedSpends, "spender5:0", "spender6:0", "spender3:0", "spender2:0", "spender1:0", "spender4:0") } func TestSortedDecreaseHeaviest(t *testing.T) { @@ -88,23 +88,23 @@ func TestSortedDecreaseHeaviest(t *testing.T) { return int64(weights.SeatCount()) }) - spend1 := NewTestSpend(transactionID("spend1"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) + spend1 := NewTestSpender(transactionID("spender1"), nil, nil, weight.New().AddCumulativeWeight(1), pendingTasks, thresholdProvider) spend1.setAcceptanceState(acceptance.Accepted) - spend2 := NewTestSpend(transactionID("spend2"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) + spend2 := NewTestSpender(transactionID("spender2"), nil, nil, weight.New().AddCumulativeWeight(2), pendingTasks, thresholdProvider) sortedSpends := NewSortedSpendSet(spend1, pendingTasks) sortedSpends.Add(spend1) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend1:0") + assertSortedSpendsOrder(t, sortedSpends, "spender1:0") sortedSpends.Add(spend2) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend1:0", "spend2:0") + assertSortedSpendsOrder(t, sortedSpends, "spender1:0", "spender2:0") spend1.Weight.SetAcceptanceState(acceptance.Pending) pendingTasks.WaitIsZero() - assertSortedSpendsOrder(t, sortedSpends, "spend2:0", "spend1:0") + assertSortedSpendsOrder(t, sortedSpends, "spender2:0", "spender1:0") } func TestSortedSpendParallel(t *testing.T) { @@ -118,23 +118,23 @@ func TestSortedSpendParallel(t *testing.T) { const spendCount = 1000 const updateCount = 100000 - spends := make(map[string]TestSpend) - parallelSpends := make(map[string]TestSpend) + spenders := make(map[string]TestSpender) + parallelSpends := make(map[string]TestSpender) for i := 0; i < spendCount; i++ { - alias := "spend" + strconv.Itoa(i) + alias := "spender" + strconv.Itoa(i) - spends[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) - parallelSpends[alias] = NewTestSpend(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) + spenders[alias] = NewTestSpender(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) + parallelSpends[alias] = NewTestSpender(transactionID(alias), nil, nil, weight.New(), pendingTasks, thresholdProvider) } - sortedSpends := NewSortedSpendSet(spends["spend0"], pendingTasks) - sortedParallelSpends := NewSortedSpendSet(parallelSpends["spend0"], pendingTasks) - sortedParallelSpends1 := NewSortedSpendSet(parallelSpends["spend0"], pendingTasks) + sortedSpends := NewSortedSpendSet(spenders["spender0"], pendingTasks) + sortedParallelSpends := NewSortedSpendSet(parallelSpends["spender0"], pendingTasks) + sortedParallelSpends1 := NewSortedSpendSet(parallelSpends["spender0"], pendingTasks) for i := 0; i < spendCount; i++ { - alias := "spend" + strconv.Itoa(i) + alias := "spender" + strconv.Itoa(i) - sortedSpends.Add(spends[alias]) + sortedSpends.Add(spenders[alias]) sortedParallelSpends.Add(parallelSpends[alias]) sortedParallelSpends1.Add(parallelSpends[alias]) } @@ -143,19 +143,19 @@ func TestSortedSpendParallel(t *testing.T) { parallelSortingBefore := sortedParallelSpends.String() require.Equal(t, originalSortingBefore, parallelSortingBefore) - permutations := make([]func(spend TestSpend), 0) + permutations := make([]func(spend TestSpender), 0) for i := 0; i < updateCount; i++ { permutations = append(permutations, generateRandomWeightPermutation()) } var wg sync.WaitGroup for i, permutation := range permutations { - targetAlias := "spend" + strconv.Itoa(i%spendCount) + targetAlias := "spender" + strconv.Itoa(i%spendCount) - permutation(spends[targetAlias]) + permutation(spenders[targetAlias]) wg.Add(1) - go func(permutation func(spend TestSpend)) { + go func(permutation func(spend TestSpender)) { permutation(parallelSpends[targetAlias]) wg.Done() @@ -178,33 +178,33 @@ func TestSortedSpendParallel(t *testing.T) { require.NotEqualf(t, originalSortingBefore, originalSortingAfter, "original sorting should have changed") } -func generateRandomWeightPermutation() func(spend TestSpend) { +func generateRandomWeightPermutation() func(spender TestSpender) { switch rand.Intn(2) { case 0: return generateRandomCumulativeWeightPermutation(int64(rand.Intn(100))) default: // return generateRandomConfirmationStatePermutation() - return func(spend TestSpend) { + return func(spender TestSpender) { } } } -func generateRandomCumulativeWeightPermutation(delta int64) func(spend TestSpend) { +func generateRandomCumulativeWeightPermutation(delta int64) func(spender TestSpender) { updateType := rand.Intn(100) - return func(spend TestSpend) { + return func(spender TestSpender) { if updateType%2 == 0 { - spend.Weight.AddCumulativeWeight(delta) + spender.Weight.AddCumulativeWeight(delta) } else { - spend.Weight.RemoveCumulativeWeight(delta) + spender.Weight.RemoveCumulativeWeight(delta) } - spend.Weight.AddCumulativeWeight(delta) + spender.Weight.AddCumulativeWeight(delta) } } func assertSortedSpendsOrder(t *testing.T, sortedSpends SortedSpendSet, aliases ...string) { - require.NoError(t, sortedSpends.ForEach(func(c TestSpend) error { + require.NoError(t, sortedSpends.ForEach(func(c TestSpender) error { currentAlias := aliases[0] aliases = aliases[1:] @@ -219,8 +219,8 @@ func assertSortedSpendsOrder(t *testing.T, sortedSpends SortedSpendSet, aliases func id(alias string) iotago.OutputID { bytes := blake2b.Sum256([]byte(alias)) txIdentifier := iotago.TransactionIDRepresentingData(TestTransactionCreationSlot, bytes[:]) - spendID := iotago.OutputIDFromTransactionIDAndIndex(txIdentifier, 0) + spenderID := iotago.OutputIDFromTransactionIDAndIndex(txIdentifier, 0) txIdentifier.RegisterAlias(alias) - return spendID + return spenderID } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go index 054b1c840..d14cae99f 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go @@ -19,67 +19,68 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// Spend is a spend that is part of a Spend DAG. -type Spend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { - // ID is the identifier of the Spend. - ID SpendID +// Spender is a spender of resources that is part of a Spend DAG. +// An example of a spender is a transaction, and the resource it spends is a utxo. +type Spender[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // ID is the identifier of the Spender. + ID SpenderID - // Parents is the set of parents of the Spend. - Parents ds.Set[*Spend[SpendID, ResourceID, VoteRank]] + // Parents is the set of parents of the Spender. + Parents ds.Set[*Spender[SpenderID, ResourceID, VoteRank]] - // Children is the set of children of the Spend. - Children ds.Set[*Spend[SpendID, ResourceID, VoteRank]] + // Children is the set of children of the Spender. + Children ds.Set[*Spender[SpenderID, ResourceID, VoteRank]] // SpendSets is the set of SpendSets that the Spend is part of. - SpendSets ds.Set[*SpendSet[SpendID, ResourceID, VoteRank]] + SpendSets ds.Set[*SpendSet[SpenderID, ResourceID, VoteRank]] - // ConflictingSpends is the set of spends that directly conflict with the Spend. - ConflictingSpends *SortedSpends[SpendID, ResourceID, VoteRank] + // ConflictingSpenders is the set of spenders that try to spend one of more of the same resources as this Spender. + ConflictingSpenders *SortedSpenders[SpenderID, ResourceID, VoteRank] - // Weight is the Weight of the Spend. + // Weight is the Weight of the Spender. Weight *weight.Weight - // LatestVotes is the set of the latest votes of the Spend. + // LatestVotes is the set of the latest votes of the Spender. LatestVotes *shrinkingmap.ShrinkingMap[account.SeatIndex, *vote.Vote[VoteRank]] - // AcceptanceStateUpdated is triggered when the AcceptanceState of the Spend is updated. + // AcceptanceStateUpdated is triggered when the AcceptanceState of the Spender is updated. AcceptanceStateUpdated *event.Event2[acceptance.State, acceptance.State] - // PreferredInsteadUpdated is triggered when the preferred instead value of the Spend is updated. - PreferredInsteadUpdated *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] + // PreferredInsteadUpdated is triggered when the preferred instead value of the Spender is updated. + PreferredInsteadUpdated *event.Event1[*Spender[SpenderID, ResourceID, VoteRank]] - // LikedInsteadAdded is triggered when a liked instead reference is added to the Spend. - LikedInsteadAdded *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] + // LikedInsteadAdded is triggered when a liked instead reference is added to the Spender. + LikedInsteadAdded *event.Event1[*Spender[SpenderID, ResourceID, VoteRank]] - // LikedInsteadRemoved is triggered when a liked instead reference is removed from the Spend. - LikedInsteadRemoved *event.Event1[*Spend[SpendID, ResourceID, VoteRank]] + // LikedInsteadRemoved is triggered when a liked instead reference is removed from the Spender. + LikedInsteadRemoved *event.Event1[*Spender[SpenderID, ResourceID, VoteRank]] // childUnhookMethods is a mapping of children to their unhook functions. - childUnhookMethods *shrinkingmap.ShrinkingMap[SpendID, func()] + childUnhookMethods *shrinkingmap.ShrinkingMap[SpenderID, func()] - // preferredInstead is the preferred instead value of the Spend. - preferredInstead *Spend[SpendID, ResourceID, VoteRank] + // preferredInstead is the preferred instead value of the Spender. + preferredInstead *Spender[SpenderID, ResourceID, VoteRank] // evicted evicted atomic.Bool - // preferredInsteadMutex is used to synchronize access to the preferred instead value of the Spend. + // preferredInsteadMutex is used to synchronize access to the preferred instead value of the Spender. preferredInsteadMutex syncutils.RWMutex - // likedInstead is the set of liked instead Spends. - likedInstead ds.Set[*Spend[SpendID, ResourceID, VoteRank]] + // likedInstead is the set of liked instead Spenders. + likedInstead ds.Set[*Spender[SpenderID, ResourceID, VoteRank]] // likedInsteadSources is a mapping of liked instead Spends to the set of parents that inherited them. - likedInsteadSources *shrinkingmap.ShrinkingMap[SpendID, ds.Set[*Spend[SpendID, ResourceID, VoteRank]]] + likedInsteadSources *shrinkingmap.ShrinkingMap[SpenderID, ds.Set[*Spender[SpenderID, ResourceID, VoteRank]]] // likedInsteadMutex and structureMutex are sometimes locked in different order by different goroutines, which could result in a deadlock // however, it's impossible to deadlock if we fork all transactions upon booking // deadlock happens when the likedInstead spend changes and parents are updated at the same time, which is impossible in the current setup // because we won't process votes on a spend we're just creating. - // likedInsteadMutex is used to synchronize access to the liked instead value of the Spend. + // likedInsteadMutex is used to synchronize access to the liked instead value of the Spender. likedInsteadMutex syncutils.RWMutex - // structureMutex is used to synchronize access to the structure of the Spend. + // structureMutex is used to synchronize access to the structure of the Spender. structureMutex syncutils.RWMutex // acceptanceThreshold is the function that is used to retrieve the acceptance threshold of the committee. @@ -89,24 +90,24 @@ type Spend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[V unhookAcceptanceMonitoring func() } -// NewSpend creates a new Spend. -func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id SpendID, initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[SpendID, ResourceID, VoteRank] { - c := &Spend[SpendID, ResourceID, VoteRank]{ +// NewSpend creates a new Spender. +func NewSpender[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id SpenderID, initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spender[SpenderID, ResourceID, VoteRank] { + c := &Spender[SpenderID, ResourceID, VoteRank]{ ID: id, - Parents: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), - Children: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), - SpendSets: ds.NewSet[*SpendSet[SpendID, ResourceID, VoteRank]](), + Parents: ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]](), + Children: ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]](), + SpendSets: ds.NewSet[*SpendSet[SpenderID, ResourceID, VoteRank]](), Weight: initialWeight, LatestVotes: shrinkingmap.New[account.SeatIndex, *vote.Vote[VoteRank]](), AcceptanceStateUpdated: event.New2[acceptance.State, acceptance.State](), - PreferredInsteadUpdated: event.New1[*Spend[SpendID, ResourceID, VoteRank]](), - LikedInsteadAdded: event.New1[*Spend[SpendID, ResourceID, VoteRank]](), - LikedInsteadRemoved: event.New1[*Spend[SpendID, ResourceID, VoteRank]](), + PreferredInsteadUpdated: event.New1[*Spender[SpenderID, ResourceID, VoteRank]](), + LikedInsteadAdded: event.New1[*Spender[SpenderID, ResourceID, VoteRank]](), + LikedInsteadRemoved: event.New1[*Spender[SpenderID, ResourceID, VoteRank]](), - childUnhookMethods: shrinkingmap.New[SpendID, func()](), + childUnhookMethods: shrinkingmap.New[SpenderID, func()](), acceptanceThreshold: acceptanceThresholdProvider, - likedInstead: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), - likedInsteadSources: shrinkingmap.New[SpendID, ds.Set[*Spend[SpendID, ResourceID, VoteRank]]](), + likedInstead: ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]](), + likedInsteadSources: shrinkingmap.New[SpenderID, ds.Set[*Spender[SpenderID, ResourceID, VoteRank]]](), } c.preferredInstead = c @@ -122,27 +123,27 @@ func NewSpend[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp c.setAcceptanceState(acceptance.Accepted) } - c.ConflictingSpends = NewSortedSpends(c, pendingTasksCounter) + c.ConflictingSpenders = NewSortedSpenders(c, pendingTasksCounter) return c } // JoinSpendSets registers the Spend with the given SpendSets. -func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*SpendSet[SpendID, ResourceID, VoteRank]]) (joinedSpendSets ds.Set[ResourceID], err error) { +func (c *Spender[SpenderID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*SpendSet[SpenderID, ResourceID, VoteRank]]) (joinedSpendSets ds.Set[ResourceID], err error) { if spendSets == nil { return ds.NewSet[ResourceID](), nil } if c.evicted.Load() { - return nil, ierrors.Errorf("tried to join conflict sets of evicted spend: %w", spenddag.ErrEntityEvicted) + return nil, ierrors.Errorf("tried to join spend sets of evicted spender: %w", spenddag.ErrEntityEvicted) } - registerConflictingSpend := func(c *Spend[SpendID, ResourceID, VoteRank], spend *Spend[SpendID, ResourceID, VoteRank]) { + registerConflictingSpender := func(c *Spender[SpenderID, ResourceID, VoteRank], spender *Spender[SpenderID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() - if c.ConflictingSpends.Add(spend) { - if spend.IsAccepted() { + if c.ConflictingSpenders.Add(spender) { + if spender.IsAccepted() { c.setAcceptanceState(acceptance.Rejected) } } @@ -150,7 +151,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*S joinedSpendSets = ds.NewSet[ResourceID]() - return joinedSpendSets, spendSets.ForEach(func(spendSet *SpendSet[SpendID, ResourceID, VoteRank]) error { + return joinedSpendSets, spendSets.ForEach(func(spendSet *SpendSet[SpenderID, ResourceID, VoteRank]) error { otherConflicts, err := spendSet.Add(c) if err != nil && !ierrors.Is(err, spenddag.ErrAlreadyPartOfSpendSet) { return err @@ -158,9 +159,9 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*S if c.SpendSets.Add(spendSet) { if otherConflicts != nil { - otherConflicts.Range(func(otherConflict *Spend[SpendID, ResourceID, VoteRank]) { - registerConflictingSpend(c, otherConflict) - registerConflictingSpend(otherConflict, c) + otherConflicts.Range(func(otherConflict *Spender[SpenderID, ResourceID, VoteRank]) { + registerConflictingSpender(c, otherConflict) + registerConflictingSpender(otherConflict, c) }) joinedSpendSets.Add(spendSet.ID) @@ -171,7 +172,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*S }) } -func (c *Spend[SpendID, ResourceID, VoteRank]) removeParent(parent *Spend[SpendID, ResourceID, VoteRank]) (removed bool) { +func (c *Spender[SpenderID, ResourceID, VoteRank]) removeParent(parent *Spender[SpenderID, ResourceID, VoteRank]) (removed bool) { if removed = c.Parents.Delete(parent); removed { parent.unregisterChild(c) } @@ -179,19 +180,19 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) removeParent(parent *Spend[SpendI return removed } -// UpdateParents updates the parents of the Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) UpdateParents(addedParents ds.Set[*Spend[SpendID, ResourceID, VoteRank]], removedParents ds.Set[*Spend[SpendID, ResourceID, VoteRank]]) (updated bool) { +// UpdateParents updates the parents of the Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) UpdateParents(addedParents ds.Set[*Spender[SpenderID, ResourceID, VoteRank]], removedParents ds.Set[*Spender[SpenderID, ResourceID, VoteRank]]) (updated bool) { c.structureMutex.Lock() defer c.structureMutex.Unlock() if removedParents != nil { - removedParents.Range(func(removedParent *Spend[SpendID, ResourceID, VoteRank]) { + removedParents.Range(func(removedParent *Spender[SpenderID, ResourceID, VoteRank]) { updated = c.removeParent(removedParent) || updated }) } if addedParents != nil { - addedParents.Range(func(addedParent *Spend[SpendID, ResourceID, VoteRank]) { + addedParents.Range(func(addedParent *Spender[SpenderID, ResourceID, VoteRank]) { if c.Parents.Add(addedParent) { addedParent.registerChild(c) @@ -203,7 +204,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) UpdateParents(addedParents ds.Set return updated } -func (c *Spend[SpendID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRank]) { +func (c *Spender[SpenderID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRank]) { // abort if the spend has already been accepted or rejected if !c.Weight.AcceptanceState().IsPending() { return @@ -231,59 +232,59 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) ApplyVote(vote *vote.Vote[VoteRan } // IsPending returns true if the Spend is pending. -func (c *Spend[SpendID, ResourceID, VoteRank]) IsPending() bool { +func (c *Spender[SpenderID, ResourceID, VoteRank]) IsPending() bool { return c.Weight.Value().AcceptanceState().IsPending() } // IsAccepted returns true if the Spend is accepted. -func (c *Spend[SpendID, ResourceID, VoteRank]) IsAccepted() bool { +func (c *Spender[SpenderID, ResourceID, VoteRank]) IsAccepted() bool { return c.Weight.Value().AcceptanceState().IsAccepted() } // IsRejected returns true if the Spend is rejected. -func (c *Spend[SpendID, ResourceID, VoteRank]) IsRejected() bool { +func (c *Spender[SpenderID, ResourceID, VoteRank]) IsRejected() bool { return c.Weight.Value().AcceptanceState().IsRejected() } -// IsPreferred returns true if the Spend is preferred instead of its conflicting Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) IsPreferred() bool { +// IsPreferred returns true if the Spend is preferred instead of its conflicting Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) IsPreferred() bool { c.preferredInsteadMutex.RLock() defer c.preferredInsteadMutex.RUnlock() return c.preferredInstead == c } -// PreferredInstead returns the preferred instead value of the Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) PreferredInstead() *Spend[SpendID, ResourceID, VoteRank] { +// PreferredInstead returns the preferred instead value of the Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) PreferredInstead() *Spender[SpenderID, ResourceID, VoteRank] { c.preferredInsteadMutex.RLock() defer c.preferredInsteadMutex.RUnlock() return c.preferredInstead } -// IsLiked returns true if the Spend is liked instead of other conflicting Spends. -func (c *Spend[SpendID, ResourceID, VoteRank]) IsLiked() bool { +// IsLiked returns true if the Spend is liked instead of other conflicting Spenders. +func (c *Spender[SpenderID, ResourceID, VoteRank]) IsLiked() bool { c.likedInsteadMutex.RLock() defer c.likedInsteadMutex.RUnlock() return c.IsPreferred() && c.likedInstead.IsEmpty() } -// LikedInstead returns the set of liked instead Spends. -func (c *Spend[SpendID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Spend[SpendID, ResourceID, VoteRank]] { +// LikedInstead returns the set of liked instead Spenders. +func (c *Spender[SpenderID, ResourceID, VoteRank]) LikedInstead() ds.Set[*Spender[SpenderID, ResourceID, VoteRank]] { c.likedInsteadMutex.RLock() defer c.likedInsteadMutex.RUnlock() return c.likedInstead.Clone() } -// Shutdown shuts down the Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) Shutdown() { - c.ConflictingSpends.Shutdown() +// Shutdown shuts down the Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) Shutdown() { + c.ConflictingSpenders.Shutdown() } -// Evict cleans up the sortedSpend. -func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedSpends []SpendID) { +// Evict cleans up the sortedSpender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) Evict() (evictedSpends []SpenderID) { if firstEvictCall := !c.evicted.Swap(true); !firstEvictCall { return nil } @@ -292,45 +293,45 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedSpends []SpendID) switch c.Weight.AcceptanceState() { case acceptance.Rejected: - // evict the entire future cone of rejected spends - c.Children.Range(func(childSpend *Spend[SpendID, ResourceID, VoteRank]) { - evictedSpends = append(evictedSpends, childSpend.Evict()...) + // evict the entire future cone of rejected spenders + c.Children.Range(func(childSpender *Spender[SpenderID, ResourceID, VoteRank]) { + evictedSpends = append(evictedSpends, childSpender.Evict()...) }) default: - // remove evicted spend from parents of children (merge to master) - c.Children.Range(func(childSpend *Spend[SpendID, ResourceID, VoteRank]) { - childSpend.structureMutex.Lock() - defer childSpend.structureMutex.Unlock() + // remove evicted spender from parents of children (merge to master) + c.Children.Range(func(childSpender *Spender[SpenderID, ResourceID, VoteRank]) { + childSpender.structureMutex.Lock() + defer childSpender.structureMutex.Unlock() - childSpend.removeParent(c) + childSpender.removeParent(c) }) } c.structureMutex.Lock() defer c.structureMutex.Unlock() - c.Parents.Range(func(parentSpend *Spend[SpendID, ResourceID, VoteRank]) { - parentSpend.unregisterChild(c) + c.Parents.Range(func(parentSpender *Spender[SpenderID, ResourceID, VoteRank]) { + parentSpender.unregisterChild(c) }) c.Parents.Clear() - c.SpendSets.Range(func(spendSet *SpendSet[SpendID, ResourceID, VoteRank]) { + c.SpendSets.Range(func(spendSet *SpendSet[SpenderID, ResourceID, VoteRank]) { spendSet.Remove(c) }) c.SpendSets.Clear() - for _, spend := range c.ConflictingSpends.Shutdown() { - if spend != c { - spend.ConflictingSpends.Remove(c.ID) - c.ConflictingSpends.Remove(spend.ID) + for _, spender := range c.ConflictingSpenders.Shutdown() { + if spender != c { + spender.ConflictingSpenders.Remove(c.ID) + c.ConflictingSpenders.Remove(spender.ID) if c.IsAccepted() { - evictedSpends = append(evictedSpends, spend.Evict()...) + evictedSpends = append(evictedSpends, spender.Evict()...) } } } - c.ConflictingSpends.Remove(c.ID) + c.ConflictingSpenders.Remove(c.ID) c.preferredInsteadMutex.Lock() defer c.preferredInsteadMutex.Unlock() @@ -345,8 +346,8 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Evict() (evictedSpends []SpendID) return evictedSpends } -// Compare compares the Spend to the given other Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) Compare(other *Spend[SpendID, ResourceID, VoteRank]) int { +// Compare compares the Spender to the given other Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) Compare(other *Spender[SpenderID, ResourceID, VoteRank]) int { // no need to lock a mutex here, because the Weight is already thread-safe if c == other { @@ -368,18 +369,18 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) Compare(other *Spend[SpendID, Res return bytes.Compare(lo.PanicOnErr(c.ID.Bytes()), lo.PanicOnErr(other.ID.Bytes())) } -// String returns a human-readable representation of the Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) String() string { +// String returns a human-readable representation of the Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) String() string { // no need to lock a mutex here, because the Weight is already thread-safe - return stringify.Struct("Spend", + return stringify.Struct("Spender", stringify.NewStructField("id", c.ID), stringify.NewStructField("weight", c.Weight), ) } -// registerChild registers the given child Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendID, ResourceID, VoteRank]) { +// registerChild registers the given child Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) registerChild(child *Spender[SpenderID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() @@ -395,11 +396,11 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendI } }).Unhook, - c.LikedInsteadRemoved.Hook(func(reference *Spend[SpendID, ResourceID, VoteRank]) { + c.LikedInsteadRemoved.Hook(func(reference *Spender[SpenderID, ResourceID, VoteRank]) { child.removeInheritedLikedInsteadReference(c, reference) }).Unhook, - c.LikedInsteadAdded.Hook(func(spend *Spend[SpendID, ResourceID, VoteRank]) { + c.LikedInsteadAdded.Hook(func(spend *Spender[SpenderID, ResourceID, VoteRank]) { child.structureMutex.Lock() defer child.structureMutex.Unlock() @@ -407,8 +408,8 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendI }).Unhook, )) - for spends := c.likedInstead.Iterator(); spends.HasNext(); { - child.addInheritedLikedInsteadReference(c, spends.Next()) + for spenders := c.likedInstead.Iterator(); spenders.HasNext(); { + child.addInheritedLikedInsteadReference(c, spenders.Next()) } if c.IsRejected() { @@ -417,14 +418,14 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) registerChild(child *Spend[SpendI } } -// unregisterChild unregisters the given child Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) unregisterChild(spend *Spend[SpendID, ResourceID, VoteRank]) { +// unregisterChild unregisters the given child Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) unregisterChild(spender *Spender[SpenderID, ResourceID, VoteRank]) { c.structureMutex.Lock() defer c.structureMutex.Unlock() - if c.Children.Delete(spend) { - if unhookFunc, exists := c.childUnhookMethods.Get(spend.ID); exists { - c.childUnhookMethods.Delete(spend.ID) + if c.Children.Delete(spender) { + if unhookFunc, exists := c.childUnhookMethods.Get(spender.ID); exists { + c.childUnhookMethods.Delete(spender.ID) unhookFunc() } @@ -432,12 +433,12 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) unregisterChild(spend *Spend[Spen } // addInheritedLikedInsteadReference adds the given reference as a liked instead reference from the given source. -func (c *Spend[SpendID, ResourceID, VoteRank]) addInheritedLikedInsteadReference(source *Spend[SpendID, ResourceID, VoteRank], reference *Spend[SpendID, ResourceID, VoteRank]) { +func (c *Spender[SpenderID, ResourceID, VoteRank]) addInheritedLikedInsteadReference(source *Spender[SpenderID, ResourceID, VoteRank], reference *Spender[SpenderID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() // abort if the source already added the reference or if the source already existed - if sources := lo.Return1(c.likedInsteadSources.GetOrCreate(reference.ID, lo.NoVariadic(ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]))); !sources.Add(source) || !c.likedInstead.Add(reference) { + if sources := lo.Return1(c.likedInsteadSources.GetOrCreate(reference.ID, lo.NoVariadic(ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]]))); !sources.Add(source) || !c.likedInstead.Add(reference) { return } @@ -451,7 +452,7 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) addInheritedLikedInsteadReference } // removeInheritedLikedInsteadReference removes the given reference as a liked instead reference from the given source. -func (c *Spend[SpendID, ResourceID, VoteRank]) removeInheritedLikedInsteadReference(source *Spend[SpendID, ResourceID, VoteRank], reference *Spend[SpendID, ResourceID, VoteRank]) { +func (c *Spender[SpenderID, ResourceID, VoteRank]) removeInheritedLikedInsteadReference(source *Spender[SpenderID, ResourceID, VoteRank], reference *Spender[SpenderID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() @@ -472,8 +473,8 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) removeInheritedLikedInsteadRefere } } -// setPreferredInstead sets the preferred instead value of the Spend. -func (c *Spend[SpendID, ResourceID, VoteRank]) setPreferredInstead(preferredInstead *Spend[SpendID, ResourceID, VoteRank]) (previousPreferredInstead *Spend[SpendID, ResourceID, VoteRank]) { +// setPreferredInstead sets the preferred instead value of the Spender. +func (c *Spender[SpenderID, ResourceID, VoteRank]) setPreferredInstead(preferredInstead *Spender[SpenderID, ResourceID, VoteRank]) (previousPreferredInstead *Spender[SpenderID, ResourceID, VoteRank]) { c.likedInsteadMutex.Lock() defer c.likedInsteadMutex.Unlock() @@ -506,14 +507,14 @@ func (c *Spend[SpendID, ResourceID, VoteRank]) setPreferredInstead(preferredInst // setAcceptanceState sets the acceptance state of the Spend and returns the previous acceptance state (it triggers // an AcceptanceStateUpdated event if the acceptance state was updated). -func (c *Spend[SpendID, ResourceID, VoteRank]) setAcceptanceState(newState acceptance.State) (previousState acceptance.State) { +func (c *Spender[SpenderID, ResourceID, VoteRank]) setAcceptanceState(newState acceptance.State) (previousState acceptance.State) { if previousState = c.Weight.SetAcceptanceState(newState); previousState == newState { return previousState } // propagate acceptance to parents first if newState.IsAccepted() { - c.Parents.Range(func(parent *Spend[SpendID, ResourceID, VoteRank]) { + c.Parents.Range(func(parent *Spender[SpenderID, ResourceID, VoteRank]) { parent.setAcceptanceState(acceptance.Accepted) }) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go index 2768fa9f0..1f90d2401 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go @@ -8,31 +8,31 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// SpendSet represents a set of Spends of a Resource. -// If there's more than 1 Spend in a SpendSet, they are conflicting with each other over the shared Resource. -type SpendSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { - // ID is the ID of the Resource that the Spends in this SpendSet are conflicting over. +// SpendSet represents a set of Spenders of a Resource. +// If there's more than 1 spender in a SpendSet, they are conflicting with each other over the shared Resource. +type SpendSet[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { + // ID is the ID of the Resource being spent. ID ResourceID - // members is the set of Spends that are conflicting over the shared resource. - members ds.Set[*Spend[SpendID, ResourceID, VoteRank]] + // spenders is the set of spenders (e.g. transactions) that spend the resource (e.g. a utxo). + spenders ds.Set[*Spender[SpenderID, ResourceID, VoteRank]] allMembersEvicted reactive.Variable[bool] mutex syncutils.RWMutex } -// NewSpendSet creates a new SpendSet of Spends that are conflicting with each other over the given Resource. -func NewSpendSet[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id ResourceID) *SpendSet[SpendID, ResourceID, VoteRank] { - return &SpendSet[SpendID, ResourceID, VoteRank]{ +// NewSpendSet creates a new SpendSet containing spenders (e.g. a transaction) of a common resource (e.g. a utxo). +func NewSpendSet[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](id ResourceID) *SpendSet[SpenderID, ResourceID, VoteRank] { + return &SpendSet[SpenderID, ResourceID, VoteRank]{ ID: id, allMembersEvicted: reactive.NewVariable[bool](), - members: ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]](), + spenders: ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]](), } } -// Add adds a Spend to the SpendSet and returns all other members of the set. -func (c *SpendSet[SpendID, ResourceID, VoteRank]) Add(addedConflict *Spend[SpendID, ResourceID, VoteRank]) (otherMembers ds.Set[*Spend[SpendID, ResourceID, VoteRank]], err error) { +// Add adds a Spender to the SpendSet and returns all other members of the set. +func (c *SpendSet[SpenderID, ResourceID, VoteRank]) Add(addedSpender *Spender[SpenderID, ResourceID, VoteRank]) (otherMembers ds.Set[*Spender[SpenderID, ResourceID, VoteRank]], err error) { c.mutex.Lock() defer c.mutex.Unlock() @@ -40,7 +40,7 @@ func (c *SpendSet[SpendID, ResourceID, VoteRank]) Add(addedConflict *Spend[Spend return nil, ierrors.New("cannot join a SpendSet whose all members are evicted") } - if otherMembers = c.members.Clone(); !c.members.Add(addedConflict) { + if otherMembers = c.spenders.Clone(); !c.spenders.Add(addedSpender) { return nil, spenddag.ErrAlreadyPartOfSpendSet } @@ -49,25 +49,25 @@ func (c *SpendSet[SpendID, ResourceID, VoteRank]) Add(addedConflict *Spend[Spend } // Remove removes a Spend from the SpendSet and returns all remaining members of the set. -func (c *SpendSet[SpendID, ResourceID, VoteRank]) Remove(removedConflict *Spend[SpendID, ResourceID, VoteRank]) (removed bool) { +func (c *SpendSet[SpenderID, ResourceID, VoteRank]) Remove(removedSpender *Spender[SpenderID, ResourceID, VoteRank]) (removed bool) { c.mutex.Lock() defer c.mutex.Unlock() - if removed = c.members.Delete(removedConflict); removed && c.members.IsEmpty() { + if removed = c.spenders.Delete(removedSpender); removed && c.spenders.IsEmpty() { c.allMembersEvicted.Set(true) } return removed } -func (c *SpendSet[SpendID, ResourceID, VoteRank]) ForEach(callback func(parent *Spend[SpendID, ResourceID, VoteRank]) error) error { +func (c *SpendSet[SpenderID, ResourceID, VoteRank]) ForEach(callback func(parent *Spender[SpenderID, ResourceID, VoteRank]) error) error { c.mutex.RLock() defer c.mutex.RUnlock() - return c.members.ForEach(callback) + return c.spenders.ForEach(callback) } // OnAllMembersEvicted executes a callback when all members of the SpendSet are evicted and the SpendSet itself can be evicted. -func (c *SpendSet[SpendID, ResourceID, VoteRank]) OnAllMembersEvicted(callback func(prevValue, newValue bool)) { +func (c *SpendSet[SpenderID, ResourceID, VoteRank]) OnAllMembersEvicted(callback func(prevValue, newValue bool)) { c.allMembersEvicted.OnUpdate(callback) } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go index a05ca872e..32c6b4dab 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go @@ -20,20 +20,20 @@ import ( iotago "github.com/iotaledger/iota.go/v4" ) -type TestSpend = *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +type TestSpender = *Spender[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -//var NewTestSpend = NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] +//var NewTestSpend = NewSpender[iotago.TransactionID, iotago.OutputID, vote.MockedRank] -func NewTestSpend(id iotago.TransactionID, parentSpends ds.Set[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*SpendSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { - spend := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) - _, err := spend.JoinSpendSets(SpendSets) +func NewTestSpender(id iotago.TransactionID, parentSpends ds.Set[*Spender[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], SpendSets ds.Set[*SpendSet[iotago.TransactionID, iotago.OutputID, vote.MockedRank]], initialWeight *weight.Weight, pendingTasksCounter *syncutils.Counter, acceptanceThresholdProvider func() int64) *Spender[iotago.TransactionID, iotago.OutputID, vote.MockedRank] { + spender := NewSpender[iotago.TransactionID, iotago.OutputID, vote.MockedRank](id, initialWeight, pendingTasksCounter, acceptanceThresholdProvider) + _, err := spender.JoinSpendSets(SpendSets) if err != nil { // TODO: change this panic(err) } - spend.UpdateParents(parentSpends, ds.NewSet[*Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) + spender.UpdateParents(parentSpends, ds.NewSet[*Spender[iotago.TransactionID, iotago.OutputID, vote.MockedRank]]()) - return spend + return spender } func TestSpend_SetRejected(t *testing.T) { @@ -44,16 +44,16 @@ func TestSpend_SetRejected(t *testing.T) { return int64(weights.SeatCount()) }) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Spend2"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Spend3"), ds.NewSet(Spend2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("Spend1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpender(transactionID("Spend2"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpender(transactionID("Spend3"), ds.NewSet(Spend2), nil, weight.New(), pendingTasks, thresholdProvider) Spend1.setAcceptanceState(acceptance.Rejected) require.True(t, Spend1.IsRejected()) require.True(t, Spend2.IsRejected()) require.True(t, Spend3.IsRejected()) - Spend4 := NewTestSpend(transactionID("Spend4"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) + Spend4 := NewTestSpender(transactionID("Spend4"), ds.NewSet(Spend1), nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, Spend4.IsRejected()) } @@ -65,9 +65,9 @@ func TestSpend_UpdateParents(t *testing.T) { return int64(weights.SeatCount()) }) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Spend2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Spend3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("Spend1"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpender(transactionID("Spend2"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpender(transactionID("Spend3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, Spend3.Parents.Has(Spend1)) require.True(t, Spend3.Parents.Has(Spend2)) @@ -85,9 +85,9 @@ func TestSpend_SetAccepted(t *testing.T) { SpendSet1 := NewTestSpendSet(id("SpendSet1")) SpendSet2 := NewTestSpendSet(id("SpendSet2")) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Spend3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpender(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpender(transactionID("Spend3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) require.Equal(t, acceptance.Pending, Spend1.setAcceptanceState(acceptance.Accepted)) require.True(t, Spend1.IsAccepted()) @@ -106,9 +106,9 @@ func TestSpend_SetAccepted(t *testing.T) { SpendSet1 := NewTestSpendSet(id("SpendSet1")) SpendSet2 := NewTestSpendSet(id("SpendSet2")) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Spend3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("Spend1"), nil, ds.NewSet(SpendSet1), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewTestSpender(transactionID("Spend2"), nil, ds.NewSet(SpendSet1, SpendSet2), weight.New(), pendingTasks, thresholdProvider) + Spend3 := NewTestSpender(transactionID("Spend3"), nil, ds.NewSet(SpendSet2), weight.New(), pendingTasks, thresholdProvider) Spend2.setAcceptanceState(acceptance.Accepted) require.True(t, Spend1.IsRejected()) @@ -130,13 +130,13 @@ func TestSpend_SpendSets(t *testing.T) { green := NewTestSpendSet(id("green")) yellow := NewTestSpendSet(id("yellow")) - SpendA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) - SpendB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) - SpendC := NewTestSpend(transactionID("C"), nil, ds.NewSet(blue, green), weight.New().AddCumulativeWeight(5), pendingTasks, thresholdProvider) - SpendD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) - SpendE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(9), pendingTasks, thresholdProvider) + SpendA := NewTestSpender(transactionID("A"), nil, ds.NewSet(red), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) + SpendB := NewTestSpender(transactionID("B"), nil, ds.NewSet(red, blue), weight.New().AddCumulativeWeight(3), pendingTasks, thresholdProvider) + SpendC := NewTestSpender(transactionID("C"), nil, ds.NewSet(blue, green), weight.New().AddCumulativeWeight(5), pendingTasks, thresholdProvider) + SpendD := NewTestSpender(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New().AddCumulativeWeight(7), pendingTasks, thresholdProvider) + SpendE := NewTestSpender(transactionID("E"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(9), pendingTasks, thresholdProvider) - preferredInsteadMap := map[TestSpend]TestSpend{ + preferredInsteadMap := map[TestSpender]TestSpender{ SpendA: SpendA, SpendB: SpendA, SpendC: SpendC, @@ -150,7 +150,7 @@ func TestSpend_SpendSets(t *testing.T) { SpendD.Weight.SetCumulativeWeight(10) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendC: SpendD, SpendD: SpendD, SpendE: SpendD, @@ -159,7 +159,7 @@ func TestSpend_SpendSets(t *testing.T) { SpendD.Weight.SetCumulativeWeight(0) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendC: SpendC, SpendD: SpendE, SpendE: SpendE, @@ -168,14 +168,14 @@ func TestSpend_SpendSets(t *testing.T) { SpendC.Weight.SetCumulativeWeight(8) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendB: SpendC, })) SpendC.Weight.SetCumulativeWeight(8) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendB: SpendC, })) @@ -187,22 +187,22 @@ func TestSpend_SpendSets(t *testing.T) { SpendE.Weight.SetCumulativeWeight(1) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendD: SpendC, })) SpendE.Weight.SetCumulativeWeight(9) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendD: SpendE, })) - SpendF := NewTestSpend(transactionID("F"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(19), pendingTasks, thresholdProvider) + SpendF := NewTestSpender(transactionID("F"), nil, ds.NewSet(yellow), weight.New().AddCumulativeWeight(19), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() - assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpend]TestSpend{ + assertPreferredInstead(t, lo.MergeMaps(preferredInsteadMap, map[TestSpender]TestSpender{ SpendD: SpendF, SpendE: SpendF, SpendF: SpendF, @@ -215,28 +215,28 @@ func TestSpendParallel(t *testing.T) { sequentialPendingTasks := syncutils.NewCounter() parallelPendingTasks := syncutils.NewCounter() - sequentialSpends := createSpends(sequentialPendingTasks) + sequentialSpenders := createSpenders(sequentialPendingTasks) sequentialPendingTasks.WaitIsZero() - parallelSpends := createSpends(parallelPendingTasks) + parallelSpenders := createSpenders(parallelPendingTasks) parallelPendingTasks.WaitIsZero() const updateCount = 100000 - permutations := make([]func(Spend TestSpend), 0) + permutations := make([]func(Spend TestSpender), 0) for i := 0; i < updateCount; i++ { permutations = append(permutations, generateRandomSpendPermutation()) } var wg sync.WaitGroup for _, permutation := range permutations { - targetAlias := lo.Keys(parallelSpends)[rand.Intn(len(parallelSpends))] + targetAlias := lo.Keys(parallelSpenders)[rand.Intn(len(parallelSpenders))] - permutation(sequentialSpends[targetAlias]) + permutation(sequentialSpenders[targetAlias]) wg.Add(1) - go func(permutation func(Spend TestSpend)) { - permutation(parallelSpends[targetAlias]) + go func(permutation func(Spend TestSpender)) { + permutation(parallelSpenders[targetAlias]) wg.Done() }(permutation) @@ -248,12 +248,12 @@ func TestSpendParallel(t *testing.T) { parallelPendingTasks.WaitIsZero() - lo.ForEach(lo.Keys(parallelSpends), func(SpendAlias string) { - assert.EqualValuesf(t, sequentialSpends[SpendAlias].PreferredInstead().ID, parallelSpends[SpendAlias].PreferredInstead().ID, "parallel Spend %s prefers %s, but sequential Spend prefers %s", SpendAlias, parallelSpends[SpendAlias].PreferredInstead().ID, sequentialSpends[SpendAlias].PreferredInstead().ID) + lo.ForEach(lo.Keys(parallelSpenders), func(SpendAlias string) { + assert.EqualValuesf(t, sequentialSpenders[SpendAlias].PreferredInstead().ID, parallelSpenders[SpendAlias].PreferredInstead().ID, "parallel Spend %s prefers %s, but sequential Spend prefers %s", SpendAlias, parallelSpenders[SpendAlias].PreferredInstead().ID, sequentialSpenders[SpendAlias].PreferredInstead().ID) }) - assertCorrectOrder(t, lo.Values(sequentialSpends)...) - assertCorrectOrder(t, lo.Values(parallelSpends)...) + assertCorrectOrder(t, lo.Values(sequentialSpenders)...) + assertCorrectOrder(t, lo.Values(parallelSpenders)...) } func TestLikedInstead1(t *testing.T) { @@ -264,14 +264,14 @@ func TestLikedInstead1(t *testing.T) { return int64(weights.SeatCount()) }) - masterBranch := NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + masterBranch := NewTestSpender(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) SpendSet1 := NewTestSpendSet(id("O1")) - Spend1 := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(6), pendingTasks, thresholdProvider) + Spend2 := NewTestSpender(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(3), pendingTasks, thresholdProvider) require.True(t, Spend1.IsPreferred()) require.True(t, Spend1.IsLiked()) @@ -291,13 +291,13 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { return int64(weights.SeatCount()) }) - masterBranch := NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + masterBranch := NewTestSpender(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) SpendSet1 := NewTestSpendSet(id("O1")) - SpendA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - SpendB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + SpendA := NewTestSpender(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendB := NewTestSpender(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) require.True(t, SpendA.IsPreferred()) require.True(t, SpendA.IsLiked()) @@ -309,8 +309,8 @@ func TestLikedInsteadFromPreferredInstead(t *testing.T) { require.True(t, SpendB.LikedInstead().Has(SpendA)) SpendSet2 := NewTestSpendSet(id("O2")) - SpendC := NewTestSpend(transactionID("TxC"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - SpendD := NewTestSpend(transactionID("TxD"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + SpendC := NewTestSpender(transactionID("TxC"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendD := NewTestSpender(transactionID("TxD"), ds.NewSet(SpendA), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) require.True(t, SpendC.IsPreferred()) require.True(t, SpendC.IsLiked()) @@ -368,13 +368,13 @@ func TestLikedInstead21(t *testing.T) { return int64(weights.SeatCount()) }) - masterBranch := NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + masterBranch := NewTestSpender(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.True(t, masterBranch.IsLiked()) require.True(t, masterBranch.LikedInstead().IsEmpty()) SpendSet1 := NewTestSpendSet(id("O1")) - SpendA := NewTestSpend(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - SpendB := NewTestSpend(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) + SpendA := NewTestSpender(transactionID("TxA"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendB := NewTestSpender(transactionID("TxB"), ds.NewSet(masterBranch), ds.NewSet(SpendSet1), weight.New().SetCumulativeWeight(100), pendingTasks, thresholdProvider) require.True(t, SpendA.IsPreferred()) require.True(t, SpendA.IsLiked()) @@ -386,8 +386,8 @@ func TestLikedInstead21(t *testing.T) { require.True(t, SpendB.LikedInstead().Has(SpendA)) SpendSet4 := NewTestSpendSet(id("O4")) - SpendF := NewTestSpend(transactionID("TxF"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) - SpendG := NewTestSpend(transactionID("TxG"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) + SpendF := NewTestSpender(transactionID("TxF"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(20), pendingTasks, thresholdProvider) + SpendG := NewTestSpender(transactionID("TxG"), ds.NewSet(SpendA), ds.NewSet(SpendSet4), weight.New().SetCumulativeWeight(10), pendingTasks, thresholdProvider) require.True(t, SpendF.IsPreferred()) require.True(t, SpendF.IsLiked()) @@ -399,8 +399,8 @@ func TestLikedInstead21(t *testing.T) { require.True(t, SpendG.LikedInstead().Has(SpendF)) SpendSet2 := NewTestSpendSet(id("O2")) - SpendC := NewTestSpend(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) - SpendH := NewTestSpend(transactionID("TxH"), ds.NewSet(masterBranch, SpendA), ds.NewSet(SpendSet2, SpendSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) + SpendC := NewTestSpender(transactionID("TxC"), ds.NewSet(masterBranch), ds.NewSet(SpendSet2), weight.New().SetCumulativeWeight(200), pendingTasks, thresholdProvider) + SpendH := NewTestSpender(transactionID("TxH"), ds.NewSet(masterBranch, SpendA), ds.NewSet(SpendSet2, SpendSet4), weight.New().SetCumulativeWeight(150), pendingTasks, thresholdProvider) require.True(t, SpendC.IsPreferred()) require.True(t, SpendC.IsLiked()) @@ -412,8 +412,8 @@ func TestLikedInstead21(t *testing.T) { require.True(t, SpendH.LikedInstead().Has(SpendC)) SpendSet3 := NewTestSpendSet(id("O12")) - SpendI := NewTestSpend(transactionID("TxI"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) - SpendJ := NewTestSpend(transactionID("TxJ"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) + SpendI := NewTestSpender(transactionID("TxI"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(5), pendingTasks, thresholdProvider) + SpendJ := NewTestSpender(transactionID("TxJ"), ds.NewSet(SpendF), ds.NewSet(SpendSet3), weight.New().SetCumulativeWeight(15), pendingTasks, thresholdProvider) require.True(t, SpendJ.IsPreferred()) require.True(t, SpendJ.IsLiked()) @@ -459,7 +459,7 @@ func TestSpendSet_AllMembersEvicted(t *testing.T) { return int64(weights.SeatCount()) }) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) evictedSpends := Spend1.Evict() require.Len(t, evictedSpends, 1) require.Contains(t, evictedSpends, Spend1.ID) @@ -469,7 +469,7 @@ func TestSpendSet_AllMembersEvicted(t *testing.T) { require.Len(t, evictedSpends, 0) // Spend tries to join Spendset who's all members were evicted - Spend2 := NewSpend[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("Spend1"), weight.New(), pendingTasks, thresholdProvider) + Spend2 := NewSpender[iotago.TransactionID, iotago.OutputID, vote.MockedRank](transactionID("Spend1"), weight.New(), pendingTasks, thresholdProvider) _, err := Spend2.JoinSpendSets(ds.NewSet(yellow)) require.Error(t, err) @@ -486,9 +486,9 @@ func TestSpend_Compare(t *testing.T) { return int64(weights.SeatCount()) }) - var Spend1, Spend2 TestSpend + var Spend1, Spend2 TestSpender - Spend1 = NewTestSpend(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) + Spend1 = NewTestSpender(transactionID("M"), nil, nil, weight.New(), pendingTasks, thresholdProvider) require.Equal(t, weight.Heavier, Spend1.Compare(nil)) require.Equal(t, weight.Lighter, Spend2.Compare(Spend1)) @@ -506,10 +506,10 @@ func TestSpend_Inheritance(t *testing.T) { return int64(weights.SeatCount()) }) - Spend1 := NewTestSpend(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) - Spend2 := NewTestSpend(transactionID("Spend2"), nil, ds.NewSet(green), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) - Spend3 := NewTestSpend(transactionID("Spend3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) - Spend4 := NewTestSpend(transactionID("Spend4"), nil, ds.NewSet(yellow, green), weight.New(), pendingTasks, thresholdProvider) + Spend1 := NewTestSpender(transactionID("Spend1"), nil, ds.NewSet(yellow), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) + Spend2 := NewTestSpender(transactionID("Spend2"), nil, ds.NewSet(green), weight.New().SetCumulativeWeight(1), pendingTasks, thresholdProvider) + Spend3 := NewTestSpender(transactionID("Spend3"), ds.NewSet(Spend1, Spend2), nil, weight.New(), pendingTasks, thresholdProvider) + Spend4 := NewTestSpender(transactionID("Spend4"), nil, ds.NewSet(yellow, green), weight.New(), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() require.True(t, Spend3.LikedInstead().IsEmpty()) @@ -524,7 +524,7 @@ func TestSpend_Inheritance(t *testing.T) { require.True(t, Spend3.LikedInstead().Has(Spend4)) // make sure that inheritance of LikedInstead works correctly for newly created Spends - Spend5 := NewTestSpend(transactionID("Spend5"), ds.NewSet(Spend3), nil, weight.New(), pendingTasks, thresholdProvider) + Spend5 := NewTestSpender(transactionID("Spend5"), ds.NewSet(Spend3), nil, weight.New(), pendingTasks, thresholdProvider) pendingTasks.WaitIsZero() require.True(t, Spend5.LikedInstead().Has(Spend4)) @@ -533,39 +533,39 @@ func TestSpend_Inheritance(t *testing.T) { require.True(t, Spend3.LikedInstead().IsEmpty()) } -func assertCorrectOrder(t *testing.T, spends ...TestSpend) { - sort.Slice(spends, func(i, j int) bool { - return spends[i].Compare(spends[j]) == weight.Heavier +func assertCorrectOrder(t *testing.T, spenders ...TestSpender) { + sort.Slice(spenders, func(i, j int) bool { + return spenders[i].Compare(spenders[j]) == weight.Heavier }) - preferredSpends := ds.NewSet[TestSpend]() - unPreferredSpends := ds.NewSet[TestSpend]() + preferredSpenders := ds.NewSet[TestSpender]() + unPreferredSpenders := ds.NewSet[TestSpender]() - for _, spend := range spends { - if !unPreferredSpends.Has(spend) { - preferredSpends.Add(spend) - spend.ConflictingSpends.Range(func(conflictingSpend *Spend[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { - if spend != conflictingSpend { - unPreferredSpends.Add(conflictingSpend) + for _, spender := range spenders { + if !unPreferredSpenders.Has(spender) { + preferredSpenders.Add(spender) + spender.ConflictingSpenders.Range(func(conflictingSpender *Spender[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) { + if spender != conflictingSpender { + unPreferredSpenders.Add(conflictingSpender) } }, true) } } - for _, Spend := range spends { - if preferredSpends.Has(Spend) { - require.True(t, Spend.IsPreferred(), "Spend %s should be preferred", Spend.ID) + for _, spender := range spenders { + if preferredSpenders.Has(spender) { + require.True(t, spender.IsPreferred(), "spender %s should be preferred", spender.ID) } - if unPreferredSpends.Has(Spend) { - require.False(t, Spend.IsPreferred(), "Spend %s should be unPreferred", Spend.ID) + if unPreferredSpenders.Has(spender) { + require.False(t, spender.IsPreferred(), "spender %s should be unPreferred", spender.ID) } } - _ = unPreferredSpends.ForEach(func(unPreferredSpend TestSpend) (err error) { + _ = unPreferredSpenders.ForEach(func(unPreferredSpender TestSpender) (err error) { // iterating in descending order, so the first preferred Spend - return unPreferredSpend.ConflictingSpends.ForEach(func(ConflictingSpend TestSpend) error { - if ConflictingSpend != unPreferredSpend && ConflictingSpend.IsPreferred() { - require.Equal(t, ConflictingSpend, unPreferredSpend.PreferredInstead()) + return unPreferredSpender.ConflictingSpenders.ForEach(func(conflictingSpender TestSpender) error { + if conflictingSpender != unPreferredSpender && conflictingSpender.IsPreferred() { + require.Equal(t, conflictingSpender, unPreferredSpender.PreferredInstead()) return ierrors.New("break the loop") } @@ -575,20 +575,20 @@ func assertCorrectOrder(t *testing.T, spends ...TestSpend) { }) } -func generateRandomSpendPermutation() func(spend TestSpend) { +func generateRandomSpendPermutation() func(spender TestSpender) { updateType := rand.Intn(100) delta := rand.Intn(100) - return func(spend TestSpend) { + return func(spender TestSpender) { if updateType%2 == 0 { - spend.Weight.AddCumulativeWeight(int64(delta)) + spender.Weight.AddCumulativeWeight(int64(delta)) } else { - spend.Weight.RemoveCumulativeWeight(int64(delta)) + spender.Weight.RemoveCumulativeWeight(int64(delta)) } } } -func createSpends(pendingTasks *syncutils.Counter) map[string]TestSpend { +func createSpenders(pendingTasks *syncutils.Counter) map[string]TestSpender { weights := account.NewSeatedAccounts(account.NewAccounts()) thresholdProvider := acceptance.ThresholdProvider(func() int64 { @@ -600,13 +600,13 @@ func createSpends(pendingTasks *syncutils.Counter) map[string]TestSpend { green := NewTestSpendSet(id("green")) yellow := NewTestSpendSet(id("yellow")) - SpendA := NewTestSpend(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) - SpendB := NewTestSpend(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) - SpendC := NewTestSpend(transactionID("C"), nil, ds.NewSet(green, blue), weight.New(), pendingTasks, thresholdProvider) - SpendD := NewTestSpend(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New(), pendingTasks, thresholdProvider) - SpendE := NewTestSpend(transactionID("E"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) + SpendA := NewTestSpender(transactionID("A"), nil, ds.NewSet(red), weight.New(), pendingTasks, thresholdProvider) + SpendB := NewTestSpender(transactionID("B"), nil, ds.NewSet(red, blue), weight.New(), pendingTasks, thresholdProvider) + SpendC := NewTestSpender(transactionID("C"), nil, ds.NewSet(green, blue), weight.New(), pendingTasks, thresholdProvider) + SpendD := NewTestSpender(transactionID("D"), nil, ds.NewSet(green, yellow), weight.New(), pendingTasks, thresholdProvider) + SpendE := NewTestSpender(transactionID("E"), nil, ds.NewSet(yellow), weight.New(), pendingTasks, thresholdProvider) - return map[string]TestSpend{ + return map[string]TestSpender{ "SpendA": SpendA, "SpendB": SpendB, "SpendC": SpendC, @@ -615,8 +615,8 @@ func createSpends(pendingTasks *syncutils.Counter) map[string]TestSpend { } } -func assertPreferredInstead(t *testing.T, preferredInsteadMap map[TestSpend]TestSpend) { - for Spend, preferredInsteadSpend := range preferredInsteadMap { - assert.Equalf(t, preferredInsteadSpend.ID, Spend.PreferredInstead().ID, "Spend %s should prefer %s instead of %s", Spend.ID, preferredInsteadSpend.ID, Spend.PreferredInstead().ID) +func assertPreferredInstead(t *testing.T, preferredInsteadMap map[TestSpender]TestSpender) { + for spender, preferredInsteadSpender := range preferredInsteadMap { + assert.Equalf(t, preferredInsteadSpender.ID, spender.PreferredInstead().ID, "Spend %s should prefer %s instead of %s", spender.ID, preferredInsteadSpender.ID, spender.PreferredInstead().ID) } } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index ed2924eec..82d11cd1d 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -17,20 +17,20 @@ import ( // SpendDAG represents a data structure that tracks causal relationships between Spends and that allows to // efficiently manage these Spends (and vote on their fate). -type SpendDAG[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { +type SpendDAG[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]] struct { // events contains the events of the spenddag. - events *spenddag.Events[SpendID, ResourceID] + events *spenddag.Events[SpenderID, ResourceID] // seatCount is a function that returns the number of seats. seatCount func() int - // spendsByID is a mapping of SpendIDs to Spends. - spendsByID *shrinkingmap.ShrinkingMap[SpendID, *Spend[SpendID, ResourceID, VoteRank]] + // spendersByID is a mapping of SpenderIDs to Spenders. + spendersByID *shrinkingmap.ShrinkingMap[SpenderID, *Spender[SpenderID, ResourceID, VoteRank]] - spendUnhooks *shrinkingmap.ShrinkingMap[SpendID, func()] + spendUnhooks *shrinkingmap.ShrinkingMap[SpenderID, func()] // spendSetsByID is a mapping of ResourceIDs to SpendSets. - spendSetsByID *shrinkingmap.ShrinkingMap[ResourceID, *SpendSet[SpendID, ResourceID, VoteRank]] + spendSetsByID *shrinkingmap.ShrinkingMap[ResourceID, *SpendSet[SpenderID, ResourceID, VoteRank]] // pendingTasks is a counter that keeps track of the number of pending tasks. pendingTasks *syncutils.Counter @@ -43,14 +43,14 @@ type SpendDAG[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankTyp } // New creates a new spenddag. -func New[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](seatCount func() int) *SpendDAG[SpendID, ResourceID, VoteRank] { - return &SpendDAG[SpendID, ResourceID, VoteRank]{ - events: spenddag.NewEvents[SpendID, ResourceID](), +func New[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[VoteRank]](seatCount func() int) *SpendDAG[SpenderID, ResourceID, VoteRank] { + return &SpendDAG[SpenderID, ResourceID, VoteRank]{ + events: spenddag.NewEvents[SpenderID, ResourceID](), seatCount: seatCount, - spendsByID: shrinkingmap.New[SpendID, *Spend[SpendID, ResourceID, VoteRank]](), - spendUnhooks: shrinkingmap.New[SpendID, func()](), - spendSetsByID: shrinkingmap.New[ResourceID, *SpendSet[SpendID, ResourceID, VoteRank]](), + spendersByID: shrinkingmap.New[SpenderID, *Spender[SpenderID, ResourceID, VoteRank]](), + spendUnhooks: shrinkingmap.New[SpenderID, func()](), + spendSetsByID: shrinkingmap.New[ResourceID, *SpendSet[SpenderID, ResourceID, VoteRank]](), pendingTasks: syncutils.NewCounter(), votingMutex: syncutils.NewDAGMutex[account.SeatIndex](), } @@ -59,78 +59,78 @@ func New[SpendID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRankType[Vot var _ spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank] = &SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]{} // Shutdown shuts down the SpendDAG. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) Shutdown() { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) Shutdown() { c.mutex.Lock() defer c.mutex.Unlock() - c.spendsByID.ForEach(func(spendID SpendID, spend *Spend[SpendID, ResourceID, VoteRank]) bool { - spend.Shutdown() + c.spendersByID.ForEach(func(spenderID SpenderID, spender *Spender[SpenderID, ResourceID, VoteRank]) bool { + spender.Shutdown() return true }) } // Events returns the events of the spenddag. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) Events() *spenddag.Events[SpendID, ResourceID] { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) Events() *spenddag.Events[SpenderID, ResourceID] { return c.events } -// CreateSpend creates a new Spend. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) CreateSpend(id SpendID) { +// CreateSpender creates a new Spender. +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) CreateSpender(id SpenderID) { if func() (created bool) { c.mutex.RLock() defer c.mutex.RUnlock() - _, isNewSpend := c.spendsByID.GetOrCreate(id, func() *Spend[SpendID, ResourceID, VoteRank] { - newSpend := NewSpend[SpendID, ResourceID, VoteRank](id, weight.New(), c.pendingTasks, acceptance.ThresholdProvider(func() int64 { return int64(c.seatCount()) })) + _, isNewSpend := c.spendersByID.GetOrCreate(id, func() *Spender[SpenderID, ResourceID, VoteRank] { + newSpender := NewSpender[SpenderID, ResourceID, VoteRank](id, weight.New(), c.pendingTasks, acceptance.ThresholdProvider(func() int64 { return int64(c.seatCount()) })) // attach to the acceptance state updated event and propagate that event to the outside. - // also need to remember the unhook method to properly evict the spend. - c.spendUnhooks.Set(id, newSpend.AcceptanceStateUpdated.Hook(func(_ acceptance.State, newState acceptance.State) { + // also need to remember the unhook method to properly evict the spender. + c.spendUnhooks.Set(id, newSpender.AcceptanceStateUpdated.Hook(func(_ acceptance.State, newState acceptance.State) { if newState.IsAccepted() { - c.events.SpendAccepted.Trigger(newSpend.ID) + c.events.SpenderAccepted.Trigger(newSpender.ID) return } if newState.IsRejected() { - c.events.SpendRejected.Trigger(newSpend.ID) + c.events.SpenderRejected.Trigger(newSpender.ID) } }).Unhook) - return newSpend + return newSpender }) return isNewSpend }() { - c.events.SpendCreated.Trigger(id) + c.events.SpenderCreated.Trigger(id) } } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateConflictingResources(id SpendID, resourceIDs ds.Set[ResourceID]) error { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) UpdateSpentResources(id SpenderID, resourceIDs ds.Set[ResourceID]) error { joinedSpendSets, err := func() (ds.Set[ResourceID], error) { c.mutex.RLock() defer c.mutex.RUnlock() - spend, exists := c.spendsByID.Get(id) + spender, exists := c.spendersByID.Get(id) if !exists { - return nil, ierrors.Errorf("spend already evicted: %w", spenddag.ErrEntityEvicted) + return nil, ierrors.Errorf("spender already evicted: %w", spenddag.ErrEntityEvicted) } - return spend.JoinSpendSets(c.spendSets(resourceIDs)) + return spender.JoinSpendSets(c.spendSets(resourceIDs)) }() if err != nil { - return ierrors.Errorf("spend %s failed to join spend sets: %w", id, err) + return ierrors.Errorf("spender %s failed to join spend sets: %w", id, err) } if !joinedSpendSets.IsEmpty() { - c.events.ConflictingResourcesAdded.Trigger(id, joinedSpendSets) + c.events.SpentResourcesAdded.Trigger(id, joinedSpendSets) } return nil } // ReadConsistent write locks the spenddag and exposes read-only methods to the callback to perform multiple reads while maintaining the same spenddag state. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ReadConsistent(callback func(spenddag spenddag.ReadLockedSpendDAG[SpendID, ResourceID, VoteRank]) error) error { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) ReadConsistent(callback func(spenddag spenddag.ReadLockedSpendDAG[SpenderID, ResourceID, VoteRank]) error) error { c.mutex.Lock() defer c.mutex.Unlock() @@ -140,23 +140,23 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ReadConsistent(callback func(s } // UpdateSpendParents updates the parents of the given Spend and returns an error if the operation failed. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateSpendParents(spendID SpendID, addedParentIDs ds.Set[SpendID], removedParentIDs ds.Set[SpendID]) error { - newParents := ds.NewSet[SpendID]() +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) UpdateSpendParents(spenderID SpenderID, addedParentIDs ds.Set[SpenderID], removedParentIDs ds.Set[SpenderID]) error { + newParents := ds.NewSet[SpenderID]() updated, err := func() (bool, error) { c.mutex.RLock() defer c.mutex.RUnlock() - currentSpend, currentSpendExists := c.spendsByID.Get(spendID) + currentSpender, currentSpendExists := c.spendersByID.Get(spenderID) if !currentSpendExists { - return false, ierrors.Errorf("tried to modify evicted spend with %s: %w", spendID, spenddag.ErrEntityEvicted) + return false, ierrors.Errorf("tried to modify evicted spend with %s: %w", spenderID, spenddag.ErrEntityEvicted) } - addedParents := ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() + addedParents := ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]]() - if err := addedParentIDs.ForEach(func(addedParentID SpendID) error { + if err := addedParentIDs.ForEach(func(addedParentID SpenderID) error { // If we cannot load the parent it is because it has been already evicted - if addedParent, addedParentExists := c.spendsByID.Get(addedParentID); addedParentExists { + if addedParent, addedParentExists := c.spendersByID.Get(addedParentID); addedParentExists { addedParents.Add(addedParent) } @@ -165,15 +165,15 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateSpendParents(spendID Spe return false, err } - removedParents, err := c.spends(removedParentIDs, !currentSpend.IsRejected()) + removedParents, err := c.spenders(removedParentIDs, !currentSpender.IsRejected()) if err != nil { return false, ierrors.Errorf("failed to update spend parents: %w", err) } - updated := currentSpend.UpdateParents(addedParents, removedParents) + updated := currentSpender.UpdateParents(addedParents, removedParents) if updated { - _ = currentSpend.Parents.ForEach(func(parentSpend *Spend[SpendID, ResourceID, VoteRank]) (err error) { - newParents.Add(parentSpend.ID) + _ = currentSpender.Parents.ForEach(func(parentSpender *Spender[SpenderID, ResourceID, VoteRank]) (err error) { + newParents.Add(parentSpender.ID) return nil }) } @@ -185,19 +185,19 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UpdateSpendParents(spendID Spe } if updated { - c.events.SpendParentsUpdated.Trigger(spendID, newParents) + c.events.SpenderParentsUpdated.Trigger(spenderID, newParents) } return nil } -// LikedInstead returns the SpendIDs of the Spends that are liked instead of the Spends. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) LikedInstead(spendIDs ds.Set[SpendID]) ds.Set[SpendID] { - likedInstead := ds.NewSet[SpendID]() - spendIDs.Range(func(spendID SpendID) { - if currentSpend, exists := c.spendsByID.Get(spendID); exists { - if likedSpend := heaviestSpend(currentSpend.LikedInstead()); likedSpend != nil { - likedInstead.Add(likedSpend.ID) +// LikedInstead returns the SpenderIDs of the Spenders that are liked instead of the Spenders. +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) LikedInstead(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] { + likedInstead := ds.NewSet[SpenderID]() + spenderIDs.Range(func(spenderID SpenderID) { + if currentSpender, exists := c.spendersByID.Get(spenderID); exists { + if likedSpender := heaviestSpender(currentSpender.LikedInstead()); likedSpender != nil { + likedInstead.Add(likedSpender.ID) } } }) @@ -205,55 +205,55 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) LikedInstead(spendIDs ds.Set[S return likedInstead } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) FutureCone(spendIDs ds.Set[SpendID]) (futureCone ds.Set[SpendID]) { - futureCone = ds.NewSet[SpendID]() - for futureConeWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]().PushAll(lo.Return1(c.spends(spendIDs, true)).ToSlice()...); futureConeWalker.HasNext(); { - if spend := futureConeWalker.Next(); futureCone.Add(spend.ID) { - futureConeWalker.PushAll(spend.Children.ToSlice()...) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) FutureCone(spenderIDs ds.Set[SpenderID]) (futureCone ds.Set[SpenderID]) { + futureCone = ds.NewSet[SpenderID]() + for futureConeWalker := walker.New[*Spender[SpenderID, ResourceID, VoteRank]]().PushAll(lo.Return1(c.spenders(spenderIDs, true)).ToSlice()...); futureConeWalker.HasNext(); { + if spender := futureConeWalker.Next(); futureCone.Add(spender.ID) { + futureConeWalker.PushAll(spender.Children.ToSlice()...) } } return futureCone } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) ConflictingSpends(spendID SpendID) (conflictingSpends ds.Set[SpendID], exists bool) { - spend, exists := c.spendsByID.Get(spendID) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) ConflictingSpenders(spenderID SpenderID) (conflictingSpenders ds.Set[SpenderID], exists bool) { + spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil, false } - conflictingSpends = ds.NewSet[SpendID]() - spend.ConflictingSpends.Range(func(conflictingSpend *Spend[SpendID, ResourceID, VoteRank]) { - conflictingSpends.Add(conflictingSpend.ID) + conflictingSpenders = ds.NewSet[SpenderID]() + spender.ConflictingSpenders.Range(func(conflictingSpender *Spender[SpenderID, ResourceID, VoteRank]) { + conflictingSpenders.Add(conflictingSpender.ID) }) - return conflictingSpends, true + return conflictingSpenders, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) AllSpendsSupported(seat account.SeatIndex, spendIDs ds.Set[SpendID]) bool { - return lo.Return1(c.spends(spendIDs, true)).ForEach(func(spend *Spend[SpendID, ResourceID, VoteRank]) (err error) { - lastVote, exists := spend.LatestVotes.Get(seat) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) AllSpendsSupported(seat account.SeatIndex, spenderIDs ds.Set[SpenderID]) bool { + return lo.Return1(c.spenders(spenderIDs, true)).ForEach(func(spender *Spender[SpenderID, ResourceID, VoteRank]) (err error) { + lastVote, exists := spender.LatestVotes.Get(seat) - return lo.Cond(exists && lastVote.IsLiked(), nil, ierrors.Errorf("spend with %s is not supported by seat %d", spend.ID, seat)) + return lo.Cond(exists && lastVote.IsLiked(), nil, ierrors.Errorf("spender %s is not supported by seat %d", spender.ID, seat)) }) == nil } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendVoters(spendID SpendID) (spendVoters ds.Set[account.SeatIndex]) { - if spend, exists := c.spendsByID.Get(spendID); exists { - return spend.Weight.Voters.Clone() +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendVoters(spenderID SpenderID) (spendVoters ds.Set[account.SeatIndex]) { + if spender, exists := c.spendersByID.Get(spenderID); exists { + return spender.Weight.Voters.Clone() } return ds.NewSet[account.SeatIndex]() } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendSets(spendID SpendID) (spendSets ds.Set[ResourceID], exists bool) { - spend, exists := c.spendsByID.Get(spendID) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendSets(spenderID SpenderID) (spendSets ds.Set[ResourceID], exists bool) { + spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil, false } spendSets = ds.NewSet[ResourceID]() - _ = spend.SpendSets.ForEach(func(spendSet *SpendSet[SpendID, ResourceID, VoteRank]) error { + _ = spender.SpendSets.ForEach(func(spendSet *SpendSet[SpenderID, ResourceID, VoteRank]) error { spendSets.Add(spendSet.ID) return nil }) @@ -261,14 +261,14 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendSets(spendID SpendID) (sp return spendSets, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendParents(spendID SpendID) (spendParents ds.Set[SpendID], exists bool) { - spend, exists := c.spendsByID.Get(spendID) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendParents(spenderID SpenderID) (spendParents ds.Set[SpenderID], exists bool) { + spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil, false } - spendParents = ds.NewSet[SpendID]() - _ = spend.Parents.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { + spendParents = ds.NewSet[SpenderID]() + _ = spender.Parents.ForEach(func(parent *Spender[SpenderID, ResourceID, VoteRank]) error { spendParents.Add(parent.ID) return nil }) @@ -276,14 +276,14 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendParents(spendID SpendID) return spendParents, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendChildren(spendID SpendID) (spendChildren ds.Set[SpendID], exists bool) { - spend, exists := c.spendsByID.Get(spendID) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendChildren(spenderID SpenderID) (spendChildren ds.Set[SpenderID], exists bool) { + spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil, false } - spendChildren = ds.NewSet[SpendID]() - _ = spend.Children.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { + spendChildren = ds.NewSet[SpenderID]() + _ = spender.Children.ForEach(func(parent *Spender[SpenderID, ResourceID, VoteRank]) error { spendChildren.Add(parent.ID) return nil }) @@ -291,67 +291,67 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendChildren(spendID SpendID) return spendChildren, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendSetMembers(spendSetID ResourceID) (spends ds.Set[SpendID], exists bool) { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendSetMembers(spendSetID ResourceID) (spenders ds.Set[SpenderID], exists bool) { spendSet, exists := c.spendSetsByID.Get(spendSetID) if !exists { return nil, false } - spends = ds.NewSet[SpendID]() - _ = spendSet.ForEach(func(parent *Spend[SpendID, ResourceID, VoteRank]) error { - spends.Add(parent.ID) + spenders = ds.NewSet[SpenderID]() + _ = spendSet.ForEach(func(parent *Spender[SpenderID, ResourceID, VoteRank]) error { + spenders.Add(parent.ID) return nil }) - return spends, true + return spenders, true } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SpendWeight(spendID SpendID) int64 { - if spend, exists := c.spendsByID.Get(spendID); exists { - return spend.Weight.Value().ValidatorsWeight() +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendWeight(spenderID SpenderID) int64 { + if spender, exists := c.spendersByID.Get(spenderID); exists { + return spender.Weight.Value().ValidatorsWeight() } return 0 } // CastVotes applies the given votes to the spenddag. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) CastVotes(vote *vote.Vote[VoteRank], spendIDs ds.Set[SpendID]) error { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) CastVotes(vote *vote.Vote[VoteRank], spenderIDs ds.Set[SpenderID]) error { c.mutex.RLock() defer c.mutex.RUnlock() c.votingMutex.Lock(vote.Voter) defer c.votingMutex.Unlock(vote.Voter) - supportedSpends, revokedSpends, err := c.determineVotes(spendIDs) + supportedSpenders, revokedSpenders, err := c.determineVotes(spenderIDs) if err != nil { return ierrors.Errorf("failed to determine votes: %w", err) } - for supportedSpend := supportedSpends.Iterator(); supportedSpend.HasNext(); { - supportedSpend.Next().ApplyVote(vote.WithLiked(true)) + for supportedSpender := supportedSpenders.Iterator(); supportedSpender.HasNext(); { + supportedSpender.Next().ApplyVote(vote.WithLiked(true)) } - for revokedSpend := revokedSpends.Iterator(); revokedSpend.HasNext(); { - revokedSpend.Next().ApplyVote(vote.WithLiked(false)) + for revokedSpender := revokedSpenders.Iterator(); revokedSpender.HasNext(); { + revokedSpender.Next().ApplyVote(vote.WithLiked(false)) } return nil } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) AcceptanceState(spendIDs ds.Set[SpendID]) acceptance.State { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) AcceptanceState(spenderIDs ds.Set[SpenderID]) acceptance.State { lowestObservedState := acceptance.Accepted - if err := spendIDs.ForEach(func(spendID SpendID) error { - spend, exists := c.spendsByID.Get(spendID) + if err := spenderIDs.ForEach(func(spenderID SpenderID) error { + spender, exists := c.spendersByID.Get(spenderID) if !exists { return ierrors.Errorf("tried to retrieve non-existing spend: %w", spenddag.ErrFatal) } - if spend.IsRejected() { + if spender.IsRejected() { lowestObservedState = acceptance.Rejected return spenddag.ErrExpected } - if spend.IsPending() { + if spender.IsPending() { lowestObservedState = acceptance.Pending } @@ -363,73 +363,73 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) AcceptanceState(spendIDs ds.Se return lowestObservedState } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) SetAccepted(spendID SpendID) { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SetAccepted(spenderID SpenderID) { c.mutex.RLock() defer c.mutex.RUnlock() - if spend, exists := c.spendsByID.Get(spendID); exists { - spend.setAcceptanceState(acceptance.Accepted) + if spender, exists := c.spendersByID.Get(spenderID); exists { + spender.setAcceptanceState(acceptance.Accepted) } } -// UnacceptedSpends takes a set of SpendIDs and removes all the accepted Spends (leaving only the +// UnacceptedSpends takes a set of SpenderIDs and removes all the accepted Spends (leaving only the // pending or rejected ones behind). -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) UnacceptedSpends(spendIDs ds.Set[SpendID]) ds.Set[SpendID] { - pendingSpendIDs := ds.NewSet[SpendID]() - spendIDs.Range(func(currentSpendID SpendID) { - if spend, exists := c.spendsByID.Get(currentSpendID); exists && !spend.IsAccepted() { - pendingSpendIDs.Add(currentSpendID) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) UnacceptedSpenders(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] { + pendingSpenderIDs := ds.NewSet[SpenderID]() + spenderIDs.Range(func(currentSpenderID SpenderID) { + if spender, exists := c.spendersByID.Get(currentSpenderID); exists && !spender.IsAccepted() { + pendingSpenderIDs.Add(currentSpenderID) } }) - return pendingSpendIDs + return pendingSpenderIDs } -// EvictSpend removes spend with given SpendID from spenddag. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) EvictSpend(spendID SpendID) { - for _, evictedSpendID := range func() []SpendID { +// EvictSpend removes spend with given SpenderID from spenddag. +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) EvictSpender(spenderID SpenderID) { + for _, evictedSpenderID := range func() []SpenderID { c.mutex.RLock() defer c.mutex.RUnlock() - return c.evictSpend(spendID) + return c.evictSpender(spenderID) }() { - c.events.SpendEvicted.Trigger(evictedSpendID) + c.events.SpenderEvicted.Trigger(evictedSpenderID) } } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) evictSpend(spendID SpendID) []SpendID { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) evictSpender(spenderID SpenderID) []SpenderID { // evicting an already evicted spend is fine - spend, exists := c.spendsByID.Get(spendID) + spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil } - evictedSpendIDs := spend.Evict() + evictedSpenderIDs := spender.Evict() - // remove the spends from the spenddag dictionary - for _, evictedSpendID := range evictedSpendIDs { - c.spendsByID.Delete(evictedSpendID) + // remove the spenders from the spenddag dictionary + for _, evictedSpenderID := range evictedSpenderIDs { + c.spendersByID.Delete(evictedSpenderID) } // unhook the spend events and remove the unhook method from the storage - unhookFunc, unhookExists := c.spendUnhooks.Get(spendID) + unhookFunc, unhookExists := c.spendUnhooks.Get(spenderID) if unhookExists { unhookFunc() - c.spendUnhooks.Delete(spendID) + c.spendUnhooks.Delete(spenderID) } - return evictedSpendIDs + return evictedSpenderIDs } -// spends returns the Spends that are associated with the given SpendIDs. If ignoreMissing is set to true, it -// will ignore missing Spends instead of returning an ErrEntityEvicted error. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spends(ids ds.Set[SpendID], ignoreMissing bool) (ds.Set[*Spend[SpendID, ResourceID, VoteRank]], error) { - spends := ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() +// spenders returns the Spenders that are associated with the given SpenderIDs. If ignoreMissing is set to true, it +// will ignore missing Spenders instead of returning an ErrEntityEvicted error. +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) spenders(ids ds.Set[SpenderID], ignoreMissing bool) (ds.Set[*Spender[SpenderID, ResourceID, VoteRank]], error) { + spenders := ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]]() - return spends, ids.ForEach(func(id SpendID) (err error) { - existingSpend, exists := c.spendsByID.Get(id) + return spenders, ids.ForEach(func(id SpenderID) (err error) { + existingSpend, exists := c.spendersByID.Get(id) if exists { - spends.Add(existingSpend) + spenders.Add(existingSpend) } return lo.Cond(exists || ignoreMissing, nil, ierrors.Errorf("tried to retrieve a non-existing spend with %s: %w", id, spenddag.ErrEntityEvicted)) @@ -438,8 +438,8 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spends(ids ds.Set[SpendID], ig // spendSets returns the SpendSets that are associated with the given ResourceIDs. If createMissing is set to // true, it will create an empty SpendSets for each missing ResourceID. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spendSets(resourceIDs ds.Set[ResourceID]) ds.Set[*SpendSet[SpendID, ResourceID, VoteRank]] { - spendSets := ds.NewSet[*SpendSet[SpendID, ResourceID, VoteRank]]() +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) spendSets(resourceIDs ds.Set[ResourceID]) ds.Set[*SpendSet[SpenderID, ResourceID, VoteRank]] { + spendSets := ds.NewSet[*SpendSet[SpenderID, ResourceID, VoteRank]]() resourceIDs.Range(func(resourceID ResourceID) { spendSets.Add(lo.Return1(c.spendSetsByID.GetOrCreate(resourceID, c.spendSetFactory(resourceID)))) @@ -448,55 +448,55 @@ func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spendSets(resourceIDs ds.Set[R return spendSets } -// determineVotes determines the Spends that are supported and revoked by the given SpendIDs. -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) determineVotes(spendIDs ds.Set[SpendID]) (supportedSpends ds.Set[*Spend[SpendID, ResourceID, VoteRank]], revokedSpends ds.Set[*Spend[SpendID, ResourceID, VoteRank]], err error) { - supportedSpends = ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() - revokedSpends = ds.NewSet[*Spend[SpendID, ResourceID, VoteRank]]() +// determineVotes determines the Spends that are supported and revoked by the given SpenderIDs. +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) determineVotes(spenderIDs ds.Set[SpenderID]) (supportedSpenders ds.Set[*Spender[SpenderID, ResourceID, VoteRank]], revokedSpenders ds.Set[*Spender[SpenderID, ResourceID, VoteRank]], err error) { + supportedSpenders = ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]]() + revokedSpenders = ds.NewSet[*Spender[SpenderID, ResourceID, VoteRank]]() - revokedWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]() - revokeSpend := func(revokedSpend *Spend[SpendID, ResourceID, VoteRank]) error { - if revokedSpends.Add(revokedSpend) { - if supportedSpends.Has(revokedSpend) { - return ierrors.Errorf("applied conflicting votes (%s is supported and revoked)", revokedSpend.ID) + revokedWalker := walker.New[*Spender[SpenderID, ResourceID, VoteRank]]() + revokeSpend := func(revokedSpender *Spender[SpenderID, ResourceID, VoteRank]) error { + if revokedSpenders.Add(revokedSpender) { + if supportedSpenders.Has(revokedSpender) { + return ierrors.Errorf("applied conflicting votes (%s is supported and revoked)", revokedSpender.ID) } - revokedWalker.PushAll(revokedSpend.Children.ToSlice()...) + revokedWalker.PushAll(revokedSpender.Children.ToSlice()...) } return nil } - supportedWalker := walker.New[*Spend[SpendID, ResourceID, VoteRank]]() - supportSpend := func(supportedSpend *Spend[SpendID, ResourceID, VoteRank]) error { - if supportedSpends.Add(supportedSpend) { - if err := supportedSpend.ConflictingSpends.ForEach(revokeSpend); err != nil { - return ierrors.Errorf("failed to collect conflicting spends: %w", err) + supportedWalker := walker.New[*Spender[SpenderID, ResourceID, VoteRank]]() + supportSpender := func(supportedSpender *Spender[SpenderID, ResourceID, VoteRank]) error { + if supportedSpenders.Add(supportedSpender) { + if err := supportedSpender.ConflictingSpenders.ForEach(revokeSpend); err != nil { + return ierrors.Errorf("failed to collect conflicting spenders: %w", err) } - supportedWalker.PushAll(supportedSpend.Parents.ToSlice()...) + supportedWalker.PushAll(supportedSpender.Parents.ToSlice()...) } return nil } - for supportedWalker.PushAll(lo.Return1(c.spends(spendIDs, true)).ToSlice()...); supportedWalker.HasNext(); { - if err := supportSpend(supportedWalker.Next()); err != nil { - return nil, nil, ierrors.Errorf("failed to collect supported spends: %w", err) + for supportedWalker.PushAll(lo.Return1(c.spenders(spenderIDs, true)).ToSlice()...); supportedWalker.HasNext(); { + if err := supportSpender(supportedWalker.Next()); err != nil { + return nil, nil, ierrors.Errorf("failed to collect supported spenders: %w", err) } } for revokedWalker.HasNext() { - if revokedSpend := revokedWalker.Next(); revokedSpends.Add(revokedSpend) { - revokedWalker.PushAll(revokedSpend.Children.ToSlice()...) + if revokedSpender := revokedWalker.Next(); revokedSpenders.Add(revokedSpender) { + revokedWalker.PushAll(revokedSpender.Children.ToSlice()...) } } - return supportedSpends, revokedSpends, nil + return supportedSpenders, revokedSpenders, nil } -func (c *SpendDAG[SpendID, ResourceID, VoteRank]) spendSetFactory(resourceID ResourceID) func() *SpendSet[SpendID, ResourceID, VoteRank] { - return func() *SpendSet[SpendID, ResourceID, VoteRank] { - spendSet := NewSpendSet[SpendID, ResourceID, VoteRank](resourceID) +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) spendSetFactory(resourceID ResourceID) func() *SpendSet[SpenderID, ResourceID, VoteRank] { + return func() *SpendSet[SpenderID, ResourceID, VoteRank] { + spendSet := NewSpendSet[SpenderID, ResourceID, VoteRank](resourceID) spendSet.OnAllMembersEvicted(func(prevValue bool, newValue bool) { if newValue && !prevValue { diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go index ba9fba66b..47e8302a3 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go @@ -53,13 +53,13 @@ func TestMemoryRelease(t *testing.T) { //t.Skip("skip memory test as for some reason it's failing") tf := newTestFramework(t) - createSpendSets := func(startSlot, spendSetCount, evictionDelay, spendsInSpendSet int, prevSpendSetAlias string) (int, string) { + createSpendSets := func(startSlot, spendSetCount, evictionDelay, spendersInSpendSet int, prevSpendSetAlias string) (int, string) { slot := startSlot for ; slot < startSlot+spendSetCount; slot++ { spendSetAlias := fmt.Sprintf("spendSet-%d", slot) - for conflictIndex := 0; conflictIndex < spendsInSpendSet; conflictIndex++ { + for conflictIndex := 0; conflictIndex < spendersInSpendSet; conflictIndex++ { conflictAlias := fmt.Sprintf("spendSet-%d:%d", slot, conflictIndex) - require.NoError(t, tf.CreateOrUpdateSpend(conflictAlias, []string{spendSetAlias})) + require.NoError(t, tf.CreateOrUpdateSpender(conflictAlias, []string{spendSetAlias})) if prevSpendSetAlias != "" { require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevSpendSetAlias, 0)}, []string{})) } @@ -67,9 +67,9 @@ func TestMemoryRelease(t *testing.T) { prevSpendSetAlias = spendSetAlias if slotToEvict := slot - evictionDelay; slotToEvict >= 0 { - for conflictIndex := 0; conflictIndex < spendsInSpendSet; conflictIndex++ { + for conflictIndex := 0; conflictIndex < spendersInSpendSet; conflictIndex++ { conflictAlias := fmt.Sprintf("spendSet-%d:%d", slotToEvict, conflictIndex) - tf.EvictSpend(conflictAlias) + tf.EvictSpender(conflictAlias) } } } @@ -78,8 +78,8 @@ func TestMemoryRelease(t *testing.T) { } _, prevAlias := createSpendSets(0, 30000, 1, 2, "") - tf.Instance.EvictSpend(tf.SpendID(prevAlias + ":0")) - tf.Instance.EvictSpend(tf.SpendID(prevAlias + ":1")) + tf.Instance.EvictSpender(tf.SpenderID(prevAlias + ":0")) + tf.Instance.EvictSpender(tf.SpenderID(prevAlias + ":1")) iotago.UnregisterIdentifierAliases() @@ -88,8 +88,8 @@ func TestMemoryRelease(t *testing.T) { memStatsStart := memanalyzer.MemSize(tf) _, alias := createSpendSets(0, 30000, 1, 2, "") - tf.Instance.EvictSpend(tf.SpendID(alias + ":0")) - tf.Instance.EvictSpend(tf.SpendID(alias + ":1")) + tf.Instance.EvictSpender(tf.SpenderID(alias + ":0")) + tf.Instance.EvictSpender(tf.SpenderID(alias + ":1")) tf.Instance.Shutdown() @@ -98,7 +98,7 @@ func TestMemoryRelease(t *testing.T) { time.Sleep(time.Second) require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendSetsByID.Size()) - require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendsByID.Size()) + require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendersByID.Size()) require.Equal(t, 0, tf.Instance.(*SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]).spendUnhooks.Size()) memStatsEnd := memanalyzer.MemSize(tf) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go index be84ad572..0024e5e74 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/utils.go @@ -6,12 +6,12 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/spenddag" ) -// heaviestSpend returns the largest Spend from the given Spends. -func heaviestSpend[SpendID, ResourceID spenddag.IDType, VoterPower spenddag.VoteRankType[VoterPower]](spends ds.Set[*Spend[SpendID, ResourceID, VoterPower]]) *Spend[SpendID, ResourceID, VoterPower] { - var result *Spend[SpendID, ResourceID, VoterPower] - spends.Range(func(spend *Spend[SpendID, ResourceID, VoterPower]) { - if spend.Compare(result) == weight.Heavier { - result = spend +// heaviestSpender returns the heaviest Spender from the given set of Spenders. +func heaviestSpender[SpenderID, ResourceID spenddag.IDType, VoterPower spenddag.VoteRankType[VoterPower]](spenders ds.Set[*Spender[SpenderID, ResourceID, VoterPower]]) *Spender[SpenderID, ResourceID, VoterPower] { + var result *Spender[SpenderID, ResourceID, VoterPower] + spenders.Range(func(spender *Spender[SpenderID, ResourceID, VoterPower]) { + if spender.Compare(result) == weight.Heavier { + result = spender } }) diff --git a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go index 18893d671..6c48bb098 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -11,31 +11,31 @@ type Assertions struct { // Children asserts that the given spend has the given children. func (a *Assertions) Children(spendAlias string, childAliases ...string) { - childIDs, exists := a.f.Instance.SpendChildren(a.f.SpendID(spendAlias)) + childIDs, exists := a.f.Instance.SpendChildren(a.f.SpenderID(spendAlias)) require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Spend %s has wrong number of children", spendAlias) for _, childAlias := range childAliases { - require.True(a.f.test, childIDs.Has(a.f.SpendID(childAlias)), "Spend %s does not have child %s", spendAlias, childAlias) + require.True(a.f.test, childIDs.Has(a.f.SpenderID(childAlias)), "Spend %s does not have child %s", spendAlias, childAlias) } } // Parents asserts that the given spend has the given parents. func (a *Assertions) Parents(spendAlias string, parentAliases ...string) { - parents, exists := a.f.Instance.SpendParents(a.f.SpendID(spendAlias)) + parents, exists := a.f.Instance.SpendParents(a.f.SpenderID(spendAlias)) require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) require.Equal(a.f.test, len(parentAliases), parents.Size(), "Spend %s has wrong number of parents", spendAlias) for _, parentAlias := range parentAliases { - require.True(a.f.test, parents.Has(a.f.SpendID(parentAlias)), "Spend %s does not have parent %s", spendAlias, parentAlias) + require.True(a.f.test, parents.Has(a.f.SpenderID(parentAlias)), "Spend %s does not have parent %s", spendAlias, parentAlias) } } -// LikedInstead asserts that the given spends return the given LikedInstead spends. +// LikedInstead asserts that the given spenders return the given LikedInstead spenders. func (a *Assertions) LikedInstead(spendAliases []string, likedInsteadAliases ...string) { - likedInsteadSpends := a.f.LikedInstead(spendAliases...) + likedInsteadSpenders := a.f.LikedInstead(spendAliases...) - require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadSpends.Size(), "LikedInstead returns wrong number of spends %d instead of %d", likedInsteadSpends.Size(), len(likedInsteadAliases)) + require.Equal(a.f.test, len(likedInsteadAliases), likedInsteadSpenders.Size(), "LikedInstead returns wrong number of spenders %d instead of %d", likedInsteadSpenders.Size(), len(likedInsteadAliases)) } // SpendSetMembers asserts that the given resource has the given spend set members. @@ -45,43 +45,43 @@ func (a *Assertions) SpendSetMembers(resourceAlias string, spendAliases ...strin require.Equal(a.f.test, len(spendAliases), spendSetMembers.Size(), "Resource %s has wrong number of parents", resourceAlias) for _, spendAlias := range spendAliases { - require.True(a.f.test, spendSetMembers.Has(a.f.SpendID(spendAlias)), "Resource %s does not have parent %s", resourceAlias, spendAlias) + require.True(a.f.test, spendSetMembers.Has(a.f.SpenderID(spendAlias)), "Resource %s does not have parent %s", resourceAlias, spendAlias) } } -// SpendSets asserts that the given spend has the given conflict sets. -func (a *Assertions) SpendSets(spendAlias string, resourceAliases ...string) { - spendSets, exists := a.f.Instance.SpendSets(a.f.SpendID(spendAlias)) - require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) +// SpendSets asserts that the given spender has the given conflict sets. +func (a *Assertions) SpendSets(spenderAlias string, resourceAliases ...string) { + spendSets, exists := a.f.Instance.SpendSets(a.f.SpenderID(spenderAlias)) + require.True(a.f.test, exists, "Spender %s does not exist", spenderAlias) - require.Equal(a.f.test, len(resourceAliases), spendSets.Size(), "Spend %s has wrong number of conflict sets", spendAlias) + require.Equal(a.f.test, len(resourceAliases), spendSets.Size(), "Spender %s has wrong number of conflict sets", spenderAlias) for _, resourceAlias := range resourceAliases { - require.True(a.f.test, spendSets.Has(a.f.ResourceID(resourceAlias)), "Spend %s does not have conflict set %s", spendAlias, resourceAlias) + require.True(a.f.test, spendSets.Has(a.f.ResourceID(resourceAlias)), "Spender %s does not have conflict set %s", spenderAlias, resourceAlias) } } -// Pending asserts that the given spends are pending. +// Pending asserts that the given spenders are pending. func (a *Assertions) Pending(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsPending(), "Spend %s is not pending", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpenderIDs(alias)).IsPending(), "Spender %s is not pending", alias) } } -// Accepted asserts that the given spends are accepted. +// Accepted asserts that the given spenders are accepted. func (a *Assertions) Accepted(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsAccepted(), "Spend %s is not accepted", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpenderIDs(alias)).IsAccepted(), "Spender %s is not accepted", alias) } } -// Rejected asserts that the given spends are rejected. +// Rejected asserts that the given spenders are rejected. func (a *Assertions) Rejected(aliases ...string) { for _, alias := range aliases { - require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpendIDs(alias)).IsRejected(), "Spend %s is not rejected", alias) + require.True(a.f.test, a.f.Instance.AcceptanceState(a.f.SpenderIDs(alias)).IsRejected(), "Spender %s is not rejected", alias) } } // ValidatorWeight asserts that the given spend has the given validator weight. func (a *Assertions) ValidatorWeight(spendAlias string, weight int64) { - require.Equal(a.f.test, weight, a.f.Instance.SpendWeight(a.f.SpendID(spendAlias)), "ValidatorWeight is %s instead of % for spend %s", a.f.Instance.SpendWeight(a.f.SpendID(spendAlias)), weight, spendAlias) + require.Equal(a.f.test, weight, a.f.Instance.SpendWeight(a.f.SpenderID(spendAlias)), "ValidatorWeight is %s instead of % for spender %s", a.f.Instance.SpendWeight(a.f.SpenderID(spendAlias)), weight, spendAlias) } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go index 2a59a2887..8d2ab97f9 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -22,8 +22,8 @@ type Framework struct { // Assert provides a set of assertions that can be used to verify the state of the SpendDAG. Assert *Assertions - // SpendID is a function that is used to translate a string alias into a (deterministic) iotago.TransactionID. - SpendID func(string) iotago.TransactionID + // SpenderID is a function that is used to translate a string alias into a (deterministic) iotago.TransactionID. + SpenderID func(string) iotago.TransactionID // ResourceID is a function that is used to translate a string alias into a (deterministic) iotago.OutputID. ResourceID func(string) iotago.OutputID @@ -37,13 +37,13 @@ func NewFramework( t *testing.T, spendDAG spenddag.SpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank], validators *AccountsTestFramework, - spendID func(string) iotago.TransactionID, + spenderID func(string) iotago.TransactionID, resourceID func(string) iotago.OutputID, ) *Framework { f := &Framework{ Instance: spendDAG, Accounts: validators, - SpendID: spendID, + SpenderID: spenderID, ResourceID: resourceID, test: t, } @@ -53,22 +53,22 @@ func NewFramework( } // CreateOrUpdateSpend creates a new spend or adds it to the given SpendSets. -func (f *Framework) CreateOrUpdateSpend(alias string, resourceAliases []string) error { - f.Instance.CreateSpend(f.SpendID(alias)) - return f.Instance.UpdateConflictingResources(f.SpendID(alias), f.SpendSetIDs(resourceAliases...)) +func (f *Framework) CreateOrUpdateSpender(alias string, resourceAliases []string) error { + f.Instance.CreateSpender(f.SpenderID(alias)) + return f.Instance.UpdateSpentResources(f.SpenderID(alias), f.SpendSetIDs(resourceAliases...)) } // UpdateConflictParents updates the parents of the spend with the given alias. func (f *Framework) UpdateSpendParents(spendAlias string, addedParentIDs []string, removedParentIDs []string) error { - return f.Instance.UpdateSpendParents(f.SpendID(spendAlias), f.SpendIDs(addedParentIDs...), f.SpendIDs(removedParentIDs...)) + return f.Instance.UpdateSpendParents(f.SpenderID(spendAlias), f.SpenderIDs(addedParentIDs...), f.SpenderIDs(removedParentIDs...)) } -// LikedInstead returns the set of spends that are liked instead of the given spends. +// LikedInstead returns the set of spenders that are liked instead of the given spenders. func (f *Framework) LikedInstead(spendAliases ...string) ds.Set[iotago.TransactionID] { var result ds.Set[iotago.TransactionID] _ = f.Instance.ReadConsistent(func(spendDAG spenddag.ReadLockedSpendDAG[iotago.TransactionID, iotago.OutputID, vote.MockedRank]) error { - result = spendDAG.LikedInstead(f.SpendIDs(spendAliases...)) + result = spendDAG.LikedInstead(f.SpenderIDs(spendAliases...)) return nil }) @@ -76,29 +76,29 @@ func (f *Framework) LikedInstead(spendAliases ...string) ds.Set[iotago.Transacti return result } -// CastVotes casts the given votes for the given spends. -func (f *Framework) CastVotes(nodeAlias string, voteRank int, spendAliases ...string) error { +// CastVotes casts the given votes for the given spenders. +func (f *Framework) CastVotes(nodeAlias string, voteRank int, spenderAliases ...string) error { seat, exists := f.Accounts.Get(nodeAlias) if !exists { return ierrors.Errorf("node with alias '%s' does not have a seat in the committee", nodeAlias) } - return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpendIDs(spendAliases...)) + return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpenderIDs(spenderAliases...)) } // EvictSpend evicts given spend from the SpendDAG. -func (f *Framework) EvictSpend(spendAlias string) { - f.Instance.EvictSpend(f.SpendID(spendAlias)) +func (f *Framework) EvictSpender(spendAlias string) { + f.Instance.EvictSpender(f.SpenderID(spendAlias)) } -// SpendIDs translates the given aliases into an AdvancedSet of iotago.TransactionIDs. -func (f *Framework) SpendIDs(aliases ...string) ds.Set[iotago.TransactionID] { - spendIDs := ds.NewSet[iotago.TransactionID]() +// SpenderIDs translates the given aliases into an AdvancedSet of iotago.TransactionIDs. +func (f *Framework) SpenderIDs(aliases ...string) ds.Set[iotago.TransactionID] { + spenderIDs := ds.NewSet[iotago.TransactionID]() for _, alias := range aliases { - spendIDs.Add(f.SpendID(alias)) + spenderIDs.Add(f.SpenderID(alias)) } - return spendIDs + return spenderIDs } // SpendSetIDs translates the given aliases into an AdvancedSet of iotago.OutputIDs. diff --git a/pkg/protocol/engine/mempool/spenddag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go index 258f0c565..69c1de436 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -14,7 +14,7 @@ import ( func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { for testName, testCase := range map[string]func(*testing.T, *Framework){ - "CreateSpend": CreateSpend, + "CreateSpender": CreateSpender, "ExistingSpendJoinsSpendSets": ExistingSpendJoinsSpendSets, "JoinSpendSetTwice": JoinSpendSetTwice, "UpdateSpendParents": UpdateSpendParents, @@ -24,71 +24,71 @@ func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { "CastVotes": CastVotes, "CastVotes_VoteRank": CastVotesVoteRank, "CastVotesAcceptance": CastVotesAcceptance, - "EvictAcceptedSpend": EvictAcceptedSpend, - "EvictRejectedSpend": EvictRejectedSpend, + "EvictAcceptedSpender": EvictAcceptedSpender, + "EvictRejectedSpender": EvictRejectedSpender, } { t.Run(testName, func(t *testing.T) { testCase(t, frameworkProvider(t)) }) } } func ExistingSpendJoinsSpendSets(t *testing.T, tf *Framework) { - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource2"})) - tf.Assert.SpendSetMembers("resource2", "conflict1", "conflict3") - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource2", "spender1", "spender3") + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource2"})) - tf.Assert.SpendSetMembers("resource2", "conflict1", "conflict2", "conflict3") - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") + tf.Assert.SpendSetMembers("resource2", "spender1", "spender2", "spender3") + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") - tf.Assert.LikedInstead([]string{"conflict3"}, "conflict1") + tf.Assert.LikedInstead([]string{"spender3"}, "spender1") } func UpdateSpendParents(t *testing.T, tf *Framework) { - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) - - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource1", "resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1", "conflict2"}, []string{})) - tf.Assert.Children("conflict1", "conflict3") - tf.Assert.Parents("conflict3", "conflict1", "conflict2") - - require.NoError(t, tf.CreateOrUpdateSpend("conflict2.5", []string{"conflict2.5"})) - require.NoError(t, tf.UpdateSpendParents("conflict2.5", []string{"conflict1", "conflict2"}, []string{})) - tf.Assert.Children("conflict1", "conflict2.5", "conflict3") - tf.Assert.Children("conflict2", "conflict2.5", "conflict3") - tf.Assert.Parents("conflict2.5", "conflict1", "conflict2") - - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict2.5"}, []string{"conflict1", "conflict2"})) - - tf.Assert.Children("conflict1", "conflict2.5") - tf.Assert.Children("conflict2", "conflict2.5") - tf.Assert.Children("conflict2.5", "conflict3") - tf.Assert.Parents("conflict3", "conflict2.5") - tf.Assert.Parents("conflict2.5", "conflict1", "conflict2") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource2"})) + + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource1", "resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1", "spender2"}, []string{})) + tf.Assert.Children("spender1", "spender3") + tf.Assert.Parents("spender3", "spender1", "spender2") + + require.NoError(t, tf.CreateOrUpdateSpender("spender2.5", []string{"spender2.5"})) + require.NoError(t, tf.UpdateSpendParents("spender2.5", []string{"spender1", "spender2"}, []string{})) + tf.Assert.Children("spender1", "spender2.5", "spender3") + tf.Assert.Children("spender2", "spender2.5", "spender3") + tf.Assert.Parents("spender2.5", "spender1", "spender2") + + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender2.5"}, []string{"spender1", "spender2"})) + + tf.Assert.Children("spender1", "spender2.5") + tf.Assert.Children("spender2", "spender2.5") + tf.Assert.Children("spender2.5", "spender3") + tf.Assert.Parents("spender3", "spender2.5") + tf.Assert.Parents("spender2.5", "spender1", "spender2") } -func CreateSpend(t *testing.T, tf *Framework) { - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") +func CreateSpender(t *testing.T, tf *Framework) { + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") } func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { @@ -99,56 +99,56 @@ func CreateSpendWithoutMembers(t *testing.T, tf *Framework) { // Non-conflicting conflicts { - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource2"})) - tf.Assert.SpendSetMembers("resource1", "conflict1") - tf.Assert.SpendSetMembers("resource2", "conflict2") + tf.Assert.SpendSetMembers("resource1", "spender1") + tf.Assert.SpendSetMembers("resource2", "spender2") - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.LikedInstead([]string{"conflict2"}) + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.LikedInstead([]string{"spender2"}) - require.NoError(t, tf.CastVotes("nodeID1", 1, "conflict1")) - require.NoError(t, tf.CastVotes("nodeID2", 1, "conflict1")) - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict1")) + require.NoError(t, tf.CastVotes("nodeID1", 1, "spender1")) + require.NoError(t, tf.CastVotes("nodeID2", 1, "spender1")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender1")) - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.Accepted("conflict1") + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.Accepted("spender1") } // Regular conflict { - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource3"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource3"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource3"})) - tf.Assert.SpendSetMembers("resource3", "conflict3", "conflict4") + tf.Assert.SpendSetMembers("resource3", "spender3", "spender4") - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict3")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender3")) - tf.Assert.LikedInstead([]string{"conflict3"}) - tf.Assert.LikedInstead([]string{"conflict4"}, "conflict3") + tf.Assert.LikedInstead([]string{"spender3"}) + tf.Assert.LikedInstead([]string{"spender4"}, "spender3") } - tf.Assert.LikedInstead([]string{"conflict1", "conflict4"}, "conflict3") + tf.Assert.LikedInstead([]string{"spender1", "spender4"}, "spender3") } func LikedInstead(t *testing.T, tf *Framework) { tf.Accounts.CreateID("zero-weight") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CastVotes("zero-weight", 1, "conflict1")) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.LikedInstead([]string{"conflict1", "conflict2"}, "conflict1") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CastVotes("zero-weight", 1, "spender1")) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.LikedInstead([]string{"spender1", "spender2"}, "spender1") - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) - require.NoError(t, tf.CastVotes("zero-weight", 1, "conflict4")) - tf.Assert.LikedInstead([]string{"conflict1", "conflict2", "conflict3", "conflict4"}, "conflict1", "conflict4") + require.NoError(t, tf.CastVotes("zero-weight", 1, "spender4")) + tf.Assert.LikedInstead([]string{"spender1", "spender2", "spender3", "spender4"}, "spender1", "spender4") } func SpendAcceptance(t *testing.T, tf *Framework) { @@ -157,33 +157,33 @@ func SpendAcceptance(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.SpendSets("conflict1", "resource1") - tf.Assert.SpendSets("conflict2", "resource1") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.SpendSets("spender1", "resource1") + tf.Assert.SpendSets("spender2", "resource1") - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") - require.NoError(t, tf.CastVotes("nodeID1", 1, "conflict4")) - require.NoError(t, tf.CastVotes("nodeID2", 1, "conflict4")) - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict4")) + require.NoError(t, tf.CastVotes("nodeID1", 1, "spender4")) + require.NoError(t, tf.CastVotes("nodeID2", 1, "spender4")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender4")) - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.LikedInstead([]string{"conflict2"}, "conflict1") - tf.Assert.LikedInstead([]string{"conflict3"}, "conflict4") - tf.Assert.LikedInstead([]string{"conflict4"}) + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.LikedInstead([]string{"spender2"}, "spender1") + tf.Assert.LikedInstead([]string{"spender3"}, "spender4") + tf.Assert.LikedInstead([]string{"spender4"}) - tf.Assert.Accepted("conflict1", "conflict4") + tf.Assert.Accepted("spender1", "spender4") } func CastVotes(t *testing.T, tf *Framework) { @@ -192,34 +192,34 @@ func CastVotes(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.SpendSets("conflict1", "resource1") - tf.Assert.SpendSets("conflict2", "resource1") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.SpendSets("spender1", "resource1") + tf.Assert.SpendSets("spender2", "resource1") - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") - require.NoError(t, tf.CastVotes("nodeID1", 1, "conflict2")) - require.NoError(t, tf.CastVotes("nodeID2", 1, "conflict2")) - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict2")) - tf.Assert.LikedInstead([]string{"conflict1"}, "conflict2") + require.NoError(t, tf.CastVotes("nodeID1", 1, "spender2")) + require.NoError(t, tf.CastVotes("nodeID2", 1, "spender2")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender2")) + tf.Assert.LikedInstead([]string{"spender1"}, "spender2") - tf.Assert.Accepted("conflict2") - tf.Assert.Rejected("conflict1") - tf.Assert.Rejected("conflict3") - tf.Assert.Rejected("conflict4") + tf.Assert.Accepted("spender2") + tf.Assert.Rejected("spender1") + tf.Assert.Rejected("spender3") + tf.Assert.Rejected("spender4") - require.Error(t, tf.CastVotes("nodeID3", 1, "conflict1", "conflict2")) + require.Error(t, tf.CastVotes("nodeID3", 1, "spender1", "spender2")) } func CastVotesVoteRank(t *testing.T, tf *Framework) { @@ -227,52 +227,52 @@ func CastVotesVoteRank(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID2") tf.Accounts.CreateID("nodeID3") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.SpendSets("conflict1", "resource1") - tf.Assert.SpendSets("conflict2", "resource1") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.SpendSets("spender1", "resource1") + tf.Assert.SpendSets("spender2", "resource1") // create nested conflicts - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") // casting a vote from a validator updates the validator weight - require.NoError(t, tf.CastVotes("nodeID1", 2, "conflict4")) - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.LikedInstead([]string{"conflict2"}, "conflict1") - tf.Assert.LikedInstead([]string{"conflict3"}, "conflict4") - tf.Assert.LikedInstead([]string{"conflict4"}) + require.NoError(t, tf.CastVotes("nodeID1", 2, "spender4")) + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.LikedInstead([]string{"spender2"}, "spender1") + tf.Assert.LikedInstead([]string{"spender3"}, "spender4") + tf.Assert.LikedInstead([]string{"spender4"}) // casting vote with lower vote power doesn't change the weights of conflicts - require.NoError(t, tf.CastVotes("nodeID1", 1), "conflict3") - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.LikedInstead([]string{"conflict2"}, "conflict1") - tf.Assert.LikedInstead([]string{"conflict3"}, "conflict4") - tf.Assert.LikedInstead([]string{"conflict4"}) - tf.Assert.ValidatorWeight("conflict1", 1) - tf.Assert.ValidatorWeight("conflict2", 0) - tf.Assert.ValidatorWeight("conflict3", 0) - tf.Assert.ValidatorWeight("conflict4", 1) + require.NoError(t, tf.CastVotes("nodeID1", 1), "spender3") + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.LikedInstead([]string{"spender2"}, "spender1") + tf.Assert.LikedInstead([]string{"spender3"}, "spender4") + tf.Assert.LikedInstead([]string{"spender4"}) + tf.Assert.ValidatorWeight("spender1", 1) + tf.Assert.ValidatorWeight("spender2", 0) + tf.Assert.ValidatorWeight("spender3", 0) + tf.Assert.ValidatorWeight("spender4", 1) // casting vote with higher vote power changes the weights of conflicts - require.NoError(t, tf.CastVotes("nodeID1", 3, "conflict3")) - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.LikedInstead([]string{"conflict2"}, "conflict1") - tf.Assert.LikedInstead([]string{"conflict3"}) - tf.Assert.LikedInstead([]string{"conflict4"}, "conflict3") - tf.Assert.ValidatorWeight("conflict1", 1) - tf.Assert.ValidatorWeight("conflict2", 0) - tf.Assert.ValidatorWeight("conflict3", 1) - tf.Assert.ValidatorWeight("conflict4", 0) + require.NoError(t, tf.CastVotes("nodeID1", 3, "spender3")) + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.LikedInstead([]string{"spender2"}, "spender1") + tf.Assert.LikedInstead([]string{"spender3"}) + tf.Assert.LikedInstead([]string{"spender4"}, "spender3") + tf.Assert.ValidatorWeight("spender1", 1) + tf.Assert.ValidatorWeight("spender2", 0) + tf.Assert.ValidatorWeight("spender3", 1) + tf.Assert.ValidatorWeight("spender4", 0) } func CastVotesAcceptance(t *testing.T, tf *Framework) { @@ -281,142 +281,142 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.SpendSets("conflict1", "resource1") - tf.Assert.SpendSets("conflict2", "resource1") + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.SpendSets("spender1", "resource1") + tf.Assert.SpendSets("spender2", "resource1") - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") - require.NoError(t, tf.CastVotes("nodeID1", 1, "conflict3")) - require.NoError(t, tf.CastVotes("nodeID2", 1, "conflict3")) - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict3")) - tf.Assert.LikedInstead([]string{"conflict1"}) - tf.Assert.Accepted("conflict1") - tf.Assert.Rejected("conflict2") - tf.Assert.Accepted("conflict3") - tf.Assert.Rejected("conflict4") + require.NoError(t, tf.CastVotes("nodeID1", 1, "spender3")) + require.NoError(t, tf.CastVotes("nodeID2", 1, "spender3")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender3")) + tf.Assert.LikedInstead([]string{"spender1"}) + tf.Assert.Accepted("spender1") + tf.Assert.Rejected("spender2") + tf.Assert.Accepted("spender3") + tf.Assert.Rejected("spender4") - require.NoError(t, tf.CreateOrUpdateSpend("conflict5", []string{"resource1"})) - tf.Assert.Rejected("conflict5") + require.NoError(t, tf.CreateOrUpdateSpender("spender5", []string{"resource1"})) + tf.Assert.Rejected("spender5") // Evict conflict and try to add non-existing parent to a rejected conflict - update is ignored because the parent is evicted. - tf.EvictSpend("conflict2") - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict2"}, []string{})) - parents, exists := tf.Instance.SpendParents(tf.SpendID("conflict4")) + tf.EvictSpender("spender2") + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender2"}, []string{})) + parents, exists := tf.Instance.SpendParents(tf.SpenderID("spender4")) require.True(t, exists) - require.False(t, parents.Has(tf.SpendID("conflict2"))) + require.False(t, parents.Has(tf.SpenderID("spender2"))) // Try to update parents of evicted conflict. - require.ErrorIs(t, tf.UpdateSpendParents("conflict2", []string{"conflict1"}, []string{}), spenddag.ErrEntityEvicted) + require.ErrorIs(t, tf.UpdateSpendParents("spender2", []string{"spender1"}, []string{}), spenddag.ErrEntityEvicted) } func JoinSpendSetTwice(t *testing.T, tf *Framework) { var conflictCreatedEventCount, resourceAddedEventCount int - tf.Instance.Events().SpendCreated.Hook(func(id iotago.TransactionID) { + tf.Instance.Events().SpenderCreated.Hook(func(id iotago.TransactionID) { conflictCreatedEventCount++ }) - tf.Instance.Events().ConflictingResourcesAdded.Hook(func(id iotago.TransactionID, resourceID ds.Set[iotago.OutputID]) { - fmt.Println("conflict joins spendset", id, resourceID) + tf.Instance.Events().SpentResourcesAdded.Hook(func(id iotago.TransactionID, resourceID ds.Set[iotago.OutputID]) { + fmt.Println("spender joins spendset", id, resourceID) resourceAddedEventCount++ }) - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 1, resourceAddedEventCount) - tf.Assert.SpendSets("conflict1", "resource1") + tf.Assert.SpendSets("spender1", "resource1") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource2"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource2"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 2, resourceAddedEventCount) - tf.Assert.SpendSets("conflict1", "resource1", "resource2") + tf.Assert.SpendSets("spender1", "resource1", "resource2") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1", "resource2"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1", "resource2"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 2, resourceAddedEventCount) - tf.Assert.SpendSets("conflict1", "resource1", "resource2") + tf.Assert.SpendSets("spender1", "resource1", "resource2") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1", "resource2", "resource3", "resource4"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1", "resource2", "resource3", "resource4"})) require.Equal(t, 1, conflictCreatedEventCount) require.Equal(t, 3, resourceAddedEventCount) - tf.Assert.SpendSets("conflict1", "resource1", "resource2", "resource3", "resource4") + tf.Assert.SpendSets("spender1", "resource1", "resource2", "resource3", "resource4") } -func EvictAcceptedSpend(t *testing.T, tf *Framework) { +func EvictAcceptedSpender(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID1") tf.Accounts.CreateID("nodeID2") tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.SpendSets("conflict1", "resource1") - tf.Assert.SpendSets("conflict2", "resource1") - - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") - - require.NoError(t, tf.CreateOrUpdateSpend("conflict5", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict2"}, []string{})) - - require.NoError(t, tf.CreateOrUpdateSpend("conflict6", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) - - tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") - tf.Assert.Children("conflict2", "conflict5", "conflict6") - tf.Assert.Parents("conflict5", "conflict2") - tf.Assert.Parents("conflict6", "conflict2") - - require.NoError(t, tf.CastVotes("nodeID1", 1, "conflict2")) - require.NoError(t, tf.CastVotes("nodeID2", 1, "conflict2")) - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict2")) - tf.Assert.LikedInstead([]string{"conflict1"}, "conflict2") - - tf.Assert.Accepted("conflict2") - tf.Assert.Rejected("conflict1") - tf.Assert.Rejected("conflict3") - tf.Assert.Rejected("conflict4") - tf.Assert.Pending("conflict5", "conflict6") - - tf.EvictSpend("conflict2") - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict1")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict2")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict3")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict4")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.SpendSets("spender1", "resource1") + tf.Assert.SpendSets("spender2", "resource1") + + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") + + require.NoError(t, tf.CreateOrUpdateSpender("spender5", []string{"resource3"})) + require.NoError(t, tf.UpdateSpendParents("spender5", []string{"spender2"}, []string{})) + + require.NoError(t, tf.CreateOrUpdateSpender("spender6", []string{"resource3"})) + require.NoError(t, tf.UpdateSpendParents("spender6", []string{"spender2"}, []string{})) + + tf.Assert.SpendSetMembers("resource3", "spender5", "spender6") + tf.Assert.Children("spender2", "spender5", "spender6") + tf.Assert.Parents("spender5", "spender2") + tf.Assert.Parents("spender6", "spender2") + + require.NoError(t, tf.CastVotes("nodeID1", 1, "spender2")) + require.NoError(t, tf.CastVotes("nodeID2", 1, "spender2")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender2")) + tf.Assert.LikedInstead([]string{"spender1"}, "spender2") + + tf.Assert.Accepted("spender2") + tf.Assert.Rejected("spender1") + tf.Assert.Rejected("spender3") + tf.Assert.Rejected("spender4") + tf.Assert.Pending("spender5", "spender6") + + tf.EvictSpender("spender2") + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender1")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender2")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender3")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender4")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender5")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender6")))) require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource1")))) require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource2")))) - tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") + tf.Assert.SpendSetMembers("resource3", "spender5", "spender6") - tf.Assert.Parents("conflict5") - tf.Assert.Parents("conflict6") + tf.Assert.Parents("spender5") + tf.Assert.Parents("spender6") } -func EvictRejectedSpend(t *testing.T, tf *Framework) { +func EvictRejectedSpender(t *testing.T, tf *Framework) { conflictEvictedEventCount := 0 - tf.Instance.Events().SpendEvicted.Hook(func(id iotago.TransactionID) { + tf.Instance.Events().SpenderEvicted.Hook(func(id iotago.TransactionID) { conflictEvictedEventCount++ }) @@ -425,82 +425,82 @@ func EvictRejectedSpend(t *testing.T, tf *Framework) { tf.Accounts.CreateID("nodeID3") tf.Accounts.CreateID("nodeID4") - require.NoError(t, tf.CreateOrUpdateSpend("conflict1", []string{"resource1"})) - require.NoError(t, tf.CreateOrUpdateSpend("conflict2", []string{"resource1"})) - tf.Assert.SpendSetMembers("resource1", "conflict1", "conflict2") - tf.Assert.SpendSets("conflict1", "resource1") - tf.Assert.SpendSets("conflict2", "resource1") - - require.NoError(t, tf.CreateOrUpdateSpend("conflict3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict3", []string{"conflict1"}, []string{})) - - require.NoError(t, tf.CreateOrUpdateSpend("conflict4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("conflict4", []string{"conflict1"}, []string{})) - - tf.Assert.SpendSetMembers("resource2", "conflict3", "conflict4") - tf.Assert.Children("conflict1", "conflict3", "conflict4") - tf.Assert.Parents("conflict3", "conflict1") - tf.Assert.Parents("conflict4", "conflict1") - - require.NoError(t, tf.CreateOrUpdateSpend("conflict5", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict2"}, []string{})) - - require.NoError(t, tf.CreateOrUpdateSpend("conflict6", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("conflict6", []string{"conflict2"}, []string{})) - - tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") - tf.Assert.Children("conflict2", "conflict5", "conflict6") - tf.Assert.Parents("conflict5", "conflict2") - tf.Assert.Parents("conflict6", "conflict2") - - require.NoError(t, tf.CastVotes("nodeID1", 1, "conflict2")) - require.NoError(t, tf.CastVotes("nodeID2", 1, "conflict2")) - require.NoError(t, tf.CastVotes("nodeID3", 1, "conflict2")) - tf.Assert.LikedInstead([]string{"conflict1"}, "conflict2") - - tf.Assert.Rejected("conflict1") - tf.Assert.Accepted("conflict2") - tf.Assert.Rejected("conflict3") - tf.Assert.Rejected("conflict4") - tf.Assert.Pending("conflict5", "conflict6") - - tf.EvictSpend("conflict1") - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict1")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict2")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict3")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict4")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) + require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) + require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) + tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") + tf.Assert.SpendSets("spender1", "resource1") + tf.Assert.SpendSets("spender2", "resource1") + + require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + + require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) + require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + + tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") + tf.Assert.Children("spender1", "spender3", "spender4") + tf.Assert.Parents("spender3", "spender1") + tf.Assert.Parents("spender4", "spender1") + + require.NoError(t, tf.CreateOrUpdateSpender("spender5", []string{"resource3"})) + require.NoError(t, tf.UpdateSpendParents("spender5", []string{"spender2"}, []string{})) + + require.NoError(t, tf.CreateOrUpdateSpender("spender6", []string{"resource3"})) + require.NoError(t, tf.UpdateSpendParents("spender6", []string{"spender2"}, []string{})) + + tf.Assert.SpendSetMembers("resource3", "spender5", "spender6") + tf.Assert.Children("spender2", "spender5", "spender6") + tf.Assert.Parents("spender5", "spender2") + tf.Assert.Parents("spender6", "spender2") + + require.NoError(t, tf.CastVotes("nodeID1", 1, "spender2")) + require.NoError(t, tf.CastVotes("nodeID2", 1, "spender2")) + require.NoError(t, tf.CastVotes("nodeID3", 1, "spender2")) + tf.Assert.LikedInstead([]string{"spender1"}, "spender2") + + tf.Assert.Rejected("spender1") + tf.Assert.Accepted("spender2") + tf.Assert.Rejected("spender3") + tf.Assert.Rejected("spender4") + tf.Assert.Pending("spender5", "spender6") + + tf.EvictSpender("spender1") + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender1")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender2")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender3")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender4")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender5")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender6")))) require.Equal(t, 3, conflictEvictedEventCount) - tf.EvictSpend("conflict1") + tf.EvictSpender("spender1") require.Equal(t, 3, conflictEvictedEventCount) - tf.Assert.SpendSetMembers("resource1", "conflict2") + tf.Assert.SpendSetMembers("resource1", "spender2") require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource2")))) - tf.Assert.SpendSetMembers("resource3", "conflict5", "conflict6") - tf.Assert.Parents("conflict5", "conflict2") - tf.Assert.Parents("conflict6", "conflict2") - - tf.EvictSpend("conflict6") - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict1")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict2")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict3")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict4")))) - require.True(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict5")))) - require.False(t, lo.Return2(tf.Instance.ConflictingSpends(tf.SpendID("conflict6")))) + tf.Assert.SpendSetMembers("resource3", "spender5", "spender6") + tf.Assert.Parents("spender5", "spender2") + tf.Assert.Parents("spender6", "spender2") + + tf.EvictSpender("spender6") + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender1")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender2")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender3")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender4")))) + require.True(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender5")))) + require.False(t, lo.Return2(tf.Instance.ConflictingSpenders(tf.SpenderID("spender6")))) require.Equal(t, 4, conflictEvictedEventCount) - tf.Assert.SpendSetMembers("resource1", "conflict2") + tf.Assert.SpendSetMembers("resource1", "spender2") require.False(t, lo.Return2(tf.Instance.SpendSetMembers(tf.ResourceID("resource2")))) - tf.Assert.SpendSetMembers("resource3", "conflict5") - tf.Assert.Parents("conflict5", "conflict2") - tf.Assert.Children("conflict2", "conflict5") + tf.Assert.SpendSetMembers("resource3", "spender5") + tf.Assert.Parents("spender5", "spender2") + tf.Assert.Children("spender2", "spender5") // Try to add non-existing parent to a pending conflict - nothing happens. - require.NoError(t, tf.UpdateSpendParents("conflict5", []string{"conflict1"}, []string{})) + require.NoError(t, tf.UpdateSpendParents("spender5", []string{"spender1"}, []string{})) - parents, exists := tf.Instance.SpendParents(tf.SpendID("conflict5")) + parents, exists := tf.Instance.SpendParents(tf.SpenderID("spender5")) require.True(t, exists) - require.False(t, parents.Has(tf.SpendID("conflict1"))) + require.False(t, parents.Has(tf.SpenderID("spender1"))) } diff --git a/pkg/protocol/engine/mempool/state_metadata.go b/pkg/protocol/engine/mempool/state_metadata.go index 75072912a..44c898800 100644 --- a/pkg/protocol/engine/mempool/state_metadata.go +++ b/pkg/protocol/engine/mempool/state_metadata.go @@ -8,7 +8,7 @@ import ( type StateMetadata interface { State() State - SpendIDs() reactive.Set[iotago.TransactionID] + SpenderIDs() reactive.Set[iotago.TransactionID] PendingSpenderCount() int diff --git a/pkg/protocol/engine/mempool/tests/testframework.go b/pkg/protocol/engine/mempool/tests/testframework.go index b8225b90f..d70a0bc46 100644 --- a/pkg/protocol/engine/mempool/tests/testframework.go +++ b/pkg/protocol/engine/mempool/tests/testframework.go @@ -243,16 +243,16 @@ func (t *TestFramework) RequireTransactionsEvicted(transactionAliases map[string } } -func (t *TestFramework) RequireSpendIDs(spendMapping map[string][]string) { +func (t *TestFramework) RequireSpenderIDs(spendMapping map[string][]string) { for transactionAlias, spendAliases := range spendMapping { transactionMetadata, exists := t.Instance.TransactionMetadata(t.TransactionID(transactionAlias)) require.True(t.test, exists, "transaction %s does not exist", transactionAlias) - spendIDs := transactionMetadata.SpendIDs() - require.Equal(t.test, len(spendAliases), spendIDs.Size(), "%s has wrong number of SpendIDs", transactionAlias) + spenderIDs := transactionMetadata.SpenderIDs() + require.Equal(t.test, len(spendAliases), spenderIDs.Size(), "%s has wrong number of SpenderIDs", transactionAlias) for _, spendAlias := range spendAliases { - require.True(t.test, spendIDs.Has(t.TransactionID(spendAlias)), "transaction %s should have spend %s, instead had %s", transactionAlias, spendAlias, spendIDs) + require.True(t.test, spenderIDs.Has(t.TransactionID(spendAlias)), "transaction %s should have spend %s, instead had %s", transactionAlias, spendAlias, spenderIDs) } } } diff --git a/pkg/protocol/engine/mempool/tests/tests.go b/pkg/protocol/engine/mempool/tests/tests.go index 41557a794..e2866cffe 100644 --- a/pkg/protocol/engine/mempool/tests/tests.go +++ b/pkg/protocol/engine/mempool/tests/tests.go @@ -274,19 +274,19 @@ func TestSpendPropagation(t *testing.T, tf *TestFramework) { require.NoError(t, tf.AttachTransaction("tx1-signed", "tx1", "block1", 1)) tf.RequireBooked("tx1", "tx2", "tx3") - tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}}) + tf.RequireSpenderIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}}) require.NoError(t, tf.AttachTransaction("tx3*-signed", "tx3*", "block3*", 3)) require.NoError(t, tf.AttachTransaction("tx2*-signed", "tx2*", "block2*", 2)) require.NoError(t, tf.AttachTransaction("tx1*-signed", "tx1*", "block1*", 1)) tf.RequireBooked("tx1*", "tx2*", "tx3*") - tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) + tf.RequireSpenderIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) require.NoError(t, tf.AttachTransaction("tx4-signed", "tx4", "block4", 2)) tf.RequireBooked("tx4") - tf.RequireSpendIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) + tf.RequireSpenderIDs(map[string][]string{"tx1": {"tx1"}, "tx2": {"tx2"}, "tx3": {"tx3"}, "tx4": {"tx4"}, "tx1*": {"tx1*"}, "tx2*": {"tx2*"}, "tx3*": {"tx3*"}}) } func TestInvalidTransaction(t *testing.T, tf *TestFramework) { diff --git a/pkg/protocol/engine/mempool/transaction_metadata.go b/pkg/protocol/engine/mempool/transaction_metadata.go index e9d06dd1b..82b58e85e 100644 --- a/pkg/protocol/engine/mempool/transaction_metadata.go +++ b/pkg/protocol/engine/mempool/transaction_metadata.go @@ -15,7 +15,7 @@ type TransactionMetadata interface { Outputs() ds.Set[StateMetadata] - SpendIDs() reactive.Set[iotago.TransactionID] + SpenderIDs() reactive.Set[iotago.TransactionID] Commit() diff --git a/pkg/protocol/engine/mempool/v1/mempool.go b/pkg/protocol/engine/mempool/v1/mempool.go index b4ed89fc5..3714b6b33 100644 --- a/pkg/protocol/engine/mempool/v1/mempool.go +++ b/pkg/protocol/engine/mempool/v1/mempool.go @@ -365,7 +365,7 @@ func (m *MemPool[VoteRank]) bookTransaction(transaction *TransactionMetadata) { func (m *MemPool[VoteRank]) forkTransaction(transactionMetadata *TransactionMetadata, resourceIDs ds.Set[mempool.StateID]) { transactionMetadata.conflicting.Trigger() - if err := m.spendDAG.UpdateConflictingResources(transactionMetadata.ID(), resourceIDs); err != nil { + if err := m.spendDAG.UpdateSpentResources(transactionMetadata.ID(), resourceIDs); err != nil { // this is a hack, as with a reactive.Variable we cannot set it to 0 and still check if it was orphaned. transactionMetadata.orphanedSlot.Set(1) @@ -457,7 +457,7 @@ func (m *MemPool[VoteRank]) updateStateDiffs(transaction *TransactionMetadata, p } func (m *MemPool[VoteRank]) setup() { - m.spendDAG.Events().SpendAccepted.Hook(func(id iotago.TransactionID) { + m.spendDAG.Events().SpenderAccepted.Hook(func(id iotago.TransactionID) { if transaction, exists := m.cachedTransactions.Get(id); exists { transaction.setConflictAccepted() } @@ -480,9 +480,9 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { }) transaction.OnConflicting(func() { - m.spendDAG.CreateSpend(transaction.ID()) + m.spendDAG.CreateSpender(transaction.ID()) - unsubscribe := transaction.parentSpendIDs.OnUpdate(func(appliedMutations ds.SetMutations[iotago.TransactionID]) { + unsubscribe := transaction.parentSpenderIDs.OnUpdate(func(appliedMutations ds.SetMutations[iotago.TransactionID]) { if err := m.spendDAG.UpdateSpendParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { panic(err) } @@ -491,7 +491,7 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { transaction.OnEvicted(func() { unsubscribe() - m.spendDAG.EvictSpend(transaction.ID()) + m.spendDAG.EvictSpender(transaction.ID()) }) }) diff --git a/pkg/protocol/engine/mempool/v1/state_metadata.go b/pkg/protocol/engine/mempool/v1/state_metadata.go index 17035cce3..1c9b1bd0f 100644 --- a/pkg/protocol/engine/mempool/v1/state_metadata.go +++ b/pkg/protocol/engine/mempool/v1/state_metadata.go @@ -22,7 +22,7 @@ type StateMetadata struct { spendCommitted reactive.Variable[*TransactionMetadata] allSpendersRemoved *event.Event - spendIDs reactive.DerivedSet[iotago.TransactionID] + spenderIDs reactive.DerivedSet[iotago.TransactionID] *inclusionFlags } @@ -37,7 +37,7 @@ func NewStateMetadata(state mempool.State, optSource ...*TransactionMetadata) *S spendCommitted: reactive.NewVariable[*TransactionMetadata](), allSpendersRemoved: event.New(), - spendIDs: reactive.NewDerivedSet[iotago.TransactionID](), + spenderIDs: reactive.NewDerivedSet[iotago.TransactionID](), inclusionFlags: newInclusionFlags(), }).setup(optSource...) @@ -49,7 +49,7 @@ func (s *StateMetadata) setup(optSource ...*TransactionMetadata) *StateMetadata } source := optSource[0] - s.spendIDs.InheritFrom(source.spendIDs) + s.spenderIDs.InheritFrom(source.spenderIDs) source.OnPending(func() { s.accepted.Set(false) }) source.OnAccepted(func() { s.accepted.Set(true) }) @@ -64,8 +64,8 @@ func (s *StateMetadata) State() mempool.State { return s.state } -func (s *StateMetadata) SpendIDs() reactive.Set[iotago.TransactionID] { - return s.spendIDs +func (s *StateMetadata) SpenderIDs() reactive.Set[iotago.TransactionID] { + return s.spenderIDs } func (s *StateMetadata) IsDoubleSpent() bool { diff --git a/pkg/protocol/engine/mempool/v1/transaction_metadata.go b/pkg/protocol/engine/mempool/v1/transaction_metadata.go index 64776bcba..a032479b2 100644 --- a/pkg/protocol/engine/mempool/v1/transaction_metadata.go +++ b/pkg/protocol/engine/mempool/v1/transaction_metadata.go @@ -15,13 +15,13 @@ import ( ) type TransactionMetadata struct { - id iotago.TransactionID - inputReferences []mempool.StateReference - inputs []*StateMetadata - outputs []*StateMetadata - transaction mempool.Transaction - parentSpendIDs reactive.DerivedSet[iotago.TransactionID] - spendIDs reactive.DerivedSet[iotago.TransactionID] + id iotago.TransactionID + inputReferences []mempool.StateReference + inputs []*StateMetadata + outputs []*StateMetadata + transaction mempool.Transaction + parentSpenderIDs reactive.DerivedSet[iotago.TransactionID] + spenderIDs reactive.DerivedSet[iotago.TransactionID] // lifecycle events unsolidInputsCount uint64 @@ -65,12 +65,12 @@ func NewTransactionMetadata(transaction mempool.Transaction, referencedInputs [] } return (&TransactionMetadata{ - id: transactionID, - inputReferences: referencedInputs, - inputs: make([]*StateMetadata, len(referencedInputs)), - transaction: transaction, - parentSpendIDs: reactive.NewDerivedSet[iotago.TransactionID](), - spendIDs: reactive.NewDerivedSet[iotago.TransactionID](), + id: transactionID, + inputReferences: referencedInputs, + inputs: make([]*StateMetadata, len(referencedInputs)), + transaction: transaction, + parentSpenderIDs: reactive.NewDerivedSet[iotago.TransactionID](), + spenderIDs: reactive.NewDerivedSet[iotago.TransactionID](), unsolidInputsCount: uint64(len(referencedInputs)), booked: reactive.NewEvent(), @@ -127,8 +127,8 @@ func (t *TransactionMetadata) Outputs() ds.Set[mempool.StateMetadata] { return outputs } -func (t *TransactionMetadata) SpendIDs() reactive.Set[iotago.TransactionID] { - return t.spendIDs +func (t *TransactionMetadata) SpenderIDs() reactive.Set[iotago.TransactionID] { + return t.spenderIDs } func (t *TransactionMetadata) publishInput(index int, input *StateMetadata) { @@ -247,7 +247,7 @@ func (t *TransactionMetadata) setConflictAccepted() { } func (t *TransactionMetadata) setupInput(input *StateMetadata) { - t.parentSpendIDs.InheritFrom(input.spendIDs) + t.parentSpenderIDs.InheritFrom(input.spenderIDs) input.OnRejected(func() { t.rejected.Trigger() }) input.OnOrphanedSlotUpdated(func(slot iotago.SlotIndex) { @@ -286,12 +286,12 @@ func (t *TransactionMetadata) setupInput(input *StateMetadata) { } func (t *TransactionMetadata) setup() (self *TransactionMetadata) { - cancelConflictInheritance := t.spendIDs.InheritFrom(t.parentSpendIDs) + cancelConflictInheritance := t.spenderIDs.InheritFrom(t.parentSpenderIDs) t.OnConflicting(func() { cancelConflictInheritance() - t.spendIDs.Replace(ds.NewSet(t.id)) + t.spenderIDs.Replace(ds.NewSet(t.id)) }) t.allValidAttachmentsEvicted.OnUpdate(func(_ iotago.SlotIndex, slot iotago.SlotIndex) { diff --git a/pkg/protocol/engine/tipselection/v1/tip_selection.go b/pkg/protocol/engine/tipselection/v1/tip_selection.go index 6faf27a57..600f96f6e 100644 --- a/pkg/protocol/engine/tipselection/v1/tip_selection.go +++ b/pkg/protocol/engine/tipselection/v1/tip_selection.go @@ -27,7 +27,7 @@ type TipSelection struct { // tipManager is the TipManager that is used to access the tip related metadata. tipManager tipmanager.TipManager - // spendDAG is the SpendDAG that is used to track spends. + // spendDAG is the SpendDAG that is used to track spenders. spendDAG spenddag.SpendDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] // rootBlocks is a function that returns the current root blocks. @@ -193,13 +193,13 @@ func (t *TipSelection) classifyTip(tipMetadata tipmanager.TipMetadata) { // likedInsteadReferences returns the liked instead references that are required to be able to reference the given tip. func (t *TipSelection) likedInsteadReferences(likedConflicts ds.Set[iotago.TransactionID], tipMetadata tipmanager.TipMetadata) (references []iotago.BlockID, updatedLikedConflicts ds.Set[iotago.TransactionID], err error) { necessaryReferences := make(map[iotago.TransactionID]iotago.BlockID) - if err = t.spendDAG.LikedInstead(tipMetadata.Block().SpendIDs()).ForEach(func(likedSpendID iotago.TransactionID) error { - transactionMetadata, exists := t.transactionMetadata(likedSpendID) + if err = t.spendDAG.LikedInstead(tipMetadata.Block().SpenderIDs()).ForEach(func(likedSpenderID iotago.TransactionID) error { + transactionMetadata, exists := t.transactionMetadata(likedSpenderID) if !exists { - return ierrors.Errorf("transaction required for liked instead reference (%s) not found in mem-pool", likedSpendID) + return ierrors.Errorf("transaction required for liked instead reference (%s) not found in mem-pool", likedSpenderID) } - necessaryReferences[likedSpendID] = lo.First(transactionMetadata.ValidAttachments()) + necessaryReferences[likedSpenderID] = lo.First(transactionMetadata.ValidAttachments()) return nil }); err != nil { @@ -207,8 +207,8 @@ func (t *TipSelection) likedInsteadReferences(likedConflicts ds.Set[iotago.Trans } references, updatedLikedConflicts = make([]iotago.BlockID, 0), likedConflicts.Clone() - for spendID, attachmentID := range necessaryReferences { - if updatedLikedConflicts.Add(spendID) { + for spenderID, attachmentID := range necessaryReferences { + if updatedLikedConflicts.Add(spenderID) { references = append(references, attachmentID) } } @@ -249,12 +249,12 @@ func (t *TipSelection) collectReferences(references model.ParentReferences, pare // isValidStrongTip checks if the given block is a valid strong tip. func (t *TipSelection) isValidStrongTip(block *blocks.Block) bool { - return !t.spendDAG.AcceptanceState(block.SpendIDs()).IsRejected() + return !t.spendDAG.AcceptanceState(block.SpenderIDs()).IsRejected() } // isValidWeakTip checks if the given block is a valid weak tip. func (t *TipSelection) isValidWeakTip(block *blocks.Block) bool { - return t.spendDAG.LikedInstead(block.PayloadSpendIDs()).Size() == 0 + return t.spendDAG.LikedInstead(block.PayloadSpenderIDs()).Size() == 0 } // triggerLivenessThreshold triggers the liveness threshold for all tips that have reached the given threshold. diff --git a/pkg/tests/booker_test.go b/pkg/tests/booker_test.go index 1789fe136..a003e2edb 100644 --- a/pkg/tests/booker_test.go +++ b/pkg/tests/booker_test.go @@ -139,7 +139,7 @@ func Test_WeightPropagation(t *testing.T) { } } -func Test_DoubleSpend(t *testing.T) { +func Test_DoubleSpender(t *testing.T) { ts := testsuite.NewTestSuite(t) defer ts.Shutdown() diff --git a/pkg/testsuite/blocks.go b/pkg/testsuite/blocks.go index 846ab2a03..f518c02b4 100644 --- a/pkg/testsuite/blocks.go +++ b/pkg/testsuite/blocks.go @@ -146,15 +146,15 @@ func (t *TestSuite) AssertBlocksInCacheConflicts(blockConflicts map[*blocks.Bloc return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s is root block", node.Name, blockFromCache.ID()) } - expectedSpendIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) - actualSpendIDs := blockFromCache.SpendIDs() + expectedSpenderIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) + actualSpenderIDs := blockFromCache.SpenderIDs() - if expectedSpendIDs.Size() != actualSpendIDs.Size() { - return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s conflict count incorrect: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedSpendIDs, actualSpendIDs) + if expectedSpenderIDs.Size() != actualSpenderIDs.Size() { + return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s conflict count incorrect: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedSpenderIDs, actualSpenderIDs) } - if !actualSpendIDs.HasAll(expectedSpendIDs) { - return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedSpendIDs, actualSpendIDs) + if !actualSpenderIDs.HasAll(expectedSpenderIDs) { + return ierrors.Errorf("AssertBlocksInCacheConflicts: %s: block %s: expected conflicts %v, got %v", node.Name, blockFromCache.ID(), expectedSpenderIDs, actualSpenderIDs) } return nil diff --git a/pkg/testsuite/mock/node.go b/pkg/testsuite/mock/node.go index 8bcb5d13a..be09c9dad 100644 --- a/pkg/testsuite/mock/node.go +++ b/pkg/testsuite/mock/node.go @@ -399,19 +399,19 @@ func (n *Node) attachEngineLogsWithName(failOnBlockFiltered bool, instance *engi fmt.Printf("%s > [%s] SybilProtection.CommitteeSelected: epoch %d - %s\n", n.Name, engineName, epoch, committee.IDs()) }) - events.SpendDAG.SpendCreated.Hook(func(spendID iotago.TransactionID) { - fmt.Printf("%s > [%s] SpendDAG.SpendCreated: %s\n", n.Name, engineName, spendID) + events.SpendDAG.SpenderCreated.Hook(func(spenderID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendCreated: %s\n", n.Name, engineName, spenderID) }) - events.SpendDAG.SpendEvicted.Hook(func(spendID iotago.TransactionID) { - fmt.Printf("%s > [%s] SpendDAG.SpendEvicted: %s\n", n.Name, engineName, spendID) + events.SpendDAG.SpenderEvicted.Hook(func(spenderID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendEvicted: %s\n", n.Name, engineName, spenderID) }) - events.SpendDAG.SpendRejected.Hook(func(spendID iotago.TransactionID) { - fmt.Printf("%s > [%s] SpendDAG.SpendRejected: %s\n", n.Name, engineName, spendID) + events.SpendDAG.SpenderRejected.Hook(func(spenderID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendRejected: %s\n", n.Name, engineName, spenderID) }) - events.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { - fmt.Printf("%s > [%s] SpendDAG.SpendAccepted: %s\n", n.Name, engineName, spendID) + events.SpendDAG.SpenderAccepted.Hook(func(spenderID iotago.TransactionID) { + fmt.Printf("%s > [%s] SpendDAG.SpendAccepted: %s\n", n.Name, engineName, spenderID) }) instance.Ledger.OnTransactionAttached(func(transactionMetadata mempool.TransactionMetadata) { diff --git a/pkg/testsuite/transactions.go b/pkg/testsuite/transactions.go index 79217d775..1713a4311 100644 --- a/pkg/testsuite/transactions.go +++ b/pkg/testsuite/transactions.go @@ -141,15 +141,15 @@ func (t *TestSuite) AssertTransactionInCacheConflicts(transactionConflicts map[* return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: block %s does not exist", node.Name, transactionID) } - expectedSpendIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) - actualSpendIDs := transactionFromCache.SpendIDs() + expectedSpenderIDs := ds.NewSet(lo.Map(conflictAliases, t.DefaultWallet().TransactionID)...) + actualSpenderIDs := transactionFromCache.SpenderIDs() - if expectedSpendIDs.Size() != actualSpendIDs.Size() { - return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s conflict count incorrect: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedSpendIDs, actualSpendIDs) + if expectedSpenderIDs.Size() != actualSpenderIDs.Size() { + return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s conflict count incorrect: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedSpenderIDs, actualSpenderIDs) } - if !actualSpendIDs.HasAll(expectedSpendIDs) { - return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedSpendIDs, actualSpendIDs) + if !actualSpenderIDs.HasAll(expectedSpenderIDs) { + return ierrors.Errorf("AssertTransactionInCacheConflicts: %s: transaction %s: expected conflicts %v, got %v", node.Name, transactionFromCache.ID(), expectedSpenderIDs, actualSpenderIDs) } return nil From 62e675e4f3707a042ee6edab8b786acb10b36894 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 21 Nov 2023 15:18:03 +0000 Subject: [PATCH 15/18] fix merge errors --- components/dashboard/explorer_routes.go | 4 ++-- components/metrics/metrics_conflicts.go | 6 +++--- components/metrics/metrics_slots.go | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/dashboard/explorer_routes.go b/components/dashboard/explorer_routes.go index 2d11b57b7..2b130816a 100644 --- a/components/dashboard/explorer_routes.go +++ b/components/dashboard/explorer_routes.go @@ -172,7 +172,7 @@ func createExplorerBlock(block *model.Block, cachedBlock *blocks.Block, metadata t.LikedInsteadChildren = lo.Map(cachedBlock.ShallowLikeChildren(), func(childBlock *blocks.Block) string { return childBlock.ID().ToHex() }) - t.SpendIDs = lo.Map(cachedBlock.SpendIDs().ToSlice(), func(spendID iotago.TransactionID) string { + t.SpendIDs = lo.Map(cachedBlock.SpenderIDs().ToSlice(), func(spendID iotago.TransactionID) string { return spendID.ToHex() }) } else { @@ -233,7 +233,7 @@ func getTransactionMetadata(c echo.Context) error { return ierrors.Errorf("tx metadata not found: %s", txID.ToHex()) } - conflicts, _ := deps.Protocol.MainEngineInstance().Ledger.SpendDAG().ConflictingSpends(txID) + conflicts, _ := deps.Protocol.MainEngineInstance().Ledger.SpendDAG().ConflictingSpenders(txID) return httpserver.JSONResponse(c, http.StatusOK, NewTransactionMetadata(txMetadata, conflicts)) } diff --git a/components/metrics/metrics_conflicts.go b/components/metrics/metrics_conflicts.go index bdfb08c9a..fb2743870 100644 --- a/components/metrics/metrics_conflicts.go +++ b/components/metrics/metrics_conflicts.go @@ -21,7 +21,7 @@ var ConflictMetrics = collector.NewCollection(conflictNamespace, collector.WithType(collector.Counter), collector.WithHelp("Time since transaction issuance to the conflict acceptance"), collector.WithInitFunc(func() { - deps.Protocol.Events.Engine.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpenderAccepted.Hook(func(spendID iotago.TransactionID) { if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.MemPool().TransactionMetadata(spendID); exists { firstAttachmentID := txMetadata.EarliestIncludedAttachment() if block, blockExists := deps.Protocol.MainEngineInstance().BlockFromCache(firstAttachmentID); blockExists { @@ -37,7 +37,7 @@ var ConflictMetrics = collector.NewCollection(conflictNamespace, collector.WithType(collector.Counter), collector.WithHelp("Number of resolved (accepted) conflicts"), collector.WithInitFunc(func() { - deps.Protocol.Events.Engine.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpenderAccepted.Hook(func(spendID iotago.TransactionID) { deps.Collector.Increment(conflictNamespace, resolvedConflictCount) }, event.WithWorkerPool(Component.WorkerPool)) }), @@ -46,7 +46,7 @@ var ConflictMetrics = collector.NewCollection(conflictNamespace, collector.WithType(collector.Counter), collector.WithHelp("Number of created conflicts"), collector.WithInitFunc(func() { - deps.Protocol.Events.Engine.SpendDAG.SpendCreated.Hook(func(spendID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpenderCreated.Hook(func(spendID iotago.TransactionID) { deps.Collector.Increment(conflictNamespace, allConflictCounts) }, event.WithWorkerPool(Component.WorkerPool)) }), diff --git a/components/metrics/metrics_slots.go b/components/metrics/metrics_slots.go index 46cf9249a..fe1891410 100644 --- a/components/metrics/metrics_slots.go +++ b/components/metrics/metrics_slots.go @@ -93,7 +93,7 @@ var SlotMetrics = collector.NewCollection(slotNamespace, deps.Collector.Update(slotNamespace, createdConflicts, 0, strconv.Itoa(eventSlot)) }, event.WithWorkerPool(Component.WorkerPool)) - deps.Protocol.Events.Engine.SpendDAG.SpendCreated.Hook(func(spendID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpenderCreated.Hook(func(spendID iotago.TransactionID) { if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(spendID); exists { for _, attachment := range txMetadata.ValidAttachments() { deps.Collector.Increment(slotNamespace, createdConflicts, strconv.Itoa(int(attachment.Slot()))) @@ -115,7 +115,7 @@ var SlotMetrics = collector.NewCollection(slotNamespace, deps.Collector.Update(slotNamespace, acceptedConflicts, 0, strconv.Itoa(eventSlot)) }, event.WithWorkerPool(Component.WorkerPool)) - deps.Protocol.Events.Engine.SpendDAG.SpendAccepted.Hook(func(spendID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpenderAccepted.Hook(func(spendID iotago.TransactionID) { if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(spendID); exists { for _, attachmentBlockID := range txMetadata.ValidAttachments() { if attachment, exists := deps.Protocol.MainEngineInstance().BlockCache.Block(attachmentBlockID); exists && attachment.IsAccepted() { @@ -139,7 +139,7 @@ var SlotMetrics = collector.NewCollection(slotNamespace, deps.Collector.Update(slotNamespace, rejectedConflicts, 0, strconv.Itoa(eventSlot)) }, event.WithWorkerPool(Component.WorkerPool)) - deps.Protocol.Events.Engine.SpendDAG.SpendRejected.Hook(func(spendID iotago.TransactionID) { + deps.Protocol.Events.Engine.SpendDAG.SpenderRejected.Hook(func(spendID iotago.TransactionID) { if txMetadata, exists := deps.Protocol.MainEngineInstance().Ledger.TransactionMetadata(spendID); exists { for _, attachmentBlockID := range txMetadata.ValidAttachments() { if attachment, exists := deps.Protocol.MainEngineInstance().BlockCache.Block(attachmentBlockID); exists && attachment.IsAccepted() { From 316a51eb71b1248ec8bf044bb8770cffbf7586df Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 21 Nov 2023 15:58:49 +0000 Subject: [PATCH 16/18] rename files --- .../{sorted_spend.go => sorted_spender.go} | 0 .../{sorted_spends.go => sorted_spenders.go} | 0 ...spends_test.go => sorted_spenders_test.go} | 0 .../mempool/spenddag/spenddagv1/spenddag.go | 4 ++- .../spenddag/spenddagv1/spenddag_test.go | 8 +++--- .../spenddagv1/{spend.go => spender.go} | 2 +- .../{spend_test.go => spender_test.go} | 0 .../mempool/spenddag/tests/assertions.go | 2 +- .../mempool/spenddag/tests/framework.go | 2 +- .../engine/mempool/spenddag/tests/tests.go | 26 +++++++++---------- pkg/tests/booker_test.go | 12 ++++----- pkg/testsuite/{spends.go => spenders.go} | 2 +- 12 files changed, 30 insertions(+), 28 deletions(-) rename pkg/protocol/engine/mempool/spenddag/spenddagv1/{sorted_spend.go => sorted_spender.go} (100%) rename pkg/protocol/engine/mempool/spenddag/spenddagv1/{sorted_spends.go => sorted_spenders.go} (100%) rename pkg/protocol/engine/mempool/spenddag/spenddagv1/{sorted_spends_test.go => sorted_spenders_test.go} (100%) rename pkg/protocol/engine/mempool/spenddag/spenddagv1/{spend.go => spender.go} (99%) rename pkg/protocol/engine/mempool/spenddag/spenddagv1/{spend_test.go => spender_test.go} (100%) rename pkg/testsuite/{spends.go => spenders.go} (83%) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spender.go similarity index 100% rename from pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spend.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spender.go diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spenders.go similarity index 100% rename from pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spenders.go diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spenders_test.go similarity index 100% rename from pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spends_test.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/sorted_spenders_test.go diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index 82d11cd1d..a9e02b3af 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -115,7 +115,9 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) UpdateSpentResources(id Spen return nil, ierrors.Errorf("spender already evicted: %w", spenddag.ErrEntityEvicted) } - return spender.JoinSpendSets(c.spendSets(resourceIDs)) + existingSpendSets := c.spendSets(resourceIDs) + + return spender.JoinSpendSets(existingSpendSets) }() if err != nil { diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go index 47e8302a3..964515c17 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go @@ -57,8 +57,8 @@ func TestMemoryRelease(t *testing.T) { slot := startSlot for ; slot < startSlot+spendSetCount; slot++ { spendSetAlias := fmt.Sprintf("spendSet-%d", slot) - for conflictIndex := 0; conflictIndex < spendersInSpendSet; conflictIndex++ { - conflictAlias := fmt.Sprintf("spendSet-%d:%d", slot, conflictIndex) + for spendIndex := 0; spendIndex < spendersInSpendSet; spendIndex++ { + conflictAlias := fmt.Sprintf("spendSet-%d:%d", slot, spendIndex) require.NoError(t, tf.CreateOrUpdateSpender(conflictAlias, []string{spendSetAlias})) if prevSpendSetAlias != "" { require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevSpendSetAlias, 0)}, []string{})) @@ -67,8 +67,8 @@ func TestMemoryRelease(t *testing.T) { prevSpendSetAlias = spendSetAlias if slotToEvict := slot - evictionDelay; slotToEvict >= 0 { - for conflictIndex := 0; conflictIndex < spendersInSpendSet; conflictIndex++ { - conflictAlias := fmt.Sprintf("spendSet-%d:%d", slotToEvict, conflictIndex) + for spendIndex := 0; spendIndex < spendersInSpendSet; spendIndex++ { + conflictAlias := fmt.Sprintf("spendSet-%d:%d", slotToEvict, spendIndex) tf.EvictSpender(conflictAlias) } } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spender.go similarity index 99% rename from pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/spender.go index d14cae99f..09e7de7bd 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spender.go @@ -128,7 +128,7 @@ func NewSpender[SpenderID, ResourceID spenddag.IDType, VoteRank spenddag.VoteRan return c } -// JoinSpendSets registers the Spend with the given SpendSets. +// JoinSpendSets registers the Spender with the given SpendSets. func (c *Spender[SpenderID, ResourceID, VoteRank]) JoinSpendSets(spendSets ds.Set[*SpendSet[SpenderID, ResourceID, VoteRank]]) (joinedSpendSets ds.Set[ResourceID], err error) { if spendSets == nil { return ds.NewSet[ResourceID](), nil diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spender_test.go similarity index 100% rename from pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_test.go rename to pkg/protocol/engine/mempool/spenddag/spenddagv1/spender_test.go diff --git a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go index 6c48bb098..cc6201551 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -49,7 +49,7 @@ func (a *Assertions) SpendSetMembers(resourceAlias string, spendAliases ...strin } } -// SpendSets asserts that the given spender has the given conflict sets. +// SpendSets asserts that the given spender has the given spend sets. func (a *Assertions) SpendSets(spenderAlias string, resourceAliases ...string) { spendSets, exists := a.f.Instance.SpendSets(a.f.SpenderID(spenderAlias)) require.True(a.f.test, exists, "Spender %s does not exist", spenderAlias) diff --git a/pkg/protocol/engine/mempool/spenddag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go index 8d2ab97f9..99f74737b 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -52,7 +52,7 @@ func NewFramework( return f } -// CreateOrUpdateSpend creates a new spend or adds it to the given SpendSets. +// CreateOrUpdateSpend creates a new spender or adds it to the given SpendSets. func (f *Framework) CreateOrUpdateSpender(alias string, resourceAliases []string) error { f.Instance.CreateSpender(f.SpenderID(alias)) return f.Instance.UpdateSpentResources(f.SpenderID(alias), f.SpendSetIDs(resourceAliases...)) diff --git a/pkg/protocol/engine/mempool/spenddag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go index 69c1de436..a8d302d81 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -14,24 +14,24 @@ import ( func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { for testName, testCase := range map[string]func(*testing.T, *Framework){ - "CreateSpender": CreateSpender, - "ExistingSpendJoinsSpendSets": ExistingSpendJoinsSpendSets, - "JoinSpendSetTwice": JoinSpendSetTwice, - "UpdateSpendParents": UpdateSpendParents, - "LikedInstead": LikedInstead, - "CreateSpendWithoutMembers": CreateSpendWithoutMembers, - "SpendAcceptance": SpendAcceptance, - "CastVotes": CastVotes, - "CastVotes_VoteRank": CastVotesVoteRank, - "CastVotesAcceptance": CastVotesAcceptance, - "EvictAcceptedSpender": EvictAcceptedSpender, - "EvictRejectedSpender": EvictRejectedSpender, + "CreateSpender": CreateSpender, + "ExistingSpenderJoinsSpendSets": ExistingSpenderJoinsSpendSets, + "JoinSpendSetTwice": JoinSpendSetTwice, + "UpdateSpendParents": UpdateSpendParents, + "LikedInstead": LikedInstead, + "CreateSpendWithoutMembers": CreateSpendWithoutMembers, + "SpendAcceptance": SpendAcceptance, + "CastVotes": CastVotes, + "CastVotes_VoteRank": CastVotesVoteRank, + "CastVotesAcceptance": CastVotesAcceptance, + "EvictAcceptedSpender": EvictAcceptedSpender, + "EvictRejectedSpender": EvictRejectedSpender, } { t.Run(testName, func(t *testing.T) { testCase(t, frameworkProvider(t)) }) } } -func ExistingSpendJoinsSpendSets(t *testing.T, tf *Framework) { +func ExistingSpenderJoinsSpendSets(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource1"})) tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") diff --git a/pkg/tests/booker_test.go b/pkg/tests/booker_test.go index a003e2edb..256b435e2 100644 --- a/pkg/tests/booker_test.go +++ b/pkg/tests/booker_test.go @@ -96,7 +96,7 @@ func Test_WeightPropagation(t *testing.T) { ts.Block("block3-basic"): {"tx1"}, ts.Block("block4-basic"): {"tx2"}, }, node1, node2) - ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) + ts.AssertSpendersInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) ts.AssertTransactionsInCachePending(wallet.Transactions("tx1", "tx2"), true, node1, node2) } @@ -111,7 +111,7 @@ func Test_WeightPropagation(t *testing.T) { // Make sure that neither approval (conflict weight), // nor witness (block weight) was not propagated using basic blocks and caused acceptance. - ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) + ts.AssertSpendersInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Pending, ts.Nodes()...) ts.AssertTransactionsInCacheAccepted(wallet.Transactions("tx2"), false, node1, node2) ts.AssertTransactionsInCacheRejected(wallet.Transactions("tx1"), false, node1, node2) ts.AssertTransactionsInCachePending(wallet.Transactions("tx1", "tx2"), true, node1, node2) @@ -139,7 +139,7 @@ func Test_WeightPropagation(t *testing.T) { } } -func Test_DoubleSpender(t *testing.T) { +func Test_DoubleSpend(t *testing.T) { ts := testsuite.NewTestSuite(t) defer ts.Shutdown() @@ -246,7 +246,7 @@ func Test_MultipleAttachments(t *testing.T) { ts.AssertTransactionInCacheConflicts(map[*iotago.Transaction][]string{ wallet.Transaction("tx1"): {"tx1"}, }, ts.Nodes()...) - ts.AssertSpendsInCacheAcceptanceState([]string{"tx1"}, acceptance.Accepted, ts.Nodes()...) + ts.AssertSpendersInCacheAcceptanceState([]string{"tx1"}, acceptance.Accepted, ts.Nodes()...) } // Create a transaction that is included and whose conflict is accepted, but whose inputs are not accepted. @@ -282,7 +282,7 @@ func Test_MultipleAttachments(t *testing.T) { wallet.Transaction("tx1"): {"tx1"}, wallet.Transaction("tx2"): {"tx2"}, }, nodeA, nodeB) - ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, ts.Nodes()...) + ts.AssertSpendersInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, ts.Nodes()...) } // Issue a block that includes tx1, and make sure that tx2 is accepted as well as a consequence. @@ -312,7 +312,7 @@ func Test_MultipleAttachments(t *testing.T) { wallet.Transaction("tx1"): {"tx1"}, wallet.Transaction("tx2"): {"tx2"}, }, nodeA, nodeB) - ts.AssertSpendsInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, nodeA, nodeB) + ts.AssertSpendersInCacheAcceptanceState([]string{"tx1", "tx2"}, acceptance.Accepted, nodeA, nodeB) } } diff --git a/pkg/testsuite/spends.go b/pkg/testsuite/spenders.go similarity index 83% rename from pkg/testsuite/spends.go rename to pkg/testsuite/spenders.go index e8fd8163b..f2c41ec99 100644 --- a/pkg/testsuite/spends.go +++ b/pkg/testsuite/spenders.go @@ -7,7 +7,7 @@ import ( "github.com/iotaledger/iota-core/pkg/testsuite/mock" ) -func (t *TestSuite) AssertSpendsInCacheAcceptanceState(expectedConflictAliases []string, expectedState acceptance.State, nodes ...*mock.Node) { +func (t *TestSuite) AssertSpendersInCacheAcceptanceState(expectedConflictAliases []string, expectedState acceptance.State, nodes ...*mock.Node) { mustNodes(nodes) for _, node := range nodes { From 357a1cdc4c19ea2aea9ecd8a3c9513ed353f7611 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 22 Nov 2023 10:51:14 +0000 Subject: [PATCH 17/18] remove broken line from spendDag test and clean up --- .../engine/mempool/spenddag/spenddag.go | 10 +-- .../mempool/spenddag/spenddagv1/spend_set.go | 2 +- .../mempool/spenddag/spenddagv1/spenddag.go | 12 ++-- .../spenddag/spenddagv1/spenddag_test.go | 2 +- .../mempool/spenddag/tests/assertions.go | 10 +-- .../mempool/spenddag/tests/framework.go | 10 +-- .../engine/mempool/spenddag/tests/tests.go | 64 +++++++++---------- .../engine/mempool/tests/testframework.go | 2 +- .../engine/mempool/v1/inclusion_flags.go | 2 +- pkg/protocol/engine/mempool/v1/mempool.go | 2 +- 10 files changed, 57 insertions(+), 59 deletions(-) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddag.go index e6b10f855..f6588d6fe 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddag.go @@ -15,7 +15,7 @@ type SpendDAG[SpenderID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] int UpdateSpentResources(id SpenderID, resourceIDs ds.Set[ResourceID]) error ReadConsistent(callback func(spendDAG ReadLockedSpendDAG[SpenderID, ResourceID, VoteRank]) error) error - UpdateSpendParents(spenderID SpenderID, addedParentIDs, removedParentIDs ds.Set[SpenderID]) error + UpdateSpenderParents(spenderID SpenderID, addedParentIDs, removedParentIDs ds.Set[SpenderID]) error FutureCone(spenderIDs ds.Set[SpenderID]) (futureCone ds.Set[SpenderID]) ConflictingSpenders(spenderID SpenderID) (conflictingSpends ds.Set[SpenderID], exists bool) CastVotes(vote *vote.Vote[VoteRank], spenderIDs ds.Set[SpenderID]) error @@ -26,11 +26,11 @@ type SpendDAG[SpenderID, ResourceID IDType, VoteRank VoteRankType[VoteRank]] int EvictSpender(spenderID SpenderID) SpendSets(spenderID SpenderID) (spendSetIDs ds.Set[ResourceID], exists bool) - SpendParents(spenderID SpenderID) (spenderIDs ds.Set[SpenderID], exists bool) + SpenderParents(spenderID SpenderID) (spenderIDs ds.Set[SpenderID], exists bool) SpendSetMembers(spendSetID ResourceID) (spenderIDs ds.Set[SpenderID], exists bool) - SpendWeight(spenderID SpenderID) int64 - SpendChildren(spenderID SpenderID) (spenderIDs ds.Set[SpenderID], exists bool) - SpendVoters(spenderID SpenderID) (voters ds.Set[account.SeatIndex]) + SpenderWeight(spenderID SpenderID) int64 + SpenderChildren(spenderID SpenderID) (spenderIDs ds.Set[SpenderID], exists bool) + SpenderVoters(spenderID SpenderID) (voters ds.Set[account.SeatIndex]) LikedInstead(spenderIDs ds.Set[SpenderID]) ds.Set[SpenderID] } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go index 1f90d2401..3325d21bf 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spend_set.go @@ -48,7 +48,7 @@ func (c *SpendSet[SpenderID, ResourceID, VoteRank]) Add(addedSpender *Spender[Sp } -// Remove removes a Spend from the SpendSet and returns all remaining members of the set. +// Remove removes a Spender from the SpendSet and returns all remaining members of the set. func (c *SpendSet[SpenderID, ResourceID, VoteRank]) Remove(removedSpender *Spender[SpenderID, ResourceID, VoteRank]) (removed bool) { c.mutex.Lock() defer c.mutex.Unlock() diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index a9e02b3af..cd647b4f2 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -141,8 +141,8 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) ReadConsistent(callback func return callback(c) } -// UpdateSpendParents updates the parents of the given Spend and returns an error if the operation failed. -func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) UpdateSpendParents(spenderID SpenderID, addedParentIDs ds.Set[SpenderID], removedParentIDs ds.Set[SpenderID]) error { +// UpdateSpenderParents updates the parents of the given Spend and returns an error if the operation failed. +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) UpdateSpenderParents(spenderID SpenderID, addedParentIDs ds.Set[SpenderID], removedParentIDs ds.Set[SpenderID]) error { newParents := ds.NewSet[SpenderID]() updated, err := func() (bool, error) { @@ -240,7 +240,7 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) AllSpendsSupported(seat acco }) == nil } -func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendVoters(spenderID SpenderID) (spendVoters ds.Set[account.SeatIndex]) { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpenderVoters(spenderID SpenderID) (spendVoters ds.Set[account.SeatIndex]) { if spender, exists := c.spendersByID.Get(spenderID); exists { return spender.Weight.Voters.Clone() } @@ -263,7 +263,7 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendSets(spenderID SpenderI return spendSets, true } -func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendParents(spenderID SpenderID) (spendParents ds.Set[SpenderID], exists bool) { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpenderParents(spenderID SpenderID) (spendParents ds.Set[SpenderID], exists bool) { spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil, false @@ -278,7 +278,7 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendParents(spenderID Spend return spendParents, true } -func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendChildren(spenderID SpenderID) (spendChildren ds.Set[SpenderID], exists bool) { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpenderChildren(spenderID SpenderID) (spendChildren ds.Set[SpenderID], exists bool) { spender, exists := c.spendersByID.Get(spenderID) if !exists { return nil, false @@ -308,7 +308,7 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendSetMembers(spendSetID R return spenders, true } -func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpendWeight(spenderID SpenderID) int64 { +func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) SpenderWeight(spenderID SpenderID) int64 { if spender, exists := c.spendersByID.Get(spenderID); exists { return spender.Weight.Value().ValidatorsWeight() } diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go index 964515c17..c68f29397 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag_test.go @@ -61,7 +61,7 @@ func TestMemoryRelease(t *testing.T) { conflictAlias := fmt.Sprintf("spendSet-%d:%d", slot, spendIndex) require.NoError(t, tf.CreateOrUpdateSpender(conflictAlias, []string{spendSetAlias})) if prevSpendSetAlias != "" { - require.NoError(t, tf.UpdateSpendParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevSpendSetAlias, 0)}, []string{})) + require.NoError(t, tf.UpdateSpenderParents(conflictAlias, []string{fmt.Sprintf("%s:%d", prevSpendSetAlias, 0)}, []string{})) } } prevSpendSetAlias = spendSetAlias diff --git a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go index cc6201551..08dbc1272 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/assertions.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/assertions.go @@ -9,10 +9,10 @@ type Assertions struct { f *Framework } -// Children asserts that the given spend has the given children. +// Children asserts that the given spender has the given children. func (a *Assertions) Children(spendAlias string, childAliases ...string) { - childIDs, exists := a.f.Instance.SpendChildren(a.f.SpenderID(spendAlias)) - require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) + childIDs, exists := a.f.Instance.SpenderChildren(a.f.SpenderID(spendAlias)) + require.True(a.f.test, exists, "Spender %s does not exist", spendAlias) require.Equal(a.f.test, len(childAliases), childIDs.Size(), "Spend %s has wrong number of children", spendAlias) for _, childAlias := range childAliases { @@ -22,7 +22,7 @@ func (a *Assertions) Children(spendAlias string, childAliases ...string) { // Parents asserts that the given spend has the given parents. func (a *Assertions) Parents(spendAlias string, parentAliases ...string) { - parents, exists := a.f.Instance.SpendParents(a.f.SpenderID(spendAlias)) + parents, exists := a.f.Instance.SpenderParents(a.f.SpenderID(spendAlias)) require.True(a.f.test, exists, "Spend %s does not exist", spendAlias) require.Equal(a.f.test, len(parentAliases), parents.Size(), "Spend %s has wrong number of parents", spendAlias) @@ -83,5 +83,5 @@ func (a *Assertions) Rejected(aliases ...string) { // ValidatorWeight asserts that the given spend has the given validator weight. func (a *Assertions) ValidatorWeight(spendAlias string, weight int64) { - require.Equal(a.f.test, weight, a.f.Instance.SpendWeight(a.f.SpenderID(spendAlias)), "ValidatorWeight is %s instead of % for spender %s", a.f.Instance.SpendWeight(a.f.SpenderID(spendAlias)), weight, spendAlias) + require.Equal(a.f.test, weight, a.f.Instance.SpenderWeight(a.f.SpenderID(spendAlias)), "ValidatorWeight is %s instead of % for spender %s", a.f.Instance.SpenderWeight(a.f.SpenderID(spendAlias)), weight, spendAlias) } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/framework.go b/pkg/protocol/engine/mempool/spenddag/tests/framework.go index 99f74737b..3abd32ccc 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/framework.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/framework.go @@ -52,16 +52,16 @@ func NewFramework( return f } -// CreateOrUpdateSpend creates a new spender or adds it to the given SpendSets. +// CreateOrUpdateSpender creates a new spender or adds it to the given SpendSets. func (f *Framework) CreateOrUpdateSpender(alias string, resourceAliases []string) error { f.Instance.CreateSpender(f.SpenderID(alias)) return f.Instance.UpdateSpentResources(f.SpenderID(alias), f.SpendSetIDs(resourceAliases...)) } -// UpdateConflictParents updates the parents of the spend with the given alias. -func (f *Framework) UpdateSpendParents(spendAlias string, addedParentIDs []string, removedParentIDs []string) error { - return f.Instance.UpdateSpendParents(f.SpenderID(spendAlias), f.SpenderIDs(addedParentIDs...), f.SpenderIDs(removedParentIDs...)) +// UpdateSpenderParents updates the parents of the spender with the given alias. +func (f *Framework) UpdateSpenderParents(spendAlias string, addedParentIDs []string, removedParentIDs []string) error { + return f.Instance.UpdateSpenderParents(f.SpenderID(spendAlias), f.SpenderIDs(addedParentIDs...), f.SpenderIDs(removedParentIDs...)) } // LikedInstead returns the set of spenders that are liked instead of the given spenders. @@ -86,7 +86,7 @@ func (f *Framework) CastVotes(nodeAlias string, voteRank int, spenderAliases ... return f.Instance.CastVotes(vote.NewVote[vote.MockedRank](seat, vote.MockedRank(voteRank)), f.SpenderIDs(spenderAliases...)) } -// EvictSpend evicts given spend from the SpendDAG. +// EvictSpender evicts given spender from the SpendDAG. func (f *Framework) EvictSpender(spendAlias string) { f.Instance.EvictSpender(f.SpenderID(spendAlias)) } diff --git a/pkg/protocol/engine/mempool/spenddag/tests/tests.go b/pkg/protocol/engine/mempool/spenddag/tests/tests.go index a8d302d81..68e470487 100644 --- a/pkg/protocol/engine/mempool/spenddag/tests/tests.go +++ b/pkg/protocol/engine/mempool/spenddag/tests/tests.go @@ -17,7 +17,7 @@ func TestAll(t *testing.T, frameworkProvider func(*testing.T) *Framework) { "CreateSpender": CreateSpender, "ExistingSpenderJoinsSpendSets": ExistingSpenderJoinsSpendSets, "JoinSpendSetTwice": JoinSpendSetTwice, - "UpdateSpendParents": UpdateSpendParents, + "UpdateSpenderParents": UpdateSpenderParents, "LikedInstead": LikedInstead, "CreateSpendWithoutMembers": CreateSpendWithoutMembers, "SpendAcceptance": SpendAcceptance, @@ -46,26 +46,24 @@ func ExistingSpenderJoinsSpendSets(t *testing.T, tf *Framework) { tf.Assert.SpendSetMembers("resource2", "spender1", "spender2", "spender3") tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") - - tf.Assert.LikedInstead([]string{"spender3"}, "spender1") } -func UpdateSpendParents(t *testing.T, tf *Framework) { +func UpdateSpenderParents(t *testing.T, tf *Framework) { require.NoError(t, tf.CreateOrUpdateSpender("spender1", []string{"resource1"})) require.NoError(t, tf.CreateOrUpdateSpender("spender2", []string{"resource2"})) require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource1", "resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1", "spender2"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1", "spender2"}, []string{})) tf.Assert.Children("spender1", "spender3") tf.Assert.Parents("spender3", "spender1", "spender2") require.NoError(t, tf.CreateOrUpdateSpender("spender2.5", []string{"spender2.5"})) - require.NoError(t, tf.UpdateSpendParents("spender2.5", []string{"spender1", "spender2"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender2.5", []string{"spender1", "spender2"}, []string{})) tf.Assert.Children("spender1", "spender2.5", "spender3") tf.Assert.Children("spender2", "spender2.5", "spender3") tf.Assert.Parents("spender2.5", "spender1", "spender2") - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender2.5"}, []string{"spender1", "spender2"})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender2.5"}, []string{"spender1", "spender2"})) tf.Assert.Children("spender1", "spender2.5") tf.Assert.Children("spender2", "spender2.5") @@ -80,10 +78,10 @@ func CreateSpender(t *testing.T, tf *Framework) { tf.Assert.SpendSetMembers("resource1", "spender1", "spender2") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -142,10 +140,10 @@ func LikedInstead(t *testing.T, tf *Framework) { tf.Assert.LikedInstead([]string{"spender1", "spender2"}, "spender1") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) require.NoError(t, tf.CastVotes("zero-weight", 1, "spender4")) tf.Assert.LikedInstead([]string{"spender1", "spender2", "spender3", "spender4"}, "spender1", "spender4") @@ -164,10 +162,10 @@ func SpendAcceptance(t *testing.T, tf *Framework) { tf.Assert.SpendSets("spender2", "resource1") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -199,10 +197,10 @@ func CastVotes(t *testing.T, tf *Framework) { tf.Assert.SpendSets("spender2", "resource1") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -235,10 +233,10 @@ func CastVotesVoteRank(t *testing.T, tf *Framework) { // create nested conflicts require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -288,10 +286,10 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { tf.Assert.SpendSets("spender2", "resource1") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -312,13 +310,13 @@ func CastVotesAcceptance(t *testing.T, tf *Framework) { // Evict conflict and try to add non-existing parent to a rejected conflict - update is ignored because the parent is evicted. tf.EvictSpender("spender2") - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender2"}, []string{})) - parents, exists := tf.Instance.SpendParents(tf.SpenderID("spender4")) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender2"}, []string{})) + parents, exists := tf.Instance.SpenderParents(tf.SpenderID("spender4")) require.True(t, exists) require.False(t, parents.Has(tf.SpenderID("spender2"))) // Try to update parents of evicted conflict. - require.ErrorIs(t, tf.UpdateSpendParents("spender2", []string{"spender1"}, []string{}), spenddag.ErrEntityEvicted) + require.ErrorIs(t, tf.UpdateSpenderParents("spender2", []string{"spender1"}, []string{}), spenddag.ErrEntityEvicted) } func JoinSpendSetTwice(t *testing.T, tf *Framework) { @@ -366,10 +364,10 @@ func EvictAcceptedSpender(t *testing.T, tf *Framework) { tf.Assert.SpendSets("spender2", "resource1") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -377,10 +375,10 @@ func EvictAcceptedSpender(t *testing.T, tf *Framework) { tf.Assert.Parents("spender4", "spender1") require.NoError(t, tf.CreateOrUpdateSpender("spender5", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("spender5", []string{"spender2"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender5", []string{"spender2"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender6", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("spender6", []string{"spender2"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender6", []string{"spender2"}, []string{})) tf.Assert.SpendSetMembers("resource3", "spender5", "spender6") tf.Assert.Children("spender2", "spender5", "spender6") @@ -432,10 +430,10 @@ func EvictRejectedSpender(t *testing.T, tf *Framework) { tf.Assert.SpendSets("spender2", "resource1") require.NoError(t, tf.CreateOrUpdateSpender("spender3", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender3", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender3", []string{"spender1"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender4", []string{"resource2"})) - require.NoError(t, tf.UpdateSpendParents("spender4", []string{"spender1"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender4", []string{"spender1"}, []string{})) tf.Assert.SpendSetMembers("resource2", "spender3", "spender4") tf.Assert.Children("spender1", "spender3", "spender4") @@ -443,10 +441,10 @@ func EvictRejectedSpender(t *testing.T, tf *Framework) { tf.Assert.Parents("spender4", "spender1") require.NoError(t, tf.CreateOrUpdateSpender("spender5", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("spender5", []string{"spender2"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender5", []string{"spender2"}, []string{})) require.NoError(t, tf.CreateOrUpdateSpender("spender6", []string{"resource3"})) - require.NoError(t, tf.UpdateSpendParents("spender6", []string{"spender2"}, []string{})) + require.NoError(t, tf.UpdateSpenderParents("spender6", []string{"spender2"}, []string{})) tf.Assert.SpendSetMembers("resource3", "spender5", "spender6") tf.Assert.Children("spender2", "spender5", "spender6") @@ -497,10 +495,10 @@ func EvictRejectedSpender(t *testing.T, tf *Framework) { tf.Assert.Parents("spender5", "spender2") tf.Assert.Children("spender2", "spender5") - // Try to add non-existing parent to a pending conflict - nothing happens. - require.NoError(t, tf.UpdateSpendParents("spender5", []string{"spender1"}, []string{})) + // Try to add non-existing parent to a pending spender - nothing happens. + require.NoError(t, tf.UpdateSpenderParents("spender5", []string{"spender1"}, []string{})) - parents, exists := tf.Instance.SpendParents(tf.SpenderID("spender5")) + parents, exists := tf.Instance.SpenderParents(tf.SpenderID("spender5")) require.True(t, exists) require.False(t, parents.Has(tf.SpenderID("spender1"))) } diff --git a/pkg/protocol/engine/mempool/tests/testframework.go b/pkg/protocol/engine/mempool/tests/testframework.go index d70a0bc46..e5fcfe1c2 100644 --- a/pkg/protocol/engine/mempool/tests/testframework.go +++ b/pkg/protocol/engine/mempool/tests/testframework.go @@ -252,7 +252,7 @@ func (t *TestFramework) RequireSpenderIDs(spendMapping map[string][]string) { require.Equal(t.test, len(spendAliases), spenderIDs.Size(), "%s has wrong number of SpenderIDs", transactionAlias) for _, spendAlias := range spendAliases { - require.True(t.test, spenderIDs.Has(t.TransactionID(spendAlias)), "transaction %s should have spend %s, instead had %s", transactionAlias, spendAlias, spenderIDs) + require.True(t.test, spenderIDs.Has(t.TransactionID(spendAlias)), "transaction %s should have spender %s, instead had %s", transactionAlias, spendAlias, spenderIDs) } } } diff --git a/pkg/protocol/engine/mempool/v1/inclusion_flags.go b/pkg/protocol/engine/mempool/v1/inclusion_flags.go index 9e59a3653..a52a6f0a6 100644 --- a/pkg/protocol/engine/mempool/v1/inclusion_flags.go +++ b/pkg/protocol/engine/mempool/v1/inclusion_flags.go @@ -27,7 +27,7 @@ func newInclusionFlags() *inclusionFlags { accepted: reactive.NewVariable[bool](), committedSlot: reactive.NewVariable[iotago.SlotIndex](), rejected: promise.NewEvent(), - // Make sure the oldest orphaned index doesn't get overridden by newer TX spending the orphaned spend further. + // Make sure the oldest orphaned index doesn't get overridden by newer TX spending the orphaned spender resources further. orphanedSlot: reactive.NewVariable[iotago.SlotIndex](func(currentValue iotago.SlotIndex, newValue iotago.SlotIndex) iotago.SlotIndex { if currentValue != 0 { return currentValue diff --git a/pkg/protocol/engine/mempool/v1/mempool.go b/pkg/protocol/engine/mempool/v1/mempool.go index 3714b6b33..ee3085af8 100644 --- a/pkg/protocol/engine/mempool/v1/mempool.go +++ b/pkg/protocol/engine/mempool/v1/mempool.go @@ -483,7 +483,7 @@ func (m *MemPool[VoteRank]) setupTransaction(transaction *TransactionMetadata) { m.spendDAG.CreateSpender(transaction.ID()) unsubscribe := transaction.parentSpenderIDs.OnUpdate(func(appliedMutations ds.SetMutations[iotago.TransactionID]) { - if err := m.spendDAG.UpdateSpendParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { + if err := m.spendDAG.UpdateSpenderParents(transaction.ID(), appliedMutations.AddedElements(), appliedMutations.DeletedElements()); err != nil { panic(err) } }) From bf7c619f361fbb5ba2eafe7fb7c851dab678ec53 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 23 Nov 2023 15:37:51 +0800 Subject: [PATCH 18/18] Remove unused Spend related frontend --- components/dashboard/explorer_routes.go | 4 - .../build/app.48ab2676b5153e0e40b7.js | 1 - .../build/app.48ab2676b5153e0e40b7.js.map | 1 - .../build/app.7343ba1c945034668914.js | 1 + .../build/app.7343ba1c945034668914.js.map | 1 + .../dashboard/frontend/build/index.html | 2 +- .../build/vendor.146c9687b00ba21e0070.js.map | 1 - ...0070.js => vendor.673a0c611e9ac940cbe9.js} | 8 +- .../build/vendor.673a0c611e9ac940cbe9.js.map | 1 + .../frontend/src/app/components/Explorer.tsx | 4 - .../app/components/ExplorerAddressResult.tsx | 8 +- .../components/ExplorerBlockQueryResult.tsx | 41 +---- .../components/ExplorerOutputQueryResult.tsx | 8 +- .../components/ExplorerSpendQueryResult.tsx | 89 ----------- .../app/components/ExplorerSpendSearchbar.tsx | 53 ------- .../ExplorerTransactionMetadata.tsx | 1 - .../frontend/src/app/components/Root.tsx | 2 - .../frontend/src/app/stores/ExplorerStore.tsx | 67 --------- .../frontend/src/app/stores/SpendsStore.tsx | 142 ------------------ .../dashboard/frontend/src/app/utils/spend.ts | 21 --- components/dashboard/frontend/src/main.tsx | 3 - components/dashboard/type.go | 2 - 22 files changed, 14 insertions(+), 447 deletions(-) delete mode 100644 components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js delete mode 100644 components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map create mode 100644 components/dashboard/frontend/build/app.7343ba1c945034668914.js create mode 100644 components/dashboard/frontend/build/app.7343ba1c945034668914.js.map delete mode 100644 components/dashboard/frontend/build/vendor.146c9687b00ba21e0070.js.map rename components/dashboard/frontend/build/{vendor.146c9687b00ba21e0070.js => vendor.673a0c611e9ac940cbe9.js} (97%) create mode 100644 components/dashboard/frontend/build/vendor.673a0c611e9ac940cbe9.js.map delete mode 100644 components/dashboard/frontend/src/app/components/ExplorerSpendQueryResult.tsx delete mode 100644 components/dashboard/frontend/src/app/components/ExplorerSpendSearchbar.tsx delete mode 100644 components/dashboard/frontend/src/app/stores/SpendsStore.tsx delete mode 100644 components/dashboard/frontend/src/app/utils/spend.ts diff --git a/components/dashboard/explorer_routes.go b/components/dashboard/explorer_routes.go index ecb3a4384..ebc07a121 100644 --- a/components/dashboard/explorer_routes.go +++ b/components/dashboard/explorer_routes.go @@ -47,10 +47,6 @@ func setupExplorerRoutes(routeGroup *echo.Group) { routeGroup.GET("/output/:"+restapipkg.ParameterOutputID, getOutput) // routeGroup.GET("/output/:outputID/metadata", ledgerstateAPI.GetOutputMetadata) // routeGroup.GET("/output/:outputID/consumers", ledgerstateAPI.GetOutputConsumers) - // routeGroup.GET("/conflict/:spendID", ledgerstateAPI.GetConflict) - // routeGroup.GET("/conflict/:spendID/children", ledgerstateAPI.GetConflictChildren) - // routeGroup.GET("/conflict/:spendID/conflicts", ledgerstateAPI.GetConflictConflicts) - // routeGroup.GET("/conflict/:spendID/voters", ledgerstateAPI.GetConflictVoters) routeGroup.GET("/slot/commitment/:"+restapipkg.ParameterCommitmentID, getSlotDetailsByID) routeGroup.GET("/search/:search", func(c echo.Context) error { diff --git a/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js b/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js deleted file mode 100644 index 5094397e7..000000000 --- a/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d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zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2NnB4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NiA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},298:function(e,t,n){var r={"./af":107,"./af.js":107,"./ar":108,"./ar-dz":109,"./ar-dz.js":109,"./ar-kw":110,"./ar-kw.js":110,"./ar-ly":111,"./ar-ly.js":111,"./ar-ma":112,"./ar-ma.js":112,"./ar-sa":113,"./ar-sa.js":113,"./ar-tn":114,"./ar-tn.js":114,"./ar.js":108,"./az":115,"./az.js":115,"./be":116,"./be.js":116,"./bg":117,"./bg.js":117,"./bm":118,"./bm.js":118,"./bn":119,"./bn-bd":120,"./bn-bd.js":120,"./bn.js":119,"./bo":121,"./bo.js":121,"./br":122,"./br.js":122,"./bs":123,"./bs.js":123,"./ca":124,"./ca.js":124,"./cs":125,"./cs.js":125,"./cv":126,"./cv.js":126,"./cy":127,"./cy.js":127,"./da":128,"./da.js":128,"./de":129,"./de-at":130,"./de-at.js":130,"./de-ch":131,"./de-ch.js":131,"./de.js":129,"./dv":132,"./dv.js":132,"./el":133,"./el.js":133,"./en-au":134,"./en-au.js":134,"./en-ca":135,"./en-ca.js":135,"./en-gb":136,"./en-gb.js":136,"./en-ie":137,"./en-ie.js":137,"./en-il":138,"./en-il.js":138,"./en-in":139,"./en-in.js":139,"./en-nz":140,"./en-nz.js":140,"./en-sg":141,"./en-sg.js":141,"./eo":142,"./eo.js":142,"./es":143,"./es-do":144,"./es-do.js":144,"./es-mx":145,"./es-mx.js":145,"./es-us":146,"./es-us.js":146,"./es.js":143,"./et":147,"./et.js":147,"./eu":148,"./eu.js":148,"./fa":149,"./fa.js":149,"./fi":150,"./fi.js":150,"./fil":151,"./fil.js":151,"./fo":152,"./fo.js":152,"./fr":153,"./fr-ca":154,"./fr-ca.js":154,"./fr-ch":155,"./fr-ch.js":155,"./fr.js":153,"./fy":156,"./fy.js":156,"./ga":157,"./ga.js":157,"./gd":158,"./gd.js":158,"./gl":159,"./gl.js":159,"./gom-deva":160,"./gom-deva.js":160,"./gom-latn":161,"./gom-latn.js":161,"./gu":162,"./gu.js":162,"./he":163,"./he.js":163,"./hi":164,"./hi.js":164,"./hr":165,"./hr.js":165,"./hu":166,"./hu.js":166,"./hy-am":167,"./hy-am.js":167,"./id":168,"./id.js":168,"./is":169,"./is.js":169,"./it":170,"./it-ch":171,"./it-ch.js":171,"./it.js":170,"./ja":172,"./ja.js":172,"./jv":173,"./jv.js":173,"./ka":174,"./ka.js":174,"./kk":175,"./kk.js":175,"./km":176,"./km.js":176,"./kn":177,"./kn.js":177,"./ko":178,"./ko.js":178,"./ku":179,"./ku.js":179,"./ky":180,"./ky.js":180,"./lb":181,"./lb.js":181,"./lo":182,"./lo.js":182,"./lt":183,"./lt.js":183,"./lv":184,"./lv.js":184,"./me":185,"./me.js":185,"./mi":186,"./mi.js":186,"./mk":187,"./mk.js":187,"./ml":188,"./ml.js":188,"./mn":189,"./mn.js":189,"./mr":190,"./mr.js":190,"./ms":191,"./ms-my":192,"./ms-my.js":192,"./ms.js":191,"./mt":193,"./mt.js":193,"./my":194,"./my.js":194,"./nb":195,"./nb.js":195,"./ne":196,"./ne.js":196,"./nl":197,"./nl-be":198,"./nl-be.js":198,"./nl.js":197,"./nn":199,"./nn.js":199,"./oc-lnc":200,"./oc-lnc.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tk":223,"./tk.js":223,"./tl-ph":224,"./tl-ph.js":224,"./tlh":225,"./tlh.js":225,"./tr":226,"./tr.js":226,"./tzl":227,"./tzl.js":227,"./tzm":228,"./tzm-latn":229,"./tzm-latn.js":229,"./tzm.js":228,"./ug-cn":230,"./ug-cn.js":230,"./uk":231,"./uk.js":231,"./ur":232,"./ur.js":232,"./uz":233,"./uz-latn":234,"./uz-latn.js":234,"./uz.js":233,"./vi":235,"./vi.js":235,"./x-pseudo":236,"./x-pseudo.js":236,"./yo":237,"./yo.js":237,"./zh-cn":238,"./zh-cn.js":238,"./zh-hk":239,"./zh-hk.js":239,"./zh-mo":240,"./zh-mo.js":240,"./zh-tw":241,"./zh-tw.js":241};function s(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=a,e.exports=s,s.id=298},434:function(e,t,n){"use strict";n.r(t);var r=n(1),s=n(24),a=n(6),l=n(25),o=(n(297),n(285)),i=n(56),c=n(39),p=n(12),d=n(11),u=n(9),m=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let h=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Uptime: ",this.props.nodeStore.uptime)}};h=m([Object(a.b)("nodeStore"),a.c],h);var b=h,g=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let y=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Version: ",this.props.nodeStore.status.version)}};y=g([Object(a.b)("nodeStore"),a.c],y);var f=y,E=n(15),v=n(29),I={elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0},S=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const k=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let x=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Blocks Per Second"),r.createElement("small",null,"BPS: ",this.props.nodeStore.last_mps_metric.mps,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.mpsSeries,options:k})))}};x=S([Object(a.b)("nodeStore"),a.c],x);var j=x,O=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const w=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let D=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Current Tips"),r.createElement("small",null,"Tips: ",this.props.nodeStore.last_tips_metric.totaltips,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.tipsSeries,options:w})))}};D=O([Object(a.b)("nodeStore"),a.c],D);var R=D,_=n(2),C=n(28),N=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const T=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return C(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${C(Math.abs(e.value))}`}}}},I);let P=class extends r.Component{render(){let e=this.props.nodeStore.status.mem;return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Memory Usage"," ",C(e.heap_alloc)),r.createElement("small",null,"GC Cycles: ",e.num_gc," (Last Cycle: ",e.last_pause_gc/1e6,"ms) - "," ","Heap: "," ","[Obj: ",e.heap_objects,", In-Use: ",C(e.heap_sys-e.heap_idle),", Retained: ",C(e.heap_idle-e.heap_released),"]"),r.createElement(v.Line,{height:50,data:this.props.nodeStore.memSeries,options:T})))}};P=N([Object(a.b)("nodeStore"),a.c],P);var M=P,L=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const A=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},I);let B=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Component Counter Blocks Per Second"),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("small",null,"BPS: ",this.props.nodeStore.last_component_counter_metric.store,"."),r.createElement("small",null,"Rate Setter - Estimate: ",this.props.nodeStore.last_rate_setter_metric.estimate)),r.createElement(v.Line,{height:50,data:this.props.nodeStore.componentSeries,options:A})))}};B=L([Object(a.b)("nodeStore"),a.c],B);var z=B,H=n(14),F=n(20),V=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Z=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"TangleTime Synced: ",this.props.nodeStore.status.tangleTime.synced?"Yes":"No"),r.createElement("small",null,r.createElement("div",null,r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Accepted Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.acceptedBlockID},this.props.nodeStore.status.tangleTime.acceptedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.confirmedBlockID},this.props.nodeStore.status.tangleTime.confirmedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Slot:",this.props.nodeStore.status.tangleTime.confirmedSlot)),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Committed Slot:",this.props.nodeStore.status.tangleTime.committedSlot)),r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.ATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.CTT/1e6),"dd.mm.yyyy HH:MM:ss"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Relative Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Relative Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RCTT/1e6),"dd.mm.yyyy HH:MM:ss")))))))}};Z=V([Object(a.b)("nodeStore"),a.c],Z);var U=Z,W=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let J=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Bootstrapped: ",this.props.nodeStore.status.tangleTime.bootstrapped?"Yes":"No")}};J=W([Object(a.b)("nodeStore"),a.c],J);var G=J,q=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let X=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Dashboard"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Node: ",this.props.nodeStore.status.id),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement(_.a.Item,null,r.createElement(b,null)))),r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement(_.a.Item,null,r.createElement(G,null)))),r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement(_.a.Item,null,r.createElement(f,null))))))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(U,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(j,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(z,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(M,null))))}};X=q([Object(a.b)("nodeStore"),a.c],X);var Q=n(16),K=n(23),$=n(22),Y=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ee=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Address or Block ID","aria-label":"Address or Block ID","aria-describedby":"basic-addon1",value:e,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:t})))))}};ee=Y([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],ee);var te=n(71),ne=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let re=class extends r.Component{render(){let{blksLiveFeed:e}=this.props.explorerStore;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Live Feed"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{height:"500px",overflow:"auto"}},r.createElement("h6",null,"Blocks"),r.createElement(te.a,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("td",null,"Id"),r.createElement("td",null,"Payload Type"))),r.createElement("tbody",null,e))))))))}};re=ne([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],re);var se=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ae=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.txID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/transaction/"+this.txID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Transaction ID","aria-label":"Transaction ID","aria-describedby":"basic-addon1",value:this.txID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ae=se([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],ae);var le=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let oe=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.outputID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/output/"+this.outputID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Output ID","aria-label":"Output ID","aria-describedby":"basic-addon1",value:this.outputID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};oe=le([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],oe);var ie=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ce=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.spendID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/spend/"+this.spendID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement($.a,{className:"mb-3"},r.createElement(K.a,{placeholder:"Spend ID","aria-label":"Spend ID","aria-describedby":"basic-addon1",value:this.spendID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};ce=ie([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],ce);var pe=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let de=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("p",null,"Search for addresses, blocks, transactions, outputs and spends."))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(ee,null)),r.createElement(u.a,null,r.createElement(ae,null))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(oe,null)),r.createElement(u.a,null,r.createElement(ce,null))),r.createElement(re,null),r.createElement("small",null,"This explorer implementation is heavily inspired by ",r.createElement("a",{href:"https://thetangle.org"},"thetangle.org"),"."))}};de=pe([Object(a.b)("nodeStore"),a.c],de);var ue=n(288),me=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let he=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(ue.a,{inline:!0,as:"div"},r.createElement(K.a,{type:"text",onChange:this.updateSearch,placeholder:"Search the Tangle...",value:e,className:" mr-sm-2",disabled:t,onKeyUp:this.executeSearch}))}};he=me([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],he);var be,ge=n(17),ye=n(44),fe=n(3);!function(e){e[e.Status=0]="Status",e[e.BPSMetrics=1]="BPSMetrics",e[e.Block=2]="Block",e[e.NeighborStats=3]="NeighborStats",e[e.ComponentCounterMetrics=4]="ComponentCounterMetrics",e[e.TipsMetrics=5]="TipsMetrics",e[e.Vertex=6]="Vertex",e[e.TXAccepted=7]="TXAccepted",e[e.TipInfo=8]="TipInfo",e[e.Mana=9]="Mana",e[e.ManaMapOverall=10]="ManaMapOverall",e[e.ManaMapOnline=11]="ManaMapOnline",e[e.BlkManaDashboardAddress=12]="BlkManaDashboardAddress",e[e.RateSetter=13]="RateSetter",e[e.SpendSet=14]="SpendSet",e[e.Spend=15]="Spend",e[e.SlotInfo=16]="SlotInfo"}(be||(be={}));let Ee={};function ve(e,t){Ee[e]=t}function Ie(e){delete Ee[e]}var Se,ke,xe,je;!function(e){e[e.TaggedData=0]="TaggedData",e[e.Transaction=1]="Transaction",e[e.Faucet=3]="Faucet"}(Se||(Se={}));class Oe{}class we{}function De(e){switch(e){case Se.TaggedData:return"TaggedData";case Se.Transaction:return"Transaction";case Se.Faucet:return"Faucet";default:return"Unknown"}}class Re extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.token.id},r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",this.props.token.id),r.createElement(_.a.Item,null,"Amount: ",this.props.token.amount)))}}class _e extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.address},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address Type: ",this.props.unlock.address.type)),r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address: ",this.props.unlock.address.pubKeyHash)))}}class Ce extends r.Component{render(){return this.props.unlock.unixTime&&r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.unixTime},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}class Ne extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(_.a.Item,null,"Amount: ",this.props.unlock.amount)))}}class Te extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(_.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}function Pe(e){switch(e.type){case ke.Address:case ke.StateControllerAddress:case ke.GovernorAddress:return r.createElement(_e,{unlock:e});case ke.StorageDepositReturn:return r.createElement(Ne,{unlock:e});case ke.Expiration:return r.createElement(Te,{unlock:e});case ke.Timelock:return r.createElement(Ce,{unlock:e})}}!function(e){e[e.Address=0]="Address",e[e.StorageDepositReturn=1]="StorageDepositReturn",e[e.Timelock=2]="Timelock",e[e.Expiration=3]="Expiration",e[e.StateControllerAddress=4]="StateControllerAddress",e[e.GovernorAddress=5]="GovernorAddress",e[e.ImmutableAlias=6]="ImmutableAlias"}(ke||(ke={}));class Me extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.address},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address: ",this.props.feature.address)))}}class Le extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.data},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Data: ",this.props.feature.data)))}}class Ae extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.tag},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Data: ",this.props.feature.tag)))}}function Be(e){switch(e.type){case xe.Sender:case xe.Issuer:return r.createElement(Me,{feature:e.feature});case xe.Metadata:return r.createElement(Le,{feature:e.feature});case xe.Tag:return r.createElement(Ae,{feature:e.feature})}}!function(e){e[e.Sender=0]="Sender",e[e.Issuer=1]="Issuer",e[e.Metadata=2]="Metadata",e[e.Tag=3]="Tag"}(xe||(xe={}));class ze extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: BasicOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class He extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,{style:{wordBreak:"break-word"}},r.createElement(_.a.Item,null,"Type: AliasOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(_.a.Item,null,"AliasID: ",this.props.output.aliasId),r.createElement(_.a.Item,null,"StateIndex: ",this.props.output.stateIndex),r.createElement(_.a.Item,null,"State Metadata: ",this.props.output.stateMetadata," "),r.createElement(_.a.Item,null,"Foundry Counter: ",this.props.output.foundryCounter),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Fe extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: FoundryOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(_.a.Item,null,"Serial Number: ",this.props.output.serialNumber),r.createElement(_.a.Item,null,"Token Scheme: ",this.props.output.tokenScheme),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Ve extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: FoundryOutput"),r.createElement(_.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(_.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(_.a.Item,null,"NFT ID: ",this.props.output.nftId),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(Re,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Pe(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Be(e)),r.createElement(_.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(_.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}function Ze(e){let t=e.outputID;switch(e.type){case je.Basic:return r.createElement(ze,{output:e.output,id:t});case je.Alias:return r.createElement(He,{output:e.output,id:t});case je.Foundry:return r.createElement(Fe,{output:e.output,id:t});case je.NFT:return r.createElement(Ve,{output:e.output,id:t});default:return}}!function(e){e[e.Treasury=2]="Treasury",e[e.Basic=3]="Basic",e[e.Alias=4]="Alias",e[e.Foundry=5]="Foundry",e[e.NFT=6]="NFT"}(je||(je={}));var Ue=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},We=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};const Ge="1111111111111111111111111111111111111111111111111111111111111111";class qe{}var Xe;!function(e){e[e.NotFound=1]="NotFound",e[e.BadRequest=2]="BadRequest"}(Xe||(Xe={}));class Qe{constructor(e){this.latest_blocks=[],this.blk=null,this.addr=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.spend=null,this.spendChildren=null,this.spendSpends=null,this.spendVoters=null,this.tips=null,this.slotInfo=new qe,this.query_loading=!1,this.query_err=null,this.search="",this.search_result=null,this.searching=!1,this.searchAny=()=>Je(this,void 0,void 0,(function*(){this.updateSearching(!0);try{let e=yield fetch("/api/search/"+this.search),t=yield e.json();this.updateSearchResult(t)}catch(e){this.updateQueryError(e)}})),this.resetSearch=()=>{this.search_result=null,this.searching=!1},this.updateSearchResult=e=>{this.search_result=e,this.searching=!1;let t=this.search;this.search="",this.search_result.block?this.routerStore.push("/explorer/block/"+t):this.search_result.address?this.routerStore.push("/explorer/address/"+t):this.routerStore.push("/explorer/404/"+t)},this.updateSearch=e=>{this.search=e},this.updateSearching=e=>this.searching=e,this.searchBlock=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/block/"+e);this.updateBlock(t)})),this.searchAddress=e=>Je(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/address/"+e);this.updateAddress(t)})),this.getSlotDetails=e=>Je(this,void 0,void 0,(function*(){yield this.getSlotInfo(e)})),this.getTransaction=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/transaction/"+e);for(let e=0;eJe(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/attachments`);this.txAttachments=t})),this.getTransactionMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/metadata`);this.txMetadata=t})),this.getOutput=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/output/"+e);this.output=t})),this.getOutputMetadata=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/metadata`);this.outputMetadata=t})),this.getOutputConsumers=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/consumers`);this.outputConsumers=t})),this.getPendingMana=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/mana/pending?OutputID="+e);this.pendingMana=t})),this.getSpend=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/spend/"+e);this.spend=t})),this.getSpendChildren=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/spend/${e}/children`);this.spendChildren=t})),this.getSpendSpends=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/spend/${e}/spends`);this.spendSpends=t})),this.getSpendVoters=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/spend/${e}/voters`);this.spendVoters=t})),this.getSlotInfo=e=>Je(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/slot/commitment/"+e);this.slotInfo=t})),this.getTips=()=>Je(this,void 0,void 0,(function*(){const e=yield this.fetchJson("get","/api/tips");this.tips=e})),this.reset=()=>{this.blk=null,this.query_err=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.spend=null,this.spendChildren=null,this.spendSpends=null,this.tips=null,this.slotInfo=new qe},this.updateAddress=e=>{this.addr=e,this.query_err=null,this.query_loading=!1},this.updateBlock=e=>{switch(this.blk=e,this.blk.spendIDs=this.blk.spendIDs?this.blk.spendIDs:[],this.blk.addedSpendIDs=this.blk.addedSpendIDs?this.blk.addedSpendIDs:[],this.blk.subtractedSpendIDs=this.blk.subtractedSpendIDs?this.blk.subtractedSpendIDs:[],this.blk.strongChildren=this.blk.strongChildren?this.blk.strongChildren:[],this.blk.weakChildren=this.blk.weakChildren?this.blk.weakChildren:[],this.blk.shallowLikeChildren=this.blk.shallowLikeChildren?this.blk.shallowLikeChildren:[],this.blk.strongParents=this.blk.strongParents?this.blk.strongParents:[],this.blk.weakParents=this.blk.weakParents?this.blk.weakParents:[],this.blk.shallowLikedParents=this.blk.shallowLikedParents?this.blk.shallowLikedParents:[],this.query_err=null,this.query_loading=!1,e.payloadType){case Se.Transaction:case Se.TaggedData:this.payload=e.payload;break;case Se.Faucet:this.payload=e.payload;default:this.payload=e.payload}},this.updateQueryLoading=e=>this.query_loading=e,this.updateQueryError=e=>{this.query_err=e,this.query_loading=!1,this.searching=!1},this.addLiveFeedBlock=e=>{-1===this.latest_blocks.findIndex(t=>t.id==e.id)&&(this.latest_blocks.length>=50&&this.latest_blocks.shift(),this.latest_blocks.push(e))},this.routerStore=e,ve(be.Block,this.addLiveFeedBlock)}get blksLiveFeed(){let e=[];for(let t=this.latest_blocks.length-1;t>=0;t--){let n=this.latest_blocks[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id)),r.createElement("td",null,De(n.payload_type))))}return e}get tipsList(){let e=[];if(this.tips)for(let t=0;t=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let et=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,e.content_title,": "," ",e.content)))}};et=Ye([Object(a.b)("explorerStore"),a.c],et);var tt,nt=n(0),rt=n(282);!function(e){e[e.Ed25519=0]="Ed25519",e[e.BLS=1]="BLS"}(tt||(tt={}));class st extends r.Component{render(){let e=this.props.signature;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Public Key: ",e.publicKey),r.createElement(_.a.Item,null,"Signature: ",e.signature)))))}}class at extends r.Component{renderSignatureComponent(){switch(this.props.block.signatureType){case tt.Ed25519:return r.createElement(st,{signature:this.props.block.signature})}}render(){let e=this.props.block;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,"Index: ",r.createElement(Q.a,{variant:"primary"},this.props.key),r.createElement(_.a,null,r.createElement(_.a.Item,null,"Type: ",e.type),e.signatureType&&r.createElement(_.a.Item,null,"Signature Type: ",function(e){switch(e){case tt.Ed25519:return"Ed25519 Signature";case tt.BLS:return"BLS Signature";default:return"Unknown Signature Type"}}(e.signatureType)),this.renderSignatureComponent())))}}const lt={maxHeight:"1000px",overflow:"auto",width:"47%",fontSize:"85%"};class ot extends r.Component{render(){let e=this.props.txID,t=this.props.tx;return t&&e&&r.createElement("div",null,r.createElement("h4",null,"Transaction"),r.createElement("p",null," ",e," "),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginTop:"10px",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Transaction Essence")),r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",r.createElement("a",{href:"/explorer/transaction/"+e}," ",e)),r.createElement(_.a.Item,null,"Network ID: ",t.networkId),r.createElement(_.a.Item,null,"Creation Time: ",t.creationSlot),r.createElement(_.a.Item,null,r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",{className:"align-self-start input-output-list",style:lt},r.createElement("span",null,"Inputs"),r.createElement("hr",null),t.inputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),r.createElement("div",{className:"mb-2",key:"input"+t},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Output ID: ",e.referencedOutputID.hex)))))),r.createElement(nt.b.Provider,{value:{color:"#00a0ff",size:"2em"}},r.createElement("div",null,r.createElement(rt.a,null))),r.createElement("div",{style:lt},r.createElement("span",null,"Outputs"),r.createElement("hr",null),t.outputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),Ze(e)))))),t.payload&&r.createElement(_.a.Item,null,"Data payload: ",t.payload)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Unlock Blocks")),r.createElement(r.Fragment,null,t.unlocks.map((e,t)=>r.createElement(at,{block:e,key:t}))))))}}var it=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ct=class extends r.Component{render(){let{payload:e,blk:t}=this.props.explorerStore,n=t.txId,s=e;return r.createElement(p.a,null,r.createElement(ot,{txID:n,tx:s}))}};function pt(e){switch(e){case dt:return"MasterSpendID";case ut:return"UndefinedSpendID";case mt:return"LazyBookedSpendsSpendID";case ht:return"InvalidSpendID";default:return e}}ct=it([Object(a.b)("explorerStore"),a.c],ct);const dt="4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM",ut="11111111111111111111111111111111",mt="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF",ht="JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG";var bt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let gt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Address: ",e.address),r.createElement(_.a.Item,null,"Access Mana Pledge ID: ",e.accessManaPledgeID),r.createElement(_.a.Item,null,"Consensus Mana Pledge ID: ",e.consensusManaPledgeID),r.createElement(_.a.Item,null,"Nonce: ",e.nonce)))))}};gt=bt([Object(a.b)("explorerStore"),a.c],gt);var yt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let ft=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Tag: ",e.tag),r.createElement(_.a.Item,null,"Data: ",e.data)))))}};ft=yt([Object(a.b)("explorerStore"),a.c],ft);var Et=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let vt=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchBlock(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchBlock(this.props.match.params.id),null}getPayloadType(){return De(this.props.explorerStore.blk.payloadType)}renderPayload(){switch(this.props.explorerStore.blk.payloadType){case Se.Transaction:return this.props.explorerStore.blk.objectivelyInvalid?r.createElement(et,null):r.createElement(ct,null);case Se.TaggedData:return r.createElement(ft,null);case Se.Faucet:return r.createElement(gt,null);default:return r.createElement(et,null)}}render(){let{id:e}=this.props.match.params,{blk:t,query_loading:n,query_err:s}=this.props.explorerStore;return e===Ge?r.createElement(p.a,null,r.createElement("h3",null,"Genesis Block"),r.createElement("p",null,"In the beginning there was the genesis.")):s?r.createElement(p.a,null,r.createElement("h3",null,"Block not available - 404"),r.createElement("p",null,"Block with ID ",e," not found.")):r.createElement(p.a,null,r.createElement("h3",null,"Block"),r.createElement("p",null,e," "," ",t&&r.createElement(r.Fragment,null,r.createElement("br",null),r.createElement("span",null,r.createElement(Q.a,{variant:"light",style:{marginRight:10}},"Issuance Time: ",F(new Date(1e3*t.issuanceTimestamp),"dd.mm.yyyy HH:MM:ss")),r.createElement(Q.a,{variant:"light"},"Solidification Time: ",F(new Date(1e3*t.solidificationTimestamp),"dd.mm.yyyy HH:MM:ss"))))),t&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Payload Type: ",this.getPayloadType()),r.createElement(_.a.Item,null,"Sequence Number: ",t.sequenceNumber),r.createElement(_.a.Item,null,"spendIDs:",r.createElement(_.a,null,t.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"AddedspendIDs:",r.createElement(_.a,null,t.addedSpendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"AddedSpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"SubtractedspendIDs:",r.createElement(_.a,null,t.subtractedSpendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SubtractedSpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"Solid: ",t.solid?"Yes":"No"),r.createElement(_.a.Item,null,"Scheduled: ",t.scheduled?"Yes":"No"),r.createElement(_.a.Item,null,"Booked: ",t.booked?"Yes":"No"),r.createElement(_.a.Item,null,"Orphaned: ",t.orphaned?"Yes":"No"),r.createElement(_.a.Item,null,"Objectively Invalid: ",t.objectivelyInvalid?"Yes":"No"),r.createElement(_.a.Item,null,"Subjectively Invalid: ",t.subjectivelyInvalid?"Yes":"No"),r.createElement(_.a.Item,null,"Acceptance: ",t.acceptance?"Yes":"No"),r.createElement(_.a.Item,null,"Acceptance Time: ",F(new Date(1e3*t.acceptanceTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(_.a.Item,null,"Confirmation: ",t.confirmation?"Yes":"No"),r.createElement(_.a.Item,null,"Confirmation Time: ",F(new Date(1e3*t.confirmationTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(_.a.Item,null,"Confirmation by slot: ",t.confirmationBySlot?"Yes":"No"),r.createElement(_.a.Item,null,"Confirmation by slot time: ",F(new Date(1e3*t.confirmationBySlotTime),"dd.mm.yyyy HH:MM:ss"))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Slot Commitment"),r.createElement(_.a,null,r.createElement(_.a.Item,null,"CommitmentID: ",t.commitmentID),r.createElement(_.a.Item,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"Index: ",t.commitment.index),r.createElement(_.a.Item,null,"prevID: ",t.commitment.prevID),r.createElement(_.a.Item,null,"rootsID: ",t.commitment.rootsID),r.createElement(_.a.Item,null,"Cumulative Weight: ",t.commitment.cumulativeWeight))),r.createElement(_.a.Item,null,"LatestConfirmedSlot: ",t.latestConfirmedSlot)))),!!t.rank&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Markers"),r.createElement(_.a,null,r.createElement(_.a.Item,null,"Rank: ",t.rank),r.createElement(_.a.Item,null,"SequenceID: ",t.sequenceID),r.createElement(_.a.Item,null,"PastMarkerGap: ",t.pastMarkerGap),r.createElement(_.a.Item,null,"IsPastMarker: ",t.isPastMarker?"Yes":"No"),r.createElement(_.a.Item,null,"Past markers: ",t.pastMarkers)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,r.createElement(_.a.Item,null,"IssuerID: ",t.issuerID),r.createElement(_.a.Item,{style:{overflow:"auto"}},"Block Signature: ",t.signature)))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.strongParents.map((e,n)=>r.createElement(_.a.Item,{key:"Strong Parent"+n+1,className:"text-break"},"Strong Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongParents[n]},t.strongParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.weakParents.map((e,n)=>r.createElement(_.a.Item,{key:"Weak Parent"+n+1,className:"text-break"},"Weak Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakParents[n]},t.weakParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.shallowLikedParents.map((e,n)=>r.createElement(_.a.Item,{key:"Shallow Liked Parent"+n+1,className:"text-break"},"Shallow Liked Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikedParents[n]},t.shallowLikedParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.strongChildren.map((e,n)=>r.createElement(_.a.Item,{key:"Strong Child"+n+1,className:"text-break"},"Strong Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongChildren[n]},t.strongChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.weakChildren.map((e,n)=>r.createElement(_.a.Item,{key:"Weak Child"+n+1,className:"text-break"},"Weak Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakChildren[n]},t.weakChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(_.a,null,t.shallowLikeChildren.map((e,n)=>r.createElement(_.a.Item,{key:"ShallowLike Child"+n+1,className:"text-break"},"ShallowLike Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikeChildren[n]},t.shallowLikeChildren[n])))))),r.createElement(d.a,{className:"mb-3",style:{marginTop:"20px",marginBottom:"20px"}},r.createElement(u.a,null,r.createElement("h3",null,"Payload"))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,this.renderPayload()))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};vt=Et([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],vt);var It=n(289);function St(e){let t="",n=Math.round(e);return t=n<1e3?n.toString(10)+" m":n<1e6?(n/1e3).toFixed(3)+" Km":n<1e9?(n/1e6).toFixed(3)+" Mm":n<1e12?(n/1e9).toFixed(3)+" Gm":n<1e15?(n/1e12).toFixed(3)+" Tm":(n/1e15).toFixed(3)+" Pm",t}var kt=n(281),xt=n(99),jt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ot=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchAddress(this.props.match.params.id)}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchAddress(this.props.match.params.id),null}render(){let{id:e}=this.props.match.params,{addr:t,query_loading:n,query_err:s}=this.props.explorerStore,a=[],l=[],o=[];if(s)return r.createElement(p.a,null,r.createElement("h3",null,"Address not available - 404"),r.createElement("p",null,"Address ",e," not found."));if(t){t.explorerOutputs.forEach(e=>{e.metadata.consumerCount>0?a.push(e):l.push(e)});let e=(e,t)=>t.txTimestamp===e.txTimestamp?t.id.transactionID==e.id.transactionID?t.id.outputIndex-e.id.outputIndex:t.id.transactionID.localeCompare(e.id.transactionID):t.txTimestamp-e.txTimestamp;l.sort(e),a.sort(e)}return r.createElement(p.a,null,r.createElement("h3",{style:{marginBottom:"40px"}},"Address ",r.createElement("strong",null,e)," ",null!==t&&r.createElement("span",null,"(",t.explorerOutputs.length," Outputs)")),null!==t?r.createElement(r.Fragment,null,null!==t.explorerOutputs&&100===t.explorerOutputs.length&&r.createElement(It.a,{variant:"warning"},"Max. 100 outputs are shown."),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:7},r.createElement(_.a,null,r.createElement("h4",null,"Available Balances"),0===o.length?"There are no balances currently available.":r.createElement("div",null,r.createElement(kt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:9},r.createElement("strong",null,"Color")),r.createElement(u.a,null,r.createElement("strong",null,"Balance")))),o)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement("h4",null,"Unspent Outputs"),0===l.length?"There are no unspent outputs currently available.":r.createElement("div",null,l.map(e=>r.createElement(wt,{output:e})))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,{variant:"flush"},r.createElement("h4",null,"Spent Outputs"),0===a.length?"There are no spent outputs currently available.":r.createElement("div",null,a.map(e=>r.createElement(wt,{output:e}))))))):r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement($e.a,{animation:"border"}))))}};Ot=jt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Ot);class wt extends r.Component{constructor(e){super(e),this.state={enabled:!1}}render(){return r.createElement(_.a.Item,null,r.createElement(xt.a,{variant:Rt(this.props.output.output.type),onClick:()=>{this.setState({enabled:!this.state.enabled})},block:!0},r.createElement(d.a,null,r.createElement(u.a,{xs:6,style:{textAlign:"left"}},this.props.output.id.base58," "),r.createElement(u.a,{style:{textAlign:"left"}},function(e){switch(e){case je.Basic:return"Basic Output";case je.Alias:return"Alias Output";case je.Foundry:return"Foundry Output";case je.NFT:return"NFT Output";default:return}}(this.props.output.output.type)," "),r.createElement(u.a,{style:{textAlign:"left"}},new Date(1e3*this.props.output.txTimestamp).toLocaleString()))),r.createElement(d.a,{style:{fontSize:"90%"}},r.createElement(u.a,null,this.state.enabled?Ze(this.props.output.output):null),r.createElement(u.a,null,this.state.enabled?r.createElement(Dt,{metadata:this.props.output.metadata,timestamp:this.props.output.txTimestamp,pendingMana:this.props.output.pendingMana}):null)))}}class Dt extends r.Component{render(){let e=this.props.metadata,t=this.props.timestamp,n=this.props.pendingMana;return r.createElement(_.a,null,"spendIDs:",r.createElement(_.a,null,e.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e))))),r.createElement(_.a.Item,null,"Pending mana: ",St(n)),r.createElement(_.a.Item,null,"Timestamp: ",new Date(1e3*t).toLocaleString()),r.createElement(_.a.Item,null,"Consumer Count: ",e.consumerCount),e.confirmedConsumer&&r.createElement(_.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+e.confirmedConsumer},e.confirmedConsumer)," "))}}let Rt=e=>{switch(e){case je.Basic:case je.Alias:return"light";case je.Foundry:return"success";case je.NFT:return"info";default:return"danger"}};var _t=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ct=class extends r.Component{render(){let{search:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer 404"),r.createElement("p",null,"The search via '",e,"' did not yield any results."))}};Ct=_t([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Ct);var Nt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};const Tt=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return C(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${C(Math.abs(e.value))}`}}}},I);let Pt=class extends r.Component{render(){let e=this.props.nodeStore.neighbor_metrics.get(this.props.identity),t=e.current;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,r.createElement("h5",null,t.id)),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,{variant:"flush",as:"small"},r.createElement(_.a.Item,null,"Origin:"," ",t.connection_origin))),r.createElement(u.a,null,r.createElement(_.a,{variant:"flush",as:"small"},r.createElement(_.a.Item,null,"Address: ",t.address)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h6",null,"Network (Tx/Rx)"),r.createElement(Q.a,{pill:!0,variant:"light"},"Total: ",t.packets_written," / ",t.packets_read)," ",r.createElement(Q.a,{pill:!0,variant:"light"},"Current: ",C(e.currentNetIO&&e.currentNetIO.tx)," / ",C(e.currentNetIO&&e.currentNetIO.rx)),r.createElement(v.Line,{height:30,data:e.netIOSeries,options:Tt})))))))}};Pt=Nt([Object(a.b)("nodeStore"),a.c],Pt);var Mt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Lt=class extends r.Component{render(){let e=[];return this.props.nodeStore.neighbor_metrics.forEach((t,n)=>{e.push(r.createElement(Pt,{key:n,identity:n}))}),r.createElement(p.a,null,r.createElement("h3",null,"Neighbors ",e.length>0&&r.createElement("span",null,"(",e.length,")")),r.createElement("p",null,"Currently connected neighbors."),e)}};Lt=Mt([Object(a.b)("nodeStore"),a.c],Lt);var At=n(57),Bt=n(103),zt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ht=class extends r.Component{constructor(){super(...arguments),this.updateVerticesLimit=e=>{this.props.visualizerStore.updateVerticesLimit(e.target.value)},this.pauseResumeVisualizer=e=>{this.props.visualizerStore.pauseResume()},this.updateSearch=e=>{this.props.visualizerStore.updateSearch(e.target.value)},this.searchAndHighlight=e=>{"Enter"===e.key&&this.props.visualizerStore.searchAndHighlight()},this.toggleBackgroundDataCollection=()=>{this.props.nodeStore.collecting?this.props.nodeStore.unregisterHandlers():this.props.nodeStore.registerHandlers()}}componentDidMount(){this.props.visualizerStore.start()}componentWillUnmount(){this.props.visualizerStore.stop(),this.props.nodeStore.registerHandlers()}render(){let{vertices:e,finalized_count:t,selected:n,verticesLimit:s,tips_count:a,paused:l,search:o}=this.props.visualizerStore,{last_mps_metric:i,collecting:c}=this.props.nodeStore;return r.createElement(p.a,null,r.createElement("h3",null,"Visualizer"),r.createElement(d.a,{className:"mb-1"},r.createElement(u.a,{xs:5},r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Vertices Limit")),r.createElement(K.a,{placeholder:"limit",type:"number",value:s.toString(),onChange:this.updateVerticesLimit,"aria-label":"vertices-limit","aria-describedby":"vertices-limit"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement($.a.Prepend,null,r.createElement($.a.Text,{id:"vertices-limit"},"Search Vertex")),r.createElement(K.a,{placeholder:"search",type:"text",value:o,onChange:this.updateSearch,"aria-label":"vertices-search",onKeyUp:this.searchAndHighlight,"aria-describedby":"vertices-search"})),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Ensures that only data needed for the visualizer is collected."))},r.createElement(xt.a,{variant:"outline-secondary",onClick:this.toggleBackgroundDataCollection,size:"sm"},c?"Stop Background Data Collection":"Collect Background data")),r.createElement("br",null)),r.createElement($.a,{className:"mb-1",size:"sm"},r.createElement(Bt.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(At.a,{id:"popover-basic"},r.createElement(At.a.Content,null,"Pauses/resumes rendering the graph."))},r.createElement(xt.a,{onClick:this.pauseResumeVisualizer,size:"sm",variant:"outline-secondary"},l?"Resume Rendering":"Pause Rendering")))),r.createElement(u.a,{xs:{span:5,offset:2}},r.createElement("p",null,r.createElement(Q.a,{pill:!0,style:{background:"#b9b7bd",color:"white"}},"BLK Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#6c71c4",color:"white"}},"BLK Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#393e46",color:"white"}},"TX Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#fad02c",color:"white"}},"TX Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#cb4b16",color:"white"}},"Tip")," ",r.createElement(Q.a,{pill:!0,style:{background:"#b58900",color:"white"}},"Unknown"),r.createElement("br",null),"Vertices: ",e.size,", Tips: ",a,", Confirmed/UnConfirmed: ",t,"/",e.size-t,","," ","BPS: ",i.mps,r.createElement("br",null),"Selected: ",n?r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id.substr(0,10)):"-",r.createElement("br",null),n?n.strongParents&&r.createElement("span",null," Strong:"," ",n.strongParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.weakParents&&r.createElement("span",null," Weak:"," ",n.weakParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.shallowLikedParents&&r.createElement("span",null," Shallow Liked:"," ",n.shallowLikedParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):""))),r.createElement("div",{className:"visualizer",style:{zIndex:-1,position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#ededed"},id:"visualizer"}))}};Ht=zt([Object(a.b)("visualizerStore"),Object(a.b)("nodeStore"),a.c],Ht);var Ft=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Vt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTips()}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{tipsList:e}=this.props.explorerStore;return r.createElement(p.a,null,r.createElement("h3",null,"Tips"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BlockID"))),r.createElement("tbody",null,e)))}};Vt=Ft([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Vt);var Zt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Ut=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransaction(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,tx:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Transaction not available - 404"),r.createElement("p",null,"Transaction with ID ",e," not found.")):r.createElement(ot,{txID:e,tx:n})}};Ut=Zt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Ut);var Wt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Jt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionMetadata(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,txMetadata:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Metadata"),r.createElement("p",null," Metadata for transaction ID ",e," not found.")):r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Metadata"),n&&r.createElement(_.a,null,r.createElement(_.a.Item,null,"SpendIDs:",r.createElement(_.a,null,n.spendIDs&&n.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement("a",{href:"/explorer/transaction/"+e},e))))),r.createElement(_.a.Item,null,"Booked: ",n.booked.toString()),r.createElement(_.a.Item,null,"Confirmation State: ",n.confirmationState)))}};Jt=Wt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Jt);var Gt=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let qt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionAttachments(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txAttachments:e}=this.props.explorerStore;return r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Attachments"),e&&e.blockIDs&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(_.a,null,e.blockIDs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))}};qt=Gt([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],qt);class Xt extends r.Component{render(){let{id:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement(Ut,{txId:e}),r.createElement(Jt,{txId:e}),r.createElement(qt,{txId:e}))}}var Qt;function Kt(e){switch(e){case Qt.Undefined:return"Undefined";case Qt.Rejected:return"Rejected";case Qt.Pending:return"Pending";case Qt.Accepted:return"Accepted";case Qt.Confirmed:return"Confirmed";default:return"Undefined Confirmation State"}}!function(e){e[e.Undefined=0]="Undefined",e[e.Rejected=1]="Rejected",e[e.Pending=2]="Pending",e[e.Accepted=3]="Accepted",e[e.Confirmed=4]="Confirmed"}(Qt||(Qt={}));var $t=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let Yt=class extends r.Component{componentDidMount(){this.props.explorerStore.getOutput(this.props.match.params.id),this.props.explorerStore.getPendingMana(this.props.match.params.id),this.props.explorerStore.getOutputMetadata(this.props.match.params.id),this.props.explorerStore.getOutputConsumers(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,output:n,pendingMana:s,outputMetadata:a,outputConsumers:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Output not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Output"),n&&r.createElement("div",{className:"mb-2"},Ze(n),r.createElement(_.a,null,s&&r.createElement(_.a.Item,null,"Pending Mana",r.createElement("hr",null),r.createElement("div",null,"Value: ",St(s.mana)),r.createElement("div",null,"Timestamp: ",new Date(1e3*s.timestamp).toLocaleString())))),r.createElement("h4",null,"Metadata"),a&&r.createElement("div",{className:"mb-2"},r.createElement(_.a,null,r.createElement(_.a.Item,null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+a.outputID.transactionID},a.outputID.transactionID)," "),"spendIDs:",r.createElement(_.a,null,a.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement(H.Link,{to:"/explorer/spend/"+e},pt(e))))),r.createElement(_.a.Item,null,"Consumer Count: ",a.consumerCount),r.createElement(_.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+a.confirmedConsumer},a.confirmedConsumer)," "),r.createElement(_.a.Item,null,"Confirmation State: ",Kt(a.confirmationState)),r.createElement(_.a.Item,null,"Confirmation State Time: ",new Date(1e3*a.confirmationStateTime).toLocaleString()))),r.createElement("h4",null,"Consumers"),l&&r.createElement("div",null,r.createElement(_.a,null,l.consumers.map((e,t)=>{return r.createElement(_.a.Item,{key:t},r.createElement("div",null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+e.transactionID},e.transactionID)),r.createElement("div",null,"Valid: ","true"===(n=e.valid)?r.createElement(Q.a,{variant:"success"},"True"):"false"===n?r.createElement(Q.a,{variant:"danger"},"False"):r.createElement(Q.a,{variant:"warning"},"Maybe")," "));var n}))))}};Yt=$t([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],Yt);var en=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let tn=class extends r.Component{componentDidMount(){this.props.explorerStore.getSpend(this.props.match.params.id),this.props.explorerStore.getSpendChildren(this.props.match.params.id),this.props.explorerStore.getSpendSpends(this.props.match.params.id),this.props.explorerStore.getSpendVoters(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,spend:n,spendChildren:s,spendSpends:a,spendVoters:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Spend not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Spend"),n&&r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",pt(n.id)),r.createElement(_.a.Item,null,"Parents:",r.createElement(_.a,null,n.parents.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/spend/"+e},pt(e)))))),r.createElement(_.a.Item,null,"Spends:",n.spendIDs&&r.createElement(_.a,null,n.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))),r.createElement(_.a.Item,null,"ConfirmationState: ",Kt(n.confirmationState)),r.createElement(_.a.Item,null," Children:",s&&r.createElement(_.a,null,s.childSpends.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/spend/"+e.spendID},pt(e.spendID)))))),r.createElement(_.a.Item,null," Spends:",a&&r.createElement(_.a,null,a.spends.map((e,t)=>r.createElement("div",{key:t},"OutputID: ",r.createElement("a",{href:"/explorer/output/"+e.outputID.base58},e.outputID.base58),r.createElement(_.a,{className:"mb-2"},e.spendIDs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/spend/"+e},pt(e))))))))),r.createElement(_.a.Item,null," Voters:",l&&r.createElement(_.a,null,l.voters.map((e,t)=>r.createElement(_.a.Item,{key:e+t},e))))))}};tn=en([Object(a.b)("nodeStore"),Object(a.b)("explorerStore"),a.c],tn);var nn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let rn=class extends r.Component{render(){let{slotLiveFeed:e}=this.props.slotStore;return r.createElement(p.a,null,r.createElement("h3",null,"Slots"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Index"),r.createElement("th",null,"Commitment ID"))),r.createElement("tbody",null,e)))}};rn=nn([Object(a.b)("nodeStore"),Object(a.b)("slotStore"),a.c],rn);var sn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let an=class extends r.Component{componentDidMount(){const e=this.props.match.params.commitment;this.props.explorerStore.getSlotDetails(e)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{commitment:e}=this.props.match.params,{query_err:t,slotInfo:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Slot not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Slot"),n&&r.createElement(_.a,null,r.createElement(_.a.Item,null,"ID: ",e),r.createElement(_.a.Item,null,"Index: ",n.index),r.createElement(_.a.Item,null,"RootsID: ",n.rootsID),r.createElement(_.a.Item,null,"PrevEC: ",n.prevID),r.createElement(_.a.Item,null,"Cumulative Weight: ",n.cumulativeWeight),r.createElement(_.a.Item,null,"Blocks:",n.blocks&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.blocks.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))))),r.createElement(_.a.Item,null,"Transactions:",n.transactions&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.transactions.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/transaction/"+e},e)))))))))),r.createElement(_.a.Item,null," Created outputs:",n.createdOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.createdOutputs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e)))))))))),r.createElement(_.a.Item,null," Spent outputs:",n.spentOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.spentOutputs.map((e,t)=>r.createElement(_.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))))))))))}};an=sn([Object(a.b)("explorerStore"),a.c],an);var ln=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l};let on=class extends r.Component{renderDevTool(){0}componentDidMount(){this.props.nodeStore.connect()}render(){return r.createElement("div",{className:"container"},r.createElement(i.a,{expand:"lg",bg:"light",variant:"light",className:"mb-4"},r.createElement(i.a.Brand,null,"iota-core"),r.createElement(c.a,{className:"mr-auto"},r.createElement(ye.LinkContainer,{to:"/dashboard"},r.createElement(c.a.Link,null,"Dashboard")),r.createElement(ye.LinkContainer,{to:"/neighbors"},r.createElement(c.a.Link,null,"Neighbors")),r.createElement(ye.LinkContainer,{to:"/explorer"},r.createElement(c.a.Link,null,"Explorer")),r.createElement(ye.LinkContainer,{to:"/visualizer"},r.createElement(c.a.Link,null,"Visualizer")),r.createElement(ye.LinkContainer,{to:"/slots"},r.createElement(c.a.Link,null,"Slot")),r.createElement(ye.LinkContainer,{to:"/tips"},r.createElement(c.a.Link,null,"Tips"))),r.createElement(i.a.Collapse,{className:"justify-content-end"},r.createElement(he,null),r.createElement(i.a.Text,null,!this.props.nodeStore.websocketConnected&&r.createElement(Q.a,{variant:"danger"},"WS not connected!")))),r.createElement(ge.g,null,r.createElement(ge.d,{exact:!0,path:"/dashboard",component:X}),r.createElement(ge.d,{exact:!0,path:"/neighbors",component:Lt}),r.createElement(ge.d,{exact:!0,path:"/explorer/block/:id",component:vt}),r.createElement(ge.d,{exact:!0,path:"/explorer/address/:id",component:Ot}),r.createElement(ge.d,{exact:!0,path:"/explorer/transaction/:id",component:Xt}),r.createElement(ge.d,{exact:!0,path:"/explorer/output/:id",component:Yt}),r.createElement(ge.d,{exact:!0,path:"/explorer/spend/:id",component:tn}),r.createElement(ge.d,{exact:!0,path:"/explorer/slot/commitment/:commitment",component:an}),r.createElement(ge.d,{exact:!0,path:"/explorer/404/:search",component:Ct}),r.createElement(ge.d,{exact:!0,path:"/slots",component:rn}),r.createElement(ge.d,{exact:!0,path:"/tips",component:Vt}),r.createElement(ge.d,{exact:!0,path:"/explorer",component:de}),r.createElement(ge.d,{exact:!0,path:"/visualizer",component:Ht}),r.createElement(ge.d,{exact:!0,path:"/visualizer/history",component:Ht}),r.createElement(ge.c,{to:"/dashboard"})),this.props.children,this.renderDevTool())}};on=ln([Object(a.b)("nodeStore"),Object(a.b)("routerStore"),a.c],on);const cn=Object(o.hot)(({history:e})=>r.createElement(on,{history:e}));var pn=n(102),dn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},un=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class mn{}class hn{constructor(){this.mem=new gn,this.scheduler=new En}}class bn{}class gn{}class yn{}class fn{}class En{}class vn{constructor(){this.collected=[],this.network_io=[]}addMetric(e){e.ts=F(Date.now(),"HH:MM:ss"),this.collected.push(e),this.collected.length>xn&&this.collected.shift();let t=this.currentNetIO;t&&(this.network_io.length>xn&&this.network_io.shift(),this.network_io.push(t))}get current(){return this.collected[this.collected.length-1]}get secondLast(){let e=this.collected.length-2;if(!(e<0))return this.collected[e]}get currentNetIO(){return this.current&&this.secondLast?{tx:this.current.packets_written-this.secondLast.packets_written,rx:this.current.packets_read-this.secondLast.packets_read,ts:F(new Date,"HH:MM:ss")}:null}get netIOSeries(){let e=Object.assign({},Sn,kn("Tx","rgba(53, 180, 219,1)","rgba(53, 180, 219,0.4)")),t=Object.assign({},Sn,kn("Rx","rgba(235, 134, 52)","rgba(235, 134, 52,0.4)")),n=[];for(let r=0;r{ve(be.Status,this.updateStatus),ve(be.BPSMetrics,e=>{this.addBPSMetric(this.updateLastBPSMetric(e))}),ve(be.NeighborStats,this.updateNeighborMetrics),ve(be.TipsMetrics,this.updateLastTipsMetric),ve(be.ComponentCounterMetrics,this.updateLastComponentMetric),ve(be.RateSetter,this.updateLastRateSetterMetric),this.updateCollecting(!0)},this.unregisterHandlers=()=>{Ie(be.Status),Ie(be.BPSMetrics),Ie(be.NeighborStats),Ie(be.TipsMetrics),Ie(be.ComponentCounterMetrics),Ie(be.RateSetter),this.updateCollecting(!1)},this.updateCollecting=e=>{this.collecting=e},this.updateWebSocketConnected=e=>this.websocketConnected=e,this.updateStatus=e=>{e.mem.ts=F(Date.now(),"HH:MM:ss"),this.collected_mem_metrics.length>xn&&this.collected_mem_metrics.shift(),this.collected_mem_metrics.push(e.mem),this.status=e,e.scheduler.ts=F(Date.now(),"HH:MM:ss"),this.collected_scheduler_metrics.length>xn&&this.collected_scheduler_metrics.shift(),this.collected_scheduler_metrics.push(e.scheduler)},this.updateNeighborMetrics=e=>{if(!e)return;let t=[];for(let n=0;n{e.ts=F(Date.now(),"HH:MM:ss"),this.last_rate_setter_metric=e,this.collected_rate_setter_metrics.length>xn&&this.collected_rate_setter_metrics.shift(),this.collected_rate_setter_metrics.push(e)},this.updateLastBPSMetric=e=>{let t=new mn;return t.mps=e,t.ts=F(Date.now(),"HH:MM:ss"),this.last_mps_metric=t,t},this.addBPSMetric=e=>{this.collected_mps_metrics.length>xn&&this.collected_mps_metrics.shift(),this.collected_mps_metrics.push(e)},this.updateLastTipsMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_tips_metric=e,this.collected_tips_metrics.length>xn&&this.collected_tips_metrics.shift(),this.collected_tips_metrics.push(e)},this.updateLastComponentMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_component_counter_metric=e,this.collected_component_counter_metrics.length>xn&&this.collected_component_counter_metrics.shift(),this.collected_component_counter_metrics.push(e)},this.status.tangleTime=new bn,this.status.tangleTime.ATT=0,this.status.tangleTime.RATT=0,this.status.tangleTime.CTT=0,this.status.tangleTime.RCTT=0,this.registerHandlers()}reset(){this.collected_mps_metrics=[],this.collected_mem_metrics=[],this.collected_scheduler_metrics=[],this.neighbor_metrics=new fe.ObservableMap,this.collected_tips_metrics=[],this.collected_component_counter_metrics=[]}reconnect(){this.updateWebSocketConnected(!1),setTimeout(()=>{this.connect()},5e3)}connect(){!function(e,t,n,r){let s=window.location,a="ws:";"https:"===s.protocol&&(a="wss:"),a+="//"+s.host+e;let l=new WebSocket(a);l.onopen=t,l.onclose=n,l.onerror=r,l.onmessage=e=>{let t=JSON.parse(e.data),n=Ee[t.type];n&&n(t.data)}}("/ws",()=>this.updateWebSocketConnected(!0),()=>this.reconnect(),()=>this.updateWebSocketConnected(!1))}get mpsSeries(){let e=Object.assign({},Sn,kn("BPS","rgba(67, 196, 99,1)","rgba(67, 196, 99,0.4)")),t=[];for(let n=0;n1&&(s+=e+" Days, "),t>=0&&(s+=t<10?"0"+t+":":t+":"),n>=0&&(s+=n<10?"0"+n+":":n+":"),r>=0&&(s+=r<10?"0"+r:r),s}get memSeries(){let e=Object.assign({},Sn,kn("Heap Sys","rgba(168, 50, 76,1)","rgba(168, 50, 76,0.4)")),t=Object.assign({},Sn,kn("Heap Alloc","rgba(222, 49, 87,1)","rgba(222, 49, 87,0.4)")),n=Object.assign({},Sn,kn("Heap Idle","rgba(222, 49, 182,1)","rgba(222, 49, 182,0.4)")),r=Object.assign({},Sn,kn("Heap Released","rgba(250, 76, 252,1)","rgba(250, 76, 252,0.4)")),s=[];for(let a=0;a=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},Rn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},_n=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};!function(e){e[e.NotFound=0]="NotFound"}(On||(On={}));class Cn{constructor(e){this.send_addr="",this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.sendResult=null,this.query_error="",this.sendReq=()=>_n(this,void 0,void 0,(function*(){this.updateSending(!0);try{let e=yield fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);if(200!==e.status)return void this.updateQueryError(On.NotFound);let t=yield e.json();setTimeout(()=>{this.updateSendResult(t)},2e3)}catch(e){this.updateQueryError(e)}})),this.updateSendResult=e=>{this.sending=!1,this.sendResult=e,this.routerStore.history.push("/explorer/address/"+this.send_addr)},this.updateSend=e=>{this.send_addr=e},this.updateSendAccessManaNodeID=e=>{this.send_access_mana_node_id=e},this.updateSendConsensusManaNodeID=e=>{this.send_consensus_mana_node_id=e},this.updateSending=e=>{this.sending=e,this.query_error=""},this.reset=()=>{this.send_addr=null,this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.query_error=""},this.updateQueryError=e=>{this.sending=!1,this.query_error=e},this.routerStore=e}}Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"send_addr",void 0),Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"send_access_mana_node_id",void 0),Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"send_consensus_mana_node_id",void 0),Dn([fe.observable,Rn("design:type",Boolean)],Cn.prototype,"sending",void 0),Dn([fe.observable,Rn("design:type",class{})],Cn.prototype,"sendResult",void 0),Dn([fe.observable,Rn("design:type",String)],Cn.prototype,"query_error",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSendResult",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSend",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSendAccessManaNodeID",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSendConsensusManaNodeID",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateSending",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"reset",void 0),Dn([fe.action,Rn("design:type",Object)],Cn.prototype,"updateQueryError",void 0);var Nn=Cn,Tn=n(35),Pn=n.n(Tn),Mn=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},Ln=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},An=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class Bn{}const zn="#b9b7bd",Hn="#6c71c4",Fn="#393e46",Vn="#fad02c",Zn="#cb4b16",Un="#b58900",Wn="#586e75",Jn="#e105f5",Gn="#51e05d",qn="#859900";class Xn{constructor(e){this.vertices=new fe.ObservableMap,this.verticesLimit=1500,this.finalized_count=0,this.tips_count=0,this.verticesIncomingOrder=[],this.draw=!1,this.selected_via_click=!1,this.selected_origin_color=0,this.search="",this.paused=!1,this.fetchHistory=()=>An(this,void 0,void 0,(function*(){try{let e=yield fetch("/api/visualizer/history");(yield e.json()).vertices.forEach(e=>{this.addVertex(e)})}catch(e){console.log("Fail to fetch history in visualizer",e)}})),this.updateSearch=e=>{this.search=e.trim()},this.searchAndHighlight=()=>{if(this.clearSelected(),!this.search)return;let e=this.vertices.keys(),t=null;for(const n of e)if(n.indexOf(this.search)>=0){t=n;break}t&&this.updateSelected(this.vertices.get(t),!1)},this.pauseResume=()=>{if(this.paused)return this.renderer.resume(),void(this.paused=!1);this.renderer.pause(),this.paused=!0},this.updateVerticesLimit=e=>{this.verticesLimit=e},this.updateTxStatus=e=>{let t=this.vertices.get(e.id);t&&(t.is_tx_accepted=e.is_tx_accepted,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t))},this.addVertex=e=>{let t=this.vertices.get(e.id);t?!t.is_blk_confirmed&&e.is_blk_confirmed&&this.finalized_count++:(e.is_blk_confirmed&&this.finalized_count++,this.verticesIncomingOrder.push(e.id),this.checkLimit()),this.vertices.set(e.id,e),this.draw&&this.drawVertex(e)},this.addTipInfo=e=>An(this,void 0,void 0,(function*(){let t=this.vertices.get(e.id);if(!t){t=new Bn,t.id=e.id;let n=yield fetch("/api/block/"+e.id);if(200===n.status){let e=yield n.json();t.strongParents=e.strongParents,t.weakParents=e.weakParents,t.shallowLikedParents=e.shallowLikedParents,t.is_blk_confirmed=e.acceptance}this.verticesIncomingOrder.push(t.id)}this.tips_count+=e.is_tip?1:t.is_tip?-1:0,t.is_tip=e.is_tip,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t)})),this.checkLimit=()=>{for(;this.verticesIncomingOrder.length>this.verticesLimit;){let e=this.verticesIncomingOrder.shift(),t=this.vertices.get(e);this.selected&&e===this.selected.id&&this.clearSelected(),this.draw&&this.graph.removeNode(e),t&&(t.is_blk_confirmed&&this.finalized_count--,t.is_tip&&this.tips_count--,this.vertices.delete(e))}},this.drawVertex=e=>{let t=this.graph.getNode(e.id);if(t){this.graphics.getNodeUI(e.id).color=$n(this.colorForVertexState(e))}else t=this.graph.addNode(e.id,e);e.strongParents&&this.linkParents(e,t,e.strongParents),e.weakParents&&this.linkParents(e,t,e.weakParents),e.shallowLikedParents&&this.linkParents(e,t,e.shallowLikedParents)},this.linkParents=(e,t,n)=>{n.forEach(n=>{if(n&&(!t.links||!t.links.some(e=>e.fromId===n))){this.graph.getNode(n)?this.graph.addLink(n,e.id):console.log("link not added, parent doesn't exist",n)}})},this.colorForVertexState=e=>e?e.is_blk_confirmed?e.is_tx?e.is_tx_accepted?Vn:Fn:Hn:e.is_tip?Zn:e.is_tx?Fn:zn:Un,this.start=()=>{this.draw=!0,this.graph=Pn.a.Graph.graph();let e=Pn.a.Graph.View.webglGraphics();const t=Pn.a.Graph.Layout.forceDirected(this.graph,{springLength:10,springCoeff:1e-4,stableThreshold:.15,gravity:-2,dragCoeff:.02,timeStep:20,theta:.8});e.node(e=>e.data?Pn.a.Graph.View.webglSquare(20,this.colorForVertexState(e.data)):Pn.a.Graph.View.webglSquare(10,this.colorForVertexState(e.data))),e.link(()=>Pn.a.Graph.View.webglLine(Wn));let n=document.getElementById("visualizer");this.renderer=Pn.a.Graph.View.renderer(this.graph,{container:n,graphics:e,layout:t});let r=Pn.a.Graph.webglInputEvents(e,this.graph);r.mouseEnter(e=>{this.clearSelected(!0),this.updateSelected(e.data)}).mouseLeave(e=>{this.clearSelected(!1)}),r.click(e=>{this.clearSelected(!0),this.updateSelected(e.data,!0)}),this.graphics=e,this.renderer.run(),this.verticesIncomingOrder.forEach(e=>{let t=this.vertices.get(e);t&&this.drawVertex(t)})},this.stop=()=>{this.draw=!1,this.renderer.dispose(),this.graph=null,this.paused=!1,this.selected=null},this.updateSelected=(e,t)=>{if(!e)return;this.selected=e,this.selected_via_click=!!t;let n=this.graphics.getNodeUI(e.id);this.selected_origin_color=n.color,n.color=$n(qn),n.size=30;let r=this.graph.getNode(e.id);Kn(this.graph,r,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Gn)},[]),Kn(this.graph,r,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Jn)},[])},this.resetLinks=()=>{this.graph.forEachLink((function(e){this.graphics.getLinkUI(e.id).color=$n(Wn)}))},this.clearSelected=e=>{if(!this.selected||this.selected_via_click&&!e)return;let t=this.graph.getNode(this.selected.id);if(!t)return void this.resetLinks();let n=this.graphics.getNodeUI(this.selected.id);n.color=this.selected_origin_color,n.size=20;Kn(this.graph,t,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),Kn(this.graph,t,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=$n(Wn)},[]),this.selected=null,this.selected_via_click=!1},this.routerStore=e,ve(be.Vertex,this.addVertex),ve(be.TipInfo,this.addTipInfo),ve(be.TXAccepted,this.updateTxStatus)}}Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"vertices",void 0),Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"verticesLimit",void 0),Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"finalized_count",void 0),Mn([fe.observable,Ln("design:type",Object)],Xn.prototype,"tips_count",void 0),Mn([fe.observable,Ln("design:type",Bn)],Xn.prototype,"selected",void 0),Mn([fe.observable,Ln("design:type",String)],Xn.prototype,"search",void 0),Mn([fe.observable,Ln("design:type",Boolean)],Xn.prototype,"paused",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateSearch",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"searchAndHighlight",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"pauseResume",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateVerticesLimit",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateTxStatus",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"addVertex",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"addTipInfo",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"checkLimit",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"updateSelected",void 0),Mn([fe.action,Ln("design:type",Object)],Xn.prototype,"clearSelected",void 0);var Qn=Xn;function Kn(e,t,n,r,s=!1,a=[]){a.push(t);let l=0;for(;a.length>l;){const t=a[l++];if(n(t))return!0;if(!t.links)return;for(const n of t.links)r||n.toId!==t.id||a.includes(e.getNode(n.fromId))?r&&n.fromId===t.id&&!a.includes(e.getNode(n.toId))&&(s&&s(n),a.push(e.getNode(n.toId))):(s&&s(n),a.push(e.getNode(n.fromId)))}}function $n(e){let t=10414335;if("number"==typeof e)return e;if("string"==typeof e&&e)if(4===e.length&&(e=e.replace(/([^#])/g,"$1$1")),9===e.length)t=parseInt(e.substr(1),16);else{if(7!==e.length)throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;t=parseInt(e.substr(1),16)<<8|255}return t}var Yn=n(286),er=n.n(Yn),tr=n(287),nr=n.n(tr),rr=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},sr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ar{constructor(e,t,n){this.nodeID=e,this.time=t,this.txID=n}}class lr extends ar{constructor(e,t,n,r){super(e,t,n),this.amount=r}}class or extends ar{constructor(e,t,n,r){super(e,t,n),this.amount=r}}const ir=r.createElement("tr",null,r.createElement("td",{key:"emptyRow",colSpan:4},"There are no nodes to view with the current search parameters.")),cr=r.createElement(kt.a,{key:"emptyItem"},"There are no events to view with the current search parameters.");class pr{constructor(){this.manaValues=[],this.prevManaValues=[0,0],this.accessNetworkRichest=[],this.totalAccessNetwork=0,this.accessActiveRichest=[],this.totalAccessActive=0,this.consensusNetworkRichest=[],this.totalConsensusNetwork=0,this.consensusActiveRichest=[],this.totalConsensusActive=0,this.searchNode="",this.searchTxID="",this.accessEvents=[],this.consensusEvents=[],this.initAccessEvents=[],this.initConsensusEvents=[],this.lastRemovedAccessEventTime=null,this.lastRemovedConsensusEventTime=null,this.lastInitRemovedAccessEventTime=null,this.lastInitRemovedConsensusEventTime=null,this.eventsUpdated=!1,this.displayedAccessEvents=[],this.displayedConsensusEvents=[],this.nodeNotSyncedListItem=r.createElement(kt.a,null,"Wait for node to be synced to display mana events."),this.addNewManaValue=e=>{this.ownID=this.ownID?this.ownID:e.nodeID,100===this.manaValues.length&&this.manaValues.shift();let t=[new Date(1e3*e.time),e.access,e.consensus];this.manaValues.length>0&&(this.prevManaValues=[this.manaValues[this.manaValues.length-1][1],this.manaValues[this.manaValues.length-1][2]]),this.manaValues.push(t)},this.updateNetworkRichest=e=>{switch(e.manaType){case"Access":this.totalAccessNetwork=e.totalMana,this.accessNetworkRichest=e.nodes;break;case"Consensus":this.totalConsensusNetwork=e.totalMana,this.consensusNetworkRichest=e.nodes}},this.updateActiveRichest=e=>{switch(e.manaType){case"Access":this.totalAccessActive=e.totalMana,this.accessActiveRichest=e.nodes;break;case"Consensus":this.totalConsensusActive=e.totalMana,this.consensusActiveRichest=e.nodes}},this.updateAllowedPledgeIDs=e=>{this.allowedPledgeIDs=e},this.addNewInitPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.initAccessEvents,t.length>=100){let e=t.shift();this.lastInitRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.accessEvents,t.length>=100){let e=t.shift();this.lastRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new lr(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.addNewInitRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new or(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.initDone=()=>{this.accessEvents=this.initAccessEvents,this.lastRemovedAccessEventTime=this.lastInitRemovedAccessEventTime,this.consensusEvents=this.initConsensusEvents,this.lastRemovedConsensusEventTime=this.lastInitRemovedConsensusEventTime,this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],setInterval(()=>{this.eventsUpdated&&(this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],this.eventsUpdated=!1)},500)},this.nodeList=(e,t)=>{if(null===e||null==e)return[];let n=[],s=(e,s)=>{n.push(r.createElement("tr",{key:e.shortNodeID,style:{backgroundColor:e.shortNodeID===this.ownID?"#e8ffff":"white"}},r.createElement("td",{style:{borderTopLeftRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomLeftRadius:e.shortNodeID===this.ownID?"10px":"0"}}," ",s+1," "),r.createElement("td",null,e.shortNodeID),r.createElement("td",null,St(e.mana)),r.createElement("td",{style:{borderTopRightRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomRightRadius:e.shortNodeID===this.ownID?"10px":"0"}},(e.mana/t*100).toFixed(2),"%")))};return e.forEach((e,t)=>{this.passesNodeFilter(e.shortNodeID)&&s(e,t)}),n},this.computeEventList=e=>{let t=[];if(t.push(r.createElement(kt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"}),r.createElement(u.a,null,"NodeID"),r.createElement(u.a,null,"Tx ID"),r.createElement(u.a,{xs:5},"Time")))),null==e)return t;return e.reverse().forEach((e,n)=>{this.passesNodeFilter(e.nodeID)&&this.passesTxFilter(e.txID)&&((e,n)=>{if(e instanceof lr){let s=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Pledged"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana: ",r.createElement("strong",null,"+",St(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"To NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Pledge: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:s(e)},r.createElement(kt.a,{style:{backgroundColor:"#41aea9",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"},r.createElement("img",{src:er.a,alt:"Plus",width:"20px",className:"d-block mx-auto"})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}else if(e instanceof or){let s=e=>r.createElement(At.a,{id:e.nodeID+n.toString()},r.createElement(At.a.Title,{as:"h3"},"Mana Revoked"),r.createElement(At.a.Content,null,r.createElement("div",null,"Base Mana 1: ",r.createElement("strong",null,"-",St(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"From NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Revoke: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Bt.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:s(e)},r.createElement(kt.a,{style:{backgroundColor:"#213e3b",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1},r.createElement("img",{src:nr.a,alt:"Minus",width:"20px",className:""})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}})(e,n)}),t},this.passesNodeFilter=e=>0===this.searchNode.trim().length||!!e.toLowerCase().includes(this.searchNode.toLowerCase()),this.passesTxFilter=e=>0===this.searchTxID.trim().length||!!e.toLowerCase().includes(this.searchTxID.toLowerCase()),this.manaValues=[],ve(be.Mana,this.addNewManaValue),ve(be.ManaMapOverall,this.updateNetworkRichest),ve(be.ManaMapOnline,this.updateActiveRichest)}updateNodeSearch(e){this.searchNode=e.trim()}updateTxSearch(e){this.searchTxID=e.trim()}get networkRichestFeedAccess(){let e=this.nodeList(this.accessNetworkRichest,this.totalAccessNetwork);return 0===e.length?[ir]:e}get networkRichestFeedConsensus(){let e=this.nodeList(this.consensusNetworkRichest,this.totalConsensusNetwork);return 0===e.length?[ir]:e}get activeRichestFeedAccess(){let e=this.nodeList(this.accessActiveRichest,this.totalAccessActive);return 0===e.length?[ir]:e}get activeRichestFeedConsensus(){let e=this.nodeList(this.consensusActiveRichest,this.totalConsensusActive);return 0===e.length?[ir]:e}get accessHistogramInput(){if(void 0===this.accessNetworkRichest||null===this.accessNetworkRichest)return[["",0]];let e=new Array;for(let t=0;te.shortNodeID===this.ownID;let n=this.accessNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.accessNetworkRichest.length-(n+1))/this.accessNetworkRichest.length*100}}return e}get consensusPercentile(){let e=0;if(void 0!==this.consensusNetworkRichest&&null!==this.consensusNetworkRichest){const t=e=>e.shortNodeID===this.ownID;let n=this.consensusNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.consensusNetworkRichest.length-(n+1))/this.consensusNetworkRichest.length*100}}return e}get accessEventList(){let e=this.computeEventList(this.displayedAccessEvents);return 1===e.length&&e.push(cr),e}get consensusEventList(){let e=this.computeEventList(this.displayedConsensusEvents);return 1===e.length&&e.push(cr),e}}rr([fe.observable,sr("design:type",Array)],pr.prototype,"manaValues",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"prevManaValues",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"accessNetworkRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalAccessNetwork",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"accessActiveRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalAccessActive",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"consensusNetworkRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalConsensusNetwork",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"consensusActiveRichest",void 0),rr([fe.observable,sr("design:type",Number)],pr.prototype,"totalConsensusActive",void 0),rr([fe.observable,sr("design:type",Object)],pr.prototype,"searchNode",void 0),rr([fe.observable,sr("design:type",Object)],pr.prototype,"searchTxID",void 0),rr([fe.observable,sr("design:type",class{})],pr.prototype,"allowedPledgeIDs",void 0),rr([fe.observable,sr("design:type",Date)],pr.prototype,"lastRemovedAccessEventTime",void 0),rr([fe.observable,sr("design:type",Date)],pr.prototype,"lastRemovedConsensusEventTime",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"displayedAccessEvents",void 0),rr([fe.observable,sr("design:type",Array)],pr.prototype,"displayedConsensusEvents",void 0),rr([fe.action,sr("design:type",Function),sr("design:paramtypes",[String]),sr("design:returntype",void 0)],pr.prototype,"updateNodeSearch",null),rr([fe.action,sr("design:type",Function),sr("design:paramtypes",[String]),sr("design:returntype",void 0)],pr.prototype,"updateTxSearch",null),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewManaValue",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"updateNetworkRichest",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"updateActiveRichest",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"updateAllowedPledgeIDs",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewInitPledge",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewPledge",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewInitRevoke",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"addNewRevoke",void 0),rr([fe.action,sr("design:type",Object)],pr.prototype,"initDone",void 0),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"networkRichestFeedAccess",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"networkRichestFeedConsensus",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"activeRichestFeedAccess",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"activeRichestFeedConsensus",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"accessHistogramInput",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"consensusHistogramInput",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"accessPercentile",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"consensusPercentile",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"accessEventList",null),rr([fe.computed,sr("design:type",Object),sr("design:paramtypes",[])],pr.prototype,"consensusEventList",null);var dr=pr,ur=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},mr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},hr=function(e,t,n,r){return new(n||(n=Promise))((function(s,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function o(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class br{constructor(){this.liveFeed=[],this.addLiveFeed=e=>hr(this,void 0,void 0,(function*(){-1===this.liveFeed.findIndex(t=>t.id==e.id)&&(this.liveFeed.length>=100&&this.liveFeed.shift(),this.liveFeed.push(e))})),ve(be.SlotInfo,this.addLiveFeed)}get slotLiveFeed(){let e=[];for(let t=this.liveFeed.length-1;t>=0;t--){let n=this.liveFeed[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,n.index),r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/slot/commitment/"+n.id},n.id))))}return e}}ur([fe.observable,mr("design:type",Array)],br.prototype,"liveFeed",void 0),ur([fe.action,mr("design:type",Object)],br.prototype,"addLiveFeed",void 0),ur([fe.computed,mr("design:type",Object),mr("design:paramtypes",[])],br.prototype,"slotLiveFeed",null);var gr=function(e,t,n,r){var s,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(l=(a<3?s(l):a>3?s(t,n,l):s(t,n))||l);return a>3&&l&&Object.defineProperty(t,n,l),l},yr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class fr{constructor(e,t){this.updateSpendSets=e=>{this.spendSets.set(e.spendSetID,e)},this.updateSpends=e=>{this.spends.set(e.spendID,e)},this.routerStore=e,this.nodeStore=t,this.spendSets=new Map,this.spends=new Map,ve(be.SpendSet,this.updateSpendSets),ve(be.Spend,this.updateSpends)}get spendsLiveFeed(){let e=Array.from(this.spendSets.values());e.sort((e,t)=>t.arrivalTime-e.arrivalTime||e.spendSetID.localeCompare(t.spendSetID));let t=[];for(let n of e){if(t.push(r.createElement("tr",{key:n.spendSetID,onClick:()=>n.shown=!n.shown,style:{cursor:"pointer"}},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/output/"+n.spendSetID},n.spendSetID)),r.createElement("td",null,new Date(1e3*n.arrivalTime).toLocaleString()),r.createElement("td",null,n.resolved?"Yes":"No"),r.createElement("td",null,n.timeToResolve/1e6))),!n.shown)continue;let e=Array.from(this.spends.values());e.sort((e,t)=>e.issuingTime-t.issuingTime||e.spendID.localeCompare(t.spendID));let s=[];for(let t of e)for(let e of t.spendSetIDs)e===n.spendSetID&&s.push(r.createElement("tr",{key:t.spendID,className:t.confirmationState>Qt.Accepted?"table-success":""},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/branch/"+t.spendID},t.spendID)),r.createElement("td",null,Kt(t.confirmationState)),r.createElement("td",null," ",new Date(1e3*t.issuingTime).toLocaleString()),r.createElement("td",null,t.issuerNodeID)));t.push(r.createElement("tr",{key:n.spendSetID+"_branches"},r.createElement("td",{colSpan:4},r.createElement(te.a,{size:"sm"},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BranchID"),r.createElement("th",null,"ConfirmationState"),r.createElement("th",null,"IssuingTime"),r.createElement("th",null,"Issuer NodeID"))),r.createElement("tbody",null,s)))))}return t}}gr([fe.observable,yr("design:type",Map)],fr.prototype,"spendSets",void 0),gr([fe.observable,yr("design:type",Map)],fr.prototype,"spends",void 0),gr([fe.action,yr("design:type",Object)],fr.prototype,"updateSpendSets",void 0),gr([fe.action,yr("design:type",Object)],fr.prototype,"updateSpends",void 0),gr([fe.computed,yr("design:type",Object),yr("design:paramtypes",[])],fr.prototype,"spendsLiveFeed",null);var Er=fr;const vr=new pn.RouterStore,Ir=new wn,Sr={routerStore:vr,nodeStore:Ir,explorerStore:new Ke(vr),spendsStore:new Er(vr,Ir),faucetStore:new Nn(vr),visualizerStore:new Qn(vr),manaStore:new dr,slotStore:new br},kr=Object(l.a)(),xr=Object(pn.syncHistoryWithStore)(kr,vr);s.render(r.createElement(a.a,Object.assign({},Sr),r.createElement(ge.e,{history:xr},r.createElement(cn,{history:xr}))),document.getElementById("root"))}},[[434,1,2]]]); \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map b/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map deleted file mode 100644 index cb26c36d1..000000000 --- a/components/dashboard/frontend/build/app.48ab2676b5153e0e40b7.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///./assets/plus.svg","webpack:///./assets/minus.svg","webpack:///../node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/components/Uptime.tsx","webpack:///./app/components/Version.tsx","webpack:///./app/misc/Chart.ts","webpack:///./app/components/BPSChart.tsx","webpack:///./app/components/TipsChart.tsx","webpack:///./app/components/MemChart.tsx","webpack:///./app/components/ComponentCounterChart.tsx","webpack:///./app/components/TangleTime.tsx","webpack:///./app/components/Bootstrapped.tsx","webpack:///./app/components/Dashboard.tsx","webpack:///./app/components/ExplorerSearchbar.tsx","webpack:///./app/components/ExplorerLiveFeed.tsx","webpack:///./app/components/ExplorerTransactionSearchbar.tsx","webpack:///./app/components/ExplorerOutputSearchbar.tsx","webpack:///./app/components/ExplorerSpendSearchbar.tsx","webpack:///./app/components/Explorer.tsx","webpack:///./app/components/NavExplorerSearchbar.tsx","webpack:///./app/misc/WS.ts","webpack:///./app/misc/Payload.ts","webpack:///./app/utils/condition.tsx","webpack:///./app/utils/feature.tsx","webpack:///./app/utils/output.tsx","webpack:///./app/components/NativeToken.tsx","webpack:///./app/components/Condition.tsx","webpack:///./app/components/Feature.tsx","webpack:///./app/components/BasicOutput.tsx","webpack:///./app/components/AliasOutput.tsx","webpack:///./app/components/FoundryOutput.tsx","webpack:///./app/components/NFTOutput.tsx","webpack:///./app/stores/ExplorerStore.tsx","webpack:///./app/components/BasicPayload.tsx","webpack:///./app/utils/unlock_block.ts","webpack:///./app/components/Ed25519Signature.tsx","webpack:///./app/components/UnlockBlock.tsx","webpack:///./app/components/Transaction.tsx","webpack:///./app/components/TransactionPayload.tsx","webpack:///./app/utils/spend.ts","webpack:///./app/components/FaucetPayload.tsx","webpack:///./app/components/TaggedDataPayload.tsx","webpack:///./app/components/ExplorerBlockQueryResult.tsx","webpack:///./app/utils/index.ts","webpack:///./app/components/ExplorerAddressResult.tsx","webpack:///./app/components/Explorer404.tsx","webpack:///./app/components/Neighbor.tsx","webpack:///./app/components/Neighbors.tsx","webpack:///./app/components/Visualizer.tsx","webpack:///./app/components/Tips.tsx","webpack:///./app/components/ExplorerTransaction.tsx","webpack:///./app/components/ExplorerTransactionMetadata.tsx","webpack:///./app/components/ExplorerTransactionAttachments.tsx","webpack:///./app/components/ExplorerTransactionQueryResult.tsx","webpack:///./app/utils/confirmation_state.ts","webpack:///./app/components/ExplorerOutputQueryResult.tsx","webpack:///./app/components/ExplorerSpendQueryResult.tsx","webpack:///./app/components/SlotLiveFeed.tsx","webpack:///./app/components/ExplorerSlotQueryResult.tsx","webpack:///./app/components/Root.tsx","webpack:///./app/App.tsx","webpack:///./app/stores/NodeStore.ts","webpack:///./app/stores/FaucetStore.ts","webpack:///./app/stores/VisualizerStore.ts","webpack:///./app/stores/ManaStore.tsx","webpack:///./app/stores/SlotStore.tsx","webpack:///./app/stores/SpendsStore.tsx","webpack:///./main.tsx"],"names":["module","exports","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","this","props","nodeStore","uptime","status","version","defaultChartOptions","elements","line","tension","animation","duration","hover","animationDuration","responsiveAnimationDuration","lineChartOptions","assign","scales","xAxes","ticks","autoSkip","maxTicksLimit","fontSize","minRotation","maxRotation","gridLines","display","yAxes","callback","value","index","values","Math","abs","beginAtZero","tooltips","callbacks","label","tooltipItem","data","datasets","datasetIndex","Card","Body","Title","last_mps_metric","mps","height","mpsSeries","options","last_tips_metric","totaltips","tipsSeries","showXLabels","prettysize","mem","heap_alloc","num_gc","last_pause_gc","heap_objects","heap_sys","heap_idle","heap_released","memSeries","style","flexDirection","last_component_counter_metric","store","last_rate_setter_metric","estimate","componentSeries","tangleTime","synced","className","to","acceptedBlockID","confirmedBlockID","confirmedSlot","committedSlot","dateformat","Date","ATT","CTT","RATT","RCTT","bootstrapped","Container","Row","Col","ListGroup","variant","Item","ComponentCounterChart","updateSearch","explorerStore","target","executeSearch","key","searchAny","search","searching","InputGroup","FormControl","placeholder","onChange","onKeyUp","disabled","blksLiveFeed","xs","Table","txID","routerStore","push","outputID","spendID","href","Form","inline","as","type","WSMsgType","handlers","registerHandler","blkTypeID","handler","unregisterHandler","PayloadType","ConditionType","FeatureType","OutputType","Output","getPayloadType","p","TaggedData","Transaction","Faucet","token","amount","unlock","address","pubKeyHash","unixTime","returnAddress","conditionToComponent","cond","Address","StateControllerAddress","GovernorAddress","StorageDepositReturn","Expiration","Timelock","feature","tag","featureToComponent","feat","Sender","Issuer","Metadata","Tag","hex","output","nativeTokens","n","_","unlockConditions","c","features","f","transactionID","outputIndex","wordBreak","aliasId","stateIndex","stateMetadata","foundryCounter","serialNumber","tokenScheme","nftId","outputToComponent","Basic","Alias","Foundry","NFT","GenesisBlockID","SlotInfo","QueryError","latest_blocks","blk","addr","tx","txMetadata","txAttachments","outputMetadata","outputConsumers","pendingMana","spend","spendChildren","spendSpends","spendVoters","tips","slotInfo","query_loading","query_err","search_result","updateSearching","res","fetch","result","json","updateSearchResult","err","updateQueryError","resetSearch","block","searchBlock","updateQueryLoading","fetchJson","updateBlock","searchAddress","updateAddress","getSlotDetails","getSlotInfo","getTransaction","i","inputs","length","inputID","referencedOutputID","referencedOutputRes","genOutput","getTransactionAttachments","attachments","getTransactionMetadata","getOutput","getOutputMetadata","getOutputConsumers","getPendingMana","getSpend","getSpendChildren","getSpendSpends","getSpendVoters","getTips","reset","spendIDs","addedSpendIDs","subtractedSpendIDs","strongChildren","weakChildren","shallowLikeChildren","strongParents","weakParents","shallowLikedParents","payloadType","payload","loading","addLiveFeedBlock","findIndex","t","shift","Block","feed","payload_type","list","blkId","method","route","requestData","body","JSON","stringify","v","Uint8Array","Array","from","undefined","response","headers","ok","NotFound","BadRequest","content_title","content","SignatureType","signature","publicKey","signatureType","Ed25519","Badge","sigType","BLS","renderSignatureComponent","maxHeight","overflow","width","marginTop","marginBottom","paddingBottom","borderBottom","networkId","creationSlot","input","Provider","color","size","outputs","unlocks","txId","resolveBase58SpendID","base58Spend","MasterSpendInBase58","UndefinedSpendInBase58","LazyBookedSpendsSpendInBase58","InvalidSpendInBase58","accessManaPledgeID","consensusManaPledgeID","nonce","match","params","prevProps","prevState","objectivelyInvalid","marginRight","issuanceTimestamp","solidificationTimestamp","sequenceNumber","solid","scheduled","booked","orphaned","subjectivelyInvalid","acceptance","acceptanceTime","confirmation","confirmationTime","confirmationBySlot","confirmationBySlotTime","commitmentID","commitment","prevID","rootsID","cumulativeWeight","latestConfirmedSlot","rank","sequenceID","pastMarkerGap","isPastMarker","pastMarkers","issuerID","renderPayload","Spinner","displayManaUnit","mana","roundedMana","round","toString","toFixed","spent","unspent","available_balances","explorerOutputs","forEach","metadata","consumerCount","timestampCompareFn","a","b","txTimestamp","localeCompare","sort","Alert","ListGroupItem","textAlign","super","state","enabled","Button","getVariant","onClick","setState","base58","outputTypeToName","toLocaleString","timestamp","confirmedConsumer","outputType","neighborMetrics","neighbor_metrics","get","identity","last","current","connection_origin","pill","packets_written","packets_read","currentNetIO","rx","netIOSeries","neighborsEle","k","updateVerticesLimit","visualizerStore","pauseResumeVisualizer","pauseResume","searchAndHighlight","toggleBackgroundDataCollection","collecting","unregisterHandlers","registerHandlers","start","stop","vertices","finalized_count","selected","verticesLimit","tips_count","paused","Prepend","Text","OverlayTrigger","trigger","placement","overlay","Popover","Content","span","offset","background","substr","parent","zIndex","position","top","left","tipsList","bordered","confirmationState","blockIDs","ConfirmationState","resolveConfirmationState","Undefined","Rejected","Pending","Accepted","Confirmed","confirmationStateTime","consumers","val","valid","parents","childSpends","spends","j","voters","s","slotLiveFeed","slotStore","blocks","transactions","createdOutputs","spentOutputs","connect","Navbar","expand","bg","Brand","Nav","Link","Collapse","websocketConnected","exact","path","component","children","renderDevTool","App","history","BPSMetric","Status","MemoryMetrics","scheduler","SchedulerMetric","TipsMetric","RateSetterMetric","collected","network_io","metric","ts","now","maxMetricsDataPoints","netIO","secondLast","chartSeriesOpts","series","labels","ComponentCounterMetric","fill","lineTension","backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","pointBorderColor","pointBackgroundColor","pointBorderWidth","pointHoverBackgroundColor","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","pointHoverRadius","name","bgColor","collected_mps_metrics","collected_rate_setter_metrics","collected_scheduler_metrics","collected_mem_metrics","collected_tips_metrics","collected_component_counter_metrics","updateStatus","BPSMetrics","addBPSMetric","updateLastBPSMetric","NeighborStats","updateNeighborMetrics","TipsMetrics","updateLastTipsMetric","ComponentCounterMetrics","updateLastComponentMetric","RateSetter","updateLastRateSetterMetric","updateCollecting","updateWebSocketConnected","connected","updated","neighbMetrics","addMetric","set","includes","delete","mpsMetric","tipsMetric","componentCounterMetric","setTimeout","onOpen","onClose","onError","loc","window","location","uri","protocol","host","ws","WebSocket","onopen","onclose","onerror","onmessage","parse","connectWebSocket","reconnect","stored","solidified","solidifier","booker","bufferSize","currentBufferSize","deficit","day","hour","minute","seconds","floor","str","heapSys","heapAlloc","heapIdle","heapReleased","FaucetStore","send_addr","send_access_mana_node_id","send_consensus_mana_node_id","sending","sendResult","query_error","sendReq","updateSending","updateSendResult","updateSend","updateSendAccessManaNodeID","access_mana","updateSendConsensusManaNodeID","consensus_mana","Vertex","COLOR","verticesIncomingOrder","draw","selected_via_click","selected_origin_color","fetchHistory","addVertex","console","log","trim","clearSelected","iter","found","indexOf","updateSelected","renderer","resume","pause","num","updateTxStatus","vert","existing","is_tx_accepted","drawVertex","is_blk_confirmed","checkLimit","addTipInfo","tipInfo","is_tip","deleteId","graph","removeNode","node","getNode","graphics","getNodeUI","parseColor","colorForVertexState","addNode","linkParents","links","some","link","fromId","addLink","is_tx","Graph","View","webglGraphics","layout","Layout","forceDirected","springLength","springCoeff","stableThreshold","gravity","dragCoeff","timeStep","theta","webglSquare","webglLine","ele","document","getElementById","container","events","webglInputEvents","mouseEnter","mouseLeave","click","run","dispose","viaClick","nodeUI","vertexSize","dfsIterator","getLinkUI","resetLinks","forEachLink","force_clear","TipInfo","TXAccepted","cb","up","cbLinks","seenNodes","pointer","toId","parsedColor","replace","parseInt","ManaEvent","nodeID","time","PledgeEvent","RevokeEvent","emptyRow","colSpan","emptyListItem","manaValues","prevManaValues","accessNetworkRichest","totalAccessNetwork","accessActiveRichest","totalAccessActive","consensusNetworkRichest","totalConsensusNetwork","consensusActiveRichest","totalConsensusActive","searchNode","searchTxID","accessEvents","consensusEvents","initAccessEvents","initConsensusEvents","lastRemovedAccessEventTime","lastRemovedConsensusEventTime","lastInitRemovedAccessEventTime","lastInitRemovedConsensusEventTime","eventsUpdated","displayedAccessEvents","displayedConsensusEvents","nodeNotSyncedListItem","addNewManaValue","manaBlk","ownID","newManaData","access","consensus","updateNetworkRichest","manaType","totalMana","nodes","updateActiveRichest","updateAllowedPledgeIDs","allowedPledgeIDs","addNewInitPledge","lastRemoved","newData","addNewPledge","addNewInitRevoke","addNewRevoke","initDone","setInterval","nodeList","leaderBoard","manaSum","pushToFeed","shortNodeID","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","passesNodeFilter","computeEventList","evArr","reverse","event","passesTxFilter","element","popover","ev","navigator","clipboard","writeText","toLocaleTimeString","src","alt","substring","pushToEventFeed","toLowerCase","Mana","ManaMapOverall","ManaMapOnline","histInput","log10","per","isOwnID","liveFeed","addLiveFeed","info","updateSpendSets","spendSets","spendSetID","updateSpends","Map","SpendSet","Spend","spendsArr","x","y","arrivalTime","shown","cursor","resolved","timeToResolve","branchesArr","issuingTime","branches","branch","spendSetIDs","issuerNodeID","stores","browserHistory"],"mappings":"2EAAAA,EAAOC,QAAU,k6B,kBCAjBD,EAAOC,QAAU,0vB,oBCAjB,IAAIC,EAAM,CACT,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,OAAQ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\n\t\"./ar-ma.js\": 112,\n\t\"./ar-sa\": 113,\n\t\"./ar-sa.js\": 113,\n\t\"./ar-tn\": 114,\n\t\"./ar-tn.js\": 114,\n\t\"./ar.js\": 108,\n\t\"./az\": 115,\n\t\"./az.js\": 115,\n\t\"./be\": 116,\n\t\"./be.js\": 116,\n\t\"./bg\": 117,\n\t\"./bg.js\": 117,\n\t\"./bm\": 118,\n\t\"./bm.js\": 118,\n\t\"./bn\": 119,\n\t\"./bn-bd\": 120,\n\t\"./bn-bd.js\": 120,\n\t\"./bn.js\": 119,\n\t\"./bo\": 121,\n\t\"./bo.js\": 121,\n\t\"./br\": 122,\n\t\"./br.js\": 122,\n\t\"./bs\": 123,\n\t\"./bs.js\": 123,\n\t\"./ca\": 124,\n\t\"./ca.js\": 124,\n\t\"./cs\": 125,\n\t\"./cs.js\": 125,\n\t\"./cv\": 126,\n\t\"./cv.js\": 126,\n\t\"./cy\": 127,\n\t\"./cy.js\": 127,\n\t\"./da\": 128,\n\t\"./da.js\": 128,\n\t\"./de\": 129,\n\t\"./de-at\": 130,\n\t\"./de-at.js\": 130,\n\t\"./de-ch\": 131,\n\t\"./de-ch.js\": 131,\n\t\"./de.js\": 129,\n\t\"./dv\": 132,\n\t\"./dv.js\": 132,\n\t\"./el\": 133,\n\t\"./el.js\": 133,\n\t\"./en-au\": 134,\n\t\"./en-au.js\": 134,\n\t\"./en-ca\": 135,\n\t\"./en-ca.js\": 135,\n\t\"./en-gb\": 136,\n\t\"./en-gb.js\": 136,\n\t\"./en-ie\": 137,\n\t\"./en-ie.js\": 137,\n\t\"./en-il\": 138,\n\t\"./en-il.js\": 138,\n\t\"./en-in\": 139,\n\t\"./en-in.js\": 139,\n\t\"./en-nz\": 140,\n\t\"./en-nz.js\": 140,\n\t\"./en-sg\": 141,\n\t\"./en-sg.js\": 141,\n\t\"./eo\": 142,\n\t\"./eo.js\": 142,\n\t\"./es\": 143,\n\t\"./es-do\": 144,\n\t\"./es-do.js\": 144,\n\t\"./es-mx\": 145,\n\t\"./es-mx.js\": 145,\n\t\"./es-us\": 146,\n\t\"./es-us.js\": 146,\n\t\"./es.js\": 143,\n\t\"./et\": 147,\n\t\"./et.js\": 147,\n\t\"./eu\": 148,\n\t\"./eu.js\": 148,\n\t\"./fa\": 149,\n\t\"./fa.js\": 149,\n\t\"./fi\": 150,\n\t\"./fi.js\": 150,\n\t\"./fil\": 151,\n\t\"./fil.js\": 151,\n\t\"./fo\": 152,\n\t\"./fo.js\": 152,\n\t\"./fr\": 153,\n\t\"./fr-ca\": 154,\n\t\"./fr-ca.js\": 154,\n\t\"./fr-ch\": 155,\n\t\"./fr-ch.js\": 155,\n\t\"./fr.js\": 153,\n\t\"./fy\": 156,\n\t\"./fy.js\": 156,\n\t\"./ga\": 157,\n\t\"./ga.js\": 157,\n\t\"./gd\": 158,\n\t\"./gd.js\": 158,\n\t\"./gl\": 159,\n\t\"./gl.js\": 159,\n\t\"./gom-deva\": 160,\n\t\"./gom-deva.js\": 160,\n\t\"./gom-latn\": 161,\n\t\"./gom-latn.js\": 161,\n\t\"./gu\": 162,\n\t\"./gu.js\": 162,\n\t\"./he\": 163,\n\t\"./he.js\": 163,\n\t\"./hi\": 164,\n\t\"./hi.js\": 164,\n\t\"./hr\": 165,\n\t\"./hr.js\": 165,\n\t\"./hu\": 166,\n\t\"./hu.js\": 166,\n\t\"./hy-am\": 167,\n\t\"./hy-am.js\": 167,\n\t\"./id\": 168,\n\t\"./id.js\": 168,\n\t\"./is\": 169,\n\t\"./is.js\": 169,\n\t\"./it\": 170,\n\t\"./it-ch\": 171,\n\t\"./it-ch.js\": 171,\n\t\"./it.js\": 170,\n\t\"./ja\": 172,\n\t\"./ja.js\": 172,\n\t\"./jv\": 173,\n\t\"./jv.js\": 173,\n\t\"./ka\": 174,\n\t\"./ka.js\": 174,\n\t\"./kk\": 175,\n\t\"./kk.js\": 175,\n\t\"./km\": 176,\n\t\"./km.js\": 176,\n\t\"./kn\": 177,\n\t\"./kn.js\": 177,\n\t\"./ko\": 178,\n\t\"./ko.js\": 178,\n\t\"./ku\": 179,\n\t\"./ku.js\": 179,\n\t\"./ky\": 180,\n\t\"./ky.js\": 180,\n\t\"./lb\": 181,\n\t\"./lb.js\": 181,\n\t\"./lo\": 182,\n\t\"./lo.js\": 182,\n\t\"./lt\": 183,\n\t\"./lt.js\": 183,\n\t\"./lv\": 184,\n\t\"./lv.js\": 184,\n\t\"./me\": 185,\n\t\"./me.js\": 185,\n\t\"./mi\": 186,\n\t\"./mi.js\": 186,\n\t\"./mk\": 187,\n\t\"./mk.js\": 187,\n\t\"./ml\": 188,\n\t\"./ml.js\": 188,\n\t\"./mn\": 189,\n\t\"./mn.js\": 189,\n\t\"./mr\": 190,\n\t\"./mr.js\": 190,\n\t\"./ms\": 191,\n\t\"./ms-my\": 192,\n\t\"./ms-my.js\": 192,\n\t\"./ms.js\": 191,\n\t\"./mt\": 193,\n\t\"./mt.js\": 193,\n\t\"./my\": 194,\n\t\"./my.js\": 194,\n\t\"./nb\": 195,\n\t\"./nb.js\": 195,\n\t\"./ne\": 196,\n\t\"./ne.js\": 196,\n\t\"./nl\": 197,\n\t\"./nl-be\": 198,\n\t\"./nl-be.js\": 198,\n\t\"./nl.js\": 197,\n\t\"./nn\": 199,\n\t\"./nn.js\": 199,\n\t\"./oc-lnc\": 200,\n\t\"./oc-lnc.js\": 200,\n\t\"./pa-in\": 201,\n\t\"./pa-in.js\": 201,\n\t\"./pl\": 202,\n\t\"./pl.js\": 202,\n\t\"./pt\": 203,\n\t\"./pt-br\": 204,\n\t\"./pt-br.js\": 204,\n\t\"./pt.js\": 203,\n\t\"./ro\": 205,\n\t\"./ro.js\": 205,\n\t\"./ru\": 206,\n\t\"./ru.js\": 206,\n\t\"./sd\": 207,\n\t\"./sd.js\": 207,\n\t\"./se\": 208,\n\t\"./se.js\": 208,\n\t\"./si\": 209,\n\t\"./si.js\": 209,\n\t\"./sk\": 210,\n\t\"./sk.js\": 210,\n\t\"./sl\": 211,\n\t\"./sl.js\": 211,\n\t\"./sq\": 212,\n\t\"./sq.js\": 212,\n\t\"./sr\": 213,\n\t\"./sr-cyrl\": 214,\n\t\"./sr-cyrl.js\": 214,\n\t\"./sr.js\": 213,\n\t\"./ss\": 215,\n\t\"./ss.js\": 215,\n\t\"./sv\": 216,\n\t\"./sv.js\": 216,\n\t\"./sw\": 217,\n\t\"./sw.js\": 217,\n\t\"./ta\": 218,\n\t\"./ta.js\": 218,\n\t\"./te\": 219,\n\t\"./te.js\": 219,\n\t\"./tet\": 220,\n\t\"./tet.js\": 220,\n\t\"./tg\": 221,\n\t\"./tg.js\": 221,\n\t\"./th\": 222,\n\t\"./th.js\": 222,\n\t\"./tk\": 223,\n\t\"./tk.js\": 223,\n\t\"./tl-ph\": 224,\n\t\"./tl-ph.js\": 224,\n\t\"./tlh\": 225,\n\t\"./tlh.js\": 225,\n\t\"./tr\": 226,\n\t\"./tr.js\": 226,\n\t\"./tzl\": 227,\n\t\"./tzl.js\": 227,\n\t\"./tzm\": 228,\n\t\"./tzm-latn\": 229,\n\t\"./tzm-latn.js\": 229,\n\t\"./tzm.js\": 228,\n\t\"./ug-cn\": 230,\n\t\"./ug-cn.js\": 230,\n\t\"./uk\": 231,\n\t\"./uk.js\": 231,\n\t\"./ur\": 232,\n\t\"./ur.js\": 232,\n\t\"./uz\": 233,\n\t\"./uz-latn\": 234,\n\t\"./uz-latn.js\": 234,\n\t\"./uz.js\": 233,\n\t\"./vi\": 235,\n\t\"./vi.js\": 235,\n\t\"./x-pseudo\": 236,\n\t\"./x-pseudo.js\": 236,\n\t\"./yo\": 237,\n\t\"./yo.js\": 237,\n\t\"./zh-cn\": 238,\n\t\"./zh-cn.js\": 238,\n\t\"./zh-hk\": 239,\n\t\"./zh-hk.js\": 239,\n\t\"./zh-mo\": 240,\n\t\"./zh-mo.js\": 240,\n\t\"./zh-tw\": 241,\n\t\"./zh-tw.js\": 241\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 298;","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Uptime extends React.Component {\r\n render() {\r\n return (\r\n \r\n Uptime: {this.props.nodeStore.uptime}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Version extends React.Component {\r\n render() {\r\n return (\r\n \r\n Version: {this.props.nodeStore.status.version}\r\n \r\n );\r\n }\r\n}\r\n","\r\n// includes chart options to increase performance, by disabling chart animations\r\nexport var defaultChartOptions = {\r\n elements: {\r\n line: {\r\n tension: 0\r\n }\r\n },\r\n animation: {\r\n duration: 0\r\n },\r\n hover: {\r\n animationDuration: 0\r\n },\r\n responsiveAnimationDuration: 0\r\n};","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class BPSChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Blocks Per Second\r\n \r\n BPS: {this.props.nodeStore.last_mps_metric.mps}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class TipsChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Current Tips\r\n \r\n Tips: {this.props.nodeStore.last_tips_metric.totaltips}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport * as prettysize from 'prettysize';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class MemChart extends React.Component {\r\n render() {\r\n let mem = this.props.nodeStore.status.mem;\r\n return (\r\n \r\n \r\n \r\n Memory Usage{' '}\r\n {prettysize(mem.heap_alloc)}\r\n \r\n \r\n GC Cycles: {mem.num_gc} (Last Cycle: {mem.last_pause_gc / 1000000}ms) - {' '}\r\n Heap: {' '}\r\n [Obj: {mem.heap_objects}, In-Use: {prettysize(mem.heap_sys-mem.heap_idle)},\r\n Retained: {prettysize(mem.heap_idle - mem.heap_released)}]\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Card from \"react-bootstrap/Card\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport {Line} from \"react-chartjs-2\";\nimport {defaultChartOptions} from \"../misc/Chart\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\nconst lineChartOptions = Object.assign({\n scales: {\n xAxes: [{\n ticks: {\n autoSkip: true,\n maxTicksLimit: 8,\n fontSize: 8,\n minRotation: 0,\n maxRotation: 0,\n },\n gridLines: {\n display: false\n }\n }],\n yAxes: [{\n gridLines: {\n display: false\n },\n ticks: {\n callback: function (value, index, values) {\n return Math.abs(value);\n },\n fontSize: 10,\n maxTicksLimit: 4,\n beginAtZero: true,\n },\n }],\n },\n tooltips: {\n callbacks: {\n label: function (tooltipItem, data) {\n let label = data.datasets[tooltipItem.datasetIndex].label;\n return `${label} ${Math.abs(tooltipItem.value)}`;\n }\n }\n }\n}, defaultChartOptions);\n\n@inject(\"nodeStore\")\n@observer\nexport default class StoreChart extends React.Component {\n render() {\n const infoStyle = {\n display: \"flex\",\n flexDirection: \"column\"\n };\n return (\n \n \n Component Counter Blocks Per Second\n
\n \n BPS: {this.props.nodeStore.last_component_counter_metric.store}.\n \n \n Rate Setter - Estimate: {this.props.nodeStore.last_rate_setter_metric.estimate}\n \n
\n\n \n
\n
\n );\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport Card from \"react-bootstrap/Card\";\nimport {Link} from 'react-router-dom';\nimport {inject, observer} from \"mobx-react\";\nimport * as dateformat from 'dateformat';\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class TangleTime extends React.Component {\n render() {\n return (\n \n \n TangleTime\n Synced: {this.props.nodeStore.status.tangleTime.synced ? \"Yes\" : \"No\"}\n \n
\n
\n
\n
Last Accepted Block: \n {this.props.nodeStore.status.tangleTime.acceptedBlockID}\n
\n
\n
\n
Last Confirmed Block: \n {this.props.nodeStore.status.tangleTime.confirmedBlockID}\n
\n
\n
\n
Last Confirmed Slot:\n {this.props.nodeStore.status.tangleTime.confirmedSlot}\n
\n
\n
\n
Last Committed Slot:\n {this.props.nodeStore.status.tangleTime.committedSlot}\n
\n
\n
\n
\n
\n Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.ATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.CTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n Relative Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Relative Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RCTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n
\n
\n )\n ;\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class Bootstrapped extends React.Component {\n render() {\n return (\n \n Bootstrapped: {this.props.nodeStore.status.tangleTime.bootstrapped ? \"Yes\" : \"No\"}\n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Uptime from \"./Uptime\";\r\nimport Version from \"./Version\";\r\nimport BPSChart from \"./BPSChart\";\r\nimport TipsChart from \"./TipsChart\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport MemChart from \"./MemChart\";\r\nimport ComponentCounterChart from \"./ComponentCounterChart\";\r\nimport TangleTime from \"./TangleTime\";\r\nimport Bootstrapped from \"./Bootstrapped\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Dashboard extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Dashboard

\r\n \r\n
\r\n \r\n \r\n Node: {this.props.nodeStore.status.id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Table from \"react-bootstrap/Table\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerLiveFeed extends React.Component {\r\n render() {\r\n let {blksLiveFeed} = this.props.explorerStore;\r\n return (\r\n \r\n \r\n \r\n \r\n Live Feed\r\n \r\n \r\n
Blocks
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {blksLiveFeed}\r\n \r\n
IdPayload Type
\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionSearchbar extends React.Component {\n txID: string;\n\n updateSearch = (e) => {\n this.txID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/transaction/${this.txID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputSearchbar extends React.Component {\n outputID: string;\n\n updateSearch = (e) => {\n this.outputID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/output/${this.outputID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSpendSearchbar extends React.Component {\n spendID: string;\n\n updateSearch = (e) => {\n this.spendID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/spend/${this.spendID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerSearchbar} from \"./ExplorerSearchbar\";\r\nimport {ExplorerLiveFeed} from \"./ExplorerLiveFeed\";\r\nimport {ExplorerTransactionSearchbar} from \"./ExplorerTransactionSearchbar\";\r\nimport {ExplorerOutputSearchbar} from \"./ExplorerOutputSearchbar\";\r\nimport {ExplorerSpendSearchbar} from \"./ExplorerSpendSearchbar\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Explorer extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Tangle Explorer

\r\n \r\n \r\n

\r\n Search for addresses, blocks, transactions, outputs and spends.\r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This explorer implementation is heavily inspired by thetangle.org.\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport Form from \"react-bootstrap/Form\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class NavExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n return (\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum WSMsgType {\r\n Status,\r\n BPSMetrics,\r\n Block,\r\n NeighborStats,\r\n ComponentCounterMetrics,\r\n TipsMetrics,\r\n Vertex,\r\n TXAccepted,\r\n TipInfo,\r\n Mana,\r\n ManaMapOverall,\r\n ManaMapOnline,\r\n BlkManaDashboardAddress,\r\n RateSetter,\r\n SpendSet,\r\n Spend,\r\n SlotInfo,\r\n}\r\n\r\nexport interface WSBlock {\r\n type: number;\r\n data: any;\r\n}\r\n\r\ntype DataHandler = (data: any) => void;\r\n\r\nlet handlers = {};\r\n\r\nexport function registerHandler(blkTypeID: number, handler: DataHandler) {\r\n handlers[blkTypeID] = handler;\r\n}\r\n\r\nexport function unregisterHandler(blkTypeID: number) {\r\n delete handlers[blkTypeID];\r\n}\r\n\r\nexport function connectWebSocket(path: string, onOpen, onClose, onError) {\r\n let loc = window.location;\r\n let uri = 'ws:';\r\n\r\n if (loc.protocol === 'https:') {\r\n uri = 'wss:';\r\n }\r\n uri += '//' + loc.host + path;\r\n\r\n let ws = new WebSocket(uri);\r\n\r\n ws.onopen = onOpen;\r\n ws.onclose = onClose;\r\n ws.onerror = onError;\r\n\r\n ws.onmessage = (e) => {\r\n let blk: WSBlock = JSON.parse(e.data);\r\n let handler = handlers[blk.type];\r\n if (!handler) {\r\n return;\r\n }\r\n handler(blk.data);\r\n };\r\n}\r\n","export enum PayloadType {\r\n TaggedData = 0,\r\n Transaction = 1,\r\n Faucet = 3,\r\n}\r\n\r\n// BasicPayload\r\nexport class BasicPayload {\r\n content_title: string;\r\n content: string;\r\n}\r\n\r\nexport class TaggedDataPayload {\r\n tag: string;\r\n data: string;\r\n}\r\n\r\nexport class FaucetPayload {\r\n address: string;\r\n accessManaPledgeID: string;\r\n consensusManaPledgeID: string;\r\n nonce: number;\r\n}\r\n\r\nexport class TransactionPayload {\r\n networkId: number;\r\n creationSlot: number;\r\n inputs: Array;\r\n outputs: Array;\r\n payload: any;\r\n unlocks: Array;\r\n}\r\n\r\nexport class Input {\r\n type: string;\r\n referencedOutputID: OutputID;\r\n output: Output;\r\n}\r\n\r\nexport class Output {\r\n outputID: OutputID;\r\n type: number;\r\n output: \r\n BasicOutput|\r\n AliasOutput|\r\n FoundryOutput|\r\n NFTOutput;\r\n}\r\n\r\nexport class OutputID {\r\n hex: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class UnlockBlock {\r\n type: string;\r\n referencedIndex: number;\r\n signatureType: number;\r\n signature: SignatureEd25519;\r\n}\r\n\r\nexport class SignatureEd25519 {\r\n publicKey: string;\r\n signature: string;\r\n}\r\n\r\nexport class BasicOutput {\r\n amount: number\r\n nativeTokens?: Array;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n}\r\n\r\nexport class AliasOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n aliasId: string;\r\n stateIndex: number;\r\n stateMetadata?: string;\r\n foundryCounter: number;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class FoundryOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n serialNumber: number;\r\n tokenScheme: number; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class NFTOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n nftId: string; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class Balance {\r\n value: number;\r\n color: string;\r\n}\r\n\r\nexport class Spend {\r\n tx_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\nexport class Timestamp {\r\n blk_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\n// @ts-ignore\r\nexport class Opinion {\r\n value: string;\r\n round: number;\r\n}\r\n\r\nexport class NativeToken {\r\n id: string;\r\n amount: number;\r\n}\r\n\r\n// address, stateController, Governor share the same struct\r\nexport class AddressUnlockCondition {\r\n type: number;\r\n address: Address;\r\n}\r\n\r\nexport class Address {\r\n type: number;\r\n pubKeyHash: string;\r\n}\r\nexport class StorageDepositReturnUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n amount: number;\r\n}\r\n\r\nexport class TimelockUnlockCondition {\r\n type: number;\r\n unixTime?: number;\r\n}\r\n\r\nexport class ExpirationUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n unixTime: number;\r\n}\r\n\r\nexport class Feature {\r\n type: number;\r\n feature:\r\n IssuerFeature |\r\n MetadataFeature |\r\n TagFeature;\r\n}\r\n\r\n// Issuer and sender share a struct\r\nexport class IssuerFeature {\r\n address: string\r\n}\r\n\r\nexport class MetadataFeature {\r\n data: string;\r\n}\r\n\r\nexport class TagFeature {\r\n tag: string;\r\n}\r\n\r\nexport function getPayloadType(p: number){\r\n switch (p) {\r\n case PayloadType.TaggedData:\r\n return \"TaggedData\"\r\n case PayloadType.Transaction:\r\n return \"Transaction\"\r\n case PayloadType.Faucet:\r\n return \"Faucet\"\r\n default:\r\n return \"Unknown\"\r\n }\r\n}\r\n","import { UnlockConditionAddress, UnlockConditionExpiration, UnlockConditionStorageDepositReturn, UnlockConditionTimelock } from \"app/components/Condition\";\nimport { AddressUnlockCondition, ExpirationUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum ConditionType {\n Address = 0,\n StorageDepositReturn,\n Timelock,\n Expiration,\n StateControllerAddress,\n GovernorAddress,\n ImmutableAlias,\n}\n\nexport function resolveConditionType(condType: number) {\n switch (condType) {\n case ConditionType.Address:\n return \"Address Condition\";\n case ConditionType.StorageDepositReturn:\n return \"StorageDepositReturn Condition\";\n case ConditionType.Timelock:\n return \"Timelock Condition\";\n case ConditionType.Expiration:\n return \"Expiration Condition\";\n case ConditionType.StateControllerAddress:\n return \"StateControllerAddress Condition\";\n case ConditionType.GovernorAddress:\n return \"GovernorAddress Condition\";\n case ConditionType.ImmutableAlias:\n return \"ImmutableAlias Condition\";\n default:\n return \"Unknown Condition Type\";\n }\n}\n\nexport function conditionToComponent(cond: \n AddressUnlockCondition |\n StorageDepositReturnUnlockCondition |\n TimelockUnlockCondition |\n ExpirationUnlockCondition) {\n switch (cond.type) {\n case ConditionType.Address:\n case ConditionType.StateControllerAddress:\n case ConditionType.GovernorAddress:\n return ;\n case ConditionType.StorageDepositReturn:\n return ;\n case ConditionType.Expiration:\n return ;\n case ConditionType.Timelock:\n return ;\n }\n}","import { FeatureIssuer, FeatureMetadata, FeatureTag } from \"app/components/Feature\";\nimport { Feature, IssuerFeature, MetadataFeature, TagFeature } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum FeatureType {\n Sender = 0,\n Issuer,\n Metadata,\n Tag,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case FeatureType.Sender:\n return \"Sender Feature\";\n case FeatureType.Issuer:\n return \"Issuer Feature\";\n case FeatureType.Metadata:\n return \"Metadata Feature\";\n case FeatureType.Tag:\n return \"Tag Feature\";\n default:\n return \"Unknown Feature Type\";\n }\n}\n\n\nexport function featureToComponent(feat: Feature) {\n switch (feat.type) {\n case FeatureType.Sender:\n case FeatureType.Issuer:\n return ;\n case FeatureType.Metadata:\n return ;\n case FeatureType.Tag:\n return ;\n }\n}","import {\n BasicOutput as BasicJSON,\n AliasOutput as AliasJSON,\n FoundryOutput as FoundryJSON,\n NFTOutput as NFTJSON,\n Output,\n} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport { BasicOutput } from \"app/components/BasicOutput\";\nimport { AliasOutput } from \"app/components/AliasOutput\";\nimport { FoundryOutput } from \"app/components/FoundryOutput\";\nimport { NFTOutput } from \"app/components/NFTOutput\";\n\nexport enum OutputType {\n Treasury = 2,\n Basic,\n Alias,\n Foundry,\n NFT,\n}\n\nexport function outputToComponent(output: Output) {\n let id = output.outputID\n switch (output.type) {\n case OutputType.Basic:\n return ;\n case OutputType.Alias:\n return ;\n case OutputType.Foundry:\n return ;\n case OutputType.NFT:\n return ;\n default:\n return;\n }\n}\n\n\nexport function outputTypeToName(type: number) {\n switch (type) {\n case OutputType.Basic:\n return \"Basic Output\";\n case OutputType.Alias:\n return \"Alias Output\";\n case OutputType.Foundry:\n return \"Foundry Output\";\n case OutputType.NFT:\n return \"NFT Output\";\n default:\n return;\n }\n}\n","import * as React from 'react';\nimport { NativeToken as NativeTokenJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\n\ninterface Props {\n token: NativeTokenJSON;\n}\n\nexport class NativeToken extends React.Component {\n render() {\n return (\n
\n \n ID: {this.props.token.id}\n Amount: {this.props.token.amount}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport { \n TimelockUnlockCondition, \n AddressUnlockCondition,\n StorageDepositReturnUnlockCondition,\nExpirationUnlockCondition} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface AddressProps { \n unlock: AddressUnlockCondition;\n}\n\nexport class UnlockConditionAddress extends React.Component {\n render() {\n return (\n
\n \n Address Type: {this.props.unlock.address.type}\n \n \n Address: {this.props.unlock.address.pubKeyHash}\n \n
\n );\n }\n}\n\ninterface TimelockProps { \n unlock: TimelockUnlockCondition;\n}\n\nexport class UnlockConditionTimelock extends React.Component {\n render() {\n\n return (\n this.props.unlock.unixTime &&\n
\n \n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}\n\ninterface StorageDepositReturnProps { \n unlock: StorageDepositReturnUnlockCondition;\n}\n\nexport class UnlockConditionStorageDepositReturn extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Amount: {this.props.unlock.amount}\n \n
\n );\n }\n}\n\ninterface ExpirationProps { \n unlock: ExpirationUnlockCondition;\n}\n\nexport class UnlockConditionExpiration extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}","import * as React from 'react';\nimport { \nIssuerFeature, MetadataFeature, TagFeature} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface IssuerProps { \n feature: IssuerFeature;\n}\n\nexport class FeatureIssuer extends React.Component {\n render() {\n return (\n
\n \n Address: {this.props.feature.address}\n \n
\n );\n }\n}\n\n\ninterface MetadataProps { \n feature: MetadataFeature;\n}\n\nexport class FeatureMetadata extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.data}\n \n
\n );\n }\n}\n\ninterface TagProps { \n feature: TagFeature;\n}\n\nexport class FeatureTag extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.tag}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {OutputID, BasicOutput as BasicOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: BasicOutputJSON\n id: OutputID;\n}\n\nexport class BasicOutput extends React.Component {\n render() {\n return (\n
\n \n Type: BasicOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {AliasOutput as AliasOutputJSON, OutputID} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: AliasOutputJSON\n id: OutputID;\n}\n\nexport class AliasOutput extends React.Component {\n render() {\n return (\n
\n \n Type: AliasOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n AliasID: {this.props.output.aliasId}\n StateIndex: {this.props.output.stateIndex}\n State Metadata: {this.props.output.stateMetadata} \n Foundry Counter: {this.props.output.foundryCounter}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n","import * as React from 'react';\nimport {OutputID, FoundryOutput as FoundryOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: FoundryOutputJSON\n id: OutputID;\n}\n\nexport class FoundryOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n Serial Number: {this.props.output.serialNumber}\n Token Scheme: {this.props.output.tokenScheme} \n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport {OutputID, NFTOutput as NFTOutputJSON} from \"../misc/Payload\";\nimport {conditionToComponent} from \"../utils/condition\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { featureToComponent } from 'app/utils/feature';\nimport { NativeToken } from './NativeToken';\n\ninterface Props {\n output: NFTOutputJSON\n id: OutputID;\n}\n\nexport class NFTOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n NFT ID: {this.props.output.nftId}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import { action, computed, observable } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport {\r\n BasicPayload,\r\n getPayloadType,\r\n Output,\r\n PayloadType,\r\n FaucetPayload,\r\n TransactionPayload,\r\n TaggedDataPayload,\r\n BasicOutput\r\n} from \"../misc/Payload\";\r\nimport * as React from \"react\";\r\nimport { Link } from 'react-router-dom';\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { OutputType } from 'app/utils/output';\r\n\r\nexport const GenesisBlockID = \"1111111111111111111111111111111111111111111111111111111111111111\";\r\nexport const GenesisTransactionID = \"11111111111111111111111111111111\";\r\n\r\nexport class Block {\r\n id: string;\r\n networkID: number;\r\n protocolVersion: number;\r\n solidificationTimestamp: number;\r\n issuanceTimestamp: number;\r\n sequenceNumber: number;\r\n issuerID: string;\r\n signature: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n strongChildren: Array;\r\n weakChildren: Array;\r\n shallowLikeChildren: Array;\r\n solid: boolean;\r\n spendIDs: Array;\r\n addedSpendIDs: Array;\r\n subtractedSpendIDs: Array;\r\n scheduled: boolean;\r\n booked: boolean;\r\n orphaned: boolean;\r\n objectivelyInvalid: boolean;\r\n subjectivelyInvalid: boolean;\r\n acceptance: boolean;\r\n acceptanceTime: number;\r\n confirmation: boolean;\r\n confirmationTime: number;\r\n confirmationBySlot: boolean;\r\n confirmationBySlotTime: number;\r\n payloadType: number;\r\n payload: any;\r\n txId: string;\r\n rank: number;\r\n sequenceID: number;\r\n isPastMarker: boolean;\r\n pastMarkerGap: number;\r\n pastMarkers: string;\r\n commitmentID: string\r\n commitment: Commitment;\r\n latestConfirmedSlot: number;\r\n}\r\n\r\nexport class Commitment {\r\n index: number;\r\n prevID: string;\r\n rootsID: string;\r\n cumulativeWeight: number;\r\n}\r\nexport class AddressResult {\r\n address: string;\r\n explorerOutputs: Array;\r\n}\r\n\r\nexport class ExplorerOutput {\r\n id: OutputID;\r\n output: Output;\r\n metadata: OutputMetadata\r\n txTimestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputID {\r\n base58: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class OutputMetadata {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n consumerCount: number;\r\n confirmedConsumer: string // tx id of confirmed consumer\r\n confirmationState: number\r\n confirmationStateTime: number\r\n}\r\n\r\nclass OutputConsumer {\r\n transactionID: string;\r\n valid: string;\r\n}\r\n\r\nclass OutputConsumers {\r\n outputID: OutputID;\r\n consumers: Array\r\n}\r\n\r\nclass TransactionMetadata {\r\n transactionID: string;\r\n spendIDs: string[];\r\n booked: boolean;\r\n bookedTime: number;\r\n confirmationState: string;\r\n confirmationStateTime: number;\r\n}\r\n\r\nclass PendingMana {\r\n mana: number;\r\n outputID: string;\r\n error: string;\r\n timestamp: number;\r\n}\r\n\r\nclass Spend {\r\n id: string;\r\n parents: Array;\r\n spendIDs: Array;\r\n confirmationState: number;\r\n}\r\n\r\nclass SpendChildren {\r\n spendID: string;\r\n childSpends: Array\r\n}\r\n\r\nclass SpendChild {\r\n spendID: string;\r\n type: string;\r\n}\r\n\r\nclass SpendSpend {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n}\r\n\r\nclass SpendSpends {\r\n spendID: string;\r\n spends: Array\r\n}\r\n\r\nclass SpendVoters {\r\n spendID: string;\r\n voters: Array\r\n}\r\n\r\nclass SlotInfo {\r\n id: string;\r\n index: number;\r\n rootsID: string;\r\n prevID: string;\r\n cumulativeWeight: number;\r\n blocks: Array;\r\n transactions: Array;\r\n createdOutputs: Array;\r\n spentOutputs: Array;\r\n}\r\n\r\nclass SearchResult {\r\n block: BlockRef;\r\n address: AddressResult;\r\n}\r\n\r\nclass BlockRef {\r\n id: string;\r\n payload_type: number;\r\n}\r\n\r\nclass Tips {\r\n tips: Array\r\n}\r\n\r\nconst liveFeedSize = 50;\r\n\r\nenum QueryError {\r\n NotFound = 1,\r\n BadRequest = 2\r\n}\r\n\r\nexport class ExplorerStore {\r\n // live feed\r\n @observable latest_blocks: Array = [];\r\n\r\n // queries\r\n @observable blk: Block = null;\r\n @observable addr: AddressResult = null;\r\n @observable tx: any = null;\r\n @observable txMetadata: any = null;\r\n @observable txAttachments: any = [];\r\n @observable output: any = null;\r\n @observable outputMetadata: OutputMetadata = null;\r\n @observable outputConsumers: OutputConsumers = null;\r\n @observable pendingMana: PendingMana = null;\r\n @observable spend: Spend = null;\r\n @observable spendChildren: SpendChildren = null;\r\n @observable spendSpends: SpendSpends = null;\r\n @observable spendVoters: SpendVoters = null;\r\n @observable tips: Tips = null;\r\n @observable slotInfo: SlotInfo = new SlotInfo;\r\n\r\n // loading\r\n @observable query_loading: boolean = false;\r\n @observable query_err: any = null;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n @observable search_result: SearchResult = null;\r\n @observable searching: boolean = false;\r\n @observable payload: any;\r\n @observable subpayload: any;\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Block, this.addLiveFeedBlock);\r\n }\r\n\r\n searchAny = async () => {\r\n this.updateSearching(true);\r\n try {\r\n let res = await fetch(`/api/search/${this.search}`);\r\n let result: SearchResult = await res.json();\r\n this.updateSearchResult(result);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n resetSearch = () => {\r\n this.search_result = null;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n updateSearchResult = (result: SearchResult) => {\r\n this.search_result = result;\r\n this.searching = false;\r\n let search = this.search;\r\n this.search = '';\r\n if (this.search_result.block) {\r\n this.routerStore.push(`/explorer/block/${search}`);\r\n return;\r\n }\r\n if (this.search_result.address) {\r\n this.routerStore.push(`/explorer/address/${search}`);\r\n return;\r\n }\r\n this.routerStore.push(`/explorer/404/${search}`);\r\n };\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search;\r\n };\r\n\r\n @action\r\n updateSearching = (searching: boolean) => this.searching = searching;\r\n\r\n searchBlock = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/block/${id}`)\r\n\r\n this.updateBlock(res);\r\n };\r\n\r\n searchAddress = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/address/${id}`)\r\n this.updateAddress(res);\r\n };\r\n\r\n getSlotDetails = async (id: string) => {\r\n await this.getSlotInfo(id);\r\n }\r\n\r\n @action\r\n getTransaction = async (id: string) => {\r\n const tx = await this.fetchJson(\"get\", `/api/transaction/${id}`)\r\n \r\n for (let i = 0; i < tx.inputs.length; i++) {\r\n let inputID = tx.inputs[i] ? tx.inputs[i].referencedOutputID.hex : GenesisBlockID\r\n try {\r\n let referencedOutputRes = await fetch(`/api/output/${inputID}`)\r\n if (referencedOutputRes.status === 404) {\r\n let genOutput = new Output();\r\n genOutput.output = new BasicOutput();\r\n genOutput.output.amount = 0;\r\n genOutput.type = OutputType.Basic;\r\n genOutput.outputID = tx.inputs[i].referencedOutputID;\r\n tx.inputs[i].output = genOutput;\r\n }\r\n if (referencedOutputRes.status === 200) {\r\n tx.inputs[i].output = await referencedOutputRes.json()\r\n }\r\n } catch (err) {\r\n // ignore\r\n }\r\n this.tx = tx;\r\n }\r\n }\r\n\r\n @action\r\n getTransactionAttachments = async (id: string) => {\r\n const attachments = await this.fetchJson(\"get\", `/api/transaction/${id}/attachments`)\r\n this.txAttachments = attachments;\r\n }\r\n\r\n @action\r\n getTransactionMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/transaction/${id}/metadata`)\r\n this.txMetadata = res;\r\n }\r\n\r\n @action\r\n getOutput = async (id: string) => {\r\n const output = await this.fetchJson(\"get\", `/api/output/${id}`)\r\n this.output = output;\r\n }\r\n\r\n @action\r\n getOutputMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/metadata`)\r\n this.outputMetadata = res;\r\n }\r\n\r\n @action\r\n getOutputConsumers = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/consumers`)\r\n this.outputConsumers = res;\r\n }\r\n\r\n @action\r\n getPendingMana = async (outputID: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/mana/pending?OutputID=${outputID}`)\r\n this.pendingMana = res;\r\n }\r\n\r\n @action\r\n getSpend = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}`)\r\n this.spend = res;\r\n }\r\n\r\n @action\r\n getSpendChildren = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}/children`)\r\n this.spendChildren = res;\r\n }\r\n\r\n @action\r\n getSpendSpends = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}/spends`)\r\n this.spendSpends = res;\r\n }\r\n\r\n @action\r\n getSpendVoters = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/spend/${id}/voters`)\r\n this.spendVoters = res;\r\n }\r\n\r\n @action\r\n getSlotInfo = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/slot/commitment/${id}`)\r\n this.slotInfo = res;\r\n }\r\n\r\n @action\r\n getTips = async () => {\r\n const res = await this.fetchJson(\"get\", \"/api/tips\")\r\n this.tips = res;\r\n }\r\n\r\n @action\r\n reset = () => {\r\n this.blk = null;\r\n this.query_err = null;\r\n // reset all variables\r\n this.tx = null;\r\n this.txMetadata = null;\r\n this.txAttachments = [];\r\n this.output = null;\r\n this.outputMetadata = null;\r\n this.outputConsumers = null;\r\n this.pendingMana = null;\r\n this.spend = null;\r\n this.spendChildren = null;\r\n this.spendSpends = null;\r\n this.tips = null;\r\n this.slotInfo = new SlotInfo;\r\n };\r\n\r\n @action\r\n updateAddress = (addr: AddressResult) => {\r\n this.addr = addr;\r\n this.query_err = null;\r\n this.query_loading = false;\r\n };\r\n\r\n @action\r\n updateBlock = (blk: Block) => {\r\n this.blk = blk;\r\n this.blk.spendIDs = this.blk.spendIDs ? this.blk.spendIDs : []\r\n this.blk.addedSpendIDs = this.blk.addedSpendIDs ? this.blk.addedSpendIDs : []\r\n this.blk.subtractedSpendIDs = this.blk.subtractedSpendIDs ? this.blk.subtractedSpendIDs : []\r\n this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : []\r\n this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : []\r\n this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : []\r\n this.blk.strongParents = this.blk.strongParents ? this.blk.strongParents : []\r\n this.blk.weakParents = this.blk.weakParents ? this.blk.weakParents : []\r\n this.blk.shallowLikedParents = this.blk.shallowLikedParents ? this.blk.shallowLikedParents : []\r\n\r\n this.query_err = null;\r\n this.query_loading = false;\r\n switch (blk.payloadType) {\r\n case PayloadType.Transaction:\r\n this.payload = blk.payload as TransactionPayload\r\n break;\r\n case PayloadType.TaggedData:\r\n this.payload = blk.payload as TaggedDataPayload\r\n break;\r\n case PayloadType.Faucet:\r\n this.payload = blk.payload as FaucetPayload\r\n default:\r\n this.payload = blk.payload as BasicPayload\r\n break;\r\n }\r\n };\r\n\r\n @action\r\n updateQueryLoading = (loading: boolean) => this.query_loading = loading;\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.query_err = err;\r\n this.query_loading = false;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n addLiveFeedBlock = (blk: BlockRef) => {\r\n // prevent duplicates (should be fast with only size 10)\r\n if (this.latest_blocks.findIndex((t) => t.id == blk.id) === -1) {\r\n if (this.latest_blocks.length >= liveFeedSize) {\r\n this.latest_blocks.shift();\r\n }\r\n this.latest_blocks.push(blk);\r\n }\r\n };\r\n\r\n @computed\r\n get blksLiveFeed() {\r\n let feed = [];\r\n for (let i = this.latest_blocks.length - 1; i >= 0; i--) {\r\n let blk = this.latest_blocks[i];\r\n feed.push(\r\n \r\n \r\n \r\n {blk.id}\r\n \r\n \r\n \r\n {getPayloadType(blk.payload_type)}\r\n \r\n \r\n );\r\n }\r\n return feed;\r\n }\r\n\r\n @computed\r\n get tipsList() {\r\n let list = [];\r\n if (this.tips) {\r\n for (let i = 0; i < this.tips.tips.length; i++) {\r\n let blkId = this.tips.tips[i];\r\n list.push(\r\n \r\n \r\n \r\n {blkId}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return list;\r\n }\r\n\r\n async fetchJson(\r\n method: 'get' | 'delete',\r\n route: string,\r\n requestData?: T\r\n ): Promise {\r\n\r\n const body = requestData ? JSON.stringify(requestData, function (_, v) {\r\n // keep Uint8Array as it is\r\n if (v instanceof Uint8Array) {\r\n return Array.from(v);\r\n }\r\n return v;\r\n })\r\n : undefined;\r\n\r\n const response = await fetch(`${route}`, {\r\n method,\r\n headers: { 'Content-Type': 'application/json' },\r\n body\r\n });\r\n\r\n if (response.ok) {\r\n const responseData: U = await response.json();\r\n return responseData;\r\n }\r\n\r\n switch (response.status) {\r\n case 404:\r\n this.updateQueryError(QueryError.NotFound);\r\n break;\r\n case 400:\r\n this.updateQueryError(QueryError.BadRequest);\r\n break;\r\n default:\r\n this.updateQueryError('unexpected error')\r\n break;\r\n }\r\n return {} as U;\r\n }\r\n}\r\n\r\nexport default ExplorerStore;\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class BasicPayload extends React.Component {\r\n\r\n render() {\r\n let {payload} = this.props.explorerStore;\r\n return (\r\n payload &&\r\n \r\n \r\n \r\n {payload.content_title}: {' '} \r\n {payload.content}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum SignatureType {\n Ed25519 = 0,\n BLS = 1,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case SignatureType.Ed25519:\n return \"Ed25519 Signature\";\n case SignatureType.BLS:\n return \"BLS Signature\";\n default:\n return \"Unknown Signature Type\";\n }\n}","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport { Col, ListGroup } from 'react-bootstrap';\nimport { SignatureEd25519 } from 'app/misc/Payload';\n\ninterface Props {\n signature?: SignatureEd25519;\n}\n\nexport class Ed25519Signature extends React.Component {\n\n render() {\n let signature = this.props.signature;\n return (\n \n \n \n \n Public Key: {signature.publicKey}\n Signature: {signature.signature}\n \n \n \n \n );\n }\n}\n","import {UnlockBlock as unlockBlockJSON} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport Badge from \"react-bootstrap/Badge\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {SignatureType, resolveSignatureType} from \"../utils/unlock_block\";\nimport { Ed25519Signature } from \"./Ed25519Signature\";\n\ninterface UnlockProps {\n block: unlockBlockJSON;\n key: number;\n}\n\nexport class UnlockBlock extends React.Component {\n renderSignatureComponent() {\n switch (this.props.block.signatureType) {\n case SignatureType.Ed25519:\n return \n }\n }\n\n render() {\n let block = this.props.block;\n return (\n \n \n Index: {this.props.key}\n \n Type: {block.type}\n {\n block.signatureType && Signature Type: {resolveSignatureType(block.signatureType)}\n } \n {\n this.renderSignatureComponent()\n } \n \n \n \n );\n }\n}","import * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {outputToComponent} from \"../utils/output\";\nimport {IconContext} from \"react-icons\";\nimport {FaChevronCircleRight} from \"react-icons/fa\";\nimport {UnlockBlock} from \"./UnlockBlock\";\nimport {TransactionPayload} from \"../misc/Payload\";\n\nconst style = {\n maxHeight: \"1000px\",\n overflow: \"auto\",\n width: \"47%\",\n fontSize: \"85%\",\n}\n\ninterface Props {\n txID?: string;\n tx?: TransactionPayload;\n}\n\nexport class Transaction extends React.Component {\n render() {\n let txID = this.props.txID;\n let tx = this.props.tx;\n return (\n tx && txID &&\n
\n

Transaction

\n

{txID}

\n \n \n
Transaction Essence
\n \n ID: {txID}\n Network ID: {tx.networkId}\n Creation Time: {tx.creationSlot}\n \n
\n
\n Inputs\n
\n {tx.inputs.map((input, i) => {\n return (\n
\n Index: {i}\n
\n \n Output ID: {input.referencedOutputID.hex}\n \n
\n
\n )\n })}\n
\n \n
\n \n
\n
\n
\n Outputs\n
\n {tx.outputs.map((output, i) => {\n return (\n
\n Index: {i}\n {outputToComponent(output)}\n
\n )\n })}\n
\n
\n
\n { tx.payload && Data payload: {tx.payload}}\n
\n \n
\n \n \n
Unlock Blocks
\n \n {\n tx.unlocks.map((block,index) => (\n \n ))}\n \n \n
\n
\n );\n }\n}","import * as React from 'react';\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\r\nimport {Transaction} from \"./Transaction\";\r\n// import {ExplorerTransactionMetadata} from \"./ExplorerTransactionMetadata\";\r\nimport Container from \"react-bootstrap/Container\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class TransactionPayload extends React.Component {\r\n render() {\r\n let {payload, blk} = this.props.explorerStore;\r\n let txID = blk.txId;\r\n let tx = payload;\r\n\r\n return (\r\n \r\n {/* */}\r\n \r\n \r\n );\r\n }\r\n}\r\n","export function resolveBase58SpendID(base58Spend: string): string {\n switch (base58Spend) {\n case MasterSpendInBase58:\n return \"MasterSpendID\";\n case UndefinedSpendInBase58:\n return \"UndefinedSpendID\";\n case LazyBookedSpendsSpendInBase58:\n return \"LazyBookedSpendsSpendID\";\n case InvalidSpendInBase58:\n return \"InvalidSpendID\";\n default:\n // otherwise it is a \"regular\" spendID that doesn't have a distinct name\n return base58Spend\n }\n}\n\n// base58 spendIDs that have distinct names\nconst MasterSpendInBase58 = \"4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM\"\nconst UndefinedSpendInBase58 = \"11111111111111111111111111111111\"\nconst LazyBookedSpendsSpendInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFF\"\nconst InvalidSpendInBase58 = \"JEKNVnkbo3jma5nREBBJCDoXFVeKkD56V3xKrvRmWxFG\"","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport {inject, observer} from \"mobx-react\";\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class FaucetPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n return (\n payload &&\n \n \n \n \n \n Address: {payload.address}\n \n \n Access Mana Pledge ID: {payload.accessManaPledgeID}\n \n \n Consensus Mana Pledge ID: {payload.consensusManaPledgeID}\n \n \n Nonce: {payload.nonce}\n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport { Col, ListGroup } from 'react-bootstrap';\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class TaggedDataPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n \n return (\n payload &&\n \n \n \n \n Tag: {payload.tag}\n Data: {payload.data}\n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport ExplorerStore, { GenesisBlockID } from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport * as dateformat from 'dateformat';\r\nimport { Link } from 'react-router-dom';\r\nimport { BasicPayload } from './BasicPayload'\r\nimport { TransactionPayload } from './TransactionPayload'\r\nimport { getPayloadType, PayloadType } from '../misc/Payload'\r\nimport { resolveBase58SpendID } from \"../utils/spend\";\r\nimport { FaucetPayload } from './FaucetPayload';\r\nimport { TaggedDataPayload } from './TaggedDataPayload';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerBlockQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.explorerStore.reset();\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n getPayloadType() {\r\n return getPayloadType(this.props.explorerStore.blk.payloadType)\r\n }\r\n\r\n renderPayload() {\r\n switch (this.props.explorerStore.blk.payloadType) {\r\n case PayloadType.Transaction:\r\n if (!this.props.explorerStore.blk.objectivelyInvalid) {\r\n return \r\n }\r\n return \r\n case PayloadType.TaggedData:\r\n return \r\n case PayloadType.Faucet:\r\n return \r\n default:\r\n return \r\n }\r\n }\r\n\r\n render() {\r\n let { id } = this.props.match.params;\r\n let { blk, query_loading, query_err } = this.props.explorerStore;\r\n\r\n if (id === GenesisBlockID) {\r\n return (\r\n \r\n

Genesis Block

\r\n

In the beginning there was the genesis.

\r\n
\r\n );\r\n }\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Block not available - 404

\r\n

\r\n Block with ID {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n return (\r\n \r\n

Block

\r\n

\r\n {id} {' '}\r\n {\r\n blk &&\r\n \r\n
\r\n \r\n \r\n Issuance Time: {dateformat(new Date(blk.issuanceTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Solidification Time: {dateformat(new Date(blk.solidificationTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n
\r\n }\r\n

\r\n {\r\n blk &&\r\n \r\n \r\n \r\n \r\n \r\n Payload Type: {this.getPayloadType()}\r\n \r\n \r\n Sequence Number: {blk.sequenceNumber}\r\n \r\n \r\n spendIDs:\r\n \r\n {\r\n blk.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n AddedspendIDs:\r\n \r\n {\r\n blk.addedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n SubtractedspendIDs:\r\n \r\n {\r\n blk.subtractedSpendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n Solid: {blk.solid ? 'Yes' : 'No'}\r\n \r\n \r\n Scheduled: {blk.scheduled ? 'Yes' : 'No'}\r\n \r\n \r\n Booked: {blk.booked ? 'Yes' : 'No'}\r\n \r\n \r\n Orphaned: {blk.orphaned ? 'Yes' : 'No'}\r\n \r\n \r\n Objectively Invalid: {blk.objectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Subjectively Invalid: {blk.subjectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance: {blk.acceptance ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance\r\n Time: {dateformat(new Date(blk.acceptanceTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation: {blk.confirmation ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation\r\n Time: {dateformat(new Date(blk.confirmationTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation by slot: {blk.confirmationBySlot ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation by slot\r\n time: {dateformat(new Date(blk.confirmationBySlotTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n
Slot Commitment
\r\n \r\n \r\n CommitmentID: {blk.commitmentID}\r\n \r\n \r\n \r\n \r\n Index: {blk.commitment.index}\r\n \r\n \r\n prevID: {blk.commitment.prevID}\r\n \r\n \r\n rootsID: {blk.commitment.rootsID}\r\n \r\n \r\n Cumulative Weight: {blk.commitment.cumulativeWeight}\r\n \r\n \r\n \r\n \r\n LatestConfirmedSlot: {blk.latestConfirmedSlot}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n {\r\n !!blk.rank &&\r\n \r\n \r\n
Markers
\r\n \r\n \r\n Rank: {blk.rank}\r\n \r\n \r\n SequenceID: {blk.sequenceID}\r\n \r\n \r\n PastMarkerGap: {blk.pastMarkerGap}\r\n \r\n \r\n IsPastMarker: {blk.isPastMarker ? 'Yes' : 'No'}\r\n \r\n \r\n Past markers: {blk.pastMarkers}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n\r\n \r\n \r\n \r\n \r\n IssuerID: {blk.issuerID}\r\n \r\n \r\n Block Signature: {blk.signature}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongParents.map((value, index) => {\r\n return (\r\n \r\n Strong Parents {index + 1}: {' '}\r\n \r\n {blk.strongParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.weakParents.map((value, index) => {\r\n return (\r\n \r\n Weak Parents {index + 1}: {' '}\r\n \r\n {blk.weakParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.shallowLikedParents.map((value, index) => {\r\n return (\r\n \r\n Shallow Liked Parents {index + 1}: {' '}\r\n \r\n {blk.shallowLikedParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongChildren.map((value, index) => {\r\n return (\r\n \r\n Strong Child {index + 1}: {' '}\r\n \r\n {blk.strongChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.weakChildren.map((value, index) => {\r\n return (\r\n \r\n Weak Child {index + 1}: {' '}\r\n \r\n {blk.weakChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.shallowLikeChildren.map((value, index) => {\r\n return (\r\n \r\n ShallowLike Child {index + 1}: {' '}\r\n \r\n {blk.shallowLikeChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n

Payload

\r\n \r\n
\r\n \r\n \r\n {this.renderPayload()}\r\n \r\n \r\n
\r\n }\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","export function displayManaUnit(mana: number): string {\n let result = \"\"\n // round to nearest integer\n let roundedMana = Math.round(mana);\n if (roundedMana < 1000) {\n result = roundedMana.toString(10) + \" m\"; // mana\n } else if (roundedMana < 1000000) {\n result = (roundedMana / 1000).toFixed(3) + \" Km\"; // kilomana\n }\n else if (roundedMana < 1000000000) {\n result = (roundedMana / 1000000).toFixed(3) + \" Mm\"; // megamana\n }\n else if (roundedMana < 1000000000000) {\n result = (roundedMana / 1000000000).toFixed(3) + \" Gm\"; // gigamana\n }\n else if (roundedMana < 1000000000000000) {\n result = (roundedMana / 1000000000000).toFixed(3) + \" Tm\"; // terramana\n } else {\n result = (roundedMana / 1000000000000000).toFixed(3) + \" Pm\"; // petamana\n }\n return result\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore, ExplorerOutput, OutputMetadata} from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Alert from \"react-bootstrap/Alert\";\r\nimport {Link} from 'react-router-dom';\r\nimport {displayManaUnit} from \"../utils\";\r\nimport {OutputType, outputToComponent, outputTypeToName} from \"../utils/output\";\r\nimport {Button, ListGroupItem} from \"react-bootstrap\";\r\nimport {resolveBase58SpendID as resolveBase58SpendID} from \"../utils/spend\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerAddressQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n let {id} = this.props.match.params;\r\n let {addr, query_loading, query_err} = this.props.explorerStore;\r\n // spent outputs\r\n let spent: Array = [];\r\n // unspent outputs\r\n let unspent: Array = [];\r\n let available_balances = [];\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Address not available - 404

\r\n

\r\n Address {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n\r\n if (addr) {\r\n // separate spent from unspent\r\n addr.explorerOutputs.forEach((o) => {\r\n if (o.metadata.consumerCount > 0) {\r\n spent.push(o);\r\n } else {\r\n unspent.push(o);\r\n }\r\n })\r\n\r\n let timestampCompareFn = (a: ExplorerOutput, b: ExplorerOutput) => {\r\n if (b.txTimestamp === a.txTimestamp) {\r\n // outputs have the same timestamp\r\n if (b.id.transactionID == a.id.transactionID) {\r\n // outputs belong to the same tx, sort based on index\r\n return b.id.outputIndex - a.id.outputIndex;\r\n }\r\n // same timestamp, but different tx\r\n return b.id.transactionID.localeCompare(a.id.transactionID);\r\n }\r\n return b.txTimestamp - a.txTimestamp;\r\n }\r\n\r\n // sort outputs\r\n unspent.sort(timestampCompareFn)\r\n spent.sort(timestampCompareFn)\r\n }\r\n return (\r\n \r\n

Address {id} {addr !== null && ({addr.explorerOutputs.length} Outputs)}

\r\n {\r\n addr !== null ?\r\n \r\n {\r\n addr.explorerOutputs !== null && addr.explorerOutputs.length === 100 &&\r\n \r\n Max. 100 outputs are shown.\r\n \r\n }\r\n \r\n \r\n \r\n

Available Balances

\r\n {available_balances.length === 0? \"There are no balances currently available.\" :
\r\n \r\n \r\n \r\n Color\r\n \r\n \r\n Balance\r\n \r\n \r\n \r\n {available_balances}\r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Unspent Outputs

\r\n {unspent.length === 0? \"There are no unspent outputs currently available.\" :
\r\n {unspent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Spent Outputs

\r\n {spent.length === 0? \"There are no spent outputs currently available.\" :
\r\n {spent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\ninterface oProps {\r\n output: ExplorerOutput;\r\n}\r\n\r\nclass OutputButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n enabled: false\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n { this.setState({enabled: !this.state.enabled})}}\r\n block\r\n >\r\n \r\n {this.props.output.id.base58} \r\n {outputTypeToName(this.props.output.output.type)} \r\n {new Date(this.props.output.txTimestamp * 1000).toLocaleString()}\r\n \r\n \r\n \r\n \r\n {\r\n this.state.enabled? outputToComponent(this.props.output.output): null\r\n }\r\n \r\n \r\n {\r\n this.state.enabled? : null\r\n }\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\ninterface omProps {\r\n metadata: OutputMetadata;\r\n timestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputMeta extends React.Component {\r\n render() {\r\n let metadata = this.props.metadata;\r\n let timestamp = this.props.timestamp;\r\n let pendingMana = this.props.pendingMana;\r\n return (\r\n \r\n spendIDs: \r\n \r\n {\r\n metadata.spendIDs.map((value, index) => {\r\n return (\r\n \r\n \r\n {resolveBase58SpendID(value)}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n Pending mana: {displayManaUnit(pendingMana)}\r\n Timestamp: {new Date(timestamp * 1000).toLocaleString()}\r\n Consumer Count: {metadata.consumerCount}\r\n { metadata.confirmedConsumer && Confirmed Consumer: {metadata.confirmedConsumer} }\r\n \r\n );\r\n }\r\n}\r\n\r\nlet getVariant = (outputType: number) => {\r\n switch (outputType) {\r\n case OutputType.Basic:\r\n return \"light\";\r\n case OutputType.Alias:\r\n return \"light\";\r\n case OutputType.Foundry:\r\n return \"success\";\r\n case OutputType.NFT:\r\n return \"info\";\r\n default:\r\n return \"danger\";\r\n }\r\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n search: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class Explorer404 extends React.Component {\r\n\r\n render() {\r\n let {search} = this.props.match.params;\r\n return (\r\n \r\n

Tangle Explorer 404

\r\n

\r\n The search via '{search}' did not yield any results.\r\n

\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport * as prettysize from 'prettysize';\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport {Line} from \"react-chartjs-2\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n identity: string;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbor extends React.Component {\r\n render() {\r\n let neighborMetrics = this.props.nodeStore.neighbor_metrics.get(this.props.identity);\r\n let last = neighborMetrics.current;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {last.id}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Origin:\r\n {' '}\r\n {last.connection_origin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Address: {last.address}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Network (Tx/Rx)
\r\n \r\n {'Total: '}\r\n {last.packets_written}\r\n {' / '}\r\n {last.packets_read}\r\n \r\n {' '}\r\n \r\n {'Current: '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.tx)}\r\n {' / '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.rx)}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Neighbor} from \"./Neighbor\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbors extends React.Component {\r\n render() {\r\n let neighborsEle = [];\r\n this.props.nodeStore.neighbor_metrics.forEach((v, k) => {\r\n neighborsEle.push();\r\n });\r\n return (\r\n \r\n

Neighbors {neighborsEle.length > 0 && ({neighborsEle.length})}

\r\n

\r\n Currently connected neighbors.\r\n

\r\n {neighborsEle}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { KeyboardEvent } from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport { Link } from 'react-router-dom';\r\nimport VisualizerStore from \"../stores/VisualizerStore\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Popover from \"react-bootstrap/Popover\";\r\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\r\n\r\ninterface Props {\r\n visualizerStore?: VisualizerStore;\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"visualizerStore\")\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Visualizer extends React.Component {\r\n\r\n componentDidMount(): void {\r\n this.props.visualizerStore.start();\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.props.visualizerStore.stop();\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n updateVerticesLimit = (e) => {\r\n this.props.visualizerStore.updateVerticesLimit(e.target.value);\r\n }\r\n\r\n pauseResumeVisualizer = (e) => {\r\n this.props.visualizerStore.pauseResume();\r\n }\r\n\r\n updateSearch = (e) => {\r\n this.props.visualizerStore.updateSearch(e.target.value);\r\n }\r\n\r\n searchAndHighlight = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.visualizerStore.searchAndHighlight();\r\n }\r\n\r\n toggleBackgroundDataCollection = () => {\r\n if (this.props.nodeStore.collecting) {\r\n this.props.nodeStore.unregisterHandlers();\r\n return;\r\n }\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n render() {\r\n let {\r\n vertices, finalized_count, selected,\r\n verticesLimit, tips_count, paused, search\r\n } = this.props.visualizerStore;\r\n let { last_mps_metric, collecting } = this.props.nodeStore;\r\n\r\n return (\r\n \r\n

Visualizer

\r\n \r\n \r\n \r\n \r\n Vertices Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n Search Vertex\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ensures that only data needed for the visualizer is collected.\r\n \r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Pauses/resumes rendering the graph.\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n BLK Pending\r\n \r\n {' '}\r\n \r\n BLK Confirmed\r\n \r\n {' '}\r\n \r\n TX Pending\r\n \r\n {' '}\r\n \r\n TX Confirmed\r\n \r\n {' '}\r\n \r\n Tip\r\n \r\n {' '}\r\n \r\n Unknown\r\n \r\n
\r\n Vertices: {vertices.size}, Tips: {tips_count},\r\n Confirmed/UnConfirmed: {finalized_count}/{vertices.size - finalized_count},{' '}\r\n BPS: {last_mps_metric.mps}\r\n
\r\n Selected: {selected ?\r\n \r\n {selected.id.substr(0, 10)}\r\n \r\n : \"-\"}\r\n
\r\n {\r\n selected ? selected.strongParents &&\r\n Strong:{' '}\r\n {selected.strongParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.weakParents &&\r\n Weak:{' '}\r\n {selected.weakParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.shallowLikedParents &&\r\n Shallow Liked:{' '}\r\n {selected.shallowLikedParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n

\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Table from \"react-bootstrap/Table\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class Tips extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTips();\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {tipsList} = this.props.explorerStore;\n return (\n \n

Tips

\n \n \n \n \n \n \n \n {tipsList}\n \n
BlockID
\n
\n );\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport {Transaction} from \"./Transaction\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransaction extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransaction(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, tx } = this.props.explorerStore;\n if (query_err) {\n return (\n \n

Transaction not available - 404

\n

\n Transaction with ID {txId} not found.\n

\n
\n );\n }\n return \n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n// import {resolveBase58SpendID} from \"../utils/spend\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionMetadata extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionMetadata(this.props.txId);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, txMetadata } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Metadata

\n

Metadata for transaction ID {txId} not found.

\n
\n );\n }\n return (\n
\n

Metadata

\n {txMetadata && \n \n SpendIDs: \n \n { \n txMetadata.spendIDs && txMetadata.spendIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n \n Booked: {txMetadata.booked.toString()}\n {/* Booked time: {new Date(txMetadata.bookedTime * 1000).toLocaleString()} */}\n Confirmation State: {txMetadata.confirmationState}\n {/* Confirmation State Time: {new Date(txMetadata.confirmationStateTime * 1000).toLocaleString()} */}\n }\n
\n )\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionAttachments extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionAttachments(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txAttachments } = this.props.explorerStore;\n return (\n
\n

Attachments

\n {txAttachments && txAttachments.blockIDs && \n \n \n {txAttachments.blockIDs.map((blkId, i) => {\n return {blkId}\n })}\n \n \n }\n
\n )\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { ExplorerTransaction } from \"./ExplorerTransaction\"\nimport { ExplorerTransactionMetadata } from \"./ExplorerTransactionMetadata\"\nimport { ExplorerTransactionAttachments } from \"./ExplorerTransactionAttachments\"\n\n\ninterface Props {\n match?: {\n params: {\n id: string,\n }\n }\n}\n\nexport class ExplorerTransactionQueryResult extends React.Component {\n render() {\n let { id } = this.props.match.params;\n return (\n \n \n \n \n \n )\n }\n}","export enum ConfirmationState {\n Undefined = 0,\n Rejected,\n Pending,\n Accepted,\n Confirmed,\n}\n\nexport function resolveConfirmationState(sigType: number) {\n switch (sigType) {\n case ConfirmationState.Undefined:\n return \"Undefined\";\n case ConfirmationState.Rejected:\n return \"Rejected\";\n case ConfirmationState.Pending:\n return \"Pending\";\n case ConfirmationState.Accepted:\n return \"Accepted\";\n case ConfirmationState.Confirmed:\n return \"Confirmed\";\n default:\n return \"Undefined Confirmation State\";\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {Link} from 'react-router-dom';\nimport {displayManaUnit} from \"../utils\";\nimport {resolveBase58SpendID} from \"../utils/spend\";\nimport {outputToComponent} from \"../utils/output\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getOutput(this.props.match.params.id);\n this.props.explorerStore.getPendingMana(this.props.match.params.id);\n this.props.explorerStore.getOutputMetadata(this.props.match.params.id);\n this.props.explorerStore.getOutputConsumers(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, output, pendingMana, outputMetadata, outputConsumers } = this.props.explorerStore;\n\n let renderTriBool = (val: string) => {\n if (val === \"true\"){\n return True\n }\n if (val === \"false\"){\n return False\n }\n return Maybe\n }\n\n if (query_err) {\n return (\n \n

Output not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Output

\n {output &&
\n {outputToComponent(output)}\n \n {pendingMana && \n Pending Mana\n
\n
Value: {displayManaUnit(pendingMana.mana)}
\n
Timestamp: {new Date(pendingMana.timestamp * 1000).toLocaleString()}
\n
}\n
\n
}\n\n

Metadata

\n {outputMetadata &&
\n \n Transaction ID: {outputMetadata.outputID.transactionID} \n spendIDs: \n \n {\n outputMetadata.spendIDs.map((value, index) => {\n return (\n \n \n {resolveBase58SpendID(value)}\n \n \n )\n })\n }\n \n Consumer Count: {outputMetadata.consumerCount}\n Confirmed Consumer: {outputMetadata.confirmedConsumer} \n Confirmation State: {resolveConfirmationState(outputMetadata.confirmationState)}\n Confirmation State Time: {new Date(outputMetadata.confirmationStateTime * 1000).toLocaleString()}\n \n
}\n\n

Consumers

\n {outputConsumers &&
\n \n {outputConsumers.consumers.map((c,i) => \n
Transaction ID: {c.transactionID}
\n
Valid: {renderTriBool(c.valid)}
\n
)}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {resolveBase58SpendID} from \"../utils/spend\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSpendQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getSpend(this.props.match.params.id);\n this.props.explorerStore.getSpendChildren(this.props.match.params.id);\n this.props.explorerStore.getSpendSpends(this.props.match.params.id);\n this.props.explorerStore.getSpendVoters(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, spend, spendChildren, spendSpends, spendVoters } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Spend not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Spend

\n {spend && \n ID: {resolveBase58SpendID(spend.id)}\n Parents:\n \n {spend.parents.map((p,i) => {resolveBase58SpendID(p)})}\n \n \n {Spends:\n {spend.spendIDs && \n {spend.spendIDs.map((c,i) => {c})}\n }\n }\n ConfirmationState: {resolveConfirmationState(spend.confirmationState)}\n Children:\n {spendChildren && \n {spendChildren.childSpends.map((c,i) => {resolveBase58SpendID(c.spendID)})}\n }\n \n { Spends:\n {spendSpends && \n {spendSpends.spends.map((c,i) =>
\n OutputID: {c.outputID.base58}\n \n {c.spendIDs.map((b,j) => \n {resolveBase58SpendID(b)}\n )}\n \n
)}\n
}\n
}\n Voters:\n {spendVoters && \n {spendVoters.voters.map((s,i) => {s})}\n }\n \n
}\n
\n )\n }\n}\n","import { SlotStore } from '../stores/SlotStore';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from '../stores/NodeStore';\nimport * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { Table } from 'react-bootstrap';\n\ninterface Props {\n history: any;\n nodeStore?: NodeStore;\n slotStore?: SlotStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"slotStore\")\n@observer\nexport class SlotLiveFeed extends React.Component {\n render() {\n let {slotLiveFeed} = this.props.slotStore;\n return (\n \n

Slots

\n \n \n \n \n \n \n \n \n {slotLiveFeed}\n \n
IndexCommitment ID
\n
\n );\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { Card, Col, Row, Table } from 'react-bootstrap';\n\n\ninterface Props {\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n commitment: string,\n }\n }\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSlotQueryResult extends React.Component {\n componentDidMount() {\n const id = this.props.match.params.commitment;\n this.props.explorerStore.getSlotDetails(id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n\n render() {\n let {commitment} = this.props.match.params;\n let { query_err, slotInfo } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Slot not found - 404

\n {commitment}\n
\n );\n }\n return (\n \n

Slot

\n {slotInfo && \n ID: {commitment}\n Index: {slotInfo.index}\n RootsID: {slotInfo.rootsID}\n PrevEC: {slotInfo.prevID}\n Cumulative Weight: {slotInfo.cumulativeWeight}\n Blocks:\n {slotInfo.blocks && \n \n \n \n \n \n {slotInfo.blocks.map((b,i) => {b})}\n \n
\n \n
\n
\n
}\n
\n Transactions:\n {slotInfo.transactions && \n \n \n \n \n \n {slotInfo.transactions.map((t,i) => {t})}\n \n
\n \n
\n
\n
}\n
\n Created outputs:\n {slotInfo.createdOutputs && \n \n \n \n \n \n {slotInfo.createdOutputs.map((c,i) => {c})}\n \n
\n \n
\n
\n
}\n
\n Spent outputs:\n {slotInfo.spentOutputs && \n \n \n \n \n \n {slotInfo.spentOutputs.map((s,i) => {s})}\n \n
\n \n
\n
\n
}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from \"../stores/NodeStore\";\nimport Navbar from \"react-bootstrap/Navbar\";\nimport Nav from \"react-bootstrap/Nav\";\nimport {Dashboard} from \"./Dashboard\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {RouterStore} from 'mobx-react-router';\nimport {Explorer} from \"./Explorer\";\nimport {NavExplorerSearchbar} from \"./NavExplorerSearchbar\";\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {LinkContainer} from 'react-router-bootstrap';\nimport {ExplorerBlockQueryResult} from \"./ExplorerBlockQueryResult\";\nimport {ExplorerAddressQueryResult} from \"./ExplorerAddressResult\";\nimport {Explorer404} from \"./Explorer404\";\nimport {Neighbors} from \"./Neighbors\";\nimport {Visualizer} from \"./Visualizer\";\nimport {Tips} from \"./Tips\";\nimport {ExplorerTransactionQueryResult} from \"./ExplorerTransactionQueryResult\";\nimport {ExplorerOutputQueryResult} from \"./ExplorerOutputQueryResult\";\nimport {ExplorerSpendQueryResult} from \"./ExplorerSpendQueryResult\";\nimport { SlotLiveFeed } from './SlotLiveFeed';\nimport { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult';\n\ninterface Props {\n history: any;\n routerStore?: RouterStore;\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"routerStore\")\n@observer\nexport class Root extends React.Component {\n renderDevTool() {\n if (process.env.NODE_ENV !== 'production') {\n const DevTools = require('mobx-react-devtools').default;\n return ;\n }\n }\n\n componentDidMount(): void {\n this.props.nodeStore.connect();\n }\n\n render() {\n return (\n
\n \n iota-core\n \n \n \n \n {!this.props.nodeStore.websocketConnected &&\n WS not connected!\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.children}\n {this.renderDevTool()}\n
\n );\n }\n}\n","import * as React from 'react';\nimport {hot} from 'react-hot-loader/root';\nimport {Root} from './components/Root';\n\n// render react DOM\nexport const App = hot(({history}) => );\n","import {action, computed, observable, ObservableMap} from 'mobx';\r\nimport * as dateformat from 'dateformat';\r\nimport {connectWebSocket, registerHandler, unregisterHandler, WSMsgType} from \"../misc/WS\";\r\n\r\nclass BPSMetric {\r\n mps: number;\r\n ts: string;\r\n}\r\n\r\nclass Status {\r\n id: string;\r\n version: string;\r\n uptime: number;\r\n mem: MemoryMetrics = new MemoryMetrics();\r\n tangleTime: TangleTime;\r\n scheduler: SchedulerMetric = new SchedulerMetric();\r\n}\r\n\r\nclass TangleTime {\r\n synced: boolean;\r\n bootstrapped: boolean;\r\n ATT: number;\r\n RATT: number;\r\n CTT: number;\r\n RCTT: number;\r\n acceptedBlockID: string;\r\n confirmedBlockID: string;\r\n confirmedSlot: number;\r\n committedSlot: number;\r\n}\r\n\r\nclass MemoryMetrics {\r\n heap_sys: number;\r\n heap_alloc: number;\r\n heap_idle: number;\r\n heap_released: number;\r\n heap_objects: number;\r\n last_pause_gc: number;\r\n num_gc: number;\r\n ts: string;\r\n}\r\n\r\nclass TipsMetric {\r\n totaltips: number;\r\n ts: string;\r\n}\r\n\r\nclass NetworkIO {\r\n tx: number;\r\n rx: number;\r\n ts: string;\r\n}\r\n\r\nclass RateSetterMetric {\r\n size: number;\r\n estimate: string;\r\n rate: number;\r\n ts: string;\r\n}\r\n\r\nclass SchedulerMetric {\r\n running: number;\r\n rate: string;\r\n maxBufferSize: number;\r\n currentBufferSize: number;\r\n deficit: number;\r\n ts: string;\r\n\r\n}\r\n\r\nclass NeighborMetrics {\r\n @observable collected: Array = [];\r\n @observable network_io: Array = [];\r\n\r\n addMetric(metric: NeighborMetric) {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.collected.push(metric);\r\n if (this.collected.length > maxMetricsDataPoints) {\r\n this.collected.shift();\r\n }\r\n let netIO = this.currentNetIO;\r\n if (netIO) {\r\n if (this.network_io.length > maxMetricsDataPoints) {\r\n this.network_io.shift();\r\n }\r\n this.network_io.push(netIO);\r\n }\r\n }\r\n\r\n get current() {\r\n return this.collected[this.collected.length - 1];\r\n }\r\n\r\n get secondLast() {\r\n let index = this.collected.length - 2;\r\n if (index < 0) {\r\n return\r\n }\r\n return this.collected[index];\r\n }\r\n\r\n get currentNetIO(): NetworkIO {\r\n if (this.current && this.secondLast) {\r\n return {\r\n tx: this.current.packets_written - this.secondLast.packets_written,\r\n rx: this.current.packets_read - this.secondLast.packets_read,\r\n ts: dateformat(new Date(), \"HH:MM:ss\"),\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n @computed\r\n get netIOSeries() {\r\n let tx = Object.assign({}, chartSeriesOpts,\r\n series(\"Tx\", 'rgba(53, 180, 219,1)', 'rgba(53, 180, 219,0.4)')\r\n );\r\n let rx = Object.assign({}, chartSeriesOpts,\r\n series(\"Rx\", 'rgba(235, 134, 52)', 'rgba(235, 134, 52,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.network_io.length; i++) {\r\n let metric: NetworkIO = this.network_io[i];\r\n labels.push(metric.ts);\r\n tx.data.push(metric.tx);\r\n rx.data.push(-metric.rx);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [tx, rx],\r\n };\r\n }\r\n}\r\n\r\nclass NeighborMetric {\r\n id: string;\r\n address: string;\r\n connection_origin: number;\r\n packets_read: number;\r\n packets_written: number;\r\n ts: number;\r\n}\r\n\r\nclass ComponentCounterMetric {\r\n store: number;\r\n solidifier: number;\r\n scheduler: number;\r\n booker: number;\r\n ts: number;\r\n}\r\n\r\nconst chartSeriesOpts = {\r\n label: \"Incoming\", data: [],\r\n fill: true,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(58, 60, 171,0.4)',\r\n borderWidth: 1,\r\n borderColor: 'rgba(58, 60, 171,1)',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBorderColor: 'rgba(58, 60, 171,1)',\r\n pointBackgroundColor: '#fff',\r\n pointBorderWidth: 1,\r\n pointHoverBackgroundColor: 'rgba(58, 60, 171,1)',\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 0,\r\n pointHitRadius: 20,\r\n pointHoverRadius: 5,\r\n};\r\n\r\nfunction series(name: string, color: string, bgColor: string) {\r\n return {\r\n label: name, data: [],\r\n backgroundColor: bgColor,\r\n borderColor: color,\r\n pointBorderColor: color,\r\n pointHoverBackgroundColor: color,\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n }\r\n}\r\n\r\nconst statusWebSocketPath = \"/ws\";\r\n\r\nconst maxMetricsDataPoints = 900;\r\n\r\nexport class NodeStore {\r\n @observable status: Status = new Status();\r\n @observable websocketConnected: boolean = false;\r\n @observable last_mps_metric: BPSMetric = new BPSMetric();\r\n @observable collected_mps_metrics: Array = [];\r\n @observable collected_rate_setter_metrics: Array = [];\r\n @observable last_rate_setter_metric: RateSetterMetric = new RateSetterMetric();\r\n @observable collected_scheduler_metrics: Array = [];\r\n @observable collected_mem_metrics: Array = [];\r\n @observable neighbor_metrics = new ObservableMap();\r\n @observable last_tips_metric: TipsMetric = new TipsMetric();\r\n @observable collected_tips_metrics: Array = [];\r\n @observable last_component_counter_metric: ComponentCounterMetric = new ComponentCounterMetric();\r\n @observable collected_component_counter_metrics: Array = [];\r\n @observable collecting: boolean = true;\r\n\r\n constructor() {\r\n this.status.tangleTime = new TangleTime;\r\n this.status.tangleTime.ATT = 0;\r\n this.status.tangleTime.RATT = 0;\r\n this.status.tangleTime.CTT = 0;\r\n this.status.tangleTime.RCTT = 0;\r\n this.registerHandlers();\r\n }\r\n\r\n registerHandlers = () => {\r\n registerHandler(WSMsgType.Status, this.updateStatus);\r\n registerHandler(WSMsgType.BPSMetrics, (mps: number) => {\r\n this.addBPSMetric(this.updateLastBPSMetric(mps));\r\n });\r\n registerHandler(WSMsgType.NeighborStats, this.updateNeighborMetrics);\r\n registerHandler(WSMsgType.TipsMetrics, this.updateLastTipsMetric);\r\n registerHandler(WSMsgType.ComponentCounterMetrics, this.updateLastComponentMetric);\r\n registerHandler(WSMsgType.RateSetter, this.updateLastRateSetterMetric)\r\n\r\n this.updateCollecting(true);\r\n }\r\n\r\n unregisterHandlers = () => {\r\n unregisterHandler(WSMsgType.Status);\r\n unregisterHandler(WSMsgType.BPSMetrics);\r\n unregisterHandler(WSMsgType.NeighborStats);\r\n unregisterHandler(WSMsgType.TipsMetrics);\r\n unregisterHandler(WSMsgType.ComponentCounterMetrics);\r\n unregisterHandler(WSMsgType.RateSetter);\r\n this.updateCollecting(false);\r\n }\r\n\r\n @action\r\n updateCollecting = (collecting: boolean) => {\r\n this.collecting = collecting;\r\n }\r\n\r\n @action\r\n reset() {\r\n this.collected_mps_metrics = [];\r\n this.collected_mem_metrics = [];\r\n this.collected_scheduler_metrics = [];\r\n this.neighbor_metrics = new ObservableMap();\r\n this.collected_tips_metrics = [];\r\n this.collected_component_counter_metrics = [];\r\n }\r\n\r\n reconnect() {\r\n this.updateWebSocketConnected(false);\r\n setTimeout(() => {\r\n this.connect();\r\n }, 5000);\r\n }\r\n\r\n connect() {\r\n connectWebSocket(statusWebSocketPath,\r\n () => this.updateWebSocketConnected(true),\r\n () => this.reconnect(),\r\n () => this.updateWebSocketConnected(false))\r\n }\r\n\r\n @action\r\n updateWebSocketConnected = (connected: boolean) => this.websocketConnected = connected;\r\n\r\n @action\r\n updateStatus = (status: Status) => {\r\n status.mem.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_mem_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mem_metrics.shift();\r\n }\r\n this.collected_mem_metrics.push(status.mem);\r\n this.status = status;\r\n\r\n status.scheduler.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_scheduler_metrics.length > maxMetricsDataPoints) {\r\n this.collected_scheduler_metrics.shift();\r\n }\r\n this.collected_scheduler_metrics.push(status.scheduler);\r\n };\r\n\r\n\r\n @action\r\n updateNeighborMetrics = (neighborMetrics: Array) => {\r\n if (!neighborMetrics) {\r\n return;\r\n }\r\n let updated = [];\r\n for (let i = 0; i < neighborMetrics.length; i++) {\r\n let metric = neighborMetrics[i];\r\n let neighbMetrics: NeighborMetrics = this.neighbor_metrics.get(metric.id);\r\n if (!neighbMetrics) {\r\n neighbMetrics = new NeighborMetrics();\r\n }\r\n neighbMetrics.addMetric(metric);\r\n this.neighbor_metrics.set(metric.id, neighbMetrics);\r\n updated.push(metric.id);\r\n }\r\n // remove duplicates\r\n for (const k of this.neighbor_metrics.keys()) {\r\n if (!updated.includes(k)) {\r\n this.neighbor_metrics.delete(k);\r\n }\r\n }\r\n };\r\n\r\n @action\r\n updateLastRateSetterMetric = (metric: RateSetterMetric) => {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_rate_setter_metric = metric;\r\n if (this.collected_rate_setter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_rate_setter_metrics.shift();\r\n }\r\n this.collected_rate_setter_metrics.push(metric);\r\n };\r\n\r\n @action\r\n updateLastBPSMetric = (mps: number) => {\r\n let mpsMetric = new BPSMetric();\r\n mpsMetric.mps = mps;\r\n mpsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_mps_metric = mpsMetric;\r\n return mpsMetric;\r\n };\r\n\r\n @action\r\n addBPSMetric = (metric: BPSMetric) => {\r\n if (this.collected_mps_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mps_metrics.shift();\r\n }\r\n this.collected_mps_metrics.push(metric);\r\n }\r\n\r\n @action\r\n updateLastTipsMetric = (tipsMetric: TipsMetric) => {\r\n tipsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_tips_metric = tipsMetric;\r\n if (this.collected_tips_metrics.length > maxMetricsDataPoints) {\r\n this.collected_tips_metrics.shift();\r\n }\r\n this.collected_tips_metrics.push(tipsMetric);\r\n };\r\n\r\n @action\r\n updateLastComponentMetric = (componentCounterMetric: ComponentCounterMetric) => {\r\n componentCounterMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_component_counter_metric = componentCounterMetric;\r\n if (this.collected_component_counter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_component_counter_metrics.shift()\r\n }\r\n this.collected_component_counter_metrics.push(componentCounterMetric);\r\n };\r\n\r\n @computed\r\n get mpsSeries() {\r\n let mps = Object.assign({}, chartSeriesOpts,\r\n series(\"BPS\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mps_metrics.length; i++) {\r\n let metric: BPSMetric = this.collected_mps_metrics[i];\r\n labels.push(metric.ts);\r\n mps.data.push(metric.mps);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [mps],\r\n };\r\n }\r\n\r\n @computed\r\n get tipsSeries() {\r\n let totaltips = Object.assign({}, chartSeriesOpts,\r\n series(\"All tips\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_tips_metrics.length; i++) {\r\n let metric: TipsMetric = this.collected_tips_metrics[i];\r\n labels.push(metric.ts);\r\n totaltips.data.push(metric.totaltips);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [totaltips],\r\n };\r\n }\r\n\r\n @computed\r\n get componentSeries() {\r\n let stored = Object.assign({}, chartSeriesOpts,\r\n series(\"stored\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n let solidified = Object.assign({}, chartSeriesOpts,\r\n series(\"solidified\", 'rgba(165,209,253,1)', 'rgba(165,209,253,0.4)')\r\n );\r\n let scheduled = Object.assign({}, chartSeriesOpts,\r\n series(\"scheduled\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n let booked = Object.assign({}, chartSeriesOpts,\r\n series(\"booked\", 'rgba(5, 68, 94,1)', 'rgba(5, 68, 94,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_component_counter_metrics.length; i++) {\r\n let metric: ComponentCounterMetric = this.collected_component_counter_metrics[i];\r\n labels.push(metric.ts);\r\n stored.data.push(metric.store);\r\n solidified.data.push(metric.solidifier);\r\n scheduled.data.push(metric.scheduler);\r\n booked.data.push(metric.booker);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [stored, solidified, scheduled, booked],\r\n };\r\n }\r\n\r\n @computed\r\n get bufferSizeSeries() {\r\n let bufferSize = Object.assign({}, chartSeriesOpts,\r\n series(\"buffer size\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n bufferSize.data.push(metric.currentBufferSize);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [bufferSize],\r\n };\r\n }\r\n\r\n @computed\r\n get deficitSeries() {\r\n let deficit = Object.assign({}, chartSeriesOpts,\r\n series(\"deficit\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n deficit.data.push(metric.deficit);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [deficit],\r\n };\r\n }\r\n\r\n @computed\r\n get neighborsSeries() {\r\n return {};\r\n }\r\n\r\n @computed\r\n get uptime() {\r\n let day, hour, minute, seconds;\r\n seconds = Math.floor(this.status.uptime / 1000);\r\n minute = Math.floor(seconds / 60);\r\n seconds = seconds % 60;\r\n hour = Math.floor(minute / 60);\r\n minute = minute % 60;\r\n day = Math.floor(hour / 24);\r\n hour = hour % 24;\r\n let str = \"\";\r\n if (day == 1) {\r\n str += day + \" Day, \";\r\n }\r\n if (day > 1) {\r\n str += day + \" Days, \";\r\n }\r\n if (hour >= 0) {\r\n if (hour < 10) {\r\n str += \"0\" + hour + \":\";\r\n } else {\r\n str += hour + \":\";\r\n }\r\n }\r\n if (minute >= 0) {\r\n if (minute < 10) {\r\n str += \"0\" + minute + \":\";\r\n } else {\r\n str += minute + \":\";\r\n }\r\n }\r\n if (seconds >= 0) {\r\n if (seconds < 10) {\r\n str += \"0\" + seconds;\r\n } else {\r\n str += seconds;\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n @computed\r\n get memSeries() {\r\n let heapSys = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Sys\", 'rgba(168, 50, 76,1)', 'rgba(168, 50, 76,0.4)')\r\n );\r\n let heapAlloc = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Alloc\", 'rgba(222, 49, 87,1)', 'rgba(222, 49, 87,0.4)')\r\n );\r\n let heapIdle = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Idle\", 'rgba(222, 49, 182,1)', 'rgba(222, 49, 182,0.4)')\r\n );\r\n let heapReleased = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Released\", 'rgba(250, 76, 252,1)', 'rgba(250, 76, 252,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mem_metrics.length; i++) {\r\n let metric = this.collected_mem_metrics[i];\r\n labels.push(metric.ts);\r\n heapSys.data.push(metric.heap_sys);\r\n heapAlloc.data.push(metric.heap_alloc);\r\n heapIdle.data.push(metric.heap_idle);\r\n heapReleased.data.push(metric.heap_released);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [heapSys, heapAlloc, heapIdle, heapReleased],\r\n };\r\n }\r\n}\r\n\r\nexport default NodeStore;\r\n","import {action, observable} from 'mobx';\r\nimport {RouterStore} from \"mobx-react-router\";\r\n\r\nclass SendResult {\r\n BlkId: string;\r\n}\r\n\r\nenum QueryError {\r\n NotFound\r\n}\r\n\r\nexport class FaucetStore {\r\n // send request to faucet\r\n @observable send_addr: string = \"\";\r\n @observable send_access_mana_node_id: string = \"\";\r\n @observable send_consensus_mana_node_id: string = \"\";\r\n @observable sending: boolean = false;\r\n @observable sendResult: SendResult = null;\r\n @observable query_error: string = \"\";\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n }\r\n\r\n sendReq = async () => {\r\n this.updateSending(true);\r\n try {\r\n // send request\r\n let res = await fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);\r\n if (res.status !== 200) {\r\n this.updateQueryError(QueryError.NotFound);\r\n return;\r\n }\r\n let result: SendResult = await res.json();\r\n setTimeout(() => {\r\n this.updateSendResult(result);\r\n }, 2000);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n updateSendResult = (result: SendResult) => {\r\n this.sending = false;\r\n this.sendResult = result;\r\n this.routerStore.history.push(`/explorer/address/${this.send_addr}`);\r\n };\r\n\r\n @action\r\n updateSend = (send_addr: string) => {\r\n this.send_addr = send_addr;\r\n };\r\n\r\n @action\r\n updateSendAccessManaNodeID = (access_mana: string) => {\r\n this.send_access_mana_node_id = access_mana;\r\n }\r\n\r\n @action\r\n updateSendConsensusManaNodeID = (consensus_mana: string) => {\r\n this.send_consensus_mana_node_id = consensus_mana;\r\n }\r\n\r\n @action\r\n updateSending = (sending: boolean) => {\r\n this.sending = sending;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n reset = () => {\r\n this.send_addr = null;\r\n this.send_access_mana_node_id = \"\";\r\n this.send_consensus_mana_node_id = \"\";\r\n this.sending = false;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.sending = false;\r\n this.query_error = err;\r\n };\r\n}\r\n\r\nexport default FaucetStore;\r\n","import { action, observable, ObservableMap } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { default as Viva } from 'vivagraphjs';\r\nimport { Block } from './ExplorerStore';\r\n\r\nexport class Vertex {\r\n id: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n is_tip: boolean;\r\n is_blk_confirmed: boolean;\r\n is_tx_accepted: boolean;\r\n is_tx: boolean;\r\n}\r\n\r\nexport class TipInfo {\r\n id: string;\r\n is_tip: boolean;\r\n}\r\n\r\nclass history {\r\n vertices: Array;\r\n}\r\n\r\nconst COLOR = {\r\n BlockPending: \"#b9b7bd\",\r\n BlockConfirmed: \"#6c71c4\",\r\n TransactionPending: \"#393e46\",\r\n TransactionConfirmed: \"#fad02c\",\r\n Tip: \"#cb4b16\",\r\n Unknown: \"#b58900\",\r\n Line: \"#586e75\",\r\n SelectedPastConeLine: \"#e105f5\",\r\n SelectedFutureConeLine: \"#51e05d\",\r\n Selected: \"#859900\"\r\n}\r\n\r\nconst vertexSize = 20;\r\n\r\nexport class VisualizerStore {\r\n @observable vertices = new ObservableMap();\r\n @observable verticesLimit = 1500;\r\n @observable finalized_count = 0;\r\n @observable tips_count = 0;\r\n verticesIncomingOrder = [];\r\n draw: boolean = false;\r\n routerStore: RouterStore;\r\n\r\n // the currently selected vertex via hover\r\n @observable selected: Vertex;\r\n selected_via_click: boolean = false;\r\n selected_origin_color: number = 0;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n\r\n // viva graph objs\r\n graph;\r\n graphics;\r\n renderer;\r\n @observable paused: boolean = false;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Vertex, this.addVertex);\r\n registerHandler(WSMsgType.TipInfo, this.addTipInfo);\r\n registerHandler(WSMsgType.TXAccepted, this.updateTxStatus);\r\n // this.fetchHistory();\r\n }\r\n\r\n fetchHistory = async () => {\r\n try {\r\n let res = await fetch(`/api/visualizer/history`);\r\n let history: history = await res.json();\r\n history.vertices.forEach(v => {\r\n this.addVertex(v);\r\n });\r\n } catch (err) {\r\n console.log(\"Fail to fetch history in visualizer\", err);\r\n }\r\n return\r\n }\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search.trim();\r\n }\r\n\r\n @action\r\n searchAndHighlight = () => {\r\n this.clearSelected();\r\n if (!this.search) return;\r\n let iter: IterableIterator = this.vertices.keys();\r\n let found = null;\r\n for (const key of iter) {\r\n if (key.indexOf(this.search) >= 0) {\r\n found = key;\r\n break;\r\n }\r\n }\r\n if (!found) return;\r\n this.updateSelected(this.vertices.get(found), false);\r\n }\r\n\r\n @action\r\n pauseResume = () => {\r\n if (this.paused) {\r\n this.renderer.resume();\r\n this.paused = false;\r\n return;\r\n }\r\n this.renderer.pause();\r\n this.paused = true;\r\n }\r\n\r\n @action\r\n updateVerticesLimit = (num: number) => {\r\n this.verticesLimit = num;\r\n }\r\n\r\n @action\r\n updateTxStatus = (vert: Vertex) => { \r\n let existing = this.vertices.get(vert.id);\r\n if (!existing) {\r\n return\r\n }\r\n\r\n existing.is_tx_accepted = vert.is_tx_accepted;\r\n this.vertices.set(vert.id, existing);\r\n\r\n if (this.draw) {\r\n this.drawVertex(existing);\r\n }\r\n }\r\n\r\n @action\r\n addVertex = (vert: Vertex) => {\r\n let existing = this.vertices.get(vert.id);\r\n if (existing) {\r\n if (!existing.is_blk_confirmed && vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n } else {\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n this.verticesIncomingOrder.push(vert.id);\r\n this.checkLimit();\r\n }\r\n\r\n this.vertices.set(vert.id, vert);\r\n\r\n if (this.draw) {\r\n this.drawVertex(vert);\r\n }\r\n };\r\n\r\n @action\r\n addTipInfo = async (tipInfo: TipInfo) => {\r\n let v = this.vertices.get(tipInfo.id);\r\n if (!v) {\r\n v = new Vertex();\r\n v.id = tipInfo.id;\r\n\r\n // first seen as tip, get parents info\r\n let res = await fetch(`/api/block/${tipInfo.id}`);\r\n if (res.status === 200) {\r\n let blk: Block = await res.json();\r\n v.strongParents = blk.strongParents;\r\n v.weakParents = blk.weakParents;\r\n v.shallowLikedParents = blk.shallowLikedParents;\r\n v.is_blk_confirmed = blk.acceptance;\r\n }\r\n this.verticesIncomingOrder.push(v.id);\r\n }\r\n\r\n this.tips_count += tipInfo.is_tip ? 1 : v.is_tip ? -1 : 0;\r\n v.is_tip = tipInfo.is_tip;\r\n this.vertices.set(tipInfo.id, v);\r\n\r\n if (this.draw) {\r\n this.drawVertex(v);\r\n }\r\n };\r\n\r\n @action\r\n checkLimit = () => {\r\n while (this.verticesIncomingOrder.length > this.verticesLimit) {\r\n let deleteId = this.verticesIncomingOrder.shift();\r\n let vert = this.vertices.get(deleteId);\r\n // make sure we remove any markings if the vertex gets deleted\r\n if (this.selected && deleteId === this.selected.id) {\r\n this.clearSelected();\r\n }\r\n if (this.draw) {\r\n this.graph.removeNode(deleteId);\r\n }\r\n if (!vert) {\r\n continue;\r\n }\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count--;\r\n }\r\n if (vert.is_tip) {\r\n this.tips_count--;\r\n }\r\n this.vertices.delete(deleteId);\r\n }\r\n }\r\n\r\n drawVertex = (vert: Vertex) => {\r\n let node = this.graph.getNode(vert.id);\r\n if (node) {\r\n // update coloring\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n nodeUI.color = parseColor(this.colorForVertexState(vert));\r\n } else {\r\n node = this.graph.addNode(vert.id, vert);\r\n }\r\n\r\n if (vert.strongParents) {\r\n this.linkParents(vert, node, vert.strongParents)\r\n }\r\n\r\n if (vert.weakParents) {\r\n this.linkParents(vert, node, vert.weakParents)\r\n }\r\n\r\n if (vert.shallowLikedParents) {\r\n this.linkParents(vert, node, vert.shallowLikedParents)\r\n }\r\n }\r\n\r\n linkParents = (vert: Vertex, node: any, parents: Array) => {\r\n parents.forEach((value) => {\r\n // if value is valid AND (links is empty OR there is no between parent and children)\r\n if (value && ((!node.links || !node.links.some(link => link.fromId === value)))) {\r\n // draw the link only when the parent exists\r\n let parent = this.graph.getNode(value);\r\n if (parent) {\r\n this.graph.addLink(value, vert.id);\r\n } else {\r\n console.log(\"link not added, parent doesn't exist\", value);\r\n }\r\n }\r\n })\r\n }\r\n\r\n colorForVertexState = (vert: Vertex) => {\r\n if (!vert) {\r\n return COLOR.Unknown;\r\n }\r\n\r\n // finalized\r\n if (vert.is_blk_confirmed) {\r\n if (vert.is_tx) {\r\n if (vert.is_tx_accepted) {\r\n return COLOR.TransactionConfirmed;\r\n } else {\r\n return COLOR.TransactionPending;\r\n } \r\n }\r\n return COLOR.BlockConfirmed;\r\n }\r\n\r\n if (vert.is_tip) {\r\n return COLOR.Tip;\r\n }\r\n\r\n // pending\r\n if (vert.is_tx) {\r\n return COLOR.TransactionPending\r\n }\r\n return COLOR.BlockPending;\r\n }\r\n\r\n start = () => {\r\n this.draw = true;\r\n this.graph = Viva.Graph.graph();\r\n\r\n let graphics: any = Viva.Graph.View.webglGraphics();\r\n\r\n const layout = Viva.Graph.Layout.forceDirected(this.graph, {\r\n springLength: 10,\r\n springCoeff: 0.0001,\r\n stableThreshold: 0.15,\r\n gravity: -2,\r\n dragCoeff: 0.02,\r\n timeStep: 20,\r\n theta: 0.8,\r\n });\r\n\r\n graphics.node((node) => {\r\n if (!node.data) {\r\n return Viva.Graph.View.webglSquare(10, this.colorForVertexState(node.data));\r\n }\r\n return Viva.Graph.View.webglSquare(vertexSize, this.colorForVertexState(node.data));\r\n })\r\n graphics.link(() => Viva.Graph.View.webglLine(COLOR.Line));\r\n let ele = document.getElementById('visualizer');\r\n this.renderer = Viva.Graph.View.renderer(this.graph, {\r\n container: ele, graphics, layout,\r\n });\r\n\r\n let events = Viva.Graph.webglInputEvents(graphics, this.graph);\r\n\r\n events.mouseEnter((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data);\r\n }).mouseLeave((node) => {\r\n this.clearSelected(false);\r\n });\r\n\r\n events.click((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data, true);\r\n });\r\n\r\n this.graphics = graphics;\r\n this.renderer.run();\r\n\r\n // draw vertices by order\r\n this.verticesIncomingOrder.forEach((id) => {\r\n let v = this.vertices.get(id);\r\n if (v) {\r\n this.drawVertex(v);\r\n }\r\n })\r\n }\r\n\r\n stop = () => {\r\n this.draw = false;\r\n this.renderer.dispose();\r\n this.graph = null;\r\n this.paused = false;\r\n this.selected = null;\r\n }\r\n\r\n @action\r\n updateSelected = (vert: Vertex, viaClick?: boolean) => {\r\n if (!vert) return;\r\n\r\n this.selected = vert;\r\n this.selected_via_click = !!viaClick;\r\n\r\n // mutate links\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n this.selected_origin_color = nodeUI.color\r\n nodeUI.color = parseColor(COLOR.Selected);\r\n nodeUI.size = vertexSize * 1.5;\r\n\r\n let node = this.graph.getNode(vert.id);\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedFutureConeLine);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedPastConeLine);\r\n },\r\n seenForward\r\n );\r\n }\r\n\r\n resetLinks = () => {\r\n this.graph.forEachLink(function (link) {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n });\r\n }\r\n\r\n @action\r\n clearSelected = (force_clear?: boolean) => {\r\n if (!this.selected || (this.selected_via_click && !force_clear)) {\r\n return;\r\n }\r\n\r\n // clear link highlight\r\n let node = this.graph.getNode(this.selected.id);\r\n if (!node) {\r\n // clear links\r\n this.resetLinks();\r\n return;\r\n }\r\n\r\n let nodeUI = this.graphics.getNodeUI(this.selected.id);\r\n nodeUI.color = this.selected_origin_color;\r\n nodeUI.size = vertexSize;\r\n\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenForward\r\n );\r\n\r\n this.selected = null;\r\n this.selected_via_click = false;\r\n }\r\n\r\n}\r\n\r\nexport default VisualizerStore;\r\n\r\n// copied over and refactored from https://github.com/glumb/IOTAtangle\r\nfunction dfsIterator(graph, node, cb, up, cbLinks: any = false, seenNodes = []) {\r\n seenNodes.push(node);\r\n let pointer = 0;\r\n\r\n while (seenNodes.length > pointer) {\r\n const node = seenNodes[pointer++];\r\n\r\n if (cb(node)) return true;\r\n\r\n if (!node.links) {\r\n return\r\n }\r\n\r\n for (const link of node.links) {\r\n // parents\r\n if (!up && link.toId === node.id && !seenNodes.includes(graph.getNode(link.fromId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.fromId));\r\n continue;\r\n }\r\n\r\n // children\r\n if (up && link.fromId === node.id && !seenNodes.includes(graph.getNode(link.toId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.toId));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction parseColor(color): any {\r\n let parsedColor = 0x009ee8ff;\r\n\r\n if (typeof color === 'number') {\r\n return color;\r\n }\r\n\r\n if (typeof color === 'string' && color) {\r\n if (color.length === 4) {\r\n // #rgb, duplicate each letter except first #.\r\n color = color.replace(/([^#])/g, '$1$1');\r\n }\r\n if (color.length === 9) {\r\n // #rrggbbaa\r\n parsedColor = parseInt(color.substr(1), 16);\r\n } else if (color.length === 7) {\r\n // or #rrggbb.\r\n parsedColor = (parseInt(color.substr(1), 16) << 8) | 0xff;\r\n } else {\r\n throw 'Color expected in hex format with preceding \"#\". E.g. #00ff00. Got value: ' + color;\r\n }\r\n }\r\n\r\n return parsedColor;\r\n}\r\n","import {action, computed, observable} from 'mobx';\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Col, ListGroupItem, OverlayTrigger, Popover, Row} from \"react-bootstrap\";\nimport Plus from \"../../assets/plus.svg\";\nimport Minus from \"../../assets/minus.svg\";\nimport {displayManaUnit} from \"../utils\";\n\nclass ManaBlk {\n nodeID: string;\n access: number;\n consensus: number;\n // in s?\n time: number;\n}\n\nexport class Node {\n shortNodeID: string;\n nodeID: string;\n mana: number;\n}\n\nclass NetworkManaBlk {\n manaType: string;\n totalMana: number;\n nodes: Array;\n}\n\nexport class AllowedPledgeIDsBlk {\n accessFilter: PledgeIDFilter;\n consensusFilter: PledgeIDFilter;\n}\n\nexport class PledgeIDFilter {\n enabled: boolean;\n allowedNodeIDs: Array;\n}\n\nexport class AllowedNodeStr {\n shortID: string;\n fullID: string;\n}\n\nclass PledgeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass RevokeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass ManaEvent {\n nodeID: string;\n time: Date;\n txID: string;\n\n constructor(nodeID: string, time: Date, txID: string) {\n this.nodeID = nodeID;\n this.time = time;\n this.txID = txID;\n }\n}\n\nclass PledgeEvent extends ManaEvent{\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nclass RevokeEvent extends ManaEvent {\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nconst emptyRow = (\n There are no nodes to view with the current search parameters.\n)\nconst emptyListItem = (\n There are no events to view with the current search parameters.)\n\n// every 10 seconds, a new value arrives, so this is roughly 17 mins\nconst maxStoredManaValues = 100;\n// number of previous pledge/revoke events we keep track of. (/2 of plugins/dashboard/maxManaEventsBufferSize)\nconst maxEventsStored = 100;\n\nexport class ManaStore {\n // mana values\n @observable manaValues: Array = [];\n // first is accessm second consensus\n @observable prevManaValues: Array = [0,0];\n // list of richest access mana nodes in network, sorted in descending order\n @observable accessNetworkRichest: Array = [];\n @observable totalAccessNetwork: number = 0.0;\n // list of richest active access mana nodes in the network, sorted in descending order\n @observable accessActiveRichest: Array = [];\n @observable totalAccessActive: number = 0.0;\n // list of richest consensus mana nodes in their network, sorted in descending order\n @observable consensusNetworkRichest: Array = [];\n @observable totalConsensusNetwork: number = 0.0;\n // list of richest active consensus mana nodes in their network, sorted in descending order\n @observable consensusActiveRichest: Array = [];\n @observable totalConsensusActive: number = 0.0;\n\n @observable public searchNode = \"\";\n @observable public searchTxID = \"\";\n\n @observable public allowedPledgeIDs: AllowedPledgeIDsBlk;\n\n // internal arrays to store mana events\n accessEvents: Array = [];\n consensusEvents: Array = [];\n\n // internal arrays to store initial mana events\n initAccessEvents: Array = [];\n initConsensusEvents: Array = [];\n\n // info on latest removed events\n @observable lastRemovedAccessEventTime: Date = null;\n @observable lastRemovedConsensusEventTime: Date = null;\n\n lastInitRemovedAccessEventTime: Date = null;\n lastInitRemovedConsensusEventTime: Date = null;\n\n // only update displayed events when initial arrays were modified\n eventsUpdated: boolean = false;\n\n // mana events displayed in frontend\n @observable displayedAccessEvents: Array = [];\n @observable displayedConsensusEvents: Array = [];\n\n ownID: string;\n\n nodeNotSyncedListItem = (Wait for node to be synced to display mana events.);\n\n constructor() {\n this.manaValues = [];\n\n registerHandler(WSMsgType.Mana, this.addNewManaValue);\n registerHandler(WSMsgType.ManaMapOverall, this.updateNetworkRichest);\n registerHandler(WSMsgType.ManaMapOnline, this.updateActiveRichest);\n // registerHandler(WSMsgType.ManaAllowedPledge, this.updateAllowedPledgeIDs);\n // registerHandler(WSMsgType.ManaInitPledge, this.addNewInitPledge);\n // registerHandler(WSMsgType.ManaInitRevoke, this.addNewInitRevoke);\n // registerHandler(WSMsgType.ManaInitDone, this.initDone);\n // registerHandler(WSMsgType.ManaPledge, this.addNewPledge);\n // registerHandler(WSMsgType.ManaRevoke, this.addNewRevoke);\n };\n\n @action\n updateNodeSearch(searchNode: string): void {\n this.searchNode = searchNode.trim();\n }\n\n @action\n updateTxSearch(searchTxID: string): void {\n this.searchTxID = searchTxID.trim();\n }\n\n @action\n addNewManaValue = (manaBlk: ManaBlk) => {\n this.ownID = this.ownID? this.ownID : manaBlk.nodeID;\n if (this.manaValues.length === maxStoredManaValues) {\n // shift if we already have enough values\n this.manaValues.shift();\n }\n let newManaData = [new Date(manaBlk.time*1000), manaBlk.access, manaBlk.consensus];\n if (this.manaValues.length > 0){\n this.prevManaValues = [this.manaValues[this.manaValues.length -1][1] , this.manaValues[this.manaValues.length -1][2]]\n }\n this.manaValues.push(newManaData);\n }\n\n @action\n updateNetworkRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessNetwork = blk.totalMana;\n this.accessNetworkRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusNetwork = blk.totalMana;\n this.consensusNetworkRichest = blk.nodes;\n break;\n }\n }\n\n @action\n updateActiveRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessActive = blk.totalMana;\n this.accessActiveRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusActive = blk.totalMana;\n this.consensusActiveRichest = blk.nodes;\n break;\n }\n };\n\n @action\n updateAllowedPledgeIDs = (blk: AllowedPledgeIDsBlk) => {\n this.allowedPledgeIDs = blk;\n }\n\n @action\n addNewInitPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.initAccessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n }\n\n @action\n addNewPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.accessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n addNewInitRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n }\n\n @action\n addNewRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n initDone = () => {\n this.accessEvents = this.initAccessEvents;\n this.lastRemovedAccessEventTime = this.lastInitRemovedAccessEventTime;\n this.consensusEvents= this.initConsensusEvents;\n this.lastRemovedConsensusEventTime = this.lastInitRemovedConsensusEventTime;\n\n this.displayedAccessEvents = [...this.accessEvents]\n this.displayedConsensusEvents = [...this.consensusEvents]\n\n setInterval(() => {\n if (this.eventsUpdated) {\n this.displayedAccessEvents = [...this.accessEvents];\n this.displayedConsensusEvents = [...this.consensusEvents];\n this.eventsUpdated = false;\n }\n }, 500)\n }\n\n nodeList = (leaderBoard: Array, manaSum: number) => {\n if (leaderBoard === null || leaderBoard == undefined) {\n return []\n }\n let feed = [];\n let pushToFeed = (node: Node, i: number) => {\n feed.push(\n \n {i + 1} \n {node.shortNodeID}\n {displayManaUnit(node.mana)}\n {((node.mana / manaSum)*100.0).toFixed(2)}%\n \n );\n };\n let callback = (node: Node, i: number) => {\n if (this.passesNodeFilter(node.shortNodeID)){\n pushToFeed(node, i);\n }\n };\n leaderBoard.forEach(callback);\n return feed\n }\n\n @computed\n get networkRichestFeedAccess() {\n let result = this.nodeList(this.accessNetworkRichest, this.totalAccessNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get networkRichestFeedConsensus() {\n let result = this.nodeList(this.consensusNetworkRichest, this.totalConsensusNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedAccess() {\n let result = this.nodeList(this.accessActiveRichest, this.totalAccessActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedConsensus() {\n let result = this.nodeList(this.consensusActiveRichest, this.totalConsensusActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get accessHistogramInput() {\n if (this.accessNetworkRichest === undefined || this.accessNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.accessNetworkRichest.length; i++) {\n histInput.push(\n [this.accessNetworkRichest[i].shortNodeID, Math.log10(this.accessNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get consensusHistogramInput() {\n if (this.consensusNetworkRichest === undefined || this.consensusNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.consensusNetworkRichest.length; i++) {\n histInput.push(\n [this.consensusNetworkRichest[i].shortNodeID, Math.log10(this.consensusNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get accessPercentile() {\n let per = 0.0;\n // find id\n if (this.accessNetworkRichest !== undefined && this.accessNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.accessNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.accessNetworkRichest.length - (index + 1)) / this.accessNetworkRichest.length) * 100;\n break;\n }\n }\n return per\n }\n\n @computed\n get consensusPercentile() {\n let per = 0.0;\n // find id\n if ( this.consensusNetworkRichest !== undefined && this.consensusNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.consensusNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.consensusNetworkRichest.length - (index +1)) / this.consensusNetworkRichest.length) * 100;\n }\n }\n return per\n }\n\n computeEventList = (evArr: Array) => {\n let result = [];\n result.push(\n \n \n \n \n \n NodeID\n \n \n Tx ID\n \n \n Time\n \n \n \n )\n if (evArr === undefined || evArr === null) {\n return result\n }\n let pushToEventFeed = (element: ManaEvent, index) => {\n if (element instanceof PledgeEvent) {\n let popover = (ev: PledgeEvent) => {\n return (\n \n Mana Pledged\n \n
Base Mana: +{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
To NodeID: {ev.nodeID}
\n
Time of Pledge: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Plus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n } else if (element instanceof RevokeEvent){\n let popover = (ev: RevokeEvent) => {\n return (\n \n Mana Revoked\n \n
Base Mana 1: -{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
From NodeID: {ev.nodeID}
\n
Time of Revoke: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n // it's a revoke event then\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Minus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n }\n };\n // && this.passesTimeFilter(event.time) {\n let callback = (event: ManaEvent, i: number) => {\n if (this.passesNodeFilter(event.nodeID) && this.passesTxFilter(event.txID)){\n pushToEventFeed(event, i);\n }\n };\n // reverse traverse bc oldest event is the first\n evArr.reverse().forEach(callback)\n return result;\n }\n\n @computed\n get accessEventList() {\n let result = this.computeEventList(this.displayedAccessEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n @computed\n get consensusEventList() {\n let result = this.computeEventList(this.displayedConsensusEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n passesNodeFilter = (nodeID: string) : boolean => {\n if (this.searchNode.trim().length === 0) {\n // node filter is disabled, anything passes the filter\n return true;\n } else if (nodeID.toLowerCase().includes(this.searchNode.toLowerCase())){\n // node filter is enabled, nodeID contains search term\n return true;\n }\n // filter enabled but nodeID doesn't pass\n return false;\n }\n\n passesTxFilter = (txID: string) : boolean => {\n if (this.searchTxID.trim().length === 0) {\n // txID filter is disabled, anything passes the filter\n return true;\n } else if (txID.toLowerCase().includes(this.searchTxID.toLowerCase())){\n // txID filter is enabled, txID contains search term\n return true;\n }\n // filter enabled but txID doesn't pass\n return false;\n }\n}\n\nexport default ManaStore;\n","import {computed, action, observable} from \"mobx\";\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Link} from 'react-router-dom';\n\nconst liveFeedSize = 100;\n\nexport class SlotInfo {\n index: number;\n id: string;\n}\n\nexport class SlotStore {\n @observable liveFeed: Array = [];\n\n constructor() {\n registerHandler(WSMsgType.SlotInfo, this.addLiveFeed);\n }\n\n @action addLiveFeed = async (info: SlotInfo) => {\n if (this.liveFeed.findIndex((t) => t.id == info.id) === -1) {\n if (this.liveFeed.length >= liveFeedSize) {\n this.liveFeed.shift();\n }\n this.liveFeed.push(info);\n }\n }\n\n @computed\n get slotLiveFeed() {\n let feed = [];\n for (let i = this.liveFeed.length - 1; i >= 0; i--) {\n let info = this.liveFeed[i];\n feed.push(\n \n \n {info.index}\n \n \n \n {info.id}\n \n \n \n );\n }\n return feed;\n }\n}","import {action, computed, observable} from 'mobx';\r\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\r\nimport * as React from \"react\";\r\nimport {RouterStore,} from \"mobx-react-router\";\r\nimport {Link} from \"react-router-dom\";\r\nimport NodeStore from './NodeStore';\r\nimport {Table} from \"react-bootstrap\";\r\nimport {ConfirmationState, resolveConfirmationState} from \"../utils/confirmation_state\";\r\n\r\nexport class SpendSet {\r\n spendSetID: string;\r\n arrivalTime: number;\r\n resolved: boolean;\r\n timeToResolve: number;\r\n shown: boolean;\r\n}\r\n\r\nexport class Spend {\r\n spendID: string;\r\n spendSetIDs: Array;\r\n confirmationState: number;\r\n issuingTime: number;\r\n issuerNodeID: string;\r\n}\r\n\r\n// const liveFeedSize = 10;\r\n\r\nexport class SpendsStore {\r\n // live feed\r\n @observable spendSets: Map;\r\n @observable spends: Map;\r\n \r\n routerStore: RouterStore;\r\n nodeStore: NodeStore;\r\n\r\n constructor(routerStore: RouterStore, nodeStore: NodeStore) {\r\n this.routerStore = routerStore;\r\n this.nodeStore = nodeStore;\r\n this.spendSets = new Map;\r\n this.spends = new Map;\r\n registerHandler(WSMsgType.SpendSet, this.updateSpendSets);\r\n registerHandler(WSMsgType.Spend, this.updateSpends);\r\n }\r\n\r\n @action\r\n updateSpendSets = (blk: SpendSet) => {\r\n this.spendSets.set(blk.spendSetID, blk);\r\n };\r\n\r\n @action\r\n updateSpends = (blk: Spend) => {\r\n this.spends.set(blk.spendID, blk);\r\n };\r\n \r\n @computed\r\n get spendsLiveFeed() {\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let spendsArr = Array.from(this.spendSets.values());\r\n spendsArr.sort((x: SpendSet, y: SpendSet): number => {\r\n return y.arrivalTime - x.arrivalTime || x.spendSetID.localeCompare(y.spendSetID);\r\n }\r\n )\r\n\r\n let feed = [];\r\n for (let spend of spendsArr) {\r\n feed.push(\r\n spend.shown = !spend.shown} style={{cursor:\"pointer\"}}>\r\n \r\n \r\n {spend.spendSetID}\r\n \r\n \r\n \r\n {new Date(spend.arrivalTime * 1000).toLocaleString()}\r\n \r\n \r\n {spend.resolved ? 'Yes' : 'No'}\r\n \r\n \r\n {spend.timeToResolve/1000000}\r\n \r\n \r\n );\r\n\r\n // only render and show branches if it has been clicked\r\n if (!spend.shown) {\r\n continue\r\n }\r\n\r\n // sort branches by time and ID to prevent \"jumping\"\r\n let branchesArr = Array.from(this.spends.values());\r\n branchesArr.sort((x: Spend, y: Spend): number => {\r\n return x.issuingTime - y.issuingTime || x.spendID.localeCompare(y.spendID)\r\n }\r\n )\r\n\r\n let branches = [];\r\n for (let branch of branchesArr) {\r\n for(let spendID of branch.spendSetIDs){\r\n if (spendID === spend.spendSetID) {\r\n branches.push(\r\n ConfirmationState.Accepted ? \"table-success\" : \"\"}>\r\n \r\n \r\n {branch.spendID}\r\n \r\n \r\n {resolveConfirmationState(branch.confirmationState)}\r\n {new Date(branch.issuingTime * 1000).toLocaleString()}\r\n {branch.issuerNodeID}\r\n \r\n );\r\n }\r\n }\r\n }\r\n feed.push(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {branches}\r\n \r\n
BranchIDConfirmationStateIssuingTimeIssuer NodeID
\r\n \r\n \r\n );\r\n }\r\n\r\n return feed;\r\n }\r\n\r\n}\r\n\r\nexport default SpendsStore;\r\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {Provider} from 'mobx-react';\nimport {createBrowserHistory} from 'history';\nimport 'chartjs-plugin-streaming';\nimport {App} from './app/App';\nimport {RouterStore, syncHistoryWithStore} from 'mobx-react-router';\nimport {Router} from 'react-router-dom';\nimport NodeStore from \"./app/stores/NodeStore\";\nimport ExplorerStore from \"./app/stores/ExplorerStore\";\nimport FaucetStore from \"./app/stores/FaucetStore\";\nimport VisualizerStore from \"./app/stores/VisualizerStore\";\nimport ManaStore from \"./app/stores/ManaStore\";\nimport {SlotStore} from \"./app/stores/SlotStore\";\nimport SpendsStore from \"./app/stores/SpendsStore\";\n\n// prepare MobX stores\nconst routerStore = new RouterStore();\nconst nodeStore = new NodeStore();\nconst explorerStore = new ExplorerStore(routerStore);\nconst spendsStore = new SpendsStore(routerStore, nodeStore);\nconst faucetStore = new FaucetStore(routerStore);\nconst visualizerStore = new VisualizerStore(routerStore);\nconst manaStore = new ManaStore();\nconst slotStore = new SlotStore();\nconst stores = {\n \"routerStore\": routerStore,\n \"nodeStore\": nodeStore,\n \"explorerStore\": explorerStore,\n \"spendsStore\": spendsStore,\n \"faucetStore\": faucetStore,\n \"visualizerStore\": visualizerStore,\n \"manaStore\": manaStore,\n \"slotStore\": slotStore\n};\n\nconst browserHistory = createBrowserHistory();\nconst history = syncHistoryWithStore(browserHistory, routerStore);\n\n// render react DOM\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.7343ba1c945034668914.js b/components/dashboard/frontend/build/app.7343ba1c945034668914.js new file mode 100644 index 000000000..1400aa0b8 --- /dev/null +++ b/components/dashboard/frontend/build/app.7343ba1c945034668914.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2N3B4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NyA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Ut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ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+"},298:function(e,t,n){var r={"./af":107,"./af.js":107,"./ar":108,"./ar-dz":109,"./ar-dz.js":109,"./ar-kw":110,"./ar-kw.js":110,"./ar-ly":111,"./ar-ly.js":111,"./ar-ma":112,"./ar-ma.js":112,"./ar-sa":113,"./ar-sa.js":113,"./ar-tn":114,"./ar-tn.js":114,"./ar.js":108,"./az":115,"./az.js":115,"./be":116,"./be.js":116,"./bg":117,"./bg.js":117,"./bm":118,"./bm.js":118,"./bn":119,"./bn-bd":120,"./bn-bd.js":120,"./bn.js":119,"./bo":121,"./bo.js":121,"./br":122,"./br.js":122,"./bs":123,"./bs.js":123,"./ca":124,"./ca.js":124,"./cs":125,"./cs.js":125,"./cv":126,"./cv.js":126,"./cy":127,"./cy.js":127,"./da":128,"./da.js":128,"./de":129,"./de-at":130,"./de-at.js":130,"./de-ch":131,"./de-ch.js":131,"./de.js":129,"./dv":132,"./dv.js":132,"./el":133,"./el.js":133,"./en-au":134,"./en-au.js":134,"./en-ca":135,"./en-ca.js":135,"./en-gb":136,"./en-gb.js":136,"./en-ie":137,"./en-ie.js":137,"./en-il":138,"./en-il.js":138,"./en-in":139,"./en-in.js":139,"./en-nz":140,"./en-nz.js":140,"./en-sg":141,"./en-sg.js":141,"./eo":142,"./eo.js":142,"./es":143,"./es-do":144,"./es-do.js":144,"./es-mx":145,"./es-mx.js":145,"./es-us":146,"./es-us.js":146,"./es.js":143,"./et":147,"./et.js":147,"./eu":148,"./eu.js":148,"./fa":149,"./fa.js":149,"./fi":150,"./fi.js":150,"./fil":151,"./fil.js":151,"./fo":152,"./fo.js":152,"./fr":153,"./fr-ca":154,"./fr-ca.js":154,"./fr-ch":155,"./fr-ch.js":155,"./fr.js":153,"./fy":156,"./fy.js":156,"./ga":157,"./ga.js":157,"./gd":158,"./gd.js":158,"./gl":159,"./gl.js":159,"./gom-deva":160,"./gom-deva.js":160,"./gom-latn":161,"./gom-latn.js":161,"./gu":162,"./gu.js":162,"./he":163,"./he.js":163,"./hi":164,"./hi.js":164,"./hr":165,"./hr.js":165,"./hu":166,"./hu.js":166,"./hy-am":167,"./hy-am.js":167,"./id":168,"./id.js":168,"./is":169,"./is.js":169,"./it":170,"./it-ch":171,"./it-ch.js":171,"./it.js":170,"./ja":172,"./ja.js":172,"./jv":173,"./jv.js":173,"./ka":174,"./ka.js":174,"./kk":175,"./kk.js":175,"./km":176,"./km.js":176,"./kn":177,"./kn.js":177,"./ko":178,"./ko.js":178,"./ku":179,"./ku.js":179,"./ky":180,"./ky.js":180,"./lb":181,"./lb.js":181,"./lo":182,"./lo.js":182,"./lt":183,"./lt.js":183,"./lv":184,"./lv.js":184,"./me":185,"./me.js":185,"./mi":186,"./mi.js":186,"./mk":187,"./mk.js":187,"./ml":188,"./ml.js":188,"./mn":189,"./mn.js":189,"./mr":190,"./mr.js":190,"./ms":191,"./ms-my":192,"./ms-my.js":192,"./ms.js":191,"./mt":193,"./mt.js":193,"./my":194,"./my.js":194,"./nb":195,"./nb.js":195,"./ne":196,"./ne.js":196,"./nl":197,"./nl-be":198,"./nl-be.js":198,"./nl.js":197,"./nn":199,"./nn.js":199,"./oc-lnc":200,"./oc-lnc.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tk":223,"./tk.js":223,"./tl-ph":224,"./tl-ph.js":224,"./tlh":225,"./tlh.js":225,"./tr":226,"./tr.js":226,"./tzl":227,"./tzl.js":227,"./tzm":228,"./tzm-latn":229,"./tzm-latn.js":229,"./tzm.js":228,"./ug-cn":230,"./ug-cn.js":230,"./uk":231,"./uk.js":231,"./ur":232,"./ur.js":232,"./uz":233,"./uz-latn":234,"./uz-latn.js":234,"./uz.js":233,"./vi":235,"./vi.js":235,"./x-pseudo":236,"./x-pseudo.js":236,"./yo":237,"./yo.js":237,"./zh-cn":238,"./zh-cn.js":238,"./zh-hk":239,"./zh-hk.js":239,"./zh-mo":240,"./zh-mo.js":240,"./zh-tw":241,"./zh-tw.js":241};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=s,e.exports=a,a.id=298},434:function(e,t,n){"use strict";n.r(t);var r=n(1),a=n(22),s=n(6),l=n(24),o=(n(297),n(285)),i=n(56),c=n(39),p=n(13),d=n(11),u=n(9),m=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let h=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Uptime: ",this.props.nodeStore.uptime)}};h=m([Object(s.b)("nodeStore"),s.c],h);var g=h,b=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let y=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Version: ",this.props.nodeStore.status.version)}};y=b([Object(s.b)("nodeStore"),s.c],y);var f=y,E=n(14),v=n(29),k={elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0},I=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const x=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},k);let S=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Blocks Per Second"),r.createElement("small",null,"BPS: ",this.props.nodeStore.last_mps_metric.mps,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.mpsSeries,options:x})))}};S=I([Object(s.b)("nodeStore"),s.c],S);var j=S,O=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const w=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},k);let _=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Current Tips"),r.createElement("small",null,"Tips: ",this.props.nodeStore.last_tips_metric.totaltips,"."),r.createElement(v.Line,{height:50,data:this.props.nodeStore.tipsSeries,options:w})))}};_=O([Object(s.b)("nodeStore"),s.c],_);var R=_,D=n(2),C=n(28),N=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const T=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return C(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${C(Math.abs(e.value))}`}}}},k);let P=class extends r.Component{render(){let e=this.props.nodeStore.status.mem;return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Memory Usage"," ",C(e.heap_alloc)),r.createElement("small",null,"GC Cycles: ",e.num_gc," (Last Cycle: ",e.last_pause_gc/1e6,"ms) - "," ","Heap: "," ","[Obj: ",e.heap_objects,", In-Use: ",C(e.heap_sys-e.heap_idle),", Retained: ",C(e.heap_idle-e.heap_released),"]"),r.createElement(v.Line,{height:50,data:this.props.nodeStore.memSeries,options:T})))}};P=N([Object(s.b)("nodeStore"),s.c],P);var M=P,L=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const A=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return Math.abs(e)},fontSize:10,maxTicksLimit:4,beginAtZero:!0}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${Math.abs(e.value)}`}}}},k);let B=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Component Counter Blocks Per Second"),r.createElement("div",{style:{display:"flex",flexDirection:"column"}},r.createElement("small",null,"BPS: ",this.props.nodeStore.last_component_counter_metric.store,"."),r.createElement("small",null,"Rate Setter - Estimate: ",this.props.nodeStore.last_rate_setter_metric.estimate)),r.createElement(v.Line,{height:50,data:this.props.nodeStore.componentSeries,options:A})))}};B=L([Object(s.b)("nodeStore"),s.c],B);var z=B,H=n(15),F=n(20),Z=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let U=class extends r.Component{render(){return r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"TangleTime Synced: ",this.props.nodeStore.status.tangleTime.synced?"Yes":"No"),r.createElement("small",null,r.createElement("div",null,r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Accepted Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.acceptedBlockID},this.props.nodeStore.status.tangleTime.acceptedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Block: ",r.createElement(H.Link,{to:"/explorer/block/"+this.props.nodeStore.status.tangleTime.confirmedBlockID},this.props.nodeStore.status.tangleTime.confirmedBlockID))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Confirmed Slot:",this.props.nodeStore.status.tangleTime.confirmedSlot)),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-12"},"Last Committed Slot:",this.props.nodeStore.status.tangleTime.committedSlot)),r.createElement("hr",null),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.ATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.CTT/1e6),"dd.mm.yyyy HH:MM:ss"))),r.createElement("div",{className:"row"},r.createElement("div",{className:"col-3"},"Relative Acceptance Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RATT/1e6),"dd.mm.yyyy HH:MM:ss")),r.createElement("div",{className:"col-3"},"Relative Confirmation Time:"),r.createElement("div",{className:"col-3"},F(new Date(this.props.nodeStore.status.tangleTime.RCTT/1e6),"dd.mm.yyyy HH:MM:ss")))))))}};U=Z([Object(s.b)("nodeStore"),s.c],U);var V=U,W=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let J=class extends r.Component{render(){return r.createElement(r.Fragment,null,"Bootstrapped: ",this.props.nodeStore.status.tangleTime.bootstrapped?"Yes":"No")}};J=W([Object(s.b)("nodeStore"),s.c],J);var G=J,q=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let X=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Dashboard"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Node: ",this.props.nodeStore.status.id),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,{variant:"flush"},r.createElement(D.a.Item,null,r.createElement(g,null)))),r.createElement(u.a,null,r.createElement(D.a,{variant:"flush"},r.createElement(D.a.Item,null,r.createElement(G,null)))),r.createElement(u.a,null,r.createElement(D.a,{variant:"flush"},r.createElement(D.a.Item,null,r.createElement(f,null))))))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(V,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(j,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(R,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(z,null))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(M,null))))}};X=q([Object(s.b)("nodeStore"),s.c],X);var Q=n(16),$=n(25),Y=n(23),K=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ee=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(Y.a,{className:"mb-3"},r.createElement($.a,{placeholder:"Address or Block ID","aria-label":"Address or Block ID","aria-describedby":"basic-addon1",value:e,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:t})))))}};ee=K([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ee);var te=n(71),ne=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let re=class extends r.Component{render(){let{blksLiveFeed:e}=this.props.explorerStore;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,"Live Feed"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{height:"500px",overflow:"auto"}},r.createElement("h6",null,"Blocks"),r.createElement(te.a,null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("td",null,"Id"),r.createElement("td",null,"Payload Type"))),r.createElement("tbody",null,e))))))))}};re=ne([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],re);var ae=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let se=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.txID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/transaction/"+this.txID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(Y.a,{className:"mb-3"},r.createElement($.a,{placeholder:"Transaction ID","aria-label":"Transaction ID","aria-describedby":"basic-addon1",value:this.txID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};se=ae([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],se);var le=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let oe=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.outputID=e.target.value},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.routerStore.push("/explorer/output/"+this.outputID)}}render(){let{searching:e}=this.props.explorerStore;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(Y.a,{className:"mb-3"},r.createElement($.a,{placeholder:"Output ID","aria-label":"Output ID","aria-describedby":"basic-addon1",value:this.outputID,onChange:this.updateSearch,onKeyUp:this.executeSearch,disabled:e})))))}};oe=le([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],oe);var ie=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ce=class extends r.Component{render(){return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer"),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("p",null,"Search for addresses, blocks, transactions, outputs and spends."))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(ee,null)),r.createElement(u.a,null,r.createElement(se,null))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(oe,null))),r.createElement(re,null),r.createElement("small",null,"This explorer implementation is heavily inspired by ",r.createElement("a",{href:"https://thetangle.org"},"thetangle.org"),"."))}};ce=ie([Object(s.b)("nodeStore"),s.c],ce);var pe=n(288),de=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ue=class extends r.Component{constructor(){super(...arguments),this.updateSearch=e=>{this.props.explorerStore.updateSearch(e.target.value)},this.executeSearch=e=>{"Enter"===e.key&&this.props.explorerStore.searchAny()}}render(){let{search:e,searching:t}=this.props.explorerStore;return r.createElement(pe.a,{inline:!0,as:"div"},r.createElement($.a,{type:"text",onChange:this.updateSearch,placeholder:"Search the Tangle...",value:e,className:" mr-sm-2",disabled:t,onKeyUp:this.executeSearch}))}};ue=de([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],ue);var me,he=n(17),ge=n(44),be=n(3);!function(e){e[e.Status=0]="Status",e[e.BPSMetrics=1]="BPSMetrics",e[e.Block=2]="Block",e[e.NeighborStats=3]="NeighborStats",e[e.ComponentCounterMetrics=4]="ComponentCounterMetrics",e[e.TipsMetrics=5]="TipsMetrics",e[e.Vertex=6]="Vertex",e[e.TXAccepted=7]="TXAccepted",e[e.TipInfo=8]="TipInfo",e[e.Mana=9]="Mana",e[e.ManaMapOverall=10]="ManaMapOverall",e[e.ManaMapOnline=11]="ManaMapOnline",e[e.BlkManaDashboardAddress=12]="BlkManaDashboardAddress",e[e.RateSetter=13]="RateSetter",e[e.SpendSet=14]="SpendSet",e[e.Spend=15]="Spend",e[e.SlotInfo=16]="SlotInfo"}(me||(me={}));let ye={};function fe(e,t){ye[e]=t}function Ee(e){delete ye[e]}var ve,ke,Ie,xe;!function(e){e[e.TaggedData=0]="TaggedData",e[e.Transaction=1]="Transaction",e[e.Faucet=3]="Faucet"}(ve||(ve={}));class Se{}class je{}function Oe(e){switch(e){case ve.TaggedData:return"TaggedData";case ve.Transaction:return"Transaction";case ve.Faucet:return"Faucet";default:return"Unknown"}}class we extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.token.id},r.createElement(D.a,null,r.createElement(D.a.Item,null,"ID: ",this.props.token.id),r.createElement(D.a.Item,null,"Amount: ",this.props.token.amount)))}}class _e extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.address},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Address Type: ",this.props.unlock.address.type)),r.createElement(D.a,null,r.createElement(D.a.Item,null,"Address: ",this.props.unlock.address.pubKeyHash)))}}class Re extends r.Component{render(){return this.props.unlock.unixTime&&r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.unixTime},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}class De extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(D.a.Item,null,"Amount: ",this.props.unlock.amount)))}}class Ce extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"unlockCondition"+this.props.unlock.returnAddress},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Return Address: ",this.props.unlock.returnAddress),r.createElement(D.a.Item,null,"Unix Time: ",this.props.unlock.unixTime)))}}function Ne(e){switch(e.type){case ke.Address:case ke.StateControllerAddress:case ke.GovernorAddress:return r.createElement(_e,{unlock:e});case ke.StorageDepositReturn:return r.createElement(De,{unlock:e});case ke.Expiration:return r.createElement(Ce,{unlock:e});case ke.Timelock:return r.createElement(Re,{unlock:e})}}!function(e){e[e.Address=0]="Address",e[e.StorageDepositReturn=1]="StorageDepositReturn",e[e.Timelock=2]="Timelock",e[e.Expiration=3]="Expiration",e[e.StateControllerAddress=4]="StateControllerAddress",e[e.GovernorAddress=5]="GovernorAddress",e[e.ImmutableAlias=6]="ImmutableAlias"}(ke||(ke={}));class Te extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.address},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Address: ",this.props.feature.address)))}}class Pe extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.data},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Data: ",this.props.feature.data)))}}class Me extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:"feature"+this.props.feature.tag},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Data: ",this.props.feature.tag)))}}function Le(e){switch(e.type){case Ie.Sender:case Ie.Issuer:return r.createElement(Te,{feature:e.feature});case Ie.Metadata:return r.createElement(Pe,{feature:e.feature});case Ie.Tag:return r.createElement(Me,{feature:e.feature})}}!function(e){e[e.Sender=0]="Sender",e[e.Issuer=1]="Issuer",e[e.Metadata=2]="Metadata",e[e.Tag=3]="Tag"}(Ie||(Ie={}));class Ae extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Type: BasicOutput"),r.createElement(D.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(D.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(we,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Ne(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Le(e)),r.createElement(D.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(D.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class Be extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(D.a,{style:{wordBreak:"break-word"}},r.createElement(D.a.Item,null,"Type: AliasOutput"),r.createElement(D.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(D.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(D.a.Item,null,"AliasID: ",this.props.output.aliasId),r.createElement(D.a.Item,null,"StateIndex: ",this.props.output.stateIndex),r.createElement(D.a.Item,null,"State Metadata: ",this.props.output.stateMetadata," "),r.createElement(D.a.Item,null,"Foundry Counter: ",this.props.output.foundryCounter),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(we,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Ne(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Le(e)),r.createElement(D.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(D.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class ze extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Type: FoundryOutput"),r.createElement(D.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(D.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(D.a.Item,null,"Serial Number: ",this.props.output.serialNumber),r.createElement(D.a.Item,null,"Token Scheme: ",this.props.output.tokenScheme),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(we,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Ne(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Le(e)),r.createElement(D.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(D.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}class He extends r.Component{render(){return r.createElement("div",{className:"mb-2",key:this.props.id.hex},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Type: FoundryOutput"),r.createElement(D.a.Item,null,"Amount: ",this.props.output.amount),r.createElement(D.a.Item,null,"OutputID: ",r.createElement("a",{href:"/explorer/output/"+this.props.id.hex},this.props.id.hex)),r.createElement(D.a.Item,null,"NFT ID: ",this.props.output.nftId),this.props.output.nativeTokens&&this.props.output.nativeTokens.map((e,t)=>r.createElement(we,{token:e})),this.props.output.unlockConditions&&this.props.output.unlockConditions.map((e,t)=>Ne(e)),this.props.output.features&&this.props.output.features.map((e,t)=>Le(e)),r.createElement(D.a.Item,null,"Transaction: ",r.createElement("a",{href:"/explorer/transaction/"+this.props.id.transactionID}," ",this.props.id.transactionID)),r.createElement(D.a.Item,null,"Output Index: ",this.props.id.outputIndex)))}}function Fe(e){let t=e.outputID;switch(e.type){case xe.Basic:return r.createElement(Ae,{output:e.output,id:t});case xe.Alias:return r.createElement(Be,{output:e.output,id:t});case xe.Foundry:return r.createElement(ze,{output:e.output,id:t});case xe.NFT:return r.createElement(He,{output:e.output,id:t});default:return}}!function(e){e[e.Treasury=2]="Treasury",e[e.Basic=3]="Basic",e[e.Alias=4]="Alias",e[e.Foundry=5]="Foundry",e[e.NFT=6]="NFT"}(xe||(xe={}));var Ze=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},Ue=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Ve=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};const We="1111111111111111111111111111111111111111111111111111111111111111";class Je{}var Ge;!function(e){e[e.NotFound=1]="NotFound",e[e.BadRequest=2]="BadRequest"}(Ge||(Ge={}));class qe{constructor(e){this.latest_blocks=[],this.blk=null,this.addr=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.tips=null,this.slotInfo=new Je,this.query_loading=!1,this.query_err=null,this.search="",this.search_result=null,this.searching=!1,this.searchAny=()=>Ve(this,void 0,void 0,(function*(){this.updateSearching(!0);try{let e=yield fetch("/api/search/"+this.search),t=yield e.json();this.updateSearchResult(t)}catch(e){this.updateQueryError(e)}})),this.resetSearch=()=>{this.search_result=null,this.searching=!1},this.updateSearchResult=e=>{this.search_result=e,this.searching=!1;let t=this.search;this.search="",this.search_result.block?this.routerStore.push("/explorer/block/"+t):this.search_result.address?this.routerStore.push("/explorer/address/"+t):this.routerStore.push("/explorer/404/"+t)},this.updateSearch=e=>{this.search=e},this.updateSearching=e=>this.searching=e,this.searchBlock=e=>Ve(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/block/"+e);this.updateBlock(t)})),this.searchAddress=e=>Ve(this,void 0,void 0,(function*(){this.updateQueryLoading(!0);const t=yield this.fetchJson("get","/api/address/"+e);this.updateAddress(t)})),this.getSlotDetails=e=>Ve(this,void 0,void 0,(function*(){yield this.getSlotInfo(e)})),this.getTransaction=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/transaction/"+e);for(let e=0;eVe(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/attachments`);this.txAttachments=t})),this.getTransactionMetadata=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/transaction/${e}/metadata`);this.txMetadata=t})),this.getOutput=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/output/"+e);this.output=t})),this.getOutputMetadata=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/metadata`);this.outputMetadata=t})),this.getOutputConsumers=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get",`/api/output/${e}/consumers`);this.outputConsumers=t})),this.getPendingMana=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/mana/pending?OutputID="+e);this.pendingMana=t})),this.getSlotInfo=e=>Ve(this,void 0,void 0,(function*(){const t=yield this.fetchJson("get","/api/slot/commitment/"+e);this.slotInfo=t})),this.getTips=()=>Ve(this,void 0,void 0,(function*(){const e=yield this.fetchJson("get","/api/tips");this.tips=e})),this.reset=()=>{this.blk=null,this.query_err=null,this.tx=null,this.txMetadata=null,this.txAttachments=[],this.output=null,this.outputMetadata=null,this.outputConsumers=null,this.pendingMana=null,this.tips=null,this.slotInfo=new Je},this.updateAddress=e=>{this.addr=e,this.query_err=null,this.query_loading=!1},this.updateBlock=e=>{switch(this.blk=e,this.blk.spendIDs=this.blk.spendIDs?this.blk.spendIDs:[],this.blk.strongChildren=this.blk.strongChildren?this.blk.strongChildren:[],this.blk.weakChildren=this.blk.weakChildren?this.blk.weakChildren:[],this.blk.shallowLikeChildren=this.blk.shallowLikeChildren?this.blk.shallowLikeChildren:[],this.blk.strongParents=this.blk.strongParents?this.blk.strongParents:[],this.blk.weakParents=this.blk.weakParents?this.blk.weakParents:[],this.blk.shallowLikedParents=this.blk.shallowLikedParents?this.blk.shallowLikedParents:[],this.query_err=null,this.query_loading=!1,e.payloadType){case ve.Transaction:case ve.TaggedData:this.payload=e.payload;break;case ve.Faucet:this.payload=e.payload;default:this.payload=e.payload}},this.updateQueryLoading=e=>this.query_loading=e,this.updateQueryError=e=>{this.query_err=e,this.query_loading=!1,this.searching=!1},this.addLiveFeedBlock=e=>{-1===this.latest_blocks.findIndex(t=>t.id==e.id)&&(this.latest_blocks.length>=50&&this.latest_blocks.shift(),this.latest_blocks.push(e))},this.routerStore=e,fe(me.Block,this.addLiveFeedBlock)}get blksLiveFeed(){let e=[];for(let t=this.latest_blocks.length-1;t>=0;t--){let n=this.latest_blocks[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id)),r.createElement("td",null,Oe(n.payload_type))))}return e}get tipsList(){let e=[];if(this.tips)for(let t=0;t=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ye=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,e.content_title,": "," ",e.content)))}};Ye=$e([Object(s.b)("explorerStore"),s.c],Ye);var Ke,et=n(0),tt=n(282);!function(e){e[e.Ed25519=0]="Ed25519",e[e.BLS=1]="BLS"}(Ke||(Ke={}));class nt extends r.Component{render(){let e=this.props.signature;return r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,null,r.createElement(D.a.Item,null,"Public Key: ",e.publicKey),r.createElement(D.a.Item,null,"Signature: ",e.signature)))))}}class rt extends r.Component{renderSignatureComponent(){switch(this.props.block.signatureType){case Ke.Ed25519:return r.createElement(nt,{signature:this.props.block.signature})}}render(){let e=this.props.block;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,"Index: ",r.createElement(Q.a,{variant:"primary"},this.props.key),r.createElement(D.a,null,r.createElement(D.a.Item,null,"Type: ",e.type),e.signatureType&&r.createElement(D.a.Item,null,"Signature Type: ",function(e){switch(e){case Ke.Ed25519:return"Ed25519 Signature";case Ke.BLS:return"BLS Signature";default:return"Unknown Signature Type"}}(e.signatureType)),this.renderSignatureComponent())))}}const at={maxHeight:"1000px",overflow:"auto",width:"47%",fontSize:"85%"};class st extends r.Component{render(){let e=this.props.txID,t=this.props.tx;return t&&e&&r.createElement("div",null,r.createElement("h4",null,"Transaction"),r.createElement("p",null," ",e," "),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginTop:"10px",marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Transaction Essence")),r.createElement(D.a,null,r.createElement(D.a.Item,null,"ID: ",r.createElement("a",{href:"/explorer/transaction/"+e}," ",e)),r.createElement(D.a.Item,null,"Network ID: ",t.networkId),r.createElement(D.a.Item,null,"Creation Time: ",t.creationSlot),r.createElement(D.a.Item,null,r.createElement("div",{className:"d-flex justify-content-between align-items-center"},r.createElement("div",{className:"align-self-start input-output-list",style:at},r.createElement("span",null,"Inputs"),r.createElement("hr",null),t.inputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),r.createElement("div",{className:"mb-2",key:"input"+t},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Output ID: ",e.referencedOutputID.hex)))))),r.createElement(et.b.Provider,{value:{color:"#00a0ff",size:"2em"}},r.createElement("div",null,r.createElement(tt.a,null))),r.createElement("div",{style:at},r.createElement("span",null,"Outputs"),r.createElement("hr",null),t.outputs.map((e,t)=>r.createElement("div",{className:"mb-2",key:t},r.createElement("span",{className:"mb-2"},"Index: ",r.createElement(Q.a,{variant:"primary"},t)),Fe(e)))))),t.payload&&r.createElement(D.a.Item,null,"Data payload: ",t.payload)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("div",{style:{marginBottom:"20px",paddingBottom:"10px",borderBottom:"2px solid #eee"}},r.createElement("h5",null,"Unlock Blocks")),r.createElement(r.Fragment,null,t.unlocks.map((e,t)=>r.createElement(rt,{block:e,key:t}))))))}}var lt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ot=class extends r.Component{render(){let{payload:e,blk:t}=this.props.explorerStore,n=t.txId,a=e;return r.createElement(p.a,null,r.createElement(st,{txID:n,tx:a}))}};ot=lt([Object(s.b)("explorerStore"),s.c],ot);var it=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let ct=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,null,r.createElement(D.a.Item,null,"Address: ",e.address),r.createElement(D.a.Item,null,"Access Mana Pledge ID: ",e.accessManaPledgeID),r.createElement(D.a.Item,null,"Consensus Mana Pledge ID: ",e.consensusManaPledgeID),r.createElement(D.a.Item,null,"Nonce: ",e.nonce)))))}};ct=it([Object(s.b)("explorerStore"),s.c],ct);var pt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let dt=class extends r.Component{render(){let{payload:e}=this.props.explorerStore;return e&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,null,r.createElement(D.a.Item,null,"Tag: ",e.tag),r.createElement(D.a.Item,null,"Data: ",e.data)))))}};dt=pt([Object(s.b)("explorerStore"),s.c],dt);var ut=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let mt=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchBlock(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchBlock(this.props.match.params.id),null}getPayloadType(){return Oe(this.props.explorerStore.blk.payloadType)}renderPayload(){switch(this.props.explorerStore.blk.payloadType){case ve.Transaction:return this.props.explorerStore.blk.objectivelyInvalid?r.createElement(Ye,null):r.createElement(ot,null);case ve.TaggedData:return r.createElement(dt,null);case ve.Faucet:return r.createElement(ct,null);default:return r.createElement(Ye,null)}}render(){let{id:e}=this.props.match.params,{blk:t,query_loading:n,query_err:a}=this.props.explorerStore;return e===We?r.createElement(p.a,null,r.createElement("h3",null,"Genesis Block"),r.createElement("p",null,"In the beginning there was the genesis.")):a?r.createElement(p.a,null,r.createElement("h3",null,"Block not available - 404"),r.createElement("p",null,"Block with ID ",e," not found.")):r.createElement(p.a,null,r.createElement("h3",null,"Block"),r.createElement("p",null,e," "," ",t&&r.createElement(r.Fragment,null,r.createElement("br",null),r.createElement("span",null,r.createElement(Q.a,{variant:"light",style:{marginRight:10}},"Issuance Time: ",F(new Date(1e3*t.issuanceTimestamp),"dd.mm.yyyy HH:MM:ss")),r.createElement(Q.a,{variant:"light"},"Solidification Time: ",F(new Date(1e3*t.solidificationTimestamp),"dd.mm.yyyy HH:MM:ss"))))),t&&r.createElement(r.Fragment,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,null,r.createElement(D.a.Item,null,"Payload Type: ",this.getPayloadType()),r.createElement(D.a.Item,null,"Sequence Number: ",t.sequenceNumber),r.createElement(D.a.Item,null,"SpendIDs:",r.createElement(D.a,null,t.spendIDs.map((e,t)=>r.createElement(D.a.Item,{key:"SpendID"+t+1,className:"text-break"},e)))),r.createElement(D.a.Item,null,"Solid: ",t.solid?"Yes":"No"),r.createElement(D.a.Item,null,"Scheduled: ",t.scheduled?"Yes":"No"),r.createElement(D.a.Item,null,"Booked: ",t.booked?"Yes":"No"),r.createElement(D.a.Item,null,"Orphaned: ",t.orphaned?"Yes":"No"),r.createElement(D.a.Item,null,"Objectively Invalid: ",t.objectivelyInvalid?"Yes":"No"),r.createElement(D.a.Item,null,"Subjectively Invalid: ",t.subjectivelyInvalid?"Yes":"No"),r.createElement(D.a.Item,null,"Acceptance: ",t.acceptance?"Yes":"No"),r.createElement(D.a.Item,null,"Acceptance Time: ",F(new Date(1e3*t.acceptanceTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(D.a.Item,null,"Confirmation: ",t.confirmation?"Yes":"No"),r.createElement(D.a.Item,null,"Confirmation Time: ",F(new Date(1e3*t.confirmationTime),"dd.mm.yyyy HH:MM:ss")),r.createElement(D.a.Item,null,"Confirmation by slot: ",t.confirmationBySlot?"Yes":"No"),r.createElement(D.a.Item,null,"Confirmation by slot time: ",F(new Date(1e3*t.confirmationBySlotTime),"dd.mm.yyyy HH:MM:ss"))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Slot Commitment"),r.createElement(D.a,null,r.createElement(D.a.Item,null,"CommitmentID: ",t.commitmentID),r.createElement(D.a.Item,null,r.createElement(D.a,null,r.createElement(D.a.Item,null,"Index: ",t.commitment.index),r.createElement(D.a.Item,null,"prevID: ",t.commitment.prevID),r.createElement(D.a.Item,null,"rootsID: ",t.commitment.rootsID),r.createElement(D.a.Item,null,"Cumulative Weight: ",t.commitment.cumulativeWeight))),r.createElement(D.a.Item,null,"LatestConfirmedSlot: ",t.latestConfirmedSlot)))),!!t.rank&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h5",null,"Markers"),r.createElement(D.a,null,r.createElement(D.a.Item,null,"Rank: ",t.rank),r.createElement(D.a.Item,null,"SequenceID: ",t.sequenceID),r.createElement(D.a.Item,null,"PastMarkerGap: ",t.pastMarkerGap),r.createElement(D.a.Item,null,"IsPastMarker: ",t.isPastMarker?"Yes":"No"),r.createElement(D.a.Item,null,"Past markers: ",t.pastMarkers)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,null,r.createElement(D.a.Item,null,"IssuerID: ",t.issuerID),r.createElement(D.a.Item,{style:{overflow:"auto"}},"Block Signature: ",t.signature)))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,null,t.strongParents.map((e,n)=>r.createElement(D.a.Item,{key:"Strong Parent"+n+1,className:"text-break"},"Strong Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongParents[n]},t.strongParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,null,t.weakParents.map((e,n)=>r.createElement(D.a.Item,{key:"Weak Parent"+n+1,className:"text-break"},"Weak Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakParents[n]},t.weakParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,null,t.shallowLikedParents.map((e,n)=>r.createElement(D.a.Item,{key:"Shallow Liked Parent"+n+1,className:"text-break"},"Shallow Liked Parents ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikedParents[n]},t.shallowLikedParents[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,null,t.strongChildren.map((e,n)=>r.createElement(D.a.Item,{key:"Strong Child"+n+1,className:"text-break"},"Strong Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.strongChildren[n]},t.strongChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,null,t.weakChildren.map((e,n)=>r.createElement(D.a.Item,{key:"Weak Child"+n+1,className:"text-break"},"Weak Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.weakChildren[n]},t.weakChildren[n])))))),r.createElement(d.a,null,r.createElement(u.a,null,r.createElement(D.a,null,t.shallowLikeChildren.map((e,n)=>r.createElement(D.a.Item,{key:"ShallowLike Child"+n+1,className:"text-break"},"ShallowLike Child ",n+1,": "," ",r.createElement(H.Link,{to:"/explorer/block/"+t.shallowLikeChildren[n]},t.shallowLikeChildren[n])))))),r.createElement(d.a,{className:"mb-3",style:{marginTop:"20px",marginBottom:"20px"}},r.createElement(u.a,null,r.createElement("h3",null,"Payload"))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,this.renderPayload()))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement(Qe.a,{animation:"border"}))))}};mt=ut([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],mt);var ht=n(289);function gt(e){let t="",n=Math.round(e);return t=n<1e3?n.toString(10)+" m":n<1e6?(n/1e3).toFixed(3)+" Km":n<1e9?(n/1e6).toFixed(3)+" Mm":n<1e12?(n/1e9).toFixed(3)+" Gm":n<1e15?(n/1e12).toFixed(3)+" Tm":(n/1e15).toFixed(3)+" Pm",t}var bt=n(281),yt=n(99),ft=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Et=class extends r.Component{componentDidMount(){this.props.explorerStore.resetSearch(),this.props.explorerStore.searchAddress(this.props.match.params.id)}getSnapshotBeforeUpdate(e,t){return e.match.params.id!==this.props.match.params.id&&this.props.explorerStore.searchAddress(this.props.match.params.id),null}render(){let{id:e}=this.props.match.params,{addr:t,query_loading:n,query_err:a}=this.props.explorerStore,s=[],l=[],o=[];if(a)return r.createElement(p.a,null,r.createElement("h3",null,"Address not available - 404"),r.createElement("p",null,"Address ",e," not found."));if(t){t.explorerOutputs.forEach(e=>{e.metadata.consumerCount>0?s.push(e):l.push(e)});let e=(e,t)=>t.txTimestamp===e.txTimestamp?t.id.transactionID==e.id.transactionID?t.id.outputIndex-e.id.outputIndex:t.id.transactionID.localeCompare(e.id.transactionID):t.txTimestamp-e.txTimestamp;l.sort(e),s.sort(e)}return r.createElement(p.a,null,r.createElement("h3",{style:{marginBottom:"40px"}},"Address ",r.createElement("strong",null,e)," ",null!==t&&r.createElement("span",null,"(",t.explorerOutputs.length," Outputs)")),null!==t?r.createElement(r.Fragment,null,null!==t.explorerOutputs&&100===t.explorerOutputs.length&&r.createElement(ht.a,{variant:"warning"},"Max. 100 outputs are shown."),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:7},r.createElement(D.a,null,r.createElement("h4",null,"Available Balances"),0===o.length?"There are no balances currently available.":r.createElement("div",null,r.createElement(bt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:9},r.createElement("strong",null,"Color")),r.createElement(u.a,null,r.createElement("strong",null,"Balance")))),o)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,{variant:"flush"},r.createElement("h4",null,"Unspent Outputs"),0===l.length?"There are no unspent outputs currently available.":r.createElement("div",null,l.map(e=>r.createElement(vt,{output:e})))))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,{variant:"flush"},r.createElement("h4",null,"Spent Outputs"),0===s.length?"There are no spent outputs currently available.":r.createElement("div",null,s.map(e=>r.createElement(vt,{output:e}))))))):r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,n&&r.createElement(Qe.a,{animation:"border"}))))}};Et=ft([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Et);class vt extends r.Component{constructor(e){super(e),this.state={enabled:!1}}render(){return r.createElement(D.a.Item,null,r.createElement(yt.a,{variant:It(this.props.output.output.type),onClick:()=>{this.setState({enabled:!this.state.enabled})},block:!0},r.createElement(d.a,null,r.createElement(u.a,{xs:6,style:{textAlign:"left"}},this.props.output.id.base58," "),r.createElement(u.a,{style:{textAlign:"left"}},function(e){switch(e){case xe.Basic:return"Basic Output";case xe.Alias:return"Alias Output";case xe.Foundry:return"Foundry Output";case xe.NFT:return"NFT Output";default:return}}(this.props.output.output.type)," "),r.createElement(u.a,{style:{textAlign:"left"}},new Date(1e3*this.props.output.txTimestamp).toLocaleString()))),r.createElement(d.a,{style:{fontSize:"90%"}},r.createElement(u.a,null,this.state.enabled?Fe(this.props.output.output):null),r.createElement(u.a,null,this.state.enabled?r.createElement(kt,{metadata:this.props.output.metadata,timestamp:this.props.output.txTimestamp,pendingMana:this.props.output.pendingMana}):null)))}}class kt extends r.Component{render(){let e=this.props.metadata,t=this.props.timestamp,n=this.props.pendingMana;return r.createElement(D.a,null,"SpendIDs:",r.createElement(D.a,null,e.spendIDs.map((e,t)=>r.createElement(D.a.Item,{key:"SpendID"+t+1,className:"text-break"},e))),r.createElement(D.a.Item,null,"Pending mana: ",gt(n)),r.createElement(D.a.Item,null,"Timestamp: ",new Date(1e3*t).toLocaleString()),r.createElement(D.a.Item,null,"Consumer Count: ",e.consumerCount),e.confirmedConsumer&&r.createElement(D.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+e.confirmedConsumer},e.confirmedConsumer)," "))}}let It=e=>{switch(e){case xe.Basic:case xe.Alias:return"light";case xe.Foundry:return"success";case xe.NFT:return"info";default:return"danger"}};var xt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let St=class extends r.Component{render(){let{search:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement("h3",null,"Tangle Explorer 404"),r.createElement("p",null,"The search via '",e,"' did not yield any results."))}};St=xt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],St);var jt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};const Ot=Object.assign({scales:{xAxes:[{ticks:{autoSkip:!0,maxTicksLimit:8,fontSize:8,minRotation:0,maxRotation:0},showXLabels:10,gridLines:{display:!1}}],yAxes:[{gridLines:{display:!1},ticks:{callback:function(e,t,n){return C(Math.abs(e))},maxTicksLimit:3,fontSize:10}}]},tooltips:{callbacks:{label:function(e,t){return`${t.datasets[e.datasetIndex].label} ${C(Math.abs(e.value))}`}}}},k);let wt=class extends r.Component{render(){let e=this.props.nodeStore.neighbor_metrics.get(this.props.identity),t=e.current;return r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(E.a.Title,null,r.createElement("h5",null,t.id)),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,{variant:"flush",as:"small"},r.createElement(D.a.Item,null,"Origin:"," ",t.connection_origin))),r.createElement(u.a,null,r.createElement(D.a,{variant:"flush",as:"small"},r.createElement(D.a.Item,null,"Address: ",t.address)))),r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement("h6",null,"Network (Tx/Rx)"),r.createElement(Q.a,{pill:!0,variant:"light"},"Total: ",t.packets_written," / ",t.packets_read)," ",r.createElement(Q.a,{pill:!0,variant:"light"},"Current: ",C(e.currentNetIO&&e.currentNetIO.tx)," / ",C(e.currentNetIO&&e.currentNetIO.rx)),r.createElement(v.Line,{height:30,data:e.netIOSeries,options:Ot})))))))}};wt=jt([Object(s.b)("nodeStore"),s.c],wt);var _t=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Rt=class extends r.Component{render(){let e=[];return this.props.nodeStore.neighbor_metrics.forEach((t,n)=>{e.push(r.createElement(wt,{key:n,identity:n}))}),r.createElement(p.a,null,r.createElement("h3",null,"Neighbors ",e.length>0&&r.createElement("span",null,"(",e.length,")")),r.createElement("p",null,"Currently connected neighbors."),e)}};Rt=_t([Object(s.b)("nodeStore"),s.c],Rt);var Dt=n(57),Ct=n(103),Nt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Tt=class extends r.Component{constructor(){super(...arguments),this.updateVerticesLimit=e=>{this.props.visualizerStore.updateVerticesLimit(e.target.value)},this.pauseResumeVisualizer=e=>{this.props.visualizerStore.pauseResume()},this.updateSearch=e=>{this.props.visualizerStore.updateSearch(e.target.value)},this.searchAndHighlight=e=>{"Enter"===e.key&&this.props.visualizerStore.searchAndHighlight()},this.toggleBackgroundDataCollection=()=>{this.props.nodeStore.collecting?this.props.nodeStore.unregisterHandlers():this.props.nodeStore.registerHandlers()}}componentDidMount(){this.props.visualizerStore.start()}componentWillUnmount(){this.props.visualizerStore.stop(),this.props.nodeStore.registerHandlers()}render(){let{vertices:e,finalized_count:t,selected:n,verticesLimit:a,tips_count:s,paused:l,search:o}=this.props.visualizerStore,{last_mps_metric:i,collecting:c}=this.props.nodeStore;return r.createElement(p.a,null,r.createElement("h3",null,"Visualizer"),r.createElement(d.a,{className:"mb-1"},r.createElement(u.a,{xs:5},r.createElement(Y.a,{className:"mb-1",size:"sm"},r.createElement(Y.a.Prepend,null,r.createElement(Y.a.Text,{id:"vertices-limit"},"Vertices Limit")),r.createElement($.a,{placeholder:"limit",type:"number",value:a.toString(),onChange:this.updateVerticesLimit,"aria-label":"vertices-limit","aria-describedby":"vertices-limit"})),r.createElement(Y.a,{className:"mb-1",size:"sm"},r.createElement(Y.a.Prepend,null,r.createElement(Y.a.Text,{id:"vertices-limit"},"Search Vertex")),r.createElement($.a,{placeholder:"search",type:"text",value:o,onChange:this.updateSearch,"aria-label":"vertices-search",onKeyUp:this.searchAndHighlight,"aria-describedby":"vertices-search"})),r.createElement(Y.a,{className:"mb-1",size:"sm"},r.createElement(Ct.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(Dt.a,{id:"popover-basic"},r.createElement(Dt.a.Content,null,"Ensures that only data needed for the visualizer is collected."))},r.createElement(yt.a,{variant:"outline-secondary",onClick:this.toggleBackgroundDataCollection,size:"sm"},c?"Stop Background Data Collection":"Collect Background data")),r.createElement("br",null)),r.createElement(Y.a,{className:"mb-1",size:"sm"},r.createElement(Ct.a,{trigger:["hover","focus"],placement:"right",overlay:r.createElement(Dt.a,{id:"popover-basic"},r.createElement(Dt.a.Content,null,"Pauses/resumes rendering the graph."))},r.createElement(yt.a,{onClick:this.pauseResumeVisualizer,size:"sm",variant:"outline-secondary"},l?"Resume Rendering":"Pause Rendering")))),r.createElement(u.a,{xs:{span:5,offset:2}},r.createElement("p",null,r.createElement(Q.a,{pill:!0,style:{background:"#b9b7bd",color:"white"}},"BLK Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#6c71c4",color:"white"}},"BLK Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#393e46",color:"white"}},"TX Pending")," ",r.createElement(Q.a,{pill:!0,style:{background:"#fad02c",color:"white"}},"TX Confirmed")," ",r.createElement(Q.a,{pill:!0,style:{background:"#cb4b16",color:"white"}},"Tip")," ",r.createElement(Q.a,{pill:!0,style:{background:"#b58900",color:"white"}},"Unknown"),r.createElement("br",null),"Vertices: ",e.size,", Tips: ",s,", Confirmed/UnConfirmed: ",t,"/",e.size-t,","," ","BPS: ",i.mps,r.createElement("br",null),"Selected: ",n?r.createElement(H.Link,{to:"/explorer/block/"+n.id},n.id.substr(0,10)):"-",r.createElement("br",null),n?n.strongParents&&r.createElement("span",null," Strong:"," ",n.strongParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.weakParents&&r.createElement("span",null," Weak:"," ",n.weakParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):"",r.createElement("br",null),n?n.shallowLikedParents&&r.createElement("span",null," Shallow Liked:"," ",n.shallowLikedParents.map(e=>r.createElement(H.Link,{to:"/explorer/block/"+e},e.substr(0,10)+" "))):""))),r.createElement("div",{className:"visualizer",style:{zIndex:-1,position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#ededed"},id:"visualizer"}))}};Tt=Nt([Object(s.b)("visualizerStore"),Object(s.b)("nodeStore"),s.c],Tt);var Pt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Mt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTips()}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{tipsList:e}=this.props.explorerStore;return r.createElement(p.a,null,r.createElement("h3",null,"Tips"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"BlockID"))),r.createElement("tbody",null,e)))}};Mt=Pt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Mt);var Lt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let At=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransaction(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,tx:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Transaction not available - 404"),r.createElement("p",null,"Transaction with ID ",e," not found.")):r.createElement(st,{txID:e,tx:n})}};At=Lt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],At);var Bt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let zt=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionMetadata(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txId:e}=this.props,{query_err:t,txMetadata:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Metadata"),r.createElement("p",null," Metadata for transaction ID ",e," not found.")):r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Metadata"),n&&r.createElement(D.a,null,r.createElement(D.a.Item,null,"SpendIDs:",r.createElement(D.a,null,n.spendIDs&&n.spendIDs.map((e,t)=>r.createElement(D.a.Item,{key:"SpendID"+t+1,className:"text-break"},r.createElement("a",{href:"/explorer/transaction/"+e},e))))),r.createElement(D.a.Item,null,"Booked: ",n.booked.toString()),r.createElement(D.a.Item,null,"Confirmation State: ",n.confirmationState)))}};zt=Bt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],zt);var Ht=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Ft=class extends r.Component{componentDidMount(){this.props.explorerStore.getTransactionAttachments(this.props.txId)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{txAttachments:e}=this.props.explorerStore;return r.createElement("div",{style:{marginTop:"20px",marginBottom:"20px"}},r.createElement("h4",null,"Attachments"),e&&e.blockIDs&&r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,null,r.createElement(D.a,null,e.blockIDs.map((e,t)=>r.createElement(D.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))}};Ft=Ht([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Ft);class Zt extends r.Component{render(){let{id:e}=this.props.match.params;return r.createElement(p.a,null,r.createElement(At,{txId:e}),r.createElement(zt,{txId:e}),r.createElement(Ft,{txId:e}))}}var Ut;!function(e){e[e.Undefined=0]="Undefined",e[e.Rejected=1]="Rejected",e[e.Pending=2]="Pending",e[e.Accepted=3]="Accepted",e[e.Confirmed=4]="Confirmed"}(Ut||(Ut={}));var Vt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Wt=class extends r.Component{componentDidMount(){this.props.explorerStore.getOutput(this.props.match.params.id),this.props.explorerStore.getPendingMana(this.props.match.params.id),this.props.explorerStore.getOutputMetadata(this.props.match.params.id),this.props.explorerStore.getOutputConsumers(this.props.match.params.id)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{id:e}=this.props.match.params,{query_err:t,output:n,pendingMana:a,outputMetadata:s,outputConsumers:l}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Output not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Output"),n&&r.createElement("div",{className:"mb-2"},Fe(n),r.createElement(D.a,null,a&&r.createElement(D.a.Item,null,"Pending Mana",r.createElement("hr",null),r.createElement("div",null,"Value: ",gt(a.mana)),r.createElement("div",null,"Timestamp: ",new Date(1e3*a.timestamp).toLocaleString())))),r.createElement("h4",null,"Metadata"),s&&r.createElement("div",{className:"mb-2"},r.createElement(D.a,null,r.createElement(D.a.Item,null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+s.outputID.transactionID},s.outputID.transactionID)," "),"SpendIDs:",r.createElement(D.a,null,s.spendIDs.map((e,t)=>r.createElement(D.a.Item,{key:"SpendID"+t+1,className:"text-break"},e))),r.createElement(D.a.Item,null,"Consumer Count: ",s.consumerCount),r.createElement(D.a.Item,null,"Confirmed Consumer: ",r.createElement("a",{href:"/explorer/transaction/"+s.confirmedConsumer},s.confirmedConsumer)," "),r.createElement(D.a.Item,null,"Confirmation State: ",function(e){switch(e){case Ut.Undefined:return"Undefined";case Ut.Rejected:return"Rejected";case Ut.Pending:return"Pending";case Ut.Accepted:return"Accepted";case Ut.Confirmed:return"Confirmed";default:return"Undefined Confirmation State"}}(s.confirmationState)),r.createElement(D.a.Item,null,"Confirmation State Time: ",new Date(1e3*s.confirmationStateTime).toLocaleString()))),r.createElement("h4",null,"Consumers"),l&&r.createElement("div",null,r.createElement(D.a,null,l.consumers.map((e,t)=>{return r.createElement(D.a.Item,{key:t},r.createElement("div",null,"Transaction ID: ",r.createElement("a",{href:"/explorer/transaction/"+e.transactionID},e.transactionID)),r.createElement("div",null,"Valid: ","true"===(n=e.valid)?r.createElement(Q.a,{variant:"success"},"True"):"false"===n?r.createElement(Q.a,{variant:"danger"},"False"):r.createElement(Q.a,{variant:"warning"},"Maybe")," "));var n}))))}};Wt=Vt([Object(s.b)("nodeStore"),Object(s.b)("explorerStore"),s.c],Wt);var Jt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Gt=class extends r.Component{render(){let{slotLiveFeed:e}=this.props.slotStore;return r.createElement(p.a,null,r.createElement("h3",null,"Slots"),r.createElement(te.a,{bordered:!0},r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Index"),r.createElement("th",null,"Commitment ID"))),r.createElement("tbody",null,e)))}};Gt=Jt([Object(s.b)("nodeStore"),Object(s.b)("slotStore"),s.c],Gt);var qt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let Xt=class extends r.Component{componentDidMount(){const e=this.props.match.params.commitment;this.props.explorerStore.getSlotDetails(e)}componentWillUnmount(){this.props.explorerStore.reset()}render(){let{commitment:e}=this.props.match.params,{query_err:t,slotInfo:n}=this.props.explorerStore;return t?r.createElement(p.a,null,r.createElement("h4",null,"Slot not found - 404"),r.createElement("span",null,e)):r.createElement(p.a,null,r.createElement("h4",null,"Slot"),n&&r.createElement(D.a,null,r.createElement(D.a.Item,null,"ID: ",e),r.createElement(D.a.Item,null,"Index: ",n.index),r.createElement(D.a.Item,null,"RootsID: ",n.rootsID),r.createElement(D.a.Item,null,"PrevEC: ",n.prevID),r.createElement(D.a.Item,null,"Cumulative Weight: ",n.cumulativeWeight),r.createElement(D.a.Item,null,"Blocks:",n.blocks&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.blocks.map((e,t)=>r.createElement(D.a.Item,{key:t},r.createElement("a",{href:"/explorer/block/"+e},e)))))))))),r.createElement(D.a.Item,null,"Transactions:",n.transactions&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.transactions.map((e,t)=>r.createElement(D.a.Item,{key:t},r.createElement("a",{href:"/explorer/transaction/"+e},e)))))))))),r.createElement(D.a.Item,null," Created outputs:",n.createdOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.createdOutputs.map((e,t)=>r.createElement(D.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e)))))))))),r.createElement(D.a.Item,null," Spent outputs:",n.spentOutputs&&r.createElement(E.a,null,r.createElement(E.a.Body,null,r.createElement(d.a,{className:"mb-3"},r.createElement(u.a,{xs:12,style:{"max-height":"300px",overflow:"auto"}},r.createElement(te.a,null,r.createElement("tbody",null,n.spentOutputs.map((e,t)=>r.createElement(D.a.Item,{key:t},r.createElement("a",{href:"/explorer/output/"+e},e))))))))))))}};Xt=qt([Object(s.b)("explorerStore"),s.c],Xt);var Qt=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l};let $t=class extends r.Component{renderDevTool(){0}componentDidMount(){this.props.nodeStore.connect()}render(){return r.createElement("div",{className:"container"},r.createElement(i.a,{expand:"lg",bg:"light",variant:"light",className:"mb-4"},r.createElement(i.a.Brand,null,"iota-core"),r.createElement(c.a,{className:"mr-auto"},r.createElement(ge.LinkContainer,{to:"/dashboard"},r.createElement(c.a.Link,null,"Dashboard")),r.createElement(ge.LinkContainer,{to:"/neighbors"},r.createElement(c.a.Link,null,"Neighbors")),r.createElement(ge.LinkContainer,{to:"/explorer"},r.createElement(c.a.Link,null,"Explorer")),r.createElement(ge.LinkContainer,{to:"/visualizer"},r.createElement(c.a.Link,null,"Visualizer")),r.createElement(ge.LinkContainer,{to:"/slots"},r.createElement(c.a.Link,null,"Slot")),r.createElement(ge.LinkContainer,{to:"/tips"},r.createElement(c.a.Link,null,"Tips"))),r.createElement(i.a.Collapse,{className:"justify-content-end"},r.createElement(ue,null),r.createElement(i.a.Text,null,!this.props.nodeStore.websocketConnected&&r.createElement(Q.a,{variant:"danger"},"WS not connected!")))),r.createElement(he.g,null,r.createElement(he.d,{exact:!0,path:"/dashboard",component:X}),r.createElement(he.d,{exact:!0,path:"/neighbors",component:Rt}),r.createElement(he.d,{exact:!0,path:"/explorer/block/:id",component:mt}),r.createElement(he.d,{exact:!0,path:"/explorer/address/:id",component:Et}),r.createElement(he.d,{exact:!0,path:"/explorer/transaction/:id",component:Zt}),r.createElement(he.d,{exact:!0,path:"/explorer/output/:id",component:Wt}),r.createElement(he.d,{exact:!0,path:"/explorer/slot/commitment/:commitment",component:Xt}),r.createElement(he.d,{exact:!0,path:"/explorer/404/:search",component:St}),r.createElement(he.d,{exact:!0,path:"/slots",component:Gt}),r.createElement(he.d,{exact:!0,path:"/tips",component:Mt}),r.createElement(he.d,{exact:!0,path:"/explorer",component:ce}),r.createElement(he.d,{exact:!0,path:"/visualizer",component:Tt}),r.createElement(he.d,{exact:!0,path:"/visualizer/history",component:Tt}),r.createElement(he.c,{to:"/dashboard"})),this.props.children,this.renderDevTool())}};$t=Qt([Object(s.b)("nodeStore"),Object(s.b)("routerStore"),s.c],$t);const Yt=Object(o.hot)(({history:e})=>r.createElement($t,{history:e}));var Kt=n(102),en=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},tn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class nn{}class rn{constructor(){this.mem=new sn,this.scheduler=new cn}}class an{}class sn{}class ln{}class on{}class cn{}class pn{constructor(){this.collected=[],this.network_io=[]}addMetric(e){e.ts=F(Date.now(),"HH:MM:ss"),this.collected.push(e),this.collected.length>hn&&this.collected.shift();let t=this.currentNetIO;t&&(this.network_io.length>hn&&this.network_io.shift(),this.network_io.push(t))}get current(){return this.collected[this.collected.length-1]}get secondLast(){let e=this.collected.length-2;if(!(e<0))return this.collected[e]}get currentNetIO(){return this.current&&this.secondLast?{tx:this.current.packets_written-this.secondLast.packets_written,rx:this.current.packets_read-this.secondLast.packets_read,ts:F(new Date,"HH:MM:ss")}:null}get netIOSeries(){let e=Object.assign({},un,mn("Tx","rgba(53, 180, 219,1)","rgba(53, 180, 219,0.4)")),t=Object.assign({},un,mn("Rx","rgba(235, 134, 52)","rgba(235, 134, 52,0.4)")),n=[];for(let r=0;r{fe(me.Status,this.updateStatus),fe(me.BPSMetrics,e=>{this.addBPSMetric(this.updateLastBPSMetric(e))}),fe(me.NeighborStats,this.updateNeighborMetrics),fe(me.TipsMetrics,this.updateLastTipsMetric),fe(me.ComponentCounterMetrics,this.updateLastComponentMetric),fe(me.RateSetter,this.updateLastRateSetterMetric),this.updateCollecting(!0)},this.unregisterHandlers=()=>{Ee(me.Status),Ee(me.BPSMetrics),Ee(me.NeighborStats),Ee(me.TipsMetrics),Ee(me.ComponentCounterMetrics),Ee(me.RateSetter),this.updateCollecting(!1)},this.updateCollecting=e=>{this.collecting=e},this.updateWebSocketConnected=e=>this.websocketConnected=e,this.updateStatus=e=>{e.mem.ts=F(Date.now(),"HH:MM:ss"),this.collected_mem_metrics.length>hn&&this.collected_mem_metrics.shift(),this.collected_mem_metrics.push(e.mem),this.status=e,e.scheduler.ts=F(Date.now(),"HH:MM:ss"),this.collected_scheduler_metrics.length>hn&&this.collected_scheduler_metrics.shift(),this.collected_scheduler_metrics.push(e.scheduler)},this.updateNeighborMetrics=e=>{if(!e)return;let t=[];for(let n=0;n{e.ts=F(Date.now(),"HH:MM:ss"),this.last_rate_setter_metric=e,this.collected_rate_setter_metrics.length>hn&&this.collected_rate_setter_metrics.shift(),this.collected_rate_setter_metrics.push(e)},this.updateLastBPSMetric=e=>{let t=new nn;return t.mps=e,t.ts=F(Date.now(),"HH:MM:ss"),this.last_mps_metric=t,t},this.addBPSMetric=e=>{this.collected_mps_metrics.length>hn&&this.collected_mps_metrics.shift(),this.collected_mps_metrics.push(e)},this.updateLastTipsMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_tips_metric=e,this.collected_tips_metrics.length>hn&&this.collected_tips_metrics.shift(),this.collected_tips_metrics.push(e)},this.updateLastComponentMetric=e=>{e.ts=F(Date.now(),"HH:MM:ss"),this.last_component_counter_metric=e,this.collected_component_counter_metrics.length>hn&&this.collected_component_counter_metrics.shift(),this.collected_component_counter_metrics.push(e)},this.status.tangleTime=new an,this.status.tangleTime.ATT=0,this.status.tangleTime.RATT=0,this.status.tangleTime.CTT=0,this.status.tangleTime.RCTT=0,this.registerHandlers()}reset(){this.collected_mps_metrics=[],this.collected_mem_metrics=[],this.collected_scheduler_metrics=[],this.neighbor_metrics=new be.ObservableMap,this.collected_tips_metrics=[],this.collected_component_counter_metrics=[]}reconnect(){this.updateWebSocketConnected(!1),setTimeout(()=>{this.connect()},5e3)}connect(){!function(e,t,n,r){let a=window.location,s="ws:";"https:"===a.protocol&&(s="wss:"),s+="//"+a.host+e;let l=new WebSocket(s);l.onopen=t,l.onclose=n,l.onerror=r,l.onmessage=e=>{let t=JSON.parse(e.data),n=ye[t.type];n&&n(t.data)}}("/ws",()=>this.updateWebSocketConnected(!0),()=>this.reconnect(),()=>this.updateWebSocketConnected(!1))}get mpsSeries(){let e=Object.assign({},un,mn("BPS","rgba(67, 196, 99,1)","rgba(67, 196, 99,0.4)")),t=[];for(let n=0;n1&&(a+=e+" Days, "),t>=0&&(a+=t<10?"0"+t+":":t+":"),n>=0&&(a+=n<10?"0"+n+":":n+":"),r>=0&&(a+=r<10?"0"+r:r),a}get memSeries(){let e=Object.assign({},un,mn("Heap Sys","rgba(168, 50, 76,1)","rgba(168, 50, 76,0.4)")),t=Object.assign({},un,mn("Heap Alloc","rgba(222, 49, 87,1)","rgba(222, 49, 87,0.4)")),n=Object.assign({},un,mn("Heap Idle","rgba(222, 49, 182,1)","rgba(222, 49, 182,0.4)")),r=Object.assign({},un,mn("Heap Released","rgba(250, 76, 252,1)","rgba(250, 76, 252,0.4)")),a=[];for(let s=0;s=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},En=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},vn=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};!function(e){e[e.NotFound=0]="NotFound"}(bn||(bn={}));class kn{constructor(e){this.send_addr="",this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.sendResult=null,this.query_error="",this.sendReq=()=>vn(this,void 0,void 0,(function*(){this.updateSending(!0);try{let e=yield fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);if(200!==e.status)return void this.updateQueryError(bn.NotFound);let t=yield e.json();setTimeout(()=>{this.updateSendResult(t)},2e3)}catch(e){this.updateQueryError(e)}})),this.updateSendResult=e=>{this.sending=!1,this.sendResult=e,this.routerStore.history.push("/explorer/address/"+this.send_addr)},this.updateSend=e=>{this.send_addr=e},this.updateSendAccessManaNodeID=e=>{this.send_access_mana_node_id=e},this.updateSendConsensusManaNodeID=e=>{this.send_consensus_mana_node_id=e},this.updateSending=e=>{this.sending=e,this.query_error=""},this.reset=()=>{this.send_addr=null,this.send_access_mana_node_id="",this.send_consensus_mana_node_id="",this.sending=!1,this.query_error=""},this.updateQueryError=e=>{this.sending=!1,this.query_error=e},this.routerStore=e}}fn([be.observable,En("design:type",String)],kn.prototype,"send_addr",void 0),fn([be.observable,En("design:type",String)],kn.prototype,"send_access_mana_node_id",void 0),fn([be.observable,En("design:type",String)],kn.prototype,"send_consensus_mana_node_id",void 0),fn([be.observable,En("design:type",Boolean)],kn.prototype,"sending",void 0),fn([be.observable,En("design:type",class{})],kn.prototype,"sendResult",void 0),fn([be.observable,En("design:type",String)],kn.prototype,"query_error",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"updateSendResult",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"updateSend",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"updateSendAccessManaNodeID",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"updateSendConsensusManaNodeID",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"updateSending",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"reset",void 0),fn([be.action,En("design:type",Object)],kn.prototype,"updateQueryError",void 0);var In=kn,xn=n(35),Sn=n.n(xn),jn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},On=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},wn=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class _n{}const Rn="#b9b7bd",Dn="#6c71c4",Cn="#393e46",Nn="#fad02c",Tn="#cb4b16",Pn="#b58900",Mn="#586e75",Ln="#e105f5",An="#51e05d",Bn="#859900";class zn{constructor(e){this.vertices=new be.ObservableMap,this.verticesLimit=1500,this.finalized_count=0,this.tips_count=0,this.verticesIncomingOrder=[],this.draw=!1,this.selected_via_click=!1,this.selected_origin_color=0,this.search="",this.paused=!1,this.fetchHistory=()=>wn(this,void 0,void 0,(function*(){try{let e=yield fetch("/api/visualizer/history");(yield e.json()).vertices.forEach(e=>{this.addVertex(e)})}catch(e){console.log("Fail to fetch history in visualizer",e)}})),this.updateSearch=e=>{this.search=e.trim()},this.searchAndHighlight=()=>{if(this.clearSelected(),!this.search)return;let e=this.vertices.keys(),t=null;for(const n of e)if(n.indexOf(this.search)>=0){t=n;break}t&&this.updateSelected(this.vertices.get(t),!1)},this.pauseResume=()=>{if(this.paused)return this.renderer.resume(),void(this.paused=!1);this.renderer.pause(),this.paused=!0},this.updateVerticesLimit=e=>{this.verticesLimit=e},this.updateTxStatus=e=>{let t=this.vertices.get(e.id);t&&(t.is_tx_accepted=e.is_tx_accepted,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t))},this.addVertex=e=>{let t=this.vertices.get(e.id);t?!t.is_blk_confirmed&&e.is_blk_confirmed&&this.finalized_count++:(e.is_blk_confirmed&&this.finalized_count++,this.verticesIncomingOrder.push(e.id),this.checkLimit()),this.vertices.set(e.id,e),this.draw&&this.drawVertex(e)},this.addTipInfo=e=>wn(this,void 0,void 0,(function*(){let t=this.vertices.get(e.id);if(!t){t=new _n,t.id=e.id;let n=yield fetch("/api/block/"+e.id);if(200===n.status){let e=yield n.json();t.strongParents=e.strongParents,t.weakParents=e.weakParents,t.shallowLikedParents=e.shallowLikedParents,t.is_blk_confirmed=e.acceptance}this.verticesIncomingOrder.push(t.id)}this.tips_count+=e.is_tip?1:t.is_tip?-1:0,t.is_tip=e.is_tip,this.vertices.set(e.id,t),this.draw&&this.drawVertex(t)})),this.checkLimit=()=>{for(;this.verticesIncomingOrder.length>this.verticesLimit;){let e=this.verticesIncomingOrder.shift(),t=this.vertices.get(e);this.selected&&e===this.selected.id&&this.clearSelected(),this.draw&&this.graph.removeNode(e),t&&(t.is_blk_confirmed&&this.finalized_count--,t.is_tip&&this.tips_count--,this.vertices.delete(e))}},this.drawVertex=e=>{let t=this.graph.getNode(e.id);if(t){this.graphics.getNodeUI(e.id).color=Zn(this.colorForVertexState(e))}else t=this.graph.addNode(e.id,e);e.strongParents&&this.linkParents(e,t,e.strongParents),e.weakParents&&this.linkParents(e,t,e.weakParents),e.shallowLikedParents&&this.linkParents(e,t,e.shallowLikedParents)},this.linkParents=(e,t,n)=>{n.forEach(n=>{if(n&&(!t.links||!t.links.some(e=>e.fromId===n))){this.graph.getNode(n)?this.graph.addLink(n,e.id):console.log("link not added, parent doesn't exist",n)}})},this.colorForVertexState=e=>e?e.is_blk_confirmed?e.is_tx?e.is_tx_accepted?Nn:Cn:Dn:e.is_tip?Tn:e.is_tx?Cn:Rn:Pn,this.start=()=>{this.draw=!0,this.graph=Sn.a.Graph.graph();let e=Sn.a.Graph.View.webglGraphics();const t=Sn.a.Graph.Layout.forceDirected(this.graph,{springLength:10,springCoeff:1e-4,stableThreshold:.15,gravity:-2,dragCoeff:.02,timeStep:20,theta:.8});e.node(e=>e.data?Sn.a.Graph.View.webglSquare(20,this.colorForVertexState(e.data)):Sn.a.Graph.View.webglSquare(10,this.colorForVertexState(e.data))),e.link(()=>Sn.a.Graph.View.webglLine(Mn));let n=document.getElementById("visualizer");this.renderer=Sn.a.Graph.View.renderer(this.graph,{container:n,graphics:e,layout:t});let r=Sn.a.Graph.webglInputEvents(e,this.graph);r.mouseEnter(e=>{this.clearSelected(!0),this.updateSelected(e.data)}).mouseLeave(e=>{this.clearSelected(!1)}),r.click(e=>{this.clearSelected(!0),this.updateSelected(e.data,!0)}),this.graphics=e,this.renderer.run(),this.verticesIncomingOrder.forEach(e=>{let t=this.vertices.get(e);t&&this.drawVertex(t)})},this.stop=()=>{this.draw=!1,this.renderer.dispose(),this.graph=null,this.paused=!1,this.selected=null},this.updateSelected=(e,t)=>{if(!e)return;this.selected=e,this.selected_via_click=!!t;let n=this.graphics.getNodeUI(e.id);this.selected_origin_color=n.color,n.color=Zn(Bn),n.size=30;let r=this.graph.getNode(e.id);Fn(this.graph,r,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=Zn(An)},[]),Fn(this.graph,r,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=Zn(Ln)},[])},this.resetLinks=()=>{this.graph.forEachLink((function(e){this.graphics.getLinkUI(e.id).color=Zn(Mn)}))},this.clearSelected=e=>{if(!this.selected||this.selected_via_click&&!e)return;let t=this.graph.getNode(this.selected.id);if(!t)return void this.resetLinks();let n=this.graphics.getNodeUI(this.selected.id);n.color=this.selected_origin_color,n.size=20;Fn(this.graph,t,e=>{},!0,e=>{this.graphics.getLinkUI(e.id).color=Zn(Mn)},[]),Fn(this.graph,t,e=>{},!1,e=>{this.graphics.getLinkUI(e.id).color=Zn(Mn)},[]),this.selected=null,this.selected_via_click=!1},this.routerStore=e,fe(me.Vertex,this.addVertex),fe(me.TipInfo,this.addTipInfo),fe(me.TXAccepted,this.updateTxStatus)}}jn([be.observable,On("design:type",Object)],zn.prototype,"vertices",void 0),jn([be.observable,On("design:type",Object)],zn.prototype,"verticesLimit",void 0),jn([be.observable,On("design:type",Object)],zn.prototype,"finalized_count",void 0),jn([be.observable,On("design:type",Object)],zn.prototype,"tips_count",void 0),jn([be.observable,On("design:type",_n)],zn.prototype,"selected",void 0),jn([be.observable,On("design:type",String)],zn.prototype,"search",void 0),jn([be.observable,On("design:type",Boolean)],zn.prototype,"paused",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"updateSearch",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"searchAndHighlight",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"pauseResume",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"updateVerticesLimit",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"updateTxStatus",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"addVertex",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"addTipInfo",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"checkLimit",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"updateSelected",void 0),jn([be.action,On("design:type",Object)],zn.prototype,"clearSelected",void 0);var Hn=zn;function Fn(e,t,n,r,a=!1,s=[]){s.push(t);let l=0;for(;s.length>l;){const t=s[l++];if(n(t))return!0;if(!t.links)return;for(const n of t.links)r||n.toId!==t.id||s.includes(e.getNode(n.fromId))?r&&n.fromId===t.id&&!s.includes(e.getNode(n.toId))&&(a&&a(n),s.push(e.getNode(n.toId))):(a&&a(n),s.push(e.getNode(n.fromId)))}}function Zn(e){let t=10414335;if("number"==typeof e)return e;if("string"==typeof e&&e)if(4===e.length&&(e=e.replace(/([^#])/g,"$1$1")),9===e.length)t=parseInt(e.substr(1),16);else{if(7!==e.length)throw'Color expected in hex format with preceding "#". E.g. #00ff00. Got value: '+e;t=parseInt(e.substr(1),16)<<8|255}return t}var Un=n(286),Vn=n.n(Un),Wn=n(287),Jn=n.n(Wn),Gn=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},qn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Xn{constructor(e,t,n){this.nodeID=e,this.time=t,this.txID=n}}class Qn extends Xn{constructor(e,t,n,r){super(e,t,n),this.amount=r}}class $n extends Xn{constructor(e,t,n,r){super(e,t,n),this.amount=r}}const Yn=r.createElement("tr",null,r.createElement("td",{key:"emptyRow",colSpan:4},"There are no nodes to view with the current search parameters.")),Kn=r.createElement(bt.a,{key:"emptyItem"},"There are no events to view with the current search parameters.");class er{constructor(){this.manaValues=[],this.prevManaValues=[0,0],this.accessNetworkRichest=[],this.totalAccessNetwork=0,this.accessActiveRichest=[],this.totalAccessActive=0,this.consensusNetworkRichest=[],this.totalConsensusNetwork=0,this.consensusActiveRichest=[],this.totalConsensusActive=0,this.searchNode="",this.searchTxID="",this.accessEvents=[],this.consensusEvents=[],this.initAccessEvents=[],this.initConsensusEvents=[],this.lastRemovedAccessEventTime=null,this.lastRemovedConsensusEventTime=null,this.lastInitRemovedAccessEventTime=null,this.lastInitRemovedConsensusEventTime=null,this.eventsUpdated=!1,this.displayedAccessEvents=[],this.displayedConsensusEvents=[],this.nodeNotSyncedListItem=r.createElement(bt.a,null,"Wait for node to be synced to display mana events."),this.addNewManaValue=e=>{this.ownID=this.ownID?this.ownID:e.nodeID,100===this.manaValues.length&&this.manaValues.shift();let t=[new Date(1e3*e.time),e.access,e.consensus];this.manaValues.length>0&&(this.prevManaValues=[this.manaValues[this.manaValues.length-1][1],this.manaValues[this.manaValues.length-1][2]]),this.manaValues.push(t)},this.updateNetworkRichest=e=>{switch(e.manaType){case"Access":this.totalAccessNetwork=e.totalMana,this.accessNetworkRichest=e.nodes;break;case"Consensus":this.totalConsensusNetwork=e.totalMana,this.consensusNetworkRichest=e.nodes}},this.updateActiveRichest=e=>{switch(e.manaType){case"Access":this.totalAccessActive=e.totalMana,this.accessActiveRichest=e.nodes;break;case"Consensus":this.totalConsensusActive=e.totalMana,this.consensusActiveRichest=e.nodes}},this.updateAllowedPledgeIDs=e=>{this.allowedPledgeIDs=e},this.addNewInitPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.initAccessEvents,t.length>=100){let e=t.shift();this.lastInitRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new Qn(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewPledge=e=>{let t=[];switch(e.manaType){case"Access":if(t=this.accessEvents,t.length>=100){let e=t.shift();this.lastRemovedAccessEventTime=e.time}break;case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new Qn(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.addNewInitRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.initConsensusEvents,t.length>=100){let e=t.shift();this.lastInitRemovedConsensusEventTime=e.time}break;default:return}let n=new $n(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n)},this.addNewRevoke=e=>{let t=[];switch(e.manaType){case"Consensus":if(t=this.consensusEvents,t.length>=100){let e=t.shift();this.lastRemovedConsensusEventTime=e.time}break;default:return}let n=new $n(e.nodeID,new Date(1e3*e.time),e.txID,e.amount);t.push(n),this.eventsUpdated=!0},this.initDone=()=>{this.accessEvents=this.initAccessEvents,this.lastRemovedAccessEventTime=this.lastInitRemovedAccessEventTime,this.consensusEvents=this.initConsensusEvents,this.lastRemovedConsensusEventTime=this.lastInitRemovedConsensusEventTime,this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],setInterval(()=>{this.eventsUpdated&&(this.displayedAccessEvents=[...this.accessEvents],this.displayedConsensusEvents=[...this.consensusEvents],this.eventsUpdated=!1)},500)},this.nodeList=(e,t)=>{if(null===e||null==e)return[];let n=[],a=(e,a)=>{n.push(r.createElement("tr",{key:e.shortNodeID,style:{backgroundColor:e.shortNodeID===this.ownID?"#e8ffff":"white"}},r.createElement("td",{style:{borderTopLeftRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomLeftRadius:e.shortNodeID===this.ownID?"10px":"0"}}," ",a+1," "),r.createElement("td",null,e.shortNodeID),r.createElement("td",null,gt(e.mana)),r.createElement("td",{style:{borderTopRightRadius:e.shortNodeID===this.ownID?"10px":"0",borderBottomRightRadius:e.shortNodeID===this.ownID?"10px":"0"}},(e.mana/t*100).toFixed(2),"%")))};return e.forEach((e,t)=>{this.passesNodeFilter(e.shortNodeID)&&a(e,t)}),n},this.computeEventList=e=>{let t=[];if(t.push(r.createElement(bt.a,{style:{textAlign:"center"},key:"header"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"}),r.createElement(u.a,null,"NodeID"),r.createElement(u.a,null,"Tx ID"),r.createElement(u.a,{xs:5},"Time")))),null==e)return t;return e.reverse().forEach((e,n)=>{this.passesNodeFilter(e.nodeID)&&this.passesTxFilter(e.txID)&&((e,n)=>{if(e instanceof Qn){let a=e=>r.createElement(Dt.a,{id:e.nodeID+n.toString()},r.createElement(Dt.a.Title,{as:"h3"},"Mana Pledged"),r.createElement(Dt.a.Content,null,r.createElement("div",null,"Base Mana: ",r.createElement("strong",null,"+",gt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"To NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Pledge: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Ct.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(bt.a,{style:{backgroundColor:"#41aea9",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1,className:"m-auto"},r.createElement("img",{src:Vn.a,alt:"Plus",width:"20px",className:"d-block mx-auto"})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}else if(e instanceof $n){let a=e=>r.createElement(Dt.a,{id:e.nodeID+n.toString()},r.createElement(Dt.a.Title,{as:"h3"},"Mana Revoked"),r.createElement(Dt.a.Content,null,r.createElement("div",null,"Base Mana 1: ",r.createElement("strong",null,"-",gt(e.amount))),r.createElement("div",null,"With Transaction: ",r.createElement("strong",null,r.createElement("a",{onClick:()=>navigator.clipboard.writeText(e.txID),href:"/explorer/transaction/"+e.txID},e.txID))),r.createElement("div",null,"From NodeID: ",r.createElement("strong",null,e.nodeID)),r.createElement("div",null,"Time of Revoke: ",r.createElement("strong",null,e.time.toLocaleTimeString()))));t.push(r.createElement(Ct.a,{key:e.nodeID+n.toString(),trigger:"focus",placement:"top",overlay:a(e)},r.createElement(bt.a,{style:{backgroundColor:"#213e3b",color:"white",textAlign:"center"},key:e.nodeID+n.toString(10),as:"button"},r.createElement(d.a,null,r.createElement(u.a,{xs:1},r.createElement("img",{src:Jn.a,alt:"Minus",width:"20px",className:""})),r.createElement(u.a,null,e.nodeID),r.createElement(u.a,null,e.txID.substring(0,7)+"..."),r.createElement(u.a,{xs:5},e.time.toLocaleString())))))}})(e,n)}),t},this.passesNodeFilter=e=>0===this.searchNode.trim().length||!!e.toLowerCase().includes(this.searchNode.toLowerCase()),this.passesTxFilter=e=>0===this.searchTxID.trim().length||!!e.toLowerCase().includes(this.searchTxID.toLowerCase()),this.manaValues=[],fe(me.Mana,this.addNewManaValue),fe(me.ManaMapOverall,this.updateNetworkRichest),fe(me.ManaMapOnline,this.updateActiveRichest)}updateNodeSearch(e){this.searchNode=e.trim()}updateTxSearch(e){this.searchTxID=e.trim()}get networkRichestFeedAccess(){let e=this.nodeList(this.accessNetworkRichest,this.totalAccessNetwork);return 0===e.length?[Yn]:e}get networkRichestFeedConsensus(){let e=this.nodeList(this.consensusNetworkRichest,this.totalConsensusNetwork);return 0===e.length?[Yn]:e}get activeRichestFeedAccess(){let e=this.nodeList(this.accessActiveRichest,this.totalAccessActive);return 0===e.length?[Yn]:e}get activeRichestFeedConsensus(){let e=this.nodeList(this.consensusActiveRichest,this.totalConsensusActive);return 0===e.length?[Yn]:e}get accessHistogramInput(){if(void 0===this.accessNetworkRichest||null===this.accessNetworkRichest)return[["",0]];let e=new Array;for(let t=0;te.shortNodeID===this.ownID;let n=this.accessNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.accessNetworkRichest.length-(n+1))/this.accessNetworkRichest.length*100}}return e}get consensusPercentile(){let e=0;if(void 0!==this.consensusNetworkRichest&&null!==this.consensusNetworkRichest){const t=e=>e.shortNodeID===this.ownID;let n=this.consensusNetworkRichest.findIndex(t);switch(n){case-1:break;default:e=(this.consensusNetworkRichest.length-(n+1))/this.consensusNetworkRichest.length*100}}return e}get accessEventList(){let e=this.computeEventList(this.displayedAccessEvents);return 1===e.length&&e.push(Kn),e}get consensusEventList(){let e=this.computeEventList(this.displayedConsensusEvents);return 1===e.length&&e.push(Kn),e}}Gn([be.observable,qn("design:type",Array)],er.prototype,"manaValues",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"prevManaValues",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"accessNetworkRichest",void 0),Gn([be.observable,qn("design:type",Number)],er.prototype,"totalAccessNetwork",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"accessActiveRichest",void 0),Gn([be.observable,qn("design:type",Number)],er.prototype,"totalAccessActive",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"consensusNetworkRichest",void 0),Gn([be.observable,qn("design:type",Number)],er.prototype,"totalConsensusNetwork",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"consensusActiveRichest",void 0),Gn([be.observable,qn("design:type",Number)],er.prototype,"totalConsensusActive",void 0),Gn([be.observable,qn("design:type",Object)],er.prototype,"searchNode",void 0),Gn([be.observable,qn("design:type",Object)],er.prototype,"searchTxID",void 0),Gn([be.observable,qn("design:type",class{})],er.prototype,"allowedPledgeIDs",void 0),Gn([be.observable,qn("design:type",Date)],er.prototype,"lastRemovedAccessEventTime",void 0),Gn([be.observable,qn("design:type",Date)],er.prototype,"lastRemovedConsensusEventTime",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"displayedAccessEvents",void 0),Gn([be.observable,qn("design:type",Array)],er.prototype,"displayedConsensusEvents",void 0),Gn([be.action,qn("design:type",Function),qn("design:paramtypes",[String]),qn("design:returntype",void 0)],er.prototype,"updateNodeSearch",null),Gn([be.action,qn("design:type",Function),qn("design:paramtypes",[String]),qn("design:returntype",void 0)],er.prototype,"updateTxSearch",null),Gn([be.action,qn("design:type",Object)],er.prototype,"addNewManaValue",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"updateNetworkRichest",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"updateActiveRichest",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"updateAllowedPledgeIDs",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"addNewInitPledge",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"addNewPledge",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"addNewInitRevoke",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"addNewRevoke",void 0),Gn([be.action,qn("design:type",Object)],er.prototype,"initDone",void 0),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"networkRichestFeedAccess",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"networkRichestFeedConsensus",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"activeRichestFeedAccess",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"activeRichestFeedConsensus",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"accessHistogramInput",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"consensusHistogramInput",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"accessPercentile",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"consensusPercentile",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"accessEventList",null),Gn([be.computed,qn("design:type",Object),qn("design:paramtypes",[])],er.prototype,"consensusEventList",null);var tr=er,nr=function(e,t,n,r){var a,s=arguments.length,l=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(l=(s<3?a(l):s>3?a(t,n,l):a(t,n))||l);return s>3&&l&&Object.defineProperty(t,n,l),l},rr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ar=function(e,t,n,r){return new(n||(n=Promise))((function(a,s){function l(e){try{i(r.next(e))}catch(e){s(e)}}function o(e){try{i(r.throw(e))}catch(e){s(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,o)}i((r=r.apply(e,t||[])).next())}))};class sr{constructor(){this.liveFeed=[],this.addLiveFeed=e=>ar(this,void 0,void 0,(function*(){-1===this.liveFeed.findIndex(t=>t.id==e.id)&&(this.liveFeed.length>=100&&this.liveFeed.shift(),this.liveFeed.push(e))})),fe(me.SlotInfo,this.addLiveFeed)}get slotLiveFeed(){let e=[];for(let t=this.liveFeed.length-1;t>=0;t--){let n=this.liveFeed[t];e.push(r.createElement("tr",{key:n.id},r.createElement("td",null,n.index),r.createElement("td",null,r.createElement(H.Link,{to:"/explorer/slot/commitment/"+n.id},n.id))))}return e}}nr([be.observable,rr("design:type",Array)],sr.prototype,"liveFeed",void 0),nr([be.action,rr("design:type",Object)],sr.prototype,"addLiveFeed",void 0),nr([be.computed,rr("design:type",Object),rr("design:paramtypes",[])],sr.prototype,"slotLiveFeed",null);const lr=new Kt.RouterStore,or={routerStore:lr,nodeStore:new yn,explorerStore:new Xe(lr),faucetStore:new In(lr),visualizerStore:new Hn(lr),manaStore:new tr,slotStore:new sr},ir=Object(l.a)(),cr=Object(Kt.syncHistoryWithStore)(ir,lr);a.render(r.createElement(s.a,Object.assign({},or),r.createElement(he.e,{history:cr},r.createElement(Yt,{history:cr}))),document.getElementById("root"))}},[[434,1,2]]]); \ No newline at end of file diff --git a/components/dashboard/frontend/build/app.7343ba1c945034668914.js.map b/components/dashboard/frontend/build/app.7343ba1c945034668914.js.map new file mode 100644 index 000000000..2ee80b965 --- /dev/null +++ b/components/dashboard/frontend/build/app.7343ba1c945034668914.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./assets/plus.svg","webpack:///./assets/minus.svg","webpack:///../node_modules/moment/locale sync ^\\.\\/.*$","webpack:///./app/components/Uptime.tsx","webpack:///./app/components/Version.tsx","webpack:///./app/misc/Chart.ts","webpack:///./app/components/BPSChart.tsx","webpack:///./app/components/TipsChart.tsx","webpack:///./app/components/MemChart.tsx","webpack:///./app/components/ComponentCounterChart.tsx","webpack:///./app/components/TangleTime.tsx","webpack:///./app/components/Bootstrapped.tsx","webpack:///./app/components/Dashboard.tsx","webpack:///./app/components/ExplorerSearchbar.tsx","webpack:///./app/components/ExplorerLiveFeed.tsx","webpack:///./app/components/ExplorerTransactionSearchbar.tsx","webpack:///./app/components/ExplorerOutputSearchbar.tsx","webpack:///./app/components/Explorer.tsx","webpack:///./app/components/NavExplorerSearchbar.tsx","webpack:///./app/misc/WS.ts","webpack:///./app/misc/Payload.ts","webpack:///./app/utils/condition.tsx","webpack:///./app/utils/feature.tsx","webpack:///./app/utils/output.tsx","webpack:///./app/components/NativeToken.tsx","webpack:///./app/components/Condition.tsx","webpack:///./app/components/Feature.tsx","webpack:///./app/components/BasicOutput.tsx","webpack:///./app/components/AliasOutput.tsx","webpack:///./app/components/FoundryOutput.tsx","webpack:///./app/components/NFTOutput.tsx","webpack:///./app/stores/ExplorerStore.tsx","webpack:///./app/components/BasicPayload.tsx","webpack:///./app/utils/unlock_block.ts","webpack:///./app/components/Ed25519Signature.tsx","webpack:///./app/components/UnlockBlock.tsx","webpack:///./app/components/Transaction.tsx","webpack:///./app/components/TransactionPayload.tsx","webpack:///./app/components/FaucetPayload.tsx","webpack:///./app/components/TaggedDataPayload.tsx","webpack:///./app/components/ExplorerBlockQueryResult.tsx","webpack:///./app/utils/index.ts","webpack:///./app/components/ExplorerAddressResult.tsx","webpack:///./app/components/Explorer404.tsx","webpack:///./app/components/Neighbor.tsx","webpack:///./app/components/Neighbors.tsx","webpack:///./app/components/Visualizer.tsx","webpack:///./app/components/Tips.tsx","webpack:///./app/components/ExplorerTransaction.tsx","webpack:///./app/components/ExplorerTransactionMetadata.tsx","webpack:///./app/components/ExplorerTransactionAttachments.tsx","webpack:///./app/components/ExplorerTransactionQueryResult.tsx","webpack:///./app/utils/confirmation_state.ts","webpack:///./app/components/ExplorerOutputQueryResult.tsx","webpack:///./app/components/SlotLiveFeed.tsx","webpack:///./app/components/ExplorerSlotQueryResult.tsx","webpack:///./app/components/Root.tsx","webpack:///./app/App.tsx","webpack:///./app/stores/NodeStore.ts","webpack:///./app/stores/FaucetStore.ts","webpack:///./app/stores/VisualizerStore.ts","webpack:///./app/stores/ManaStore.tsx","webpack:///./app/stores/SlotStore.tsx","webpack:///./main.tsx"],"names":["module","exports","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","this","props","nodeStore","uptime","status","version","defaultChartOptions","elements","line","tension","animation","duration","hover","animationDuration","responsiveAnimationDuration","lineChartOptions","assign","scales","xAxes","ticks","autoSkip","maxTicksLimit","fontSize","minRotation","maxRotation","gridLines","display","yAxes","callback","value","index","values","Math","abs","beginAtZero","tooltips","callbacks","label","tooltipItem","data","datasets","datasetIndex","Card","Body","Title","last_mps_metric","mps","height","mpsSeries","options","last_tips_metric","totaltips","tipsSeries","showXLabels","prettysize","mem","heap_alloc","num_gc","last_pause_gc","heap_objects","heap_sys","heap_idle","heap_released","memSeries","style","flexDirection","last_component_counter_metric","store","last_rate_setter_metric","estimate","componentSeries","tangleTime","synced","className","to","acceptedBlockID","confirmedBlockID","confirmedSlot","committedSlot","dateformat","Date","ATT","CTT","RATT","RCTT","bootstrapped","Container","Row","Col","ListGroup","variant","Item","ComponentCounterChart","updateSearch","explorerStore","target","executeSearch","key","searchAny","search","searching","InputGroup","FormControl","placeholder","onChange","onKeyUp","disabled","blksLiveFeed","xs","Table","txID","routerStore","push","outputID","href","Form","inline","as","type","WSMsgType","handlers","registerHandler","blkTypeID","handler","unregisterHandler","PayloadType","ConditionType","FeatureType","OutputType","Output","getPayloadType","p","TaggedData","Transaction","Faucet","token","amount","unlock","address","pubKeyHash","unixTime","returnAddress","conditionToComponent","cond","Address","StateControllerAddress","GovernorAddress","StorageDepositReturn","Expiration","Timelock","feature","tag","featureToComponent","feat","Sender","Issuer","Metadata","Tag","hex","output","nativeTokens","n","_","unlockConditions","c","features","f","transactionID","outputIndex","wordBreak","aliasId","stateIndex","stateMetadata","foundryCounter","serialNumber","tokenScheme","nftId","outputToComponent","Basic","Alias","Foundry","NFT","GenesisBlockID","SlotInfo","QueryError","latest_blocks","blk","addr","tx","txMetadata","txAttachments","outputMetadata","outputConsumers","pendingMana","tips","slotInfo","query_loading","query_err","search_result","updateSearching","res","fetch","result","json","updateSearchResult","err","updateQueryError","resetSearch","block","searchBlock","updateQueryLoading","fetchJson","updateBlock","searchAddress","updateAddress","getSlotDetails","getSlotInfo","getTransaction","i","inputs","length","inputID","referencedOutputID","referencedOutputRes","genOutput","getTransactionAttachments","attachments","getTransactionMetadata","getOutput","getOutputMetadata","getOutputConsumers","getPendingMana","getTips","reset","spendIDs","strongChildren","weakChildren","shallowLikeChildren","strongParents","weakParents","shallowLikedParents","payloadType","payload","loading","addLiveFeedBlock","findIndex","t","shift","Block","feed","payload_type","list","blkId","method","route","requestData","body","JSON","stringify","v","Uint8Array","Array","from","undefined","response","headers","ok","NotFound","BadRequest","content_title","content","SignatureType","signature","publicKey","signatureType","Ed25519","Badge","sigType","BLS","renderSignatureComponent","maxHeight","overflow","width","marginTop","marginBottom","paddingBottom","borderBottom","networkId","creationSlot","input","Provider","color","size","outputs","unlocks","txId","accessManaPledgeID","consensusManaPledgeID","nonce","match","params","prevProps","prevState","objectivelyInvalid","marginRight","issuanceTimestamp","solidificationTimestamp","sequenceNumber","solid","scheduled","booked","orphaned","subjectivelyInvalid","acceptance","acceptanceTime","confirmation","confirmationTime","confirmationBySlot","confirmationBySlotTime","commitmentID","commitment","prevID","rootsID","cumulativeWeight","latestConfirmedSlot","rank","sequenceID","pastMarkerGap","isPastMarker","pastMarkers","issuerID","renderPayload","Spinner","displayManaUnit","mana","roundedMana","round","toString","toFixed","spent","unspent","available_balances","explorerOutputs","forEach","metadata","consumerCount","timestampCompareFn","a","b","txTimestamp","localeCompare","sort","Alert","ListGroupItem","textAlign","super","state","enabled","Button","getVariant","onClick","setState","base58","outputTypeToName","toLocaleString","timestamp","confirmedConsumer","outputType","neighborMetrics","neighbor_metrics","get","identity","last","current","connection_origin","pill","packets_written","packets_read","currentNetIO","rx","netIOSeries","neighborsEle","k","updateVerticesLimit","visualizerStore","pauseResumeVisualizer","pauseResume","searchAndHighlight","toggleBackgroundDataCollection","collecting","unregisterHandlers","registerHandlers","start","stop","vertices","finalized_count","selected","verticesLimit","tips_count","paused","Prepend","Text","OverlayTrigger","trigger","placement","overlay","Popover","Content","span","offset","background","substr","parent","zIndex","position","top","left","tipsList","bordered","confirmationState","blockIDs","ConfirmationState","Undefined","Rejected","Pending","Accepted","Confirmed","resolveConfirmationState","confirmationStateTime","consumers","val","valid","slotLiveFeed","slotStore","blocks","transactions","createdOutputs","spentOutputs","s","connect","Navbar","expand","bg","Brand","Nav","Link","Collapse","websocketConnected","exact","path","component","children","renderDevTool","App","history","BPSMetric","Status","MemoryMetrics","scheduler","SchedulerMetric","TipsMetric","RateSetterMetric","collected","network_io","metric","ts","now","maxMetricsDataPoints","netIO","secondLast","chartSeriesOpts","series","labels","ComponentCounterMetric","fill","lineTension","backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","pointBorderColor","pointBackgroundColor","pointBorderWidth","pointHoverBackgroundColor","pointHoverBorderColor","pointHoverBorderWidth","pointRadius","pointHitRadius","pointHoverRadius","name","bgColor","collected_mps_metrics","collected_rate_setter_metrics","collected_scheduler_metrics","collected_mem_metrics","collected_tips_metrics","collected_component_counter_metrics","updateStatus","BPSMetrics","addBPSMetric","updateLastBPSMetric","NeighborStats","updateNeighborMetrics","TipsMetrics","updateLastTipsMetric","ComponentCounterMetrics","updateLastComponentMetric","RateSetter","updateLastRateSetterMetric","updateCollecting","updateWebSocketConnected","connected","updated","neighbMetrics","addMetric","set","includes","delete","mpsMetric","tipsMetric","componentCounterMetric","setTimeout","onOpen","onClose","onError","loc","window","location","uri","protocol","host","ws","WebSocket","onopen","onclose","onerror","onmessage","parse","connectWebSocket","reconnect","stored","solidified","solidifier","booker","bufferSize","currentBufferSize","deficit","day","hour","minute","seconds","floor","str","heapSys","heapAlloc","heapIdle","heapReleased","FaucetStore","send_addr","send_access_mana_node_id","send_consensus_mana_node_id","sending","sendResult","query_error","sendReq","updateSending","updateSendResult","updateSend","updateSendAccessManaNodeID","access_mana","updateSendConsensusManaNodeID","consensus_mana","Vertex","COLOR","verticesIncomingOrder","draw","selected_via_click","selected_origin_color","fetchHistory","addVertex","console","log","trim","clearSelected","iter","found","indexOf","updateSelected","renderer","resume","pause","num","updateTxStatus","vert","existing","is_tx_accepted","drawVertex","is_blk_confirmed","checkLimit","addTipInfo","tipInfo","is_tip","deleteId","graph","removeNode","node","getNode","graphics","getNodeUI","parseColor","colorForVertexState","addNode","linkParents","parents","links","some","link","fromId","addLink","is_tx","Graph","View","webglGraphics","layout","Layout","forceDirected","springLength","springCoeff","stableThreshold","gravity","dragCoeff","timeStep","theta","webglSquare","webglLine","ele","document","getElementById","container","events","webglInputEvents","mouseEnter","mouseLeave","click","run","dispose","viaClick","nodeUI","vertexSize","dfsIterator","getLinkUI","resetLinks","forEachLink","force_clear","TipInfo","TXAccepted","cb","up","cbLinks","seenNodes","pointer","toId","parsedColor","replace","parseInt","ManaEvent","nodeID","time","PledgeEvent","RevokeEvent","emptyRow","colSpan","emptyListItem","manaValues","prevManaValues","accessNetworkRichest","totalAccessNetwork","accessActiveRichest","totalAccessActive","consensusNetworkRichest","totalConsensusNetwork","consensusActiveRichest","totalConsensusActive","searchNode","searchTxID","accessEvents","consensusEvents","initAccessEvents","initConsensusEvents","lastRemovedAccessEventTime","lastRemovedConsensusEventTime","lastInitRemovedAccessEventTime","lastInitRemovedConsensusEventTime","eventsUpdated","displayedAccessEvents","displayedConsensusEvents","nodeNotSyncedListItem","addNewManaValue","manaBlk","ownID","newManaData","access","consensus","updateNetworkRichest","manaType","totalMana","nodes","updateActiveRichest","updateAllowedPledgeIDs","allowedPledgeIDs","addNewInitPledge","lastRemoved","newData","addNewPledge","addNewInitRevoke","addNewRevoke","initDone","setInterval","nodeList","leaderBoard","manaSum","pushToFeed","shortNodeID","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","passesNodeFilter","computeEventList","evArr","reverse","event","passesTxFilter","element","popover","ev","navigator","clipboard","writeText","toLocaleTimeString","src","alt","substring","pushToEventFeed","toLowerCase","Mana","ManaMapOverall","ManaMapOnline","histInput","log10","per","isOwnID","liveFeed","addLiveFeed","info","stores","browserHistory"],"mappings":"2EAAAA,EAAOC,QAAU,k6B,kBCAjBD,EAAOC,QAAU,0vB,oBCAjB,IAAIC,EAAM,CACT,OAAQ,IACR,UAAW,IACX,OAAQ,IACR,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,aAAc,IACd,UAAW,IACX,a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hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI2NnB4IiBoZWlnaHQ9IjY2cHgiIHZpZXdCb3g9Ii0wLjUgLTAuNSA2NiA2NiI+PGRlZnMvPjxnPjxlbGxpcHNlIGN4PSIzMi41IiBjeT0iMzMiIHJ4PSIzMS41IiByeT0iMzEuNSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjMiIHBvaW50ZXItZXZlbnRzPSJhbGwiLz48cGF0aCBkPSJNIDE3IDMyLjg4IEwgNDcgMzIuODgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHBvaW50ZXItZXZlbnRzPSJzdHJva2UiLz48L2c+PC9zdmc+\"","var map = {\n\t\"./af\": 107,\n\t\"./af.js\": 107,\n\t\"./ar\": 108,\n\t\"./ar-dz\": 109,\n\t\"./ar-dz.js\": 109,\n\t\"./ar-kw\": 110,\n\t\"./ar-kw.js\": 110,\n\t\"./ar-ly\": 111,\n\t\"./ar-ly.js\": 111,\n\t\"./ar-ma\": 112,\n\t\"./ar-ma.js\": 112,\n\t\"./ar-sa\": 113,\n\t\"./ar-sa.js\": 113,\n\t\"./ar-tn\": 114,\n\t\"./ar-tn.js\": 114,\n\t\"./ar.js\": 108,\n\t\"./az\": 115,\n\t\"./az.js\": 115,\n\t\"./be\": 116,\n\t\"./be.js\": 116,\n\t\"./bg\": 117,\n\t\"./bg.js\": 117,\n\t\"./bm\": 118,\n\t\"./bm.js\": 118,\n\t\"./bn\": 119,\n\t\"./bn-bd\": 120,\n\t\"./bn-bd.js\": 120,\n\t\"./bn.js\": 119,\n\t\"./bo\": 121,\n\t\"./bo.js\": 121,\n\t\"./br\": 122,\n\t\"./br.js\": 122,\n\t\"./bs\": 123,\n\t\"./bs.js\": 123,\n\t\"./ca\": 124,\n\t\"./ca.js\": 124,\n\t\"./cs\": 125,\n\t\"./cs.js\": 125,\n\t\"./cv\": 126,\n\t\"./cv.js\": 126,\n\t\"./cy\": 127,\n\t\"./cy.js\": 127,\n\t\"./da\": 128,\n\t\"./da.js\": 128,\n\t\"./de\": 129,\n\t\"./de-at\": 130,\n\t\"./de-at.js\": 130,\n\t\"./de-ch\": 131,\n\t\"./de-ch.js\": 131,\n\t\"./de.js\": 129,\n\t\"./dv\": 132,\n\t\"./dv.js\": 132,\n\t\"./el\": 133,\n\t\"./el.js\": 133,\n\t\"./en-au\": 134,\n\t\"./en-au.js\": 134,\n\t\"./en-ca\": 135,\n\t\"./en-ca.js\": 135,\n\t\"./en-gb\": 136,\n\t\"./en-gb.js\": 136,\n\t\"./en-ie\": 137,\n\t\"./en-ie.js\": 137,\n\t\"./en-il\": 138,\n\t\"./en-il.js\": 138,\n\t\"./en-in\": 139,\n\t\"./en-in.js\": 139,\n\t\"./en-nz\": 140,\n\t\"./en-nz.js\": 140,\n\t\"./en-sg\": 141,\n\t\"./en-sg.js\": 141,\n\t\"./eo\": 142,\n\t\"./eo.js\": 142,\n\t\"./es\": 143,\n\t\"./es-do\": 144,\n\t\"./es-do.js\": 144,\n\t\"./es-mx\": 145,\n\t\"./es-mx.js\": 145,\n\t\"./es-us\": 146,\n\t\"./es-us.js\": 146,\n\t\"./es.js\": 143,\n\t\"./et\": 147,\n\t\"./et.js\": 147,\n\t\"./eu\": 148,\n\t\"./eu.js\": 148,\n\t\"./fa\": 149,\n\t\"./fa.js\": 149,\n\t\"./fi\": 150,\n\t\"./fi.js\": 150,\n\t\"./fil\": 151,\n\t\"./fil.js\": 151,\n\t\"./fo\": 152,\n\t\"./fo.js\": 152,\n\t\"./fr\": 153,\n\t\"./fr-ca\": 154,\n\t\"./fr-ca.js\": 154,\n\t\"./fr-ch\": 155,\n\t\"./fr-ch.js\": 155,\n\t\"./fr.js\": 153,\n\t\"./fy\": 156,\n\t\"./fy.js\": 156,\n\t\"./ga\": 157,\n\t\"./ga.js\": 157,\n\t\"./gd\": 158,\n\t\"./gd.js\": 158,\n\t\"./gl\": 159,\n\t\"./gl.js\": 159,\n\t\"./gom-deva\": 160,\n\t\"./gom-deva.js\": 160,\n\t\"./gom-latn\": 161,\n\t\"./gom-latn.js\": 161,\n\t\"./gu\": 162,\n\t\"./gu.js\": 162,\n\t\"./he\": 163,\n\t\"./he.js\": 163,\n\t\"./hi\": 164,\n\t\"./hi.js\": 164,\n\t\"./hr\": 165,\n\t\"./hr.js\": 165,\n\t\"./hu\": 166,\n\t\"./hu.js\": 166,\n\t\"./hy-am\": 167,\n\t\"./hy-am.js\": 167,\n\t\"./id\": 168,\n\t\"./id.js\": 168,\n\t\"./is\": 169,\n\t\"./is.js\": 169,\n\t\"./it\": 170,\n\t\"./it-ch\": 171,\n\t\"./it-ch.js\": 171,\n\t\"./it.js\": 170,\n\t\"./ja\": 172,\n\t\"./ja.js\": 172,\n\t\"./jv\": 173,\n\t\"./jv.js\": 173,\n\t\"./ka\": 174,\n\t\"./ka.js\": 174,\n\t\"./kk\": 175,\n\t\"./kk.js\": 175,\n\t\"./km\": 176,\n\t\"./km.js\": 176,\n\t\"./kn\": 177,\n\t\"./kn.js\": 177,\n\t\"./ko\": 178,\n\t\"./ko.js\": 178,\n\t\"./ku\": 179,\n\t\"./ku.js\": 179,\n\t\"./ky\": 180,\n\t\"./ky.js\": 180,\n\t\"./lb\": 181,\n\t\"./lb.js\": 181,\n\t\"./lo\": 182,\n\t\"./lo.js\": 182,\n\t\"./lt\": 183,\n\t\"./lt.js\": 183,\n\t\"./lv\": 184,\n\t\"./lv.js\": 184,\n\t\"./me\": 185,\n\t\"./me.js\": 185,\n\t\"./mi\": 186,\n\t\"./mi.js\": 186,\n\t\"./mk\": 187,\n\t\"./mk.js\": 187,\n\t\"./ml\": 188,\n\t\"./ml.js\": 188,\n\t\"./mn\": 189,\n\t\"./mn.js\": 189,\n\t\"./mr\": 190,\n\t\"./mr.js\": 190,\n\t\"./ms\": 191,\n\t\"./ms-my\": 192,\n\t\"./ms-my.js\": 192,\n\t\"./ms.js\": 191,\n\t\"./mt\": 193,\n\t\"./mt.js\": 193,\n\t\"./my\": 194,\n\t\"./my.js\": 194,\n\t\"./nb\": 195,\n\t\"./nb.js\": 195,\n\t\"./ne\": 196,\n\t\"./ne.js\": 196,\n\t\"./nl\": 197,\n\t\"./nl-be\": 198,\n\t\"./nl-be.js\": 198,\n\t\"./nl.js\": 197,\n\t\"./nn\": 199,\n\t\"./nn.js\": 199,\n\t\"./oc-lnc\": 200,\n\t\"./oc-lnc.js\": 200,\n\t\"./pa-in\": 201,\n\t\"./pa-in.js\": 201,\n\t\"./pl\": 202,\n\t\"./pl.js\": 202,\n\t\"./pt\": 203,\n\t\"./pt-br\": 204,\n\t\"./pt-br.js\": 204,\n\t\"./pt.js\": 203,\n\t\"./ro\": 205,\n\t\"./ro.js\": 205,\n\t\"./ru\": 206,\n\t\"./ru.js\": 206,\n\t\"./sd\": 207,\n\t\"./sd.js\": 207,\n\t\"./se\": 208,\n\t\"./se.js\": 208,\n\t\"./si\": 209,\n\t\"./si.js\": 209,\n\t\"./sk\": 210,\n\t\"./sk.js\": 210,\n\t\"./sl\": 211,\n\t\"./sl.js\": 211,\n\t\"./sq\": 212,\n\t\"./sq.js\": 212,\n\t\"./sr\": 213,\n\t\"./sr-cyrl\": 214,\n\t\"./sr-cyrl.js\": 214,\n\t\"./sr.js\": 213,\n\t\"./ss\": 215,\n\t\"./ss.js\": 215,\n\t\"./sv\": 216,\n\t\"./sv.js\": 216,\n\t\"./sw\": 217,\n\t\"./sw.js\": 217,\n\t\"./ta\": 218,\n\t\"./ta.js\": 218,\n\t\"./te\": 219,\n\t\"./te.js\": 219,\n\t\"./tet\": 220,\n\t\"./tet.js\": 220,\n\t\"./tg\": 221,\n\t\"./tg.js\": 221,\n\t\"./th\": 222,\n\t\"./th.js\": 222,\n\t\"./tk\": 223,\n\t\"./tk.js\": 223,\n\t\"./tl-ph\": 224,\n\t\"./tl-ph.js\": 224,\n\t\"./tlh\": 225,\n\t\"./tlh.js\": 225,\n\t\"./tr\": 226,\n\t\"./tr.js\": 226,\n\t\"./tzl\": 227,\n\t\"./tzl.js\": 227,\n\t\"./tzm\": 228,\n\t\"./tzm-latn\": 229,\n\t\"./tzm-latn.js\": 229,\n\t\"./tzm.js\": 228,\n\t\"./ug-cn\": 230,\n\t\"./ug-cn.js\": 230,\n\t\"./uk\": 231,\n\t\"./uk.js\": 231,\n\t\"./ur\": 232,\n\t\"./ur.js\": 232,\n\t\"./uz\": 233,\n\t\"./uz-latn\": 234,\n\t\"./uz-latn.js\": 234,\n\t\"./uz.js\": 233,\n\t\"./vi\": 235,\n\t\"./vi.js\": 235,\n\t\"./x-pseudo\": 236,\n\t\"./x-pseudo.js\": 236,\n\t\"./yo\": 237,\n\t\"./yo.js\": 237,\n\t\"./zh-cn\": 238,\n\t\"./zh-cn.js\": 238,\n\t\"./zh-hk\": 239,\n\t\"./zh-hk.js\": 239,\n\t\"./zh-mo\": 240,\n\t\"./zh-mo.js\": 240,\n\t\"./zh-tw\": 241,\n\t\"./zh-tw.js\": 241\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 298;","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Uptime extends React.Component {\r\n render() {\r\n return (\r\n \r\n Uptime: {this.props.nodeStore.uptime}\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class Version extends React.Component {\r\n render() {\r\n return (\r\n \r\n Version: {this.props.nodeStore.status.version}\r\n \r\n );\r\n }\r\n}\r\n","\r\n// includes chart options to increase performance, by disabling chart animations\r\nexport var defaultChartOptions = {\r\n elements: {\r\n line: {\r\n tension: 0\r\n }\r\n },\r\n animation: {\r\n duration: 0\r\n },\r\n hover: {\r\n animationDuration: 0\r\n },\r\n responsiveAnimationDuration: 0\r\n};","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class BPSChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Blocks Per Second\r\n \r\n BPS: {this.props.nodeStore.last_mps_metric.mps}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return Math.abs(value);\r\n },\r\n fontSize: 10,\r\n maxTicksLimit: 4,\r\n beginAtZero: true,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${Math.abs(tooltipItem.value)}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class TipsChart extends React.Component {\r\n render() {\r\n return (\r\n \r\n \r\n Current Tips\r\n \r\n Tips: {this.props.nodeStore.last_tips_metric.totaltips}.\r\n \r\n\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Card from \"react-bootstrap/Card\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Line} from \"react-chartjs-2\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport * as prettysize from 'prettysize';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport default class MemChart extends React.Component {\r\n render() {\r\n let mem = this.props.nodeStore.status.mem;\r\n return (\r\n \r\n \r\n \r\n Memory Usage{' '}\r\n {prettysize(mem.heap_alloc)}\r\n \r\n \r\n GC Cycles: {mem.num_gc} (Last Cycle: {mem.last_pause_gc / 1000000}ms) - {' '}\r\n Heap: {' '}\r\n [Obj: {mem.heap_objects}, In-Use: {prettysize(mem.heap_sys-mem.heap_idle)},\r\n Retained: {prettysize(mem.heap_idle - mem.heap_released)}]\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Card from \"react-bootstrap/Card\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport {Line} from \"react-chartjs-2\";\nimport {defaultChartOptions} from \"../misc/Chart\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\nconst lineChartOptions = Object.assign({\n scales: {\n xAxes: [{\n ticks: {\n autoSkip: true,\n maxTicksLimit: 8,\n fontSize: 8,\n minRotation: 0,\n maxRotation: 0,\n },\n gridLines: {\n display: false\n }\n }],\n yAxes: [{\n gridLines: {\n display: false\n },\n ticks: {\n callback: function (value, index, values) {\n return Math.abs(value);\n },\n fontSize: 10,\n maxTicksLimit: 4,\n beginAtZero: true,\n },\n }],\n },\n tooltips: {\n callbacks: {\n label: function (tooltipItem, data) {\n let label = data.datasets[tooltipItem.datasetIndex].label;\n return `${label} ${Math.abs(tooltipItem.value)}`;\n }\n }\n }\n}, defaultChartOptions);\n\n@inject(\"nodeStore\")\n@observer\nexport default class StoreChart extends React.Component {\n render() {\n const infoStyle = {\n display: \"flex\",\n flexDirection: \"column\"\n };\n return (\n \n \n Component Counter Blocks Per Second\n
\n \n BPS: {this.props.nodeStore.last_component_counter_metric.store}.\n \n \n Rate Setter - Estimate: {this.props.nodeStore.last_rate_setter_metric.estimate}\n \n
\n\n \n
\n
\n );\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport Card from \"react-bootstrap/Card\";\nimport {Link} from 'react-router-dom';\nimport {inject, observer} from \"mobx-react\";\nimport * as dateformat from 'dateformat';\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class TangleTime extends React.Component {\n render() {\n return (\n \n \n TangleTime\n Synced: {this.props.nodeStore.status.tangleTime.synced ? \"Yes\" : \"No\"}\n \n
\n
\n
\n
Last Accepted Block: \n {this.props.nodeStore.status.tangleTime.acceptedBlockID}\n
\n
\n
\n
Last Confirmed Block: \n {this.props.nodeStore.status.tangleTime.confirmedBlockID}\n
\n
\n
\n
Last Confirmed Slot:\n {this.props.nodeStore.status.tangleTime.confirmedSlot}\n
\n
\n
\n
Last Committed Slot:\n {this.props.nodeStore.status.tangleTime.committedSlot}\n
\n
\n
\n
\n
\n Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.ATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.CTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n Relative Acceptance Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RATT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n Relative Confirmation Time:\n
\n
\n {dateformat(new Date(this.props.nodeStore.status.tangleTime.RCTT / 1000000), \"dd.mm.yyyy HH:MM:ss\")}\n
\n
\n
\n
\n
\n
\n )\n ;\n }\n}\n","import * as React from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\n\ninterface Props {\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@observer\nexport default class Bootstrapped extends React.Component {\n render() {\n return (\n \n Bootstrapped: {this.props.nodeStore.status.tangleTime.bootstrapped ? \"Yes\" : \"No\"}\n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Uptime from \"./Uptime\";\r\nimport Version from \"./Version\";\r\nimport BPSChart from \"./BPSChart\";\r\nimport TipsChart from \"./TipsChart\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport MemChart from \"./MemChart\";\r\nimport ComponentCounterChart from \"./ComponentCounterChart\";\r\nimport TangleTime from \"./TangleTime\";\r\nimport Bootstrapped from \"./Bootstrapped\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Dashboard extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Dashboard

\r\n \r\n \r\n \r\n \r\n Node: {this.props.nodeStore.status.id}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\nimport Table from \"react-bootstrap/Table\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerLiveFeed extends React.Component {\r\n render() {\r\n let {blksLiveFeed} = this.props.explorerStore;\r\n return (\r\n \r\n \r\n \r\n \r\n Live Feed\r\n \r\n \r\n
Blocks
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {blksLiveFeed}\r\n \r\n
IdPayload Type
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionSearchbar extends React.Component {\n txID: string;\n\n updateSearch = (e) => {\n this.txID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/transaction/${this.txID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport {KeyboardEvent} from 'react';\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport FormControl from \"react-bootstrap/FormControl\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport InputGroup from \"react-bootstrap/InputGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputSearchbar extends React.Component {\n outputID: string;\n\n updateSearch = (e) => {\n this.outputID =e.target.value;\n };\n\n executeSearch = (e: KeyboardEvent) => {\n if (e.key !== 'Enter') return;\n this.props.explorerStore.routerStore.push(`/explorer/output/${this.outputID}`);\n };\n\n render() {\n let {searching} = this.props.explorerStore;\n\n return (\n \n \n \n \n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerSearchbar} from \"./ExplorerSearchbar\";\r\nimport {ExplorerLiveFeed} from \"./ExplorerLiveFeed\";\r\nimport {ExplorerTransactionSearchbar} from \"./ExplorerTransactionSearchbar\";\r\nimport {ExplorerOutputSearchbar} from \"./ExplorerOutputSearchbar\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Explorer extends React.Component {\r\n render() {\r\n return (\r\n \r\n

Tangle Explorer

\r\n \r\n \r\n

\r\n Search for addresses, blocks, transactions, outputs and spends.\r\n

\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This explorer implementation is heavily inspired by thetangle.org.\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {KeyboardEvent} from 'react';\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport Form from \"react-bootstrap/Form\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class NavExplorerSearchbar extends React.Component {\r\n\r\n updateSearch = (e) => {\r\n this.props.explorerStore.updateSearch(e.target.value);\r\n };\r\n\r\n executeSearch = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.explorerStore.searchAny();\r\n };\r\n\r\n render() {\r\n let {search, searching} = this.props.explorerStore;\r\n return (\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum WSMsgType {\r\n Status,\r\n BPSMetrics,\r\n Block,\r\n NeighborStats,\r\n ComponentCounterMetrics,\r\n TipsMetrics,\r\n Vertex,\r\n TXAccepted,\r\n TipInfo,\r\n Mana,\r\n ManaMapOverall,\r\n ManaMapOnline,\r\n BlkManaDashboardAddress,\r\n RateSetter,\r\n SpendSet,\r\n Spend,\r\n SlotInfo,\r\n}\r\n\r\nexport interface WSBlock {\r\n type: number;\r\n data: any;\r\n}\r\n\r\ntype DataHandler = (data: any) => void;\r\n\r\nlet handlers = {};\r\n\r\nexport function registerHandler(blkTypeID: number, handler: DataHandler) {\r\n handlers[blkTypeID] = handler;\r\n}\r\n\r\nexport function unregisterHandler(blkTypeID: number) {\r\n delete handlers[blkTypeID];\r\n}\r\n\r\nexport function connectWebSocket(path: string, onOpen, onClose, onError) {\r\n let loc = window.location;\r\n let uri = 'ws:';\r\n\r\n if (loc.protocol === 'https:') {\r\n uri = 'wss:';\r\n }\r\n uri += '//' + loc.host + path;\r\n\r\n let ws = new WebSocket(uri);\r\n\r\n ws.onopen = onOpen;\r\n ws.onclose = onClose;\r\n ws.onerror = onError;\r\n\r\n ws.onmessage = (e) => {\r\n let blk: WSBlock = JSON.parse(e.data);\r\n let handler = handlers[blk.type];\r\n if (!handler) {\r\n return;\r\n }\r\n handler(blk.data);\r\n };\r\n}\r\n","export enum PayloadType {\r\n TaggedData = 0,\r\n Transaction = 1,\r\n Faucet = 3,\r\n}\r\n\r\n// BasicPayload\r\nexport class BasicPayload {\r\n content_title: string;\r\n content: string;\r\n}\r\n\r\nexport class TaggedDataPayload {\r\n tag: string;\r\n data: string;\r\n}\r\n\r\nexport class FaucetPayload {\r\n address: string;\r\n accessManaPledgeID: string;\r\n consensusManaPledgeID: string;\r\n nonce: number;\r\n}\r\n\r\nexport class TransactionPayload {\r\n networkId: number;\r\n creationSlot: number;\r\n inputs: Array;\r\n outputs: Array;\r\n payload: any;\r\n unlocks: Array;\r\n}\r\n\r\nexport class Input {\r\n type: string;\r\n referencedOutputID: OutputID;\r\n output: Output;\r\n}\r\n\r\nexport class Output {\r\n outputID: OutputID;\r\n type: number;\r\n output: \r\n BasicOutput|\r\n AliasOutput|\r\n FoundryOutput|\r\n NFTOutput;\r\n}\r\n\r\nexport class OutputID {\r\n hex: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class UnlockBlock {\r\n type: string;\r\n referencedIndex: number;\r\n signatureType: number;\r\n signature: SignatureEd25519;\r\n}\r\n\r\nexport class SignatureEd25519 {\r\n publicKey: string;\r\n signature: string;\r\n}\r\n\r\nexport class BasicOutput {\r\n amount: number\r\n nativeTokens?: Array;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n}\r\n\r\nexport class AliasOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n aliasId: string;\r\n stateIndex: number;\r\n stateMetadata?: string;\r\n foundryCounter: number;\r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class FoundryOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n serialNumber: number;\r\n tokenScheme: number; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class NFTOutput {\r\n amount: number;\r\n nativeTokens?: Array;\r\n nftId: string; \r\n unlockConditions?: Array;\r\n features?: Array;\r\n immutableFeatures?: Array;\r\n}\r\n\r\nexport class Balance {\r\n value: number;\r\n color: string;\r\n}\r\n\r\nexport class Spend {\r\n tx_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\nexport class Timestamp {\r\n blk_id: string;\r\n opinion: Opinion;\r\n}\r\n\r\n// @ts-ignore\r\nexport class Opinion {\r\n value: string;\r\n round: number;\r\n}\r\n\r\nexport class NativeToken {\r\n id: string;\r\n amount: number;\r\n}\r\n\r\n// address, stateController, Governor share the same struct\r\nexport class AddressUnlockCondition {\r\n type: number;\r\n address: Address;\r\n}\r\n\r\nexport class Address {\r\n type: number;\r\n pubKeyHash: string;\r\n}\r\nexport class StorageDepositReturnUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n amount: number;\r\n}\r\n\r\nexport class TimelockUnlockCondition {\r\n type: number;\r\n unixTime?: number;\r\n}\r\n\r\nexport class ExpirationUnlockCondition {\r\n type: number;\r\n returnAddress: string;\r\n unixTime: number;\r\n}\r\n\r\nexport class Feature {\r\n type: number;\r\n feature:\r\n IssuerFeature |\r\n MetadataFeature |\r\n TagFeature;\r\n}\r\n\r\n// Issuer and sender share a struct\r\nexport class IssuerFeature {\r\n address: string\r\n}\r\n\r\nexport class MetadataFeature {\r\n data: string;\r\n}\r\n\r\nexport class TagFeature {\r\n tag: string;\r\n}\r\n\r\nexport function getPayloadType(p: number){\r\n switch (p) {\r\n case PayloadType.TaggedData:\r\n return \"TaggedData\"\r\n case PayloadType.Transaction:\r\n return \"Transaction\"\r\n case PayloadType.Faucet:\r\n return \"Faucet\"\r\n default:\r\n return \"Unknown\"\r\n }\r\n}\r\n","import { UnlockConditionAddress, UnlockConditionExpiration, UnlockConditionStorageDepositReturn, UnlockConditionTimelock } from \"app/components/Condition\";\nimport { AddressUnlockCondition, ExpirationUnlockCondition, StorageDepositReturnUnlockCondition, TimelockUnlockCondition } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum ConditionType {\n Address = 0,\n StorageDepositReturn,\n Timelock,\n Expiration,\n StateControllerAddress,\n GovernorAddress,\n ImmutableAlias,\n}\n\nexport function resolveConditionType(condType: number) {\n switch (condType) {\n case ConditionType.Address:\n return \"Address Condition\";\n case ConditionType.StorageDepositReturn:\n return \"StorageDepositReturn Condition\";\n case ConditionType.Timelock:\n return \"Timelock Condition\";\n case ConditionType.Expiration:\n return \"Expiration Condition\";\n case ConditionType.StateControllerAddress:\n return \"StateControllerAddress Condition\";\n case ConditionType.GovernorAddress:\n return \"GovernorAddress Condition\";\n case ConditionType.ImmutableAlias:\n return \"ImmutableAlias Condition\";\n default:\n return \"Unknown Condition Type\";\n }\n}\n\nexport function conditionToComponent(cond: \n AddressUnlockCondition |\n StorageDepositReturnUnlockCondition |\n TimelockUnlockCondition |\n ExpirationUnlockCondition) {\n switch (cond.type) {\n case ConditionType.Address:\n case ConditionType.StateControllerAddress:\n case ConditionType.GovernorAddress:\n return ;\n case ConditionType.StorageDepositReturn:\n return ;\n case ConditionType.Expiration:\n return ;\n case ConditionType.Timelock:\n return ;\n }\n}","import { FeatureIssuer, FeatureMetadata, FeatureTag } from \"app/components/Feature\";\nimport { Feature, IssuerFeature, MetadataFeature, TagFeature } from \"app/misc/Payload\";\nimport * as React from 'react';\n\nexport enum FeatureType {\n Sender = 0,\n Issuer,\n Metadata,\n Tag,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case FeatureType.Sender:\n return \"Sender Feature\";\n case FeatureType.Issuer:\n return \"Issuer Feature\";\n case FeatureType.Metadata:\n return \"Metadata Feature\";\n case FeatureType.Tag:\n return \"Tag Feature\";\n default:\n return \"Unknown Feature Type\";\n }\n}\n\n\nexport function featureToComponent(feat: Feature) {\n switch (feat.type) {\n case FeatureType.Sender:\n case FeatureType.Issuer:\n return ;\n case FeatureType.Metadata:\n return ;\n case FeatureType.Tag:\n return ;\n }\n}","import {\n BasicOutput as BasicJSON,\n AliasOutput as AliasJSON,\n FoundryOutput as FoundryJSON,\n NFTOutput as NFTJSON,\n Output,\n} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport { BasicOutput } from \"app/components/BasicOutput\";\nimport { AliasOutput } from \"app/components/AliasOutput\";\nimport { FoundryOutput } from \"app/components/FoundryOutput\";\nimport { NFTOutput } from \"app/components/NFTOutput\";\n\nexport enum OutputType {\n Treasury = 2,\n Basic,\n Alias,\n Foundry,\n NFT,\n}\n\nexport function outputToComponent(output: Output) {\n let id = output.outputID\n switch (output.type) {\n case OutputType.Basic:\n return ;\n case OutputType.Alias:\n return ;\n case OutputType.Foundry:\n return ;\n case OutputType.NFT:\n return ;\n default:\n return;\n }\n}\n\n\nexport function outputTypeToName(type: number) {\n switch (type) {\n case OutputType.Basic:\n return \"Basic Output\";\n case OutputType.Alias:\n return \"Alias Output\";\n case OutputType.Foundry:\n return \"Foundry Output\";\n case OutputType.NFT:\n return \"NFT Output\";\n default:\n return;\n }\n}\n","import * as React from 'react';\nimport { NativeToken as NativeTokenJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\n\ninterface Props {\n token: NativeTokenJSON;\n}\n\nexport class NativeToken extends React.Component {\n render() {\n return (\n
\n \n ID: {this.props.token.id}\n Amount: {this.props.token.amount}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport { \n TimelockUnlockCondition, \n AddressUnlockCondition,\n StorageDepositReturnUnlockCondition,\nExpirationUnlockCondition} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface AddressProps { \n unlock: AddressUnlockCondition;\n}\n\nexport class UnlockConditionAddress extends React.Component {\n render() {\n return (\n
\n \n Address Type: {this.props.unlock.address.type}\n \n \n Address: {this.props.unlock.address.pubKeyHash}\n \n
\n );\n }\n}\n\ninterface TimelockProps { \n unlock: TimelockUnlockCondition;\n}\n\nexport class UnlockConditionTimelock extends React.Component {\n render() {\n\n return (\n this.props.unlock.unixTime &&\n
\n \n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}\n\ninterface StorageDepositReturnProps { \n unlock: StorageDepositReturnUnlockCondition;\n}\n\nexport class UnlockConditionStorageDepositReturn extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Amount: {this.props.unlock.amount}\n \n
\n );\n }\n}\n\ninterface ExpirationProps { \n unlock: ExpirationUnlockCondition;\n}\n\nexport class UnlockConditionExpiration extends React.Component {\n render() {\n\n return (\n
\n \n Return Address: {this.props.unlock.returnAddress}\n Unix Time: {this.props.unlock.unixTime}\n \n
\n );\n }\n}","import * as React from 'react';\nimport { \nIssuerFeature, MetadataFeature, TagFeature} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface IssuerProps { \n feature: IssuerFeature;\n}\n\nexport class FeatureIssuer extends React.Component {\n render() {\n return (\n
\n \n Address: {this.props.feature.address}\n \n
\n );\n }\n}\n\n\ninterface MetadataProps { \n feature: MetadataFeature;\n}\n\nexport class FeatureMetadata extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.data}\n \n
\n );\n }\n}\n\ninterface TagProps { \n feature: TagFeature;\n}\n\nexport class FeatureTag extends React.Component {\n render() {\n return (\n
\n \n Data: {this.props.feature.tag}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {OutputID, BasicOutput as BasicOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: BasicOutputJSON\n id: OutputID;\n}\n\nexport class BasicOutput extends React.Component {\n render() {\n return (\n
\n \n Type: BasicOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}","import * as React from 'react';\nimport {AliasOutput as AliasOutputJSON, OutputID} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: AliasOutputJSON\n id: OutputID;\n}\n\nexport class AliasOutput extends React.Component {\n render() {\n return (\n
\n \n Type: AliasOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n AliasID: {this.props.output.aliasId}\n StateIndex: {this.props.output.stateIndex}\n State Metadata: {this.props.output.stateMetadata} \n Foundry Counter: {this.props.output.foundryCounter}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n","import * as React from 'react';\nimport {OutputID, FoundryOutput as FoundryOutputJSON} from \"../misc/Payload\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { NativeToken } from './NativeToken';\nimport { conditionToComponent } from 'app/utils/condition';\nimport { featureToComponent } from 'app/utils/feature';\n\ninterface Props {\n output: FoundryOutputJSON\n id: OutputID;\n}\n\nexport class FoundryOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n Serial Number: {this.props.output.serialNumber}\n Token Scheme: {this.props.output.tokenScheme} \n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import * as React from 'react';\nimport {OutputID, NFTOutput as NFTOutputJSON} from \"../misc/Payload\";\nimport {conditionToComponent} from \"../utils/condition\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { featureToComponent } from 'app/utils/feature';\nimport { NativeToken } from './NativeToken';\n\ninterface Props {\n output: NFTOutputJSON\n id: OutputID;\n}\n\nexport class NFTOutput extends React.Component {\n render() {\n return (\n
\n \n Type: FoundryOutput\n Amount: {this.props.output.amount}\n OutputID: {this.props.id.hex}\n NFT ID: {this.props.output.nftId}\n {\n this.props.output.nativeTokens && this.props.output.nativeTokens.map((n, _) => )\n }\n {\n this.props.output.unlockConditions && this.props.output.unlockConditions.map((c, _) => conditionToComponent(c))\n }\n {\n this.props.output.features && this.props.output.features.map((f, _) => featureToComponent(f))\n }\n Transaction: {this.props.id.transactionID}\n Output Index: {this.props.id.outputIndex}\n \n
\n );\n }\n}\n\n\n\n","import { action, computed, observable } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport {\r\n BasicPayload,\r\n getPayloadType,\r\n Output,\r\n PayloadType,\r\n FaucetPayload,\r\n TransactionPayload,\r\n TaggedDataPayload,\r\n BasicOutput\r\n} from \"../misc/Payload\";\r\nimport * as React from \"react\";\r\nimport { Link } from 'react-router-dom';\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { OutputType } from 'app/utils/output';\r\n\r\nexport const GenesisBlockID = \"1111111111111111111111111111111111111111111111111111111111111111\";\r\nexport const GenesisTransactionID = \"11111111111111111111111111111111\";\r\n\r\nexport class Block {\r\n id: string;\r\n networkID: number;\r\n protocolVersion: number;\r\n solidificationTimestamp: number;\r\n issuanceTimestamp: number;\r\n sequenceNumber: number;\r\n issuerID: string;\r\n signature: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n strongChildren: Array;\r\n weakChildren: Array;\r\n shallowLikeChildren: Array;\r\n solid: boolean;\r\n spendIDs: Array;\r\n scheduled: boolean;\r\n booked: boolean;\r\n orphaned: boolean;\r\n objectivelyInvalid: boolean;\r\n subjectivelyInvalid: boolean;\r\n acceptance: boolean;\r\n acceptanceTime: number;\r\n confirmation: boolean;\r\n confirmationTime: number;\r\n confirmationBySlot: boolean;\r\n confirmationBySlotTime: number;\r\n payloadType: number;\r\n payload: any;\r\n txId: string;\r\n rank: number;\r\n sequenceID: number;\r\n isPastMarker: boolean;\r\n pastMarkerGap: number;\r\n pastMarkers: string;\r\n commitmentID: string\r\n commitment: Commitment;\r\n latestConfirmedSlot: number;\r\n}\r\n\r\nexport class Commitment {\r\n index: number;\r\n prevID: string;\r\n rootsID: string;\r\n cumulativeWeight: number;\r\n}\r\nexport class AddressResult {\r\n address: string;\r\n explorerOutputs: Array;\r\n}\r\n\r\nexport class ExplorerOutput {\r\n id: OutputID;\r\n output: Output;\r\n metadata: OutputMetadata\r\n txTimestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputID {\r\n base58: string;\r\n transactionID: string;\r\n outputIndex: number;\r\n}\r\n\r\nexport class OutputMetadata {\r\n outputID: OutputID;\r\n spendIDs: Array;\r\n consumerCount: number;\r\n confirmedConsumer: string // tx id of confirmed consumer\r\n confirmationState: number\r\n confirmationStateTime: number\r\n}\r\n\r\nclass OutputConsumer {\r\n transactionID: string;\r\n valid: string;\r\n}\r\n\r\nclass OutputConsumers {\r\n outputID: OutputID;\r\n consumers: Array\r\n}\r\n\r\nclass TransactionMetadata {\r\n transactionID: string;\r\n spendIDs: string[];\r\n booked: boolean;\r\n bookedTime: number;\r\n confirmationState: string;\r\n confirmationStateTime: number;\r\n}\r\n\r\nclass PendingMana {\r\n mana: number;\r\n outputID: string;\r\n error: string;\r\n timestamp: number;\r\n}\r\n\r\nclass SlotInfo {\r\n id: string;\r\n index: number;\r\n rootsID: string;\r\n prevID: string;\r\n cumulativeWeight: number;\r\n blocks: Array;\r\n transactions: Array;\r\n createdOutputs: Array;\r\n spentOutputs: Array;\r\n}\r\n\r\nclass SearchResult {\r\n block: BlockRef;\r\n address: AddressResult;\r\n}\r\n\r\nclass BlockRef {\r\n id: string;\r\n payload_type: number;\r\n}\r\n\r\nclass Tips {\r\n tips: Array\r\n}\r\n\r\nconst liveFeedSize = 50;\r\n\r\nenum QueryError {\r\n NotFound = 1,\r\n BadRequest = 2\r\n}\r\n\r\nexport class ExplorerStore {\r\n // live feed\r\n @observable latest_blocks: Array = [];\r\n\r\n // queries\r\n @observable blk: Block = null;\r\n @observable addr: AddressResult = null;\r\n @observable tx: any = null;\r\n @observable txMetadata: any = null;\r\n @observable txAttachments: any = [];\r\n @observable output: any = null;\r\n @observable outputMetadata: OutputMetadata = null;\r\n @observable outputConsumers: OutputConsumers = null;\r\n @observable pendingMana: PendingMana = null;\r\n @observable tips: Tips = null;\r\n @observable slotInfo: SlotInfo = new SlotInfo;\r\n\r\n // loading\r\n @observable query_loading: boolean = false;\r\n @observable query_err: any = null;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n @observable search_result: SearchResult = null;\r\n @observable searching: boolean = false;\r\n @observable payload: any;\r\n @observable subpayload: any;\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Block, this.addLiveFeedBlock);\r\n }\r\n\r\n searchAny = async () => {\r\n this.updateSearching(true);\r\n try {\r\n let res = await fetch(`/api/search/${this.search}`);\r\n let result: SearchResult = await res.json();\r\n this.updateSearchResult(result);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n resetSearch = () => {\r\n this.search_result = null;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n updateSearchResult = (result: SearchResult) => {\r\n this.search_result = result;\r\n this.searching = false;\r\n let search = this.search;\r\n this.search = '';\r\n if (this.search_result.block) {\r\n this.routerStore.push(`/explorer/block/${search}`);\r\n return;\r\n }\r\n if (this.search_result.address) {\r\n this.routerStore.push(`/explorer/address/${search}`);\r\n return;\r\n }\r\n this.routerStore.push(`/explorer/404/${search}`);\r\n };\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search;\r\n };\r\n\r\n @action\r\n updateSearching = (searching: boolean) => this.searching = searching;\r\n\r\n searchBlock = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/block/${id}`)\r\n\r\n this.updateBlock(res);\r\n };\r\n\r\n searchAddress = async (id: string) => {\r\n this.updateQueryLoading(true);\r\n const res = await this.fetchJson(\"get\", `/api/address/${id}`)\r\n this.updateAddress(res);\r\n };\r\n\r\n getSlotDetails = async (id: string) => {\r\n await this.getSlotInfo(id);\r\n }\r\n\r\n @action\r\n getTransaction = async (id: string) => {\r\n const tx = await this.fetchJson(\"get\", `/api/transaction/${id}`)\r\n \r\n for (let i = 0; i < tx.inputs.length; i++) {\r\n let inputID = tx.inputs[i] ? tx.inputs[i].referencedOutputID.hex : GenesisBlockID\r\n try {\r\n let referencedOutputRes = await fetch(`/api/output/${inputID}`)\r\n if (referencedOutputRes.status === 404) {\r\n let genOutput = new Output();\r\n genOutput.output = new BasicOutput();\r\n genOutput.output.amount = 0;\r\n genOutput.type = OutputType.Basic;\r\n genOutput.outputID = tx.inputs[i].referencedOutputID;\r\n tx.inputs[i].output = genOutput;\r\n }\r\n if (referencedOutputRes.status === 200) {\r\n tx.inputs[i].output = await referencedOutputRes.json()\r\n }\r\n } catch (err) {\r\n // ignore\r\n }\r\n this.tx = tx;\r\n }\r\n }\r\n\r\n @action\r\n getTransactionAttachments = async (id: string) => {\r\n const attachments = await this.fetchJson(\"get\", `/api/transaction/${id}/attachments`)\r\n this.txAttachments = attachments;\r\n }\r\n\r\n @action\r\n getTransactionMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/transaction/${id}/metadata`)\r\n this.txMetadata = res;\r\n }\r\n\r\n @action\r\n getOutput = async (id: string) => {\r\n const output = await this.fetchJson(\"get\", `/api/output/${id}`)\r\n this.output = output;\r\n }\r\n\r\n @action\r\n getOutputMetadata = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/metadata`)\r\n this.outputMetadata = res;\r\n }\r\n\r\n @action\r\n getOutputConsumers = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/output/${id}/consumers`)\r\n this.outputConsumers = res;\r\n }\r\n\r\n @action\r\n getPendingMana = async (outputID: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/mana/pending?OutputID=${outputID}`)\r\n this.pendingMana = res;\r\n }\r\n\r\n @action\r\n getSlotInfo = async (id: string) => {\r\n const res = await this.fetchJson(\"get\", `/api/slot/commitment/${id}`)\r\n this.slotInfo = res;\r\n }\r\n\r\n @action\r\n getTips = async () => {\r\n const res = await this.fetchJson(\"get\", \"/api/tips\")\r\n this.tips = res;\r\n }\r\n\r\n @action\r\n reset = () => {\r\n this.blk = null;\r\n this.query_err = null;\r\n // reset all variables\r\n this.tx = null;\r\n this.txMetadata = null;\r\n this.txAttachments = [];\r\n this.output = null;\r\n this.outputMetadata = null;\r\n this.outputConsumers = null;\r\n this.pendingMana = null;\r\n this.tips = null;\r\n this.slotInfo = new SlotInfo;\r\n };\r\n\r\n @action\r\n updateAddress = (addr: AddressResult) => {\r\n this.addr = addr;\r\n this.query_err = null;\r\n this.query_loading = false;\r\n };\r\n\r\n @action\r\n updateBlock = (blk: Block) => {\r\n this.blk = blk;\r\n this.blk.spendIDs = this.blk.spendIDs ? this.blk.spendIDs : []\r\n this.blk.strongChildren = this.blk.strongChildren ? this.blk.strongChildren : []\r\n this.blk.weakChildren = this.blk.weakChildren ? this.blk.weakChildren : []\r\n this.blk.shallowLikeChildren = this.blk.shallowLikeChildren ? this.blk.shallowLikeChildren : []\r\n this.blk.strongParents = this.blk.strongParents ? this.blk.strongParents : []\r\n this.blk.weakParents = this.blk.weakParents ? this.blk.weakParents : []\r\n this.blk.shallowLikedParents = this.blk.shallowLikedParents ? this.blk.shallowLikedParents : []\r\n\r\n this.query_err = null;\r\n this.query_loading = false;\r\n switch (blk.payloadType) {\r\n case PayloadType.Transaction:\r\n this.payload = blk.payload as TransactionPayload\r\n break;\r\n case PayloadType.TaggedData:\r\n this.payload = blk.payload as TaggedDataPayload\r\n break;\r\n case PayloadType.Faucet:\r\n this.payload = blk.payload as FaucetPayload\r\n default:\r\n this.payload = blk.payload as BasicPayload\r\n break;\r\n }\r\n };\r\n\r\n @action\r\n updateQueryLoading = (loading: boolean) => this.query_loading = loading;\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.query_err = err;\r\n this.query_loading = false;\r\n this.searching = false;\r\n };\r\n\r\n @action\r\n addLiveFeedBlock = (blk: BlockRef) => {\r\n // prevent duplicates (should be fast with only size 10)\r\n if (this.latest_blocks.findIndex((t) => t.id == blk.id) === -1) {\r\n if (this.latest_blocks.length >= liveFeedSize) {\r\n this.latest_blocks.shift();\r\n }\r\n this.latest_blocks.push(blk);\r\n }\r\n };\r\n\r\n @computed\r\n get blksLiveFeed() {\r\n let feed = [];\r\n for (let i = this.latest_blocks.length - 1; i >= 0; i--) {\r\n let blk = this.latest_blocks[i];\r\n feed.push(\r\n \r\n \r\n \r\n {blk.id}\r\n \r\n \r\n \r\n {getPayloadType(blk.payload_type)}\r\n \r\n \r\n );\r\n }\r\n return feed;\r\n }\r\n\r\n @computed\r\n get tipsList() {\r\n let list = [];\r\n if (this.tips) {\r\n for (let i = 0; i < this.tips.tips.length; i++) {\r\n let blkId = this.tips.tips[i];\r\n list.push(\r\n \r\n \r\n \r\n {blkId}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n return list;\r\n }\r\n\r\n async fetchJson(\r\n method: 'get' | 'delete',\r\n route: string,\r\n requestData?: T\r\n ): Promise {\r\n\r\n const body = requestData ? JSON.stringify(requestData, function (_, v) {\r\n // keep Uint8Array as it is\r\n if (v instanceof Uint8Array) {\r\n return Array.from(v);\r\n }\r\n return v;\r\n })\r\n : undefined;\r\n\r\n const response = await fetch(`${route}`, {\r\n method,\r\n headers: { 'Content-Type': 'application/json' },\r\n body\r\n });\r\n\r\n if (response.ok) {\r\n const responseData: U = await response.json();\r\n return responseData;\r\n }\r\n\r\n switch (response.status) {\r\n case 404:\r\n this.updateQueryError(QueryError.NotFound);\r\n break;\r\n case 400:\r\n this.updateQueryError(QueryError.BadRequest);\r\n break;\r\n default:\r\n this.updateQueryError('unexpected error')\r\n break;\r\n }\r\n return {} as U;\r\n }\r\n}\r\n\r\nexport default ExplorerStore;\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class BasicPayload extends React.Component {\r\n\r\n render() {\r\n let {payload} = this.props.explorerStore;\r\n return (\r\n payload &&\r\n \r\n \r\n \r\n {payload.content_title}: {' '} \r\n {payload.content}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export enum SignatureType {\n Ed25519 = 0,\n BLS = 1,\n}\n\nexport function resolveSignatureType(sigType: number) {\n switch (sigType) {\n case SignatureType.Ed25519:\n return \"Ed25519 Signature\";\n case SignatureType.BLS:\n return \"BLS Signature\";\n default:\n return \"Unknown Signature Type\";\n }\n}","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport { Col, ListGroup } from 'react-bootstrap';\nimport { SignatureEd25519 } from 'app/misc/Payload';\n\ninterface Props {\n signature?: SignatureEd25519;\n}\n\nexport class Ed25519Signature extends React.Component {\n\n render() {\n let signature = this.props.signature;\n return (\n \n \n \n \n Public Key: {signature.publicKey}\n Signature: {signature.signature}\n \n \n \n \n );\n }\n}\n","import {UnlockBlock as unlockBlockJSON} from \"../misc/Payload\";\nimport * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport Badge from \"react-bootstrap/Badge\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport {SignatureType, resolveSignatureType} from \"../utils/unlock_block\";\nimport { Ed25519Signature } from \"./Ed25519Signature\";\n\ninterface UnlockProps {\n block: unlockBlockJSON;\n key: number;\n}\n\nexport class UnlockBlock extends React.Component {\n renderSignatureComponent() {\n switch (this.props.block.signatureType) {\n case SignatureType.Ed25519:\n return \n }\n }\n\n render() {\n let block = this.props.block;\n return (\n \n \n Index: {this.props.key}\n \n Type: {block.type}\n {\n block.signatureType && Signature Type: {resolveSignatureType(block.signatureType)}\n } \n {\n this.renderSignatureComponent()\n } \n \n \n \n );\n }\n}","import * as React from \"react\";\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {outputToComponent} from \"../utils/output\";\nimport {IconContext} from \"react-icons\";\nimport {FaChevronCircleRight} from \"react-icons/fa\";\nimport {UnlockBlock} from \"./UnlockBlock\";\nimport {TransactionPayload} from \"../misc/Payload\";\n\nconst style = {\n maxHeight: \"1000px\",\n overflow: \"auto\",\n width: \"47%\",\n fontSize: \"85%\",\n}\n\ninterface Props {\n txID?: string;\n tx?: TransactionPayload;\n}\n\nexport class Transaction extends React.Component {\n render() {\n let txID = this.props.txID;\n let tx = this.props.tx;\n return (\n tx && txID &&\n
\n

Transaction

\n

{txID}

\n \n \n
Transaction Essence
\n \n ID: {txID}\n Network ID: {tx.networkId}\n Creation Time: {tx.creationSlot}\n \n
\n
\n Inputs\n
\n {tx.inputs.map((input, i) => {\n return (\n
\n Index: {i}\n
\n \n Output ID: {input.referencedOutputID.hex}\n \n
\n
\n )\n })}\n
\n \n
\n \n
\n
\n
\n Outputs\n
\n {tx.outputs.map((output, i) => {\n return (\n
\n Index: {i}\n {outputToComponent(output)}\n
\n )\n })}\n
\n
\n
\n { tx.payload && Data payload: {tx.payload}}\n
\n \n
\n \n \n
Unlock Blocks
\n \n {\n tx.unlocks.map((block,index) => (\n \n ))}\n \n \n
\n
\n );\n }\n}","import * as React from 'react';\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\r\nimport {Transaction} from \"./Transaction\";\r\n// import {ExplorerTransactionMetadata} from \"./ExplorerTransactionMetadata\";\r\nimport Container from \"react-bootstrap/Container\";\r\n\r\ninterface Props {\r\n explorerStore?: ExplorerStore;\r\n}\r\n\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class TransactionPayload extends React.Component {\r\n render() {\r\n let {payload, blk} = this.props.explorerStore;\r\n let txID = blk.txId;\r\n let tx = payload;\r\n\r\n return (\r\n \r\n {/* */}\r\n \r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport {inject, observer} from \"mobx-react\";\nimport {ExplorerStore} from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class FaucetPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n return (\n payload &&\n \n \n \n \n \n Address: {payload.address}\n \n \n Access Mana Pledge ID: {payload.accessManaPledgeID}\n \n \n Consensus Mana Pledge ID: {payload.consensusManaPledgeID}\n \n \n Nonce: {payload.nonce}\n \n \n \n \n \n );\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport { Col, ListGroup } from 'react-bootstrap';\n\ninterface Props {\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class TaggedDataPayload extends React.Component {\n\n render() {\n let {payload} = this.props.explorerStore;\n \n return (\n payload &&\n \n \n \n \n Tag: {payload.tag}\n Data: {payload.data}\n \n \n \n \n );\n }\n}\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport ExplorerStore, { GenesisBlockID } from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport * as dateformat from 'dateformat';\r\nimport { Link } from 'react-router-dom';\r\nimport { BasicPayload } from './BasicPayload'\r\nimport { TransactionPayload } from './TransactionPayload'\r\nimport { getPayloadType, PayloadType } from '../misc/Payload'\r\nimport { FaucetPayload } from './FaucetPayload';\r\nimport { TaggedDataPayload } from './TaggedDataPayload';\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerBlockQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.explorerStore.reset();\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchBlock(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n getPayloadType() {\r\n return getPayloadType(this.props.explorerStore.blk.payloadType)\r\n }\r\n\r\n renderPayload() {\r\n switch (this.props.explorerStore.blk.payloadType) {\r\n case PayloadType.Transaction:\r\n if (!this.props.explorerStore.blk.objectivelyInvalid) {\r\n return \r\n }\r\n return \r\n case PayloadType.TaggedData:\r\n return \r\n case PayloadType.Faucet:\r\n return \r\n default:\r\n return \r\n }\r\n }\r\n\r\n render() {\r\n let { id } = this.props.match.params;\r\n let { blk, query_loading, query_err } = this.props.explorerStore;\r\n\r\n if (id === GenesisBlockID) {\r\n return (\r\n \r\n

Genesis Block

\r\n

In the beginning there was the genesis.

\r\n
\r\n );\r\n }\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Block not available - 404

\r\n

\r\n Block with ID {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n return (\r\n \r\n

Block

\r\n

\r\n {id} {' '}\r\n {\r\n blk &&\r\n \r\n
\r\n \r\n \r\n Issuance Time: {dateformat(new Date(blk.issuanceTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Solidification Time: {dateformat(new Date(blk.solidificationTimestamp * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n
\r\n }\r\n

\r\n {\r\n blk &&\r\n \r\n \r\n \r\n \r\n \r\n Payload Type: {this.getPayloadType()}\r\n \r\n \r\n Sequence Number: {blk.sequenceNumber}\r\n \r\n \r\n SpendIDs:\r\n \r\n {\r\n blk.spendIDs.map((value, index) => {\r\n return (\r\n \r\n {value}\r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n Solid: {blk.solid ? 'Yes' : 'No'}\r\n \r\n \r\n Scheduled: {blk.scheduled ? 'Yes' : 'No'}\r\n \r\n \r\n Booked: {blk.booked ? 'Yes' : 'No'}\r\n \r\n \r\n Orphaned: {blk.orphaned ? 'Yes' : 'No'}\r\n \r\n \r\n Objectively Invalid: {blk.objectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Subjectively Invalid: {blk.subjectivelyInvalid ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance: {blk.acceptance ? 'Yes' : 'No'}\r\n \r\n \r\n Acceptance\r\n Time: {dateformat(new Date(blk.acceptanceTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation: {blk.confirmation ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation\r\n Time: {dateformat(new Date(blk.confirmationTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n Confirmation by slot: {blk.confirmationBySlot ? 'Yes' : 'No'}\r\n \r\n \r\n Confirmation by slot\r\n time: {dateformat(new Date(blk.confirmationBySlotTime * 1000), \"dd.mm.yyyy HH:MM:ss\")}\r\n \r\n \r\n \r\n \r\n\r\n {\r\n \r\n \r\n
Slot Commitment
\r\n \r\n \r\n CommitmentID: {blk.commitmentID}\r\n \r\n \r\n \r\n \r\n Index: {blk.commitment.index}\r\n \r\n \r\n prevID: {blk.commitment.prevID}\r\n \r\n \r\n rootsID: {blk.commitment.rootsID}\r\n \r\n \r\n Cumulative Weight: {blk.commitment.cumulativeWeight}\r\n \r\n \r\n \r\n \r\n LatestConfirmedSlot: {blk.latestConfirmedSlot}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n {\r\n !!blk.rank &&\r\n \r\n \r\n
Markers
\r\n \r\n \r\n Rank: {blk.rank}\r\n \r\n \r\n SequenceID: {blk.sequenceID}\r\n \r\n \r\n PastMarkerGap: {blk.pastMarkerGap}\r\n \r\n \r\n IsPastMarker: {blk.isPastMarker ? 'Yes' : 'No'}\r\n \r\n \r\n Past markers: {blk.pastMarkers}\r\n \r\n \r\n \r\n
\r\n }\r\n\r\n\r\n \r\n \r\n \r\n \r\n IssuerID: {blk.issuerID}\r\n \r\n \r\n Block Signature: {blk.signature}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongParents.map((value, index) => {\r\n return (\r\n \r\n Strong Parents {index + 1}: {' '}\r\n \r\n {blk.strongParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.weakParents.map((value, index) => {\r\n return (\r\n \r\n Weak Parents {index + 1}: {' '}\r\n \r\n {blk.weakParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.shallowLikedParents.map((value, index) => {\r\n return (\r\n \r\n Shallow Liked Parents {index + 1}: {' '}\r\n \r\n {blk.shallowLikedParents[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n blk.strongChildren.map((value, index) => {\r\n return (\r\n \r\n Strong Child {index + 1}: {' '}\r\n \r\n {blk.strongChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.weakChildren.map((value, index) => {\r\n return (\r\n \r\n Weak Child {index + 1}: {' '}\r\n \r\n {blk.weakChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {\r\n blk.shallowLikeChildren.map((value, index) => {\r\n return (\r\n \r\n ShallowLike Child {index + 1}: {' '}\r\n \r\n {blk.shallowLikeChildren[index]}\r\n \r\n \r\n )\r\n })\r\n }\r\n \r\n \r\n \r\n\r\n \r\n \r\n

Payload

\r\n \r\n
\r\n \r\n \r\n {this.renderPayload()}\r\n \r\n \r\n
\r\n }\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n
\r\n );\r\n }\r\n}\r\n","export function displayManaUnit(mana: number): string {\n let result = \"\"\n // round to nearest integer\n let roundedMana = Math.round(mana);\n if (roundedMana < 1000) {\n result = roundedMana.toString(10) + \" m\"; // mana\n } else if (roundedMana < 1000000) {\n result = (roundedMana / 1000).toFixed(3) + \" Km\"; // kilomana\n }\n else if (roundedMana < 1000000000) {\n result = (roundedMana / 1000000).toFixed(3) + \" Mm\"; // megamana\n }\n else if (roundedMana < 1000000000000) {\n result = (roundedMana / 1000000000).toFixed(3) + \" Gm\"; // gigamana\n }\n else if (roundedMana < 1000000000000000) {\n result = (roundedMana / 1000000000000).toFixed(3) + \" Tm\"; // terramana\n } else {\n result = (roundedMana / 1000000000000000).toFixed(3) + \" Pm\"; // petamana\n }\n return result\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {ExplorerStore, ExplorerOutput, OutputMetadata} from \"../stores/ExplorerStore\";\r\nimport Spinner from \"react-bootstrap/Spinner\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Alert from \"react-bootstrap/Alert\";\r\nimport {displayManaUnit} from \"../utils\";\r\nimport {OutputType, outputToComponent, outputTypeToName} from \"../utils/output\";\r\nimport {Button, ListGroupItem} from \"react-bootstrap\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n id: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class ExplorerAddressQueryResult extends React.Component {\r\n\r\n componentDidMount() {\r\n this.props.explorerStore.resetSearch();\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n\r\n getSnapshotBeforeUpdate(prevProps: Props, prevState) {\r\n if (prevProps.match.params.id !== this.props.match.params.id) {\r\n this.props.explorerStore.searchAddress(this.props.match.params.id);\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n let {id} = this.props.match.params;\r\n let {addr, query_loading, query_err} = this.props.explorerStore;\r\n // spent outputs\r\n let spent: Array = [];\r\n // unspent outputs\r\n let unspent: Array = [];\r\n let available_balances = [];\r\n\r\n if (query_err) {\r\n return (\r\n \r\n

Address not available - 404

\r\n

\r\n Address {id} not found.\r\n

\r\n
\r\n );\r\n }\r\n\r\n if (addr) {\r\n // separate spent from unspent\r\n addr.explorerOutputs.forEach((o) => {\r\n if (o.metadata.consumerCount > 0) {\r\n spent.push(o);\r\n } else {\r\n unspent.push(o);\r\n }\r\n })\r\n\r\n let timestampCompareFn = (a: ExplorerOutput, b: ExplorerOutput) => {\r\n if (b.txTimestamp === a.txTimestamp) {\r\n // outputs have the same timestamp\r\n if (b.id.transactionID == a.id.transactionID) {\r\n // outputs belong to the same tx, sort based on index\r\n return b.id.outputIndex - a.id.outputIndex;\r\n }\r\n // same timestamp, but different tx\r\n return b.id.transactionID.localeCompare(a.id.transactionID);\r\n }\r\n return b.txTimestamp - a.txTimestamp;\r\n }\r\n\r\n // sort outputs\r\n unspent.sort(timestampCompareFn)\r\n spent.sort(timestampCompareFn)\r\n }\r\n return (\r\n \r\n

Address {id} {addr !== null && ({addr.explorerOutputs.length} Outputs)}

\r\n {\r\n addr !== null ?\r\n \r\n {\r\n addr.explorerOutputs !== null && addr.explorerOutputs.length === 100 &&\r\n \r\n Max. 100 outputs are shown.\r\n \r\n }\r\n \r\n \r\n \r\n

Available Balances

\r\n {available_balances.length === 0? \"There are no balances currently available.\" :
\r\n \r\n \r\n \r\n Color\r\n \r\n \r\n Balance\r\n \r\n \r\n \r\n {available_balances}\r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Unspent Outputs

\r\n {unspent.length === 0? \"There are no unspent outputs currently available.\" :
\r\n {unspent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n

Spent Outputs

\r\n {spent.length === 0? \"There are no spent outputs currently available.\" :
\r\n {spent.map((o) => {\r\n return \r\n })}\r\n
\r\n }\r\n
\r\n \r\n
\r\n
\r\n :\r\n \r\n \r\n {query_loading && }\r\n \r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\ninterface oProps {\r\n output: ExplorerOutput;\r\n}\r\n\r\nclass OutputButton extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n enabled: false\r\n };\r\n }\r\n\r\n render() {\r\n return (\r\n \r\n { this.setState({enabled: !this.state.enabled})}}\r\n block\r\n >\r\n \r\n {this.props.output.id.base58} \r\n {outputTypeToName(this.props.output.output.type)} \r\n {new Date(this.props.output.txTimestamp * 1000).toLocaleString()}\r\n \r\n \r\n \r\n \r\n {\r\n this.state.enabled? outputToComponent(this.props.output.output): null\r\n }\r\n \r\n \r\n {\r\n this.state.enabled? : null\r\n }\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\ninterface omProps {\r\n metadata: OutputMetadata;\r\n timestamp: number;\r\n pendingMana: number;\r\n}\r\n\r\nclass OutputMeta extends React.Component {\r\n render() {\r\n let metadata = this.props.metadata;\r\n let timestamp = this.props.timestamp;\r\n let pendingMana = this.props.pendingMana;\r\n return (\r\n \r\n SpendIDs: \r\n \r\n {\r\n metadata.spendIDs.map((value, index) => {\r\n return (\r\n \r\n {value}\r\n \r\n )\r\n })\r\n }\r\n \r\n Pending mana: {displayManaUnit(pendingMana)}\r\n Timestamp: {new Date(timestamp * 1000).toLocaleString()}\r\n Consumer Count: {metadata.consumerCount}\r\n { metadata.confirmedConsumer && Confirmed Consumer: {metadata.confirmedConsumer} }\r\n \r\n );\r\n }\r\n}\r\n\r\nlet getVariant = (outputType: number) => {\r\n switch (outputType) {\r\n case OutputType.Basic:\r\n return \"light\";\r\n case OutputType.Alias:\r\n return \"light\";\r\n case OutputType.Foundry:\r\n return \"success\";\r\n case OutputType.NFT:\r\n return \"info\";\r\n default:\r\n return \"danger\";\r\n }\r\n}","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ExplorerStore from \"../stores/ExplorerStore\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n explorerStore?: ExplorerStore;\r\n match?: {\r\n params: {\r\n search: string,\r\n }\r\n }\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@inject(\"explorerStore\")\r\n@observer\r\nexport class Explorer404 extends React.Component {\r\n\r\n render() {\r\n let {search} = this.props.match.params;\r\n return (\r\n \r\n

Tangle Explorer 404

\r\n

\r\n The search via '{search}' did not yield any results.\r\n

\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport ListGroup from \"react-bootstrap/ListGroup\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport * as prettysize from 'prettysize';\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport {defaultChartOptions} from \"../misc/Chart\";\r\nimport {Line} from \"react-chartjs-2\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n identity: string;\r\n}\r\n\r\nconst lineChartOptions = Object.assign({\r\n scales: {\r\n xAxes: [{\r\n ticks: {\r\n autoSkip: true,\r\n maxTicksLimit: 8,\r\n fontSize: 8,\r\n minRotation: 0,\r\n maxRotation: 0,\r\n },\r\n showXLabels: 10,\r\n gridLines: {\r\n display: false\r\n }\r\n }],\r\n yAxes: [{\r\n gridLines: {\r\n display: false\r\n },\r\n ticks: {\r\n callback: function (value, index, values) {\r\n return prettysize(Math.abs(value));\r\n },\r\n maxTicksLimit: 3,\r\n fontSize: 10,\r\n },\r\n }],\r\n },\r\n tooltips: {\r\n callbacks: {\r\n label: function (tooltipItem, data) {\r\n let label = data.datasets[tooltipItem.datasetIndex].label;\r\n return `${label} ${prettysize(Math.abs(tooltipItem.value))}`;\r\n }\r\n }\r\n }\r\n}, defaultChartOptions);\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbor extends React.Component {\r\n render() {\r\n let neighborMetrics = this.props.nodeStore.neighbor_metrics.get(this.props.identity);\r\n let last = neighborMetrics.current;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {last.id}\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n Origin:\r\n {' '}\r\n {last.connection_origin}\r\n \r\n \r\n \r\n \r\n \r\n \r\n Address: {last.address}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
Network (Tx/Rx)
\r\n \r\n {'Total: '}\r\n {last.packets_written}\r\n {' / '}\r\n {last.packets_read}\r\n \r\n {' '}\r\n \r\n {'Current: '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.tx)}\r\n {' / '}\r\n {prettysize(neighborMetrics.currentNetIO && neighborMetrics.currentNetIO.rx)}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport {inject, observer} from \"mobx-react\";\r\nimport {Neighbor} from \"./Neighbor\";\r\n\r\ninterface Props {\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Neighbors extends React.Component {\r\n render() {\r\n let neighborsEle = [];\r\n this.props.nodeStore.neighbor_metrics.forEach((v, k) => {\r\n neighborsEle.push();\r\n });\r\n return (\r\n \r\n

Neighbors {neighborsEle.length > 0 && ({neighborsEle.length})}

\r\n

\r\n Currently connected neighbors.\r\n

\r\n {neighborsEle}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { KeyboardEvent } from 'react';\r\nimport Container from \"react-bootstrap/Container\";\r\nimport { inject, observer } from \"mobx-react\";\r\nimport { Link } from 'react-router-dom';\r\nimport VisualizerStore from \"../stores/VisualizerStore\";\r\nimport NodeStore from \"../stores/NodeStore\";\r\nimport Badge from \"react-bootstrap/Badge\";\r\nimport FormControl from \"react-bootstrap/FormControl\";\r\nimport InputGroup from \"react-bootstrap/InputGroup\";\r\nimport Row from \"react-bootstrap/Row\";\r\nimport Col from \"react-bootstrap/Col\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Popover from \"react-bootstrap/Popover\";\r\nimport OverlayTrigger from \"react-bootstrap/OverlayTrigger\";\r\n\r\ninterface Props {\r\n visualizerStore?: VisualizerStore;\r\n nodeStore?: NodeStore;\r\n}\r\n\r\n@inject(\"visualizerStore\")\r\n@inject(\"nodeStore\")\r\n@observer\r\nexport class Visualizer extends React.Component {\r\n\r\n componentDidMount(): void {\r\n this.props.visualizerStore.start();\r\n }\r\n\r\n componentWillUnmount(): void {\r\n this.props.visualizerStore.stop();\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n updateVerticesLimit = (e) => {\r\n this.props.visualizerStore.updateVerticesLimit(e.target.value);\r\n }\r\n\r\n pauseResumeVisualizer = (e) => {\r\n this.props.visualizerStore.pauseResume();\r\n }\r\n\r\n updateSearch = (e) => {\r\n this.props.visualizerStore.updateSearch(e.target.value);\r\n }\r\n\r\n searchAndHighlight = (e: KeyboardEvent) => {\r\n if (e.key !== 'Enter') return;\r\n this.props.visualizerStore.searchAndHighlight();\r\n }\r\n\r\n toggleBackgroundDataCollection = () => {\r\n if (this.props.nodeStore.collecting) {\r\n this.props.nodeStore.unregisterHandlers();\r\n return;\r\n }\r\n this.props.nodeStore.registerHandlers();\r\n }\r\n\r\n render() {\r\n let {\r\n vertices, finalized_count, selected,\r\n verticesLimit, tips_count, paused, search\r\n } = this.props.visualizerStore;\r\n let { last_mps_metric, collecting } = this.props.nodeStore;\r\n\r\n return (\r\n \r\n

Visualizer

\r\n \r\n \r\n \r\n \r\n Vertices Limit\r\n \r\n \r\n \r\n \r\n \r\n \r\n Search Vertex\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Ensures that only data needed for the visualizer is collected.\r\n \r\n }\r\n >\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n Pauses/resumes rendering the graph.\r\n \r\n }\r\n >\r\n \r\n \r\n \r\n \r\n \r\n

\r\n \r\n BLK Pending\r\n \r\n {' '}\r\n \r\n BLK Confirmed\r\n \r\n {' '}\r\n \r\n TX Pending\r\n \r\n {' '}\r\n \r\n TX Confirmed\r\n \r\n {' '}\r\n \r\n Tip\r\n \r\n {' '}\r\n \r\n Unknown\r\n \r\n
\r\n Vertices: {vertices.size}, Tips: {tips_count},\r\n Confirmed/UnConfirmed: {finalized_count}/{vertices.size - finalized_count},{' '}\r\n BPS: {last_mps_metric.mps}\r\n
\r\n Selected: {selected ?\r\n \r\n {selected.id.substr(0, 10)}\r\n \r\n : \"-\"}\r\n
\r\n {\r\n selected ? selected.strongParents &&\r\n Strong:{' '}\r\n {selected.strongParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.weakParents &&\r\n Weak:{' '}\r\n {selected.weakParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n
\r\n {\r\n selected ? selected.shallowLikedParents &&\r\n Shallow Liked:{' '}\r\n {selected.shallowLikedParents.map((parent) => {\r\n return (\r\n \r\n {parent.substr(0, 10) + \" \"}\r\n \r\n )\r\n\r\n })}\r\n \r\n : \"\"\r\n }\r\n

\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport {inject, observer} from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Table from \"react-bootstrap/Table\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class Tips extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTips();\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {tipsList} = this.props.explorerStore;\n return (\n \n

Tips

\n \n \n \n \n \n \n \n {tipsList}\n \n
BlockID
\n
\n );\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport {Transaction} from \"./Transaction\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransaction extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransaction(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, tx } = this.props.explorerStore;\n if (query_err) {\n return (\n \n

Transaction not available - 404

\n

\n Transaction with ID {txId} not found.\n

\n
\n );\n }\n return \n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string;\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionMetadata extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionMetadata(this.props.txId);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txId } = this.props;\n let { query_err, txMetadata } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Metadata

\n

Metadata for transaction ID {txId} not found.

\n
\n );\n }\n return (\n
\n

Metadata

\n {txMetadata && \n \n SpendIDs: \n \n { \n txMetadata.spendIDs && txMetadata.spendIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n \n Booked: {txMetadata.booked.toString()}\n {/* Booked time: {new Date(txMetadata.bookedTime * 1000).toLocaleString()} */}\n Confirmation State: {txMetadata.confirmationState}\n {/* Confirmation State Time: {new Date(txMetadata.confirmationStateTime * 1000).toLocaleString()} */}\n }\n
\n )\n }\n}\n","import * as React from 'react';\nimport Row from \"react-bootstrap/Row\";\nimport Col from \"react-bootstrap/Col\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n txId: string\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerTransactionAttachments extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getTransactionAttachments(this.props.txId);\n }\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let { txAttachments } = this.props.explorerStore;\n return (\n
\n

Attachments

\n {txAttachments && txAttachments.blockIDs && \n \n \n {txAttachments.blockIDs.map((blkId, i) => {\n return {blkId}\n })}\n \n \n }\n
\n )\n }\n}","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { ExplorerTransaction } from \"./ExplorerTransaction\"\nimport { ExplorerTransactionMetadata } from \"./ExplorerTransactionMetadata\"\nimport { ExplorerTransactionAttachments } from \"./ExplorerTransactionAttachments\"\n\n\ninterface Props {\n match?: {\n params: {\n id: string,\n }\n }\n}\n\nexport class ExplorerTransactionQueryResult extends React.Component {\n render() {\n let { id } = this.props.match.params;\n return (\n \n \n \n \n \n )\n }\n}","export enum ConfirmationState {\n Undefined = 0,\n Rejected,\n Pending,\n Accepted,\n Confirmed,\n}\n\nexport function resolveConfirmationState(sigType: number) {\n switch (sigType) {\n case ConfirmationState.Undefined:\n return \"Undefined\";\n case ConfirmationState.Rejected:\n return \"Rejected\";\n case ConfirmationState.Pending:\n return \"Pending\";\n case ConfirmationState.Accepted:\n return \"Accepted\";\n case ConfirmationState.Confirmed:\n return \"Confirmed\";\n default:\n return \"Undefined Confirmation State\";\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport NodeStore from \"../stores/NodeStore\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {displayManaUnit} from \"../utils\";\nimport {outputToComponent} from \"../utils/output\";\nimport {resolveConfirmationState} from \"../utils/confirmation_state\";\n\ninterface Props {\n nodeStore?: NodeStore;\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n id: string,\n }\n }\n}\n\n@inject(\"nodeStore\")\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerOutputQueryResult extends React.Component {\n componentDidMount() {\n this.props.explorerStore.getOutput(this.props.match.params.id);\n this.props.explorerStore.getPendingMana(this.props.match.params.id);\n this.props.explorerStore.getOutputMetadata(this.props.match.params.id);\n this.props.explorerStore.getOutputConsumers(this.props.match.params.id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n render() {\n let {id} = this.props.match.params;\n let { query_err, output, pendingMana, outputMetadata, outputConsumers } = this.props.explorerStore;\n\n let renderTriBool = (val: string) => {\n if (val === \"true\"){\n return True\n }\n if (val === \"false\"){\n return False\n }\n return Maybe\n }\n\n if (query_err) {\n return (\n \n

Output not found - 404

\n {id}\n
\n );\n }\n return (\n \n

Output

\n {output &&
\n {outputToComponent(output)}\n \n {pendingMana && \n Pending Mana\n
\n
Value: {displayManaUnit(pendingMana.mana)}
\n
Timestamp: {new Date(pendingMana.timestamp * 1000).toLocaleString()}
\n
}\n
\n
}\n\n

Metadata

\n {outputMetadata &&
\n \n Transaction ID: {outputMetadata.outputID.transactionID} \n SpendIDs: \n \n {\n outputMetadata.spendIDs.map((value, index) => {\n return (\n \n {value}\n \n )\n })\n }\n \n Consumer Count: {outputMetadata.consumerCount}\n Confirmed Consumer: {outputMetadata.confirmedConsumer} \n Confirmation State: {resolveConfirmationState(outputMetadata.confirmationState)}\n Confirmation State Time: {new Date(outputMetadata.confirmationStateTime * 1000).toLocaleString()}\n \n
}\n\n

Consumers

\n {outputConsumers &&
\n \n {outputConsumers.consumers.map((c,i) => \n
Transaction ID: {c.transactionID}
\n
Valid: {renderTriBool(c.valid)}
\n
)}\n
\n
}\n
\n )\n }\n}\n","import { SlotStore } from '../stores/SlotStore';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from '../stores/NodeStore';\nimport * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { Table } from 'react-bootstrap';\n\ninterface Props {\n history: any;\n nodeStore?: NodeStore;\n slotStore?: SlotStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"slotStore\")\n@observer\nexport class SlotLiveFeed extends React.Component {\n render() {\n let {slotLiveFeed} = this.props.slotStore;\n return (\n \n

Slots

\n \n \n \n \n \n \n \n \n {slotLiveFeed}\n \n
IndexCommitment ID
\n
\n );\n }\n}\n","import * as React from 'react';\nimport Container from \"react-bootstrap/Container\";\nimport { inject, observer } from \"mobx-react\";\nimport ExplorerStore from \"../stores/ExplorerStore\";\nimport ListGroup from \"react-bootstrap/ListGroup\";\nimport { Card, Col, Row, Table } from 'react-bootstrap';\n\n\ninterface Props {\n explorerStore?: ExplorerStore;\n match?: {\n params: {\n commitment: string,\n }\n }\n}\n\n@inject(\"explorerStore\")\n@observer\nexport class ExplorerSlotQueryResult extends React.Component {\n componentDidMount() {\n const id = this.props.match.params.commitment;\n this.props.explorerStore.getSlotDetails(id);\n }\n\n componentWillUnmount() {\n this.props.explorerStore.reset();\n }\n\n render() {\n let {commitment} = this.props.match.params;\n let { query_err, slotInfo } = this.props.explorerStore;\n\n if (query_err) {\n return (\n \n

Slot not found - 404

\n {commitment}\n
\n );\n }\n return (\n \n

Slot

\n {slotInfo && \n ID: {commitment}\n Index: {slotInfo.index}\n RootsID: {slotInfo.rootsID}\n PrevEC: {slotInfo.prevID}\n Cumulative Weight: {slotInfo.cumulativeWeight}\n Blocks:\n {slotInfo.blocks && \n \n \n \n \n \n {slotInfo.blocks.map((b,i) => {b})}\n \n
\n \n
\n
\n
}\n
\n Transactions:\n {slotInfo.transactions && \n \n \n \n \n \n {slotInfo.transactions.map((t,i) => {t})}\n \n
\n \n
\n
\n
}\n
\n Created outputs:\n {slotInfo.createdOutputs && \n \n \n \n \n \n {slotInfo.createdOutputs.map((c,i) => {c})}\n \n
\n \n
\n
\n
}\n
\n Spent outputs:\n {slotInfo.spentOutputs && \n \n \n \n \n \n {slotInfo.spentOutputs.map((s,i) => {s})}\n \n
\n \n
\n
\n
}\n
\n
}\n
\n )\n }\n}\n","import * as React from 'react';\nimport {inject, observer} from \"mobx-react\";\nimport NodeStore from \"../stores/NodeStore\";\nimport Navbar from \"react-bootstrap/Navbar\";\nimport Nav from \"react-bootstrap/Nav\";\nimport {Dashboard} from \"./Dashboard\";\nimport Badge from \"react-bootstrap/Badge\";\nimport {RouterStore} from 'mobx-react-router';\nimport {Explorer} from \"./Explorer\";\nimport {NavExplorerSearchbar} from \"./NavExplorerSearchbar\";\nimport {Redirect, Route, Switch} from 'react-router-dom';\nimport {LinkContainer} from 'react-router-bootstrap';\nimport {ExplorerBlockQueryResult} from \"./ExplorerBlockQueryResult\";\nimport {ExplorerAddressQueryResult} from \"./ExplorerAddressResult\";\nimport {Explorer404} from \"./Explorer404\";\nimport {Neighbors} from \"./Neighbors\";\nimport {Visualizer} from \"./Visualizer\";\nimport {Tips} from \"./Tips\";\nimport {ExplorerTransactionQueryResult} from \"./ExplorerTransactionQueryResult\";\nimport {ExplorerOutputQueryResult} from \"./ExplorerOutputQueryResult\";\nimport { SlotLiveFeed } from './SlotLiveFeed';\nimport { ExplorerSlotQueryResult } from './ExplorerSlotQueryResult';\n\ninterface Props {\n history: any;\n routerStore?: RouterStore;\n nodeStore?: NodeStore;\n}\n\n@inject(\"nodeStore\")\n@inject(\"routerStore\")\n@observer\nexport class Root extends React.Component {\n renderDevTool() {\n if (process.env.NODE_ENV !== 'production') {\n const DevTools = require('mobx-react-devtools').default;\n return ;\n }\n }\n\n componentDidMount(): void {\n this.props.nodeStore.connect();\n }\n\n render() {\n return (\n
\n \n iota-core\n \n \n \n \n {!this.props.nodeStore.websocketConnected &&\n WS not connected!\n }\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.children}\n {this.renderDevTool()}\n
\n );\n }\n}\n","import * as React from 'react';\nimport {hot} from 'react-hot-loader/root';\nimport {Root} from './components/Root';\n\n// render react DOM\nexport const App = hot(({history}) => );\n","import {action, computed, observable, ObservableMap} from 'mobx';\r\nimport * as dateformat from 'dateformat';\r\nimport {connectWebSocket, registerHandler, unregisterHandler, WSMsgType} from \"../misc/WS\";\r\n\r\nclass BPSMetric {\r\n mps: number;\r\n ts: string;\r\n}\r\n\r\nclass Status {\r\n id: string;\r\n version: string;\r\n uptime: number;\r\n mem: MemoryMetrics = new MemoryMetrics();\r\n tangleTime: TangleTime;\r\n scheduler: SchedulerMetric = new SchedulerMetric();\r\n}\r\n\r\nclass TangleTime {\r\n synced: boolean;\r\n bootstrapped: boolean;\r\n ATT: number;\r\n RATT: number;\r\n CTT: number;\r\n RCTT: number;\r\n acceptedBlockID: string;\r\n confirmedBlockID: string;\r\n confirmedSlot: number;\r\n committedSlot: number;\r\n}\r\n\r\nclass MemoryMetrics {\r\n heap_sys: number;\r\n heap_alloc: number;\r\n heap_idle: number;\r\n heap_released: number;\r\n heap_objects: number;\r\n last_pause_gc: number;\r\n num_gc: number;\r\n ts: string;\r\n}\r\n\r\nclass TipsMetric {\r\n totaltips: number;\r\n ts: string;\r\n}\r\n\r\nclass NetworkIO {\r\n tx: number;\r\n rx: number;\r\n ts: string;\r\n}\r\n\r\nclass RateSetterMetric {\r\n size: number;\r\n estimate: string;\r\n rate: number;\r\n ts: string;\r\n}\r\n\r\nclass SchedulerMetric {\r\n running: number;\r\n rate: string;\r\n maxBufferSize: number;\r\n currentBufferSize: number;\r\n deficit: number;\r\n ts: string;\r\n\r\n}\r\n\r\nclass NeighborMetrics {\r\n @observable collected: Array = [];\r\n @observable network_io: Array = [];\r\n\r\n addMetric(metric: NeighborMetric) {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.collected.push(metric);\r\n if (this.collected.length > maxMetricsDataPoints) {\r\n this.collected.shift();\r\n }\r\n let netIO = this.currentNetIO;\r\n if (netIO) {\r\n if (this.network_io.length > maxMetricsDataPoints) {\r\n this.network_io.shift();\r\n }\r\n this.network_io.push(netIO);\r\n }\r\n }\r\n\r\n get current() {\r\n return this.collected[this.collected.length - 1];\r\n }\r\n\r\n get secondLast() {\r\n let index = this.collected.length - 2;\r\n if (index < 0) {\r\n return\r\n }\r\n return this.collected[index];\r\n }\r\n\r\n get currentNetIO(): NetworkIO {\r\n if (this.current && this.secondLast) {\r\n return {\r\n tx: this.current.packets_written - this.secondLast.packets_written,\r\n rx: this.current.packets_read - this.secondLast.packets_read,\r\n ts: dateformat(new Date(), \"HH:MM:ss\"),\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n @computed\r\n get netIOSeries() {\r\n let tx = Object.assign({}, chartSeriesOpts,\r\n series(\"Tx\", 'rgba(53, 180, 219,1)', 'rgba(53, 180, 219,0.4)')\r\n );\r\n let rx = Object.assign({}, chartSeriesOpts,\r\n series(\"Rx\", 'rgba(235, 134, 52)', 'rgba(235, 134, 52,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.network_io.length; i++) {\r\n let metric: NetworkIO = this.network_io[i];\r\n labels.push(metric.ts);\r\n tx.data.push(metric.tx);\r\n rx.data.push(-metric.rx);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [tx, rx],\r\n };\r\n }\r\n}\r\n\r\nclass NeighborMetric {\r\n id: string;\r\n address: string;\r\n connection_origin: number;\r\n packets_read: number;\r\n packets_written: number;\r\n ts: number;\r\n}\r\n\r\nclass ComponentCounterMetric {\r\n store: number;\r\n solidifier: number;\r\n scheduler: number;\r\n booker: number;\r\n ts: number;\r\n}\r\n\r\nconst chartSeriesOpts = {\r\n label: \"Incoming\", data: [],\r\n fill: true,\r\n lineTension: 0,\r\n backgroundColor: 'rgba(58, 60, 171,0.4)',\r\n borderWidth: 1,\r\n borderColor: 'rgba(58, 60, 171,1)',\r\n borderCapStyle: 'butt',\r\n borderDash: [],\r\n borderDashOffset: 0.0,\r\n borderJoinStyle: 'miter',\r\n pointBorderColor: 'rgba(58, 60, 171,1)',\r\n pointBackgroundColor: '#fff',\r\n pointBorderWidth: 1,\r\n pointHoverBackgroundColor: 'rgba(58, 60, 171,1)',\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n pointHoverBorderWidth: 2,\r\n pointRadius: 0,\r\n pointHitRadius: 20,\r\n pointHoverRadius: 5,\r\n};\r\n\r\nfunction series(name: string, color: string, bgColor: string) {\r\n return {\r\n label: name, data: [],\r\n backgroundColor: bgColor,\r\n borderColor: color,\r\n pointBorderColor: color,\r\n pointHoverBackgroundColor: color,\r\n pointHoverBorderColor: 'rgba(220,220,220,1)',\r\n }\r\n}\r\n\r\nconst statusWebSocketPath = \"/ws\";\r\n\r\nconst maxMetricsDataPoints = 900;\r\n\r\nexport class NodeStore {\r\n @observable status: Status = new Status();\r\n @observable websocketConnected: boolean = false;\r\n @observable last_mps_metric: BPSMetric = new BPSMetric();\r\n @observable collected_mps_metrics: Array = [];\r\n @observable collected_rate_setter_metrics: Array = [];\r\n @observable last_rate_setter_metric: RateSetterMetric = new RateSetterMetric();\r\n @observable collected_scheduler_metrics: Array = [];\r\n @observable collected_mem_metrics: Array = [];\r\n @observable neighbor_metrics = new ObservableMap();\r\n @observable last_tips_metric: TipsMetric = new TipsMetric();\r\n @observable collected_tips_metrics: Array = [];\r\n @observable last_component_counter_metric: ComponentCounterMetric = new ComponentCounterMetric();\r\n @observable collected_component_counter_metrics: Array = [];\r\n @observable collecting: boolean = true;\r\n\r\n constructor() {\r\n this.status.tangleTime = new TangleTime;\r\n this.status.tangleTime.ATT = 0;\r\n this.status.tangleTime.RATT = 0;\r\n this.status.tangleTime.CTT = 0;\r\n this.status.tangleTime.RCTT = 0;\r\n this.registerHandlers();\r\n }\r\n\r\n registerHandlers = () => {\r\n registerHandler(WSMsgType.Status, this.updateStatus);\r\n registerHandler(WSMsgType.BPSMetrics, (mps: number) => {\r\n this.addBPSMetric(this.updateLastBPSMetric(mps));\r\n });\r\n registerHandler(WSMsgType.NeighborStats, this.updateNeighborMetrics);\r\n registerHandler(WSMsgType.TipsMetrics, this.updateLastTipsMetric);\r\n registerHandler(WSMsgType.ComponentCounterMetrics, this.updateLastComponentMetric);\r\n registerHandler(WSMsgType.RateSetter, this.updateLastRateSetterMetric)\r\n\r\n this.updateCollecting(true);\r\n }\r\n\r\n unregisterHandlers = () => {\r\n unregisterHandler(WSMsgType.Status);\r\n unregisterHandler(WSMsgType.BPSMetrics);\r\n unregisterHandler(WSMsgType.NeighborStats);\r\n unregisterHandler(WSMsgType.TipsMetrics);\r\n unregisterHandler(WSMsgType.ComponentCounterMetrics);\r\n unregisterHandler(WSMsgType.RateSetter);\r\n this.updateCollecting(false);\r\n }\r\n\r\n @action\r\n updateCollecting = (collecting: boolean) => {\r\n this.collecting = collecting;\r\n }\r\n\r\n @action\r\n reset() {\r\n this.collected_mps_metrics = [];\r\n this.collected_mem_metrics = [];\r\n this.collected_scheduler_metrics = [];\r\n this.neighbor_metrics = new ObservableMap();\r\n this.collected_tips_metrics = [];\r\n this.collected_component_counter_metrics = [];\r\n }\r\n\r\n reconnect() {\r\n this.updateWebSocketConnected(false);\r\n setTimeout(() => {\r\n this.connect();\r\n }, 5000);\r\n }\r\n\r\n connect() {\r\n connectWebSocket(statusWebSocketPath,\r\n () => this.updateWebSocketConnected(true),\r\n () => this.reconnect(),\r\n () => this.updateWebSocketConnected(false))\r\n }\r\n\r\n @action\r\n updateWebSocketConnected = (connected: boolean) => this.websocketConnected = connected;\r\n\r\n @action\r\n updateStatus = (status: Status) => {\r\n status.mem.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_mem_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mem_metrics.shift();\r\n }\r\n this.collected_mem_metrics.push(status.mem);\r\n this.status = status;\r\n\r\n status.scheduler.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n if (this.collected_scheduler_metrics.length > maxMetricsDataPoints) {\r\n this.collected_scheduler_metrics.shift();\r\n }\r\n this.collected_scheduler_metrics.push(status.scheduler);\r\n };\r\n\r\n\r\n @action\r\n updateNeighborMetrics = (neighborMetrics: Array) => {\r\n if (!neighborMetrics) {\r\n return;\r\n }\r\n let updated = [];\r\n for (let i = 0; i < neighborMetrics.length; i++) {\r\n let metric = neighborMetrics[i];\r\n let neighbMetrics: NeighborMetrics = this.neighbor_metrics.get(metric.id);\r\n if (!neighbMetrics) {\r\n neighbMetrics = new NeighborMetrics();\r\n }\r\n neighbMetrics.addMetric(metric);\r\n this.neighbor_metrics.set(metric.id, neighbMetrics);\r\n updated.push(metric.id);\r\n }\r\n // remove duplicates\r\n for (const k of this.neighbor_metrics.keys()) {\r\n if (!updated.includes(k)) {\r\n this.neighbor_metrics.delete(k);\r\n }\r\n }\r\n };\r\n\r\n @action\r\n updateLastRateSetterMetric = (metric: RateSetterMetric) => {\r\n metric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_rate_setter_metric = metric;\r\n if (this.collected_rate_setter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_rate_setter_metrics.shift();\r\n }\r\n this.collected_rate_setter_metrics.push(metric);\r\n };\r\n\r\n @action\r\n updateLastBPSMetric = (mps: number) => {\r\n let mpsMetric = new BPSMetric();\r\n mpsMetric.mps = mps;\r\n mpsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_mps_metric = mpsMetric;\r\n return mpsMetric;\r\n };\r\n\r\n @action\r\n addBPSMetric = (metric: BPSMetric) => {\r\n if (this.collected_mps_metrics.length > maxMetricsDataPoints) {\r\n this.collected_mps_metrics.shift();\r\n }\r\n this.collected_mps_metrics.push(metric);\r\n }\r\n\r\n @action\r\n updateLastTipsMetric = (tipsMetric: TipsMetric) => {\r\n tipsMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_tips_metric = tipsMetric;\r\n if (this.collected_tips_metrics.length > maxMetricsDataPoints) {\r\n this.collected_tips_metrics.shift();\r\n }\r\n this.collected_tips_metrics.push(tipsMetric);\r\n };\r\n\r\n @action\r\n updateLastComponentMetric = (componentCounterMetric: ComponentCounterMetric) => {\r\n componentCounterMetric.ts = dateformat(Date.now(), \"HH:MM:ss\");\r\n this.last_component_counter_metric = componentCounterMetric;\r\n if (this.collected_component_counter_metrics.length > maxMetricsDataPoints) {\r\n this.collected_component_counter_metrics.shift()\r\n }\r\n this.collected_component_counter_metrics.push(componentCounterMetric);\r\n };\r\n\r\n @computed\r\n get mpsSeries() {\r\n let mps = Object.assign({}, chartSeriesOpts,\r\n series(\"BPS\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mps_metrics.length; i++) {\r\n let metric: BPSMetric = this.collected_mps_metrics[i];\r\n labels.push(metric.ts);\r\n mps.data.push(metric.mps);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [mps],\r\n };\r\n }\r\n\r\n @computed\r\n get tipsSeries() {\r\n let totaltips = Object.assign({}, chartSeriesOpts,\r\n series(\"All tips\", 'rgba(67, 196, 99,1)', 'rgba(67, 196, 99,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_tips_metrics.length; i++) {\r\n let metric: TipsMetric = this.collected_tips_metrics[i];\r\n labels.push(metric.ts);\r\n totaltips.data.push(metric.totaltips);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [totaltips],\r\n };\r\n }\r\n\r\n @computed\r\n get componentSeries() {\r\n let stored = Object.assign({}, chartSeriesOpts,\r\n series(\"stored\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n let solidified = Object.assign({}, chartSeriesOpts,\r\n series(\"solidified\", 'rgba(165,209,253,1)', 'rgba(165,209,253,0.4)')\r\n );\r\n let scheduled = Object.assign({}, chartSeriesOpts,\r\n series(\"scheduled\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n let booked = Object.assign({}, chartSeriesOpts,\r\n series(\"booked\", 'rgba(5, 68, 94,1)', 'rgba(5, 68, 94,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_component_counter_metrics.length; i++) {\r\n let metric: ComponentCounterMetric = this.collected_component_counter_metrics[i];\r\n labels.push(metric.ts);\r\n stored.data.push(metric.store);\r\n solidified.data.push(metric.solidifier);\r\n scheduled.data.push(metric.scheduler);\r\n booked.data.push(metric.booker);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [stored, solidified, scheduled, booked],\r\n };\r\n }\r\n\r\n @computed\r\n get bufferSizeSeries() {\r\n let bufferSize = Object.assign({}, chartSeriesOpts,\r\n series(\"buffer size\", 'rgba(209,165,253,1)', 'rgba(209,165,253,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n bufferSize.data.push(metric.currentBufferSize);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [bufferSize],\r\n };\r\n }\r\n\r\n @computed\r\n get deficitSeries() {\r\n let deficit = Object.assign({}, chartSeriesOpts,\r\n series(\"deficit\", 'rgba(182, 141, 64,1)', 'rgba(182, 141, 64,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_scheduler_metrics.length; i++) {\r\n let metric: SchedulerMetric = this.collected_scheduler_metrics[i];\r\n labels.push(metric.ts);\r\n deficit.data.push(metric.deficit);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [deficit],\r\n };\r\n }\r\n\r\n @computed\r\n get neighborsSeries() {\r\n return {};\r\n }\r\n\r\n @computed\r\n get uptime() {\r\n let day, hour, minute, seconds;\r\n seconds = Math.floor(this.status.uptime / 1000);\r\n minute = Math.floor(seconds / 60);\r\n seconds = seconds % 60;\r\n hour = Math.floor(minute / 60);\r\n minute = minute % 60;\r\n day = Math.floor(hour / 24);\r\n hour = hour % 24;\r\n let str = \"\";\r\n if (day == 1) {\r\n str += day + \" Day, \";\r\n }\r\n if (day > 1) {\r\n str += day + \" Days, \";\r\n }\r\n if (hour >= 0) {\r\n if (hour < 10) {\r\n str += \"0\" + hour + \":\";\r\n } else {\r\n str += hour + \":\";\r\n }\r\n }\r\n if (minute >= 0) {\r\n if (minute < 10) {\r\n str += \"0\" + minute + \":\";\r\n } else {\r\n str += minute + \":\";\r\n }\r\n }\r\n if (seconds >= 0) {\r\n if (seconds < 10) {\r\n str += \"0\" + seconds;\r\n } else {\r\n str += seconds;\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n @computed\r\n get memSeries() {\r\n let heapSys = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Sys\", 'rgba(168, 50, 76,1)', 'rgba(168, 50, 76,0.4)')\r\n );\r\n let heapAlloc = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Alloc\", 'rgba(222, 49, 87,1)', 'rgba(222, 49, 87,0.4)')\r\n );\r\n let heapIdle = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Idle\", 'rgba(222, 49, 182,1)', 'rgba(222, 49, 182,0.4)')\r\n );\r\n let heapReleased = Object.assign({}, chartSeriesOpts,\r\n series(\"Heap Released\", 'rgba(250, 76, 252,1)', 'rgba(250, 76, 252,0.4)')\r\n );\r\n\r\n let labels = [];\r\n for (let i = 0; i < this.collected_mem_metrics.length; i++) {\r\n let metric = this.collected_mem_metrics[i];\r\n labels.push(metric.ts);\r\n heapSys.data.push(metric.heap_sys);\r\n heapAlloc.data.push(metric.heap_alloc);\r\n heapIdle.data.push(metric.heap_idle);\r\n heapReleased.data.push(metric.heap_released);\r\n }\r\n\r\n return {\r\n labels: labels,\r\n datasets: [heapSys, heapAlloc, heapIdle, heapReleased],\r\n };\r\n }\r\n}\r\n\r\nexport default NodeStore;\r\n","import {action, observable} from 'mobx';\r\nimport {RouterStore} from \"mobx-react-router\";\r\n\r\nclass SendResult {\r\n BlkId: string;\r\n}\r\n\r\nenum QueryError {\r\n NotFound\r\n}\r\n\r\nexport class FaucetStore {\r\n // send request to faucet\r\n @observable send_addr: string = \"\";\r\n @observable send_access_mana_node_id: string = \"\";\r\n @observable send_consensus_mana_node_id: string = \"\";\r\n @observable sending: boolean = false;\r\n @observable sendResult: SendResult = null;\r\n @observable query_error: string = \"\";\r\n\r\n routerStore: RouterStore;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n }\r\n\r\n sendReq = async () => {\r\n this.updateSending(true);\r\n try {\r\n // send request\r\n let res = await fetch(`/api/faucet/${this.send_addr}?accessMana=${this.send_access_mana_node_id}&consensusMana=${this.send_consensus_mana_node_id}`);\r\n if (res.status !== 200) {\r\n this.updateQueryError(QueryError.NotFound);\r\n return;\r\n }\r\n let result: SendResult = await res.json();\r\n setTimeout(() => {\r\n this.updateSendResult(result);\r\n }, 2000);\r\n } catch (err) {\r\n this.updateQueryError(err);\r\n }\r\n };\r\n\r\n @action\r\n updateSendResult = (result: SendResult) => {\r\n this.sending = false;\r\n this.sendResult = result;\r\n this.routerStore.history.push(`/explorer/address/${this.send_addr}`);\r\n };\r\n\r\n @action\r\n updateSend = (send_addr: string) => {\r\n this.send_addr = send_addr;\r\n };\r\n\r\n @action\r\n updateSendAccessManaNodeID = (access_mana: string) => {\r\n this.send_access_mana_node_id = access_mana;\r\n }\r\n\r\n @action\r\n updateSendConsensusManaNodeID = (consensus_mana: string) => {\r\n this.send_consensus_mana_node_id = consensus_mana;\r\n }\r\n\r\n @action\r\n updateSending = (sending: boolean) => {\r\n this.sending = sending;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n reset = () => {\r\n this.send_addr = null;\r\n this.send_access_mana_node_id = \"\";\r\n this.send_consensus_mana_node_id = \"\";\r\n this.sending = false;\r\n this.query_error = \"\";\r\n };\r\n\r\n @action\r\n updateQueryError = (err: any) => {\r\n this.sending = false;\r\n this.query_error = err;\r\n };\r\n}\r\n\r\nexport default FaucetStore;\r\n","import { action, observable, ObservableMap } from 'mobx';\r\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\r\nimport { RouterStore } from \"mobx-react-router\";\r\nimport { default as Viva } from 'vivagraphjs';\r\nimport { Block } from './ExplorerStore';\r\n\r\nexport class Vertex {\r\n id: string;\r\n strongParents: Array;\r\n weakParents: Array;\r\n shallowLikedParents: Array;\r\n is_tip: boolean;\r\n is_blk_confirmed: boolean;\r\n is_tx_accepted: boolean;\r\n is_tx: boolean;\r\n}\r\n\r\nexport class TipInfo {\r\n id: string;\r\n is_tip: boolean;\r\n}\r\n\r\nclass history {\r\n vertices: Array;\r\n}\r\n\r\nconst COLOR = {\r\n BlockPending: \"#b9b7bd\",\r\n BlockConfirmed: \"#6c71c4\",\r\n TransactionPending: \"#393e46\",\r\n TransactionConfirmed: \"#fad02c\",\r\n Tip: \"#cb4b16\",\r\n Unknown: \"#b58900\",\r\n Line: \"#586e75\",\r\n SelectedPastConeLine: \"#e105f5\",\r\n SelectedFutureConeLine: \"#51e05d\",\r\n Selected: \"#859900\"\r\n}\r\n\r\nconst vertexSize = 20;\r\n\r\nexport class VisualizerStore {\r\n @observable vertices = new ObservableMap();\r\n @observable verticesLimit = 1500;\r\n @observable finalized_count = 0;\r\n @observable tips_count = 0;\r\n verticesIncomingOrder = [];\r\n draw: boolean = false;\r\n routerStore: RouterStore;\r\n\r\n // the currently selected vertex via hover\r\n @observable selected: Vertex;\r\n selected_via_click: boolean = false;\r\n selected_origin_color: number = 0;\r\n\r\n // search\r\n @observable search: string = \"\";\r\n\r\n // viva graph objs\r\n graph;\r\n graphics;\r\n renderer;\r\n @observable paused: boolean = false;\r\n\r\n constructor(routerStore: RouterStore) {\r\n this.routerStore = routerStore;\r\n registerHandler(WSMsgType.Vertex, this.addVertex);\r\n registerHandler(WSMsgType.TipInfo, this.addTipInfo);\r\n registerHandler(WSMsgType.TXAccepted, this.updateTxStatus);\r\n // this.fetchHistory();\r\n }\r\n\r\n fetchHistory = async () => {\r\n try {\r\n let res = await fetch(`/api/visualizer/history`);\r\n let history: history = await res.json();\r\n history.vertices.forEach(v => {\r\n this.addVertex(v);\r\n });\r\n } catch (err) {\r\n console.log(\"Fail to fetch history in visualizer\", err);\r\n }\r\n return\r\n }\r\n\r\n @action\r\n updateSearch = (search: string) => {\r\n this.search = search.trim();\r\n }\r\n\r\n @action\r\n searchAndHighlight = () => {\r\n this.clearSelected();\r\n if (!this.search) return;\r\n let iter: IterableIterator = this.vertices.keys();\r\n let found = null;\r\n for (const key of iter) {\r\n if (key.indexOf(this.search) >= 0) {\r\n found = key;\r\n break;\r\n }\r\n }\r\n if (!found) return;\r\n this.updateSelected(this.vertices.get(found), false);\r\n }\r\n\r\n @action\r\n pauseResume = () => {\r\n if (this.paused) {\r\n this.renderer.resume();\r\n this.paused = false;\r\n return;\r\n }\r\n this.renderer.pause();\r\n this.paused = true;\r\n }\r\n\r\n @action\r\n updateVerticesLimit = (num: number) => {\r\n this.verticesLimit = num;\r\n }\r\n\r\n @action\r\n updateTxStatus = (vert: Vertex) => { \r\n let existing = this.vertices.get(vert.id);\r\n if (!existing) {\r\n return\r\n }\r\n\r\n existing.is_tx_accepted = vert.is_tx_accepted;\r\n this.vertices.set(vert.id, existing);\r\n\r\n if (this.draw) {\r\n this.drawVertex(existing);\r\n }\r\n }\r\n\r\n @action\r\n addVertex = (vert: Vertex) => {\r\n let existing = this.vertices.get(vert.id);\r\n if (existing) {\r\n if (!existing.is_blk_confirmed && vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n } else {\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count++;\r\n }\r\n this.verticesIncomingOrder.push(vert.id);\r\n this.checkLimit();\r\n }\r\n\r\n this.vertices.set(vert.id, vert);\r\n\r\n if (this.draw) {\r\n this.drawVertex(vert);\r\n }\r\n };\r\n\r\n @action\r\n addTipInfo = async (tipInfo: TipInfo) => {\r\n let v = this.vertices.get(tipInfo.id);\r\n if (!v) {\r\n v = new Vertex();\r\n v.id = tipInfo.id;\r\n\r\n // first seen as tip, get parents info\r\n let res = await fetch(`/api/block/${tipInfo.id}`);\r\n if (res.status === 200) {\r\n let blk: Block = await res.json();\r\n v.strongParents = blk.strongParents;\r\n v.weakParents = blk.weakParents;\r\n v.shallowLikedParents = blk.shallowLikedParents;\r\n v.is_blk_confirmed = blk.acceptance;\r\n }\r\n this.verticesIncomingOrder.push(v.id);\r\n }\r\n\r\n this.tips_count += tipInfo.is_tip ? 1 : v.is_tip ? -1 : 0;\r\n v.is_tip = tipInfo.is_tip;\r\n this.vertices.set(tipInfo.id, v);\r\n\r\n if (this.draw) {\r\n this.drawVertex(v);\r\n }\r\n };\r\n\r\n @action\r\n checkLimit = () => {\r\n while (this.verticesIncomingOrder.length > this.verticesLimit) {\r\n let deleteId = this.verticesIncomingOrder.shift();\r\n let vert = this.vertices.get(deleteId);\r\n // make sure we remove any markings if the vertex gets deleted\r\n if (this.selected && deleteId === this.selected.id) {\r\n this.clearSelected();\r\n }\r\n if (this.draw) {\r\n this.graph.removeNode(deleteId);\r\n }\r\n if (!vert) {\r\n continue;\r\n }\r\n if (vert.is_blk_confirmed) {\r\n this.finalized_count--;\r\n }\r\n if (vert.is_tip) {\r\n this.tips_count--;\r\n }\r\n this.vertices.delete(deleteId);\r\n }\r\n }\r\n\r\n drawVertex = (vert: Vertex) => {\r\n let node = this.graph.getNode(vert.id);\r\n if (node) {\r\n // update coloring\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n nodeUI.color = parseColor(this.colorForVertexState(vert));\r\n } else {\r\n node = this.graph.addNode(vert.id, vert);\r\n }\r\n\r\n if (vert.strongParents) {\r\n this.linkParents(vert, node, vert.strongParents)\r\n }\r\n\r\n if (vert.weakParents) {\r\n this.linkParents(vert, node, vert.weakParents)\r\n }\r\n\r\n if (vert.shallowLikedParents) {\r\n this.linkParents(vert, node, vert.shallowLikedParents)\r\n }\r\n }\r\n\r\n linkParents = (vert: Vertex, node: any, parents: Array) => {\r\n parents.forEach((value) => {\r\n // if value is valid AND (links is empty OR there is no between parent and children)\r\n if (value && ((!node.links || !node.links.some(link => link.fromId === value)))) {\r\n // draw the link only when the parent exists\r\n let parent = this.graph.getNode(value);\r\n if (parent) {\r\n this.graph.addLink(value, vert.id);\r\n } else {\r\n console.log(\"link not added, parent doesn't exist\", value);\r\n }\r\n }\r\n })\r\n }\r\n\r\n colorForVertexState = (vert: Vertex) => {\r\n if (!vert) {\r\n return COLOR.Unknown;\r\n }\r\n\r\n // finalized\r\n if (vert.is_blk_confirmed) {\r\n if (vert.is_tx) {\r\n if (vert.is_tx_accepted) {\r\n return COLOR.TransactionConfirmed;\r\n } else {\r\n return COLOR.TransactionPending;\r\n } \r\n }\r\n return COLOR.BlockConfirmed;\r\n }\r\n\r\n if (vert.is_tip) {\r\n return COLOR.Tip;\r\n }\r\n\r\n // pending\r\n if (vert.is_tx) {\r\n return COLOR.TransactionPending\r\n }\r\n return COLOR.BlockPending;\r\n }\r\n\r\n start = () => {\r\n this.draw = true;\r\n this.graph = Viva.Graph.graph();\r\n\r\n let graphics: any = Viva.Graph.View.webglGraphics();\r\n\r\n const layout = Viva.Graph.Layout.forceDirected(this.graph, {\r\n springLength: 10,\r\n springCoeff: 0.0001,\r\n stableThreshold: 0.15,\r\n gravity: -2,\r\n dragCoeff: 0.02,\r\n timeStep: 20,\r\n theta: 0.8,\r\n });\r\n\r\n graphics.node((node) => {\r\n if (!node.data) {\r\n return Viva.Graph.View.webglSquare(10, this.colorForVertexState(node.data));\r\n }\r\n return Viva.Graph.View.webglSquare(vertexSize, this.colorForVertexState(node.data));\r\n })\r\n graphics.link(() => Viva.Graph.View.webglLine(COLOR.Line));\r\n let ele = document.getElementById('visualizer');\r\n this.renderer = Viva.Graph.View.renderer(this.graph, {\r\n container: ele, graphics, layout,\r\n });\r\n\r\n let events = Viva.Graph.webglInputEvents(graphics, this.graph);\r\n\r\n events.mouseEnter((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data);\r\n }).mouseLeave((node) => {\r\n this.clearSelected(false);\r\n });\r\n\r\n events.click((node) => {\r\n this.clearSelected(true);\r\n this.updateSelected(node.data, true);\r\n });\r\n\r\n this.graphics = graphics;\r\n this.renderer.run();\r\n\r\n // draw vertices by order\r\n this.verticesIncomingOrder.forEach((id) => {\r\n let v = this.vertices.get(id);\r\n if (v) {\r\n this.drawVertex(v);\r\n }\r\n })\r\n }\r\n\r\n stop = () => {\r\n this.draw = false;\r\n this.renderer.dispose();\r\n this.graph = null;\r\n this.paused = false;\r\n this.selected = null;\r\n }\r\n\r\n @action\r\n updateSelected = (vert: Vertex, viaClick?: boolean) => {\r\n if (!vert) return;\r\n\r\n this.selected = vert;\r\n this.selected_via_click = !!viaClick;\r\n\r\n // mutate links\r\n let nodeUI = this.graphics.getNodeUI(vert.id);\r\n this.selected_origin_color = nodeUI.color\r\n nodeUI.color = parseColor(COLOR.Selected);\r\n nodeUI.size = vertexSize * 1.5;\r\n\r\n let node = this.graph.getNode(vert.id);\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedFutureConeLine);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.SelectedPastConeLine);\r\n },\r\n seenForward\r\n );\r\n }\r\n\r\n resetLinks = () => {\r\n this.graph.forEachLink(function (link) {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n });\r\n }\r\n\r\n @action\r\n clearSelected = (force_clear?: boolean) => {\r\n if (!this.selected || (this.selected_via_click && !force_clear)) {\r\n return;\r\n }\r\n\r\n // clear link highlight\r\n let node = this.graph.getNode(this.selected.id);\r\n if (!node) {\r\n // clear links\r\n this.resetLinks();\r\n return;\r\n }\r\n\r\n let nodeUI = this.graphics.getNodeUI(this.selected.id);\r\n nodeUI.color = this.selected_origin_color;\r\n nodeUI.size = vertexSize;\r\n\r\n const seenForward = [];\r\n const seenBackwards = [];\r\n dfsIterator(this.graph, node, node => {\r\n }, true,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenBackwards\r\n );\r\n dfsIterator(this.graph, node, node => {\r\n }, false,\r\n link => {\r\n const linkUI = this.graphics.getLinkUI(link.id);\r\n linkUI.color = parseColor(COLOR.Line);\r\n },\r\n seenForward\r\n );\r\n\r\n this.selected = null;\r\n this.selected_via_click = false;\r\n }\r\n\r\n}\r\n\r\nexport default VisualizerStore;\r\n\r\n// copied over and refactored from https://github.com/glumb/IOTAtangle\r\nfunction dfsIterator(graph, node, cb, up, cbLinks: any = false, seenNodes = []) {\r\n seenNodes.push(node);\r\n let pointer = 0;\r\n\r\n while (seenNodes.length > pointer) {\r\n const node = seenNodes[pointer++];\r\n\r\n if (cb(node)) return true;\r\n\r\n if (!node.links) {\r\n return\r\n }\r\n\r\n for (const link of node.links) {\r\n // parents\r\n if (!up && link.toId === node.id && !seenNodes.includes(graph.getNode(link.fromId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.fromId));\r\n continue;\r\n }\r\n\r\n // children\r\n if (up && link.fromId === node.id && !seenNodes.includes(graph.getNode(link.toId))) {\r\n if (cbLinks) cbLinks(link);\r\n seenNodes.push(graph.getNode(link.toId));\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction parseColor(color): any {\r\n let parsedColor = 0x009ee8ff;\r\n\r\n if (typeof color === 'number') {\r\n return color;\r\n }\r\n\r\n if (typeof color === 'string' && color) {\r\n if (color.length === 4) {\r\n // #rgb, duplicate each letter except first #.\r\n color = color.replace(/([^#])/g, '$1$1');\r\n }\r\n if (color.length === 9) {\r\n // #rrggbbaa\r\n parsedColor = parseInt(color.substr(1), 16);\r\n } else if (color.length === 7) {\r\n // or #rrggbb.\r\n parsedColor = (parseInt(color.substr(1), 16) << 8) | 0xff;\r\n } else {\r\n throw 'Color expected in hex format with preceding \"#\". E.g. #00ff00. Got value: ' + color;\r\n }\r\n }\r\n\r\n return parsedColor;\r\n}\r\n","import {action, computed, observable} from 'mobx';\nimport {registerHandler, WSMsgType} from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Col, ListGroupItem, OverlayTrigger, Popover, Row} from \"react-bootstrap\";\nimport Plus from \"../../assets/plus.svg\";\nimport Minus from \"../../assets/minus.svg\";\nimport {displayManaUnit} from \"../utils\";\n\nclass ManaBlk {\n nodeID: string;\n access: number;\n consensus: number;\n // in s?\n time: number;\n}\n\nexport class Node {\n shortNodeID: string;\n nodeID: string;\n mana: number;\n}\n\nclass NetworkManaBlk {\n manaType: string;\n totalMana: number;\n nodes: Array;\n}\n\nexport class AllowedPledgeIDsBlk {\n accessFilter: PledgeIDFilter;\n consensusFilter: PledgeIDFilter;\n}\n\nexport class PledgeIDFilter {\n enabled: boolean;\n allowedNodeIDs: Array;\n}\n\nexport class AllowedNodeStr {\n shortID: string;\n fullID: string;\n}\n\nclass PledgeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass RevokeBlk {\n manaType: string;\n nodeID: string;\n time: number;\n txID: string;\n amount: number;\n}\n\nclass ManaEvent {\n nodeID: string;\n time: Date;\n txID: string;\n\n constructor(nodeID: string, time: Date, txID: string) {\n this.nodeID = nodeID;\n this.time = time;\n this.txID = txID;\n }\n}\n\nclass PledgeEvent extends ManaEvent{\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nclass RevokeEvent extends ManaEvent {\n amount: number;\n\n constructor(nodeID: string, time: Date, txID: string, amount: number) {\n super(nodeID, time, txID);\n this.amount = amount;\n }\n}\n\nconst emptyRow = (\n There are no nodes to view with the current search parameters.\n)\nconst emptyListItem = (\n There are no events to view with the current search parameters.)\n\n// every 10 seconds, a new value arrives, so this is roughly 17 mins\nconst maxStoredManaValues = 100;\n// number of previous pledge/revoke events we keep track of. (/2 of plugins/dashboard/maxManaEventsBufferSize)\nconst maxEventsStored = 100;\n\nexport class ManaStore {\n // mana values\n @observable manaValues: Array = [];\n // first is accessm second consensus\n @observable prevManaValues: Array = [0,0];\n // list of richest access mana nodes in network, sorted in descending order\n @observable accessNetworkRichest: Array = [];\n @observable totalAccessNetwork: number = 0.0;\n // list of richest active access mana nodes in the network, sorted in descending order\n @observable accessActiveRichest: Array = [];\n @observable totalAccessActive: number = 0.0;\n // list of richest consensus mana nodes in their network, sorted in descending order\n @observable consensusNetworkRichest: Array = [];\n @observable totalConsensusNetwork: number = 0.0;\n // list of richest active consensus mana nodes in their network, sorted in descending order\n @observable consensusActiveRichest: Array = [];\n @observable totalConsensusActive: number = 0.0;\n\n @observable public searchNode = \"\";\n @observable public searchTxID = \"\";\n\n @observable public allowedPledgeIDs: AllowedPledgeIDsBlk;\n\n // internal arrays to store mana events\n accessEvents: Array = [];\n consensusEvents: Array = [];\n\n // internal arrays to store initial mana events\n initAccessEvents: Array = [];\n initConsensusEvents: Array = [];\n\n // info on latest removed events\n @observable lastRemovedAccessEventTime: Date = null;\n @observable lastRemovedConsensusEventTime: Date = null;\n\n lastInitRemovedAccessEventTime: Date = null;\n lastInitRemovedConsensusEventTime: Date = null;\n\n // only update displayed events when initial arrays were modified\n eventsUpdated: boolean = false;\n\n // mana events displayed in frontend\n @observable displayedAccessEvents: Array = [];\n @observable displayedConsensusEvents: Array = [];\n\n ownID: string;\n\n nodeNotSyncedListItem = (Wait for node to be synced to display mana events.);\n\n constructor() {\n this.manaValues = [];\n\n registerHandler(WSMsgType.Mana, this.addNewManaValue);\n registerHandler(WSMsgType.ManaMapOverall, this.updateNetworkRichest);\n registerHandler(WSMsgType.ManaMapOnline, this.updateActiveRichest);\n // registerHandler(WSMsgType.ManaAllowedPledge, this.updateAllowedPledgeIDs);\n // registerHandler(WSMsgType.ManaInitPledge, this.addNewInitPledge);\n // registerHandler(WSMsgType.ManaInitRevoke, this.addNewInitRevoke);\n // registerHandler(WSMsgType.ManaInitDone, this.initDone);\n // registerHandler(WSMsgType.ManaPledge, this.addNewPledge);\n // registerHandler(WSMsgType.ManaRevoke, this.addNewRevoke);\n };\n\n @action\n updateNodeSearch(searchNode: string): void {\n this.searchNode = searchNode.trim();\n }\n\n @action\n updateTxSearch(searchTxID: string): void {\n this.searchTxID = searchTxID.trim();\n }\n\n @action\n addNewManaValue = (manaBlk: ManaBlk) => {\n this.ownID = this.ownID? this.ownID : manaBlk.nodeID;\n if (this.manaValues.length === maxStoredManaValues) {\n // shift if we already have enough values\n this.manaValues.shift();\n }\n let newManaData = [new Date(manaBlk.time*1000), manaBlk.access, manaBlk.consensus];\n if (this.manaValues.length > 0){\n this.prevManaValues = [this.manaValues[this.manaValues.length -1][1] , this.manaValues[this.manaValues.length -1][2]]\n }\n this.manaValues.push(newManaData);\n }\n\n @action\n updateNetworkRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessNetwork = blk.totalMana;\n this.accessNetworkRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusNetwork = blk.totalMana;\n this.consensusNetworkRichest = blk.nodes;\n break;\n }\n }\n\n @action\n updateActiveRichest = (blk: NetworkManaBlk) => {\n switch (blk.manaType) {\n case \"Access\":\n this.totalAccessActive = blk.totalMana;\n this.accessActiveRichest = blk.nodes;\n break;\n case \"Consensus\":\n this.totalConsensusActive = blk.totalMana;\n this.consensusActiveRichest = blk.nodes;\n break;\n }\n };\n\n @action\n updateAllowedPledgeIDs = (blk: AllowedPledgeIDsBlk) => {\n this.allowedPledgeIDs = blk;\n }\n\n @action\n addNewInitPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.initAccessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n }\n\n @action\n addNewPledge = (blk: PledgeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Access\":\n store = this.accessEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedAccessEventTime = lastRemoved.time;\n }\n break;\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return\n }\n let newData = new PledgeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount,\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n addNewInitRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.initConsensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastInitRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n }\n\n @action\n addNewRevoke = (blk: RevokeBlk) => {\n let store: Array = [];\n switch (blk.manaType) {\n case \"Consensus\":\n store = this.consensusEvents;\n if (store.length >= maxEventsStored) {\n let lastRemoved = store.shift();\n this.lastRemovedConsensusEventTime = lastRemoved.time;\n }\n break;\n default:\n return;\n }\n let newData = new RevokeEvent(\n blk.nodeID,\n new Date(blk.time*1000),\n blk.txID,\n blk.amount\n );\n store.push(newData);\n this.eventsUpdated = true;\n }\n\n @action\n initDone = () => {\n this.accessEvents = this.initAccessEvents;\n this.lastRemovedAccessEventTime = this.lastInitRemovedAccessEventTime;\n this.consensusEvents= this.initConsensusEvents;\n this.lastRemovedConsensusEventTime = this.lastInitRemovedConsensusEventTime;\n\n this.displayedAccessEvents = [...this.accessEvents]\n this.displayedConsensusEvents = [...this.consensusEvents]\n\n setInterval(() => {\n if (this.eventsUpdated) {\n this.displayedAccessEvents = [...this.accessEvents];\n this.displayedConsensusEvents = [...this.consensusEvents];\n this.eventsUpdated = false;\n }\n }, 500)\n }\n\n nodeList = (leaderBoard: Array, manaSum: number) => {\n if (leaderBoard === null || leaderBoard == undefined) {\n return []\n }\n let feed = [];\n let pushToFeed = (node: Node, i: number) => {\n feed.push(\n \n {i + 1} \n {node.shortNodeID}\n {displayManaUnit(node.mana)}\n {((node.mana / manaSum)*100.0).toFixed(2)}%\n \n );\n };\n let callback = (node: Node, i: number) => {\n if (this.passesNodeFilter(node.shortNodeID)){\n pushToFeed(node, i);\n }\n };\n leaderBoard.forEach(callback);\n return feed\n }\n\n @computed\n get networkRichestFeedAccess() {\n let result = this.nodeList(this.accessNetworkRichest, this.totalAccessNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get networkRichestFeedConsensus() {\n let result = this.nodeList(this.consensusNetworkRichest, this.totalConsensusNetwork);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedAccess() {\n let result = this.nodeList(this.accessActiveRichest, this.totalAccessActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get activeRichestFeedConsensus() {\n let result = this.nodeList(this.consensusActiveRichest, this.totalConsensusActive);\n if (result.length === 0) {\n return [emptyRow];\n } else {\n return result;\n }\n }\n\n @computed\n get accessHistogramInput() {\n if (this.accessNetworkRichest === undefined || this.accessNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.accessNetworkRichest.length; i++) {\n histInput.push(\n [this.accessNetworkRichest[i].shortNodeID, Math.log10(this.accessNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get consensusHistogramInput() {\n if (this.consensusNetworkRichest === undefined || this.consensusNetworkRichest === null) {\n return [[\"\", 0]]\n }\n let histInput = new Array()\n for (let i = 0; i < this.consensusNetworkRichest.length; i++) {\n histInput.push(\n [this.consensusNetworkRichest[i].shortNodeID, Math.log10(this.consensusNetworkRichest[i].mana)]\n )\n }\n return histInput\n }\n\n @computed\n get accessPercentile() {\n let per = 0.0;\n // find id\n if (this.accessNetworkRichest !== undefined && this.accessNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.accessNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.accessNetworkRichest.length - (index + 1)) / this.accessNetworkRichest.length) * 100;\n break;\n }\n }\n return per\n }\n\n @computed\n get consensusPercentile() {\n let per = 0.0;\n // find id\n if ( this.consensusNetworkRichest !== undefined && this.consensusNetworkRichest !== null) {\n const isOwnID = (element) => element.shortNodeID === this.ownID;\n let index = this.consensusNetworkRichest.findIndex(isOwnID);\n switch (index) {\n case -1:\n break;\n default:\n per = ((this.consensusNetworkRichest.length - (index +1)) / this.consensusNetworkRichest.length) * 100;\n }\n }\n return per\n }\n\n computeEventList = (evArr: Array) => {\n let result = [];\n result.push(\n \n \n \n \n \n NodeID\n \n \n Tx ID\n \n \n Time\n \n \n \n )\n if (evArr === undefined || evArr === null) {\n return result\n }\n let pushToEventFeed = (element: ManaEvent, index) => {\n if (element instanceof PledgeEvent) {\n let popover = (ev: PledgeEvent) => {\n return (\n \n Mana Pledged\n \n
Base Mana: +{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
To NodeID: {ev.nodeID}
\n
Time of Pledge: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Plus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n } else if (element instanceof RevokeEvent){\n let popover = (ev: RevokeEvent) => {\n return (\n \n Mana Revoked\n \n
Base Mana 1: -{displayManaUnit(ev.amount)}
\n
With Transaction: navigator.clipboard.writeText(ev.txID)}\n href={`/explorer/transaction/${ev.txID}`}\n >{ev.txID}
\n
From NodeID: {ev.nodeID}
\n
Time of Revoke: {ev.time.toLocaleTimeString()}
\n
\n
\n )\n }\n // it's a revoke event then\n result.push(\n \n do something on click}>\n as={'button'}\n >\n \n \n \"Minus\"\n \n \n {element.nodeID}\n \n \n {element.txID.substring(0, 7) + '...'}\n \n \n {element.time.toLocaleString()}\n \n \n \n \n )\n }\n };\n // && this.passesTimeFilter(event.time) {\n let callback = (event: ManaEvent, i: number) => {\n if (this.passesNodeFilter(event.nodeID) && this.passesTxFilter(event.txID)){\n pushToEventFeed(event, i);\n }\n };\n // reverse traverse bc oldest event is the first\n evArr.reverse().forEach(callback)\n return result;\n }\n\n @computed\n get accessEventList() {\n let result = this.computeEventList(this.displayedAccessEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n @computed\n get consensusEventList() {\n let result = this.computeEventList(this.displayedConsensusEvents);\n if (result.length === 1) {\n result.push(emptyListItem);\n }\n return result;\n }\n\n passesNodeFilter = (nodeID: string) : boolean => {\n if (this.searchNode.trim().length === 0) {\n // node filter is disabled, anything passes the filter\n return true;\n } else if (nodeID.toLowerCase().includes(this.searchNode.toLowerCase())){\n // node filter is enabled, nodeID contains search term\n return true;\n }\n // filter enabled but nodeID doesn't pass\n return false;\n }\n\n passesTxFilter = (txID: string) : boolean => {\n if (this.searchTxID.trim().length === 0) {\n // txID filter is disabled, anything passes the filter\n return true;\n } else if (txID.toLowerCase().includes(this.searchTxID.toLowerCase())){\n // txID filter is enabled, txID contains search term\n return true;\n }\n // filter enabled but txID doesn't pass\n return false;\n }\n}\n\nexport default ManaStore;\n","import {computed, action, observable} from \"mobx\";\nimport { registerHandler, WSMsgType } from \"../misc/WS\";\nimport * as React from \"react\";\nimport {Link} from 'react-router-dom';\n\nconst liveFeedSize = 100;\n\nexport class SlotInfo {\n index: number;\n id: string;\n}\n\nexport class SlotStore {\n @observable liveFeed: Array = [];\n\n constructor() {\n registerHandler(WSMsgType.SlotInfo, this.addLiveFeed);\n }\n\n @action addLiveFeed = async (info: SlotInfo) => {\n if (this.liveFeed.findIndex((t) => t.id == info.id) === -1) {\n if (this.liveFeed.length >= liveFeedSize) {\n this.liveFeed.shift();\n }\n this.liveFeed.push(info);\n }\n }\n\n @computed\n get slotLiveFeed() {\n let feed = [];\n for (let i = this.liveFeed.length - 1; i >= 0; i--) {\n let info = this.liveFeed[i];\n feed.push(\n \n \n {info.index}\n \n \n \n {info.id}\n \n \n \n );\n }\n return feed;\n }\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport {Provider} from 'mobx-react';\nimport {createBrowserHistory} from 'history';\nimport 'chartjs-plugin-streaming';\nimport {App} from './app/App';\nimport {RouterStore, syncHistoryWithStore} from 'mobx-react-router';\nimport {Router} from 'react-router-dom';\nimport NodeStore from \"./app/stores/NodeStore\";\nimport ExplorerStore from \"./app/stores/ExplorerStore\";\nimport FaucetStore from \"./app/stores/FaucetStore\";\nimport VisualizerStore from \"./app/stores/VisualizerStore\";\nimport ManaStore from \"./app/stores/ManaStore\";\nimport {SlotStore} from \"./app/stores/SlotStore\";\n\n// prepare MobX stores\nconst routerStore = new RouterStore();\nconst nodeStore = new NodeStore();\nconst explorerStore = new ExplorerStore(routerStore);\nconst faucetStore = new FaucetStore(routerStore);\nconst visualizerStore = new VisualizerStore(routerStore);\nconst manaStore = new ManaStore();\nconst slotStore = new SlotStore();\nconst stores = {\n \"routerStore\": routerStore,\n \"nodeStore\": nodeStore,\n \"explorerStore\": explorerStore,\n \"faucetStore\": faucetStore,\n \"visualizerStore\": visualizerStore,\n \"manaStore\": manaStore,\n \"slotStore\": slotStore\n};\n\nconst browserHistory = createBrowserHistory();\nconst history = syncHistoryWithStore(browserHistory, routerStore);\n\n// render react DOM\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/components/dashboard/frontend/build/index.html b/components/dashboard/frontend/build/index.html index b397f8f8c..bd4506986 100644 --- a/components/dashboard/frontend/build/index.html +++ b/components/dashboard/frontend/build/index.html @@ -1 +1 @@ - iota-core Dashboard
\ No newline at end of file + iota-core Dashboard
\ No newline at end of file diff --git a/components/dashboard/frontend/build/vendor.146c9687b00ba21e0070.js.map b/components/dashboard/frontend/build/vendor.146c9687b00ba21e0070.js.map deleted file mode 100644 index c487fdd31..000000000 --- a/components/dashboard/frontend/build/vendor.146c9687b00ba21e0070.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///../node_modules/react-icons/lib/esm/iconsManifest.js","webpack:///../node_modules/react-icons/lib/esm/iconContext.js","webpack:///../node_modules/react-icons/lib/esm/iconBase.js","webpack:///../node_modules/react/index.js","webpack:///../node_modules/react-bootstrap/esm/ListGroup.js","webpack:///../node_modules/mobx/lib/mobx.module.js","webpack:///../node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../node_modules/moment/moment.js","webpack:///../node_modules/mobx-react/index.module.js","webpack:///../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///../node_modules/classnames/index.js","webpack:///../node_modules/react-bootstrap/esm/Col.js","webpack:///../node_modules/react-bootstrap/esm/ThemeProvider.js","webpack:///../node_modules/react-bootstrap/esm/Row.js","webpack:///../node_modules/react-bootstrap/esm/Container.js","webpack:///../node_modules/prop-types/index.js","webpack:///../node_modules/react-router-dom/esm/react-router-dom.js","webpack:///../node_modules/react-bootstrap/esm/CardImg.js","webpack:///../node_modules/react-bootstrap/esm/Card.js","webpack:///../node_modules/react-bootstrap/esm/Badge.js","webpack:///../node_modules/react-router-dom/node_modules/react-router/esm/react-router.js","webpack:///../node_modules/react-bootstrap/esm/FormContext.js","webpack:///../node_modules/dom-helpers/esm/camelize.js","webpack:///../node_modules/react-bootstrap/esm/createWithBsPrefix.js","webpack:///../node_modules/dateformat/lib/dateformat.js","webpack:///../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///../node_modules/react-bootstrap/esm/InputGroup.js","webpack:///../node_modules/react-bootstrap/esm/FormControl.js","webpack:///../node_modules/react-dom/index.js","webpack:///../node_modules/resolve-pathname/esm/resolve-pathname.js","webpack:///../node_modules/value-equal/esm/value-equal.js","webpack:///../node_modules/history/esm/history.js","webpack:///../node_modules/tiny-invariant/dist/tiny-invariant.esm.js","webpack:///../node_modules/react-bootstrap/esm/SelectableContext.js","webpack:///../node_modules/prettysize/index.js","webpack:///../node_modules/react-chartjs-2/es/index.js","webpack:///../node_modules/uncontrollable/esm/utils.js","webpack:///../node_modules/uncontrollable/esm/hook.js","webpack:///../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack:///../node_modules/react-transition-group/esm/config.js","webpack:///../node_modules/react-transition-group/esm/TransitionGroupContext.js","webpack:///../node_modules/react-transition-group/esm/Transition.js","webpack:///../node_modules/lodash/_root.js","webpack:///../node_modules/lodash/isArray.js","webpack:///../node_modules/@restart/hooks/esm/useCommittedRef.js","webpack:///../node_modules/@restart/hooks/esm/useEventCallback.js","webpack:///../node_modules/vivagraphjs/src/viva.js","webpack:///../node_modules/react-bootstrap/esm/NavbarContext.js","webpack:///../node_modules/react-bootstrap/esm/createChainedFunction.js","webpack:///../node_modules/dom-helpers/esm/addEventListener.js","webpack:///../node_modules/dom-helpers/esm/removeEventListener.js","webpack:///../node_modules/dom-helpers/esm/listen.js","webpack:///../node_modules/react-bootstrap/esm/NavItem.js","webpack:///../node_modules/react-bootstrap/esm/NavLink.js","webpack:///../node_modules/react-bootstrap/esm/Nav.js","webpack:///../node_modules/lodash/_getNative.js","webpack:///../node_modules/ngraph.events/index.js","webpack:///../node_modules/warning/warning.js","webpack:///../node_modules/react-overlays/esm/safeFindDOMNode.js","webpack:///../node_modules/react-router-bootstrap/lib/index.js","webpack:///../node_modules/ngraph.merge/index.js","webpack:///../node_modules/react-bootstrap/esm/Feedback.js","webpack:///../node_modules/react-bootstrap/esm/SafeAnchor.js","webpack:///../node_modules/dom-helpers/esm/ownerDocument.js","webpack:///../node_modules/react-bootstrap/esm/Fade.js","webpack:///../node_modules/lodash/_baseGetTag.js","webpack:///../node_modules/lodash/isObjectLike.js","webpack:///../node_modules/ngraph.random/index.js","webpack:///../node_modules/react-bootstrap/esm/divWithClassName.js","webpack:///../node_modules/dom-helpers/esm/getComputedStyle.js","webpack:///../node_modules/dom-helpers/esm/ownerWindow.js","webpack:///../node_modules/dom-helpers/esm/hyphenate.js","webpack:///../node_modules/dom-helpers/esm/hyphenateStyle.js","webpack:///../node_modules/dom-helpers/esm/isTransform.js","webpack:///../node_modules/dom-helpers/esm/css.js","webpack:///../node_modules/react-bootstrap/esm/NavbarBrand.js","webpack:///../node_modules/react-bootstrap/esm/Collapse.js","webpack:///../node_modules/react-bootstrap/esm/NavbarCollapse.js","webpack:///../node_modules/react-bootstrap/esm/NavbarToggle.js","webpack:///../node_modules/react-bootstrap/esm/Navbar.js","webpack:///../node_modules/react-bootstrap/esm/PopoverTitle.js","webpack:///../node_modules/react-bootstrap/esm/PopoverContent.js","webpack:///../node_modules/react-bootstrap/esm/Popover.js","webpack:///../node_modules/webpack/buildin/global.js","webpack:///../node_modules/lodash/_ListCache.js","webpack:///../node_modules/lodash/_assocIndexOf.js","webpack:///../node_modules/lodash/_Symbol.js","webpack:///../node_modules/lodash/_nativeCreate.js","webpack:///../node_modules/lodash/_getMapData.js","webpack:///../node_modules/lodash/_toKey.js","webpack:///../node_modules/prop-types-extra/lib/all.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webgl.js","webpack:///../node_modules/react-bootstrap/esm/CardContext.js","webpack:///../node_modules/@restart/hooks/esm/useMergedRefs.js","webpack:///../node_modules/react-bootstrap/esm/NavContext.js","webpack:///../node_modules/react-bootstrap/esm/AbstractNavItem.js","webpack:///../node_modules/react-bootstrap/esm/Table.js","webpack:///../node_modules/react-bootstrap/esm/Spinner.js","webpack:///../node_modules/dom-helpers/esm/transitionEnd.js","webpack:///../node_modules/react-bootstrap/esm/triggerBrowserReflow.js","webpack:///../node_modules/dom-helpers/esm/contains.js","webpack:///../node_modules/@restart/hooks/esm/useMounted.js","webpack:///../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack:///../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack:///../node_modules/@popperjs/core/lib/utils/within.js","webpack:///../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack:///../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack:///../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack:///../node_modules/@popperjs/core/lib/enums.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack:///../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack:///../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack:///../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack:///../node_modules/@popperjs/core/lib/utils/getVariation.js","webpack:///../node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack:///../node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/flip.js","webpack:///../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/hide.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/offset.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack:///../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack:///../node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack:///../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack:///../node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack:///../node_modules/@popperjs/core/lib/createPopper.js","webpack:///../node_modules/@popperjs/core/lib/utils/debounce.js","webpack:///../node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack:///../node_modules/react-overlays/esm/popper.js","webpack:///../node_modules/react-bootstrap/esm/TabContext.js","webpack:///../node_modules/react-bootstrap/esm/AbstractNav.js","webpack:///../node_modules/dom-helpers/esm/hasClass.js","webpack:///../node_modules/webpack/buildin/module.js","webpack:///../node_modules/lodash/_baseIsEqual.js","webpack:///../node_modules/lodash/_Map.js","webpack:///../node_modules/lodash/isObject.js","webpack:///../node_modules/lodash/_MapCache.js","webpack:///../node_modules/lodash/keys.js","webpack:///../node_modules/lodash/isLength.js","webpack:///../node_modules/lodash/_isKey.js","webpack:///../node_modules/lodash/isSymbol.js","webpack:///../node_modules/ngraph.graph/index.js","webpack:///../node_modules/vivagraphjs/src/Input/domInputManager.js","webpack:///../node_modules/vivagraphjs/src/Input/dragndrop.js","webpack:///../node_modules/ngraph.expose/index.js","webpack:///../node_modules/vivagraphjs/src/WebGL/parseColor.js","webpack:///../node_modules/simplesvg/index.js","webpack:///../node_modules/invariant/browser.js","webpack:///../node_modules/mini-create-react-context/dist/esm/index.js","webpack:///../node_modules/path-to-regexp/index.js","webpack:///../node_modules/react-bootstrap/esm/Button.js","webpack:///../node_modules/@restart/hooks/esm/useCallbackRef.js","webpack:///../node_modules/react-overlays/esm/useWaitForDOMRef.js","webpack:///../node_modules/mobx-react-router/dist/mobx-react-router.js","webpack:///../node_modules/@restart/hooks/esm/useTimeout.js","webpack:///../node_modules/react-overlays/esm/Overlay.js","webpack:///../node_modules/react-bootstrap/esm/usePopperMarginModifiers.js","webpack:///../node_modules/react-bootstrap/esm/Overlay.js","webpack:///../node_modules/react-bootstrap/esm/OverlayTrigger.js","webpack:///../node_modules/object-assign/index.js","webpack:///../node_modules/process/browser.js","webpack:///../node_modules/chart.js/dist/Chart.js","webpack:///../node_modules/moment/locale/af.js","webpack:///../node_modules/moment/locale/ar.js","webpack:///../node_modules/moment/locale/ar-dz.js","webpack:///../node_modules/moment/locale/ar-kw.js","webpack:///../node_modules/moment/locale/ar-ly.js","webpack:///../node_modules/moment/locale/ar-ma.js","webpack:///../node_modules/moment/locale/ar-sa.js","webpack:///../node_modules/moment/locale/ar-tn.js","webpack:///../node_modules/moment/locale/az.js","webpack:///../node_modules/moment/locale/be.js","webpack:///../node_modules/moment/locale/bg.js","webpack:///../node_modules/moment/locale/bm.js","webpack:///../node_modules/moment/locale/bn.js","webpack:///../node_modules/moment/locale/bn-bd.js","webpack:///../node_modules/moment/locale/bo.js","webpack:///../node_modules/moment/locale/br.js","webpack:///../node_modules/moment/locale/bs.js","webpack:///../node_modules/moment/locale/ca.js","webpack:///../node_modules/moment/locale/cs.js","webpack:///../node_modules/moment/locale/cv.js","webpack:///../node_modules/moment/locale/cy.js","webpack:///../node_modules/moment/locale/da.js","webpack:///../node_modules/moment/locale/de.js","webpack:///../node_modules/moment/locale/de-at.js","webpack:///../node_modules/moment/locale/de-ch.js","webpack:///../node_modules/moment/locale/dv.js","webpack:///../node_modules/moment/locale/el.js","webpack:///../node_modules/moment/locale/en-au.js","webpack:///../node_modules/moment/locale/en-ca.js","webpack:///../node_modules/moment/locale/en-gb.js","webpack:///../node_modules/moment/locale/en-ie.js","webpack:///../node_modules/moment/locale/en-il.js","webpack:///../node_modules/moment/locale/en-in.js","webpack:///../node_modules/moment/locale/en-nz.js","webpack:///../node_modules/moment/locale/en-sg.js","webpack:///../node_modules/moment/locale/eo.js","webpack:///../node_modules/moment/locale/es.js","webpack:///../node_modules/moment/locale/es-do.js","webpack:///../node_modules/moment/locale/es-mx.js","webpack:///../node_modules/moment/locale/es-us.js","webpack:///../node_modules/moment/locale/et.js","webpack:///../node_modules/moment/locale/eu.js","webpack:///../node_modules/moment/locale/fa.js","webpack:///../node_modules/moment/locale/fi.js","webpack:///../node_modules/moment/locale/fil.js","webpack:///../node_modules/moment/locale/fo.js","webpack:///../node_modules/moment/locale/fr.js","webpack:///../node_modules/moment/locale/fr-ca.js","webpack:///../node_modules/moment/locale/fr-ch.js","webpack:///../node_modules/moment/locale/fy.js","webpack:///../node_modules/moment/locale/ga.js","webpack:///../node_modules/moment/locale/gd.js","webpack:///../node_modules/moment/locale/gl.js","webpack:///../node_modules/moment/locale/gom-deva.js","webpack:///../node_modules/moment/locale/gom-latn.js","webpack:///../node_modules/moment/locale/gu.js","webpack:///../node_modules/moment/locale/he.js","webpack:///../node_modules/moment/locale/hi.js","webpack:///../node_modules/moment/locale/hr.js","webpack:///../node_modules/moment/locale/hu.js","webpack:///../node_modules/moment/locale/hy-am.js","webpack:///../node_modules/moment/locale/id.js","webpack:///../node_modules/moment/locale/is.js","webpack:///../node_modules/moment/locale/it.js","webpack:///../node_modules/moment/locale/it-ch.js","webpack:///../node_modules/moment/locale/ja.js","webpack:///../node_modules/moment/locale/jv.js","webpack:///../node_modules/moment/locale/ka.js","webpack:///../node_modules/moment/locale/kk.js","webpack:///../node_modules/moment/locale/km.js","webpack:///../node_modules/moment/locale/kn.js","webpack:///../node_modules/moment/locale/ko.js","webpack:///../node_modules/moment/locale/ku.js","webpack:///../node_modules/moment/locale/ky.js","webpack:///../node_modules/moment/locale/lb.js","webpack:///../node_modules/moment/locale/lo.js","webpack:///../node_modules/moment/locale/lt.js","webpack:///../node_modules/moment/locale/lv.js","webpack:///../node_modules/moment/locale/me.js","webpack:///../node_modules/moment/locale/mi.js","webpack:///../node_modules/moment/locale/mk.js","webpack:///../node_modules/moment/locale/ml.js","webpack:///../node_modules/moment/locale/mn.js","webpack:///../node_modules/moment/locale/mr.js","webpack:///../node_modules/moment/locale/ms.js","webpack:///../node_modules/moment/locale/ms-my.js","webpack:///../node_modules/moment/locale/mt.js","webpack:///../node_modules/moment/locale/my.js","webpack:///../node_modules/moment/locale/nb.js","webpack:///../node_modules/moment/locale/ne.js","webpack:///../node_modules/moment/locale/nl.js","webpack:///../node_modules/moment/locale/nl-be.js","webpack:///../node_modules/moment/locale/nn.js","webpack:///../node_modules/moment/locale/oc-lnc.js","webpack:///../node_modules/moment/locale/pa-in.js","webpack:///../node_modules/moment/locale/pl.js","webpack:///../node_modules/moment/locale/pt.js","webpack:///../node_modules/moment/locale/pt-br.js","webpack:///../node_modules/moment/locale/ro.js","webpack:///../node_modules/moment/locale/ru.js","webpack:///../node_modules/moment/locale/sd.js","webpack:///../node_modules/moment/locale/se.js","webpack:///../node_modules/moment/locale/si.js","webpack:///../node_modules/moment/locale/sk.js","webpack:///../node_modules/moment/locale/sl.js","webpack:///../node_modules/moment/locale/sq.js","webpack:///../node_modules/moment/locale/sr.js","webpack:///../node_modules/moment/locale/sr-cyrl.js","webpack:///../node_modules/moment/locale/ss.js","webpack:///../node_modules/moment/locale/sv.js","webpack:///../node_modules/moment/locale/sw.js","webpack:///../node_modules/moment/locale/ta.js","webpack:///../node_modules/moment/locale/te.js","webpack:///../node_modules/moment/locale/tet.js","webpack:///../node_modules/moment/locale/tg.js","webpack:///../node_modules/moment/locale/th.js","webpack:///../node_modules/moment/locale/tk.js","webpack:///../node_modules/moment/locale/tl-ph.js","webpack:///../node_modules/moment/locale/tlh.js","webpack:///../node_modules/moment/locale/tr.js","webpack:///../node_modules/moment/locale/tzl.js","webpack:///../node_modules/moment/locale/tzm.js","webpack:///../node_modules/moment/locale/tzm-latn.js","webpack:///../node_modules/moment/locale/ug-cn.js","webpack:///../node_modules/moment/locale/uk.js","webpack:///../node_modules/moment/locale/ur.js","webpack:///../node_modules/moment/locale/uz.js","webpack:///../node_modules/moment/locale/uz-latn.js","webpack:///../node_modules/moment/locale/vi.js","webpack:///../node_modules/moment/locale/x-pseudo.js","webpack:///../node_modules/moment/locale/yo.js","webpack:///../node_modules/moment/locale/zh-cn.js","webpack:///../node_modules/moment/locale/zh-hk.js","webpack:///../node_modules/moment/locale/zh-mo.js","webpack:///../node_modules/moment/locale/zh-tw.js","webpack:///../node_modules/lodash/_Stack.js","webpack:///../node_modules/lodash/eq.js","webpack:///../node_modules/lodash/isFunction.js","webpack:///../node_modules/lodash/_freeGlobal.js","webpack:///../node_modules/lodash/_toSource.js","webpack:///../node_modules/lodash/_equalArrays.js","webpack:///../node_modules/lodash/isArguments.js","webpack:///../node_modules/lodash/isBuffer.js","webpack:///../node_modules/lodash/_isIndex.js","webpack:///../node_modules/lodash/isTypedArray.js","webpack:///../node_modules/lodash/isArrayLike.js","webpack:///../node_modules/lodash/_isStrictComparable.js","webpack:///../node_modules/lodash/_matchesStrictComparable.js","webpack:///../node_modules/lodash/_baseGet.js","webpack:///../node_modules/lodash/_castPath.js","webpack:///../node_modules/react-is/index.js","webpack:///../node_modules/react-router-bootstrap/lib/LinkContainer.js","webpack:///../node_modules/gintersect/index.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglInputEvents.js","webpack:///../node_modules/vivagraphjs/src/Utils/documentEvents.js","webpack:///../node_modules/vivagraphjs/src/Utils/nullEvents.js","webpack:///../node_modules/vivagraphjs/src/Utils/browserInfo.js","webpack:///../node_modules/vivagraphjs/src/Utils/findElementPosition.js","webpack:///../node_modules/vivagraphjs/src/Input/webglInputManager.js","webpack:///../node_modules/vivagraphjs/src/Utils/timer.js","webpack:///../node_modules/vivagraphjs/src/Utils/getDimensions.js","webpack:///../node_modules/ngraph.forcelayout/index.js","webpack:///../node_modules/ngraph.physics.simulator/index.js","webpack:///../node_modules/vivagraphjs/src/Utils/rect.js","webpack:///../node_modules/vivagraphjs/src/WebGL/texture.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglAtlas.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglLinkProgram.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglNodeProgram.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglLine.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglSquare.js","webpack:///../node_modules/vivagraphjs/src/View/svgGraphics.js","webpack:///../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///../node_modules/dom-helpers/esm/querySelectorAll.js","webpack:///../node_modules/@restart/hooks/esm/useForceUpdate.js","webpack:///../node_modules/react-bootstrap/esm/ListGroupItem.js","webpack:///../node_modules/react-icons/fa/index.esm.js","webpack:///../node_modules/dom-helpers/esm/canUseDOM.js","webpack:///../node_modules/react-overlays/esm/mergeOptionsWithPopperConfig.js","webpack:///../node_modules/react-hot-loader/root.js","webpack:///../node_modules/react-bootstrap/esm/FormCheckInput.js","webpack:///../node_modules/react-bootstrap/esm/FormCheckLabel.js","webpack:///../node_modules/react-bootstrap/esm/FormCheck.js","webpack:///../node_modules/react-bootstrap/esm/FormFileInput.js","webpack:///../node_modules/react-bootstrap/esm/FormFileLabel.js","webpack:///../node_modules/react-bootstrap/esm/FormFile.js","webpack:///../node_modules/react-bootstrap/esm/FormGroup.js","webpack:///../node_modules/react-bootstrap/esm/FormLabel.js","webpack:///../node_modules/react-bootstrap/esm/FormText.js","webpack:///../node_modules/react-bootstrap/esm/Switch.js","webpack:///../node_modules/react-bootstrap/esm/Form.js","webpack:///../node_modules/react-bootstrap/esm/CloseButton.js","webpack:///../node_modules/react-bootstrap/esm/Alert.js","webpack:///../node_modules/@restart/hooks/esm/useWillUnmount.js","webpack:///../node_modules/@restart/hooks/esm/useUpdatedRef.js","webpack:///../node_modules/@restart/hooks/esm/useSafeState.js","webpack:///../node_modules/react-overlays/esm/usePopper.js","webpack:///../node_modules/react-overlays/esm/useRootClose.js","webpack:///../node_modules/react-overlays/esm/ownerDocument.js","webpack:///../node_modules/react/cjs/react.production.min.js","webpack:///../node_modules/react-dom/cjs/react-dom.production.min.js","webpack:///../node_modules/scheduler/index.js","webpack:///../node_modules/scheduler/cjs/scheduler.production.min.js","webpack:///../node_modules/chartjs-plugin-streaming/dist/chartjs-plugin-streaming.js","webpack:///../node_modules/prop-types/factoryWithThrowingShims.js","webpack:///../node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///../node_modules/lodash/isEqual.js","webpack:///../node_modules/lodash/_baseIsEqualDeep.js","webpack:///../node_modules/lodash/_listCacheClear.js","webpack:///../node_modules/lodash/_listCacheDelete.js","webpack:///../node_modules/lodash/_listCacheGet.js","webpack:///../node_modules/lodash/_listCacheHas.js","webpack:///../node_modules/lodash/_listCacheSet.js","webpack:///../node_modules/lodash/_stackClear.js","webpack:///../node_modules/lodash/_stackDelete.js","webpack:///../node_modules/lodash/_stackGet.js","webpack:///../node_modules/lodash/_stackHas.js","webpack:///../node_modules/lodash/_stackSet.js","webpack:///../node_modules/lodash/_baseIsNative.js","webpack:///../node_modules/lodash/_getRawTag.js","webpack:///../node_modules/lodash/_objectToString.js","webpack:///../node_modules/lodash/_isMasked.js","webpack:///../node_modules/lodash/_coreJsData.js","webpack:///../node_modules/lodash/_getValue.js","webpack:///../node_modules/lodash/_mapCacheClear.js","webpack:///../node_modules/lodash/_Hash.js","webpack:///../node_modules/lodash/_hashClear.js","webpack:///../node_modules/lodash/_hashDelete.js","webpack:///../node_modules/lodash/_hashGet.js","webpack:///../node_modules/lodash/_hashHas.js","webpack:///../node_modules/lodash/_hashSet.js","webpack:///../node_modules/lodash/_mapCacheDelete.js","webpack:///../node_modules/lodash/_isKeyable.js","webpack:///../node_modules/lodash/_mapCacheGet.js","webpack:///../node_modules/lodash/_mapCacheHas.js","webpack:///../node_modules/lodash/_mapCacheSet.js","webpack:///../node_modules/lodash/_SetCache.js","webpack:///../node_modules/lodash/_setCacheAdd.js","webpack:///../node_modules/lodash/_setCacheHas.js","webpack:///../node_modules/lodash/_arraySome.js","webpack:///../node_modules/lodash/_cacheHas.js","webpack:///../node_modules/lodash/_equalByTag.js","webpack:///../node_modules/lodash/_Uint8Array.js","webpack:///../node_modules/lodash/_mapToArray.js","webpack:///../node_modules/lodash/_setToArray.js","webpack:///../node_modules/lodash/_equalObjects.js","webpack:///../node_modules/lodash/_getAllKeys.js","webpack:///../node_modules/lodash/_baseGetAllKeys.js","webpack:///../node_modules/lodash/_arrayPush.js","webpack:///../node_modules/lodash/_getSymbols.js","webpack:///../node_modules/lodash/_arrayFilter.js","webpack:///../node_modules/lodash/stubArray.js","webpack:///../node_modules/lodash/_arrayLikeKeys.js","webpack:///../node_modules/lodash/_baseTimes.js","webpack:///../node_modules/lodash/_baseIsArguments.js","webpack:///../node_modules/lodash/stubFalse.js","webpack:///../node_modules/lodash/_baseIsTypedArray.js","webpack:///../node_modules/lodash/_baseUnary.js","webpack:///../node_modules/lodash/_nodeUtil.js","webpack:///../node_modules/lodash/_baseKeys.js","webpack:///../node_modules/lodash/_isPrototype.js","webpack:///../node_modules/lodash/_nativeKeys.js","webpack:///../node_modules/lodash/_overArg.js","webpack:///../node_modules/lodash/_getTag.js","webpack:///../node_modules/lodash/_DataView.js","webpack:///../node_modules/lodash/_Promise.js","webpack:///../node_modules/lodash/_Set.js","webpack:///../node_modules/lodash/_WeakMap.js","webpack:///../node_modules/lodash/keyBy.js","webpack:///../node_modules/lodash/_baseAssignValue.js","webpack:///../node_modules/lodash/_defineProperty.js","webpack:///../node_modules/lodash/_createAggregator.js","webpack:///../node_modules/lodash/_arrayAggregator.js","webpack:///../node_modules/lodash/_baseAggregator.js","webpack:///../node_modules/lodash/_baseEach.js","webpack:///../node_modules/lodash/_baseForOwn.js","webpack:///../node_modules/lodash/_baseFor.js","webpack:///../node_modules/lodash/_createBaseFor.js","webpack:///../node_modules/lodash/_createBaseEach.js","webpack:///../node_modules/lodash/_baseIteratee.js","webpack:///../node_modules/lodash/_baseMatches.js","webpack:///../node_modules/lodash/_baseIsMatch.js","webpack:///../node_modules/lodash/_getMatchData.js","webpack:///../node_modules/lodash/_baseMatchesProperty.js","webpack:///../node_modules/lodash/get.js","webpack:///../node_modules/lodash/_stringToPath.js","webpack:///../node_modules/lodash/_memoizeCapped.js","webpack:///../node_modules/lodash/memoize.js","webpack:///../node_modules/lodash/toString.js","webpack:///../node_modules/lodash/_baseToString.js","webpack:///../node_modules/lodash/_arrayMap.js","webpack:///../node_modules/lodash/hasIn.js","webpack:///../node_modules/lodash/_baseHasIn.js","webpack:///../node_modules/lodash/_hasPath.js","webpack:///../node_modules/lodash/identity.js","webpack:///../node_modules/lodash/property.js","webpack:///../node_modules/lodash/_baseProperty.js","webpack:///../node_modules/lodash/_basePropertyDeep.js","webpack:///../node_modules/path-to-regexp/node_modules/isarray/index.js","webpack:///../node_modules/react-is/cjs/react-is.production.min.js","webpack:///../node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js","webpack:///../node_modules/react-router-bootstrap/lib/IndexLinkContainer.js","webpack:///../node_modules/prop-types-extra/lib/isRequiredForA11y.js","webpack:///../node_modules/vivagraphjs/src/version.js","webpack:///../node_modules/ngraph.fromjson/index.js","webpack:///../node_modules/ngraph.tojson/index.js","webpack:///../node_modules/vivagraphjs/src/Algorithms/centrality.js","webpack:///../node_modules/ngraph.centrality/index.js","webpack:///../node_modules/ngraph.centrality/src/degree.js","webpack:///../node_modules/ngraph.centrality/src/betweenness.js","webpack:///../node_modules/ngraph.centrality/src/closeness.js","webpack:///../node_modules/ngraph.centrality/src/eccentricity.js","webpack:///../node_modules/vivagraphjs/src/Algorithms/operations.js","webpack:///../node_modules/vivagraphjs/src/Utils/intersectRect.js","webpack:///../node_modules/ngraph.generators/index.js","webpack:///../node_modules/ngraph.generators/node_modules/ngraph.random/index.js","webpack:///../node_modules/vivagraphjs/src/Utils/backwardCompatibleEvents.js","webpack:///../node_modules/ngraph.physics.simulator/lib/spring.js","webpack:///../node_modules/ngraph.quadtreebh/index.js","webpack:///../node_modules/ngraph.quadtreebh/node.js","webpack:///../node_modules/ngraph.quadtreebh/insertStack.js","webpack:///../node_modules/ngraph.quadtreebh/isSamePosition.js","webpack:///../node_modules/ngraph.physics.simulator/lib/bounds.js","webpack:///../node_modules/ngraph.physics.simulator/lib/dragForce.js","webpack:///../node_modules/ngraph.physics.simulator/lib/springForce.js","webpack:///../node_modules/ngraph.physics.simulator/lib/eulerIntegrator.js","webpack:///../node_modules/ngraph.physics.simulator/lib/createBody.js","webpack:///../node_modules/ngraph.physics.primitives/index.js","webpack:///../node_modules/ngraph.forcelayout/node_modules/ngraph.events/index.js","webpack:///../node_modules/vivagraphjs/src/Layout/constant.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglImageNodeProgram.js","webpack:///../node_modules/vivagraphjs/src/WebGL/webglImage.js","webpack:///../node_modules/vivagraphjs/src/View/webglGraphics.js","webpack:///../node_modules/simplesvg/lib/compile.js","webpack:///../node_modules/simplesvg/lib/domparser.js","webpack:///../node_modules/simplesvg/lib/compile_template.js","webpack:///../node_modules/add-event-listener/index.js","webpack:///../node_modules/vivagraphjs/src/View/renderer.js","webpack:///../node_modules/vivagraphjs/src/Utils/windowEvents.js"],"names":["DefaultContext","color","undefined","size","className","style","attr","IconContext","__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","GenIcon","data","props","IconBase","Tree2Element","tree","map","node","tag","key","child","elem","conf","computedSize","title","svgProps","stroke","fill","strokeWidth","height","width","xmlns","children","Consumer","module","exports","defaultProps","variant","horizontal","ListGroup","forwardRef","ref","horizontalVariant","_useUncontrolled","activeKey","initialBsPrefix","bsPrefix","_useUncontrolled$as","as","controlledProps","createElement","displayName","Item","EMPTY_ARRAY","freeze","EMPTY_OBJECT","getNextId","globalState","mobxGuid","fail","message","invariant","check","Error","once","func","invoked","noop","isObject","value","isPlainObject","proto","getPrototypeOf","addHiddenProp","object","propName","defineProperty","enumerable","writable","configurable","createInstanceofPredicate","name","clazz","x","isArrayLike","Array","isArray","isObservableArray","isES6Map","thing","Map","isES6Set","Set","getPlainObjectKeys","enumerables","add","forEach","k","getOwnPropertyDescriptor","from","stringifyKey","toString","String","toPrimitive","ownKeys","Reflect","obj","getOwnPropertyNames","concat","$mobx","Symbol","Atom","isPendingUnobservation","isBeingObserved","observers","diffValue","lastAccessedBy","lowestObserverState","IDerivationState","NOT_TRACKING","onBecomeObserved","onBecomeObservedListeners","listener","onBecomeUnobserved","onBecomeUnobservedListeners","reportObserved","reportChanged","startBatch","observable","STALE","d","dependenciesState","UP_TO_DATE","isTracing","TraceMode","NONE","logTraceInfo","onBecomeStale","propagateChanged","endBatch","isAtom","createAtom","onBecomeObservedHandler","onBecomeUnobservedHandler","atom","comparer","identity","a","b","structural","deepEqual","default","is","shallow","extendStatics","setPrototypeOf","__proto__","__values","o","m","iterator","next","done","__read","r","ar","push","error","__spread","mobxDidRunLazyInitializersSymbol","mobxPendingDecorators","enumerableDescriptorCache","nonEnumerableDescriptorCache","createPropertyInitializerDescriptor","prop","cache","get","initializeInstance","set","target","e_1","_a","decorators","keys","keys_1","keys_1_1","propertyCreator","descriptor","decoratorTarget","decoratorArguments","e_1_1","return","createPropDecorator","propertyInitiallyEnumerable","decorator","applyImmediately","inheritedDecorators","quacksLikeADecorator","slice","args","deepEnhancer","v","_","isObservable","array","referenceEnhancer","newValue","createDecoratorForEnhancer","enhancer","propertyName","_decoratorTarget","decoratorArgs","initialValue","initializer","asObservableObject","addObservableProp","res","process","env","defaultCreateObservableOptions","deep","defaultDecorator","proxy","asCreateObservableOptions","deepDecorator","shallowDecorator","isObservableObject","isObservableMap","isObservableSet","refDecorator","refStructDecorator","oldValue","getEnhancerFromOptions","options","observableFactories","box","incorrectlyUsedAsDecorator","ObservableValue","equals","initialValues","createObservableArray","ObservableMap","ObservableSet","extendObservable","getDefaultDecoratorFromObjectOptions","base","createDynamicObservableObject","extendObservableObjectWithProperties","struct","arg2","arg3","methodName","computedDecorator","instance","addComputedProp","context","computedStructDecorator","computed","arg1","opts","ComputedValue","CaughtException","cause","isCaughtException","shouldCompute","derivation","POSSIBLY_STALE","prevAllowStateReads","allowStateReadsStart","prevUntracked","untrackedStart","obs","observing","l","isComputedValue","disableErrorBoundaries","untrackedEnd","allowStateReadsEnd","changeDependenciesStateTo0","isComputingDerivation","trackingDerivation","checkIfStateModificationsAreAllowed","hasObservers","computationDepth","allowStateChanges","enforceActions","trackDerivedFunction","f","newObserving","unboundDepsCount","runId","result","prevTracking","prevObserving","lowestNewObservingDerivationState","i0","dep","removeObserver","addObserver","bindDependencies","clearObserving","untracked","action","prev","allowStateReads","currentActionId","nextActionId","functionNameDescriptor","createAction","actionName","fn","executeAction","isMobxAction","scope","runInfo","_startAction","err","_endAction","startTime","prevDerivation","prevAllowStateChanges","allowStateChangesStart","notifySpy","actionId","parentActionId","suppressReactionErrors","allowStateChangesEnd","allowStateChangesInsideComputed","_super","_this","hasUnreportedChange","__","constructor","create","__extends","dehanceValue","dehancer","prepareNewValue","UNCHANGED","setNewValue","hasInterceptors","change","interceptChange","type","hasListeners","notifyListeners","intercept","handler","registerInterceptor","observe","fireImmediately","registerListener","toJSON","valueOf","isObservableValue","__mapid","isComputing","isRunningSetter","setter","compareStructural","requiresReaction","keepAlive","propagateMaybeChanged","inBatch","trackAndCompute","propagateChangeConfirmed","warnAboutUntrackedRead","computeValue","peek","wasSuspended","changed","track","suspend","firstTime","prevValue","autorun","prevU","persistentKeys","MobXGlobals","version","pendingUnobservations","pendingReactions","isRunningReactions","spyListeners","globalReactionErrorHandlers","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","computedConfigurable","mockGlobal","getGlobal","window","global","self","canMergeGlobalState","isolateCalled","__mobxInstanceCount","__mobxGlobals","setTimeout","getGlobalState","resetGlobalState","defaultGlobals","delete","queueForUnobservation","runReactions","list","console","log","BREAK","lines","printDepTree","depth","join","dependencies","getDependencyTree","Function","replace","Reaction","onInvalidate","errorHandler","requiresObservable","isDisposed","_isScheduled","_isTrackPending","_isRunning","schedule","isScheduled","runReaction","reportExceptionInDerivation","warn","dispose","getDisposer","bind","trace","enterBreakPoint","onReactionError","idx","splice","reactionScheduler","runReactionsHelper","allReactions","iterations","remainingReactions","isReaction","setReactionScheduler","baseScheduler","spy","dontReassignFields","namedActionDecorator","initializer_1","actionFieldDecorator","arg4","runInAction","isAction","defineBoundAction","view","reaction","scheduler","delay","reactionRunner","onError","scheduler_1","createSchedulerFromOptions","isScheduled_1","bound","applyToInstance","run","expression","effect","baseFn","effectAction","runSync","nextValue","interceptHook","hook","getAtom","cb","listenersKey","hookListeners","configure","isolateGlobalState","ea","decorate","_loop_1","propertyDecorators","newDescriptor","reduce","accDescriptor","properties","e_2","_b","keys_2","keys_2_1","resultDescriptor","e_2_1","property","nodeToDependencyTree","item","getObserverTree","nodeToObserverTree","getObservers","generatorId","FlowCancellationError","isFlowCancellationError","flow","generator","rejector","ctx","gen","pendingPromise","promise","Promise","resolve","reject","stepId","onFulfilled","ret","onRejected","throw","then","cancel","cancelPromise","yieldedPromise","interceptReads","propOrHandler","getAdministration","interceptProperty","interceptInterceptable","_isComputed","values","has","isComputed","isComputedProp","_isObservable","isObservableProp","getKeys","index","entries","adm","existingObservable","write","defaultEnhancer","parseInt","values_1","key_1","remove","propOrCb","cbOrFire","observeObservableProperty","observeObservable","defaultOptions","detectCycles","exportMapsAsObjects","recurseEverything","toJS","source","__alreadySeen","toJSHelper","Date","res_1","toAdd","res_2","res_3","res_4","res_5","_i","pop","getAtomFromArgs","LOG","transaction","thisArg","when","predicate","whenPromise","_when","timeoutHandle","timeout","disposer","clearTimeout","getAdm","isPropertyKey","val","objectProxyTraps","deleteProperty","keysAtom","preventExtensions","Proxy","interceptable","interceptors","listenable","changeListeners","listeners","arrayTraps","getArrayLength","arrayExtensions","isNaN","setArrayLength","owned","ObservableArrayAdministration","spliceWithArray","lastKnownLength","newV","oldV","dehanceValues","added","addedCount","removed","removedCount","newLength","currentLength","newItems","updateArrayLength","oldLength","delta","deleteCount","Math","max","min","spliceItemsIntoValues","notifyArraySplice","notifyArrayChildUpdate","notify","clear","items","shift","unshift","reverse","clone","sort","compareFn","funcName","dehancedValues","callback","element","accumulator","currentValue","isObservableArrayAdministration","_a$1","ObservableMapMarker","initialData","_keysAtom","toStringTag","_data","_hasMap","merge","_has","entry","newEntry","hasKey","_updateValue","_addValue","_updateHasMapEntry","makeIterable","_c","_d","_e","other","e_3","e_4","replacementMap","dataStructure","convertToMap","orderedData","keysReportChangedCalled","e_3_1","_f","_g","_h","keyExisted","value_1","e_4_1","iter1","iter2","next1","next2","toPOJO","e_5","e_5_1","ObservableSetMarker","_atom","callbackFn","nextIndex","observableValues","ObservableObjectAdministration","read","pendingKeys","exists","observablePropertyConfigs","generateObservablePropConfig","notifyPropertyAddition","propertyOwner","computedPropertyConfigs","getAdministrationForComputedPropOwner","generateComputedPropConfig","oldObservable","illegalAccess","owner","isObservableObjectAdministration","anyThing","getDebugName","eq","aStack","bStack","unwrap","areArrays","aCtor","bCtor","has$1","getSelf","__MOBX_DEVTOOLS_GLOBAL_HOOK__","injectMobx","extras","_extends","hookCallback","some","hooks","input","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","arr","arrLen","extend","createUTC","format","locale","strict","createLocalOrUTC","utc","getParsingFlags","_pf","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","meridiem","rfc2822","weekdayMismatch","isValid","_isValid","flags","parsedParts","isNowValid","getTime","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","fun","len","momentProperties","updateInProgress","copyConfig","to","momentPropertiesLen","_isAMomentObject","_l","_tzm","_isUTC","_offset","_locale","Moment","config","updateOffset","isMoment","msg","suppressDeprecationWarnings","deprecate","deprecationHandler","arg","argLen","stack","deprecations","deprecateSimple","isFunction","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","number","targetLength","forceSign","absNumber","abs","zerosToFill","pow","substr","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","localeData","formatMoment","expandFormat","match","mom","output","makeFormatFunction","invalidDate","replaceLongDateFormatTokens","longDateFormat","lastIndex","test","aliases","addUnitAlias","unit","shorthand","lowerCase","toLowerCase","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","isLeapYear","year","absFloor","ceil","floor","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","month","date","daysInMonth","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","RegExp","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","modMonth","monthsShort","months","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","split","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","dayOfMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","daysInYear","y","parseTwoDigitYear","getSetYear","createDate","h","M","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","dow","doy","fwd","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdays","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","day","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","hours","lowercase","minutes","matchMeridiem","_meridiemParse","seconds","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","globalLocale","getSetHour","baseConfig","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","LTS","LT","L","LL","LLL","LLLL","dayOfMonthOrdinalParse","relativeTime","future","past","ss","mm","hh","dd","w","ww","MM","yy","meridiemParse","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","isLocaleNameSane","_abbr","getSetGlobalLocale","getLocale","defineLocale","abbr","_config","parentLocale","names","j","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","string","exec","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","weekdayStr","parsedInput","getDay","checkWeekday","obsOffset","militaryOffset","numOffset","hm","calculateOffset","setUTCMinutes","getUTCMinutes","defaults","c","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","now","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","currentDateArray","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","_week","gg","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","hour","isPm","meridiemHour","meridiemFixWrap","erasConvertYear","prepareConfig","preparse","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromStringAndArray","createFromInputFallback","configFromString","dayOrDate","minute","second","millisecond","configFromObject","configFromInput","isUTC","prototypeMin","prototypeMax","pickBy","moments","ordering","Duration","duration","years","quarters","quarter","weeks","isoWeek","days","milliseconds","unitHasDecimal","orderLen","parseFloat","isDurationValid","_milliseconds","_days","_months","_bubble","isDuration","absRound","round","offset","separator","utcOffset","sign","offsetFromString","chunkOffset","matcher","parts","matches","cloneWithOffset","model","diff","setTime","local","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","diffRes","parseIso","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","direction","period","tmp","addSubtract","isAdding","invalid","subtract","isString","isMomentInput","arrayTest","dataTypeTest","filter","isNumberOrStringArray","objectTest","propertyTest","propertyLen","isMomentInputObject","isCalendarSpec","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormat","defaultFormatUtc","lang","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","abbrPieces","namePieces","narrowPieces","eras","narrow","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","eraYearOrdinalParse","isoWeekYear","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","preParsePostFormat","time","formats","sod","startOf","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","isoWeekday","inputString","postformat","withoutSuffix","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","u","getPrioritizedUnits","prioritizedLen","toArray","toObject","toDate","toISOString","keepOffset","inspect","prefix","suffix","zone","isLocal","for","unix","creationData","eraName","since","until","eraNarrow","eraAbbr","eraYear","dir","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","parseWeekday","parseIsoWeekday","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_isDSTShifted","array1","array2","dontConvert","lengthDiff","diffs","compareArrays","proto$1","get$1","field","listMonthsImpl","out","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","toUpperCase","tok","_invalidDate","_ordinal","isFuture","_relativeTime","pastFuture","_eras","isFormat","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","charAt","isLower","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","monthsFromDays","argWithSuffix","argThresholds","withSuffix","th","posNegDuration","relativeTime$1","toIsoString","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","limit","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","DATE","TIME","TIME_SECONDS","TIME_MS","WEEK","MONTH","factory","_typeof","_classCallCheck","Constructor","TypeError","_defineProperties","_createClass","protoProps","staticProps","_defineProperty","_inherits","subClass","superClass","_setPrototypeOf","_getPrototypeOf","_possibleConstructorReturn","ReferenceError","_assertThisInitialized","createCommonjsModule","reactIs_production_min","g","q","$$typeof","typeOf","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Profiler","Portal","StrictMode","isValidElementType","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isProfiler","isPortal","isStrictMode","__esModule","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","caller","callee","arity","TYPE_STATICS","render","objectPrototype","hoistNonReactStatics_cjs","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","EventEmitter","createChainableTypeChecker","validate","checkType","isRequired","componentName","location","propFullName","_len","rest","_key","actual","chainedCheckType","getPropType","propValue","propType","isSymbol","createObservableTypeCheckerCreator","allowNativeType","mobxType","mobxChecker","preciseType","getPreciseType","nativeTypeExpectationMessage","createObservableArrayOfTypeChecker","typeChecker","_len2","_key2","objectOrObservableObject","symbolId","createdSymbols","newSymbol","symbol","createSymbol","mobxMixins","mobxPatchedDefinition","getMixins","methodMixins","locks","methods","wrapper","realMethod","retVal","mx","wrapFunction","patch","_len3","mixinMethods","_key3","mixinMethod","oldDefinition","originalMethod","newDefinition","createDefinition","_ref","wrappedFunc","injectorContextTypes","mobxStores","seal","proxiedInjectorProps","isMobxInjector","createStoreInjector","grabStoresFn","component","injectNames","Injector","_Component","_getPrototypeOf2","storeRef","wrappedInstance","newProps","additionalProps","isStateless","wrappedComponent","defineProperties","grabStoresByName","storeNames","baseStores","nextProps","storeName","inject","componentClass","injected","observer","mobxAdminProperty","mobxIsUnmounted","isDevtoolsEnabled","isUsingStaticRendering","warnedAboutObserverInjectDeprecation","componentByNodeRegistry","WeakMap","renderReporter","skipRenderKey","isForcingUpdateKey","ReactForwardRefSymbol","_props","setHiddenProp","findDOMNode$2","reportRendering","emit","event","renderTime","__$mobRenderEnd","__$mobRenderStart","totalTime","errorsReporter","shallowEqual","objA","objB","keysA","keysB","makeComponentReactive","_this2","reactiveRender","isRenderingPending","exception","rendering","baseRender","initialName","rootNodeID","_reactInternalInstance","_rootNodeID","_debugID","_reactInternalFiber","componentWillReact","hasError","forceUpdate","reactComponent","reactiveMixin","componentWillUnmount","componentDidMount","componentDidUpdate","shouldComponentUpdate","nextState","state","makeObservableProp","valueHolderKey","atomHolderKey","_baseRender","_arguments","Observer","isReactClass","isPrototypeOf","_class","_temp","observerComponent","patch$1","mixinLifecycleEvents","isMobXReactObserver","_ref2","observerInject","InjectComponent","ObserverPropsCheck","extraKey","componentWillMount","setState","componentWillReceiveProps","prevState","componentWillUpdate","prevProps","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","__suppressDeprecationWarning","specialReactKeys","Provider","copyStores","only","stores","validStoreName","suppressChangedStoreWarning","Component$$1","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","newApiName","maybeSnapshot","snapshot","polyfill","mobx","mobxReact","componentByNodeRegistery","trackComponents","injectMobxReact","_objectWithoutPropertiesLoose","excluded","sourceKeys","hasOwn","classNames","classes","argType","inner","DEVICE_SIZES","Col","_ref$as","Component","spans","brkPoint","span","order","_propValue$span","infix","ThemeContext","createContext","useBootstrapPrefix","defaultPrefix","prefixes","Row","noGutters","decoratedBsPrefix","sizePrefix","cols","Container","fluid","BrowserRouter","_React$Component","history","HashRouter","resolveToLocation","currentLocation","normalizeToLocation","forwardRefShim","C","LinkAnchor","forwardedRef","innerRef","navigate","_onClick","onClick","ex","preventDefault","defaultPrevented","button","metaKey","altKey","ctrlKey","shiftKey","isModifiedEvent","Link","_ref2$component","href","createHref","forwardRefShim$1","forwardRef$1","NavLink","_ref$ariaCurrent","ariaCurrent","_ref$activeClassName","activeClassName","activeStyle","classNameProp","exact","isActiveProp","isActive","locationProp","sensitive","styleProp","toLocation","path","pathname","escapedPath","classnames","joinClassnames","CardImg","DivStyledAsH5","divWithClassName","DivStyledAsH6","CardBody","createWithBsPrefix","CardTitle","CardSubtitle","CardLink","CardText","CardHeader","CardFooter","CardImgOverlay","Card","bg","text","border","body","cardContext","cardHeaderBsPrefix","CardContext","Img","Title","Subtitle","Body","Text","Header","Footer","ImgOverlay","Badge","pill","historyContext","createNamedContext","createNamedContext$1","Router","_isMounted","_pendingLocation","staticContext","unlisten","listen","computeRootMatch","url","params","isExact","_proto","MemoryRouter","Lifecycle","onMount","onUpdate","onUnmount","Prompt","_ref$when","method","block","release","cacheCount","generatePath","compile","compilePath","pretty","Redirect","computedMatch","_ref$push","prevLocation","cache$1","cacheCount$1","matchPath","_options","_options$exact","_options$strict","_options$sensitive","_compilePath","cacheKey","end","pathCache","regexp","compilePath$1","memo","Route","context$1","_this$props","addLeadingSlash","stripBasename","basename","createURL","staticHandler","StaticRouter","handlePush","navigateTo","handleReplace","handleListen","handleBlock","_this$props$basename","_this$props$context","addBasename","_this$props2","_this$props2$basename","_this$props2$context","_this$props2$location","go","goBack","goForward","Switch","Children","isValidElement","cloneElement","withRouter","wrappedComponentRef","remainingProps","WrappedComponent","useContext","useHistory","useLocation","useParams","useRouteMatch","FormContext","controlId","rHyphen","str","chr","_ref$displayName","BsComponent","_ref2$as","Tag","resolvedPrefix","timezone","timezoneClip","mask","gmt","kindOf","maskSlice","masks","D","H","getWeek","N","getDayOfWeek","pad","ddd","i18n","dayNames","dddd","mmm","monthNames","mmmm","yyyy","HH","timeNames","tt","T","TT","Z","S","targetThursday","setDate","firstThursday","ds","setHours","getHours","weekDiff","_inheritsLoose","InputGroupAppend","InputGroupPrepend","InputGroupText","InputGroup","InputGroupWithExtras","Radio","Checkbox","Append","Prepend","FormControl","_classes","bsCustomPrefix","htmlSize","id","_ref$isValid","_ref$isInvalid","isInvalid","plaintext","readOnly","custom","_classes2","_classes3","_classes4","_classes5","Feedback","checkDCE","__REACT_DEVTOOLS_GLOBAL_HOOK__","isAbsolute","spliceOne","hasTrailingSlash","toParts","fromParts","isToAbs","isFromAbs","mustEndAbs","last","up","part","valueEqual","every","aValue","bValue","stripLeadingSlash","hasBasename","stripTrailingSlash","createPath","search","hash","createLocation","hashIndex","searchIndex","parsePath","decodeURI","URIError","locationsAreEqual","createTransitionManager","prompt","setPrompt","nextPrompt","confirmTransitionTo","getUserConfirmation","appendListener","canUseDOM","document","getConfirmation","confirm","getHistoryState","createBrowserHistory","ua","globalHistory","canUseHistory","navigator","userAgent","needsHashChangeListener","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","getDOMLocation","historyState","_window$location","createKey","random","transitionManager","handlePopState","isExtraneousPopstateEvent","handlePop","handleHashChange","forceNextPop","ok","fromLocation","toIndex","allKeys","fromIndex","revertPop","initialLocation","listenerCount","checkDOMListeners","addEventListener","removeEventListener","isBlocked","pushState","prevIndex","nextKeys","replaceState","unblock","HashPathCoders","hashbang","encodePath","decodePath","noslash","slash","stripHash","getHashPath","substring","replaceHashPath","createHashHistory","_props$hashType","hashType","_HashPathCoders$hashT","ignorePath","encodedPath","allPaths","lastIndexOf","baseTag","querySelector","getAttribute","pushHashPath","nextPaths","clamp","lowerBound","upperBound","createMemoryHistory","_props$initialEntries","initialEntries","_props$initialIndex","initialIndex","nextEntries","canGo","condition","SelectableContext","makeEventKey","eventKey","sizes","nospace","one","places","numOnly","mysize","fixed","Number","_chart","Scatter","Bubble","Polar","Radar","HorizontalBar","Bar","Line","Pie","Doughnut","_react","_interopRequireDefault","_propTypes","_isEqual","_keyBy","_objectWithoutProperties","sourceSymbolKeys","propertyIsEnumerable","enumerableOnly","symbols","sym","_objectSpread","getOwnPropertyDescriptors","_createSuper","Derived","hasNativeReflectConstruct","construct","sham","_isNativeReflectConstruct","Super","NewTarget","NODE_ENV","ChartComponent","chartInstance","getDatasetAtEvent","getElementAtEvent","getElementsAtEvent","onElementsClick","renderChart","redraw","destroyChart","updateChart","plugins","legend","nextData","transformDataProp","shadowDataProp","datasets","saveCurrentDatasets","isDev","usingCustomKeyProvider","datasetKeyProvider","getLabelAsKey","multipleDatasets","shouldWarn","dataset","label","getCurrentDatasets","_this3","memoizeDataProps","helpers","configMerge","currentDatasets","nextDatasets","checkDatasets","currentDatasetsIndexed","current","point","pid","otherProps","update","_this$props3","destroy","_this$props4","handleOnClick","oneOfType","arrayOf","bool","controllers","display","position","_default","_React$Component2","_super2","_this4","_React$Component3","_super3","_this5","_React$Component4","_super4","_this6","_ref3","_React$Component5","_super5","_this7","_ref4","_React$Component6","_super6","_this8","_ref5","_React$Component7","_super7","_this9","_ref6","_React$Component8","_super8","_this10","_ref7","_React$Component9","_super9","_this11","_ref8","_React$Component10","_super10","_this12","_ref9","defaultKey","_toPropertyKey","hint","prim","_toPrimitive","useUncontrolledProp","defaultValue","wasPropRef","_useState","stateValue","isProp","wasProp","useUncontrolled","fieldName","_extends2","propsValue","handlerName","_useUncontrolledProp","EXITED","ENTERING","ENTERED","EXITING","Transition","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","status","nextCallback","updateStatus","nextStatus","cancelNextCallback","getTimeouts","exit","mounting","performEnter","performExit","appearing","nodeRef","findDOMNode","maybeNode","maybeAppearing","timeouts","enterTimeout","safeSetState","onEntered","onEnter","onEntering","onTransitionEnd","onExit","onExiting","onExited","setNextCallback","active","doesNotHaveTimeoutOrListener","addEndListener","maybeNextCallback","childProps","TransitionGroupContext","UNMOUNTED","freeGlobal","freeSelf","root","useEventCallback","Viva","lazyExtend","randomIterator","events","Graph","graph","serializer","loadFromJSON","storeToJSON","centrality","operations","geom","intersect","intersectRect","webgl","webglInputEvents","Input","domInputManager","webglInputManager","Utils","dragndrop","findElementPosition","timer","getDimension","Layout","forceDirected","constant","View","Texture","webglAtlas","webglImageNodeProgram","webglLinkProgram","webglNodeProgram","webglLine","webglSquare","webglImage","webglGraphics","_webglUtil","parseColor","svgGraphics","renderer","cssGraphics","svgNodeFactory","community","Rect","svg","BrowserInfo","funcs","acc","optionsSupported","onceSupported","eventName","capture","wrappedHandler","__once","onceHandler","NavItem","disabled","SafeAnchor","onSelect","AbstractNavItem","Nav","uncontrolledProps","_classNames","navbarBsPrefix","justify","navbar","isNavbar","navbarContext","NavbarContext","AbstractNav","baseIsNative","getValue","subject","reservedWords","validateSubject","eventsStorage","registeredEvents","on","handlers","off","callbacks","fire","fireArguments","callbackInfo","createEventsStorage","warning","safeFindDOMNode","componentOrElement","LinkContainer","IndexLinkContainer","_IndexLinkContainer3","_LinkContainer3","targetHasIt","optionsValueType","tooltip","elementType","_ref$type","_ref$tooltip","isTrivialHref","trim","onKeyDown","handleClick","stopPropagation","role","tabIndex","ownerDocument","_fadeStyles","fadeStyles","Fade","handleEnter","innerProps","getRawTag","objectToString","symToStringTag","inputSeed","seed","randomFunc","maxValue","nextDouble","customRandom","localRandom","shuffle","getComputedStyle","psuedoElement","doc","defaultView","ownerWindow","rUpper","msPattern","hyphenateStyleName","hyphenate","supportedTransforms","css","transforms","getPropertyValue","isTransform","removeProperty","cssText","NavbarBrand","_collapseStyles","MARGINS","getDefaultDimensionValue","dimension","margins","collapseStyles","getDimensionValue","Collapse","_ref$dimension","_ref$getDimensionValu","computedDimension","createChainedFunction","handleEntering","scroll","handleEntered","handleExit","triggerBrowserReflow","handleExiting","transitionEnd","NavbarCollapse","expanded","NavbarToggle","onToggle","NavbarText","Navbar","expand","sticky","_onToggle","collapseOnSelect","handleCollapse","expandClass","Brand","Toggle","Popover","placement","content","arrowProps","popper","show","primaryPlacement","Content","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","nativeCreate","getNative","isKeyable","__data__","validators","allPropTypes","validator","_createChainableTypeChecker2","_createChainableTypeChecker","copyArrayPart","elementsCount","swapArrayPart","gl","createProgram","vertexShaderSrc","fragmentShaderSrc","program","vs","createShader","VERTEX_SHADER","fs","FRAGMENT_SHADER","attachShader","linkProgram","getProgramParameter","LINK_STATUS","getShaderInfoLog","alert","extendArray","buffer","itemsInBuffer","elementsPerItem","extendedArray","Float32Array","getLocations","uniformOrAttributeNames","foundLocations","getAttribLocation","getUniformLocation","shaderText","shader","shaderSource","compileShader","getShaderParameter","COMPILE_STATUS","toFnRef","refA","refB","mergeRefs","NavContext","navKey","parentOnSelect","navContext","contextControllerId","getControllerId","contextControlledId","getControlledId","handleOnclick","Table","striped","bordered","borderless","hover","responsive","table","responsiveClass","Spinner","animation","bsSpinnerPrefix","emulateTransitionEnd","padding","called","handle","evt","createEvent","initEvent","dispatchEvent","triggerTransitionEnd","mult","removeEmulate","offsetHeight","contains","compareDocumentPosition","useMounted","mounted","isMounted","getBasePlacement","getLayoutRect","offsetLeft","offsetTop","offsetWidth","getWindow","isHTMLElement","HTMLElement","parent","rootNode","getRootNode","ShadowRoot","isSameNode","parentNode","host","getNodeName","nodeName","isTableElement","getDocumentElement","documentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","html","getOffsetParent","currentNode","transform","perspective","willChange","getContainingBlock","getMainAxisFromPlacement","within","mergePaddingObject","paddingObject","top","right","bottom","left","expandToHashMap","hashMap","basePlacements","variationPlacements","modifierPhases","enabled","phase","_state$modifiersData$","arrowElement","elements","arrow","popperOffsets","modifiersData","basePlacement","axis","arrowRect","minProp","maxProp","endDiff","rects","reference","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","axisProp","centerOffset","_options$element","_options$padding","requires","requiresIfExists","unsetSides","mapToStyles","_Object$assign2","popperRect","offsets","gpuAcceleration","adaptive","_roundOffsets","dpr","devicePixelRatio","roundOffsets","hasX","hasY","sideX","sideY","win","_Object$assign","commonStyles","_options$gpuAccelerat","_options$adaptive","styles","strategy","attributes","passive","_options$scroll","_options$resize","resize","scrollParents","scrollParent","getOppositePlacement","start","getOppositeVariationPlacement","getBoundingClientRect","rect","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","isScrollParent","_getComputedStyle","overflowX","overflowY","listScrollParents","getScrollParent","isBody","visualViewport","updatedList","rectToClientRect","getClientRectFromMixedType","clippingParent","getViewportRect","clientTop","clientLeft","getInnerBoundingClientRect","winScroll","scrollWidth","scrollHeight","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","getVariation","computeOffsets","variation","commonX","commonY","mainAxis","detectOverflow","_options$placement","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","altContext","referenceElement","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","overflows","computeAutoPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","_loop","fittingPlacement","find","reset","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_mainSide","_altSide","_preventedOffset","getCompositeRect","elementOrVirtualElement","isFixed","isOffsetParentAnElement","modifiers","visited","modifier","depModifier","DEFAULT_OPTIONS","areValidElements","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","pending","orderedModifiers","effectCleanupFns","isDestroyed","setOptions","cleanupModifierEffects","orderModifiers","merged","existing","mergeByName","_ref3$options","cleanupFn","_state$elements","_state$orderedModifie","_state$orderedModifie2","onFirstUpdate","eventListeners","useForceUpdate","needsRefocusRef","tabContext","listNode","getNextActiveChild","currentListNode","activeChild","handleSelect","focus","mergedRef","useMergedRefs","nextActiveChild","rbEventKey","hasClass","classList","baseVal","webpackPolyfill","paths","baseIsEqualDeep","isObjectLike","baseIsEqual","bitmask","customizer","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","arrayLikeKeys","baseKeys","reIsDeepProp","reIsPlainProp","baseGetTag","multigraph","uniqueLinkId","nodes","links","multiEdges","nodesCount","suspendEvents","forEachNode","objectKeysIterator","forInIterator","createLink","fromId","toId","linkId","makeLinkId","isMultiEdge","getLink","changes","recordLinkChange","recordNodeChange","enterModification","exitModification","graphPart","addNode","addLink","fromNode","getNode","toNode","link","addLinkToNode","removeLink","removeNode","getNodesCount","getLinksCount","getLinks","nodeId","forEachLinkedNode","oriented","forEachOrientedLink","linkedNodeId","forEachNonOrientedLink","forEachLink","beginUpdate","endUpdate","hasLink","hasNode","eventify","realOn","enterModificationReal","exitModificationReal","recordLinkChangeReal","recordNodeChangeReal","monitorSubscribers","changeType","Node","prevLinks","indexOfElementInArray","fromNodeId","toNodeId","graphics","nodeEvents","bindDragNDrop","nodeUI","getNodeUI","onStart","onDrag","onStop","drag","prevSelectStart","prevDragStart","dragObject","startX","startY","touchInProgress","pinchZoomLength","move","clientX","clientY","cancelBubble","handleDisabledEvent","handleMouseMove","handleMouseDown","srcElement","documentEvents","handleMouseUp","onselectstart","ondragstart","handleMouseWheel","returnValue","mousePos","posx","posy","pageX","pageY","getMousePos","elementOffset","relMousePos","wheelDelta","detail","updateScrollEvents","scrollCallback","browserInfo","browser","getPinchZoomLength","finger1","finger2","handleTouchMove","touches","touch","currentPinchLength","handleTouchEnd","handleTouchStart","handleSignleFingerTouch","onScroll","augment","settings","parsedColor","compileTemplate","domEvents","xlinkns","attrBag","svgElement","compiledTempalte","createElementNS","simplesvg","append","dataSource","useCapture","appendChild","setAttributeNS","removeAttributeNS","getAttributeNS","textContent","attributeName","argIndex","framesToPop","commonjsGlobal","globalThis","createEventEmitter","changedBits","calculateChangedBits","_Provider$childContex","_Consumer$contextType","contextProp","emitter","getChildContext","_Component2","observedBits","_proto2","isarray","pathToRegexp","parse","tokensToFunction","tokensToRegExp","PATH_REGEXP","defaultDelimiter","delimiter","escaped","group","asterisk","partial","repeat","optional","pattern","escapeGroup","escapeString","encodeURIComponentPretty","encodeURI","charCodeAt","encode","encodeURIComponent","segment","JSON","stringify","attachKeys","re","route","endsWithDelimiter","groups","regexpToRegexp","arrayToRegexp","stringToRegexp","Button","useCallbackRef","resolveContainerRef","nodeType","useWaitForDOMRef","onResolved","resolvedRef","setRef","earlyRef","nextRef","__WEBPACK_EXTERNAL_MODULE__0__","modules","installedModules","__webpack_require__","moduleId","mode","ns","__webpack_exports__","_descriptor","external_root_Mobx_commonjs2_mobx_commonjs_mobx_amd_mobx_","_applyDecoratedDescriptor","desc","RouterStore","newState","sync_syncHistoryWithStore","store","handleLocationChange","_updateLocation","unsubscribeFromHistory","subscribe","unsubscribeFromStore","rawLocation","unsubscribe","MAX_DELAY_MS","useTimeout","handleRef","useWillUnmount","delayMs","setChainedTimeout","timeoutAtMs","Overlay","outerRef","flip","_props$containerPaddi","containerPadding","_props$popperConfig","popperConfig","transition","_useCallbackRef","rootElement","attachRef","_useCallbackRef2","attachArrowRef","container","exited","setExited","_usePopper","usePopper","mergeOptionsWithPopperConfig","enableEvents","mountOverlay","useRootClose","onHide","rootClose","rootCloseDisabled","clickTrigger","rootCloseEvent","createPortal","oneOf","any","_PropTypes$func","getMargins","marginTop","marginRight","marginBottom","marginLeft","overlayRef","overlay","_ref$popperConfig","outerProps","popperRef","_usePopperMarginModif","margin","_margins$current","_getMargins","marginModifiers","actualTransition","overlayProps","aRef","__wrapped","wrapRefs","scheduleUpdate","outOfBoundaries","hide","RefHolder","handleMouseOverOut","relatedNative","currentTarget","related","relatedTarget","nativeEvent","OverlayTrigger","trigger","propsShow","_ref$defaultShow","defaultShow","propsDelay","_ref$flip","triggerNodeRef","hoverStateRef","setShow","normalizeDelay","onFocus","onBlur","getTarget","handleShow","handleHide","handleFocus","handleBlur","handleMouseOver","handleMouseOut","_len4","_key4","triggers","triggerProps","onMouseOver","onMouseOut","propIsEnumerable","test1","test2","fromCharCode","test3","letter","shouldUseNative","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","marker","runClearTimeout","nextTick","argv","versions","addListener","removeListener","removeAllListeners","prependListener","prependOnceListener","binding","cwd","chdir","umask","moment","colorName","conversions","reverseKeywords","convert","rgb","channels","labels","hsl","hsv","hwb","cmyk","xyz","lab","lch","hex","keyword","ansi16","ansi256","hcg","apple","gray","rdif","gdif","bdif","diffc","reversed","currentClosestKeyword","currentClosestDistance","Infinity","z","t1","t2","t3","smin","lmin","hi","sl","vmin","wh","bl","ratio","y2","x2","z2","atan2","PI","sqrt","hr","cos","sin","ansi","rem","colorString","char","integer","hue","chroma","mg","pure","deriveBFS","fromModel","models","buildGraph","adjacents","adjacent","wrapConversion","toModel","cur","conversion","routes","wrappedFn","wrapRounded","raw","wrapRaw","colorConvert","colorName$1","getRgba","getHsla","getRgb","rgba","getHsl","hsla","getHwb","getAlpha","vals","hexString","hexDouble","rgbString","alpha","rgbaString","percentString","percentaString","hslString","hslaString","hwbString","reverseNames","hexAlpha","scale","num","Color","valid","setValues","red","lightness","whiteness","cyan","setSpace","rgbArray","hslArray","hsvArray","hwbArray","cmykArray","rgbaArray","hslaArray","setChannel","green","blue","saturation","saturationv","blackness","magenta","yellow","black","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","dark","light","negate","lighten","darken","saturate","desaturate","whiten","blacken","greyscale","clearer","opaquer","rotate","degrees","mix","mixinColor","weight","w1","w2","spaces","maxes","getValues","space","capped","chans","sname","svalues","chartjsColor","isValidKey","uid","isNullOrUndef","valueOrDefault","valueAtIndexOrDefault","each","loopable","arrayEquals","a0","a1","ilen","v0","v1","klen","_merger","tval","sval","_mergerIf","mergeIf","sources","merger","dst","src","inherits","extensions","me","ChartElement","Surrogate","__super__","_deprecated","previous","helpers_core","callCallback","getValueOrDefault","getValueAtIndexOrDefault","effects","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInElastic","asin","easeOutElastic","easeInOutElastic","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","helpers_easing","easingEffects","RAD_PER_DEG","DOUBLE_PI","HALF_PI","QUARTER_PI","TWO_THIRDS_PI","exports$1","chart","clearRect","roundedRect","radius","moveTo","arc","closePath","drawPoint","rotation","xOffset","yOffset","cornerRadius","rad","save","translate","drawImage","restore","beginPath","lineTo","SQRT1_2","_isPointInArea","area","clipArea","clip","unclipArea","stepped","steppedLine","midpoint","tension","bezierCurveTo","controlPointPreviousX","controlPointNextX","controlPointPreviousY","controlPointNextY","helpers_canvas","drawRoundedRectangle","_set","defaultColor","defaultFontColor","defaultFontFamily","defaultFontSize","defaultFontStyle","defaultLineHeight","showLines","core_defaults","helpers_options","toLineHeight","toPadding","_parseFont","globalDefaults","fontSize","font","family","fontFamily","lineHeight","fontStyle","toFontString","inputs","info","cacheable","exports$2","_factorize","log10","exponent","LOG10E","powerOf10","helpers_math","helpers$1","easing","canvas","math","rtl","getRtlAdapter","rectX","setWidth","textAlign","align","xPlus","leftForLtr","itemWidth","_itemWidth","overrideTextDirection","original","getPropertyPriority","setProperty","prevTextDirection","restoreTextDirection","configuration","initialize","_type","hidden","pivot","_view","_model","_start","ease","origin","c0","c1","interpolate","tooltipPosition","hasValue","core_element","exports$3","currentStep","numSteps","onAnimationProgress","onAnimationComplete","core_animation","onProgress","onComplete","core_animations","animations","request","addAnimation","lazy","animating","requestAnimationFrame","cancelAnimation","findIndex","requestAnimFrame","startDigest","advance","nextStep","arrayEvents","unlistenArrayEvents","stub","_chartjs","DatasetController","datasetIndex","datasetElementType","dataElementType","_datasetElementOptions","_dataElementOptions","linkScales","addElements","getMeta","updateIndex","meta","scales","getDataset","scalesOpts","xAxisID","xAxes","yAxisID","yAxes","getDatasetMeta","getScaleForId","scaleID","_getValueScaleId","_getIndexScaleId","_getValueScale","_getIndexScale","_update","createMetaDataset","_datasetIndex","createMetaData","_index","metaData","addElementAndReset","updateElement","buildOrUpdateElements","isExtensible","resyncElements","_configure","_cachedDataOpts","easingValue","draw","getStyle","_resolveDatasetElementOptions","_resolveDataElementOptions","backgroundColor","borderColor","readKey","datasetOpts","elementOptions","cached","dataIndex","removeHoverStyle","$previousStyle","setHoverStyle","getHoverColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","_removeDatasetHoverStyle","_setDatasetHoverStyle","hoverOptions","numMeta","numData","insertElements","count","onDataPush","onDataPop","onDataShift","onDataSplice","onDataUnshift","core_datasetController","TAU","clipArc","startAngle","endAngle","pixelMargin","angleMargin","outerRadius","innerRadius","drawBorder","vm","borderAlign","lineWidth","lineJoin","fullCircles","drawFullCircleBorders","element_arc","inLabelRange","mouseX","hoverRadius","inRange","chartX","chartY","pointRelativePosition","getAngleFromPoint","angle","betweenAngles","withinRadius","getCenterPoint","halfAngle","halfRadius","getArea","centreAngle","rangeFromCentre","circumference","fillStyle","strokeStyle","valueOrDefault$1","line","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","capBezierPoints","element_line","currentVM","spanGaps","points","_children","globalOptionLineElements","lastDrawnIndex","previousItem","skip","lineCap","setLineDash","lineDashOffset","valueOrDefault$2","defaultColor$1","xRange","hitRadius","pointStyle","element_point","mouseY","inXRange","inYRange","chartArea","defaultColor$2","getBarBounds","x1","y1","half","swap","orig","v2","parseBorderWidth","maxW","maxH","edge","borderSkipped","parseBorderSkipped","skipX","skipY","bounds","rectangle","element_rectangle","outer","boundingRects","fillRect","Arc","Point","Rectangle","deprecated","valueOrDefault$3","computeFitCategoryTraits","ruler","thickness","barThickness","stackCount","curr","pixels","_length","getTicks","getPixelForTick","computeMinSampleSize","categoryPercentage","barPercentage","chunk","gridLines","offsetGridLines","bar","controller_bar","scaleOpts","minBarLength","maxBarThickness","_ruler","getRuler","_xScale","_yScale","datasetLabel","_updateElementGeometry","vscale","getBasePixel","isHorizontal","vpixels","calculateBarValuePixels","ipixels","calculateBarIndexPixels","head","_getStacks","metasets","_getMatchingVisibleMetas","stacked","stacks","getStackCount","getStackIndex","getPixelForValue","_startPixel","_endPixel","imeta","ivalue","stackLength","_parseValue","range","percent","computeFlexCategoryTraits","stackIndex","indexOpts","valueOpts","valueOrDefault$4","resolve$1","tooltips","dataPoint","xLabel","yLabel","controller_bubble","xScale","yScale","dsIndex","getPixelForDecimal","valueOrDefault$5","PI$1","DOUBLE_PI$1","HALF_PI$1","animateRotate","animateScale","legendCallback","listItem","setAttribute","createTextNode","outerHTML","generateLabels","controller","legendItem","cutoutPercentage","tooltipItem","dataLabel","controller_doughnut","getRingIndex","ringIndex","isDatasetVisible","maxWidth","maxHeight","ratioX","ratioY","offsetX","offsetY","arcs","cutout","chartWeight","_getRingWeight","endX","endY","contains0","contains90","contains270","minX","minY","maxX","maxY","getMaxBorderWidth","radiusLength","_getVisibleDatasetWeightTotal","calculateTotal","_getRingWeightOffset","animationOpts","centerX","centerY","calculateCircumference","hoverWidth","ringWeightOffset","dataSetIndex","horizontalBar","controller_horizontalBar","valueOrDefault$6","resolve$2","isPointInArea","scaleClip","halfBorderWidth","tickOpts","ticks","defaultClip","toClip","controller_line","showLine","_showLine","lineTension","_scale","updateBezierControlPoints","lineModel","calculatePointY","lineOptions","dsMeta","stackedRightValue","rightValue","sumPos","sumNeg","getRightValue","_getSortedVisibleDatasetMetas","controlPoints","capControlPoint","pt","cubicInterpolationMode","splineCurveMonotone","splineCurve","nextItem","resolve$3","angleLines","circular","pointLabels","beginAtZero","controller_polarArea","starts","_starts","angles","_angles","_updateRadius","countVisibleElements","_computeAngle","minSize","getVisibleDatasetCount","xCenter","yCenter","datasetStartAngle","getDistanceFromCenterForValue","resetRadius","doughnut","controller_pie","valueOrDefault$7","controller_radar","pointPosition","getPointPositionForValue","scatter","bubble","polarArea","pie","radar","getRelativePosition","native","parseVisibleItems","metadata","jlen","getIntersectItems","getNearestItems","distanceMetric","minDistance","POSITIVE_INFINITY","nearestItems","getDistanceMetricForAxis","useX","useY","pt1","pt2","deltaX","deltaY","indexMode","core_interaction","modes","single","nearest","intersectsItem","filterByPosition","where","sortByWeight","getCombinedMax","maxPadding","updateDims","layout","newWidth","newHeight","getPadding","boxPadding","outerWidth","outerHeight","marginForPositions","positions","fitBoxes","boxes","refit","refitBoxes","fullWidth","placeBoxes","userPadding","core_layouts","addBox","_layers","removeBox","layoutItem","layoutOptions","availableWidth","availableHeight","layoutBoxes","wrapBoxes","leftAndTop","rightAndBottom","vertical","buildLayoutBoxes","verticalBoxes","horizontalBoxes","vBoxMaxWidth","hBoxMaxHeight","layouts","setLayoutDims","updatePos","handleMaxPadding","stylesheet","ANIMATION_START_EVENTS","EVENT_TYPES","touchstart","touchmove","touchend","pointerenter","pointerdown","pointermove","pointerup","pointerleave","pointerout","readUsedSize","eventListenerOptions","supports","createDiv","cls","el","addResizeListener","ticking","expando","resizer","CSS_PREFIX","CSS_SIZE_MONITOR","shrink","_reset","createResizer","maintainAspectRatio","renderProxy","animationName","reflow","watchForRender","insertBefore","firstChild","removeResizeListener","unwatchForRender","removeChild","platform_dom$2","disableCSSInjection","_enabled","_ensureLoaded","containsStyles","injectCSS","acquireContext","getElementById","getContext","renderHeight","renderWidth","initial","displayWidth","aspectRatio","displayHeight","initCanvas","releaseContext","removeAttribute","proxies","fromNativeEvent","addEvent","removeEvent","implementation","platform","core_plugins","_plugins","_cacheId","register","plugin","unregister","getAll","descriptors","$plugins","_invalidate","core_scaleService","constructors","registerScaleType","scaleConstructor","scaleDefaults","getScaleConstructor","getScaleDefaults","updateScaleDefaults","additions","addScalesToLayout","valueOrDefault$8","getRtlHelper","titleFontStyle","titleSpacing","titleMarginBottom","titleFontColor","titleAlign","bodySpacing","bodyFontColor","bodyAlign","footerFontStyle","footerSpacing","footerMarginTop","footerFontColor","footerAlign","yPadding","xPadding","caretPadding","caretSize","multiKeyBackground","displayColors","beforeTitle","tooltipItems","labelCount","afterTitle","beforeBody","beforeLabel","labelColor","labelTextColor","afterLabel","afterBody","beforeFooter","footer","afterFooter","positioners","average","eventPosition","nearestElement","distanceBetweenPoints","tp","pushOrConcat","toPush","splitNewlines","getBaseModel","tooltipOpts","xAlign","yAlign","textDirection","_bodyFontFamily","bodyFontFamily","_bodyFontStyle","bodyFontStyle","_bodyAlign","bodyFontSize","_titleFontFamily","titleFontFamily","_titleFontStyle","titleFontSize","_titleAlign","_footerFontFamily","footerFontFamily","_footerFontStyle","footerFontSize","_footerAlign","opacity","legendColorBackground","getAlignedX","getBeforeAfterBodyLines","exports$4","_lastActive","getTitle","getBeforeBody","getBody","bodyItems","bodyItem","before","after","getAfterBody","getFooter","indexScale","valueScale","existingModel","_active","alignment","backgroundPoint","tooltipSize","caretX","caretY","labelColors","labelTextColors","_eventPosition","getLabelForIndex","itemSort","dataPoints","combinedBodyLength","titleLineCount","footerLineCount","widthPadding","maxLineWidth","measureText","fontString","getTooltipSize","paddingAndSize","radiusAndPadding","getBackgroundPoint","lf","rf","olf","orf","yf","midX","midY","determineAlignment","drawCaret","tooltipPoint","caretPosition","getCaretPosition","x3","y3","ptX","ptY","drawTitle","rtlHelper","textBaseline","fillText","drawBody","textColor","drawColorBoxes","xLinePadding","colorX","fillLineOfText","bodyAlignForCalculation","rtlColorX","strokeRect","drawFooter","drawBackground","quadraticCurveTo","hasTooltipContent","globalAlpha","handleEvent","getElementsAtEventForMode","positioners_1","core_tooltip","valueOrDefault$9","mergeScaleConfig","slen","mergeConfig","updateConfig","newOptions","ensureScalesHaveIDs","buildOrUpdateScales","nextAvailableScaleId","axesOpts","hasId","positionIsHorizontal","compare2Level","l1","l2","onHover","animationDuration","responsiveAnimationDuration","Chart","initConfig","_bufferedRender","instances","retinaScale","bindEvents","initToolTip","stop","silent","getMaximumWidth","getMaximumHeight","newSize","onResize","scalesOptions","scaleOptions","xAxisOptions","yAxisOptions","updated","dtype","dposition","isDefault","scaleType","scaleClass","mergeTicksOptions","hasUpdated","buildOrUpdateControllers","newControllers","destroyDatasetMeta","ControllerClass","resetElements","updateLayout","updateDatasets","lastActive","_bufferedRequest","_idx","updateDataset","animationOptions","animationObject","easingFunction","stepDecimal","layers","drawDatasets","_drawTooltip","_getSortedDatasetMetas","filterVisible","drawDataset","getElementsAtXAxis","_meta","generateLegend","unbindEvents","toBase64Image","toDataURL","_chartInstance","_listeners","eventHandler","updateHoverStyle","bufferedRequest","core_controller","abstract","DateAdapter","Controller","types","scaleMerge","_create","override","members","core_adapters","_date","core_ticks","formatters","tickValue","logDelta","tickString","logTick","numExponential","toExponential","numDecimal","logarithmic","remain","valueOrDefault$a","getPixelForGridLine","validIndex","lineValue","computeLabelSizes","tickFonts","caches","tickFont","nestedLabel","widest","highest","widths","heights","widestLabelSize","highestLabelSize","major","minor","gc","valueAt","gcLen","garbageCollect","first","getTickMarkLength","drawTicks","tickMarkLength","getScaleLabelHeight","parseFontOptions","nestedOpts","fontColor","parseTickFontOptions","nonSkipped","ticksToFilter","filtered","spacing","majorStart","majorEnd","tick","drawOnChartArea","zeroLineWidth","zeroLineColor","zeroLineBorderDash","zeroLineBorderDashOffset","scaleLabel","labelString","minRotation","maxRotation","mirror","autoSkip","autoSkipPadding","labelOffset","Scale","zeroLineIndex","paddingLeft","paddingTop","paddingRight","paddingBottom","_ticks","_getLabels","xLabels","yLabels","beforeUpdate","samplingEnabled","sampleSize","_labelSizes","_maxLabelLines","longestLabelWidth","longestTextCache","_gridLineItems","_labelItems","beforeSetDimensions","setDimensions","afterSetDimensions","beforeDataLimits","determineDataLimits","afterDataLimits","beforeBuildTicks","buildTicks","afterBuildTicks","_convertTicksToLabels","numItems","increment","sample","beforeCalculateTickRotation","calculateTickRotation","afterCalculateTickRotation","beforeFit","fit","afterFit","_ticksToDraw","_autoSkip","afterUpdate","startPixel","endPixel","reversePixels","_reversePixels","beforeTickToLabelConversion","convertTicksToLabels","userCallback","afterTickToLabelConversion","labelSizes","maxLabelWidth","maxLabelHeight","tickWidth","maxLabelDiagonal","numTicks","labelRotation","_isVisible","_getLabelSizes","toDegrees","scaleLabelOpts","gridLineOpts","isBottom","firstLabelSize","lastLabelSize","lineSpace","tickPadding","isRotated","angleRadians","toRadians","cosRotation","sinRotation","labelHeight","offsetRight","labelWidth","handleMargins","isFullWidth","rawValue","_getScaleLabel","getValueForPixel","decimal","getDecimalForPixel","pixel","getBaseValue","avgMajorSpacing","axisLength","ticksLimit","maxTicksLimit","_tickSize","majorIndices","getMajorIndices","numMajorIndices","skipMajors","factors","factor","evenMajorSpacing","getEvenSpacing","calculateSpacing","optionTicks","rot","_computeGridLineItems","borderValue","alignedLineValue","tx1","ty1","tx2","ty2","lineColor","ticksLength","tl","axisWidth","axisHalfWidth","alignPixel","_alignPixel","alignBorderValue","_computeLabelItems","lineCount","textOffset","isMirrored","fonts","_drawGrid","firstLineWidth","lastLineWidth","_drawLabels","_drawTitle","scaleLabelX","scaleLabelY","scaleLabelFontColor","scaleLabelFont","scaleLabelPadding","halfLineHeight","isLeft","tz","gz","_draw","core_scale","isNullOrUndef$1","scale_category","ticksOpts","minIndex","maxIndex","_startValue","_valueRange","valueCategory","_defaults","isNullOrUndef$2","scale_linearbase","handleTickRangeOptions","minSign","maxSign","setMin","suggestedMin","setMax","suggestedMax","getTickLimit","maxTicks","stepSize","_computeTickLimit","handleDirectionalChanges","numericGeneratorOptions","precision","fixedStepSize","generationOptions","dataRange","niceMin","niceMax","numSpaces","maxNumSpaces","rmin","rmax","niceNum","_decimalPlaces","almostWhole","almostEquals","generateTicks","ticksAsNumbers","_endValue","defaultConfig$1","stackData","neg","getOrCreateStack","relativePoints","updateMinMax","scale_linear","hasStacks","NEGATIVE_INFINITY","stackValues","_defaults$1","valueOrDefault$b","defaultConfig$2","nonNegativeOrDefault","scale_logarithmic","IDMatches","minNotZero","valuesPerStack","valuesForType","minVal","maxVal","exp","significand","tickVal","endExp","endSignificand","lastTick","generateTicks$1","tickValues","_getFirstTickValue","_valueOffset","_defaults$2","valueOrDefault$c","valueAtIndexOrDefault$1","resolve$4","defaultConfig$3","animate","showLabelBackdrop","backdropColor","backdropPaddingY","backdropPaddingX","getTickBackdropHeight","determineLimits","getTextAlignForAngle","adjustPointPositionForLabelHeight","textSize","numberOrZero","param","scale_radialLinear","drawingArea","plFont","furthestLimits","furthestAngles","_pointLabelSizes","valueCount","getPointPosition","longestText","getIndexAngle","hLimits","vLimits","setReductions","fitWithPointLabels","setCenterPoint","largestPossibleRadius","radiusReductionLeft","radiusReductionRight","radiusReductionTop","radiusReductionBottom","leftMovement","rightMovement","topMovement","bottomMovement","maxRight","maxLeft","maxTop","maxBottom","scalingFactor","distanceFromCenter","thisAngle","getBasePosition","angleLineOpts","pointLabelOpts","tickBackdropHeight","outerDistance","extra","pointLabelPosition","pointLabelFontColor","drawPointLabels","drawRadiusLine","tickFontColor","_defaults$3","deprecated$1","resolve$5","valueOrDefault$d","MIN_INTEGER","MIN_SAFE_INTEGER","MAX_INTEGER","MAX_SAFE_INTEGER","INTERVALS","common","steps","UNITS","sorter","getMin","getMax","interpolate$1","skey","tkey","mid","i1","lo","lookup","toTimestamp","adapter","_adapter","parser","determineUnitForAutoTicks","minUnit","capacity","interval","ticksFromTimestamps","majorUnit","setMajorTicks","scale_time","adapters","displayFormats","timestamp","labelsAdded","timestamps","dataLabels","arrayUnique","_table","_timestamps","timeOpts","getLabelCapacity","distribution","unitStepSize","generate","_unit","determineUnitForFormatting","_majorUnit","determineMajorUnit","buildLookupTable","_offsets","tooltipFormat","datetime","tickFormatFunction","minorFormat","majorFormat","nestedTickOpts","formatter","getPixelForOffset","_getLabelSize","tickLabelWidth","tickFontSize","getLabelWidth","exampleTime","exampleLabel","_defaults$4","displayFormat","category","radialLinear","FORMATS","_id","amount","filler","propagate","mappers","decodeFill","computeBoundary","cx","cy","computeCircularBoundary","scaleBottom","scaleTop","scaleZero","computeLinearBoundary","resolveTarget","visible","createMapper","isDrawable","drawArea","curve0","curve1","len0","len1","doFill","mapper","loop","p0","d0","d1","loopOffset","plugin_filler","afterDatasetsUpdate","$filler","beforeDatasetsDraw","getRtlHelper$1","noop$1","valueOrDefault$e","getBoxWidth","labelOpts","usePointStyle","boxWidth","ci","onLeave","lineDash","Legend","legendHitBoxes","_hoveredItem","doughnutMode","beforeBuildLabels","buildLabels","afterBuildLabels","legendItems","labelFont","hitboxes","lineWidths","totalHeight","vPadding","columnWidths","columnHeights","totalWidth","currentColWidth","currentColHeight","lineDefault","legendHeight","legendWidth","cursor","alignmentOffset","blockSize","itemHeight","textWidth","realX","SQRT2","drawLegendBox","halfFontSize","xLeft","yMiddle","_getLegendItemAt","hitBox","lh","hoveredItem","createNewLegendAndAttach","legendOpts","plugin_legend","_element","beforeInit","afterEvent","noop$2","titleX","titleY","fontOpts","createNewTitleBlockAndAttach","titleOpts","titleBlock","parseMaxStyle","styleValue","parentProperty","valueInPixels","isConstrainedValue","getConstraintDimension","domNode","maxStyle","percentageProperty","_getParentNode","constrainedNode","constrainedContainer","hasCNode","hasCContainer","infinity","collection","filterCallback","findNextWhere","arrayToSearch","startIndex","currentItem","findPreviousWhere","epsilon","rounded","radians","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","aliasPixel","pixelWidth","currentDevicePixelRatio","halfWidth","firstPoint","middlePoint","afterPoint","d01","d12","s01","s12","fa","fb","EPSILON","pointBefore","pointCurrent","pointAfter","alphaK","betaK","tauK","squaredMagnitude","pointsWithTangents","deltaK","mK","pointsLen","slopeDeltaX","fraction","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","originalEvent","boundingRect","getConstraintWidth","getConstraintHeight","_calculatePadding","parentDimension","cw","ch","currentStyle","forceRatio","pixelRatio","pixelSize","arrayOfThings","nestedThing","longest","numberOfLabelLines","numberOfLines","CanvasGradient","colorValue","CanvasPattern","core_helpers","_adapters","Animation","animationService","Interaction","scaleService","Ticks","Tooltip","pluginService","PluginBase","canvasHelpers","layoutService","LinearScaleBase","klass","cfg","symbolMap","1","2","3","4","5","6","7","8","9","0","numberMap","pluralForm","plurals","pluralize","weekdaysParseExact","suffixes","70","80","20","50","100","10","30","60","90","relativeTimeWithPlural","forms","standalone","lastDigit","last2Digits","monthsParseExact","relativeTimeWithMutation","mutationTable","softMutation","mutation","minWeekdaysParse","fullWeekdaysParse","shortWeekdaysParse","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","lastNumber","ll","lll","llll","plural","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","_monthsNominativeEl","calendarEl","_calendarEl","monthsShortDot","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eraYearOrdinalRegex","$0","$1","$2","40","isUpper","eifelerRegelAppliesToNumber","translateSingular","special","relativeTimeWithSingular","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","word","12","13","numbersNouns","numberNoun","hundred","ten","numberAsNoun","processHoursFunction","nominative","accusative","genitive","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","funcToString","SetCache","arraySome","cacheHas","equalFunc","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","baseIsArguments","objectProto","isArguments","stubFalse","freeExports","freeModule","Buffer","isBuffer","reIsUint","baseIsTypedArray","baseUnary","nodeUtil","nodeIsTypedArray","isTypedArray","isLength","srcValue","castPath","toKey","isKey","stringToPath","_react2","_propTypes2","_reactRouterDom","getIsActive","shape","x4","y4","a2","b1","b2","c2","r1","r2","r3","r4","denom","boundRect","mouseCapturedNode","mouseEnterCallback","mouseLeaveCallback","mouseDownCallback","mouseUpCallback","mouseMoveCallback","clickCallback","dblClickCallback","lastFound","lastUpdate","lastClickTime","invoke","updateBoundRect","getNodeAtClientPos","clickTime","nodeAtClientPos","sameNode","startListen","getGraphicsRoot","api","mouseEnter","mouseLeave","mouseDown","mouseUp","mouseMove","click","dblClick","mouseCapture","releaseMouseCapture","preciseCheck","callbacksChain","nullEvents","createDocumentEvents","curleft","curtop","inputEvents","createInputEvents","draggedNode","internalHandlers","lastTime","vendors","vendorPrefix","cancelAnimationFrame","currTime","timeToCall","intervalId","startTimer","stopTimer","restart","createTimer","physicsSettings","physicsSimulator","createSimulator","nodeMass","nodeBodies","springs","bodiesCount","springTransform","initBody","initLink","onGraphChanged","wasStable","step","lastMove","isStable","isStableNow","getNodePosition","getInitializedBody","setNodePosition","setPosition","invalidateBBox","getLinkPosition","spring","getGraphRect","getBBox","forEachBody","bodyId","pinNode","isPinned","isNodePinned","getSpring","simulator","releaseNode","releaseLink","neighbors","maxNeighbors","otherBody","getNeighborBodies","getBestNewBodyPosition","addBodyAt","updateBodyMass","isNodeOriginallyPinned","removeBody","fromBody","toBody","addSpring","removeSpring","mass","Spring","expose","createQuadTree","springLength","springCoeff","gravity","theta","dragCoeff","timeStep","createBounds","createDragForce","createSpringForce","integrate","integrator","createBody","bodies","quadTree","springForce","dragForce","bboxNeedsUpdate","publicApi","insertBodies","force","updateBodyForce","accumulateForces","movement","addBody","body1","body2","springWeight","springCoefficient","getTotalMovement","getBestNewPosition","isDirty","tilesPerTexture","dirtyTimeoutId","tilesPerRow","tileSize","lastLoadedIdx","loadedImages","skipedDirty","textures","trackedUrls","clearDirty","imgUrl","coordinates","tileToRemove","getTileCoordinates","copy","markDirty","getTextures","getCoordinates","load","img","Image","imgId","crossOrigin","onload","tileNumber","tilePosition","textureNumber","texture","currentTexture","col","row","drawAt","absolutePosition","localTileNumber","markDirtyNow","fromCanvas","toCtx","glUtils","utils","locations","frontLinkId","sizeDirty","BYTES_PER_LINK","BYTES_PER_ELEMENT","Uint32Array","linksFS","linksVS","linksCount","storage","ArrayBuffer","colors","glContext","useProgram","enableVertexAttribArray","vertexPos","createBuffer","linkUi","fromPos","toPos","ui","byteLength","extendedStorage","extendedPositions","extendedColors","ensureEnoughStorage","updateTransform","newTransform","updateSize","bindBuffer","ARRAY_BUFFER","bufferData","DYNAMIC_DRAW","uniformMatrix4fv","uniform2f","screenSize","vertexAttribPointer","FLOAT","UNSIGNED_BYTE","drawArrays","LINES","bringToFront","getFrontLinkId","BYTES_PER_NODE","nodesFS","nodesVS","createNode","replaceProperties","POINTS","svgContainer","svgRoot","initCallback","actualScale","allNodes","allLinks","nodeBuilder","nodePositionCallback","linkBuilder","linkPositionCallback","linkUI","fireRescaled","cachedPos","cachedFromPos","cachedToPos","createSvgRoot","getLinkUI","builderCallback","placeNode","newPlaceCallback","placeLink","newPlaceLinkCallback","beginRender","endRender","graphCenterChanged","inputManager","translateRel","dx","dy","createSVGPoint","getCTM","matrixTransform","inverse","scaleFactor","scrollPoint","createSVGMatrix","resetScale","init","childElementCount","renderNodes","renderLinks","callbackWhenReady","getSvgRoot","MEMO_STATICS","compare","getStatics","isMemo","Memo","qsa","selector","querySelectorAll","ListGroupItem","FaChevronCircleRight","_modifiers$preventOve","_modifiers$preventOve2","_modifiers$offset","_modifiers$arrow","toModifierMap","hot","FormCheckInput","isStatic","_useContext","FormCheckLabel","htmlFor","FormCheck","_ref$inline","inline","_ref$disabled","_ref$feedbackTooltip","feedbackTooltip","feedback","_ref$title","propCustom","innerFormContext","hasLabel","Label","FormFileInput","FormFileLabel","FormFile","dataBrowse","_ref$inputAs","inputAs","FormGroup","FormLabel","column","srOnly","columnClass","FormText","muted","FormRow","FormImpl","validated","Group","Control","Check","File","CloseButton","DivStyledAsH4","AlertHeading","AlertLink","closeLabel","Alert","onClose","dismissible","handleClose","Heading","valueRef","initialPopperStyles","pointerEvents","disabledApplyStylesModifier","ariaDescribedByModifier","ids","_popper$getAttribute","_state$elements2","EMPTY_MODIFIERS","popperElement","_ref3$enabled","_ref3$placement","_ref3$strategy","_ref3$modifiers","popperInstanceRef","_popperInstanceRef$cu","_popperInstanceRef$cu2","_useSafeState","popperState","updateModifier","getRefTarget","onRootClose","_ref$clickTrigger","preventMouseRootCloseRef","handleMouseCapture","isLeftClickEvent","handleMouse","handleKeyUp","keyCode","removeMouseCaptureListener","removeMouseListener","removeKeyupListener","mobileSafariHackListeners","A","B","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","F","refs","updater","G","I","isPureReactComponent","J","K","__self","__source","_owner","O","P","Q","R","keyPrefix","V","U","escape","aa","X","Y","ba","ReactCurrentDispatcher","ReactCurrentBatchConfig","suspense","ReactCurrentOwner","IsSomeRendererActing","PureComponent","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","_context","createFactory","createRef","_ctor","_status","_result","useCallback","useDebugValue","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useReducer","useRef","useState","da","ha","ia","ja","la","ma","na","oa","ka","pa","qa","ra","sa","extractEvents","eventTypes","ta","phasedRegistrationNames","registrationName","va","wa","xa","ya","za","Aa","Ba","Ca","stateNode","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","Ma","Na","Oa","Pa","Qa","acceptsBooleans","attributeNamespace","mustUseProperty","sanitizeURL","Ua","Va","xlinkHref","Wa","Xa","Sa","Ta","Ra","Ya","Za","$a","ab","bb","db","eb","gb","hb","ib","jb","kb","lb","mb","nb","pb","qb","_debugOwner","_debugSource","fileName","lineNumber","rb","sb","xb","_valueTracker","setValue","stopTracking","tb","yb","checked","zb","defaultChecked","_wrapperState","initialChecked","Ab","controlled","Bb","Cb","Db","Eb","activeElement","Gb","Fb","Hb","selected","defaultSelected","Ib","dangerouslySetInnerHTML","Jb","Kb","Lb","Mb","Nb","Ob","Pb","Qb","MSApp","execUnsafeLocalFunction","namespaceURI","innerHTML","Rb","lastChild","nodeValue","Sb","Tb","animationend","animationiteration","animationstart","transitionend","Ub","Vb","Wb","Xb","Yb","Zb","$b","ac","bc","cc","dc","alternate","effectTag","ec","memoizedState","dehydrated","fc","hc","sibling","ic","jc","kc","lc","_dispatchListeners","_dispatchInstances","isPropagationStopped","isPersistent","mc","nc","correspondingUseElement","oc","pc","qc","topLevelType","targetInst","ancestors","rc","eventSystemFlags","sc","containerInfo","tc","uc","vc","wc","xc","yc","zc","Ac","Bc","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Kc","blockedOn","Lc","pointerId","Mc","Nc","Pc","unstable_runWithPriority","hydrate","Qc","Rc","Sc","Tc","Uc","unstable_scheduleCallback","unstable_NormalPriority","Vc","Wc","Yc","Zc","$c","ad","bubbled","captured","eventPriority","bd","cd","unstable_UserBlockingPriority","ed","fd","gd","hd","Oc","jd","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","kd","ld","md","nd","menuitem","br","embed","keygen","wbr","od","pd","qd","rd","sd","td","ud","vd","nextSibling","xd","HTMLIFrameElement","contentWindow","yd","contentEditable","Dd","Ed","Fd","autoFocus","Gd","__html","Hd","Id","Jd","Kd","previousSibling","Ld","Md","Nd","Od","Pd","Qd","Rd","Sd","Td","dispatchConfig","Ud","_targetInst","Vd","Wd","Xd","Yd","Zd","$d","ae","be","ce","Interface","isDefaultPrevented","ee","eventPool","fe","destructor","de","getPooled","persist","eventPhase","bubbles","cancelable","timeStamp","isTrusted","ge","he","ie","je","ke","documentMode","le","ne","oe","beforeInput","compositionEnd","compositionStart","compositionUpdate","pe","qe","se","ve","which","te","ue","we","email","password","tel","xe","ye","ze","Ae","Be","Ce","De","Ee","Fe","Ge","detachEvent","He","Ie","attachEvent","Je","Ke","Le","Me","_isInputEventSupported","Ne","Oe","Alt","Meta","Shift","Pe","getModifierState","Qe","Re","Se","Te","Ue","Ve","screenX","screenY","buttons","fromElement","toElement","movementX","movementY","We","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Xe","pointerEnter","pointerLeave","Ye","parentWindow","$e","af","bf","cf","df","select","ef","ff","gf","hf","jf","selectionStart","selectionEnd","anchorNode","getSelection","anchorOffset","focusNode","focusOffset","kf","elapsedTime","pseudoElement","mf","clipboardData","nf","of","charCode","pf","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","qf","16","17","18","19","27","32","33","34","35","36","37","38","39","45","46","112","113","114","115","116","117","118","119","120","121","122","123","144","145","224","sf","dataTransfer","tf","targetTouches","changedTouches","uf","vf","wheelDeltaX","wheelDeltaY","deltaZ","deltaMode","wf","SimpleEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin","zf","Af","Bf","Cf","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Df","Ef","Ff","Gf","__reactInternalMemoizedMergedChildContext","Hf","If","Jf","Kf","unstable_cancelCallback","Lf","unstable_requestPaint","Mf","unstable_now","Nf","unstable_getCurrentPriorityLevel","Of","unstable_ImmediatePriority","Pf","Qf","Rf","unstable_LowPriority","Sf","unstable_IdlePriority","Tf","Uf","unstable_shouldYield","Vf","Wf","Xf","Yf","Zf","$f","ag","cg","dg","eg","fg","hg","ig","jg","kg","lg","ng","og","pg","childExpirationTime","qg","firstContext","expirationTime","rg","sg","responders","tg","ug","updateQueue","baseState","baseQueue","shared","vg","wg","suspenseConfig","payload","xg","yg","zg","ca","Ag","Bg","Cg","Dg","Eg","Fg","Jg","Gg","Hg","Ig","Kg","Lg","Mg","Ng","Og","Pg","_stringRef","Qg","Rg","lastEffect","nextEffect","firstEffect","Sg","Tg","Ug","Vg","Wg","Xg","Yg","Zg","$g","ah","bh","dh","tagName","eh","fh","gh","memoizedProps","revealOrder","ih","responder","jh","kh","mh","nh","oh","ph","qh","rh","sh","uh","vh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","dispatch","xh","yh","zh","Ah","deps","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","Jh","Kh","Lh","Mh","Nh","readContext","useResponder","useDeferredValue","useTransition","Oh","Ph","Qh","Rh","Sh","Th","pendingProps","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","bi","di","ei","fi","gi","pendingContext","ni","pi","qi","retryTime","ji","fallback","unstable_avoidThisFallback","ki","li","isBackwards","renderingStartTime","tail","tailExpiration","tailMode","mi","ri","si","wasMultiple","multiple","onclick","ti","vi","wi","xi","yi","zi","Ai","Bi","WeakSet","Ci","Fi","Ei","Gi","__reactInternalSnapshotBeforeUpdate","Hi","Ii","Ji","Ki","Li","Di","Mi","Ni","Oi","Pi","Qi","_reactRootContainer","Ri","Si","Ti","Ui","Vi","Wi","Xi","Yi","Zi","$i","componentDidCatch","aj","componentStack","Rj","bj","cj","dj","kj","lj","mj","nj","oj","qj","rj","sj","tj","uj","vj","wj","timeoutMs","xj","yj","zj","lastExpiredTime","Aj","firstPendingTime","lastPingedTime","nextKnownPendingLevel","callbackExpirationTime","callbackPriority","callbackNode","Bj","Cj","Dj","Ej","Fj","Gj","Hj","finishedWork","finishedExpirationTime","lastSuspendedTime","Ij","Jj","busyMinDurationMs","busyDelayMs","Kj","Mj","Nj","pingCache","Oj","ub","Pj","Xc","Qj","Sj","firstSuspendedTime","rangeCount","wb","activeElementDetached","focusedElem","selectionRange","Tj","wd","createRange","setStart","removeAllRanges","addRange","setEnd","vb","Uj","Vj","Wj","ob","Xj","unstable_observedBits","Zj","pendingChildren","ak","bk","ck","dk","ek","fk","Jc","_internalRoot","gk","ik","hasAttribute","hk","jk","kk","unmount","form","Lj","lk","Events","findFiberByHostInstance","bundleType","rendererPackageName","isDisabled","supportsFiber","onCommitFiberRoot","onCommitFiberUnmount","Yj","overrideHookState","overrideProps","setSuspenseHandler","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","flushSync","unmountComponentAtNode","unstable_batchedUpdates","unstable_createPortal","unstable_renderSubtreeIntoContainer","MessageChannel","unstable_forceFrameRate","performance","port2","port1","onmessage","postMessage","sortIndex","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","cancelAnimFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","StreamingHelper","startFrameRefreshTimer","frameRequestID","frameRefresh","stopFrameRefreshTimer","TimeScale","defaultAdapter","resolveOption","realtimeOpts","realtime","streamingOpts","streaming","datasetPropertyKeys","stopDataRefreshTimer","refreshTimerID","clearInterval","refreshInterval","startDataRefreshTimer","setInterval","newInterval","removalRange","ttl","pause","onRefresh","_getTimeForIndex","datalabels","preservation","refreshData","transitionKeys","activeTooltip","RealTimeScale","majorTicksOpts","refresh","minTime","maxTime","majorEnabled","maxArray","helpers$2","canvasHelpers$1","tooltipLastActive","lastMouseEvent","frameRate","StreamingPlugin","mouseEventListener","afterInit","resetZoom","Zoom","updateResetZoom","chartOpts","frameDuration","lastDrawn","drawChart","beforeDatasetDraw","afterDatasetDraw","beforeEvent","helpers$3","zoomNS","rangeMaxLimiter","zoomPanOptions","newMax","scaleAxes","rangeMax","rangeMinLimiter","newMin","rangeMin","zoomFunctions","panFunctions","zoomOptions","maxPercent","limitedDuration","newDuration","panOptions","newDelay","$zoom","_originalOptions","resetZoomAndUpdate","realtimeOptions","originalOptions","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","secret","getShim","ReactPropTypes","instanceOf","objectOf","checkPropTypes","PropTypes","equalArrays","equalByTag","equalObjects","getTag","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","assocIndexOf","pairs","LARGE_ARRAY_SIZE","isMasked","toSource","reIsHostCtor","funcProto","reIsNative","nativeObjectToString","isOwn","unmasked","coreJsData","maskSrcKey","IE_PROTO","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","getMapData","setCacheAdd","setCacheHas","Uint8Array","mapToArray","setToArray","symbolProto","symbolValueOf","byteOffset","getAllKeys","objProps","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","baseGetAllKeys","getSymbols","arrayPush","keysFunc","symbolsFunc","arrayFilter","stubArray","nativeGetSymbols","resIndex","baseTimes","isIndex","inherited","isArr","isArg","isBuff","isType","skipIndexes","iteratee","typedArrayTags","freeProcess","require","isPrototype","nativeKeys","Ctor","overArg","DataView","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ctorString","baseAssignValue","keyBy","createAggregator","arrayAggregator","baseAggregator","baseIteratee","baseEach","baseForOwn","createBaseEach","baseFor","createBaseFor","fromRight","iterable","eachFunc","baseMatches","baseMatchesProperty","baseIsMatch","getMatchData","matchesStrictComparable","matchData","noCustomizer","COMPARE_PARTIAL_FLAG","isStrictComparable","hasIn","baseGet","memoizeCapped","rePropName","reEscapeChar","quote","subString","memoize","resolver","memoized","Cache","baseToString","arrayMap","symbolToString","baseHasIn","hasPath","hasFunc","baseProperty","basePropertyDeep","Lazy","isLazy","isSuspense","componentNameSafe","propFullNameSafe","_LinkContainer2","jsonGraph","nodeTransform","linkTransform","stored","createGraph","parsedNode","customNodeTransform","customLinkTransform","betweennessCentrality","toVivaGraphCentralityFormat","betweenness","degreeCentrality","kind","degree","closeness","eccentricity","inDegreeCalculator","outDegreeCalculator","inoutDegreeCalculator","getNodeDegree","pred","dist","sigma","otherNode","processNode","singleSourceShortestPath","setDeltaToZero","coeff","predcessors","accumulate","distances","reachableNodesTotal","totalDistance","maxDist","density","directed","ladder","complete","completeBipartite","balancedBinTree","circularLadder","grid","grid3","noLinks","wattsStrogatz","neighborsSize","newTo","needsRewire","cliqueCircle","cliqueCount","cliqueSize","appendClique","Generator","uniform","gaussian","backwardCompatible","getChild","quad0","quad1","quad2","quad3","setChild","InsertStack","isSamePosition","insertStack","nodesCache","currentInCache","newNode","MAX_VALUE","MIN_VALUE","insert","getRoot","sourceBody","fx","fy","queueLength","shiftIdx","pushIdx","differentBody","massX","massY","newBody","isEmpty","stackItem","oldBody","retriesCount","quadIdx","popIdx","InsertStackElement","point1","point2","boundingBox","prevPos","graphRect","baseX","baseY","velocity","tx","ty","vx","vy","physics","Vector2d","Body3d","Vector3d","userSettings","rand","layoutLinks","placeNodeCallback","layoutNodes","ensureNodeInitialized","updateGraphRect","updateNodePositions","ensureLinkInitialized","iterationsCount","newPlaceNodeCallbackOrNode","WebglAtlas","atlas","uniform1f","customAttributes","replacedNode","nativeObject","refreshTexture","ensureAtlasTextureUpdated","TRIANGLES","deleteTexture","createTexture","activeTexture","bindTexture","TEXTURE_2D","texImage2D","RGBA","texParameteri","TEXTURE_MAG_FILTER","LINEAR","TEXTURE_MIN_FILTER","LINEAR_MIPMAP_NEAREST","generateMipmap","uniform1i","_texture","enableBlending","preserveDrawingBuffer","clearColor","clearColorValue","graphicsRoot","userPlaceNodeCallback","userPlaceLinkCallback","nodeProgram","nodeUIBuilder","linkUIBuilder","updateTransformUniform","resetScaleInternal","viewport","bringLinkToFront","srcLinkId","boundPosition","uiid","contextParameters","blendFunc","SRC_ALPHA","ONE_MINUS_SRC_ALPHA","enable","BLEND","COLOR_BUFFER_BIT","isSupported","linkIdToRemove","lastLinkUI","nodeIdToRemove","lastNodeUI","omitLinksRendering","setNodeProgram","newProgram","setLinkProgram","transformClientToGraphCoordinates","transformGraphToClientCoordinates","clientPos","svgText","tagLength","addNamespaces","parseFromString","DOMParser","createDomparser","allBindings","extractAllBindings","hasChildNodes","domChildren","childNodes","modelNameMatch","BINDING_EXPR","modelPropertyName","propertyBindings","textSetter","bindTextContent","attrs","bindDomAttribute","changeModel","domAttribute","attrName","localName","attributeSetter","stdAttach","rm","stdDetach","oldIEAttach","oldIEDetach","animationTimer","containerDrag","interactive","rendererInitialized","updateCenterRequired","userInteraction","isPaused","publicEvents","prerender","prepareSettings","createNodeUi","createLinkUi","updateCenter","windowEvents","onWindowResized","releaseContainerDragManager","isInteractive","renderGraph","scaleOffset","listenNodeEvents","releaseGraphEvents","listenToEvents","onRenderFrame","renderIterations","resume","rerender","zoomOut","zoomIn","getTransform","getGraphics","getLayout","removeLinkUi","releaseNodeEvents","removeNodeUi","interactionName","resetStable","containerSize","nodePosition","linkPosition","wasPinned","oldPos","processNodeChange","processLinkChange"],"mappings":"0JAAO,I,OCCIA,EAAiB,CAC1BC,WAAOC,EACPC,UAAMD,EACNE,eAAWF,EACXG,WAAOH,EACPI,UAAMJ,GAEGK,EAAc,iBAAuB,gBAAoBP,GCRhEQ,EAAoC,WAWtC,OAVAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAG9C,IAAK,IAA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IACPF,IACAU,IAGF,SAASP,IACHd,IACFA,EAAczxJ,UACdyxJ,EAAgB,MAIpB,SAASmB,IACP52I,EAAM2E,IAAI,UAAW4qF,GAGvB,SAAS/vD,EAAMj5D,EAAKk1H,GAClB,IAAKA,EAAa,CAChB,IAAIm8C,EAAgB12I,EAAa0xB,GACjC6oE,EAAc,CACZrkK,EAAGwgN,EAAc7jN,MAAQ,EACzBy3B,EAAGosL,EAAc9jN,OAAS,GAG9B,IAAI0nK,EAAchjJ,KAAKwL,IAAI,IAASuiB,GAAO,GAAM,IAMjD,OALAgsC,EAAUitB,MAAQ5X,EAAS4X,MAAMg8D,EAAaC,GAE9Cg7C,IACAV,EAAalxI,KAAK,QAAS0N,EAAUitB,OAE9BjtB,EAAUitB,QA7arB,IAAIzY,EAAW,EAAQ,IACnB3lB,EAAgB,EAAQ,KACxBc,EAAc,EAAQ,KACtBm0I,EAAe,EAAQ,KACvBz1I,EAAkB,EAAQ,IAC1BK,EAAQ,EAAQ,KAChBC,EAAe,EAAQ,KACvBH,EAAY,EAAQ,K,gBCfxB,IAAI2sF,EAAa,EAAQ,KAezB,SAASjpF,EAAG3B,EAAWl7D,GACrB4C,OAAOsmD,iBAAiBgS,EAAWl7D,GAGrC,SAAS+8D,EAAI7B,EAAWl7D,GACtB4C,OAAOumD,oBAAoB+R,EAAWl7D,GAlBxCzT,EAAOC,QAEP,WACE,GAAsB,oBAAXoW,OACT,OAAOkjJ,EAGT,MAAO,CACLjpF,GAAIA,EACJE,IAAKA,GATQgpF","file":"vendor.146c9687b00ba21e0070.js","sourcesContent":["export var IconsManifest = [{\n \"id\": \"fa\",\n \"name\": \"Font Awesome\",\n \"projectUrl\": \"https://fontawesome.com/\",\n \"license\": \"CC BY 4.0 License\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}, {\n \"id\": \"io\",\n \"name\": \"Ionicons\",\n \"projectUrl\": \"https://ionicons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/ionic-team/ionicons/blob/master/LICENSE\"\n}, {\n \"id\": \"md\",\n \"name\": \"Material Design icons\",\n \"projectUrl\": \"http://google.github.io/material-design-icons/\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"https://github.com/google/material-design-icons/blob/master/LICENSE\"\n}, {\n \"id\": \"ti\",\n \"name\": \"Typicons\",\n \"projectUrl\": \"http://s-ings.com/typicons/\",\n \"license\": \"CC BY-SA 3.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by-sa/3.0/\"\n}, {\n \"id\": \"go\",\n \"name\": \"Github Octicons icons\",\n \"projectUrl\": \"https://octicons.github.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/primer/octicons/blob/master/LICENSE\"\n}, {\n \"id\": \"fi\",\n \"name\": \"Feather\",\n \"projectUrl\": \"https://feathericons.com/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://github.com/feathericons/feather/blob/master/LICENSE\"\n}, {\n \"id\": \"gi\",\n \"name\": \"Game Icons\",\n \"projectUrl\": \"https://game-icons.net/\",\n \"license\": \"CC BY 3.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/3.0/\"\n}, {\n \"id\": \"wi\",\n \"name\": \"Weather Icons\",\n \"projectUrl\": \"https://erikflowers.github.io/weather-icons/\",\n \"license\": \"SIL OFL 1.1\",\n \"licenseUrl\": \"http://scripts.sil.org/OFL\"\n}, {\n \"id\": \"di\",\n \"name\": \"Devicons\",\n \"projectUrl\": \"https://vorillaz.github.io/devicons/\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"ai\",\n \"name\": \"Ant Design Icons\",\n \"projectUrl\": \"https://github.com/ant-design/ant-design-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"bs\",\n \"name\": \"Bootstrap Icons\",\n \"projectUrl\": \"https://github.com/twbs/icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"ri\",\n \"name\": \"Remix Icon\",\n \"projectUrl\": \"https://github.com/Remix-Design/RemixIcon\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"http://www.apache.org/licenses/\"\n}, {\n \"id\": \"fc\",\n \"name\": \"Flat Color Icons\",\n \"projectUrl\": \"https://github.com/icons8/flat-color-icons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"gr\",\n \"name\": \"Grommet-Icons\",\n \"projectUrl\": \"https://github.com/grommet/grommet-icons\",\n \"license\": \"Apache License Version 2.0\",\n \"licenseUrl\": \"http://www.apache.org/licenses/\"\n}, {\n \"id\": \"hi\",\n \"name\": \"Heroicons\",\n \"projectUrl\": \"https://github.com/refactoringui/heroicons\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"si\",\n \"name\": \"Simple Icons\",\n \"projectUrl\": \"https://simpleicons.org/\",\n \"license\": \"CC0 1.0 Universal\",\n \"licenseUrl\": \"https://creativecommons.org/publicdomain/zero/1.0/\"\n}, {\n \"id\": \"im\",\n \"name\": \"IcoMoon Free\",\n \"projectUrl\": \"https://github.com/Keyamoon/IcoMoon-Free\",\n \"license\": \"CC BY 4.0 License\"\n}, {\n \"id\": \"bi\",\n \"name\": \"BoxIcons\",\n \"projectUrl\": \"https://github.com/atisawd/boxicons\",\n \"license\": \"CC BY 4.0 License\"\n}, {\n \"id\": \"cg\",\n \"name\": \"css.gg\",\n \"projectUrl\": \"https://github.com/astrit/css.gg\",\n \"license\": \"MIT\",\n \"licenseUrl\": \"https://opensource.org/licenses/MIT\"\n}, {\n \"id\": \"vsc\",\n \"name\": \"VS Code Icons\",\n \"projectUrl\": \"https://github.com/microsoft/vscode-codicons\",\n \"license\": \"CC BY 4.0\",\n \"licenseUrl\": \"https://creativecommons.org/licenses/by/4.0/\"\n}];","import * as React from 'react';\nexport var DefaultContext = {\n color: undefined,\n size: undefined,\n className: undefined,\n style: undefined,\n attr: undefined\n};\nexport var IconContext = React.createContext && React.createContext(DefaultContext);","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];\n return t;\n};\n\nimport * as React from 'react';\nimport { IconContext, DefaultContext } from './iconContext';\n\nfunction Tree2Element(tree) {\n return tree && tree.map(function (node, i) {\n return React.createElement(node.tag, __assign({\n key: i\n }, node.attr), Tree2Element(node.child));\n });\n}\n\nexport function GenIcon(data) {\n return function (props) {\n return React.createElement(IconBase, __assign({\n attr: __assign({}, data.attr)\n }, props), Tree2Element(data.child));\n };\n}\nexport function IconBase(props) {\n var elem = function (conf) {\n var computedSize = props.size || conf.size || \"1em\";\n var className;\n if (conf.className) className = conf.className;\n if (props.className) className = (className ? className + ' ' : '') + props.className;\n\n var attr = props.attr,\n title = props.title,\n svgProps = __rest(props, [\"attr\", \"title\"]);\n\n return React.createElement(\"svg\", __assign({\n stroke: \"currentColor\",\n fill: \"currentColor\",\n strokeWidth: \"0\"\n }, conf.attr, attr, svgProps, {\n className: className,\n style: __assign({\n color: props.color || conf.color\n }, conf.style, props.style),\n height: computedSize,\n width: computedSize,\n xmlns: \"http://www.w3.org/2000/svg\"\n }), title && React.createElement(\"title\", null, title), props.children);\n };\n\n return IconContext !== undefined ? React.createElement(IconContext.Consumer, null, function (conf) {\n return elem(conf);\n }) : elem(DefaultContext);\n}","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport warning from 'warning';\nimport { useUncontrolled } from 'uncontrollable';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport AbstractNav from './AbstractNav';\nimport ListGroupItem from './ListGroupItem';\nvar defaultProps = {\n variant: undefined,\n horizontal: undefined\n};\nvar ListGroup = React.forwardRef(function (props, ref) {\n var _useUncontrolled = useUncontrolled(props, {\n activeKey: 'onSelect'\n }),\n className = _useUncontrolled.className,\n initialBsPrefix = _useUncontrolled.bsPrefix,\n variant = _useUncontrolled.variant,\n horizontal = _useUncontrolled.horizontal,\n _useUncontrolled$as = _useUncontrolled.as,\n as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,\n controlledProps = _objectWithoutPropertiesLoose(_useUncontrolled, [\"className\", \"bsPrefix\", \"variant\", \"horizontal\", \"as\"]);\n\n var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'list-group');\n var horizontalVariant;\n\n if (horizontal) {\n horizontalVariant = horizontal === true ? 'horizontal' : \"horizontal-\" + horizontal;\n } else {\n horizontalVariant = null;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(!(horizontal && variant === 'flush'), '`variant=\"flush\"` and `horizontal` should not be used together.') : void 0;\n return /*#__PURE__*/React.createElement(AbstractNav, _extends({\n ref: ref\n }, controlledProps, {\n as: as,\n className: classNames(className, bsPrefix, variant && bsPrefix + \"-\" + variant, horizontalVariant && bsPrefix + \"-\" + horizontalVariant)\n }));\n});\nListGroup.defaultProps = defaultProps;\nListGroup.displayName = 'ListGroup';\nListGroup.Item = ListGroupItem;\nexport default ListGroup;","/** MobX - (c) Michel Weststrate 2015 - 2020 - MIT Licensed */\nvar OBFUSCATED_ERROR = \"An invariant failed, however the error is obfuscated because this is a production build.\";\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\nfunction fail(message) {\n invariant(false, message);\n throw \"X\"; // unreachable\n}\nfunction invariant(check, message) {\n if (!check)\n throw new Error(\"[mobx] \" + (message || OBFUSCATED_ERROR));\n}\n/**\n * Prints a deprecation message, but only one time.\n * Returns false if the deprecated message was already printed before\n */\nvar deprecatedMessages = [];\nfunction deprecated(msg, thing) {\n if (process.env.NODE_ENV === \"production\")\n return false;\n if (thing) {\n return deprecated(\"'\" + msg + \"', use '\" + thing + \"' instead.\");\n }\n if (deprecatedMessages.indexOf(msg) !== -1)\n return false;\n deprecatedMessages.push(msg);\n console.error(\"[mobx] Deprecated: \" + msg);\n return true;\n}\n/**\n * Makes sure that the provided function is invoked at most once.\n */\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked)\n return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function () { };\nfunction unique(list) {\n var res = [];\n list.forEach(function (item) {\n if (res.indexOf(item) === -1)\n res.push(item);\n });\n return res;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n if (value === null || typeof value !== \"object\")\n return false;\n var proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n }\n else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n }\n else if (isPlainObject(dataStructure)) {\n var map = new Map();\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n return map;\n }\n else {\n return fail(\"Cannot convert to map from '\" + dataStructure + \"'\");\n }\n}\nfunction addHiddenProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction isPropertyConfigurable(object, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(object, prop);\n return !descriptor || (descriptor.configurable !== false && descriptor.writable !== false);\n}\nfunction assertPropertyConfigurable(object, prop) {\n if (process.env.NODE_ENV !== \"production\" && !isPropertyConfigurable(object, prop))\n fail(\"Cannot make property '\" + prop.toString() + \"' observable, it is not configurable and writable in the target object\");\n}\nfunction createInstanceofPredicate(name, clazz) {\n var propName = \"isMobX\" + name;\n clazz.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\n/**\n * Returns whether the argument is an array, disregarding observability.\n */\nfunction isArrayLike(x) {\n return Array.isArray(x) || isObservableArray(x);\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\n/**\n * Returns the following: own keys, prototype keys & own symbol keys, if they are enumerable.\n */\nfunction getPlainObjectKeys(object) {\n var enumerables = new Set();\n for (var key in object)\n enumerables.add(key); // *all* enumerables\n Object.getOwnPropertySymbols(object).forEach(function (k) {\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\n enumerables.add(k);\n }); // *own* symbols\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\n // as there is no efficient iterator that returns *all* properties\n return Array.from(enumerables);\n}\nfunction stringifyKey(key) {\n if (key && key.toString)\n return key.toString();\n else\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys\n ? Reflect.ownKeys\n : Object.getOwnPropertySymbols\n ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); }\n : /* istanbul ignore next */ Object.getOwnPropertyNames;\n\nvar $mobx = Symbol(\"mobx administration\");\nvar Atom = /** @class */ (function () {\n /**\n * Create a new atom. For debugging purposes it is recommended to give it a name.\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\n */\n function Atom(name) {\n if (name === void 0) { name = \"Atom@\" + getNextId(); }\n this.name = name;\n this.isPendingUnobservation = false; // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n this.isBeingObserved = false;\n this.observers = new Set();\n this.diffValue = 0;\n this.lastAccessedBy = 0;\n this.lowestObserverState = IDerivationState.NOT_TRACKING;\n }\n Atom.prototype.onBecomeObserved = function () {\n if (this.onBecomeObservedListeners) {\n this.onBecomeObservedListeners.forEach(function (listener) { return listener(); });\n }\n };\n Atom.prototype.onBecomeUnobserved = function () {\n if (this.onBecomeUnobservedListeners) {\n this.onBecomeUnobservedListeners.forEach(function (listener) { return listener(); });\n }\n };\n /**\n * Invoke this method to notify mobx that your atom has been used somehow.\n * Returns true if there is currently a reactive context.\n */\n Atom.prototype.reportObserved = function () {\n return reportObserved(this);\n };\n /**\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\n */\n Atom.prototype.reportChanged = function () {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n Atom.prototype.toString = function () {\n return this.name;\n };\n return Atom;\n}());\nvar isAtom = createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) { onBecomeObservedHandler = noop; }\n if (onBecomeUnobservedHandler === void 0) { onBecomeUnobservedHandler = noop; }\n var atom = new Atom(name);\n // default `noop` listener will not initialize the hook Set\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\nfunction defaultComparer(a, b) {\n return Object.is(a, b);\n}\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n default: defaultComparer,\n shallow: shallowComparer\n};\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\nvar mobxDidRunLazyInitializersSymbol = Symbol(\"mobx did run lazy initializers\");\nvar mobxPendingDecorators = Symbol(\"mobx pending decorators\");\nvar enumerableDescriptorCache = {};\nvar nonEnumerableDescriptorCache = {};\nfunction createPropertyInitializerDescriptor(prop, enumerable) {\n var cache = enumerable ? enumerableDescriptorCache : nonEnumerableDescriptorCache;\n return (cache[prop] ||\n (cache[prop] = {\n configurable: true,\n enumerable: enumerable,\n get: function () {\n initializeInstance(this);\n return this[prop];\n },\n set: function (value) {\n initializeInstance(this);\n this[prop] = value;\n }\n }));\n}\nfunction initializeInstance(target) {\n var e_1, _a;\n if (target[mobxDidRunLazyInitializersSymbol] === true)\n return;\n var decorators = target[mobxPendingDecorators];\n if (decorators) {\n addHiddenProp(target, mobxDidRunLazyInitializersSymbol, true);\n // Build property key array from both strings and symbols\n var keys = __spread(Object.getOwnPropertySymbols(decorators), Object.keys(decorators));\n try {\n for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {\n var key = keys_1_1.value;\n var d = decorators[key];\n d.propertyCreator(target, d.prop, d.descriptor, d.decoratorTarget, d.decoratorArguments);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n}\nfunction createPropDecorator(propertyInitiallyEnumerable, propertyCreator) {\n return function decoratorFactory() {\n var decoratorArguments;\n var decorator = function decorate(target, prop, descriptor, applyImmediately\n // This is a special parameter to signal the direct application of a decorator, allow extendObservable to skip the entire type decoration part,\n // as the instance to apply the decorator to equals the target\n ) {\n if (applyImmediately === true) {\n propertyCreator(target, prop, descriptor, target, decoratorArguments);\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" && !quacksLikeADecorator(arguments))\n fail(\"This function is a decorator, but it wasn't invoked like a decorator\");\n if (!Object.prototype.hasOwnProperty.call(target, mobxPendingDecorators)) {\n var inheritedDecorators = target[mobxPendingDecorators];\n addHiddenProp(target, mobxPendingDecorators, __assign({}, inheritedDecorators));\n }\n target[mobxPendingDecorators][prop] = {\n prop: prop,\n propertyCreator: propertyCreator,\n descriptor: descriptor,\n decoratorTarget: target,\n decoratorArguments: decoratorArguments\n };\n return createPropertyInitializerDescriptor(prop, propertyInitiallyEnumerable);\n };\n if (quacksLikeADecorator(arguments)) {\n // @decorator\n decoratorArguments = EMPTY_ARRAY;\n return decorator.apply(null, arguments);\n }\n else {\n // @decorator(args)\n decoratorArguments = Array.prototype.slice.call(arguments);\n return decorator;\n }\n };\n}\nfunction quacksLikeADecorator(args) {\n return (((args.length === 2 || args.length === 3) &&\n (typeof args[1] === \"string\" || typeof args[1] === \"symbol\")) ||\n (args.length === 4 && args[3] === true));\n}\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n if (Array.isArray(v))\n return observable.array(v, { name: name });\n if (isPlainObject(v))\n return observable.object(v, undefined, { name: name });\n if (isES6Map(v))\n return observable.map(v, { name: name });\n if (isES6Set(v))\n return observable.set(v, { name: name });\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null)\n return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v))\n return v;\n if (Array.isArray(v))\n return observable.array(v, { name: name, deep: false });\n if (isPlainObject(v))\n return observable.object(v, undefined, { name: name, deep: false });\n if (isES6Map(v))\n return observable.map(v, { name: name, deep: false });\n if (isES6Set(v))\n return observable.set(v, { name: name, deep: false });\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue, name) {\n if (process.env.NODE_ENV !== \"production\" && isObservable(v))\n throw \"observable.struct should not be used with observable values\";\n if (deepEqual(v, oldValue))\n return oldValue;\n return v;\n}\n\nfunction createDecoratorForEnhancer(enhancer) {\n invariant(enhancer);\n var decorator = createPropDecorator(true, function (target, propertyName, descriptor, _decoratorTarget, decoratorArgs) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(!descriptor || !descriptor.get, \"@observable cannot be used on getter (property \\\"\" + stringifyKey(propertyName) + \"\\\"), use @computed instead.\");\n }\n var initialValue = descriptor\n ? descriptor.initializer\n ? descriptor.initializer.call(target)\n : descriptor.value\n : undefined;\n asObservableObject(target).addObservableProp(propertyName, initialValue, enhancer);\n });\n var res = \n // Extra process checks, as this happens during module initialization\n typeof process !== \"undefined\" && process.env && process.env.NODE_ENV !== \"production\"\n ? function observableDecorator() {\n // This wrapper function is just to detect illegal decorator invocations, deprecate in a next version\n // and simply return the created prop decorator\n if (arguments.length < 2)\n return fail(\"Incorrect decorator invocation. @observable decorator doesn't expect any arguments\");\n return decorator.apply(null, arguments);\n }\n : decorator;\n res.enhancer = enhancer;\n return res;\n}\n\n// Predefined bags of create observable options, to avoid allocating temporarily option objects\n// in the majority of cases\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction assertValidOption(key) {\n if (!/^(deep|name|equals|defaultDecorator|proxy)$/.test(key))\n fail(\"invalid option for (extend)observable: \" + key);\n}\nfunction asCreateObservableOptions(thing) {\n if (thing === null || thing === undefined)\n return defaultCreateObservableOptions;\n if (typeof thing === \"string\")\n return { name: thing, deep: true, proxy: true };\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof thing !== \"object\")\n return fail(\"expected options object\");\n Object.keys(thing).forEach(assertValidOption);\n }\n return thing;\n}\nvar deepDecorator = createDecoratorForEnhancer(deepEnhancer);\nvar shallowDecorator = createDecoratorForEnhancer(shallowEnhancer);\nvar refDecorator = createDecoratorForEnhancer(referenceEnhancer);\nvar refStructDecorator = createDecoratorForEnhancer(refStructEnhancer);\nfunction getEnhancerFromOptions(options) {\n return options.defaultDecorator\n ? options.defaultDecorator.enhancer\n : options.deep === false\n ? referenceEnhancer\n : deepEnhancer;\n}\n/**\n * Turns an object, array or function into a reactive structure.\n * @param v the value which should become observable.\n */\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (typeof arguments[1] === \"string\" || typeof arguments[1] === \"symbol\") {\n return deepDecorator.apply(null, arguments);\n }\n // it is an observable already, done\n if (isObservable(v))\n return v;\n // something that can be converted and mutated?\n var res = isPlainObject(v)\n ? observable.object(v, arg2, arg3)\n : Array.isArray(v)\n ? observable.array(v, arg2)\n : isES6Map(v)\n ? observable.map(v, arg2)\n : isES6Set(v)\n ? observable.set(v, arg2)\n : v;\n // this value could be converted to a new observable data structure, return it\n if (res !== v)\n return res;\n // otherwise, just box it\n fail(process.env.NODE_ENV !== \"production\" &&\n \"The provided value could not be converted into an observable. If you want just create an observable reference to the object use 'observable.box(value)'\");\n}\nvar observableFactories = {\n box: function (value, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"box\");\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function (initialValues, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"array\");\n var o = asCreateObservableOptions(options);\n return createObservableArray(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function (initialValues, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"map\");\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function (initialValues, options) {\n if (arguments.length > 2)\n incorrectlyUsedAsDecorator(\"set\");\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function (props, decorators, options) {\n if (typeof arguments[1] === \"string\")\n incorrectlyUsedAsDecorator(\"object\");\n var o = asCreateObservableOptions(options);\n if (o.proxy === false) {\n return extendObservable({}, props, decorators, o);\n }\n else {\n var defaultDecorator = getDefaultDecoratorFromObjectOptions(o);\n var base = extendObservable({}, undefined, undefined, o);\n var proxy = createDynamicObservableObject(base);\n extendObservableObjectWithProperties(proxy, props, decorators, defaultDecorator);\n return proxy;\n }\n },\n ref: refDecorator,\n shallow: shallowDecorator,\n deep: deepDecorator,\n struct: refStructDecorator\n};\nvar observable = createObservable;\n// weird trick to keep our typings nicely with our funcs, and still extend the observable function\nObject.keys(observableFactories).forEach(function (name) { return (observable[name] = observableFactories[name]); });\nfunction incorrectlyUsedAsDecorator(methodName) {\n fail(\n // process.env.NODE_ENV !== \"production\" &&\n \"Expected one or two arguments to observable.\" + methodName + \". Did you accidentally try to use observable.\" + methodName + \" as decorator?\");\n}\n\nvar computedDecorator = createPropDecorator(false, function (instance, propertyName, descriptor, decoratorTarget, decoratorArgs) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(descriptor && descriptor.get, \"Trying to declare a computed value for unspecified getter '\" + stringifyKey(propertyName) + \"'\");\n }\n var get = descriptor.get, set = descriptor.set; // initialValue is the descriptor for get / set props\n // Optimization: faster on decorator target or instance? Assuming target\n // Optimization: find out if declaring on instance isn't just faster. (also makes the property descriptor simpler). But, more memory usage..\n // Forcing instance now, fixes hot reloadig issues on React Native:\n var options = decoratorArgs[0] || {};\n asObservableObject(instance).addComputedProp(instance, propertyName, __assign({ get: get,\n set: set, context: instance }, options));\n});\nvar computedStructDecorator = computedDecorator({ equals: comparer.structural });\n/**\n * Decorator for class properties: @computed get value() { return expr; }.\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\n */\nvar computed = function computed(arg1, arg2, arg3) {\n if (typeof arg2 === \"string\") {\n // @computed\n return computedDecorator.apply(null, arguments);\n }\n if (arg1 !== null && typeof arg1 === \"object\" && arguments.length === 1) {\n // @computed({ options })\n return computedDecorator.apply(null, arguments);\n }\n // computed(expr, options?)\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof arg1 === \"function\", \"First argument to `computed` should be an expression.\");\n invariant(arguments.length < 3, \"Computed takes one or two arguments if used as function\");\n }\n var opts = typeof arg2 === \"object\" ? arg2 : {};\n opts.get = arg1;\n opts.set = typeof arg2 === \"function\" ? arg2 : opts.set;\n opts.name = opts.name || arg1.name || \"\"; /* for generated name */\n return new ComputedValue(opts);\n};\ncomputed.struct = computedStructDecorator;\n\nvar IDerivationState;\n(function (IDerivationState) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState[IDerivationState[\"NOT_TRACKING\"] = -1] = \"NOT_TRACKING\";\n // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n IDerivationState[IDerivationState[\"UP_TO_DATE\"] = 0] = \"UP_TO_DATE\";\n // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n IDerivationState[IDerivationState[\"POSSIBLY_STALE\"] = 1] = \"POSSIBLY_STALE\";\n // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n IDerivationState[IDerivationState[\"STALE\"] = 2] = \"STALE\";\n})(IDerivationState || (IDerivationState = {}));\nvar TraceMode;\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\nvar CaughtException = /** @class */ (function () {\n function CaughtException(cause) {\n this.cause = cause;\n // Empty\n }\n return CaughtException;\n}());\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\n * Finds out whether any dependency of the derivation has actually changed.\n * If dependenciesState is 1 then it will recalculate dependencies,\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\n *\n * By iterating over the dependencies in the same order that they were reported and\n * stopping on the first change, all the recalculations are only called for ComputedValues\n * that will be tracked by derivation. That is because we assume that if the first x\n * dependencies of the derivation doesn't change then the derivation should run the same way\n * up until accessing x-th dependency.\n */\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState) {\n case IDerivationState.UP_TO_DATE:\n return false;\n case IDerivationState.NOT_TRACKING:\n case IDerivationState.STALE:\n return true;\n case IDerivationState.POSSIBLY_STALE: {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n var obs = derivation.observing, l = obs.length;\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n }\n else {\n try {\n obj.get();\n }\n catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n if (derivation.dependenciesState === IDerivationState.STALE) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\n// function invariantShouldCompute(derivation: IDerivation) {\n// const newDepState = (derivation as any).dependenciesState\n// if (\n// process.env.NODE_ENV === \"production\" &&\n// (newDepState === IDerivationState.POSSIBLY_STALE ||\n// newDepState === IDerivationState.NOT_TRACKING)\n// )\n// fail(\"Illegal dependency state\")\n// }\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n var hasObservers = atom.observers.size > 0;\n // Should never be possible to change an observed observable from inside computed, see #798\n if (globalState.computationDepth > 0 && hasObservers)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: \" + atom.name);\n // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"strict\"))\n fail(process.env.NODE_ENV !== \"production\" &&\n (globalState.enforceActions\n ? \"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: \"\n : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: \") +\n atom.name);\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if (process.env.NODE_ENV !== \"production\" &&\n !globalState.allowStateReads &&\n globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable \" + observable.name + \" being read outside a reactive context\");\n }\n}\n/**\n * Executes the provided function `f` and tracks which observables are being accessed.\n * The tracking information is stored on the `derivation` object and the derivation is registered\n * as observer of any of the accessed observables.\n */\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true);\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n }\n else {\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (process.env.NODE_ENV === \"production\")\n return;\n if (derivation.observing.length !== 0)\n return;\n if (globalState.reactionRequiresObservable || derivation.requiresObservable) {\n console.warn(\"[mobx] Derivation \" + derivation.name + \" is created/updated without reading any observable value\");\n }\n}\n/**\n * diffs newObserving with observing.\n * update observing to be newObserving with unique observables\n * notify observers that become observed/unobserved\n */\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing;\n var observing = (derivation.observing = derivation.newObserving);\n var lowestNewObservingDerivationState = IDerivationState.UP_TO_DATE;\n // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n var i0 = 0, l = derivation.unboundDepsCount;\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n if (dep.diffValue === 0) {\n dep.diffValue = 1;\n if (i0 !== i)\n observing[i0] = dep;\n i0++;\n }\n // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n if (dep.dependenciesState > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState;\n }\n }\n observing.length = i0;\n derivation.newObserving = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n l = prevObserving.length;\n while (l--) {\n var dep = prevObserving[l];\n if (dep.diffValue === 0) {\n removeObserver(dep, derivation);\n }\n dep.diffValue = 0;\n }\n // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n while (i0--) {\n var dep = observing[i0];\n if (dep.diffValue === 1) {\n dep.diffValue = 0;\n addObserver(dep, derivation);\n }\n }\n // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n if (lowestNewObservingDerivationState !== IDerivationState.UP_TO_DATE) {\n derivation.dependenciesState = lowestNewObservingDerivationState;\n derivation.onBecomeStale();\n }\n}\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing;\n derivation.observing = [];\n var i = obs.length;\n while (i--)\n removeObserver(obs[i], derivation);\n derivation.dependenciesState = IDerivationState.NOT_TRACKING;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n try {\n return action();\n }\n finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\n *\n */\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState === IDerivationState.UP_TO_DATE)\n return;\n derivation.dependenciesState = IDerivationState.UP_TO_DATE;\n var obs = derivation.observing;\n var i = obs.length;\n while (i--)\n obs[i].lowestObserverState = IDerivationState.UP_TO_DATE;\n}\n\n// we don't use globalState for these in order to avoid possible issues with multiple\n// mobx versions\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar functionNameDescriptor = Object.getOwnPropertyDescriptor(function () { }, \"name\");\nvar isFunctionNameConfigurable = functionNameDescriptor && functionNameDescriptor.configurable;\nfunction createAction(actionName, fn, ref) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof fn === \"function\", \"`action` can only be invoked on functions\");\n if (typeof actionName !== \"string\" || !actionName)\n fail(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n var res = function () {\n return executeAction(actionName, fn, ref || this, arguments);\n };\n res.isMobxAction = true;\n if (process.env.NODE_ENV !== \"production\") {\n if (isFunctionNameConfigurable) {\n Object.defineProperty(res, \"name\", { value: actionName });\n }\n }\n return res;\n}\nfunction executeAction(actionName, fn, scope, args) {\n var runInfo = _startAction(actionName, scope, args);\n try {\n return fn.apply(scope, args);\n }\n catch (err) {\n runInfo.error = err;\n throw err;\n }\n finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, scope, args) {\n var notifySpy = isSpyEnabled() && !!actionName;\n var startTime = 0;\n if (notifySpy && process.env.NODE_ENV !== \"production\") {\n startTime = Date.now();\n var l = (args && args.length) || 0;\n var flattendArgs = new Array(l);\n if (l > 0)\n for (var i = 0; i < l; i++)\n flattendArgs[i] = args[i];\n spyReportStart({\n type: \"action\",\n name: actionName,\n object: scope,\n arguments: flattendArgs\n });\n }\n var prevDerivation = untrackedStart();\n startBatch();\n var prevAllowStateChanges = allowStateChangesStart(true);\n var prevAllowStateReads = allowStateReadsStart(true);\n var runInfo = {\n prevDerivation: prevDerivation,\n prevAllowStateChanges: prevAllowStateChanges,\n prevAllowStateReads: prevAllowStateReads,\n notifySpy: notifySpy,\n startTime: startTime,\n actionId: nextActionId++,\n parentActionId: currentActionId\n };\n currentActionId = runInfo.actionId;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId) {\n fail(\"invalid action stack. did you forget to finish an action?\");\n }\n currentActionId = runInfo.parentActionId;\n if (runInfo.error !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n allowStateChangesEnd(runInfo.prevAllowStateChanges);\n allowStateReadsEnd(runInfo.prevAllowStateReads);\n endBatch();\n untrackedEnd(runInfo.prevDerivation);\n if (runInfo.notifySpy && process.env.NODE_ENV !== \"production\") {\n spyReportEnd({ time: Date.now() - runInfo.startTime });\n }\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n var res;\n try {\n res = func();\n }\n finally {\n allowStateChangesEnd(prev);\n }\n return res;\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\nfunction allowStateChangesInsideComputed(func) {\n var prev = globalState.computationDepth;\n globalState.computationDepth = 0;\n var res;\n try {\n res = func();\n }\n finally {\n globalState.computationDepth = prev;\n }\n return res;\n}\n\nvar ObservableValue = /** @class */ (function (_super) {\n __extends(ObservableValue, _super);\n function ObservableValue(value, enhancer, name, notifySpy, equals) {\n if (name === void 0) { name = \"ObservableValue@\" + getNextId(); }\n if (notifySpy === void 0) { notifySpy = true; }\n if (equals === void 0) { equals = comparer.default; }\n var _this = _super.call(this, name) || this;\n _this.enhancer = enhancer;\n _this.name = name;\n _this.equals = equals;\n _this.hasUnreportedChange = false;\n _this.value = enhancer(value, undefined, name);\n if (notifySpy && isSpyEnabled() && process.env.NODE_ENV !== \"production\") {\n // only notify spy if this is a stand-alone observable\n spyReport({ type: \"create\", name: _this.name, newValue: \"\" + _this.value });\n }\n return _this;\n }\n ObservableValue.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined)\n return this.dehancer(value);\n return value;\n };\n ObservableValue.prototype.set = function (newValue) {\n var oldValue = this.value;\n newValue = this.prepareNewValue(newValue);\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n if (notifySpy && process.env.NODE_ENV !== \"production\") {\n spyReportStart({\n type: \"update\",\n name: this.name,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n this.setNewValue(newValue);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n }\n };\n ObservableValue.prototype.prepareNewValue = function (newValue) {\n checkIfStateModificationsAreAllowed(this);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: \"update\",\n newValue: newValue\n });\n if (!change)\n return globalState.UNCHANGED;\n newValue = change.newValue;\n }\n // apply modifier\n newValue = this.enhancer(newValue, this.value, this.name);\n return this.equals(this.value, newValue) ? globalState.UNCHANGED : newValue;\n };\n ObservableValue.prototype.setNewValue = function (newValue) {\n var oldValue = this.value;\n this.value = newValue;\n this.reportChanged();\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: \"update\",\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n ObservableValue.prototype.get = function () {\n this.reportObserved();\n return this.dehanceValue(this.value);\n };\n ObservableValue.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableValue.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately)\n listener({\n object: this,\n type: \"update\",\n newValue: this.value,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n ObservableValue.prototype.toJSON = function () {\n return this.get();\n };\n ObservableValue.prototype.toString = function () {\n return this.name + \"[\" + this.value + \"]\";\n };\n ObservableValue.prototype.valueOf = function () {\n return toPrimitive(this.get());\n };\n ObservableValue.prototype[Symbol.toPrimitive] = function () {\n return this.valueOf();\n };\n return ObservableValue;\n}(Atom));\nvar isObservableValue = createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\n/**\n * A node in the state dependency root that observes other nodes, and can be observed itself.\n *\n * ComputedValue will remember the result of the computation for the duration of the batch, or\n * while being observed.\n *\n * During this time it will recompute only when one of its direct dependencies changed,\n * but only when it is being accessed with `ComputedValue.get()`.\n *\n * Implementation description:\n * 1. First time it's being accessed it will compute and remember result\n * give back remembered result until 2. happens\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\n * 3. When it's being accessed, recompute if any shallow dependency changed.\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\n * go to step 2. either way\n *\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\n */\nvar ComputedValue = /** @class */ (function () {\n /**\n * Create a new computed value based on a function expression.\n *\n * The `name` property is for debug purposes only.\n *\n * The `equals` property specifies the comparer function to use to determine if a newly produced\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\n * compares based on identity comparison (===), and `structualComparer` deeply compares the structure.\n * Structural comparison can be convenient if you always produce a new aggregated object and\n * don't want to notify observers if it is structurally the same.\n * This is useful for working with vectors, mouse coordinates etc.\n */\n function ComputedValue(options) {\n this.dependenciesState = IDerivationState.NOT_TRACKING;\n this.observing = []; // nodes we are looking at. Our value depends on these nodes\n this.newObserving = null; // during tracking it's an array with new observed observers\n this.isBeingObserved = false;\n this.isPendingUnobservation = false;\n this.observers = new Set();\n this.diffValue = 0;\n this.runId = 0;\n this.lastAccessedBy = 0;\n this.lowestObserverState = IDerivationState.UP_TO_DATE;\n this.unboundDepsCount = 0;\n this.__mapid = \"#\" + getNextId();\n this.value = new CaughtException(null);\n this.isComputing = false; // to check for cycles\n this.isRunningSetter = false;\n this.isTracing = TraceMode.NONE;\n invariant(options.get, \"missing option for computed: get\");\n this.derivation = options.get;\n this.name = options.name || \"ComputedValue@\" + getNextId();\n if (options.set)\n this.setter = createAction(this.name + \"-setter\", options.set);\n this.equals =\n options.equals ||\n (options.compareStructural || options.struct\n ? comparer.structural\n : comparer.default);\n this.scope = options.context;\n this.requiresReaction = !!options.requiresReaction;\n this.keepAlive = !!options.keepAlive;\n }\n ComputedValue.prototype.onBecomeStale = function () {\n propagateMaybeChanged(this);\n };\n ComputedValue.prototype.onBecomeObserved = function () {\n if (this.onBecomeObservedListeners) {\n this.onBecomeObservedListeners.forEach(function (listener) { return listener(); });\n }\n };\n ComputedValue.prototype.onBecomeUnobserved = function () {\n if (this.onBecomeUnobservedListeners) {\n this.onBecomeUnobservedListeners.forEach(function (listener) { return listener(); });\n }\n };\n /**\n * Returns the current value of this computed value.\n * Will evaluate its computation first if needed.\n */\n ComputedValue.prototype.get = function () {\n if (this.isComputing)\n fail(\"Cycle detected in computation \" + this.name + \": \" + this.derivation);\n if (globalState.inBatch === 0 && this.observers.size === 0 && !this.keepAlive) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead();\n startBatch(); // See perf test 'computed memoization'\n this.value = this.computeValue(false);\n endBatch();\n }\n }\n else {\n reportObserved(this);\n if (shouldCompute(this))\n if (this.trackAndCompute())\n propagateChangeConfirmed(this);\n }\n var result = this.value;\n if (isCaughtException(result))\n throw result.cause;\n return result;\n };\n ComputedValue.prototype.peek = function () {\n var res = this.computeValue(false);\n if (isCaughtException(res))\n throw res.cause;\n return res;\n };\n ComputedValue.prototype.set = function (value) {\n if (this.setter) {\n invariant(!this.isRunningSetter, \"The setter of computed value '\" + this.name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\");\n this.isRunningSetter = true;\n try {\n this.setter.call(this.scope, value);\n }\n finally {\n this.isRunningSetter = false;\n }\n }\n else\n invariant(false, process.env.NODE_ENV !== \"production\" &&\n \"[ComputedValue '\" + this.name + \"'] It is not possible to assign a new value to a computed value.\");\n };\n ComputedValue.prototype.trackAndCompute = function () {\n if (isSpyEnabled() && process.env.NODE_ENV !== \"production\") {\n spyReport({\n object: this.scope,\n type: \"compute\",\n name: this.name\n });\n }\n var oldValue = this.value;\n var wasSuspended = \n /* see #1208 */ this.dependenciesState === IDerivationState.NOT_TRACKING;\n var newValue = this.computeValue(true);\n var changed = wasSuspended ||\n isCaughtException(oldValue) ||\n isCaughtException(newValue) ||\n !this.equals(oldValue, newValue);\n if (changed) {\n this.value = newValue;\n }\n return changed;\n };\n ComputedValue.prototype.computeValue = function (track) {\n this.isComputing = true;\n globalState.computationDepth++;\n var res;\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope);\n }\n else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope);\n }\n else {\n try {\n res = this.derivation.call(this.scope);\n }\n catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n globalState.computationDepth--;\n this.isComputing = false;\n return res;\n };\n ComputedValue.prototype.suspend = function () {\n if (!this.keepAlive) {\n clearObserving(this);\n this.value = undefined; // don't hold on to computed value!\n }\n };\n ComputedValue.prototype.observe = function (listener, fireImmediately) {\n var _this = this;\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n var newValue = _this.get();\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n type: \"update\",\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n firstTime = false;\n prevValue = newValue;\n });\n };\n ComputedValue.prototype.warnAboutUntrackedRead = function () {\n if (process.env.NODE_ENV === \"production\")\n return;\n if (this.requiresReaction === true) {\n fail(\"[mobx] Computed value \" + this.name + \" is read outside a reactive context\");\n }\n if (this.isTracing !== TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + this.name + \"' is being read outside a reactive context. Doing a full recompute\");\n }\n if (globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value \" + this.name + \" is being read outside a reactive context. Doing a full recompute\");\n }\n };\n ComputedValue.prototype.toJSON = function () {\n return this.get();\n };\n ComputedValue.prototype.toString = function () {\n return this.name + \"[\" + this.derivation.toString() + \"]\";\n };\n ComputedValue.prototype.valueOf = function () {\n return toPrimitive(this.get());\n };\n ComputedValue.prototype[Symbol.toPrimitive] = function () {\n return this.valueOf();\n };\n return ComputedValue;\n}());\nvar isComputedValue = createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\n/**\n * These values will persist if global state is reset\n */\nvar persistentKeys = [\n \"mobxGuid\",\n \"spyListeners\",\n \"enforceActions\",\n \"computedRequiresReaction\",\n \"reactionRequiresObservable\",\n \"observableRequiresReaction\",\n \"allowStateReads\",\n \"disableErrorBoundaries\",\n \"runId\",\n \"UNCHANGED\"\n];\nvar MobXGlobals = /** @class */ (function () {\n function MobXGlobals() {\n /**\n * MobXGlobals version.\n * MobX compatiblity with other versions loaded in memory as long as this version matches.\n * It indicates that the global state still stores similar information\n *\n * N.B: this version is unrelated to the package version of MobX, and is only the version of the\n * internal state storage of MobX, and can be the same across many different package versions\n */\n this.version = 5;\n /**\n * globally unique token to signal unchanged\n */\n this.UNCHANGED = {};\n /**\n * Currently running derivation\n */\n this.trackingDerivation = null;\n /**\n * Are we running a computation currently? (not a reaction)\n */\n this.computationDepth = 0;\n /**\n * Each time a derivation is tracked, it is assigned a unique run-id\n */\n this.runId = 0;\n /**\n * 'guid' for general purpose. Will be persisted amongst resets.\n */\n this.mobxGuid = 0;\n /**\n * Are we in a batch block? (and how many of them)\n */\n this.inBatch = 0;\n /**\n * Observables that don't have observers anymore, and are about to be\n * suspended, unless somebody else accesses it in the same batch\n *\n * @type {IObservable[]}\n */\n this.pendingUnobservations = [];\n /**\n * List of scheduled, not yet executed, reactions.\n */\n this.pendingReactions = [];\n /**\n * Are we currently processing reactions?\n */\n this.isRunningReactions = false;\n /**\n * Is it allowed to change observables at this point?\n * In general, MobX doesn't allow that when running computations and React.render.\n * To ensure that those functions stay pure.\n */\n this.allowStateChanges = true;\n /**\n * Is it allowed to read observables at this point?\n * Used to hold the state needed for `observableRequiresReaction`\n */\n this.allowStateReads = true;\n /**\n * If strict mode is enabled, state changes are by default not allowed\n */\n this.enforceActions = false;\n /**\n * Spy callbacks\n */\n this.spyListeners = [];\n /**\n * Globally attached error handlers that react specifically to errors in reactions\n */\n this.globalReactionErrorHandlers = [];\n /**\n * Warn if computed values are accessed outside a reactive context\n */\n this.computedRequiresReaction = false;\n /**\n * (Experimental)\n * Warn if you try to create to derivation / reactive context without accessing any observable.\n */\n this.reactionRequiresObservable = false;\n /**\n * (Experimental)\n * Warn if observables are accessed outside a reactive context\n */\n this.observableRequiresReaction = false;\n /**\n * Allows overwriting of computed properties, useful in tests but not prod as it can cause\n * memory leaks. See https://github.com/mobxjs/mobx/issues/1867\n */\n this.computedConfigurable = false;\n /*\n * Don't catch and rethrow exceptions. This is useful for inspecting the state of\n * the stack when an exception occurs while debugging.\n */\n this.disableErrorBoundaries = false;\n /*\n * If true, we are already handling an exception in an action. Any errors in reactions should be suppressed, as\n * they are not the cause, see: https://github.com/mobxjs/mobx/issues/1836\n */\n this.suppressReactionErrors = false;\n }\n return MobXGlobals;\n}());\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n return mockGlobal;\n}\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = (function () {\n var global = getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals)\n canMergeGlobalState = false;\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version)\n canMergeGlobalState = false;\n if (!canMergeGlobalState) {\n setTimeout(function () {\n if (!isolateCalled) {\n fail(\"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\");\n }\n }, 1);\n return new MobXGlobals();\n }\n else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED)\n global.__mobxGlobals.UNCHANGED = {}; // make merge backward compatible\n return global.__mobxGlobals;\n }\n else {\n global.__mobxInstanceCount = 1;\n return (global.__mobxGlobals = new MobXGlobals());\n }\n})();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length ||\n globalState.inBatch ||\n globalState.isRunningReactions)\n fail(\"isolateGlobalState should be called before MobX is running any reactions\");\n isolateCalled = true;\n if (canMergeGlobalState) {\n if (--getGlobal().__mobxInstanceCount === 0)\n getGlobal().__mobxGlobals = undefined;\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\n * For testing purposes only; this will break the internal state of existing observables,\n * but can be used to get back at a stable state after throwing errors\n */\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n for (var key in defaultGlobals)\n if (persistentKeys.indexOf(key) === -1)\n globalState[key] = defaultGlobals[key];\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers && observable.observers.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers;\n}\n// function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers.add(node);\n if (observable.lowestObserverState > node.dependenciesState)\n observable.lowestObserverState = node.dependenciesState;\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers.delete(node);\n if (observable.observers.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n }\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\n * Avoids unnecessary recalculations.\n */\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions();\n // the batch is actually about to finish, all unobserving should happen here.\n var list = globalState.pendingUnobservations;\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation = false;\n if (observable.observers.size === 0) {\n if (observable.isBeingObserved) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved = false;\n observable.onBecomeUnobserved();\n }\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observable of another, etc..\n observable.suspend();\n }\n }\n }\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n if (derivation !== null) {\n /**\n * Simple optimization, give each derivation run an unique id (runId)\n * Check if last time this observable was accessed the same runId is used\n * if this is the case, the relation is already known\n */\n if (derivation.runId !== observable.lastAccessedBy) {\n observable.lastAccessedBy = derivation.runId;\n // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n derivation.newObserving[derivation.unboundDepsCount++] = observable;\n if (!observable.isBeingObserved) {\n observable.isBeingObserved = true;\n observable.onBecomeObserved();\n }\n }\n return true;\n }\n else if (observable.observers.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n return false;\n}\n// function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n/**\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\n * It will propagate changes to observers from previous run\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\n * Hopefully self reruning autoruns aren't a feature people should depend on\n * Also most basic use cases should be ok\n */\n// Called by Atom when its value changes\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState === IDerivationState.STALE)\n return;\n observable.lowestObserverState = IDerivationState.STALE;\n // Ideally we use for..of here, but the downcompiled version is really slow...\n observable.observers.forEach(function (d) {\n if (d.dependenciesState === IDerivationState.UP_TO_DATE) {\n if (d.isTracing !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n d.onBecomeStale();\n }\n d.dependenciesState = IDerivationState.STALE;\n });\n // invariantLOS(observable, \"changed end\");\n}\n// Called by ComputedValue when it recalculate and its value changed\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState === IDerivationState.STALE)\n return;\n observable.lowestObserverState = IDerivationState.STALE;\n observable.observers.forEach(function (d) {\n if (d.dependenciesState === IDerivationState.POSSIBLY_STALE)\n d.dependenciesState = IDerivationState.STALE;\n else if (d.dependenciesState === IDerivationState.UP_TO_DATE // this happens during computing of `d`, just keep lowestObserverState up to date.\n )\n observable.lowestObserverState = IDerivationState.UP_TO_DATE;\n });\n // invariantLOS(observable, \"confirmed end\");\n}\n// Used by computed when its dependency changed, but we don't wan't to immediately recompute.\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState !== IDerivationState.UP_TO_DATE)\n return;\n observable.lowestObserverState = IDerivationState.POSSIBLY_STALE;\n observable.observers.forEach(function (d) {\n if (d.dependenciesState === IDerivationState.UP_TO_DATE) {\n d.dependenciesState = IDerivationState.POSSIBLY_STALE;\n if (d.isTracing !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n d.onBecomeStale();\n }\n });\n // invariantLOS(observable, \"maybe end\");\n}\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name + \"' is invalidated due to a change in: '\" + observable.name + \"'\");\n if (derivation.isTracing === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1);\n // prettier-ignore\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name + \"' is being traced and '\" + observable.name + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n lines.push(\"\" + new Array(depth).join(\"\\t\") + tree.name); // MWE: not the fastest, but the easiest way :)\n if (tree.dependencies)\n tree.dependencies.forEach(function (child) { return printDepTree(child, lines, depth + 1); });\n}\n\nvar Reaction = /** @class */ (function () {\n function Reaction(name, onInvalidate, errorHandler, requiresObservable) {\n if (name === void 0) { name = \"Reaction@\" + getNextId(); }\n if (requiresObservable === void 0) { requiresObservable = false; }\n this.name = name;\n this.onInvalidate = onInvalidate;\n this.errorHandler = errorHandler;\n this.requiresObservable = requiresObservable;\n this.observing = []; // nodes we are looking at. Our value depends on these nodes\n this.newObserving = [];\n this.dependenciesState = IDerivationState.NOT_TRACKING;\n this.diffValue = 0;\n this.runId = 0;\n this.unboundDepsCount = 0;\n this.__mapid = \"#\" + getNextId();\n this.isDisposed = false;\n this._isScheduled = false;\n this._isTrackPending = false;\n this._isRunning = false;\n this.isTracing = TraceMode.NONE;\n }\n Reaction.prototype.onBecomeStale = function () {\n this.schedule();\n };\n Reaction.prototype.schedule = function () {\n if (!this._isScheduled) {\n this._isScheduled = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n Reaction.prototype.isScheduled = function () {\n return this._isScheduled;\n };\n /**\n * internal, use schedule() if you intend to kick off a reaction\n */\n Reaction.prototype.runReaction = function () {\n if (!this.isDisposed) {\n startBatch();\n this._isScheduled = false;\n if (shouldCompute(this)) {\n this._isTrackPending = true;\n try {\n this.onInvalidate();\n if (this._isTrackPending &&\n isSpyEnabled() &&\n process.env.NODE_ENV !== \"production\") {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name,\n type: \"scheduled-reaction\"\n });\n }\n }\n catch (e) {\n this.reportExceptionInDerivation(e);\n }\n }\n endBatch();\n }\n };\n Reaction.prototype.track = function (fn) {\n if (this.isDisposed) {\n return;\n // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n if (notify && process.env.NODE_ENV !== \"production\") {\n startTime = Date.now();\n spyReportStart({\n name: this.name,\n type: \"reaction\"\n });\n }\n this._isRunning = true;\n var result = trackDerivedFunction(this, fn, undefined);\n this._isRunning = false;\n this._isTrackPending = false;\n if (this.isDisposed) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n if (isCaughtException(result))\n this.reportExceptionInDerivation(result.cause);\n if (notify && process.env.NODE_ENV !== \"production\") {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n endBatch();\n };\n Reaction.prototype.reportExceptionInDerivation = function (error) {\n var _this = this;\n if (this.errorHandler) {\n this.errorHandler(error, this);\n return;\n }\n if (globalState.disableErrorBoundaries)\n throw error;\n var message = \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\";\n if (globalState.suppressReactionErrors) {\n console.warn(\"[mobx] (error in reaction '\" + this.name + \"' suppressed, fix error of causing action below)\"); // prettier-ignore\n }\n else {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n }\n if (isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name,\n message: message,\n error: \"\" + error\n });\n }\n globalState.globalReactionErrorHandlers.forEach(function (f) { return f(error, _this); });\n };\n Reaction.prototype.dispose = function () {\n if (!this.isDisposed) {\n this.isDisposed = true;\n if (!this._isRunning) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n Reaction.prototype.getDisposer = function () {\n var r = this.dispose.bind(this);\n r[$mobx] = this;\n return r;\n };\n Reaction.prototype.toString = function () {\n return \"Reaction[\" + this.name + \"]\";\n };\n Reaction.prototype.trace = function (enterBreakPoint) {\n if (enterBreakPoint === void 0) { enterBreakPoint = false; }\n trace(this, enterBreakPoint);\n };\n return Reaction;\n}());\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0)\n globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\n * Magic number alert!\n * Defines within how many times a reaction is allowed to re-trigger itself\n * until it is assumed that this is gonna be a never ending loop...\n */\nvar MAX_REACTION_ITERATIONS = 100;\nvar reactionScheduler = function (f) { return f(); };\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions)\n return;\n reactionScheduler(runReactionsHelper);\n}\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0;\n // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error(\"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" +\n (\" Probably there is a cycle in the reactive function: \" + allReactions[0]));\n allReactions.splice(0); // clear reactions\n }\n var remainingReactions = allReactions.splice(0);\n for (var i = 0, l = remainingReactions.length; i < l; i++)\n remainingReactions[i].runReaction();\n }\n globalState.isRunningReactions = false;\n}\nvar isReaction = createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n reactionScheduler = function (f) { return fn(function () { return baseScheduler(f); }); };\n}\n\nfunction isSpyEnabled() {\n return process.env.NODE_ENV !== \"production\" && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (process.env.NODE_ENV === \"production\")\n return; // dead code elimination can do the rest\n if (!globalState.spyListeners.length)\n return;\n var listeners = globalState.spyListeners;\n for (var i = 0, l = listeners.length; i < l; i++)\n listeners[i](event);\n}\nfunction spyReportStart(event) {\n if (process.env.NODE_ENV === \"production\")\n return;\n var change = __assign(__assign({}, event), { spyReportStart: true });\n spyReport(change);\n}\nvar END_EVENT = { spyReportEnd: true };\nfunction spyReportEnd(change) {\n if (process.env.NODE_ENV === \"production\")\n return;\n if (change)\n spyReport(__assign(__assign({}, change), { spyReportEnd: true }));\n else\n spyReport(END_EVENT);\n}\nfunction spy(listener) {\n if (process.env.NODE_ENV === \"production\") {\n console.warn(\"[mobx.spy] Is a no-op in production builds\");\n return function () { };\n }\n else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) { return l !== listener; });\n });\n }\n}\n\nfunction dontReassignFields() {\n fail(process.env.NODE_ENV !== \"production\" && \"@action fields are not reassignable\");\n}\nfunction namedActionDecorator(name) {\n return function (target, prop, descriptor) {\n if (descriptor) {\n if (process.env.NODE_ENV !== \"production\" && descriptor.get !== undefined) {\n return fail(\"@action cannot be used with getters\");\n }\n // babel / typescript\n // @action method() { }\n if (descriptor.value) {\n // typescript\n return {\n value: createAction(name, descriptor.value),\n enumerable: false,\n configurable: true,\n writable: true // for typescript, this must be writable, otherwise it cannot inherit :/ (see inheritable actions test)\n };\n }\n // babel only: @action method = () => {}\n var initializer_1 = descriptor.initializer;\n return {\n enumerable: false,\n configurable: true,\n writable: true,\n initializer: function () {\n // N.B: we can't immediately invoke initializer; this would be wrong\n return createAction(name, initializer_1.call(this));\n }\n };\n }\n // bound instance methods\n return actionFieldDecorator(name).apply(this, arguments);\n };\n}\nfunction actionFieldDecorator(name) {\n // Simple property that writes on first invocation to the current instance\n return function (target, prop, descriptor) {\n Object.defineProperty(target, prop, {\n configurable: true,\n enumerable: false,\n get: function () {\n return undefined;\n },\n set: function (value) {\n addHiddenProp(this, prop, action(name, value));\n }\n });\n };\n}\nfunction boundActionDecorator(target, propertyName, descriptor, applyToInstance) {\n if (applyToInstance === true) {\n defineBoundAction(target, propertyName, descriptor.value);\n return null;\n }\n if (descriptor) {\n // if (descriptor.value)\n // Typescript / Babel: @action.bound method() { }\n // also: babel @action.bound method = () => {}\n return {\n configurable: true,\n enumerable: false,\n get: function () {\n defineBoundAction(this, propertyName, descriptor.value || descriptor.initializer.call(this));\n return this[propertyName];\n },\n set: dontReassignFields\n };\n }\n // field decorator Typescript @action.bound method = () => {}\n return {\n enumerable: false,\n configurable: true,\n set: function (v) {\n defineBoundAction(this, propertyName, v);\n },\n get: function () {\n return undefined;\n }\n };\n}\n\nvar action = function action(arg1, arg2, arg3, arg4) {\n // action(fn() {})\n if (arguments.length === 1 && typeof arg1 === \"function\")\n return createAction(arg1.name || \"\", arg1);\n // action(\"name\", fn() {})\n if (arguments.length === 2 && typeof arg2 === \"function\")\n return createAction(arg1, arg2);\n // @action(\"name\") fn() {}\n if (arguments.length === 1 && typeof arg1 === \"string\")\n return namedActionDecorator(arg1);\n // @action fn() {}\n if (arg4 === true) {\n // apply to instance immediately\n addHiddenProp(arg1, arg2, createAction(arg1.name || arg2, arg3.value, this));\n }\n else {\n return namedActionDecorator(arg2).apply(null, arguments);\n }\n};\naction.bound = boundActionDecorator;\nfunction runInAction(arg1, arg2) {\n var actionName = typeof arg1 === \"string\" ? arg1 : arg1.name || \"\";\n var fn = typeof arg1 === \"function\" ? arg1 : arg2;\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof fn === \"function\" && fn.length === 0, \"`runInAction` expects a function without arguments\");\n if (typeof actionName !== \"string\" || !actionName)\n fail(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n return executeAction(actionName, fn, this, undefined);\n}\nfunction isAction(thing) {\n return typeof thing === \"function\" && thing.isMobxAction === true;\n}\nfunction defineBoundAction(target, propertyName, fn) {\n addHiddenProp(target, propertyName, createAction(propertyName, fn.bind(target)));\n}\n\n/**\n * Creates a named reactive view and keeps it alive, so that the view is always\n * updated if one of the dependencies changes, even when the view is not further used by something else.\n * @param view The reactive view\n * @returns disposer function, which can be used to stop the view from being updated in the future.\n */\nfunction autorun(view, opts) {\n if (opts === void 0) { opts = EMPTY_OBJECT; }\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof view === \"function\", \"Autorun expects a function as first argument\");\n invariant(isAction(view) === false, \"Autorun does not accept actions since actions are untrackable\");\n }\n var name = (opts && opts.name) || view.name || \"Autorun@\" + getNextId();\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n }\n else {\n var scheduler_1 = createSchedulerFromOptions(opts);\n // debounced autorun\n var isScheduled_1 = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled_1) {\n isScheduled_1 = true;\n scheduler_1(function () {\n isScheduled_1 = false;\n if (!reaction.isDisposed)\n reaction.track(reactionRunner);\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n function reactionRunner() {\n view(reaction);\n }\n reaction.schedule();\n return reaction.getDisposer();\n}\nvar run = function (f) { return f(); };\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler\n ? opts.scheduler\n : opts.delay\n ? function (f) { return setTimeout(f, opts.delay); }\n : run;\n}\nfunction reaction(expression, effect, opts) {\n if (opts === void 0) { opts = EMPTY_OBJECT; }\n if (process.env.NODE_ENV !== \"production\") {\n invariant(typeof expression === \"function\", \"First argument to reaction should be a function\");\n invariant(typeof opts === \"object\", \"Third argument of reactions should be an object\");\n }\n var name = opts.name || \"Reaction@\" + getNextId();\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var equals = opts.compareStructural\n ? comparer.structural\n : opts.equals || comparer.default;\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n }\n else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n function reactionRunner() {\n isScheduled = false; // Q: move into reaction runner?\n if (r.isDisposed)\n return;\n var changed = false;\n r.track(function () {\n var nextValue = expression(r);\n changed = firstTime || !equals(value, nextValue);\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately)\n effectAction(value, r);\n if (!firstTime && changed === true)\n effectAction(value, r);\n if (firstTime)\n firstTime = false;\n }\n r.schedule();\n return r.getDisposer();\n}\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n }\n catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(\"onBecomeObserved\", thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(\"onBecomeUnobserved\", thing, arg2, arg3);\n}\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = typeof arg3 === \"function\" ? arg3 : arg2;\n var listenersKey = hook + \"Listeners\";\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n }\n else {\n atom[listenersKey] = new Set([cb]);\n }\n var orig = atom[hook];\n if (typeof orig !== \"function\")\n return fail(process.env.NODE_ENV !== \"production\" && \"Not an atom that can be (un)observed\");\n return function () {\n var hookListeners = atom[listenersKey];\n if (hookListeners) {\n hookListeners.delete(cb);\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nfunction configure(options) {\n var enforceActions = options.enforceActions, computedRequiresReaction = options.computedRequiresReaction, computedConfigurable = options.computedConfigurable, disableErrorBoundaries = options.disableErrorBoundaries, reactionScheduler = options.reactionScheduler, reactionRequiresObservable = options.reactionRequiresObservable, observableRequiresReaction = options.observableRequiresReaction;\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n if (enforceActions !== undefined) {\n if (typeof enforceActions === \"boolean\" || enforceActions === \"strict\")\n deprecated(\"Deprecated value for 'enforceActions', use 'false' => '\\\"never\\\"', 'true' => '\\\"observed\\\"', '\\\"strict\\\"' => \\\"'always'\\\" instead\");\n var ea = void 0;\n switch (enforceActions) {\n case true:\n case \"observed\":\n ea = true;\n break;\n case false:\n case \"never\":\n ea = false;\n break;\n case \"strict\":\n case \"always\":\n ea = \"strict\";\n break;\n default:\n fail(\"Invalid value for 'enforceActions': '\" + enforceActions + \"', expected 'never', 'always' or 'observed'\");\n }\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === \"strict\" ? false : true;\n }\n if (computedRequiresReaction !== undefined) {\n globalState.computedRequiresReaction = !!computedRequiresReaction;\n }\n if (reactionRequiresObservable !== undefined) {\n globalState.reactionRequiresObservable = !!reactionRequiresObservable;\n }\n if (observableRequiresReaction !== undefined) {\n globalState.observableRequiresReaction = !!observableRequiresReaction;\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n }\n if (computedConfigurable !== undefined) {\n globalState.computedConfigurable = !!computedConfigurable;\n }\n if (disableErrorBoundaries !== undefined) {\n if (disableErrorBoundaries === true)\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n globalState.disableErrorBoundaries = !!disableErrorBoundaries;\n }\n if (reactionScheduler) {\n setReactionScheduler(reactionScheduler);\n }\n}\n\nfunction decorate(thing, decorators) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(isPlainObject(decorators), \"Decorators should be a key value map\");\n var target = typeof thing === \"function\" ? thing.prototype : thing;\n var _loop_1 = function (prop) {\n var propertyDecorators = decorators[prop];\n if (!Array.isArray(propertyDecorators)) {\n propertyDecorators = [propertyDecorators];\n }\n process.env.NODE_ENV !== \"production\" &&\n invariant(propertyDecorators.every(function (decorator) { return typeof decorator === \"function\"; }), \"Decorate: expected a decorator function or array of decorator functions for '\" + prop + \"'\");\n var descriptor = Object.getOwnPropertyDescriptor(target, prop);\n var newDescriptor = propertyDecorators.reduce(function (accDescriptor, decorator) { return decorator(target, prop, accDescriptor); }, descriptor);\n if (newDescriptor)\n Object.defineProperty(target, prop, newDescriptor);\n };\n for (var prop in decorators) {\n _loop_1(prop);\n }\n return thing;\n}\n\nfunction extendObservable(target, properties, decorators, options) {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(arguments.length >= 2 && arguments.length <= 4, \"'extendObservable' expected 2-4 arguments\");\n invariant(typeof target === \"object\", \"'extendObservable' expects an object as first argument\");\n invariant(!isObservableMap(target), \"'extendObservable' should not be used on maps, use map.merge instead\");\n }\n options = asCreateObservableOptions(options);\n var defaultDecorator = getDefaultDecoratorFromObjectOptions(options);\n initializeInstance(target); // Fixes #1740\n asObservableObject(target, options.name, defaultDecorator.enhancer); // make sure object is observable, even without initial props\n if (properties)\n extendObservableObjectWithProperties(target, properties, decorators, defaultDecorator);\n return target;\n}\nfunction getDefaultDecoratorFromObjectOptions(options) {\n return options.defaultDecorator || (options.deep === false ? refDecorator : deepDecorator);\n}\nfunction extendObservableObjectWithProperties(target, properties, decorators, defaultDecorator) {\n var e_1, _a, e_2, _b;\n if (process.env.NODE_ENV !== \"production\") {\n invariant(!isObservable(properties), \"Extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540\");\n if (decorators) {\n var keys = getPlainObjectKeys(decorators);\n try {\n for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {\n var key = keys_1_1.value;\n if (!(key in properties))\n fail(\"Trying to declare a decorator for unspecified property '\" + stringifyKey(key) + \"'\");\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n startBatch();\n try {\n var keys = ownKeys(properties);\n try {\n for (var keys_2 = __values(keys), keys_2_1 = keys_2.next(); !keys_2_1.done; keys_2_1 = keys_2.next()) {\n var key = keys_2_1.value;\n var descriptor = Object.getOwnPropertyDescriptor(properties, key);\n if (process.env.NODE_ENV !== \"production\") {\n if (!isPlainObject(properties))\n fail(\"'extendObservable' only accepts plain objects as second argument\");\n if (isComputed(descriptor.value))\n fail(\"Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead\");\n }\n var decorator = decorators && key in decorators\n ? decorators[key]\n : descriptor.get\n ? computedDecorator\n : defaultDecorator;\n if (process.env.NODE_ENV !== \"production\" && typeof decorator !== \"function\")\n fail(\"Not a valid decorator for '\" + stringifyKey(key) + \"', got: \" + decorator);\n var resultDescriptor = decorator(target, key, descriptor, true);\n if (resultDescriptor // otherwise, assume already applied, due to `applyToInstance`\n )\n Object.defineProperty(target, key, resultDescriptor);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (keys_2_1 && !keys_2_1.done && (_b = keys_2.return)) _b.call(keys_2);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n finally {\n endBatch();\n }\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name\n };\n if (node.observing && node.observing.length > 0)\n result.dependencies = unique(node.observing).map(nodeToDependencyTree);\n return result;\n}\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name\n };\n if (hasObservers(node))\n result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n return result;\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nfunction flow(generator) {\n if (arguments.length !== 1)\n fail(!!process.env.NODE_ENV && \"Flow expects 1 argument and cannot be used as decorator\");\n var name = generator.name || \"\";\n // Implementation based on https://github.com/tj/co/blob/master/index.js\n return function () {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n }\n catch (e) {\n return reject(e);\n }\n next(ret);\n }\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.throw).call(gen, err);\n }\n catch (e) {\n return reject(e);\n }\n next(ret);\n }\n function next(ret) {\n if (ret && typeof ret.then === \"function\") {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n if (ret.done)\n return resolve(ret.value);\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n onFulfilled(undefined); // kick off the process\n });\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise)\n cancelPromise(pendingPromise);\n // Finally block can return (or yield) stuff..\n var res = gen.return(undefined);\n // eat anything that promise would do, it's cancelled!\n var yieldedPromise = Promise.resolve(res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n rejector(new FlowCancellationError());\n }\n catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return promise;\n };\n}\nfunction cancelPromise(promise) {\n if (typeof promise.cancel === \"function\")\n promise.cancel();\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n }\n else if (isObservableObject(thing)) {\n if (typeof propOrHandler !== \"string\")\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"Expected observable map, object or array as first array\");\n }\n if (target.dehancer !== undefined)\n return fail(process.env.NODE_ENV !== \"production\" && \"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (typeof handler === \"function\")\n return interceptProperty(thing, propOrHandler, handler);\n else\n return interceptInterceptable(thing, propOrHandler);\n}\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept(handler);\n}\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept(handler);\n}\n\nfunction _isComputed(value, property) {\n if (value === null || value === undefined)\n return false;\n if (property !== undefined) {\n if (isObservableObject(value) === false)\n return false;\n if (!value[$mobx].values.has(property))\n return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n }\n return isComputedValue(value);\n}\nfunction isComputed(value) {\n if (arguments.length > 1)\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"isComputed expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if (typeof propName !== \"string\")\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"isComputed expected a property name as second argument\");\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (value === null || value === undefined)\n return false;\n if (property !== undefined) {\n if (process.env.NODE_ENV !== \"production\" &&\n (isObservableMap(value) || isObservableArray(value)))\n return fail(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n if (isObservableObject(value)) {\n return value[$mobx].values.has(property);\n }\n return false;\n }\n // For first check, see #701\n return (isObservableObject(value) ||\n !!value[$mobx] ||\n isAtom(value) ||\n isReaction(value) ||\n isComputedValue(value));\n}\nfunction isObservable(value) {\n if (arguments.length !== 1)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if (typeof propName !== \"string\")\n return fail(process.env.NODE_ENV !== \"production\" && \"expected a property name as second argument\");\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].getKeys();\n }\n if (isObservableMap(obj)) {\n return Array.from(obj.keys());\n }\n if (isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) { return index; });\n }\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'keys()' can only be used on observable objects, arrays, sets and maps\");\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) { return obj[key]; });\n }\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) { return obj.get(key); });\n }\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'values()' can only be used on observable objects, arrays, sets and maps\");\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) { return [key, obj[key]]; });\n }\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) { return [key, obj.get(key)]; });\n }\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) { return [index, key]; });\n }\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'entries()' can only be used on observable objects, arrays and maps\");\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var values_1 = key;\n try {\n for (var key_1 in values_1)\n set(obj, key_1, values_1[key_1]);\n }\n finally {\n endBatch();\n }\n return;\n }\n if (isObservableObject(obj)) {\n var adm = obj[$mobx];\n var existingObservable = adm.values.get(key);\n if (existingObservable) {\n adm.write(key, value);\n }\n else {\n adm.addObservableProp(key, value, adm.defaultEnhancer);\n }\n }\n else if (isObservableMap(obj)) {\n obj.set(key, value);\n }\n else if (isObservableSet(obj)) {\n obj.add(key);\n }\n else if (isObservableArray(obj)) {\n if (typeof key !== \"number\")\n key = parseInt(key, 10);\n invariant(key >= 0, \"Not a valid index: '\" + key + \"'\");\n startBatch();\n if (key >= obj.length)\n obj.length = key + 1;\n obj[key] = value;\n endBatch();\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'set()' can only be used on observable objects, arrays and maps\");\n }\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].remove(key);\n }\n else if (isObservableMap(obj)) {\n obj.delete(key);\n }\n else if (isObservableSet(obj)) {\n obj.delete(key);\n }\n else if (isObservableArray(obj)) {\n if (typeof key !== \"number\")\n key = parseInt(key, 10);\n invariant(key >= 0, \"Not a valid index: '\" + key + \"'\");\n obj.splice(key, 1);\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'remove()' can only be used on observable objects, arrays and maps\");\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n // return keys(obj).indexOf(key) >= 0\n var adm = getAdministration(obj);\n return adm.has(key);\n }\n else if (isObservableMap(obj)) {\n return obj.has(key);\n }\n else if (isObservableSet(obj)) {\n return obj.has(key);\n }\n else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'has()' can only be used on observable objects, arrays and maps\");\n }\n}\nfunction get(obj, key) {\n if (!has(obj, key))\n return undefined;\n if (isObservableObject(obj)) {\n return obj[key];\n }\n else if (isObservableMap(obj)) {\n return obj.get(key);\n }\n else if (isObservableArray(obj)) {\n return obj[key];\n }\n else {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'get()' can only be used on observable objects, arrays and maps\");\n }\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (typeof cbOrFire === \"function\")\n return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);\n else\n return observeObservable(thing, propOrCb, cbOrFire);\n}\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe(listener, fireImmediately);\n}\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe(listener, fireImmediately);\n}\n\nvar defaultOptions = {\n detectCycles: true,\n exportMapsAsObjects: true,\n recurseEverything: false\n};\nfunction cache(map, key, value, options) {\n if (options.detectCycles)\n map.set(key, value);\n return value;\n}\nfunction toJSHelper(source, options, __alreadySeen) {\n if (!options.recurseEverything && !isObservable(source))\n return source;\n if (typeof source !== \"object\")\n return source;\n // Directly return null if source is null\n if (source === null)\n return null;\n // Directly return the Date object itself if contained in the observable\n if (source instanceof Date)\n return source;\n if (isObservableValue(source))\n return toJSHelper(source.get(), options, __alreadySeen);\n // make sure we track the keys of the object\n if (isObservable(source))\n keys(source);\n var detectCycles = options.detectCycles === true;\n if (detectCycles && source !== null && __alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n if (isObservableArray(source) || Array.isArray(source)) {\n var res_1 = cache(__alreadySeen, source, [], options);\n var toAdd = source.map(function (value) { return toJSHelper(value, options, __alreadySeen); });\n res_1.length = toAdd.length;\n for (var i = 0, l = toAdd.length; i < l; i++)\n res_1[i] = toAdd[i];\n return res_1;\n }\n if (isObservableSet(source) || Object.getPrototypeOf(source) === Set.prototype) {\n if (options.exportMapsAsObjects === false) {\n var res_2 = cache(__alreadySeen, source, new Set(), options);\n source.forEach(function (value) {\n res_2.add(toJSHelper(value, options, __alreadySeen));\n });\n return res_2;\n }\n else {\n var res_3 = cache(__alreadySeen, source, [], options);\n source.forEach(function (value) {\n res_3.push(toJSHelper(value, options, __alreadySeen));\n });\n return res_3;\n }\n }\n if (isObservableMap(source) || Object.getPrototypeOf(source) === Map.prototype) {\n if (options.exportMapsAsObjects === false) {\n var res_4 = cache(__alreadySeen, source, new Map(), options);\n source.forEach(function (value, key) {\n res_4.set(key, toJSHelper(value, options, __alreadySeen));\n });\n return res_4;\n }\n else {\n var res_5 = cache(__alreadySeen, source, {}, options);\n source.forEach(function (value, key) {\n res_5[key] = toJSHelper(value, options, __alreadySeen);\n });\n return res_5;\n }\n }\n // Fallback to the situation that source is an ObservableObject or a plain object\n var res = cache(__alreadySeen, source, {}, options);\n getPlainObjectKeys(source).forEach(function (key) {\n res[key] = toJSHelper(source[key], options, __alreadySeen);\n });\n return res;\n}\nfunction toJS(source, options) {\n // backward compatibility\n if (typeof options === \"boolean\")\n options = { detectCycles: options };\n if (!options)\n options = defaultOptions;\n options.detectCycles =\n options.detectCycles === undefined\n ? options.recurseEverything === true\n : options.detectCycles === true;\n var __alreadySeen;\n if (options.detectCycles)\n __alreadySeen = new Map();\n return toJSHelper(source, options, __alreadySeen);\n}\n\nfunction trace() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var enterBreakPoint = false;\n if (typeof args[args.length - 1] === \"boolean\")\n enterBreakPoint = args.pop();\n var derivation = getAtomFromArgs(args);\n if (!derivation) {\n return fail(process.env.NODE_ENV !== \"production\" &&\n \"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n if (derivation.isTracing === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name + \"' tracing enabled\");\n }\n derivation.isTracing = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n case 1:\n return getAtom(args[0]);\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\n * During a transaction no views are updated until the end of the transaction.\n * The transaction will be run synchronously nonetheless.\n *\n * @param action a function that updates some reactive state\n * @returns any value that was returned by the 'action' parameter.\n */\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) { thisArg = undefined; }\n startBatch();\n try {\n return action.apply(thisArg);\n }\n finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || (arg1 && typeof arg1 === \"object\"))\n return whenPromise(predicate, arg1);\n return _when(predicate, arg1, arg2 || {});\n}\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n if (typeof opts.timeout === \"number\") {\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed) {\n disposer();\n var error = new Error(\"WHEN_TIMEOUT\");\n if (opts.onError)\n opts.onError(error);\n else\n throw error;\n }\n }, opts.timeout);\n }\n opts.name = opts.name || \"When@\" + getNextId();\n var effectAction = createAction(opts.name + \"-effect\", effect);\n var disposer = autorun(function (r) {\n if (predicate()) {\n r.dispose();\n if (timeoutHandle)\n clearTimeout(timeoutHandle);\n effectAction();\n }\n }, opts);\n return disposer;\n}\nfunction whenPromise(predicate, opts) {\n if (process.env.NODE_ENV !== \"production\" && opts && opts.onError)\n return fail(\"the options 'onError' and 'promise' cannot be combined\");\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, __assign(__assign({}, opts), { onError: reject }));\n cancel = function () {\n disposer();\n reject(\"WHEN_CANCELLED\");\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n}\nfunction isPropertyKey(val) {\n return typeof val === \"string\" || typeof val === \"number\" || typeof val === \"symbol\";\n}\n// Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\nvar objectProxyTraps = {\n has: function (target, name) {\n if (name === $mobx || name === \"constructor\" || name === mobxDidRunLazyInitializersSymbol)\n return true;\n var adm = getAdm(target);\n // MWE: should `in` operator be reactive? If not, below code path will be faster / more memory efficient\n // TODO: check performance stats!\n // if (adm.values.get(name as string)) return true\n if (isPropertyKey(name))\n return adm.has(name);\n return name in target;\n },\n get: function (target, name) {\n if (name === $mobx || name === \"constructor\" || name === mobxDidRunLazyInitializersSymbol)\n return target[name];\n var adm = getAdm(target);\n var observable = adm.values.get(name);\n if (observable instanceof Atom) {\n var result = observable.get();\n if (result === undefined) {\n // This fixes #1796, because deleting a prop that has an\n // undefined value won't retrigger a observer (no visible effect),\n // the autorun wouldn't subscribe to future key changes (see also next comment)\n adm.has(name);\n }\n return result;\n }\n // make sure we start listening to future keys\n // note that we only do this here for optimization\n if (isPropertyKey(name))\n adm.has(name);\n return target[name];\n },\n set: function (target, name, value) {\n if (!isPropertyKey(name))\n return false;\n set(target, name, value);\n return true;\n },\n deleteProperty: function (target, name) {\n if (!isPropertyKey(name))\n return false;\n var adm = getAdm(target);\n adm.remove(name);\n return true;\n },\n ownKeys: function (target) {\n var adm = getAdm(target);\n adm.keysAtom.reportObserved();\n return Reflect.ownKeys(target);\n },\n preventExtensions: function (target) {\n fail(\"Dynamic observable objects cannot be frozen\");\n return false;\n }\n};\nfunction createDynamicObservableObject(base) {\n var proxy = new Proxy(base, objectProxyTraps);\n base[$mobx].proxy = proxy;\n return proxy;\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors !== undefined && interceptable.interceptors.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors || (interceptable.interceptors = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1)\n interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = __spread((interceptable.interceptors || []));\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n invariant(!change || change.type, \"Intercept handlers should return nothing or a change object\");\n if (!change)\n break;\n }\n return change;\n }\n finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners !== undefined && listenable.changeListeners.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners || (listenable.changeListeners = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1)\n listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners;\n if (!listeners)\n return;\n listeners = listeners.slice();\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n untrackedEnd(prevU);\n}\n\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\nvar arrayTraps = {\n get: function (target, name) {\n if (name === $mobx)\n return target[$mobx];\n if (name === \"length\")\n return target[$mobx].getArrayLength();\n if (typeof name === \"number\") {\n return arrayExtensions.get.call(target, name);\n }\n if (typeof name === \"string\" && !isNaN(name)) {\n return arrayExtensions.get.call(target, parseInt(name));\n }\n if (arrayExtensions.hasOwnProperty(name)) {\n return arrayExtensions[name];\n }\n return target[name];\n },\n set: function (target, name, value) {\n if (name === \"length\") {\n target[$mobx].setArrayLength(value);\n }\n if (typeof name === \"number\") {\n arrayExtensions.set.call(target, name, value);\n }\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n }\n else {\n // numeric string\n arrayExtensions.set.call(target, parseInt(name), value);\n }\n return true;\n },\n preventExtensions: function (target) {\n fail(\"Observable arrays cannot be frozen\");\n return false;\n }\n};\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) { name = \"ObservableArray@\" + getNextId(); }\n if (owned === void 0) { owned = false; }\n var adm = new ObservableArrayAdministration(name, enhancer, owned);\n addHiddenFinalProp(adm.values, $mobx, adm);\n var proxy = new Proxy(adm.values, arrayTraps);\n adm.proxy = proxy;\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n adm.spliceWithArray(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n return proxy;\n}\nvar ObservableArrayAdministration = /** @class */ (function () {\n function ObservableArrayAdministration(name, enhancer, owned) {\n this.owned = owned;\n this.values = [];\n this.proxy = undefined;\n this.lastKnownLength = 0;\n this.atom = new Atom(name || \"ObservableArray@\" + getNextId());\n this.enhancer = function (newV, oldV) { return enhancer(newV, oldV, name + \"[..]\"); };\n }\n ObservableArrayAdministration.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined)\n return this.dehancer(value);\n return value;\n };\n ObservableArrayAdministration.prototype.dehanceValues = function (values) {\n if (this.dehancer !== undefined && values.length > 0)\n return values.map(this.dehancer);\n return values;\n };\n ObservableArrayAdministration.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableArrayAdministration.prototype.observe = function (listener, fireImmediately) {\n if (fireImmediately === void 0) { fireImmediately = false; }\n if (fireImmediately) {\n listener({\n object: this.proxy,\n type: \"splice\",\n index: 0,\n added: this.values.slice(),\n addedCount: this.values.length,\n removed: [],\n removedCount: 0\n });\n }\n return registerListener(this, listener);\n };\n ObservableArrayAdministration.prototype.getArrayLength = function () {\n this.atom.reportObserved();\n return this.values.length;\n };\n ObservableArrayAdministration.prototype.setArrayLength = function (newLength) {\n if (typeof newLength !== \"number\" || newLength < 0)\n throw new Error(\"[mobx.array] Out of range: \" + newLength);\n var currentLength = this.values.length;\n if (newLength === currentLength)\n return;\n else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n for (var i = 0; i < newLength - currentLength; i++)\n newItems[i] = undefined; // No Array.fill everywhere...\n this.spliceWithArray(currentLength, 0, newItems);\n }\n else\n this.spliceWithArray(newLength, currentLength - newLength);\n };\n ObservableArrayAdministration.prototype.updateArrayLength = function (oldLength, delta) {\n if (oldLength !== this.lastKnownLength)\n throw new Error(\"[mobx] Modification exception: the internal structure of an observable array was changed.\");\n this.lastKnownLength += delta;\n };\n ObservableArrayAdministration.prototype.spliceWithArray = function (index, deleteCount, newItems) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this.atom);\n var length = this.values.length;\n if (index === undefined)\n index = 0;\n else if (index > length)\n index = length;\n else if (index < 0)\n index = Math.max(0, length + index);\n if (arguments.length === 1)\n deleteCount = length - index;\n else if (deleteCount === undefined || deleteCount === null)\n deleteCount = 0;\n else\n deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined)\n newItems = EMPTY_ARRAY;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy,\n type: \"splice\",\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change)\n return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) { return _this.enhancer(v, undefined); });\n if (process.env.NODE_ENV !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength(length, lengthDelta); // checks if internal array wasn't modified\n }\n var res = this.spliceItemsIntoValues(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0)\n this.notifyArraySplice(index, newItems, res);\n return this.dehanceValues(res);\n };\n ObservableArrayAdministration.prototype.spliceItemsIntoValues = function (index, deleteCount, newItems) {\n var _a;\n if (newItems.length < MAX_SPLICE_SIZE) {\n return (_a = this.values).splice.apply(_a, __spread([index, deleteCount], newItems));\n }\n else {\n var res = this.values.slice(index, index + deleteCount);\n this.values = this.values\n .slice(0, index)\n .concat(newItems, this.values.slice(index + deleteCount));\n return res;\n }\n };\n ObservableArrayAdministration.prototype.notifyArrayChildUpdate = function (index, newValue, oldValue) {\n var notifySpy = !this.owned && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n object: this.proxy,\n type: \"update\",\n index: index,\n newValue: newValue,\n oldValue: oldValue\n }\n : null;\n // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.atom.name }));\n this.atom.reportChanged();\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n };\n ObservableArrayAdministration.prototype.notifyArraySplice = function (index, added, removed) {\n var notifySpy = !this.owned && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n object: this.proxy,\n type: \"splice\",\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.atom.name }));\n this.atom.reportChanged();\n // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n };\n return ObservableArrayAdministration;\n}());\nvar arrayExtensions = {\n intercept: function (handler) {\n return this[$mobx].intercept(handler);\n },\n observe: function (listener, fireImmediately) {\n if (fireImmediately === void 0) { fireImmediately = false; }\n var adm = this[$mobx];\n return adm.observe(listener, fireImmediately);\n },\n clear: function () {\n return this.splice(0);\n },\n replace: function (newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray(0, adm.values.length, newItems);\n },\n /**\n * Converts this array back to a (shallow) javascript structure.\n * For a deep clone use mobx.toJS\n */\n toJS: function () {\n return this.slice();\n },\n toJSON: function () {\n // Used by JSON.stringify\n return this.toJS();\n },\n /*\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\n * since these functions alter the inner structure of the array, the have side effects.\n * Because the have side effects, they should not be used in computed function,\n * and for that reason the do not call dependencyState.notifyObserved\n */\n splice: function (index, deleteCount) {\n var newItems = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n newItems[_i - 2] = arguments[_i];\n }\n var adm = this[$mobx];\n switch (arguments.length) {\n case 0:\n return [];\n case 1:\n return adm.spliceWithArray(index);\n case 2:\n return adm.spliceWithArray(index, deleteCount);\n }\n return adm.spliceWithArray(index, deleteCount, newItems);\n },\n spliceWithArray: function (index, deleteCount, newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray(index, deleteCount, newItems);\n },\n push: function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var adm = this[$mobx];\n adm.spliceWithArray(adm.values.length, 0, items);\n return adm.values.length;\n },\n pop: function () {\n return this.splice(Math.max(this[$mobx].values.length - 1, 0), 1)[0];\n },\n shift: function () {\n return this.splice(0, 1)[0];\n },\n unshift: function () {\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var adm = this[$mobx];\n adm.spliceWithArray(0, 0, items);\n return adm.values.length;\n },\n reverse: function () {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n // so we deviate from the default and just make it an dervitation\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[mobx] `observableArray.reverse()` will not update the array in place. Use `observableArray.slice().reverse()` to suppress this warning and perform the operation on a copy, or `observableArray.replace(observableArray.slice().reverse())` to reverse & update in place\");\n }\n var clone = this.slice();\n return clone.reverse.apply(clone, arguments);\n },\n sort: function (compareFn) {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[mobx] `observableArray.sort()` will not update the array in place. Use `observableArray.slice().sort()` to suppress this warning and perform the operation on a copy, or `observableArray.replace(observableArray.slice().sort())` to sort & update in place\");\n }\n var clone = this.slice();\n return clone.sort.apply(clone, arguments);\n },\n remove: function (value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues(adm.values).indexOf(value);\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n return false;\n },\n get: function (index) {\n var adm = this[$mobx];\n if (adm) {\n if (index < adm.values.length) {\n adm.atom.reportObserved();\n return adm.dehanceValue(adm.values[index]);\n }\n console.warn(\"[mobx.array] Attempt to read an array index (\" + index + \") that is out of bounds (\" + adm.values.length + \"). Please check length first. Out of bound indices will not be tracked by MobX\");\n }\n return undefined;\n },\n set: function (index, newValue) {\n var adm = this[$mobx];\n var values = adm.values;\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(adm.atom);\n var oldValue = values[index];\n if (hasInterceptors(adm)) {\n var change = interceptChange(adm, {\n type: \"update\",\n object: adm.proxy,\n index: index,\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n newValue = adm.enhancer(newValue, oldValue);\n var changed = newValue !== oldValue;\n if (changed) {\n values[index] = newValue;\n adm.notifyArrayChildUpdate(index, newValue, oldValue);\n }\n }\n else if (index === values.length) {\n // add a new item\n adm.spliceWithArray(index, 0, [newValue]);\n }\n else {\n // out of bounds\n throw new Error(\"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + values.length);\n }\n }\n};\n[\n \"concat\",\n \"flat\",\n \"includes\",\n \"indexOf\",\n \"join\",\n \"lastIndexOf\",\n \"slice\",\n \"toString\",\n \"toLocaleString\"\n].forEach(function (funcName) {\n // Feature detection (eg flat may not be available)\n if (typeof Array.prototype[funcName] !== \"function\") {\n return;\n }\n arrayExtensions[funcName] = function () {\n var adm = this[$mobx];\n adm.atom.reportObserved();\n var dehancedValues = adm.dehanceValues(adm.values);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n});\n[\"every\", \"filter\", \"find\", \"findIndex\", \"flatMap\", \"forEach\", \"map\", \"some\"].forEach(function (funcName) {\n // Feature detection (eg flatMap may not be available)\n if (typeof Array.prototype[funcName] !== \"function\") {\n return;\n }\n arrayExtensions[funcName] = function (callback, thisArg) {\n var _this = this;\n var adm = this[$mobx];\n adm.atom.reportObserved();\n var dehancedValues = adm.dehanceValues(adm.values);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this);\n }, thisArg);\n };\n});\n[\"reduce\", \"reduceRight\"].forEach(function (funcName) {\n arrayExtensions[funcName] = function () {\n var _this = this;\n var adm = this[$mobx];\n adm.atom.reportObserved();\n // #2432 - reduce behavior depends on arguments.length\n var callback = arguments[0];\n arguments[0] = function (accumulator, currentValue, index) {\n currentValue = adm.dehanceValue(currentValue);\n return callback(accumulator, currentValue, index, _this);\n };\n return adm.values[funcName].apply(adm.values, arguments);\n };\n});\nvar isObservableArrayAdministration = createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _a;\nvar ObservableMapMarker = {};\n// just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\nvar ObservableMap = /** @class */ (function () {\n function ObservableMap(initialData, enhancer, name) {\n if (enhancer === void 0) { enhancer = deepEnhancer; }\n if (name === void 0) { name = \"ObservableMap@\" + getNextId(); }\n this.enhancer = enhancer;\n this.name = name;\n this[_a] = ObservableMapMarker;\n this._keysAtom = createAtom(this.name + \".keys()\");\n this[Symbol.toStringTag] = \"Map\";\n if (typeof Map !== \"function\") {\n throw new Error(\"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\");\n }\n this._data = new Map();\n this._hasMap = new Map();\n this.merge(initialData);\n }\n ObservableMap.prototype._has = function (key) {\n return this._data.has(key);\n };\n ObservableMap.prototype.has = function (key) {\n var _this = this;\n if (!globalState.trackingDerivation)\n return this._has(key);\n var entry = this._hasMap.get(key);\n if (!entry) {\n // todo: replace with atom (breaking change)\n var newEntry = (entry = new ObservableValue(this._has(key), referenceEnhancer, this.name + \".\" + stringifyKey(key) + \"?\", false));\n this._hasMap.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () { return _this._hasMap.delete(key); });\n }\n return entry.get();\n };\n ObservableMap.prototype.set = function (key, value) {\n var hasKey = this._has(key);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? \"update\" : \"add\",\n object: this,\n newValue: value,\n name: key\n });\n if (!change)\n return this;\n value = change.newValue;\n }\n if (hasKey) {\n this._updateValue(key, value);\n }\n else {\n this._addValue(key, value);\n }\n return this;\n };\n ObservableMap.prototype.delete = function (key) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this._keysAtom);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"delete\",\n object: this,\n name: key\n });\n if (!change)\n return false;\n }\n if (this._has(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"delete\",\n object: this,\n oldValue: this._data.get(key).value,\n name: key\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name, key: key }));\n transaction(function () {\n _this._keysAtom.reportChanged();\n _this._updateHasMapEntry(key, false);\n var observable = _this._data.get(key);\n observable.setNewValue(undefined);\n _this._data.delete(key);\n });\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n return true;\n }\n return false;\n };\n ObservableMap.prototype._updateHasMapEntry = function (key, value) {\n var entry = this._hasMap.get(key);\n if (entry) {\n entry.setNewValue(value);\n }\n };\n ObservableMap.prototype._updateValue = function (key, newValue) {\n var observable = this._data.get(key);\n newValue = observable.prepareNewValue(newValue);\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"update\",\n object: this,\n oldValue: observable.value,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name, key: key }));\n observable.setNewValue(newValue);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n }\n };\n ObservableMap.prototype._addValue = function (key, newValue) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this._keysAtom);\n transaction(function () {\n var observable = new ObservableValue(newValue, _this.enhancer, _this.name + \".\" + stringifyKey(key), false);\n _this._data.set(key, observable);\n newValue = observable.value; // value might have been changed\n _this._updateHasMapEntry(key, true);\n _this._keysAtom.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"add\",\n object: this,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name, key: key }));\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n };\n ObservableMap.prototype.get = function (key) {\n if (this.has(key))\n return this.dehanceValue(this._data.get(key).get());\n return this.dehanceValue(undefined);\n };\n ObservableMap.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n ObservableMap.prototype.keys = function () {\n this._keysAtom.reportObserved();\n return this._data.keys();\n };\n ObservableMap.prototype.values = function () {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function () {\n var _b = keys.next(), done = _b.done, value = _b.value;\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n ObservableMap.prototype.entries = function () {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function () {\n var _b = keys.next(), done = _b.done, value = _b.value;\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n ObservableMap.prototype[(_a = $mobx, Symbol.iterator)] = function () {\n return this.entries();\n };\n ObservableMap.prototype.forEach = function (callback, thisArg) {\n var e_1, _b;\n try {\n for (var _c = __values(this), _d = _c.next(); !_d.done; _d = _c.next()) {\n var _e = __read(_d.value, 2), key = _e[0], value = _e[1];\n callback.call(thisArg, value, key, this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n /** Merge another object into this object, returns this. */\n ObservableMap.prototype.merge = function (other) {\n var _this = this;\n if (isObservableMap(other)) {\n other = other.toJS();\n }\n transaction(function () {\n var prev = allowStateChangesStart(true);\n try {\n if (isPlainObject(other))\n getPlainObjectKeys(other).forEach(function (key) {\n return _this.set(key, other[key]);\n });\n else if (Array.isArray(other))\n other.forEach(function (_b) {\n var _c = __read(_b, 2), key = _c[0], value = _c[1];\n return _this.set(key, value);\n });\n else if (isES6Map(other)) {\n if (other.constructor !== Map)\n fail(\"Cannot initialize from classes that inherit from Map: \" + other.constructor.name); // prettier-ignore\n other.forEach(function (value, key) { return _this.set(key, value); });\n }\n else if (other !== null && other !== undefined)\n fail(\"Cannot initialize map from \" + other);\n }\n finally {\n allowStateChangesEnd(prev);\n }\n });\n return this;\n };\n ObservableMap.prototype.clear = function () {\n var _this = this;\n transaction(function () {\n untracked(function () {\n var e_2, _b;\n try {\n for (var _c = __values(_this.keys()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var key = _d.value;\n _this.delete(key);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n });\n };\n ObservableMap.prototype.replace = function (values) {\n var _this = this;\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n var e_3, _b, e_4, _c;\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map();\n // Used for optimization\n var keysReportChangedCalled = false;\n try {\n // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n for (var _d = __values(_this._data.keys()), _e = _d.next(); !_e.done; _e = _d.next()) {\n var key = _e.value;\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this.delete(key);\n // Was the key removed?\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n else {\n // Delete prevented by interceptor\n var value = _this._data.get(key);\n orderedData.set(key, value);\n }\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_e && !_e.done && (_b = _d.return)) _b.call(_d);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n // Merge entries\n for (var _f = __values(replacementMap.entries()), _g = _f.next(); !_g.done; _g = _f.next()) {\n var _h = __read(_g.value, 2), key = _h[0], value = _h[1];\n // We will want to know whether a new key is added\n var keyExisted = _this._data.has(key);\n // Add or update value\n _this.set(key, value);\n // The addition could have been prevent by interceptor\n if (_this._data.has(key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var value_1 = _this._data.get(key);\n orderedData.set(key, value_1);\n // Was a new key added?\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_g && !_g.done && (_c = _f.return)) _c.call(_f);\n }\n finally { if (e_4) throw e_4.error; }\n }\n // Check for possible key order change\n if (!keysReportChangedCalled) {\n if (_this._data.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this._keysAtom.reportChanged();\n }\n else {\n var iter1 = _this._data.keys();\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this._keysAtom.reportChanged();\n break;\n }\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n }\n // Use correctly ordered map\n _this._data = orderedData;\n });\n return this;\n };\n Object.defineProperty(ObservableMap.prototype, \"size\", {\n get: function () {\n this._keysAtom.reportObserved();\n return this._data.size;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns a plain object that represents this map.\n * Note that all the keys being stringified.\n * If there are duplicating keys after converting them to strings, behaviour is undetermined.\n */\n ObservableMap.prototype.toPOJO = function () {\n var e_5, _b;\n var res = {};\n try {\n for (var _c = __values(this), _d = _c.next(); !_d.done; _d = _c.next()) {\n var _e = __read(_d.value, 2), key = _e[0], value = _e[1];\n // We lie about symbol key types due to https://github.com/Microsoft/TypeScript/issues/1863\n res[typeof key === \"symbol\" ? key : stringifyKey(key)] = value;\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_5) throw e_5.error; }\n }\n return res;\n };\n /**\n * Returns a shallow non observable object clone of this map.\n * Note that the values migth still be observable. For a deep clone use mobx.toJS.\n */\n ObservableMap.prototype.toJS = function () {\n return new Map(this);\n };\n ObservableMap.prototype.toJSON = function () {\n // Used by JSON.stringify\n return this.toPOJO();\n };\n ObservableMap.prototype.toString = function () {\n var _this = this;\n return (this.name +\n \"[{ \" +\n Array.from(this.keys())\n .map(function (key) { return stringifyKey(key) + \": \" + (\"\" + _this.get(key)); })\n .join(\", \") +\n \" }]\");\n };\n /**\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\n * for callback details\n */\n ObservableMap.prototype.observe = function (listener, fireImmediately) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(fireImmediately !== true, \"`observe` doesn't support fireImmediately=true in combination with maps.\");\n return registerListener(this, listener);\n };\n ObservableMap.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n return ObservableMap;\n}());\n/* 'var' fixes small-build issue */\nvar isObservableMap = createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nvar _a$1;\nvar ObservableSetMarker = {};\nvar ObservableSet = /** @class */ (function () {\n function ObservableSet(initialData, enhancer, name) {\n if (enhancer === void 0) { enhancer = deepEnhancer; }\n if (name === void 0) { name = \"ObservableSet@\" + getNextId(); }\n this.name = name;\n this[_a$1] = ObservableSetMarker;\n this._data = new Set();\n this._atom = createAtom(this.name);\n this[Symbol.toStringTag] = \"Set\";\n if (typeof Set !== \"function\") {\n throw new Error(\"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\");\n }\n this.enhancer = function (newV, oldV) { return enhancer(newV, oldV, name); };\n if (initialData) {\n this.replace(initialData);\n }\n }\n ObservableSet.prototype.dehanceValue = function (value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n ObservableSet.prototype.clear = function () {\n var _this = this;\n transaction(function () {\n untracked(function () {\n var e_1, _b;\n try {\n for (var _c = __values(_this._data.values()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var value = _d.value;\n _this.delete(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n });\n };\n ObservableSet.prototype.forEach = function (callbackFn, thisArg) {\n var e_2, _b;\n try {\n for (var _c = __values(this), _d = _c.next(); !_d.done; _d = _c.next()) {\n var value = _d.value;\n callbackFn.call(thisArg, value, value, this);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n Object.defineProperty(ObservableSet.prototype, \"size\", {\n get: function () {\n this._atom.reportObserved();\n return this._data.size;\n },\n enumerable: true,\n configurable: true\n });\n ObservableSet.prototype.add = function (value) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this._atom);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"add\",\n object: this,\n newValue: value\n });\n if (!change)\n return this;\n // TODO: ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n if (!this.has(value)) {\n transaction(function () {\n _this._data.add(_this.enhancer(value, undefined));\n _this._atom.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"add\",\n object: this,\n newValue: value\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(change);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n }\n return this;\n };\n ObservableSet.prototype.delete = function (value) {\n var _this = this;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"delete\",\n object: this,\n oldValue: value\n });\n if (!change)\n return false;\n }\n if (this.has(value)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy\n ? {\n type: \"delete\",\n object: this,\n oldValue: value\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name }));\n transaction(function () {\n _this._atom.reportChanged();\n _this._data.delete(value);\n });\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n return true;\n }\n return false;\n };\n ObservableSet.prototype.has = function (value) {\n this._atom.reportObserved();\n return this._data.has(this.dehanceValue(value));\n };\n ObservableSet.prototype.entries = function () {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function () {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length\n ? { value: [keys[index], values[index]], done: false }\n : { done: true };\n }\n });\n };\n ObservableSet.prototype.keys = function () {\n return this.values();\n };\n ObservableSet.prototype.values = function () {\n this._atom.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this._data.values());\n return makeIterable({\n next: function () {\n return nextIndex < observableValues.length\n ? { value: self.dehanceValue(observableValues[nextIndex++]), done: false }\n : { done: true };\n }\n });\n };\n ObservableSet.prototype.replace = function (other) {\n var _this = this;\n if (isObservableSet(other)) {\n other = other.toJS();\n }\n transaction(function () {\n var prev = allowStateChangesStart(true);\n try {\n if (Array.isArray(other)) {\n _this.clear();\n other.forEach(function (value) { return _this.add(value); });\n }\n else if (isES6Set(other)) {\n _this.clear();\n other.forEach(function (value) { return _this.add(value); });\n }\n else if (other !== null && other !== undefined) {\n fail(\"Cannot initialize set from \" + other);\n }\n }\n finally {\n allowStateChangesEnd(prev);\n }\n });\n return this;\n };\n ObservableSet.prototype.observe = function (listener, fireImmediately) {\n // TODO 'fireImmediately' can be true?\n process.env.NODE_ENV !== \"production\" &&\n invariant(fireImmediately !== true, \"`observe` doesn't support fireImmediately=true in combination with sets.\");\n return registerListener(this, listener);\n };\n ObservableSet.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableSet.prototype.toJS = function () {\n return new Set(this);\n };\n ObservableSet.prototype.toString = function () {\n return this.name + \"[ \" + Array.from(this).join(\", \") + \" ]\";\n };\n ObservableSet.prototype[(_a$1 = $mobx, Symbol.iterator)] = function () {\n return this.values();\n };\n return ObservableSet;\n}());\nvar isObservableSet = createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar ObservableObjectAdministration = /** @class */ (function () {\n function ObservableObjectAdministration(target, values, name, defaultEnhancer) {\n if (values === void 0) { values = new Map(); }\n this.target = target;\n this.values = values;\n this.name = name;\n this.defaultEnhancer = defaultEnhancer;\n this.keysAtom = new Atom(name + \".keys\");\n }\n ObservableObjectAdministration.prototype.read = function (key) {\n return this.values.get(key).get();\n };\n ObservableObjectAdministration.prototype.write = function (key, newValue) {\n var instance = this.target;\n var observable = this.values.get(key);\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return;\n }\n // intercept\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: \"update\",\n object: this.proxy || instance,\n name: key,\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n newValue = observable.prepareNewValue(newValue);\n // notify spy & observers\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = isSpyEnabled();\n var change = notify || notifySpy\n ? {\n type: \"update\",\n object: this.proxy || instance,\n oldValue: observable.value,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name, key: key }));\n observable.setNewValue(newValue);\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n }\n };\n ObservableObjectAdministration.prototype.has = function (key) {\n var map = this.pendingKeys || (this.pendingKeys = new Map());\n var entry = map.get(key);\n if (entry)\n return entry.get();\n else {\n var exists = !!this.values.get(key);\n // Possible optimization: Don't have a separate map for non existing keys,\n // but store them in the values map instead, using a special symbol to denote \"not existing\"\n entry = new ObservableValue(exists, referenceEnhancer, this.name + \".\" + stringifyKey(key) + \"?\", false);\n map.set(key, entry);\n return entry.get(); // read to subscribe\n }\n };\n ObservableObjectAdministration.prototype.addObservableProp = function (propName, newValue, enhancer) {\n if (enhancer === void 0) { enhancer = this.defaultEnhancer; }\n var target = this.target;\n assertPropertyConfigurable(target, propName);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy || target,\n name: propName,\n type: \"add\",\n newValue: newValue\n });\n if (!change)\n return;\n newValue = change.newValue;\n }\n var observable = new ObservableValue(newValue, enhancer, this.name + \".\" + stringifyKey(propName), false);\n this.values.set(propName, observable);\n newValue = observable.value; // observableValue might have changed it\n Object.defineProperty(target, propName, generateObservablePropConfig(propName));\n this.notifyPropertyAddition(propName, newValue);\n };\n ObservableObjectAdministration.prototype.addComputedProp = function (propertyOwner, // where is the property declared?\n propName, options) {\n var target = this.target;\n options.name = options.name || this.name + \".\" + stringifyKey(propName);\n this.values.set(propName, new ComputedValue(options));\n if (propertyOwner === target || isPropertyConfigurable(propertyOwner, propName))\n Object.defineProperty(propertyOwner, propName, generateComputedPropConfig(propName));\n };\n ObservableObjectAdministration.prototype.remove = function (key) {\n if (!this.values.has(key))\n return;\n var target = this.target;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy || target,\n name: key,\n type: \"remove\"\n });\n if (!change)\n return;\n }\n try {\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = isSpyEnabled();\n var oldObservable = this.values.get(key);\n var oldValue = oldObservable && oldObservable.get();\n oldObservable && oldObservable.set(undefined);\n // notify key and keyset listeners\n this.keysAtom.reportChanged();\n this.values.delete(key);\n if (this.pendingKeys) {\n var entry = this.pendingKeys.get(key);\n if (entry)\n entry.set(false);\n }\n // delete the prop\n delete this.target[key];\n var change = notify || notifySpy\n ? {\n type: \"remove\",\n object: this.proxy || target,\n oldValue: oldValue,\n name: key\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name, key: key }));\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n }\n finally {\n endBatch();\n }\n };\n ObservableObjectAdministration.prototype.illegalAccess = function (owner, propName) {\n /**\n * This happens if a property is accessed through the prototype chain, but the property was\n * declared directly as own property on the prototype.\n *\n * E.g.:\n * class A {\n * }\n * extendObservable(A.prototype, { x: 1 })\n *\n * classB extens A {\n * }\n * console.log(new B().x)\n *\n * It is unclear whether the property should be considered 'static' or inherited.\n * Either use `console.log(A.x)`\n * or: decorate(A, { x: observable })\n *\n * When using decorate, the property will always be redeclared as own property on the actual instance\n */\n console.warn(\"Property '\" + propName + \"' of '\" + owner + \"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner\");\n };\n /**\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\n * for callback details\n */\n ObservableObjectAdministration.prototype.observe = function (callback, fireImmediately) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(fireImmediately !== true, \"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n ObservableObjectAdministration.prototype.intercept = function (handler) {\n return registerInterceptor(this, handler);\n };\n ObservableObjectAdministration.prototype.notifyPropertyAddition = function (key, newValue) {\n var notify = hasListeners(this);\n var notifySpy = isSpyEnabled();\n var change = notify || notifySpy\n ? {\n type: \"add\",\n object: this.proxy || this.target,\n name: key,\n newValue: newValue\n }\n : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportStart(__assign(__assign({}, change), { name: this.name, key: key }));\n if (notify)\n notifyListeners(this, change);\n if (notifySpy && process.env.NODE_ENV !== \"production\")\n spyReportEnd();\n if (this.pendingKeys) {\n var entry = this.pendingKeys.get(key);\n if (entry)\n entry.set(true);\n }\n this.keysAtom.reportChanged();\n };\n ObservableObjectAdministration.prototype.getKeys = function () {\n var e_1, _a;\n this.keysAtom.reportObserved();\n // return Reflect.ownKeys(this.values) as any\n var res = [];\n try {\n for (var _b = __values(this.values), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), key = _d[0], value = _d[1];\n if (value instanceof ObservableValue)\n res.push(key);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n };\n return ObservableObjectAdministration;\n}());\nfunction asObservableObject(target, name, defaultEnhancer) {\n if (name === void 0) { name = \"\"; }\n if (defaultEnhancer === void 0) { defaultEnhancer = deepEnhancer; }\n if (Object.prototype.hasOwnProperty.call(target, $mobx))\n return target[$mobx];\n process.env.NODE_ENV !== \"production\" &&\n invariant(Object.isExtensible(target), \"Cannot make the designated object observable; it is not extensible\");\n if (!isPlainObject(target))\n name = (target.constructor.name || \"ObservableObject\") + \"@\" + getNextId();\n if (!name)\n name = \"ObservableObject@\" + getNextId();\n var adm = new ObservableObjectAdministration(target, new Map(), stringifyKey(name), defaultEnhancer);\n addHiddenProp(target, $mobx, adm);\n return adm;\n}\nvar observablePropertyConfigs = Object.create(null);\nvar computedPropertyConfigs = Object.create(null);\nfunction generateObservablePropConfig(propName) {\n return (observablePropertyConfigs[propName] ||\n (observablePropertyConfigs[propName] = {\n configurable: true,\n enumerable: true,\n get: function () {\n return this[$mobx].read(propName);\n },\n set: function (v) {\n this[$mobx].write(propName, v);\n }\n }));\n}\nfunction getAdministrationForComputedPropOwner(owner) {\n var adm = owner[$mobx];\n if (!adm) {\n // because computed props are declared on proty,\n // the current instance might not have been initialized yet\n initializeInstance(owner);\n return owner[$mobx];\n }\n return adm;\n}\nfunction generateComputedPropConfig(propName) {\n return (computedPropertyConfigs[propName] ||\n (computedPropertyConfigs[propName] = {\n configurable: globalState.computedConfigurable,\n enumerable: false,\n get: function () {\n return getAdministrationForComputedPropOwner(this).read(propName);\n },\n set: function (v) {\n getAdministrationForComputedPropOwner(this).write(propName, v);\n }\n }));\n}\nvar isObservableObjectAdministration = createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n initializeInstance(thing);\n return isObservableObjectAdministration(thing[$mobx]);\n }\n return false;\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"It is not possible to get index atoms from arrays\");\n return thing[$mobx].atom;\n }\n if (isObservableSet(thing)) {\n return thing[$mobx];\n }\n if (isObservableMap(thing)) {\n var anyThing = thing;\n if (property === undefined)\n return anyThing._keysAtom;\n var observable = anyThing._data.get(property) || anyThing._hasMap.get(property);\n if (!observable)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"the entry '\" + property + \"' does not exist in the observable map '\" + getDebugName(thing) + \"'\");\n return observable;\n }\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n initializeInstance(thing);\n if (property && !thing[$mobx])\n thing[property]; // See #1072\n if (isObservableObject(thing)) {\n if (!property)\n return fail(process.env.NODE_ENV !== \"production\" && \"please specify a property\");\n var observable = thing[$mobx].values.get(property);\n if (!observable)\n fail(process.env.NODE_ENV !== \"production\" &&\n \"no observable property '\" + property + \"' found on the observable object '\" + getDebugName(thing) + \"'\");\n return observable;\n }\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n }\n else if (typeof thing === \"function\") {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n return fail(process.env.NODE_ENV !== \"production\" && \"Cannot obtain atom from \" + thing);\n}\nfunction getAdministration(thing, property) {\n if (!thing)\n fail(\"Expecting some object\");\n if (property !== undefined)\n return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing))\n return thing;\n if (isObservableMap(thing) || isObservableSet(thing))\n return thing;\n // Initializers run lazily when transpiling to babel, so make sure they are run...\n initializeInstance(thing);\n if (thing[$mobx])\n return thing[$mobx];\n fail(process.env.NODE_ENV !== \"production\" && \"Cannot obtain administration from \" + thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n if (property !== undefined)\n named = getAtom(thing, property);\n else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing))\n named = getAdministration(thing);\n else\n named = getAtom(thing); // valid for arrays as well\n return named.name;\n}\n\nvar toString = Object.prototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) { depth = -1; }\n return eq(a, b, depth);\n}\n// Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b)\n return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null)\n return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a)\n return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== \"function\" && type !== \"object\" && typeof b != \"object\")\n return false;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b))\n return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\":\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a)\n return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case \"[object Symbol]\":\n return (typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b));\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n break;\n }\n // Unwrap any wrapped objects.\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\")\n return false;\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor &&\n !(typeof aCtor === \"function\" &&\n aCtor instanceof aCtor &&\n typeof bCtor === \"function\" &&\n bCtor instanceof bCtor) &&\n (\"constructor\" in a && \"constructor\" in b)) {\n return false;\n }\n }\n if (depth === 0) {\n return false;\n }\n else if (depth < 0) {\n depth = -1;\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a)\n return bStack[length] === b;\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length)\n return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack))\n return false;\n }\n }\n else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key = void 0;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (Object.keys(b).length !== length)\n return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(has$1(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack)))\n return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\nfunction unwrap(a) {\n if (isObservableArray(a))\n return a.slice();\n if (isES6Map(a) || isObservableMap(a))\n return Array.from(a.entries());\n if (isES6Set(a) || isObservableSet(a))\n return Array.from(a.entries());\n return a;\n}\nfunction has$1(a, key) {\n return Object.prototype.hasOwnProperty.call(a, key);\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\nfunction getSelf() {\n return this;\n}\n\n/**\n * (c) Michel Weststrate 2015 - 2018\n * MIT Licensed\n *\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\n * this is a good place to start:\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\n *\n * Source folders:\n * ===============\n *\n * - api/ Most of the public static methods exposed by the module can be found here.\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\n * - utils/ Utility stuff.\n *\n */\nif (typeof Proxy === \"undefined\" || typeof Symbol === \"undefined\") {\n throw new Error(\"[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.\");\n}\ntry {\n // define process.env if needed\n // if this is not a production build in the first place\n // (in which case the expression below would be substituted with 'production')\n process.env.NODE_ENV;\n}\ncatch (e) {\n var g = getGlobal();\n if (typeof process === \"undefined\")\n g.process = {};\n g.process.env = {};\n}\n(function () {\n function testCodeMinification() { }\n if (testCodeMinification.name !== \"testCodeMinification\" &&\n process.env.NODE_ENV !== \"production\" &&\n typeof process !== 'undefined' && process.env.IGNORE_MOBX_MINIFY_WARNING !== \"true\") {\n // trick so it doesn't get replaced\n var varName = [\"process\", \"env\", \"NODE_ENV\"].join(\".\");\n console.warn(\"[mobx] you are running a minified build, but '\" + varName + \"' was not set to 'production' in your bundler. This results in an unnecessarily large and slow bundle\");\n }\n})();\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\nexport { $mobx, FlowCancellationError, IDerivationState, ObservableMap, ObservableSet, Reaction, allowStateChanges as _allowStateChanges, allowStateChangesInsideComputed as _allowStateChangesInsideComputed, allowStateReadsEnd as _allowStateReadsEnd, allowStateReadsStart as _allowStateReadsStart, _endAction, getAdministration as _getAdministration, getGlobalState as _getGlobalState, interceptReads as _interceptReads, isComputingDerivation as _isComputingDerivation, resetGlobalState as _resetGlobalState, _startAction, action, autorun, comparer, computed, configure, createAtom, decorate, entries, extendObservable, flow, get, getAtom, getDebugName, getDependencyTree, getObserverTree, has, intercept, isAction, isArrayLike, isObservableValue as isBoxedObservable, isComputed, isComputedProp, isFlowCancellationError, isObservable, isObservableArray, isObservableMap, isObservableObject, isObservableProp, isObservableSet, keys, observable, observe, onBecomeObserved, onBecomeUnobserved, onReactionError, reaction, remove, runInAction, set, spy, toJS, trace, transaction, untracked, values, when };\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.29.4';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n };\n\n return hooks;\n\n})));\n","/** @license mobx-react v5.4.4\n * index.module.js\n *\n * Copyright (c) 2015 Michel Weststrate.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { isObservableArray, isObservableObject, isObservableMap, untracked, createAtom, Reaction, _allowStateChanges, $mobx, spy, configure, getDebugName } from 'mobx';\nimport React__default, { Component, createElement, PureComponent, forwardRef, Children } from 'react';\nimport { findDOMNode, unstable_batchedUpdates } from 'react-dom';\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\n// These functions can be stubbed out in specific environments\n\nfunction unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x;\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar reactIs_production_min = createCommonjsModule(function (module, exports) {\nObject.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,r=b?Symbol.for(\"react.memo\"):\n60115,t=b?Symbol.for(\"react.lazy\"):60116;function u(a){if(\"object\"===typeof a&&null!==a){var q=a.$$typeof;switch(q){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return q}}case d:return q}}}function v(a){return u(a)===m}exports.typeOf=u;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;\nexports.Profiler=g;exports.Portal=d;exports.StrictMode=f;exports.isValidElementType=function(a){return \"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||u(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return u(a)===k};exports.isContextProvider=function(a){return u(a)===h};\nexports.isElement=function(a){return \"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return u(a)===n};exports.isFragment=function(a){return u(a)===e};exports.isProfiler=function(a){return u(a)===g};exports.isPortal=function(a){return u(a)===d};exports.isStrictMode=function(a){return u(a)===f};\n});\n\nunwrapExports(reactIs_production_min);\nvar reactIs_production_min_1 = reactIs_production_min.typeOf;\nvar reactIs_production_min_2 = reactIs_production_min.AsyncMode;\nvar reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;\nvar reactIs_production_min_4 = reactIs_production_min.ContextConsumer;\nvar reactIs_production_min_5 = reactIs_production_min.ContextProvider;\nvar reactIs_production_min_6 = reactIs_production_min.Element;\nvar reactIs_production_min_7 = reactIs_production_min.ForwardRef;\nvar reactIs_production_min_8 = reactIs_production_min.Fragment;\nvar reactIs_production_min_9 = reactIs_production_min.Profiler;\nvar reactIs_production_min_10 = reactIs_production_min.Portal;\nvar reactIs_production_min_11 = reactIs_production_min.StrictMode;\nvar reactIs_production_min_12 = reactIs_production_min.isValidElementType;\nvar reactIs_production_min_13 = reactIs_production_min.isAsyncMode;\nvar reactIs_production_min_14 = reactIs_production_min.isConcurrentMode;\nvar reactIs_production_min_15 = reactIs_production_min.isContextConsumer;\nvar reactIs_production_min_16 = reactIs_production_min.isContextProvider;\nvar reactIs_production_min_17 = reactIs_production_min.isElement;\nvar reactIs_production_min_18 = reactIs_production_min.isForwardRef;\nvar reactIs_production_min_19 = reactIs_production_min.isFragment;\nvar reactIs_production_min_20 = reactIs_production_min.isProfiler;\nvar reactIs_production_min_21 = reactIs_production_min.isPortal;\nvar reactIs_production_min_22 = reactIs_production_min.isStrictMode;\n\nvar reactIs = createCommonjsModule(function (module) {\n\n{\n module.exports = reactIs_production_min;\n}\n});\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\n\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = TYPE_STATICS[targetComponent['$$typeof']] || REACT_STATICS;\n var sourceStatics = TYPE_STATICS[sourceComponent['$$typeof']] || REACT_STATICS;\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nvar hoistNonReactStatics_cjs = hoistNonReactStatics;\n\nvar EventEmitter =\n/*#__PURE__*/\nfunction () {\n function EventEmitter() {\n _classCallCheck(this, EventEmitter);\n\n this.listeners = [];\n }\n\n _createClass(EventEmitter, [{\n key: \"on\",\n value: function on(cb) {\n var _this = this;\n\n this.listeners.push(cb);\n return function () {\n var index = _this.listeners.indexOf(cb);\n\n if (index !== -1) _this.listeners.splice(index, 1);\n };\n }\n }, {\n key: \"emit\",\n value: function emit(data) {\n this.listeners.forEach(function (fn) {\n return fn(data);\n });\n }\n }]);\n\n return EventEmitter;\n}();\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = new Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n rest[_key - 6] = arguments[_key];\n }\n\n return untracked(function () {\n componentName = componentName || \"<>\";\n propFullName = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n var actual = props[propName] === null ? \"null\" : \"undefined\";\n return new Error(\"The \" + location + \" `\" + propFullName + \"` is marked as required \" + \"in `\" + componentName + \"`, but its value is `\" + actual + \"`.\");\n }\n\n return null;\n } else {\n return validate.apply(void 0, [props, propName, componentName, location, propFullName].concat(rest));\n }\n });\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n} // Copied from React.PropTypes\n\n\nfunction isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === \"symbol\") {\n return true;\n } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\n\n if (propValue[\"@@toStringTag\"] === \"Symbol\") {\n return true;\n } // Fallback for non-spec compliant Symbols which are polyfilled.\n\n\n if (typeof Symbol === \"function\" && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n} // Copied from React.PropTypes\n\n\nfunction getPropType(propValue) {\n var propType = _typeof(propValue);\n\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n\n if (isSymbol(propType, propValue)) {\n return \"symbol\";\n }\n\n return propType;\n} // This handles more types than `getPropType`. Only used for error messages.\n// Copied from React.PropTypes\n\n\nfunction getPreciseType(propValue) {\n var propType = getPropType(propValue);\n\n if (propType === \"object\") {\n if (propValue instanceof Date) {\n return \"date\";\n } else if (propValue instanceof RegExp) {\n return \"regexp\";\n }\n }\n\n return propType;\n}\n\nfunction createObservableTypeCheckerCreator(allowNativeType, mobxType) {\n return createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n return untracked(function () {\n if (allowNativeType) {\n if (getPropType(props[propName]) === mobxType.toLowerCase()) return null;\n }\n\n var mobxChecker;\n\n switch (mobxType) {\n case \"Array\":\n mobxChecker = isObservableArray;\n break;\n\n case \"Object\":\n mobxChecker = isObservableObject;\n break;\n\n case \"Map\":\n mobxChecker = isObservableMap;\n break;\n\n default:\n throw new Error(\"Unexpected mobxType: \".concat(mobxType));\n }\n\n var propValue = props[propName];\n\n if (!mobxChecker(propValue)) {\n var preciseType = getPreciseType(propValue);\n var nativeTypeExpectationMessage = allowNativeType ? \" or javascript `\" + mobxType.toLowerCase() + \"`\" : \"\";\n return new Error(\"Invalid prop `\" + propFullName + \"` of type `\" + preciseType + \"` supplied to\" + \" `\" + componentName + \"`, expected `mobx.Observable\" + mobxType + \"`\" + nativeTypeExpectationMessage + \".\");\n }\n\n return null;\n });\n });\n}\n\nfunction createObservableArrayOfTypeChecker(allowNativeType, typeChecker) {\n return createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 5 ? _len2 - 5 : 0), _key2 = 5; _key2 < _len2; _key2++) {\n rest[_key2 - 5] = arguments[_key2];\n }\n\n return untracked(function () {\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Property `\" + propFullName + \"` of component `\" + componentName + \"` has \" + \"invalid PropType notation.\");\n }\n\n var error = createObservableTypeCheckerCreator(allowNativeType, \"Array\")(props, propName, componentName);\n if (error instanceof Error) return error;\n var propValue = props[propName];\n\n for (var i = 0; i < propValue.length; i++) {\n error = typeChecker.apply(void 0, [propValue, i, componentName, location, propFullName + \"[\" + i + \"]\"].concat(rest));\n if (error instanceof Error) return error;\n }\n\n return null;\n });\n });\n}\n\nvar observableArray = createObservableTypeCheckerCreator(false, \"Array\");\nvar observableArrayOf = createObservableArrayOfTypeChecker.bind(null, false);\nvar observableMap = createObservableTypeCheckerCreator(false, \"Map\");\nvar observableObject = createObservableTypeCheckerCreator(false, \"Object\");\nvar arrayOrObservableArray = createObservableTypeCheckerCreator(true, \"Array\");\nvar arrayOrObservableArrayOf = createObservableArrayOfTypeChecker.bind(null, true);\nvar objectOrObservableObject = createObservableTypeCheckerCreator(true, \"Object\");\n\nvar propTypes = /*#__PURE__*/Object.freeze({\n observableArray: observableArray,\n observableArrayOf: observableArrayOf,\n observableMap: observableMap,\n observableObject: observableObject,\n arrayOrObservableArray: arrayOrObservableArray,\n arrayOrObservableArrayOf: arrayOrObservableArrayOf,\n objectOrObservableObject: objectOrObservableObject\n});\n\nfunction isStateless(component) {\n // `function() {}` has prototype, but `() => {}` doesn't\n // `() => {}` via Babel has prototype too.\n return !(component.prototype && component.prototype.render);\n}\nvar symbolId = 0;\n\nfunction createSymbol(name) {\n if (typeof Symbol === \"function\") {\n return Symbol(name);\n }\n\n var symbol = \"__$mobx-react \".concat(name, \" (\").concat(symbolId, \")\");\n symbolId++;\n return symbol;\n}\n\nvar createdSymbols = {};\nfunction newSymbol(name) {\n if (!createdSymbols[name]) {\n createdSymbols[name] = createSymbol(name);\n }\n\n return createdSymbols[name];\n}\nvar mobxMixins = newSymbol(\"patchMixins\");\nvar mobxPatchedDefinition = newSymbol(\"patchedDefinition\");\n\nfunction getMixins(target, methodName) {\n var mixins = target[mobxMixins] = target[mobxMixins] || {};\n var methodMixins = mixins[methodName] = mixins[methodName] || {};\n methodMixins.locks = methodMixins.locks || 0;\n methodMixins.methods = methodMixins.methods || [];\n return methodMixins;\n}\n\nfunction wrapper(realMethod, mixins) {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n // locks are used to ensure that mixins are invoked only once per invocation, even on recursive calls\n mixins.locks++;\n\n try {\n var retVal;\n\n if (realMethod !== undefined && realMethod !== null) {\n retVal = realMethod.apply(this, args);\n }\n\n return retVal;\n } finally {\n mixins.locks--;\n\n if (mixins.locks === 0) {\n mixins.methods.forEach(function (mx) {\n mx.apply(_this, args);\n });\n }\n }\n}\n\nfunction wrapFunction(realMethod, mixins) {\n var fn = function fn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n wrapper.call.apply(wrapper, [this, realMethod, mixins].concat(args));\n };\n\n return fn;\n}\n\nfunction patch(target, methodName) {\n var mixins = getMixins(target, methodName);\n\n for (var _len3 = arguments.length, mixinMethods = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n mixinMethods[_key3 - 2] = arguments[_key3];\n }\n\n for (var _i = 0; _i < mixinMethods.length; _i++) {\n var mixinMethod = mixinMethods[_i];\n\n if (mixins.methods.indexOf(mixinMethod) < 0) {\n mixins.methods.push(mixinMethod);\n }\n }\n\n var oldDefinition = Object.getOwnPropertyDescriptor(target, methodName);\n\n if (oldDefinition && oldDefinition[mobxPatchedDefinition]) {\n // already patched definition, do not repatch\n return;\n }\n\n var originalMethod = target[methodName];\n var newDefinition = createDefinition(target, methodName, oldDefinition ? oldDefinition.enumerable : undefined, mixins, originalMethod);\n Object.defineProperty(target, methodName, newDefinition);\n}\n\nfunction createDefinition(target, methodName, enumerable, mixins, originalMethod) {\n var _ref;\n\n var wrappedFunc = wrapFunction(originalMethod, mixins);\n return _ref = {}, _defineProperty(_ref, mobxPatchedDefinition, true), _defineProperty(_ref, \"get\", function get() {\n return wrappedFunc;\n }), _defineProperty(_ref, \"set\", function set(value) {\n if (this === target) {\n wrappedFunc = wrapFunction(value, mixins);\n } else {\n // when it is an instance of the prototype/a child prototype patch that particular case again separately\n // since we need to store separate values depending on wether it is the actual instance, the prototype, etc\n // e.g. the method for super might not be the same as the method for the prototype which might be not the same\n // as the method for the instance\n var newDefinition = createDefinition(this, methodName, enumerable, mixins, value);\n Object.defineProperty(this, methodName, newDefinition);\n }\n }), _defineProperty(_ref, \"configurable\", true), _defineProperty(_ref, \"enumerable\", enumerable), _ref;\n}\n\nvar injectorContextTypes = {\n mobxStores: objectOrObservableObject\n};\nObject.seal(injectorContextTypes);\nvar proxiedInjectorProps = {\n contextTypes: {\n get: function get() {\n return injectorContextTypes;\n },\n set: function set(_) {\n console.warn(\"Mobx Injector: you are trying to attach `contextTypes` on an component decorated with `inject` (or `observer`) HOC. Please specify the contextTypes on the wrapped component instead. It is accessible through the `wrappedComponent`\");\n },\n configurable: true,\n enumerable: false\n },\n isMobxInjector: {\n value: true,\n writable: true,\n configurable: true,\n enumerable: true\n }\n /**\n * Store Injection\n */\n\n};\n\nfunction createStoreInjector(grabStoresFn, component, injectNames) {\n var displayName = \"inject-\" + (component.displayName || component.name || component.constructor && component.constructor.name || \"Unknown\");\n if (injectNames) displayName += \"-with-\" + injectNames;\n\n var Injector =\n /*#__PURE__*/\n function (_Component) {\n _inherits(Injector, _Component);\n\n function Injector() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Injector);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Injector)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _this.storeRef = function (instance) {\n _this.wrappedInstance = instance;\n };\n\n return _this;\n }\n\n _createClass(Injector, [{\n key: \"render\",\n value: function render() {\n // Optimization: it might be more efficient to apply the mapper function *outside* the render method\n // (if the mapper is a function), that could avoid expensive(?) re-rendering of the injector component\n // See this test: 'using a custom injector is not too reactive' in inject.js\n var newProps = {};\n\n for (var key in this.props) {\n if (this.props.hasOwnProperty(key)) {\n newProps[key] = this.props[key];\n }\n }\n\n var additionalProps = grabStoresFn(this.context.mobxStores || {}, newProps, this.context) || {};\n\n for (var _key2 in additionalProps) {\n newProps[_key2] = additionalProps[_key2];\n }\n\n if (!isStateless(component)) {\n newProps.ref = this.storeRef;\n }\n\n return createElement(component, newProps);\n }\n }]);\n\n return Injector;\n }(Component); // Static fields from component should be visible on the generated Injector\n\n\n Injector.displayName = displayName;\n hoistNonReactStatics_cjs(Injector, component);\n Injector.wrappedComponent = component;\n Object.defineProperties(Injector, proxiedInjectorProps);\n return Injector;\n}\n\nfunction grabStoresByName(storeNames) {\n return function (baseStores, nextProps) {\n storeNames.forEach(function (storeName) {\n if (storeName in nextProps // prefer props over stores\n ) return;\n if (!(storeName in baseStores)) throw new Error(\"MobX injector: Store '\" + storeName + \"' is not available! Make sure it is provided by some Provider\");\n nextProps[storeName] = baseStores[storeName];\n });\n return nextProps;\n };\n}\n/**\n * higher order component that injects stores to a child.\n * takes either a varargs list of strings, which are stores read from the context,\n * or a function that manually maps the available stores from the context to props:\n * storesToProps(mobxStores, props, context) => newProps\n */\n\n\nfunction inject()\n/* fn(stores, nextProps) or ...storeNames */\n{\n var grabStoresFn;\n\n if (typeof arguments[0] === \"function\") {\n grabStoresFn = arguments[0];\n return function (componentClass) {\n var injected = createStoreInjector(grabStoresFn, componentClass);\n injected.isMobxInjector = false; // supress warning\n // mark the Injector as observer, to make it react to expressions in `grabStoresFn`,\n // see #111\n\n injected = observer(injected);\n injected.isMobxInjector = true; // restore warning\n\n return injected;\n };\n } else {\n var storeNames = [];\n\n for (var i = 0; i < arguments.length; i++) {\n storeNames[i] = arguments[i];\n }\n\n grabStoresFn = grabStoresByName(storeNames);\n return function (componentClass) {\n return createStoreInjector(grabStoresFn, componentClass, storeNames.join(\"-\"));\n };\n }\n}\n\nvar mobxAdminProperty = $mobx || \"$mobx\";\nvar mobxIsUnmounted = newSymbol(\"isUnmounted\");\n/**\n * dev tool support\n */\n\nvar isDevtoolsEnabled = false;\nvar isUsingStaticRendering = false;\nvar warnedAboutObserverInjectDeprecation = false; // WeakMap;\n\nvar componentByNodeRegistry = typeof WeakMap !== \"undefined\" ? new WeakMap() : undefined;\nvar renderReporter = new EventEmitter();\nvar skipRenderKey = newSymbol(\"skipRender\");\nvar isForcingUpdateKey = newSymbol(\"isForcingUpdate\"); // Using react-is had some issues (and operates on elements, not on types), see #608 / #609\n\nvar ReactForwardRefSymbol = typeof forwardRef === \"function\" && forwardRef(function (_props, _ref) {})[\"$$typeof\"];\n/**\n * Helper to set `prop` to `this` as non-enumerable (hidden prop)\n * @param target\n * @param prop\n * @param value\n */\n\nfunction setHiddenProp(target, prop, value) {\n if (!Object.hasOwnProperty.call(target, prop)) {\n Object.defineProperty(target, prop, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n target[prop] = value;\n }\n}\n\nfunction findDOMNode$2(component) {\n if (findDOMNode) {\n try {\n return findDOMNode(component);\n } catch (e) {\n // findDOMNode will throw in react-test-renderer, see:\n // See https://github.com/mobxjs/mobx-react/issues/216\n // Is there a better heuristic?\n return null;\n }\n }\n\n return null;\n}\n\nfunction reportRendering(component) {\n var node = findDOMNode$2(component);\n if (node && componentByNodeRegistry) componentByNodeRegistry.set(node, component);\n renderReporter.emit({\n event: \"render\",\n renderTime: component.__$mobRenderEnd - component.__$mobRenderStart,\n totalTime: Date.now() - component.__$mobRenderStart,\n component: component,\n node: node\n });\n}\n\nfunction trackComponents() {\n if (typeof WeakMap === \"undefined\") throw new Error(\"[mobx-react] tracking components is not supported in this browser.\");\n if (!isDevtoolsEnabled) isDevtoolsEnabled = true;\n}\nfunction useStaticRendering(useStaticRendering) {\n isUsingStaticRendering = useStaticRendering;\n}\n/**\n * Errors reporter\n */\n\nvar errorsReporter = new EventEmitter();\n/**\n * Utilities\n */\n\nfunction patch$1(target, funcName) {\n patch(target, funcName, reactiveMixin[funcName]);\n}\n\nfunction shallowEqual(objA, objB) {\n //From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (is(objA, objB)) return true;\n\n if (_typeof(objA) !== \"object\" || objA === null || _typeof(objB) !== \"object\" || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction is(x, y) {\n // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\n\nfunction makeComponentReactive(render) {\n var _this2 = this;\n\n if (isUsingStaticRendering === true) return render.call(this);\n\n function reactiveRender() {\n var _this = this;\n\n isRenderingPending = false;\n var exception = undefined;\n var rendering = undefined;\n reaction.track(function () {\n if (isDevtoolsEnabled) {\n _this.__$mobRenderStart = Date.now();\n }\n\n try {\n rendering = _allowStateChanges(false, baseRender);\n } catch (e) {\n exception = e;\n }\n\n if (isDevtoolsEnabled) {\n _this.__$mobRenderEnd = Date.now();\n }\n });\n\n if (exception) {\n errorsReporter.emit(exception);\n throw exception;\n }\n\n return rendering;\n } // Generate friendly name for debugging\n\n\n var initialName = this.displayName || this.name || this.constructor && (this.constructor.displayName || this.constructor.name) || \"\";\n var rootNodeID = this._reactInternalInstance && this._reactInternalInstance._rootNodeID || this._reactInternalInstance && this._reactInternalInstance._debugID || this._reactInternalFiber && this._reactInternalFiber._debugID;\n /**\n * If props are shallowly modified, react will render anyway,\n * so atom.reportChanged() should not result in yet another re-render\n */\n\n setHiddenProp(this, skipRenderKey, false);\n /**\n * forceUpdate will re-assign this.props. We don't want that to cause a loop,\n * so detect these changes\n */\n\n setHiddenProp(this, isForcingUpdateKey, false); // wire up reactive render\n\n var baseRender = render.bind(this);\n var isRenderingPending = false;\n var reaction = new Reaction(\"\".concat(initialName, \"#\").concat(rootNodeID, \".render()\"), function () {\n if (!isRenderingPending) {\n // N.B. Getting here *before mounting* means that a component constructor has side effects (see the relevant test in misc.js)\n // This unidiomatic React usage but React will correctly warn about this so we continue as usual\n // See #85 / Pull #44\n isRenderingPending = true;\n if (typeof _this2.componentWillReact === \"function\") _this2.componentWillReact(); // TODO: wrap in action?\n\n if (_this2[mobxIsUnmounted] !== true) {\n // If we are unmounted at this point, componentWillReact() had a side effect causing the component to unmounted\n // TODO: remove this check? Then react will properly warn about the fact that this should not happen? See #73\n // However, people also claim this might happen during unit tests..\n var hasError = true;\n\n try {\n setHiddenProp(_this2, isForcingUpdateKey, true);\n if (!_this2[skipRenderKey]) Component.prototype.forceUpdate.call(_this2);\n hasError = false;\n } finally {\n setHiddenProp(_this2, isForcingUpdateKey, false);\n if (hasError) reaction.dispose();\n }\n }\n }\n });\n reaction.reactComponent = this;\n reactiveRender[mobxAdminProperty] = reaction;\n this.render = reactiveRender;\n return reactiveRender.call(this);\n}\n/**\n * ReactiveMixin\n */\n\n\nvar reactiveMixin = {\n componentWillUnmount: function componentWillUnmount() {\n if (isUsingStaticRendering === true) return;\n this.render[mobxAdminProperty] && this.render[mobxAdminProperty].dispose();\n this[mobxIsUnmounted] = true;\n\n if (isDevtoolsEnabled) {\n var node = findDOMNode$2(this);\n\n if (node && componentByNodeRegistry) {\n componentByNodeRegistry.delete(node);\n }\n\n renderReporter.emit({\n event: \"destroy\",\n component: this,\n node: node\n });\n }\n },\n componentDidMount: function componentDidMount() {\n if (isDevtoolsEnabled) {\n reportRendering(this);\n }\n },\n componentDidUpdate: function componentDidUpdate() {\n if (isDevtoolsEnabled) {\n reportRendering(this);\n }\n },\n shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {\n if (isUsingStaticRendering) {\n console.warn(\"[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side.\");\n } // update on any state changes (as is the default)\n\n\n if (this.state !== nextState) {\n return true;\n } // update if props are shallowly not equal, inspired by PureRenderMixin\n // we could return just 'false' here, and avoid the `skipRender` checks etc\n // however, it is nicer if lifecycle events are triggered like usually,\n // so we return true here if props are shallowly modified.\n\n\n return !shallowEqual(this.props, nextProps);\n }\n};\n\nfunction makeObservableProp(target, propName) {\n var valueHolderKey = newSymbol(\"reactProp_\".concat(propName, \"_valueHolder\"));\n var atomHolderKey = newSymbol(\"reactProp_\".concat(propName, \"_atomHolder\"));\n\n function getAtom() {\n if (!this[atomHolderKey]) {\n setHiddenProp(this, atomHolderKey, createAtom(\"reactive \" + propName));\n }\n\n return this[atomHolderKey];\n }\n\n Object.defineProperty(target, propName, {\n configurable: true,\n enumerable: true,\n get: function get() {\n getAtom.call(this).reportObserved();\n return this[valueHolderKey];\n },\n set: function set(v) {\n if (!this[isForcingUpdateKey] && !shallowEqual(this[valueHolderKey], v)) {\n setHiddenProp(this, valueHolderKey, v);\n setHiddenProp(this, skipRenderKey, true);\n getAtom.call(this).reportChanged();\n setHiddenProp(this, skipRenderKey, false);\n } else {\n setHiddenProp(this, valueHolderKey, v);\n }\n }\n });\n}\n/**\n * Observer function / decorator\n */\n\n\nfunction observer(arg1, arg2) {\n if (typeof arg1 === \"string\") {\n throw new Error(\"Store names should be provided as array\");\n }\n\n if (Array.isArray(arg1)) {\n // TODO: remove in next major\n // component needs stores\n if (!warnedAboutObserverInjectDeprecation) {\n warnedAboutObserverInjectDeprecation = true;\n console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject(\"store1\", \"store2\") @observer ComponentClass` or `inject(\"store1\", \"store2\")(observer(componentClass))` instead of `@observer([\"store1\", \"store2\"]) ComponentClass`');\n }\n\n if (!arg2) {\n // invoked as decorator\n return function (componentClass) {\n return observer(arg1, componentClass);\n };\n } else {\n return inject.apply(null, arg1)(observer(arg2));\n }\n }\n\n var componentClass = arg1;\n\n if (componentClass.isMobxInjector === true) {\n console.warn(\"Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'\");\n }\n\n if (componentClass.__proto__ === PureComponent) {\n console.warn(\"Mobx observer: You are using 'observer' on React.PureComponent. These two achieve two opposite goals and should not be used together\");\n } // Unwrap forward refs into `` component\n // we need to unwrap the render, because it is the inner render that needs to be tracked,\n // not the ForwardRef HoC\n\n\n if (ReactForwardRefSymbol && componentClass[\"$$typeof\"] === ReactForwardRefSymbol) {\n var _baseRender = componentClass.render;\n if (typeof _baseRender !== \"function\") throw new Error(\"render property of ForwardRef was not a function\"); // TODO: do we need to hoist statics from baseRender to the forward ref?\n\n return forwardRef(function ObserverForwardRef() {\n var _arguments = arguments;\n return React__default.createElement(Observer, null, function () {\n return _baseRender.apply(undefined, _arguments);\n });\n });\n } // Stateless function component:\n // If it is function but doesn't seem to be a react class constructor,\n // wrap it to a react class automatically\n\n\n if (typeof componentClass === \"function\" && (!componentClass.prototype || !componentClass.prototype.render) && !componentClass.isReactClass && !Component.isPrototypeOf(componentClass)) {\n var _class, _temp;\n\n var observerComponent = observer((_temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inherits(_class, _Component);\n\n function _class() {\n _classCallCheck(this, _class);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));\n }\n\n _createClass(_class, [{\n key: \"render\",\n value: function render() {\n return componentClass.call(this, this.props, this.context);\n }\n }]);\n\n return _class;\n }(Component), _class.displayName = componentClass.displayName || componentClass.name, _class.contextTypes = componentClass.contextTypes, _class.propTypes = componentClass.propTypes, _class.defaultProps = componentClass.defaultProps, _temp));\n hoistNonReactStatics_cjs(observerComponent, componentClass);\n return observerComponent;\n }\n\n if (!componentClass) {\n throw new Error(\"Please pass a valid component to 'observer'\");\n }\n\n var target = componentClass.prototype || componentClass;\n mixinLifecycleEvents(target);\n componentClass.isMobXReactObserver = true;\n makeObservableProp(target, \"props\");\n makeObservableProp(target, \"state\");\n var baseRender = target.render;\n\n target.render = function () {\n return makeComponentReactive.call(this, baseRender);\n };\n\n return componentClass;\n}\n\nfunction mixinLifecycleEvents(target) {\n [\"componentDidMount\", \"componentWillUnmount\", \"componentDidUpdate\"].forEach(function (funcName) {\n patch$1(target, funcName);\n });\n\n if (!target.shouldComponentUpdate) {\n target.shouldComponentUpdate = reactiveMixin.shouldComponentUpdate;\n } else {\n if (target.shouldComponentUpdate !== reactiveMixin.shouldComponentUpdate) {\n // TODO: make throw in next major\n console.warn(\"Use `shouldComponentUpdate` in an `observer` based component breaks the behavior of `observer` and might lead to unexpected results. Manually implementing `sCU` should not be needed when using mobx-react.\");\n }\n }\n}\n\nvar Observer = observer(function (_ref2) {\n var children = _ref2.children,\n observerInject = _ref2.inject,\n render = _ref2.render;\n var component = children || render;\n\n if (typeof component === \"undefined\") {\n return null;\n }\n\n if (!observerInject) {\n return component();\n } // TODO: remove in next major\n\n\n console.warn(\" is no longer supported. Please use inject on the enclosing component instead\");\n var InjectComponent = inject(observerInject)(component);\n return React__default.createElement(InjectComponent, null);\n});\nObserver.displayName = \"Observer\";\n\nvar ObserverPropsCheck = function ObserverPropsCheck(props, key, componentName, location, propFullName) {\n var extraKey = key === \"children\" ? \"render\" : \"children\";\n\n if (typeof props[key] === \"function\" && typeof props[extraKey] === \"function\") {\n return new Error(\"Invalid prop,do not use children and render in the same time in`\" + componentName);\n }\n\n if (typeof props[key] === \"function\" || typeof props[extraKey] === \"function\") {\n return;\n }\n\n return new Error(\"Invalid prop `\" + propFullName + \"` of type `\" + _typeof(props[key]) + \"` supplied to\" + \" `\" + componentName + \"`, expected `function`.\");\n};\n\nObserver.propTypes = {\n render: ObserverPropsCheck,\n children: ObserverPropsCheck\n};\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component$$1) {\n var prototype = Component$$1.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component$$1.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component$$1;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component$$1.displayName || Component$$1.name;\n var newApiName =\n typeof Component$$1.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component$$1.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component$$1;\n}\n\nvar specialReactKeys = {\n children: true,\n key: true,\n ref: true\n};\n\nvar Provider =\n/*#__PURE__*/\nfunction (_Component) {\n _inherits(Provider, _Component);\n\n function Provider(props, context) {\n var _this;\n\n _classCallCheck(this, Provider);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Provider).call(this, props, context));\n _this.state = {};\n copyStores(props, _this.state);\n return _this;\n }\n\n _createClass(Provider, [{\n key: \"render\",\n value: function render() {\n return Children.only(this.props.children);\n }\n }, {\n key: \"getChildContext\",\n value: function getChildContext() {\n var stores = {}; // inherit stores\n\n copyStores(this.context.mobxStores, stores); // add own stores\n\n copyStores(this.props, stores);\n return {\n mobxStores: stores\n };\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (!nextProps) return null;\n if (!prevState) return nextProps; // Maybe this warning is too aggressive?\n\n if (Object.keys(nextProps).filter(validStoreName).length !== Object.keys(prevState).filter(validStoreName).length) console.warn(\"MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children\");\n if (!nextProps.suppressChangedStoreWarning) for (var key in nextProps) {\n if (validStoreName(key) && prevState[key] !== nextProps[key]) console.warn(\"MobX Provider: Provided store '\" + key + \"' has changed. Please avoid replacing stores as the change might not propagate to all children\");\n }\n return nextProps;\n }\n }]);\n\n return Provider;\n}(Component);\n\nProvider.contextTypes = {\n mobxStores: objectOrObservableObject\n};\nProvider.childContextTypes = {\n mobxStores: objectOrObservableObject.isRequired\n};\n\nfunction copyStores(from, to) {\n if (!from) return;\n\n for (var key in from) {\n if (validStoreName(key)) to[key] = from[key];\n }\n}\n\nfunction validStoreName(key) {\n return !specialReactKeys[key] && key !== \"suppressChangedStoreWarning\";\n} // TODO: kill in next major\n\n\npolyfill(Provider);\n\nvar storeKey = newSymbol(\"disposeOnUnmount\");\n\nfunction runDisposersOnWillUnmount() {\n var _this = this;\n\n if (!this[storeKey]) {\n // when disposeOnUnmount is only set to some instances of a component it will still patch the prototype\n return;\n }\n\n this[storeKey].forEach(function (propKeyOrFunction) {\n var prop = typeof propKeyOrFunction === \"string\" ? _this[propKeyOrFunction] : propKeyOrFunction;\n\n if (prop !== undefined && prop !== null) {\n if (typeof prop !== \"function\") {\n throw new Error(\"[mobx-react] disposeOnUnmount only works on functions such as disposers returned by reactions, autorun, etc.\");\n }\n\n prop();\n }\n });\n this[storeKey] = [];\n}\n\nfunction disposeOnUnmount(target, propertyKeyOrFunction) {\n if (Array.isArray(propertyKeyOrFunction)) {\n return propertyKeyOrFunction.map(function (fn) {\n return disposeOnUnmount(target, fn);\n });\n }\n\n if (!target instanceof Component) {\n throw new Error(\"[mobx-react] disposeOnUnmount only works on class based React components.\");\n }\n\n if (typeof propertyKeyOrFunction !== \"string\" && typeof propertyKeyOrFunction !== \"function\") {\n throw new Error(\"[mobx-react] disposeOnUnmount only works if the parameter is either a property key or a function.\");\n } // add property key / function we want run (disposed) to the store\n\n\n var componentWasAlreadyModified = !!target[storeKey];\n var store = target[storeKey] || (target[storeKey] = []);\n store.push(propertyKeyOrFunction); // tweak the component class componentWillUnmount if not done already\n\n if (!componentWasAlreadyModified) {\n patch(target, \"componentWillUnmount\", runDisposersOnWillUnmount);\n } // return the disposer as is if invoked as a non decorator\n\n\n if (typeof propertyKeyOrFunction !== \"string\") {\n return propertyKeyOrFunction;\n }\n}\n\nif (!Component) throw new Error(\"mobx-react requires React to be available\");\nif (!spy) throw new Error(\"mobx-react requires mobx to be available\");\nif (typeof unstable_batchedUpdates === \"function\") configure({\n reactionScheduler: unstable_batchedUpdates\n});\nvar onError = function onError(fn) {\n return errorsReporter.on(fn);\n};\n\nif ((typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"undefined\" ? \"undefined\" : _typeof(__MOBX_DEVTOOLS_GLOBAL_HOOK__)) === \"object\") {\n var mobx = {\n spy: spy,\n extras: {\n getDebugName: getDebugName\n }\n };\n var mobxReact = {\n renderReporter: renderReporter,\n componentByNodeRegistry: componentByNodeRegistry,\n componentByNodeRegistery: componentByNodeRegistry,\n trackComponents: trackComponents\n };\n\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(mobxReact, mobx);\n}\n\nexport { propTypes, propTypes as PropTypes, onError, observer, Observer, renderReporter, componentByNodeRegistry as componentByNodeRegistery, componentByNodeRegistry, trackComponents, useStaticRendering, Provider, inject, disposeOnUnmount };\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];\nvar Col = React.forwardRef( // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\nfunction (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"as\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'col');\n var spans = [];\n var classes = [];\n DEVICE_SIZES.forEach(function (brkPoint) {\n var propValue = props[brkPoint];\n delete props[brkPoint];\n var span;\n var offset;\n var order;\n\n if (typeof propValue === 'object' && propValue != null) {\n var _propValue$span = propValue.span;\n span = _propValue$span === void 0 ? true : _propValue$span;\n offset = propValue.offset;\n order = propValue.order;\n } else {\n span = propValue;\n }\n\n var infix = brkPoint !== 'xs' ? \"-\" + brkPoint : '';\n if (span) spans.push(span === true ? \"\" + prefix + infix : \"\" + prefix + infix + \"-\" + span);\n if (order != null) classes.push(\"order\" + infix + \"-\" + order);\n if (offset != null) classes.push(\"offset\" + infix + \"-\" + offset);\n });\n\n if (!spans.length) {\n spans.push(prefix); // plain 'col'\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n ref: ref,\n className: classNames.apply(void 0, [className].concat(spans, classes))\n }));\n});\nCol.displayName = 'Col';\nexport default Col;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React, { useContext, useMemo } from 'react';\nvar ThemeContext = React.createContext({});\nvar Consumer = ThemeContext.Consumer,\n Provider = ThemeContext.Provider;\n\nfunction ThemeProvider(_ref) {\n var prefixes = _ref.prefixes,\n children = _ref.children;\n var copiedPrefixes = useMemo(function () {\n return _extends({}, prefixes);\n }, [prefixes]);\n return /*#__PURE__*/React.createElement(Provider, {\n value: copiedPrefixes\n }, children);\n}\n\nexport function useBootstrapPrefix(prefix, defaultPrefix) {\n var prefixes = useContext(ThemeContext);\n return prefix || prefixes[defaultPrefix] || defaultPrefix;\n}\n\nfunction createBootstrapComponent(Component, opts) {\n if (typeof opts === 'string') opts = {\n prefix: opts\n };\n var isClassy = Component.prototype && Component.prototype.isReactComponent; // If it's a functional component make sure we don't break it with a ref\n\n var _opts = opts,\n prefix = _opts.prefix,\n _opts$forwardRefAs = _opts.forwardRefAs,\n forwardRefAs = _opts$forwardRefAs === void 0 ? isClassy ? 'ref' : 'innerRef' : _opts$forwardRefAs;\n var Wrapped = React.forwardRef(function (_ref2, ref) {\n var props = _extends({}, _ref2);\n\n props[forwardRefAs] = ref;\n var bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n bsPrefix: bsPrefix\n }));\n });\n Wrapped.displayName = \"Bootstrap(\" + (Component.displayName || Component.name) + \")\";\n return Wrapped;\n}\n\nexport { createBootstrapComponent, Consumer as ThemeConsumer };\nexport default ThemeProvider;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar DEVICE_SIZES = ['xl', 'lg', 'md', 'sm', 'xs'];\nvar defaultProps = {\n noGutters: false\n};\nvar Row = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n noGutters = _ref.noGutters,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"noGutters\", \"as\"]);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n var sizePrefix = decoratedBsPrefix + \"-cols\";\n var classes = [];\n DEVICE_SIZES.forEach(function (brkPoint) {\n var propValue = props[brkPoint];\n delete props[brkPoint];\n var cols;\n\n if (propValue != null && typeof propValue === 'object') {\n cols = propValue.cols;\n } else {\n cols = propValue;\n }\n\n var infix = brkPoint !== 'xs' ? \"-\" + brkPoint : '';\n if (cols != null) classes.push(\"\" + sizePrefix + infix + \"-\" + cols);\n });\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames.apply(void 0, [className, decoratedBsPrefix, noGutters && 'no-gutters'].concat(classes))\n }));\n});\nRow.displayName = 'Row';\nRow.defaultProps = defaultProps;\nexport default Row;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n fluid: false\n};\nvar Container = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n fluid = _ref.fluid,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n className = _ref.className,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"fluid\", \"as\", \"className\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'container');\n var suffix = typeof fluid === 'string' ? \"-\" + fluid : '-fluid';\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, fluid ? \"\" + prefix + suffix : prefix)\n }));\n});\nContainer.displayName = 'Container';\nContainer.defaultProps = defaultProps;\nexport default Container;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { Router, __RouterContext, matchPath } from 'react-router';\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport { createBrowserHistory, createHashHistory, createLocation } from 'history';\nimport PropTypes from 'prop-types';\nimport warning from 'tiny-warning';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport invariant from 'tiny-invariant';\n\n/**\n * The public API for a that uses HTML5 history.\n */\n\nvar BrowserRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createBrowserHistory(_this.props);\n return _this;\n }\n\n var _proto = BrowserRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n BrowserRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number\n };\n\n BrowserRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\") : void 0;\n };\n}\n\n/**\n * The public API for a that uses window.location.hash.\n */\n\nvar HashRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(HashRouter, _React$Component);\n\n function HashRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createHashHistory(_this.props);\n return _this;\n }\n\n var _proto = HashRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return HashRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n HashRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\") : void 0;\n };\n}\n\nvar resolveToLocation = function resolveToLocation(to, currentLocation) {\n return typeof to === \"function\" ? to(currentLocation) : to;\n};\nvar normalizeToLocation = function normalizeToLocation(to, currentLocation) {\n return typeof to === \"string\" ? createLocation(to, null, null, currentLocation) : to;\n};\n\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nvar LinkAnchor = forwardRef(function (_ref, forwardedRef) {\n var innerRef = _ref.innerRef,\n navigate = _ref.navigate,\n _onClick = _ref.onClick,\n rest = _objectWithoutPropertiesLoose(_ref, [\"innerRef\", \"navigate\", \"onClick\"]);\n\n var target = rest.target;\n\n var props = _extends({}, rest, {\n onClick: function onClick(event) {\n try {\n if (_onClick) _onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && ( // ignore everything but left clicks\n !target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n\n\n return React.createElement(\"a\", props);\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n/**\n * The public API for rendering a history-aware .\n */\n\n\nvar Link = forwardRef(function (_ref2, forwardedRef) {\n var _ref2$component = _ref2.component,\n component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,\n replace = _ref2.replace,\n to = _ref2.to,\n innerRef = _ref2.innerRef,\n rest = _objectWithoutPropertiesLoose(_ref2, [\"component\", \"replace\", \"to\", \"innerRef\"]);\n\n return React.createElement(__RouterContext.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var history = context.history;\n var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);\n var href = location ? history.createHref(location) : \"\";\n\n var props = _extends({}, rest, {\n href: href,\n navigate: function navigate() {\n var location = resolveToLocation(to, context.location);\n var method = replace ? history.replace : history.push;\n method(location);\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(component, props);\n });\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]);\n var refType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({\n current: PropTypes.any\n })]);\n Link.displayName = \"Link\";\n Link.propTypes = {\n innerRef: refType,\n onClick: PropTypes.func,\n replace: PropTypes.bool,\n target: PropTypes.string,\n to: toType.isRequired\n };\n}\n\nvar forwardRefShim$1 = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef$1 = React.forwardRef;\n\nif (typeof forwardRef$1 === \"undefined\") {\n forwardRef$1 = forwardRefShim$1;\n}\n\nfunction joinClassnames() {\n for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {\n classnames[_key] = arguments[_key];\n }\n\n return classnames.filter(function (i) {\n return i;\n }).join(\" \");\n}\n/**\n * A wrapper that knows if it's \"active\" or not.\n */\n\n\nvar NavLink = forwardRef$1(function (_ref, forwardedRef) {\n var _ref$ariaCurrent = _ref[\"aria-current\"],\n ariaCurrent = _ref$ariaCurrent === void 0 ? \"page\" : _ref$ariaCurrent,\n _ref$activeClassName = _ref.activeClassName,\n activeClassName = _ref$activeClassName === void 0 ? \"active\" : _ref$activeClassName,\n activeStyle = _ref.activeStyle,\n classNameProp = _ref.className,\n exact = _ref.exact,\n isActiveProp = _ref.isActive,\n locationProp = _ref.location,\n sensitive = _ref.sensitive,\n strict = _ref.strict,\n styleProp = _ref.style,\n to = _ref.to,\n innerRef = _ref.innerRef,\n rest = _objectWithoutPropertiesLoose(_ref, [\"aria-current\", \"activeClassName\", \"activeStyle\", \"className\", \"exact\", \"isActive\", \"location\", \"sensitive\", \"strict\", \"style\", \"to\", \"innerRef\"]);\n\n return React.createElement(__RouterContext.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var currentLocation = locationProp || context.location;\n var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);\n var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n var match = escapedPath ? matchPath(currentLocation.pathname, {\n path: escapedPath,\n exact: exact,\n sensitive: sensitive,\n strict: strict\n }) : null;\n var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);\n var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;\n var style = isActive ? _extends({}, styleProp, {}, activeStyle) : styleProp;\n\n var props = _extends({\n \"aria-current\": isActive && ariaCurrent || null,\n className: className,\n style: style,\n to: toLocation\n }, rest); // React 15 compat\n\n\n if (forwardRefShim$1 !== forwardRef$1) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(Link, props);\n });\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n NavLink.displayName = \"NavLink\";\n var ariaCurrentType = PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"]);\n NavLink.propTypes = _extends({}, Link.propTypes, {\n \"aria-current\": ariaCurrentType,\n activeClassName: PropTypes.string,\n activeStyle: PropTypes.object,\n className: PropTypes.string,\n exact: PropTypes.bool,\n isActive: PropTypes.func,\n location: PropTypes.object,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool,\n style: PropTypes.object\n });\n}\n\nexport { BrowserRouter, HashRouter, Link, NavLink };\n//# sourceMappingURL=react-router-dom.js.map\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n variant: null\n};\nvar CardImg = React.forwardRef( // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\nfunction (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n variant = _ref.variant,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'img' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"variant\", \"as\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'card-img');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: classNames(variant ? prefix + \"-\" + variant : prefix, className)\n }, props));\n});\nCardImg.displayName = 'CardImg';\nCardImg.defaultProps = defaultProps;\nexport default CardImg;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React, { useMemo } from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport createWithBsPrefix from './createWithBsPrefix';\nimport divWithClassName from './divWithClassName';\nimport CardContext from './CardContext';\nimport CardImg from './CardImg';\nvar DivStyledAsH5 = divWithClassName('h5');\nvar DivStyledAsH6 = divWithClassName('h6');\nvar CardBody = createWithBsPrefix('card-body');\nvar CardTitle = createWithBsPrefix('card-title', {\n Component: DivStyledAsH5\n});\nvar CardSubtitle = createWithBsPrefix('card-subtitle', {\n Component: DivStyledAsH6\n});\nvar CardLink = createWithBsPrefix('card-link', {\n Component: 'a'\n});\nvar CardText = createWithBsPrefix('card-text', {\n Component: 'p'\n});\nvar CardHeader = createWithBsPrefix('card-header');\nvar CardFooter = createWithBsPrefix('card-footer');\nvar CardImgOverlay = createWithBsPrefix('card-img-overlay');\nvar defaultProps = {\n body: false\n};\nvar Card = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n bg = _ref.bg,\n text = _ref.text,\n border = _ref.border,\n body = _ref.body,\n children = _ref.children,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"bg\", \"text\", \"border\", \"body\", \"children\", \"as\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'card');\n var cardContext = useMemo(function () {\n return {\n cardHeaderBsPrefix: prefix + \"-header\"\n };\n }, [prefix]);\n return /*#__PURE__*/React.createElement(CardContext.Provider, {\n value: cardContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, prefix, bg && \"bg-\" + bg, text && \"text-\" + text, border && \"border-\" + border)\n }), body ?\n /*#__PURE__*/\n // @ts-ignore\n React.createElement(CardBody, null, children) : children));\n});\nCard.displayName = 'Card';\nCard.defaultProps = defaultProps;\nCard.Img = CardImg;\nCard.Title = CardTitle;\nCard.Subtitle = CardSubtitle;\nCard.Body = CardBody;\nCard.Link = CardLink;\nCard.Text = CardText;\nCard.Header = CardHeader;\nCard.Footer = CardFooter;\nCard.ImgOverlay = CardImgOverlay;\nexport default Card;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n pill: false\n};\nvar Badge = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n variant = _ref.variant,\n pill = _ref.pill,\n className = _ref.className,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'span' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"variant\", \"pill\", \"className\", \"as\"]);\n\n var prefix = useBootstrapPrefix(bsPrefix, 'badge');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, prefix, pill && prefix + \"-pill\", variant && prefix + \"-\" + variant)\n }));\n});\nBadge.displayName = 'Badge';\nBadge.defaultProps = defaultProps;\nexport default Badge;","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { createMemoryHistory, createLocation, locationsAreEqual, createPath } from 'history';\nimport warning from 'tiny-warning';\nimport createContext from 'mini-create-react-context';\nimport invariant from 'tiny-invariant';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport pathToRegexp from 'path-to-regexp';\nimport { isValidElementType } from 'react-is';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport hoistStatics from 'hoist-non-react-statics';\n\n// TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext = function createNamedContext(name) {\n var context = createContext();\n context.displayName = name;\n return context;\n};\n\nvar historyContext =\n/*#__PURE__*/\ncreateNamedContext(\"Router-History\");\n\n// TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext$1 = function createNamedContext(name) {\n var context = createContext();\n context.displayName = name;\n return context;\n};\n\nvar context =\n/*#__PURE__*/\ncreateNamedContext$1(\"Router\");\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Router, _React$Component);\n\n Router.computeRootMatch = function computeRootMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n function Router(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n location: props.history.location\n }; // This is a bit of a hack. We have to start listening for location\n // changes here in the constructor in case there are any s\n // on the initial render. If there are, they will replace/push when\n // they mount and since cDM fires in children before parents, we may\n // get a new location before the is mounted.\n\n _this._isMounted = false;\n _this._pendingLocation = null;\n\n if (!props.staticContext) {\n _this.unlisten = props.history.listen(function (location) {\n if (_this._isMounted) {\n _this.setState({\n location: location\n });\n } else {\n _this._pendingLocation = location;\n }\n });\n }\n\n return _this;\n }\n\n var _proto = Router.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n\n if (this._pendingLocation) {\n this.setState({\n location: this._pendingLocation\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.unlisten) this.unlisten();\n };\n\n _proto.render = function render() {\n return React.createElement(context.Provider, {\n value: {\n history: this.props.history,\n location: this.state.location,\n match: Router.computeRootMatch(this.state.location.pathname),\n staticContext: this.props.staticContext\n }\n }, React.createElement(historyContext.Provider, {\n children: this.props.children || null,\n value: this.props.history\n }));\n };\n\n return Router;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Router.propTypes = {\n children: PropTypes.node,\n history: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n };\n\n Router.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(prevProps.history === this.props.history, \"You cannot change \") : void 0;\n };\n}\n\n/**\n * The public API for a that stores location in memory.\n */\n\nvar MemoryRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createMemoryHistory(_this.props);\n return _this;\n }\n\n var _proto = MemoryRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return MemoryRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n MemoryRouter.propTypes = {\n initialEntries: PropTypes.array,\n initialIndex: PropTypes.number,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n };\n\n MemoryRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\") : void 0;\n };\n}\n\nvar Lifecycle =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Lifecycle, _React$Component);\n\n function Lifecycle() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Lifecycle.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return Lifecycle;\n}(React.Component);\n\n/**\n * The public API for prompting the user before navigating away from a screen.\n */\n\nfunction Prompt(_ref) {\n var message = _ref.message,\n _ref$when = _ref.when,\n when = _ref$when === void 0 ? true : _ref$when;\n return React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n if (!when || context.staticContext) return null;\n var method = context.history.block;\n return React.createElement(Lifecycle, {\n onMount: function onMount(self) {\n self.release = method(message);\n },\n onUpdate: function onUpdate(self, prevProps) {\n if (prevProps.message !== message) {\n self.release();\n self.release = method(message);\n }\n },\n onUnmount: function onUnmount(self) {\n self.release();\n },\n message: message\n });\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);\n Prompt.propTypes = {\n when: PropTypes.bool,\n message: messageType.isRequired\n };\n}\n\nvar cache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nfunction compilePath(path) {\n if (cache[path]) return cache[path];\n var generator = pathToRegexp.compile(path);\n\n if (cacheCount < cacheLimit) {\n cache[path] = generator;\n cacheCount++;\n }\n\n return generator;\n}\n/**\n * Public API for generating a URL pathname from a path and parameters.\n */\n\n\nfunction generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === \"/\" ? path : compilePath(path)(params, {\n pretty: true\n });\n}\n\n/**\n * The public API for navigating programmatically with a component.\n */\n\nfunction Redirect(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to,\n _ref$push = _ref.push,\n push = _ref$push === void 0 ? false : _ref$push;\n return React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var history = context.history,\n staticContext = context.staticContext;\n var method = push ? history.push : history.replace;\n var location = createLocation(computedMatch ? typeof to === \"string\" ? generatePath(to, computedMatch.params) : _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n }) : to); // When rendering in a static context,\n // set the new location immediately.\n\n if (staticContext) {\n method(location);\n return null;\n }\n\n return React.createElement(Lifecycle, {\n onMount: function onMount() {\n method(location);\n },\n onUpdate: function onUpdate(self, prevProps) {\n var prevLocation = createLocation(prevProps.to);\n\n if (!locationsAreEqual(prevLocation, _extends({}, location, {\n key: prevLocation.key\n }))) {\n method(location);\n }\n },\n to: to\n });\n });\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n Redirect.propTypes = {\n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n };\n}\n\nvar cache$1 = {};\nvar cacheLimit$1 = 10000;\nvar cacheCount$1 = 0;\n\nfunction compilePath$1(path, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});\n if (pathCache[path]) return pathCache[path];\n var keys = [];\n var regexp = pathToRegexp(path, keys, options);\n var result = {\n regexp: regexp,\n keys: keys\n };\n\n if (cacheCount$1 < cacheLimit$1) {\n pathCache[path] = result;\n cacheCount$1++;\n }\n\n return result;\n}\n/**\n * Public API for matching a URL pathname to a path.\n */\n\n\nfunction matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}\n\nfunction isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n}\n\nfunction evalChildrenDev(children, props, path) {\n var value = children(props);\n process.env.NODE_ENV !== \"production\" ? warning(value !== undefined, \"You returned `undefined` from the `children` function of \" + (\", but you \") + \"should have returned a React element or `null`\") : void 0;\n return value || null;\n}\n/**\n * The public API for matching a single path and rendering.\n */\n\n\nvar Route =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Route, _React$Component);\n\n function Route() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Route.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return React.createElement(context.Consumer, null, function (context$1) {\n !context$1 ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var location = _this.props.location || context$1.location;\n var match = _this.props.computedMatch ? _this.props.computedMatch // already computed the match for us\n : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;\n\n var props = _extends({}, context$1, {\n location: location,\n match: match\n });\n\n var _this$props = _this.props,\n children = _this$props.children,\n component = _this$props.component,\n render = _this$props.render; // Preact uses an empty array as children by\n // default, so use null if that's the case.\n\n if (Array.isArray(children) && children.length === 0) {\n children = null;\n }\n\n return React.createElement(context.Provider, {\n value: props\n }, props.match ? children ? typeof children === \"function\" ? process.env.NODE_ENV !== \"production\" ? evalChildrenDev(children, props, _this.props.path) : children(props) : children : component ? React.createElement(component, props) : render ? render(props) : null : typeof children === \"function\" ? process.env.NODE_ENV !== \"production\" ? evalChildrenDev(children, props, _this.props.path) : children(props) : null);\n });\n };\n\n return Route;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Route.propTypes = {\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n component: function component(props, propName) {\n if (props[propName] && !isValidElementType(props[propName])) {\n return new Error(\"Invalid prop 'component' supplied to 'Route': the prop is not a valid React component\");\n }\n },\n exact: PropTypes.bool,\n location: PropTypes.object,\n path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n render: PropTypes.func,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool\n };\n\n Route.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), \"You should not use and in the same route; will be ignored\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), \"You should not use and in the same route; will be ignored\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\") : void 0;\n };\n\n Route.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.location && !prevProps.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(!this.props.location && prevProps.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : void 0;\n };\n}\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\n\nfunction addBasename(basename, location) {\n if (!basename) return location;\n return _extends({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n}\n\nfunction stripBasename(basename, location) {\n if (!basename) return location;\n var base = addLeadingSlash(basename);\n if (location.pathname.indexOf(base) !== 0) return location;\n return _extends({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n}\n\nfunction createURL(location) {\n return typeof location === \"string\" ? location : createPath(location);\n}\n\nfunction staticHandler(methodName) {\n return function () {\n process.env.NODE_ENV !== \"production\" ? invariant(false, \"You cannot %s with \", methodName) : invariant(false) ;\n };\n}\n\nfunction noop() {}\n/**\n * The public top-level API for a \"static\" , so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\n\nvar StaticRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handlePush = function (location) {\n return _this.navigateTo(location, \"PUSH\");\n };\n\n _this.handleReplace = function (location) {\n return _this.navigateTo(location, \"REPLACE\");\n };\n\n _this.handleListen = function () {\n return noop;\n };\n\n _this.handleBlock = function () {\n return noop;\n };\n\n return _this;\n }\n\n var _proto = StaticRouter.prototype;\n\n _proto.navigateTo = function navigateTo(location, action) {\n var _this$props = this.props,\n _this$props$basename = _this$props.basename,\n basename = _this$props$basename === void 0 ? \"\" : _this$props$basename,\n _this$props$context = _this$props.context,\n context = _this$props$context === void 0 ? {} : _this$props$context;\n context.action = action;\n context.location = addBasename(basename, createLocation(location));\n context.url = createURL(context.location);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n _this$props2$basename = _this$props2.basename,\n basename = _this$props2$basename === void 0 ? \"\" : _this$props2$basename,\n _this$props2$context = _this$props2.context,\n context = _this$props2$context === void 0 ? {} : _this$props2$context,\n _this$props2$location = _this$props2.location,\n location = _this$props2$location === void 0 ? \"/\" : _this$props2$location,\n rest = _objectWithoutPropertiesLoose(_this$props2, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: function createHref(path) {\n return addLeadingSlash(basename + createURL(path));\n },\n action: \"POP\",\n location: stripBasename(basename, createLocation(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n return React.createElement(Router, _extends({}, rest, {\n history: history,\n staticContext: context\n }));\n };\n\n return StaticRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n StaticRouter.propTypes = {\n basename: PropTypes.string,\n context: PropTypes.object,\n location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])\n };\n\n StaticRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\") : void 0;\n };\n}\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Switch, _React$Component);\n\n function Switch() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Switch.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use outside a \") : invariant(false) : void 0;\n var location = _this.props.location || context.location;\n var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()\n // here because toArray adds keys to all child elements and we do not want\n // to trigger an unmount/remount for two s that render the same\n // component at different URLs.\n\n React.Children.forEach(_this.props.children, function (child) {\n if (match == null && React.isValidElement(child)) {\n element = child;\n var path = child.props.path || child.props.from;\n match = path ? matchPath(location.pathname, _extends({}, child.props, {\n path: path\n })) : context.match;\n }\n });\n return match ? React.cloneElement(element, {\n location: location,\n computedMatch: match\n }) : null;\n });\n };\n\n return Switch;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n Switch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n };\n\n Switch.prototype.componentDidUpdate = function (prevProps) {\n process.env.NODE_ENV !== \"production\" ? warning(!(this.props.location && !prevProps.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(!this.props.location && prevProps.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : void 0;\n };\n}\n\n/**\n * A public higher-order component to access the imperative API\n */\n\nfunction withRouter(Component) {\n var displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutPropertiesLoose(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(context.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use <\" + displayName + \" /> outside a \") : invariant(false) : void 0;\n return React.createElement(Component, _extends({}, remainingProps, context, {\n ref: wrappedComponentRef\n }));\n });\n };\n\n C.displayName = displayName;\n C.WrappedComponent = Component;\n\n if (process.env.NODE_ENV !== \"production\") {\n C.propTypes = {\n wrappedComponentRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object])\n };\n }\n\n return hoistStatics(C, Component);\n}\n\nvar useContext = React.useContext;\nfunction useHistory() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useHistory()\") : invariant(false) : void 0;\n }\n\n return useContext(historyContext);\n}\nfunction useLocation() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useLocation()\") : invariant(false) : void 0;\n }\n\n return useContext(context).location;\n}\nfunction useParams() {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useParams()\") : invariant(false) : void 0;\n }\n\n var match = useContext(context).match;\n return match ? match.params : {};\n}\nfunction useRouteMatch(path) {\n if (process.env.NODE_ENV !== \"production\") {\n !(typeof useContext === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You must use React >= 16.8 in order to use useRouteMatch()\") : invariant(false) : void 0;\n }\n\n var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n if (typeof window !== \"undefined\") {\n var global = window;\n var key = \"__react_router_build__\";\n var buildNames = {\n cjs: \"CommonJS\",\n esm: \"ES modules\",\n umd: \"UMD\"\n };\n\n if (global[key] && global[key] !== \"esm\") {\n var initialBuildName = buildNames[global[key]];\n var secondaryBuildName = buildNames[\"esm\"]; // TODO: Add link to article that explains in detail how to avoid\n // loading 2 different builds.\n\n throw new Error(\"You are loading the \" + secondaryBuildName + \" build of React Router \" + (\"on a page that is already running the \" + initialBuildName + \" \") + \"build, so things won't work right.\");\n }\n\n global[key] = \"esm\";\n }\n}\n\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, historyContext as __HistoryContext, context as __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter };\n//# sourceMappingURL=react-router.js.map\n","import React from 'react'; // TODO\n\nvar FormContext = React.createContext({\n controlId: undefined\n});\nexport default FormContext;","var rHyphen = /-(.)/g;\nexport default function camelize(string) {\n return string.replace(rHyphen, function (_, chr) {\n return chr.toUpperCase();\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport camelize from 'dom-helpers/camelize';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\n\nvar pascalCase = function pascalCase(str) {\n return str[0].toUpperCase() + camelize(str).slice(1);\n};\n\n// TODO: emstricten & fix the typing here! `createWithBsPrefix...`\nexport default function createWithBsPrefix(prefix, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$displayName = _ref.displayName,\n displayName = _ref$displayName === void 0 ? pascalCase(prefix) : _ref$displayName,\n Component = _ref.Component,\n defaultProps = _ref.defaultProps;\n\n var BsComponent = React.forwardRef(function (_ref2, ref) {\n var className = _ref2.className,\n bsPrefix = _ref2.bsPrefix,\n _ref2$as = _ref2.as,\n Tag = _ref2$as === void 0 ? Component || 'div' : _ref2$as,\n props = _objectWithoutPropertiesLoose(_ref2, [\"className\", \"bsPrefix\", \"as\"]);\n\n var resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: ref,\n className: classNames(className, resolvedPrefix)\n }, props));\n });\n BsComponent.defaultProps = defaultProps;\n BsComponent.displayName = displayName;\n return BsComponent;\n}","/*\n * Date Format 1.2.3\n * (c) 2007-2009 Steven Levithan \n * MIT license\n *\n * Includes enhancements by Scott Trenda \n * and Kris Kowal \n *\n * Accepts a date, a mask, or a date and a mask.\n * Returns a formatted version of the given date.\n * The date defaults to the current date/time.\n * The mask defaults to dateFormat.masks.default.\n */\n\n(function(global) {\n 'use strict';\n\n var dateFormat = (function() {\n var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\\1?|[LloSZWN]|\"[^\"]*\"|'[^']*'/g;\n var timezone = /\\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\\d{4})?)\\b/g;\n var timezoneClip = /[^-+\\dA-Z]/g;\n \n // Regexes and supporting functions are cached through closure\n return function (date, mask, utc, gmt) {\n \n // You can't provide utc if you skip other args (use the 'UTC:' mask prefix)\n if (arguments.length === 1 && kindOf(date) === 'string' && !/\\d/.test(date)) {\n mask = date;\n date = undefined;\n }\n \n date = date || new Date;\n \n if(!(date instanceof Date)) {\n date = new Date(date);\n }\n \n if (isNaN(date)) {\n throw TypeError('Invalid date');\n }\n \n mask = String(dateFormat.masks[mask] || mask || dateFormat.masks['default']);\n \n // Allow setting the utc/gmt argument via the mask\n var maskSlice = mask.slice(0, 4);\n if (maskSlice === 'UTC:' || maskSlice === 'GMT:') {\n mask = mask.slice(4);\n utc = true;\n if (maskSlice === 'GMT:') {\n gmt = true;\n }\n }\n \n var _ = utc ? 'getUTC' : 'get';\n var d = date[_ + 'Date']();\n var D = date[_ + 'Day']();\n var m = date[_ + 'Month']();\n var y = date[_ + 'FullYear']();\n var H = date[_ + 'Hours']();\n var M = date[_ + 'Minutes']();\n var s = date[_ + 'Seconds']();\n var L = date[_ + 'Milliseconds']();\n var o = utc ? 0 : date.getTimezoneOffset();\n var W = getWeek(date);\n var N = getDayOfWeek(date);\n var flags = {\n d: d,\n dd: pad(d),\n ddd: dateFormat.i18n.dayNames[D],\n dddd: dateFormat.i18n.dayNames[D + 7],\n m: m + 1,\n mm: pad(m + 1),\n mmm: dateFormat.i18n.monthNames[m],\n mmmm: dateFormat.i18n.monthNames[m + 12],\n yy: String(y).slice(2),\n yyyy: y,\n h: H % 12 || 12,\n hh: pad(H % 12 || 12),\n H: H,\n HH: pad(H),\n M: M,\n MM: pad(M),\n s: s,\n ss: pad(s),\n l: pad(L, 3),\n L: pad(Math.round(L / 10)),\n t: H < 12 ? dateFormat.i18n.timeNames[0] : dateFormat.i18n.timeNames[1],\n tt: H < 12 ? dateFormat.i18n.timeNames[2] : dateFormat.i18n.timeNames[3],\n T: H < 12 ? dateFormat.i18n.timeNames[4] : dateFormat.i18n.timeNames[5],\n TT: H < 12 ? dateFormat.i18n.timeNames[6] : dateFormat.i18n.timeNames[7],\n Z: gmt ? 'GMT' : utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''),\n o: (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),\n S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10],\n W: W,\n N: N\n };\n \n return mask.replace(token, function (match) {\n if (match in flags) {\n return flags[match];\n }\n return match.slice(1, match.length - 1);\n });\n };\n })();\n\n dateFormat.masks = {\n 'default': 'ddd mmm dd yyyy HH:MM:ss',\n 'shortDate': 'm/d/yy',\n 'mediumDate': 'mmm d, yyyy',\n 'longDate': 'mmmm d, yyyy',\n 'fullDate': 'dddd, mmmm d, yyyy',\n 'shortTime': 'h:MM TT',\n 'mediumTime': 'h:MM:ss TT',\n 'longTime': 'h:MM:ss TT Z',\n 'isoDate': 'yyyy-mm-dd',\n 'isoTime': 'HH:MM:ss',\n 'isoDateTime': 'yyyy-mm-dd\\'T\\'HH:MM:sso',\n 'isoUtcDateTime': 'UTC:yyyy-mm-dd\\'T\\'HH:MM:ss\\'Z\\'',\n 'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z'\n };\n\n // Internationalization strings\n dateFormat.i18n = {\n dayNames: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat',\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'\n ],\n monthNames: [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'\n ],\n timeNames: [\n 'a', 'p', 'am', 'pm', 'A', 'P', 'AM', 'PM'\n ]\n };\n\nfunction pad(val, len) {\n val = String(val);\n len = len || 2;\n while (val.length < len) {\n val = '0' + val;\n }\n return val;\n}\n\n/**\n * Get the ISO 8601 week number\n * Based on comments from\n * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html\n *\n * @param {Object} `date`\n * @return {Number}\n */\nfunction getWeek(date) {\n // Remove time components of date\n var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n\n // Change date to Thursday same week\n targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3);\n\n // Take January 4th as it is always in week 1 (see ISO 8601)\n var firstThursday = new Date(targetThursday.getFullYear(), 0, 4);\n\n // Change date to Thursday same week\n firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3);\n\n // Check if daylight-saving-time-switch occurred and correct for it\n var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset();\n targetThursday.setHours(targetThursday.getHours() - ds);\n\n // Number of weeks between target Thursday and first Thursday\n var weekDiff = (targetThursday - firstThursday) / (86400000*7);\n return 1 + Math.floor(weekDiff);\n}\n\n/**\n * Get ISO-8601 numeric representation of the day of the week\n * 1 (for Monday) through 7 (for Sunday)\n * \n * @param {Object} `date`\n * @return {Number}\n */\nfunction getDayOfWeek(date) {\n var dow = date.getDay();\n if(dow === 0) {\n dow = 7;\n }\n return dow;\n}\n\n/**\n * kind-of shortcut\n * @param {*} val\n * @return {String}\n */\nfunction kindOf(val) {\n if (val === null) {\n return 'null';\n }\n\n if (val === undefined) {\n return 'undefined';\n }\n\n if (typeof val !== 'object') {\n return typeof val;\n }\n\n if (Array.isArray(val)) {\n return 'array';\n }\n\n return {}.toString.call(val)\n .slice(8, -1).toLowerCase();\n};\n\n\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return dateFormat;\n });\n } else if (typeof exports === 'object') {\n module.exports = dateFormat;\n } else {\n global.dateFormat = dateFormat;\n }\n})(this);\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport createWithBsPrefix from './createWithBsPrefix';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar InputGroupAppend = createWithBsPrefix('input-group-append');\nvar InputGroupPrepend = createWithBsPrefix('input-group-prepend');\nvar InputGroupText = createWithBsPrefix('input-group-text', {\n Component: 'span'\n});\n\nvar InputGroupCheckbox = function InputGroupCheckbox(props) {\n return /*#__PURE__*/React.createElement(InputGroupText, null, /*#__PURE__*/React.createElement(\"input\", _extends({\n type: \"checkbox\"\n }, props)));\n};\n\nvar InputGroupRadio = function InputGroupRadio(props) {\n return /*#__PURE__*/React.createElement(InputGroupText, null, /*#__PURE__*/React.createElement(\"input\", _extends({\n type: \"radio\"\n }, props)));\n};\n\n/**\n *\n * @property {InputGroupAppend} Append\n * @property {InputGroupPrepend} Prepend\n * @property {InputGroupText} Text\n * @property {InputGroupRadio} Radio\n * @property {InputGroupCheckbox} Checkbox\n */\nvar InputGroup = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n size = _ref.size,\n className = _ref.className,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"size\", \"className\", \"as\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, bsPrefix, size && bsPrefix + \"-\" + size)\n }));\n});\nInputGroup.displayName = 'InputGroup';\n\nvar InputGroupWithExtras = _extends({}, InputGroup, {\n Text: InputGroupText,\n Radio: InputGroupRadio,\n Checkbox: InputGroupCheckbox,\n Append: InputGroupAppend,\n Prepend: InputGroupPrepend\n});\n\nexport default InputGroupWithExtras;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport all from 'prop-types-extra/lib/all';\nimport React, { useContext } from 'react';\nimport warning from 'warning';\nimport Feedback from './Feedback';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar FormControl = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n bsCustomPrefix = _ref.bsCustomPrefix,\n type = _ref.type,\n size = _ref.size,\n htmlSize = _ref.htmlSize,\n id = _ref.id,\n className = _ref.className,\n _ref$isValid = _ref.isValid,\n isValid = _ref$isValid === void 0 ? false : _ref$isValid,\n _ref$isInvalid = _ref.isInvalid,\n isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,\n plaintext = _ref.plaintext,\n readOnly = _ref.readOnly,\n custom = _ref.custom,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'input' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"bsCustomPrefix\", \"type\", \"size\", \"htmlSize\", \"id\", \"className\", \"isValid\", \"isInvalid\", \"plaintext\", \"readOnly\", \"custom\", \"as\"]);\n\n var _useContext = useContext(FormContext),\n controlId = _useContext.controlId;\n\n var _ref2 = custom ? [bsCustomPrefix, 'custom'] : [bsPrefix, 'form-control'],\n prefix = _ref2[0],\n defaultPrefix = _ref2[1];\n\n bsPrefix = useBootstrapPrefix(prefix, defaultPrefix);\n var classes;\n\n if (plaintext) {\n var _classes;\n\n classes = (_classes = {}, _classes[bsPrefix + \"-plaintext\"] = true, _classes);\n } else if (type === 'file') {\n var _classes2;\n\n classes = (_classes2 = {}, _classes2[bsPrefix + \"-file\"] = true, _classes2);\n } else if (type === 'range') {\n var _classes3;\n\n classes = (_classes3 = {}, _classes3[bsPrefix + \"-range\"] = true, _classes3);\n } else if (Component === 'select' && custom) {\n var _classes4;\n\n classes = (_classes4 = {}, _classes4[bsPrefix + \"-select\"] = true, _classes4[bsPrefix + \"-select-\" + size] = size, _classes4);\n } else {\n var _classes5;\n\n classes = (_classes5 = {}, _classes5[bsPrefix] = true, _classes5[bsPrefix + \"-\" + size] = size, _classes5);\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !id, '`controlId` is ignored on `` when `id` is specified.') : void 0;\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n type: type,\n size: htmlSize,\n ref: ref,\n readOnly: readOnly,\n id: id || controlId,\n className: classNames(className, classes, isValid && \"is-valid\", isInvalid && \"is-invalid\")\n }));\n});\nFormControl.displayName = 'FormControl';\nexport default Object.assign(FormControl, {\n Feedback: Feedback\n});","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n throw new Error(prefix + \": \" + (message || ''));\n}\n\nexport default invariant;\n","import React from 'react'; // TODO (apparently this is a bare \"onSelect\"?)\n\nvar SelectableContext = React.createContext(null);\nexport var makeEventKey = function makeEventKey(eventKey, href) {\n if (href === void 0) {\n href = null;\n }\n\n if (eventKey != null) return String(eventKey);\n return href || null;\n};\nexport default SelectableContext;","'use strict';\n/*\nCopyright (c) 2013, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://yuilibrary.com/license/\n*/\n\nvar sizes = [\n 'Bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB'\n];\n\n/**\nPretty print a size from bytes\n@method pretty\n@param {Number} size The number to pretty print\n@param {Boolean} [nospace=false] Don't print a space\n@param {Boolean} [one=false] Only print one character\n@param {Number} [places=1] Number of decimal places to return\n@param {Boolen} [numOnly] Return only the converted number and not size string\n*/\n\nmodule.exports = function (size, nospace, one, places, numOnly) {\n if (typeof nospace === 'object') {\n var opts = nospace;\n nospace = opts.nospace;\n one = opts.one;\n places = opts.places || 1;\n numOnly = opts.numOnly;\n } else {\n places = places || 1;\n }\n\n var mysize;\n\n for (var id = 0; id < sizes.length; ++id) {\n var unit = sizes[id];\n\n if (one) {\n unit = unit.slice(0, 1);\n }\n\n var s = Math.pow(1024, id);\n var fixed;\n if (size >= s) {\n fixed = String((size / s).toFixed(places));\n if (fixed.indexOf('.0') === fixed.length - 2) {\n fixed = fixed.slice(0, -2);\n }\n mysize = fixed + (nospace ? '' : ' ') + unit;\n }\n }\n\n // zero handling\n // always prints in Bytes\n if (!mysize) {\n var _unit = (one ? sizes[0].slice(0, 1) : sizes[0]);\n mysize = '0' + (nospace ? '' : ' ') + _unit;\n }\n\n if (numOnly) {\n mysize = Number.parseFloat(mysize);\n }\n\n return mysize;\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Chart\", {\n enumerable: true,\n get: function get() {\n return _chart[\"default\"];\n }\n});\nexports.defaults = exports.Scatter = exports.Bubble = exports.Polar = exports.Radar = exports.HorizontalBar = exports.Bar = exports.Line = exports.Pie = exports.Doughnut = exports[\"default\"] = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _chart = _interopRequireDefault(require(\"chart.js\"));\n\nvar _isEqual = _interopRequireDefault(require(\"lodash/isEqual\"));\n\nvar _keyBy = _interopRequireDefault(require(\"lodash/keyBy\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar NODE_ENV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV;\n\nvar ChartComponent = /*#__PURE__*/function (_React$Component) {\n _inherits(ChartComponent, _React$Component);\n\n var _super = _createSuper(ChartComponent);\n\n function ChartComponent() {\n var _this;\n\n _classCallCheck(this, ChartComponent);\n\n _this = _super.call(this);\n\n _defineProperty(_assertThisInitialized(_this), \"handleOnClick\", function (event) {\n var instance = _this.chartInstance;\n var _this$props = _this.props,\n getDatasetAtEvent = _this$props.getDatasetAtEvent,\n getElementAtEvent = _this$props.getElementAtEvent,\n getElementsAtEvent = _this$props.getElementsAtEvent,\n onElementsClick = _this$props.onElementsClick;\n getDatasetAtEvent && getDatasetAtEvent(instance.getDatasetAtEvent(event), event);\n getElementAtEvent && getElementAtEvent(instance.getElementAtEvent(event), event);\n getElementsAtEvent && getElementsAtEvent(instance.getElementsAtEvent(event), event);\n onElementsClick && onElementsClick(instance.getElementsAtEvent(event), event); // Backward compatibility\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ref\", function (element) {\n _this.element = element;\n });\n\n _this.chartInstance = undefined;\n return _this;\n }\n\n _createClass(ChartComponent, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.renderChart();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n if (this.props.redraw) {\n this.destroyChart();\n this.renderChart();\n return;\n }\n\n this.updateChart();\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n var _this$props2 = this.props,\n redraw = _this$props2.redraw,\n type = _this$props2.type,\n options = _this$props2.options,\n plugins = _this$props2.plugins,\n legend = _this$props2.legend,\n height = _this$props2.height,\n width = _this$props2.width;\n\n if (nextProps.redraw === true) {\n return true;\n }\n\n if (height !== nextProps.height || width !== nextProps.width) {\n return true;\n }\n\n if (type !== nextProps.type) {\n return true;\n }\n\n if (!(0, _isEqual[\"default\"])(legend, nextProps.legend)) {\n return true;\n }\n\n if (!(0, _isEqual[\"default\"])(options, nextProps.options)) {\n return true;\n }\n\n var nextData = this.transformDataProp(nextProps);\n\n if (!(0, _isEqual[\"default\"])(this.shadowDataProp, nextData)) {\n return true;\n }\n\n return !(0, _isEqual[\"default\"])(plugins, nextProps.plugins);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.destroyChart();\n }\n }, {\n key: \"transformDataProp\",\n value: function transformDataProp(props) {\n var data = props.data;\n\n if (typeof data == 'function') {\n var node = this.element;\n return data(node);\n } else {\n return data;\n }\n } // Chart.js directly mutates the data.dataset objects by adding _meta proprerty\n // this makes impossible to compare the current and next data changes\n // therefore we memoize the data prop while sending a fake to Chart.js for mutation.\n // see https://github.com/chartjs/Chart.js/blob/master/src/core/core.controller.js#L615-L617\n\n }, {\n key: \"memoizeDataProps\",\n value: function memoizeDataProps() {\n if (!this.props.data) {\n return;\n }\n\n var data = this.transformDataProp(this.props);\n this.shadowDataProp = _objectSpread(_objectSpread({}, data), {}, {\n datasets: data.datasets && data.datasets.map(function (set) {\n return _objectSpread({}, set);\n })\n });\n this.saveCurrentDatasets(); // to remove the dataset metadata from this chart when the chart is destroyed\n\n return data;\n }\n }, {\n key: \"checkDatasets\",\n value: function checkDatasets(datasets) {\n var isDev = NODE_ENV !== 'production' && NODE_ENV !== 'prod';\n var usingCustomKeyProvider = this.props.datasetKeyProvider !== ChartComponent.getLabelAsKey;\n var multipleDatasets = datasets.length > 1;\n\n if (isDev && multipleDatasets && !usingCustomKeyProvider) {\n var shouldWarn = false;\n datasets.forEach(function (dataset) {\n if (!dataset.label) {\n shouldWarn = true;\n }\n });\n\n if (shouldWarn) {\n console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the \"label\" property on each dataset is used. Alternatively, you may provide a \"datasetKeyProvider\" as a prop that returns a unique key.');\n }\n }\n }\n }, {\n key: \"getCurrentDatasets\",\n value: function getCurrentDatasets() {\n return this.chartInstance && this.chartInstance.config.data && this.chartInstance.config.data.datasets || [];\n }\n }, {\n key: \"saveCurrentDatasets\",\n value: function saveCurrentDatasets() {\n var _this2 = this;\n\n this.datasets = this.datasets || {};\n var currentDatasets = this.getCurrentDatasets();\n currentDatasets.forEach(function (d) {\n _this2.datasets[_this2.props.datasetKeyProvider(d)] = d;\n });\n }\n }, {\n key: \"updateChart\",\n value: function updateChart() {\n var _this3 = this;\n\n var options = this.props.options;\n var data = this.memoizeDataProps(this.props);\n if (!this.chartInstance) return;\n\n if (options) {\n this.chartInstance.options = _chart[\"default\"].helpers.configMerge(this.chartInstance.options, options);\n } // Pipe datasets to chart instance datasets enabling\n // seamless transitions\n\n\n var currentDatasets = this.getCurrentDatasets();\n var nextDatasets = data.datasets || [];\n this.checkDatasets(currentDatasets);\n var currentDatasetsIndexed = (0, _keyBy[\"default\"])(currentDatasets, this.props.datasetKeyProvider); // We can safely replace the dataset array, as long as we retain the _meta property\n // on each dataset.\n\n this.chartInstance.config.data.datasets = nextDatasets.map(function (next) {\n var current = currentDatasetsIndexed[_this3.props.datasetKeyProvider(next)];\n\n if (current && current.type === next.type && next.data) {\n // Be robust to no data. Relevant for other update mechanisms as in chartjs-plugin-streaming.\n // The data array must be edited in place. As chart.js adds listeners to it.\n current.data.splice(next.data.length);\n next.data.forEach(function (point, pid) {\n current.data[pid] = next.data[pid];\n });\n\n var _data = next.data,\n otherProps = _objectWithoutProperties(next, [\"data\"]); // Merge properties. Notice a weakness here. If a property is removed\n // from next, it will be retained by current and never disappears.\n // Workaround is to set value to null or undefined in next.\n\n\n return _objectSpread(_objectSpread({}, current), otherProps);\n } else {\n return next;\n }\n });\n\n var datasets = data.datasets,\n rest = _objectWithoutProperties(data, [\"datasets\"]);\n\n this.chartInstance.config.data = _objectSpread(_objectSpread({}, this.chartInstance.config.data), rest);\n this.chartInstance.update();\n }\n }, {\n key: \"renderChart\",\n value: function renderChart() {\n var _this$props3 = this.props,\n options = _this$props3.options,\n legend = _this$props3.legend,\n type = _this$props3.type,\n plugins = _this$props3.plugins;\n var node = this.element;\n var data = this.memoizeDataProps();\n\n if (typeof legend !== 'undefined' && !(0, _isEqual[\"default\"])(ChartComponent.defaultProps.legend, legend)) {\n options.legend = legend;\n }\n\n this.chartInstance = new _chart[\"default\"](node, {\n type: type,\n data: data,\n options: options,\n plugins: plugins\n });\n }\n }, {\n key: \"destroyChart\",\n value: function destroyChart() {\n if (!this.chartInstance) {\n return;\n } // Put all of the datasets that have existed in the chart back on the chart\n // so that the metadata associated with this chart get destroyed.\n // This allows the datasets to be used in another chart. This can happen,\n // for example, in a tabbed UI where the chart gets created each time the\n // tab gets switched to the chart and uses the same data).\n\n\n this.saveCurrentDatasets();\n var datasets = Object.values(this.datasets);\n this.chartInstance.config.data.datasets = datasets;\n this.chartInstance.destroy();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props4 = this.props,\n height = _this$props4.height,\n width = _this$props4.width,\n id = _this$props4.id;\n return /*#__PURE__*/_react[\"default\"].createElement(\"canvas\", {\n ref: this.ref,\n height: height,\n width: width,\n id: id,\n onClick: this.handleOnClick\n });\n }\n }]);\n\n return ChartComponent;\n}(_react[\"default\"].Component);\n\n_defineProperty(ChartComponent, \"getLabelAsKey\", function (d) {\n return d.label;\n});\n\n_defineProperty(ChartComponent, \"propTypes\", {\n data: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].object, _propTypes[\"default\"].func]).isRequired,\n getDatasetAtEvent: _propTypes[\"default\"].func,\n getElementAtEvent: _propTypes[\"default\"].func,\n getElementsAtEvent: _propTypes[\"default\"].func,\n height: _propTypes[\"default\"].number,\n legend: _propTypes[\"default\"].object,\n onElementsClick: _propTypes[\"default\"].func,\n options: _propTypes[\"default\"].object,\n plugins: _propTypes[\"default\"].arrayOf(_propTypes[\"default\"].object),\n redraw: _propTypes[\"default\"].bool,\n type: function type(props, propName, componentName) {\n if (!_chart[\"default\"].controllers[props[propName]]) {\n return new Error('Invalid chart type `' + props[propName] + '` supplied to' + ' `' + componentName + '`.');\n }\n },\n width: _propTypes[\"default\"].number,\n datasetKeyProvider: _propTypes[\"default\"].func\n});\n\n_defineProperty(ChartComponent, \"defaultProps\", {\n legend: {\n display: true,\n position: 'bottom'\n },\n type: 'doughnut',\n height: 150,\n width: 300,\n redraw: false,\n options: {},\n datasetKeyProvider: ChartComponent.getLabelAsKey\n});\n\nvar _default = ChartComponent;\nexports[\"default\"] = _default;\n\nvar Doughnut = /*#__PURE__*/function (_React$Component2) {\n _inherits(Doughnut, _React$Component2);\n\n var _super2 = _createSuper(Doughnut);\n\n function Doughnut() {\n _classCallCheck(this, Doughnut);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(Doughnut, [{\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref) {\n return _this4.chartInstance = _ref && _ref.chartInstance;\n },\n type: \"doughnut\"\n }));\n }\n }]);\n\n return Doughnut;\n}(_react[\"default\"].Component);\n\nexports.Doughnut = Doughnut;\n\nvar Pie = /*#__PURE__*/function (_React$Component3) {\n _inherits(Pie, _React$Component3);\n\n var _super3 = _createSuper(Pie);\n\n function Pie() {\n _classCallCheck(this, Pie);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(Pie, [{\n key: \"render\",\n value: function render() {\n var _this5 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref2) {\n return _this5.chartInstance = _ref2 && _ref2.chartInstance;\n },\n type: \"pie\"\n }));\n }\n }]);\n\n return Pie;\n}(_react[\"default\"].Component);\n\nexports.Pie = Pie;\n\nvar Line = /*#__PURE__*/function (_React$Component4) {\n _inherits(Line, _React$Component4);\n\n var _super4 = _createSuper(Line);\n\n function Line() {\n _classCallCheck(this, Line);\n\n return _super4.apply(this, arguments);\n }\n\n _createClass(Line, [{\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref3) {\n return _this6.chartInstance = _ref3 && _ref3.chartInstance;\n },\n type: \"line\"\n }));\n }\n }]);\n\n return Line;\n}(_react[\"default\"].Component);\n\nexports.Line = Line;\n\nvar Bar = /*#__PURE__*/function (_React$Component5) {\n _inherits(Bar, _React$Component5);\n\n var _super5 = _createSuper(Bar);\n\n function Bar() {\n _classCallCheck(this, Bar);\n\n return _super5.apply(this, arguments);\n }\n\n _createClass(Bar, [{\n key: \"render\",\n value: function render() {\n var _this7 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref4) {\n return _this7.chartInstance = _ref4 && _ref4.chartInstance;\n },\n type: \"bar\"\n }));\n }\n }]);\n\n return Bar;\n}(_react[\"default\"].Component);\n\nexports.Bar = Bar;\n\nvar HorizontalBar = /*#__PURE__*/function (_React$Component6) {\n _inherits(HorizontalBar, _React$Component6);\n\n var _super6 = _createSuper(HorizontalBar);\n\n function HorizontalBar() {\n _classCallCheck(this, HorizontalBar);\n\n return _super6.apply(this, arguments);\n }\n\n _createClass(HorizontalBar, [{\n key: \"render\",\n value: function render() {\n var _this8 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref5) {\n return _this8.chartInstance = _ref5 && _ref5.chartInstance;\n },\n type: \"horizontalBar\"\n }));\n }\n }]);\n\n return HorizontalBar;\n}(_react[\"default\"].Component);\n\nexports.HorizontalBar = HorizontalBar;\n\nvar Radar = /*#__PURE__*/function (_React$Component7) {\n _inherits(Radar, _React$Component7);\n\n var _super7 = _createSuper(Radar);\n\n function Radar() {\n _classCallCheck(this, Radar);\n\n return _super7.apply(this, arguments);\n }\n\n _createClass(Radar, [{\n key: \"render\",\n value: function render() {\n var _this9 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref6) {\n return _this9.chartInstance = _ref6 && _ref6.chartInstance;\n },\n type: \"radar\"\n }));\n }\n }]);\n\n return Radar;\n}(_react[\"default\"].Component);\n\nexports.Radar = Radar;\n\nvar Polar = /*#__PURE__*/function (_React$Component8) {\n _inherits(Polar, _React$Component8);\n\n var _super8 = _createSuper(Polar);\n\n function Polar() {\n _classCallCheck(this, Polar);\n\n return _super8.apply(this, arguments);\n }\n\n _createClass(Polar, [{\n key: \"render\",\n value: function render() {\n var _this10 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref7) {\n return _this10.chartInstance = _ref7 && _ref7.chartInstance;\n },\n type: \"polarArea\"\n }));\n }\n }]);\n\n return Polar;\n}(_react[\"default\"].Component);\n\nexports.Polar = Polar;\n\nvar Bubble = /*#__PURE__*/function (_React$Component9) {\n _inherits(Bubble, _React$Component9);\n\n var _super9 = _createSuper(Bubble);\n\n function Bubble() {\n _classCallCheck(this, Bubble);\n\n return _super9.apply(this, arguments);\n }\n\n _createClass(Bubble, [{\n key: \"render\",\n value: function render() {\n var _this11 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref8) {\n return _this11.chartInstance = _ref8 && _ref8.chartInstance;\n },\n type: \"bubble\"\n }));\n }\n }]);\n\n return Bubble;\n}(_react[\"default\"].Component);\n\nexports.Bubble = Bubble;\n\nvar Scatter = /*#__PURE__*/function (_React$Component10) {\n _inherits(Scatter, _React$Component10);\n\n var _super10 = _createSuper(Scatter);\n\n function Scatter() {\n _classCallCheck(this, Scatter);\n\n return _super10.apply(this, arguments);\n }\n\n _createClass(Scatter, [{\n key: \"render\",\n value: function render() {\n var _this12 = this;\n\n return /*#__PURE__*/_react[\"default\"].createElement(ChartComponent, _extends({}, this.props, {\n ref: function ref(_ref9) {\n return _this12.chartInstance = _ref9 && _ref9.chartInstance;\n },\n type: \"scatter\"\n }));\n }\n }]);\n\n return Scatter;\n}(_react[\"default\"].Component);\n\nexports.Scatter = Scatter;\nvar defaults = _chart[\"default\"].defaults;\nexports.defaults = defaults;","import invariant from 'invariant';\n\nvar noop = function noop() {};\n\nfunction readOnlyPropType(handler, name) {\n return function (props, propName) {\n if (props[propName] !== undefined) {\n if (!props[handler]) {\n return new Error(\"You have provided a `\" + propName + \"` prop to `\" + name + \"` \" + (\"without an `\" + handler + \"` handler prop. This will render a read-only field. \") + (\"If the field should be mutable use `\" + defaultKey(propName) + \"`. \") + (\"Otherwise, set `\" + handler + \"`.\"));\n }\n }\n };\n}\n\nexport function uncontrolledPropTypes(controlledValues, displayName) {\n var propTypes = {};\n Object.keys(controlledValues).forEach(function (prop) {\n // add default propTypes for folks that use runtime checks\n propTypes[defaultKey(prop)] = noop;\n\n if (process.env.NODE_ENV !== 'production') {\n var handler = controlledValues[prop];\n !(typeof handler === 'string' && handler.trim().length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop) : invariant(false) : void 0;\n propTypes[prop] = readOnlyPropType(handler, displayName);\n }\n });\n return propTypes;\n}\nexport function isProp(props, prop) {\n return props[prop] !== undefined;\n}\nexport function defaultKey(key) {\n return 'default' + key.charAt(0).toUpperCase() + key.substr(1);\n}\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nexport function canAcceptRef(component) {\n return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\n\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n\nimport { useCallback, useRef, useState } from 'react';\nimport * as Utils from './utils';\n\nfunction useUncontrolledProp(propValue, defaultValue, handler) {\n var wasPropRef = useRef(propValue !== undefined);\n\n var _useState = useState(defaultValue),\n stateValue = _useState[0],\n setState = _useState[1];\n\n var isProp = propValue !== undefined;\n var wasProp = wasPropRef.current;\n wasPropRef.current = isProp;\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n\n if (!isProp && wasProp && stateValue !== defaultValue) {\n setState(defaultValue);\n }\n\n return [isProp ? propValue : stateValue, useCallback(function (value) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (handler) handler.apply(void 0, [value].concat(args));\n setState(value);\n }, [handler])];\n}\n\nexport { useUncontrolledProp };\nexport default function useUncontrolled(props, config) {\n return Object.keys(config).reduce(function (result, fieldName) {\n var _extends2;\n\n var _ref = result,\n defaultValue = _ref[Utils.defaultKey(fieldName)],\n propsValue = _ref[fieldName],\n rest = _objectWithoutPropertiesLoose(_ref, [Utils.defaultKey(fieldName), fieldName].map(_toPropertyKey));\n\n var handlerName = config[fieldName];\n\n var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),\n value = _useUncontrolledProp[0],\n handler = _useUncontrolledProp[1];\n\n return _extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));\n }, props);\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n *
\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : PropTypes.instanceOf(Element)\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","import { useEffect, useRef } from 'react';\n/**\n * Creates a `Ref` whose value is updated in an effect, ensuring the most recent\n * value is the one rendered with. Generally only required for Concurrent mode usage\n * where previous work in `render()` may be discarded befor being used.\n *\n * This is safe to access in an event handler.\n *\n * @param value The `Ref` value\n */\n\nfunction useCommittedRef(value) {\n var ref = useRef(value);\n useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref;\n}\n\nexport default useCommittedRef;","import { useCallback } from 'react';\nimport useCommittedRef from './useCommittedRef';\nexport default function useEventCallback(fn) {\n var ref = useCommittedRef(fn);\n return useCallback(function () {\n return ref.current && ref.current.apply(ref, arguments);\n }, [ref]);\n}","/**\r\n * This is an entry point for global namespace. If you want to use separate\r\n * modules individually - you are more than welcome to do so.\r\n */\r\n\r\nvar random = require('ngraph.random');\r\n\r\nvar Viva = {\r\n lazyExtend: function() {\r\n return require('ngraph.merge').apply(this, arguments);\r\n },\r\n randomIterator: function() {\r\n return random.randomIterator.apply(random, arguments);\r\n },\r\n random: function() {\r\n return random.random.apply(random, arguments);\r\n },\r\n events: require('ngraph.events')\r\n};\r\n\r\nViva.Graph = {\r\n version: require('./version.js'),\r\n graph: require('ngraph.graph'),\r\n\r\n serializer: function() {\r\n return {\r\n loadFromJSON: require('ngraph.fromjson'),\r\n storeToJSON: require('ngraph.tojson')\r\n };\r\n },\r\n\r\n centrality: require('./Algorithms/centrality.js'),\r\n operations: require('./Algorithms/operations.js'),\r\n\r\n geom: function() {\r\n return {\r\n intersect: require('gintersect'),\r\n intersectRect: require('./Utils/intersectRect.js')\r\n };\r\n },\r\n\r\n webgl: require('./WebGL/webgl.js'),\r\n webglInputEvents: require('./WebGL/webglInputEvents.js'),\r\n\r\n generator: function() {\r\n return require('ngraph.generators');\r\n },\r\n\r\n Input: {\r\n domInputManager: require('./Input/domInputManager.js'),\r\n webglInputManager: require('./Input/webglInputManager.js')\r\n },\r\n\r\n Utils: {\r\n // TODO: move to Input\r\n dragndrop: require('./Input/dragndrop.js'),\r\n findElementPosition: require('./Utils/findElementPosition.js'),\r\n timer: require('./Utils/timer.js'),\r\n getDimension: require('./Utils/getDimensions.js'),\r\n events: require('./Utils/backwardCompatibleEvents.js')\r\n },\r\n\r\n Layout: {\r\n forceDirected: require('ngraph.forcelayout'),\r\n constant: require('./Layout/constant.js')\r\n },\r\n\r\n View: {\r\n // TODO: Move `webglXXX` out to webgl namespace\r\n Texture: require('./WebGL/texture.js'),\r\n // TODO: This should not be even exported\r\n webglAtlas: require('./WebGL/webglAtlas.js'),\r\n webglImageNodeProgram: require('./WebGL/webglImageNodeProgram.js'),\r\n webglLinkProgram: require('./WebGL/webglLinkProgram.js'),\r\n webglNodeProgram: require('./WebGL/webglNodeProgram.js'),\r\n webglLine: require('./WebGL/webglLine.js'),\r\n webglSquare: require('./WebGL/webglSquare.js'),\r\n webglImage: require('./WebGL/webglImage.js'),\r\n webglGraphics: require('./View/webglGraphics.js'),\r\n // TODO: Deprecate this:\r\n _webglUtil: {\r\n parseColor: require('./WebGL/parseColor.js')\r\n },\r\n\r\n // TODO: move to svg namespace\r\n svgGraphics: require('./View/svgGraphics.js'),\r\n\r\n renderer: require('./View/renderer.js'),\r\n\r\n // deprecated\r\n cssGraphics: function() {\r\n throw new Error('cssGraphics is deprecated. Please use older version of vivagraph (< 0.7) if you need it');\r\n },\r\n\r\n svgNodeFactory: function() {\r\n throw new Error('svgNodeFactory is deprecated. Please use older version of vivagraph (< 0.7) if you need it');\r\n },\r\n\r\n community: function() {\r\n throw new Error('community is deprecated. Please use vivagraph < 0.7 if you need it, or `https://github.com/anvaka/ngraph.slpa` module');\r\n }\r\n },\r\n\r\n Rect: require('./Utils/rect.js'),\r\n\r\n svg: require('simplesvg'),\r\n\r\n // TODO: should be camelCase\r\n BrowserInfo: require('./Utils/browserInfo.js')\r\n};\r\n\r\nmodule.exports = Viva;\r\n","import React from 'react'; // TODO: check\n\nvar context = React.createContext(null);\ncontext.displayName = 'NavbarContext';\nexport default context;","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.filter(function (f) {\n return f != null;\n }).reduce(function (acc, f) {\n if (typeof f !== 'function') {\n throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n\n if (acc === null) return f;\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n // @ts-ignore\n acc.apply(this, args); // @ts-ignore\n\n f.apply(this, args);\n };\n }, null);\n}\n\nexport default createChainedFunction;","/* eslint-disable no-return-assign */\nimport canUseDOM from './canUseDOM';\nexport var optionsSupported = false;\nexport var onceSupported = false;\n\ntry {\n var options = {\n get passive() {\n return optionsSupported = true;\n },\n\n get once() {\n // eslint-disable-next-line no-multi-assign\n return onceSupported = optionsSupported = true;\n }\n\n };\n\n if (canUseDOM) {\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, true);\n }\n} catch (e) {\n /* */\n}\n\n/**\n * An `addEventListener` ponyfill, supports the `once` option\n */\nfunction addEventListener(node, eventName, handler, options) {\n if (options && typeof options !== 'boolean' && !onceSupported) {\n var once = options.once,\n capture = options.capture;\n var wrappedHandler = handler;\n\n if (!onceSupported && once) {\n wrappedHandler = handler.__once || function onceHandler(event) {\n this.removeEventListener(eventName, onceHandler, capture);\n handler.call(this, event);\n };\n\n handler.__once = wrappedHandler;\n }\n\n node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);\n }\n\n node.addEventListener(eventName, handler, options);\n}\n\nexport default addEventListener;","function removeEventListener(node, eventName, handler, options) {\n var capture = options && typeof options !== 'boolean' ? options.capture : options;\n node.removeEventListener(eventName, handler, capture);\n\n if (handler.__once) {\n node.removeEventListener(eventName, handler.__once, capture);\n }\n}\n\nexport default removeEventListener;","import addEventListener from './addEventListener';\nimport removeEventListener from './removeEventListener';\n\nfunction listen(node, eventName, handler, options) {\n addEventListener(node, eventName, handler, options);\n return function () {\n removeEventListener(node, eventName, handler, options);\n };\n}\n\nexport default listen;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar NavItem = React.forwardRef( // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\nfunction (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"children\", \"as\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n ref: ref,\n className: classNames(className, bsPrefix)\n }), children);\n});\nNavItem.displayName = 'NavItem';\nexport default NavItem;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport SafeAnchor from './SafeAnchor';\nimport AbstractNavItem from './AbstractNavItem';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n disabled: false,\n as: SafeAnchor\n};\nvar NavLink = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n disabled = _ref.disabled,\n className = _ref.className,\n href = _ref.href,\n eventKey = _ref.eventKey,\n onSelect = _ref.onSelect,\n as = _ref.as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"disabled\", \"className\", \"href\", \"eventKey\", \"onSelect\", \"as\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');\n return /*#__PURE__*/React.createElement(AbstractNavItem, _extends({}, props, {\n href: href,\n ref: ref,\n eventKey: eventKey,\n as: as,\n disabled: disabled,\n onSelect: onSelect,\n className: classNames(className, bsPrefix, disabled && 'disabled')\n }));\n});\nNavLink.displayName = 'NavLink';\nNavLink.defaultProps = defaultProps;\nexport default NavLink;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport all from 'prop-types-extra/lib/all';\nimport React, { useContext } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nimport CardContext from './CardContext';\nimport AbstractNav from './AbstractNav';\nimport NavItem from './NavItem';\nimport NavLink from './NavLink';\nvar defaultProps = {\n justify: false,\n fill: false\n};\nvar Nav = React.forwardRef(function (uncontrolledProps, ref) {\n var _classNames;\n\n var _useUncontrolled = useUncontrolled(uncontrolledProps, {\n activeKey: 'onSelect'\n }),\n _useUncontrolled$as = _useUncontrolled.as,\n as = _useUncontrolled$as === void 0 ? 'div' : _useUncontrolled$as,\n initialBsPrefix = _useUncontrolled.bsPrefix,\n variant = _useUncontrolled.variant,\n fill = _useUncontrolled.fill,\n justify = _useUncontrolled.justify,\n navbar = _useUncontrolled.navbar,\n className = _useUncontrolled.className,\n children = _useUncontrolled.children,\n activeKey = _useUncontrolled.activeKey,\n props = _objectWithoutPropertiesLoose(_useUncontrolled, [\"as\", \"bsPrefix\", \"variant\", \"fill\", \"justify\", \"navbar\", \"className\", \"children\", \"activeKey\"]);\n\n var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');\n var navbarBsPrefix;\n var cardHeaderBsPrefix;\n var isNavbar = false;\n var navbarContext = useContext(NavbarContext);\n var cardContext = useContext(CardContext);\n\n if (navbarContext) {\n navbarBsPrefix = navbarContext.bsPrefix;\n isNavbar = navbar == null ? true : navbar;\n } else if (cardContext) {\n cardHeaderBsPrefix = cardContext.cardHeaderBsPrefix;\n }\n\n return /*#__PURE__*/React.createElement(AbstractNav, _extends({\n as: as,\n ref: ref,\n activeKey: activeKey,\n className: classNames(className, (_classNames = {}, _classNames[bsPrefix] = !isNavbar, _classNames[navbarBsPrefix + \"-nav\"] = isNavbar, _classNames[cardHeaderBsPrefix + \"-\" + variant] = !!cardHeaderBsPrefix, _classNames[bsPrefix + \"-\" + variant] = !!variant, _classNames[bsPrefix + \"-fill\"] = fill, _classNames[bsPrefix + \"-justified\"] = justify, _classNames))\n }, props), children);\n});\nNav.displayName = 'Nav';\nNav.defaultProps = defaultProps;\nNav.Item = NavItem;\nNav.Link = NavLink;\nexport default Nav;","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","module.exports = function(subject) {\n validateSubject(subject);\n\n var eventsStorage = createEventsStorage(subject);\n subject.on = eventsStorage.on;\n subject.off = eventsStorage.off;\n subject.fire = eventsStorage.fire;\n return subject;\n};\n\nfunction createEventsStorage(subject) {\n // Store all event listeners to this hash. Key is event name, value is array\n // of callback records.\n //\n // A callback record consists of callback function and its optional context:\n // { 'eventName' => [{callback: function, ctx: object}] }\n var registeredEvents = Object.create(null);\n\n return {\n on: function (eventName, callback, ctx) {\n if (typeof callback !== 'function') {\n throw new Error('callback is expected to be a function');\n }\n var handlers = registeredEvents[eventName];\n if (!handlers) {\n handlers = registeredEvents[eventName] = [];\n }\n handlers.push({callback: callback, ctx: ctx});\n\n return subject;\n },\n\n off: function (eventName, callback) {\n var wantToRemoveAll = (typeof eventName === 'undefined');\n if (wantToRemoveAll) {\n // Killing old events storage should be enough in this case:\n registeredEvents = Object.create(null);\n return subject;\n }\n\n if (registeredEvents[eventName]) {\n var deleteAllCallbacksForEvent = (typeof callback !== 'function');\n if (deleteAllCallbacksForEvent) {\n delete registeredEvents[eventName];\n } else {\n var callbacks = registeredEvents[eventName];\n for (var i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].callback === callback) {\n callbacks.splice(i, 1);\n }\n }\n }\n }\n\n return subject;\n },\n\n fire: function (eventName) {\n var callbacks = registeredEvents[eventName];\n if (!callbacks) {\n return subject;\n }\n\n var fireArguments;\n if (arguments.length > 1) {\n fireArguments = Array.prototype.splice.call(arguments, 1);\n }\n for(var i = 0; i < callbacks.length; ++i) {\n var callbackInfo = callbacks[i];\n callbackInfo.callback.apply(callbackInfo.ctx, fireArguments);\n }\n\n return subject;\n }\n };\n}\n\nfunction validateSubject(subject) {\n if (!subject) {\n throw new Error('Eventify cannot use falsy object as events subject');\n }\n var reservedWords = ['on', 'fire', 'off'];\n for (var i = 0; i < reservedWords.length; ++i) {\n if (subject.hasOwnProperty(reservedWords[i])) {\n throw new Error(\"Subject cannot be eventified, since it already has property '\" + reservedWords[i] + \"'\");\n }\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","import ReactDOM from 'react-dom';\nexport default function safeFindDOMNode(componentOrElement) {\n if (componentOrElement && 'setState' in componentOrElement) {\n return ReactDOM.findDOMNode(componentOrElement);\n }\n\n return componentOrElement != null ? componentOrElement : null;\n}","'use strict';\n\nexports.__esModule = true;\nexports.LinkContainer = exports.IndexLinkContainer = undefined;\n\nvar _IndexLinkContainer2 = require('./IndexLinkContainer');\n\nvar _IndexLinkContainer3 = _interopRequireDefault(_IndexLinkContainer2);\n\nvar _LinkContainer2 = require('./LinkContainer');\n\nvar _LinkContainer3 = _interopRequireDefault(_LinkContainer2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.IndexLinkContainer = _IndexLinkContainer3.default;\nexports.LinkContainer = _LinkContainer3.default;","module.exports = merge;\n\n/**\n * Augments `target` with properties in `options`. Does not override\n * target's properties if they are defined and matches expected type in \n * options\n *\n * @returns {Object} merged object\n */\nfunction merge(target, options) {\n var key;\n if (!target) { target = {}; }\n if (options) {\n for (key in options) {\n if (options.hasOwnProperty(key)) {\n var targetHasIt = target.hasOwnProperty(key),\n optionsValueType = typeof options[key],\n shouldReplace = !targetHasIt || (typeof target[key] !== optionsValueType);\n\n if (shouldReplace) {\n target[key] = options[key];\n } else if (optionsValueType === 'object') {\n // go deep, don't care about loops here, we are simple API!:\n target[key] = merge(target[key], options[key]);\n }\n }\n }\n }\n\n return target;\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nvar propTypes = {\n /**\n * Specify whether the feedback is for valid or invalid fields\n *\n * @type {('valid'|'invalid')}\n */\n type: PropTypes.string,\n\n /** Display feedback as a tooltip. */\n tooltip: PropTypes.bool,\n as: PropTypes.elementType\n};\nvar Feedback = React.forwardRef( // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\nfunction (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n className = _ref.className,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'valid' : _ref$type,\n _ref$tooltip = _ref.tooltip,\n tooltip = _ref$tooltip === void 0 ? false : _ref$tooltip,\n props = _objectWithoutPropertiesLoose(_ref, [\"as\", \"className\", \"type\", \"tooltip\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n ref: ref,\n className: classNames(className, type + \"-\" + (tooltip ? 'tooltip' : 'feedback'))\n }));\n});\nFeedback.displayName = 'Feedback';\nFeedback.propTypes = propTypes;\nexport default Feedback;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport createChainedFunction from './createChainedFunction';\n\nfunction isTrivialHref(href) {\n return !href || href.trim() === '#';\n}\n/**\n * There are situations due to browser quirks or Bootstrap CSS where\n * an anchor tag is needed, when semantically a button tag is the\n * better choice. SafeAnchor ensures that when an anchor is used like a\n * button its accessible. It also emulates input `disabled` behavior for\n * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.\n */\n\n\nvar SafeAnchor = React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'a' : _ref$as,\n disabled = _ref.disabled,\n onKeyDown = _ref.onKeyDown,\n props = _objectWithoutPropertiesLoose(_ref, [\"as\", \"disabled\", \"onKeyDown\"]);\n\n var handleClick = function handleClick(event) {\n var href = props.href,\n onClick = props.onClick;\n\n if (disabled || isTrivialHref(href)) {\n event.preventDefault();\n }\n\n if (disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n if (event.key === ' ') {\n event.preventDefault();\n handleClick(event);\n }\n };\n\n if (isTrivialHref(props.href)) {\n props.role = props.role || 'button'; // we want to make sure there is a href attribute on the node\n // otherwise, the cursor incorrectly styled (except with role='button')\n\n props.href = props.href || '#';\n }\n\n if (disabled) {\n props.tabIndex = -1;\n props['aria-disabled'] = true;\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n onClick: handleClick,\n onKeyDown: createChainedFunction(handleKeyDown, onKeyDown)\n }));\n});\nSafeAnchor.displayName = 'SafeAnchor';\nexport default SafeAnchor;","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nvar _fadeStyles;\n\nimport classNames from 'classnames';\nimport transitionEnd from 'dom-helpers/transitionEnd';\nimport React, { useCallback } from 'react';\nimport Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';\nimport triggerBrowserReflow from './triggerBrowserReflow';\nvar defaultProps = {\n in: false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false\n};\nvar fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'show', _fadeStyles[ENTERED] = 'show', _fadeStyles);\nvar Fade = React.forwardRef(function (_ref, ref) {\n var className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, [\"className\", \"children\"]);\n\n var handleEnter = useCallback(function (node) {\n triggerBrowserReflow(node);\n if (props.onEnter) props.onEnter(node);\n }, [props]);\n return /*#__PURE__*/React.createElement(Transition, _extends({\n ref: ref,\n addEndListener: transitionEnd\n }, props, {\n onEnter: handleEnter\n }), function (status, innerProps) {\n return React.cloneElement(children, _extends({}, innerProps, {\n className: classNames('fade', className, children.props.className, fadeStyles[status])\n }));\n });\n});\nFade.defaultProps = defaultProps;\nFade.displayName = 'Fade';\nexport default Fade;","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","module.exports = {\n random: random,\n randomIterator: randomIterator\n};\n\n/**\n * Creates seeded PRNG with two methods:\n * next() and nextDouble()\n */\nfunction random(inputSeed) {\n var seed = typeof inputSeed === 'number' ? inputSeed : (+ new Date());\n var randomFunc = function() {\n // Robert Jenkins' 32 bit integer hash function.\n seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff;\n seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff;\n seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff;\n seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff;\n seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff;\n seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff;\n return (seed & 0xfffffff) / 0x10000000;\n };\n\n return {\n /**\n * Generates random integer number in the range from 0 (inclusive) to maxValue (exclusive)\n *\n * @param maxValue Number REQUIRED. Ommitting this number will result in NaN values from PRNG.\n */\n next : function (maxValue) {\n return Math.floor(randomFunc() * maxValue);\n },\n\n /**\n * Generates random double number in the range from 0 (inclusive) to 1 (exclusive)\n * This function is the same as Math.random() (except that it could be seeded)\n */\n nextDouble : function () {\n return randomFunc();\n }\n };\n}\n\n/*\n * Creates iterator over array, which returns items of array in random order\n * Time complexity is guaranteed to be O(n);\n */\nfunction randomIterator(array, customRandom) {\n var localRandom = customRandom || random();\n if (typeof localRandom.next !== 'function') {\n throw new Error('customRandom does not match expected API: next() function is missing');\n }\n\n return {\n forEach : function (callback) {\n var i, j, t;\n for (i = array.length - 1; i > 0; --i) {\n j = localRandom.next(i + 1); // i inclusive\n t = array[j];\n array[j] = array[i];\n array[i] = t;\n\n callback(t);\n }\n\n if (array.length) {\n callback(array[0]);\n }\n },\n\n /**\n * Shuffles array randomly, in place.\n */\n shuffle : function () {\n var i, j, t;\n for (i = array.length - 1; i > 0; --i) {\n j = localRandom.next(i + 1); // i inclusive\n t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n\n return array;\n }\n };\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport classNames from 'classnames';\nexport default (function (className) {\n return React.forwardRef(function (p, ref) {\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, p, {\n ref: ref,\n className: classNames(p.className, className)\n }));\n });\n});","import ownerWindow from './ownerWindow';\nexport default function getComputedStyle(node, psuedoElement) {\n return ownerWindow(node).getComputedStyle(node, psuedoElement);\n}","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc && doc.defaultView || window;\n}","var rUpper = /([A-Z])/g;\nexport default function hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nimport hyphenate from './hyphenate';\nvar msPattern = /^ms-/;\nexport default function hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}","var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\nexport default function isTransform(value) {\n return !!(value && supportedTransforms.test(value));\n}","import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n var css = '';\n var transforms = '';\n\n if (typeof property === 'string') {\n return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n }\n\n Object.keys(property).forEach(function (key) {\n var value = property[key];\n\n if (!value && value !== 0) {\n node.style.removeProperty(hyphenate(key));\n } else if (isTransform(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += hyphenate(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += \"transform: \" + transforms + \";\";\n }\n\n node.style.cssText += \";\" + css;\n}\n\nexport default style;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar NavbarBrand = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n as = _ref.as,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"as\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-brand');\n var Component = as || (props.href ? 'a' : 'span');\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n ref: ref,\n className: classNames(className, bsPrefix)\n }));\n});\nNavbarBrand.displayName = 'NavbarBrand';\nexport default NavbarBrand;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nvar _collapseStyles;\n\nimport classNames from 'classnames';\nimport css from 'dom-helpers/css';\nimport transitionEnd from 'dom-helpers/transitionEnd';\nimport React, { useMemo } from 'react';\nimport Transition, { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';\nimport createChainedFunction from './createChainedFunction';\nimport triggerBrowserReflow from './triggerBrowserReflow';\nvar MARGINS = {\n height: ['marginTop', 'marginBottom'],\n width: ['marginLeft', 'marginRight']\n};\n\nfunction getDefaultDimensionValue(dimension, elem) {\n var offset = \"offset\" + dimension[0].toUpperCase() + dimension.slice(1);\n var value = elem[offset];\n var margins = MARGINS[dimension];\n return value + // @ts-ignore\n parseInt(css(elem, margins[0]), 10) + // @ts-ignore\n parseInt(css(elem, margins[1]), 10);\n}\n\nvar collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse show', _collapseStyles);\nvar defaultProps = {\n in: false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n getDimensionValue: getDefaultDimensionValue\n};\nvar Collapse = React.forwardRef(function (_ref, ref) {\n var onEnter = _ref.onEnter,\n onEntering = _ref.onEntering,\n onEntered = _ref.onEntered,\n onExit = _ref.onExit,\n onExiting = _ref.onExiting,\n className = _ref.className,\n children = _ref.children,\n _ref$dimension = _ref.dimension,\n dimension = _ref$dimension === void 0 ? 'height' : _ref$dimension,\n _ref$getDimensionValu = _ref.getDimensionValue,\n getDimensionValue = _ref$getDimensionValu === void 0 ? getDefaultDimensionValue : _ref$getDimensionValu,\n props = _objectWithoutPropertiesLoose(_ref, [\"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"className\", \"children\", \"dimension\", \"getDimensionValue\"]);\n\n /* Compute dimension */\n var computedDimension = typeof dimension === 'function' ? dimension() : dimension;\n /* -- Expanding -- */\n\n var handleEnter = useMemo(function () {\n return createChainedFunction(function (elem) {\n elem.style[computedDimension] = '0';\n }, onEnter);\n }, [computedDimension, onEnter]);\n var handleEntering = useMemo(function () {\n return createChainedFunction(function (elem) {\n var scroll = \"scroll\" + computedDimension[0].toUpperCase() + computedDimension.slice(1);\n elem.style[computedDimension] = elem[scroll] + \"px\";\n }, onEntering);\n }, [computedDimension, onEntering]);\n var handleEntered = useMemo(function () {\n return createChainedFunction(function (elem) {\n elem.style[computedDimension] = null;\n }, onEntered);\n }, [computedDimension, onEntered]);\n /* -- Collapsing -- */\n\n var handleExit = useMemo(function () {\n return createChainedFunction(function (elem) {\n elem.style[computedDimension] = getDimensionValue(computedDimension, elem) + \"px\";\n triggerBrowserReflow(elem);\n }, onExit);\n }, [onExit, getDimensionValue, computedDimension]);\n var handleExiting = useMemo(function () {\n return createChainedFunction(function (elem) {\n elem.style[computedDimension] = null;\n }, onExiting);\n }, [computedDimension, onExiting]);\n return /*#__PURE__*/React.createElement(Transition // @ts-ignore\n , _extends({\n ref: ref,\n addEndListener: transitionEnd\n }, props, {\n \"aria-expanded\": props.role ? props.in : null,\n onEnter: handleEnter,\n onEntering: handleEntering,\n onEntered: handleEntered,\n onExit: handleExit,\n onExiting: handleExiting\n }), function (state, innerProps) {\n return React.cloneElement(children, _extends({}, innerProps, {\n className: classNames(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'width')\n }));\n });\n}); // @ts-ignore\n\n// @ts-ignore\nCollapse.defaultProps = defaultProps;\nexport default Collapse;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport Collapse from './Collapse';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nvar NavbarCollapse = React.forwardRef(function (_ref, ref) {\n var children = _ref.children,\n bsPrefix = _ref.bsPrefix,\n props = _objectWithoutPropertiesLoose(_ref, [\"children\", \"bsPrefix\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-collapse');\n return /*#__PURE__*/React.createElement(NavbarContext.Consumer, null, function (context) {\n return /*#__PURE__*/React.createElement(Collapse, _extends({\n in: !!(context && context.expanded)\n }, props), /*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n className: bsPrefix\n }, children));\n });\n});\nNavbarCollapse.displayName = 'NavbarCollapse';\nexport default NavbarCollapse;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nvar defaultProps = {\n label: 'Toggle navigation'\n};\nvar NavbarToggle = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n label = _ref.label,\n _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'button' : _ref$as,\n onClick = _ref.onClick,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"className\", \"children\", \"label\", \"as\", \"onClick\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-toggler');\n\n var _ref2 = useContext(NavbarContext) || {},\n onToggle = _ref2.onToggle,\n expanded = _ref2.expanded;\n\n var handleClick = useEventCallback(function (e) {\n if (onClick) onClick(e);\n if (onToggle) onToggle();\n });\n\n if (Component === 'button') {\n props.type = 'button';\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n ref: ref,\n onClick: handleClick,\n \"aria-label\": label,\n className: classNames(className, bsPrefix, !expanded && 'collapsed')\n }), children || /*#__PURE__*/React.createElement(\"span\", {\n className: bsPrefix + \"-icon\"\n }));\n});\nNavbarToggle.displayName = 'NavbarToggle';\nNavbarToggle.defaultProps = defaultProps;\nexport default NavbarToggle;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React, { useCallback, useMemo } from 'react';\nimport { useUncontrolled } from 'uncontrollable';\nimport createWithBsPrefix from './createWithBsPrefix';\nimport NavbarBrand from './NavbarBrand';\nimport NavbarCollapse from './NavbarCollapse';\nimport NavbarToggle from './NavbarToggle';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport NavbarContext from './NavbarContext';\nimport SelectableContext from './SelectableContext';\nvar NavbarText = createWithBsPrefix('navbar-text', {\n Component: 'span'\n});\nvar defaultProps = {\n expand: true,\n variant: 'light',\n collapseOnSelect: false\n};\nvar Navbar = React.forwardRef(function (props, ref) {\n var _useUncontrolled = useUncontrolled(props, {\n expanded: 'onToggle'\n }),\n initialBsPrefix = _useUncontrolled.bsPrefix,\n expand = _useUncontrolled.expand,\n variant = _useUncontrolled.variant,\n bg = _useUncontrolled.bg,\n fixed = _useUncontrolled.fixed,\n sticky = _useUncontrolled.sticky,\n className = _useUncontrolled.className,\n children = _useUncontrolled.children,\n _useUncontrolled$as = _useUncontrolled.as,\n Component = _useUncontrolled$as === void 0 ? 'nav' : _useUncontrolled$as,\n expanded = _useUncontrolled.expanded,\n _onToggle = _useUncontrolled.onToggle,\n onSelect = _useUncontrolled.onSelect,\n collapseOnSelect = _useUncontrolled.collapseOnSelect,\n controlledProps = _objectWithoutPropertiesLoose(_useUncontrolled, [\"bsPrefix\", \"expand\", \"variant\", \"bg\", \"fixed\", \"sticky\", \"className\", \"children\", \"as\", \"expanded\", \"onToggle\", \"onSelect\", \"collapseOnSelect\"]);\n\n var bsPrefix = useBootstrapPrefix(initialBsPrefix, 'navbar');\n var handleCollapse = useCallback(function () {\n if (onSelect) onSelect.apply(void 0, arguments);\n\n if (collapseOnSelect && expanded) {\n if (_onToggle) {\n _onToggle(false);\n }\n }\n }, [onSelect, collapseOnSelect, expanded, _onToggle]); // will result in some false positives but that seems better\n // than false negatives. strict `undefined` check allows explicit\n // \"nulling\" of the role if the user really doesn't want one\n\n if (controlledProps.role === undefined && Component !== 'nav') {\n controlledProps.role = 'navigation';\n }\n\n var expandClass = bsPrefix + \"-expand\";\n if (typeof expand === 'string') expandClass = expandClass + \"-\" + expand;\n var navbarContext = useMemo(function () {\n return {\n onToggle: function onToggle() {\n return _onToggle && _onToggle(!expanded);\n },\n bsPrefix: bsPrefix,\n expanded: !!expanded\n };\n }, [bsPrefix, expanded, _onToggle]);\n return /*#__PURE__*/React.createElement(NavbarContext.Provider, {\n value: navbarContext\n }, /*#__PURE__*/React.createElement(SelectableContext.Provider, {\n value: handleCollapse\n }, /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, controlledProps, {\n className: classNames(className, bsPrefix, expand && expandClass, variant && bsPrefix + \"-\" + variant, bg && \"bg-\" + bg, sticky && \"sticky-\" + sticky, fixed && \"fixed-\" + fixed)\n }), children)));\n});\nNavbar.defaultProps = defaultProps;\nNavbar.displayName = 'Navbar';\nNavbar.Brand = NavbarBrand;\nNavbar.Toggle = NavbarToggle;\nNavbar.Collapse = NavbarCollapse;\nNavbar.Text = NavbarText;\nexport default Navbar;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar PopoverTitle = React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, [\"as\", \"bsPrefix\", \"className\", \"children\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(bsPrefix, className)\n }), children);\n});\nexport default PopoverTitle;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar PopoverContent = React.forwardRef(function (_ref, ref) {\n var _ref$as = _ref.as,\n Component = _ref$as === void 0 ? 'div' : _ref$as,\n bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, [\"as\", \"bsPrefix\", \"className\", \"children\"]);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref\n }, props, {\n className: classNames(className, bsPrefix)\n }), children);\n});\nexport default PopoverContent;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport PopoverTitle from './PopoverTitle';\nimport PopoverContent from './PopoverContent';\nvar defaultProps = {\n placement: 'right'\n};\nvar Popover = React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n placement = _ref.placement,\n className = _ref.className,\n style = _ref.style,\n children = _ref.children,\n content = _ref.content,\n arrowProps = _ref.arrowProps,\n _ = _ref.popper,\n _1 = _ref.show,\n props = _objectWithoutPropertiesLoose(_ref, [\"bsPrefix\", \"placement\", \"className\", \"style\", \"children\", \"content\", \"arrowProps\", \"popper\", \"show\"]);\n\n var decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');\n\n var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],\n primaryPlacement = _ref2[0];\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n role: \"tooltip\",\n style: style,\n \"x-placement\": primaryPlacement,\n className: classNames(className, decoratedBsPrefix, primaryPlacement && \"bs-popover-\" + primaryPlacement)\n }, props), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: \"arrow\"\n }, arrowProps)), content ? /*#__PURE__*/React.createElement(PopoverContent, null, children) : children);\n});\nPopover.defaultProps = defaultProps;\nPopover.Title = PopoverTitle;\nPopover.Content = PopoverContent;\nexport default Popover;","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = all;\n\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\n\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction all() {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n\n function allPropTypes() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var error = null;\n\n validators.forEach(function (validator) {\n if (error != null) {\n return;\n }\n\n var result = validator.apply(undefined, args);\n if (result != null) {\n error = result;\n }\n });\n\n return error;\n }\n\n return (0, _createChainableTypeChecker2.default)(allPropTypes);\n}\nmodule.exports = exports['default'];","/**\n * @fileOverview Utility functions for webgl rendering.\n *\n * @author Andrei Kashcha (aka anvaka) / https://github.com/anvaka\n */\n\nmodule.exports = webgl;\n\nfunction webgl(gl) {\n\n return {\n createProgram: createProgram,\n extendArray: extendArray,\n copyArrayPart: copyArrayPart,\n swapArrayPart: swapArrayPart,\n getLocations: getLocations,\n context: gl\n };\n\n function createShader(shaderText, type) {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, shaderText);\n gl.compileShader(shader);\n\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var msg = gl.getShaderInfoLog(shader);\n window.alert(msg);\n throw msg;\n }\n\n return shader;\n }\n\n function createProgram(vertexShaderSrc, fragmentShaderSrc) {\n var program = gl.createProgram();\n var vs = createShader(vertexShaderSrc, gl.VERTEX_SHADER);\n var fs = createShader(fragmentShaderSrc, gl.FRAGMENT_SHADER);\n\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var msg = gl.getShaderInfoLog(program);\n window.alert(msg);\n throw msg;\n }\n\n return program;\n }\n\n function extendArray(buffer, itemsInBuffer, elementsPerItem) {\n if ((itemsInBuffer + 1) * elementsPerItem > buffer.length) {\n // Every time we run out of space create new array twice bigger.\n // TODO: it seems buffer size is limited. Consider using multiple arrays for huge graphs\n var extendedArray = new Float32Array(buffer.length * elementsPerItem * 2);\n extendedArray.set(buffer);\n\n return extendedArray;\n }\n\n return buffer;\n }\n\n function getLocations(program, uniformOrAttributeNames) {\n var foundLocations = {};\n for (var i = 0; i < uniformOrAttributeNames.length; ++i) {\n var name = uniformOrAttributeNames[i];\n var location = -1;\n if (name[0] === 'a' && name[1] === '_') {\n location = gl.getAttribLocation(program, name);\n if (location === -1) {\n throw new Error(\"Program doesn't have required attribute: \" + name);\n }\n\n foundLocations[name.slice(2)] = location;\n } else if (name[0] === 'u' && name[1] === '_') {\n location = gl.getUniformLocation(program, name);\n if (location === null) {\n throw new Error(\"Program doesn't have required uniform: \" + name);\n }\n\n foundLocations[name.slice(2)] = location;\n } else {\n throw new Error(\"Couldn't figure out your intent. All uniforms should start with 'u_' prefix, and attributes with 'a_'\");\n }\n }\n\n return foundLocations;\n }\n}\n\nfunction copyArrayPart(array, to, from, elementsCount) {\n for (var i = 0; i < elementsCount; ++i) {\n array[to + i] = array[from + i];\n }\n}\n\nfunction swapArrayPart(array, from, to, elementsCount) {\n for (var i = 0; i < elementsCount; ++i) {\n var tmp = array[from + i];\n array[from + i] = array[to + i];\n array[to + i] = tmp;\n }\n}\n","import React from 'react';\nvar context = React.createContext(null);\ncontext.displayName = 'CardContext';\nexport default context;","import { useMemo } from 'react';\n\nvar toFnRef = function toFnRef(ref) {\n return !ref || typeof ref === 'function' ? ref : function (value) {\n ref.current = value;\n };\n};\n\nexport function mergeRefs(refA, refB) {\n var a = toFnRef(refA);\n var b = toFnRef(refB);\n return function (value) {\n if (a) a(value);\n if (b) b(value);\n };\n}\n/**\n * Create and returns a single callback ref composed from two other Refs.\n *\n * ```tsx\n * const Button = React.forwardRef((props, ref) => {\n * const [element, attachRef] = useCallbackRef();\n * const mergedRef = useMergedRefs(ref, attachRef);\n *\n * return