diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a42d79a..b240ada 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,6 @@ name: ci +env: + commit_msg: "" on: push: branches: @@ -22,7 +24,7 @@ jobs: steps: # Checkout code - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Configure runner environment - name: Set up runner environment @@ -35,7 +37,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.x + go-version: 1.21.x # Get commit message - name: Get commit message @@ -65,7 +67,7 @@ jobs: steps: # Checkout code - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Configure runner environment - name: Set up runner environment @@ -78,7 +80,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.x + go-version: 1.21.x # Get commit message - name: Get commit message @@ -90,9 +92,9 @@ jobs: # Setup buf - name: Setup buf id: buf-setup - uses: bufbuild/buf-setup-action@v1.17.0 + uses: bufbuild/buf-setup-action@v1.29.0 with: - version: 1.17.0 + version: 1.29.0 github_token: ${{ github.token }} # Static analysis @@ -119,14 +121,14 @@ jobs: needs: protos strategy: matrix: - go-version: [1.19.x, 1.20.x] + go-version: [1.19.x, 1.20.x, 1.21.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} timeout-minutes: 15 steps: # Checkout code - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Configure runner environment - name: Set up runner environment @@ -153,7 +155,7 @@ jobs: - name: Static analysis uses: golangci/golangci-lint-action@v3 with: - version: v1.51.2 + version: v1.54.2 # Run unit tests - name: Test diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a310e72..8322396 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -21,7 +21,7 @@ jobs: steps: # Checkout code - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Prepare runner environment - name: Set up runner environment diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ffd414..7626673 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,15 +11,9 @@ jobs: timeout-minutes: 20 if: startsWith(github.ref, 'refs/tags/') steps: - # Go - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: 1.20.x - # Checkout code - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # This is required for the changelog to be properly generated with: fetch-depth: 0 @@ -31,26 +25,20 @@ jobs: GITHUB_USER: ${{ github.actor }} ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - # If "vendor" is in cache, restore. - # To run conditional steps use: - # if: steps.vendor-cache.outputs.cache-hit != 'true' - - name: Restore modules from cache - id: vendor-cache - uses: actions/cache@v3 - env: - cache-name: vendor + # Go + - name: Set up Go + uses: actions/setup-go@v4 with: - path: ./vendor - key: ${{ env.cache-name }}-${{ hashFiles('go.sum') }} + go-version: 1.21.x # Use goreleaser to create the new release # https://github.com/goreleaser/goreleaser-action - name: Create release - uses: goreleaser/goreleaser-action@v4 + uses: goreleaser/goreleaser-action@v5 if: startsWith(github.ref, 'refs/tags/') with: version: latest - args: release --rm-dist --skip-validate + args: release --clean --skip=validate env: # https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/.golangci.yml b/.golangci.yml index 412b05d..a4c69d2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -25,7 +25,6 @@ linters: - typecheck - gocyclo - goconst - - depguard - misspell - lll - nakedret @@ -55,6 +54,7 @@ linters: - deadcode - unused - dupl + - depguard # https://github.com/golangci/golangci-lint/issues/2649 - structcheck - wastedassign diff --git a/.goreleaser.yml b/.goreleaser.yml index ca3d520..4511b9e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -62,10 +62,9 @@ archives: # include documentation files in the package for distribution - README.md - LICENSE* - - src: '*.md' + - src: "*.md" dst: docs strip_parent: true - rlcp: true # generate integrity checksums # https://goreleaser.com/customization/checksum/ checksum: @@ -75,7 +74,6 @@ checksum: # https://goreleaser.com/customization/source/ source: enabled: true - rlcp: true # produce test releases # https://goreleaser.com/customization/snapshots/ snapshot: @@ -83,8 +81,7 @@ snapshot: # build and publish docker images # https://goreleaser.com/customization/docker/ dockers: - - - # Build IDs to gather the binaries from + - # Build IDs to gather the binaries from ids: - did-algo # GOOS of the built binary that should be used @@ -115,8 +112,7 @@ dockers: # linux packages # https://goreleaser.com/customization/nfpm/ nfpms: - - - file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + - file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" builds: - did-algo vendor: Algorand Foundation @@ -140,7 +136,7 @@ nfpms: type: "config|noreplace" changelog: # Sorts the changelog commit messages (asc, desc or '') - sort: '' + sort: "" # Remove certain commit messages from the changelog filters: # Standard commit messages can help to produce better changelogs @@ -153,13 +149,12 @@ changelog: # Produce homebrew formulas for the project artifacts # https://goreleaser.com/customization/homebrew/ brews: - - - # Formula name + - # Formula name name: algoid # Push the formula to the tap repository skip_upload: "true" # TAP repository - tap: + repository: owner: bryk-io name: homebrew-tap # Use 'github-actions' as commit author diff --git a/DRIVER.md b/DRIVER.md index 29b473e..7d0d3bc 100644 --- a/DRIVER.md +++ b/DRIVER.md @@ -6,7 +6,7 @@ and [DID Resolution](https://w3c-ccg.github.io/did-resolution/) specifications. ## Driver Interface -The driver can be invoked via HTTP GET requests of the form call to: +The driver can be invoked via HTTP GET requests of the form: `/1.0/identifiers/did:algo:` @@ -21,60 +21,42 @@ default behavior when no `Accept` header is provided. Request: ```shell -curl -X GET +curl -X GET ``` Response: ```json -HTTP/1.1 200 OK -Connection: keep-alive -Content-Length: 1123 -Content-Type: application/ld+json;profile="https://w3id.org/did-resolution";charset=utf-8 -Date: Sun, 15 Jan 2023 17:39:30 GMT -Strict-Transport-Security: max-age=15724800; includeSubDomains -X-Content-Type-Options: nosniff -X-Resolver-Version: 0.4.0 - { + "@context": [ + "https://w3id.org/did-resolution/v1" + ], + "didDocument": { "@context": [ - "https://w3id.org/did-resolution/v1" + "https://www.w3.org/ns/did/v1", + "https://w3id.org/security/suites/ed25519-2020/v1", + "https://w3id.org/security/suites/x25519-2020/v1" ], - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2020/v1", - "https://w3id.org/security/suites/x25519-2020/v1" - ], - "authentication": [ - "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#master", - "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#key-2" - ], - "id": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82", - "verificationMethod": [ - { - "controller": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82", - "id": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#master", - "publicKeyMultibase": "zCh9PDTZzeWxk2WdH4M1e8k2951D5D11jz7Uti9HRBGiK", - "type": "Ed25519VerificationKey2020" - }, - { - "controller": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82", - "id": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#key-2", - "publicKeyMultibase": "zGrjYfS1jotUQPyNqib75XNpGsS4ZL1MoPaEVF19a4W5h", - "type": "Ed25519VerificationKey2020" - } - ] - }, - "didDocumentMetadata": { - "created": "2022-03-23T19:15:10Z", - "deactivated": false, - "updated": "2022-03-23T20:11:30Z" - }, - "didResolutionMetadata": { - "contentType": "application/ld+json;profile=\"https://w3id.org/did-resolution\"", - "retrieved": "2023-01-15T17:39:30Z" - } + "id": "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170", + "verificationMethod": [ + { + "id": "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170#master", + "type": "Ed25519VerificationKey2020", + "controller": "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170", + "publicKeyMultibase": "z5U83dEzpKaRwaTxJ8iqF6dC58fNpsEfhugDYfVC9ouZ3" + } + ], + "authentication": [ + "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170#master" + ] + }, + "didDocumentMetadata": { + "deactivated": false + }, + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2024-03-01T01:32:42Z" + } } ``` @@ -90,46 +72,30 @@ Request: ```shell curl -X GET \ --header "Accept: application/did+ld+json" \ - + ``` Response: ```json -HTTP/1.1 200 OK -Connection: keep-alive -Content-Length: 806 -Content-Type: application/did+ld+json;charset=utf-8 -Date: Sun, 15 Jan 2023 17:47:11 GMT -Strict-Transport-Security: max-age=15724800; includeSubDomains -X-Content-Type-Options: nosniff -X-Resolver-Version: 0.4.0 - { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2020/v1", - "https://w3id.org/security/suites/x25519-2020/v1" - ], - "authentication": [ - "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#master", - "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#key-2" - ], - "id": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82", - "verificationMethod": [ - { - "controller": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82", - "id": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#master", - "publicKeyMultibase": "zCh9PDTZzeWxk2WdH4M1e8k2951D5D11jz7Uti9HRBGiK", - "type": "Ed25519VerificationKey2020" - }, - { - "controller": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82", - "id": "did:algo:c93fdef1-8a0a-4c65-8c54-fd33117c9e82#key-2", - "publicKeyMultibase": "zGrjYfS1jotUQPyNqib75XNpGsS4ZL1MoPaEVF19a4W5h", - "type": "Ed25519VerificationKey2020" - } - ] + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3id.org/security/suites/ed25519-2020/v1", + "https://w3id.org/security/suites/x25519-2020/v1" + ], + "id": "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170", + "verificationMethod": [ + { + "id": "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170#master", + "type": "Ed25519VerificationKey2020", + "controller": "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170", + "publicKeyMultibase": "z5U83dEzpKaRwaTxJ8iqF6dC58fNpsEfhugDYfVC9ouZ3" + } + ], + "authentication": [ + "did:algo:426165491c77a6c95eeed8d0420b38b0afbe9057c4f33147eb90fafd32aaad22-591154170#master" + ] } ``` @@ -147,30 +113,21 @@ Request: ```shell curl -X GET \ --header "Accept: application/did+cbor" \ - + ``` Response: ```json -HTTP/1.1 406 Not Acceptable -Connection: keep-alive -Content-Length: 187 -Content-Type: application/ld+json;profile="https://w3id.org/did-resolution";charset=utf-8 -Date: Sun, 15 Jan 2023 17:49:49 GMT -Strict-Transport-Security: max-age=15724800; includeSubDomains -X-Content-Type-Options: nosniff -X-Resolver-Version: 0.4.0 - { - "@context": [ - "https://w3id.org/did-resolution/v1" - ], - "didResolutionMetadata": { - "contentType": "application/did+cbor", - "error": "representationNotSupported", - "retrieved": "2023-01-15T17:49:49Z" - } + "@context": [ + "https://w3id.org/did-resolution/v1" + ], + "didResolutionMetadata": { + "contentType": "application/did+cbor", + "retrieved": "2024-03-01T01:39:03Z", + "error": "representationNotSupported" + } } ``` diff --git a/Dockerfile b/Dockerfile index 2aa3620..0e9933a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/bryk-io/shell:0.2.0 +FROM zhield/shell:stable EXPOSE 9090/tcp diff --git a/Dockerfile.resolver b/Dockerfile.resolver new file mode 100644 index 0000000..14f880b --- /dev/null +++ b/Dockerfile.resolver @@ -0,0 +1,9 @@ +FROM zhield/shell:stable + +EXPOSE 9091/tcp + +COPY algoid /usr/bin/algoid + +COPY resolver-config.yaml /etc/algoid/config.yaml + +ENTRYPOINT ["/usr/bin/algoid", "resolver"] diff --git a/Makefile b/Makefile index aee86a7..905be2b 100644 --- a/Makefile +++ b/Makefile @@ -25,11 +25,11 @@ LD_FLAGS += -X $(PROJECT_REPO)/info.BuildTimestamp=$(GIT_COMMIT_DATE) # subdirectories if no value is provided. pkg?="..." -# "buf" is used to manage protocol buffer definitions, either -# locally (on a dev container) or using a builder image. +# "buf" is used to manage protocol buffer definitions, if not installed +# locally we fallback to use a builder image. buf:=buf -ifndef REMOTE_CONTAINERS_SOCKETS - buf=docker run --platform linux/amd64 --rm -it -v $(shell pwd):/workdir ghcr.io/bryk-io/buf-builder:1.17.0 buf +ifeq (, $(shell which buf)) + buf=docker run --platform linux/amd64 --rm -it -v $(shell pwd):/workdir ghcr.io/bryk-io/buf-builder:1.29.0 buf endif help: @@ -80,11 +80,19 @@ docker: "--label=org.opencontainers.image.revision=$(GIT_COMMIT_HASH)" \ "--label=org.opencontainers.image.version=$(GIT_TAG:v%=%)" \ --rm -t $(DOCKER_IMAGE):$(GIT_TAG:v%=%) . + @docker build \ + "--label=org.opencontainers.image.title=$(BINARY_NAME)-resolver" \ + "--label=org.opencontainers.image.authors=$(MAINTAINERS)" \ + "--label=org.opencontainers.image.created=$(GIT_COMMIT_DATE)" \ + "--label=org.opencontainers.image.revision=$(GIT_COMMIT_HASH)" \ + "--label=org.opencontainers.image.version=$(GIT_TAG:v%=%)" \ + --rm -f Dockerfile.resolver -t $(DOCKER_IMAGE)-resolver:$(GIT_TAG:v%=%) . @rm $(BINARY_NAME) ## install: Install the binary to GOPATH and keep cached all compiled artifacts install: - @go build -v -ldflags '$(LD_FLAGS)' -i -o ${GOPATH}/bin/$(BINARY_NAME) ./client/cli + @go build -v -ldflags '$(LD_FLAGS)' -o ${GOPATH}/bin/$(BINARY_NAME) ./client/cli + mv ${BINARY_NAME} ${GOBIN}/. ## lint: Static analysis lint: diff --git a/agent/doc.go b/agent/doc.go deleted file mode 100644 index d195dd4..0000000 --- a/agent/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package agent provides a reference implementation for a DID network management process. -*/ -package agent diff --git a/agent/handler.go b/agent/handler.go deleted file mode 100644 index 4e62f66..0000000 --- a/agent/handler.go +++ /dev/null @@ -1,313 +0,0 @@ -package agent - -import ( - "context" - "crypto/sha256" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "net/http" - "strings" - "time" - - "github.com/algorand/go-algorand-sdk/client/v2/algod" - "github.com/algorand/go-algorand-sdk/client/v2/indexer" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "go.bryk.io/pkg/did" - "go.bryk.io/pkg/did/resolver" - "go.bryk.io/pkg/log" - "go.bryk.io/pkg/net/rpc" - "google.golang.org/grpc" -) - -// Handler provides the required functionality for the DID method. -type Handler struct { - methods []string - store Storage - log log.Logger - difficulty uint - algoNode *algod.Client - algoIndexer *indexer.Client -} - -// HandlerOptions defines the settings available to adjust the -// operation of a handler instance. -type HandlerOptions struct { - // Supported DID methods. - Methods []string - - // PoW difficulty level required for valid transactions. - Difficulty uint - - // Storage mechanism to be used for persistent state. - Store Storage - - // Log sink. - Logger log.Logger - - // Algorand node client. - AlgoNode *algod.Client - - // Algorand indexer client. - AlgoIndexer *indexer.Client -} - -// NewHandler starts a new DID method handler instance. -func NewHandler(options HandlerOptions) (*Handler, error) { - return &Handler{ - log: options.Logger, - store: options.Store, - methods: options.Methods, - difficulty: options.Difficulty, - algoNode: options.AlgoNode, - algoIndexer: options.AlgoIndexer, - }, nil -} - -// Close the instance and safely terminate any internal processing. -func (h *Handler) Close() error { - h.log.Info("closing agent handler") - return h.store.Close() -} - -// Retrieve an existing DID instance based on its subject string. -func (h *Handler) Retrieve(req *protoV1.QueryRequest) (*did.Identifier, *did.ProofLD, error) { - logFields := log.Fields{ - "method": req.Method, - "subject": req.Subject, - } - h.log.WithFields(logFields).Debug("retrieve request") - - // Verify method is supported - if !h.isSupported(req.Method) { - h.log.WithFields(logFields).Warning("non supported method") - return nil, nil, errors.New(resolver.ErrMethodNotSupported) - } - - // Retrieve document from storage - id, proof, err := h.store.Get(req) - if err != nil { - h.log.WithFields(logFields).Warning(err.Error()) - return nil, nil, errors.New(resolver.ErrNotFound) - } - return id, proof, nil -} - -// Process an incoming request ticket. -func (h *Handler) Process(req *protoV1.ProcessRequest) (string, error) { - // Empty request - if req == nil { - return "", errors.New("empty request") - } - - // Validate ticket - if err := req.Ticket.Verify(h.difficulty); err != nil { - h.log.WithFields(log.Fields{"error": err.Error()}).Error("invalid ticket") - return "", err - } - - // Load DID document and proof - id, err := req.Ticket.GetDID() - if err != nil { - h.log.WithFields(log.Fields{"error": err.Error()}).Error("invalid DID contents") - return "", err - } - proof, err := req.Ticket.GetProofLD() - if err != nil { - h.log.WithFields(log.Fields{"error": err.Error()}).Error("invalid DID proof") - return "", err - } - - // Verify method is supported - if !h.isSupported(id.Method()) { - h.log.WithFields(log.Fields{"method": id.Method()}).Warning("non supported method") - return "", errors.New("non supported method") - } - - // Update operations require another validation step using the original record - isUpdate := h.store.Exists(id) - if isUpdate { - if err := req.Ticket.Verify(h.difficulty); err != nil { - h.log.WithFields(log.Fields{"error": err.Error()}).Error("invalid ticket") - return "", err - } - } - - // Store record - h.log.WithFields(log.Fields{ - "subject": id.Subject(), - "update": isUpdate, - "task": req.Task, - }).Debug("write operation") - return h.store.Save(id, proof) -} - -// AccountInformation returns details about the crypto account specified. -func (h *Handler) AccountInformation(ctx context.Context, req *protoV1.AccountInformationRequest) (*protoV1.AccountInformationResponse, error) { // nolint: lll - ai, err := h.algoNode.AccountInformation(req.Address).Do(ctx) - if err != nil { - h.log.WithFields(log.Fields{ - "error": err.Error(), - "address": req.Address, - }).Error("failed to get account information") - return nil, err - } - _, ptList, err := h.algoNode.PendingTransactionsByAddress(req.Address).Do(ctx) - if err != nil { - h.log.WithFields(log.Fields{ - "error": err.Error(), - "address": req.Address, - }).Error("failed to get pending transactions") - return nil, err - } - resp := &protoV1.AccountInformationResponse{ - Status: ai.Status, - Balance: ai.AmountWithoutPendingRewards, - TotalRewards: ai.Rewards, - PendingRewards: ai.PendingRewards, - PendingTransactions: []*protoV1.AlgoTransaction{}, - } - for _, pt := range ptList { - resp.PendingTransactions = append(resp.PendingTransactions, &protoV1.AlgoTransaction{ - Amount: uint64(pt.Txn.Amount), - Receiver: pt.Txn.Receiver.String(), - Note: pt.Txn.Note, - }) - } - return resp, nil -} - -// AccountActivity opens a channel to monitor near real-time account activity. -// The channel must be closed using the provided context when no longer needed. -func (h *Handler) AccountActivity(ctx context.Context, req *protoV1.AccountActivityRequest) (<-chan *protoV1.AccountActivityResponse, error) { // nolint: lll - check := time.NewTicker(time.Duration(5) * time.Second) - sink := make(chan *protoV1.AccountActivityResponse) - go func() { - for { - select { - case <-ctx.Done(): - // Close channel, monitor and processing routine - close(sink) - check.Stop() - return - case <-check.C: - query := h.algoIndexer.LookupAccountTransactions(req.Address) - resp, err := query.Do(ctx) - if err != nil { - h.log.WithFields(log.Fields{ - "error": err.Error(), - "address": req.Address, - }).Error("failed to get account activity") - } else { - sink <- &protoV1.AccountActivityResponse{ - CurrentRound: resp.CurrentRound, - NextToken: resp.NextToken, - } - } - } - } - }() - return sink, nil -} - -// TxParameters return the latest network parameters suggested for processing -// new transactions. -func (h *Handler) TxParameters(ctx context.Context) (*protoV1.TxParametersResponse, error) { - params, err := h.algoNode.SuggestedParams().Do(ctx) - if err != nil { - h.log.WithFields(log.Fields{ - "error": err.Error(), - }).Error("failed to get transaction parameters") - return nil, err - } - data, err := json.Marshal(params) - if err != nil { - h.log.WithFields(log.Fields{ - "error": err.Error(), - }).Error("failed to encode transaction parameters") - return nil, err - } - return &protoV1.TxParametersResponse{Params: data}, nil -} - -// TxSubmit will send a signed raw transaction to the network for processing. -func (h *Handler) TxSubmit(ctx context.Context, req *protoV1.TxSubmitRequest) (*protoV1.TxSubmitResponse, error) { - tid, err := h.algoNode.SendRawTransaction(req.Stx).Do(ctx) - if err != nil { - h.log.WithFields(log.Fields{ - "error": err.Error(), - "tx": base64.StdEncoding.EncodeToString(req.Stx), - }).Error("failed to submit raw transaction") - return nil, err - } - return &protoV1.TxSubmitResponse{Id: tid}, nil -} - -// ServerSetup performs all initialization requirements for the -// handler instance to be exposed through the provided gRPC server. -func (h *Handler) ServerSetup(server *grpc.Server) { - protoV1.RegisterAgentAPIServer(server, &rpcHandler{handler: h}) -} - -// ServiceDesc returns the standard service description for `AgentAPI`. -func (h *Handler) ServiceDesc() grpc.ServiceDesc { - return protoV1.AgentAPI_ServiceDesc -} - -// GatewaySetup return the HTTP setup method to allow exposing the -// handler's functionality through an HTTP gateway. -func (h *Handler) GatewaySetup() rpc.GatewayRegisterFunc { - return protoV1.RegisterAgentAPIHandler -} - -// QueryResponseFilter provides custom encoding of HTTP query results. -func (h *Handler) QueryResponseFilter() rpc.GatewayInterceptor { - return func(res http.ResponseWriter, req *http.Request) error { - // Filter query requests - if !strings.HasPrefix(req.URL.Path, "/v1/retrieve/") { - return nil - } - seg := strings.Split(strings.TrimPrefix(req.URL.Path, "/v1/retrieve/"), "/") - if len(seg) != 2 { - return nil - } - - // Submit query - var ( - status = http.StatusNotFound - response []byte - ) - rr := &protoV1.QueryRequest{ - Method: seg[0], - Subject: seg[1], - } - id, proof, err := h.Retrieve(rr) - if err != nil { - response, _ = json.MarshalIndent(map[string]string{"error": err.Error()}, "", " ") - } else { - response, _ = json.MarshalIndent(map[string]interface{}{ - "document": id.Document(true), - "proof": proof, - "metadata": id.GetMetadata(), - }, "", " ") - status = http.StatusOK - res.Header().Set("Etag", fmt.Sprintf("W/%x", sha256.Sum256(response))) - } - - // Return result - res.WriteHeader(status) - _, _ = res.Write(response) - return errors.New("prevent further processing") - } -} - -// Verify a specific method is supported. -func (h *Handler) isSupported(method string) bool { - for _, m := range h.methods { - if method == m { - return true - } - } - return false -} diff --git a/agent/rpc.go b/agent/rpc.go deleted file mode 100644 index 9205143..0000000 --- a/agent/rpc.go +++ /dev/null @@ -1,98 +0,0 @@ -package agent - -import ( - "context" - "encoding/json" - - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - otelApi "go.bryk.io/pkg/otel/api" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/emptypb" -) - -// Wrapper to enable RPC access to an underlying method handler instance. -type rpcHandler struct { - protoV1.UnimplementedAgentAPIServer - handler *Handler -} - -func (rh *rpcHandler) Ping(ctx context.Context, _ *emptypb.Empty) (*protoV1.PingResponse, error) { - return &protoV1.PingResponse{Ok: true}, nil -} - -func (rh *rpcHandler) Process(ctx context.Context, req *protoV1.ProcessRequest) (res *protoV1.ProcessResponse, err error) { // nolint: lll - // Track operation - sp := otelApi.Start(ctx, "Process", otelApi.WithSpanKind(otelApi.SpanKindServer)) - defer sp.End(nil) - - // Process and return response - res.Identifier, err = rh.handler.Process(req) - res.Ok = err == nil - if err != nil { - sp.End(err) - err = status.Error(codes.InvalidArgument, err.Error()) - } - return -} - -func (rh *rpcHandler) Query(ctx context.Context, req *protoV1.QueryRequest) (res *protoV1.QueryResponse, err error) { // nolint: lll - // Track operation - sp := otelApi.Start(ctx, "Query", otelApi.WithSpanKind(otelApi.SpanKindServer)) - defer sp.End(nil) - - // Process and return response - id, proof, err := rh.handler.Retrieve(req) - if err != nil { - sp.End(err) - err = status.Error(codes.NotFound, err.Error()) - return - } - res.Proof, _ = json.Marshal(proof) - res.Document, _ = json.Marshal(id.Document(true)) - res.DocumentMetadata, _ = json.Marshal(id.GetMetadata()) - return -} - -func (rh *rpcHandler) TxParameters(ctx context.Context, _ *emptypb.Empty) (res *protoV1.TxParametersResponse, err error) { // nolint: lll - sp := otelApi.Start(ctx, "TxParameters", otelApi.WithSpanKind(otelApi.SpanKindServer)) - res, err = rh.handler.TxParameters(ctx) - sp.End(err) - return res, err -} - -func (rh *rpcHandler) TxSubmit(ctx context.Context, req *protoV1.TxSubmitRequest) (res *protoV1.TxSubmitResponse, err error) { // nolint: lll - sp := otelApi.Start(ctx, "TxSubmit", otelApi.WithSpanKind(otelApi.SpanKindServer)) - res, err = rh.handler.TxSubmit(ctx, req) - sp.End(err) - return res, err -} - -func (rh *rpcHandler) AccountInformation(ctx context.Context, req *protoV1.AccountInformationRequest) (res *protoV1.AccountInformationResponse, err error) { // nolint: lll - sp := otelApi.Start(ctx, "AccountInformation", otelApi.WithSpanKind(otelApi.SpanKindServer)) - res, err = rh.handler.AccountInformation(ctx, req) - sp.End(err) - return res, err -} - -func (rh *rpcHandler) AccountActivity(req *protoV1.AccountActivityRequest, stream protoV1.AgentAPI_AccountActivityServer) error { // nolint: lll - // Track operation - sp := otelApi.Start(stream.Context(), "AccountActivity", otelApi.WithSpanKind(otelApi.SpanKindServer)) - defer sp.End(nil) - - // Open account monitor - monitor, err := rh.handler.AccountActivity(stream.Context(), req) - if err != nil { - sp.End(err) - return err - } - - // Stream account activity - for record := range monitor { - if err = stream.Send(record); err != nil { - sp.End(err) - return err - } - } - return nil -} diff --git a/agent/storage.go b/agent/storage.go deleted file mode 100644 index f2dda0d..0000000 --- a/agent/storage.go +++ /dev/null @@ -1,31 +0,0 @@ -package agent - -import ( - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "go.bryk.io/pkg/did" -) - -// Storage defines an abstract component that provides and manage -// persistent data requirements for DID documents. -type Storage interface { - // Setup the instance and prepare for usage. - Open(info string) error - - // Free resources and finish processing. - Close() error - - // Returns a brief information summary for the storage instance. - Description() string - - // Check if a record exists for the specified DID. - Exists(id *did.Identifier) bool - - // Return a previously stored DID instance. - Get(req *protoV1.QueryRequest) (*did.Identifier, *did.ProofLD, error) - - // Create or update the record for the given DID instance. - Save(id *did.Identifier, proof *did.ProofLD) (string, error) - - // Remove any existing records for the given DID instance. - Delete(id *did.Identifier) error -} diff --git a/agent/storage/doc.go b/agent/storage/doc.go deleted file mode 100644 index 795c235..0000000 --- a/agent/storage/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package storage includes sample implementations of different store mechanisms. -*/ -package storage diff --git a/agent/storage/ephemeral.go b/agent/storage/ephemeral.go deleted file mode 100644 index 2f9c4be..0000000 --- a/agent/storage/ephemeral.go +++ /dev/null @@ -1,87 +0,0 @@ -package storage - -import ( - "fmt" - "sync" - - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "github.com/pkg/errors" - "go.bryk.io/pkg/did" -) - -type record struct { - id *did.Identifier - proof *did.ProofLD -} - -// Ephemeral provides an in-memory store for development and testing. -type Ephemeral struct { - entries map[string]*record - mu sync.Mutex -} - -// Open is a no-op for the ephemeral store. As an example just setup -// internally used structures. -func (e *Ephemeral) Open(_ string) error { - e.entries = make(map[string]*record) - return nil -} - -// Close will release used-memory. -func (e *Ephemeral) Close() error { - e.mu.Lock() - for k := range e.entries { - delete(e.entries, k) - } - e.mu.Unlock() - e.entries = nil - return nil -} - -// Exists returns true if the provided DID instance is already available -// in the store. -func (e *Ephemeral) Exists(id *did.Identifier) bool { - key := fmt.Sprintf("%s:%s", id.Method(), id.Subject()) - e.mu.Lock() - _, ok := e.entries[key] - e.mu.Unlock() - return ok -} - -// Get a previously stored DID instance. -func (e *Ephemeral) Get(req *protoV1.QueryRequest) (*did.Identifier, *did.ProofLD, error) { - key := fmt.Sprintf("%s:%s", req.Method, req.Subject) - e.mu.Lock() - r, ok := e.entries[key] - e.mu.Unlock() - if !ok { - return nil, nil, errors.New("no information available") - } - return r.id, r.proof, nil -} - -// Save will create or update an entry for the provided DID instance. -func (e *Ephemeral) Save(id *did.Identifier, proof *did.ProofLD) (string, error) { - key := fmt.Sprintf("%s:%s", id.Method(), id.Subject()) - e.mu.Lock() - e.entries[key] = &record{ - id: id, - proof: proof, - } - e.mu.Unlock() - return "", nil -} - -// Delete any existing record for the provided DID instance. -func (e *Ephemeral) Delete(id *did.Identifier) error { - key := fmt.Sprintf("%s:%s", id.Method(), id.Subject()) - e.mu.Lock() - delete(e.entries, key) - e.mu.Unlock() - return nil -} - -// Description returns a brief summary for the storage instance. -func (e *Ephemeral) Description() string { - return "ephemeral in-memory data store" -} diff --git a/agent/storage/ipfs.go b/agent/storage/ipfs.go deleted file mode 100644 index 1cdbbca..0000000 --- a/agent/storage/ipfs.go +++ /dev/null @@ -1,270 +0,0 @@ -package storage - -import ( - "bufio" - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "strings" - "time" - - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - ipfs "github.com/ipfs/go-ipfs-api" - "go.bryk.io/pkg/did" -) - -// Default DNS link used for the did-algo index. -const indexDNSLink = "did-algo.aidtech.network" - -// IPFS provides an integration with the "InterPlanetary File System", -// a decentralized global storage mechanism. -type IPFS struct { - cl *ipfs.Shell - addr string - index string -} - -// Open a connection with provided IPFS daemon instance. -func (c *IPFS) Open(addr string) error { - sh := ipfs.NewShell(addr) - if _, _, err := sh.Version(); err != nil { - return fmt.Errorf("failed to connect to IPFS server: %w", err) - } - c.cl = sh - c.cl.SetTimeout(time.Duration(5) * time.Second) - c.addr = addr - return nil -} - -// Close the storage instance and free any resources in use. -func (c *IPFS) Close() error { - return nil -} - -// Description of the storage instance. -func (c *IPFS) Description() string { - return fmt.Sprintf("IPFS data store [%s]", c.addr) -} - -// Exists will check if a record exists for the specified DID. -func (c *IPFS) Exists(id *did.Identifier) bool { - return c.existsInIndex(id.Subject()) -} - -// Get a previously stored DID instance. -func (c *IPFS) Get(req *protoV1.QueryRequest) (*did.Identifier, *did.ProofLD, error) { - // Get CID from index - cid := c.getIndexEntry(req.Subject) - if cid == "" { - return nil, nil, errors.New("no details for the requested DID") - } - - // Read entry contents - ptr, err := c.cl.Cat(cid) - if err != nil { - return nil, nil, fmt.Errorf("failed to read record from IPFS: %w", err) - } - contents, err := io.ReadAll(ptr) - if err != nil { - return nil, nil, fmt.Errorf("failed to read record from IPFS: %w", err) - } - - // Decode contents - dec := map[string]interface{}{} - if err = json.Unmarshal(contents, &dec); err != nil { - return nil, nil, fmt.Errorf("failed to decode record from IPFS: %w", err) - } - if _, ok := dec["document"]; !ok { - return nil, nil, errors.New("invalid record contents, missing 'document'") - } - if _, ok := dec["proof"]; !ok { - return nil, nil, errors.New("invalid record contents, missing 'proof'") - } - - // Restore DID document - doc := &did.Document{} - docData, _ := json.Marshal(dec["document"]) - if err = json.Unmarshal(docData, doc); err != nil { - return nil, nil, errors.New("invalid record contents on 'document'") - } - id, err := did.FromDocument(doc) - if err != nil { - return nil, nil, err - } - - // Restore proof - proof := &did.ProofLD{} - proofData, _ := json.Marshal(dec["proof"]) - if err = json.Unmarshal(proofData, proof); err != nil { - return nil, nil, errors.New("invalid record contents on 'proof'") - } - - if _, ok := dec["metadata"]; ok { - metadata := &did.DocumentMetadata{} - metadataData, _ := json.Marshal(dec["metadata"]) - if err = json.Unmarshal(metadataData, metadata); err != nil { - return nil, nil, errors.New("invalid record contents on 'metadata'") - } - if err := id.AddMetadata(metadata); err != nil { - return nil, nil, err - } - } - - // Return final results - return id, proof, nil -} - -// Save the record for the given DID instance. -func (c *IPFS) Save(id *did.Identifier, proof *did.ProofLD) (string, error) { - // Record to be stored on IPFS include the DID document and - // its cryptographic proof for verification - record := map[string]interface{}{ - "document": id.Document(true), - "proof": proof, - "metadata": id.GetMetadata(), - } - data, err := json.Marshal(record) - if err != nil { - return "", err - } - - // Store on IPFS using CID v1 - opts := []ipfs.AddOpts{ - ipfs.CidVersion(1), - ipfs.Pin(true), - } - cid, err := c.cl.Add(bytes.NewReader(data), opts...) - if err != nil { - return "", err - } - - // Create entry index for subject / CID. This will be used - // when resolving the DID. - return "/ipfs/" + cid, c.updateIndex(id.Subject(), cid) -} - -// Delete any existing records for the given DID instance. -func (c *IPFS) Delete(_ *did.Identifier) error { - return errors.New("IPFS entries cannot be removed") -} - -func (c *IPFS) updateIndex(subject, cid string) (err error) { - // Get index handler - index, err := c.getIndexHandler() - if err != nil { - return fmt.Errorf("failed to open index handler: %w", err) - } - defer func() { - _ = index.Close() - }() - - // Load index contents - var line string - list := map[string]string{} - scanner := bufio.NewScanner(index) - for scanner.Scan() { - line = scanner.Text() - if strings.HasPrefix(line, "#") { - continue - } - segs := strings.Split(line, " ") - list[segs[0]] = segs[1] - } - - // Add new entry and save new index contents - list[subject] = cid - contents := bytes.NewBuffer(nil) - for subject, cid := range list { - contents.WriteString(fmt.Sprintf("%s %s\n", subject, cid)) - } - - // Update index contents - indexCID, err := c.cl.Add(contents, ipfs.CidVersion(1), ipfs.Pin(true)) - if err != nil { - return fmt.Errorf("failed to update index contents: %w", err) - } - - // Update index IPNS record (async) - go func() { - defer c.cl.SetTimeout(time.Duration(5) * time.Second) - c.cl.SetTimeout(time.Duration(120) * time.Second) - _, err := c.cl.PublishWithDetails(indexCID, "", 0, time.Duration(0), false) - if err != nil { - fmt.Printf("publish error: %s", err) - } - - // Update agent's index handler - if c.index, err = c.cl.Resolve(indexDNSLink); err != nil { - fmt.Printf("update index error: %s", err) - } - }() - return nil -} - -func (c *IPFS) existsInIndex(subject string) bool { - // Get index handler - index, err := c.getIndexHandler() - if err != nil { - return false - } - defer func() { - _ = index.Close() - }() - - // Perform lookup operation - var line string - result := false - scanner := bufio.NewScanner(index) - for scanner.Scan() { - line = scanner.Text() - if strings.HasPrefix(line, "#") { - continue - } - if strings.Split(line, " ")[0] == subject { - result = true - break - } - } - return result -} - -func (c *IPFS) getIndexEntry(subject string) string { - // Get index handler - index, err := c.getIndexHandler() - if err != nil { - return "" - } - defer func() { - _ = index.Close() - }() - - // Perform lookup operation - var line string - scanner := bufio.NewScanner(index) - for scanner.Scan() { - line = scanner.Text() - if strings.HasPrefix(line, "#") { - continue - } - if segs := strings.Split(line, " "); segs[0] == subject { - if len(segs) != 2 { - return "" - } - return segs[1] - } - } - return "" -} - -func (c *IPFS) getIndexHandler() (io.ReadCloser, error) { - if c.index == "" { - var err error - c.index, err = c.cl.Resolve(indexDNSLink) - if err != nil { - return nil, fmt.Errorf("failed to resolve index entry: %w", err) - } - } - return c.cl.Cat(c.index) -} diff --git a/agent/storage/mongo.go b/agent/storage/mongo.go deleted file mode 100644 index 5f1cc6d..0000000 --- a/agent/storage/mongo.go +++ /dev/null @@ -1,166 +0,0 @@ -package storage - -import ( - "context" - "encoding/base64" - "encoding/json" - - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "github.com/pkg/errors" - "go.bryk.io/pkg/did" - "go.bryk.io/pkg/storage/orm" - "go.mongodb.org/mongo-driver/mongo/options" -) - -// Base64 encoding used. -var b64 = base64.RawStdEncoding - -// Data structure to store DID entries. -type identifierRecord struct { - // DID method. - Method string `bson:"method"` - - // DID subject. - Subject string `bson:"subject"` - - // DID document. - Document string `bson:"document"` - - // DID proof. - Proof string `bson:"proof"` - - // DID Document metadata. - Metadata string `bson:"metadata"` -} - -func (ir *identifierRecord) decode() (*did.Identifier, *did.ProofLD, error) { - d1, err := b64.DecodeString(ir.Document) - if err != nil { - return nil, nil, errors.New("invalid record contents") - } - d2, err := b64.DecodeString(ir.Proof) - if err != nil { - return nil, nil, errors.New("invalid record contents") - } - - // Restore DID document - doc := &did.Document{} - if err = json.Unmarshal(d1, doc); err != nil { - return nil, nil, errors.New("invalid record contents") - } - id, err := did.FromDocument(doc) - if err != nil { - return nil, nil, err - } - - // Restore DID metadata - if ir.Metadata != "" { - d3, err := b64.DecodeString(ir.Metadata) - if err != nil { - return nil, nil, errors.New("invalid record contents") - } - metadata := &did.DocumentMetadata{} - if err := json.Unmarshal(d3, metadata); err != nil { - return nil, nil, errors.New("invalid record contents") - } - if err := id.AddMetadata(metadata); err != nil { - return nil, nil, err - } - } - - // Restore proof - proof := &did.ProofLD{} - if err = json.Unmarshal(d2, proof); err != nil { - return nil, nil, errors.New("invalid record contents") - } - return id, proof, nil -} - -func (ir *identifierRecord) encode(id *did.Identifier, proof *did.ProofLD) { - data, _ := json.Marshal(id.Document(true)) - pp, _ := json.Marshal(proof) - metadata, _ := json.Marshal(id.GetMetadata()) - ir.Method = id.Method() - ir.Subject = id.Subject() - ir.Document = b64.EncodeToString(data) - ir.Proof = b64.EncodeToString(pp) - ir.Metadata = b64.EncodeToString(metadata) -} - -// MongoStore provides a storage handler utilizing MongoDB as underlying -// database. -type MongoStore struct { - op *orm.Operator - did *orm.Model -} - -// Open establish the connection and database selection for the instance. -// Must be called before any further operations. 'info' must be a valid -// connection string of the form "mongodb://..."; -// for example: "mongodb://localhost:27017" -func (ms *MongoStore) Open(info string) error { - var err error - opts := options.Client() - opts.ApplyURI(info) - ms.op, err = orm.NewOperator("algoid", opts) - if err != nil { - return err - } - ms.did = ms.op.Model("identifiers") - return err -} - -// Close the client connection with the backend server. -func (ms *MongoStore) Close() error { - return ms.op.Close(context.TODO()) -} - -// Exists returns true if the provided DID instance is already available -// in the store. -func (ms *MongoStore) Exists(id *did.Identifier) bool { - n, _ := ms.did.Count(filter(id)) - return n > 0 -} - -// Get a previously stored DID instance. -func (ms *MongoStore) Get(req *protoV1.QueryRequest) (*did.Identifier, *did.ProofLD, error) { - // Run query - rec := new(identifierRecord) - filter := orm.Filter() - filter["method"] = req.Method - filter["subject"] = req.Subject - if err := ms.did.First(filter, rec); err != nil { - return nil, nil, errors.New("no information available") - } - - // Decode result - return rec.decode() -} - -// Save will create or update an entry for the provided DID instance. -func (ms *MongoStore) Save(id *did.Identifier, proof *did.ProofLD) (string, error) { - // Record - rec := new(identifierRecord) - rec.encode(id, proof) - - // Run upsert operation - return "", ms.did.Update(filter(id), rec, true) -} - -// Delete any existing record for the provided DID instance. -func (ms *MongoStore) Delete(id *did.Identifier) error { - return ms.did.Delete(filter(id)) -} - -// Description returns a brief summary for the storage instance. -func (ms *MongoStore) Description() string { - return "MongoDB data store" -} - -// Helper method to produce a selector from a DID instance. -func filter(id *did.Identifier) map[string]interface{} { - filter := orm.Filter() - filter["method"] = id.Method() - filter["subject"] = id.Subject() - return filter -} diff --git a/buf.gen.yaml b/buf.gen.yaml index 46b70d3..d1afbfe 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -5,26 +5,43 @@ managed: optimize_for: SPEED cc_enable_arenas: false java_multiple_files: true + go_package_prefix: + # same value as `module` in go.mod + default: github.com/algorandfoundation/did-algo + # don't build/rewrite import paths for external dependencies + except: + - buf.build/googleapis/googleapis + - buf.build/bufbuild/protovalidate + - buf.build/grpc-ecosystem/grpc-gateway # For each plugin: +# - plugin: buf will look for a remote plugin # - name: buf generate will look for a binary named protoc-gen-NAME # - out: path relative to the output directory # - opt: options to provide to the plugin plugins: - - name: go + - plugin: buf.build/protocolbuffers/go:v1.32.0 out: . opt: - paths=source_relative - - name: go-grpc + - plugin: buf.build/grpc/go:v1.3.0 out: . opt: - paths=source_relative - require_unimplemented_servers=true - - name: grpc-gateway + - plugin: buf.build/grpc-ecosystem/openapiv2:v2.19.1 out: . opt: - - paths=source_relative - logtostderr=true - - name: openapiv2 + - plugin: buf.build/grpc-ecosystem/gateway:v2.19.1 out: . opt: + - paths=source_relative - logtostderr=true + # - plugin: buf.build/bufbuild/validate-go:v1.0.4 + # out: . + # opt: + # - paths=source_relative + # - name: go-drpc + # out: . + # opt: + # - paths=source_relative diff --git a/client/cli/cmd/agent.go b/client/cli/cmd/agent.go deleted file mode 100644 index 5b835e2..0000000 --- a/client/cli/cmd/agent.go +++ /dev/null @@ -1,305 +0,0 @@ -package cmd - -import ( - "errors" - "fmt" - "os" - "syscall" - - "github.com/algorandfoundation/did-algo/agent" - "github.com/algorandfoundation/did-algo/agent/storage" - "github.com/algorandfoundation/did-algo/info" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.bryk.io/pkg/cli" - mwHeaders "go.bryk.io/pkg/net/middleware/headers" - mwProxy "go.bryk.io/pkg/net/middleware/proxy" - "go.bryk.io/pkg/net/rpc" -) - -var agentCmd = &cobra.Command{ - Use: "agent", - Short: "Start a network agent supporting the DID method requirements", - Example: "algoid agent --port 8080", - Aliases: []string{"server", "node"}, - RunE: runMethodServer, -} - -func init() { - params := []cli.Param{ - { - Name: "port", - Usage: "TCP port to use for the server", - FlagKey: "agent.port", - ByDefault: 9090, - Short: "p", - }, - { - Name: "pow", - Usage: "set the required request ticket difficulty level", - FlagKey: "agent.pow", - ByDefault: 24, - }, - { - Name: "proxy-protocol", - Usage: "enable support for PROXY protocol", - FlagKey: "agent.proxy_protocol", - ByDefault: false, - Short: "P", - }, - { - Name: "http", - Usage: "enable the HTTP interface", - FlagKey: "agent.http", - ByDefault: false, - }, - { - Name: "env", - Usage: "agent environment identifier", - FlagKey: "agent.env", - ByDefault: "dev", - Short: "e", - }, - { - Name: "tls", - Usage: "enable secure communications using TLS with provided credentials", - FlagKey: "agent.tls.enabled", - ByDefault: false, - }, - { - Name: "tls-ca", - Usage: "TLS custom certificate authority (path to PEM file)", - FlagKey: "agent.tls.ca", - ByDefault: "", - }, - { - Name: "tls-cert", - Usage: "TLS certificate (path to PEM file)", - FlagKey: "agent.tls.cert", - ByDefault: "/etc/algoid/tls/tls.crt", - }, - { - Name: "tls-key", - Usage: "TLS private key (path to PEM file)", - FlagKey: "agent.tls.key", - ByDefault: "/etc/algoid/tls/tls.key", - }, - { - Name: "method", - Usage: "specify a supported DID method (can be provided multiple times)", - FlagKey: "agent.method", - ByDefault: []string{"algo"}, - Short: "m", - }, - { - Name: "storage-kind", - Usage: "storage mechanism to use", - FlagKey: "agent.storage.kind", - ByDefault: "ephemeral", - }, - { - Name: "storage-address", - Usage: "storage connection endpoint", - FlagKey: "agent.storage.addr", - ByDefault: "", - }, - } - if err := cli.SetupCommandParams(agentCmd, params, viper.GetViper()); err != nil { - panic(err) - } - rootCmd.AddCommand(agentCmd) -} - -func runMethodServer(_ *cobra.Command, _ []string) error { - // Prepare API handler - handler, err := getAgentHandler() - if err != nil { - return err - } - - // Base server configuration - opts := []rpc.ServerOption{ - rpc.WithPanicRecovery(), - rpc.WithPort(viper.GetInt("agent.port")), - rpc.WithNetworkInterface(rpc.NetworkInterfaceAll), - rpc.WithServiceProvider(handler), - rpc.WithResourceLimits(rpc.ResourceLimits{ - Connections: 1000, - Requests: 10, - Rate: 10000, - }), - } - - // TLS configuration - if viper.GetBool("agent.tls.enabled") { - log.Debug("TLS enabled") - opt, err := loadAgentCredentials() - if err != nil { - return err - } - opts = append(opts, opt) - } - - // Initialize HTTP gateway - if viper.GetBool("agent.http") { - log.Debug("HTTP gateway available") - gw, err := getAgentGateway(handler) - if err != nil { - return err - } - opts = append(opts, rpc.WithHTTPGateway(gw)) - } - - // Start server and wait for it to be ready - log.Debugf("difficulty level: %d", viper.GetInt("agent.pow")) - log.Debugf("TCP port: %d", viper.GetInt("agent.port")) - log.Info("starting network agent") - if viper.GetBool("agent.tls.enabled") { - log.Debugf("certificate: %s", viper.GetString("agent.tls.cert")) - log.Debugf("private key: %s", viper.GetString("agent.tls.key")) - } - server, err := rpc.NewServer(opts...) - if err != nil { - return fmt.Errorf("failed to start node: %w", err) - } - ready := make(chan bool) - go func() { - _ = server.Start(ready) - }() - <-ready - - // Wait for system signals - log.Info("waiting for incoming requests") - <-cli.SignalsHandler([]os.Signal{ - syscall.SIGHUP, - syscall.SIGINT, - syscall.SIGTERM, - syscall.SIGQUIT, - }) - - // Close handler - log.Info("preparing to exit") - if err := server.Stop(true); err != nil { - log.WithField("error", err).Warning("error stopping server") - } - return handler.Close() -} - -func getAgentHandler() (*agent.Handler, error) { - // Storage - ss := &storageSettings{} - if err := viper.UnmarshalKey("agent.storage", ss); err != nil { - return nil, err - } - store, err := getStorage(ss) - if err != nil { - return nil, err - } - log.Infof("storage: %s", store.Description()) - - // Network clients - algodClient, err := algodClient() - if err != nil { - return nil, err - } - indexerClient, err := indexerClient() - if err != nil { - return nil, err - } - - // Prepare API handler - handler, err := agent.NewHandler(agent.HandlerOptions{ - Methods: viper.GetStringSlice("agent.method"), - Difficulty: uint(viper.GetInt("agent.pow")), - Store: store, - Logger: log, - AlgoNode: algodClient, - AlgoIndexer: indexerClient, - }) - if err != nil { - return nil, fmt.Errorf("failed to start service handler: %w", err) - } - return handler, nil -} - -func loadAgentCredentials() (rpc.ServerOption, error) { - var err error - tlsConf := rpc.ServerTLSConfig{ - IncludeSystemCAs: true, - } - tlsConf.Cert, err = os.ReadFile(viper.GetString("agent.tls.cert")) - if err != nil { - return nil, fmt.Errorf("failed to load certificate file: %w", err) - } - tlsConf.PrivateKey, err = os.ReadFile(viper.GetString("agent.tls.key")) - if err != nil { - return nil, fmt.Errorf("failed to load private key file: %w", err) - } - if viper.GetString("agent.tls.ca") != "" { - caPEM, err := os.ReadFile(viper.GetString("agent.tls.ca")) - if err != nil { - return nil, fmt.Errorf("failed to load CA file: %w", err) - } - tlsConf.CustomCAs = append(tlsConf.CustomCAs, caPEM) - } - return rpc.WithTLS(tlsConf), nil -} - -func getAgentGateway(handler *agent.Handler) (*rpc.Gateway, error) { - var gwCl []rpc.ClientOption - if viper.GetBool("agent.tls.enabled") { - tlsConf := rpc.ClientTLSConfig{IncludeSystemCAs: true} - if viper.GetString("agent.tls.ca") != "" { - caPEM, err := os.ReadFile(viper.GetString("agent.tls.ca")) - if err != nil { - return nil, fmt.Errorf("failed to load CA file: %w", err) - } - tlsConf.CustomCAs = append(tlsConf.CustomCAs, caPEM) - } - gwCl = append(gwCl, rpc.WithClientTLS(tlsConf)) - gwCl = append(gwCl, rpc.WithInsecureSkipVerify()) // Internally the gateway proxy accept any certificate - } - - gwOpts := []rpc.GatewayOption{ - rpc.WithClientOptions(gwCl...), - rpc.WithInterceptor(handler.QueryResponseFilter()), - rpc.WithGatewayMiddleware(mwHeaders.Handler(map[string]string{ - "x-agent-version": info.CoreVersion, - "x-agent-build-code": info.BuildCode, - "x-agent-release": releaseCode(), - "x-content-type-options": "nosniff", - })), - } - if viper.GetBool("agent.proxy_protocol") { - log.Debug("enable PROXY protocol support") - gwOpts = append(gwOpts, rpc.WithGatewayMiddleware(mwProxy.Handler())) - } - gw, err := rpc.NewGateway(gwOpts...) - if err != nil { - return nil, fmt.Errorf("failed to initialize HTTP gateway: %w", err) - } - return gw, nil -} - -// Return the proper storage handler instance based on the connection -// details provided. -func getStorage(info *storageSettings) (agent.Storage, error) { - switch info.Kind { - case "ephemeral": - store := &storage.Ephemeral{} - return store, store.Open("no-op") - case "mongodb": - store := &storage.MongoStore{} - return store, store.Open(info.Addr) - case "ipfs": - store := &storage.IPFS{} - return store, store.Open(info.Addr) - default: - return nil, errors.New("non supported storage") - } -} - -type storageSettings struct { - Kind string `json:"kind" mapstructure:"kind"` - Addr string `json:"addr" mapstructure:"addr"` -} diff --git a/client/cli/cmd/config.go b/client/cli/cmd/config.go new file mode 100644 index 0000000..1ebd076 --- /dev/null +++ b/client/cli/cmd/config.go @@ -0,0 +1,48 @@ +package cmd + +import ( + "os" + + "github.com/algorandfoundation/did-algo/client/internal" + "github.com/spf13/cobra" + "github.com/spf13/viper" + "gopkg.in/yaml.v3" +) + +var configCmd = &cobra.Command{ + Use: "config", + Aliases: []string{"cfg", "conf", "settings"}, + Short: "Adjust configuration settings for the CLI client", +} + +func init() { + rootCmd.AddCommand(configCmd) +} + +type appConf struct { + Home string `json:"home" yaml:"home" mapstructure:"home"` + Network *internal.ClientSettings `json:"network" yaml:"network" mapstructure:"network"` +} + +func (ac *appConf) isProfileAvailable(name string) bool { + for _, p := range ac.Network.Profiles { + if p.Name == name { + return true + } + } + return false +} + +func (ac *appConf) setAppID(appID uint) { + for _, p := range ac.Network.Profiles { + if p.Name == ac.Network.Active { + p.AppID = appID + } + } +} + +func (ac *appConf) save() error { + file := viper.ConfigFileUsed() + output, _ := yaml.Marshal(ac) + return os.WriteFile(file, output, 0644) // nolint +} diff --git a/client/cli/cmd/config_app_id.go b/client/cli/cmd/config_app_id.go new file mode 100644 index 0000000..958a9b4 --- /dev/null +++ b/client/cli/cmd/config_app_id.go @@ -0,0 +1,38 @@ +package cmd + +import ( + "fmt" + "strconv" + + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +var configAppIDCmd = &cobra.Command{ + Use: "app-id", + Example: "algoid config app-id [app-id]", + Short: "Adjust the `app-id` setting for the active network profile", + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) == 0 { + return fmt.Errorf("appID name is required") + } + conf := new(appConf) + if err := viper.Unmarshal(&conf); err != nil { + return err + } + appID, err := strconv.Atoi(args[0]) + if err != nil { + return fmt.Errorf("invalid app-id: '%s'", args[0]) + } + conf.setAppID(uint(appID)) + err = conf.save() + if err == nil { + log.Info("configuration updated") + } + return err + }, +} + +func init() { + configCmd.AddCommand(configAppIDCmd) +} diff --git a/client/cli/cmd/config_switch.go b/client/cli/cmd/config_switch.go new file mode 100644 index 0000000..5af948c --- /dev/null +++ b/client/cli/cmd/config_switch.go @@ -0,0 +1,36 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +var configSwithProfileCmd = &cobra.Command{ + Use: "switch", + Example: "algoid config switch [profile]", + Short: "Modify the active network profile", + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) == 0 { + return fmt.Errorf("profile name is required") + } + conf := new(appConf) + if err := viper.Unmarshal(&conf); err != nil { + return err + } + if !conf.isProfileAvailable(args[0]) { + return fmt.Errorf("profile '%s' not found", args[0]) + } + conf.Network.Active = args[0] + err := conf.save() + if err == nil { + log.Info("configuration updated") + } + return err + }, +} + +func init() { + configCmd.AddCommand(configSwithProfileCmd) +} diff --git a/client/cli/cmd/config_view.go b/client/cli/cmd/config_view.go new file mode 100644 index 0000000..5b514cc --- /dev/null +++ b/client/cli/cmd/config_view.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + "github.com/spf13/viper" + "gopkg.in/yaml.v3" +) + +var configViewCmd = &cobra.Command{ + Use: "view", + Example: "algoid config view", + Short: "View current configuration settings", + RunE: func(cmd *cobra.Command, args []string) error { + conf := new(appConf) + if err := viper.Unmarshal(&conf); err != nil { + return err + } + output, _ := yaml.Marshal(conf) + log.Info("configuration file: ", viper.ConfigFileUsed()) + fmt.Printf("%s\n", output) + return nil + }, +} + +func init() { + configCmd.AddCommand(configViewCmd) +} diff --git a/client/cli/cmd/deploy.go b/client/cli/cmd/deploy.go new file mode 100644 index 0000000..35d44fa --- /dev/null +++ b/client/cli/cmd/deploy.go @@ -0,0 +1,70 @@ +package cmd + +import ( + "errors" + + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" + "github.com/kennygrant/sanitize" + "github.com/spf13/cobra" +) + +var deployContractCmd = &cobra.Command{ + Use: "deploy", + Aliases: []string{"deploy-contract"}, + Short: "Deploy the AlgoDID storage smart contract", + Example: "algoid deploy [wallet-name]", + RunE: runDeployContractCmd, +} + +func init() { + rootCmd.AddCommand(deployContractCmd) +} + +func runDeployContractCmd(_ *cobra.Command, args []string) error { + // Get parameters + if len(args) != 1 { + return errors.New("missing required parameters") + } + name := sanitize.Name(args[0]) + wp, err := readSecretValue("enter wallet's passphrase") + if err != nil { + return err + } + + // Get local store handler + store, err := getClientStore() + if err != nil { + return err + } + + // Decrypt wallet + seed, err := store.OpenWallet(name, wp) + if err != nil { + return err + } + + // Restore account handler + key, err := mnemonic.ToPrivateKey(seed) + if err != nil { + return err + } + account, err := ac.AccountFromPrivateKey(key) + if err != nil { + return err + } + + // Get network client + cl, err := getAlgoClient() + if err != nil { + return err + } + + // Deploy contract + appID, err := cl.DeployContract(&account) + if err != nil { + return err + } + log.WithField("app_id", appID).Info("storage contract deployed successfully") + return nil +} diff --git a/client/cli/cmd/proof.go b/client/cli/cmd/proof.go index 1b62951..4d1adda 100644 --- a/client/cli/cmd/proof.go +++ b/client/cli/cmd/proof.go @@ -39,7 +39,7 @@ func init() { Name: "domain", Usage: "domain value to use", FlagKey: "proof.domain", - ByDefault: didDomainValue, + ByDefault: "", Short: "d", }, { diff --git a/client/cli/cmd/register.go b/client/cli/cmd/register.go index 539d27d..eb4dae9 100644 --- a/client/cli/cmd/register.go +++ b/client/cli/cmd/register.go @@ -1,18 +1,15 @@ package cmd import ( - "crypto/rand" "errors" "fmt" - "os" - "strconv" - "strings" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" "github.com/kennygrant/sanitize" "github.com/spf13/cobra" "github.com/spf13/viper" "go.bryk.io/pkg/cli" - "go.bryk.io/pkg/crypto/shamir" "go.bryk.io/pkg/did" xlog "go.bryk.io/pkg/log" ) @@ -20,42 +17,13 @@ import ( var registerCmd = &cobra.Command{ Use: "register", Short: "Creates a new DID locally", - Example: "algoid register [DID reference name]", + Example: "algoid register [wallet-name]", Aliases: []string{"create", "new"}, RunE: runRegisterCmd, } func init() { - params := []cli.Param{ - { - Name: "passphrase", - Usage: "set a passphrase as recovery method for the primary key", - FlagKey: "register.passphrase", - ByDefault: false, - Short: "p", - }, - { - Name: "secret-sharing", - Usage: "number of shares and threshold value: shares,threshold", - FlagKey: "register.secret-sharing", - ByDefault: "3,2", - Short: "s", - }, - { - Name: "tag", - Usage: "tag value for the identifier instance", - FlagKey: "register.tag", - ByDefault: "", - Short: "t", - }, - { - Name: "method", - Usage: "method value for the identifier instance", - FlagKey: "register.method", - ByDefault: "algo", - Short: "m", - }, - } + params := []cli.Param{} if err := cli.SetupCommandParams(registerCmd, params, viper.GetViper()); err != nil { panic(err) } @@ -64,51 +32,61 @@ func init() { func runRegisterCmd(_ *cobra.Command, args []string) error { if len(args) != 1 { - return errors.New("a reference name for the DID is required") + return errors.New("missing required parameters") } name := sanitize.Name(args[0]) + wp, err := readSecretValue("enter wallet's passphrase") + if err != nil { + return err + } - // Get store handler + // Get local store handler st, err := getClientStore() if err != nil { return err } - // Check for duplicates - dup, _ := st.Get(name) - if dup != nil { - return fmt.Errorf("there's already a DID with reference name: %s", name) + // Decrypt wallet + seed, err := st.OpenWallet(name, wp) + if err != nil { + return err } - // Get key secret from the user - log.Info("obtaining secret material for the master private key") - secret, err := getSecret(name) + // Restore account handler + key, err := mnemonic.ToPrivateKey(seed) + if err != nil { + return err + } + account, err := ac.AccountFromPrivateKey(key) if err != nil { return err } - // Generate master key from available secret - masterKey, err := keyFromMaterial(secret) + // Get storage application identifier + appID, err := getStorageAppID() if err != nil { return err } - defer masterKey.Destroy() - pk := make([]byte, 64) - copy(pk, masterKey.PrivateKey()) + + // Check for duplicates + dup, _ := st.Get(name) + if dup != nil { + return fmt.Errorf("there's already a DID with reference name: %s", name) + } // Generate base identifier instance - method := viper.GetString("register.method") - tag := viper.GetString("register.tag") + subject := fmt.Sprintf("%x-%d", account.PublicKey, appID) + method := "algo" log.WithFields(xlog.Fields{ - "method": method, - "tag": tag, + "subject": subject, + "method": method, }).Info("generating new identifier") - id, err := did.NewIdentifierWithMode(method, tag, did.ModeUUID) + id, err := did.NewIdentifier(method, subject) if err != nil { return err } log.Debug("adding master key") - if err = id.AddVerificationMethod("master", pk, did.KeyTypeEd); err != nil { + if err = id.AddVerificationMethod("master", key, did.KeyTypeEd); err != nil { return err } log.Debug("setting master key as authentication mechanism") @@ -120,64 +98,3 @@ func runRegisterCmd(_ *cobra.Command, args []string) error { log.Info("adding entry to local store") return st.Save(name, id) } - -func getSecret(name string) ([]byte, error) { - // User provided passphrase - if viper.GetBool("register.passphrase") { - secret, err := readSecretValue("Enter a secure passphrase") - if err != nil { - return nil, err - } - confirmation, err := readSecretValue("Confirm the provided value") - if err != nil { - return nil, err - } - if secret != confirmation { - return nil, errors.New("the values provided are not equal") - } - return []byte(secret), nil - } - - // Shared secret - secret := make([]byte, 128) - if _, err := rand.Read(secret); err != nil { - return nil, err - } - - // Spilt secret and save shares to local files - shares, err := splitSecret(secret, viper.GetString("register.secret-sharing")) - if err != nil { - return nil, err - } - for i, k := range shares { - share := fmt.Sprintf("%s.share_%d.bin", name, i+1) - if err := os.WriteFile(share, k, 0400); err != nil { - return nil, fmt.Errorf("failed to save share '%s': %w", share, err) - } - } - return secret, nil -} - -func splitSecret(secret []byte, conf string) ([][]byte, error) { - // Load configuration - sssConf := strings.Split(conf, ",") - if len(sssConf) != 2 { - return nil, errors.New("invalid secret sharing configuration value") - } - - // Validate configuration - shares, err := strconv.Atoi(sssConf[0]) - if err != nil { - return nil, fmt.Errorf("invalid number shares: %s", sssConf[0]) - } - threshold, err := strconv.Atoi(sssConf[1]) - if err != nil { - return nil, fmt.Errorf("invalid threshold value: %s", sssConf[1]) - } - if threshold >= shares { - return nil, fmt.Errorf("threshold '(%d)' should be smaller than shares '(%d)'", threshold, shares) - } - - // Split secret - return shamir.Split(secret, shares, threshold) -} diff --git a/client/cli/cmd/resolver.go b/client/cli/cmd/resolver.go index 43def80..77f8cf3 100644 --- a/client/cli/cmd/resolver.go +++ b/client/cli/cmd/resolver.go @@ -5,26 +5,19 @@ import ( "os" "syscall" - "github.com/algorandfoundation/did-algo/client/internal" + "github.com/algorandfoundation/did-algo/info" "github.com/spf13/cobra" "github.com/spf13/viper" "go.bryk.io/pkg/cli" - pkgHttp "go.bryk.io/pkg/net/http" - "google.golang.org/grpc" + "go.bryk.io/pkg/did/resolver" + xHttp "go.bryk.io/pkg/net/http" + mwHeaders "go.bryk.io/pkg/net/middleware/headers" ) var resolverCmd = &cobra.Command{ Use: "resolver", - Short: "Start a standalone resolver server", - RunE: runResolverServer, - Long: `Resolver server - -Resolver server provides a DIF compatible endpoint for DID -document resolution. The server endpoint can be used as a -standalone Universal Resolver Driver. - -More information: -https://github.com/decentralized-identity/universal-resolver`, + Short: "Run a DID resolver service for the Algorand network", + RunE: runResolverCmd, } func init() { @@ -43,43 +36,6 @@ func init() { ByDefault: false, Short: "P", }, - { - Name: "tls", - Usage: "enable secure communications using TLS with provided credentials", - FlagKey: "resolver.tls.enabled", - ByDefault: false, - }, - { - Name: "tls-ca", - Usage: "TLS custom certificate authority (path to PEM file)", - FlagKey: "resolver.tls.ca", - ByDefault: "", - }, - { - Name: "tls-cert", - Usage: "TLS certificate (path to PEM file)", - FlagKey: "resolver.tls.cert", - ByDefault: "/etc/algoid/tls/tls.crt", - }, - { - Name: "tls-key", - Usage: "TLS private key (path to PEM file)", - FlagKey: "resolver.tls.key", - ByDefault: "/etc/algoid/tls/tls.key", - }, - { - Name: "agent", - Usage: "Network agent to communicate with", - FlagKey: "resolver.client.node", - ByDefault: internal.DefaultAgentEndpoint, - Short: "a", - }, - { - Name: "agent-insecure", - Usage: "Use an insecure connection to the network agent", - FlagKey: "resolver.client.insecure", - ByDefault: false, - }, } if err := cli.SetupCommandParams(resolverCmd, params, viper.GetViper()); err != nil { panic(err) @@ -87,33 +43,41 @@ func init() { rootCmd.AddCommand(resolverCmd) } -func runResolverServer(cmd *cobra.Command, args []string) error { - // Load settings - conf := new(internal.ResolverSettings) - conf.Load(viper.GetViper()) - - // Resolver instance - conn, err := getClientConnection(conf.Client) +func runResolverCmd(_ *cobra.Command, _ []string) error { + // Network client + cl, err := getAlgoClient() if err != nil { return err } - rr, err := conf.Resolver(conn) + + rslv, err := resolver.New(resolver.WithProvider("algo", cl)) if err != nil { return err } - // Start server mux := http.NewServeMux() - mux.HandleFunc("/1.0/ping", pingHandler) - mux.HandleFunc("/1.0/ready", resolverReadyHandler(conn)) - mux.HandleFunc("/1.0/identifiers/", rr.ResolutionHandler) - srv, err := pkgHttp.NewServer(conf.ServerOpts(mux, releaseCode())...) + mux.HandleFunc("/1.0/ping", func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write([]byte("pong")) + }) + mux.HandleFunc("/1.0/ready", func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write([]byte("ok")) + }) + mux.HandleFunc("/1.0/identifiers/", rslv.ResolutionHandler) + + // start server + srvOpts := []xHttp.Option{ + xHttp.WithHandler(mux), + xHttp.WithPort(viper.GetInt("resolver.port")), + xHttp.WithMiddleware(mwHeaders.Handler(map[string]string{ + "x-resolver-version": info.CoreVersion, + "x-resolver-build": info.BuildCode, + })), + } + srv, err := xHttp.NewServer(srvOpts...) if err != nil { return err } - go func() { - _ = srv.Start() - }() + go srv.Start() // nolint:errcheck // wait for system signals log.Info("waiting for incoming requests") @@ -125,26 +89,6 @@ func runResolverServer(cmd *cobra.Command, args []string) error { }) // stop server - log.Info("preparing to exit") - err = srv.Stop(true) // prevent further requests - _ = conn.Close() // close internal API client connection - return err -} - -// Basic reachability test. -func pingHandler(w http.ResponseWriter, r *http.Request) { - _, _ = w.Write([]byte("pong")) -} - -// Status reported is based on the connection to the agent being used. -func resolverReadyHandler(conn *grpc.ClientConn) func(w http.ResponseWriter, r *http.Request) { - fn := func(w http.ResponseWriter, r *http.Request) { - st := conn.GetState().String() - if st != "READY" && st != "IDLE" { - w.WriteHeader(http.StatusServiceUnavailable) - _, _ = w.Write([]byte(st)) - return - } - } - return fn + log.Info("closing resolver server") + return srv.Stop(true) } diff --git a/client/cli/cmd/retrieve.go b/client/cli/cmd/retrieve.go index c531634..8849f2b 100644 --- a/client/cli/cmd/retrieve.go +++ b/client/cli/cmd/retrieve.go @@ -33,19 +33,21 @@ func runRetrieveCmd(_ *cobra.Command, args []string) error { return err } + // Get network client + cl, err := getAlgoClient() + if err != nil { + return err + } + // Retrieve record log.Info("retrieving record") - response, err := resolve(args[0]) + doc, err := cl.Resolve(args[0]) if err != nil { return err } // Pretty-print retrieved document log.Warning("skipping validation") - doc := new(did.Document) - if err = json.Unmarshal(response, doc); err != nil { - return err - } output, _ := json.MarshalIndent(doc, "", " ") fmt.Printf("%s\n", output) return nil diff --git a/client/cli/cmd/root.go b/client/cli/cmd/root.go index 6a01c9f..534cb10 100644 --- a/client/cli/cmd/root.go +++ b/client/cli/cmd/root.go @@ -13,10 +13,9 @@ import ( ) var ( - log xlog.Logger - cfgFile = "" - homeDir = "" - didDomainValue = "did.algorand.foundation" + log xlog.Logger + cfgFile = "" + homeDir = "" ) var rootCmd = &cobra.Command{ @@ -26,9 +25,9 @@ var rootCmd = &cobra.Command{ SilenceUsage: true, Long: `Algorand DID -Reference client implementation for the "algo" DID method. The platform allows -entities to fully manage Decentralized Identifiers as described by version v1.0 -of the specification. +Reference client implementation for the "algo" DID method. The platform +allows entities to fully manage Decentralized Identifiers as described +by version v1.0 of the W3C specification. For more information: https://github.com/algorandfoundation/did-algo`, @@ -60,7 +59,7 @@ func init() { cobra.OnInitialize(initConfig) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file ($HOME/.algoid/config.yaml)") rootCmd.PersistentFlags().StringVar(&homeDir, "home", "", "home directory ($HOME/.algoid)") - if err := viper.BindPFlag("client.home", rootCmd.PersistentFlags().Lookup("home")); err != nil { + if err := viper.BindPFlag("home", rootCmd.PersistentFlags().Lookup("home")); err != nil { panic(err) } } @@ -78,8 +77,7 @@ func initConfig() { } // Set default values - viper.SetDefault("client.timeout", 5) - viper.SetDefault("client.home", filepath.Join(home, ".algoid")) + viper.SetDefault("home", filepath.Join(home, ".algoid")) // Set configuration file if cfgFile != "" { diff --git a/client/cli/cmd/sync.go b/client/cli/cmd/sync.go index 0805caa..8a65152 100644 --- a/client/cli/cmd/sync.go +++ b/client/cli/cmd/sync.go @@ -1,26 +1,21 @@ package cmd import ( - "context" - "encoding/hex" "errors" "fmt" - "time" - "github.com/algorandfoundation/did-algo/client/internal" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" "github.com/kennygrant/sanitize" "github.com/spf13/cobra" "github.com/spf13/viper" "go.bryk.io/pkg/cli" - "go.bryk.io/pkg/did" - xlog "go.bryk.io/pkg/log" ) var syncCmd = &cobra.Command{ Use: "sync", Short: "Publish a DID instance to the processing network", - Example: "algoid sync [DID reference name]", + Example: "algoid sync [DID name]", Aliases: []string{"publish", "update", "upload", "push"}, RunE: runSyncCmd, } @@ -28,18 +23,11 @@ var syncCmd = &cobra.Command{ func init() { params := []cli.Param{ { - Name: "key", - Usage: "cryptographic key to use for the sync operation", - FlagKey: "sync.key", - ByDefault: "master", - Short: "k", - }, - { - Name: "pow", - Usage: "set the required request ticket difficulty level", - FlagKey: "client.pow", - ByDefault: 24, - Short: "p", + Name: "delete", + Usage: "mark the DID instance as deleted", + FlagKey: "sync.delete", + ByDefault: false, + Short: "d", }, } if err := cli.SetupCommandParams(syncCmd, params, viper.GetViper()); err != nil { @@ -50,7 +38,7 @@ func init() { func runSyncCmd(_ *cobra.Command, args []string) error { if len(args) != 1 { - return errors.New("you must specify a DID reference name") + return errors.New("missing required parameters") } // Get store handler @@ -63,110 +51,51 @@ func runSyncCmd(_ *cobra.Command, args []string) error { name := sanitize.Name(args[0]) id, err := st.Get(name) if err != nil { - return fmt.Errorf("no available record under the provided reference name: %s", name) + return fmt.Errorf("no available record under reference name: %s", name) } - // Get selected key for the sync operation - key, err := getSyncKey(id) + // Get wallet account + wp, err := readSecretValue("enter wallet's passphrase") if err != nil { return err } - log.Debugf("key selected for the operation: %s", key.ID) - // Generate request ticket - log.Infof("publishing: %s", name) - ticket, err := getRequestTicket(id, key) + // Decrypt wallet + seed, err := st.OpenWallet(name, wp) if err != nil { return err } - // Get client connection - conf := new(internal.ClientSettings) - if err := viper.UnmarshalKey("client", conf); err != nil { - return err - } - if err := conf.Validate(); err != nil { + // Restore account handler + key, err := mnemonic.ToPrivateKey(seed) + if err != nil { return err } - conn, err := getClientConnection(conf) + account, err := ac.AccountFromPrivateKey(key) if err != nil { - return fmt.Errorf("failed to establish connection: %w", err) + return err } - defer func() { - _ = conn.Close() - }() - // Build request - req := &protoV1.ProcessRequest{ - Ticket: ticket, + // Get network client + cl, err := getAlgoClient() + if err != nil { + return err } // Submit request log.Info("submitting request to the network") - client := protoV1.NewAgentAPIClient(conn) - res, err := client.Process(context.Background(), req) - if err != nil { - return fmt.Errorf("network return an error: %w", err) - } - log.Debugf("request status: %v", res.Ok) - if res.Identifier != "" { - log.Info("identifier: ", res.Identifier) - } - if !res.Ok { - return nil - } - - // Update local record if sync was successful - return st.Update(name, id) -} - -func getRequestTicket(id *did.Identifier, key *did.VerificationKey) (*protoV1.Ticket, error) { - diff := uint(viper.GetInt("client.pow")) - log.WithFields(xlog.Fields{"pow": diff}).Info("generating request ticket") - - // Create new ticket - ticket, err := protoV1.NewTicket(id, key.ID) - if err != nil { - return nil, err - } - - // Solve PoW challenge - start := time.Now() - challenge := ticket.Solve(context.Background(), diff) - log.Debugf("ticket obtained: %s", challenge) - log.Debugf("time: %s (rounds completed %d)", time.Since(start), ticket.Nonce()) - ch, _ := hex.DecodeString(challenge) - - // Sign ticket - if ticket.Signature, err = key.Sign(ch); err != nil { - return nil, fmt.Errorf("failed to generate request ticket: %w", err) - } - - // Verify on client's side - if err = ticket.Verify(diff); err != nil { - return nil, fmt.Errorf("failed to verify ticket: %w", err) - } - - return ticket, nil -} - -func getSyncKey(id *did.Identifier) (*did.VerificationKey, error) { - // Get selected key for the sync operation - key := id.VerificationMethod(viper.GetString("sync.key")) - if key == nil { - return nil, errors.New("invalid key selected") - } - - // Verify the key is enabled for authentication - isAuth := false - for _, k := range id.GetVerificationRelationship(did.AuthenticationVM) { - if k == key.ID { - isAuth = true - break + if viper.GetBool("sync.delete") { + log.Infof("deleting: %s", name) + if err = cl.DeleteDID(id, &account); err != nil { + return err } + log.Info("DID instance deleted") + return nil } - if !isAuth { - return nil, errors.New("the key selected is not enabled for authentication purposes") + log.Infof("publishing: %s", name) + if err := cl.PublishDID(id, &account); err != nil { + return err } - return key, nil + log.Info("DID instance published") + return nil } diff --git a/client/cli/cmd/ui.go b/client/cli/cmd/ui.go index b8654cb..653239a 100644 --- a/client/cli/cmd/ui.go +++ b/client/cli/cmd/ui.go @@ -6,48 +6,46 @@ import ( "os/exec" "syscall" - "github.com/algorandfoundation/did-algo/client/internal" "github.com/algorandfoundation/did-algo/client/ui" "github.com/spf13/cobra" - "github.com/spf13/viper" "go.bryk.io/pkg/cli" xhttp "go.bryk.io/pkg/net/http" ) +var uiCmdDesc = ` +Graphical client. + +Starts a local graphical user interface that can be used +to create and manage local identifiers and connect your +wallet for more advanced features.` + var uiCmd = &cobra.Command{ Use: "ui", Aliases: []string{"gui"}, Short: "Start the local graphical client", RunE: runLocalUI, - Long: `Graphical client - -Starts a local graphical user interface that can be used -to create and manage local identifiers and connect your -wallet for more advanced features.`, + Long: uiCmdDesc, } func init() { rootCmd.AddCommand(uiCmd) } -func runLocalUI(cmd *cobra.Command, args []string) error { - // Load client configuration - conf := new(internal.ClientSettings) - if err := viper.UnmarshalKey("client", conf); err != nil { - return err - } - if err := conf.Validate(); err != nil { +func runLocalUI(_ *cobra.Command, _ []string) error { + // Get store handler + st, err := getClientStore() + if err != nil { return err } - // Get store handler - st, err := getClientStore() + // Get network client + cl, err := getAlgoClient() if err != nil { return err } // Local API server - srv, err := ui.LocalAPIServer(st, conf, log) + srv, err := ui.LocalAPIServer(st, cl, log) if err != nil { return err } diff --git a/client/cli/cmd/utils.go b/client/cli/cmd/utils.go index 85e3079..dd31d5c 100644 --- a/client/cli/cmd/utils.go +++ b/client/cli/cmd/utils.go @@ -1,129 +1,52 @@ package cmd import ( - "context" - "crypto/sha256" "fmt" - "io" - "time" - "github.com/algorand/go-algorand-sdk/client/v2/algod" - "github.com/algorand/go-algorand-sdk/client/v2/indexer" "github.com/algorandfoundation/did-algo/client/internal" "github.com/algorandfoundation/did-algo/client/store" - "github.com/algorandfoundation/did-algo/info" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" "github.com/spf13/viper" - "go.bryk.io/pkg/crypto/ed25519" - "go.bryk.io/pkg/did" - "go.bryk.io/pkg/errors" - "go.bryk.io/pkg/net/rpc" - "golang.org/x/crypto/hkdf" - "golang.org/x/crypto/sha3" - "google.golang.org/grpc" ) // When reading contents from standard input a maximum of 4MB is expected. const maxPipeInputSize = 4096 -// Securely expand the provided secret material. -func expand(secret []byte, size int, info []byte) ([]byte, error) { - salt := make([]byte, sha256.Size) - buf := make([]byte, size) - h := hkdf.New(sha3.New256, secret, salt[:], info) - if _, err := io.ReadFull(h, buf); err != nil { - return nil, err - } - return buf, nil -} - -// Restore key pair from the provided material. -func keyFromMaterial(material []byte) (*ed25519.KeyPair, error) { - m, err := expand(material, 32, nil) - if err != nil { - return nil, err - } - seed := [32]byte{} - copy(seed[:], m) - return ed25519.FromSeed(seed[:]) -} - // Accessor to the local storage handler. func getClientStore() (*store.LocalStore, error) { - return store.NewLocalStore(viper.GetString("client.home")) + return store.NewLocalStore(viper.GetString("home")) } -// Get an RPC network connection. -func getClientConnection(conf *internal.ClientSettings) (*grpc.ClientConn, error) { - log.Infof("establishing connection to network agent: %s", conf.Node) - opts := []rpc.ClientOption{ - rpc.WaitForReady(), - rpc.WithUserAgent(fmt.Sprintf("algoid-client/%s", info.CoreVersion)), - rpc.WithTimeout(time.Duration(conf.Timeout) * time.Second), +// Retrieve the application identifier for the active network profile. +func getStorageAppID() (uint, error) { + conf := new(internal.ClientSettings) + if err := viper.UnmarshalKey("network", &conf); err != nil { + return 0, err } - if conf.Insecure { - log.Warning("using an insecure connection") - } else { - opts = append(opts, rpc.WithClientTLS(rpc.ClientTLSConfig{IncludeSystemCAs: true})) + var profile *internal.NetworkProfile + for _, p := range conf.Profiles { + if p.Name == conf.Active { + profile = p + break + } } - if conf.Override != "" { - log.WithField("override", conf.Override).Warning("using server name override") - opts = append(opts, rpc.WithServerNameOverride(conf.Override)) + if profile == nil { + return 0, fmt.Errorf("no active profile found") } - return rpc.NewClientConnection(conf.Node, opts...) -} - -// Get algo node client. -func algodClient() (*algod.Client, error) { - address := viper.GetString("agent.network.algod.address") - token := viper.GetString("agent.network.algod.token") - log.WithField("address", address).Info("connecting to algod node") - return algod.MakeClient(address, token) -} - -// Get algo indexer client. -func indexerClient() (*indexer.Client, error) { - address := viper.GetString("agent.network.indexer.address") - token := viper.GetString("agent.network.indexer.token") - log.WithField("address", address).Info("connecting to indexer node") - return indexer.MakeClient(address, token) + return profile.AppID, nil } -// Use internal RPC client to obtain the DID document for the requested -// identifier. -func resolve(id string) ([]byte, error) { - // NOTE: future versions could use the DIF universal resolver - // https://dev.uniresolver.io/1.0/identifiers/{id} - - // Get client connection +// Get network client instance. +func getAlgoClient() (*internal.AlgoClient, error) { conf := new(internal.ClientSettings) - if err := viper.UnmarshalKey("client", conf); err != nil { - return nil, err - } - if err := conf.Validate(); err != nil { + if err := viper.UnmarshalKey("network", &conf); err != nil { return nil, err } - conn, err := getClientConnection(conf) - if err != nil { - return nil, errors.Errorf("failed to establish connection: %w", err) + var profile *internal.NetworkProfile + for _, p := range conf.Profiles { + if p.Name == conf.Active { + profile = p + break + } } - defer func() { - _ = conn.Close() - }() - - // Submit query - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) - defer cancel() - ID, _ := did.Parse(id) - cl := protoV1.NewAgentAPIClient(conn) - res, err := cl.Query(ctx, &protoV1.QueryRequest{ - Method: ID.Method(), - Subject: ID.Subject(), - }) - if err != nil { - return nil, err - } - - // Return DID document - return res.Document, nil + return internal.NewAlgoClient(profile, log) } diff --git a/client/cli/cmd/verify.go b/client/cli/cmd/verify.go deleted file mode 100644 index 3a3405d..0000000 --- a/client/cli/cmd/verify.go +++ /dev/null @@ -1,110 +0,0 @@ -package cmd - -import ( - "encoding/json" - "errors" - "fmt" - "os" - - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.bryk.io/pkg/cli" - "go.bryk.io/pkg/did" -) - -var verifyCmd = &cobra.Command{ - Use: "verify", - Short: "Check the validity of a ProofLD document", - Example: "algoid verify [proof file] --input \"contents to verify\"", - RunE: runVerifyCmd, -} - -func init() { - params := []cli.Param{ - { - Name: "input", - Usage: "original contents to run the verification against", - FlagKey: "verify.input", - ByDefault: "", - Short: "i", - }, - } - if err := cli.SetupCommandParams(verifyCmd, params, viper.GetViper()); err != nil { - panic(err) - } - rootCmd.AddCommand(verifyCmd) -} - -func runVerifyCmd(_ *cobra.Command, args []string) error { - if len(args) != 1 { - return errors.New("you must provide the signature file to verify") - } - - // Get input, CLI takes precedence, from standard input otherwise - input := []byte(viper.GetString("verify.input")) - if len(input) == 0 { - input, _ = cli.ReadPipedInput(maxPipeInputSize) - } - if len(input) == 0 { - return errors.New("no input passed in to verify") - } - - // Load proof file - log.Info("verifying proof document") - log.Debug("load signature file") - entry, err := os.ReadFile(args[0]) - if err != nil { - return fmt.Errorf("failed to read the signature file: %w", err) - } - log.Debug("decoding contents") - proof := &did.ProofLD{} - if err = json.Unmarshal(entry, proof); err != nil { - return fmt.Errorf("invalid signature file: %w", err) - } - - // Validate verification method - log.Debug("validating proof verification method") - vm := proof.VerificationMethod - id, err := did.Parse(vm) - if err != nil { - return fmt.Errorf("invalid proof verification method: %w", err) - } - - // Retrieve subject - jsDoc, err := resolve(id.String()) - if err != nil { - return err - } - - // Decode result obtained from resolve - doc := new(did.Document) - result := map[string]json.RawMessage{} - if err := json.Unmarshal(jsDoc, &result); err != nil { - return fmt.Errorf("invalid DID document received: %s", jsDoc) - } - if _, ok := result["document"]; !ok { - return fmt.Errorf("invalid DID document received: %s", jsDoc) - } - if err := json.Unmarshal(result["document"], doc); err != nil { - return fmt.Errorf("invalid DID document received: %s", jsDoc) - } - - // Restore peer DID instance - peer, err := did.FromDocument(doc) - if err != nil { - return err - } - - // Get creator's key - ck := peer.VerificationMethod(vm) - if ck == nil { - return fmt.Errorf("verification method is not available on the DID document: %s", vm) - } - - // Verify signature - if !ck.VerifyProof(input, proof) { - return errors.New("proof is invalid") - } - log.Info("proof is valid") - return nil -} diff --git a/client/cli/cmd/wallet.go b/client/cli/cmd/wallet.go index 7ed87e1..7c89c54 100644 --- a/client/cli/cmd/wallet.go +++ b/client/cli/cmd/wallet.go @@ -36,7 +36,6 @@ func readSecretValue(prompt string) (string, error) { if err != nil { return "", err } - fmt.Println() return string(v), nil } diff --git a/client/cli/cmd/wallet_connect.go b/client/cli/cmd/wallet_connect.go index b3239fe..8d92247 100644 --- a/client/cli/cmd/wallet_connect.go +++ b/client/cli/cmd/wallet_connect.go @@ -11,13 +11,8 @@ import ( "go.bryk.io/pkg/did" ) -var walletConnectCmd = &cobra.Command{ - Use: "connect", - Aliases: []string{"link", "ln"}, - RunE: runWalletConnectCmd, - Example: "algoid wallet connect [wallet-name] [did-name]", - Short: "Connect your ALGO wallet to a DID", - Long: `Connect your ALGO wallet to a DID +const walletConnectCmdDesc = ` +Connect your ALGO wallet to a DID. Connecting your ALGO wallet to a DID will allow other users to discover your ALGO address when resolving your identifier. @@ -25,7 +20,15 @@ discover your ALGO address when resolving your identifier. Effectively connecting your ID to a highly secure and efficient payments channel. Additionally, your counterparties might also discover or request your credentials when/if required to perform -certain transactions.`, +certain transactions.` + +var walletConnectCmd = &cobra.Command{ + Use: "connect", + Aliases: []string{"link", "ln"}, + RunE: runWalletConnectCmd, + Example: "algoid wallet connect [wallet-name] [did-name]", + Short: "Connect your ALGO wallet to a DID", + Long: walletConnectCmdDesc, } func init() { @@ -48,7 +51,7 @@ func init() { if err := cli.SetupCommandParams(walletConnectCmd, params, viper.GetViper()); err != nil { panic(err) } - walletCmd.AddCommand(walletConnectCmd) + // walletCmd.AddCommand(walletConnectCmd) } func runWalletConnectCmd(_ *cobra.Command, args []string) error { @@ -115,7 +118,7 @@ func runWalletConnectCmd(_ *cobra.Command, args []string) error { } // Register custom context - id.RegisterContext("https://did-ns.aidtech.network/v1") + id.RegisterContext("https://did.algorand.foundation/v1") // Update record log.Info("updating local DID record") diff --git a/client/cli/cmd/wallet_create.go b/client/cli/cmd/wallet_create.go index 397e98f..3fd42b9 100644 --- a/client/cli/cmd/wallet_create.go +++ b/client/cli/cmd/wallet_create.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - ac "github.com/algorand/go-algorand-sdk/crypto" - "github.com/algorand/go-algorand-sdk/mnemonic" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" "github.com/kennygrant/sanitize" "github.com/spf13/cobra" xlog "go.bryk.io/pkg/log" diff --git a/client/cli/cmd/wallet_delete.go b/client/cli/cmd/wallet_delete.go index d1dc905..9514eb3 100644 --- a/client/cli/cmd/wallet_delete.go +++ b/client/cli/cmd/wallet_delete.go @@ -7,19 +7,22 @@ import ( "github.com/spf13/cobra" ) -var walletDeleteCmd = &cobra.Command{ - Use: "delete", - Aliases: []string{"del", "rm"}, - Example: "algoid wallet delete [wallet-name]", - Short: "Permanently delete an ALGO wallet", - Long: `Permanently delete an ALGO wallet +const walletDeleteCmdDesc = ` +Permanently delete an ALGO wallet. This operation cannot be undone and might result in permanent loss of funds. Use with EXTREME care. If you are trying to move a wallet handler to a different system be sure to first 'export' it to generate a backup file containing -the mnemonic that can be used later to 'restore' the wallet.`, +the mnemonic that can be used later to 'restore' the wallet.` + +var walletDeleteCmd = &cobra.Command{ + Use: "delete", + Aliases: []string{"del", "rm"}, + Example: "algoid wallet delete [wallet-name]", + Short: "Permanently delete an ALGO wallet", + Long: walletDeleteCmdDesc, RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 1 { return errors.New("you must specify the wallet name") diff --git a/client/cli/cmd/wallet_disconnect.go b/client/cli/cmd/wallet_disconnect.go index f4697a3..c7ee747 100644 --- a/client/cli/cmd/wallet_disconnect.go +++ b/client/cli/cmd/wallet_disconnect.go @@ -82,5 +82,5 @@ var walletDisconnectCmd = &cobra.Command{ } func init() { - walletCmd.AddCommand(walletDisconnectCmd) + // walletCmd.AddCommand(walletDisconnectCmd) } diff --git a/client/cli/cmd/wallet_info.go b/client/cli/cmd/wallet_info.go index bf2d6e6..f4949b4 100644 --- a/client/cli/cmd/wallet_info.go +++ b/client/cli/cmd/wallet_info.go @@ -1,17 +1,13 @@ package cmd import ( - "context" "errors" "fmt" - ac "github.com/algorand/go-algorand-sdk/crypto" - "github.com/algorand/go-algorand-sdk/mnemonic" - "github.com/algorandfoundation/did-algo/client/internal" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" "github.com/kennygrant/sanitize" "github.com/spf13/cobra" - "github.com/spf13/viper" ) var walletInfoCmd = &cobra.Command{ @@ -52,42 +48,26 @@ var walletInfoCmd = &cobra.Command{ return err } - // Get client connection - conf := new(internal.ClientSettings) - if err := viper.UnmarshalKey("client", conf); err != nil { - return err - } - if err := conf.Validate(); err != nil { - return err - } - conn, err := getClientConnection(conf) + // Get network client + cl, err := getAlgoClient() if err != nil { - return fmt.Errorf("failed to establish connection: %w", err) + return err } - defer func() { - _ = conn.Close() - }() - cl := protoV1.NewAgentAPIClient(conn) // Get account info - info, err := cl.AccountInformation(context.Background(), &protoV1.AccountInformationRequest{ - Address: account.Address.String(), - Protocol: "algorand", - Network: "testnet", - }) + info, err := cl.AccountInformation(account.Address.String()) if err != nil { return err } // Print results fmt.Printf("address: %s\n", account.Address.String()) + fmt.Printf("public key: %x\n", account.PublicKey) fmt.Printf("status: %s\n", info.Status) - fmt.Printf("current balance: %d\n", info.Balance) + fmt.Printf("round: %d\n", info.Round) + fmt.Printf("current balance: %d\n", info.Amount) fmt.Printf("pending rewards: %d\n", info.PendingRewards) - fmt.Printf("total rewards: %d\n", info.TotalRewards) - for _, pt := range info.PendingTransactions { - fmt.Printf("pending transaction. amount: %d, to: %s\n", pt.Amount, pt.Receiver) - } + fmt.Printf("total rewards: %d\n", info.Rewards) return nil }, } diff --git a/client/cli/cmd/wallet_pay.go b/client/cli/cmd/wallet_pay.go index 323d106..2a6317c 100644 --- a/client/cli/cmd/wallet_pay.go +++ b/client/cli/cmd/wallet_pay.go @@ -1,23 +1,16 @@ package cmd import ( - "context" "encoding/base64" - "encoding/json" - "fmt" "strconv" - ac "github.com/algorand/go-algorand-sdk/crypto" - "github.com/algorand/go-algorand-sdk/future" - "github.com/algorand/go-algorand-sdk/mnemonic" - at "github.com/algorand/go-algorand-sdk/types" - "github.com/algorandfoundation/did-algo/client/internal" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" + "github.com/algorand/go-algorand-sdk/v2/transaction" "github.com/kennygrant/sanitize" "github.com/spf13/cobra" "github.com/spf13/viper" "go.bryk.io/pkg/cli" - "google.golang.org/protobuf/types/known/emptypb" ) var walletPayCmd = &cobra.Command{ @@ -46,7 +39,7 @@ func init() { }, { Name: "submit", - Usage: "Submit transaction to the network", + Usage: "Submit transaction to the network (based on your active profile)", FlagKey: "tx.submit", ByDefault: false, Short: "s", @@ -58,7 +51,7 @@ func init() { walletCmd.AddCommand(walletPayCmd) } -func runWalletPayCmd(cmd *cobra.Command, args []string) (err error) { +func runWalletPayCmd(_ *cobra.Command, args []string) (err error) { // Get parameters wallet, receiver, amount, err := getTxParameters(args) if err != nil { @@ -91,38 +84,20 @@ func runWalletPayCmd(cmd *cobra.Command, args []string) (err error) { return err } - // Get client connection - conf := new(internal.ClientSettings) - if err := viper.UnmarshalKey("client", conf); err != nil { - return err - } - if err := conf.Validate(); err != nil { - return err - } - conn, err := getClientConnection(conf) + // Get network client + cl, err := getAlgoClient() if err != nil { - return fmt.Errorf("failed to establish connection: %w", err) + return err } - defer func() { - _ = conn.Close() - }() - cl := protoV1.NewAgentAPIClient(conn) // Get transaction parameters - txParams, err := cl.TxParameters(context.Background(), &emptypb.Empty{}) - if err != nil { - return err - } - params := at.SuggestedParams{} - if err := json.Unmarshal(txParams.Params, ¶ms); err != nil { - return err - } + params, _ := cl.SuggestedParams() // Get sender address sender := account.Address.String() // Build transaction - tx, err := future.MakePaymentTxn(sender, receiver, uint64(amount), nil, "", params) + tx, err := transaction.MakePaymentTxn(sender, receiver, uint64(amount), nil, "", params) if err != nil { return err } @@ -140,13 +115,11 @@ func runWalletPayCmd(cmd *cobra.Command, args []string) (err error) { // Submit transaction log.Debug("submitting signed transaction") - tr, err := cl.TxSubmit(context.TODO(), &protoV1.TxSubmitRequest{ - Stx: stx, - }) + txID, err := cl.SubmitTx(stx) if err != nil { return err } - log.Infof("transaction successfully submitted with id: %s", tr.Id) + log.Infof("transaction successfully submitted with id: %s", txID) return nil } diff --git a/client/cli/cmd/wallet_rename.go b/client/cli/cmd/wallet_rename.go index 48a8215..ff895cf 100644 --- a/client/cli/cmd/wallet_rename.go +++ b/client/cli/cmd/wallet_rename.go @@ -42,5 +42,5 @@ var walletRenameCmd = &cobra.Command{ } func init() { - walletCmd.AddCommand(walletRenameCmd) + // walletCmd.AddCommand(walletRenameCmd) } diff --git a/client/cli/cmd/wallet_restore.go b/client/cli/cmd/wallet_restore.go index 6021ec1..4d975b0 100644 --- a/client/cli/cmd/wallet_restore.go +++ b/client/cli/cmd/wallet_restore.go @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - ac "github.com/algorand/go-algorand-sdk/crypto" - "github.com/algorand/go-algorand-sdk/mnemonic" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" "github.com/kennygrant/sanitize" "github.com/spf13/cobra" xlog "go.bryk.io/pkg/log" diff --git a/client/cli/cmd/wallet_watch.go b/client/cli/cmd/wallet_watch.go deleted file mode 100644 index 45c0fd0..0000000 --- a/client/cli/cmd/wallet_watch.go +++ /dev/null @@ -1,115 +0,0 @@ -package cmd - -import ( - "context" - "encoding/json" - "errors" - "fmt" - - "github.com/algorandfoundation/did-algo/client/internal" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "go.bryk.io/pkg/cli" -) - -var walletWatchCmd = &cobra.Command{ - Use: "watch", - Short: "Monitor your wallet's activity", - Aliases: []string{"mon", "monitor"}, - Example: "algoid wallet watch [algo-address]", - RunE: runWalletWatchCmd, - Long: `Monitor your wallet's activity. - -You'll be able to receive near real-time notifications about -every transaction involving a given address.`, -} - -func init() { - params := []cli.Param{ - { - Name: "interval", - Usage: "Interval (in seconds) between activity checks", - FlagKey: "watch.interval", - ByDefault: 5, - Short: "n", - }, - } - if err := cli.SetupCommandParams(walletWatchCmd, params, viper.GetViper()); err != nil { - panic(err) - } - walletCmd.AddCommand(walletWatchCmd) -} - -func runWalletWatchCmd(_ *cobra.Command, args []string) (err error) { - // Get required parameters - if len(args) != 1 { - return errors.New("you must specify and address to monitor") - } - address := args[0] - - // Get client connection - conf := new(internal.ClientSettings) - if err := viper.UnmarshalKey("client", conf); err != nil { - return err - } - if err := conf.Validate(); err != nil { - return err - } - conn, err := getClientConnection(conf) - if err != nil { - return fmt.Errorf("failed to establish connection: %w", err) - } - defer func() { - _ = conn.Close() - }() - cl := protoV1.NewAgentAPIClient(conn) - - // Open activity monitor - log.Info("starting monitor (press 'q + Enter' to exit)...") - ctx, halt := context.WithCancel(context.Background()) - defer halt() - monitor, err := cl.AccountActivity(ctx, &protoV1.AccountActivityRequest{Address: address}) - if err != nil { - return fmt.Errorf("failed to open account monitor: %w", err) - } - - // Wait for user input in the background - input := make(chan struct{}) - go func() { - var signal string - for { - if _, _ = fmt.Scanln(&signal); signal == "q" { - input <- struct{}{} - close(input) - return - } - } - }() - - // Wait for monitor activity in the background - go func() { - for { - record, err := monitor.Recv() - if err != nil { - log.Debug("closing monitor loop") - return - } - data, _ := json.Marshal(record) - fmt.Printf("%s\n", data) - } - }() - - // Wait for stop signals - defer log.Info("monitor closed") - for { - select { - case <-monitor.Context().Done(): - halt() - return nil - case <-input: - halt() - return nil - } - } -} diff --git a/client/internal/contracts.go b/client/internal/contracts.go new file mode 100644 index 0000000..8fb0f2b --- /dev/null +++ b/client/internal/contracts.go @@ -0,0 +1,60 @@ +package internal + +import ( + "embed" + "encoding/json" + "io" + "io/fs" + + "github.com/algorand/go-algorand-sdk/v2/abi" +) + +// References: +// https://developer.algorand.org/docs/get-details/encoding/ + +// StorageContracts contains the pre-compiled smart contracts to +// support AlgoDID's on-chain storage. +var StorageContracts fs.FS + +//go:embed contracts +var dist embed.FS + +var ( + approvalTeal []byte + clearTeal []byte +) + +func init() { + StorageContracts, _ = fs.Sub(dist, "contracts") + + // load approval program + approvalFile, err := StorageContracts.Open("AlgoDID.approval.teal") + if err != nil { + panic(err) + } + approvalTeal, err = io.ReadAll(approvalFile) + if err != nil { + panic(err) + } + _ = approvalFile.Close() + + // load clear program + clearFile, err := StorageContracts.Open("AlgoDID.clear.teal") + if err != nil { + panic(err) + } + clearTeal, err = io.ReadAll(clearFile) + if err != nil { + panic(err) + } + _ = clearFile.Close() +} + +func loadContract() *abi.Contract { + abiFile, _ := StorageContracts.Open("AlgoDID.abi.json") + abiContents, _ := io.ReadAll(abiFile) + contract := &abi.Contract{} + _ = json.Unmarshal(abiContents, contract) + _ = abiFile.Close() + return contract +} diff --git a/client/internal/contracts/AlgoDID.abi.json b/client/internal/contracts/AlgoDID.abi.json new file mode 100644 index 0000000..0b24dea --- /dev/null +++ b/client/internal/contracts/AlgoDID.abi.json @@ -0,0 +1,143 @@ +{ + "name": "AlgoDID", + "desc": "", + "methods": [ + { + "name": "startUpload", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The pubkey of the DID" + }, + { + "name": "numBoxes", + "type": "uint64", + "desc": "The number of boxes that the data will take up" + }, + { + "name": "endBoxSize", + "type": "uint64", + "desc": "The size of the last box" + }, + { + "name": "mbrPayment", + "type": "pay", + "desc": "Payment from the uploader to cover the box MBR" + } + ], + "desc": "Allocate boxes to begin data upload process", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "upload", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The pubkey of the DID" + }, + { + "name": "boxIndex", + "type": "uint64", + "desc": "The index of the box to upload the given chunk of data to" + }, + { + "name": "offset", + "type": "uint64", + "desc": "The offset within the box to start writing the data" + }, + { + "name": "data", + "type": "byte[]", + "desc": "The data to write" + } + ], + "desc": "Upload data to a specific offset in a box", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "finishUpload", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The address of the DID" + } + ], + "desc": "Mark uploading as false", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "startDelete", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The address of the DID" + } + ], + "desc": "Starts the deletion process for the data associated with a DID", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "deleteData", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The address of the DID" + }, + { + "name": "boxIndex", + "type": "uint64", + "desc": "The index of the box to delete" + } + ], + "desc": "Deletes a box of data", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "updateApplication", + "args": [], + "desc": "Allow the contract to be updated by the creator", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "dummy", + "args": [], + "desc": "Dummy function to add extra box references for deleteData.Boxes are 32k, but a single app call can only include enough references to read/write 8kat a time. Thus when a box is deleted, we need to add additional dummy calls with boxreferences to increase the total read/write budget to 32k.", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "createApplication", + "desc": "", + "returns": { + "type": "void", + "desc": "" + }, + "args": [] + } + ] +} \ No newline at end of file diff --git a/client/internal/contracts/AlgoDID.approval.teal b/client/internal/contracts/AlgoDID.approval.teal new file mode 100644 index 0000000..3af3889 --- /dev/null +++ b/client/internal/contracts/AlgoDID.approval.teal @@ -0,0 +1,662 @@ +#pragma version 9 + +// This TEAL was generated by TEALScript v0.51.1 +// https://github.com/algorand-devrel/TEALScript + +// This contract is compliant with and/or implements the following ARCs: [ ARC4 ] + +// The following ten lines of TEAL handle initial program flow +// This pattern is used to make it easy for anyone to parse the start of the program and determine if a specific action is allowed +// Here, action refers to the OnComplete in combination with whether the app is being created or called +// Every possible action for this contract is represented in the switch statement +// If the action is not implmented in the contract, its repsective branch will be "NOT_IMPLMENTED" which just contains "err" +txn ApplicationID +int 0 +> +int 6 +* +txn OnCompletion ++ +switch create_NoOp NOT_IMPLEMENTED NOT_IMPLEMENTED NOT_IMPLEMENTED NOT_IMPLEMENTED NOT_IMPLEMENTED call_NoOp NOT_IMPLEMENTED NOT_IMPLEMENTED NOT_IMPLEMENTED call_UpdateApplication + +NOT_IMPLEMENTED: + err + +// startUpload(pay,uint64,uint64,address)void +// +// +// Allocate boxes to begin data upload process +// +// @param pubKey The pubkey of the DID +// @param numBoxes The number of boxes that the data will take up +// @param endBoxSize The size of the last box +// @param mbrPayment Payment from the uploader to cover the box MBR +abi_route_startUpload: + byte 0x; dupn 3 // push empty bytes to fill the stack frame for this subroutine's local variables + + // mbrPayment: pay + txn GroupIndex + int 1 + - + dup + gtxns TypeEnum + int pay + == + assert + + // endBoxSize: uint64 + txna ApplicationArgs 3 + btoi + + // numBoxes: uint64 + txna ApplicationArgs 2 + btoi + + // pubKey: address + txna ApplicationArgs 1 + dup + len + int 32 + == + assert + + // execute startUpload(pay,uint64,uint64,address)void + callsub startUpload + int 1 + return + +startUpload: + proto 8 0 + + // contracts/algo-did.algo.ts:64 + // assert(this.txn.sender === globals.creatorAddress) + txn Sender + global CreatorAddress + == + assert + + // contracts/algo-did.algo.ts:66 + // startBox = this.currentIndex.value + byte 0x63757272656e74496e646578 // "currentIndex" + app_global_get + frame_bury -5 // startBox: uint64 + + // contracts/algo-did.algo.ts:67 + // endBox = startBox + numBoxes - 1 + frame_dig -5 // startBox: uint64 + frame_dig -2 // numBoxes: uint64 + + + int 1 + - + frame_bury -6 // endBox: uint64 + + // contracts/algo-did.algo.ts:69 + // metadata: Metadata = { + // start: startBox, + // end: endBox, + // status: UPLOADING, + // endSize: endBoxSize, + // lastDeleted: 0, + // } + frame_dig -5 // startBox: uint64 + itob + frame_dig -6 // endBox: uint64 + itob + concat + byte 0x00 + byte 0x00 + bitlen + int 8 + <= + assert + byte 0xFF + b& + concat + frame_dig -3 // endBoxSize: uint64 + itob + concat + byte 0x0000000000000000 + concat + frame_bury -7 // metadata: Metadata + + // contracts/algo-did.algo.ts:77 + // assert(!this.metadata(pubKey).exists) + frame_dig -1 // pubKey: address + box_len + swap + pop + ! + assert + + // contracts/algo-did.algo.ts:79 + // this.metadata(pubKey).value = metadata + frame_dig -1 // pubKey: address + frame_dig -7 // metadata: Metadata + box_put + + // contracts/algo-did.algo.ts:81 + // this.currentIndex.value = endBox + 1 + byte 0x63757272656e74496e646578 // "currentIndex" + frame_dig -6 // endBox: uint64 + int 1 + + + app_global_put + + // contracts/algo-did.algo.ts:83 + // totalCost = numBoxes * COST_PER_BOX + // cost of data boxes + // (numBoxes - 1) * MAX_BOX_SIZE * COST_PER_BYTE + // cost of data + // numBoxes * 8 * COST_PER_BYTE + // cost of data keys + // endBoxSize * COST_PER_BYTE + // cost of last data box + // COST_PER_BOX + + // (8 + 8 + 1 + 8 + 32 + 8) * COST_PER_BYTE + frame_dig -2 // numBoxes: uint64 + int 2500 + * + frame_dig -2 // numBoxes: uint64 + int 1 + - + int 32768 + * + int 400 + * + + + frame_dig -2 // numBoxes: uint64 + int 8 + * + int 400 + * + + + frame_dig -3 // endBoxSize: uint64 + int 400 + * + + + int 2500 + + + int 26000 + + + frame_bury -8 // totalCost: uint64 + + // contracts/algo-did.algo.ts:90 + // assert(mbrPayment.amount === totalCost) + frame_dig -4 // mbrPayment: pay + gtxns Amount + frame_dig -8 // totalCost: uint64 + == + assert + + // contracts/algo-did.algo.ts:91 + // assert(mbrPayment.receiver === this.app.address) + frame_dig -4 // mbrPayment: pay + gtxns Receiver + global CurrentApplicationAddress + == + assert + retsub + +// upload(bytes,uint64,uint64,address)void +// +// +// Upload data to a specific offset in a box +// +// @param pubKey The pubkey of the DID +// @param boxIndex The index of the box to upload the given chunk of data to +// @param offset The offset within the box to start writing the data +// @param data The data to write +abi_route_upload: + byte 0x // push empty bytes to fill the stack frame for this subroutine's local variables + + // data: byte[] + txna ApplicationArgs 4 + extract 2 0 + + // offset: uint64 + txna ApplicationArgs 3 + btoi + + // boxIndex: uint64 + txna ApplicationArgs 2 + btoi + + // pubKey: address + txna ApplicationArgs 1 + dup + len + int 32 + == + assert + + // execute upload(bytes,uint64,uint64,address)void + callsub upload + int 1 + return + +upload: + proto 5 0 + + // contracts/algo-did.algo.ts:104 + // assert(this.txn.sender === globals.creatorAddress) + txn Sender + global CreatorAddress + == + assert + + // contracts/algo-did.algo.ts:106 + // metadata = this.metadata(pubKey).value + frame_dig -1 // pubKey: address + frame_bury -5 // storage key//metadata + + // contracts/algo-did.algo.ts:107 + // assert(metadata.status === UPLOADING) + frame_dig -5 // storage key//metadata + box_get + assert + extract 16 1 + byte 0x0000000000000000 + b== + assert + + // contracts/algo-did.algo.ts:108 + // assert(metadata.start <= boxIndex && boxIndex <= metadata.end) + frame_dig -5 // storage key//metadata + box_get + assert + extract 0 8 + btoi + frame_dig -2 // boxIndex: uint64 + <= + dup + bz skip_and0 + frame_dig -2 // boxIndex: uint64 + frame_dig -5 // storage key//metadata + box_get + assert + extract 8 8 + btoi + <= + && + +skip_and0: + assert + + // if0_condition + // contracts/algo-did.algo.ts:110 + // offset === 0 + frame_dig -3 // offset: uint64 + int 0 + == + bz if0_end + + // if0_consequent + // contracts/algo-did.algo.ts:111 + // this.dataBoxes(boxIndex).create( + // boxIndex === metadata.end ? metadata.endSize : MAX_BOX_SIZE, + // ) + frame_dig -2 // boxIndex: uint64 + itob + frame_dig -2 // boxIndex: uint64 + frame_dig -5 // storage key//metadata + box_get + assert + extract 8 8 + btoi + == + bz ternary0_false + frame_dig -5 // storage key//metadata + box_get + assert + extract 17 8 + btoi + b ternary0_end + +ternary0_false: + int 32768 + +ternary0_end: + box_create + +if0_end: + // contracts/algo-did.algo.ts:116 + // this.dataBoxes(boxIndex).replace(offset, data) + frame_dig -2 // boxIndex: uint64 + itob + frame_dig -3 // offset: uint64 + frame_dig -4 // data: bytes + box_replace + retsub + +// finishUpload(address)void +// +// +// Mark uploading as false +// +// @param pubKey The address of the DID +abi_route_finishUpload: + // pubKey: address + txna ApplicationArgs 1 + dup + len + int 32 + == + assert + + // execute finishUpload(address)void + callsub finishUpload + int 1 + return + +finishUpload: + proto 1 0 + + // contracts/algo-did.algo.ts:126 + // assert(this.txn.sender === globals.creatorAddress) + txn Sender + global CreatorAddress + == + assert + + // contracts/algo-did.algo.ts:128 + // this.metadata(pubKey).value.status = READY + frame_dig -1 // pubKey: address + int 16 + byte 0x01 + box_replace + retsub + +// startDelete(address)void +// +// Starts the deletion process for the data associated with a DID +// +// @param pubKey The address of the DID +abi_route_startDelete: + byte 0x // push empty bytes to fill the stack frame for this subroutine's local variables + + // pubKey: address + txna ApplicationArgs 1 + dup + len + int 32 + == + assert + + // execute startDelete(address)void + callsub startDelete + int 1 + return + +startDelete: + proto 2 0 + + // contracts/algo-did.algo.ts:137 + // assert(this.txn.sender === globals.creatorAddress) + txn Sender + global CreatorAddress + == + assert + + // contracts/algo-did.algo.ts:139 + // metadata = this.metadata(pubKey).value + frame_dig -1 // pubKey: address + frame_bury -2 // storage key//metadata + + // contracts/algo-did.algo.ts:140 + // assert(metadata.status === READY) + frame_dig -2 // storage key//metadata + box_get + assert + extract 16 1 + byte 0x0000000000000001 + b== + assert + + // contracts/algo-did.algo.ts:142 + // metadata.status = DELETING + frame_dig -2 // storage key//metadata + box_get + assert + byte 0x02 + replace2 16 + frame_dig -2 // storage key//metadata + swap + box_put + retsub + +// deleteData(uint64,address)void +// +// Deletes a box of data +// +// @param pubKey The address of the DID +// @param boxIndex The index of the box to delete +abi_route_deleteData: + byte 0x; dup // push empty bytes to fill the stack frame for this subroutine's local variables + + // boxIndex: uint64 + txna ApplicationArgs 2 + btoi + + // pubKey: address + txna ApplicationArgs 1 + dup + len + int 32 + == + assert + + // execute deleteData(uint64,address)void + callsub deleteData + int 1 + return + +deleteData: + proto 4 0 + + // contracts/algo-did.algo.ts:152 + // assert(this.txn.sender === globals.creatorAddress) + txn Sender + global CreatorAddress + == + assert + + // contracts/algo-did.algo.ts:154 + // metadata = this.metadata(pubKey).value + frame_dig -1 // pubKey: address + frame_bury -3 // storage key//metadata + + // contracts/algo-did.algo.ts:155 + // assert(metadata.status === DELETING) + frame_dig -3 // storage key//metadata + box_get + assert + extract 16 1 + byte 0x0000000000000002 + b== + assert + + // contracts/algo-did.algo.ts:156 + // assert(metadata.start <= boxIndex && boxIndex <= metadata.end) + frame_dig -3 // storage key//metadata + box_get + assert + extract 0 8 + btoi + frame_dig -2 // boxIndex: uint64 + <= + dup + bz skip_and1 + frame_dig -2 // boxIndex: uint64 + frame_dig -3 // storage key//metadata + box_get + assert + extract 8 8 + btoi + <= + && + +skip_and1: + assert + + // if1_condition + // contracts/algo-did.algo.ts:158 + // boxIndex !== metadata.start + frame_dig -2 // boxIndex: uint64 + frame_dig -3 // storage key//metadata + box_get + assert + extract 0 8 + btoi + != + bz if1_end + + // if1_consequent + // contracts/algo-did.algo.ts:159 + // assert(metadata.lastDeleted === boxIndex - 1) + frame_dig -3 // storage key//metadata + box_get + assert + extract 25 8 + btoi + frame_dig -2 // boxIndex: uint64 + int 1 + - + == + assert + +if1_end: + // contracts/algo-did.algo.ts:162 + // preMBR = globals.currentApplicationAddress.minBalance + global CurrentApplicationAddress + acct_params_get AcctMinBalance + assert + frame_bury -4 // preMBR: uint64 + + // contracts/algo-did.algo.ts:164 + // this.dataBoxes(boxIndex).delete() + frame_dig -2 // boxIndex: uint64 + itob + box_del + + // if2_condition + // contracts/algo-did.algo.ts:166 + // boxIndex === metadata.end + frame_dig -2 // boxIndex: uint64 + frame_dig -3 // storage key//metadata + box_get + assert + extract 8 8 + btoi + == + bz if2_else + + // if2_consequent + // contracts/algo-did.algo.ts:166 + // this.metadata(pubKey).delete() + frame_dig -1 // pubKey: address + box_del + b if2_end + +if2_else: + // contracts/algo-did.algo.ts:167 + // metadata.lastDeleted = boxIndex + frame_dig -3 // storage key//metadata + box_get + assert + frame_dig -2 // boxIndex: uint64 + itob + replace2 25 + frame_dig -3 // storage key//metadata + swap + box_put + +if2_end: + // contracts/algo-did.algo.ts:169 + // sendPayment({ + // amount: preMBR - globals.currentApplicationAddress.minBalance, + // receiver: this.txn.sender, + // }) + itxn_begin + int pay + itxn_field TypeEnum + + // contracts/algo-did.algo.ts:170 + // amount: preMBR - globals.currentApplicationAddress.minBalance + frame_dig -4 // preMBR: uint64 + global CurrentApplicationAddress + acct_params_get AcctMinBalance + assert + - + itxn_field Amount + + // contracts/algo-did.algo.ts:171 + // receiver: this.txn.sender + txn Sender + itxn_field Receiver + + // Fee field not set, defaulting to 0 + int 0 + itxn_field Fee + + // Submit inner transaction + itxn_submit + retsub + +// updateApplication()void +// +// Allow the contract to be updated by the creator +abi_route_updateApplication: + // execute updateApplication()void + callsub updateApplication + int 1 + return + +updateApplication: + proto 0 0 + + // contracts/algo-did.algo.ts:179 + // assert(this.txn.sender === globals.creatorAddress) + txn Sender + global CreatorAddress + == + assert + retsub + +// dummy()void +// +// Dummy function to add extra box references for deleteData. +// Boxes are 32k, but a single app call can only include enough references to read/write 8k +// at a time. Thus when a box is deleted, we need to add additional dummy calls with box +// references to increase the total read/write budget to 32k. +abi_route_dummy: + // execute dummy()void + callsub dummy + int 1 + return + +dummy: + proto 0 0 + retsub + +abi_route_createApplication: + int 1 + return + +create_NoOp: + method "createApplication()void" + txna ApplicationArgs 0 + match abi_route_createApplication + err + +call_NoOp: + method "startUpload(address,uint64,uint64,pay)void" + method "upload(address,uint64,uint64,byte[])void" + method "finishUpload(address)void" + method "startDelete(address)void" + method "deleteData(address,uint64)void" + method "dummy()void" + txna ApplicationArgs 0 + match abi_route_startUpload abi_route_upload abi_route_finishUpload abi_route_startDelete abi_route_deleteData abi_route_dummy + err + +call_UpdateApplication: + method "updateApplication()void" + txna ApplicationArgs 0 + match abi_route_updateApplication + err \ No newline at end of file diff --git a/client/internal/contracts/AlgoDID.clear.teal b/client/internal/contracts/AlgoDID.clear.teal new file mode 100644 index 0000000..6bbec50 --- /dev/null +++ b/client/internal/contracts/AlgoDID.clear.teal @@ -0,0 +1,2 @@ +#pragma version 9 +int 1 \ No newline at end of file diff --git a/client/internal/contracts/AlgoDID.json b/client/internal/contracts/AlgoDID.json new file mode 100644 index 0000000..2f2a1be --- /dev/null +++ b/client/internal/contracts/AlgoDID.json @@ -0,0 +1,223 @@ +{ + "hints": { + "startUpload(address,uint64,uint64,pay)void": { + "call_config": { + "no_op": "CALL" + } + }, + "upload(address,uint64,uint64,byte[])void": { + "call_config": { + "no_op": "CALL" + } + }, + "finishUpload(address)void": { + "call_config": { + "no_op": "CALL" + } + }, + "startDelete(address)void": { + "call_config": { + "no_op": "CALL" + } + }, + "deleteData(address,uint64)void": { + "call_config": { + "no_op": "CALL" + } + }, + "updateApplication()void": { + "call_config": { + "update_application": "CALL" + } + }, + "dummy()void": { + "call_config": { + "no_op": "CALL" + } + }, + "createApplication()void": { + "call_config": { + "no_op": "CREATE" + } + } + }, + "bare_call_config": { + "no_op": "NEVER", + "opt_in": "NEVER", + "close_out": "NEVER", + "update_application": "NEVER", + "delete_application": "NEVER" + }, + "schema": { + "local": { + "declared": {}, + "reserved": {} + }, + "global": { + "declared": { + "currentIndex": { + "type": "uint64", + "key": "currentIndex" + } + }, + "reserved": {} + } + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 1 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDkKCi8vIFRoaXMgVEVBTCB3YXMgZ2VuZXJhdGVkIGJ5IFRFQUxTY3JpcHQgdjAuNTEuMQovLyBodHRwczovL2dpdGh1Yi5jb20vYWxnb3JhbmQtZGV2cmVsL1RFQUxTY3JpcHQKCi8vIFRoaXMgY29udHJhY3QgaXMgY29tcGxpYW50IHdpdGggYW5kL29yIGltcGxlbWVudHMgdGhlIGZvbGxvd2luZyBBUkNzOiBbIEFSQzQgXQoKLy8gVGhlIGZvbGxvd2luZyB0ZW4gbGluZXMgb2YgVEVBTCBoYW5kbGUgaW5pdGlhbCBwcm9ncmFtIGZsb3cKLy8gVGhpcyBwYXR0ZXJuIGlzIHVzZWQgdG8gbWFrZSBpdCBlYXN5IGZvciBhbnlvbmUgdG8gcGFyc2UgdGhlIHN0YXJ0IG9mIHRoZSBwcm9ncmFtIGFuZCBkZXRlcm1pbmUgaWYgYSBzcGVjaWZpYyBhY3Rpb24gaXMgYWxsb3dlZAovLyBIZXJlLCBhY3Rpb24gcmVmZXJzIHRvIHRoZSBPbkNvbXBsZXRlIGluIGNvbWJpbmF0aW9uIHdpdGggd2hldGhlciB0aGUgYXBwIGlzIGJlaW5nIGNyZWF0ZWQgb3IgY2FsbGVkCi8vIEV2ZXJ5IHBvc3NpYmxlIGFjdGlvbiBmb3IgdGhpcyBjb250cmFjdCBpcyByZXByZXNlbnRlZCBpbiB0aGUgc3dpdGNoIHN0YXRlbWVudAovLyBJZiB0aGUgYWN0aW9uIGlzIG5vdCBpbXBsbWVudGVkIGluIHRoZSBjb250cmFjdCwgaXRzIHJlcHNlY3RpdmUgYnJhbmNoIHdpbGwgYmUgIk5PVF9JTVBMTUVOVEVEIiB3aGljaCBqdXN0IGNvbnRhaW5zICJlcnIiCnR4biBBcHBsaWNhdGlvbklECmludCAwCj4KaW50IDYKKgp0eG4gT25Db21wbGV0aW9uCisKc3dpdGNoIGNyZWF0ZV9Ob09wIE5PVF9JTVBMRU1FTlRFRCBOT1RfSU1QTEVNRU5URUQgTk9UX0lNUExFTUVOVEVEIE5PVF9JTVBMRU1FTlRFRCBOT1RfSU1QTEVNRU5URUQgY2FsbF9Ob09wIE5PVF9JTVBMRU1FTlRFRCBOT1RfSU1QTEVNRU5URUQgTk9UX0lNUExFTUVOVEVEIGNhbGxfVXBkYXRlQXBwbGljYXRpb24KCk5PVF9JTVBMRU1FTlRFRDoKCWVycgoKLy8gc3RhcnRVcGxvYWQocGF5LHVpbnQ2NCx1aW50NjQsYWRkcmVzcyl2b2lkCi8vCi8vIAovLyBBbGxvY2F0ZSBib3hlcyB0byBiZWdpbiBkYXRhIHVwbG9hZCBwcm9jZXNzCi8vIAovLyBAcGFyYW0gcHViS2V5IFRoZSBwdWJrZXkgb2YgdGhlIERJRAovLyBAcGFyYW0gbnVtQm94ZXMgVGhlIG51bWJlciBvZiBib3hlcyB0aGF0IHRoZSBkYXRhIHdpbGwgdGFrZSB1cAovLyBAcGFyYW0gZW5kQm94U2l6ZSBUaGUgc2l6ZSBvZiB0aGUgbGFzdCBib3gKLy8gQHBhcmFtIG1iclBheW1lbnQgUGF5bWVudCBmcm9tIHRoZSB1cGxvYWRlciB0byBjb3ZlciB0aGUgYm94IE1CUgphYmlfcm91dGVfc3RhcnRVcGxvYWQ6CglieXRlIDB4OyBkdXBuIDMgLy8gcHVzaCBlbXB0eSBieXRlcyB0byBmaWxsIHRoZSBzdGFjayBmcmFtZSBmb3IgdGhpcyBzdWJyb3V0aW5lJ3MgbG9jYWwgdmFyaWFibGVzCgoJLy8gbWJyUGF5bWVudDogcGF5Cgl0eG4gR3JvdXBJbmRleAoJaW50IDEKCS0KCWR1cAoJZ3R4bnMgVHlwZUVudW0KCWludCBwYXkKCT09Cglhc3NlcnQKCgkvLyBlbmRCb3hTaXplOiB1aW50NjQKCXR4bmEgQXBwbGljYXRpb25BcmdzIDMKCWJ0b2kKCgkvLyBudW1Cb3hlczogdWludDY0Cgl0eG5hIEFwcGxpY2F0aW9uQXJncyAyCglidG9pCgoJLy8gcHViS2V5OiBhZGRyZXNzCgl0eG5hIEFwcGxpY2F0aW9uQXJncyAxCglkdXAKCWxlbgoJaW50IDMyCgk9PQoJYXNzZXJ0CgoJLy8gZXhlY3V0ZSBzdGFydFVwbG9hZChwYXksdWludDY0LHVpbnQ2NCxhZGRyZXNzKXZvaWQKCWNhbGxzdWIgc3RhcnRVcGxvYWQKCWludCAxCglyZXR1cm4KCnN0YXJ0VXBsb2FkOgoJcHJvdG8gOCAwCgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6NjQKCS8vIGFzc2VydCh0aGlzLnR4bi5zZW5kZXIgPT09IGdsb2JhbHMuY3JlYXRvckFkZHJlc3MpCgl0eG4gU2VuZGVyCglnbG9iYWwgQ3JlYXRvckFkZHJlc3MKCT09Cglhc3NlcnQKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czo2NgoJLy8gc3RhcnRCb3ggPSB0aGlzLmN1cnJlbnRJbmRleC52YWx1ZQoJYnl0ZSAweDYzNzU3MjcyNjU2ZTc0NDk2ZTY0NjU3OCAvLyAiY3VycmVudEluZGV4IgoJYXBwX2dsb2JhbF9nZXQKCWZyYW1lX2J1cnkgLTUgLy8gc3RhcnRCb3g6IHVpbnQ2NAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjY3CgkvLyBlbmRCb3ggPSBzdGFydEJveCArIG51bUJveGVzIC0gMQoJZnJhbWVfZGlnIC01IC8vIHN0YXJ0Qm94OiB1aW50NjQKCWZyYW1lX2RpZyAtMiAvLyBudW1Cb3hlczogdWludDY0CgkrCglpbnQgMQoJLQoJZnJhbWVfYnVyeSAtNiAvLyBlbmRCb3g6IHVpbnQ2NAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjY5CgkvLyBtZXRhZGF0YTogTWV0YWRhdGEgPSB7CgkvLyAgICAgICBzdGFydDogc3RhcnRCb3gsCgkvLyAgICAgICBlbmQ6IGVuZEJveCwKCS8vICAgICAgIHN0YXR1czogVVBMT0FESU5HLAoJLy8gICAgICAgZW5kU2l6ZTogZW5kQm94U2l6ZSwKCS8vICAgICAgIGxhc3REZWxldGVkOiAwLAoJLy8gICAgIH0KCWZyYW1lX2RpZyAtNSAvLyBzdGFydEJveDogdWludDY0CglpdG9iCglmcmFtZV9kaWcgLTYgLy8gZW5kQm94OiB1aW50NjQKCWl0b2IKCWNvbmNhdAoJYnl0ZSAweDAwCglieXRlIDB4MDAKCWJpdGxlbgoJaW50IDgKCTw9Cglhc3NlcnQKCWJ5dGUgMHhGRgoJYiYKCWNvbmNhdAoJZnJhbWVfZGlnIC0zIC8vIGVuZEJveFNpemU6IHVpbnQ2NAoJaXRvYgoJY29uY2F0CglieXRlIDB4MDAwMDAwMDAwMDAwMDAwMAoJY29uY2F0CglmcmFtZV9idXJ5IC03IC8vIG1ldGFkYXRhOiBNZXRhZGF0YQoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjc3CgkvLyBhc3NlcnQoIXRoaXMubWV0YWRhdGEocHViS2V5KS5leGlzdHMpCglmcmFtZV9kaWcgLTEgLy8gcHViS2V5OiBhZGRyZXNzCglib3hfbGVuCglzd2FwCglwb3AKCSEKCWFzc2VydAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjc5CgkvLyB0aGlzLm1ldGFkYXRhKHB1YktleSkudmFsdWUgPSBtZXRhZGF0YQoJZnJhbWVfZGlnIC0xIC8vIHB1YktleTogYWRkcmVzcwoJZnJhbWVfZGlnIC03IC8vIG1ldGFkYXRhOiBNZXRhZGF0YQoJYm94X3B1dAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjgxCgkvLyB0aGlzLmN1cnJlbnRJbmRleC52YWx1ZSA9IGVuZEJveCArIDEKCWJ5dGUgMHg2Mzc1NzI3MjY1NmU3NDQ5NmU2NDY1NzggLy8gImN1cnJlbnRJbmRleCIKCWZyYW1lX2RpZyAtNiAvLyBlbmRCb3g6IHVpbnQ2NAoJaW50IDEKCSsKCWFwcF9nbG9iYWxfcHV0CgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6ODMKCS8vIHRvdGFsQ29zdCA9IG51bUJveGVzICogQ09TVF9QRVJfQk9YICsgLy8gY29zdCBvZiBkYXRhIGJveGVzCgkvLyAgICAgICAobnVtQm94ZXMgLSAxKSAqIE1BWF9CT1hfU0laRSAqIENPU1RfUEVSX0JZVEUgKyAvLyBjb3N0IG9mIGRhdGEKCS8vICAgICAgIG51bUJveGVzICogOCAqIENPU1RfUEVSX0JZVEUgKyAvLyBjb3N0IG9mIGRhdGEga2V5cwoJLy8gICAgICAgZW5kQm94U2l6ZSAqIENPU1RfUEVSX0JZVEUgKyAvLyBjb3N0IG9mIGxhc3QgZGF0YSBib3gKCS8vICAgICAgIENPU1RfUEVSX0JPWCArCgkvLyAgICAgICAoOCArIDggKyAxICsgOCArIDMyICsgOCkgKiBDT1NUX1BFUl9CWVRFCglmcmFtZV9kaWcgLTIgLy8gbnVtQm94ZXM6IHVpbnQ2NAoJaW50IDI1MDAKCSoKCWZyYW1lX2RpZyAtMiAvLyBudW1Cb3hlczogdWludDY0CglpbnQgMQoJLQoJaW50IDMyNzY4CgkqCglpbnQgNDAwCgkqCgkrCglmcmFtZV9kaWcgLTIgLy8gbnVtQm94ZXM6IHVpbnQ2NAoJaW50IDgKCSoKCWludCA0MDAKCSoKCSsKCWZyYW1lX2RpZyAtMyAvLyBlbmRCb3hTaXplOiB1aW50NjQKCWludCA0MDAKCSoKCSsKCWludCAyNTAwCgkrCglpbnQgMjYwMDAKCSsKCWZyYW1lX2J1cnkgLTggLy8gdG90YWxDb3N0OiB1aW50NjQKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czo5MAoJLy8gYXNzZXJ0KG1iclBheW1lbnQuYW1vdW50ID09PSB0b3RhbENvc3QpCglmcmFtZV9kaWcgLTQgLy8gbWJyUGF5bWVudDogcGF5CglndHhucyBBbW91bnQKCWZyYW1lX2RpZyAtOCAvLyB0b3RhbENvc3Q6IHVpbnQ2NAoJPT0KCWFzc2VydAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjkxCgkvLyBhc3NlcnQobWJyUGF5bWVudC5yZWNlaXZlciA9PT0gdGhpcy5hcHAuYWRkcmVzcykKCWZyYW1lX2RpZyAtNCAvLyBtYnJQYXltZW50OiBwYXkKCWd0eG5zIFJlY2VpdmVyCglnbG9iYWwgQ3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcwoJPT0KCWFzc2VydAoJcmV0c3ViCgovLyB1cGxvYWQoYnl0ZXMsdWludDY0LHVpbnQ2NCxhZGRyZXNzKXZvaWQKLy8KLy8gCi8vIFVwbG9hZCBkYXRhIHRvIGEgc3BlY2lmaWMgb2Zmc2V0IGluIGEgYm94Ci8vIAovLyBAcGFyYW0gcHViS2V5IFRoZSBwdWJrZXkgb2YgdGhlIERJRAovLyBAcGFyYW0gYm94SW5kZXggVGhlIGluZGV4IG9mIHRoZSBib3ggdG8gdXBsb2FkIHRoZSBnaXZlbiBjaHVuayBvZiBkYXRhIHRvCi8vIEBwYXJhbSBvZmZzZXQgVGhlIG9mZnNldCB3aXRoaW4gdGhlIGJveCB0byBzdGFydCB3cml0aW5nIHRoZSBkYXRhCi8vIEBwYXJhbSBkYXRhIFRoZSBkYXRhIHRvIHdyaXRlCmFiaV9yb3V0ZV91cGxvYWQ6CglieXRlIDB4IC8vIHB1c2ggZW1wdHkgYnl0ZXMgdG8gZmlsbCB0aGUgc3RhY2sgZnJhbWUgZm9yIHRoaXMgc3Vicm91dGluZSdzIGxvY2FsIHZhcmlhYmxlcwoKCS8vIGRhdGE6IGJ5dGVbXQoJdHhuYSBBcHBsaWNhdGlvbkFyZ3MgNAoJZXh0cmFjdCAyIDAKCgkvLyBvZmZzZXQ6IHVpbnQ2NAoJdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwoJYnRvaQoKCS8vIGJveEluZGV4OiB1aW50NjQKCXR4bmEgQXBwbGljYXRpb25BcmdzIDIKCWJ0b2kKCgkvLyBwdWJLZXk6IGFkZHJlc3MKCXR4bmEgQXBwbGljYXRpb25BcmdzIDEKCWR1cAoJbGVuCglpbnQgMzIKCT09Cglhc3NlcnQKCgkvLyBleGVjdXRlIHVwbG9hZChieXRlcyx1aW50NjQsdWludDY0LGFkZHJlc3Mpdm9pZAoJY2FsbHN1YiB1cGxvYWQKCWludCAxCglyZXR1cm4KCnVwbG9hZDoKCXByb3RvIDUgMAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjEwNAoJLy8gYXNzZXJ0KHRoaXMudHhuLnNlbmRlciA9PT0gZ2xvYmFscy5jcmVhdG9yQWRkcmVzcykKCXR4biBTZW5kZXIKCWdsb2JhbCBDcmVhdG9yQWRkcmVzcwoJPT0KCWFzc2VydAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjEwNgoJLy8gbWV0YWRhdGEgPSB0aGlzLm1ldGFkYXRhKHB1YktleSkudmFsdWUKCWZyYW1lX2RpZyAtMSAvLyBwdWJLZXk6IGFkZHJlc3MKCWZyYW1lX2J1cnkgLTUgLy8gc3RvcmFnZSBrZXkvL21ldGFkYXRhCgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTA3CgkvLyBhc3NlcnQobWV0YWRhdGEuc3RhdHVzID09PSBVUExPQURJTkcpCglmcmFtZV9kaWcgLTUgLy8gc3RvcmFnZSBrZXkvL21ldGFkYXRhCglib3hfZ2V0Cglhc3NlcnQKCWV4dHJhY3QgMTYgMQoJYnl0ZSAweDAwMDAwMDAwMDAwMDAwMDAKCWI9PQoJYXNzZXJ0CgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTA4CgkvLyBhc3NlcnQobWV0YWRhdGEuc3RhcnQgPD0gYm94SW5kZXggJiYgYm94SW5kZXggPD0gbWV0YWRhdGEuZW5kKQoJZnJhbWVfZGlnIC01IC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJYm94X2dldAoJYXNzZXJ0CglleHRyYWN0IDAgOAoJYnRvaQoJZnJhbWVfZGlnIC0yIC8vIGJveEluZGV4OiB1aW50NjQKCTw9CglkdXAKCWJ6IHNraXBfYW5kMAoJZnJhbWVfZGlnIC0yIC8vIGJveEluZGV4OiB1aW50NjQKCWZyYW1lX2RpZyAtNSAvLyBzdG9yYWdlIGtleS8vbWV0YWRhdGEKCWJveF9nZXQKCWFzc2VydAoJZXh0cmFjdCA4IDgKCWJ0b2kKCTw9CgkmJgoKc2tpcF9hbmQwOgoJYXNzZXJ0CgoJLy8gaWYwX2NvbmRpdGlvbgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTEwCgkvLyBvZmZzZXQgPT09IDAKCWZyYW1lX2RpZyAtMyAvLyBvZmZzZXQ6IHVpbnQ2NAoJaW50IDAKCT09CglieiBpZjBfZW5kCgoJLy8gaWYwX2NvbnNlcXVlbnQKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjExMQoJLy8gdGhpcy5kYXRhQm94ZXMoYm94SW5kZXgpLmNyZWF0ZSgKCS8vICAgICAgICAgYm94SW5kZXggPT09IG1ldGFkYXRhLmVuZCA/IG1ldGFkYXRhLmVuZFNpemUgOiBNQVhfQk9YX1NJWkUsCgkvLyAgICAgICApCglmcmFtZV9kaWcgLTIgLy8gYm94SW5kZXg6IHVpbnQ2NAoJaXRvYgoJZnJhbWVfZGlnIC0yIC8vIGJveEluZGV4OiB1aW50NjQKCWZyYW1lX2RpZyAtNSAvLyBzdG9yYWdlIGtleS8vbWV0YWRhdGEKCWJveF9nZXQKCWFzc2VydAoJZXh0cmFjdCA4IDgKCWJ0b2kKCT09CglieiB0ZXJuYXJ5MF9mYWxzZQoJZnJhbWVfZGlnIC01IC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJYm94X2dldAoJYXNzZXJ0CglleHRyYWN0IDE3IDgKCWJ0b2kKCWIgdGVybmFyeTBfZW5kCgp0ZXJuYXJ5MF9mYWxzZToKCWludCAzMjc2OAoKdGVybmFyeTBfZW5kOgoJYm94X2NyZWF0ZQoKaWYwX2VuZDoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjExNgoJLy8gdGhpcy5kYXRhQm94ZXMoYm94SW5kZXgpLnJlcGxhY2Uob2Zmc2V0LCBkYXRhKQoJZnJhbWVfZGlnIC0yIC8vIGJveEluZGV4OiB1aW50NjQKCWl0b2IKCWZyYW1lX2RpZyAtMyAvLyBvZmZzZXQ6IHVpbnQ2NAoJZnJhbWVfZGlnIC00IC8vIGRhdGE6IGJ5dGVzCglib3hfcmVwbGFjZQoJcmV0c3ViCgovLyBmaW5pc2hVcGxvYWQoYWRkcmVzcyl2b2lkCi8vCi8vIAovLyBNYXJrIHVwbG9hZGluZyBhcyBmYWxzZQovLyAKLy8gQHBhcmFtIHB1YktleSBUaGUgYWRkcmVzcyBvZiB0aGUgRElECmFiaV9yb3V0ZV9maW5pc2hVcGxvYWQ6CgkvLyBwdWJLZXk6IGFkZHJlc3MKCXR4bmEgQXBwbGljYXRpb25BcmdzIDEKCWR1cAoJbGVuCglpbnQgMzIKCT09Cglhc3NlcnQKCgkvLyBleGVjdXRlIGZpbmlzaFVwbG9hZChhZGRyZXNzKXZvaWQKCWNhbGxzdWIgZmluaXNoVXBsb2FkCglpbnQgMQoJcmV0dXJuCgpmaW5pc2hVcGxvYWQ6Cglwcm90byAxIDAKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxMjYKCS8vIGFzc2VydCh0aGlzLnR4bi5zZW5kZXIgPT09IGdsb2JhbHMuY3JlYXRvckFkZHJlc3MpCgl0eG4gU2VuZGVyCglnbG9iYWwgQ3JlYXRvckFkZHJlc3MKCT09Cglhc3NlcnQKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxMjgKCS8vIHRoaXMubWV0YWRhdGEocHViS2V5KS52YWx1ZS5zdGF0dXMgPSBSRUFEWQoJZnJhbWVfZGlnIC0xIC8vIHB1YktleTogYWRkcmVzcwoJaW50IDE2CglieXRlIDB4MDEKCWJveF9yZXBsYWNlCglyZXRzdWIKCi8vIHN0YXJ0RGVsZXRlKGFkZHJlc3Mpdm9pZAovLwovLyBTdGFydHMgdGhlIGRlbGV0aW9uIHByb2Nlc3MgZm9yIHRoZSBkYXRhIGFzc29jaWF0ZWQgd2l0aCBhIERJRAovLyAKLy8gQHBhcmFtIHB1YktleSBUaGUgYWRkcmVzcyBvZiB0aGUgRElECmFiaV9yb3V0ZV9zdGFydERlbGV0ZToKCWJ5dGUgMHggLy8gcHVzaCBlbXB0eSBieXRlcyB0byBmaWxsIHRoZSBzdGFjayBmcmFtZSBmb3IgdGhpcyBzdWJyb3V0aW5lJ3MgbG9jYWwgdmFyaWFibGVzCgoJLy8gcHViS2V5OiBhZGRyZXNzCgl0eG5hIEFwcGxpY2F0aW9uQXJncyAxCglkdXAKCWxlbgoJaW50IDMyCgk9PQoJYXNzZXJ0CgoJLy8gZXhlY3V0ZSBzdGFydERlbGV0ZShhZGRyZXNzKXZvaWQKCWNhbGxzdWIgc3RhcnREZWxldGUKCWludCAxCglyZXR1cm4KCnN0YXJ0RGVsZXRlOgoJcHJvdG8gMiAwCgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTM3CgkvLyBhc3NlcnQodGhpcy50eG4uc2VuZGVyID09PSBnbG9iYWxzLmNyZWF0b3JBZGRyZXNzKQoJdHhuIFNlbmRlcgoJZ2xvYmFsIENyZWF0b3JBZGRyZXNzCgk9PQoJYXNzZXJ0CgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTM5CgkvLyBtZXRhZGF0YSA9IHRoaXMubWV0YWRhdGEocHViS2V5KS52YWx1ZQoJZnJhbWVfZGlnIC0xIC8vIHB1YktleTogYWRkcmVzcwoJZnJhbWVfYnVyeSAtMiAvLyBzdG9yYWdlIGtleS8vbWV0YWRhdGEKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxNDAKCS8vIGFzc2VydChtZXRhZGF0YS5zdGF0dXMgPT09IFJFQURZKQoJZnJhbWVfZGlnIC0yIC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJYm94X2dldAoJYXNzZXJ0CglleHRyYWN0IDE2IDEKCWJ5dGUgMHgwMDAwMDAwMDAwMDAwMDAxCgliPT0KCWFzc2VydAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE0MgoJLy8gbWV0YWRhdGEuc3RhdHVzID0gREVMRVRJTkcKCWZyYW1lX2RpZyAtMiAvLyBzdG9yYWdlIGtleS8vbWV0YWRhdGEKCWJveF9nZXQKCWFzc2VydAoJYnl0ZSAweDAyCglyZXBsYWNlMiAxNgoJZnJhbWVfZGlnIC0yIC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJc3dhcAoJYm94X3B1dAoJcmV0c3ViCgovLyBkZWxldGVEYXRhKHVpbnQ2NCxhZGRyZXNzKXZvaWQKLy8KLy8gRGVsZXRlcyBhIGJveCBvZiBkYXRhCi8vIAovLyBAcGFyYW0gcHViS2V5IFRoZSBhZGRyZXNzIG9mIHRoZSBESUQKLy8gQHBhcmFtIGJveEluZGV4IFRoZSBpbmRleCBvZiB0aGUgYm94IHRvIGRlbGV0ZQphYmlfcm91dGVfZGVsZXRlRGF0YToKCWJ5dGUgMHg7IGR1cCAvLyBwdXNoIGVtcHR5IGJ5dGVzIHRvIGZpbGwgdGhlIHN0YWNrIGZyYW1lIGZvciB0aGlzIHN1YnJvdXRpbmUncyBsb2NhbCB2YXJpYWJsZXMKCgkvLyBib3hJbmRleDogdWludDY0Cgl0eG5hIEFwcGxpY2F0aW9uQXJncyAyCglidG9pCgoJLy8gcHViS2V5OiBhZGRyZXNzCgl0eG5hIEFwcGxpY2F0aW9uQXJncyAxCglkdXAKCWxlbgoJaW50IDMyCgk9PQoJYXNzZXJ0CgoJLy8gZXhlY3V0ZSBkZWxldGVEYXRhKHVpbnQ2NCxhZGRyZXNzKXZvaWQKCWNhbGxzdWIgZGVsZXRlRGF0YQoJaW50IDEKCXJldHVybgoKZGVsZXRlRGF0YToKCXByb3RvIDQgMAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE1MgoJLy8gYXNzZXJ0KHRoaXMudHhuLnNlbmRlciA9PT0gZ2xvYmFscy5jcmVhdG9yQWRkcmVzcykKCXR4biBTZW5kZXIKCWdsb2JhbCBDcmVhdG9yQWRkcmVzcwoJPT0KCWFzc2VydAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE1NAoJLy8gbWV0YWRhdGEgPSB0aGlzLm1ldGFkYXRhKHB1YktleSkudmFsdWUKCWZyYW1lX2RpZyAtMSAvLyBwdWJLZXk6IGFkZHJlc3MKCWZyYW1lX2J1cnkgLTMgLy8gc3RvcmFnZSBrZXkvL21ldGFkYXRhCgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTU1CgkvLyBhc3NlcnQobWV0YWRhdGEuc3RhdHVzID09PSBERUxFVElORykKCWZyYW1lX2RpZyAtMyAvLyBzdG9yYWdlIGtleS8vbWV0YWRhdGEKCWJveF9nZXQKCWFzc2VydAoJZXh0cmFjdCAxNiAxCglieXRlIDB4MDAwMDAwMDAwMDAwMDAwMgoJYj09Cglhc3NlcnQKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxNTYKCS8vIGFzc2VydChtZXRhZGF0YS5zdGFydCA8PSBib3hJbmRleCAmJiBib3hJbmRleCA8PSBtZXRhZGF0YS5lbmQpCglmcmFtZV9kaWcgLTMgLy8gc3RvcmFnZSBrZXkvL21ldGFkYXRhCglib3hfZ2V0Cglhc3NlcnQKCWV4dHJhY3QgMCA4CglidG9pCglmcmFtZV9kaWcgLTIgLy8gYm94SW5kZXg6IHVpbnQ2NAoJPD0KCWR1cAoJYnogc2tpcF9hbmQxCglmcmFtZV9kaWcgLTIgLy8gYm94SW5kZXg6IHVpbnQ2NAoJZnJhbWVfZGlnIC0zIC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJYm94X2dldAoJYXNzZXJ0CglleHRyYWN0IDggOAoJYnRvaQoJPD0KCSYmCgpza2lwX2FuZDE6Cglhc3NlcnQKCgkvLyBpZjFfY29uZGl0aW9uCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxNTgKCS8vIGJveEluZGV4ICE9PSBtZXRhZGF0YS5zdGFydAoJZnJhbWVfZGlnIC0yIC8vIGJveEluZGV4OiB1aW50NjQKCWZyYW1lX2RpZyAtMyAvLyBzdG9yYWdlIGtleS8vbWV0YWRhdGEKCWJveF9nZXQKCWFzc2VydAoJZXh0cmFjdCAwIDgKCWJ0b2kKCSE9CglieiBpZjFfZW5kCgoJLy8gaWYxX2NvbnNlcXVlbnQKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE1OQoJLy8gYXNzZXJ0KG1ldGFkYXRhLmxhc3REZWxldGVkID09PSBib3hJbmRleCAtIDEpCglmcmFtZV9kaWcgLTMgLy8gc3RvcmFnZSBrZXkvL21ldGFkYXRhCglib3hfZ2V0Cglhc3NlcnQKCWV4dHJhY3QgMjUgOAoJYnRvaQoJZnJhbWVfZGlnIC0yIC8vIGJveEluZGV4OiB1aW50NjQKCWludCAxCgktCgk9PQoJYXNzZXJ0CgppZjFfZW5kOgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTYyCgkvLyBwcmVNQlIgPSBnbG9iYWxzLmN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MubWluQmFsYW5jZQoJZ2xvYmFsIEN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MKCWFjY3RfcGFyYW1zX2dldCBBY2N0TWluQmFsYW5jZQoJYXNzZXJ0CglmcmFtZV9idXJ5IC00IC8vIHByZU1CUjogdWludDY0CgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTY0CgkvLyB0aGlzLmRhdGFCb3hlcyhib3hJbmRleCkuZGVsZXRlKCkKCWZyYW1lX2RpZyAtMiAvLyBib3hJbmRleDogdWludDY0CglpdG9iCglib3hfZGVsCgoJLy8gaWYyX2NvbmRpdGlvbgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTY2CgkvLyBib3hJbmRleCA9PT0gbWV0YWRhdGEuZW5kCglmcmFtZV9kaWcgLTIgLy8gYm94SW5kZXg6IHVpbnQ2NAoJZnJhbWVfZGlnIC0zIC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJYm94X2dldAoJYXNzZXJ0CglleHRyYWN0IDggOAoJYnRvaQoJPT0KCWJ6IGlmMl9lbHNlCgoJLy8gaWYyX2NvbnNlcXVlbnQKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE2NgoJLy8gdGhpcy5tZXRhZGF0YShwdWJLZXkpLmRlbGV0ZSgpCglmcmFtZV9kaWcgLTEgLy8gcHViS2V5OiBhZGRyZXNzCglib3hfZGVsCgliIGlmMl9lbmQKCmlmMl9lbHNlOgoJLy8gY29udHJhY3RzL2FsZ28tZGlkLmFsZ28udHM6MTY3CgkvLyBtZXRhZGF0YS5sYXN0RGVsZXRlZCA9IGJveEluZGV4CglmcmFtZV9kaWcgLTMgLy8gc3RvcmFnZSBrZXkvL21ldGFkYXRhCglib3hfZ2V0Cglhc3NlcnQKCWZyYW1lX2RpZyAtMiAvLyBib3hJbmRleDogdWludDY0CglpdG9iCglyZXBsYWNlMiAyNQoJZnJhbWVfZGlnIC0zIC8vIHN0b3JhZ2Uga2V5Ly9tZXRhZGF0YQoJc3dhcAoJYm94X3B1dAoKaWYyX2VuZDoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE2OQoJLy8gc2VuZFBheW1lbnQoewoJLy8gICAgICAgYW1vdW50OiBwcmVNQlIgLSBnbG9iYWxzLmN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MubWluQmFsYW5jZSwKCS8vICAgICAgIHJlY2VpdmVyOiB0aGlzLnR4bi5zZW5kZXIsCgkvLyAgICAgfSkKCWl0eG5fYmVnaW4KCWludCBwYXkKCWl0eG5fZmllbGQgVHlwZUVudW0KCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxNzAKCS8vIGFtb3VudDogcHJlTUJSIC0gZ2xvYmFscy5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLm1pbkJhbGFuY2UKCWZyYW1lX2RpZyAtNCAvLyBwcmVNQlI6IHVpbnQ2NAoJZ2xvYmFsIEN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MKCWFjY3RfcGFyYW1zX2dldCBBY2N0TWluQmFsYW5jZQoJYXNzZXJ0CgktCglpdHhuX2ZpZWxkIEFtb3VudAoKCS8vIGNvbnRyYWN0cy9hbGdvLWRpZC5hbGdvLnRzOjE3MQoJLy8gcmVjZWl2ZXI6IHRoaXMudHhuLnNlbmRlcgoJdHhuIFNlbmRlcgoJaXR4bl9maWVsZCBSZWNlaXZlcgoKCS8vIEZlZSBmaWVsZCBub3Qgc2V0LCBkZWZhdWx0aW5nIHRvIDAKCWludCAwCglpdHhuX2ZpZWxkIEZlZQoKCS8vIFN1Ym1pdCBpbm5lciB0cmFuc2FjdGlvbgoJaXR4bl9zdWJtaXQKCXJldHN1YgoKLy8gdXBkYXRlQXBwbGljYXRpb24oKXZvaWQKLy8KLy8gQWxsb3cgdGhlIGNvbnRyYWN0IHRvIGJlIHVwZGF0ZWQgYnkgdGhlIGNyZWF0b3IKYWJpX3JvdXRlX3VwZGF0ZUFwcGxpY2F0aW9uOgoJLy8gZXhlY3V0ZSB1cGRhdGVBcHBsaWNhdGlvbigpdm9pZAoJY2FsbHN1YiB1cGRhdGVBcHBsaWNhdGlvbgoJaW50IDEKCXJldHVybgoKdXBkYXRlQXBwbGljYXRpb246Cglwcm90byAwIDAKCgkvLyBjb250cmFjdHMvYWxnby1kaWQuYWxnby50czoxNzkKCS8vIGFzc2VydCh0aGlzLnR4bi5zZW5kZXIgPT09IGdsb2JhbHMuY3JlYXRvckFkZHJlc3MpCgl0eG4gU2VuZGVyCglnbG9iYWwgQ3JlYXRvckFkZHJlc3MKCT09Cglhc3NlcnQKCXJldHN1YgoKLy8gZHVtbXkoKXZvaWQKLy8KLy8gRHVtbXkgZnVuY3Rpb24gdG8gYWRkIGV4dHJhIGJveCByZWZlcmVuY2VzIGZvciBkZWxldGVEYXRhLgovLyBCb3hlcyBhcmUgMzJrLCBidXQgYSBzaW5nbGUgYXBwIGNhbGwgY2FuIG9ubHkgaW5jbHVkZSBlbm91Z2ggcmVmZXJlbmNlcyB0byByZWFkL3dyaXRlIDhrCi8vIGF0IGEgdGltZS4gVGh1cyB3aGVuIGEgYm94IGlzIGRlbGV0ZWQsIHdlIG5lZWQgdG8gYWRkIGFkZGl0aW9uYWwgZHVtbXkgY2FsbHMgd2l0aCBib3gKLy8gcmVmZXJlbmNlcyB0byBpbmNyZWFzZSB0aGUgdG90YWwgcmVhZC93cml0ZSBidWRnZXQgdG8gMzJrLgphYmlfcm91dGVfZHVtbXk6CgkvLyBleGVjdXRlIGR1bW15KCl2b2lkCgljYWxsc3ViIGR1bW15CglpbnQgMQoJcmV0dXJuCgpkdW1teToKCXByb3RvIDAgMAoJcmV0c3ViCgphYmlfcm91dGVfY3JlYXRlQXBwbGljYXRpb246CglpbnQgMQoJcmV0dXJuCgpjcmVhdGVfTm9PcDoKCW1ldGhvZCAiY3JlYXRlQXBwbGljYXRpb24oKXZvaWQiCgl0eG5hIEFwcGxpY2F0aW9uQXJncyAwCgltYXRjaCBhYmlfcm91dGVfY3JlYXRlQXBwbGljYXRpb24KCWVycgoKY2FsbF9Ob09wOgoJbWV0aG9kICJzdGFydFVwbG9hZChhZGRyZXNzLHVpbnQ2NCx1aW50NjQscGF5KXZvaWQiCgltZXRob2QgInVwbG9hZChhZGRyZXNzLHVpbnQ2NCx1aW50NjQsYnl0ZVtdKXZvaWQiCgltZXRob2QgImZpbmlzaFVwbG9hZChhZGRyZXNzKXZvaWQiCgltZXRob2QgInN0YXJ0RGVsZXRlKGFkZHJlc3Mpdm9pZCIKCW1ldGhvZCAiZGVsZXRlRGF0YShhZGRyZXNzLHVpbnQ2NCl2b2lkIgoJbWV0aG9kICJkdW1teSgpdm9pZCIKCXR4bmEgQXBwbGljYXRpb25BcmdzIDAKCW1hdGNoIGFiaV9yb3V0ZV9zdGFydFVwbG9hZCBhYmlfcm91dGVfdXBsb2FkIGFiaV9yb3V0ZV9maW5pc2hVcGxvYWQgYWJpX3JvdXRlX3N0YXJ0RGVsZXRlIGFiaV9yb3V0ZV9kZWxldGVEYXRhIGFiaV9yb3V0ZV9kdW1teQoJZXJyCgpjYWxsX1VwZGF0ZUFwcGxpY2F0aW9uOgoJbWV0aG9kICJ1cGRhdGVBcHBsaWNhdGlvbigpdm9pZCIKCXR4bmEgQXBwbGljYXRpb25BcmdzIDAKCW1hdGNoIGFiaV9yb3V0ZV91cGRhdGVBcHBsaWNhdGlvbgoJZXJy", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDkKaW50IDE=" + }, + "contract": { + "name": "AlgoDID", + "desc": "", + "methods": [ + { + "name": "startUpload", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The pubkey of the DID" + }, + { + "name": "numBoxes", + "type": "uint64", + "desc": "The number of boxes that the data will take up" + }, + { + "name": "endBoxSize", + "type": "uint64", + "desc": "The size of the last box" + }, + { + "name": "mbrPayment", + "type": "pay", + "desc": "Payment from the uploader to cover the box MBR" + } + ], + "desc": "Allocate boxes to begin data upload process", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "upload", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The pubkey of the DID" + }, + { + "name": "boxIndex", + "type": "uint64", + "desc": "The index of the box to upload the given chunk of data to" + }, + { + "name": "offset", + "type": "uint64", + "desc": "The offset within the box to start writing the data" + }, + { + "name": "data", + "type": "byte[]", + "desc": "The data to write" + } + ], + "desc": "Upload data to a specific offset in a box", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "finishUpload", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The address of the DID" + } + ], + "desc": "Mark uploading as false", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "startDelete", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The address of the DID" + } + ], + "desc": "Starts the deletion process for the data associated with a DID", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "deleteData", + "args": [ + { + "name": "pubKey", + "type": "address", + "desc": "The address of the DID" + }, + { + "name": "boxIndex", + "type": "uint64", + "desc": "The index of the box to delete" + } + ], + "desc": "Deletes a box of data", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "updateApplication", + "args": [], + "desc": "Allow the contract to be updated by the creator", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "dummy", + "args": [], + "desc": "Dummy function to add extra box references for deleteData.Boxes are 32k, but a single app call can only include enough references to read/write 8kat a time. Thus when a box is deleted, we need to add additional dummy calls with boxreferences to increase the total read/write budget to 32k.", + "returns": { + "type": "void", + "desc": "" + } + }, + { + "name": "createApplication", + "desc": "", + "returns": { + "type": "void", + "desc": "" + }, + "args": [] + } + ] + } +} \ No newline at end of file diff --git a/client/internal/contracts/AlgoDID.src_map.json b/client/internal/contracts/AlgoDID.src_map.json new file mode 100644 index 0000000..f5badef --- /dev/null +++ b/client/internal/contracts/AlgoDID.src_map.json @@ -0,0 +1,5784 @@ +[ + { + "teal": 1, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 2, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 5, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 7, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 13, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 14, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 15, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 16, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 17, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 18, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 19, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 20, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 22, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 23, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 34, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 35, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 38, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 39, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 40, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 41, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 42, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 43, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 44, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 45, + "source": { + "start": { + "line": 62, + "col": 4 + }, + "end": { + "line": 62, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 48, + "source": { + "start": { + "line": 61, + "col": 4 + }, + "end": { + "line": 61, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 49, + "source": { + "start": { + "line": 61, + "col": 4 + }, + "end": { + "line": 61, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 52, + "source": { + "start": { + "line": 60, + "col": 4 + }, + "end": { + "line": 60, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 53, + "source": { + "start": { + "line": 60, + "col": 4 + }, + "end": { + "line": 60, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 56, + "source": { + "start": { + "line": 59, + "col": 4 + }, + "end": { + "line": 59, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 57, + "source": { + "start": { + "line": 59, + "col": 4 + }, + "end": { + "line": 59, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 58, + "source": { + "start": { + "line": 59, + "col": 4 + }, + "end": { + "line": 59, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 59, + "source": { + "start": { + "line": 59, + "col": 4 + }, + "end": { + "line": 59, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 60, + "source": { + "start": { + "line": 59, + "col": 4 + }, + "end": { + "line": 59, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 61, + "source": { + "start": { + "line": 59, + "col": 4 + }, + "end": { + "line": 59, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 64, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 65, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 66, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 68, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 69, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 73, + "source": { + "start": { + "line": 64, + "col": 11 + }, + "end": { + "line": 64, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 74, + "source": { + "start": { + "line": 64, + "col": 31 + }, + "end": { + "line": 64, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 75, + "source": { + "start": { + "line": 64, + "col": 27 + }, + "end": { + "line": 64, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 76, + "source": { + "start": { + "line": 64, + "col": 11 + }, + "end": { + "line": 64, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 80, + "source": { + "start": { + "line": 66, + "col": 21 + }, + "end": { + "line": 66, + "col": 38 + } + }, + "pc": 0 + }, + { + "teal": 81, + "source": { + "start": { + "line": 66, + "col": 21 + }, + "end": { + "line": 66, + "col": 38 + } + }, + "pc": 0 + }, + { + "teal": 82, + "source": { + "start": { + "line": 66, + "col": 10 + }, + "end": { + "line": 66, + "col": 44 + } + }, + "pc": 0 + }, + { + "teal": 86, + "source": { + "start": { + "line": 67, + "col": 28 + }, + "end": { + "line": 67, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 87, + "source": { + "start": { + "line": 67, + "col": 41 + }, + "end": { + "line": 67, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 88, + "source": { + "start": { + "line": 67, + "col": 39 + }, + "end": { + "line": 67, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 89, + "source": { + "start": { + "line": 67, + "col": 41 + }, + "end": { + "line": 67, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 90, + "source": { + "start": { + "line": 67, + "col": 39 + }, + "end": { + "line": 67, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 91, + "source": { + "start": { + "line": 67, + "col": 10 + }, + "end": { + "line": 67, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 101, + "source": { + "start": { + "line": 70, + "col": 13 + }, + "end": { + "line": 70, + "col": 21 + } + }, + "pc": 0 + }, + { + "teal": 102, + "source": { + "start": { + "line": 70, + "col": 13 + }, + "end": { + "line": 70, + "col": 21 + } + }, + "pc": 0 + }, + { + "teal": 103, + "source": { + "start": { + "line": 71, + "col": 11 + }, + "end": { + "line": 71, + "col": 17 + } + }, + "pc": 0 + }, + { + "teal": 104, + "source": { + "start": { + "line": 71, + "col": 11 + }, + "end": { + "line": 71, + "col": 17 + } + }, + "pc": 0 + }, + { + "teal": 105, + "source": { + "start": { + "line": 69, + "col": 31 + }, + "end": { + "line": 75, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 106, + "source": { + "start": { + "line": 26, + "col": 27 + }, + "end": { + "line": 26, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 107, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 108, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 109, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 110, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 111, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 112, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 113, + "source": { + "start": { + "line": 72, + "col": 14 + }, + "end": { + "line": 72, + "col": 23 + } + }, + "pc": 0 + }, + { + "teal": 114, + "source": { + "start": { + "line": 69, + "col": 31 + }, + "end": { + "line": 75, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 115, + "source": { + "start": { + "line": 73, + "col": 15 + }, + "end": { + "line": 73, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 116, + "source": { + "start": { + "line": 73, + "col": 15 + }, + "end": { + "line": 73, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 117, + "source": { + "start": { + "line": 69, + "col": 31 + }, + "end": { + "line": 75, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 118, + "source": { + "start": { + "line": 74, + "col": 19 + }, + "end": { + "line": 74, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 119, + "source": { + "start": { + "line": 74, + "col": 19 + }, + "end": { + "line": 74, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 120, + "source": { + "start": { + "line": 69, + "col": 31 + }, + "end": { + "line": 75, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 124, + "source": { + "start": { + "line": 77, + "col": 4 + }, + "end": { + "line": 77, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 125, + "source": { + "start": { + "line": 77, + "col": 26 + }, + "end": { + "line": 77, + "col": 32 + } + }, + "pc": 0 + }, + { + "teal": 126, + "source": { + "start": { + "line": 77, + "col": 12 + }, + "end": { + "line": 77, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 127, + "source": { + "start": { + "line": 77, + "col": 12 + }, + "end": { + "line": 77, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 128, + "source": { + "start": { + "line": 77, + "col": 12 + }, + "end": { + "line": 77, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 129, + "source": { + "start": { + "line": 77, + "col": 12 + }, + "end": { + "line": 77, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 133, + "source": { + "start": { + "line": 79, + "col": 4 + }, + "end": { + "line": 79, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 134, + "source": { + "start": { + "line": 79, + "col": 18 + }, + "end": { + "line": 79, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 135, + "source": { + "start": { + "line": 79, + "col": 4 + }, + "end": { + "line": 79, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 139, + "source": { + "start": { + "line": 81, + "col": 4 + }, + "end": { + "line": 81, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 140, + "source": { + "start": { + "line": 81, + "col": 4 + }, + "end": { + "line": 81, + "col": 21 + } + }, + "pc": 0 + }, + { + "teal": 141, + "source": { + "start": { + "line": 81, + "col": 4 + }, + "end": { + "line": 81, + "col": 21 + } + }, + "pc": 0 + }, + { + "teal": 142, + "source": { + "start": { + "line": 81, + "col": 39 + }, + "end": { + "line": 81, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 143, + "source": { + "start": { + "line": 81, + "col": 37 + }, + "end": { + "line": 81, + "col": 38 + } + }, + "pc": 0 + }, + { + "teal": 152, + "source": { + "start": { + "line": 36, + "col": 21 + }, + "end": { + "line": 36, + "col": 26 + } + }, + "pc": 0 + }, + { + "teal": 153, + "source": { + "start": { + "line": 84, + "col": 21 + }, + "end": { + "line": 84, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 154, + "source": { + "start": { + "line": 34, + "col": 22 + }, + "end": { + "line": 34, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 155, + "source": { + "start": { + "line": 84, + "col": 36 + }, + "end": { + "line": 84, + "col": 37 + } + }, + "pc": 0 + }, + { + "teal": 156, + "source": { + "start": { + "line": 83, + "col": 46 + }, + "end": { + "line": 83, + "col": 47 + } + }, + "pc": 0 + }, + { + "teal": 157, + "source": { + "start": { + "line": 85, + "col": 6 + }, + "end": { + "line": 85, + "col": 14 + } + }, + "pc": 0 + }, + { + "teal": 158, + "source": { + "start": { + "line": 85, + "col": 17 + }, + "end": { + "line": 85, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 159, + "source": { + "start": { + "line": 85, + "col": 15 + }, + "end": { + "line": 85, + "col": 16 + } + }, + "pc": 0 + }, + { + "teal": 160, + "source": { + "start": { + "line": 34, + "col": 22 + }, + "end": { + "line": 34, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 161, + "source": { + "start": { + "line": 85, + "col": 19 + }, + "end": { + "line": 85, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 162, + "source": { + "start": { + "line": 84, + "col": 52 + }, + "end": { + "line": 84, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 163, + "source": { + "start": { + "line": 86, + "col": 6 + }, + "end": { + "line": 86, + "col": 16 + } + }, + "pc": 0 + }, + { + "teal": 164, + "source": { + "start": { + "line": 34, + "col": 22 + }, + "end": { + "line": 34, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 165, + "source": { + "start": { + "line": 86, + "col": 17 + }, + "end": { + "line": 86, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 166, + "source": { + "start": { + "line": 85, + "col": 35 + }, + "end": { + "line": 85, + "col": 36 + } + }, + "pc": 0 + }, + { + "teal": 167, + "source": { + "start": { + "line": 35, + "col": 21 + }, + "end": { + "line": 35, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 168, + "source": { + "start": { + "line": 86, + "col": 33 + }, + "end": { + "line": 86, + "col": 34 + } + }, + "pc": 0 + }, + { + "teal": 169, + "source": { + "start": { + "line": 88, + "col": 7 + }, + "end": { + "line": 88, + "col": 8 + } + }, + "pc": 0 + }, + { + "teal": 170, + "source": { + "start": { + "line": 88, + "col": 11 + }, + "end": { + "line": 88, + "col": 12 + } + }, + "pc": 0 + }, + { + "teal": 171, + "source": { + "start": { + "line": 88, + "col": 9 + }, + "end": { + "line": 88, + "col": 10 + } + }, + "pc": 0 + }, + { + "teal": 172, + "source": { + "start": { + "line": 88, + "col": 15 + }, + "end": { + "line": 88, + "col": 16 + } + }, + "pc": 0 + }, + { + "teal": 173, + "source": { + "start": { + "line": 88, + "col": 13 + }, + "end": { + "line": 88, + "col": 14 + } + }, + "pc": 0 + }, + { + "teal": 174, + "source": { + "start": { + "line": 88, + "col": 19 + }, + "end": { + "line": 88, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 175, + "source": { + "start": { + "line": 88, + "col": 17 + }, + "end": { + "line": 88, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 176, + "source": { + "start": { + "line": 88, + "col": 23 + }, + "end": { + "line": 88, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 177, + "source": { + "start": { + "line": 88, + "col": 21 + }, + "end": { + "line": 88, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 181, + "source": { + "start": { + "line": 34, + "col": 22 + }, + "end": { + "line": 34, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 182, + "source": { + "start": { + "line": 88, + "col": 31 + }, + "end": { + "line": 88, + "col": 32 + } + }, + "pc": 0 + }, + { + "teal": 183, + "source": { + "start": { + "line": 87, + "col": 19 + }, + "end": { + "line": 87, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 184, + "source": { + "start": { + "line": 88, + "col": 23 + }, + "end": { + "line": 88, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 185, + "source": { + "start": { + "line": 88, + "col": 21 + }, + "end": { + "line": 88, + "col": 22 + } + }, + "pc": 0 + }, + { + "teal": 189, + "source": { + "start": { + "line": 34, + "col": 22 + }, + "end": { + "line": 34, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 190, + "source": { + "start": { + "line": 88, + "col": 31 + }, + "end": { + "line": 88, + "col": 32 + } + }, + "pc": 0 + }, + { + "teal": 191, + "source": { + "start": { + "line": 87, + "col": 19 + }, + "end": { + "line": 87, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 192, + "source": { + "start": { + "line": 83, + "col": 10 + }, + "end": { + "line": 88, + "col": 46 + } + }, + "pc": 0 + }, + { + "teal": 193, + "source": { + "start": { + "line": 90, + "col": 4 + }, + "end": { + "line": 90, + "col": 43 + } + }, + "pc": 0 + }, + { + "teal": 194, + "source": { + "start": { + "line": 90, + "col": 4 + }, + "end": { + "line": 90, + "col": 43 + } + }, + "pc": 0 + }, + { + "teal": 205, + "source": { + "start": { + "line": 91, + "col": 35 + }, + "end": { + "line": 91, + "col": 51 + } + }, + "pc": 0 + }, + { + "teal": 206, + "source": { + "start": { + "line": 91, + "col": 31 + }, + "end": { + "line": 91, + "col": 34 + } + }, + "pc": 0 + }, + { + "teal": 209, + "source": { + "start": { + "line": 58, + "col": 2 + }, + "end": { + "line": 92, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 210, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 213, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 214, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 217, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 218, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 221, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 222, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 223, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 224, + "source": { + "start": { + "line": 103, + "col": 60 + }, + "end": { + "line": 103, + "col": 71 + } + }, + "pc": 0 + }, + { + "teal": 225, + "source": { + "start": { + "line": 103, + "col": 60 + }, + "end": { + "line": 103, + "col": 71 + } + }, + "pc": 0 + }, + { + "teal": 226, + "source": { + "start": { + "line": 103, + "col": 60 + }, + "end": { + "line": 103, + "col": 71 + } + }, + "pc": 0 + }, + { + "teal": 229, + "source": { + "start": { + "line": 103, + "col": 44 + }, + "end": { + "line": 103, + "col": 58 + } + }, + "pc": 0 + }, + { + "teal": 230, + "source": { + "start": { + "line": 103, + "col": 44 + }, + "end": { + "line": 103, + "col": 58 + } + }, + "pc": 0 + }, + { + "teal": 231, + "source": { + "start": { + "line": 103, + "col": 26 + }, + "end": { + "line": 103, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 233, + "source": { + "start": { + "line": 103, + "col": 26 + }, + "end": { + "line": 103, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 234, + "source": { + "start": { + "line": 103, + "col": 26 + }, + "end": { + "line": 103, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 238, + "source": { + "start": { + "line": 103, + "col": 9 + }, + "end": { + "line": 103, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 239, + "source": { + "start": { + "line": 103, + "col": 9 + }, + "end": { + "line": 103, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 240, + "source": { + "start": { + "line": 103, + "col": 9 + }, + "end": { + "line": 103, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 241, + "source": { + "start": { + "line": 103, + "col": 9 + }, + "end": { + "line": 103, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 245, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 246, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 250, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 251, + "source": { + "start": { + "line": 104, + "col": 4 + }, + "end": { + "line": 104, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 252, + "source": { + "start": { + "line": 104, + "col": 4 + }, + "end": { + "line": 104, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 253, + "source": { + "start": { + "line": 104, + "col": 11 + }, + "end": { + "line": 104, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 254, + "source": { + "start": { + "line": 104, + "col": 31 + }, + "end": { + "line": 104, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 255, + "source": { + "start": { + "line": 104, + "col": 27 + }, + "end": { + "line": 104, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 256, + "source": { + "start": { + "line": 104, + "col": 11 + }, + "end": { + "line": 104, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 260, + "source": { + "start": { + "line": 106, + "col": 35 + }, + "end": { + "line": 106, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 261, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 262, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 263, + "source": { + "start": { + "line": 107, + "col": 4 + }, + "end": { + "line": 107, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 264, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 265, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 266, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 267, + "source": { + "start": { + "line": 107, + "col": 11 + }, + "end": { + "line": 107, + "col": 26 + } + }, + "pc": 0 + }, + { + "teal": 268, + "source": { + "start": { + "line": 26, + "col": 27 + }, + "end": { + "line": 26, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 269, + "source": { + "start": { + "line": 26, + "col": 27 + }, + "end": { + "line": 26, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 270, + "source": { + "start": { + "line": 107, + "col": 27 + }, + "end": { + "line": 107, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 271, + "source": { + "start": { + "line": 107, + "col": 11 + }, + "end": { + "line": 107, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 272, + "source": { + "start": { + "line": 108, + "col": 4 + }, + "end": { + "line": 108, + "col": 66 + } + }, + "pc": 0 + }, + { + "teal": 273, + "source": { + "start": { + "line": 108, + "col": 4 + }, + "end": { + "line": 108, + "col": 66 + } + }, + "pc": 0 + }, + { + "teal": 274, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 275, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 276, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 278, + "source": { + "start": { + "line": 108, + "col": 11 + }, + "end": { + "line": 108, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 279, + "source": { + "start": { + "line": 108, + "col": 11 + }, + "end": { + "line": 108, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 284, + "source": { + "start": { + "line": 108, + "col": 38 + }, + "end": { + "line": 108, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 285, + "source": { + "start": { + "line": 108, + "col": 41 + }, + "end": { + "line": 108, + "col": 49 + } + }, + "pc": 0 + }, + { + "teal": 286, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 287, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 294, + "source": { + "start": { + "line": 108, + "col": 38 + }, + "end": { + "line": 108, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 295, + "source": { + "start": { + "line": 108, + "col": 11 + }, + "end": { + "line": 108, + "col": 65 + } + }, + "pc": 0 + }, + { + "teal": 296, + "source": { + "start": { + "line": 110, + "col": 4 + }, + "end": { + "line": 114, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 297, + "source": { + "start": { + "line": 110, + "col": 8 + }, + "end": { + "line": 110, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 298, + "source": { + "start": { + "line": 110, + "col": 8 + }, + "end": { + "line": 110, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 299, + "source": { + "start": { + "line": 110, + "col": 8 + }, + "end": { + "line": 110, + "col": 14 + } + }, + "pc": 0 + }, + { + "teal": 300, + "source": { + "start": { + "line": 110, + "col": 19 + }, + "end": { + "line": 110, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 301, + "source": { + "start": { + "line": 110, + "col": 15 + }, + "end": { + "line": 110, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 302, + "source": { + "start": { + "line": 110, + "col": 4 + }, + "end": { + "line": 114, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 303, + "source": { + "start": { + "line": 110, + "col": 4 + }, + "end": { + "line": 114, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 304, + "source": { + "start": { + "line": 111, + "col": 6 + }, + "end": { + "line": 113, + "col": 7 + } + }, + "pc": 0 + }, + { + "teal": 305, + "source": { + "start": { + "line": 111, + "col": 6 + }, + "end": { + "line": 113, + "col": 7 + } + }, + "pc": 0 + }, + { + "teal": 306, + "source": { + "start": { + "line": 111, + "col": 6 + }, + "end": { + "line": 113, + "col": 7 + } + }, + "pc": 0 + }, + { + "teal": 307, + "source": { + "start": { + "line": 111, + "col": 6 + }, + "end": { + "line": 113, + "col": 7 + } + }, + "pc": 0 + }, + { + "teal": 308, + "source": { + "start": { + "line": 111, + "col": 21 + }, + "end": { + "line": 111, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 309, + "source": { + "start": { + "line": 111, + "col": 21 + }, + "end": { + "line": 111, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 311, + "source": { + "start": { + "line": 112, + "col": 8 + }, + "end": { + "line": 112, + "col": 16 + } + }, + "pc": 0 + }, + { + "teal": 312, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 314, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 315, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 317, + "source": { + "start": { + "line": 112, + "col": 21 + }, + "end": { + "line": 112, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 320, + "source": { + "start": { + "line": 112, + "col": 8 + }, + "end": { + "line": 112, + "col": 67 + } + }, + "pc": 0 + }, + { + "teal": 321, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 322, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 323, + "source": { + "start": { + "line": 106, + "col": 21 + }, + "end": { + "line": 106, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 324, + "source": { + "start": { + "line": 112, + "col": 36 + }, + "end": { + "line": 112, + "col": 52 + } + }, + "pc": 0 + }, + { + "teal": 325, + "source": { + "start": { + "line": 112, + "col": 36 + }, + "end": { + "line": 112, + "col": 52 + } + }, + "pc": 0 + }, + { + "teal": 333, + "source": { + "start": { + "line": 116, + "col": 4 + }, + "end": { + "line": 116, + "col": 50 + } + }, + "pc": 0 + }, + { + "teal": 335, + "source": { + "start": { + "line": 116, + "col": 19 + }, + "end": { + "line": 116, + "col": 27 + } + }, + "pc": 0 + }, + { + "teal": 336, + "source": { + "start": { + "line": 116, + "col": 37 + }, + "end": { + "line": 116, + "col": 43 + } + }, + "pc": 0 + }, + { + "teal": 337, + "source": { + "start": { + "line": 116, + "col": 45 + }, + "end": { + "line": 116, + "col": 49 + } + }, + "pc": 0 + }, + { + "teal": 338, + "source": { + "start": { + "line": 116, + "col": 4 + }, + "end": { + "line": 116, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 339, + "source": { + "start": { + "line": 103, + "col": 2 + }, + "end": { + "line": 117, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 340, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 343, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 344, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 345, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 347, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 348, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 352, + "source": { + "start": { + "line": 125, + "col": 15 + }, + "end": { + "line": 125, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 353, + "source": { + "start": { + "line": 125, + "col": 15 + }, + "end": { + "line": 125, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 354, + "source": { + "start": { + "line": 125, + "col": 15 + }, + "end": { + "line": 125, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 355, + "source": { + "start": { + "line": 125, + "col": 15 + }, + "end": { + "line": 125, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 359, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 360, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 361, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 362, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 363, + "source": { + "start": { + "line": 125, + "col": 2 + }, + "end": { + "line": 129, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 370, + "source": { + "start": { + "line": 126, + "col": 27 + }, + "end": { + "line": 126, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 371, + "source": { + "start": { + "line": 126, + "col": 11 + }, + "end": { + "line": 126, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 374, + "source": { + "start": { + "line": 128, + "col": 4 + }, + "end": { + "line": 128, + "col": 46 + } + }, + "pc": 0 + }, + { + "teal": 375, + "source": { + "start": { + "line": 128, + "col": 18 + }, + "end": { + "line": 128, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 376, + "source": { + "start": { + "line": 128, + "col": 4 + }, + "end": { + "line": 128, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 377, + "source": { + "start": { + "line": 128, + "col": 4 + }, + "end": { + "line": 128, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 378, + "source": { + "start": { + "line": 128, + "col": 4 + }, + "end": { + "line": 128, + "col": 38 + } + }, + "pc": 0 + }, + { + "teal": 379, + "source": { + "start": { + "line": 128, + "col": 4 + }, + "end": { + "line": 128, + "col": 25 + } + }, + "pc": 0 + }, + { + "teal": 382, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 383, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 384, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 386, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 387, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 391, + "source": { + "start": { + "line": 136, + "col": 14 + }, + "end": { + "line": 136, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 392, + "source": { + "start": { + "line": 136, + "col": 14 + }, + "end": { + "line": 136, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 393, + "source": { + "start": { + "line": 136, + "col": 14 + }, + "end": { + "line": 136, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 394, + "source": { + "start": { + "line": 136, + "col": 14 + }, + "end": { + "line": 136, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 398, + "source": { + "start": { + "line": 136, + "col": 14 + }, + "end": { + "line": 136, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 399, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 403, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 404, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 405, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 406, + "source": { + "start": { + "line": 137, + "col": 4 + }, + "end": { + "line": 137, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 407, + "source": { + "start": { + "line": 137, + "col": 4 + }, + "end": { + "line": 137, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 408, + "source": { + "start": { + "line": 137, + "col": 11 + }, + "end": { + "line": 137, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 409, + "source": { + "start": { + "line": 137, + "col": 31 + }, + "end": { + "line": 137, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 413, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 48 + } + }, + "pc": 0 + }, + { + "teal": 414, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 48 + } + }, + "pc": 0 + }, + { + "teal": 415, + "source": { + "start": { + "line": 139, + "col": 35 + }, + "end": { + "line": 139, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 416, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 417, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 418, + "source": { + "start": { + "line": 140, + "col": 4 + }, + "end": { + "line": 140, + "col": 37 + } + }, + "pc": 0 + }, + { + "teal": 419, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 420, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 421, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 429, + "source": { + "start": { + "line": 142, + "col": 4 + }, + "end": { + "line": 142, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 430, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 433, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 434, + "source": { + "start": { + "line": 142, + "col": 4 + }, + "end": { + "line": 142, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 437, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 438, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 439, + "source": { + "start": { + "line": 139, + "col": 21 + }, + "end": { + "line": 139, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 440, + "source": { + "start": { + "line": 136, + "col": 2 + }, + "end": { + "line": 143, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 441, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 442, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 445, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 446, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 447, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 449, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 450, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 454, + "source": { + "start": { + "line": 151, + "col": 30 + }, + "end": { + "line": 151, + "col": 46 + } + }, + "pc": 0 + }, + { + "teal": 455, + "source": { + "start": { + "line": 151, + "col": 13 + }, + "end": { + "line": 151, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 456, + "source": { + "start": { + "line": 151, + "col": 13 + }, + "end": { + "line": 151, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 457, + "source": { + "start": { + "line": 151, + "col": 13 + }, + "end": { + "line": 151, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 461, + "source": { + "start": { + "line": 151, + "col": 13 + }, + "end": { + "line": 151, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 462, + "source": { + "start": { + "line": 151, + "col": 13 + }, + "end": { + "line": 151, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 466, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 467, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 468, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 469, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 470, + "source": { + "start": { + "line": 152, + "col": 4 + }, + "end": { + "line": 152, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 471, + "source": { + "start": { + "line": 152, + "col": 4 + }, + "end": { + "line": 152, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 472, + "source": { + "start": { + "line": 152, + "col": 11 + }, + "end": { + "line": 152, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 476, + "source": { + "start": { + "line": 152, + "col": 11 + }, + "end": { + "line": 152, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 477, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 48 + } + }, + "pc": 0 + }, + { + "teal": 478, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 48 + } + }, + "pc": 0 + }, + { + "teal": 479, + "source": { + "start": { + "line": 154, + "col": 35 + }, + "end": { + "line": 154, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 480, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 481, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 482, + "source": { + "start": { + "line": 155, + "col": 4 + }, + "end": { + "line": 155, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 483, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 484, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 485, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 486, + "source": { + "start": { + "line": 155, + "col": 11 + }, + "end": { + "line": 155, + "col": 26 + } + }, + "pc": 0 + }, + { + "teal": 487, + "source": { + "start": { + "line": 32, + "col": 26 + }, + "end": { + "line": 32, + "col": 27 + } + }, + "pc": 0 + }, + { + "teal": 488, + "source": { + "start": { + "line": 32, + "col": 26 + }, + "end": { + "line": 32, + "col": 27 + } + }, + "pc": 0 + }, + { + "teal": 489, + "source": { + "start": { + "line": 155, + "col": 27 + }, + "end": { + "line": 155, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 490, + "source": { + "start": { + "line": 155, + "col": 11 + }, + "end": { + "line": 155, + "col": 39 + } + }, + "pc": 0 + }, + { + "teal": 491, + "source": { + "start": { + "line": 156, + "col": 4 + }, + "end": { + "line": 156, + "col": 66 + } + }, + "pc": 0 + }, + { + "teal": 492, + "source": { + "start": { + "line": 156, + "col": 4 + }, + "end": { + "line": 156, + "col": 66 + } + }, + "pc": 0 + }, + { + "teal": 494, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 495, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 500, + "source": { + "start": { + "line": 156, + "col": 29 + }, + "end": { + "line": 156, + "col": 37 + } + }, + "pc": 0 + }, + { + "teal": 501, + "source": { + "start": { + "line": 156, + "col": 26 + }, + "end": { + "line": 156, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 502, + "source": { + "start": { + "line": 156, + "col": 38 + }, + "end": { + "line": 156, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 503, + "source": { + "start": { + "line": 156, + "col": 38 + }, + "end": { + "line": 156, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 504, + "source": { + "start": { + "line": 156, + "col": 41 + }, + "end": { + "line": 156, + "col": 49 + } + }, + "pc": 0 + }, + { + "teal": 505, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 506, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 507, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 512, + "source": { + "start": { + "line": 156, + "col": 38 + }, + "end": { + "line": 156, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 513, + "source": { + "start": { + "line": 156, + "col": 38 + }, + "end": { + "line": 156, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 514, + "source": { + "start": { + "line": 156, + "col": 11 + }, + "end": { + "line": 156, + "col": 65 + } + }, + "pc": 0 + }, + { + "teal": 515, + "source": { + "start": { + "line": 158, + "col": 4 + }, + "end": { + "line": 160, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 516, + "source": { + "start": { + "line": 158, + "col": 8 + }, + "end": { + "line": 158, + "col": 35 + } + }, + "pc": 0 + }, + { + "teal": 517, + "source": { + "start": { + "line": 158, + "col": 8 + }, + "end": { + "line": 158, + "col": 35 + } + }, + "pc": 0 + }, + { + "teal": 518, + "source": { + "start": { + "line": 158, + "col": 8 + }, + "end": { + "line": 158, + "col": 16 + } + }, + "pc": 0 + }, + { + "teal": 519, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 520, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 521, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 523, + "source": { + "start": { + "line": 158, + "col": 21 + }, + "end": { + "line": 158, + "col": 35 + } + }, + "pc": 0 + }, + { + "teal": 526, + "source": { + "start": { + "line": 158, + "col": 4 + }, + "end": { + "line": 160, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 527, + "source": { + "start": { + "line": 158, + "col": 4 + }, + "end": { + "line": 160, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 528, + "source": { + "start": { + "line": 159, + "col": 6 + }, + "end": { + "line": 159, + "col": 51 + } + }, + "pc": 0 + }, + { + "teal": 529, + "source": { + "start": { + "line": 159, + "col": 6 + }, + "end": { + "line": 159, + "col": 51 + } + }, + "pc": 0 + }, + { + "teal": 533, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 534, + "source": { + "start": { + "line": 159, + "col": 13 + }, + "end": { + "line": 159, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 535, + "source": { + "start": { + "line": 159, + "col": 13 + }, + "end": { + "line": 159, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 540, + "source": { + "start": { + "line": 159, + "col": 34 + }, + "end": { + "line": 159, + "col": 37 + } + }, + "pc": 0 + }, + { + "teal": 541, + "source": { + "start": { + "line": 159, + "col": 13 + }, + "end": { + "line": 159, + "col": 50 + } + }, + "pc": 0 + }, + { + "teal": 542, + "source": { + "start": { + "line": 158, + "col": 4 + }, + "end": { + "line": 160, + "col": 5 + } + }, + "pc": 0 + }, + { + "teal": 543, + "source": { + "start": { + "line": 162, + "col": 19 + }, + "end": { + "line": 162, + "col": 63 + } + }, + "pc": 0 + }, + { + "teal": 544, + "source": { + "start": { + "line": 162, + "col": 19 + }, + "end": { + "line": 162, + "col": 63 + } + }, + "pc": 0 + }, + { + "teal": 545, + "source": { + "start": { + "line": 162, + "col": 19 + }, + "end": { + "line": 162, + "col": 52 + } + }, + "pc": 0 + }, + { + "teal": 546, + "source": { + "start": { + "line": 162, + "col": 19 + }, + "end": { + "line": 162, + "col": 63 + } + }, + "pc": 0 + }, + { + "teal": 547, + "source": { + "start": { + "line": 162, + "col": 19 + }, + "end": { + "line": 162, + "col": 63 + } + }, + "pc": 0 + }, + { + "teal": 552, + "source": { + "start": { + "line": 164, + "col": 19 + }, + "end": { + "line": 164, + "col": 27 + } + }, + "pc": 0 + }, + { + "teal": 553, + "source": { + "start": { + "line": 164, + "col": 19 + }, + "end": { + "line": 164, + "col": 27 + } + }, + "pc": 0 + }, + { + "teal": 554, + "source": { + "start": { + "line": 164, + "col": 4 + }, + "end": { + "line": 164, + "col": 28 + } + }, + "pc": 0 + }, + { + "teal": 556, + "source": { + "start": { + "line": 166, + "col": 4 + }, + "end": { + "line": 167, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 559, + "source": { + "start": { + "line": 166, + "col": 8 + }, + "end": { + "line": 166, + "col": 16 + } + }, + "pc": 0 + }, + { + "teal": 560, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 561, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 562, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 563, + "source": { + "start": { + "line": 166, + "col": 21 + }, + "end": { + "line": 166, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 564, + "source": { + "start": { + "line": 166, + "col": 21 + }, + "end": { + "line": 166, + "col": 33 + } + }, + "pc": 0 + }, + { + "teal": 565, + "source": { + "start": { + "line": 166, + "col": 17 + }, + "end": { + "line": 166, + "col": 20 + } + }, + "pc": 0 + }, + { + "teal": 566, + "source": { + "start": { + "line": 166, + "col": 4 + }, + "end": { + "line": 167, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 567, + "source": { + "start": { + "line": 166, + "col": 4 + }, + "end": { + "line": 167, + "col": 41 + } + }, + "pc": 0 + }, + { + "teal": 569, + "source": { + "start": { + "line": 166, + "col": 35 + }, + "end": { + "line": 166, + "col": 65 + } + }, + "pc": 0 + }, + { + "teal": 575, + "source": { + "start": { + "line": 167, + "col": 9 + }, + "end": { + "line": 167, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 576, + "source": { + "start": { + "line": 167, + "col": 9 + }, + "end": { + "line": 167, + "col": 40 + } + }, + "pc": 0 + }, + { + "teal": 577, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 581, + "source": { + "start": { + "line": 167, + "col": 9 + }, + "end": { + "line": 167, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 582, + "source": { + "start": { + "line": 167, + "col": 9 + }, + "end": { + "line": 167, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 583, + "source": { + "start": { + "line": 167, + "col": 9 + }, + "end": { + "line": 167, + "col": 29 + } + }, + "pc": 0 + }, + { + "teal": 584, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 585, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 586, + "source": { + "start": { + "line": 154, + "col": 21 + }, + "end": { + "line": 154, + "col": 42 + } + }, + "pc": 0 + }, + { + "teal": 590, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 591, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 594, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 595, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 598, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 599, + "source": { + "start": { + "line": 170, + "col": 6 + }, + "end": { + "line": 170, + "col": 67 + } + }, + "pc": 0 + }, + { + "teal": 604, + "source": { + "start": { + "line": 170, + "col": 23 + }, + "end": { + "line": 170, + "col": 67 + } + }, + "pc": 0 + }, + { + "teal": 606, + "source": { + "start": { + "line": 170, + "col": 6 + }, + "end": { + "line": 170, + "col": 67 + } + }, + "pc": 0 + }, + { + "teal": 607, + "source": { + "start": { + "line": 171, + "col": 6 + }, + "end": { + "line": 171, + "col": 31 + } + }, + "pc": 0 + }, + { + "teal": 608, + "source": { + "start": { + "line": 171, + "col": 6 + }, + "end": { + "line": 171, + "col": 31 + } + }, + "pc": 0 + }, + { + "teal": 610, + "source": { + "start": { + "line": 171, + "col": 16 + }, + "end": { + "line": 171, + "col": 24 + } + }, + "pc": 0 + }, + { + "teal": 611, + "source": { + "start": { + "line": 171, + "col": 6 + }, + "end": { + "line": 171, + "col": 31 + } + }, + "pc": 0 + }, + { + "teal": 615, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 616, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 617, + "source": { + "start": { + "line": 169, + "col": 4 + }, + "end": { + "line": 172, + "col": 6 + } + }, + "pc": 0 + }, + { + "teal": 618, + "source": { + "start": { + "line": 151, + "col": 2 + }, + "end": { + "line": 173, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 619, + "source": { + "start": { + "line": 178, + "col": 2 + }, + "end": { + "line": 180, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 627, + "source": { + "start": { + "line": 178, + "col": 2 + }, + "end": { + "line": 180, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 629, + "source": { + "start": { + "line": 178, + "col": 2 + }, + "end": { + "line": 180, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 630, + "source": { + "start": { + "line": 179, + "col": 4 + }, + "end": { + "line": 179, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 631, + "source": { + "start": { + "line": 179, + "col": 4 + }, + "end": { + "line": 179, + "col": 54 + } + }, + "pc": 0 + }, + { + "teal": 633, + "source": { + "start": { + "line": 179, + "col": 11 + }, + "end": { + "line": 179, + "col": 19 + } + }, + "pc": 0 + }, + { + "teal": 634, + "source": { + "start": { + "line": 179, + "col": 31 + }, + "end": { + "line": 179, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 635, + "source": { + "start": { + "line": 179, + "col": 27 + }, + "end": { + "line": 179, + "col": 30 + } + }, + "pc": 0 + }, + { + "teal": 637, + "source": { + "start": { + "line": 179, + "col": 11 + }, + "end": { + "line": 179, + "col": 53 + } + }, + "pc": 0 + }, + { + "teal": 638, + "source": { + "start": { + "line": 178, + "col": 2 + }, + "end": { + "line": 180, + "col": 3 + } + }, + "pc": 0 + }, + { + "teal": 639, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 641, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 642, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 643, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 644, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 645, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 647, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 648, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 649, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 650, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 651, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 652, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 653, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 654, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 655, + "source": { + "start": { + "line": 188, + "col": 2 + }, + "end": { + "line": 188, + "col": 18 + } + }, + "pc": 0 + }, + { + "teal": 656, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 658, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 659, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 660, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 661, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 662, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + }, + { + "teal": 1, + "source": { + "start": { + "line": 39, + "col": 0 + }, + "end": { + "line": 189, + "col": 1 + } + }, + "pc": 0 + } +] \ No newline at end of file diff --git a/client/internal/driver.go b/client/internal/driver.go index 3a2e275..edd56b7 100644 --- a/client/internal/driver.go +++ b/client/internal/driver.go @@ -1,40 +1,23 @@ package internal import ( - "context" - "encoding/json" + "errors" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" "go.bryk.io/pkg/did" "go.bryk.io/pkg/did/resolver" - "go.bryk.io/pkg/errors" ) -// provider required for the resolver provider. -type provider struct { - client protoV1.AgentAPIClient -} - -func (p *provider) Read(id string) (*did.Document, *did.DocumentMetadata, error) { - ID, err := did.Parse(id) - if err != nil { +// Read a DID document from the Algorand network. The method complies +// with the `resolver.Provider` interface. +func (c *AlgoClient) Read(id string) (*did.Document, *did.DocumentMetadata, error) { + if _, err := did.Parse(id); err != nil { return nil, nil, errors.New(resolver.ErrInvalidDID) } - req := &protoV1.QueryRequest{ - Method: ID.Method(), - Subject: ID.Subject(), - } - res, err := p.client.Query(context.Background(), req) + doc, err := c.Resolve(id) if err != nil { return nil, nil, errors.New(resolver.ErrNotFound) } - doc := new(did.Document) - if err = json.Unmarshal(res.Document, doc); err != nil { - return nil, nil, errors.New(resolver.ErrInvalidDocument) - } md := new(did.DocumentMetadata) - if err = json.Unmarshal(res.DocumentMetadata, md); err != nil { - return nil, nil, errors.New(resolver.ErrInvalidDocument) - } + md.Deactivated = false return doc, md, nil } diff --git a/client/internal/main.go b/client/internal/main.go index eb31acd..638d307 100644 --- a/client/internal/main.go +++ b/client/internal/main.go @@ -1,153 +1,223 @@ package internal import ( + "bytes" + "context" + "encoding/hex" + "encoding/json" + "fmt" + "io" "net/http" - "time" - - "github.com/algorandfoundation/did-algo/info" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "github.com/spf13/viper" - "go.bryk.io/pkg/did/resolver" - pkgHttp "go.bryk.io/pkg/net/http" - mwHeaders "go.bryk.io/pkg/net/middleware/headers" - mwProxy "go.bryk.io/pkg/net/middleware/proxy" - mwRecovery "go.bryk.io/pkg/net/middleware/recovery" - otelHttp "go.bryk.io/pkg/otel/http" - "google.golang.org/grpc" + "strconv" + "strings" + + "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" + "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" + "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/algorand/go-algorand-sdk/v2/types" + "go.bryk.io/pkg/did" + xlog "go.bryk.io/pkg/log" ) -// DefaultAgentEndpoint defines the standard network agent to use -// when no user-provided value is available. -const DefaultAgentEndpoint = "algo-did.aidtech.network:443" +// ClientSettings defines the configuration options available when +// interacting with an AlgoDID network agent. +type ClientSettings struct { + Active string `json:"active" yaml:"active" mapstructure:"active"` + Profiles []*NetworkProfile `json:"profiles" yaml:"profiles" mapstructure:"profiles"` +} + +// NetworkProfile defines the configuration options to connect to a +// specific AlgoDID network agent. +type NetworkProfile struct { + // Profile name. + Name string `json:"name" yaml:"name" mapstructure:"name"` -// ResolverSettings defines the configuration options available when -// deploying a DIF compliant resolver endpoint. -type ResolverSettings struct { - Port uint `json:"port" yaml:"port" mapstructure:"port"` - ProxyProtocol bool `json:"proxy_protocol" yaml:"proxy_protocol" mapstructure:"proxy_protocol"` - TLS *tlsSettings `json:"tls" yaml:"tls" mapstructure:"tls"` - Client *ClientSettings `json:"client" yaml:"client" mapstructure:"client"` + // Algod node address. + Node string `json:"node" yaml:"node" mapstructure:"node"` + + // Algod node access token. + NodeToken string `json:"node_token,omitempty" yaml:"node_token,omitempty" mapstructure:"node_token"` + + // Application ID for the AlgoDID storage smart contract. + AppID uint `json:"app_id" yaml:"app_id" mapstructure:"app_id"` + + // Storage contract provider server, if any. + StoreProvider string `json:"store_provider,omitempty" yaml:"store_provider,omitempty" mapstructure:"store_provider"` } -// Load available configuration values and set sensible default values. -func (rs *ResolverSettings) Load(v *viper.Viper) { - _ = v.UnmarshalKey("resolver", rs) - if rs.Port == 0 { - rs.Port = 9091 - } - if rs.TLS == nil { - rs.TLS = &tlsSettings{Enabled: false} +// AlgoClient provides a simplified interface to interact with the +// Algorand network. +type AlgoClient struct { + np *NetworkProfile + log xlog.Logger + httpC *http.Client + algod *algod.Client +} + +// NewAlgoClient creates a new instance of the AlgoClient. +func NewAlgoClient(profile *NetworkProfile, log xlog.Logger) (*AlgoClient, error) { + if profile == nil { + return nil, fmt.Errorf("no network profile provided") } - if rs.Client == nil { - rs.Client = new(ClientSettings) - _ = rs.Client.Validate() - rs.Client.Insecure = v.GetBool("resolver.client.insecure") - if node := v.GetString("resolver.client.node"); node != "" { - rs.Client.Node = node - } + client, err := algod.MakeClient(profile.Node, profile.NodeToken) + if err != nil { + return nil, err } + return &AlgoClient{ + np: profile, + log: log, + algod: client, + httpC: &http.Client{}, + }, nil +} + +// StorageAppID returns the application ID for the AlgoDID storage. +func (c *AlgoClient) StorageAppID() uint { + return c.np.AppID +} + +// SuggestedParams returns the suggested transaction parameters. +func (c *AlgoClient) SuggestedParams() (types.SuggestedParams, error) { + return c.algod.SuggestedParams().Do(context.TODO()) } -// Resolver instance. -func (rs *ResolverSettings) Resolver(conn *grpc.ClientConn) (*resolver.Instance, error) { - // Driver instance - provider := &provider{client: protoV1.NewAgentAPIClient(conn)} +// SubmitTx sends a raw signed transaction to the network. +func (c *AlgoClient) SubmitTx(stx []byte) (string, error) { + return c.algod.SendRawTransaction(stx).Do(context.TODO()) +} + +// AccountInformation returns the account information for the given address. +func (c *AlgoClient) AccountInformation(address string) (models.Account, error) { + return c.algod.AccountInformation(address).Do(context.TODO()) +} + +// Ready returns true if the network is available. +func (c *AlgoClient) Ready() bool { + return c.algod.HealthCheck().Do(context.TODO()) == nil +} - // Resolver instance - return resolver.New(resolver.WithProvider("algo", provider)) +// DeployContract creates a new instance of the AlgoDID storage smart contract +// on the network. +func (c *AlgoClient) DeployContract(sender *crypto.Account) (uint64, error) { + contract := loadContract() + signer := transaction.BasicAccountTransactionSigner{Account: *sender} + return createApp(c.algod, contract, signer.Account.Address, signer) } -// ServerOpts returns proper settings when exposing the resolver through -// an HTTP endpoint. -func (rs *ResolverSettings) ServerOpts(handler http.Handler, rc string) []pkgHttp.Option { - opts := []pkgHttp.Option{ - pkgHttp.WithHandler(handler), - pkgHttp.WithPort(int(rs.Port)), - pkgHttp.WithIdleTimeout(10 * time.Second), - pkgHttp.WithMiddleware(mwRecovery.Handler()), - pkgHttp.WithMiddleware(otelHttp.NewMonitor().ServerMiddleware()), - pkgHttp.WithMiddleware(mwHeaders.Handler(map[string]string{ - "x-resolver-version": info.CoreVersion, - "x-resolver-build-code": info.BuildCode, - "x-resolver-release": rc, - "x-content-type-options": "nosniff", - })), +// PublishDID sends a new DID document to the network +// fot on-chain storage. +func (c *AlgoClient) PublishDID(id *did.Identifier, sender *crypto.Account) error { + c.log.WithFields(map[string]interface{}{ + "did": id.String(), + }).Info("publishing DID document") + contract := loadContract() + signer := transaction.BasicAccountTransactionSigner{Account: *sender} + doc, _ := json.Marshal(id.Document(true)) + pub, appID, err := parseSubjectString(id.Subject()) + if err != nil { + return err } - if rs.ProxyProtocol { - opts = append(opts, pkgHttp.WithMiddleware(mwProxy.Handler())) + if c.np.StoreProvider != "" { + return c.submitToProvider(pub, appID, http.MethodPost, doc) } - if rs.TLS.Enabled { - val, err := rs.TLS.expand() - if err == nil { - opts = append(opts, pkgHttp.WithTLS(*val)) - } + return publishDID(c.algod, appID, contract, sender.Address, signer, doc, pub) +} + +// DeleteDID removes a DID document from the network. +func (c *AlgoClient) DeleteDID(id *did.Identifier, sender *crypto.Account) error { + c.log.WithFields(map[string]interface{}{ + "did": id.String(), + }).Info("deleting DID document") + contract := loadContract() + signer := transaction.BasicAccountTransactionSigner{Account: *sender} + pub, appID, err := parseSubjectString(id.Subject()) + if err != nil { + return err + } + if c.np.StoreProvider != "" { + return c.submitToProvider(pub, appID, http.MethodDelete, nil) } - return opts + return deleteDID(appID, pub, sender.Address, c.algod, contract, signer) } -// ClientSettings defines the configuration options available when -// interacting with an AlgoDID network agent. -type ClientSettings struct { - Node string `json:"node" yaml:"node" mapstructure:"node"` - Timeout uint `json:"timeout" yaml:"timeout" mapstructure:"timeout"` - Insecure bool `json:"insecure" yaml:"insecure" mapstructure:"insecure"` - Override string `json:"override" yaml:"override" mapstructure:"override"` - PoW uint `json:"pow" yaml:"pow" mapstructure:"pow"` +// Resolve retrieves a DID document from the network. +func (c *AlgoClient) Resolve(id string) (*did.Document, error) { + c.log.WithField("did", id).Info("retrieving DID document") + + // Parse the DID + subject, err := did.Parse(id) + if err != nil { + return nil, err + } + + // Extract the public key and application ID from the subject + pub, appID, err := parseSubjectString(subject.Subject()) + if err != nil { + return nil, err + } + + // Retrieve the data from the network + data, err := resolveDID(appID, pub, c.algod) + if err != nil { + return nil, err + } + doc := &did.Document{} + if err := json.Unmarshal(data, doc); err != nil { + return nil, err + } + return doc, nil } -// Validate the settings and load sensible default values. -func (cl *ClientSettings) Validate() error { - if cl.Node == "" { - cl.Node = DefaultAgentEndpoint +func (c *AlgoClient) submitToProvider(pub []byte, appID uint64, method string, doc []byte) error { + c.log.Warning("using provider: ", c.np.StoreProvider) + addr, err := addressFromPub(pub) + if err != nil { + return err + } + endpoint := fmt.Sprintf("%s/v1/%s/%d", c.np.StoreProvider, addr, appID) + var payload io.Reader + if doc != nil { + payload = bytes.NewReader(doc) } - if cl.PoW == 0 { - cl.PoW = 8 + req, err := http.NewRequestWithContext(context.TODO(), method, endpoint, payload) + if err != nil { + return err } - if cl.Timeout == 0 { - cl.Timeout = 5 + req.Header.Set("Content-Type", "application/json") + res, err := c.httpC.Do(req) + if err != nil { + return err + } + body, _ := io.ReadAll(res.Body) // nolint + defer res.Body.Close() // nolint + if res.StatusCode != http.StatusOK { + c.log.Warningf("%s", body) + return fmt.Errorf("unexpected response: %s", res.Status) } return nil } -type tlsSettings struct { - Enabled bool `json:"enabled" yaml:"enabled" mapstructure:"enabled"` - SystemCA bool `json:"system_ca" yaml:"system_ca" mapstructure:"system_ca"` - Cert string `json:"cert" yaml:"cert" mapstructure:"cert"` - Key string `json:"key" yaml:"key" mapstructure:"key"` - CustomCA []string `json:"custom_ca" yaml:"custom_ca" mapstructure:"custom_ca"` - - // private expanded values - cert []byte - key []byte - customCAs [][]byte -} - -func (ts *tlsSettings) expand() (*pkgHttp.TLS, error) { - var err error - if ts.Cert != "" { - ts.cert, err = loadPem(ts.Cert) - if err != nil { - return nil, err - } - } - if ts.Key != "" { - ts.key, err = loadPem(ts.Key) - if err != nil { - return nil, err - } - } - ts.customCAs = [][]byte{} - for _, ca := range ts.CustomCA { - cp, err := loadPem(ca) - if err != nil { - return nil, err - } - ts.customCAs = append(ts.customCAs, cp) - } - return &pkgHttp.TLS{ - Cert: ts.cert, - PrivateKey: ts.key, - IncludeSystemCAs: ts.SystemCA, - CustomCAs: ts.customCAs, - }, nil +func addressFromPub(pub []byte) (string, error) { + return types.EncodeAddress(pub) +} + +func parseSubjectString(subject string) (pub []byte, appID uint64, err error) { + idSegments := strings.Split(subject, "-") + if len(idSegments) != 2 { + err = fmt.Errorf("invalid subject identifier") + return + } + pub, err = hex.DecodeString(idSegments[0]) + if err != nil { + err = fmt.Errorf("invalid public key in subject identifier") + return + } + app, err := strconv.Atoi(idSegments[1]) + if err != nil { + err = fmt.Errorf("invalid storage app ID in subject identifier") + return + } + appID = uint64(app) + return } diff --git a/client/internal/utils.go b/client/internal/utils.go index 7745784..8e680ee 100644 --- a/client/internal/utils.go +++ b/client/internal/utils.go @@ -1,15 +1,486 @@ +// nolint package internal import ( + "context" "encoding/base64" - "os" - "path" + "encoding/binary" + "fmt" + "math" + + "github.com/algorand/go-algorand-sdk/v2/abi" + "github.com/algorand/go-algorand-sdk/v2/client/v2/algod" + "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/transaction" + "github.com/algorand/go-algorand-sdk/v2/types" +) + +const ( + cost_per_byte = 400 + cost_per_box = 2500 + max_box_size = 32768 + bytes_per_call = 2048 - 4 - 34 - 8 - 8 ) -func loadPem(value string) ([]byte, error) { - data, err := base64.StdEncoding.DecodeString(value) - if err == nil { - return data, nil +// CreateApp is used to deploy the AlgoDID storage smart contract to the +// Algorand network. +func createApp( + algodClient *algod.Client, + contract *abi.Contract, + sender types.Address, + signer transaction.TransactionSigner, +) (uint64, error) { + atc := transaction.AtomicTransactionComposer{} + + // Grab the method from out contract object + method, err := contract.GetMethodByName("createApplication") + if err != nil { + return 0, fmt.Errorf("failed to get add method: %w", err) + } + + sp, err := algodClient.SuggestedParams().Do(context.Background()) + if err != nil { + return 0, fmt.Errorf("failed to get suggested params: %w", err) + } + + compiledApproval, err := algodClient.TealCompile(approvalTeal).Do(context.Background()) + if err != nil { + return 0, fmt.Errorf("failed to compile approval: %w", err) + } + + compiledClear, err := algodClient.TealCompile(clearTeal).Do(context.Background()) + if err != nil { + return 0, fmt.Errorf("failed to compile clear: %w", err) + } + + approvalProgram, err := base64.StdEncoding.DecodeString(compiledApproval.Result) + if err != nil { + return 0, fmt.Errorf("failed to decode approval program: %w", err) + } + + clearProgram, err := base64.StdEncoding.DecodeString(compiledClear.Result) + if err != nil { + return 0, fmt.Errorf("failed to decode clear program: %w", err) + } + + mcp := transaction.AddMethodCallParams{ + AppID: 0, + Sender: sender, + SuggestedParams: sp, + OnComplete: types.NoOpOC, + Signer: signer, + Method: method, + MethodArgs: []interface{}{}, + ApprovalProgram: approvalProgram, + ClearProgram: clearProgram, + GlobalSchema: types.StateSchema{NumUint: 1}, + } + if err := atc.AddMethodCall(mcp); err != nil { + return 0, fmt.Errorf("failed to add method call: %w", err) + } + + result, err := atc.Execute(algodClient, context.Background(), 3) + if err != nil { + return 0, fmt.Errorf("failed to execute atomic transaction: %w", err) + } + + confirmedTxn, err := transaction.WaitForConfirmation(algodClient, result.TxIDs[0], 4, context.Background()) + if err != nil { + return 0, fmt.Errorf("failed to wait for confirmation: %w", err) + } + + appID := confirmedTxn.ApplicationIndex + fundAtc := transaction.AtomicTransactionComposer{} + mbrPayment, err := transaction.MakePaymentTxn( + sender.String(), + crypto.GetApplicationAddress(appID).String(), + uint64(100_000), + nil, + "", + sp, + ) + if err != nil { + return 0, fmt.Errorf("failed to make payment txn: %w", err) + } + + var mbrPaymentWithSigner transaction.TransactionWithSigner + mbrPaymentWithSigner.Txn = mbrPayment + mbrPaymentWithSigner.Signer = signer + if err = fundAtc.AddTransaction(mbrPaymentWithSigner); err != nil { + return 0, fmt.Errorf("failed to add transaction: %w", err) + } + if _, err = fundAtc.Execute(algodClient, context.Background(), 3); err != nil { + return 0, fmt.Errorf("failed to execute atomic transaction: %w", err) + } + return confirmedTxn.ApplicationIndex, nil +} + +// PublishDID is used to upload a new DID document to the AlgoDID +// storage smart contract. +func publishDID( + algodClient *algod.Client, + appID uint64, + contract *abi.Contract, + sender types.Address, + signer transaction.TransactionSigner, + data []byte, + pubKey []byte, +) error { + ceilBoxes := int(math.Ceil(float64(len(data)) / float64(max_box_size))) + endBoxSize := len(data) % max_box_size + + totalCost := ceilBoxes*cost_per_box + (ceilBoxes-1)*max_box_size*cost_per_byte + ceilBoxes*8*cost_per_byte + endBoxSize*cost_per_byte + cost_per_box + (8+8+1+8+32+8)*cost_per_byte + + atc := transaction.AtomicTransactionComposer{} + + // Grab the method from out contract object + method, err := contract.GetMethodByName("startUpload") + if err != nil { + return fmt.Errorf("failed to get add method: %w", err) + } + + sp, err := algodClient.SuggestedParams().Do(context.Background()) + if err != nil { + return fmt.Errorf("failed to get suggested params: %w", err) + } + + mbrPayment, err := transaction.MakePaymentTxn( + sender.String(), + crypto.GetApplicationAddress(appID).String(), + uint64(totalCost), + nil, + "", + sp, + ) + if err != nil { + return fmt.Errorf("failed to make payment txn: %w", err) + } + var mbrPaymentWithSigner transaction.TransactionWithSigner + mbrPaymentWithSigner.Txn = mbrPayment + mbrPaymentWithSigner.Signer = signer + + byteType, err := abi.TypeOf("address") + if err != nil { + return fmt.Errorf("failed to get type of address: %w", err) + } + + pubKeyAbiValue, err := byteType.Encode(pubKey) + if err != nil { + return fmt.Errorf("failed to encode public key: %w", err) + } + + boxRefs := []types.AppBoxReference{{AppID: appID, Name: pubKey}} + mcp := transaction.AddMethodCallParams{ + AppID: appID, + Sender: sender, + SuggestedParams: sp, + OnComplete: types.NoOpOC, + Signer: signer, + Method: method, + BoxReferences: boxRefs, + MethodArgs: []interface{}{pubKeyAbiValue, ceilBoxes, endBoxSize, mbrPaymentWithSigner}, + } + if err := atc.AddMethodCall(mcp); err != nil { + return fmt.Errorf("failed to add method call: %w", err) + } + + _, err = atc.Execute(algodClient, context.Background(), 3) + if err != nil { + return fmt.Errorf("failed to execute atomic transaction: %w", err) + } + + metadata, err := getMetadata(appID, pubKey, algodClient) + if err != nil { + return fmt.Errorf("failed to get metadata: %w", err) + } + + numBoxes := int(math.Floor(float64(len(data)) / float64(max_box_size))) + boxData := [][]byte{} + for i := 0; i < numBoxes; i++ { + upperBound := (i + 1) * max_box_size + if len(data) < upperBound { + upperBound = len(data) + } + box := data[i*max_box_size : upperBound] + boxData = append(boxData, box) + } + + // add data for the last box + if len(data) > max_box_size { + boxData = append(boxData, data[numBoxes*max_box_size:]) + } + + for boxIndexOffset, box := range boxData { + boxIndex := metadata.Start + uint64(boxIndexOffset) + encodedBoxIndex := make([]byte, 8) + binary.BigEndian.PutUint64(encodedBoxIndex, boxIndex) + numChunks := int(math.Ceil(float64(len(box)) / float64(bytes_per_call))) + chunks := [][]byte{} + for i := 0; i < numChunks; i++ { + upperBound := (i + 1) * bytes_per_call + if len(box) < upperBound { + upperBound = len(box) + } + chunks = append(chunks, box[i*bytes_per_call:upperBound]) + } + + boxRef := types.AppBoxReference{AppID: appID, Name: encodedBoxIndex} + boxes := []types.AppBoxReference{} + for i := 0; i < 7; i++ { + boxes = append(boxes, boxRef) + } + + boxes = append(boxes, types.AppBoxReference{AppID: appID, Name: pubKey}) + + uploadMethod, err := contract.GetMethodByName("upload") + if err != nil { + return fmt.Errorf("failed to get add method: %w", err) + } + + _, err = sendTxGroup(algodClient, uploadMethod, 0, pubKey, boxes, boxIndex, sp, sender, signer, appID, chunks[:8]) + if err != nil { + return fmt.Errorf("failed to send tx group: %w", err) + } + + if numChunks > 8 { + _, err = sendTxGroup(algodClient, uploadMethod, 8, pubKey, boxes, boxIndex, sp, sender, signer, appID, chunks[8:]) + if err != nil { + return fmt.Errorf("failed to send tx group: %w", err) + } + } + } + + finishUploadMethod, err := contract.GetMethodByName("finishUpload") + if err != nil { + return fmt.Errorf("failed to get add method: %w", err) + } + + finishUploadMcp := transaction.AddMethodCallParams{ + AppID: appID, + Sender: sender, + SuggestedParams: sp, + OnComplete: types.NoOpOC, + Signer: signer, + Method: finishUploadMethod, + BoxReferences: []types.AppBoxReference{{AppID: appID, Name: pubKey}}, + MethodArgs: []interface{}{pubKey}, + } + + finishAtc := transaction.AtomicTransactionComposer{} + if err := finishAtc.AddMethodCall(finishUploadMcp); err != nil { + return fmt.Errorf("failed to add method call: %w", err) + } + + _, err = finishAtc.Execute(algodClient, context.Background(), 3) + return err +} + +// ResolveDID is used to read the DID document from the AlgoDID storage smart +// contract. +func resolveDID(appID uint64, pubKey []byte, algodClient *algod.Client) ([]byte, error) { + metadata, err := getMetadata(appID, pubKey, algodClient) + if err != nil { + return nil, err + } + if metadata.Status == 0 { + return nil, fmt.Errorf("DID document is being created") + } + + if metadata.Status == 2 { + return nil, fmt.Errorf("DID document is being deleted") + } + + data := []byte{} + for i := metadata.Start; i <= metadata.End; i++ { + encodedBoxIndex := make([]byte, 8) + binary.BigEndian.PutUint64(encodedBoxIndex, i) + boxValue, err := algodClient.GetApplicationBoxByName(appID, encodedBoxIndex).Do(context.Background()) + if err != nil { + return nil, fmt.Errorf("failed to read box: %w", err) + } + data = append(data, boxValue.Value...) + } + + return data, nil +} + +// DeleteDID is used to delete the DID document from the AlgoDID +// storage smart contract. +func deleteDID( + appID uint64, + pubKey []byte, + sender types.Address, + algodClient *algod.Client, + contract *abi.Contract, + signer transaction.TransactionSigner, +) error { + startAtc := transaction.AtomicTransactionComposer{} + + method, err := contract.GetMethodByName("startDelete") + if err != nil { + return fmt.Errorf("failed to get add method: %w", err) + } + sp, err := algodClient.SuggestedParams().Do(context.Background()) + if err != nil { + return fmt.Errorf("failed to get suggested params: %w", err) + } + byteType, err := abi.TypeOf("address") + if err != nil { + return fmt.Errorf("failed to get type of address: %w", err) + } + + pubKeyAbiValue, err := byteType.Encode(pubKey) + if err != nil { + return fmt.Errorf("failed to encode public key: %w", err) + } + + mcp := transaction.AddMethodCallParams{ + AppID: appID, + Sender: sender, + SuggestedParams: sp, + OnComplete: types.NoOpOC, + Signer: signer, + Method: method, + BoxReferences: []types.AppBoxReference{{AppID: appID, Name: pubKey}}, + MethodArgs: []interface{}{pubKeyAbiValue}, } - return os.ReadFile(path.Clean(value)) + if err := startAtc.AddMethodCall(mcp); err != nil { + return fmt.Errorf("failed to add method call: %w", err) + } + if _, err = startAtc.Execute(algodClient, context.Background(), 3); err != nil { + return fmt.Errorf("failed to execute atomic transaction: %w", err) + } + + metadata, err := getMetadata(appID, pubKey, algodClient) + if err != nil { + return err + } + atcs := []struct { + boxIndex uint64 + atc transaction.AtomicTransactionComposer + }{} + + for boxIndex := metadata.Start; boxIndex <= metadata.End; boxIndex++ { + atc := transaction.AtomicTransactionComposer{} + encodedBoxIndex := make([]byte, 8) + binary.BigEndian.PutUint64(encodedBoxIndex, boxIndex) + boxIndexRef := types.AppBoxReference{AppID: appID, Name: encodedBoxIndex} + deleteDataMethod, err := contract.GetMethodByName("deleteData") + if err != nil { + return fmt.Errorf("failed to get method: %w", err) + } + + sp.Fee = 2000 + sp.FlatFee = true + if err := atc.AddMethodCall(transaction.AddMethodCallParams{ + AppID: appID, + Sender: sender, + SuggestedParams: sp, + OnComplete: types.NoOpOC, + Signer: signer, + Method: deleteDataMethod, + BoxReferences: []types.AppBoxReference{{AppID: appID, Name: pubKey}, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef}, + MethodArgs: []interface{}{pubKey, boxIndex}, + }); err != nil { + return fmt.Errorf("failed to add method call: %w", err) + } + + dummyMethod, err := contract.GetMethodByName("dummy") + if err != nil { + return fmt.Errorf("failed to get method: %w", err) + } + + for i := 0; i < 4; i++ { + if err := atc.AddMethodCall(transaction.AddMethodCallParams{ + AppID: appID, + Sender: sender, + SuggestedParams: sp, + OnComplete: types.NoOpOC, + Signer: signer, + Method: dummyMethod, + BoxReferences: []types.AppBoxReference{boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef, boxIndexRef}, + MethodArgs: []interface{}{}, + Note: []byte(fmt.Sprintf("dummy %d", i)), + }); err != nil { + return fmt.Errorf("failed to add method call: %w", err) + } + } + + atcs = append(atcs, struct { + boxIndex uint64 + atc transaction.AtomicTransactionComposer + }{boxIndex, atc}) + } + for _, atc := range atcs { + if _, err = atc.atc.Execute(algodClient, context.Background(), 3); err != nil { + return fmt.Errorf("failed to execute atomic transaction: %w", err) + } + } + return nil +} + +func getMetadata(appID uint64, pubKey []byte, algodClient *algod.Client) (metadata, error) { + boxValue, err := algodClient.GetApplicationBoxByName(appID, pubKey).Do(context.Background()) + if err != nil { + return metadata{}, fmt.Errorf("failed to get box: %w", err) + } + + metadataType, err := abi.TypeOf("(uint64,uint64,uint8,uint64,uint64)") + if err != nil { + return metadata{}, fmt.Errorf("failed to get type of metadata: %w", err) + } + + md, err := metadataType.Decode(boxValue.Value) + if err != nil { + return metadata{}, fmt.Errorf("failed to decode metadata: %w", err) + } + + return metadata{ + Start: md.([]interface{})[0].(uint64), + End: md.([]interface{})[1].(uint64), + Status: md.([]interface{})[2].(uint8), + EndSize: md.([]interface{})[3].(uint64), + }, nil +} + +func sendTxGroup( + algodClient *algod.Client, + abiMethod abi.Method, + bytesOffset int, + pubKey []byte, + boxes []types.AppBoxReference, + boxIndex uint64, + suggestedParams types.SuggestedParams, + sender types.Address, + signer transaction.TransactionSigner, + appID uint64, + group [][]byte, +) ([]string, error) { + atc := transaction.AtomicTransactionComposer{} + + for i, chunk := range group { + atc.AddMethodCall(transaction.AddMethodCallParams{ + Method: abiMethod, + MethodArgs: []interface{}{pubKey, boxIndex, bytes_per_call * (i + bytesOffset), chunk}, + BoxReferences: boxes, + SuggestedParams: suggestedParams, + Sender: sender, + Signer: signer, + AppID: appID, + }) + } + + result, err := atc.Execute(algodClient, context.Background(), 3) + if err != nil { + return nil, fmt.Errorf("failed to execute atomic transaction: %w", err) + } + + return result.TxIDs, nil +} + +type metadata struct { + Start uint64 + End uint64 + Status uint8 + EndSize uint64 } diff --git a/client/ui/api.go b/client/ui/api.go index 65a7196..5f71e40 100644 --- a/client/ui/api.go +++ b/client/ui/api.go @@ -22,15 +22,12 @@ type LocalAPI struct { } // LocalAPIServer creates a new instance of the local API server. -func LocalAPIServer(st *store.LocalStore, conf *internal.ClientSettings, log xlog.Logger) (*LocalAPI, error) { +func LocalAPIServer(st *store.LocalStore, client *internal.AlgoClient, log xlog.Logger) (*LocalAPI, error) { // provider instances p := &Provider{ - st: st, - log: log, - conf: conf, - } - if err := p.connect(); err != nil { - return nil, err + st: st, + log: log, + client: client, } // server instance diff --git a/client/ui/app.go b/client/ui/app.go index d9b63a0..b9999f8 100644 --- a/client/ui/app.go +++ b/client/ui/app.go @@ -3,6 +3,7 @@ package ui import ( "embed" "io/fs" + "path" ) // AppContents contains a static build of the local graphical @@ -13,5 +14,5 @@ var AppContents fs.FS var dist embed.FS func init() { - AppContents, _ = fs.Sub(dist, "local-app/dist") + AppContents, _ = fs.Sub(dist, path.Join("local-app", "dist")) } diff --git a/client/ui/local-app/dist/assets/index-307a277e.css b/client/ui/local-app/dist/assets/index-307a277e.css deleted file mode 100644 index 06391f2..0000000 --- a/client/ui/local-app/dist/assets/index-307a277e.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0px}.bottom-0{bottom:0px}.left-0{left:0px}.left-1\/2{left:50%}.right-0{right:0px}.top-0{top:0px}.top-1\/2{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.col-span-3{grid-column:span 3 / span 3}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.contents{display:contents}.\!hidden{display:none!important}.hidden{display:none}.h-12{height:3rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-screen{max-height:100vh}.min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.w-1\/2{width:50%}.w-11{width:2.75rem}.w-12{width:3rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.overflow-y-scroll{overflow-y:scroll}.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.bg-\[url\(\/img\/grid\.svg\)\]{background-image:url(/img/grid.svg)}.bg-center{background-position:center}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-3{padding-right:.75rem}.pt-10{padding-top:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-900\/5{--tw-ring-color: rgb(17 24 39 / .05)}.ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[mask-image\:linear-gradient\(180deg\,white\,rgba\(255\,255\,255\,0\)\)\]{-webkit-mask-image:linear-gradient(180deg,white,rgba(255,255,255,0));mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))}div#walletconnect-qrcode-modal{background-color:rgb(55 65 81 / var(--tw-bg-opacity));--tw-bg-opacity: .75;--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}p#walletconnect-qrcode-text{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}div.walletconnect-modal__base{max-width:28rem;border-radius:.375rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}div.walletconnect-modal__header>img{display:none}div.walletconnect-modal__header>p{display:none}div.walletconnect-modal__footer a{display:inline-flex;align-items:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity));padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}div.walletconnect-modal__footer a:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.odd\:bg-white:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.even\:bg-slate-50:nth-child(even){--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-green-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(22 163 74 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity))}.focus\:ring-yellow-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 138 4 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-green-50:focus{--tw-ring-offset-color: #f0fdf4}.focus\:ring-offset-red-50:focus{--tw-ring-offset-color: #fef2f2}.focus\:ring-offset-yellow-50:focus{--tw-ring-offset-color: #fefce8}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}@media (min-width: 640px){.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:grid{display:grid}.sm\:w-3\/4{width:75%}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:gap-4{gap:1rem}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.sm\:divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.sm\:rounded-md{border-radius:.375rem}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-0{padding-top:0;padding-bottom:0}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:pl-3{padding-left:.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}.first\:sm\:pt-0:first-child{padding-top:0}}@media (min-width: 768px){.md\:w-1\/2{width:50%}.md\:w-3\/4{width:75%}.md\:rounded-md{border-radius:.375rem}}@media (min-width: 1024px){.lg\:table-cell{display:table-cell}.lg\:w-1\/2{width:50%}.lg\:px-8{padding-left:2rem;padding-right:2rem}}code[class*=language-],pre[class*=language-]{color:#c5c8c6;text-shadow:0 1px rgba(0,0,0,.3);font-family:Inconsolata,Monaco,Consolas,Courier New,Courier,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#1d1f21}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#7c7c7c}.token.punctuation{color:#c5c8c6}.namespace{opacity:.7}.token.property,.token.keyword,.token.tag{color:#96cbfe}.token.class-name{color:#ffffb6;text-decoration:underline}.token.boolean,.token.constant{color:#9c9}.token.symbol,.token.deleted{color:#f92672}.token.number{color:#ff73fd}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a8ff60}.token.variable{color:#c6c5fe}.token.operator{color:#ededed}.token.entity{color:#ffffb6;cursor:help}.token.url{color:#96cbfe}.language-css .token.string,.style .token.string{color:#87c38a}.token.atrule,.token.attr-value{color:#f9ee98}.token.function{color:#dad085}.token.regex{color:#e9c062}.token.important{color:#fd971f}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic} diff --git a/client/ui/local-app/dist/assets/index-64b7c841.js b/client/ui/local-app/dist/assets/index-64b7c841.js new file mode 100644 index 0000000..34b559d --- /dev/null +++ b/client/ui/local-app/dist/assets/index-64b7c841.js @@ -0,0 +1,581 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ua(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){if(this instanceof r){var o=[null];o.push.apply(o,arguments);var i=Function.bind.apply(e,o);return new i}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var Yt={},ir={};ir.byteLength=El;ir.toByteArray=Sl;ir.fromByteArray=Tl;var ct=[],et=[],xl=typeof Uint8Array<"u"?Uint8Array:Array,Rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rn=0,Ml=Rr.length;rn0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function El(t){var e=ca(t),n=e[0],r=e[1];return(n+r)*3/4-r}function kl(t,e,n){return(e+n)*3/4-n}function Sl(t){var e,n=ca(t),r=n[0],o=n[1],i=new xl(kl(t,r,o)),u=0,s=o>0?r-4:r,d;for(d=0;d>16&255,i[u++]=e>>8&255,i[u++]=e&255;return o===2&&(e=et[t.charCodeAt(d)]<<2|et[t.charCodeAt(d+1)]>>4,i[u++]=e&255),o===1&&(e=et[t.charCodeAt(d)]<<10|et[t.charCodeAt(d+1)]<<4|et[t.charCodeAt(d+2)]>>2,i[u++]=e>>8&255,i[u++]=e&255),i}function Cl(t){return ct[t>>18&63]+ct[t>>12&63]+ct[t>>6&63]+ct[t&63]}function Al(t,e,n){for(var r,o=[],i=e;is?s:u+i));return r===1?(e=t[n-1],o.push(ct[e>>2]+ct[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],o.push(ct[e>>10]+ct[e>>4&63]+ct[e<<2&63]+"=")),o.join("")}var mi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */mi.read=function(t,e,n,r,o){var i,u,s=o*8-r-1,d=(1<>1,w=-7,B=n?o-1:0,I=n?-1:1,O=t[e+B];for(B+=I,i=O&(1<<-w)-1,O>>=-w,w+=s;w>0;i=i*256+t[e+B],B+=I,w-=8);for(u=i&(1<<-w)-1,i>>=-w,w+=r;w>0;u=u*256+t[e+B],B+=I,w-=8);if(i===0)i=1-v;else{if(i===d)return u?NaN:(O?-1:1)*(1/0);u=u+Math.pow(2,r),i=i-v}return(O?-1:1)*u*Math.pow(2,i-r)};mi.write=function(t,e,n,r,o,i){var u,s,d,v=i*8-o-1,w=(1<>1,I=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=r?0:i-1,F=r?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,u=w):(u=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-u))<1&&(u--,d*=2),u+B>=1?e+=I/d:e+=I*Math.pow(2,1-B),e*d>=2&&(u++,d/=2),u+B>=w?(s=0,u=w):u+B>=1?(s=(e*d-1)*Math.pow(2,o),u=u+B):(s=e*Math.pow(2,B-1)*Math.pow(2,o),u=0));o>=8;t[n+O]=s&255,O+=F,s/=256,o-=8);for(u=u<0;t[n+O]=u&255,O+=F,u/=256,v-=8);t[n+O-F]|=P*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(t){var e=ir,n=mi,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=x,t.INSPECT_MAX_BYTES=50;var o=2147483647;t.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var M=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(M,f),M.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function u(M){if(M>o)throw new RangeError('The value "'+M+'" is invalid for option "size"');var f=new Uint8Array(M);return Object.setPrototypeOf(f,s.prototype),f}function s(M,f,h){if(typeof M=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(M)}return d(M,f,h)}s.poolSize=8192;function d(M,f,h){if(typeof M=="string")return I(M,f);if(ArrayBuffer.isView(M))return F(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(me(M,ArrayBuffer)||M&&me(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(M,SharedArrayBuffer)||M&&me(M.buffer,SharedArrayBuffer)))return P(M,f,h);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var A=M.valueOf&&M.valueOf();if(A!=null&&A!==M)return s.from(A,f,h);var N=S(M);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return s.from(M[Symbol.toPrimitive]("string"),f,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}s.from=function(M,f,h){return d(M,f,h)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function v(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function w(M,f,h){return v(M),M<=0?u(M):f!==void 0?typeof h=="string"?u(M).fill(f,h):u(M).fill(f):u(M)}s.alloc=function(M,f,h){return w(M,f,h)};function B(M){return v(M),u(M<0?0:R(M)|0)}s.allocUnsafe=function(M){return B(M)},s.allocUnsafeSlow=function(M){return B(M)};function I(M,f){if((typeof f!="string"||f==="")&&(f="utf8"),!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f);var h=E(M,f)|0,A=u(h),N=A.write(M,f);return N!==h&&(A=A.slice(0,N)),A}function O(M){for(var f=M.length<0?0:R(M.length)|0,h=u(f),A=0;A=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return M|0}function x(M){return+M!=M&&(M=0),s.alloc(+M)}s.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==s.prototype},s.compare=function(f,h){if(me(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),me(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(f)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===h)return 0;for(var A=f.length,N=h.length,z=0,Z=Math.min(A,N);zN.length?s.from(Z).copy(N,z):Uint8Array.prototype.set.call(N,Z,z);else if(s.isBuffer(Z))Z.copy(N,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=Z.length}return N};function E(M,f){if(s.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||me(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);var h=M.length,A=arguments.length>2&&arguments[2]===!0;if(!A&&h===0)return 0;for(var N=!1;;)switch(f){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return J(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return ne(M).length;default:if(N)return A?-1:J(M).length;f=(""+f).toLowerCase(),N=!0}}s.byteLength=E;function T(M,f,h){var A=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,f>>>=0,h<=f))return"";for(M||(M="utf8");;)switch(M){case"hex":return l(this,f,h);case"utf8":case"utf-8":return _(this,f,h);case"ascii":return L(this,f,h);case"latin1":case"binary":return b(this,f,h);case"base64":return p(this,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,f,h);default:if(A)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),A=!0}}s.prototype._isBuffer=!0;function $(M,f,h){var A=M[f];M[f]=M[h],M[h]=A}s.prototype.swap16=function(){var f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;hh&&(f+=" ... "),""},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(f,h,A,N,z){if(me(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(h===void 0&&(h=0),A===void 0&&(A=f?f.length:0),N===void 0&&(N=0),z===void 0&&(z=this.length),h<0||A>f.length||N<0||z>this.length)throw new RangeError("out of range index");if(N>=z&&h>=A)return 0;if(N>=z)return-1;if(h>=A)return 1;if(h>>>=0,A>>>=0,N>>>=0,z>>>=0,this===f)return 0;for(var Z=z-N,se=A-h,le=Math.min(Z,se),ve=this.slice(N,z),de=f.slice(h,A),ue=0;ue2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,oe(h)&&(h=N?0:M.length-1),h<0&&(h=M.length+h),h>=M.length){if(N)return-1;h=M.length-1}else if(h<0)if(N)h=0;else return-1;if(typeof f=="string"&&(f=s.from(f,A)),s.isBuffer(f))return f.length===0?-1:V(M,f,h,A,N);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(M,f,h):Uint8Array.prototype.lastIndexOf.call(M,f,h):V(M,[f],h,A,N);throw new TypeError("val must be string, number or Buffer")}function V(M,f,h,A,N){var z=1,Z=M.length,se=f.length;if(A!==void 0&&(A=String(A).toLowerCase(),A==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(M.length<2||f.length<2)return-1;z=2,Z/=2,se/=2,h/=2}function le(we,be){return z===1?we[be]:we.readUInt16BE(be*z)}var ve;if(N){var de=-1;for(ve=h;veZ&&(h=Z-se),ve=h;ve>=0;ve--){for(var ue=!0,Xe=0;XeN&&(A=N)):A=N;var z=f.length;A>z/2&&(A=z/2);for(var Z=0;Z>>0,isFinite(A)?(A=A>>>0,N===void 0&&(N="utf8")):(N=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var z=this.length-h;if((A===void 0||A>z)&&(A=z),f.length>0&&(A<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");for(var Z=!1;;)switch(N){case"hex":return H(this,f,h,A);case"utf8":case"utf-8":return Q(this,f,h,A);case"ascii":case"latin1":case"binary":return m(this,f,h,A);case"base64":return a(this,f,h,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c(this,f,h,A);default:if(Z)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),Z=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function p(M,f,h){return f===0&&h===M.length?e.fromByteArray(M):e.fromByteArray(M.slice(f,h))}function _(M,f,h){h=Math.min(M.length,h);for(var A=[],N=f;N239?4:z>223?3:z>191?2:1;if(N+se<=h){var le,ve,de,ue;switch(se){case 1:z<128&&(Z=z);break;case 2:le=M[N+1],(le&192)===128&&(ue=(z&31)<<6|le&63,ue>127&&(Z=ue));break;case 3:le=M[N+1],ve=M[N+2],(le&192)===128&&(ve&192)===128&&(ue=(z&15)<<12|(le&63)<<6|ve&63,ue>2047&&(ue<55296||ue>57343)&&(Z=ue));break;case 4:le=M[N+1],ve=M[N+2],de=M[N+3],(le&192)===128&&(ve&192)===128&&(de&192)===128&&(ue=(z&15)<<18|(le&63)<<12|(ve&63)<<6|de&63,ue>65535&&ue<1114112&&(Z=ue))}}Z===null?(Z=65533,se=1):Z>65535&&(Z-=65536,A.push(Z>>>10&1023|55296),Z=56320|Z&1023),A.push(Z),N+=se}return C(A)}var y=4096;function C(M){var f=M.length;if(f<=y)return String.fromCharCode.apply(String,M);for(var h="",A=0;AA)&&(h=A);for(var N="",z=f;zA&&(f=A),h<0?(h+=A,h<0&&(h=0)):h>A&&(h=A),hh)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(f,h,A){f=f>>>0,h=h>>>0,A||G(f,h,this.length);for(var N=this[f],z=1,Z=0;++Z>>0,h=h>>>0,A||G(f,h,this.length);for(var N=this[f+--h],z=1;h>0&&(z*=256);)N+=this[f+--h]*z;return N},s.prototype.readUint8=s.prototype.readUInt8=function(f,h){return f=f>>>0,h||G(f,1,this.length),this[f]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(f,h){return f=f>>>0,h||G(f,2,this.length),this[f]|this[f+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(f,h){return f=f>>>0,h||G(f,2,this.length),this[f]<<8|this[f+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(f,h){return f=f>>>0,h||G(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(f,h){return f=f>>>0,h||G(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},s.prototype.readIntLE=function(f,h,A){f=f>>>0,h=h>>>0,A||G(f,h,this.length);for(var N=this[f],z=1,Z=0;++Z=z&&(N-=Math.pow(2,8*h)),N},s.prototype.readIntBE=function(f,h,A){f=f>>>0,h=h>>>0,A||G(f,h,this.length);for(var N=h,z=1,Z=this[f+--N];N>0&&(z*=256);)Z+=this[f+--N]*z;return z*=128,Z>=z&&(Z-=Math.pow(2,8*h)),Z},s.prototype.readInt8=function(f,h){return f=f>>>0,h||G(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},s.prototype.readInt16LE=function(f,h){f=f>>>0,h||G(f,2,this.length);var A=this[f]|this[f+1]<<8;return A&32768?A|4294901760:A},s.prototype.readInt16BE=function(f,h){f=f>>>0,h||G(f,2,this.length);var A=this[f+1]|this[f]<<8;return A&32768?A|4294901760:A},s.prototype.readInt32LE=function(f,h){return f=f>>>0,h||G(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},s.prototype.readInt32BE=function(f,h){return f=f>>>0,h||G(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},s.prototype.readFloatLE=function(f,h){return f=f>>>0,h||G(f,4,this.length),n.read(this,f,!0,23,4)},s.prototype.readFloatBE=function(f,h){return f=f>>>0,h||G(f,4,this.length),n.read(this,f,!1,23,4)},s.prototype.readDoubleLE=function(f,h){return f=f>>>0,h||G(f,8,this.length),n.read(this,f,!0,52,8)},s.prototype.readDoubleBE=function(f,h){return f=f>>>0,h||G(f,8,this.length),n.read(this,f,!1,52,8)};function W(M,f,h,A,N,z){if(!s.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>N||fM.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(f,h,A,N){if(f=+f,h=h>>>0,A=A>>>0,!N){var z=Math.pow(2,8*A)-1;W(this,f,h,A,z,0)}var Z=1,se=0;for(this[h]=f&255;++se>>0,A=A>>>0,!N){var z=Math.pow(2,8*A)-1;W(this,f,h,A,z,0)}var Z=A-1,se=1;for(this[h+Z]=f&255;--Z>=0&&(se*=256);)this[h+Z]=f/se&255;return h+A},s.prototype.writeUint8=s.prototype.writeUInt8=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,1,255,0),this[h]=f&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,2,65535,0),this[h]=f&255,this[h+1]=f>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,2,65535,0),this[h]=f>>>8,this[h+1]=f&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,4,4294967295,0),this[h+3]=f>>>24,this[h+2]=f>>>16,this[h+1]=f>>>8,this[h]=f&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,4,4294967295,0),this[h]=f>>>24,this[h+1]=f>>>16,this[h+2]=f>>>8,this[h+3]=f&255,h+4},s.prototype.writeIntLE=function(f,h,A,N){if(f=+f,h=h>>>0,!N){var z=Math.pow(2,8*A-1);W(this,f,h,A,z-1,-z)}var Z=0,se=1,le=0;for(this[h]=f&255;++Z>0)-le&255;return h+A},s.prototype.writeIntBE=function(f,h,A,N){if(f=+f,h=h>>>0,!N){var z=Math.pow(2,8*A-1);W(this,f,h,A,z-1,-z)}var Z=A-1,se=1,le=0;for(this[h+Z]=f&255;--Z>=0&&(se*=256);)f<0&&le===0&&this[h+Z+1]!==0&&(le=1),this[h+Z]=(f/se>>0)-le&255;return h+A},s.prototype.writeInt8=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,1,127,-128),f<0&&(f=255+f+1),this[h]=f&255,h+1},s.prototype.writeInt16LE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,2,32767,-32768),this[h]=f&255,this[h+1]=f>>>8,h+2},s.prototype.writeInt16BE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,2,32767,-32768),this[h]=f>>>8,this[h+1]=f&255,h+2},s.prototype.writeInt32LE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,4,2147483647,-2147483648),this[h]=f&255,this[h+1]=f>>>8,this[h+2]=f>>>16,this[h+3]=f>>>24,h+4},s.prototype.writeInt32BE=function(f,h,A){return f=+f,h=h>>>0,A||W(this,f,h,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[h]=f>>>24,this[h+1]=f>>>16,this[h+2]=f>>>8,this[h+3]=f&255,h+4};function te(M,f,h,A,N,z){if(h+A>M.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function re(M,f,h,A,N){return f=+f,h=h>>>0,N||te(M,f,h,4),n.write(M,f,h,A,23,4),h+4}s.prototype.writeFloatLE=function(f,h,A){return re(this,f,h,!0,A)},s.prototype.writeFloatBE=function(f,h,A){return re(this,f,h,!1,A)};function g(M,f,h,A,N){return f=+f,h=h>>>0,N||te(M,f,h,8),n.write(M,f,h,A,52,8),h+8}s.prototype.writeDoubleLE=function(f,h,A){return g(this,f,h,!0,A)},s.prototype.writeDoubleBE=function(f,h,A){return g(this,f,h,!1,A)},s.prototype.copy=function(f,h,A,N){if(!s.isBuffer(f))throw new TypeError("argument should be a Buffer");if(A||(A=0),!N&&N!==0&&(N=this.length),h>=f.length&&(h=f.length),h||(h=0),N>0&&N=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),f.length-h>>0,A=A===void 0?this.length:A>>>0,f||(f=0);var Z;if(typeof f=="number")for(Z=h;Z55295&&h<57344){if(!N){if(h>56319){(f-=3)>-1&&z.push(239,191,189);continue}else if(Z+1===A){(f-=3)>-1&&z.push(239,191,189);continue}N=h;continue}if(h<56320){(f-=3)>-1&&z.push(239,191,189),N=h;continue}h=(N-55296<<10|h-56320)+65536}else N&&(f-=3)>-1&&z.push(239,191,189);if(N=null,h<128){if((f-=1)<0)break;z.push(h)}else if(h<2048){if((f-=2)<0)break;z.push(h>>6|192,h&63|128)}else if(h<65536){if((f-=3)<0)break;z.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((f-=4)<0)break;z.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return z}function X(M){for(var f=[],h=0;h>8,N=h%256,z.push(N),z.push(A);return z}function ne(M){return e.toByteArray(K(M))}function ee(M,f,h,A){for(var N=0;N=f.length||N>=M.length);++N)f[N+h]=M[N];return N}function me(M,f){return M instanceof f||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===f.name}function oe(M){return M!==M}var he=function(){for(var M="0123456789abcdef",f=new Array(256),h=0;h<16;++h)for(var A=h*16,N=0;N<16;++N)f[A+N]=M[h]+M[N];return f}()})(Yt);var Ke={},Il={get exports(){return Ke},set exports(t){Ke=t}},je=Il.exports={},lt,ut;function Vr(){throw new Error("setTimeout has not been defined")}function Jr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?lt=setTimeout:lt=Vr}catch{lt=Vr}try{typeof clearTimeout=="function"?ut=clearTimeout:ut=Jr}catch{ut=Jr}})();function fa(t){if(lt===setTimeout)return setTimeout(t,0);if((lt===Vr||!lt)&&setTimeout)return lt=setTimeout,setTimeout(t,0);try{return lt(t,0)}catch{try{return lt.call(null,t,0)}catch{return lt.call(this,t,0)}}}function Rl(t){if(ut===clearTimeout)return clearTimeout(t);if((ut===Jr||!ut)&&clearTimeout)return ut=clearTimeout,clearTimeout(t);try{return ut(t)}catch{try{return ut.call(null,t)}catch{return ut.call(this,t)}}}var _t=[],cn=!1,Gt,jn=-1;function Bl(){!cn||!Gt||(cn=!1,Gt.length?_t=Gt.concat(_t):jn=-1,_t.length&&ha())}function ha(){if(!cn){var t=fa(Bl);cn=!0;for(var e=_t.length;e;){for(Gt=_t,_t=[];++jn1)for(var n=1;nt;function Kn(t,e){for(const n in e)t[n]=e[n];return t}function ga(t){return t()}function Vi(){return Object.create(null)}function dt(t){t.forEach(ga)}function or(t){return typeof t=="function"}function nt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let qn;function Kr(t,e){return qn||(qn=document.createElement("a")),qn.href=e,t===qn.href}function Ol(t){return Object.keys(t).length===0}function Ll(t,...e){if(t==null)return ze;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function _i(t,e,n){t.$$.on_destroy.push(Ll(e,n))}function ma(t,e,n,r){if(t){const o=_a(t,e,n,r);return t[0](o)}}function _a(t,e,n,r){return t[1]&&r?Kn(n.ctx.slice(),t[1](r(e))):n.ctx}function va(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(e.dirty===void 0)return o;if(typeof o=="object"){const i=[],u=Math.max(e.dirty.length,o.length);for(let s=0;s32){const e=[],n=t.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),vi=ba?t=>requestAnimationFrame(t):ze;const fn=new Set;function xa(t){fn.forEach(e=>{e.c(t)||(fn.delete(e),e.f())}),fn.size!==0&&vi(xa)}function Pl(t){let e;return fn.size===0&&vi(xa),{promise:new Promise(n=>{fn.add(e={c:t,f:n})}),abort(){fn.delete(e)}}}function q(t,e){t.appendChild(e)}function Ma(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Dl(t){const e=Y("style");return Ul(Ma(t),e),e.sheet}function Ul(t,e){return q(t.head||t,e),e.sheet}function ge(t,e,n){t.insertBefore(e,n||null)}function pe(t){t.parentNode&&t.parentNode.removeChild(t)}function yi(t,e){for(let n=0;nt.removeEventListener(e,n,r)}function gn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Gi(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function j(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function ql(t){return Array.from(t.childNodes)}function Ye(t,e){e=""+e,t.data!==e&&(t.data=e)}function Yi(t,e){t.value=e??""}function Hl(t,e,n,r){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function Ea(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}class Wl{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,r=null){this.e||(this.is_svg?this.e=Gr(n.nodeName):this.e=Y(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(r)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n>>0}function jl(t,e){const n={stylesheet:Dl(e),rules:{}};return Gn.set(t,n),n}function Zi(t,e,n,r,o,i,u,s=0){const d=16.666/r;let v=`{ +`;for(let S=0;S<=1;S+=d){const R=e+(n-e)*i(S);v+=S*100+`%{${u(R,1-R)}} +`}const w=v+`100% {${u(n,1-n)}} +}`,B=`__svelte_${zl(w)}_${s}`,I=Ma(t),{stylesheet:O,rules:F}=Gn.get(I)||jl(I,t);F[B]||(F[B]=!0,O.insertRule(`@keyframes ${B} ${w}`,O.cssRules.length));const P=t.style.animation||"";return t.style.animation=`${P?`${P}, `:""}${B} ${r}ms linear ${o}ms 1 both`,Yn+=1,B}function Vl(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),o=n.length-r.length;o&&(t.style.animation=r.join(", "),Yn-=o,Yn||Jl())}function Jl(){vi(()=>{Yn||(Gn.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&pe(e)}),Gn.clear())})}let Fn;function Tn(t){Fn=t}function ar(){if(!Fn)throw new Error("Function called outside component initialization");return Fn}function wi(t){ar().$$.on_mount.push(t)}function sr(){const t=ar();return(e,n,{cancelable:r=!1}={})=>{const o=t.$$.callbacks[e];if(o){const i=Ea(e,n,{cancelable:r});return o.slice().forEach(u=>{u.call(t,i)}),!i.defaultPrevented}return!0}}function Kl(t,e){return ar().$$.context.set(t,e),e}function Gl(t){return ar().$$.context.get(t)}const sn=[],Ft=[];let hn=[];const Xi=[],Yl=Promise.resolve();let Yr=!1;function Ql(){Yr||(Yr=!0,Yl.then(ka))}function Qt(t){hn.push(t)}const Br=new Set;let on=0;function ka(){if(on!==0)return;const t=Fn;do{try{for(;ont.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),hn=e}let Cn;function eu(){return Cn||(Cn=Promise.resolve(),Cn.then(()=>{Cn=null})),Cn}function Fr(t,e,n){t.dispatchEvent(Ea(`${e?"intro":"outro"}${n}`))}const Vn=new Set;let vt;function Xt(){vt={r:0,c:[],p:vt}}function en(){vt.r||dt(vt.c),vt=vt.p}function ye(t,e){t&&t.i&&(Vn.delete(t),t.i(e))}function We(t,e,n,r){if(t&&t.o){if(Vn.has(t))return;Vn.add(t),vt.c.push(()=>{Vn.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const tu={duration:0};function ln(t,e,n,r){const o={direction:"both"};let i=e(t,n,o),u=r?0:1,s=null,d=null,v=null;function w(){v&&Vl(t,v)}function B(O,F){const P=O.b-u;return F*=Math.abs(P),{a:u,b:O.b,d:P,duration:F,start:O.start,end:O.start+F,group:O.group}}function I(O){const{delay:F=0,duration:P=300,easing:S=pa,tick:R=ze,css:x}=i||tu,E={start:$l()+F,b:O};O||(E.group=vt,vt.r+=1),s||d?d=E:(x&&(w(),v=Zi(t,u,O,P,F,S,x)),O&&R(0,1),s=B(E,P),Qt(()=>Fr(t,O,"start")),Pl(T=>{if(d&&T>d.start&&(s=B(d,P),d=null,Fr(t,s.b,"start"),x&&(w(),v=Zi(t,u,s.b,s.duration,0,S,i.css))),s){if(T>=s.end)R(u=s.b,1-u),Fr(t,s.b,"end"),d||(s.b?w():--s.group.r||dt(s.group.c)),s=null;else if(T>=s.start){const $=T-s.start;u=s.a+s.d*S($/s.duration),R(u,1-u)}}return!!(s||d)}))}return{run(O){or(i)?eu().then(()=>{i=i(o),I(O)}):I(O)},end(){w(),s=d=null}}}function nu(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const u=t[i],s=e[i];if(s){for(const d in u)d in s||(r[d]=1);for(const d in s)o[d]||(n[d]=s[d],o[d]=1);t[i]=s}else for(const d in u)o[d]=1}for(const u in r)u in n||(n[u]=void 0);return n}function ru(t){return typeof t=="object"&&t!==null?t:{}}function ht(t){t&&t.c()}function rt(t,e,n,r){const{fragment:o,after_update:i}=t.$$;o&&o.m(e,n),r||Qt(()=>{const u=t.$$.on_mount.map(ga).filter(or);t.$$.on_destroy?t.$$.on_destroy.push(...u):dt(u),t.$$.on_mount=[]}),i.forEach(Qt)}function it(t,e){const n=t.$$;n.fragment!==null&&(Xl(n.after_update),dt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function iu(t,e){t.$$.dirty[0]===-1&&(sn.push(t),Ql(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const F=O.length?O[0]:I;return v.ctx&&o(v.ctx[B],v.ctx[B]=F)&&(!v.skip_bound&&v.bound[B]&&v.bound[B](F),w&&iu(t,B)),I}):[],v.update(),w=!0,dt(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const B=ql(e.target);v.fragment&&v.fragment.l(B),B.forEach(pe)}else v.fragment&&v.fragment.c();e.intro&&ye(t.$$.fragment),rt(t,e.target,e.anchor,e.customElement),ka()}Tn(d)}class st{$destroy(){it(this,1),this.$destroy=ze}$on(e,n){if(!or(n))return ze;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(e){this.$$set&&!Ol(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var bi={},xe={};Object.defineProperty(xe,"__esModule",{value:!0});var Sa=xe.getLocalStorage=$a=xe.getLocalStorageOrThrow=Na=xe.getCrypto=La=xe.getCryptoOrThrow=Oa=xe.getLocation=Fa=xe.getLocationOrThrow=Ba=xe.getNavigator=Ra=xe.getNavigatorOrThrow=Ia=xe.getDocument=Ta=xe.getDocumentOrThrow=Aa=xe.getFromWindowOrThrow=Ca=xe.getFromWindow=void 0;function tn(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}var Ca=xe.getFromWindow=tn;function Mn(t){const e=tn(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}var Aa=xe.getFromWindowOrThrow=Mn;function ou(){return Mn("document")}var Ta=xe.getDocumentOrThrow=ou;function au(){return tn("document")}var Ia=xe.getDocument=au;function su(){return Mn("navigator")}var Ra=xe.getNavigatorOrThrow=su;function lu(){return tn("navigator")}var Ba=xe.getNavigator=lu;function uu(){return Mn("location")}var Fa=xe.getLocationOrThrow=uu;function cu(){return tn("location")}var Oa=xe.getLocation=cu;function fu(){return Mn("crypto")}var La=xe.getCryptoOrThrow=fu;function hu(){return tn("crypto")}var Na=xe.getCrypto=hu;function du(){return Mn("localStorage")}var $a=xe.getLocalStorageOrThrow=du;function pu(){return tn("localStorage")}Sa=xe.getLocalStorage=pu;Object.defineProperty(bi,"__esModule",{value:!0});var Pa=bi.getWindowMetadata=void 0;const eo=xe;function gu(){let t,e;try{t=eo.getDocumentOrThrow(),e=eo.getLocationOrThrow()}catch{return null}function n(){const B=t.getElementsByTagName("link"),I=[];for(let O=0;O-1){const S=F.getAttribute("href");if(S)if(S.toLowerCase().indexOf("https:")===-1&&S.toLowerCase().indexOf("http:")===-1&&S.indexOf("//")!==0){let R=e.protocol+"//"+e.host;if(S.indexOf("/")===0)R+=S;else{const x=e.pathname.split("/");x.pop();const E=x.join("/");R+=E+"/"+S}I.push(R)}else if(S.indexOf("//")===0){const R=e.protocol+S;I.push(R)}else I.push(S)}}return I}function r(...B){const I=t.getElementsByTagName("meta");for(let O=0;OF.getAttribute(S)).filter(S=>S?B.includes(S):!1);if(P.length&&P){const S=F.getAttribute("content");if(S)return S}}return""}function o(){let B=r("name","og:site_name","og:title","twitter:title");return B||(B=t.title),B}function i(){return r("description","og:description","twitter:description","keywords")}const u=o(),s=i(),d=e.origin,v=n();return{description:s,url:d,icons:v,name:u}}Pa=bi.getWindowMetadata=gu;var mu=globalThis&&globalThis.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new bu:typeof navigator<"u"?ro(navigator.userAgent):Au()}function Su(t){return t!==""&&Eu.reduce(function(e,n){var r=n[0],o=n[1];if(e)return e;var i=o.exec(t);return!!i&&[r,i]},!1)}function ro(t){var e=Su(t);if(!e)return null;var n=e[0],r=e[1];if(n==="searchbot")return new wu;var o=r[1]&&r[1].split(/[._]/).slice(0,3);o?o.length1:!1}function qa(){return ur()?Da()||Ua():!1}function Ha(){const t=lr();return t&&t.name?t.name.toLowerCase()==="node":!1}function Wa(){return!Ha()&&!!za()}const Iu=Ca,Ru=Aa,Bu=Ta,Fu=Ia,Ou=Ra,za=Ba,Lu=Fa,ja=Oa,Nu=La,$u=Na,Pu=$a,cr=Sa;function Qr(){return Pa()}function Du(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}function Uu(t){return typeof t=="string"?t:JSON.stringify(t)}const Va=Du,Ja=Uu;function xi(t,e){const n=Ja(e),r=cr();r&&r.setItem(t,n)}function Mi(t){let e=null,n=null;const r=cr();return r&&(n=r.getItem(t)),e=n&&Va(n),e}function Ei(t){const e=cr();e&&e.removeItem(t)}const Qn="WALLETCONNECT_DEEPLINK_CHOICE";function qu(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function Hu(t){const e=t.href.split("?")[0];xi(Qn,Object.assign(Object.assign({},t),{href:e}))}function Ka(t,e){return t.filter(n=>n.name.toLowerCase().includes(e.toLowerCase()))[0]}function Wu(t,e){let n=t;return e&&(n=e.map(r=>Ka(t,r)).filter(Boolean)),n}const Ga="https://registry.walletconnect.com";function zu(){return Ga+"/api/v2/wallets"}function ju(){return Ga+"/api/v2/dapps"}function Ya(t,e="mobile"){var n;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(n=t.image_url.sm)!==null&&n!==void 0?n:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function Vu(t,e="mobile"){return Object.values(t).filter(n=>!!n[e].universal||!!n[e].native).map(n=>Ya(n,e))}const Ju=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:lr,detectOS:ur,formatIOSMobile:qu,formatMobileRegistry:Vu,formatMobileRegistryEntry:Ya,getClientMeta:Qr,getCrypto:$u,getCryptoOrThrow:Nu,getDappRegistryUrl:ju,getDocument:Fu,getDocumentOrThrow:Bu,getFromWindow:Iu,getFromWindowOrThrow:Ru,getLocal:Mi,getLocalStorage:cr,getLocalStorageOrThrow:Pu,getLocation:ja,getLocationOrThrow:Lu,getMobileLinkRegistry:Wu,getMobileRegistryEntry:Ka,getNavigator:za,getNavigatorOrThrow:Ou,getWalletRegistryUrl:zu,isAndroid:Da,isBrowser:Wa,isIOS:Ua,isMobile:qa,isNode:Ha,mobileLinkChoiceKey:Qn,removeLocal:Ei,safeJsonParse:Va,safeJsonStringify:Ja,saveMobileLinkInfo:Hu,setLocal:xi},Symbol.toStringTag,{value:"Module"})),Ku=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],Qa=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];var Zr={},Gu={get exports(){return Zr},set exports(t){Zr=t}};(function(t){(function(e,n){function r(m,a){if(!m)throw new Error(a||"Assertion failed")}function o(m,a){m.super_=a;var c=function(){};c.prototype=a.prototype,m.prototype=new c,m.prototype.constructor=m}function i(m,a,c){if(i.isBN(m))return m;this.negative=0,this.words=null,this.length=0,this.red=null,m!==null&&((a==="le"||a==="be")&&(c=a,a=10),this._init(m||0,a||10,c||"be"))}typeof e=="object"?e.exports=i:n.BN=i,i.BN=i,i.wordSize=26;var u;try{u=Yt.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,c){return a.cmp(c)>0?a:c},i.min=function(a,c){return a.cmp(c)<0?a:c},i.prototype._init=function(a,c,p){if(typeof a=="number")return this._initNumber(a,c,p);if(typeof a=="object")return this._initArray(a,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),a=a.toString().replace(/\s+/g,"");var _=0;a[0]==="-"&&_++,c===16?this._parseHex(a,_):this._parseBase(a,c,_),a[0]==="-"&&(this.negative=1),this.strip(),p==="le"&&this._initArray(this.toArray(),c,p)},i.prototype._initNumber=function(a,c,p){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[a&67108863],this.length=1):a<4503599627370496?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(r(a<9007199254740992),this.words=[a&67108863,a/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},i.prototype._initArray=function(a,c,p){if(r(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var _=0;_=0;_-=3)C=a[_]|a[_-1]<<8|a[_-2]<<16,this.words[y]|=C<>>26-L&67108863,L+=24,L>=26&&(L-=26,y++);else if(p==="le")for(_=0,y=0;_>>26-L&67108863,L+=24,L>=26&&(L-=26,y++);return this.strip()};function s(m,a,c){for(var p=0,_=Math.min(m.length,c),y=a;y<_;y++){var C=m.charCodeAt(y)-48;p<<=4,C>=49&&C<=54?p|=C-49+10:C>=17&&C<=22?p|=C-17+10:p|=C&15}return p}i.prototype._parseHex=function(a,c){this.length=Math.ceil((a.length-c)/6),this.words=new Array(this.length);for(var p=0;p=c;p-=6)y=s(a,p,p+6),this.words[_]|=y<>>26-C&4194303,C+=24,C>=26&&(C-=26,_++);p+6!==c&&(y=s(a,c,p+6),this.words[_]|=y<>>26-C&4194303),this.strip()};function d(m,a,c,p){for(var _=0,y=Math.min(m.length,c),C=a;C=49?_+=L-49+10:L>=17?_+=L-17+10:_+=L}return _}i.prototype._parseBase=function(a,c,p){this.words=[0],this.length=1;for(var _=0,y=1;y<=67108863;y*=c)_++;_--,y=y/c|0;for(var C=a.length-p,L=C%_,b=Math.min(C,C-L)+p,l=0,k=p;k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var v=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,c){a=a||10,c=c|0||1;var p;if(a===16||a==="hex"){p="";for(var _=0,y=0,C=0;C>>24-_&16777215,y!==0||C!==this.length-1?p=v[6-b.length]+b+p:p=b+p,_+=2,_>=26&&(_-=26,C--)}for(y!==0&&(p=y.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(a===(a|0)&&a>=2&&a<=36){var l=w[a],k=B[a];p="";var G=this.clone();for(G.negative=0;!G.isZero();){var W=G.modn(k).toString(a);G=G.idivn(k),G.isZero()?p=W+p:p=v[l-W.length]+W+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,c){return r(typeof u<"u"),this.toArrayLike(u,a,c)},i.prototype.toArray=function(a,c){return this.toArrayLike(Array,a,c)},i.prototype.toArrayLike=function(a,c,p){var _=this.byteLength(),y=p||Math.max(1,_);r(_<=y,"byte array longer than desired length"),r(y>0,"Requested array length <= 0"),this.strip();var C=c==="le",L=new a(y),b,l,k=this.clone();if(C){for(l=0;!k.isZero();l++)b=k.andln(255),k.iushrn(8),L[l]=b;for(;l=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},i.prototype._zeroBits=function(a){if(a===0)return 26;var c=a,p=0;return c&8191||(p+=13,c>>>=13),c&127||(p+=7,c>>>=7),c&15||(p+=4,c>>>=4),c&3||(p+=2,c>>>=2),c&1||p++,p},i.prototype.bitLength=function(){var a=this.words[this.length-1],c=this._countBits(a);return(this.length-1)*26+c};function I(m){for(var a=new Array(m.bitLength()),c=0;c>>_}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,c=0;ca.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var c;this.length>a.length?c=a:c=this;for(var p=0;pa.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var c,p;this.length>a.length?(c=this,p=a):(c=a,p=this);for(var _=0;_a.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){r(typeof a=="number"&&a>=0);var c=Math.ceil(a/26)|0,p=a%26;this._expand(c),p>0&&c--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-p),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,c){r(typeof a=="number"&&a>=0);var p=a/26|0,_=a%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<_:this.words[p]=this.words[p]&~(1<<_),this.strip()},i.prototype.iadd=function(a){var c;if(this.negative!==0&&a.negative===0)return this.negative=0,c=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,c=this.isub(a),a.negative=1,c._normSign();var p,_;this.length>a.length?(p=this,_=a):(p=a,_=this);for(var y=0,C=0;C<_.length;C++)c=(p.words[C]|0)+(_.words[C]|0)+y,this.words[C]=c&67108863,y=c>>>26;for(;y!==0&&C>>26;if(this.length=p.length,y!==0)this.words[this.length]=y,this.length++;else if(p!==this)for(;Ca.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var c=this.iadd(a);return a.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var p=this.cmp(a);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,y;p>0?(_=this,y=a):(_=a,y=this);for(var C=0,L=0;L>26,this.words[L]=c&67108863;for(;C!==0&&L<_.length;L++)c=(_.words[L]|0)+C,C=c>>26,this.words[L]=c&67108863;if(C===0&&L<_.length&&_!==this)for(;L<_.length;L++)this.words[L]=_.words[L];return this.length=Math.max(this.length,L),_!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(a){return this.clone().isub(a)};function O(m,a,c){c.negative=a.negative^m.negative;var p=m.length+a.length|0;c.length=p,p=p-1|0;var _=m.words[0]|0,y=a.words[0]|0,C=_*y,L=C&67108863,b=C/67108864|0;c.words[0]=L;for(var l=1;l>>26,G=b&67108863,W=Math.min(l,a.length-1),te=Math.max(0,l-m.length+1);te<=W;te++){var re=l-te|0;_=m.words[re]|0,y=a.words[te]|0,C=_*y+G,k+=C/67108864|0,G=C&67108863}c.words[l]=G|0,b=k|0}return b!==0?c.words[l]=b|0:c.length--,c.strip()}var F=function(a,c,p){var _=a.words,y=c.words,C=p.words,L=0,b,l,k,G=_[0]|0,W=G&8191,te=G>>>13,re=_[1]|0,g=re&8191,U=re>>>13,K=_[2]|0,J=K&8191,X=K>>>13,ae=_[3]|0,ne=ae&8191,ee=ae>>>13,me=_[4]|0,oe=me&8191,he=me>>>13,M=_[5]|0,f=M&8191,h=M>>>13,A=_[6]|0,N=A&8191,z=A>>>13,Z=_[7]|0,se=Z&8191,le=Z>>>13,ve=_[8]|0,de=ve&8191,ue=ve>>>13,Xe=_[9]|0,we=Xe&8191,be=Xe>>>13,Pt=y[0]|0,Me=Pt&8191,Ee=Pt>>>13,Dt=y[1]|0,ke=Dt&8191,Se=Dt>>>13,Ut=y[2]|0,Ce=Ut&8191,Ae=Ut>>>13,qt=y[3]|0,Te=qt&8191,Ie=qt>>>13,Ht=y[4]|0,Re=Ht&8191,Be=Ht>>>13,Wt=y[5]|0,Fe=Wt&8191,Oe=Wt>>>13,zt=y[6]|0,Le=zt&8191,Ne=zt>>>13,jt=y[7]|0,$e=jt&8191,Pe=jt>>>13,Vt=y[8]|0,De=Vt&8191,Ue=Vt>>>13,Jt=y[9]|0,qe=Jt&8191,He=Jt>>>13;p.negative=a.negative^c.negative,p.length=19,b=Math.imul(W,Me),l=Math.imul(W,Ee),l=l+Math.imul(te,Me)|0,k=Math.imul(te,Ee);var Mt=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,b=Math.imul(g,Me),l=Math.imul(g,Ee),l=l+Math.imul(U,Me)|0,k=Math.imul(U,Ee),b=b+Math.imul(W,ke)|0,l=l+Math.imul(W,Se)|0,l=l+Math.imul(te,ke)|0,k=k+Math.imul(te,Se)|0;var Et=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Et>>>26)|0,Et&=67108863,b=Math.imul(J,Me),l=Math.imul(J,Ee),l=l+Math.imul(X,Me)|0,k=Math.imul(X,Ee),b=b+Math.imul(g,ke)|0,l=l+Math.imul(g,Se)|0,l=l+Math.imul(U,ke)|0,k=k+Math.imul(U,Se)|0,b=b+Math.imul(W,Ce)|0,l=l+Math.imul(W,Ae)|0,l=l+Math.imul(te,Ce)|0,k=k+Math.imul(te,Ae)|0;var kt=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(kt>>>26)|0,kt&=67108863,b=Math.imul(ne,Me),l=Math.imul(ne,Ee),l=l+Math.imul(ee,Me)|0,k=Math.imul(ee,Ee),b=b+Math.imul(J,ke)|0,l=l+Math.imul(J,Se)|0,l=l+Math.imul(X,ke)|0,k=k+Math.imul(X,Se)|0,b=b+Math.imul(g,Ce)|0,l=l+Math.imul(g,Ae)|0,l=l+Math.imul(U,Ce)|0,k=k+Math.imul(U,Ae)|0,b=b+Math.imul(W,Te)|0,l=l+Math.imul(W,Ie)|0,l=l+Math.imul(te,Te)|0,k=k+Math.imul(te,Ie)|0;var St=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(St>>>26)|0,St&=67108863,b=Math.imul(oe,Me),l=Math.imul(oe,Ee),l=l+Math.imul(he,Me)|0,k=Math.imul(he,Ee),b=b+Math.imul(ne,ke)|0,l=l+Math.imul(ne,Se)|0,l=l+Math.imul(ee,ke)|0,k=k+Math.imul(ee,Se)|0,b=b+Math.imul(J,Ce)|0,l=l+Math.imul(J,Ae)|0,l=l+Math.imul(X,Ce)|0,k=k+Math.imul(X,Ae)|0,b=b+Math.imul(g,Te)|0,l=l+Math.imul(g,Ie)|0,l=l+Math.imul(U,Te)|0,k=k+Math.imul(U,Ie)|0,b=b+Math.imul(W,Re)|0,l=l+Math.imul(W,Be)|0,l=l+Math.imul(te,Re)|0,k=k+Math.imul(te,Be)|0;var Ct=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,b=Math.imul(f,Me),l=Math.imul(f,Ee),l=l+Math.imul(h,Me)|0,k=Math.imul(h,Ee),b=b+Math.imul(oe,ke)|0,l=l+Math.imul(oe,Se)|0,l=l+Math.imul(he,ke)|0,k=k+Math.imul(he,Se)|0,b=b+Math.imul(ne,Ce)|0,l=l+Math.imul(ne,Ae)|0,l=l+Math.imul(ee,Ce)|0,k=k+Math.imul(ee,Ae)|0,b=b+Math.imul(J,Te)|0,l=l+Math.imul(J,Ie)|0,l=l+Math.imul(X,Te)|0,k=k+Math.imul(X,Ie)|0,b=b+Math.imul(g,Re)|0,l=l+Math.imul(g,Be)|0,l=l+Math.imul(U,Re)|0,k=k+Math.imul(U,Be)|0,b=b+Math.imul(W,Fe)|0,l=l+Math.imul(W,Oe)|0,l=l+Math.imul(te,Fe)|0,k=k+Math.imul(te,Oe)|0;var At=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(At>>>26)|0,At&=67108863,b=Math.imul(N,Me),l=Math.imul(N,Ee),l=l+Math.imul(z,Me)|0,k=Math.imul(z,Ee),b=b+Math.imul(f,ke)|0,l=l+Math.imul(f,Se)|0,l=l+Math.imul(h,ke)|0,k=k+Math.imul(h,Se)|0,b=b+Math.imul(oe,Ce)|0,l=l+Math.imul(oe,Ae)|0,l=l+Math.imul(he,Ce)|0,k=k+Math.imul(he,Ae)|0,b=b+Math.imul(ne,Te)|0,l=l+Math.imul(ne,Ie)|0,l=l+Math.imul(ee,Te)|0,k=k+Math.imul(ee,Ie)|0,b=b+Math.imul(J,Re)|0,l=l+Math.imul(J,Be)|0,l=l+Math.imul(X,Re)|0,k=k+Math.imul(X,Be)|0,b=b+Math.imul(g,Fe)|0,l=l+Math.imul(g,Oe)|0,l=l+Math.imul(U,Fe)|0,k=k+Math.imul(U,Oe)|0,b=b+Math.imul(W,Le)|0,l=l+Math.imul(W,Ne)|0,l=l+Math.imul(te,Le)|0,k=k+Math.imul(te,Ne)|0;var Tt=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,b=Math.imul(se,Me),l=Math.imul(se,Ee),l=l+Math.imul(le,Me)|0,k=Math.imul(le,Ee),b=b+Math.imul(N,ke)|0,l=l+Math.imul(N,Se)|0,l=l+Math.imul(z,ke)|0,k=k+Math.imul(z,Se)|0,b=b+Math.imul(f,Ce)|0,l=l+Math.imul(f,Ae)|0,l=l+Math.imul(h,Ce)|0,k=k+Math.imul(h,Ae)|0,b=b+Math.imul(oe,Te)|0,l=l+Math.imul(oe,Ie)|0,l=l+Math.imul(he,Te)|0,k=k+Math.imul(he,Ie)|0,b=b+Math.imul(ne,Re)|0,l=l+Math.imul(ne,Be)|0,l=l+Math.imul(ee,Re)|0,k=k+Math.imul(ee,Be)|0,b=b+Math.imul(J,Fe)|0,l=l+Math.imul(J,Oe)|0,l=l+Math.imul(X,Fe)|0,k=k+Math.imul(X,Oe)|0,b=b+Math.imul(g,Le)|0,l=l+Math.imul(g,Ne)|0,l=l+Math.imul(U,Le)|0,k=k+Math.imul(U,Ne)|0,b=b+Math.imul(W,$e)|0,l=l+Math.imul(W,Pe)|0,l=l+Math.imul(te,$e)|0,k=k+Math.imul(te,Pe)|0;var It=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(It>>>26)|0,It&=67108863,b=Math.imul(de,Me),l=Math.imul(de,Ee),l=l+Math.imul(ue,Me)|0,k=Math.imul(ue,Ee),b=b+Math.imul(se,ke)|0,l=l+Math.imul(se,Se)|0,l=l+Math.imul(le,ke)|0,k=k+Math.imul(le,Se)|0,b=b+Math.imul(N,Ce)|0,l=l+Math.imul(N,Ae)|0,l=l+Math.imul(z,Ce)|0,k=k+Math.imul(z,Ae)|0,b=b+Math.imul(f,Te)|0,l=l+Math.imul(f,Ie)|0,l=l+Math.imul(h,Te)|0,k=k+Math.imul(h,Ie)|0,b=b+Math.imul(oe,Re)|0,l=l+Math.imul(oe,Be)|0,l=l+Math.imul(he,Re)|0,k=k+Math.imul(he,Be)|0,b=b+Math.imul(ne,Fe)|0,l=l+Math.imul(ne,Oe)|0,l=l+Math.imul(ee,Fe)|0,k=k+Math.imul(ee,Oe)|0,b=b+Math.imul(J,Le)|0,l=l+Math.imul(J,Ne)|0,l=l+Math.imul(X,Le)|0,k=k+Math.imul(X,Ne)|0,b=b+Math.imul(g,$e)|0,l=l+Math.imul(g,Pe)|0,l=l+Math.imul(U,$e)|0,k=k+Math.imul(U,Pe)|0,b=b+Math.imul(W,De)|0,l=l+Math.imul(W,Ue)|0,l=l+Math.imul(te,De)|0,k=k+Math.imul(te,Ue)|0;var wr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(wr>>>26)|0,wr&=67108863,b=Math.imul(we,Me),l=Math.imul(we,Ee),l=l+Math.imul(be,Me)|0,k=Math.imul(be,Ee),b=b+Math.imul(de,ke)|0,l=l+Math.imul(de,Se)|0,l=l+Math.imul(ue,ke)|0,k=k+Math.imul(ue,Se)|0,b=b+Math.imul(se,Ce)|0,l=l+Math.imul(se,Ae)|0,l=l+Math.imul(le,Ce)|0,k=k+Math.imul(le,Ae)|0,b=b+Math.imul(N,Te)|0,l=l+Math.imul(N,Ie)|0,l=l+Math.imul(z,Te)|0,k=k+Math.imul(z,Ie)|0,b=b+Math.imul(f,Re)|0,l=l+Math.imul(f,Be)|0,l=l+Math.imul(h,Re)|0,k=k+Math.imul(h,Be)|0,b=b+Math.imul(oe,Fe)|0,l=l+Math.imul(oe,Oe)|0,l=l+Math.imul(he,Fe)|0,k=k+Math.imul(he,Oe)|0,b=b+Math.imul(ne,Le)|0,l=l+Math.imul(ne,Ne)|0,l=l+Math.imul(ee,Le)|0,k=k+Math.imul(ee,Ne)|0,b=b+Math.imul(J,$e)|0,l=l+Math.imul(J,Pe)|0,l=l+Math.imul(X,$e)|0,k=k+Math.imul(X,Pe)|0,b=b+Math.imul(g,De)|0,l=l+Math.imul(g,Ue)|0,l=l+Math.imul(U,De)|0,k=k+Math.imul(U,Ue)|0,b=b+Math.imul(W,qe)|0,l=l+Math.imul(W,He)|0,l=l+Math.imul(te,qe)|0,k=k+Math.imul(te,He)|0;var br=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(br>>>26)|0,br&=67108863,b=Math.imul(we,ke),l=Math.imul(we,Se),l=l+Math.imul(be,ke)|0,k=Math.imul(be,Se),b=b+Math.imul(de,Ce)|0,l=l+Math.imul(de,Ae)|0,l=l+Math.imul(ue,Ce)|0,k=k+Math.imul(ue,Ae)|0,b=b+Math.imul(se,Te)|0,l=l+Math.imul(se,Ie)|0,l=l+Math.imul(le,Te)|0,k=k+Math.imul(le,Ie)|0,b=b+Math.imul(N,Re)|0,l=l+Math.imul(N,Be)|0,l=l+Math.imul(z,Re)|0,k=k+Math.imul(z,Be)|0,b=b+Math.imul(f,Fe)|0,l=l+Math.imul(f,Oe)|0,l=l+Math.imul(h,Fe)|0,k=k+Math.imul(h,Oe)|0,b=b+Math.imul(oe,Le)|0,l=l+Math.imul(oe,Ne)|0,l=l+Math.imul(he,Le)|0,k=k+Math.imul(he,Ne)|0,b=b+Math.imul(ne,$e)|0,l=l+Math.imul(ne,Pe)|0,l=l+Math.imul(ee,$e)|0,k=k+Math.imul(ee,Pe)|0,b=b+Math.imul(J,De)|0,l=l+Math.imul(J,Ue)|0,l=l+Math.imul(X,De)|0,k=k+Math.imul(X,Ue)|0,b=b+Math.imul(g,qe)|0,l=l+Math.imul(g,He)|0,l=l+Math.imul(U,qe)|0,k=k+Math.imul(U,He)|0;var xr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(xr>>>26)|0,xr&=67108863,b=Math.imul(we,Ce),l=Math.imul(we,Ae),l=l+Math.imul(be,Ce)|0,k=Math.imul(be,Ae),b=b+Math.imul(de,Te)|0,l=l+Math.imul(de,Ie)|0,l=l+Math.imul(ue,Te)|0,k=k+Math.imul(ue,Ie)|0,b=b+Math.imul(se,Re)|0,l=l+Math.imul(se,Be)|0,l=l+Math.imul(le,Re)|0,k=k+Math.imul(le,Be)|0,b=b+Math.imul(N,Fe)|0,l=l+Math.imul(N,Oe)|0,l=l+Math.imul(z,Fe)|0,k=k+Math.imul(z,Oe)|0,b=b+Math.imul(f,Le)|0,l=l+Math.imul(f,Ne)|0,l=l+Math.imul(h,Le)|0,k=k+Math.imul(h,Ne)|0,b=b+Math.imul(oe,$e)|0,l=l+Math.imul(oe,Pe)|0,l=l+Math.imul(he,$e)|0,k=k+Math.imul(he,Pe)|0,b=b+Math.imul(ne,De)|0,l=l+Math.imul(ne,Ue)|0,l=l+Math.imul(ee,De)|0,k=k+Math.imul(ee,Ue)|0,b=b+Math.imul(J,qe)|0,l=l+Math.imul(J,He)|0,l=l+Math.imul(X,qe)|0,k=k+Math.imul(X,He)|0;var Mr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,b=Math.imul(we,Te),l=Math.imul(we,Ie),l=l+Math.imul(be,Te)|0,k=Math.imul(be,Ie),b=b+Math.imul(de,Re)|0,l=l+Math.imul(de,Be)|0,l=l+Math.imul(ue,Re)|0,k=k+Math.imul(ue,Be)|0,b=b+Math.imul(se,Fe)|0,l=l+Math.imul(se,Oe)|0,l=l+Math.imul(le,Fe)|0,k=k+Math.imul(le,Oe)|0,b=b+Math.imul(N,Le)|0,l=l+Math.imul(N,Ne)|0,l=l+Math.imul(z,Le)|0,k=k+Math.imul(z,Ne)|0,b=b+Math.imul(f,$e)|0,l=l+Math.imul(f,Pe)|0,l=l+Math.imul(h,$e)|0,k=k+Math.imul(h,Pe)|0,b=b+Math.imul(oe,De)|0,l=l+Math.imul(oe,Ue)|0,l=l+Math.imul(he,De)|0,k=k+Math.imul(he,Ue)|0,b=b+Math.imul(ne,qe)|0,l=l+Math.imul(ne,He)|0,l=l+Math.imul(ee,qe)|0,k=k+Math.imul(ee,He)|0;var Er=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Er>>>26)|0,Er&=67108863,b=Math.imul(we,Re),l=Math.imul(we,Be),l=l+Math.imul(be,Re)|0,k=Math.imul(be,Be),b=b+Math.imul(de,Fe)|0,l=l+Math.imul(de,Oe)|0,l=l+Math.imul(ue,Fe)|0,k=k+Math.imul(ue,Oe)|0,b=b+Math.imul(se,Le)|0,l=l+Math.imul(se,Ne)|0,l=l+Math.imul(le,Le)|0,k=k+Math.imul(le,Ne)|0,b=b+Math.imul(N,$e)|0,l=l+Math.imul(N,Pe)|0,l=l+Math.imul(z,$e)|0,k=k+Math.imul(z,Pe)|0,b=b+Math.imul(f,De)|0,l=l+Math.imul(f,Ue)|0,l=l+Math.imul(h,De)|0,k=k+Math.imul(h,Ue)|0,b=b+Math.imul(oe,qe)|0,l=l+Math.imul(oe,He)|0,l=l+Math.imul(he,qe)|0,k=k+Math.imul(he,He)|0;var kr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(kr>>>26)|0,kr&=67108863,b=Math.imul(we,Fe),l=Math.imul(we,Oe),l=l+Math.imul(be,Fe)|0,k=Math.imul(be,Oe),b=b+Math.imul(de,Le)|0,l=l+Math.imul(de,Ne)|0,l=l+Math.imul(ue,Le)|0,k=k+Math.imul(ue,Ne)|0,b=b+Math.imul(se,$e)|0,l=l+Math.imul(se,Pe)|0,l=l+Math.imul(le,$e)|0,k=k+Math.imul(le,Pe)|0,b=b+Math.imul(N,De)|0,l=l+Math.imul(N,Ue)|0,l=l+Math.imul(z,De)|0,k=k+Math.imul(z,Ue)|0,b=b+Math.imul(f,qe)|0,l=l+Math.imul(f,He)|0,l=l+Math.imul(h,qe)|0,k=k+Math.imul(h,He)|0;var Sr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,b=Math.imul(we,Le),l=Math.imul(we,Ne),l=l+Math.imul(be,Le)|0,k=Math.imul(be,Ne),b=b+Math.imul(de,$e)|0,l=l+Math.imul(de,Pe)|0,l=l+Math.imul(ue,$e)|0,k=k+Math.imul(ue,Pe)|0,b=b+Math.imul(se,De)|0,l=l+Math.imul(se,Ue)|0,l=l+Math.imul(le,De)|0,k=k+Math.imul(le,Ue)|0,b=b+Math.imul(N,qe)|0,l=l+Math.imul(N,He)|0,l=l+Math.imul(z,qe)|0,k=k+Math.imul(z,He)|0;var Cr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,b=Math.imul(we,$e),l=Math.imul(we,Pe),l=l+Math.imul(be,$e)|0,k=Math.imul(be,Pe),b=b+Math.imul(de,De)|0,l=l+Math.imul(de,Ue)|0,l=l+Math.imul(ue,De)|0,k=k+Math.imul(ue,Ue)|0,b=b+Math.imul(se,qe)|0,l=l+Math.imul(se,He)|0,l=l+Math.imul(le,qe)|0,k=k+Math.imul(le,He)|0;var Ar=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,b=Math.imul(we,De),l=Math.imul(we,Ue),l=l+Math.imul(be,De)|0,k=Math.imul(be,Ue),b=b+Math.imul(de,qe)|0,l=l+Math.imul(de,He)|0,l=l+Math.imul(ue,qe)|0,k=k+Math.imul(ue,He)|0;var Tr=(L+b|0)+((l&8191)<<13)|0;L=(k+(l>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,b=Math.imul(we,qe),l=Math.imul(we,He),l=l+Math.imul(be,qe)|0,k=Math.imul(be,He);var Ir=(L+b|0)+((l&8191)<<13)|0;return L=(k+(l>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,C[0]=Mt,C[1]=Et,C[2]=kt,C[3]=St,C[4]=Ct,C[5]=At,C[6]=Tt,C[7]=It,C[8]=wr,C[9]=br,C[10]=xr,C[11]=Mr,C[12]=Er,C[13]=kr,C[14]=Sr,C[15]=Cr,C[16]=Ar,C[17]=Tr,C[18]=Ir,L!==0&&(C[19]=L,p.length++),p};Math.imul||(F=O);function P(m,a,c){c.negative=a.negative^m.negative,c.length=m.length+a.length;for(var p=0,_=0,y=0;y>>26)|0,_+=C>>>26,C&=67108863}c.words[y]=L,p=C,C=_}return p!==0?c.words[y]=p:c.length--,c.strip()}function S(m,a,c){var p=new R;return p.mulp(m,a,c)}i.prototype.mulTo=function(a,c){var p,_=this.length+a.length;return this.length===10&&a.length===10?p=F(this,a,c):_<63?p=O(this,a,c):_<1024?p=P(this,a,c):p=S(this,a,c),p};function R(m,a){this.x=m,this.y=a}R.prototype.makeRBT=function(a){for(var c=new Array(a),p=i.prototype._countBits(a)-1,_=0;_>=1;return _},R.prototype.permute=function(a,c,p,_,y,C){for(var L=0;L>>1)y++;return 1<>>13,p[2*C+1]=y&8191,y=y>>>13;for(C=2*c;C<_;++C)p[C]=0;r(y===0),r((y&-8192)===0)},R.prototype.stub=function(a){for(var c=new Array(a),p=0;p>=26,c+=_/67108864|0,c+=y>>>26,this.words[p]=y&67108863}return c!==0&&(this.words[p]=c,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var c=I(a);if(c.length===0)return new i(1);for(var p=this,_=0;_=0);var c=a%26,p=(a-c)/26,_=67108863>>>26-c<<26-c,y;if(c!==0){var C=0;for(y=0;y>>26-c}C&&(this.words[y]=C,this.length++)}if(p!==0){for(y=this.length-1;y>=0;y--)this.words[y+p]=this.words[y];for(y=0;y=0);var _;c?_=(c-c%26)/26:_=0;var y=a%26,C=Math.min((a-y)/26,this.length),L=67108863^67108863>>>y<C)for(this.length-=C,l=0;l=0&&(k!==0||l>=_);l--){var G=this.words[l]|0;this.words[l]=k<<26-y|G>>>y,k=G&L}return b&&k!==0&&(b.words[b.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,c,p){return r(this.negative===0),this.iushrn(a,c,p)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){r(typeof a=="number"&&a>=0);var c=a%26,p=(a-c)/26,_=1<=0);var c=a%26,p=(a-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var _=67108863^67108863>>>c<=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},i.prototype.isubn=function(a){if(r(typeof a=="number"),r(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c>26)-(b/67108864|0),this.words[y+p]=C&67108863}for(;y>26,this.words[y+p]=C&67108863;if(L===0)return this.strip();for(r(L===-1),L=0,y=0;y>26,this.words[y]=C&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,c){var p=this.length-a.length,_=this.clone(),y=a,C=y.words[y.length-1]|0,L=this._countBits(C);p=26-L,p!==0&&(y=y.ushln(p),_.iushln(p),C=y.words[y.length-1]|0);var b=_.length-y.length,l;if(c!=="mod"){l=new i(null),l.length=b+1,l.words=new Array(l.length);for(var k=0;k=0;W--){var te=(_.words[y.length+W]|0)*67108864+(_.words[y.length+W-1]|0);for(te=Math.min(te/C|0,67108863),_._ishlnsubmul(y,te,W);_.negative!==0;)te--,_.negative=0,_._ishlnsubmul(y,1,W),_.isZero()||(_.negative^=1);l&&(l.words[W]=te)}return l&&l.strip(),_.strip(),c!=="div"&&p!==0&&_.iushrn(p),{div:l||null,mod:_}},i.prototype.divmod=function(a,c,p){if(r(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var _,y,C;return this.negative!==0&&a.negative===0?(C=this.neg().divmod(a,c),c!=="mod"&&(_=C.div.neg()),c!=="div"&&(y=C.mod.neg(),p&&y.negative!==0&&y.iadd(a)),{div:_,mod:y}):this.negative===0&&a.negative!==0?(C=this.divmod(a.neg(),c),c!=="mod"&&(_=C.div.neg()),{div:_,mod:C.mod}):this.negative&a.negative?(C=this.neg().divmod(a.neg(),c),c!=="div"&&(y=C.mod.neg(),p&&y.negative!==0&&y.isub(a)),{div:C.div,mod:y}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?c==="div"?{div:this.divn(a.words[0]),mod:null}:c==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,c)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var c=this.divmod(a);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(a):c.mod,_=a.ushrn(1),y=a.andln(1),C=p.cmp(_);return C<0||y===1&&C===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},i.prototype.modn=function(a){r(a<=67108863);for(var c=(1<<26)%a,p=0,_=this.length-1;_>=0;_--)p=(c*p+(this.words[_]|0))%a;return p},i.prototype.idivn=function(a){r(a<=67108863);for(var c=0,p=this.length-1;p>=0;p--){var _=(this.words[p]|0)+c*67108864;this.words[p]=_/a|0,c=_%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){r(a.negative===0),r(!a.isZero());var c=this,p=a.clone();c.negative!==0?c=c.umod(a):c=c.clone();for(var _=new i(1),y=new i(0),C=new i(0),L=new i(1),b=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++b;for(var l=p.clone(),k=c.clone();!c.isZero();){for(var G=0,W=1;!(c.words[0]&W)&&G<26;++G,W<<=1);if(G>0)for(c.iushrn(G);G-- >0;)(_.isOdd()||y.isOdd())&&(_.iadd(l),y.isub(k)),_.iushrn(1),y.iushrn(1);for(var te=0,re=1;!(p.words[0]&re)&&te<26;++te,re<<=1);if(te>0)for(p.iushrn(te);te-- >0;)(C.isOdd()||L.isOdd())&&(C.iadd(l),L.isub(k)),C.iushrn(1),L.iushrn(1);c.cmp(p)>=0?(c.isub(p),_.isub(C),y.isub(L)):(p.isub(c),C.isub(_),L.isub(y))}return{a:C,b:L,gcd:p.iushln(b)}},i.prototype._invmp=function(a){r(a.negative===0),r(!a.isZero());var c=this,p=a.clone();c.negative!==0?c=c.umod(a):c=c.clone();for(var _=new i(1),y=new i(0),C=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var L=0,b=1;!(c.words[0]&b)&&L<26;++L,b<<=1);if(L>0)for(c.iushrn(L);L-- >0;)_.isOdd()&&_.iadd(C),_.iushrn(1);for(var l=0,k=1;!(p.words[0]&k)&&l<26;++l,k<<=1);if(l>0)for(p.iushrn(l);l-- >0;)y.isOdd()&&y.iadd(C),y.iushrn(1);c.cmp(p)>=0?(c.isub(p),_.isub(y)):(p.isub(c),y.isub(_))}var G;return c.cmpn(1)===0?G=_:G=y,G.cmpn(0)<0&&G.iadd(a),G},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var c=this.clone(),p=a.clone();c.negative=0,p.negative=0;for(var _=0;c.isEven()&&p.isEven();_++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var y=c.cmp(p);if(y<0){var C=c;c=p,p=C}else if(y===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(_)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){r(typeof a=="number");var c=a%26,p=(a-c)/26,_=1<>>26,L&=67108863,this.words[C]=L}return y!==0&&(this.words[C]=y,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var c=a<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this.strip();var p;if(this.length>1)p=1;else{c&&(a=-a),r(a<=67108863,"Number is too big");var _=this.words[0]|0;p=_===a?0:_a.length)return 1;if(this.length=0;p--){var _=this.words[p]|0,y=a.words[p]|0;if(_!==y){_y&&(c=1);break}}return c},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new H(a)},i.prototype.toRed=function(a){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return r(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return r(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var x={k256:null,p224:null,p192:null,p25519:null};function E(m,a){this.name=m,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}E.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},E.prototype.ireduce=function(a){var c=a,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var _=p0?c.isub(this.p):c.strip(),c},E.prototype.split=function(a,c){a.iushrn(this.n,0,c)},E.prototype.imulK=function(a){return a.imul(this.k)};function T(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(T,E),T.prototype.split=function(a,c){for(var p=4194303,_=Math.min(a.length,9),y=0;y<_;y++)c.words[y]=a.words[y];if(c.length=_,a.length<=9){a.words[0]=0,a.length=1;return}var C=a.words[9];for(c.words[c.length++]=C&p,y=10;y>>22,C=L}C>>>=22,a.words[y-10]=C,C===0&&a.length>10?a.length-=10:a.length-=9},T.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var c=0,p=0;p>>=26,a.words[p]=y,c=_}return c!==0&&(a.words[a.length++]=c),a},i._prime=function(a){if(x[a])return x[a];var c;if(a==="k256")c=new T;else if(a==="p224")c=new $;else if(a==="p192")c=new D;else if(a==="p25519")c=new V;else throw new Error("Unknown prime "+a);return x[a]=c,c};function H(m){if(typeof m=="string"){var a=i._prime(m);this.m=a.p,this.prime=a}else r(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}H.prototype._verify1=function(a){r(a.negative===0,"red works only with positives"),r(a.red,"red works only with red numbers")},H.prototype._verify2=function(a,c){r((a.negative|c.negative)===0,"red works only with positives"),r(a.red&&a.red===c.red,"red works only with red numbers")},H.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},H.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},H.prototype.add=function(a,c){this._verify2(a,c);var p=a.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},H.prototype.iadd=function(a,c){this._verify2(a,c);var p=a.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},H.prototype.sub=function(a,c){this._verify2(a,c);var p=a.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},H.prototype.isub=function(a,c){this._verify2(a,c);var p=a.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},H.prototype.shl=function(a,c){return this._verify1(a),this.imod(a.ushln(c))},H.prototype.imul=function(a,c){return this._verify2(a,c),this.imod(a.imul(c))},H.prototype.mul=function(a,c){return this._verify2(a,c),this.imod(a.mul(c))},H.prototype.isqr=function(a){return this.imul(a,a.clone())},H.prototype.sqr=function(a){return this.mul(a,a)},H.prototype.sqrt=function(a){if(a.isZero())return a.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new i(1)).iushrn(2);return this.pow(a,p)}for(var _=this.m.subn(1),y=0;!_.isZero()&&_.andln(1)===0;)y++,_.iushrn(1);r(!_.isZero());var C=new i(1).toRed(this),L=C.redNeg(),b=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);this.pow(l,b).cmp(L)!==0;)l.redIAdd(L);for(var k=this.pow(l,_),G=this.pow(a,_.addn(1).iushrn(1)),W=this.pow(a,_),te=y;W.cmp(C)!==0;){for(var re=W,g=0;re.cmp(C)!==0;g++)re=re.redSqr();r(g=0;y--){for(var k=c.words[y],G=l-1;G>=0;G--){var W=k>>G&1;if(C!==_[0]&&(C=this.sqr(C)),W===0&&L===0){b=0;continue}L<<=1,L|=W,b++,!(b!==p&&(y!==0||G!==0))&&(C=this.mul(C,_[L]),b=0,L=0)}l=26}return C},H.prototype.convertTo=function(a){var c=a.umod(this.m);return c===a?c.clone():c},H.prototype.convertFrom=function(a){var c=a.clone();return c.red=null,c},i.mont=function(a){return new Q(a)};function Q(m){H.call(this,m),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(Q,H),Q.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},Q.prototype.convertFrom=function(a){var c=this.imod(a.mul(this.rinv));return c.red=null,c},Q.prototype.imul=function(a,c){if(a.isZero()||c.isZero())return a.words[0]=0,a.length=1,a;var p=a.imul(c),_=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=p.isub(_).iushrn(this.shift),C=y;return y.cmp(this.m)>=0?C=y.isub(this.m):y.cmpn(0)<0&&(C=y.iadd(this.m)),C._forceRed(this)},Q.prototype.mul=function(a,c){if(a.isZero()||c.isZero())return new i(0)._forceRed(this);var p=a.mul(c),_=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=p.isub(_).iushrn(this.shift),C=y;return y.cmp(this.m)>=0?C=y.isub(this.m):y.cmpn(0)<0&&(C=y.iadd(this.m)),C._forceRed(this)},Q.prototype.invm=function(a){var c=this.imod(a._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(t,tt)})(Gu);const Yu=Zr;var Qu=ki;ki.strict=Za;ki.loose=Xa;var Zu=Object.prototype.toString,Xu={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function ki(t){return Za(t)||Xa(t)}function Za(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function Xa(t){return Xu[Zu.call(t)]}var ec=Qu.strict,tc=function(e){if(ec(e)){var n=Yt.Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}else return Yt.Buffer.from(e)};const es="hex",ts="utf8",fr="0";function mn(t){return new Uint8Array(t)}function ns(t,e=!1){const n=t.toString(es);return e?En(n):n}function nc(t){return t.toString(ts)}function hr(t){return tc(t)}function dn(t,e=!1){return ns(hr(t),e)}function rc(t){return nc(hr(t))}function ic(t){return Yt.Buffer.from(Ot(t),es)}function pn(t){return mn(ic(t))}function Si(t){return Yt.Buffer.from(t,ts)}function oc(t){return mn(Si(t))}function ac(t,e=!1){return ns(Si(t),e)}function sc(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function rs(...t){let e=[];return t.forEach(n=>e=e.concat(Array.from(n))),new Uint8Array([...e])}function lc(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function uc(t,e=8,n=fr){return cc(t,lc(t.length,e),n)}function cc(t,e,n=fr){return hc(t,e,!0,n)}function Ot(t){return t.replace(/^0x/,"")}function En(t){return t.startsWith("0x")?t:`0x${t}`}function is(t){return t=Ot(t),t=uc(t,2),t&&(t=En(t)),t}function fc(t){const e=t.startsWith("0x");return t=Ot(t),t=t.startsWith(fr)?t.substring(1):t,e?En(t):t}function hc(t,e,n,r=fr){const o=e-t.length;let i=t;if(o>0){const u=r.repeat(o);i=n?u+t:t+u}return i}function Xr(t){return hr(new Uint8Array(t))}function dc(t,e){return dn(new Uint8Array(t),!e)}function pc(t){return mn(t).buffer}function gc(t){return Si(t)}function mc(t,e){return ac(t,!e)}function _c(t){return pn(t).buffer}function os(t,e){const n=Ot(is(new Yu(t).toString(16)));return e?n:En(n)}var ei={},vc={get exports(){return ei},set exports(t){ei=t}};(function(t){(function(){var e="input is invalid type",n="finalize already called",r=typeof window=="object",o=r?window:{};o.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",u=!o.JS_SHA3_NO_NODE_JS&&typeof Ke=="object"&&Ke.versions&&Ke.versions.node;u?o=tt:i&&(o=self);var s=!o.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,d=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",v="0123456789abcdef".split(""),w=[31,7936,2031616,520093696],B=[4,1024,262144,67108864],I=[1,256,65536,16777216],O=[6,1536,393216,100663296],F=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],S=[224,256,384,512],R=[128,256],x=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),d&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});for(var T=function(g,U,K){return function(J){return new W(g,U,g).update(J)[K]()}},$=function(g,U,K){return function(J,X){return new W(g,U,X).update(J)[K]()}},D=function(g,U,K){return function(J,X,ae,ne){return _["cshake"+g].update(J,X,ae,ne)[K]()}},V=function(g,U,K){return function(J,X,ae,ne){return _["kmac"+g].update(J,X,ae,ne)[K]()}},H=function(g,U,K,J){for(var X=0;X>5,this.byteCount=this.blockCount<<2,this.outputBlocks=K>>5,this.extraBytes=(K&31)>>3;for(var J=0;J<50;++J)this.s[J]=0}W.prototype.update=function(g){if(this.finalized)throw new Error(n);var U,K=typeof g;if(K!=="string"){if(K==="object"){if(g===null)throw new Error(e);if(d&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!d||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);U=!0}for(var J=this.blocks,X=this.byteCount,ae=g.length,ne=this.blockCount,ee=0,me=this.s,oe,he;ee>2]|=g[ee]<>2]|=he<>2]|=(192|he>>6)<>2]|=(128|he&63)<=57344?(J[oe>>2]|=(224|he>>12)<>2]|=(128|he>>6&63)<>2]|=(128|he&63)<>2]|=(240|he>>18)<>2]|=(128|he>>12&63)<>2]|=(128|he>>6&63)<>2]|=(128|he&63)<=X){for(this.start=oe-X,this.block=J[ne],oe=0;oe>8,K=g&255;K>0;)X.unshift(K),g=g>>8,K=g&255,++J;return U?X.push(J):X.unshift(J),this.update(X),X.length},W.prototype.encodeString=function(g){var U,K=typeof g;if(K!=="string"){if(K==="object"){if(g===null)throw new Error(e);if(d&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!d||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);U=!0}var J=0,X=g.length;if(U)J=X;else for(var ae=0;ae=57344?J+=3:(ne=65536+((ne&1023)<<10|g.charCodeAt(++ae)&1023),J+=4)}return J+=this.encode(J*8),this.update(g),J},W.prototype.bytepad=function(g,U){for(var K=this.encode(U),J=0;J>2]|=this.padding[U&3],this.lastByteIndex===this.byteCount)for(g[0]=g[K],U=1;U>4&15]+v[ee&15]+v[ee>>12&15]+v[ee>>8&15]+v[ee>>20&15]+v[ee>>16&15]+v[ee>>28&15]+v[ee>>24&15];ae%g===0&&(re(U),X=0)}return J&&(ee=U[X],ne+=v[ee>>4&15]+v[ee&15],J>1&&(ne+=v[ee>>12&15]+v[ee>>8&15]),J>2&&(ne+=v[ee>>20&15]+v[ee>>16&15])),ne},W.prototype.arrayBuffer=function(){this.finalize();var g=this.blockCount,U=this.s,K=this.outputBlocks,J=this.extraBytes,X=0,ae=0,ne=this.outputBits>>3,ee;J?ee=new ArrayBuffer(K+1<<2):ee=new ArrayBuffer(ne);for(var me=new Uint32Array(ee);ae>8&255,ne[ee+2]=me>>16&255,ne[ee+3]=me>>24&255;ae%g===0&&re(U)}return J&&(ee=ae<<2,me=U[X],ne[ee]=me&255,J>1&&(ne[ee+1]=me>>8&255),J>2&&(ne[ee+2]=me>>16&255)),ne};function te(g,U,K){W.call(this,g,U,K)}te.prototype=new W,te.prototype.finalize=function(){return this.encode(this.outputBits,!0),W.prototype.finalize.call(this)};var re=function(g){var U,K,J,X,ae,ne,ee,me,oe,he,M,f,h,A,N,z,Z,se,le,ve,de,ue,Xe,we,be,Pt,Me,Ee,Dt,ke,Se,Ut,Ce,Ae,qt,Te,Ie,Ht,Re,Be,Wt,Fe,Oe,zt,Le,Ne,jt,$e,Pe,Vt,De,Ue,Jt,qe,He,Mt,Et,kt,St,Ct,At,Tt,It;for(J=0;J<48;J+=2)X=g[0]^g[10]^g[20]^g[30]^g[40],ae=g[1]^g[11]^g[21]^g[31]^g[41],ne=g[2]^g[12]^g[22]^g[32]^g[42],ee=g[3]^g[13]^g[23]^g[33]^g[43],me=g[4]^g[14]^g[24]^g[34]^g[44],oe=g[5]^g[15]^g[25]^g[35]^g[45],he=g[6]^g[16]^g[26]^g[36]^g[46],M=g[7]^g[17]^g[27]^g[37]^g[47],f=g[8]^g[18]^g[28]^g[38]^g[48],h=g[9]^g[19]^g[29]^g[39]^g[49],U=f^(ne<<1|ee>>>31),K=h^(ee<<1|ne>>>31),g[0]^=U,g[1]^=K,g[10]^=U,g[11]^=K,g[20]^=U,g[21]^=K,g[30]^=U,g[31]^=K,g[40]^=U,g[41]^=K,U=X^(me<<1|oe>>>31),K=ae^(oe<<1|me>>>31),g[2]^=U,g[3]^=K,g[12]^=U,g[13]^=K,g[22]^=U,g[23]^=K,g[32]^=U,g[33]^=K,g[42]^=U,g[43]^=K,U=ne^(he<<1|M>>>31),K=ee^(M<<1|he>>>31),g[4]^=U,g[5]^=K,g[14]^=U,g[15]^=K,g[24]^=U,g[25]^=K,g[34]^=U,g[35]^=K,g[44]^=U,g[45]^=K,U=me^(f<<1|h>>>31),K=oe^(h<<1|f>>>31),g[6]^=U,g[7]^=K,g[16]^=U,g[17]^=K,g[26]^=U,g[27]^=K,g[36]^=U,g[37]^=K,g[46]^=U,g[47]^=K,U=he^(X<<1|ae>>>31),K=M^(ae<<1|X>>>31),g[8]^=U,g[9]^=K,g[18]^=U,g[19]^=K,g[28]^=U,g[29]^=K,g[38]^=U,g[39]^=K,g[48]^=U,g[49]^=K,A=g[0],N=g[1],Ne=g[11]<<4|g[10]>>>28,jt=g[10]<<4|g[11]>>>28,Ee=g[20]<<3|g[21]>>>29,Dt=g[21]<<3|g[20]>>>29,Ct=g[31]<<9|g[30]>>>23,At=g[30]<<9|g[31]>>>23,Fe=g[40]<<18|g[41]>>>14,Oe=g[41]<<18|g[40]>>>14,Ae=g[2]<<1|g[3]>>>31,qt=g[3]<<1|g[2]>>>31,z=g[13]<<12|g[12]>>>20,Z=g[12]<<12|g[13]>>>20,$e=g[22]<<10|g[23]>>>22,Pe=g[23]<<10|g[22]>>>22,ke=g[33]<<13|g[32]>>>19,Se=g[32]<<13|g[33]>>>19,Tt=g[42]<<2|g[43]>>>30,It=g[43]<<2|g[42]>>>30,qe=g[5]<<30|g[4]>>>2,He=g[4]<<30|g[5]>>>2,Te=g[14]<<6|g[15]>>>26,Ie=g[15]<<6|g[14]>>>26,se=g[25]<<11|g[24]>>>21,le=g[24]<<11|g[25]>>>21,Vt=g[34]<<15|g[35]>>>17,De=g[35]<<15|g[34]>>>17,Ut=g[45]<<29|g[44]>>>3,Ce=g[44]<<29|g[45]>>>3,we=g[6]<<28|g[7]>>>4,be=g[7]<<28|g[6]>>>4,Mt=g[17]<<23|g[16]>>>9,Et=g[16]<<23|g[17]>>>9,Ht=g[26]<<25|g[27]>>>7,Re=g[27]<<25|g[26]>>>7,ve=g[36]<<21|g[37]>>>11,de=g[37]<<21|g[36]>>>11,Ue=g[47]<<24|g[46]>>>8,Jt=g[46]<<24|g[47]>>>8,zt=g[8]<<27|g[9]>>>5,Le=g[9]<<27|g[8]>>>5,Pt=g[18]<<20|g[19]>>>12,Me=g[19]<<20|g[18]>>>12,kt=g[29]<<7|g[28]>>>25,St=g[28]<<7|g[29]>>>25,Be=g[38]<<8|g[39]>>>24,Wt=g[39]<<8|g[38]>>>24,ue=g[48]<<14|g[49]>>>18,Xe=g[49]<<14|g[48]>>>18,g[0]=A^~z&se,g[1]=N^~Z&le,g[10]=we^~Pt&Ee,g[11]=be^~Me&Dt,g[20]=Ae^~Te&Ht,g[21]=qt^~Ie&Re,g[30]=zt^~Ne&$e,g[31]=Le^~jt&Pe,g[40]=qe^~Mt&kt,g[41]=He^~Et&St,g[2]=z^~se&ve,g[3]=Z^~le&de,g[12]=Pt^~Ee&ke,g[13]=Me^~Dt&Se,g[22]=Te^~Ht&Be,g[23]=Ie^~Re&Wt,g[32]=Ne^~$e&Vt,g[33]=jt^~Pe&De,g[42]=Mt^~kt&Ct,g[43]=Et^~St&At,g[4]=se^~ve&ue,g[5]=le^~de&Xe,g[14]=Ee^~ke&Ut,g[15]=Dt^~Se&Ce,g[24]=Ht^~Be&Fe,g[25]=Re^~Wt&Oe,g[34]=$e^~Vt&Ue,g[35]=Pe^~De&Jt,g[44]=kt^~Ct&Tt,g[45]=St^~At&It,g[6]=ve^~ue&A,g[7]=de^~Xe&N,g[16]=ke^~Ut&we,g[17]=Se^~Ce&be,g[26]=Be^~Fe&Ae,g[27]=Wt^~Oe&qt,g[36]=Vt^~Ue&zt,g[37]=De^~Jt&Le,g[46]=Ct^~Tt&qe,g[47]=At^~It&He,g[8]=ue^~A&z,g[9]=Xe^~N&Z,g[18]=Ut^~we&Pt,g[19]=Ce^~be&Me,g[28]=Fe^~Ae&Te,g[29]=Oe^~qt&Ie,g[38]=Ue^~zt&Ne,g[39]=Jt^~Le&jt,g[48]=Tt^~qe&Mt,g[49]=It^~He&Et,g[0]^=P[J],g[1]^=P[J+1]};if(s)t.exports=_;else for(C=0;C=0;L--)(C=m[L])&&(y=(_<3?C(y):_>3?C(a,c,y):C(a,c))||y);return _>3&&y&&Object.defineProperty(a,c,y),y},i=function(m,a){return function(c,p){a(c,p,m)}},u=function(m,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(m,a)},s=function(m,a,c,p){function _(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function L(k){try{l(p.next(k))}catch(G){C(G)}}function b(k){try{l(p.throw(k))}catch(G){C(G)}}function l(k){k.done?y(k.value):_(k.value).then(L,b)}l((p=p.apply(m,a||[])).next())})},d=function(m,a){var c={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},p,_,y,C;return C={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function L(l){return function(k){return b([l,k])}}function b(l){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,_&&(y=l[0]&2?_.return:l[0]?_.throw||((y=_.return)&&y.call(_),0):_.next)&&!(y=y.call(_,l[1])).done)return y;switch(_=0,y&&(l=[l[0]&2,y.value]),l[0]){case 0:case 1:y=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,_=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(y=c.trys,!(y=y.length>0&&y[y.length-1])&&(l[0]===6||l[0]===2)){c=0;continue}if(l[0]===3&&(!y||l[1]>y[0]&&l[1]=m.length&&(m=void 0),{value:m&&m[p++],done:!m}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},B=function(m,a){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var p=c.call(m),_,y=[],C;try{for(;(a===void 0||a-- >0)&&!(_=p.next()).done;)y.push(_.value)}catch(L){C={error:L}}finally{try{_&&!_.done&&(c=p.return)&&c.call(p)}finally{if(C)throw C.error}}return y},I=function(){for(var m=[],a=0;a1||L(W,te)})})}function L(W,te){try{b(p[W](te))}catch(re){G(y[0][3],re)}}function b(W){W.value instanceof F?Promise.resolve(W.value.v).then(l,k):G(y[0][2],W)}function l(W){L("next",W)}function k(W){L("throw",W)}function G(W,te){W(te),y.shift(),y.length&&L(y[0][0],y[0][1])}},S=function(m){var a,c;return a={},p("next"),p("throw",function(_){throw _}),p("return"),a[Symbol.iterator]=function(){return this},a;function p(_,y){a[_]=m[_]?function(C){return(c=!c)?{value:F(m[_](C)),done:_==="return"}:y?y(C):C}:y}},R=function(m){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=m[Symbol.asyncIterator],c;return a?a.call(m):(m=typeof w=="function"?w(m):m[Symbol.iterator](),c={},p("next"),p("throw"),p("return"),c[Symbol.asyncIterator]=function(){return this},c);function p(y){c[y]=m[y]&&function(C){return new Promise(function(L,b){C=m[y](C),_(L,b,C.done,C.value)})}}function _(y,C,L,b){Promise.resolve(b).then(function(l){y({value:l,done:L})},C)}},x=function(m,a){return Object.defineProperty?Object.defineProperty(m,"raw",{value:a}):m.raw=a,m},E=function(m){if(m&&m.__esModule)return m;var a={};if(m!=null)for(var c in m)Object.hasOwnProperty.call(m,c)&&(a[c]=m[c]);return a.default=m,a},T=function(m){return m&&m.__esModule?m:{default:m}},$=function(m,a){if(!a.has(m))throw new TypeError("attempted to get private field on non-instance");return a.get(m)},D=function(m,a,c){if(!a.has(m))throw new TypeError("attempted to set private field on non-instance");return a.set(m,c),c},H("__extends",e),H("__assign",n),H("__rest",r),H("__decorate",o),H("__param",i),H("__metadata",u),H("__awaiter",s),H("__generator",d),H("__exportStar",v),H("__createBinding",V),H("__values",w),H("__read",B),H("__spread",I),H("__spreadArrays",O),H("__await",F),H("__asyncGenerator",P),H("__asyncDelegator",S),H("__asyncValues",R),H("__makeTemplateObject",x),H("__importStar",E),H("__importDefault",T),H("__classPrivateFieldGet",$),H("__classPrivateFieldSet",D)})})(yc);var gt={},io;function wc(){if(io)return gt;io=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.isBrowserCryptoAvailable=gt.getSubtleCrypto=gt.getBrowerCrypto=void 0;function t(){return(tt==null?void 0:tt.crypto)||(tt==null?void 0:tt.msCrypto)||{}}gt.getBrowerCrypto=t;function e(){const r=t();return r.subtle||r.webkitSubtle}gt.getSubtleCrypto=e;function n(){return!!t()&&!!e()}return gt.isBrowserCryptoAvailable=n,gt}var mt={},oo;function bc(){if(oo)return mt;oo=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.isBrowser=mt.isNode=mt.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}mt.isReactNative=t;function e(){return typeof Ke<"u"&&typeof Ke.versions<"u"&&typeof Ke.versions.node<"u"}mt.isNode=e;function n(){return!t()&&!e()}return mt.isBrowser=n,mt}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ti;e.__exportStar(wc(),t),e.__exportStar(bc(),t)})(kn);function xc(){const t=Date.now()*Math.pow(10,3),e=Math.floor(Math.random()*Math.pow(10,3));return t+e}function Hn(t){return is(t)}function Mc(t){return fc(En(t))}const Ec=xc;function Or(){return((e,n)=>{for(n=e="";e++<36;n+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return n})()}function kc(t){return t===""||typeof t=="string"&&t.trim()===""}function Sc(t){return!(t&&t.length)}function as(t,e){return sc(t,e)}function Cc(t){return typeof t.method<"u"}function An(t){return typeof t.result<"u"}function Zn(t){return typeof t.error<"u"}function ao(t){return typeof t.event<"u"}function Ac(t){return Ku.includes(t)||t.startsWith("wc_")}function Tc(t){return t.method.startsWith("wc_")?!0:!Qa.includes(t.method)}function Ic(t){t=Ot(t.toLowerCase());const e=Ot(ei.keccak_256(gc(t)));let n="";for(let r=0;r7?n+=t[r].toUpperCase():n+=t[r];return En(n)}const Rc=t=>t?t.toLowerCase().substring(0,2)!=="0x"?!1:/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x)?[0-9a-f]{40}$/.test(t)||/^(0x)?[0-9A-F]{40}$/.test(t)?!0:t===Ic(t):!1:!1;function so(t){return!Sc(t)&&!as(t[0])&&(t[0]=mc(t[0])),t}function Lr(t){if(typeof t.type<"u"&&t.type!=="0")return t;if(typeof t.from>"u"||!Rc(t.from))throw new Error("Transaction object must include a valid 'from' value.");function e(o){let i=o;return(typeof o=="number"||typeof o=="string"&&!kc(o))&&(as(o)?typeof o=="string"&&(i=Hn(o)):i=os(o)),typeof i=="string"&&(i=Mc(i)),i}const n={from:Hn(t.from),to:typeof t.to>"u"?void 0:Hn(t.to),gasPrice:typeof t.gasPrice>"u"?"":e(t.gasPrice),gas:typeof t.gas>"u"?typeof t.gasLimit>"u"?"":e(t.gasLimit):e(t.gas),value:typeof t.value>"u"?"":e(t.value),nonce:typeof t.nonce>"u"?"":e(t.nonce),data:typeof t.data>"u"?"":Hn(t.data)||"0x"},r=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach(o=>{(typeof n[o]>"u"||typeof n[o]=="string"&&!n[o].trim().length)&&r.includes(o)&&delete n[o]}),n}function Bc(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;break}const r={code:n,message:e};return t.data&&(r.data=t.data),r}var Ci={},Fc=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),ss="%[a-f0-9]{2}",lo=new RegExp("("+ss+")|([^%]+?)","gi"),uo=new RegExp("("+ss+")+","gi");function ni(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],ni(n),ni(r))}function Oc(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(lo)||[],n=1;n{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const n=t.indexOf(e);return n===-1?[t]:[t.slice(0,n),t.slice(n+e.length)]};(function(t){const e=Fc,n=Nc,r=$c,o=S=>S==null;function i(S){switch(S.arrayFormat){case"index":return R=>(x,E)=>{const T=x.length;return E===void 0||S.skipNull&&E===null||S.skipEmptyString&&E===""?x:E===null?[...x,[d(R,S),"[",T,"]"].join("")]:[...x,[d(R,S),"[",d(T,S),"]=",d(E,S)].join("")]};case"bracket":return R=>(x,E)=>E===void 0||S.skipNull&&E===null||S.skipEmptyString&&E===""?x:E===null?[...x,[d(R,S),"[]"].join("")]:[...x,[d(R,S),"[]=",d(E,S)].join("")];case"comma":case"separator":return R=>(x,E)=>E==null||E.length===0?x:x.length===0?[[d(R,S),"=",d(E,S)].join("")]:[[x,d(E,S)].join(S.arrayFormatSeparator)];default:return R=>(x,E)=>E===void 0||S.skipNull&&E===null||S.skipEmptyString&&E===""?x:E===null?[...x,d(R,S)]:[...x,[d(R,S),"=",d(E,S)].join("")]}}function u(S){let R;switch(S.arrayFormat){case"index":return(x,E,T)=>{if(R=/\[(\d*)\]$/.exec(x),x=x.replace(/\[\d*\]$/,""),!R){T[x]=E;return}T[x]===void 0&&(T[x]={}),T[x][R[1]]=E};case"bracket":return(x,E,T)=>{if(R=/(\[\])$/.exec(x),x=x.replace(/\[\]$/,""),!R){T[x]=E;return}if(T[x]===void 0){T[x]=[E];return}T[x]=[].concat(T[x],E)};case"comma":case"separator":return(x,E,T)=>{const D=typeof E=="string"&&E.split("").indexOf(S.arrayFormatSeparator)>-1?E.split(S.arrayFormatSeparator).map(V=>v(V,S)):E===null?E:v(E,S);T[x]=D};default:return(x,E,T)=>{if(T[x]===void 0){T[x]=E;return}T[x]=[].concat(T[x],E)}}}function s(S){if(typeof S!="string"||S.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function d(S,R){return R.encode?R.strict?e(S):encodeURIComponent(S):S}function v(S,R){return R.decode?n(S):S}function w(S){return Array.isArray(S)?S.sort():typeof S=="object"?w(Object.keys(S)).sort((R,x)=>Number(R)-Number(x)).map(R=>S[R]):S}function B(S){const R=S.indexOf("#");return R!==-1&&(S=S.slice(0,R)),S}function I(S){let R="";const x=S.indexOf("#");return x!==-1&&(R=S.slice(x)),R}function O(S){S=B(S);const R=S.indexOf("?");return R===-1?"":S.slice(R+1)}function F(S,R){return R.parseNumbers&&!Number.isNaN(Number(S))&&typeof S=="string"&&S.trim()!==""?S=Number(S):R.parseBooleans&&S!==null&&(S.toLowerCase()==="true"||S.toLowerCase()==="false")&&(S=S.toLowerCase()==="true"),S}function P(S,R){R=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},R),s(R.arrayFormatSeparator);const x=u(R),E=Object.create(null);if(typeof S!="string"||(S=S.trim().replace(/^[?#&]/,""),!S))return E;for(const T of S.split("&")){let[$,D]=r(R.decode?T.replace(/\+/g," "):T,"=");D=D===void 0?null:["comma","separator"].includes(R.arrayFormat)?D:v(D,R),x(v($,R),D,E)}for(const T of Object.keys(E)){const $=E[T];if(typeof $=="object"&&$!==null)for(const D of Object.keys($))$[D]=F($[D],R);else E[T]=F($,R)}return R.sort===!1?E:(R.sort===!0?Object.keys(E).sort():Object.keys(E).sort(R.sort)).reduce((T,$)=>{const D=E[$];return D&&typeof D=="object"&&!Array.isArray(D)?T[$]=w(D):T[$]=D,T},Object.create(null))}t.extract=O,t.parse=P,t.stringify=(S,R)=>{if(!S)return"";R=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},R),s(R.arrayFormatSeparator);const x=D=>R.skipNull&&o(S[D])||R.skipEmptyString&&S[D]==="",E=i(R),T={};for(const D of Object.keys(S))x(D)||(T[D]=S[D]);const $=Object.keys(T);return R.sort!==!1&&$.sort(R.sort),$.map(D=>{const V=S[D];return V===void 0?"":V===null?d(D,R):Array.isArray(V)?V.reduce(E(D),[]).join("&"):d(D,R)+"="+d(V,R)}).filter(D=>D.length>0).join("&")},t.parseUrl=(S,R)=>{R=Object.assign({decode:!0},R);const[x,E]=r(S,"#");return Object.assign({url:x.split("?")[0]||"",query:P(O(S),R)},R&&R.parseFragmentIdentifier&&E?{fragmentIdentifier:v(E,R)}:{})},t.stringifyUrl=(S,R)=>{R=Object.assign({encode:!0,strict:!0},R);const x=B(S.url).split("?")[0]||"",E=t.extract(S.url),T=t.parse(E,{sort:!1}),$=Object.assign(T,S.query);let D=t.stringify($,R);D&&(D=`?${D}`);let V=I(S.url);return S.fragmentIdentifier&&(V=`#${d(S.fragmentIdentifier,R)}`),`${x}${D}${V}`}})(Ci);function Pc(t){const e=t.indexOf("?")!==-1?t.indexOf("?"):void 0;return typeof e<"u"?t.substr(e):""}function Dc(t,e){let n=ls(t);return n=Object.assign(Object.assign({},n),e),t=Uc(n),t}function ls(t){return Ci.parse(t)}function Uc(t){return Ci.stringify(t)}function qc(t){return typeof t.bridge<"u"}function Hc(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),o=t.substring(e+1,n);function i(B){const I="@",O=B.split(I);return{handshakeTopic:O[0],version:parseInt(O[1],10)}}const u=i(o),s=typeof n<"u"?t.substr(n):"";function d(B){const I=ls(B);return{key:I.key||"",bridge:I.bridge||""}}const v=d(s);return Object.assign(Object.assign({protocol:r},u),v)}class Wc{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(e,n){this._eventEmitters.push({event:e,callback:n})}trigger(e){let n=[];e&&(n=this._eventEmitters.filter(r=>r.event===e)),n.forEach(r=>{r.callback()})}}const zc=typeof ji.WebSocket<"u"?ji.WebSocket:require("ws");class jc{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new Wc,!e.url||typeof e.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return this.readyState===0}set connected(e){}get connected(){return this.readyState===1}set closing(e){}get closing(){return this.readyState===2}set closed(e){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(e,n,r){if(!n||typeof n!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:n,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,n){this._events.push({event:e,callback:n})}_socketCreate(){if(this._nextSocket)return;const e=Vc(this._url,this._protocol,this._version);if(this._nextSocket=new zc(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=n=>this._socketReceive(n),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=n=>this._socketError(n),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const n=JSON.stringify(e);this._socket&&this._socket.readyState===1?this._socket.send(n):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let n;try{n=JSON.parse(e.data)}catch{return}if(this._socketSend({topic:n.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const r=this._events.filter(o=>o.event==="message");r&&r.length&&r.forEach(o=>o.callback(n))}}_socketError(e){const n=this._events.filter(r=>r.event==="error");n&&n.length&&n.forEach(r=>r.callback(e))}_queueSubscriptions(){this._subscriptions.forEach(n=>this._queue.push({topic:n,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach(n=>this._socketSend(n)),this._queue=[]}}function Vc(t,e,n){var r,o;const u=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),s=Wa()?{protocol:e,version:n,env:"browser",host:((r=ja())===null||r===void 0?void 0:r.host)||""}:{protocol:e,version:n,env:((o=lr())===null||o===void 0?void 0:o.name)||""},d=Dc(Pc(u[1]||""),s);return u[0]+"?"+d}const Nr="Session currently connected",Kt="Session currently disconnected",Jc="Session Rejected",Kc="Missing JSON RPC response",Gc='JSON-RPC success response must include "result" field',Yc='JSON-RPC error response must include "error" field',Qc='JSON RPC request must have valid "method" value',Zc='JSON RPC request must have valid "id" value',Xc="Missing one of the required parameters: bridge / uri / session",co="JSON RPC response format is invalid",ef="URI format is invalid",tf="QRCode Modal not provided",fo="User close QRCode Modal";class nf{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter(n=>n.event!==e)}trigger(e){let n=[],r;Cc(e)?r=e.method:An(e)||Zn(e)?r=`response:${e.id}`:ao(e)?r=e.event:r="",r&&(n=this._eventEmitters.filter(o=>o.event===r)),(!n||!n.length)&&!Ac(r)&&!ao(r)&&(n=this._eventEmitters.filter(o=>o.event==="call_request")),n.forEach(o=>{if(Zn(e)){const i=new Error(e.error.message);o.callback(i,null)}else o.callback(null,e)})}}class rf{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const n=Mi(this.storageId);return n&&qc(n)&&(e=n),e}setSession(e){return xi(this.storageId,e),e}removeSession(){Ei(this.storageId)}}const of="walletconnect.org",af="abcdefghijklmnopqrstuvwxyz0123456789",us=af.split("").map(t=>`https://${t}.bridge.walletconnect.org`);function sf(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}function lf(t){return sf(t).split(".").slice(-2).join(".")}function uf(){return Math.floor(Math.random()*us.length)}function cf(){return us[uf()]}function ff(t){return lf(t)===of}function hf(t){return ff(t)?cf():t}let df=class{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new nf,this._clientMeta=Qr()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new rf(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...Qa,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(Xc);e.connectorOpts.bridge&&(this.bridge=hf(e.connectorOpts.bridge)),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new jc({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const n=_c(e);this._key=n}get key(){return this._key?dc(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=Or()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=Qr()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:n,bridge:r,key:o}=this._parseUri(e);this.handshakeTopic=n,this.bridge=r,this.key=o}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,n){const r={event:e,callback:n};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const n=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=n.id,this.handshakeTopic=Or(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error(fo)});const r=()=>{this.killSession()};try{const o=await this._sendCallRequest(n);return o&&r(),o}catch(o){throw r(),o}}async connect(e){if(!this._qrcodeModal)throw new Error(tf);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise(async(n,r)=>{this.on("modal_closed",()=>r(new Error(fo))),this.on("connect",(o,i)=>{if(o)return r(o);n(i.params[0])})}))}async createSession(e){if(this._connected)throw new Error(Nr);if(this.pending)return;this._key=await this._generateKey();const n=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=n.id,this.handshakeTopic=Or(),this._sendSessionRequest(n,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(Nr);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:n};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(Nr);const n=e&&e.message?e.message:Jc,r=this._formatResponse({id:this.handshakeId,error:{message:n}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(Kt);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[n]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const n=e?e.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},o=this._formatRequest({method:"wc_sessionUpdate",params:[r]});await this._sendRequest(o),this._handleSessionDisconnect(n)}async sendTransaction(e){if(!this._connected)throw new Error(Kt);const n=Lr(e),r=this._formatRequest({method:"eth_sendTransaction",params:[n]});return await this._sendCallRequest(r)}async signTransaction(e){if(!this._connected)throw new Error(Kt);const n=Lr(e),r=this._formatRequest({method:"eth_signTransaction",params:[n]});return await this._sendCallRequest(r)}async signMessage(e){if(!this._connected)throw new Error(Kt);const n=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(n)}async signPersonalMessage(e){if(!this._connected)throw new Error(Kt);e=so(e);const n=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(n)}async signTypedData(e){if(!this._connected)throw new Error(Kt);const n=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(n)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const n=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(n)}unsafeSend(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),new Promise((r,o)=>{this._subscribeToResponse(e.id,(i,u)=>{if(i){o(i);return}if(!u)throw new Error(Kc);r(u)})})}async sendCustomRequest(e,n){if(!this._connected)throw new Error(Kt);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return os(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params&&(e.params[0]=Lr(e.params[0]));break;case"personal_sign":e.params&&(e.params=so(e.params));break}const r=this._formatRequest(e);return await this._sendCallRequest(r,n)}approveRequest(e){if(An(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(Gc)}rejectRequest(e){if(Zn(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(Yc)}transportClose(){this._transport.close()}async _sendRequest(e,n){const r=this._formatRequest(e),o=await this._encrypt(r),i=typeof(n==null?void 0:n.topic)<"u"?n.topic:this.peerId,u=JSON.stringify(o),s=typeof(n==null?void 0:n.forcePushNotification)<"u"?!n.forcePushNotification:Tc(r);this._transport.send(u,i,s)}async _sendResponse(e){const n=await this._encrypt(e),r=this.peerId,o=JSON.stringify(n),i=!0;this._transport.send(o,r,i)}async _sendSessionRequest(e,n,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,n)}_sendCallRequest(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(typeof e.method>"u")throw new Error(Qc);return{id:typeof e.id>"u"?Ec():e.id,jsonrpc:"2.0",method:e.method,params:typeof e.params>"u"?[]:e.params}}_formatResponse(e){if(typeof e.id>"u")throw new Error(Zc);const n={id:e.id,jsonrpc:"2.0"};if(Zn(e)){const r=Bc(e.error);return Object.assign(Object.assign(Object.assign({},n),e),{error:r})}else if(An(e))return Object.assign(Object.assign({},n),e);throw new Error(co)}_handleSessionDisconnect(e){const n=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Ei(Qn)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,n){n?n.approved?(this._connected?(n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),n.peerId&&!this.peerId&&(this.peerId=n.peerId),n.peerMeta&&!this.peerMeta&&(this.peerMeta=n.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let r;try{r=JSON.parse(e.payload)}catch{return}const o=await this._decrypt(r);o&&this._eventManager.trigger(o)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,n){this.on(`response:${e}`,n)}_subscribeToSessionResponse(e,n){this._subscribeToResponse(e,(r,o)=>{if(r){this._handleSessionResponse(r.message);return}An(o)?this._handleSessionResponse(n,o.result):o.error&&o.error.message?this._handleSessionResponse(o.error.message):this._handleSessionResponse(n)})}_subscribeToCallResponse(e){return new Promise((n,r)=>{this._subscribeToResponse(e,(o,i)=>{if(o){r(o);return}An(i)?n(i.result):i.error&&i.error.message?r(i.error):r(new Error(co))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(e,n)=>{const{request:r}=n.params[0];if(qa()&&this._signingMethods.includes(r.method)){const o=Mi(Qn);o&&(window.location.href=o.href)}}),this.on("wc_sessionRequest",(e,n)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=n.id,this.peerId=n.params[0].peerId,this.peerMeta=n.params[0].peerMeta;const r=Object.assign(Object.assign({},n),{method:"session_request"});this._eventManager.trigger(r)}),this.on("wc_sessionUpdate",(e,n)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",n.params[0])})}_initTransport(){this._transport.on("message",e=>this._handleIncomingMessages(e)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){const e=this.protocol,n=this.handshakeTopic,r=this.version,o=encodeURIComponent(this.bridge),i=this.key;return`${e}:${n}@${r}?bridge=${o}&key=${i}`}_parseUri(e){const n=Hc(e);if(n.protocol===this.protocol){if(!n.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const r=n.handshakeTopic;if(!n.bridge)throw Error("Invalid or missing bridge url parameter value");const o=decodeURIComponent(n.bridge);if(!n.key)throw Error("Invalid or missing key parameter value");const i=n.key;return{handshakeTopic:r,bridge:o,key:i}}else throw new Error(ef)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.encrypt(e,n):null}async _decrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.decrypt(e,n):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||typeof e.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||typeof e.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||typeof e.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const n={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",async(r,o)=>{if(r)throw r;if(e.peerMeta){const i=o.params[0].peerMeta.name;n.peerName=i}try{if(!(await(await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}};function pf(t){return kn.getBrowerCrypto().getRandomValues(new Uint8Array(t))}const cs=256,fs=cs,gf=cs,Lt="AES-CBC",mf=`SHA-${fs}`,ri="HMAC",_f="encrypt",vf="decrypt",yf="sign",wf="verify";function bf(t){return t===Lt?{length:fs,name:Lt}:{hash:{name:mf},name:ri}}function xf(t){return t===Lt?[_f,vf]:[yf,wf]}async function Ai(t,e=Lt){return kn.getSubtleCrypto().importKey("raw",t,bf(e),!0,xf(e))}async function Mf(t,e,n){const r=kn.getSubtleCrypto(),o=await Ai(e,Lt),i=await r.encrypt({iv:t,name:Lt},o,n);return new Uint8Array(i)}async function Ef(t,e,n){const r=kn.getSubtleCrypto(),o=await Ai(e,Lt),i=await r.decrypt({iv:t,name:Lt},o,n);return new Uint8Array(i)}async function kf(t,e){const n=kn.getSubtleCrypto(),r=await Ai(t,ri),o=await n.sign({length:gf,name:ri},r,e);return new Uint8Array(o)}function Sf(t,e,n){return Mf(t,e,n)}function Cf(t,e,n){return Ef(t,e,n)}async function hs(t,e){return await kf(t,e)}async function ds(t){const e=(t||256)/8,n=pf(e);return pc(hr(n))}async function ps(t,e){const n=pn(t.data),r=pn(t.iv),o=pn(t.hmac),i=dn(o,!1),u=rs(n,r),s=await hs(e,u),d=dn(s,!1);return Ot(i)===Ot(d)}async function Af(t,e,n){const r=mn(Xr(e)),o=n||await ds(128),i=mn(Xr(o)),u=dn(i,!1),s=JSON.stringify(t),d=oc(s),v=await Sf(i,r,d),w=dn(v,!1),B=rs(v,i),I=await hs(r,B),O=dn(I,!1);return{data:w,hmac:O,iv:u}}async function Tf(t,e){const n=mn(Xr(e));if(!n)throw new Error("Missing key: required for decryption");if(!await ps(t,n))return null;const o=pn(t.data),i=pn(t.iv),u=await Cf(i,n,o),s=rc(u);let d;try{d=JSON.parse(s)}catch{return null}return d}const If=Object.freeze(Object.defineProperty({__proto__:null,decrypt:Tf,encrypt:Af,generateKey:ds,verifyHmac:ps},Symbol.toStringTag,{value:"Module"}));class ho extends df{constructor(e,n){super({cryptoLib:If,connectorOpts:e,pushServerOpts:n})}}const Rf=ua(Ju);var Pn={},Bf=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},gs={},Nt={},Ff={}.toString,Ti=Array.isArray||function(t){return Ff.call(t)=="[object Array]"},Of=Ti;function Lf(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42}catch{return!1}}_e.TYPED_ARRAY_SUPPORT=Lf();var po=_e.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function _e(t,e,n){return!_e.TYPED_ARRAY_SUPPORT&&!(this instanceof _e)?new _e(t,e,n):typeof t=="number"?ms(this,t):Hf(this,t,e,n)}_e.TYPED_ARRAY_SUPPORT&&(_e.prototype.__proto__=Uint8Array.prototype,_e.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&_e[Symbol.species]===_e&&Object.defineProperty(_e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function Ii(t){if(t>=po)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+po.toString(16)+" bytes");return t|0}function Nf(t){return t!==t}function _n(t,e){var n;return _e.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e),n.__proto__=_e.prototype):(n=t,n===null&&(n=new _e(e)),n.length=e),n}function ms(t,e){var n=_n(t,e<0?0:Ii(e)|0);if(!_e.TYPED_ARRAY_SUPPORT)for(var r=0;r55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(u+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function vs(t){if(_e.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;return e===0?0:_s(t).length}function Uf(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function qf(t,e,n,r){return Uf(_s(e,t.length-n),t,n,r)}function Hf(t,e,n,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Pf(t,e,n,r):typeof e=="string"?$f(t,e):Df(t,e)}_e.prototype.write=function(e,n,r){n===void 0?(r=this.length,n=0):r===void 0&&typeof n=="string"?(r=this.length,n=0):isFinite(n)&&(n=n|0,isFinite(r)?r=r|0:r=void 0);var o=this.length-n;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return qf(this,e,n,r)};_e.prototype.slice=function(e,n){var r=this.length;e=~~e,n=n===void 0?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n=e.length&&(n=e.length),n||(n=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n=0;--u)e[u+n]=this[u+r];else if(i<1e3||!_e.TYPED_ARRAY_SUPPORT)for(u=0;u>>0,r=r===void 0?this.length:r>>>0,e||(e=0);var i;if(typeof e=="number")for(i=n;i40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Ze.getSymbolTotalCodewords=function(e){return Wf[e]};Ze.getBCHDigit=function(t){for(var e=0;t!==0;)e++,t>>>=1;return e};Ze.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Ri=e};Ze.isKanjiModeEnabled=function(){return typeof Ri<"u"};Ze.toSJIS=function(e){return Ri(e)};var dr={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");var r=n.toLowerCase();switch(r){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,o){if(t.isValid(r))return r;try{return e(r)}catch{return o}}})(dr);function ys(){this.buffer=[],this.length=0}ys.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(var n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var zf=ys,go=Nt;function Dn(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=go.alloc(t*t),this.reservedBit=go.alloc(t*t)}Dn.prototype.set=function(t,e,n,r){var o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)};Dn.prototype.get=function(t,e){return this.data[t*this.size+e]};Dn.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Dn.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var jf=Dn,ws={};(function(t){var e=Ze.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];for(var o=Math.floor(r/7)+2,i=e(r),u=i===145?26:Math.ceil((i-13)/(2*o-2))*2,s=[i-7],d=1;d=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){for(var i=o.size,u=0,s=0,d=0,v=null,w=null,B=0;B=5&&(u+=e.N1+(s-5)),v=O,s=1),O=o.get(I,B),O===w?d++:(d>=5&&(u+=e.N1+(d-5)),w=O,d=1)}s>=5&&(u+=e.N1+(s-5)),d>=5&&(u+=e.N1+(d-5))}return u},t.getPenaltyN2=function(o){for(var i=o.size,u=0,s=0;s=10&&(s===1488||s===93)&&u++,d=d<<1&2047|o.get(w,v),w>=10&&(d===1488||d===93)&&u++}return u*e.N3},t.getPenaltyN4=function(o){for(var i=0,u=o.data.length,s=0;s=0;){for(var s=u[0],d=0;d0){var u=_o.alloc(this.degree);return o.copy(u,i),u}return o};var Kf=Bi,Ss={},$t={},Fi={};Fi.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var pt={},Cs="[0-9]+",Gf="[A-Z $%*+\\-./:]+",On="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";On=On.replace(/u/g,"\\u");var Yf="(?:(?![A-Z0-9 $%*+\\-./:]|"+On+`)(?:.|[\r +]))+`;pt.KANJI=new RegExp(On,"g");pt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");pt.BYTE=new RegExp(Yf,"g");pt.NUMERIC=new RegExp(Cs,"g");pt.ALPHANUMERIC=new RegExp(Gf,"g");var Qf=new RegExp("^"+On+"$"),Zf=new RegExp("^"+Cs+"$"),Xf=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");pt.testKanji=function(e){return Qf.test(e)};pt.testNumeric=function(e){return Zf.test(e)};pt.testAlphanumeric=function(e){return Xf.test(e)};(function(t){var e=Fi,n=pt;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,u){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?i.ccBits[0]:u<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return n.testNumeric(i)?t.NUMERIC:n.testAlphanumeric(i)?t.ALPHANUMERIC:n.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");var i=o.toLowerCase();switch(i){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+o)}}t.from=function(i,u){if(t.isValid(i))return i;try{return r(i)}catch{return u}}})($t);(function(t){var e=Ze,n=pr,r=dr,o=$t,i=Fi,u=Ti,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,d=e.getBCHDigit(s);function v(O,F,P){for(var S=1;S<=40;S++)if(F<=t.getCapacity(S,P,O))return S}function w(O,F){return o.getCharCountIndicator(O,F)+4}function B(O,F){var P=0;return O.forEach(function(S){var R=w(S.mode,F);P+=R+S.getBitsLength()}),P}function I(O,F){for(var P=1;P<=40;P++){var S=B(O,P);if(S<=t.getCapacity(P,F,o.MIXED))return P}}t.from=function(F,P){return i.isValid(F)?parseInt(F,10):P},t.getCapacity=function(F,P,S){if(!i.isValid(F))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=o.BYTE);var R=e.getSymbolTotalCodewords(F),x=n.getTotalCodewordsCount(F,P),E=(R-x)*8;if(S===o.MIXED)return E;var T=E-w(S,F);switch(S){case o.NUMERIC:return Math.floor(T/10*3);case o.ALPHANUMERIC:return Math.floor(T/11*2);case o.KANJI:return Math.floor(T/13);case o.BYTE:default:return Math.floor(T/8)}},t.getBestVersionForData=function(F,P){var S,R=r.from(P,r.M);if(u(F)){if(F.length>1)return I(F,R);if(F.length===0)return 1;S=F[0]}else S=F;return v(S.mode,S.getLength(),R)},t.getEncodedBits=function(F){if(!i.isValid(F)||F<7)throw new Error("Invalid QR Code version");for(var P=F<<12;e.getBCHDigit(P)-d>=0;)P^=s<=0;)o^=Ts<0&&(r=this.data.substr(n),o=parseInt(r,10),e.put(o,i*3+1))};var nh=vn,rh=$t,$r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function yn(t){this.mode=rh.ALPHANUMERIC,this.data=t}yn.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};yn.prototype.getLength=function(){return this.data.length};yn.prototype.getBitsLength=function(){return yn.getBitsLength(this.data.length)};yn.prototype.write=function(e){var n;for(n=0;n+2<=this.data.length;n+=2){var r=$r.indexOf(this.data[n])*45;r+=$r.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put($r.indexOf(this.data[n]),6)};var ih=yn,oh=Nt,ah=$t;function wn(t){this.mode=ah.BYTE,this.data=oh.from(t)}wn.getBitsLength=function(e){return e*8};wn.prototype.getLength=function(){return this.data.length};wn.prototype.getBitsLength=function(){return wn.getBitsLength(this.data.length)};wn.prototype.write=function(t){for(var e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` +Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var ch=bn,ai={},fh={get exports(){return ai},set exports(t){ai=t}};(function(t){var e={single_source_shortest_paths:function(n,r,o){var i={},u={};u[r]=0;var s=e.PriorityQueue.make();s.push(r,0);for(var d,v,w,B,I,O,F,P,S;!s.empty();){d=s.pop(),v=d.value,B=d.cost,I=n[v]||{};for(w in I)I.hasOwnProperty(w)&&(O=I[w],F=B+O,P=u[w],S=typeof u[w]>"u",(S||P>F)&&(u[w]=F,s.push(w,F),i[w]=v))}if(typeof o<"u"&&typeof u[o]>"u"){var R=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(R)}return i},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],i=r;i;)o.push(i),n[i],i=n[i];return o.reverse(),o},find_path:function(n,r,o){var i=e.single_source_shortest_paths(n,r,o);return e.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,o={},i;n=n||{};for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(fh);(function(t){var e=$t,n=nh,r=ih,o=sh,i=ch,u=pt,s=Ze,d=ai;function v(R){return unescape(encodeURIComponent(R)).length}function w(R,x,E){for(var T=[],$;($=R.exec(E))!==null;)T.push({data:$[0],index:$.index,mode:x,length:$[0].length});return T}function B(R){var x=w(u.NUMERIC,e.NUMERIC,R),E=w(u.ALPHANUMERIC,e.ALPHANUMERIC,R),T,$;s.isKanjiModeEnabled()?(T=w(u.BYTE,e.BYTE,R),$=w(u.KANJI,e.KANJI,R)):(T=w(u.BYTE_KANJI,e.BYTE,R),$=[]);var D=x.concat(E,T,$);return D.sort(function(V,H){return V.index-H.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function I(R,x){switch(x){case e.NUMERIC:return n.getBitsLength(R);case e.ALPHANUMERIC:return r.getBitsLength(R);case e.KANJI:return i.getBitsLength(R);case e.BYTE:return o.getBitsLength(R)}}function O(R){return R.reduce(function(x,E){var T=x.length-1>=0?x[x.length-1]:null;return T&&T.mode===E.mode?(x[x.length-1].data+=E.data,x):(x.push(E),x)},[])}function F(R){for(var x=[],E=0;E=0&&s<=6&&(d===0||d===6)||d>=0&&d<=6&&(s===0||s===6)||s>=2&&s<=4&&d>=2&&d<=4?t.set(i+s,u+d,!0,!0):t.set(i+s,u+d,!1,!0))}function bh(t){for(var e=t.size,n=8;n>s&1)===1,t.set(o,i,u,!0),t.set(i,o,u,!0)}function Ur(t,e,n){var r=t.size,o=_h.getEncodedBits(e,n),i,u;for(i=0;i<15;i++)u=(o>>i&1)===1,i<6?t.set(i,8,u,!0):i<8?t.set(i+1,8,u,!0):t.set(r-15+i,8,u,!0),i<8?t.set(8,r-i-1,u,!0):i<9?t.set(8,15-i-1+1,u,!0):t.set(8,15-i-1,u,!0);t.set(r-8,8,1,!0)}function Eh(t,e){for(var n=t.size,r=-1,o=n-1,i=7,u=0,s=n-1;s>0;s-=2)for(s===6&&s--;;){for(var d=0;d<2;d++)if(!t.isReserved(o,s-d)){var v=!1;u>>i&1)===1),t.set(o,s-d,v),i--,i===-1&&(u++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}function kh(t,e,n){var r=new hh;n.forEach(function(v){r.put(v.mode.bit,4),r.put(v.getLength(),vh.getCharCountIndicator(v.mode,t)),v.write(r)});var o=mr.getSymbolTotalCodewords(t),i=li.getTotalCodewordsCount(t,e),u=(o-i)*8;for(r.getLengthInBits()+4<=u&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var s=(u-r.getLengthInBits())/8,d=0;d=7&&Mh(w,e),Eh(w,d),isNaN(r)&&(r=si.getBestMask(w,Ur.bind(null,w,n))),si.applyMask(r,w),Ur(w,n,r),{modules:w,version:e,errorCorrectionLevel:n,maskPattern:r,segments:o}}gs.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");var r=Pr.M,o,i;return typeof n<"u"&&(r=Pr.from(n.errorCorrectionLevel,Pr.M),o=er.from(n.version),i=si.from(n.maskPattern),n.toSJISFunc&&mr.setToSJISFunction(n.toSJISFunc)),Ch(e,o,r,i)};var Rs={},Oi={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");var r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");var o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});var o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,u=r.scale||4;return{width:i,scale:i?4:u,margin:o,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},t.getImageWidth=function(r,o){var i=t.getScale(r,o);return Math.floor((r+o.margin*2)*i)},t.qrToImageData=function(r,o,i){for(var u=o.modules.size,s=o.modules.data,d=t.getScale(u,i),v=Math.floor((u+i.margin*2)*d),w=i.margin*d,B=[i.color.light,i.color.dark],I=0;I=w&&O>=w&&I"u"&&(!u||!u.getContext)&&(d=u,u=void 0),u||(v=r()),d=e.getOptions(d);var w=e.getImageWidth(i.modules.size,d),B=v.getContext("2d"),I=B.createImageData(w,w);return e.qrToImageData(I.data,i,d),n(B,v,w),B.putImageData(I,0,0),v},t.renderToDataURL=function(i,u,s){var d=s;typeof d>"u"&&(!u||!u.getContext)&&(d=u,u=void 0),d||(d={});var v=t.render(i,u,d),w=d.type||"image/png",B=d.rendererOpts||{};return v.toDataURL(w,B.quality)}})(Rs);var Bs={},Ah=Oi;function wo(t,e){var n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function qr(t,e,n){var r=t+e;return typeof n<"u"&&(r+=" "+n),r}function Th(t,e,n){for(var r="",o=0,i=!1,u=0,s=0;s0&&d>0&&t[s-1]||(r+=i?qr("M",d+n,.5+v+n):qr("m",o,0),o=0,i=!1),d+1':"",v="',w='viewBox="0 0 '+s+" "+s+'"',B=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",I=''+d+v+` +`;return typeof r=="function"&&r(null,I),I};var Ih=Bf,ui=gs,Fs=Rs,Rh=Bs;function Li(t,e,n,r,o){var i=[].slice.call(arguments,1),u=i.length,s=typeof i[u-1]=="function";if(!s&&!Ih())throw new Error("Callback required as last argument");if(s){if(u<2)throw new Error("Too few arguments provided");u===2?(o=n,n=e,e=r=void 0):u===3&&(e.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=n,n=e,e=void 0))}else{if(u<1)throw new Error("Too few arguments provided");return u===1?(n=e,e=r=void 0):u===2&&!e.getContext&&(r=n,n=e,e=void 0),new Promise(function(v,w){try{var B=ui.create(n,r);v(t(B,e,r))}catch(I){w(I)}})}try{var d=ui.create(n,r);o(null,t(d,e,r))}catch(v){o(v)}}Pn.create=ui.create;Pn.toCanvas=Li.bind(null,Fs.render);Pn.toDataURL=Li.bind(null,Fs.renderToDataURL);Pn.toString=Li.bind(null,function(t,e,n){return Rh.render(t,n)});var Bh=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var B=bo[e.format]||bo.default;window.clipboardData.setData(B,t)}else w.clipboardData.clearData(),w.clipboardData.setData(e.format,t);e.onCopy&&(w.preventDefault(),e.onCopy(w.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),u.addRange(i);var v=document.execCommand("copy");if(!v)throw new Error("copy command was unsuccessful");d=!0}catch(w){n&&console.error("unable to copy using execCommand: ",w),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),d=!0}catch(B){n&&console.error("unable to copy using clipboardData: ",B),n&&console.error("falling back to prompt"),r=Lh("message"in e?e.message:Oh),window.prompt(r,t)}}finally{u&&(typeof u.removeRange=="function"?u.removeRange(i):u.removeAllRanges()),s&&document.body.removeChild(s),o()}return d}var $h=Nh,ce,Rn,Ni,Os,xo,$i,Ls,wt={},_r=[],Ph=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function yt(t,e){for(var n in e)t[n]=e[n];return t}function Ns(t){var e=t.parentNode;e&&e.removeChild(t)}function xt(t,e,n){var r,o=arguments,i={};for(r in e)r!=="key"&&r!=="ref"&&(i[r]=e[r]);if(arguments.length>3)for(n=[n],r=3;r2&&(e.children=_r.slice.call(arguments,2)),n={},e)r!=="key"&&r!=="ref"&&(n[r]=e[r]);return tr(t.type,n,e.key||t.key,e.ref||t.ref,null)}function Ws(t){var e={},n={__c:"__cC"+Ls++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i=this;return this.getChildContext||(o=[],this.getChildContext=function(){return e[n.__c]=i,e},this.shouldComponentUpdate=function(u){i.props.value!==u.value&&o.some(function(s){s.context=u.value,Jn(s)})},this.sub=function(u){o.push(u);var s=u.componentWillUnmount;u.componentWillUnmount=function(){o.splice(o.indexOf(u),1),s&&s.call(u)}}),r.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}ce={__e:function(t,e){for(var n,r;e=e.__;)if((n=e.__c)&&!n.__)try{if(n.constructor&&n.constructor.getDerivedStateFromError!=null&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(t))),n.componentDidCatch!=null&&(r=!0,n.componentDidCatch(t)),r)return Jn(n.__E=n)}catch(o){t=o}throw t}},ot.prototype.setState=function(t,e){var n;n=this.__s!==this.state?this.__s:this.__s=yt({},this.state),typeof t=="function"&&(t=t(n,this.props)),t&&yt(n,t),t!=null&&this.__v&&(e&&this.__h.push(e),Jn(this))},ot.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Jn(this))},ot.prototype.render=Un,Rn=[],Ni=0,Os=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$i=wt,Ls=0;var nn,Qe,ko,xn=0,ci=[],So=ce.__r,Co=ce.diffed,Ao=ce.__c,To=ce.unmount;function Sn(t,e){ce.__h&&ce.__h(Qe,t,xn||e),xn=0;var n=Qe.__H||(Qe.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Di(t){return xn=1,Ui(Ys,t)}function Ui(t,e,n){var r=Sn(nn++,2);return r.__c||(r.__c=Qe,r.__=[n?n(e):Ys(void 0,e),function(o){var i=t(r.__[0],o);r.__[0]!==i&&(r.__[0]=i,r.__c.setState({}))}]),r.__}function zs(t,e){var n=Sn(nn++,3);!ce.__s&&Hi(n.__H,e)&&(n.__=t,n.__H=e,Qe.__H.__h.push(n))}function qi(t,e){var n=Sn(nn++,4);!ce.__s&&Hi(n.__H,e)&&(n.__=t,n.__H=e,Qe.__h.push(n))}function js(t){return xn=5,vr(function(){return{current:t}},[])}function Vs(t,e,n){xn=6,qi(function(){typeof t=="function"?t(e()):t&&(t.current=e())},n==null?n:n.concat(t))}function vr(t,e){var n=Sn(nn++,7);return Hi(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function Js(t,e){return xn=8,vr(function(){return t},e)}function Ks(t){var e=Qe.context[t.__c],n=Sn(nn++,9);return n.__c=t,e?(n.__==null&&(n.__=!0,e.sub(Qe)),e.props.value):t.__}function Gs(t,e){ce.useDebugValue&&ce.useDebugValue(e?e(t):t)}function zh(t){var e=Sn(nn++,10),n=Di();return e.__=t,Qe.componentDidCatch||(Qe.componentDidCatch=function(r){e.__&&e.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function jh(){ci.some(function(t){if(t.__P)try{t.__H.__h.forEach(fi),t.__H.__h.forEach(hi),t.__H.__h=[]}catch(e){return t.__H.__h=[],ce.__e(e,t.__v),!0}}),ci=[]}function fi(t){t.t&&t.t()}function hi(t){var e=t.__();typeof e=="function"&&(t.t=e)}function Hi(t,e){return!t||e.some(function(n,r){return n!==t[r]})}function Ys(t,e){return typeof e=="function"?e(t):e}ce.__r=function(t){So&&So(t),nn=0,(Qe=t.__c).__H&&(Qe.__H.__h.forEach(fi),Qe.__H.__h.forEach(hi),Qe.__H.__h=[])},ce.diffed=function(t){Co&&Co(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(ci.push(e)!==1&&ko===ce.requestAnimationFrame||((ko=ce.requestAnimationFrame)||function(r){var o,i=function(){clearTimeout(u),cancelAnimationFrame(o),setTimeout(r)},u=setTimeout(i,100);typeof window<"u"&&(o=requestAnimationFrame(i))})(jh))}},ce.__c=function(t,e){e.some(function(n){try{n.__h.forEach(fi),n.__h=n.__h.filter(function(r){return!r.__||hi(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],ce.__e(r,n.__v)}}),Ao&&Ao(t,e)},ce.unmount=function(t){To&&To(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach(function(r){return r.t&&r.t()})}catch(r){ce.__e(r,e.__v)}}};function Wi(t,e){for(var n in e)t[n]=e[n];return t}function di(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}var Qs=function(t){var e,n;function r(o){var i;return(i=t.call(this,o)||this).isPureReactComponent=!0,i}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.shouldComponentUpdate=function(o,i){return di(this.props,o)||di(this.state,i)},r}(ot);function Zs(t,e){function n(o){var i=this.props.ref,u=i==o.ref;return!u&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!u:di(this.props,o)}function r(o){return this.shouldComponentUpdate=n,xt(t,Wi({},o))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(t.displayName||t.name)+")",r.t=!0,r}var Io=ce.__b;function Xs(t){function e(n){var r=Wi({},n);return delete r.ref,t(r,n.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}ce.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),Io&&Io(t)};var Ro=function(t,e){return t?Bt(t).reduce(function(n,r,o){return n.concat(e(r,o))},[]):null},el={map:Ro,forEach:Ro,count:function(t){return t?Bt(t).length:0},only:function(t){if((t=Bt(t)).length!==1)throw new Error("Children.only() expects only one child.");return t[0]},toArray:Bt},Vh=ce.__e;function tl(t){return t&&((t=Wi({},t)).__c=null,t.__k=t.__k&&t.__k.map(tl)),t}function rr(){this.__u=0,this.o=null,this.__b=null}function nl(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function rl(t){var e,n,r;function o(i){if(e||(e=t()).then(function(u){n=u.default||u},function(u){r=u}),r)throw r;if(!n)throw e;return xt(n,i)}return o.displayName="Lazy",o.t=!0,o}function un(){this.i=null,this.l=null}ce.__e=function(t,e,n){if(t.then){for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(t,e.__c)}Vh(t,e,n)},(rr.prototype=new ot).__c=function(t,e){var n=this;n.o==null&&(n.o=[]),n.o.push(e);var r=nl(n.__v),o=!1,i=function(){o||(o=!0,r?r(u):u())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var u=function(){var s;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});s=n.o.pop();)s.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(i,i)},rr.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=tl(this.__b),this.__b=null),[xt(ot,null,e.u?null:t.children),e.u&&t.fallback]};var Bo=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]8?2.5:2.7)+"vw":"inherit";return ie.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},ie.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),ie.createElement("div",{style:{fontSize:u},className:"walletconnect-connect__button__text"},r))}var p0=5,Wr=12;function g0(t){var e=Ge.isAndroid(),n=ie.useState(""),r=n[0],o=n[1],i=ie.useState(""),u=i[0],s=i[1],d=ie.useState(1),v=d[0],w=d[1],B=u?t.links.filter(function(T){return T.name.toLowerCase().includes(u.toLowerCase())}):t.links,I=t.errorMessage,O=u||B.length>p0,F=Math.ceil(B.length/Wr),P=[(v-1)*Wr+1,v*Wr],S=B.length?B.filter(function(T,$){return $+1>=P[0]&&$+1<=P[1]}):[],R=!e&&F>1,x=void 0;function E(T){o(T.target.value),clearTimeout(x),T.target.value?x=setTimeout(function(){s(T.target.value),w(1)},1e3):(o(""),s(""),w(1))}return ie.createElement("div",null,ie.createElement("p",{id:gl,className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&ie.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:E}),ie.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":O&&B.length?"__wrap":"")},e?ie.createElement(c0,{name:t.text.connect,color:a0,href:t.uri,onClick:ie.useCallback(function(){Ge.saveMobileLinkInfo({name:"Unknown",href:t.uri})},[])}):S.length?S.map(function(T){var $=T.color,D=T.name,V=T.shortName,H=T.logo,Q=Ge.formatIOSMobile(t.uri,T),m=ie.useCallback(function(){Ge.saveMobileLinkInfo({name:D,href:Q})},[S]);return O?ie.createElement(d0,{color:$,href:Q,name:V||D,logo:H,onClick:m}):ie.createElement(h0,{color:$,href:Q,name:D,logo:H,onClick:m})}):ie.createElement(ie.Fragment,null,ie.createElement("p",null,I.length?t.errorMessage:t.links.length&&!B.length?t.text.no_wallets_found:t.text.loading))),R&&ie.createElement("div",{className:"walletconnect-modal__footer"},Array(F).fill(0).map(function(T,$){var D=$+1,V=v===D;return ie.createElement("a",{style:{margin:"auto 10px",fontWeight:V?"bold":"normal"},onClick:function(){return w(D)}},D)})))}function m0(t){var e=!!t.message.trim();return ie.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}var _0=function(t){try{var e="";return Promise.resolve(hl.toString(t,{margin:0,type:"svg"})).then(function(n){return typeof n=="string"&&(e=n.replace("0||ie.useEffect(function(){var c=function(){try{if(e)return Promise.resolve();u(!0);try{var p=n?"mobile":"desktop",_=Ge.getMobileLinkRegistry(Ge.formatMobileRegistry(ml,p),r);u(!1),v(!0),Q(_.length?"":t.text.no_supported_wallets),D(_);var y=_.length===1;y&&(S(Ge.formatIOSMobile(t.uri,_[0])),I(!0)),E(y)}catch(C){u(!1),v(!0),Q(t.text.something_went_wrong),console.error(C)}return Promise.resolve()}catch(C){return Promise.reject(C)}};c()})};m();var a=n?B:!B;return ie.createElement("div",{id:pl,className:"walletconnect-qrcode__base animated fadeIn"},ie.createElement("div",{className:"walletconnect-modal__base"},ie.createElement(u0,{onClose:t.onClose}),x&&B?ie.createElement("div",{className:"walletconnect-modal__single_wallet"},ie.createElement("a",{onClick:function(){return Ge.saveMobileLinkInfo({name:$[0].name,href:P})},href:P,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(x?$[0].name:"")+" ›")):e||i||!i&&$.length?ie.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(a?" right__selected":"")},ie.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?ie.createElement(ie.Fragment,null,ie.createElement("a",{onClick:function(){return I(!1),m()}},t.text.mobile),ie.createElement("a",{onClick:function(){return I(!0)}},t.text.qrcode)):ie.createElement(ie.Fragment,null,ie.createElement("a",{onClick:function(){return I(!0)}},t.text.qrcode),ie.createElement("a",{onClick:function(){return I(!1),m()}},t.text.desktop))):null,ie.createElement("div",null,B||!e&&!i&&!$.length?ie.createElement(v0,Object.assign({},O)):ie.createElement(g0,Object.assign({},O,{links:$,errorMessage:H})))))}var w0={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},b0={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},x0={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},M0={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},E0={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},k0={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},S0={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},C0={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},Do={de:w0,en:b0,es:x0,fr:M0,ko:E0,pt:k0,zh:S0,fa:C0};function A0(){var t=Ge.getDocumentOrThrow(),e=t.getElementById($o);e&&t.head.removeChild(e);var n=t.createElement("style");n.setAttribute("id",$o),n.innerText=n0,t.head.appendChild(n)}function T0(){var t=Ge.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id",dl),t.body.appendChild(e),e}function _l(){var t=Ge.getDocumentOrThrow(),e=t.getElementById(pl);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout(function(){var n=t.getElementById(dl);n&&t.body.removeChild(n)},o0))}function I0(t){return function(){_l(),t&&t()}}function R0(){var t=Ge.getNavigatorOrThrow().language.split("-")[0]||"en";return Do[t]||Do.en}function B0(t,e,n){A0();var r=T0();ie.render(ie.createElement(y0,{text:R0(),uri:t,onClose:I0(e),qrcodeModalOptions:n}),r)}function F0(){_l()}var Uo="algorand";function O0(t,e){if(e==null||e){var n=new URL(t);if(!n.searchParams.has(Uo))return n.searchParams.set(Uo,"true"),n.toString()}return t}function L0(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)===-1&&(n[r]=t[r]);return n}var vl=function(){return typeof Ke<"u"&&typeof Ke.versions<"u"&&typeof Ke.versions.node<"u"};function N0(t,e,n){var r=n||{},o=r.addAlgorandMarkerToUri,i=L0(r,["addAlgorandMarkerToUri"]),u=i;t=O0(t,o),console.log(t),vl()?t0(t):B0(t,e,u)}function $0(){vl()||F0()}var P0={open:N0,close:$0},qo=P0;const an=[];function D0(t,e=ze){let n;const r=new Set;function o(s){if(nt(t,s)&&(t=s,n)){const d=!an.length;for(const v of r)v[1](),an.push(v,t);if(d){for(let v=0;v{r.delete(v),r.size===0&&n&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}const zr={ready:async()=>{try{return(await fetch("http://localhost:9090/ready")).status===200}catch{return!1}},list:async()=>{try{return await(await fetch("http://localhost:9090/list")).json()}catch{return[]}},register:async(t,e)=>{try{return(await fetch("http://localhost:9090/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,recovery_key:e})})).status===200}catch{return!1}},update:async(t,e,n,r)=>{try{return(await fetch("http://localhost:9090/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,did:e,passphrase:r,addresses:n})})).status===200}catch{return!1}}},{subscribe:U0,update:jr}=D0({identifiers:[],wallet:{url:"",name:"",icons:[],addresses:[],connected:!1,description:""}}),ft={subscribe:U0,reload:async function(){const t=await zr.list();t.sort((e,n)=>Date.parse(n.last_sync)-Date.parse(e.last_sync)),jr(e=>(e.identifiers=t,e))},setWallet:t=>{jr(e=>(e.wallet=t,e))},removeWallet:()=>{jr(t=>(t.wallet={connected:!1,addresses:[],name:"",description:"",url:"",icons:[]},t))},createDID:async function(t,e){const n=await zr.register(t,e);return n&&this.reload(),n},updateDID:async function(t,e,n,r){const o=await zr.update(t,e,n,r);return o&&this.reload(),o}},yl=Symbol("app-context-key"),q0=function(t){Kl(yl,t)},yr=function(){return Gl(yl)};function H0(t){let e,n,r=t[0].wallet.name+"",o,i,u,s=t[0].wallet.icons.length>=1&&Ho(t);return{c(){e=Y("button"),s&&s.c(),n=Ve(` + Disconnect: `),o=Ve(r),j(e,"type","button"),j(e,"class","inline-flex items-center gap-x-2 rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white hover:bg-red-500")},m(d,v){ge(d,e,v),s&&s.m(e,null),q(e,n),q(e,o),i||(u=Je(e,"click",t[2]),i=!0)},p(d,v){d[0].wallet.icons.length>=1?s?s.p(d,v):(s=Ho(d),s.c(),s.m(e,n)):s&&(s.d(1),s=null),v&1&&r!==(r=d[0].wallet.name+"")&&Ye(o,r)},d(d){d&&pe(e),s&&s.d(),i=!1,u()}}}function W0(t){let e,n,r;return{c(){e=Y("button"),e.innerHTML=` + Connect Wallet`,j(e,"type","button"),j(e,"class","inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white hover:bg-indigo-500")},m(o,i){ge(o,e,i),n||(r=Je(e,"click",t[1]),n=!0)},p:ze,d(o){o&&pe(e),n=!1,r()}}}function Ho(t){let e,n;return{c(){e=Y("img"),j(e,"class","h-6 w-6"),j(e,"alt","Wallet icon"),Kr(e.src,n=t[0].wallet.icons[0])||j(e,"src",n)},m(r,o){ge(r,e,o)},p(r,o){o&1&&!Kr(e.src,n=r[0].wallet.icons[0])&&j(e,"src",n)},d(r){r&&pe(e)}}}function z0(t){let e;function n(i,u){return i[0].wallet.connected?H0:W0}let r=n(t),o=r(t);return{c(){e=Y("span"),o.c(),j(e,"class","absolute right-0 isolate inline-flex rounded-md shadow-sm")},m(i,u){ge(i,e,u),o.m(e,null)},p(i,[u]){r===(r=n(i))&&o?o.p(i,u):(o.d(1),o=r(i),o&&(o.c(),o.m(e,null)))},i:ze,o:ze,d(i){i&&pe(e),o.d()}}}function j0(t,e,n){let r;_i(t,ft,I=>n(0,r=I));let{mainnet:o=!1}=e;const i=sr(),u=yr();let s;wi(()=>{if(s=new ho({bridge:"https://bridge.walletconnect.org",qrcodeModal:qo,clientMeta:{name:"AlgoID Connect (beta)",description:"AlgoID wallet connector",url:"http://github.com/algorandfoundation/did-algo",icons:["https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_128x128.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_192x192.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_512x512.png"]}}),!s.connected)return;let I=s.peerMeta;I.connected=!0,ft.setWallet(I),u.showAlert("success",`Connected to: ${I.name}`),i("ready"),w()});async function d(){s.connected||(B(),await s.createSession({chainId:o?416001:416002})),w()}function v(){s&&s.connected&&s.killSession()}function w(){s.on("connect",(I,O)=>{if(I)throw u.showAlert("error",`Error connecting to wallet: ${I.message}`),I;let F=O.params[0],P=F.peerMeta;P.connected=!0,P.addresses=F.accounts,ft.setWallet(P),u.showAlert("success",`Connected to: ${P.name}`),i("ready")}),s.on("disconnect",I=>{if(I)throw u.showAlert("error",`Error disconnecting wallet: ${I.message}`),I;ft.removeWallet(),u.showAlert("warning","Disconnected from wallet"),i("session_end")}),s.on("session_update",(I,O)=>{if(I)throw u.showAlert("error",`Wallet Connect session error: ${I.message}`),I;let F=O.params[0],P=F.peerMeta;P.connected=!0,P.addresses=F.accounts,ft.setWallet(P),i("session_update")})}function B(){s.off("connect"),s.off("disconnect"),s.off("session_update"),s=null,s=new ho({bridge:"https://bridge.walletconnect.org",qrcodeModal:qo,clientMeta:{name:"AlgoID Connect (beta)",description:"AlgoID wallet connector",url:"http://github.com/algorandfoundation/did-algo",icons:["https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_128x128.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_192x192.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_512x512.png"]}})}return t.$$set=I=>{"mainnet"in I&&n(3,o=I.mainnet)},[r,d,v,o]}class V0 extends st{constructor(e){super(),at(this,e,j0,z0,nt,{mainnet:3})}}function J0(t){let e;return{c(){e=Y("span"),e.textContent="Deactivated",j(e,"class","inline-flex rounded-full bg-red-100 px-2 text-xs font-semibold leading-5 text-red-800")},m(n,r){ge(n,e,r)},d(n){n&&pe(e)}}}function K0(t){let e;return{c(){e=Y("span"),e.textContent="Active",j(e,"class","inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800")},m(n,r){ge(n,e,r)},d(n){n&&pe(e)}}}function G0(t){let e,n,r=t[0].name+"",o,i,u,s=Wo(t[0].did)+"",d,v,w,B=t[0].addresses.length+"",I,O,F,P=zo(t[0].last_sync)+"",S,R,x,E,T,$,D,V;function H(a,c){return a[0].active?K0:J0}let Q=H(t),m=Q(t);return{c(){e=Y("tr"),n=Y("td"),o=Ve(r),i=fe(),u=Y("td"),d=Ve(s),v=fe(),w=Y("td"),I=Ve(B),O=fe(),F=Y("td"),S=Ve(P),R=fe(),x=Y("td"),m.c(),E=fe(),T=Y("td"),$=Y("button"),$.innerHTML='',j(n,"class","whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-3"),j(u,"class","whitespace-nowrap break-all px-3 py-4 text-sm text-gray-500"),j(w,"class","hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell"),j(F,"class","hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell"),j(x,"class","whitespace-nowrap px-3 py-4 text-sm text-gray-500"),j($,"type","button"),j($,"class","inline-flex items-center px-2.5 py-1.5 text-sm font-semibold text-gray-900 hover:text-indigo-600 disabled:cursor-not-allowed disabled:opacity-30"),j(e,"class","cursor-pointer odd:bg-white even:bg-slate-50 hover:bg-slate-100")},m(a,c){ge(a,e,c),q(e,n),q(n,o),q(e,i),q(e,u),q(u,d),q(e,v),q(e,w),q(w,I),q(e,O),q(e,F),q(F,S),q(e,R),q(e,x),m.m(x,null),q(e,E),q(e,T),q(T,$),D||(V=[Je($,"click",Gi(gn(t[2]))),Je(e,"click",Gi(gn(t[3])))],D=!0)},p(a,[c]){c&1&&r!==(r=a[0].name+"")&&Ye(o,r),c&1&&s!==(s=Wo(a[0].did)+"")&&Ye(d,s),c&1&&B!==(B=a[0].addresses.length+"")&&Ye(I,B),c&1&&P!==(P=zo(a[0].last_sync)+"")&&Ye(S,P),Q!==(Q=H(a))&&(m.d(1),m=Q(a),m&&(m.c(),m.m(x,null)))},i:ze,o:ze,d(a){a&&pe(e),m.d(),D=!1,dt(V)}}}function Wo(t){return t.slice(0,18)+"..."+t.slice(-18)}function zo(t){let e=new Date;return e.setTime(Date.parse(t)),e.toLocaleDateString(navigator.language,{day:"numeric",year:"numeric",hour:"numeric",month:"short",minute:"numeric",hour12:!0})}function Y0(t,e,n){let{identifier:r}=e;const o=sr(),i=()=>{o("link_wallet",{did:r})},u=()=>{o("show_details",{did:r})};return t.$$set=s=>{"identifier"in s&&n(0,r=s.identifier)},[r,o,i,u]}class Q0 extends st{constructor(e){super(),at(this,e,Y0,G0,nt,{identifier:0})}}typeof window<"u"&&(window.Prism&&console.warn("Prism has already been initiated. Please ensure that svelte-prism is imported first."),window.Prism=window.Prism||{},window.Prism.manual=!0);var gi={},Z0={get exports(){return gi},set exports(t){gi=t}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,u={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function x(E){return E instanceof d?new d(E.type,x(E.content),E.alias):Array.isArray(E)?E.map(x):E.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch($){var x=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec($.stack)||[])[1];if(x){var E=document.getElementsByTagName("script");for(var T in E)if(E[T].src==x)return E[T]}return null}},isActive:function(x,E,T){for(var $="no-"+E;x;){var D=x.classList;if(D.contains(E))return!0;if(D.contains($))return!1;x=x.parentElement}return!!T}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(x,E){var T=s.util.clone(s.languages[x]);for(var $ in E)T[$]=E[$];return T},insertBefore:function(x,E,T,$){$=$||s.languages;var D=$[x],V={};for(var H in D)if(D.hasOwnProperty(H)){if(H==E)for(var Q in T)T.hasOwnProperty(Q)&&(V[Q]=T[Q]);T.hasOwnProperty(H)||(V[H]=D[H])}var m=$[x];return $[x]=V,s.languages.DFS(s.languages,function(a,c){c===m&&a!=x&&(this[a]=V)}),V},DFS:function x(E,T,$,D){D=D||{};var V=s.util.objId;for(var H in E)if(E.hasOwnProperty(H)){T.call(E,H,E[H],$||H);var Q=E[H],m=s.util.type(Q);m==="Object"&&!D[V(Q)]?(D[V(Q)]=!0,x(Q,T,null,D)):m==="Array"&&!D[V(Q)]&&(D[V(Q)]=!0,x(Q,T,H,D))}}},plugins:{},highlightAll:function(x,E){s.highlightAllUnder(document,x,E)},highlightAllUnder:function(x,E,T){var $={callback:T,container:x,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",$),$.elements=Array.prototype.slice.apply($.container.querySelectorAll($.selector)),s.hooks.run("before-all-elements-highlight",$);for(var D=0,V;V=$.elements[D++];)s.highlightElement(V,E===!0,$.callback)},highlightElement:function(x,E,T){var $=s.util.getLanguage(x),D=s.languages[$];s.util.setLanguage(x,$);var V=x.parentElement;V&&V.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(V,$);var H=x.textContent,Q={element:x,language:$,grammar:D,code:H};function m(c){Q.highlightedCode=c,s.hooks.run("before-insert",Q),Q.element.innerHTML=Q.highlightedCode,s.hooks.run("after-highlight",Q),s.hooks.run("complete",Q),T&&T.call(Q.element)}if(s.hooks.run("before-sanity-check",Q),V=Q.element.parentElement,V&&V.nodeName.toLowerCase()==="pre"&&!V.hasAttribute("tabindex")&&V.setAttribute("tabindex","0"),!Q.code){s.hooks.run("complete",Q),T&&T.call(Q.element);return}if(s.hooks.run("before-highlight",Q),!Q.grammar){m(s.util.encode(Q.code));return}if(E&&r.Worker){var a=new Worker(s.filename);a.onmessage=function(c){m(c.data)},a.postMessage(JSON.stringify({language:Q.language,code:Q.code,immediateClose:!0}))}else m(s.highlight(Q.code,Q.grammar,Q.language))},highlight:function(x,E,T){var $={code:x,grammar:E,language:T};if(s.hooks.run("before-tokenize",$),!$.grammar)throw new Error('The language "'+$.language+'" has no grammar.');return $.tokens=s.tokenize($.code,$.grammar),s.hooks.run("after-tokenize",$),d.stringify(s.util.encode($.tokens),$.language)},tokenize:function(x,E){var T=E.rest;if(T){for(var $ in T)E[$]=T[$];delete E.rest}var D=new B;return I(D,D.head,x),w(x,D,E,D.head,0),F(D)},hooks:{all:{},add:function(x,E){var T=s.hooks.all;T[x]=T[x]||[],T[x].push(E)},run:function(x,E){var T=s.hooks.all[x];if(!(!T||!T.length))for(var $=0,D;D=T[$++];)D(E)}},Token:d};r.Prism=s;function d(x,E,T,$){this.type=x,this.content=E,this.alias=T,this.length=($||"").length|0}d.stringify=function x(E,T){if(typeof E=="string")return E;if(Array.isArray(E)){var $="";return E.forEach(function(m){$+=x(m,T)}),$}var D={type:E.type,content:x(E.content,T),tag:"span",classes:["token",E.type],attributes:{},language:T},V=E.alias;V&&(Array.isArray(V)?Array.prototype.push.apply(D.classes,V):D.classes.push(V)),s.hooks.run("wrap",D);var H="";for(var Q in D.attributes)H+=" "+Q+'="'+(D.attributes[Q]||"").replace(/"/g,""")+'"';return"<"+D.tag+' class="'+D.classes.join(" ")+'"'+H+">"+D.content+""};function v(x,E,T,$){x.lastIndex=E;var D=x.exec(T);if(D&&$&&D[1]){var V=D[1].length;D.index+=V,D[0]=D[0].slice(V)}return D}function w(x,E,T,$,D,V){for(var H in T)if(!(!T.hasOwnProperty(H)||!T[H])){var Q=T[H];Q=Array.isArray(Q)?Q:[Q];for(var m=0;m=V.reach);l+=b.value.length,b=b.next){var k=b.value;if(E.length>x.length)return;if(!(k instanceof d)){var G=1,W;if(_){if(W=v(L,l,x,p),!W||W.index>=x.length)break;var U=W.index,te=W.index+W[0].length,re=l;for(re+=b.value.length;U>=re;)b=b.next,re+=b.value.length;if(re-=b.value.length,l=re,b.value instanceof d)continue;for(var g=b;g!==E.tail&&(reV.reach&&(V.reach=ae);var ne=b.prev;J&&(ne=I(E,ne,J),l+=J.length),O(E,ne,G);var ee=new d(H,c?s.tokenize(K,c):K,y,K);if(b=I(E,ne,ee),X&&I(E,b,X),G>1){var me={cause:H+","+m,reach:ae};w(x,E,T,b.prev,l,me),V&&me.reach>V.reach&&(V.reach=me.reach)}}}}}}function B(){var x={value:null,prev:null,next:null},E={value:null,prev:x,next:null};x.next=E,this.head=x,this.tail=E,this.length=0}function I(x,E,T){var $=E.next,D={value:T,prev:E,next:$};return E.next=D,$.prev=D,x.length++,D}function O(x,E,T){for(var $=E.next,D=0;D/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,i){var u={};u["language-"+i]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[i]},u.cdata=/^$/i;var s={"included-cdata":{pattern://i,inside:u}};s["language-"+i]={pattern:/[\s\S]+/,inside:n.languages[i]};var d={};d[o]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",d)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(P,S){return"✖ Error "+P+" while fetching file: "+S},i="✖ Error: File does not exist or is empty",u={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",d="loading",v="loaded",w="failed",B="pre[data-src]:not(["+s+'="'+v+'"]):not(['+s+'="'+d+'"])';function I(P,S,R){var x=new XMLHttpRequest;x.open("GET",P,!0),x.onreadystatechange=function(){x.readyState==4&&(x.status<400&&x.responseText?S(x.responseText):x.status>=400?R(o(x.status,x.statusText)):R(i))},x.send(null)}function O(P){var S=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(P||"");if(S){var R=Number(S[1]),x=S[2],E=S[3];return x?E?[R,Number(E)]:[R,void 0]:[R,R]}}n.hooks.add("before-highlightall",function(P){P.selector+=", "+B}),n.hooks.add("before-sanity-check",function(P){var S=P.element;if(S.matches(B)){P.code="",S.setAttribute(s,d);var R=S.appendChild(document.createElement("CODE"));R.textContent=r;var x=S.getAttribute("data-src"),E=P.language;if(E==="none"){var T=(/\.(\w+)$/.exec(x)||[,"none"])[1];E=u[T]||T}n.util.setLanguage(R,E),n.util.setLanguage(S,E);var $=n.plugins.autoloader;$&&$.loadLanguages(E),I(x,function(D){S.setAttribute(s,v);var V=O(S.getAttribute("data-range"));if(V){var H=D.split(/\r\n?|\n/g),Q=V[0],m=V[1]==null?H.length:V[1];Q<0&&(Q+=H.length),Q=Math.max(0,Math.min(Q-1,H.length)),m<0&&(m+=H.length),m=Math.max(0,Math.min(m,H.length)),D=H.slice(Q,m).join(` +`),S.hasAttribute("data-start")||S.setAttribute("data-start",String(Q+1))}R.textContent=D,n.highlightElement(R)},function(D){S.setAttribute(s,w),R.textContent=D})}}),n.plugins.fileHighlight={highlight:function(S){for(var R=(S||document).querySelectorAll(B),x=0,E;E=R[x++];)n.highlightElement(E)}};var F=!1;n.fileHighlight=function(){F||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),F=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Z0);const wl=gi,jo="(if|else if|await|then|catch|each|html|debug)";Prism.languages.svelte=Prism.languages.extend("markup",{each:{pattern:new RegExp("{[#/]each(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{"language-javascript":[{pattern:/(as[\s\S]*)\([\s\S]*\)(?=\s*\})/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(as[\s]*)[\s\S]*(?=\s*)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(#each[\s]*)[\s\S]*(?=as)/,lookbehind:!0,inside:Prism.languages.javascript}],keyword:/[#/]each|as/,punctuation:/{|}/}},block:{pattern:new RegExp("{[#:/@]/s"+jo+"(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{punctuation:/^{|}$/,keyword:[new RegExp("[#:/@]"+jo+"( )*"),/as/,/then/],"language-javascript":{pattern:/[\s\S]*/,inside:Prism.languages.javascript}}},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?:"[^"]*"|'[^']*'|{[\s\S]+?}(?=[\s/>])))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,inside:Prism.languages.javascript},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],"language-javascript":{pattern:/{[\s\S]+}/,inside:Prism.languages.javascript}}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,lookbehind:!0,inside:Prism.languages.javascript}});Prism.languages.svelte.tag.inside["attr-value"].inside.entity=Prism.languages.svelte.entity;Prism.hooks.add("wrap",t=>{t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.svelte.tag,"addInlined",{value:function(e,n){const r={};r["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^$/i;const o={"included-cdata":{pattern://i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};const i={};i[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:o},Prism.languages.insertBefore("svelte","cdata",i)}});Prism.languages.svelte.tag.addInlined("style","css");Prism.languages.svelte.tag.addInlined("script","javascript");function X0(t){let e,n;return{c(){e=new Wl(!1),n=$n(),e.a=n},m(r,o){e.m(t[2],r,o),ge(r,n,o)},p(r,o){o&4&&e.p(r[2])},d(r){r&&pe(n),r&&e.d()}}}function ed(t){let e;return{c(){e=Ve(t[2])},m(n,r){ge(n,e,r)},p(n,r){r&4&&Ye(e,n[2])},d(n){n&&pe(e)}}}function td(t){let e,n,r,o,i,u,s;const d=t[6].default,v=ma(d,t,t[5],null);function w(O,F){return O[0]==="none"?ed:X0}let B=w(t),I=B(t);return{c(){e=Y("code"),v&&v.c(),n=fe(),r=Y("pre"),o=Y("code"),I.c(),Hl(e,"display","none"),j(o,"class",i="language-"+t[0]),j(r,"class",u="language-"+t[0]),j(r,"command-line",""),j(r,"data-output","2-17")},m(O,F){ge(O,e,F),v&&v.m(e,null),t[7](e),ge(O,n,F),ge(O,r,F),q(r,o),I.m(o,null),s=!0},p(O,[F]){v&&v.p&&(!s||F&32)&&ya(v,d,O,O[5],s?va(d,O[5],F,null):wa(O[5]),null),B===(B=w(O))&&I?I.p(O,F):(I.d(1),I=B(O),I&&(I.c(),I.m(o,null))),(!s||F&1&&i!==(i="language-"+O[0]))&&j(o,"class",i),(!s||F&1&&u!==(u="language-"+O[0]))&&j(r,"class",u)},i(O){s||(ye(v,O),s=!0)},o(O){We(v,O),s=!1},d(O){O&&pe(e),v&&v.d(O),t[7](null),O&&pe(n),O&&pe(r),I.d()}}}const Vo=wl;wl.highlightElement;const nd={transform:t=>t};function rd(t,e,n){let{$$slots:r={},$$scope:o}=e,{language:i="javascript"}=e,{source:u=""}=e,{transform:s=I=>I}=e,d,v;function w(){const I=Vo.languages[i];let O=u||d.textContent;O=nd.transform(O),O=s(O),n(2,v=i==="none"?O:Vo.highlight(O,I,i))}function B(I){Ft[I?"unshift":"push"](()=>{d=I,n(1,d)})}return t.$$set=I=>{n(9,e=Kn(Kn({},e),Ji(I))),"language"in I&&n(0,i=I.language),"source"in I&&n(3,u=I.source),"transform"in I&&n(4,s=I.transform),"$$scope"in I&&n(5,o=I.$$scope)},t.$$.update=()=>{e&&(u||d)&&w()},e=Ji(e),[i,d,v,u,s,o,r,B]}let id=class extends st{constructor(e){super(),at(this,e,rd,td,nt,{language:0,source:3,transform:4})}};function Jo(t,e,n){const r=t.slice();return r[2]=e[n],r}function od(t){let e,n=t[0].addresses,r=[];for(let o=0;oThese are the latest details for the selected identifier. You can use the provided + + tool to add or remove ALGO addresses associated with this + identifier.

`,r=fe(),o=Y("div"),i=Y("div"),i.innerHTML='

Local reference (name)

',u=fe(),s=Y("div"),d=Y("p"),w=Ve(v),B=fe(),I=Y("div"),O=Y("div"),O.innerHTML='

Last sync

',F=fe(),P=Y("div"),S=Y("p"),x=Ve(R),E=fe(),T=Y("div"),$=Y("div"),$.innerHTML='

Linked addresses

',D=fe(),V=Y("div"),H=Y("p"),G.c(),Q=fe(),m=Y("div"),a=Y("div"),a.innerHTML='

Current status

',c=fe(),p=Y("div"),re.c(),_=fe(),y=Y("div"),C=Y("div"),ht(L.$$.fragment),j(n,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5 first:sm:pt-0"),j(d,"class","block w-full text-base text-gray-600"),j(s,"class","sm:col-span-2"),j(o,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(S,"class","block w-full text-base text-gray-600"),j(P,"class","sm:col-span-2"),j(I,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(H,"class","block w-full text-base text-gray-600"),j(V,"class","sm:col-span-2"),j(T,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(p,"class","sm:col-span-2"),j(m,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(C,"class","sm:col-span-3"),j(y,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(e,"class","space-y-6 py-6 sm:space-y-0 sm:divide-y sm:divide-gray-200 sm:py-0")},m(g,U){ge(g,e,U),q(e,n),q(e,r),q(e,o),q(o,i),q(o,u),q(o,s),q(s,d),q(d,w),q(e,B),q(e,I),q(I,O),q(I,F),q(I,P),q(P,S),q(S,x),q(e,E),q(e,T),q(T,$),q(T,D),q(T,V),q(V,H),G.m(H,null),q(e,Q),q(e,m),q(m,a),q(m,c),q(m,p),re.m(p,null),q(e,_),q(e,y),q(y,C),rt(L,C,null),b=!0},p(g,[U]){(!b||U&1)&&v!==(v=g[0].name+"")&&Ye(w,v),(!b||U&1)&&R!==(R=Go(g[0].last_sync)+"")&&Ye(x,R),k===(k=l(g))&&G?G.p(g,U):(G.d(1),G=k(g),G&&(G.c(),G.m(H,null))),te!==(te=W(g))&&(re.d(1),re=te(g),re&&(re.c(),re.m(p,null)))},i(g){b||(ye(L.$$.fragment,g),b=!0)},o(g){We(L.$$.fragment,g),b=!1},d(g){g&&pe(e),G.d(),re.d(),it(L)}}}function Go(t){if(t==="")return"-";let e=new Date;return e.setTime(Date.parse(t)),e.toLocaleDateString(navigator.language,{day:"numeric",year:"numeric",hour:"numeric",month:"short",minute:"numeric",hour12:!0})}function Yo(t){return t.slice(0,14)+"..."+t.slice(-14)}function cd(t,e,n){let{identifier:r}=e,o=JSON.stringify(r.document,null,2);return t.$$set=i=>{"identifier"in i&&n(0,r=i.identifier)},[r,o]}class fd extends st{constructor(e){super(),at(this,e,cd,ud,nt,{identifier:0})}}function Zt(t){const e=t-1;return e*e*e+1}function Qo(t,{delay:e=0,duration:n=400,easing:r=pa}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:i=>`opacity: ${i*o}`}}function hd(t,{delay:e=0,duration:n=400,easing:r=Zt,x:o=0,y:i=0,opacity:u=0}={}){const s=getComputedStyle(t),d=+s.opacity,v=s.transform==="none"?"":s.transform,w=d*(1-u),[B,I]=Ki(o),[O,F]=Ki(i);return{delay:e,duration:n,easing:r,css:(P,S)=>` + transform: ${v} translate(${(1-P)*B}${I}, ${(1-P)*O}${F}); + opacity: ${d-w*S}`}}function Zo(t,{delay:e=0,duration:n=400,easing:r=Zt,axis:o="y"}={}){const i=getComputedStyle(t),u=+i.opacity,s=o==="y"?"height":"width",d=parseFloat(i[s]),v=o==="y"?["top","bottom"]:["left","right"],w=v.map(R=>`${R[0].toUpperCase()}${R.slice(1)}`),B=parseFloat(i[`padding${w[0]}`]),I=parseFloat(i[`padding${w[1]}`]),O=parseFloat(i[`margin${w[0]}`]),F=parseFloat(i[`margin${w[1]}`]),P=parseFloat(i[`border${w[0]}Width`]),S=parseFloat(i[`border${w[1]}Width`]);return{delay:e,duration:n,easing:r,css:R=>`overflow: hidden;opacity: ${Math.min(R*20,1)*u};${s}: ${R*d}px;padding-${v[0]}: ${R*B}px;padding-${v[1]}: ${R*I}px;margin-${v[0]}: ${R*O}px;margin-${v[1]}: ${R*F}px;border-${v[0]}-width: ${R*P}px;border-${v[1]}-width: ${R*S}px;`}}function Xo(t){let e,n,r,o,i,u,s,d,v,w,B,I,O,F,P,S,R,x,E;return{c(){e=Y("div"),n=Y("div"),r=Y("div"),o=Y("p"),i=Ve(t[2]),u=fe(),s=Y("div"),d=Y("div"),v=Y("button"),w=Y("span"),w.textContent="Dismiss",B=fe(),I=Gr("svg"),O=Gr("path"),F=fe(),P=Y("div"),P.innerHTML=`

success styles

+

error styles

+

warning styles

`,j(o,"class","text-sm font-medium "+t[3]("text")),j(r,"class","ml-3"),j(w,"class","sr-only"),j(O,"d","M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"),j(I,"class","h-5 w-5"),j(I,"viewBox","0 0 20 20"),j(I,"fill","currentColor"),j(I,"aria-hidden","true"),j(v,"type","button"),j(v,"class","inline-fle p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2 "+t[3]("button")),j(d,"class","-mx-1.5 -my-1.5"),j(s,"class","ml-auto pl-3"),j(n,"class","flex"),j(P,"class","hidden"),j(e,"class","border-l-4 p-4 "+t[3]("border"))},m(T,$){ge(T,e,$),q(e,n),q(n,r),q(r,o),q(o,i),q(n,u),q(n,s),q(s,d),q(d,v),q(v,w),q(v,B),q(v,I),q(I,O),q(e,F),q(e,P),R=!0,x||(E=Je(v,"click",gn(t[5])),x=!0)},p(T,$){t=T,(!R||$&4)&&Ye(i,t[2])},i(T){R||(Qt(()=>{R&&(S||(S=ln(e,Zo,{easing:Zt,duration:400},!0)),S.run(1))}),R=!0)},o(T){S||(S=ln(e,Zo,{easing:Zt,duration:400},!1)),S.run(0),R=!1},d(T){T&&pe(e),T&&S&&S.end(),x=!1,E()}}}function dd(t){let e,n,r=!t[1]&&Xo(t);return{c(){r&&r.c(),e=$n()},m(o,i){r&&r.m(o,i),ge(o,e,i),n=!0},p(o,[i]){o[1]?r&&(Xt(),We(r,1,1,()=>{r=null}),en()):r?(r.p(o,i),i&2&&ye(r,1)):(r=Xo(o),r.c(),ye(r,1),r.m(e.parentNode,e))},i(o){n||(ye(r),n=!0)},o(o){We(r),n=!1},d(o){r&&r.d(o),o&&pe(e)}}}function pd(t,e,n){let r=!0,o,i="success";function u(B,I){i=B,n(2,o=I),n(1,r=!1)}function s(){n(1,r=!0)}function d(B){switch(B){case"border":return"border-COLOR-400 bg-COLOR-50".replaceAll("COLOR",v());case"text":return"text-COLOR-800".replaceAll("COLOR",v());case"button":return"bg-COLOR-50 text-COLOR-500 hover:bg-COLOR-100 focus:ring-COLOR-600 focus:ring-offset-COLOR-50".replaceAll("COLOR",v())}}function v(){switch(i){case"success":return"green";case"warning":return"yellow";case"error":return"red"}}return[s,r,o,d,u,()=>{s()}]}class bl extends st{constructor(e){super(),at(this,e,pd,dd,nt,{show:4,close:0})}get show(){return this.$$.ctx[4]}get close(){return this.$$.ctx[0]}}function gd(t){let e,n,r,o,i,u,s,d,v,w,B,I,O,F,P,S,R,x,E,T,$={};return i=new bl({props:$}),t[3](i),{c(){e=Y("div"),n=Y("form"),r=Y("div"),o=Y("div"),ht(i.$$.fragment),u=fe(),s=Y("p"),s.innerHTML=`A decentralized identifier (or DID) is an asset designed to be owned by a controller + entity. A single identifier can be used on any number of services, and you can create + as many identifiers as you want.`,d=fe(),v=Y("div"),v.innerHTML=`

Name (local reference)

+
`,w=fe(),B=Y("div"),B.innerHTML=`

The recovery key used to create this identifier is not stored locally. If you lose + it ther's no other way to recover it. Please make sure you have a copy of it.

+

Recovery key

+
+

Key confirmation

+
`,I=fe(),O=Y("div"),F=Y("div"),P=Y("button"),P.textContent="Cancel",S=fe(),R=Y("button"),R.textContent="Create",j(o,"class","sm:col-span-3"),j(s,"class","sm:col-span-3"),j(r,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5 first:sm:pt-0"),j(v,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(B,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(P,"type","button"),j(P,"class","rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"),j(R,"type","submit"),j(R,"class","inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"),j(F,"class","flex justify-end space-x-3"),j(O,"class","flex-shrink-0 border-t border-gray-200 px-4 py-5 sm:px-6"),j(n,"class","flex h-full flex-col"),j(e,"class","space-y-6 py-6 sm:space-y-0 sm:divide-y sm:divide-gray-200 sm:py-0")},m(D,V){ge(D,e,V),q(e,n),q(n,r),q(r,o),rt(i,o,null),q(r,u),q(r,s),q(n,d),q(n,v),q(n,w),q(n,B),q(n,I),q(n,O),q(O,F),q(F,P),q(F,S),q(F,R),x=!0,E||(T=[Je(P,"click",t[4]),Je(n,"submit",gn(t[2]))],E=!0)},p(D,[V]){const H={};i.$set(H)},i(D){x||(ye(i.$$.fragment,D),x=!0)},o(D){We(i.$$.fragment,D),x=!1},d(D){D&&pe(e),t[3](null),it(i),E=!1,dt(T)}}}function md(t){const e=document.getElementById(t);return e.value.length===0?(e.classList.add("text-red-900","ring-red-300"),!1):(e.classList.remove("text-red-900","ring-red-300"),!0)}function _d(t,e,n){let r;const o=yr();wi(()=>{document.getElementById("name").focus()});function i(v){v.preventDefault();const w=new FormData(v.target),B=Object.fromEntries(w.entries());for(const[I]of Object.entries(B))if(!md(I)){r.show("error","Validate the provided values and try again.");return}if(B.recovery_key.length<8){r.show("error","The recovery key must be at least 8 characters long.");return}if(B.confirmation!==B.recovery_key){r.show("error","The confirmation key does not match the recovery key.");return}u(B.name,B.recovery_key)}async function u(v,w){let B=await ft.createDID(v,w);o.closeModal(),B?o.showAlert("success","Identifier created successfully."):o.showAlert("error","Failed to create identifier.")}function s(v){Ft[v?"unshift":"push"](()=>{r=v,n(0,r)})}return[r,o,i,s,()=>{o.closeModal()}]}class vd extends st{constructor(e){super(),at(this,e,_d,gd,nt,{})}}function ea(t){let e,n;return{c(){e=Y("span"),n=Ve(t[0]),j(e,"class","sr-only")},m(r,o){ge(r,e,o),q(e,n)},p(r,o){o&1&&Ye(n,r[0])},d(r){r&&pe(e)}}}function yd(t){let e,n,r,o,i,u=t[0]&&ea(t);return{c(){e=Y("button"),u&&u.c(),n=fe(),r=Y("span"),j(r,"aria-hidden","true"),j(r,"class","pointer-events-none inline-block h-5 w-5 translate-x-0 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"),j(e,"type","button"),j(e,"class","relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-gray-200 transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"),j(e,"role","switch"),j(e,"aria-checked","false")},m(s,d){ge(s,e,d),u&&u.m(e,null),q(e,n),q(e,r),t[6](r),t[7](e),o||(i=Je(e,"click",gn(t[1])),o=!0)},p(s,[d]){s[0]?u?u.p(s,d):(u=ea(s),u.c(),u.m(e,n)):u&&(u.d(1),u=null)},i:ze,o:ze,d(s){s&&pe(e),u&&u.d(),t[6](null),t[7](null),o=!1,i()}}}function wd(t,e,n){const r=sr();let{description:o=""}=e,{enabled:i=!1}=e;wi(()=>{w()});let u,s;function d(){n(4,i=!i),r("toggle",{enabled:i}),w()}function v(){return i}function w(){if(i){s.classList.add("bg-indigo-600"),s.classList.remove("bg-gray-200"),u.classList.add("translate-x-5");return}s.classList.add("bg-gray-200"),s.classList.remove("bg-indigo-600"),u.classList.remove("translate-x-5")}function B(O){Ft[O?"unshift":"push"](()=>{u=O,n(2,u)})}function I(O){Ft[O?"unshift":"push"](()=>{s=O,n(3,s)})}return t.$$set=O=>{"description"in O&&n(0,o=O.description),"enabled"in O&&n(4,i=O.enabled)},[o,d,u,s,i,v,B,I]}class bd extends st{constructor(e){super(),at(this,e,wd,yd,nt,{description:0,enabled:4,toggle:1,isEnabled:5})}get toggle(){return this.$$.ctx[1]}get isEnabled(){return this.$$.ctx[5]}}function ta(t,e,n){const r=t.slice();return r[9]=e[n],r}function xd(t){let e,n,r=t[0],o=[];for(let u=0;uWe(o[u],1,1,()=>{o[u]=null});return{c(){e=Y("div");for(let u=0;uAdjust the ALGO addresses associated with this identifier. You can add + as many as you want. The DID document associated will be automatically synced with the + network.

`,r=fe(),o=Y("div"),u.c(),s=fe(),d=Y("div"),v=Y("p"),v.textContent="Enter the recovery key used to create this identifier.",w=fe(),B=Y("div"),B.innerHTML='

Recovery key

',I=fe(),O=Y("div"),F=Y("input"),P=fe(),S=Y("div"),R=Y("div"),x=Y("button"),x.textContent="Cancel",E=fe(),T=Y("button"),T.textContent="Sync",j(n,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5 first:sm:pt-0"),j(o,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(v,"class","sm:col-span-3"),j(F,"type","password"),j(F,"name","recovery_key"),j(F,"id","recovery_key"),j(F,"class","block w-full rounded-md border-0 p-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"),j(O,"class","sm:col-span-2"),j(d,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),j(x,"type","button"),j(x,"class","rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"),j(T,"type","submit"),j(T,"class","inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"),j(R,"class","flex justify-end space-x-3"),j(S,"class","flex-shrink-0 border-t border-gray-200 px-4 py-5 sm:px-6"),j(e,"class","space-y-6 py-6 sm:space-y-0 sm:divide-y sm:divide-gray-200 sm:py-0")},m(a,c){ge(a,e,c),q(e,n),q(e,r),q(e,o),Q[i].m(o,null),q(e,s),q(e,d),q(d,v),q(d,w),q(d,B),q(d,I),q(d,O),q(O,F),Yi(F,t[1]),q(e,P),q(e,S),q(S,R),q(R,x),q(R,E),q(R,T),$=!0,D||(V=[Je(F,"input",t[7]),Je(x,"click",t[8]),Je(T,"click",gn(t[3]))],D=!0)},p(a,[c]){let p=i;i=m(a),i===p?Q[i].p(a,c):(Xt(),We(Q[p],1,1,()=>{Q[p]=null}),en(),u=Q[i],u?u.p(a,c):(u=Q[i]=H[i](a),u.c()),ye(u,1),u.m(o,null)),c&2&&F.value!==a[1]&&Yi(F,a[1])},i(a){$||(ye(u),$=!0)},o(a){We(u),$=!1},d(a){a&&pe(e),Q[i].d(),D=!1,dt(V)}}}function ra(t){return t.slice(0,16)+"..."+t.slice(-16)}function kd(t){t.enabled=!t.enabled}function Sd(t,e,n){let r;_i(t,ft,I=>n(5,r=I));let{identifier:o}=e,i;const u=yr();let s;async function d(){let I=await ft.updateDID(o.name,o.did,s,i);u.closeModal(),I?u.showAlert("success","Identifier updated successfully."):u.showAlert("error","Failed to updated identifier.")}const v=I=>{kd(I)};function w(){i=this.value,n(1,i)}const B=()=>{u.closeModal()};return t.$$set=I=>{"identifier"in I&&n(4,o=I.identifier)},t.$$.update=()=>{t.$$.dirty&49&&(n(0,s=[]),o.addresses.forEach(I=>{n(0,s=[...s,{address:I.address,network:I.network,enabled:!0}])}),r.wallet.addresses.forEach(I=>{s.find(O=>O.address==I)||n(0,s=[...s,{address:I,network:"mainnet",enabled:!1}])}))},[s,i,u,d,o,r,v,w,B]}class Cd extends st{constructor(e){super(),at(this,e,Sd,Ed,nt,{identifier:4})}}function ia(t,e,n){const r=t.slice();return r[5]=e[n],r}function Ad(t){let e,n,r,o,i,u,s,d,v,w,B=t[0],I=[];for(let F=0;FWe(I[F],1,1,()=>{I[F]=null});return{c(){e=Y("div"),n=Y("table"),r=Y("thead"),r.innerHTML=`Reference + DID + Addresses + Last Sync + Status + Actions`,o=fe(),i=Y("tbody");for(let F=0;F + Create new decentralized identifier`,j(i,"class","bg-white"),j(n,"class","min-w-full divide-y divide-gray-300"),j(s,"type","button"),j(s,"class","relative flex w-full flex-row justify-center border-2 bg-gray-700 py-2 text-gray-200 hover:bg-gray-800 hover:text-white"),j(e,"class","inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8")},m(F,P){ge(F,e,P),q(e,n),q(n,r),q(n,o),q(n,i);for(let S=0;S + Create your first decentralized identifier`,j(e,"type","button"),j(e,"class","relative block w-full rounded-lg border-2 border-dashed border-gray-300 p-12 text-center hover:border-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2")},m(o,i){ge(o,e,i),n||(r=Je(e,"click",t[1]),n=!0)},p:ze,i:ze,o:ze,d(o){o&&pe(e),n=!1,r()}}}function oa(t){let e,n;return e=new Q0({props:{identifier:t[5]}}),e.$on("show_details",t[2]),e.$on("link_wallet",t[3]),{c(){ht(e.$$.fragment)},m(r,o){rt(e,r,o),n=!0},p(r,o){const i={};o&1&&(i.identifier=r[5]),e.$set(i)},i(r){n||(ye(e.$$.fragment,r),n=!0)},o(r){We(e.$$.fragment,r),n=!1},d(r){it(e,r)}}}function Id(t){let e,n,r,o;const i=[Td,Ad],u=[];function s(d,v){return d[0].length==0?0:1}return n=s(t),r=u[n]=i[n](t),{c(){e=Y("section"),r.c()},m(d,v){ge(d,e,v),u[n].m(e,null),o=!0},p(d,[v]){let w=n;n=s(d),n===w?u[n].p(d,v):(Xt(),We(u[w],1,1,()=>{u[w]=null}),en(),r=u[n],r?r.p(d,v):(r=u[n]=i[n](d),r.c()),ye(r,1),r.m(e,null))},i(d){o||(ye(r),o=!0)},o(d){We(r),o=!1},d(d){d&&pe(e),u[n].d()}}}function Rd(t,e,n){const r=yr();let{identifiers:o}=e;function i(){r.showModal({title:"Create New Identifier",asPanel:!1,content:vd,props:{}})}function u(d){r.showModal({title:d.detail.did.did,subtitle:"Identifier Details",asPanel:!0,content:fd,props:{identifier:d.detail.did}})}function s(d){r.showModal({title:"Manage Link Addresses",subtitle:d.detail.did.did,asPanel:!1,content:Cd,props:{identifier:d.detail.did}})}return t.$$set=d=>{"identifiers"in d&&n(0,o=d.identifiers)},[o,i,u,s]}class Bd extends st{constructor(e){super(),at(this,e,Rd,Id,nt,{identifiers:0})}}function Fd(t){const e=n=>{t.contains(n.target)||t.dispatchEvent(new CustomEvent("outclick"))};return document.addEventListener("click",e,!0),{destroy(){document.removeEventListener("click",e,!0)}}}function aa(t){let e,n,r,o,i,u,s=la(t[1].title)+"",d,v,w,B,I,O,F,P,S,R,x=t[1].subtitle&&sa(t);const E=t[9].default,T=ma(E,t,t[8],null);return{c(){e=Y("div"),n=Y("div"),r=Y("div"),o=Y("div"),i=Y("div"),u=Y("h1"),d=Ve(s),v=fe(),x&&x.c(),w=fe(),B=Y("button"),B.innerHTML=`Close + `,I=fe(),T&&T.c(),j(u,"class","break-all text-lg font-semibold text-gray-900"),j(i,"class","flex-1"),j(B,"class","rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2"),j(o,"class","flex items-center bg-gray-50 p-6 sm:rounded-md"),j(r,"class","space-y-4"),j(n,"class","overflow-y-scroll bg-white shadow-2xl "+t[4]("content")),j(e,"class","absolute bottom-0 left-0 right-0 top-0 z-10 flex flex-col bg-gray-700 bg-opacity-75 backdrop-blur-sm transition-all "+t[4]("wrapper"))},m($,D){ge($,e,D),q(e,n),q(n,r),q(r,o),q(o,i),q(i,u),q(u,d),q(i,v),x&&x.m(i,null),q(o,w),q(o,B),q(r,I),T&&T.m(r,null),P=!0,S||(R=[Je(B,"click",t[0]),Nl(Fd.call(null,n)),Je(n,"outclick",t[0]),Je(e,"introend",t[10]),Je(e,"outroend",t[11])],S=!0)},p($,D){t=$,(!P||D&2)&&s!==(s=la(t[1].title)+"")&&Ye(d,s),t[1].subtitle?x?x.p(t,D):(x=sa(t),x.c(),x.m(i,null)):x&&(x.d(1),x=null),T&&T.p&&(!P||D&256)&&ya(T,E,t,t[8],P?va(E,t[8],D,null):wa(t[8]),null)},i($){P||(ye(T,$),Qt(()=>{P&&(O||(O=ln(n,t[3],{},!0)),O.run(1))}),Qt(()=>{P&&(F||(F=ln(e,Qo,{duration:300,easing:Zt},!0)),F.run(1))}),P=!0)},o($){We(T,$),O||(O=ln(n,t[3],{},!1)),O.run(0),F||(F=ln(e,Qo,{duration:300,easing:Zt},!1)),F.run(0),P=!1},d($){$&&pe(e),x&&x.d(),T&&T.d($),$&&O&&O.end(),$&&F&&F.end(),S=!1,dt(R)}}}function sa(t){let e,n=t[1].subtitle+"",r;return{c(){e=Y("span"),r=Ve(n),j(e,"class","text-sm text-gray-500")},m(o,i){ge(o,e,i),q(e,r)},p(o,i){i&2&&n!==(n=o[1].subtitle+"")&&Ye(r,n)},d(o){o&&pe(e)}}}function Od(t){let e,n,r,o,i=!t[1].hidden&&aa(t);return{c(){i&&i.c(),e=$n()},m(u,s){i&&i.m(u,s),ge(u,e,s),n=!0,r||(o=Je(window,"keydown",t[5]),r=!0)},p(u,[s]){u[1].hidden?i&&(Xt(),We(i,1,1,()=>{i=null}),en()):i?(i.p(u,s),s&2&&ye(i,1)):(i=aa(u),i.c(),ye(i,1),i.m(e.parentNode,e))},i(u){n||(ye(i),n=!0)},o(u){We(i),n=!1},d(u){i&&i.d(u),u&&pe(e),r=!1,o()}}}function la(t){return t.length<=24?t:t.slice(0,18)+"..."+t.slice(-18)}function Ld(t,e,n){let{$$slots:r={},$$scope:o}=e,i={hidden:!0,asPanel:!1,title:"",subtitle:""};const u=sr();function s(){return!i.hidden}function d(P,S,R){n(1,i={title:P,subtitle:S,asPanel:R,hidden:!1})}function v(){n(1,i={...i,hidden:!0})}function w(P,S){return S={x:i.asPanel?100:0,y:i.asPanel?0:100,duration:400,easing:Zt},hd(P,S)}function B(P){return P=="wrapper"?i.asPanel?"items-end":"items-center justify-center":i.asPanel?"h-full w-3/4 md:w-1/2":"min-h-fit max-h-screen w-full sm:w-3/4 sm:rounded-md lg:w-1/2"}function I(P){!i.hidden&&P.key=="Escape"&&v()}const O=()=>{u("open")},F=()=>{u("close")};return t.$$set=P=>{"$$scope"in P&&n(8,o=P.$$scope)},[v,i,u,w,B,I,s,d,o,r,O,F]}class Nd extends st{constructor(e){super(),at(this,e,Ld,Od,nt,{isVisible:6,show:7,close:0})}get isVisible(){return this.$$.ctx[6]}get show(){return this.$$.ctx[7]}get close(){return this.$$.ctx[0]}}function $d(t){let e,n,r;const o=[t[3]];var i=t[2];function u(s){let d={};for(let v=0;v{it(w,1)}),en()}i?(e=Qi(i,u()),ht(e.$$.fragment),ye(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}else i&&e.$set(v)},i(s){r||(e&&ye(e.$$.fragment,s),r=!0)},o(s){e&&We(e.$$.fragment,s),r=!1},d(s){s&&pe(n),e&&it(e,s)}}}function Pd(t){let e,n,r,o,i,u,s,d,v,w,B,I,O,F,P,S,R,x,E,T,$,D,V,H={$$slots:{default:[$d]},$$scope:{ctx:t}};e=new Nd({props:H}),t[5](e),F=new V0({props:{mainnet:!0}});let Q={};return x=new bl({props:Q}),t[6](x),T=new Bd({props:{identifiers:t[4].identifiers}}),{c(){ht(e.$$.fragment),n=fe(),r=Y("div"),o=Y("img"),u=fe(),s=Y("div"),d=fe(),v=Y("div"),w=Y("div"),B=Y("div"),I=Y("h1"),I.textContent="AlgoID Connect",O=fe(),ht(F.$$.fragment),P=fe(),S=Y("p"),S.innerHTML=`Use this graphical interface to manage your did:algo + Decentralized Identifiers. Connect your wallet and link your + ALGO addresses to a DID to enable account discovery + and facilitate payments and other interactions.`,R=fe(),ht(x.$$.fragment),E=fe(),ht(T.$$.fragment),$=fe(),D=Y("div"),D.innerHTML='

For more information, or to get the source code for this application, checkout the official repository.

',Kr(o.src,i="/img/beams.jpg")||j(o,"src",i),j(o,"alt",""),j(o,"class","absolute left-1/2 top-1/2 max-w-none -translate-x-1/2 -translate-y-1/2"),j(o,"width","1308"),j(s,"class","absolute inset-0 bg-[url(/img/grid.svg)] bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"),j(I,"class","inline-block text-2xl text-gray-800"),j(B,"class","relative w-full"),j(w,"class","space-y-6 py-6 text-base leading-7 text-gray-600"),j(v,"class","relative bg-white px-6 pb-8 pt-10 shadow-xl ring-1 ring-gray-900/5 sm:mx-auto sm:px-10 md:w-3/4 md:rounded-md"),j(D,"class","relative mx-auto mt-6 w-1/2 text-center"),j(r,"class","relative flex flex-col justify-center bg-gray-50 py-6 sm:py-12")},m(m,a){rt(e,m,a),ge(m,n,a),ge(m,r,a),q(r,o),q(r,u),q(r,s),q(r,d),q(r,v),q(v,w),q(w,B),q(B,I),q(B,O),rt(F,B,null),q(w,P),q(w,S),q(w,R),rt(x,w,null),q(w,E),rt(T,w,null),q(r,$),q(r,D),V=!0},p(m,[a]){const c={};a&140&&(c.$$scope={dirty:a,ctx:m}),e.$set(c);const p={};x.$set(p);const _={};a&16&&(_.identifiers=m[4].identifiers),T.$set(_)},i(m){V||(ye(e.$$.fragment,m),ye(F.$$.fragment,m),ye(x.$$.fragment,m),ye(T.$$.fragment,m),V=!0)},o(m){We(e.$$.fragment,m),We(F.$$.fragment,m),We(x.$$.fragment,m),We(T.$$.fragment,m),V=!1},d(m){t[5](null),it(e,m),m&&pe(n),m&&pe(r),it(F),t[6](null),it(x),it(T)}}}function Dd(t,e,n){let r;_i(t,ft,w=>n(4,r=w));let o,i,u,s;ft.reload(),q0({showAlert(w,B){o.show(w,B)},showModal(w){n(2,u=w.content),n(3,s=w.props),i.show(w.title,w.subtitle,w.asPanel)},closeModal(){i.close()}});function d(w){Ft[w?"unshift":"push"](()=>{i=w,n(1,i)})}function v(w){Ft[w?"unshift":"push"](()=>{o=w,n(0,o)})}return[o,i,u,s,r,d,v]}class Ud extends st{constructor(e){super(),at(this,e,Dd,Pd,nt,{})}}new Ud({target:document.getElementById("app")}); diff --git a/client/ui/local-app/dist/assets/index-85573204.js b/client/ui/local-app/dist/assets/index-85573204.js deleted file mode 100644 index a9a9ad0..0000000 --- a/client/ui/local-app/dist/assets/index-85573204.js +++ /dev/null @@ -1,581 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aa(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){if(this instanceof r){var o=[null];o.push.apply(o,arguments);var i=Function.bind.apply(e,o);return new i}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var Yt={},ir={};ir.byteLength=bl;ir.toByteArray=Ml;ir.fromByteArray=Sl;var ct=[],et=[],yl=typeof Uint8Array<"u"?Uint8Array:Array,Rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var rn=0,wl=Rr.length;rn0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function bl(t){var e=sa(t),n=e[0],r=e[1];return(n+r)*3/4-r}function xl(t,e,n){return(e+n)*3/4-n}function Ml(t){var e,n=sa(t),r=n[0],o=n[1],i=new yl(xl(t,r,o)),l=0,s=o>0?r-4:r,d;for(d=0;d>16&255,i[l++]=e>>8&255,i[l++]=e&255;return o===2&&(e=et[t.charCodeAt(d)]<<2|et[t.charCodeAt(d+1)]>>4,i[l++]=e&255),o===1&&(e=et[t.charCodeAt(d)]<<10|et[t.charCodeAt(d+1)]<<4|et[t.charCodeAt(d+2)]>>2,i[l++]=e>>8&255,i[l++]=e&255),i}function El(t){return ct[t>>18&63]+ct[t>>12&63]+ct[t>>6&63]+ct[t&63]}function kl(t,e,n){for(var r,o=[],i=e;is?s:l+i));return r===1?(e=t[n-1],o.push(ct[e>>2]+ct[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],o.push(ct[e>>10]+ct[e>>4&63]+ct[e<<2&63]+"=")),o.join("")}var mi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */mi.read=function(t,e,n,r,o){var i,l,s=o*8-r-1,d=(1<>1,v=-7,B=n?o-1:0,R=n?-1:1,F=t[e+B];for(B+=R,i=F&(1<<-v)-1,F>>=-v,v+=s;v>0;i=i*256+t[e+B],B+=R,v-=8);for(l=i&(1<<-v)-1,i>>=-v,v+=r;v>0;l=l*256+t[e+B],B+=R,v-=8);if(i===0)i=1-y;else{if(i===d)return l?NaN:(F?-1:1)*(1/0);l=l+Math.pow(2,r),i=i-y}return(F?-1:1)*l*Math.pow(2,i-r)};mi.write=function(t,e,n,r,o,i){var l,s,d,y=i*8-o-1,v=(1<>1,R=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=r?0:i-1,O=r?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,l=v):(l=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-l))<1&&(l--,d*=2),l+B>=1?e+=R/d:e+=R*Math.pow(2,1-B),e*d>=2&&(l++,d/=2),l+B>=v?(s=0,l=v):l+B>=1?(s=(e*d-1)*Math.pow(2,o),l=l+B):(s=e*Math.pow(2,B-1)*Math.pow(2,o),l=0));o>=8;t[n+F]=s&255,F+=O,s/=256,o-=8);for(l=l<0;t[n+F]=l&255,F+=O,l/=256,y-=8);t[n+F-O]|=P*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(t){var e=ir,n=mi,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=M,t.INSPECT_MAX_BYTES=50;var o=2147483647;t.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var E=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(E,f),E.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function l(E){if(E>o)throw new RangeError('The value "'+E+'" is invalid for option "size"');var f=new Uint8Array(E);return Object.setPrototypeOf(f,s.prototype),f}function s(E,f,h){if(typeof E=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(E)}return d(E,f,h)}s.poolSize=8192;function d(E,f,h){if(typeof E=="string")return R(E,f);if(ArrayBuffer.isView(E))return O(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(me(E,ArrayBuffer)||E&&me(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(E,SharedArrayBuffer)||E&&me(E.buffer,SharedArrayBuffer)))return P(E,f,h);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var A=E.valueOf&&E.valueOf();if(A!=null&&A!==E)return s.from(A,f,h);var L=S(E);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),f,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,f,h){return d(E,f,h)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function y(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function v(E,f,h){return y(E),E<=0?l(E):f!==void 0?typeof h=="string"?l(E).fill(f,h):l(E).fill(f):l(E)}s.alloc=function(E,f,h){return v(E,f,h)};function B(E){return y(E),l(E<0?0:I(E)|0)}s.allocUnsafe=function(E){return B(E)},s.allocUnsafeSlow=function(E){return B(E)};function R(E,f){if((typeof f!="string"||f==="")&&(f="utf8"),!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f);var h=x(E,f)|0,A=l(h),L=A.write(E,f);return L!==h&&(A=A.slice(0,L)),A}function F(E){for(var f=E.length<0?0:I(E.length)|0,h=l(f),A=0;A=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return E|0}function M(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==s.prototype},s.compare=function(f,h){if(me(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),me(h,Uint8Array)&&(h=s.from(h,h.offset,h.byteLength)),!s.isBuffer(f)||!s.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===h)return 0;for(var A=f.length,L=h.length,z=0,Q=Math.min(A,L);zL.length?s.from(Q).copy(L,z):Uint8Array.prototype.set.call(L,Q,z);else if(s.isBuffer(Q))Q.copy(L,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=Q.length}return L};function x(E,f){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||me(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);var h=E.length,A=arguments.length>2&&arguments[2]===!0;if(!A&&h===0)return 0;for(var L=!1;;)switch(f){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return V(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return ne(E).length;default:if(L)return A?-1:V(E).length;f=(""+f).toLowerCase(),L=!0}}s.byteLength=x;function T(E,f,h){var A=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,f>>>=0,h<=f))return"";for(E||(E="utf8");;)switch(E){case"hex":return u(this,f,h);case"utf8":case"utf-8":return _(this,f,h);case"ascii":return N(this,f,h);case"latin1":case"binary":return b(this,f,h);case"base64":return p(this,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,f,h);default:if(A)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),A=!0}}s.prototype._isBuffer=!0;function $(E,f,h){var A=E[f];E[f]=E[h],E[h]=A}s.prototype.swap16=function(){var f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;hh&&(f+=" ... "),""},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(f,h,A,L,z){if(me(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(h===void 0&&(h=0),A===void 0&&(A=f?f.length:0),L===void 0&&(L=0),z===void 0&&(z=this.length),h<0||A>f.length||L<0||z>this.length)throw new RangeError("out of range index");if(L>=z&&h>=A)return 0;if(L>=z)return-1;if(h>=A)return 1;if(h>>>=0,A>>>=0,L>>>=0,z>>>=0,this===f)return 0;for(var Q=z-L,se=A-h,le=Math.min(Q,se),ve=this.slice(L,z),de=f.slice(h,A),ue=0;ue2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,oe(h)&&(h=L?0:E.length-1),h<0&&(h=E.length+h),h>=E.length){if(L)return-1;h=E.length-1}else if(h<0)if(L)h=0;else return-1;if(typeof f=="string"&&(f=s.from(f,A)),s.isBuffer(f))return f.length===0?-1:j(E,f,h,A,L);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(E,f,h):Uint8Array.prototype.lastIndexOf.call(E,f,h):j(E,[f],h,A,L);throw new TypeError("val must be string, number or Buffer")}function j(E,f,h,A,L){var z=1,Q=E.length,se=f.length;if(A!==void 0&&(A=String(A).toLowerCase(),A==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(E.length<2||f.length<2)return-1;z=2,Q/=2,se/=2,h/=2}function le(we,be){return z===1?we[be]:we.readUInt16BE(be*z)}var ve;if(L){var de=-1;for(ve=h;veQ&&(h=Q-se),ve=h;ve>=0;ve--){for(var ue=!0,Xe=0;XeL&&(A=L)):A=L;var z=f.length;A>z/2&&(A=z/2);for(var Q=0;Q>>0,isFinite(A)?(A=A>>>0,L===void 0&&(L="utf8")):(L=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var z=this.length-h;if((A===void 0||A>z)&&(A=z),f.length>0&&(A<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var Q=!1;;)switch(L){case"hex":return W(this,f,h,A);case"utf8":case"utf-8":return Z(this,f,h,A);case"ascii":case"latin1":case"binary":return m(this,f,h,A);case"base64":return a(this,f,h,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c(this,f,h,A);default:if(Q)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),Q=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function p(E,f,h){return f===0&&h===E.length?e.fromByteArray(E):e.fromByteArray(E.slice(f,h))}function _(E,f,h){h=Math.min(E.length,h);for(var A=[],L=f;L239?4:z>223?3:z>191?2:1;if(L+se<=h){var le,ve,de,ue;switch(se){case 1:z<128&&(Q=z);break;case 2:le=E[L+1],(le&192)===128&&(ue=(z&31)<<6|le&63,ue>127&&(Q=ue));break;case 3:le=E[L+1],ve=E[L+2],(le&192)===128&&(ve&192)===128&&(ue=(z&15)<<12|(le&63)<<6|ve&63,ue>2047&&(ue<55296||ue>57343)&&(Q=ue));break;case 4:le=E[L+1],ve=E[L+2],de=E[L+3],(le&192)===128&&(ve&192)===128&&(de&192)===128&&(ue=(z&15)<<18|(le&63)<<12|(ve&63)<<6|de&63,ue>65535&&ue<1114112&&(Q=ue))}}Q===null?(Q=65533,se=1):Q>65535&&(Q-=65536,A.push(Q>>>10&1023|55296),Q=56320|Q&1023),A.push(Q),L+=se}return C(A)}var w=4096;function C(E){var f=E.length;if(f<=w)return String.fromCharCode.apply(String,E);for(var h="",A=0;AA)&&(h=A);for(var L="",z=f;zA&&(f=A),h<0?(h+=A,h<0&&(h=0)):h>A&&(h=A),hh)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(f,h,A){f=f>>>0,h=h>>>0,A||G(f,h,this.length);for(var L=this[f],z=1,Q=0;++Q>>0,h=h>>>0,A||G(f,h,this.length);for(var L=this[f+--h],z=1;h>0&&(z*=256);)L+=this[f+--h]*z;return L},s.prototype.readUint8=s.prototype.readUInt8=function(f,h){return f=f>>>0,h||G(f,1,this.length),this[f]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(f,h){return f=f>>>0,h||G(f,2,this.length),this[f]|this[f+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(f,h){return f=f>>>0,h||G(f,2,this.length),this[f]<<8|this[f+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(f,h){return f=f>>>0,h||G(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(f,h){return f=f>>>0,h||G(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},s.prototype.readIntLE=function(f,h,A){f=f>>>0,h=h>>>0,A||G(f,h,this.length);for(var L=this[f],z=1,Q=0;++Q=z&&(L-=Math.pow(2,8*h)),L},s.prototype.readIntBE=function(f,h,A){f=f>>>0,h=h>>>0,A||G(f,h,this.length);for(var L=h,z=1,Q=this[f+--L];L>0&&(z*=256);)Q+=this[f+--L]*z;return z*=128,Q>=z&&(Q-=Math.pow(2,8*h)),Q},s.prototype.readInt8=function(f,h){return f=f>>>0,h||G(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},s.prototype.readInt16LE=function(f,h){f=f>>>0,h||G(f,2,this.length);var A=this[f]|this[f+1]<<8;return A&32768?A|4294901760:A},s.prototype.readInt16BE=function(f,h){f=f>>>0,h||G(f,2,this.length);var A=this[f+1]|this[f]<<8;return A&32768?A|4294901760:A},s.prototype.readInt32LE=function(f,h){return f=f>>>0,h||G(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},s.prototype.readInt32BE=function(f,h){return f=f>>>0,h||G(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},s.prototype.readFloatLE=function(f,h){return f=f>>>0,h||G(f,4,this.length),n.read(this,f,!0,23,4)},s.prototype.readFloatBE=function(f,h){return f=f>>>0,h||G(f,4,this.length),n.read(this,f,!1,23,4)},s.prototype.readDoubleLE=function(f,h){return f=f>>>0,h||G(f,8,this.length),n.read(this,f,!0,52,8)},s.prototype.readDoubleBE=function(f,h){return f=f>>>0,h||G(f,8,this.length),n.read(this,f,!1,52,8)};function H(E,f,h,A,L,z){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>L||fE.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(f,h,A,L){if(f=+f,h=h>>>0,A=A>>>0,!L){var z=Math.pow(2,8*A)-1;H(this,f,h,A,z,0)}var Q=1,se=0;for(this[h]=f&255;++se>>0,A=A>>>0,!L){var z=Math.pow(2,8*A)-1;H(this,f,h,A,z,0)}var Q=A-1,se=1;for(this[h+Q]=f&255;--Q>=0&&(se*=256);)this[h+Q]=f/se&255;return h+A},s.prototype.writeUint8=s.prototype.writeUInt8=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,1,255,0),this[h]=f&255,h+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,2,65535,0),this[h]=f&255,this[h+1]=f>>>8,h+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,2,65535,0),this[h]=f>>>8,this[h+1]=f&255,h+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,4,4294967295,0),this[h+3]=f>>>24,this[h+2]=f>>>16,this[h+1]=f>>>8,this[h]=f&255,h+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,4,4294967295,0),this[h]=f>>>24,this[h+1]=f>>>16,this[h+2]=f>>>8,this[h+3]=f&255,h+4},s.prototype.writeIntLE=function(f,h,A,L){if(f=+f,h=h>>>0,!L){var z=Math.pow(2,8*A-1);H(this,f,h,A,z-1,-z)}var Q=0,se=1,le=0;for(this[h]=f&255;++Q>0)-le&255;return h+A},s.prototype.writeIntBE=function(f,h,A,L){if(f=+f,h=h>>>0,!L){var z=Math.pow(2,8*A-1);H(this,f,h,A,z-1,-z)}var Q=A-1,se=1,le=0;for(this[h+Q]=f&255;--Q>=0&&(se*=256);)f<0&&le===0&&this[h+Q+1]!==0&&(le=1),this[h+Q]=(f/se>>0)-le&255;return h+A},s.prototype.writeInt8=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,1,127,-128),f<0&&(f=255+f+1),this[h]=f&255,h+1},s.prototype.writeInt16LE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,2,32767,-32768),this[h]=f&255,this[h+1]=f>>>8,h+2},s.prototype.writeInt16BE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,2,32767,-32768),this[h]=f>>>8,this[h+1]=f&255,h+2},s.prototype.writeInt32LE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,4,2147483647,-2147483648),this[h]=f&255,this[h+1]=f>>>8,this[h+2]=f>>>16,this[h+3]=f>>>24,h+4},s.prototype.writeInt32BE=function(f,h,A){return f=+f,h=h>>>0,A||H(this,f,h,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[h]=f>>>24,this[h+1]=f>>>16,this[h+2]=f>>>8,this[h+3]=f&255,h+4};function te(E,f,h,A,L,z){if(h+A>E.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function re(E,f,h,A,L){return f=+f,h=h>>>0,L||te(E,f,h,4),n.write(E,f,h,A,23,4),h+4}s.prototype.writeFloatLE=function(f,h,A){return re(this,f,h,!0,A)},s.prototype.writeFloatBE=function(f,h,A){return re(this,f,h,!1,A)};function g(E,f,h,A,L){return f=+f,h=h>>>0,L||te(E,f,h,8),n.write(E,f,h,A,52,8),h+8}s.prototype.writeDoubleLE=function(f,h,A){return g(this,f,h,!0,A)},s.prototype.writeDoubleBE=function(f,h,A){return g(this,f,h,!1,A)},s.prototype.copy=function(f,h,A,L){if(!s.isBuffer(f))throw new TypeError("argument should be a Buffer");if(A||(A=0),!L&&L!==0&&(L=this.length),h>=f.length&&(h=f.length),h||(h=0),L>0&&L=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),f.length-h>>0,A=A===void 0?this.length:A>>>0,f||(f=0);var Q;if(typeof f=="number")for(Q=h;Q55295&&h<57344){if(!L){if(h>56319){(f-=3)>-1&&z.push(239,191,189);continue}else if(Q+1===A){(f-=3)>-1&&z.push(239,191,189);continue}L=h;continue}if(h<56320){(f-=3)>-1&&z.push(239,191,189),L=h;continue}h=(L-55296<<10|h-56320)+65536}else L&&(f-=3)>-1&&z.push(239,191,189);if(L=null,h<128){if((f-=1)<0)break;z.push(h)}else if(h<2048){if((f-=2)<0)break;z.push(h>>6|192,h&63|128)}else if(h<65536){if((f-=3)<0)break;z.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((f-=4)<0)break;z.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return z}function X(E){for(var f=[],h=0;h>8,L=h%256,z.push(L),z.push(A);return z}function ne(E){return e.toByteArray(K(E))}function ee(E,f,h,A){for(var L=0;L=f.length||L>=E.length);++L)f[L+h]=E[L];return L}function me(E,f){return E instanceof f||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===f.name}function oe(E){return E!==E}var fe=function(){for(var E="0123456789abcdef",f=new Array(256),h=0;h<16;++h)for(var A=h*16,L=0;L<16;++L)f[A+L]=E[h]+E[L];return f}()})(Yt);var Ke={},Cl={get exports(){return Ke},set exports(t){Ke=t}},je=Cl.exports={},lt,ut;function Vr(){throw new Error("setTimeout has not been defined")}function Jr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?lt=setTimeout:lt=Vr}catch{lt=Vr}try{typeof clearTimeout=="function"?ut=clearTimeout:ut=Jr}catch{ut=Jr}})();function la(t){if(lt===setTimeout)return setTimeout(t,0);if((lt===Vr||!lt)&&setTimeout)return lt=setTimeout,setTimeout(t,0);try{return lt(t,0)}catch{try{return lt.call(null,t,0)}catch{return lt.call(this,t,0)}}}function Al(t){if(ut===clearTimeout)return clearTimeout(t);if((ut===Jr||!ut)&&clearTimeout)return ut=clearTimeout,clearTimeout(t);try{return ut(t)}catch{try{return ut.call(null,t)}catch{return ut.call(this,t)}}}var _t=[],cn=!1,Gt,jn=-1;function Tl(){!cn||!Gt||(cn=!1,Gt.length?_t=Gt.concat(_t):jn=-1,_t.length&&ua())}function ua(){if(!cn){var t=la(Tl);cn=!0;for(var e=_t.length;e;){for(Gt=_t,_t=[];++jn1)for(var n=1;nt;function Kn(t,e){for(const n in e)t[n]=e[n];return t}function ha(t){return t()}function Vi(){return Object.create(null)}function dt(t){t.forEach(ha)}function or(t){return typeof t=="function"}function nt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let qn;function Kr(t,e){return qn||(qn=document.createElement("a")),qn.href=e,t===qn.href}function Rl(t){return Object.keys(t).length===0}function Bl(t,...e){if(t==null)return ze;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function _i(t,e,n){t.$$.on_destroy.push(Bl(e,n))}function da(t,e,n,r){if(t){const o=pa(t,e,n,r);return t[0](o)}}function pa(t,e,n,r){return t[1]&&r?Kn(n.ctx.slice(),t[1](r(e))):n.ctx}function ga(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(e.dirty===void 0)return o;if(typeof o=="object"){const i=[],l=Math.max(e.dirty.length,o.length);for(let s=0;s32){const e=[],n=t.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),vi=va?t=>requestAnimationFrame(t):ze;const fn=new Set;function ya(t){fn.forEach(e=>{e.c(t)||(fn.delete(e),e.f())}),fn.size!==0&&vi(ya)}function Nl(t){let e;return fn.size===0&&vi(ya),{promise:new Promise(n=>{fn.add(e={c:t,f:n})}),abort(){fn.delete(e)}}}function q(t,e){t.appendChild(e)}function wa(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Ll(t){const e=Y("style");return $l(wa(t),e),e.sheet}function $l(t,e){return q(t.head||t,e),e.sheet}function ge(t,e,n){t.insertBefore(e,n||null)}function pe(t){t.parentNode&&t.parentNode.removeChild(t)}function yi(t,e){for(let n=0;nt.removeEventListener(e,n,r)}function gn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Gi(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function J(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Pl(t){return Array.from(t.childNodes)}function Ye(t,e){e=""+e,t.data!==e&&(t.data=e)}function Ul(t,e,n,r){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function ba(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}class Dl{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,r=null){this.e||(this.is_svg?this.e=Gr(n.nodeName):this.e=Y(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(r)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n>>0}function Hl(t,e){const n={stylesheet:Ll(e),rules:{}};return Gn.set(t,n),n}function Qi(t,e,n,r,o,i,l,s=0){const d=16.666/r;let y=`{ -`;for(let S=0;S<=1;S+=d){const I=e+(n-e)*i(S);y+=S*100+`%{${l(I,1-I)}} -`}const v=y+`100% {${l(n,1-n)}} -}`,B=`__svelte_${ql(v)}_${s}`,R=wa(t),{stylesheet:F,rules:O}=Gn.get(R)||Hl(R,t);O[B]||(O[B]=!0,F.insertRule(`@keyframes ${B} ${v}`,F.cssRules.length));const P=t.style.animation||"";return t.style.animation=`${P?`${P}, `:""}${B} ${r}ms linear ${o}ms 1 both`,Yn+=1,B}function Wl(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?i=>i.indexOf(e)<0:i=>i.indexOf("__svelte")===-1),o=n.length-r.length;o&&(t.style.animation=r.join(", "),Yn-=o,Yn||zl())}function zl(){vi(()=>{Yn||(Gn.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&pe(e)}),Gn.clear())})}let Fn;function Tn(t){Fn=t}function ar(){if(!Fn)throw new Error("Function called outside component initialization");return Fn}function wi(t){ar().$$.on_mount.push(t)}function sr(){const t=ar();return(e,n,{cancelable:r=!1}={})=>{const o=t.$$.callbacks[e];if(o){const i=ba(e,n,{cancelable:r});return o.slice().forEach(l=>{l.call(t,i)}),!i.defaultPrevented}return!0}}function jl(t,e){return ar().$$.context.set(t,e),e}function Vl(t){return ar().$$.context.get(t)}const sn=[],Ft=[];let hn=[];const Zi=[],Jl=Promise.resolve();let Yr=!1;function Kl(){Yr||(Yr=!0,Jl.then(xa))}function Qt(t){hn.push(t)}const Br=new Set;let on=0;function xa(){if(on!==0)return;const t=Fn;do{try{for(;ont.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),hn=e}let Cn;function Ql(){return Cn||(Cn=Promise.resolve(),Cn.then(()=>{Cn=null})),Cn}function Fr(t,e,n){t.dispatchEvent(ba(`${e?"intro":"outro"}${n}`))}const Vn=new Set;let vt;function Xt(){vt={r:0,c:[],p:vt}}function en(){vt.r||dt(vt.c),vt=vt.p}function ye(t,e){t&&t.i&&(Vn.delete(t),t.i(e))}function We(t,e,n,r){if(t&&t.o){if(Vn.has(t))return;Vn.add(t),vt.c.push(()=>{Vn.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const Zl={duration:0};function ln(t,e,n,r){const o={direction:"both"};let i=e(t,n,o),l=r?0:1,s=null,d=null,y=null;function v(){y&&Wl(t,y)}function B(F,O){const P=F.b-l;return O*=Math.abs(P),{a:l,b:F.b,d:P,duration:O,start:F.start,end:F.start+O,group:F.group}}function R(F){const{delay:O=0,duration:P=300,easing:S=fa,tick:I=ze,css:M}=i||Zl,x={start:Ol()+O,b:F};F||(x.group=vt,vt.r+=1),s||d?d=x:(M&&(v(),y=Qi(t,l,F,P,O,S,M)),F&&I(0,1),s=B(x,P),Qt(()=>Fr(t,F,"start")),Nl(T=>{if(d&&T>d.start&&(s=B(d,P),d=null,Fr(t,s.b,"start"),M&&(v(),y=Qi(t,l,s.b,s.duration,0,S,i.css))),s){if(T>=s.end)I(l=s.b,1-l),Fr(t,s.b,"end"),d||(s.b?v():--s.group.r||dt(s.group.c)),s=null;else if(T>=s.start){const $=T-s.start;l=s.a+s.d*S($/s.duration),I(l,1-l)}}return!!(s||d)}))}return{run(F){or(i)?Ql().then(()=>{i=i(o),R(F)}):R(F)},end(){v(),s=d=null}}}function Xl(t,e){const n={},r={},o={$$scope:1};let i=t.length;for(;i--;){const l=t[i],s=e[i];if(s){for(const d in l)d in s||(r[d]=1);for(const d in s)o[d]||(n[d]=s[d],o[d]=1);t[i]=s}else for(const d in l)o[d]=1}for(const l in r)l in n||(n[l]=void 0);return n}function eu(t){return typeof t=="object"&&t!==null?t:{}}function ht(t){t&&t.c()}function rt(t,e,n,r){const{fragment:o,after_update:i}=t.$$;o&&o.m(e,n),r||Qt(()=>{const l=t.$$.on_mount.map(ha).filter(or);t.$$.on_destroy?t.$$.on_destroy.push(...l):dt(l),t.$$.on_mount=[]}),i.forEach(Qt)}function it(t,e){const n=t.$$;n.fragment!==null&&(Yl(n.after_update),dt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function tu(t,e){t.$$.dirty[0]===-1&&(sn.push(t),Kl(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const O=F.length?F[0]:R;return y.ctx&&o(y.ctx[B],y.ctx[B]=O)&&(!y.skip_bound&&y.bound[B]&&y.bound[B](O),v&&tu(t,B)),R}):[],y.update(),v=!0,dt(y.before_update),y.fragment=r?r(y.ctx):!1,e.target){if(e.hydrate){const B=Pl(e.target);y.fragment&&y.fragment.l(B),B.forEach(pe)}else y.fragment&&y.fragment.c();e.intro&&ye(t.$$.fragment),rt(t,e.target,e.anchor,e.customElement),xa()}Tn(d)}class st{$destroy(){it(this,1),this.$destroy=ze}$on(e,n){if(!or(n))return ze;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(e){this.$$set&&!Rl(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var bi={},xe={};Object.defineProperty(xe,"__esModule",{value:!0});var Ma=xe.getLocalStorage=Oa=xe.getLocalStorageOrThrow=Fa=xe.getCrypto=Ba=xe.getCryptoOrThrow=Ra=xe.getLocation=Ia=xe.getLocationOrThrow=Ta=xe.getNavigator=Aa=xe.getNavigatorOrThrow=Ca=xe.getDocument=Sa=xe.getDocumentOrThrow=ka=xe.getFromWindowOrThrow=Ea=xe.getFromWindow=void 0;function tn(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}var Ea=xe.getFromWindow=tn;function Mn(t){const e=tn(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}var ka=xe.getFromWindowOrThrow=Mn;function nu(){return Mn("document")}var Sa=xe.getDocumentOrThrow=nu;function ru(){return tn("document")}var Ca=xe.getDocument=ru;function iu(){return Mn("navigator")}var Aa=xe.getNavigatorOrThrow=iu;function ou(){return tn("navigator")}var Ta=xe.getNavigator=ou;function au(){return Mn("location")}var Ia=xe.getLocationOrThrow=au;function su(){return tn("location")}var Ra=xe.getLocation=su;function lu(){return Mn("crypto")}var Ba=xe.getCryptoOrThrow=lu;function uu(){return tn("crypto")}var Fa=xe.getCrypto=uu;function cu(){return Mn("localStorage")}var Oa=xe.getLocalStorageOrThrow=cu;function fu(){return tn("localStorage")}Ma=xe.getLocalStorage=fu;Object.defineProperty(bi,"__esModule",{value:!0});var Na=bi.getWindowMetadata=void 0;const Xi=xe;function hu(){let t,e;try{t=Xi.getDocumentOrThrow(),e=Xi.getLocationOrThrow()}catch{return null}function n(){const B=t.getElementsByTagName("link"),R=[];for(let F=0;F-1){const S=O.getAttribute("href");if(S)if(S.toLowerCase().indexOf("https:")===-1&&S.toLowerCase().indexOf("http:")===-1&&S.indexOf("//")!==0){let I=e.protocol+"//"+e.host;if(S.indexOf("/")===0)I+=S;else{const M=e.pathname.split("/");M.pop();const x=M.join("/");I+=x+"/"+S}R.push(I)}else if(S.indexOf("//")===0){const I=e.protocol+S;R.push(I)}else R.push(S)}}return R}function r(...B){const R=t.getElementsByTagName("meta");for(let F=0;FO.getAttribute(S)).filter(S=>S?B.includes(S):!1);if(P.length&&P){const S=O.getAttribute("content");if(S)return S}}return""}function o(){let B=r("name","og:site_name","og:title","twitter:title");return B||(B=t.title),B}function i(){return r("description","og:description","twitter:description","keywords")}const l=o(),s=i(),d=e.origin,y=n();return{description:s,url:d,icons:y,name:l}}Na=bi.getWindowMetadata=hu;var du=globalThis&&globalThis.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new vu:typeof navigator<"u"?no(navigator.userAgent):ku()}function Mu(t){return t!==""&&bu.reduce(function(e,n){var r=n[0],o=n[1];if(e)return e;var i=o.exec(t);return!!i&&[r,i]},!1)}function no(t){var e=Mu(t);if(!e)return null;var n=e[0],r=e[1];if(n==="searchbot")return new _u;var o=r[1]&&r[1].split(/[._]/).slice(0,3);o?o.length1:!1}function Pa(){return ur()?La()||$a():!1}function Ua(){const t=lr();return t&&t.name?t.name.toLowerCase()==="node":!1}function Da(){return!Ua()&&!!qa()}const Cu=Ea,Au=ka,Tu=Sa,Iu=Ca,Ru=Aa,qa=Ta,Bu=Ia,Ha=Ra,Fu=Ba,Ou=Fa,Nu=Oa,cr=Ma;function Qr(){return Na()}function Lu(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}function $u(t){return typeof t=="string"?t:JSON.stringify(t)}const Wa=Lu,za=$u;function xi(t,e){const n=za(e),r=cr();r&&r.setItem(t,n)}function Mi(t){let e=null,n=null;const r=cr();return r&&(n=r.getItem(t)),e=n&&Wa(n),e}function Ei(t){const e=cr();e&&e.removeItem(t)}const Qn="WALLETCONNECT_DEEPLINK_CHOICE";function Pu(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function Uu(t){const e=t.href.split("?")[0];xi(Qn,Object.assign(Object.assign({},t),{href:e}))}function ja(t,e){return t.filter(n=>n.name.toLowerCase().includes(e.toLowerCase()))[0]}function Du(t,e){let n=t;return e&&(n=e.map(r=>ja(t,r)).filter(Boolean)),n}const Va="https://registry.walletconnect.com";function qu(){return Va+"/api/v2/wallets"}function Hu(){return Va+"/api/v2/dapps"}function Ja(t,e="mobile"){var n;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(n=t.image_url.sm)!==null&&n!==void 0?n:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function Wu(t,e="mobile"){return Object.values(t).filter(n=>!!n[e].universal||!!n[e].native).map(n=>Ja(n,e))}const zu=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:lr,detectOS:ur,formatIOSMobile:Pu,formatMobileRegistry:Wu,formatMobileRegistryEntry:Ja,getClientMeta:Qr,getCrypto:Ou,getCryptoOrThrow:Fu,getDappRegistryUrl:Hu,getDocument:Iu,getDocumentOrThrow:Tu,getFromWindow:Cu,getFromWindowOrThrow:Au,getLocal:Mi,getLocalStorage:cr,getLocalStorageOrThrow:Nu,getLocation:Ha,getLocationOrThrow:Bu,getMobileLinkRegistry:Du,getMobileRegistryEntry:ja,getNavigator:qa,getNavigatorOrThrow:Ru,getWalletRegistryUrl:qu,isAndroid:La,isBrowser:Da,isIOS:$a,isMobile:Pa,isNode:Ua,mobileLinkChoiceKey:Qn,removeLocal:Ei,safeJsonParse:Wa,safeJsonStringify:za,saveMobileLinkInfo:Uu,setLocal:xi},Symbol.toStringTag,{value:"Module"})),ju=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],Ka=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];var Zr={},Vu={get exports(){return Zr},set exports(t){Zr=t}};(function(t){(function(e,n){function r(m,a){if(!m)throw new Error(a||"Assertion failed")}function o(m,a){m.super_=a;var c=function(){};c.prototype=a.prototype,m.prototype=new c,m.prototype.constructor=m}function i(m,a,c){if(i.isBN(m))return m;this.negative=0,this.words=null,this.length=0,this.red=null,m!==null&&((a==="le"||a==="be")&&(c=a,a=10),this._init(m||0,a||10,c||"be"))}typeof e=="object"?e.exports=i:n.BN=i,i.BN=i,i.wordSize=26;var l;try{l=Yt.Buffer}catch{}i.isBN=function(a){return a instanceof i?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===i.wordSize&&Array.isArray(a.words)},i.max=function(a,c){return a.cmp(c)>0?a:c},i.min=function(a,c){return a.cmp(c)<0?a:c},i.prototype._init=function(a,c,p){if(typeof a=="number")return this._initNumber(a,c,p);if(typeof a=="object")return this._initArray(a,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),a=a.toString().replace(/\s+/g,"");var _=0;a[0]==="-"&&_++,c===16?this._parseHex(a,_):this._parseBase(a,c,_),a[0]==="-"&&(this.negative=1),this.strip(),p==="le"&&this._initArray(this.toArray(),c,p)},i.prototype._initNumber=function(a,c,p){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[a&67108863],this.length=1):a<4503599627370496?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(r(a<9007199254740992),this.words=[a&67108863,a/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},i.prototype._initArray=function(a,c,p){if(r(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var _=0;_=0;_-=3)C=a[_]|a[_-1]<<8|a[_-2]<<16,this.words[w]|=C<>>26-N&67108863,N+=24,N>=26&&(N-=26,w++);else if(p==="le")for(_=0,w=0;_>>26-N&67108863,N+=24,N>=26&&(N-=26,w++);return this.strip()};function s(m,a,c){for(var p=0,_=Math.min(m.length,c),w=a;w<_;w++){var C=m.charCodeAt(w)-48;p<<=4,C>=49&&C<=54?p|=C-49+10:C>=17&&C<=22?p|=C-17+10:p|=C&15}return p}i.prototype._parseHex=function(a,c){this.length=Math.ceil((a.length-c)/6),this.words=new Array(this.length);for(var p=0;p=c;p-=6)w=s(a,p,p+6),this.words[_]|=w<>>26-C&4194303,C+=24,C>=26&&(C-=26,_++);p+6!==c&&(w=s(a,c,p+6),this.words[_]|=w<>>26-C&4194303),this.strip()};function d(m,a,c,p){for(var _=0,w=Math.min(m.length,c),C=a;C=49?_+=N-49+10:N>=17?_+=N-17+10:_+=N}return _}i.prototype._parseBase=function(a,c,p){this.words=[0],this.length=1;for(var _=0,w=1;w<=67108863;w*=c)_++;_--,w=w/c|0;for(var C=a.length-p,N=C%_,b=Math.min(C,C-N)+p,u=0,k=p;k1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(a,c){a=a||10,c=c|0||1;var p;if(a===16||a==="hex"){p="";for(var _=0,w=0,C=0;C>>24-_&16777215,w!==0||C!==this.length-1?p=y[6-b.length]+b+p:p=b+p,_+=2,_>=26&&(_-=26,C--)}for(w!==0&&(p=w.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(a===(a|0)&&a>=2&&a<=36){var u=v[a],k=B[a];p="";var G=this.clone();for(G.negative=0;!G.isZero();){var H=G.modn(k).toString(a);G=G.idivn(k),G.isZero()?p=H+p:p=y[u-H.length]+H+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(a,c){return r(typeof l<"u"),this.toArrayLike(l,a,c)},i.prototype.toArray=function(a,c){return this.toArrayLike(Array,a,c)},i.prototype.toArrayLike=function(a,c,p){var _=this.byteLength(),w=p||Math.max(1,_);r(_<=w,"byte array longer than desired length"),r(w>0,"Requested array length <= 0"),this.strip();var C=c==="le",N=new a(w),b,u,k=this.clone();if(C){for(u=0;!k.isZero();u++)b=k.andln(255),k.iushrn(8),N[u]=b;for(;u=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},i.prototype._zeroBits=function(a){if(a===0)return 26;var c=a,p=0;return c&8191||(p+=13,c>>>=13),c&127||(p+=7,c>>>=7),c&15||(p+=4,c>>>=4),c&3||(p+=2,c>>>=2),c&1||p++,p},i.prototype.bitLength=function(){var a=this.words[this.length-1],c=this._countBits(a);return(this.length-1)*26+c};function R(m){for(var a=new Array(m.bitLength()),c=0;c>>_}return a}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,c=0;ca.length?this.clone().ior(a):a.clone().ior(this)},i.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},i.prototype.iuand=function(a){var c;this.length>a.length?c=a:c=this;for(var p=0;pa.length?this.clone().iand(a):a.clone().iand(this)},i.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},i.prototype.iuxor=function(a){var c,p;this.length>a.length?(c=this,p=a):(c=a,p=this);for(var _=0;_a.length?this.clone().ixor(a):a.clone().ixor(this)},i.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},i.prototype.inotn=function(a){r(typeof a=="number"&&a>=0);var c=Math.ceil(a/26)|0,p=a%26;this._expand(c),p>0&&c--;for(var _=0;_0&&(this.words[_]=~this.words[_]&67108863>>26-p),this.strip()},i.prototype.notn=function(a){return this.clone().inotn(a)},i.prototype.setn=function(a,c){r(typeof a=="number"&&a>=0);var p=a/26|0,_=a%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<_:this.words[p]=this.words[p]&~(1<<_),this.strip()},i.prototype.iadd=function(a){var c;if(this.negative!==0&&a.negative===0)return this.negative=0,c=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,c=this.isub(a),a.negative=1,c._normSign();var p,_;this.length>a.length?(p=this,_=a):(p=a,_=this);for(var w=0,C=0;C<_.length;C++)c=(p.words[C]|0)+(_.words[C]|0)+w,this.words[C]=c&67108863,w=c>>>26;for(;w!==0&&C>>26;if(this.length=p.length,w!==0)this.words[this.length]=w,this.length++;else if(p!==this)for(;Ca.length?this.clone().iadd(a):a.clone().iadd(this)},i.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var c=this.iadd(a);return a.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var p=this.cmp(a);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var _,w;p>0?(_=this,w=a):(_=a,w=this);for(var C=0,N=0;N>26,this.words[N]=c&67108863;for(;C!==0&&N<_.length;N++)c=(_.words[N]|0)+C,C=c>>26,this.words[N]=c&67108863;if(C===0&&N<_.length&&_!==this)for(;N<_.length;N++)this.words[N]=_.words[N];return this.length=Math.max(this.length,N),_!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(a){return this.clone().isub(a)};function F(m,a,c){c.negative=a.negative^m.negative;var p=m.length+a.length|0;c.length=p,p=p-1|0;var _=m.words[0]|0,w=a.words[0]|0,C=_*w,N=C&67108863,b=C/67108864|0;c.words[0]=N;for(var u=1;u>>26,G=b&67108863,H=Math.min(u,a.length-1),te=Math.max(0,u-m.length+1);te<=H;te++){var re=u-te|0;_=m.words[re]|0,w=a.words[te]|0,C=_*w+G,k+=C/67108864|0,G=C&67108863}c.words[u]=G|0,b=k|0}return b!==0?c.words[u]=b|0:c.length--,c.strip()}var O=function(a,c,p){var _=a.words,w=c.words,C=p.words,N=0,b,u,k,G=_[0]|0,H=G&8191,te=G>>>13,re=_[1]|0,g=re&8191,D=re>>>13,K=_[2]|0,V=K&8191,X=K>>>13,ae=_[3]|0,ne=ae&8191,ee=ae>>>13,me=_[4]|0,oe=me&8191,fe=me>>>13,E=_[5]|0,f=E&8191,h=E>>>13,A=_[6]|0,L=A&8191,z=A>>>13,Q=_[7]|0,se=Q&8191,le=Q>>>13,ve=_[8]|0,de=ve&8191,ue=ve>>>13,Xe=_[9]|0,we=Xe&8191,be=Xe>>>13,Pt=w[0]|0,Me=Pt&8191,Ee=Pt>>>13,Ut=w[1]|0,ke=Ut&8191,Se=Ut>>>13,Dt=w[2]|0,Ce=Dt&8191,Ae=Dt>>>13,qt=w[3]|0,Te=qt&8191,Ie=qt>>>13,Ht=w[4]|0,Re=Ht&8191,Be=Ht>>>13,Wt=w[5]|0,Fe=Wt&8191,Oe=Wt>>>13,zt=w[6]|0,Ne=zt&8191,Le=zt>>>13,jt=w[7]|0,$e=jt&8191,Pe=jt>>>13,Vt=w[8]|0,Ue=Vt&8191,De=Vt>>>13,Jt=w[9]|0,qe=Jt&8191,He=Jt>>>13;p.negative=a.negative^c.negative,p.length=19,b=Math.imul(H,Me),u=Math.imul(H,Ee),u=u+Math.imul(te,Me)|0,k=Math.imul(te,Ee);var Mt=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,b=Math.imul(g,Me),u=Math.imul(g,Ee),u=u+Math.imul(D,Me)|0,k=Math.imul(D,Ee),b=b+Math.imul(H,ke)|0,u=u+Math.imul(H,Se)|0,u=u+Math.imul(te,ke)|0,k=k+Math.imul(te,Se)|0;var Et=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Et>>>26)|0,Et&=67108863,b=Math.imul(V,Me),u=Math.imul(V,Ee),u=u+Math.imul(X,Me)|0,k=Math.imul(X,Ee),b=b+Math.imul(g,ke)|0,u=u+Math.imul(g,Se)|0,u=u+Math.imul(D,ke)|0,k=k+Math.imul(D,Se)|0,b=b+Math.imul(H,Ce)|0,u=u+Math.imul(H,Ae)|0,u=u+Math.imul(te,Ce)|0,k=k+Math.imul(te,Ae)|0;var kt=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(kt>>>26)|0,kt&=67108863,b=Math.imul(ne,Me),u=Math.imul(ne,Ee),u=u+Math.imul(ee,Me)|0,k=Math.imul(ee,Ee),b=b+Math.imul(V,ke)|0,u=u+Math.imul(V,Se)|0,u=u+Math.imul(X,ke)|0,k=k+Math.imul(X,Se)|0,b=b+Math.imul(g,Ce)|0,u=u+Math.imul(g,Ae)|0,u=u+Math.imul(D,Ce)|0,k=k+Math.imul(D,Ae)|0,b=b+Math.imul(H,Te)|0,u=u+Math.imul(H,Ie)|0,u=u+Math.imul(te,Te)|0,k=k+Math.imul(te,Ie)|0;var St=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(St>>>26)|0,St&=67108863,b=Math.imul(oe,Me),u=Math.imul(oe,Ee),u=u+Math.imul(fe,Me)|0,k=Math.imul(fe,Ee),b=b+Math.imul(ne,ke)|0,u=u+Math.imul(ne,Se)|0,u=u+Math.imul(ee,ke)|0,k=k+Math.imul(ee,Se)|0,b=b+Math.imul(V,Ce)|0,u=u+Math.imul(V,Ae)|0,u=u+Math.imul(X,Ce)|0,k=k+Math.imul(X,Ae)|0,b=b+Math.imul(g,Te)|0,u=u+Math.imul(g,Ie)|0,u=u+Math.imul(D,Te)|0,k=k+Math.imul(D,Ie)|0,b=b+Math.imul(H,Re)|0,u=u+Math.imul(H,Be)|0,u=u+Math.imul(te,Re)|0,k=k+Math.imul(te,Be)|0;var Ct=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,b=Math.imul(f,Me),u=Math.imul(f,Ee),u=u+Math.imul(h,Me)|0,k=Math.imul(h,Ee),b=b+Math.imul(oe,ke)|0,u=u+Math.imul(oe,Se)|0,u=u+Math.imul(fe,ke)|0,k=k+Math.imul(fe,Se)|0,b=b+Math.imul(ne,Ce)|0,u=u+Math.imul(ne,Ae)|0,u=u+Math.imul(ee,Ce)|0,k=k+Math.imul(ee,Ae)|0,b=b+Math.imul(V,Te)|0,u=u+Math.imul(V,Ie)|0,u=u+Math.imul(X,Te)|0,k=k+Math.imul(X,Ie)|0,b=b+Math.imul(g,Re)|0,u=u+Math.imul(g,Be)|0,u=u+Math.imul(D,Re)|0,k=k+Math.imul(D,Be)|0,b=b+Math.imul(H,Fe)|0,u=u+Math.imul(H,Oe)|0,u=u+Math.imul(te,Fe)|0,k=k+Math.imul(te,Oe)|0;var At=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(At>>>26)|0,At&=67108863,b=Math.imul(L,Me),u=Math.imul(L,Ee),u=u+Math.imul(z,Me)|0,k=Math.imul(z,Ee),b=b+Math.imul(f,ke)|0,u=u+Math.imul(f,Se)|0,u=u+Math.imul(h,ke)|0,k=k+Math.imul(h,Se)|0,b=b+Math.imul(oe,Ce)|0,u=u+Math.imul(oe,Ae)|0,u=u+Math.imul(fe,Ce)|0,k=k+Math.imul(fe,Ae)|0,b=b+Math.imul(ne,Te)|0,u=u+Math.imul(ne,Ie)|0,u=u+Math.imul(ee,Te)|0,k=k+Math.imul(ee,Ie)|0,b=b+Math.imul(V,Re)|0,u=u+Math.imul(V,Be)|0,u=u+Math.imul(X,Re)|0,k=k+Math.imul(X,Be)|0,b=b+Math.imul(g,Fe)|0,u=u+Math.imul(g,Oe)|0,u=u+Math.imul(D,Fe)|0,k=k+Math.imul(D,Oe)|0,b=b+Math.imul(H,Ne)|0,u=u+Math.imul(H,Le)|0,u=u+Math.imul(te,Ne)|0,k=k+Math.imul(te,Le)|0;var Tt=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,b=Math.imul(se,Me),u=Math.imul(se,Ee),u=u+Math.imul(le,Me)|0,k=Math.imul(le,Ee),b=b+Math.imul(L,ke)|0,u=u+Math.imul(L,Se)|0,u=u+Math.imul(z,ke)|0,k=k+Math.imul(z,Se)|0,b=b+Math.imul(f,Ce)|0,u=u+Math.imul(f,Ae)|0,u=u+Math.imul(h,Ce)|0,k=k+Math.imul(h,Ae)|0,b=b+Math.imul(oe,Te)|0,u=u+Math.imul(oe,Ie)|0,u=u+Math.imul(fe,Te)|0,k=k+Math.imul(fe,Ie)|0,b=b+Math.imul(ne,Re)|0,u=u+Math.imul(ne,Be)|0,u=u+Math.imul(ee,Re)|0,k=k+Math.imul(ee,Be)|0,b=b+Math.imul(V,Fe)|0,u=u+Math.imul(V,Oe)|0,u=u+Math.imul(X,Fe)|0,k=k+Math.imul(X,Oe)|0,b=b+Math.imul(g,Ne)|0,u=u+Math.imul(g,Le)|0,u=u+Math.imul(D,Ne)|0,k=k+Math.imul(D,Le)|0,b=b+Math.imul(H,$e)|0,u=u+Math.imul(H,Pe)|0,u=u+Math.imul(te,$e)|0,k=k+Math.imul(te,Pe)|0;var It=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(It>>>26)|0,It&=67108863,b=Math.imul(de,Me),u=Math.imul(de,Ee),u=u+Math.imul(ue,Me)|0,k=Math.imul(ue,Ee),b=b+Math.imul(se,ke)|0,u=u+Math.imul(se,Se)|0,u=u+Math.imul(le,ke)|0,k=k+Math.imul(le,Se)|0,b=b+Math.imul(L,Ce)|0,u=u+Math.imul(L,Ae)|0,u=u+Math.imul(z,Ce)|0,k=k+Math.imul(z,Ae)|0,b=b+Math.imul(f,Te)|0,u=u+Math.imul(f,Ie)|0,u=u+Math.imul(h,Te)|0,k=k+Math.imul(h,Ie)|0,b=b+Math.imul(oe,Re)|0,u=u+Math.imul(oe,Be)|0,u=u+Math.imul(fe,Re)|0,k=k+Math.imul(fe,Be)|0,b=b+Math.imul(ne,Fe)|0,u=u+Math.imul(ne,Oe)|0,u=u+Math.imul(ee,Fe)|0,k=k+Math.imul(ee,Oe)|0,b=b+Math.imul(V,Ne)|0,u=u+Math.imul(V,Le)|0,u=u+Math.imul(X,Ne)|0,k=k+Math.imul(X,Le)|0,b=b+Math.imul(g,$e)|0,u=u+Math.imul(g,Pe)|0,u=u+Math.imul(D,$e)|0,k=k+Math.imul(D,Pe)|0,b=b+Math.imul(H,Ue)|0,u=u+Math.imul(H,De)|0,u=u+Math.imul(te,Ue)|0,k=k+Math.imul(te,De)|0;var wr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(wr>>>26)|0,wr&=67108863,b=Math.imul(we,Me),u=Math.imul(we,Ee),u=u+Math.imul(be,Me)|0,k=Math.imul(be,Ee),b=b+Math.imul(de,ke)|0,u=u+Math.imul(de,Se)|0,u=u+Math.imul(ue,ke)|0,k=k+Math.imul(ue,Se)|0,b=b+Math.imul(se,Ce)|0,u=u+Math.imul(se,Ae)|0,u=u+Math.imul(le,Ce)|0,k=k+Math.imul(le,Ae)|0,b=b+Math.imul(L,Te)|0,u=u+Math.imul(L,Ie)|0,u=u+Math.imul(z,Te)|0,k=k+Math.imul(z,Ie)|0,b=b+Math.imul(f,Re)|0,u=u+Math.imul(f,Be)|0,u=u+Math.imul(h,Re)|0,k=k+Math.imul(h,Be)|0,b=b+Math.imul(oe,Fe)|0,u=u+Math.imul(oe,Oe)|0,u=u+Math.imul(fe,Fe)|0,k=k+Math.imul(fe,Oe)|0,b=b+Math.imul(ne,Ne)|0,u=u+Math.imul(ne,Le)|0,u=u+Math.imul(ee,Ne)|0,k=k+Math.imul(ee,Le)|0,b=b+Math.imul(V,$e)|0,u=u+Math.imul(V,Pe)|0,u=u+Math.imul(X,$e)|0,k=k+Math.imul(X,Pe)|0,b=b+Math.imul(g,Ue)|0,u=u+Math.imul(g,De)|0,u=u+Math.imul(D,Ue)|0,k=k+Math.imul(D,De)|0,b=b+Math.imul(H,qe)|0,u=u+Math.imul(H,He)|0,u=u+Math.imul(te,qe)|0,k=k+Math.imul(te,He)|0;var br=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(br>>>26)|0,br&=67108863,b=Math.imul(we,ke),u=Math.imul(we,Se),u=u+Math.imul(be,ke)|0,k=Math.imul(be,Se),b=b+Math.imul(de,Ce)|0,u=u+Math.imul(de,Ae)|0,u=u+Math.imul(ue,Ce)|0,k=k+Math.imul(ue,Ae)|0,b=b+Math.imul(se,Te)|0,u=u+Math.imul(se,Ie)|0,u=u+Math.imul(le,Te)|0,k=k+Math.imul(le,Ie)|0,b=b+Math.imul(L,Re)|0,u=u+Math.imul(L,Be)|0,u=u+Math.imul(z,Re)|0,k=k+Math.imul(z,Be)|0,b=b+Math.imul(f,Fe)|0,u=u+Math.imul(f,Oe)|0,u=u+Math.imul(h,Fe)|0,k=k+Math.imul(h,Oe)|0,b=b+Math.imul(oe,Ne)|0,u=u+Math.imul(oe,Le)|0,u=u+Math.imul(fe,Ne)|0,k=k+Math.imul(fe,Le)|0,b=b+Math.imul(ne,$e)|0,u=u+Math.imul(ne,Pe)|0,u=u+Math.imul(ee,$e)|0,k=k+Math.imul(ee,Pe)|0,b=b+Math.imul(V,Ue)|0,u=u+Math.imul(V,De)|0,u=u+Math.imul(X,Ue)|0,k=k+Math.imul(X,De)|0,b=b+Math.imul(g,qe)|0,u=u+Math.imul(g,He)|0,u=u+Math.imul(D,qe)|0,k=k+Math.imul(D,He)|0;var xr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(xr>>>26)|0,xr&=67108863,b=Math.imul(we,Ce),u=Math.imul(we,Ae),u=u+Math.imul(be,Ce)|0,k=Math.imul(be,Ae),b=b+Math.imul(de,Te)|0,u=u+Math.imul(de,Ie)|0,u=u+Math.imul(ue,Te)|0,k=k+Math.imul(ue,Ie)|0,b=b+Math.imul(se,Re)|0,u=u+Math.imul(se,Be)|0,u=u+Math.imul(le,Re)|0,k=k+Math.imul(le,Be)|0,b=b+Math.imul(L,Fe)|0,u=u+Math.imul(L,Oe)|0,u=u+Math.imul(z,Fe)|0,k=k+Math.imul(z,Oe)|0,b=b+Math.imul(f,Ne)|0,u=u+Math.imul(f,Le)|0,u=u+Math.imul(h,Ne)|0,k=k+Math.imul(h,Le)|0,b=b+Math.imul(oe,$e)|0,u=u+Math.imul(oe,Pe)|0,u=u+Math.imul(fe,$e)|0,k=k+Math.imul(fe,Pe)|0,b=b+Math.imul(ne,Ue)|0,u=u+Math.imul(ne,De)|0,u=u+Math.imul(ee,Ue)|0,k=k+Math.imul(ee,De)|0,b=b+Math.imul(V,qe)|0,u=u+Math.imul(V,He)|0,u=u+Math.imul(X,qe)|0,k=k+Math.imul(X,He)|0;var Mr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,b=Math.imul(we,Te),u=Math.imul(we,Ie),u=u+Math.imul(be,Te)|0,k=Math.imul(be,Ie),b=b+Math.imul(de,Re)|0,u=u+Math.imul(de,Be)|0,u=u+Math.imul(ue,Re)|0,k=k+Math.imul(ue,Be)|0,b=b+Math.imul(se,Fe)|0,u=u+Math.imul(se,Oe)|0,u=u+Math.imul(le,Fe)|0,k=k+Math.imul(le,Oe)|0,b=b+Math.imul(L,Ne)|0,u=u+Math.imul(L,Le)|0,u=u+Math.imul(z,Ne)|0,k=k+Math.imul(z,Le)|0,b=b+Math.imul(f,$e)|0,u=u+Math.imul(f,Pe)|0,u=u+Math.imul(h,$e)|0,k=k+Math.imul(h,Pe)|0,b=b+Math.imul(oe,Ue)|0,u=u+Math.imul(oe,De)|0,u=u+Math.imul(fe,Ue)|0,k=k+Math.imul(fe,De)|0,b=b+Math.imul(ne,qe)|0,u=u+Math.imul(ne,He)|0,u=u+Math.imul(ee,qe)|0,k=k+Math.imul(ee,He)|0;var Er=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Er>>>26)|0,Er&=67108863,b=Math.imul(we,Re),u=Math.imul(we,Be),u=u+Math.imul(be,Re)|0,k=Math.imul(be,Be),b=b+Math.imul(de,Fe)|0,u=u+Math.imul(de,Oe)|0,u=u+Math.imul(ue,Fe)|0,k=k+Math.imul(ue,Oe)|0,b=b+Math.imul(se,Ne)|0,u=u+Math.imul(se,Le)|0,u=u+Math.imul(le,Ne)|0,k=k+Math.imul(le,Le)|0,b=b+Math.imul(L,$e)|0,u=u+Math.imul(L,Pe)|0,u=u+Math.imul(z,$e)|0,k=k+Math.imul(z,Pe)|0,b=b+Math.imul(f,Ue)|0,u=u+Math.imul(f,De)|0,u=u+Math.imul(h,Ue)|0,k=k+Math.imul(h,De)|0,b=b+Math.imul(oe,qe)|0,u=u+Math.imul(oe,He)|0,u=u+Math.imul(fe,qe)|0,k=k+Math.imul(fe,He)|0;var kr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(kr>>>26)|0,kr&=67108863,b=Math.imul(we,Fe),u=Math.imul(we,Oe),u=u+Math.imul(be,Fe)|0,k=Math.imul(be,Oe),b=b+Math.imul(de,Ne)|0,u=u+Math.imul(de,Le)|0,u=u+Math.imul(ue,Ne)|0,k=k+Math.imul(ue,Le)|0,b=b+Math.imul(se,$e)|0,u=u+Math.imul(se,Pe)|0,u=u+Math.imul(le,$e)|0,k=k+Math.imul(le,Pe)|0,b=b+Math.imul(L,Ue)|0,u=u+Math.imul(L,De)|0,u=u+Math.imul(z,Ue)|0,k=k+Math.imul(z,De)|0,b=b+Math.imul(f,qe)|0,u=u+Math.imul(f,He)|0,u=u+Math.imul(h,qe)|0,k=k+Math.imul(h,He)|0;var Sr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,b=Math.imul(we,Ne),u=Math.imul(we,Le),u=u+Math.imul(be,Ne)|0,k=Math.imul(be,Le),b=b+Math.imul(de,$e)|0,u=u+Math.imul(de,Pe)|0,u=u+Math.imul(ue,$e)|0,k=k+Math.imul(ue,Pe)|0,b=b+Math.imul(se,Ue)|0,u=u+Math.imul(se,De)|0,u=u+Math.imul(le,Ue)|0,k=k+Math.imul(le,De)|0,b=b+Math.imul(L,qe)|0,u=u+Math.imul(L,He)|0,u=u+Math.imul(z,qe)|0,k=k+Math.imul(z,He)|0;var Cr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,b=Math.imul(we,$e),u=Math.imul(we,Pe),u=u+Math.imul(be,$e)|0,k=Math.imul(be,Pe),b=b+Math.imul(de,Ue)|0,u=u+Math.imul(de,De)|0,u=u+Math.imul(ue,Ue)|0,k=k+Math.imul(ue,De)|0,b=b+Math.imul(se,qe)|0,u=u+Math.imul(se,He)|0,u=u+Math.imul(le,qe)|0,k=k+Math.imul(le,He)|0;var Ar=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,b=Math.imul(we,Ue),u=Math.imul(we,De),u=u+Math.imul(be,Ue)|0,k=Math.imul(be,De),b=b+Math.imul(de,qe)|0,u=u+Math.imul(de,He)|0,u=u+Math.imul(ue,qe)|0,k=k+Math.imul(ue,He)|0;var Tr=(N+b|0)+((u&8191)<<13)|0;N=(k+(u>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,b=Math.imul(we,qe),u=Math.imul(we,He),u=u+Math.imul(be,qe)|0,k=Math.imul(be,He);var Ir=(N+b|0)+((u&8191)<<13)|0;return N=(k+(u>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,C[0]=Mt,C[1]=Et,C[2]=kt,C[3]=St,C[4]=Ct,C[5]=At,C[6]=Tt,C[7]=It,C[8]=wr,C[9]=br,C[10]=xr,C[11]=Mr,C[12]=Er,C[13]=kr,C[14]=Sr,C[15]=Cr,C[16]=Ar,C[17]=Tr,C[18]=Ir,N!==0&&(C[19]=N,p.length++),p};Math.imul||(O=F);function P(m,a,c){c.negative=a.negative^m.negative,c.length=m.length+a.length;for(var p=0,_=0,w=0;w>>26)|0,_+=C>>>26,C&=67108863}c.words[w]=N,p=C,C=_}return p!==0?c.words[w]=p:c.length--,c.strip()}function S(m,a,c){var p=new I;return p.mulp(m,a,c)}i.prototype.mulTo=function(a,c){var p,_=this.length+a.length;return this.length===10&&a.length===10?p=O(this,a,c):_<63?p=F(this,a,c):_<1024?p=P(this,a,c):p=S(this,a,c),p};function I(m,a){this.x=m,this.y=a}I.prototype.makeRBT=function(a){for(var c=new Array(a),p=i.prototype._countBits(a)-1,_=0;_>=1;return _},I.prototype.permute=function(a,c,p,_,w,C){for(var N=0;N>>1)w++;return 1<>>13,p[2*C+1]=w&8191,w=w>>>13;for(C=2*c;C<_;++C)p[C]=0;r(w===0),r((w&-8192)===0)},I.prototype.stub=function(a){for(var c=new Array(a),p=0;p>=26,c+=_/67108864|0,c+=w>>>26,this.words[p]=w&67108863}return c!==0&&(this.words[p]=c,this.length++),this},i.prototype.muln=function(a){return this.clone().imuln(a)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(a){var c=R(a);if(c.length===0)return new i(1);for(var p=this,_=0;_=0);var c=a%26,p=(a-c)/26,_=67108863>>>26-c<<26-c,w;if(c!==0){var C=0;for(w=0;w>>26-c}C&&(this.words[w]=C,this.length++)}if(p!==0){for(w=this.length-1;w>=0;w--)this.words[w+p]=this.words[w];for(w=0;w=0);var _;c?_=(c-c%26)/26:_=0;var w=a%26,C=Math.min((a-w)/26,this.length),N=67108863^67108863>>>w<C)for(this.length-=C,u=0;u=0&&(k!==0||u>=_);u--){var G=this.words[u]|0;this.words[u]=k<<26-w|G>>>w,k=G&N}return b&&k!==0&&(b.words[b.length++]=k),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(a,c,p){return r(this.negative===0),this.iushrn(a,c,p)},i.prototype.shln=function(a){return this.clone().ishln(a)},i.prototype.ushln=function(a){return this.clone().iushln(a)},i.prototype.shrn=function(a){return this.clone().ishrn(a)},i.prototype.ushrn=function(a){return this.clone().iushrn(a)},i.prototype.testn=function(a){r(typeof a=="number"&&a>=0);var c=a%26,p=(a-c)/26,_=1<=0);var c=a%26,p=(a-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var _=67108863^67108863>>>c<=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},i.prototype.isubn=function(a){if(r(typeof a=="number"),r(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c>26)-(b/67108864|0),this.words[w+p]=C&67108863}for(;w>26,this.words[w+p]=C&67108863;if(N===0)return this.strip();for(r(N===-1),N=0,w=0;w>26,this.words[w]=C&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(a,c){var p=this.length-a.length,_=this.clone(),w=a,C=w.words[w.length-1]|0,N=this._countBits(C);p=26-N,p!==0&&(w=w.ushln(p),_.iushln(p),C=w.words[w.length-1]|0);var b=_.length-w.length,u;if(c!=="mod"){u=new i(null),u.length=b+1,u.words=new Array(u.length);for(var k=0;k=0;H--){var te=(_.words[w.length+H]|0)*67108864+(_.words[w.length+H-1]|0);for(te=Math.min(te/C|0,67108863),_._ishlnsubmul(w,te,H);_.negative!==0;)te--,_.negative=0,_._ishlnsubmul(w,1,H),_.isZero()||(_.negative^=1);u&&(u.words[H]=te)}return u&&u.strip(),_.strip(),c!=="div"&&p!==0&&_.iushrn(p),{div:u||null,mod:_}},i.prototype.divmod=function(a,c,p){if(r(!a.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var _,w,C;return this.negative!==0&&a.negative===0?(C=this.neg().divmod(a,c),c!=="mod"&&(_=C.div.neg()),c!=="div"&&(w=C.mod.neg(),p&&w.negative!==0&&w.iadd(a)),{div:_,mod:w}):this.negative===0&&a.negative!==0?(C=this.divmod(a.neg(),c),c!=="mod"&&(_=C.div.neg()),{div:_,mod:C.mod}):this.negative&a.negative?(C=this.neg().divmod(a.neg(),c),c!=="div"&&(w=C.mod.neg(),p&&w.negative!==0&&w.isub(a)),{div:C.div,mod:w}):a.length>this.length||this.cmp(a)<0?{div:new i(0),mod:this}:a.length===1?c==="div"?{div:this.divn(a.words[0]),mod:null}:c==="mod"?{div:null,mod:new i(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new i(this.modn(a.words[0]))}:this._wordDiv(a,c)},i.prototype.div=function(a){return this.divmod(a,"div",!1).div},i.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},i.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},i.prototype.divRound=function(a){var c=this.divmod(a);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(a):c.mod,_=a.ushrn(1),w=a.andln(1),C=p.cmp(_);return C<0||w===1&&C===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},i.prototype.modn=function(a){r(a<=67108863);for(var c=(1<<26)%a,p=0,_=this.length-1;_>=0;_--)p=(c*p+(this.words[_]|0))%a;return p},i.prototype.idivn=function(a){r(a<=67108863);for(var c=0,p=this.length-1;p>=0;p--){var _=(this.words[p]|0)+c*67108864;this.words[p]=_/a|0,c=_%a}return this.strip()},i.prototype.divn=function(a){return this.clone().idivn(a)},i.prototype.egcd=function(a){r(a.negative===0),r(!a.isZero());var c=this,p=a.clone();c.negative!==0?c=c.umod(a):c=c.clone();for(var _=new i(1),w=new i(0),C=new i(0),N=new i(1),b=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++b;for(var u=p.clone(),k=c.clone();!c.isZero();){for(var G=0,H=1;!(c.words[0]&H)&&G<26;++G,H<<=1);if(G>0)for(c.iushrn(G);G-- >0;)(_.isOdd()||w.isOdd())&&(_.iadd(u),w.isub(k)),_.iushrn(1),w.iushrn(1);for(var te=0,re=1;!(p.words[0]&re)&&te<26;++te,re<<=1);if(te>0)for(p.iushrn(te);te-- >0;)(C.isOdd()||N.isOdd())&&(C.iadd(u),N.isub(k)),C.iushrn(1),N.iushrn(1);c.cmp(p)>=0?(c.isub(p),_.isub(C),w.isub(N)):(p.isub(c),C.isub(_),N.isub(w))}return{a:C,b:N,gcd:p.iushln(b)}},i.prototype._invmp=function(a){r(a.negative===0),r(!a.isZero());var c=this,p=a.clone();c.negative!==0?c=c.umod(a):c=c.clone();for(var _=new i(1),w=new i(0),C=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var N=0,b=1;!(c.words[0]&b)&&N<26;++N,b<<=1);if(N>0)for(c.iushrn(N);N-- >0;)_.isOdd()&&_.iadd(C),_.iushrn(1);for(var u=0,k=1;!(p.words[0]&k)&&u<26;++u,k<<=1);if(u>0)for(p.iushrn(u);u-- >0;)w.isOdd()&&w.iadd(C),w.iushrn(1);c.cmp(p)>=0?(c.isub(p),_.isub(w)):(p.isub(c),w.isub(_))}var G;return c.cmpn(1)===0?G=_:G=w,G.cmpn(0)<0&&G.iadd(a),G},i.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var c=this.clone(),p=a.clone();c.negative=0,p.negative=0;for(var _=0;c.isEven()&&p.isEven();_++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var w=c.cmp(p);if(w<0){var C=c;c=p,p=C}else if(w===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(_)},i.prototype.invm=function(a){return this.egcd(a).a.umod(a)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(a){return this.words[0]&a},i.prototype.bincn=function(a){r(typeof a=="number");var c=a%26,p=(a-c)/26,_=1<>>26,N&=67108863,this.words[C]=N}return w!==0&&(this.words[C]=w,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(a){var c=a<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this.strip();var p;if(this.length>1)p=1;else{c&&(a=-a),r(a<=67108863,"Number is too big");var _=this.words[0]|0;p=_===a?0:_a.length)return 1;if(this.length=0;p--){var _=this.words[p]|0,w=a.words[p]|0;if(_!==w){_w&&(c=1);break}}return c},i.prototype.gtn=function(a){return this.cmpn(a)===1},i.prototype.gt=function(a){return this.cmp(a)===1},i.prototype.gten=function(a){return this.cmpn(a)>=0},i.prototype.gte=function(a){return this.cmp(a)>=0},i.prototype.ltn=function(a){return this.cmpn(a)===-1},i.prototype.lt=function(a){return this.cmp(a)===-1},i.prototype.lten=function(a){return this.cmpn(a)<=0},i.prototype.lte=function(a){return this.cmp(a)<=0},i.prototype.eqn=function(a){return this.cmpn(a)===0},i.prototype.eq=function(a){return this.cmp(a)===0},i.red=function(a){return new W(a)},i.prototype.toRed=function(a){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(a){return this.red=a,this},i.prototype.forceRed=function(a){return r(!this.red,"Already a number in reduction context"),this._forceRed(a)},i.prototype.redAdd=function(a){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},i.prototype.redIAdd=function(a){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},i.prototype.redSub=function(a){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},i.prototype.redISub=function(a){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},i.prototype.redShl=function(a){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},i.prototype.redMul=function(a){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},i.prototype.redIMul=function(a){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(a){return r(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var M={k256:null,p224:null,p192:null,p25519:null};function x(m,a){this.name=m,this.p=new i(a,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}x.prototype._tmp=function(){var a=new i(null);return a.words=new Array(Math.ceil(this.n/13)),a},x.prototype.ireduce=function(a){var c=a,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var _=p0?c.isub(this.p):c.strip(),c},x.prototype.split=function(a,c){a.iushrn(this.n,0,c)},x.prototype.imulK=function(a){return a.imul(this.k)};function T(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(T,x),T.prototype.split=function(a,c){for(var p=4194303,_=Math.min(a.length,9),w=0;w<_;w++)c.words[w]=a.words[w];if(c.length=_,a.length<=9){a.words[0]=0,a.length=1;return}var C=a.words[9];for(c.words[c.length++]=C&p,w=10;w>>22,C=N}C>>>=22,a.words[w-10]=C,C===0&&a.length>10?a.length-=10:a.length-=9},T.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var c=0,p=0;p>>=26,a.words[p]=w,c=_}return c!==0&&(a.words[a.length++]=c),a},i._prime=function(a){if(M[a])return M[a];var c;if(a==="k256")c=new T;else if(a==="p224")c=new $;else if(a==="p192")c=new U;else if(a==="p25519")c=new j;else throw new Error("Unknown prime "+a);return M[a]=c,c};function W(m){if(typeof m=="string"){var a=i._prime(m);this.m=a.p,this.prime=a}else r(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}W.prototype._verify1=function(a){r(a.negative===0,"red works only with positives"),r(a.red,"red works only with red numbers")},W.prototype._verify2=function(a,c){r((a.negative|c.negative)===0,"red works only with positives"),r(a.red&&a.red===c.red,"red works only with red numbers")},W.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},W.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},W.prototype.add=function(a,c){this._verify2(a,c);var p=a.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},W.prototype.iadd=function(a,c){this._verify2(a,c);var p=a.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},W.prototype.sub=function(a,c){this._verify2(a,c);var p=a.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},W.prototype.isub=function(a,c){this._verify2(a,c);var p=a.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},W.prototype.shl=function(a,c){return this._verify1(a),this.imod(a.ushln(c))},W.prototype.imul=function(a,c){return this._verify2(a,c),this.imod(a.imul(c))},W.prototype.mul=function(a,c){return this._verify2(a,c),this.imod(a.mul(c))},W.prototype.isqr=function(a){return this.imul(a,a.clone())},W.prototype.sqr=function(a){return this.mul(a,a)},W.prototype.sqrt=function(a){if(a.isZero())return a.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new i(1)).iushrn(2);return this.pow(a,p)}for(var _=this.m.subn(1),w=0;!_.isZero()&&_.andln(1)===0;)w++,_.iushrn(1);r(!_.isZero());var C=new i(1).toRed(this),N=C.redNeg(),b=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);this.pow(u,b).cmp(N)!==0;)u.redIAdd(N);for(var k=this.pow(u,_),G=this.pow(a,_.addn(1).iushrn(1)),H=this.pow(a,_),te=w;H.cmp(C)!==0;){for(var re=H,g=0;re.cmp(C)!==0;g++)re=re.redSqr();r(g=0;w--){for(var k=c.words[w],G=u-1;G>=0;G--){var H=k>>G&1;if(C!==_[0]&&(C=this.sqr(C)),H===0&&N===0){b=0;continue}N<<=1,N|=H,b++,!(b!==p&&(w!==0||G!==0))&&(C=this.mul(C,_[N]),b=0,N=0)}u=26}return C},W.prototype.convertTo=function(a){var c=a.umod(this.m);return c===a?c.clone():c},W.prototype.convertFrom=function(a){var c=a.clone();return c.red=null,c},i.mont=function(a){return new Z(a)};function Z(m){W.call(this,m),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(Z,W),Z.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},Z.prototype.convertFrom=function(a){var c=this.imod(a.mul(this.rinv));return c.red=null,c},Z.prototype.imul=function(a,c){if(a.isZero()||c.isZero())return a.words[0]=0,a.length=1,a;var p=a.imul(c),_=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=p.isub(_).iushrn(this.shift),C=w;return w.cmp(this.m)>=0?C=w.isub(this.m):w.cmpn(0)<0&&(C=w.iadd(this.m)),C._forceRed(this)},Z.prototype.mul=function(a,c){if(a.isZero()||c.isZero())return new i(0)._forceRed(this);var p=a.mul(c),_=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=p.isub(_).iushrn(this.shift),C=w;return w.cmp(this.m)>=0?C=w.isub(this.m):w.cmpn(0)<0&&(C=w.iadd(this.m)),C._forceRed(this)},Z.prototype.invm=function(a){var c=this.imod(a._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(t,tt)})(Vu);const Ju=Zr;var Ku=ki;ki.strict=Ga;ki.loose=Ya;var Gu=Object.prototype.toString,Yu={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function ki(t){return Ga(t)||Ya(t)}function Ga(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function Ya(t){return Yu[Gu.call(t)]}var Qu=Ku.strict,Zu=function(e){if(Qu(e)){var n=Yt.Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}else return Yt.Buffer.from(e)};const Qa="hex",Za="utf8",fr="0";function mn(t){return new Uint8Array(t)}function Xa(t,e=!1){const n=t.toString(Qa);return e?En(n):n}function Xu(t){return t.toString(Za)}function hr(t){return Zu(t)}function dn(t,e=!1){return Xa(hr(t),e)}function ec(t){return Xu(hr(t))}function tc(t){return Yt.Buffer.from(Ot(t),Qa)}function pn(t){return mn(tc(t))}function Si(t){return Yt.Buffer.from(t,Za)}function nc(t){return mn(Si(t))}function rc(t,e=!1){return Xa(Si(t),e)}function ic(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function es(...t){let e=[];return t.forEach(n=>e=e.concat(Array.from(n))),new Uint8Array([...e])}function oc(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function ac(t,e=8,n=fr){return sc(t,oc(t.length,e),n)}function sc(t,e,n=fr){return uc(t,e,!0,n)}function Ot(t){return t.replace(/^0x/,"")}function En(t){return t.startsWith("0x")?t:`0x${t}`}function ts(t){return t=Ot(t),t=ac(t,2),t&&(t=En(t)),t}function lc(t){const e=t.startsWith("0x");return t=Ot(t),t=t.startsWith(fr)?t.substring(1):t,e?En(t):t}function uc(t,e,n,r=fr){const o=e-t.length;let i=t;if(o>0){const l=r.repeat(o);i=n?l+t:t+l}return i}function Xr(t){return hr(new Uint8Array(t))}function cc(t,e){return dn(new Uint8Array(t),!e)}function fc(t){return mn(t).buffer}function hc(t){return Si(t)}function dc(t,e){return rc(t,!e)}function pc(t){return pn(t).buffer}function ns(t,e){const n=Ot(ts(new Ju(t).toString(16)));return e?n:En(n)}var ei={},gc={get exports(){return ei},set exports(t){ei=t}};(function(t){(function(){var e="input is invalid type",n="finalize already called",r=typeof window=="object",o=r?window:{};o.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",l=!o.JS_SHA3_NO_NODE_JS&&typeof Ke=="object"&&Ke.versions&&Ke.versions.node;l?o=tt:i&&(o=self);var s=!o.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,d=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",y="0123456789abcdef".split(""),v=[31,7936,2031616,520093696],B=[4,1024,262144,67108864],R=[1,256,65536,16777216],F=[6,1536,393216,100663296],O=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],S=[224,256,384,512],I=[128,256],M=["hex","buffer","arrayBuffer","array","digest"],x={128:168,256:136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),d&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});for(var T=function(g,D,K){return function(V){return new H(g,D,g).update(V)[K]()}},$=function(g,D,K){return function(V,X){return new H(g,D,X).update(V)[K]()}},U=function(g,D,K){return function(V,X,ae,ne){return _["cshake"+g].update(V,X,ae,ne)[K]()}},j=function(g,D,K){return function(V,X,ae,ne){return _["kmac"+g].update(V,X,ae,ne)[K]()}},W=function(g,D,K,V){for(var X=0;X>5,this.byteCount=this.blockCount<<2,this.outputBlocks=K>>5,this.extraBytes=(K&31)>>3;for(var V=0;V<50;++V)this.s[V]=0}H.prototype.update=function(g){if(this.finalized)throw new Error(n);var D,K=typeof g;if(K!=="string"){if(K==="object"){if(g===null)throw new Error(e);if(d&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!d||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);D=!0}for(var V=this.blocks,X=this.byteCount,ae=g.length,ne=this.blockCount,ee=0,me=this.s,oe,fe;ee>2]|=g[ee]<>2]|=fe<>2]|=(192|fe>>6)<>2]|=(128|fe&63)<=57344?(V[oe>>2]|=(224|fe>>12)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<>2]|=(240|fe>>18)<>2]|=(128|fe>>12&63)<>2]|=(128|fe>>6&63)<>2]|=(128|fe&63)<=X){for(this.start=oe-X,this.block=V[ne],oe=0;oe>8,K=g&255;K>0;)X.unshift(K),g=g>>8,K=g&255,++V;return D?X.push(V):X.unshift(V),this.update(X),X.length},H.prototype.encodeString=function(g){var D,K=typeof g;if(K!=="string"){if(K==="object"){if(g===null)throw new Error(e);if(d&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!d||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);D=!0}var V=0,X=g.length;if(D)V=X;else for(var ae=0;ae=57344?V+=3:(ne=65536+((ne&1023)<<10|g.charCodeAt(++ae)&1023),V+=4)}return V+=this.encode(V*8),this.update(g),V},H.prototype.bytepad=function(g,D){for(var K=this.encode(D),V=0;V>2]|=this.padding[D&3],this.lastByteIndex===this.byteCount)for(g[0]=g[K],D=1;D>4&15]+y[ee&15]+y[ee>>12&15]+y[ee>>8&15]+y[ee>>20&15]+y[ee>>16&15]+y[ee>>28&15]+y[ee>>24&15];ae%g===0&&(re(D),X=0)}return V&&(ee=D[X],ne+=y[ee>>4&15]+y[ee&15],V>1&&(ne+=y[ee>>12&15]+y[ee>>8&15]),V>2&&(ne+=y[ee>>20&15]+y[ee>>16&15])),ne},H.prototype.arrayBuffer=function(){this.finalize();var g=this.blockCount,D=this.s,K=this.outputBlocks,V=this.extraBytes,X=0,ae=0,ne=this.outputBits>>3,ee;V?ee=new ArrayBuffer(K+1<<2):ee=new ArrayBuffer(ne);for(var me=new Uint32Array(ee);ae>8&255,ne[ee+2]=me>>16&255,ne[ee+3]=me>>24&255;ae%g===0&&re(D)}return V&&(ee=ae<<2,me=D[X],ne[ee]=me&255,V>1&&(ne[ee+1]=me>>8&255),V>2&&(ne[ee+2]=me>>16&255)),ne};function te(g,D,K){H.call(this,g,D,K)}te.prototype=new H,te.prototype.finalize=function(){return this.encode(this.outputBits,!0),H.prototype.finalize.call(this)};var re=function(g){var D,K,V,X,ae,ne,ee,me,oe,fe,E,f,h,A,L,z,Q,se,le,ve,de,ue,Xe,we,be,Pt,Me,Ee,Ut,ke,Se,Dt,Ce,Ae,qt,Te,Ie,Ht,Re,Be,Wt,Fe,Oe,zt,Ne,Le,jt,$e,Pe,Vt,Ue,De,Jt,qe,He,Mt,Et,kt,St,Ct,At,Tt,It;for(V=0;V<48;V+=2)X=g[0]^g[10]^g[20]^g[30]^g[40],ae=g[1]^g[11]^g[21]^g[31]^g[41],ne=g[2]^g[12]^g[22]^g[32]^g[42],ee=g[3]^g[13]^g[23]^g[33]^g[43],me=g[4]^g[14]^g[24]^g[34]^g[44],oe=g[5]^g[15]^g[25]^g[35]^g[45],fe=g[6]^g[16]^g[26]^g[36]^g[46],E=g[7]^g[17]^g[27]^g[37]^g[47],f=g[8]^g[18]^g[28]^g[38]^g[48],h=g[9]^g[19]^g[29]^g[39]^g[49],D=f^(ne<<1|ee>>>31),K=h^(ee<<1|ne>>>31),g[0]^=D,g[1]^=K,g[10]^=D,g[11]^=K,g[20]^=D,g[21]^=K,g[30]^=D,g[31]^=K,g[40]^=D,g[41]^=K,D=X^(me<<1|oe>>>31),K=ae^(oe<<1|me>>>31),g[2]^=D,g[3]^=K,g[12]^=D,g[13]^=K,g[22]^=D,g[23]^=K,g[32]^=D,g[33]^=K,g[42]^=D,g[43]^=K,D=ne^(fe<<1|E>>>31),K=ee^(E<<1|fe>>>31),g[4]^=D,g[5]^=K,g[14]^=D,g[15]^=K,g[24]^=D,g[25]^=K,g[34]^=D,g[35]^=K,g[44]^=D,g[45]^=K,D=me^(f<<1|h>>>31),K=oe^(h<<1|f>>>31),g[6]^=D,g[7]^=K,g[16]^=D,g[17]^=K,g[26]^=D,g[27]^=K,g[36]^=D,g[37]^=K,g[46]^=D,g[47]^=K,D=fe^(X<<1|ae>>>31),K=E^(ae<<1|X>>>31),g[8]^=D,g[9]^=K,g[18]^=D,g[19]^=K,g[28]^=D,g[29]^=K,g[38]^=D,g[39]^=K,g[48]^=D,g[49]^=K,A=g[0],L=g[1],Le=g[11]<<4|g[10]>>>28,jt=g[10]<<4|g[11]>>>28,Ee=g[20]<<3|g[21]>>>29,Ut=g[21]<<3|g[20]>>>29,Ct=g[31]<<9|g[30]>>>23,At=g[30]<<9|g[31]>>>23,Fe=g[40]<<18|g[41]>>>14,Oe=g[41]<<18|g[40]>>>14,Ae=g[2]<<1|g[3]>>>31,qt=g[3]<<1|g[2]>>>31,z=g[13]<<12|g[12]>>>20,Q=g[12]<<12|g[13]>>>20,$e=g[22]<<10|g[23]>>>22,Pe=g[23]<<10|g[22]>>>22,ke=g[33]<<13|g[32]>>>19,Se=g[32]<<13|g[33]>>>19,Tt=g[42]<<2|g[43]>>>30,It=g[43]<<2|g[42]>>>30,qe=g[5]<<30|g[4]>>>2,He=g[4]<<30|g[5]>>>2,Te=g[14]<<6|g[15]>>>26,Ie=g[15]<<6|g[14]>>>26,se=g[25]<<11|g[24]>>>21,le=g[24]<<11|g[25]>>>21,Vt=g[34]<<15|g[35]>>>17,Ue=g[35]<<15|g[34]>>>17,Dt=g[45]<<29|g[44]>>>3,Ce=g[44]<<29|g[45]>>>3,we=g[6]<<28|g[7]>>>4,be=g[7]<<28|g[6]>>>4,Mt=g[17]<<23|g[16]>>>9,Et=g[16]<<23|g[17]>>>9,Ht=g[26]<<25|g[27]>>>7,Re=g[27]<<25|g[26]>>>7,ve=g[36]<<21|g[37]>>>11,de=g[37]<<21|g[36]>>>11,De=g[47]<<24|g[46]>>>8,Jt=g[46]<<24|g[47]>>>8,zt=g[8]<<27|g[9]>>>5,Ne=g[9]<<27|g[8]>>>5,Pt=g[18]<<20|g[19]>>>12,Me=g[19]<<20|g[18]>>>12,kt=g[29]<<7|g[28]>>>25,St=g[28]<<7|g[29]>>>25,Be=g[38]<<8|g[39]>>>24,Wt=g[39]<<8|g[38]>>>24,ue=g[48]<<14|g[49]>>>18,Xe=g[49]<<14|g[48]>>>18,g[0]=A^~z&se,g[1]=L^~Q&le,g[10]=we^~Pt&Ee,g[11]=be^~Me&Ut,g[20]=Ae^~Te&Ht,g[21]=qt^~Ie&Re,g[30]=zt^~Le&$e,g[31]=Ne^~jt&Pe,g[40]=qe^~Mt&kt,g[41]=He^~Et&St,g[2]=z^~se&ve,g[3]=Q^~le&de,g[12]=Pt^~Ee&ke,g[13]=Me^~Ut&Se,g[22]=Te^~Ht&Be,g[23]=Ie^~Re&Wt,g[32]=Le^~$e&Vt,g[33]=jt^~Pe&Ue,g[42]=Mt^~kt&Ct,g[43]=Et^~St&At,g[4]=se^~ve&ue,g[5]=le^~de&Xe,g[14]=Ee^~ke&Dt,g[15]=Ut^~Se&Ce,g[24]=Ht^~Be&Fe,g[25]=Re^~Wt&Oe,g[34]=$e^~Vt&De,g[35]=Pe^~Ue&Jt,g[44]=kt^~Ct&Tt,g[45]=St^~At&It,g[6]=ve^~ue&A,g[7]=de^~Xe&L,g[16]=ke^~Dt&we,g[17]=Se^~Ce&be,g[26]=Be^~Fe&Ae,g[27]=Wt^~Oe&qt,g[36]=Vt^~De&zt,g[37]=Ue^~Jt&Ne,g[46]=Ct^~Tt&qe,g[47]=At^~It&He,g[8]=ue^~A&z,g[9]=Xe^~L&Q,g[18]=Dt^~we&Pt,g[19]=Ce^~be&Me,g[28]=Fe^~Ae&Te,g[29]=Oe^~qt&Ie,g[38]=De^~zt&Le,g[39]=Jt^~Ne&jt,g[48]=Tt^~qe&Mt,g[49]=It^~He&Et,g[0]^=P[V],g[1]^=P[V+1]};if(s)t.exports=_;else for(C=0;C=0;N--)(C=m[N])&&(w=(_<3?C(w):_>3?C(a,c,w):C(a,c))||w);return _>3&&w&&Object.defineProperty(a,c,w),w},i=function(m,a){return function(c,p){a(c,p,m)}},l=function(m,a){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(m,a)},s=function(m,a,c,p){function _(w){return w instanceof c?w:new c(function(C){C(w)})}return new(c||(c=Promise))(function(w,C){function N(k){try{u(p.next(k))}catch(G){C(G)}}function b(k){try{u(p.throw(k))}catch(G){C(G)}}function u(k){k.done?w(k.value):_(k.value).then(N,b)}u((p=p.apply(m,a||[])).next())})},d=function(m,a){var c={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},p,_,w,C;return C={next:N(0),throw:N(1),return:N(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function N(u){return function(k){return b([u,k])}}function b(u){if(p)throw new TypeError("Generator is already executing.");for(;c;)try{if(p=1,_&&(w=u[0]&2?_.return:u[0]?_.throw||((w=_.return)&&w.call(_),0):_.next)&&!(w=w.call(_,u[1])).done)return w;switch(_=0,w&&(u=[u[0]&2,w.value]),u[0]){case 0:case 1:w=u;break;case 4:return c.label++,{value:u[1],done:!1};case 5:c.label++,_=u[1],u=[0];continue;case 7:u=c.ops.pop(),c.trys.pop();continue;default:if(w=c.trys,!(w=w.length>0&&w[w.length-1])&&(u[0]===6||u[0]===2)){c=0;continue}if(u[0]===3&&(!w||u[1]>w[0]&&u[1]=m.length&&(m=void 0),{value:m&&m[p++],done:!m}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},B=function(m,a){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var p=c.call(m),_,w=[],C;try{for(;(a===void 0||a-- >0)&&!(_=p.next()).done;)w.push(_.value)}catch(N){C={error:N}}finally{try{_&&!_.done&&(c=p.return)&&c.call(p)}finally{if(C)throw C.error}}return w},R=function(){for(var m=[],a=0;a1||N(H,te)})})}function N(H,te){try{b(p[H](te))}catch(re){G(w[0][3],re)}}function b(H){H.value instanceof O?Promise.resolve(H.value.v).then(u,k):G(w[0][2],H)}function u(H){N("next",H)}function k(H){N("throw",H)}function G(H,te){H(te),w.shift(),w.length&&N(w[0][0],w[0][1])}},S=function(m){var a,c;return a={},p("next"),p("throw",function(_){throw _}),p("return"),a[Symbol.iterator]=function(){return this},a;function p(_,w){a[_]=m[_]?function(C){return(c=!c)?{value:O(m[_](C)),done:_==="return"}:w?w(C):C}:w}},I=function(m){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=m[Symbol.asyncIterator],c;return a?a.call(m):(m=typeof v=="function"?v(m):m[Symbol.iterator](),c={},p("next"),p("throw"),p("return"),c[Symbol.asyncIterator]=function(){return this},c);function p(w){c[w]=m[w]&&function(C){return new Promise(function(N,b){C=m[w](C),_(N,b,C.done,C.value)})}}function _(w,C,N,b){Promise.resolve(b).then(function(u){w({value:u,done:N})},C)}},M=function(m,a){return Object.defineProperty?Object.defineProperty(m,"raw",{value:a}):m.raw=a,m},x=function(m){if(m&&m.__esModule)return m;var a={};if(m!=null)for(var c in m)Object.hasOwnProperty.call(m,c)&&(a[c]=m[c]);return a.default=m,a},T=function(m){return m&&m.__esModule?m:{default:m}},$=function(m,a){if(!a.has(m))throw new TypeError("attempted to get private field on non-instance");return a.get(m)},U=function(m,a,c){if(!a.has(m))throw new TypeError("attempted to set private field on non-instance");return a.set(m,c),c},W("__extends",e),W("__assign",n),W("__rest",r),W("__decorate",o),W("__param",i),W("__metadata",l),W("__awaiter",s),W("__generator",d),W("__exportStar",y),W("__createBinding",j),W("__values",v),W("__read",B),W("__spread",R),W("__spreadArrays",F),W("__await",O),W("__asyncGenerator",P),W("__asyncDelegator",S),W("__asyncValues",I),W("__makeTemplateObject",M),W("__importStar",x),W("__importDefault",T),W("__classPrivateFieldGet",$),W("__classPrivateFieldSet",U)})})(mc);var gt={},ro;function _c(){if(ro)return gt;ro=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.isBrowserCryptoAvailable=gt.getSubtleCrypto=gt.getBrowerCrypto=void 0;function t(){return(tt==null?void 0:tt.crypto)||(tt==null?void 0:tt.msCrypto)||{}}gt.getBrowerCrypto=t;function e(){const r=t();return r.subtle||r.webkitSubtle}gt.getSubtleCrypto=e;function n(){return!!t()&&!!e()}return gt.isBrowserCryptoAvailable=n,gt}var mt={},io;function vc(){if(io)return mt;io=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.isBrowser=mt.isNode=mt.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}mt.isReactNative=t;function e(){return typeof Ke<"u"&&typeof Ke.versions<"u"&&typeof Ke.versions.node<"u"}mt.isNode=e;function n(){return!t()&&!e()}return mt.isBrowser=n,mt}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=ti;e.__exportStar(_c(),t),e.__exportStar(vc(),t)})(kn);function yc(){const t=Date.now()*Math.pow(10,3),e=Math.floor(Math.random()*Math.pow(10,3));return t+e}function Hn(t){return ts(t)}function wc(t){return lc(En(t))}const bc=yc;function Or(){return((e,n)=>{for(n=e="";e++<36;n+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return n})()}function xc(t){return t===""||typeof t=="string"&&t.trim()===""}function Mc(t){return!(t&&t.length)}function rs(t,e){return ic(t,e)}function Ec(t){return typeof t.method<"u"}function An(t){return typeof t.result<"u"}function Zn(t){return typeof t.error<"u"}function oo(t){return typeof t.event<"u"}function kc(t){return ju.includes(t)||t.startsWith("wc_")}function Sc(t){return t.method.startsWith("wc_")?!0:!Ka.includes(t.method)}function Cc(t){t=Ot(t.toLowerCase());const e=Ot(ei.keccak_256(hc(t)));let n="";for(let r=0;r7?n+=t[r].toUpperCase():n+=t[r];return En(n)}const Ac=t=>t?t.toLowerCase().substring(0,2)!=="0x"?!1:/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x)?[0-9a-f]{40}$/.test(t)||/^(0x)?[0-9A-F]{40}$/.test(t)?!0:t===Cc(t):!1:!1;function ao(t){return!Mc(t)&&!rs(t[0])&&(t[0]=dc(t[0])),t}function Nr(t){if(typeof t.type<"u"&&t.type!=="0")return t;if(typeof t.from>"u"||!Ac(t.from))throw new Error("Transaction object must include a valid 'from' value.");function e(o){let i=o;return(typeof o=="number"||typeof o=="string"&&!xc(o))&&(rs(o)?typeof o=="string"&&(i=Hn(o)):i=ns(o)),typeof i=="string"&&(i=wc(i)),i}const n={from:Hn(t.from),to:typeof t.to>"u"?void 0:Hn(t.to),gasPrice:typeof t.gasPrice>"u"?"":e(t.gasPrice),gas:typeof t.gas>"u"?typeof t.gasLimit>"u"?"":e(t.gasLimit):e(t.gas),value:typeof t.value>"u"?"":e(t.value),nonce:typeof t.nonce>"u"?"":e(t.nonce),data:typeof t.data>"u"?"":Hn(t.data)||"0x"},r=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach(o=>{(typeof n[o]>"u"||typeof n[o]=="string"&&!n[o].trim().length)&&r.includes(o)&&delete n[o]}),n}function Tc(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;break}const r={code:n,message:e};return t.data&&(r.data=t.data),r}var Ci={},Ic=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),is="%[a-f0-9]{2}",so=new RegExp("("+is+")|([^%]+?)","gi"),lo=new RegExp("("+is+")+","gi");function ni(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],ni(n),ni(r))}function Rc(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(so)||[],n=1;n{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const n=t.indexOf(e);return n===-1?[t]:[t.slice(0,n),t.slice(n+e.length)]};(function(t){const e=Ic,n=Fc,r=Oc,o=S=>S==null;function i(S){switch(S.arrayFormat){case"index":return I=>(M,x)=>{const T=M.length;return x===void 0||S.skipNull&&x===null||S.skipEmptyString&&x===""?M:x===null?[...M,[d(I,S),"[",T,"]"].join("")]:[...M,[d(I,S),"[",d(T,S),"]=",d(x,S)].join("")]};case"bracket":return I=>(M,x)=>x===void 0||S.skipNull&&x===null||S.skipEmptyString&&x===""?M:x===null?[...M,[d(I,S),"[]"].join("")]:[...M,[d(I,S),"[]=",d(x,S)].join("")];case"comma":case"separator":return I=>(M,x)=>x==null||x.length===0?M:M.length===0?[[d(I,S),"=",d(x,S)].join("")]:[[M,d(x,S)].join(S.arrayFormatSeparator)];default:return I=>(M,x)=>x===void 0||S.skipNull&&x===null||S.skipEmptyString&&x===""?M:x===null?[...M,d(I,S)]:[...M,[d(I,S),"=",d(x,S)].join("")]}}function l(S){let I;switch(S.arrayFormat){case"index":return(M,x,T)=>{if(I=/\[(\d*)\]$/.exec(M),M=M.replace(/\[\d*\]$/,""),!I){T[M]=x;return}T[M]===void 0&&(T[M]={}),T[M][I[1]]=x};case"bracket":return(M,x,T)=>{if(I=/(\[\])$/.exec(M),M=M.replace(/\[\]$/,""),!I){T[M]=x;return}if(T[M]===void 0){T[M]=[x];return}T[M]=[].concat(T[M],x)};case"comma":case"separator":return(M,x,T)=>{const U=typeof x=="string"&&x.split("").indexOf(S.arrayFormatSeparator)>-1?x.split(S.arrayFormatSeparator).map(j=>y(j,S)):x===null?x:y(x,S);T[M]=U};default:return(M,x,T)=>{if(T[M]===void 0){T[M]=x;return}T[M]=[].concat(T[M],x)}}}function s(S){if(typeof S!="string"||S.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function d(S,I){return I.encode?I.strict?e(S):encodeURIComponent(S):S}function y(S,I){return I.decode?n(S):S}function v(S){return Array.isArray(S)?S.sort():typeof S=="object"?v(Object.keys(S)).sort((I,M)=>Number(I)-Number(M)).map(I=>S[I]):S}function B(S){const I=S.indexOf("#");return I!==-1&&(S=S.slice(0,I)),S}function R(S){let I="";const M=S.indexOf("#");return M!==-1&&(I=S.slice(M)),I}function F(S){S=B(S);const I=S.indexOf("?");return I===-1?"":S.slice(I+1)}function O(S,I){return I.parseNumbers&&!Number.isNaN(Number(S))&&typeof S=="string"&&S.trim()!==""?S=Number(S):I.parseBooleans&&S!==null&&(S.toLowerCase()==="true"||S.toLowerCase()==="false")&&(S=S.toLowerCase()==="true"),S}function P(S,I){I=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},I),s(I.arrayFormatSeparator);const M=l(I),x=Object.create(null);if(typeof S!="string"||(S=S.trim().replace(/^[?#&]/,""),!S))return x;for(const T of S.split("&")){let[$,U]=r(I.decode?T.replace(/\+/g," "):T,"=");U=U===void 0?null:["comma","separator"].includes(I.arrayFormat)?U:y(U,I),M(y($,I),U,x)}for(const T of Object.keys(x)){const $=x[T];if(typeof $=="object"&&$!==null)for(const U of Object.keys($))$[U]=O($[U],I);else x[T]=O($,I)}return I.sort===!1?x:(I.sort===!0?Object.keys(x).sort():Object.keys(x).sort(I.sort)).reduce((T,$)=>{const U=x[$];return U&&typeof U=="object"&&!Array.isArray(U)?T[$]=v(U):T[$]=U,T},Object.create(null))}t.extract=F,t.parse=P,t.stringify=(S,I)=>{if(!S)return"";I=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},I),s(I.arrayFormatSeparator);const M=U=>I.skipNull&&o(S[U])||I.skipEmptyString&&S[U]==="",x=i(I),T={};for(const U of Object.keys(S))M(U)||(T[U]=S[U]);const $=Object.keys(T);return I.sort!==!1&&$.sort(I.sort),$.map(U=>{const j=S[U];return j===void 0?"":j===null?d(U,I):Array.isArray(j)?j.reduce(x(U),[]).join("&"):d(U,I)+"="+d(j,I)}).filter(U=>U.length>0).join("&")},t.parseUrl=(S,I)=>{I=Object.assign({decode:!0},I);const[M,x]=r(S,"#");return Object.assign({url:M.split("?")[0]||"",query:P(F(S),I)},I&&I.parseFragmentIdentifier&&x?{fragmentIdentifier:y(x,I)}:{})},t.stringifyUrl=(S,I)=>{I=Object.assign({encode:!0,strict:!0},I);const M=B(S.url).split("?")[0]||"",x=t.extract(S.url),T=t.parse(x,{sort:!1}),$=Object.assign(T,S.query);let U=t.stringify($,I);U&&(U=`?${U}`);let j=R(S.url);return S.fragmentIdentifier&&(j=`#${d(S.fragmentIdentifier,I)}`),`${M}${U}${j}`}})(Ci);function Nc(t){const e=t.indexOf("?")!==-1?t.indexOf("?"):void 0;return typeof e<"u"?t.substr(e):""}function Lc(t,e){let n=os(t);return n=Object.assign(Object.assign({},n),e),t=$c(n),t}function os(t){return Ci.parse(t)}function $c(t){return Ci.stringify(t)}function Pc(t){return typeof t.bridge<"u"}function Uc(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),o=t.substring(e+1,n);function i(B){const R="@",F=B.split(R);return{handshakeTopic:F[0],version:parseInt(F[1],10)}}const l=i(o),s=typeof n<"u"?t.substr(n):"";function d(B){const R=os(B);return{key:R.key||"",bridge:R.bridge||""}}const y=d(s);return Object.assign(Object.assign({protocol:r},l),y)}class Dc{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(e,n){this._eventEmitters.push({event:e,callback:n})}trigger(e){let n=[];e&&(n=this._eventEmitters.filter(r=>r.event===e)),n.forEach(r=>{r.callback()})}}const qc=typeof ji.WebSocket<"u"?ji.WebSocket:require("ws");class Hc{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new Dc,!e.url||typeof e.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return this.readyState===0}set connected(e){}get connected(){return this.readyState===1}set closing(e){}get closing(){return this.readyState===2}set closed(e){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(e,n,r){if(!n||typeof n!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:n,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,n){this._events.push({event:e,callback:n})}_socketCreate(){if(this._nextSocket)return;const e=Wc(this._url,this._protocol,this._version);if(this._nextSocket=new qc(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=n=>this._socketReceive(n),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=n=>this._socketError(n),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const n=JSON.stringify(e);this._socket&&this._socket.readyState===1?this._socket.send(n):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let n;try{n=JSON.parse(e.data)}catch{return}if(this._socketSend({topic:n.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const r=this._events.filter(o=>o.event==="message");r&&r.length&&r.forEach(o=>o.callback(n))}}_socketError(e){const n=this._events.filter(r=>r.event==="error");n&&n.length&&n.forEach(r=>r.callback(e))}_queueSubscriptions(){this._subscriptions.forEach(n=>this._queue.push({topic:n,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach(n=>this._socketSend(n)),this._queue=[]}}function Wc(t,e,n){var r,o;const l=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),s=Da()?{protocol:e,version:n,env:"browser",host:((r=Ha())===null||r===void 0?void 0:r.host)||""}:{protocol:e,version:n,env:((o=lr())===null||o===void 0?void 0:o.name)||""},d=Lc(Nc(l[1]||""),s);return l[0]+"?"+d}const Lr="Session currently connected",Kt="Session currently disconnected",zc="Session Rejected",jc="Missing JSON RPC response",Vc='JSON-RPC success response must include "result" field',Jc='JSON-RPC error response must include "error" field',Kc='JSON RPC request must have valid "method" value',Gc='JSON RPC request must have valid "id" value',Yc="Missing one of the required parameters: bridge / uri / session",uo="JSON RPC response format is invalid",Qc="URI format is invalid",Zc="QRCode Modal not provided",co="User close QRCode Modal";class Xc{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter(n=>n.event!==e)}trigger(e){let n=[],r;Ec(e)?r=e.method:An(e)||Zn(e)?r=`response:${e.id}`:oo(e)?r=e.event:r="",r&&(n=this._eventEmitters.filter(o=>o.event===r)),(!n||!n.length)&&!kc(r)&&!oo(r)&&(n=this._eventEmitters.filter(o=>o.event==="call_request")),n.forEach(o=>{if(Zn(e)){const i=new Error(e.error.message);o.callback(i,null)}else o.callback(null,e)})}}class ef{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const n=Mi(this.storageId);return n&&Pc(n)&&(e=n),e}setSession(e){return xi(this.storageId,e),e}removeSession(){Ei(this.storageId)}}const tf="walletconnect.org",nf="abcdefghijklmnopqrstuvwxyz0123456789",as=nf.split("").map(t=>`https://${t}.bridge.walletconnect.org`);function rf(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}function of(t){return rf(t).split(".").slice(-2).join(".")}function af(){return Math.floor(Math.random()*as.length)}function sf(){return as[af()]}function lf(t){return of(t)===tf}function uf(t){return lf(t)?sf():t}let cf=class{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new Xc,this._clientMeta=Qr()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new ef(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...Ka,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(Yc);e.connectorOpts.bridge&&(this.bridge=uf(e.connectorOpts.bridge)),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new Hc({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const n=pc(e);this._key=n}get key(){return this._key?cc(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=Or()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=Qr()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:n,bridge:r,key:o}=this._parseUri(e);this.handshakeTopic=n,this.bridge=r,this.key=o}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,n){const r={event:e,callback:n};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const n=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=n.id,this.handshakeTopic=Or(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error(co)});const r=()=>{this.killSession()};try{const o=await this._sendCallRequest(n);return o&&r(),o}catch(o){throw r(),o}}async connect(e){if(!this._qrcodeModal)throw new Error(Zc);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise(async(n,r)=>{this.on("modal_closed",()=>r(new Error(co))),this.on("connect",(o,i)=>{if(o)return r(o);n(i.params[0])})}))}async createSession(e){if(this._connected)throw new Error(Lr);if(this.pending)return;this._key=await this._generateKey();const n=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=n.id,this.handshakeTopic=Or(),this._sendSessionRequest(n,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(Lr);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:n};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(Lr);const n=e&&e.message?e.message:zc,r=this._formatResponse({id:this.handshakeId,error:{message:n}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error(Kt);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[n]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const n=e?e.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},o=this._formatRequest({method:"wc_sessionUpdate",params:[r]});await this._sendRequest(o),this._handleSessionDisconnect(n)}async sendTransaction(e){if(!this._connected)throw new Error(Kt);const n=Nr(e),r=this._formatRequest({method:"eth_sendTransaction",params:[n]});return await this._sendCallRequest(r)}async signTransaction(e){if(!this._connected)throw new Error(Kt);const n=Nr(e),r=this._formatRequest({method:"eth_signTransaction",params:[n]});return await this._sendCallRequest(r)}async signMessage(e){if(!this._connected)throw new Error(Kt);const n=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(n)}async signPersonalMessage(e){if(!this._connected)throw new Error(Kt);e=ao(e);const n=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(n)}async signTypedData(e){if(!this._connected)throw new Error(Kt);const n=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(n)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const n=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(n)}unsafeSend(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),new Promise((r,o)=>{this._subscribeToResponse(e.id,(i,l)=>{if(i){o(i);return}if(!l)throw new Error(jc);r(l)})})}async sendCustomRequest(e,n){if(!this._connected)throw new Error(Kt);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return ns(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params&&(e.params[0]=Nr(e.params[0]));break;case"personal_sign":e.params&&(e.params=ao(e.params));break}const r=this._formatRequest(e);return await this._sendCallRequest(r,n)}approveRequest(e){if(An(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(Vc)}rejectRequest(e){if(Zn(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(Jc)}transportClose(){this._transport.close()}async _sendRequest(e,n){const r=this._formatRequest(e),o=await this._encrypt(r),i=typeof(n==null?void 0:n.topic)<"u"?n.topic:this.peerId,l=JSON.stringify(o),s=typeof(n==null?void 0:n.forcePushNotification)<"u"?!n.forcePushNotification:Sc(r);this._transport.send(l,i,s)}async _sendResponse(e){const n=await this._encrypt(e),r=this.peerId,o=JSON.stringify(n),i=!0;this._transport.send(o,r,i)}async _sendSessionRequest(e,n,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,n)}_sendCallRequest(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(typeof e.method>"u")throw new Error(Kc);return{id:typeof e.id>"u"?bc():e.id,jsonrpc:"2.0",method:e.method,params:typeof e.params>"u"?[]:e.params}}_formatResponse(e){if(typeof e.id>"u")throw new Error(Gc);const n={id:e.id,jsonrpc:"2.0"};if(Zn(e)){const r=Tc(e.error);return Object.assign(Object.assign(Object.assign({},n),e),{error:r})}else if(An(e))return Object.assign(Object.assign({},n),e);throw new Error(uo)}_handleSessionDisconnect(e){const n=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Ei(Qn)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,n){n?n.approved?(this._connected?(n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),n.peerId&&!this.peerId&&(this.peerId=n.peerId),n.peerMeta&&!this.peerMeta&&(this.peerMeta=n.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let r;try{r=JSON.parse(e.payload)}catch{return}const o=await this._decrypt(r);o&&this._eventManager.trigger(o)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,n){this.on(`response:${e}`,n)}_subscribeToSessionResponse(e,n){this._subscribeToResponse(e,(r,o)=>{if(r){this._handleSessionResponse(r.message);return}An(o)?this._handleSessionResponse(n,o.result):o.error&&o.error.message?this._handleSessionResponse(o.error.message):this._handleSessionResponse(n)})}_subscribeToCallResponse(e){return new Promise((n,r)=>{this._subscribeToResponse(e,(o,i)=>{if(o){r(o);return}An(i)?n(i.result):i.error&&i.error.message?r(i.error):r(new Error(uo))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(e,n)=>{const{request:r}=n.params[0];if(Pa()&&this._signingMethods.includes(r.method)){const o=Mi(Qn);o&&(window.location.href=o.href)}}),this.on("wc_sessionRequest",(e,n)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=n.id,this.peerId=n.params[0].peerId,this.peerMeta=n.params[0].peerMeta;const r=Object.assign(Object.assign({},n),{method:"session_request"});this._eventManager.trigger(r)}),this.on("wc_sessionUpdate",(e,n)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",n.params[0])})}_initTransport(){this._transport.on("message",e=>this._handleIncomingMessages(e)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){const e=this.protocol,n=this.handshakeTopic,r=this.version,o=encodeURIComponent(this.bridge),i=this.key;return`${e}:${n}@${r}?bridge=${o}&key=${i}`}_parseUri(e){const n=Uc(e);if(n.protocol===this.protocol){if(!n.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const r=n.handshakeTopic;if(!n.bridge)throw Error("Invalid or missing bridge url parameter value");const o=decodeURIComponent(n.bridge);if(!n.key)throw Error("Invalid or missing key parameter value");const i=n.key;return{handshakeTopic:r,bridge:o,key:i}}else throw new Error(Qc)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.encrypt(e,n):null}async _decrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.decrypt(e,n):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||typeof e.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||typeof e.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||typeof e.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const n={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",async(r,o)=>{if(r)throw r;if(e.peerMeta){const i=o.params[0].peerMeta.name;n.peerName=i}try{if(!(await(await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}};function ff(t){return kn.getBrowerCrypto().getRandomValues(new Uint8Array(t))}const ss=256,ls=ss,hf=ss,Nt="AES-CBC",df=`SHA-${ls}`,ri="HMAC",pf="encrypt",gf="decrypt",mf="sign",_f="verify";function vf(t){return t===Nt?{length:ls,name:Nt}:{hash:{name:df},name:ri}}function yf(t){return t===Nt?[pf,gf]:[mf,_f]}async function Ai(t,e=Nt){return kn.getSubtleCrypto().importKey("raw",t,vf(e),!0,yf(e))}async function wf(t,e,n){const r=kn.getSubtleCrypto(),o=await Ai(e,Nt),i=await r.encrypt({iv:t,name:Nt},o,n);return new Uint8Array(i)}async function bf(t,e,n){const r=kn.getSubtleCrypto(),o=await Ai(e,Nt),i=await r.decrypt({iv:t,name:Nt},o,n);return new Uint8Array(i)}async function xf(t,e){const n=kn.getSubtleCrypto(),r=await Ai(t,ri),o=await n.sign({length:hf,name:ri},r,e);return new Uint8Array(o)}function Mf(t,e,n){return wf(t,e,n)}function Ef(t,e,n){return bf(t,e,n)}async function us(t,e){return await xf(t,e)}async function cs(t){const e=(t||256)/8,n=ff(e);return fc(hr(n))}async function fs(t,e){const n=pn(t.data),r=pn(t.iv),o=pn(t.hmac),i=dn(o,!1),l=es(n,r),s=await us(e,l),d=dn(s,!1);return Ot(i)===Ot(d)}async function kf(t,e,n){const r=mn(Xr(e)),o=n||await cs(128),i=mn(Xr(o)),l=dn(i,!1),s=JSON.stringify(t),d=nc(s),y=await Mf(i,r,d),v=dn(y,!1),B=es(y,i),R=await us(r,B),F=dn(R,!1);return{data:v,hmac:F,iv:l}}async function Sf(t,e){const n=mn(Xr(e));if(!n)throw new Error("Missing key: required for decryption");if(!await fs(t,n))return null;const o=pn(t.data),i=pn(t.iv),l=await Ef(i,n,o),s=ec(l);let d;try{d=JSON.parse(s)}catch{return null}return d}const Cf=Object.freeze(Object.defineProperty({__proto__:null,decrypt:Sf,encrypt:kf,generateKey:cs,verifyHmac:fs},Symbol.toStringTag,{value:"Module"}));class fo extends cf{constructor(e,n){super({cryptoLib:Cf,connectorOpts:e,pushServerOpts:n})}}const Af=aa(zu);var Pn={},Tf=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},hs={},Lt={},If={}.toString,Ti=Array.isArray||function(t){return If.call(t)=="[object Array]"},Rf=Ti;function Bf(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42}catch{return!1}}_e.TYPED_ARRAY_SUPPORT=Bf();var ho=_e.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function _e(t,e,n){return!_e.TYPED_ARRAY_SUPPORT&&!(this instanceof _e)?new _e(t,e,n):typeof t=="number"?ds(this,t):Uf(this,t,e,n)}_e.TYPED_ARRAY_SUPPORT&&(_e.prototype.__proto__=Uint8Array.prototype,_e.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&_e[Symbol.species]===_e&&Object.defineProperty(_e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function Ii(t){if(t>=ho)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ho.toString(16)+" bytes");return t|0}function Ff(t){return t!==t}function _n(t,e){var n;return _e.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e),n.__proto__=_e.prototype):(n=t,n===null&&(n=new _e(e)),n.length=e),n}function ds(t,e){var n=_n(t,e<0?0:Ii(e)|0);if(!_e.TYPED_ARRAY_SUPPORT)for(var r=0;r55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}else if(l+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function gs(t){if(_e.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;return e===0?0:ps(t).length}function $f(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function Pf(t,e,n,r){return $f(ps(e,t.length-n),t,n,r)}function Uf(t,e,n,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Nf(t,e,n,r):typeof e=="string"?Of(t,e):Lf(t,e)}_e.prototype.write=function(e,n,r){n===void 0?(r=this.length,n=0):r===void 0&&typeof n=="string"?(r=this.length,n=0):isFinite(n)&&(n=n|0,isFinite(r)?r=r|0:r=void 0);var o=this.length-n;if((r===void 0||r>o)&&(r=o),e.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Pf(this,e,n,r)};_e.prototype.slice=function(e,n){var r=this.length;e=~~e,n=n===void 0?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n=e.length&&(n=e.length),n||(n=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n=0;--l)e[l+n]=this[l+r];else if(i<1e3||!_e.TYPED_ARRAY_SUPPORT)for(l=0;l>>0,r=r===void 0?this.length:r>>>0,e||(e=0);var i;if(typeof e=="number")for(i=n;i40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Ze.getSymbolTotalCodewords=function(e){return Df[e]};Ze.getBCHDigit=function(t){for(var e=0;t!==0;)e++,t>>>=1;return e};Ze.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Ri=e};Ze.isKanjiModeEnabled=function(){return typeof Ri<"u"};Ze.toSJIS=function(e){return Ri(e)};var dr={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");var r=n.toLowerCase();switch(r){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,o){if(t.isValid(r))return r;try{return e(r)}catch{return o}}})(dr);function ms(){this.buffer=[],this.length=0}ms.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(var n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var qf=ms,po=Lt;function Un(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=po.alloc(t*t),this.reservedBit=po.alloc(t*t)}Un.prototype.set=function(t,e,n,r){var o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)};Un.prototype.get=function(t,e){return this.data[t*this.size+e]};Un.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Un.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Hf=Un,_s={};(function(t){var e=Ze.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];for(var o=Math.floor(r/7)+2,i=e(r),l=i===145?26:Math.ceil((i-13)/(2*o-2))*2,s=[i-7],d=1;d=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){for(var i=o.size,l=0,s=0,d=0,y=null,v=null,B=0;B=5&&(l+=e.N1+(s-5)),y=F,s=1),F=o.get(R,B),F===v?d++:(d>=5&&(l+=e.N1+(d-5)),v=F,d=1)}s>=5&&(l+=e.N1+(s-5)),d>=5&&(l+=e.N1+(d-5))}return l},t.getPenaltyN2=function(o){for(var i=o.size,l=0,s=0;s=10&&(s===1488||s===93)&&l++,d=d<<1&2047|o.get(v,y),v>=10&&(d===1488||d===93)&&l++}return l*e.N3},t.getPenaltyN4=function(o){for(var i=0,l=o.data.length,s=0;s=0;){for(var s=l[0],d=0;d0){var l=mo.alloc(this.degree);return o.copy(l,i),l}return o};var jf=Bi,Ms={},$t={},Fi={};Fi.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var pt={},Es="[0-9]+",Vf="[A-Z $%*+\\-./:]+",On="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";On=On.replace(/u/g,"\\u");var Jf="(?:(?![A-Z0-9 $%*+\\-./:]|"+On+`)(?:.|[\r -]))+`;pt.KANJI=new RegExp(On,"g");pt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");pt.BYTE=new RegExp(Jf,"g");pt.NUMERIC=new RegExp(Es,"g");pt.ALPHANUMERIC=new RegExp(Vf,"g");var Kf=new RegExp("^"+On+"$"),Gf=new RegExp("^"+Es+"$"),Yf=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");pt.testKanji=function(e){return Kf.test(e)};pt.testNumeric=function(e){return Gf.test(e)};pt.testAlphanumeric=function(e){return Yf.test(e)};(function(t){var e=Fi,n=pt;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,l){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?i.ccBits[0]:l<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return n.testNumeric(i)?t.NUMERIC:n.testAlphanumeric(i)?t.ALPHANUMERIC:n.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");var i=o.toLowerCase();switch(i){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+o)}}t.from=function(i,l){if(t.isValid(i))return i;try{return r(i)}catch{return l}}})($t);(function(t){var e=Ze,n=pr,r=dr,o=$t,i=Fi,l=Ti,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,d=e.getBCHDigit(s);function y(F,O,P){for(var S=1;S<=40;S++)if(O<=t.getCapacity(S,P,F))return S}function v(F,O){return o.getCharCountIndicator(F,O)+4}function B(F,O){var P=0;return F.forEach(function(S){var I=v(S.mode,O);P+=I+S.getBitsLength()}),P}function R(F,O){for(var P=1;P<=40;P++){var S=B(F,P);if(S<=t.getCapacity(P,O,o.MIXED))return P}}t.from=function(O,P){return i.isValid(O)?parseInt(O,10):P},t.getCapacity=function(O,P,S){if(!i.isValid(O))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=o.BYTE);var I=e.getSymbolTotalCodewords(O),M=n.getTotalCodewordsCount(O,P),x=(I-M)*8;if(S===o.MIXED)return x;var T=x-v(S,O);switch(S){case o.NUMERIC:return Math.floor(T/10*3);case o.ALPHANUMERIC:return Math.floor(T/11*2);case o.KANJI:return Math.floor(T/13);case o.BYTE:default:return Math.floor(T/8)}},t.getBestVersionForData=function(O,P){var S,I=r.from(P,r.M);if(l(O)){if(O.length>1)return R(O,I);if(O.length===0)return 1;S=O[0]}else S=O;return y(S.mode,S.getLength(),I)},t.getEncodedBits=function(O){if(!i.isValid(O)||O<7)throw new Error("Invalid QR Code version");for(var P=O<<12;e.getBCHDigit(P)-d>=0;)P^=s<=0;)o^=Ss<0&&(r=this.data.substr(n),o=parseInt(r,10),e.put(o,i*3+1))};var Xf=vn,eh=$t,$r=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function yn(t){this.mode=eh.ALPHANUMERIC,this.data=t}yn.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};yn.prototype.getLength=function(){return this.data.length};yn.prototype.getBitsLength=function(){return yn.getBitsLength(this.data.length)};yn.prototype.write=function(e){var n;for(n=0;n+2<=this.data.length;n+=2){var r=$r.indexOf(this.data[n])*45;r+=$r.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put($r.indexOf(this.data[n]),6)};var th=yn,nh=Lt,rh=$t;function wn(t){this.mode=rh.BYTE,this.data=nh.from(t)}wn.getBitsLength=function(e){return e*8};wn.prototype.getLength=function(){return this.data.length};wn.prototype.getBitsLength=function(){return wn.getBitsLength(this.data.length)};wn.prototype.write=function(t){for(var e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` -Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var sh=bn,ai={},lh={get exports(){return ai},set exports(t){ai=t}};(function(t){var e={single_source_shortest_paths:function(n,r,o){var i={},l={};l[r]=0;var s=e.PriorityQueue.make();s.push(r,0);for(var d,y,v,B,R,F,O,P,S;!s.empty();){d=s.pop(),y=d.value,B=d.cost,R=n[y]||{};for(v in R)R.hasOwnProperty(v)&&(F=R[v],O=B+F,P=l[v],S=typeof l[v]>"u",(S||P>O)&&(l[v]=O,s.push(v,O),i[v]=y))}if(typeof o<"u"&&typeof l[o]>"u"){var I=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(I)}return i},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],i=r;i;)o.push(i),n[i],i=n[i];return o.reverse(),o},find_path:function(n,r,o){var i=e.single_source_shortest_paths(n,r,o);return e.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,o={},i;n=n||{};for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(lh);(function(t){var e=$t,n=Xf,r=th,o=ih,i=sh,l=pt,s=Ze,d=ai;function y(I){return unescape(encodeURIComponent(I)).length}function v(I,M,x){for(var T=[],$;($=I.exec(x))!==null;)T.push({data:$[0],index:$.index,mode:M,length:$[0].length});return T}function B(I){var M=v(l.NUMERIC,e.NUMERIC,I),x=v(l.ALPHANUMERIC,e.ALPHANUMERIC,I),T,$;s.isKanjiModeEnabled()?(T=v(l.BYTE,e.BYTE,I),$=v(l.KANJI,e.KANJI,I)):(T=v(l.BYTE_KANJI,e.BYTE,I),$=[]);var U=M.concat(x,T,$);return U.sort(function(j,W){return j.index-W.index}).map(function(j){return{data:j.data,mode:j.mode,length:j.length}})}function R(I,M){switch(M){case e.NUMERIC:return n.getBitsLength(I);case e.ALPHANUMERIC:return r.getBitsLength(I);case e.KANJI:return i.getBitsLength(I);case e.BYTE:return o.getBitsLength(I)}}function F(I){return I.reduce(function(M,x){var T=M.length-1>=0?M[M.length-1]:null;return T&&T.mode===x.mode?(M[M.length-1].data+=x.data,M):(M.push(x),M)},[])}function O(I){for(var M=[],x=0;x=0&&s<=6&&(d===0||d===6)||d>=0&&d<=6&&(s===0||s===6)||s>=2&&s<=4&&d>=2&&d<=4?t.set(i+s,l+d,!0,!0):t.set(i+s,l+d,!1,!0))}function vh(t){for(var e=t.size,n=8;n>s&1)===1,t.set(o,i,l,!0),t.set(i,o,l,!0)}function Dr(t,e,n){var r=t.size,o=ph.getEncodedBits(e,n),i,l;for(i=0;i<15;i++)l=(o>>i&1)===1,i<6?t.set(i,8,l,!0):i<8?t.set(i+1,8,l,!0):t.set(r-15+i,8,l,!0),i<8?t.set(8,r-i-1,l,!0):i<9?t.set(8,15-i-1+1,l,!0):t.set(8,15-i-1,l,!0);t.set(r-8,8,1,!0)}function bh(t,e){for(var n=t.size,r=-1,o=n-1,i=7,l=0,s=n-1;s>0;s-=2)for(s===6&&s--;;){for(var d=0;d<2;d++)if(!t.isReserved(o,s-d)){var y=!1;l>>i&1)===1),t.set(o,s-d,y),i--,i===-1&&(l++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}function xh(t,e,n){var r=new uh;n.forEach(function(y){r.put(y.mode.bit,4),r.put(y.getLength(),gh.getCharCountIndicator(y.mode,t)),y.write(r)});var o=mr.getSymbolTotalCodewords(t),i=li.getTotalCodewordsCount(t,e),l=(o-i)*8;for(r.getLengthInBits()+4<=l&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var s=(l-r.getLengthInBits())/8,d=0;d=7&&wh(v,e),bh(v,d),isNaN(r)&&(r=si.getBestMask(v,Dr.bind(null,v,n))),si.applyMask(r,v),Dr(v,n,r),{modules:v,version:e,errorCorrectionLevel:n,maskPattern:r,segments:o}}hs.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");var r=Pr.M,o,i;return typeof n<"u"&&(r=Pr.from(n.errorCorrectionLevel,Pr.M),o=er.from(n.version),i=si.from(n.maskPattern),n.toSJISFunc&&mr.setToSJISFunction(n.toSJISFunc)),Eh(e,o,r,i)};var As={},Oi={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");var r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");var o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});var o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,l=r.scale||4;return{width:i,scale:i?4:l,margin:o,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},t.getImageWidth=function(r,o){var i=t.getScale(r,o);return Math.floor((r+o.margin*2)*i)},t.qrToImageData=function(r,o,i){for(var l=o.modules.size,s=o.modules.data,d=t.getScale(l,i),y=Math.floor((l+i.margin*2)*d),v=i.margin*d,B=[i.color.light,i.color.dark],R=0;R=v&&F>=v&&R"u"&&(!l||!l.getContext)&&(d=l,l=void 0),l||(y=r()),d=e.getOptions(d);var v=e.getImageWidth(i.modules.size,d),B=y.getContext("2d"),R=B.createImageData(v,v);return e.qrToImageData(R.data,i,d),n(B,y,v),B.putImageData(R,0,0),y},t.renderToDataURL=function(i,l,s){var d=s;typeof d>"u"&&(!l||!l.getContext)&&(d=l,l=void 0),d||(d={});var y=t.render(i,l,d),v=d.type||"image/png",B=d.rendererOpts||{};return y.toDataURL(v,B.quality)}})(As);var Ts={},kh=Oi;function yo(t,e){var n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function qr(t,e,n){var r=t+e;return typeof n<"u"&&(r+=" "+n),r}function Sh(t,e,n){for(var r="",o=0,i=!1,l=0,s=0;s0&&d>0&&t[s-1]||(r+=i?qr("M",d+n,.5+y+n):qr("m",o,0),o=0,i=!1),d+1':"",y="',v='viewBox="0 0 '+s+" "+s+'"',B=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",R=''+d+y+` -`;return typeof r=="function"&&r(null,R),R};var Ch=Tf,ui=hs,Is=As,Ah=Ts;function Ni(t,e,n,r,o){var i=[].slice.call(arguments,1),l=i.length,s=typeof i[l-1]=="function";if(!s&&!Ch())throw new Error("Callback required as last argument");if(s){if(l<2)throw new Error("Too few arguments provided");l===2?(o=n,n=e,e=r=void 0):l===3&&(e.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=n,n=e,e=void 0))}else{if(l<1)throw new Error("Too few arguments provided");return l===1?(n=e,e=r=void 0):l===2&&!e.getContext&&(r=n,n=e,e=void 0),new Promise(function(y,v){try{var B=ui.create(n,r);y(t(B,e,r))}catch(R){v(R)}})}try{var d=ui.create(n,r);o(null,t(d,e,r))}catch(y){o(y)}}Pn.create=ui.create;Pn.toCanvas=Ni.bind(null,Is.render);Pn.toDataURL=Ni.bind(null,Is.renderToDataURL);Pn.toString=Ni.bind(null,function(t,e,n){return Ah.render(t,n)});var Th=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var B=wo[e.format]||wo.default;window.clipboardData.setData(B,t)}else v.clipboardData.clearData(),v.clipboardData.setData(e.format,t);e.onCopy&&(v.preventDefault(),e.onCopy(v.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),l.addRange(i);var y=document.execCommand("copy");if(!y)throw new Error("copy command was unsuccessful");d=!0}catch(v){n&&console.error("unable to copy using execCommand: ",v),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),d=!0}catch(B){n&&console.error("unable to copy using clipboardData: ",B),n&&console.error("falling back to prompt"),r=Bh("message"in e?e.message:Rh),window.prompt(r,t)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(i):l.removeAllRanges()),s&&document.body.removeChild(s),o()}return d}var Oh=Fh,ce,Rn,Li,Rs,bo,$i,Bs,wt={},_r=[],Nh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function yt(t,e){for(var n in e)t[n]=e[n];return t}function Fs(t){var e=t.parentNode;e&&e.removeChild(t)}function xt(t,e,n){var r,o=arguments,i={};for(r in e)r!=="key"&&r!=="ref"&&(i[r]=e[r]);if(arguments.length>3)for(n=[n],r=3;r2&&(e.children=_r.slice.call(arguments,2)),n={},e)r!=="key"&&r!=="ref"&&(n[r]=e[r]);return tr(t.type,n,e.key||t.key,e.ref||t.ref,null)}function Ds(t){var e={},n={__c:"__cC"+Bs++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i=this;return this.getChildContext||(o=[],this.getChildContext=function(){return e[n.__c]=i,e},this.shouldComponentUpdate=function(l){i.props.value!==l.value&&o.some(function(s){s.context=l.value,Jn(s)})},this.sub=function(l){o.push(l);var s=l.componentWillUnmount;l.componentWillUnmount=function(){o.splice(o.indexOf(l),1),s&&s.call(l)}}),r.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}ce={__e:function(t,e){for(var n,r;e=e.__;)if((n=e.__c)&&!n.__)try{if(n.constructor&&n.constructor.getDerivedStateFromError!=null&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(t))),n.componentDidCatch!=null&&(r=!0,n.componentDidCatch(t)),r)return Jn(n.__E=n)}catch(o){t=o}throw t}},ot.prototype.setState=function(t,e){var n;n=this.__s!==this.state?this.__s:this.__s=yt({},this.state),typeof t=="function"&&(t=t(n,this.props)),t&&yt(n,t),t!=null&&this.__v&&(e&&this.__h.push(e),Jn(this))},ot.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Jn(this))},ot.prototype.render=Dn,Rn=[],Li=0,Rs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$i=wt,Bs=0;var nn,Qe,Eo,xn=0,ci=[],ko=ce.__r,So=ce.diffed,Co=ce.__c,Ao=ce.unmount;function Sn(t,e){ce.__h&&ce.__h(Qe,t,xn||e),xn=0;var n=Qe.__H||(Qe.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Ui(t){return xn=1,Di(Js,t)}function Di(t,e,n){var r=Sn(nn++,2);return r.__c||(r.__c=Qe,r.__=[n?n(e):Js(void 0,e),function(o){var i=t(r.__[0],o);r.__[0]!==i&&(r.__[0]=i,r.__c.setState({}))}]),r.__}function qs(t,e){var n=Sn(nn++,3);!ce.__s&&Hi(n.__H,e)&&(n.__=t,n.__H=e,Qe.__H.__h.push(n))}function qi(t,e){var n=Sn(nn++,4);!ce.__s&&Hi(n.__H,e)&&(n.__=t,n.__H=e,Qe.__h.push(n))}function Hs(t){return xn=5,vr(function(){return{current:t}},[])}function Ws(t,e,n){xn=6,qi(function(){typeof t=="function"?t(e()):t&&(t.current=e())},n==null?n:n.concat(t))}function vr(t,e){var n=Sn(nn++,7);return Hi(n.__H,e)?(n.__H=e,n.__h=t,n.__=t()):n.__}function zs(t,e){return xn=8,vr(function(){return t},e)}function js(t){var e=Qe.context[t.__c],n=Sn(nn++,9);return n.__c=t,e?(n.__==null&&(n.__=!0,e.sub(Qe)),e.props.value):t.__}function Vs(t,e){ce.useDebugValue&&ce.useDebugValue(e?e(t):t)}function qh(t){var e=Sn(nn++,10),n=Ui();return e.__=t,Qe.componentDidCatch||(Qe.componentDidCatch=function(r){e.__&&e.__(r),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Hh(){ci.some(function(t){if(t.__P)try{t.__H.__h.forEach(fi),t.__H.__h.forEach(hi),t.__H.__h=[]}catch(e){return t.__H.__h=[],ce.__e(e,t.__v),!0}}),ci=[]}function fi(t){t.t&&t.t()}function hi(t){var e=t.__();typeof e=="function"&&(t.t=e)}function Hi(t,e){return!t||e.some(function(n,r){return n!==t[r]})}function Js(t,e){return typeof e=="function"?e(t):e}ce.__r=function(t){ko&&ko(t),nn=0,(Qe=t.__c).__H&&(Qe.__H.__h.forEach(fi),Qe.__H.__h.forEach(hi),Qe.__H.__h=[])},ce.diffed=function(t){So&&So(t);var e=t.__c;if(e){var n=e.__H;n&&n.__h.length&&(ci.push(e)!==1&&Eo===ce.requestAnimationFrame||((Eo=ce.requestAnimationFrame)||function(r){var o,i=function(){clearTimeout(l),cancelAnimationFrame(o),setTimeout(r)},l=setTimeout(i,100);typeof window<"u"&&(o=requestAnimationFrame(i))})(Hh))}},ce.__c=function(t,e){e.some(function(n){try{n.__h.forEach(fi),n.__h=n.__h.filter(function(r){return!r.__||hi(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],ce.__e(r,n.__v)}}),Co&&Co(t,e)},ce.unmount=function(t){Ao&&Ao(t);var e=t.__c;if(e){var n=e.__H;if(n)try{n.__.forEach(function(r){return r.t&&r.t()})}catch(r){ce.__e(r,e.__v)}}};function Wi(t,e){for(var n in e)t[n]=e[n];return t}function di(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}var Ks=function(t){var e,n;function r(o){var i;return(i=t.call(this,o)||this).isPureReactComponent=!0,i}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.shouldComponentUpdate=function(o,i){return di(this.props,o)||di(this.state,i)},r}(ot);function Gs(t,e){function n(o){var i=this.props.ref,l=i==o.ref;return!l&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!l:di(this.props,o)}function r(o){return this.shouldComponentUpdate=n,xt(t,Wi({},o))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(t.displayName||t.name)+")",r.t=!0,r}var To=ce.__b;function Ys(t){function e(n){var r=Wi({},n);return delete r.ref,t(r,n.ref)}return e.prototype.isReactComponent=e.t=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}ce.__b=function(t){t.type&&t.type.t&&t.ref&&(t.props.ref=t.ref,t.ref=null),To&&To(t)};var Io=function(t,e){return t?Bt(t).reduce(function(n,r,o){return n.concat(e(r,o))},[]):null},Qs={map:Io,forEach:Io,count:function(t){return t?Bt(t).length:0},only:function(t){if((t=Bt(t)).length!==1)throw new Error("Children.only() expects only one child.");return t[0]},toArray:Bt},Wh=ce.__e;function Zs(t){return t&&((t=Wi({},t)).__c=null,t.__k=t.__k&&t.__k.map(Zs)),t}function rr(){this.__u=0,this.o=null,this.__b=null}function Xs(t){var e=t.__.__c;return e&&e.u&&e.u(t)}function el(t){var e,n,r;function o(i){if(e||(e=t()).then(function(l){n=l.default||l},function(l){r=l}),r)throw r;if(!n)throw e;return xt(n,i)}return o.displayName="Lazy",o.t=!0,o}function un(){this.i=null,this.l=null}ce.__e=function(t,e,n){if(t.then){for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return r.__c(t,e.__c)}Wh(t,e,n)},(rr.prototype=new ot).__c=function(t,e){var n=this;n.o==null&&(n.o=[]),n.o.push(e);var r=Xs(n.__v),o=!1,i=function(){o||(o=!0,r?r(l):l())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var l=function(){var s;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});s=n.o.pop();)s.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),t.then(i,i)},rr.prototype.render=function(t,e){return this.__b&&(this.__v.__k[0]=Zs(this.__b),this.__b=null),[xt(ot,null,e.u?null:t.children),e.u&&t.fallback]};var Ro=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]8?2.5:2.7)+"vw":"inherit";return ie.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},ie.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),ie.createElement("div",{style:{fontSize:l},className:"walletconnect-connect__button__text"},r))}var f0=5,Wr=12;function h0(t){var e=Ge.isAndroid(),n=ie.useState(""),r=n[0],o=n[1],i=ie.useState(""),l=i[0],s=i[1],d=ie.useState(1),y=d[0],v=d[1],B=l?t.links.filter(function(T){return T.name.toLowerCase().includes(l.toLowerCase())}):t.links,R=t.errorMessage,F=l||B.length>f0,O=Math.ceil(B.length/Wr),P=[(y-1)*Wr+1,y*Wr],S=B.length?B.filter(function(T,$){return $+1>=P[0]&&$+1<=P[1]}):[],I=!e&&O>1,M=void 0;function x(T){o(T.target.value),clearTimeout(M),T.target.value?M=setTimeout(function(){s(T.target.value),v(1)},1e3):(o(""),s(""),v(1))}return ie.createElement("div",null,ie.createElement("p",{id:hl,className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&ie.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:x}),ie.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":F&&B.length?"__wrap":"")},e?ie.createElement(s0,{name:t.text.connect,color:r0,href:t.uri,onClick:ie.useCallback(function(){Ge.saveMobileLinkInfo({name:"Unknown",href:t.uri})},[])}):S.length?S.map(function(T){var $=T.color,U=T.name,j=T.shortName,W=T.logo,Z=Ge.formatIOSMobile(t.uri,T),m=ie.useCallback(function(){Ge.saveMobileLinkInfo({name:U,href:Z})},[S]);return F?ie.createElement(c0,{color:$,href:Z,name:j||U,logo:W,onClick:m}):ie.createElement(u0,{color:$,href:Z,name:U,logo:W,onClick:m})}):ie.createElement(ie.Fragment,null,ie.createElement("p",null,R.length?t.errorMessage:t.links.length&&!B.length?t.text.no_wallets_found:t.text.loading))),I&&ie.createElement("div",{className:"walletconnect-modal__footer"},Array(O).fill(0).map(function(T,$){var U=$+1,j=y===U;return ie.createElement("a",{style:{margin:"auto 10px",fontWeight:j?"bold":"normal"},onClick:function(){return v(U)}},U)})))}function d0(t){var e=!!t.message.trim();return ie.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}var p0=function(t){try{var e="";return Promise.resolve(ul.toString(t,{margin:0,type:"svg"})).then(function(n){return typeof n=="string"&&(e=n.replace("0||ie.useEffect(function(){var c=function(){try{if(e)return Promise.resolve();l(!0);try{var p=n?"mobile":"desktop",_=Ge.getMobileLinkRegistry(Ge.formatMobileRegistry(dl,p),r);l(!1),y(!0),Z(_.length?"":t.text.no_supported_wallets),U(_);var w=_.length===1;w&&(S(Ge.formatIOSMobile(t.uri,_[0])),R(!0)),x(w)}catch(C){l(!1),y(!0),Z(t.text.something_went_wrong),console.error(C)}return Promise.resolve()}catch(C){return Promise.reject(C)}};c()})};m();var a=n?B:!B;return ie.createElement("div",{id:fl,className:"walletconnect-qrcode__base animated fadeIn"},ie.createElement("div",{className:"walletconnect-modal__base"},ie.createElement(a0,{onClose:t.onClose}),M&&B?ie.createElement("div",{className:"walletconnect-modal__single_wallet"},ie.createElement("a",{onClick:function(){return Ge.saveMobileLinkInfo({name:$[0].name,href:P})},href:P,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(M?$[0].name:"")+" ›")):e||i||!i&&$.length?ie.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(a?" right__selected":"")},ie.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?ie.createElement(ie.Fragment,null,ie.createElement("a",{onClick:function(){return R(!1),m()}},t.text.mobile),ie.createElement("a",{onClick:function(){return R(!0)}},t.text.qrcode)):ie.createElement(ie.Fragment,null,ie.createElement("a",{onClick:function(){return R(!0)}},t.text.qrcode),ie.createElement("a",{onClick:function(){return R(!1),m()}},t.text.desktop))):null,ie.createElement("div",null,B||!e&&!i&&!$.length?ie.createElement(g0,Object.assign({},F)):ie.createElement(h0,Object.assign({},F,{links:$,errorMessage:W})))))}var _0={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},v0={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},y0={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},w0={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},b0={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},x0={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},M0={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},E0={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},Po={de:_0,en:v0,es:y0,fr:w0,ko:b0,pt:x0,zh:M0,fa:E0};function k0(){var t=Ge.getDocumentOrThrow(),e=t.getElementById(Lo);e&&t.head.removeChild(e);var n=t.createElement("style");n.setAttribute("id",Lo),n.innerText=Xh,t.head.appendChild(n)}function S0(){var t=Ge.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id",cl),t.body.appendChild(e),e}function pl(){var t=Ge.getDocumentOrThrow(),e=t.getElementById(fl);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout(function(){var n=t.getElementById(cl);n&&t.body.removeChild(n)},n0))}function C0(t){return function(){pl(),t&&t()}}function A0(){var t=Ge.getNavigatorOrThrow().language.split("-")[0]||"en";return Po[t]||Po.en}function T0(t,e,n){k0();var r=S0();ie.render(ie.createElement(m0,{text:A0(),uri:t,onClose:C0(e),qrcodeModalOptions:n}),r)}function I0(){pl()}var Uo="algorand";function R0(t,e){if(e==null||e){var n=new URL(t);if(!n.searchParams.has(Uo))return n.searchParams.set(Uo,"true"),n.toString()}return t}function B0(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)===-1&&(n[r]=t[r]);return n}var gl=function(){return typeof Ke<"u"&&typeof Ke.versions<"u"&&typeof Ke.versions.node<"u"};function F0(t,e,n){var r=n||{},o=r.addAlgorandMarkerToUri,i=B0(r,["addAlgorandMarkerToUri"]),l=i;t=R0(t,o),console.log(t),gl()?Zh(t):T0(t,e,l)}function O0(){gl()||I0()}var N0={open:F0,close:O0},Do=N0;const an=[];function L0(t,e=ze){let n;const r=new Set;function o(s){if(nt(t,s)&&(t=s,n)){const d=!an.length;for(const y of r)y[1](),an.push(y,t);if(d){for(let y=0;y{r.delete(y),r.size===0&&n&&(n(),n=null)}}return{set:o,update:i,subscribe:l}}const zr={ready:async()=>{try{return(await fetch("http://localhost:9090/ready")).status===200}catch{return!1}},list:async()=>{try{return await(await fetch("http://localhost:9090/list")).json()}catch{return[]}},register:async(t,e)=>{try{return(await fetch("http://localhost:9090/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,recovery_key:e})})).status===200}catch{return!1}},update:async(t,e,n)=>{try{return(await fetch("http://localhost:9090/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,did:e,addresses:n})})).status===200}catch{return!1}}},{subscribe:$0,update:jr}=L0({identifiers:[],wallet:{url:"",name:"",icons:[],addresses:[],connected:!1,description:""}}),ft={subscribe:$0,reload:async function(){const t=await zr.list();t.sort((e,n)=>Date.parse(n.last_sync)-Date.parse(e.last_sync)),jr(e=>(e.identifiers=t,e))},setWallet:t=>{jr(e=>(e.wallet=t,e))},removeWallet:()=>{jr(t=>(t.wallet={connected:!1,addresses:[],name:"",description:"",url:"",icons:[]},t))},createDID:async function(t,e){const n=await zr.register(t,e);return n&&this.reload(),n},updateDID:async function(t,e,n){const r=await zr.update(t,e,n);return r&&this.reload(),r}},ml=Symbol("app-context-key"),P0=function(t){jl(ml,t)},yr=function(){return Vl(ml)};function U0(t){let e,n,r=t[0].wallet.name+"",o,i,l,s=t[0].wallet.icons.length>=1&&qo(t);return{c(){e=Y("button"),s&&s.c(),n=Ve(` - Disconnect: `),o=Ve(r),J(e,"type","button"),J(e,"class","inline-flex items-center gap-x-2 rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white hover:bg-red-500")},m(d,y){ge(d,e,y),s&&s.m(e,null),q(e,n),q(e,o),i||(l=Je(e,"click",t[2]),i=!0)},p(d,y){d[0].wallet.icons.length>=1?s?s.p(d,y):(s=qo(d),s.c(),s.m(e,n)):s&&(s.d(1),s=null),y&1&&r!==(r=d[0].wallet.name+"")&&Ye(o,r)},d(d){d&&pe(e),s&&s.d(),i=!1,l()}}}function D0(t){let e,n,r;return{c(){e=Y("button"),e.innerHTML=` - Connect Wallet`,J(e,"type","button"),J(e,"class","inline-flex items-center gap-x-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white hover:bg-indigo-500")},m(o,i){ge(o,e,i),n||(r=Je(e,"click",t[1]),n=!0)},p:ze,d(o){o&&pe(e),n=!1,r()}}}function qo(t){let e,n;return{c(){e=Y("img"),J(e,"class","h-6 w-6"),J(e,"alt","Wallet icon"),Kr(e.src,n=t[0].wallet.icons[0])||J(e,"src",n)},m(r,o){ge(r,e,o)},p(r,o){o&1&&!Kr(e.src,n=r[0].wallet.icons[0])&&J(e,"src",n)},d(r){r&&pe(e)}}}function q0(t){let e;function n(i,l){return i[0].wallet.connected?U0:D0}let r=n(t),o=r(t);return{c(){e=Y("span"),o.c(),J(e,"class","absolute right-0 isolate inline-flex rounded-md shadow-sm")},m(i,l){ge(i,e,l),o.m(e,null)},p(i,[l]){r===(r=n(i))&&o?o.p(i,l):(o.d(1),o=r(i),o&&(o.c(),o.m(e,null)))},i:ze,o:ze,d(i){i&&pe(e),o.d()}}}function H0(t,e,n){let r;_i(t,ft,R=>n(0,r=R));let{mainnet:o=!1}=e;const i=sr(),l=yr();let s;wi(()=>{if(s=new fo({bridge:"https://bridge.walletconnect.org",qrcodeModal:Do,clientMeta:{name:"AlgoID Connect (beta)",description:"AlgoID wallet connector",url:"http://github.com/algorandfoundation/did-algo",icons:["https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_128x128.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_192x192.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_512x512.png"]}}),!s.connected)return;let R=s.peerMeta;R.connected=!0,ft.setWallet(R),l.showAlert("success",`Connected to: ${R.name}`),i("ready"),v()});async function d(){s.connected||(B(),await s.createSession({chainId:o?416001:416002})),v()}function y(){s&&s.connected&&s.killSession()}function v(){s.on("connect",(R,F)=>{if(R)throw l.showAlert("error",`Error connecting to wallet: ${R.message}`),R;let O=F.params[0],P=O.peerMeta;P.connected=!0,P.addresses=O.accounts,ft.setWallet(P),l.showAlert("success",`Connected to: ${P.name}`),i("ready")}),s.on("disconnect",R=>{if(R)throw l.showAlert("error",`Error disconnecting wallet: ${R.message}`),R;ft.removeWallet(),l.showAlert("warning","Disconnected from wallet"),i("session_end")}),s.on("session_update",(R,F)=>{if(R)throw l.showAlert("error",`Wallet Connect session error: ${R.message}`),R;let O=F.params[0],P=O.peerMeta;P.connected=!0,P.addresses=O.accounts,ft.setWallet(P),i("session_update")})}function B(){s.off("connect"),s.off("disconnect"),s.off("session_update"),s=null,s=new fo({bridge:"https://bridge.walletconnect.org",qrcodeModal:Do,clientMeta:{name:"AlgoID Connect (beta)",description:"AlgoID wallet connector",url:"http://github.com/algorandfoundation/did-algo",icons:["https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_128x128.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_192x192.png","https://aid-tech.sfo2.digitaloceanspaces.com/public_assets/at_logo_512x512.png"]}})}return t.$$set=R=>{"mainnet"in R&&n(3,o=R.mainnet)},[r,d,y,o]}class W0 extends st{constructor(e){super(),at(this,e,H0,q0,nt,{mainnet:3})}}function z0(t){let e;return{c(){e=Y("span"),e.textContent="Deactivated",J(e,"class","inline-flex rounded-full bg-red-100 px-2 text-xs font-semibold leading-5 text-red-800")},m(n,r){ge(n,e,r)},d(n){n&&pe(e)}}}function j0(t){let e;return{c(){e=Y("span"),e.textContent="Active",J(e,"class","inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800")},m(n,r){ge(n,e,r)},d(n){n&&pe(e)}}}function V0(t){let e,n,r=t[0].name+"",o,i,l,s=t[0].did+"",d,y,v,B=t[0].addresses.length+"",R,F,O,P=Ho(t[0].last_sync)+"",S,I,M,x,T,$,U,j;function W(a,c){return a[0].active?j0:z0}let Z=W(t),m=Z(t);return{c(){e=Y("tr"),n=Y("td"),o=Ve(r),i=he(),l=Y("td"),d=Ve(s),y=he(),v=Y("td"),R=Ve(B),F=he(),O=Y("td"),S=Ve(P),I=he(),M=Y("td"),m.c(),x=he(),T=Y("td"),$=Y("button"),$.innerHTML='',J(n,"class","whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-3"),J(l,"class","whitespace-nowrap px-3 py-4 text-sm text-gray-500"),J(v,"class","hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell"),J(O,"class","hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell"),J(M,"class","whitespace-nowrap px-3 py-4 text-sm text-gray-500"),J($,"type","button"),J($,"class","inline-flex items-center px-2.5 py-1.5 text-sm font-semibold text-gray-900 hover:text-indigo-600 disabled:cursor-not-allowed disabled:opacity-30"),J(e,"class","cursor-pointer odd:bg-white even:bg-slate-50 hover:bg-slate-100")},m(a,c){ge(a,e,c),q(e,n),q(n,o),q(e,i),q(e,l),q(l,d),q(e,y),q(e,v),q(v,R),q(e,F),q(e,O),q(O,S),q(e,I),q(e,M),m.m(M,null),q(e,x),q(e,T),q(T,$),U||(j=[Je($,"click",Gi(gn(t[2]))),Je(e,"click",Gi(gn(t[3])))],U=!0)},p(a,[c]){c&1&&r!==(r=a[0].name+"")&&Ye(o,r),c&1&&s!==(s=a[0].did+"")&&Ye(d,s),c&1&&B!==(B=a[0].addresses.length+"")&&Ye(R,B),c&1&&P!==(P=Ho(a[0].last_sync)+"")&&Ye(S,P),Z!==(Z=W(a))&&(m.d(1),m=Z(a),m&&(m.c(),m.m(M,null)))},i:ze,o:ze,d(a){a&&pe(e),m.d(),U=!1,dt(j)}}}function Ho(t){let e=new Date;return e.setTime(Date.parse(t)),e.toLocaleDateString(navigator.language,{day:"numeric",year:"numeric",hour:"numeric",month:"short",minute:"numeric",hour12:!0})}function J0(t,e,n){let{identifier:r}=e;const o=sr(),i=()=>{o("link_wallet",{did:r})},l=()=>{o("show_details",{did:r})};return t.$$set=s=>{"identifier"in s&&n(0,r=s.identifier)},[r,o,i,l]}class K0 extends st{constructor(e){super(),at(this,e,J0,V0,nt,{identifier:0})}}typeof window<"u"&&(window.Prism&&console.warn("Prism has already been initiated. Please ensure that svelte-prism is imported first."),window.Prism=window.Prism||{},window.Prism.manual=!0);var gi={},G0={get exports(){return gi},set exports(t){gi=t}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,l={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function M(x){return x instanceof d?new d(x.type,M(x.content),x.alias):Array.isArray(x)?x.map(M):x.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch($){var M=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec($.stack)||[])[1];if(M){var x=document.getElementsByTagName("script");for(var T in x)if(x[T].src==M)return x[T]}return null}},isActive:function(M,x,T){for(var $="no-"+x;M;){var U=M.classList;if(U.contains(x))return!0;if(U.contains($))return!1;M=M.parentElement}return!!T}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(M,x){var T=s.util.clone(s.languages[M]);for(var $ in x)T[$]=x[$];return T},insertBefore:function(M,x,T,$){$=$||s.languages;var U=$[M],j={};for(var W in U)if(U.hasOwnProperty(W)){if(W==x)for(var Z in T)T.hasOwnProperty(Z)&&(j[Z]=T[Z]);T.hasOwnProperty(W)||(j[W]=U[W])}var m=$[M];return $[M]=j,s.languages.DFS(s.languages,function(a,c){c===m&&a!=M&&(this[a]=j)}),j},DFS:function M(x,T,$,U){U=U||{};var j=s.util.objId;for(var W in x)if(x.hasOwnProperty(W)){T.call(x,W,x[W],$||W);var Z=x[W],m=s.util.type(Z);m==="Object"&&!U[j(Z)]?(U[j(Z)]=!0,M(Z,T,null,U)):m==="Array"&&!U[j(Z)]&&(U[j(Z)]=!0,M(Z,T,W,U))}}},plugins:{},highlightAll:function(M,x){s.highlightAllUnder(document,M,x)},highlightAllUnder:function(M,x,T){var $={callback:T,container:M,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",$),$.elements=Array.prototype.slice.apply($.container.querySelectorAll($.selector)),s.hooks.run("before-all-elements-highlight",$);for(var U=0,j;j=$.elements[U++];)s.highlightElement(j,x===!0,$.callback)},highlightElement:function(M,x,T){var $=s.util.getLanguage(M),U=s.languages[$];s.util.setLanguage(M,$);var j=M.parentElement;j&&j.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(j,$);var W=M.textContent,Z={element:M,language:$,grammar:U,code:W};function m(c){Z.highlightedCode=c,s.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,s.hooks.run("after-highlight",Z),s.hooks.run("complete",Z),T&&T.call(Z.element)}if(s.hooks.run("before-sanity-check",Z),j=Z.element.parentElement,j&&j.nodeName.toLowerCase()==="pre"&&!j.hasAttribute("tabindex")&&j.setAttribute("tabindex","0"),!Z.code){s.hooks.run("complete",Z),T&&T.call(Z.element);return}if(s.hooks.run("before-highlight",Z),!Z.grammar){m(s.util.encode(Z.code));return}if(x&&r.Worker){var a=new Worker(s.filename);a.onmessage=function(c){m(c.data)},a.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else m(s.highlight(Z.code,Z.grammar,Z.language))},highlight:function(M,x,T){var $={code:M,grammar:x,language:T};if(s.hooks.run("before-tokenize",$),!$.grammar)throw new Error('The language "'+$.language+'" has no grammar.');return $.tokens=s.tokenize($.code,$.grammar),s.hooks.run("after-tokenize",$),d.stringify(s.util.encode($.tokens),$.language)},tokenize:function(M,x){var T=x.rest;if(T){for(var $ in T)x[$]=T[$];delete x.rest}var U=new B;return R(U,U.head,M),v(M,U,x,U.head,0),O(U)},hooks:{all:{},add:function(M,x){var T=s.hooks.all;T[M]=T[M]||[],T[M].push(x)},run:function(M,x){var T=s.hooks.all[M];if(!(!T||!T.length))for(var $=0,U;U=T[$++];)U(x)}},Token:d};r.Prism=s;function d(M,x,T,$){this.type=M,this.content=x,this.alias=T,this.length=($||"").length|0}d.stringify=function M(x,T){if(typeof x=="string")return x;if(Array.isArray(x)){var $="";return x.forEach(function(m){$+=M(m,T)}),$}var U={type:x.type,content:M(x.content,T),tag:"span",classes:["token",x.type],attributes:{},language:T},j=x.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(U.classes,j):U.classes.push(j)),s.hooks.run("wrap",U);var W="";for(var Z in U.attributes)W+=" "+Z+'="'+(U.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+U.tag+' class="'+U.classes.join(" ")+'"'+W+">"+U.content+""};function y(M,x,T,$){M.lastIndex=x;var U=M.exec(T);if(U&&$&&U[1]){var j=U[1].length;U.index+=j,U[0]=U[0].slice(j)}return U}function v(M,x,T,$,U,j){for(var W in T)if(!(!T.hasOwnProperty(W)||!T[W])){var Z=T[W];Z=Array.isArray(Z)?Z:[Z];for(var m=0;m=j.reach);u+=b.value.length,b=b.next){var k=b.value;if(x.length>M.length)return;if(!(k instanceof d)){var G=1,H;if(_){if(H=y(N,u,M,p),!H||H.index>=M.length)break;var D=H.index,te=H.index+H[0].length,re=u;for(re+=b.value.length;D>=re;)b=b.next,re+=b.value.length;if(re-=b.value.length,u=re,b.value instanceof d)continue;for(var g=b;g!==x.tail&&(rej.reach&&(j.reach=ae);var ne=b.prev;V&&(ne=R(x,ne,V),u+=V.length),F(x,ne,G);var ee=new d(W,c?s.tokenize(K,c):K,w,K);if(b=R(x,ne,ee),X&&R(x,b,X),G>1){var me={cause:W+","+m,reach:ae};v(M,x,T,b.prev,u,me),j&&me.reach>j.reach&&(j.reach=me.reach)}}}}}}function B(){var M={value:null,prev:null,next:null},x={value:null,prev:M,next:null};M.next=x,this.head=M,this.tail=x,this.length=0}function R(M,x,T){var $=x.next,U={value:T,prev:x,next:$};return x.next=U,$.prev=U,M.length++,U}function F(M,x,T){for(var $=x.next,U=0;U/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,i){var l={};l["language-"+i]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[i]},l.cdata=/^$/i;var s={"included-cdata":{pattern://i,inside:l}};s["language-"+i]={pattern:/[\s\S]+/,inside:n.languages[i]};var d={};d[o]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",d)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(P,S){return"✖ Error "+P+" while fetching file: "+S},i="✖ Error: File does not exist or is empty",l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",d="loading",y="loaded",v="failed",B="pre[data-src]:not(["+s+'="'+y+'"]):not(['+s+'="'+d+'"])';function R(P,S,I){var M=new XMLHttpRequest;M.open("GET",P,!0),M.onreadystatechange=function(){M.readyState==4&&(M.status<400&&M.responseText?S(M.responseText):M.status>=400?I(o(M.status,M.statusText)):I(i))},M.send(null)}function F(P){var S=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(P||"");if(S){var I=Number(S[1]),M=S[2],x=S[3];return M?x?[I,Number(x)]:[I,void 0]:[I,I]}}n.hooks.add("before-highlightall",function(P){P.selector+=", "+B}),n.hooks.add("before-sanity-check",function(P){var S=P.element;if(S.matches(B)){P.code="",S.setAttribute(s,d);var I=S.appendChild(document.createElement("CODE"));I.textContent=r;var M=S.getAttribute("data-src"),x=P.language;if(x==="none"){var T=(/\.(\w+)$/.exec(M)||[,"none"])[1];x=l[T]||T}n.util.setLanguage(I,x),n.util.setLanguage(S,x);var $=n.plugins.autoloader;$&&$.loadLanguages(x),R(M,function(U){S.setAttribute(s,y);var j=F(S.getAttribute("data-range"));if(j){var W=U.split(/\r\n?|\n/g),Z=j[0],m=j[1]==null?W.length:j[1];Z<0&&(Z+=W.length),Z=Math.max(0,Math.min(Z-1,W.length)),m<0&&(m+=W.length),m=Math.max(0,Math.min(m,W.length)),U=W.slice(Z,m).join(` -`),S.hasAttribute("data-start")||S.setAttribute("data-start",String(Z+1))}I.textContent=U,n.highlightElement(I)},function(U){S.setAttribute(s,v),I.textContent=U})}}),n.plugins.fileHighlight={highlight:function(S){for(var I=(S||document).querySelectorAll(B),M=0,x;x=I[M++];)n.highlightElement(x)}};var O=!1;n.fileHighlight=function(){O||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),O=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(G0);const _l=gi,Wo="(if|else if|await|then|catch|each|html|debug)";Prism.languages.svelte=Prism.languages.extend("markup",{each:{pattern:new RegExp("{[#/]each(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{"language-javascript":[{pattern:/(as[\s\S]*)\([\s\S]*\)(?=\s*\})/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(as[\s]*)[\s\S]*(?=\s*)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(#each[\s]*)[\s\S]*(?=as)/,lookbehind:!0,inside:Prism.languages.javascript}],keyword:/[#/]each|as/,punctuation:/{|}/}},block:{pattern:new RegExp("{[#:/@]/s"+Wo+"(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{punctuation:/^{|}$/,keyword:[new RegExp("[#:/@]"+Wo+"( )*"),/as/,/then/],"language-javascript":{pattern:/[\s\S]*/,inside:Prism.languages.javascript}}},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?:"[^"]*"|'[^']*'|{[\s\S]+?}(?=[\s/>])))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,inside:Prism.languages.javascript},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],"language-javascript":{pattern:/{[\s\S]+}/,inside:Prism.languages.javascript}}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,lookbehind:!0,inside:Prism.languages.javascript}});Prism.languages.svelte.tag.inside["attr-value"].inside.entity=Prism.languages.svelte.entity;Prism.hooks.add("wrap",t=>{t.type==="entity"&&(t.attributes.title=t.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.svelte.tag,"addInlined",{value:function(e,n){const r={};r["language-"+n]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^$/i;const o={"included-cdata":{pattern://i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};const i={};i[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:o},Prism.languages.insertBefore("svelte","cdata",i)}});Prism.languages.svelte.tag.addInlined("style","css");Prism.languages.svelte.tag.addInlined("script","javascript");function Y0(t){let e,n;return{c(){e=new Dl(!1),n=$n(),e.a=n},m(r,o){e.m(t[2],r,o),ge(r,n,o)},p(r,o){o&4&&e.p(r[2])},d(r){r&&pe(n),r&&e.d()}}}function Q0(t){let e;return{c(){e=Ve(t[2])},m(n,r){ge(n,e,r)},p(n,r){r&4&&Ye(e,n[2])},d(n){n&&pe(e)}}}function Z0(t){let e,n,r,o,i,l,s;const d=t[6].default,y=da(d,t,t[5],null);function v(F,O){return F[0]==="none"?Q0:Y0}let B=v(t),R=B(t);return{c(){e=Y("code"),y&&y.c(),n=he(),r=Y("pre"),o=Y("code"),R.c(),Ul(e,"display","none"),J(o,"class",i="language-"+t[0]),J(r,"class",l="language-"+t[0]),J(r,"command-line",""),J(r,"data-output","2-17")},m(F,O){ge(F,e,O),y&&y.m(e,null),t[7](e),ge(F,n,O),ge(F,r,O),q(r,o),R.m(o,null),s=!0},p(F,[O]){y&&y.p&&(!s||O&32)&&ma(y,d,F,F[5],s?ga(d,F[5],O,null):_a(F[5]),null),B===(B=v(F))&&R?R.p(F,O):(R.d(1),R=B(F),R&&(R.c(),R.m(o,null))),(!s||O&1&&i!==(i="language-"+F[0]))&&J(o,"class",i),(!s||O&1&&l!==(l="language-"+F[0]))&&J(r,"class",l)},i(F){s||(ye(y,F),s=!0)},o(F){We(y,F),s=!1},d(F){F&&pe(e),y&&y.d(F),t[7](null),F&&pe(n),F&&pe(r),R.d()}}}const zo=_l;_l.highlightElement;const X0={transform:t=>t};function ed(t,e,n){let{$$slots:r={},$$scope:o}=e,{language:i="javascript"}=e,{source:l=""}=e,{transform:s=R=>R}=e,d,y;function v(){const R=zo.languages[i];let F=l||d.textContent;F=X0.transform(F),F=s(F),n(2,y=i==="none"?F:zo.highlight(F,R,i))}function B(R){Ft[R?"unshift":"push"](()=>{d=R,n(1,d)})}return t.$$set=R=>{n(9,e=Kn(Kn({},e),Ji(R))),"language"in R&&n(0,i=R.language),"source"in R&&n(3,l=R.source),"transform"in R&&n(4,s=R.transform),"$$scope"in R&&n(5,o=R.$$scope)},t.$$.update=()=>{e&&(l||d)&&v()},e=Ji(e),[i,d,y,l,s,o,r,B]}let td=class extends st{constructor(e){super(),at(this,e,ed,Z0,nt,{language:0,source:3,transform:4})}};function jo(t,e,n){const r=t.slice();return r[2]=e[n],r}function nd(t){let e,n=t[0].addresses,r=[];for(let o=0;oThese are the latest details for the selected identifier. You can use the provided - - tool to add or remove ALGO addresses associated with this - identifier.

`,r=he(),o=Y("div"),i=Y("div"),i.innerHTML='

Local reference (name)

',l=he(),s=Y("div"),d=Y("p"),v=Ve(y),B=he(),R=Y("div"),F=Y("div"),F.innerHTML='

Last sync

',O=he(),P=Y("div"),S=Y("p"),M=Ve(I),x=he(),T=Y("div"),$=Y("div"),$.innerHTML='

Linked addresses

',U=he(),j=Y("div"),W=Y("p"),G.c(),Z=he(),m=Y("div"),a=Y("div"),a.innerHTML='

Current status

',c=he(),p=Y("div"),re.c(),_=he(),w=Y("div"),C=Y("div"),ht(N.$$.fragment),J(n,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5 first:sm:pt-0"),J(d,"class","block w-full text-base text-gray-600"),J(s,"class","sm:col-span-2"),J(o,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(S,"class","block w-full text-base text-gray-600"),J(P,"class","sm:col-span-2"),J(R,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(W,"class","block w-full text-base text-gray-600"),J(j,"class","sm:col-span-2"),J(T,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(p,"class","sm:col-span-2"),J(m,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(C,"class","sm:col-span-3"),J(w,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(e,"class","space-y-6 py-6 sm:space-y-0 sm:divide-y sm:divide-gray-200 sm:py-0")},m(g,D){ge(g,e,D),q(e,n),q(e,r),q(e,o),q(o,i),q(o,l),q(o,s),q(s,d),q(d,v),q(e,B),q(e,R),q(R,F),q(R,O),q(R,P),q(P,S),q(S,M),q(e,x),q(e,T),q(T,$),q(T,U),q(T,j),q(j,W),G.m(W,null),q(e,Z),q(e,m),q(m,a),q(m,c),q(m,p),re.m(p,null),q(e,_),q(e,w),q(w,C),rt(N,C,null),b=!0},p(g,[D]){(!b||D&1)&&y!==(y=g[0].name+"")&&Ye(v,y),(!b||D&1)&&I!==(I=Jo(g[0].last_sync)+"")&&Ye(M,I),k===(k=u(g))&&G?G.p(g,D):(G.d(1),G=k(g),G&&(G.c(),G.m(W,null))),te!==(te=H(g))&&(re.d(1),re=te(g),re&&(re.c(),re.m(p,null)))},i(g){b||(ye(N.$$.fragment,g),b=!0)},o(g){We(N.$$.fragment,g),b=!1},d(g){g&&pe(e),G.d(),re.d(),it(N)}}}function Jo(t){if(t==="")return"-";let e=new Date;return e.setTime(Date.parse(t)),e.toLocaleDateString(navigator.language,{day:"numeric",year:"numeric",hour:"numeric",month:"short",minute:"numeric",hour12:!0})}function Ko(t){return t.slice(0,14)+"..."+t.slice(-14)}function sd(t,e,n){let{identifier:r}=e,o=JSON.stringify(r.document,null,2);return t.$$set=i=>{"identifier"in i&&n(0,r=i.identifier)},[r,o]}class ld extends st{constructor(e){super(),at(this,e,sd,ad,nt,{identifier:0})}}function Zt(t){const e=t-1;return e*e*e+1}function Go(t,{delay:e=0,duration:n=400,easing:r=fa}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:i=>`opacity: ${i*o}`}}function ud(t,{delay:e=0,duration:n=400,easing:r=Zt,x:o=0,y:i=0,opacity:l=0}={}){const s=getComputedStyle(t),d=+s.opacity,y=s.transform==="none"?"":s.transform,v=d*(1-l),[B,R]=Ki(o),[F,O]=Ki(i);return{delay:e,duration:n,easing:r,css:(P,S)=>` - transform: ${y} translate(${(1-P)*B}${R}, ${(1-P)*F}${O}); - opacity: ${d-v*S}`}}function Yo(t,{delay:e=0,duration:n=400,easing:r=Zt,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,s=o==="y"?"height":"width",d=parseFloat(i[s]),y=o==="y"?["top","bottom"]:["left","right"],v=y.map(I=>`${I[0].toUpperCase()}${I.slice(1)}`),B=parseFloat(i[`padding${v[0]}`]),R=parseFloat(i[`padding${v[1]}`]),F=parseFloat(i[`margin${v[0]}`]),O=parseFloat(i[`margin${v[1]}`]),P=parseFloat(i[`border${v[0]}Width`]),S=parseFloat(i[`border${v[1]}Width`]);return{delay:e,duration:n,easing:r,css:I=>`overflow: hidden;opacity: ${Math.min(I*20,1)*l};${s}: ${I*d}px;padding-${y[0]}: ${I*B}px;padding-${y[1]}: ${I*R}px;margin-${y[0]}: ${I*F}px;margin-${y[1]}: ${I*O}px;border-${y[0]}-width: ${I*P}px;border-${y[1]}-width: ${I*S}px;`}}function Qo(t){let e,n,r,o,i,l,s,d,y,v,B,R,F,O,P,S,I,M,x;return{c(){e=Y("div"),n=Y("div"),r=Y("div"),o=Y("p"),i=Ve(t[2]),l=he(),s=Y("div"),d=Y("div"),y=Y("button"),v=Y("span"),v.textContent="Dismiss",B=he(),R=Gr("svg"),F=Gr("path"),O=he(),P=Y("div"),P.innerHTML=`

success styles

-

error styles

-

warning styles

`,J(o,"class","text-sm font-medium "+t[3]("text")),J(r,"class","ml-3"),J(v,"class","sr-only"),J(F,"d","M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"),J(R,"class","h-5 w-5"),J(R,"viewBox","0 0 20 20"),J(R,"fill","currentColor"),J(R,"aria-hidden","true"),J(y,"type","button"),J(y,"class","inline-fle p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2 "+t[3]("button")),J(d,"class","-mx-1.5 -my-1.5"),J(s,"class","ml-auto pl-3"),J(n,"class","flex"),J(P,"class","hidden"),J(e,"class","border-l-4 p-4 "+t[3]("border"))},m(T,$){ge(T,e,$),q(e,n),q(n,r),q(r,o),q(o,i),q(n,l),q(n,s),q(s,d),q(d,y),q(y,v),q(y,B),q(y,R),q(R,F),q(e,O),q(e,P),I=!0,M||(x=Je(y,"click",gn(t[5])),M=!0)},p(T,$){t=T,(!I||$&4)&&Ye(i,t[2])},i(T){I||(Qt(()=>{I&&(S||(S=ln(e,Yo,{easing:Zt,duration:400},!0)),S.run(1))}),I=!0)},o(T){S||(S=ln(e,Yo,{easing:Zt,duration:400},!1)),S.run(0),I=!1},d(T){T&&pe(e),T&&S&&S.end(),M=!1,x()}}}function cd(t){let e,n,r=!t[1]&&Qo(t);return{c(){r&&r.c(),e=$n()},m(o,i){r&&r.m(o,i),ge(o,e,i),n=!0},p(o,[i]){o[1]?r&&(Xt(),We(r,1,1,()=>{r=null}),en()):r?(r.p(o,i),i&2&&ye(r,1)):(r=Qo(o),r.c(),ye(r,1),r.m(e.parentNode,e))},i(o){n||(ye(r),n=!0)},o(o){We(r),n=!1},d(o){r&&r.d(o),o&&pe(e)}}}function fd(t,e,n){let r=!0,o,i="success";function l(B,R){i=B,n(2,o=R),n(1,r=!1)}function s(){n(1,r=!0)}function d(B){switch(B){case"border":return"border-COLOR-400 bg-COLOR-50".replaceAll("COLOR",y());case"text":return"text-COLOR-800".replaceAll("COLOR",y());case"button":return"bg-COLOR-50 text-COLOR-500 hover:bg-COLOR-100 focus:ring-COLOR-600 focus:ring-offset-COLOR-50".replaceAll("COLOR",y())}}function y(){switch(i){case"success":return"green";case"warning":return"yellow";case"error":return"red"}}return[s,r,o,d,l,()=>{s()}]}class vl extends st{constructor(e){super(),at(this,e,fd,cd,nt,{show:4,close:0})}get show(){return this.$$.ctx[4]}get close(){return this.$$.ctx[0]}}function hd(t){let e,n,r,o,i,l,s,d,y,v,B,R,F,O,P,S,I,M,x,T,$={};return i=new vl({props:$}),t[3](i),{c(){e=Y("div"),n=Y("form"),r=Y("div"),o=Y("div"),ht(i.$$.fragment),l=he(),s=Y("p"),s.innerHTML=`A decentralized identifier (or DID) is an asset designed to be owned by a controller - entity. A single identifier can be used on any number of services, and you can create - as many identifiers as you want.`,d=he(),y=Y("div"),y.innerHTML=`

Name (local reference)

-
`,v=he(),B=Y("div"),B.innerHTML=`

The recovery key used to create this identifier is not stored locally. If you lose - it ther's no other way to recover it. Please make sure you have a copy of it.

-

Recovery key

-
-

Key confirmation

-
`,R=he(),F=Y("div"),O=Y("div"),P=Y("button"),P.textContent="Cancel",S=he(),I=Y("button"),I.textContent="Create",J(o,"class","sm:col-span-3"),J(s,"class","sm:col-span-3"),J(r,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5 first:sm:pt-0"),J(y,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(B,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(P,"type","button"),J(P,"class","rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"),J(I,"type","submit"),J(I,"class","inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"),J(O,"class","flex justify-end space-x-3"),J(F,"class","flex-shrink-0 border-t border-gray-200 px-4 py-5 sm:px-6"),J(n,"class","flex h-full flex-col"),J(e,"class","space-y-6 py-6 sm:space-y-0 sm:divide-y sm:divide-gray-200 sm:py-0")},m(U,j){ge(U,e,j),q(e,n),q(n,r),q(r,o),rt(i,o,null),q(r,l),q(r,s),q(n,d),q(n,y),q(n,v),q(n,B),q(n,R),q(n,F),q(F,O),q(O,P),q(O,S),q(O,I),M=!0,x||(T=[Je(P,"click",t[4]),Je(n,"submit",gn(t[2]))],x=!0)},p(U,[j]){const W={};i.$set(W)},i(U){M||(ye(i.$$.fragment,U),M=!0)},o(U){We(i.$$.fragment,U),M=!1},d(U){U&&pe(e),t[3](null),it(i),x=!1,dt(T)}}}function dd(t){const e=document.getElementById(t);return e.value.length===0?(e.classList.add("text-red-900","ring-red-300"),!1):(e.classList.remove("text-red-900","ring-red-300"),!0)}function pd(t,e,n){let r;const o=yr();wi(()=>{document.getElementById("name").focus()});function i(y){y.preventDefault();const v=new FormData(y.target),B=Object.fromEntries(v.entries());for(const[R]of Object.entries(B))if(!dd(R)){r.show("error","Validate the provided values and try again.");return}if(B.recovery_key.length<8){r.show("error","The recovery key must be at least 8 characters long.");return}if(B.confirmation!==B.recovery_key){r.show("error","The confirmation key does not match the recovery key.");return}l(B.name,B.recovery_key)}async function l(y,v){let B=await ft.createDID(y,v);o.closeModal(),B?o.showAlert("success","Identifier created successfully."):o.showAlert("error","Failed to create identifier.")}function s(y){Ft[y?"unshift":"push"](()=>{r=y,n(0,r)})}return[r,o,i,s,()=>{o.closeModal()}]}class gd extends st{constructor(e){super(),at(this,e,pd,hd,nt,{})}}function Zo(t){let e,n;return{c(){e=Y("span"),n=Ve(t[0]),J(e,"class","sr-only")},m(r,o){ge(r,e,o),q(e,n)},p(r,o){o&1&&Ye(n,r[0])},d(r){r&&pe(e)}}}function md(t){let e,n,r,o,i,l=t[0]&&Zo(t);return{c(){e=Y("button"),l&&l.c(),n=he(),r=Y("span"),J(r,"aria-hidden","true"),J(r,"class","pointer-events-none inline-block h-5 w-5 translate-x-0 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"),J(e,"type","button"),J(e,"class","relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-gray-200 transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"),J(e,"role","switch"),J(e,"aria-checked","false")},m(s,d){ge(s,e,d),l&&l.m(e,null),q(e,n),q(e,r),t[6](r),t[7](e),o||(i=Je(e,"click",gn(t[1])),o=!0)},p(s,[d]){s[0]?l?l.p(s,d):(l=Zo(s),l.c(),l.m(e,n)):l&&(l.d(1),l=null)},i:ze,o:ze,d(s){s&&pe(e),l&&l.d(),t[6](null),t[7](null),o=!1,i()}}}function _d(t,e,n){const r=sr();let{description:o=""}=e,{enabled:i=!1}=e;wi(()=>{v()});let l,s;function d(){n(4,i=!i),r("toggle",{enabled:i}),v()}function y(){return i}function v(){if(i){s.classList.add("bg-indigo-600"),s.classList.remove("bg-gray-200"),l.classList.add("translate-x-5");return}s.classList.add("bg-gray-200"),s.classList.remove("bg-indigo-600"),l.classList.remove("translate-x-5")}function B(F){Ft[F?"unshift":"push"](()=>{l=F,n(2,l)})}function R(F){Ft[F?"unshift":"push"](()=>{s=F,n(3,s)})}return t.$$set=F=>{"description"in F&&n(0,o=F.description),"enabled"in F&&n(4,i=F.enabled)},[o,d,l,s,i,y,B,R]}class vd extends st{constructor(e){super(),at(this,e,_d,md,nt,{description:0,enabled:4,toggle:1,isEnabled:5})}get toggle(){return this.$$.ctx[1]}get isEnabled(){return this.$$.ctx[5]}}function Xo(t,e,n){const r=t.slice();return r[7]=e[n],r}function yd(t){let e,n,r=t[0],o=[];for(let l=0;lWe(o[l],1,1,()=>{o[l]=null});return{c(){e=Y("div");for(let l=0;lAdjust the ALGO addresses associated with this identifier. You can add - as many as you want. The DID document associated will be automatically synced with the - network.

`,r=he(),o=Y("div"),l.c(),s=he(),d=Y("div"),y=Y("div"),v=Y("button"),v.textContent="Cancel",B=he(),R=Y("button"),R.textContent="Sync",J(n,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5 first:sm:pt-0"),J(o,"class","space-y-2 px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:space-y-0 sm:px-6 sm:py-5"),J(v,"type","button"),J(v,"class","rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"),J(R,"type","submit"),J(R,"class","inline-flex justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"),J(y,"class","flex justify-end space-x-3"),J(d,"class","flex-shrink-0 border-t border-gray-200 px-4 py-5 sm:px-6"),J(e,"class","space-y-6 py-6 sm:space-y-0 sm:divide-y sm:divide-gray-200 sm:py-0")},m(x,T){ge(x,e,T),q(e,n),q(e,r),q(e,o),I[i].m(o,null),q(e,s),q(e,d),q(d,y),q(y,v),q(y,B),q(y,R),F=!0,O||(P=[Je(v,"click",t[6]),Je(R,"click",gn(t[2]))],O=!0)},p(x,[T]){let $=i;i=M(x),i===$?I[i].p(x,T):(Xt(),We(I[$],1,1,()=>{I[$]=null}),en(),l=I[i],l?l.p(x,T):(l=I[i]=S[i](x),l.c()),ye(l,1),l.m(o,null))},i(x){F||(ye(l),F=!0)},o(x){We(l),F=!1},d(x){x&&pe(e),I[i].d(),O=!1,dt(P)}}}function ta(t){return t.slice(0,16)+"..."+t.slice(-16)}function xd(t){t.enabled=!t.enabled}function Md(t,e,n){let r;_i(t,ft,v=>n(4,r=v));let{identifier:o}=e;const i=yr();let l;async function s(){let v=await ft.updateDID(o.name,o.did,l);i.closeModal(),v?i.showAlert("success","Identifier updated successfully."):i.showAlert("error","Failed to updated identifier.")}const d=v=>{xd(v)},y=()=>{i.closeModal()};return t.$$set=v=>{"identifier"in v&&n(3,o=v.identifier)},t.$$.update=()=>{t.$$.dirty&25&&(n(0,l=[]),o.addresses.forEach(v=>{n(0,l=[...l,{address:v.address,network:v.network,enabled:!0}])}),r.wallet.addresses.forEach(v=>{l.find(B=>B.address==v)||n(0,l=[...l,{address:v,network:"mainnet",enabled:!1}])}))},[l,i,s,o,r,d,y]}class Ed extends st{constructor(e){super(),at(this,e,Md,bd,nt,{identifier:3})}}function na(t,e,n){const r=t.slice();return r[5]=e[n],r}function kd(t){let e,n,r,o,i,l,s,d,y,v,B=t[0],R=[];for(let O=0;OWe(R[O],1,1,()=>{R[O]=null});return{c(){e=Y("div"),n=Y("table"),r=Y("thead"),r.innerHTML=`Reference - DID - Addresses - Last Sync - Status - Actions`,o=he(),i=Y("tbody");for(let O=0;O - Create new decentralized identifier`,J(i,"class","bg-white"),J(n,"class","min-w-full divide-y divide-gray-300"),J(s,"type","button"),J(s,"class","relative flex w-full flex-row justify-center border-2 bg-gray-700 py-2 text-gray-200 hover:bg-gray-800 hover:text-white"),J(e,"class","inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8")},m(O,P){ge(O,e,P),q(e,n),q(n,r),q(n,o),q(n,i);for(let S=0;S - Create your first decentralized identifier`,J(e,"type","button"),J(e,"class","relative block w-full rounded-lg border-2 border-dashed border-gray-300 p-12 text-center hover:border-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2")},m(o,i){ge(o,e,i),n||(r=Je(e,"click",t[1]),n=!0)},p:ze,i:ze,o:ze,d(o){o&&pe(e),n=!1,r()}}}function ra(t){let e,n;return e=new K0({props:{identifier:t[5]}}),e.$on("show_details",t[2]),e.$on("link_wallet",t[3]),{c(){ht(e.$$.fragment)},m(r,o){rt(e,r,o),n=!0},p(r,o){const i={};o&1&&(i.identifier=r[5]),e.$set(i)},i(r){n||(ye(e.$$.fragment,r),n=!0)},o(r){We(e.$$.fragment,r),n=!1},d(r){it(e,r)}}}function Cd(t){let e,n,r,o;const i=[Sd,kd],l=[];function s(d,y){return d[0].length==0?0:1}return n=s(t),r=l[n]=i[n](t),{c(){e=Y("section"),r.c()},m(d,y){ge(d,e,y),l[n].m(e,null),o=!0},p(d,[y]){let v=n;n=s(d),n===v?l[n].p(d,y):(Xt(),We(l[v],1,1,()=>{l[v]=null}),en(),r=l[n],r?r.p(d,y):(r=l[n]=i[n](d),r.c()),ye(r,1),r.m(e,null))},i(d){o||(ye(r),o=!0)},o(d){We(r),o=!1},d(d){d&&pe(e),l[n].d()}}}function Ad(t,e,n){const r=yr();let{identifiers:o}=e;function i(){r.showModal({title:"Create New Identifier",asPanel:!1,content:gd,props:{}})}function l(d){r.showModal({title:d.detail.did.did,subtitle:"Identifier Details",asPanel:!0,content:ld,props:{identifier:d.detail.did}})}function s(d){r.showModal({title:"Manage Link Addresses",subtitle:d.detail.did.did,asPanel:!1,content:Ed,props:{identifier:d.detail.did}})}return t.$$set=d=>{"identifiers"in d&&n(0,o=d.identifiers)},[o,i,l,s]}class Td extends st{constructor(e){super(),at(this,e,Ad,Cd,nt,{identifiers:0})}}function Id(t){const e=n=>{t.contains(n.target)||t.dispatchEvent(new CustomEvent("outclick"))};return document.addEventListener("click",e,!0),{destroy(){document.removeEventListener("click",e,!0)}}}function ia(t){let e,n,r,o,i,l,s=t[1].title+"",d,y,v,B,R,F,O,P,S,I,M=t[1].subtitle&&oa(t);const x=t[9].default,T=da(x,t,t[8],null);return{c(){e=Y("div"),n=Y("div"),r=Y("div"),o=Y("div"),i=Y("div"),l=Y("h1"),d=Ve(s),y=he(),M&&M.c(),v=he(),B=Y("button"),B.innerHTML=`Close - `,R=he(),T&&T.c(),J(l,"class","text-lg font-semibold text-gray-900"),J(i,"class","flex-1"),J(B,"class","rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2"),J(o,"class","flex items-center bg-gray-50 p-6 sm:rounded-md"),J(r,"class","space-y-4"),J(n,"class","overflow-y-scroll bg-white shadow-2xl "+t[4]("content")),J(e,"class","absolute bottom-0 left-0 right-0 top-0 z-10 flex flex-col bg-gray-700 bg-opacity-75 backdrop-blur-sm transition-all "+t[4]("wrapper"))},m($,U){ge($,e,U),q(e,n),q(n,r),q(r,o),q(o,i),q(i,l),q(l,d),q(i,y),M&&M.m(i,null),q(o,v),q(o,B),q(r,R),T&&T.m(r,null),P=!0,S||(I=[Je(B,"click",t[0]),Fl(Id.call(null,n)),Je(n,"outclick",t[0]),Je(e,"introend",t[10]),Je(e,"outroend",t[11])],S=!0)},p($,U){t=$,(!P||U&2)&&s!==(s=t[1].title+"")&&Ye(d,s),t[1].subtitle?M?M.p(t,U):(M=oa(t),M.c(),M.m(i,null)):M&&(M.d(1),M=null),T&&T.p&&(!P||U&256)&&ma(T,x,t,t[8],P?ga(x,t[8],U,null):_a(t[8]),null)},i($){P||(ye(T,$),Qt(()=>{P&&(F||(F=ln(n,t[3],{},!0)),F.run(1))}),Qt(()=>{P&&(O||(O=ln(e,Go,{duration:300,easing:Zt},!0)),O.run(1))}),P=!0)},o($){We(T,$),F||(F=ln(n,t[3],{},!1)),F.run(0),O||(O=ln(e,Go,{duration:300,easing:Zt},!1)),O.run(0),P=!1},d($){$&&pe(e),M&&M.d(),T&&T.d($),$&&F&&F.end(),$&&O&&O.end(),S=!1,dt(I)}}}function oa(t){let e,n=t[1].subtitle+"",r;return{c(){e=Y("span"),r=Ve(n),J(e,"class","text-sm text-gray-500")},m(o,i){ge(o,e,i),q(e,r)},p(o,i){i&2&&n!==(n=o[1].subtitle+"")&&Ye(r,n)},d(o){o&&pe(e)}}}function Rd(t){let e,n,r,o,i=!t[1].hidden&&ia(t);return{c(){i&&i.c(),e=$n()},m(l,s){i&&i.m(l,s),ge(l,e,s),n=!0,r||(o=Je(window,"keydown",t[5]),r=!0)},p(l,[s]){l[1].hidden?i&&(Xt(),We(i,1,1,()=>{i=null}),en()):i?(i.p(l,s),s&2&&ye(i,1)):(i=ia(l),i.c(),ye(i,1),i.m(e.parentNode,e))},i(l){n||(ye(i),n=!0)},o(l){We(i),n=!1},d(l){i&&i.d(l),l&&pe(e),r=!1,o()}}}function Bd(t,e,n){let{$$slots:r={},$$scope:o}=e,i={hidden:!0,asPanel:!1,title:"",subtitle:""};const l=sr();function s(){return!i.hidden}function d(P,S,I){n(1,i={title:P,subtitle:S,asPanel:I,hidden:!1})}function y(){n(1,i={...i,hidden:!0})}function v(P,S){return S={x:i.asPanel?100:0,y:i.asPanel?0:100,duration:400,easing:Zt},ud(P,S)}function B(P){return P=="wrapper"?i.asPanel?"items-end":"items-center justify-center":i.asPanel?"h-full w-3/4 md:w-1/2":"min-h-fit max-h-screen w-full sm:w-3/4 sm:rounded-md lg:w-1/2"}function R(P){!i.hidden&&P.key=="Escape"&&y()}const F=()=>{l("open")},O=()=>{l("close")};return t.$$set=P=>{"$$scope"in P&&n(8,o=P.$$scope)},[y,i,l,v,B,R,s,d,o,r,F,O]}class Fd extends st{constructor(e){super(),at(this,e,Bd,Rd,nt,{isVisible:6,show:7,close:0})}get isVisible(){return this.$$.ctx[6]}get show(){return this.$$.ctx[7]}get close(){return this.$$.ctx[0]}}function Od(t){let e,n,r;const o=[t[3]];var i=t[2];function l(s){let d={};for(let y=0;y{it(v,1)}),en()}i?(e=Yi(i,l()),ht(e.$$.fragment),ye(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}else i&&e.$set(y)},i(s){r||(e&&ye(e.$$.fragment,s),r=!0)},o(s){e&&We(e.$$.fragment,s),r=!1},d(s){s&&pe(n),e&&it(e,s)}}}function Nd(t){let e,n,r,o,i,l,s,d,y,v,B,R,F,O,P,S,I,M,x,T,$,U,j,W={$$slots:{default:[Od]},$$scope:{ctx:t}};e=new Fd({props:W}),t[5](e),O=new W0({props:{mainnet:!0}});let Z={};return M=new vl({props:Z}),t[6](M),T=new Td({props:{identifiers:t[4].identifiers}}),{c(){ht(e.$$.fragment),n=he(),r=Y("div"),o=Y("img"),l=he(),s=Y("div"),d=he(),y=Y("div"),v=Y("div"),B=Y("div"),R=Y("h1"),R.textContent="AlgoID Connect",F=he(),ht(O.$$.fragment),P=he(),S=Y("p"),S.innerHTML=`Use this graphical interface to manage your did:algo - Decentralized Identifiers. Connect your wallet and link your - ALGO addresses to a DID to enable account discovery - and facilitate payments and other interactions.`,I=he(),ht(M.$$.fragment),x=he(),ht(T.$$.fragment),$=he(),U=Y("div"),U.innerHTML='

For more information, or to get the source code for this application, checkout the official repository.

',Kr(o.src,i="/img/beams.jpg")||J(o,"src",i),J(o,"alt",""),J(o,"class","absolute left-1/2 top-1/2 max-w-none -translate-x-1/2 -translate-y-1/2"),J(o,"width","1308"),J(s,"class","absolute inset-0 bg-[url(/img/grid.svg)] bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"),J(R,"class","inline-block text-2xl text-gray-800"),J(B,"class","relative w-full"),J(v,"class","space-y-6 py-6 text-base leading-7 text-gray-600"),J(y,"class","relative bg-white px-6 pb-8 pt-10 shadow-xl ring-1 ring-gray-900/5 sm:mx-auto sm:px-10 md:w-3/4 md:rounded-md"),J(U,"class","relative mx-auto mt-6 w-1/2 text-center"),J(r,"class","relative flex flex-col justify-center bg-gray-50 py-6 sm:py-12")},m(m,a){rt(e,m,a),ge(m,n,a),ge(m,r,a),q(r,o),q(r,l),q(r,s),q(r,d),q(r,y),q(y,v),q(v,B),q(B,R),q(B,F),rt(O,B,null),q(v,P),q(v,S),q(v,I),rt(M,v,null),q(v,x),rt(T,v,null),q(r,$),q(r,U),j=!0},p(m,[a]){const c={};a&140&&(c.$$scope={dirty:a,ctx:m}),e.$set(c);const p={};M.$set(p);const _={};a&16&&(_.identifiers=m[4].identifiers),T.$set(_)},i(m){j||(ye(e.$$.fragment,m),ye(O.$$.fragment,m),ye(M.$$.fragment,m),ye(T.$$.fragment,m),j=!0)},o(m){We(e.$$.fragment,m),We(O.$$.fragment,m),We(M.$$.fragment,m),We(T.$$.fragment,m),j=!1},d(m){t[5](null),it(e,m),m&&pe(n),m&&pe(r),it(O),t[6](null),it(M),it(T)}}}function Ld(t,e,n){let r;_i(t,ft,v=>n(4,r=v));let o,i,l,s;ft.reload(),P0({showAlert(v,B){o.show(v,B)},showModal(v){n(2,l=v.content),n(3,s=v.props),i.show(v.title,v.subtitle,v.asPanel)},closeModal(){i.close()}});function d(v){Ft[v?"unshift":"push"](()=>{i=v,n(1,i)})}function y(v){Ft[v?"unshift":"push"](()=>{o=v,n(0,o)})}return[o,i,l,s,r,d,y]}class $d extends st{constructor(e){super(),at(this,e,Ld,Nd,nt,{})}}new $d({target:document.getElementById("app")}); diff --git a/client/ui/local-app/dist/assets/index-99bc98b1.css b/client/ui/local-app/dist/assets/index-99bc98b1.css new file mode 100644 index 0000000..0196e3f --- /dev/null +++ b/client/ui/local-app/dist/assets/index-99bc98b1.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0px}.bottom-0{bottom:0px}.left-0{left:0px}.left-1\/2{left:50%}.right-0{right:0px}.top-0{top:0px}.top-1\/2{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.col-span-3{grid-column:span 3 / span 3}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.contents{display:contents}.\!hidden{display:none!important}.hidden{display:none}.h-12{height:3rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-screen{max-height:100vh}.min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.w-1\/2{width:50%}.w-11{width:2.75rem}.w-12{width:3rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-none{max-width:none}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(209 213 219 / var(--tw-divide-opacity))}.overflow-y-scroll{overflow-y:scroll}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.bg-\[url\(\/img\/grid\.svg\)\]{background-image:url(/img/grid.svg)}.bg-center{background-position:center}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-3{padding-right:.75rem}.pt-10{padding-top:2.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-900\/5{--tw-ring-color: rgb(17 24 39 / .05)}.ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[mask-image\:linear-gradient\(180deg\,white\,rgba\(255\,255\,255\,0\)\)\]{-webkit-mask-image:linear-gradient(180deg,white,rgba(255,255,255,0));mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))}div#walletconnect-qrcode-modal{background-color:rgb(55 65 81 / var(--tw-bg-opacity));--tw-bg-opacity: .75;--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}p#walletconnect-qrcode-text{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}div.walletconnect-modal__base{max-width:28rem;border-radius:.375rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}div.walletconnect-modal__header>img{display:none}div.walletconnect-modal__header>p{display:none}div.walletconnect-modal__footer a{display:inline-flex;align-items:center;-moz-column-gap:.5rem;column-gap:.5rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity));padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}div.walletconnect-modal__footer a:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.placeholder\:text-gray-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.placeholder\:text-gray-400::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.odd\:bg-white:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.even\:bg-slate-50:nth-child(even){--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.hover\:bg-yellow-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-green-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(22 163 74 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity))}.focus\:ring-yellow-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 138 4 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-green-50:focus{--tw-ring-offset-color: #f0fdf4}.focus\:ring-offset-red-50:focus{--tw-ring-offset-color: #fef2f2}.focus\:ring-offset-yellow-50:focus{--tw-ring-offset-color: #fefce8}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}@media (min-width: 640px){.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:grid{display:grid}.sm\:w-3\/4{width:75%}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:gap-4{gap:1rem}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.sm\:divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.sm\:rounded-md{border-radius:.375rem}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-0{padding-top:0;padding-bottom:0}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:pl-3{padding-left:.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}.first\:sm\:pt-0:first-child{padding-top:0}}@media (min-width: 768px){.md\:w-1\/2{width:50%}.md\:w-3\/4{width:75%}.md\:rounded-md{border-radius:.375rem}}@media (min-width: 1024px){.lg\:table-cell{display:table-cell}.lg\:w-1\/2{width:50%}.lg\:px-8{padding-left:2rem;padding-right:2rem}}code[class*=language-],pre[class*=language-]{color:#c5c8c6;text-shadow:0 1px rgba(0,0,0,.3);font-family:Inconsolata,Monaco,Consolas,Courier New,Courier,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#1d1f21}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#7c7c7c}.token.punctuation{color:#c5c8c6}.namespace{opacity:.7}.token.property,.token.keyword,.token.tag{color:#96cbfe}.token.class-name{color:#ffffb6;text-decoration:underline}.token.boolean,.token.constant{color:#9c9}.token.symbol,.token.deleted{color:#f92672}.token.number{color:#ff73fd}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#a8ff60}.token.variable{color:#c6c5fe}.token.operator{color:#ededed}.token.entity{color:#ffffb6;cursor:help}.token.url{color:#96cbfe}.language-css .token.string,.style .token.string{color:#87c38a}.token.atrule,.token.attr-value{color:#f9ee98}.token.function{color:#dad085}.token.regex{color:#e9c062}.token.important{color:#fd971f}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic} diff --git a/client/ui/local-app/dist/index.html b/client/ui/local-app/dist/index.html index f570668..71e8ec1 100644 --- a/client/ui/local-app/dist/index.html +++ b/client/ui/local-app/dist/index.html @@ -7,8 +7,8 @@ AlgoID Connect (beta) - - + +
diff --git a/client/ui/local-app/src/lib/IdentifierListEntry.svelte b/client/ui/local-app/src/lib/IdentifierListEntry.svelte index 0cc1781..a71992a 100644 --- a/client/ui/local-app/src/lib/IdentifierListEntry.svelte +++ b/client/ui/local-app/src/lib/IdentifierListEntry.svelte @@ -10,6 +10,11 @@ // - link_wallet: link a wallet to a selected identifier const dispatch = createEventDispatcher(); + // format a DID value to a shorter textual representation + function formatDID(did: string): string { + return did.slice(0, 18) + '...' + did.slice(-18); + } + // format a date value to a common textual representation // using the user's locale. function formatDate(val: string): string { @@ -34,8 +39,8 @@ {identifier.name} - - {identifier.did} + + {formatDID(identifier.did)} {identifier.addresses.length} diff --git a/client/ui/local-app/src/lib/ManageAddresses.svelte b/client/ui/local-app/src/lib/ManageAddresses.svelte index a70d5ee..4c9ddaa 100644 --- a/client/ui/local-app/src/lib/ManageAddresses.svelte +++ b/client/ui/local-app/src/lib/ManageAddresses.svelte @@ -7,6 +7,9 @@ // component properties export let identifier: IdentifierEntry; + // recovery key + let passphrase: string; + // main application context const appCtx = GetContext(); @@ -47,7 +50,12 @@ // process data submission async function submit() { - let result = await appState.updateDID(identifier.name, identifier.did, addresses); + let result = await appState.updateDID( + identifier.name, + identifier.did, + addresses, + passphrase + ); appCtx.closeModal(); if (result) { appCtx.showAlert('success', 'Identifier updated successfully.'); @@ -101,6 +109,22 @@ {/if} + +
+

Enter the recovery key used to create this identifier.

+
+

Recovery key

+
+
+ +
+
diff --git a/client/ui/local-app/src/lib/Modal.svelte b/client/ui/local-app/src/lib/Modal.svelte index 6a3e2f2..c84aba3 100644 --- a/client/ui/local-app/src/lib/Modal.svelte +++ b/client/ui/local-app/src/lib/Modal.svelte @@ -22,6 +22,14 @@ return !state.hidden; } + // format a DID value to a shorter textual representation + function formatTitle(title: string): string { + if (title.length <= 24) { + return title; + } + return title.slice(0, 18) + '...' + title.slice(-18); + } + // show the modal window. // this function can be called by the component's parents. export function show(title: string, subtitle: string, asPanel: boolean): void { @@ -95,7 +103,9 @@
-

{state.title}

+

+ {formatTitle(state.title)} +

{#if state.subtitle} {state.subtitle} {/if} diff --git a/client/ui/local-app/src/store.ts b/client/ui/local-app/src/store.ts index 5dbbe46..ef9c499 100644 --- a/client/ui/local-app/src/store.ts +++ b/client/ui/local-app/src/store.ts @@ -41,7 +41,12 @@ const apiClient = { } }, // update DID's addresses - update: async (name: string, did: string, addresses: AddressEntry[]) => { + update: async ( + name: string, + did: string, + addresses: AddressEntry[], + passphrase: string + ) => { try { const response = await fetch('http://localhost:9090/update', { method: 'POST', @@ -51,6 +56,7 @@ const apiClient = { body: JSON.stringify({ name, did, + passphrase, addresses }) }); @@ -113,8 +119,13 @@ export const appState = { } return result; }, - updateDID: async function (name: string, did: string, addresses: AddressEntry[]) { - const result = await apiClient.update(name, did, addresses); + updateDID: async function ( + name: string, + did: string, + addresses: AddressEntry[], + passphrase: string + ) { + const result = await apiClient.update(name, did, addresses, passphrase); if (result) { this.reload(); } diff --git a/client/ui/provider.go b/client/ui/provider.go index 75fca92..f2db5f2 100644 --- a/client/ui/provider.go +++ b/client/ui/provider.go @@ -1,23 +1,18 @@ package ui import ( - "context" "encoding/json" "fmt" "io" "net/http" "strings" - "time" + ac "github.com/algorand/go-algorand-sdk/v2/crypto" + "github.com/algorand/go-algorand-sdk/v2/mnemonic" "github.com/algorandfoundation/did-algo/client/internal" "github.com/algorandfoundation/did-algo/client/store" - "github.com/algorandfoundation/did-algo/info" - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" "go.bryk.io/pkg/did" xlog "go.bryk.io/pkg/log" - "go.bryk.io/pkg/net/rpc" - "google.golang.org/grpc" - "google.golang.org/protobuf/types/known/emptypb" ) // Provider is responsible for handling features required @@ -25,9 +20,7 @@ import ( type Provider struct { st *store.LocalStore log xlog.Logger - conf *internal.ClientSettings - conn *grpc.ClientConn - client protoV1.AgentAPIClient + client *internal.AlgoClient } // LocalEntry represents a DID instance stored in the local @@ -54,11 +47,7 @@ type LocalEntry struct { // Ready returns true if the network is available. func (p *Provider) Ready() bool { - res, err := p.client.Ping(context.Background(), &emptypb.Empty{}) - if err != nil { - return false - } - return res.Ok + return p.client.Ready() } // List all DID instances in the local store. @@ -87,25 +76,30 @@ func (p *Provider) Register(name string, passphrase string) error { return fmt.Errorf("there's already a DID with reference name: %s", name) } - // Generate master key from available secret - masterKey, err := keyFromMaterial([]byte(passphrase)) + // Create wallet + account := ac.GenerateAccount() + seed, err := mnemonic.FromPrivateKey(account.PrivateKey) if err != nil { return err } - defer masterKey.Destroy() - pk := make([]byte, 64) - copy(pk, masterKey.PrivateKey()) + if err := p.st.SaveWallet(name, seed, passphrase); err != nil { + return err + } - p.log.Info("generating new identifier") - id, err := did.NewIdentifierWithMode("algo", "", did.ModeUUID) + // Generate base identifier instance + subject := fmt.Sprintf("%x-%d", account.PublicKey, p.client.StorageAppID()) + method := "algo" + p.log.WithFields(xlog.Fields{ + "subject": subject, + "method": method, + }).Info("generating new identifier") + id, err := did.NewIdentifier(method, subject) if err != nil { return err } - p.log.Debug("adding master key") - if err = id.AddVerificationMethod("master", pk, did.KeyTypeEd); err != nil { + if err = id.AddVerificationMethod("master", account.PrivateKey, did.KeyTypeEd); err != nil { return err } - p.log.Debug("setting master key as authentication mechanism") if err = id.AddVerificationRelationship(id.GetReference("master"), did.AuthenticationVM); err != nil { return err } @@ -116,40 +110,33 @@ func (p *Provider) Register(name string, passphrase string) error { } // Sync a DID instance with the network. -func (p *Provider) Sync(name string) error { +func (p *Provider) Sync(name string, passphrase string) error { id, err := p.st.Get(name) if err != nil { return fmt.Errorf("no available record under the provided reference name: %s", name) } - // Get selected key for the sync operation - key, err := getSyncKey(id) + // Decrypt wallet + seed, err := p.st.OpenWallet(name, passphrase) if err != nil { return err } - p.log.Debugf("key selected for the operation: %s", key.ID) - // Generate request ticket - p.log.Infof("publishing: %s", name) - ticket, err := getRequestTicket(id, key) + // Restore account handler + key, err := mnemonic.ToPrivateKey(seed) + if err != nil { + return err + } + account, err := ac.AccountFromPrivateKey(key) if err != nil { return err } - req := &protoV1.ProcessRequest{Ticket: ticket} // Submit request p.log.Info("submitting request to the network") - res, err := p.client.Process(context.Background(), req) - if err != nil { + if err := p.client.PublishDID(id, &account); err != nil { return fmt.Errorf("network return an error: %w", err) } - p.log.Debugf("request status: %v", res.Ok) - if res.Identifier != "" { - p.log.Info("identifier: ", res.Identifier) - } - if !res.Ok { - return nil - } // Update local record if sync was successful return p.st.Update(name, id) @@ -163,47 +150,49 @@ func (p *Provider) Update(req *updateRequest) error { return fmt.Errorf("no available record under the provided reference name: %s", req.Name) } - // get service entry - svc := id.Service("algo-connect") - if svc == nil { - svc = newServiceEntry() - } + if len(req.Addresses) != 0 { // nolint: nestif + // get service entry + svc := id.Service("algo-connect") + if svc == nil { + svc = newServiceEntry() + } - // replace addresses - var addresses []algoDestination - ext := did.Extension{ - ID: "algo-address", - Version: "0.1.0", - } - for _, entry := range req.Addresses { - if entry.Enabled { - addresses = append(addresses, algoDestination{ - Address: entry.Address, - Network: strings.ToLower(entry.Network), - Asset: "ALGO", - }) + // replace addresses + var addresses []algoDestination + ext := did.Extension{ + ID: "algo-address", + Version: "0.1.0", + } + for _, entry := range req.Addresses { + if entry.Enabled { + addresses = append(addresses, algoDestination{ + Address: entry.Address, + Network: strings.ToLower(entry.Network), + Asset: "ALGO", + }) + } + } + ext.Data = addresses + svc.AddExtension(ext) + + // update service entry + _ = id.RemoveService("algo-connect") + if len(addresses) > 0 { + if err := id.AddService(svc); err != nil { + return err + } + id.RegisterContext("https://did.algorand.foundation/v1") } - } - ext.Data = addresses - svc.AddExtension(ext) - // update service entry - _ = id.RemoveService("algo-connect") - if len(addresses) > 0 { - if err := id.AddService(svc); err != nil { + // update local record + if err = p.st.Update(req.Name, id); err != nil { return err } - id.RegisterContext("https://did-ns.aidtech.network/v1") - } - - // update local record - if err = p.st.Update(req.Name, id); err != nil { - return err } // sync with the network in the background go func() { - _ = p.Sync(req.Name) + _ = p.Sync(req.Name, req.Passphrase) }() return nil } @@ -219,36 +208,8 @@ func (p *Provider) ServerHandler() http.Handler { return router } -// Get client connection. -func (p *Provider) connect() error { - p.log.Infof("establishing connection to network agent: %s", p.conf.Node) - opts := []rpc.ClientOption{ - rpc.WaitForReady(), - rpc.WithUserAgent(fmt.Sprintf("algoid-client/%s", info.CoreVersion)), - rpc.WithTimeout(time.Duration(p.conf.Timeout) * time.Second), - } - if p.conf.Insecure { - p.log.Warning("using an insecure connection") - } else { - opts = append(opts, rpc.WithClientTLS(rpc.ClientTLSConfig{IncludeSystemCAs: true})) - } - if p.conf.Override != "" { - p.log.WithField("override", p.conf.Override).Warning("using server name override") - opts = append(opts, rpc.WithServerNameOverride(p.conf.Override)) - } - conn, err := rpc.NewClientConnection(p.conf.Node, opts...) - if err != nil { - return err - } - p.client = protoV1.NewAgentAPIClient(conn) - return nil -} - // Close client connection and free resources. func (p *Provider) close() error { - if p.conn != nil { - return p.conn.Close() - } return nil } @@ -339,7 +300,8 @@ type addressEntry struct { } type updateRequest struct { - Name string `json:"name"` - DID string `json:"did"` - Addresses []addressEntry `json:"addresses"` + Name string `json:"name"` + DID string `json:"did"` + Passphrase string `json:"passphrase"` + Addresses []addressEntry `json:"addresses"` } diff --git a/client/ui/utils.go b/client/ui/utils.go index ac093b5..aba4108 100644 --- a/client/ui/utils.go +++ b/client/ui/utils.go @@ -1,43 +1,9 @@ package ui import ( - "context" - "crypto/sha256" - "encoding/hex" - "errors" - "fmt" - "io" - - protoV1 "github.com/algorandfoundation/did-algo/proto/did/v1" - "github.com/spf13/viper" "go.bryk.io/pkg/did" - "go.bryk.io/x/crypto/ed25519" - "golang.org/x/crypto/hkdf" - "golang.org/x/crypto/sha3" ) -// Securely expand the provided secret material. -func expand(secret []byte, size int, info []byte) ([]byte, error) { - salt := make([]byte, sha256.Size) - buf := make([]byte, size) - h := hkdf.New(sha3.New256, secret, salt[:], info) - if _, err := io.ReadFull(h, buf); err != nil { - return nil, err - } - return buf, nil -} - -// Restore key pair from the provided material. -func keyFromMaterial(material []byte) (*ed25519.KeyPair, error) { - m, err := expand(material, 32, nil) - if err != nil { - return nil, err - } - seed := [32]byte{} - copy(seed[:], m) - return ed25519.FromSeed(seed[:]) -} - // Return the list of ALGO addresses linked to the provided identifier. func getAlgoAddress(id *did.Identifier) []addressEntry { var result = []addressEntry{} @@ -63,52 +29,6 @@ func getAlgoAddress(id *did.Identifier) []addressEntry { return result } -// Get the key used for the sync operation. -func getSyncKey(id *did.Identifier) (*did.VerificationKey, error) { - // Get selected key for the sync operation - key := id.VerificationMethod("master") - if key == nil { - return nil, errors.New("invalid key selected") - } - - // Verify the key is enabled for authentication - isAuth := false - for _, k := range id.GetVerificationRelationship(did.AuthenticationVM) { - if k == key.ID { - isAuth = true - break - } - } - if !isAuth { - return nil, errors.New("the key selected is not enabled for authentication purposes") - } - return key, nil -} - -// Generate a new sync request. -func getRequestTicket(id *did.Identifier, key *did.VerificationKey) (*protoV1.Ticket, error) { - diff := uint(viper.GetInt("client.pow")) - - // Create new ticket - ticket, err := protoV1.NewTicket(id, key.ID) - if err != nil { - return nil, err - } - - // Solve PoW challenge and sign ticket - challenge := ticket.Solve(context.Background(), diff) - ch, _ := hex.DecodeString(challenge) - if ticket.Signature, err = key.Sign(ch); err != nil { - return nil, fmt.Errorf("failed to generate request ticket: %w", err) - } - - // Verify on client's side - if err = ticket.Verify(diff); err != nil { - return nil, fmt.Errorf("failed to verify ticket: %w", err) - } - return ticket, nil -} - // Return an empty service entry for `algo-connect`. func newServiceEntry() *did.ServiceEndpoint { return &did.ServiceEndpoint{ diff --git a/go.mod b/go.mod index 20d4f33..9de6d70 100644 --- a/go.mod +++ b/go.mod @@ -4,108 +4,72 @@ go 1.18 require ( github.com/algorand/go-algorand-sdk v1.24.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 - github.com/ipfs/go-ipfs-api v0.5.0 + github.com/algorand/go-algorand-sdk/v2 v2.4.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/kennygrant/sanitize v1.2.4 github.com/pkg/errors v0.9.1 - github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.16.0 - go.bryk.io/pkg v0.0.0-20230924180543-e117d4b37929 - go.bryk.io/x v0.0.0-20230926191807-ed75aaebda7d - go.mongodb.org/mongo-driver v1.12.1 - golang.org/x/crypto v0.13.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d - google.golang.org/grpc v1.58.2 - google.golang.org/protobuf v1.31.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.2 + go.bryk.io/pkg v0.0.0-20240216184430-db271b89fadd + golang.org/x/crypto v0.20.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/grpc v1.61.0 + google.golang.org/protobuf v1.32.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( github.com/algorand/avm-abi v0.1.1 // indirect - github.com/algorand/go-codec/codec v1.1.8 // indirect - github.com/awnumar/memcall v0.1.2 // indirect - github.com/awnumar/memguard v0.22.3 // indirect - github.com/benbjohnson/clock v1.3.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect + github.com/algorand/go-codec/codec v1.1.10 // indirect + github.com/awnumar/memcall v0.2.0 // indirect + github.com/awnumar/memguard v0.22.4 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/briandowns/spinner v1.23.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect + github.com/charmbracelet/lipgloss v0.9.1 // indirect + github.com/charmbracelet/log v0.3.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect github.com/google/go-querystring v1.0.0 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/handlers v1.5.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ipfs/go-cid v0.4.1 // indirect - github.com/ipfs/go-ipfs-files v0.0.9 // indirect - github.com/klauspost/compress v1.16.4 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/libp2p/go-flow-metrics v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.27.8 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/minio/sha256-simd v1.0.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect github.com/mr-tron/base58 v1.2.0 // indirect - github.com/multiformats/go-base32 v0.1.0 // indirect - github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.9.0 // indirect - github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.8.1 // indirect - github.com/multiformats/go-multihash v0.2.1 // indirect - github.com/multiformats/go-multistream v0.4.1 // indirect - github.com/multiformats/go-varint v0.0.7 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/muesli/reflow v0.3.0 // indirect + github.com/muesli/termenv v0.15.2 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/piprate/json-gold v0.5.0 // indirect - github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/rs/zerolog v1.30.0 // indirect + github.com/pquerna/cachecontrol v0.1.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/soheilhy/cmux v0.1.5 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - github.com/whyrusleeping/tar-utils v0.0.0-20201201191210-20a61371de5b // indirect - github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.1.2 // indirect - github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect - go.bryk.io/miracl v0.6.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect - go.opentelemetry.io/otel v1.18.0 // indirect - go.opentelemetry.io/otel/metric v1.18.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + go.bryk.io/miracl v0.6.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/blake3 v1.1.7 // indirect ) diff --git a/go.sum b/go.sum index d7dbb46..8f90a99 100644 --- a/go.sum +++ b/go.sum @@ -1,759 +1,199 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/algorand/avm-abi v0.1.1 h1:dbyQKzXiyaEbzpmqXFB30yAhyqseBsyqXTyZbNbkh2Y= github.com/algorand/avm-abi v0.1.1/go.mod h1:+CgwM46dithy850bpTeHh9MC99zpn2Snirb3QTl2O/g= github.com/algorand/go-algorand-sdk v1.24.0 h1:mi8vqjXMC5nU87snq4vxHi+NgPR0thtZHRLA16FKZMM= github.com/algorand/go-algorand-sdk v1.24.0/go.mod h1:WEeJcctOHMzDFTgVJ6GT8BLUo9DbFTT47S+Kzx7ffXQ= -github.com/algorand/go-codec v1.1.8/go.mod h1:XhzVs6VVyWMLu6cApb9/192gBjGRVGm5cX5j203Heg4= -github.com/algorand/go-codec/codec v1.1.8 h1:lsFuhcOH2LiEhpBH3BVUUkdevVmwCRyvb7FCAAPeY6U= -github.com/algorand/go-codec/codec v1.1.8/go.mod h1:tQ3zAJ6ijTps6V+wp8KsGDnPC2uhHVC7ANyrtkIY0bA= -github.com/awnumar/memcall v0.1.2 h1:7gOfDTL+BJ6nnbtAp9+HQzUFjtP1hEseRQq8eP055QY= -github.com/awnumar/memcall v0.1.2/go.mod h1:S911igBPR9CThzd/hYQQmTc9SWNu3ZHIlCGaWsWsoJo= -github.com/awnumar/memguard v0.22.3 h1:b4sgUXtbUjhrGELPbuC62wU+BsPQy+8lkWed9Z+pj0Y= -github.com/awnumar/memguard v0.22.3/go.mod h1:mmGunnffnLHlxE5rRgQc3j+uwPZ27eYb61ccr8Clz2Y= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/algorand/go-algorand-sdk/v2 v2.4.0 h1:R9ykarfk0ojAZlXlrysViDwWjHrvUMA0HmFHg9PmECw= +github.com/algorand/go-algorand-sdk/v2 v2.4.0/go.mod h1:Xk569fTpBTV0QtE74+79NTl6Rz3OC1K3iods4uG0ffU= +github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbnDfiVa+5QA= +github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k= +github.com/awnumar/memcall v0.2.0 h1:sRaogqExTOOkkNwO9pzJsL8jrOV29UuUW7teRMfbqtI= +github.com/awnumar/memcall v0.2.0/go.mod h1:S911igBPR9CThzd/hYQQmTc9SWNu3ZHIlCGaWsWsoJo= +github.com/awnumar/memguard v0.22.4 h1:1PLgKcgGPeExPHL8dCOWGVjIbQUBgJv9OL0F/yE1PqQ= +github.com/awnumar/memguard v0.22.4/go.mod h1:+APmZGThMBWjnMlKiSM1X7MVpbIVewen2MTkqWkA/zE= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A= github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= +github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1p/u1KWg= +github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= +github.com/charmbracelet/log v0.3.1 h1:TjuY4OBNbxmHWSwO3tosgqs5I3biyY8sQPny/eCMTYw= +github.com/charmbracelet/log v0.3.1/go.mod h1:OR4E1hutLsax3ZKpXbgUqPtTjQfrh1pG3zwHGWuuq8g= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e h1:CHPYEbz71w8DqJ7DRIq+MXyCQsdibK08vdcQTY4ufas= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= -github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getsentry/sentry-go v0.24.1 h1:W6/0GyTy8J6ge6lVCc94WB6Gx2ZuLrgopnn9w8Hiwuk= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= -github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= -github.com/ipfs/go-ipfs-api v0.5.0 h1:4Hvk+WucCOkelir+RFPLUeOYqV/BzCDyZqAYaTl702k= -github.com/ipfs/go-ipfs-api v0.5.0/go.mod h1:grCXW4WFlK7hL2g59ZGdCH4JcceHeFWSBJo1ptI9dt0= -github.com/ipfs/go-ipfs-files v0.0.9 h1:OFyOfmuVDu9c5YtjSDORmwXzE6fmZikzZpzsnNkgFEg= -github.com/ipfs/go-ipfs-files v0.0.9/go.mod h1:aFv2uQ/qxWpL/6lidWvnSQmaVqCrf0TBGoUr+C1Fo84= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kennygrant/sanitize v1.2.4 h1:gN25/otpP5vAsO2djbMhF/LQX6R7+O1TB4yv8NzpJ3o= github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.4 h1:91KN02FnsOYhuunwU4ssRe8lc2JosWmizWa91B5v1PU= -github.com/klauspost/compress v1.16.4/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= -github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.8 h1:IX5x/4yKwyPQeVS2AXHZ3J4YATM9oHBGH1gBc23jBAI= -github.com/libp2p/go-libp2p v0.27.8/go.mod h1:eCFFtd0s5i/EVKR7+5Ki8bM7qwkNW3TPTTSSW9sz8NE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= -github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= -github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= -github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= -github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= -github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= -github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= -github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= -github.com/multiformats/go-multicodec v0.8.1 h1:ycepHwavHafh3grIbR1jIXnKCsFm0fqsfEOsJ8NtKE8= -github.com/multiformats/go-multicodec v0.8.1/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= -github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= -github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= -github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo= -github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q= -github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= -github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/piprate/json-gold v0.5.0 h1:RmGh1PYboCFcchVFuh2pbSWAZy4XJaqTMU4KQYsApbM= github.com/piprate/json-gold v0.5.0/go.mod h1:WZ501QQMbZZ+3pXFPhQKzNwS1+jls0oqov3uQ2WasLs= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= +github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.23.8 h1:xnATPiybo6GgdRoC4YoGnxXZFRc3dqQTGi73oLvvBrE= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/whyrusleeping/tar-utils v0.0.0-20201201191210-20a61371de5b h1:wA3QeTsaAXybLL2kb2cKhCAQTHgYTMwuI8lBlJSv5V8= -github.com/whyrusleeping/tar-utils v0.0.0-20201201191210-20a61371de5b/go.mod h1:xT1Y5p2JR2PfSZihE0s4mjdJaRGp1waCTf5JzhQLBck= -github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= -github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/zeebo/errs v1.2.2 h1:5NFypMTuSdoySVTqlNs1dEoU21QVamMQJxW/Fii5O7g= -go.bryk.io/miracl v0.6.0 h1:Yob07PKHE9YdwANWYh7Imd4VLq4T5lgCGcnRFPPndBg= -go.bryk.io/miracl v0.6.0/go.mod h1:AdsKWBu3X75H4KRElYk5QNoZ8WX+IsylqsUq3tS7kKM= -go.bryk.io/pkg v0.0.0-20230924180543-e117d4b37929 h1:8dhp2aWU6V6/6pka44pcrD+PcrrEObGTq0wAVdHPS1g= -go.bryk.io/pkg v0.0.0-20230924180543-e117d4b37929/go.mod h1:WuConn1qLtZM6yWh/y5+ucI24D+eEV/qTs4ABN0Odqs= -go.bryk.io/x v0.0.0-20230926191807-ed75aaebda7d h1:AukDSD3iAYux/YrrARV0uD5auwzS/H/0Y4TXMp65CeY= -go.bryk.io/x v0.0.0-20230926191807-ed75aaebda7d/go.mod h1:sbMoscYnSmaIQomFINtWGky4YLTG337C7yqPwSRQpaI= -go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= -go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/contrib/instrumentation/host v0.44.0 h1:SNqDjPpQmwFYvDipyJJxDbU5zKNWiYSMii864ubzIuQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= -go.opentelemetry.io/contrib/instrumentation/runtime v0.44.0 h1:TXu20nL4yYfJlQeqG/D3Ia6b0p2HZmLfJto9hqJTQ/c= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.41.0 h1:HgbDTD8pioFdY3NRc/YCvsWjqQPtweGyXxa32LgnTOw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.18.0 h1:IAtl+7gua134xcV3NieDhJHjjOVeJhXAnYf/0hswjUY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.18.0 h1:yE32ay7mJG2leczfREEhoW3VfSZIvHaB+gvVo1o8DQ8= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.41.0 h1:XzjGkawtAXs20Y+s6k1GNDMBsMDOV28TOT8cxmE42qM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.18.0 h1:hSWWvDjXHVLq9DkmB+77fl8v7+t+yYiS+eNkiplDK54= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.bryk.io/miracl v0.6.1 h1:oGVOeWtCr9XAORmiN94vDilyCVb3zJRFJ9q59sAdfNg= +go.bryk.io/miracl v0.6.1/go.mod h1:RFgrIPYeD92g73lcsR6vZpVEyRVh2HrxF6Dxy3ZKugg= +go.bryk.io/pkg v0.0.0-20240216184430-db271b89fadd h1:ZtgfpGy4lMutSs460EL3N4bWbyRn381/RRhkBWF8w24= +go.bryk.io/pkg v0.0.0-20240216184430-db271b89fadd/go.mod h1:yR11GyjegiOr2eUtU1I//XefY532sW1INAcX19k23Z0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= +google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= -lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -storj.io/drpc v0.0.33 h1:yCGZ26r66ZdMP0IcTYsj7WDAUIIjzXk6DJhbhvt9FHI= diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 0000000..b2fc4d4 --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,18 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: bufbuild + repository: protovalidate + commit: f05a6f4403ce4327bae4f50f281c3ed0 + digest: shake256:668a0661b8df44d41839194896329330965fc215f3d2f88057fd60eeb759c2daf6cc6edfdd13b2a653d49fe2896ebedcb1a33c4c5b2dd10919f03ffb7fc52ae6 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 7e6f6e774e29406da95bd61cdcdbc8bc + digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 + - remote: buf.build + owner: grpc-ecosystem + repository: grpc-gateway + commit: 3f42134f4c564983838425bc43c7a65f + digest: shake256:3d11d4c0fe5e05fda0131afefbce233940e27f0c31c5d4e385686aea58ccd30f72053f61af432fa83f1fc11cda57f5f18ca3da26a29064f73c5a0d076bba8d92 diff --git a/proto/buf.yaml b/proto/buf.yaml index 63ab54b..f450606 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,12 +1,16 @@ version: v1 +deps: + - buf.build/googleapis/googleapis + - buf.build/bufbuild/protovalidate + - buf.build/grpc-ecosystem/grpc-gateway breaking: use: - FILE lint: service_suffix: API - enum_zero_value_suffix: _INVALID rpc_allow_google_protobuf_empty_requests: true - ignore: - - third_party use: - DEFAULT + except: + - RPC_REQUEST_RESPONSE_UNIQUE + - RPC_RESPONSE_STANDARD_NAME diff --git a/proto/did/v1/agent_api.pb.go b/proto/did/v1/agent_api.pb.go index 052336a..1f43724 100644 --- a/proto/did/v1/agent_api.pb.go +++ b/proto/did/v1/agent_api.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc buf-v1.17.0 +// protoc-gen-go v1.32.0 +// protoc buf-v1.29.0 // source: did/v1/agent_api.proto -package protov1 +package didv1 import ( reflect "reflect" @@ -28,7 +28,7 @@ type ProcessRequest_Task int32 const ( // Invalid task selected. - ProcessRequest_TASK_INVALID ProcessRequest_Task = 0 + ProcessRequest_TASK_UNSPECIFIED ProcessRequest_Task = 0 // Publish a DID document. This same operation covers publishing // a completely new identifier or updating an existing one. ProcessRequest_TASK_PUBLISH ProcessRequest_Task = 1 @@ -37,12 +37,12 @@ const ( // Enum value maps for ProcessRequest_Task. var ( ProcessRequest_Task_name = map[int32]string{ - 0: "TASK_INVALID", + 0: "TASK_UNSPECIFIED", 1: "TASK_PUBLISH", } ProcessRequest_Task_value = map[string]int32{ - "TASK_INVALID": 0, - "TASK_PUBLISH": 1, + "TASK_UNSPECIFIED": 0, + "TASK_PUBLISH": 1, } ) @@ -373,7 +373,7 @@ func (x *ProcessRequest) GetTask() ProcessRequest_Task { if x != nil { return x.Task } - return ProcessRequest_TASK_INVALID + return ProcessRequest_TASK_UNSPECIFIED } func (x *ProcessRequest) GetTicket() *Ticket { @@ -1010,156 +1010,158 @@ var file_did_v1_agent_api_proto_rawDesc = []byte{ 0x0a, 0x16, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x74, - 0x68, 0x69, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x06, 0x54, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xac, 0x01, 0x0a, 0x0f, 0x41, 0x6c, 0x67, 0x6f, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x52, - 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x1e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x95, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x22, 0x2a, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x53, 0x4b, - 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, - 0x53, 0x4b, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x01, 0x22, 0x41, 0x0a, 0x0f, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, - 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, - 0x40, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x22, 0x6e, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x6b, 0x0a, 0x19, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xe8, - 0x01, 0x0a, 0x1a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, - 0x27, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x4a, 0x0a, - 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x67, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 0x0a, 0x14, 0x54, 0x78, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x23, 0x0a, 0x0f, 0x54, 0x78, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x73, 0x74, 0x78, 0x22, 0x22, - 0x0a, 0x10, 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x68, 0x0a, 0x16, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x9a, 0x01, 0x0a, - 0x17, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3b, 0x0a, 0x0c, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x67, 0x6f, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xa1, 0x05, 0x0a, 0x08, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x12, 0x46, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x52, - 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x06, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xac, 0x01, 0x0a, 0x0f, 0x41, 0x6c, + 0x67, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, + 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x1e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x99, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, + 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, - 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x2f, 0x7b, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x7d, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, - 0x61, 0x6c, 0x67, 0x6f, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0c, 0x54, 0x78, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x67, 0x6f, 0x2f, - 0x74, 0x78, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x54, 0x78, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x67, 0x6f, 0x2f, 0x74, 0x78, - 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x54, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x67, 0x0a, - 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0e, 0x64, 0x69, - 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x76, 0x31, 0xf8, 0x01, 0x00, 0xa2, - 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, - 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x0a, 0x06, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x22, 0x2e, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x10, + 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, + 0x53, 0x48, 0x10, 0x01, 0x22, 0x41, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x6e, 0x0a, 0x0d, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x2b, 0x0a, 0x11, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6b, 0x0a, 0x19, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x1a, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x67, + 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x2e, 0x0a, 0x14, 0x54, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x23, 0x0a, 0x0f, 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x73, 0x74, 0x78, 0x22, 0x22, 0x0a, 0x10, 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x68, 0x0a, 0x16, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3b, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x67, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x32, 0xa1, 0x05, 0x0a, 0x08, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x12, 0x46, + 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x52, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x16, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x05, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x7d, 0x2f, + 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x12, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, + 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x67, 0x6f, 0x2f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x60, 0x0a, 0x0c, 0x54, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x67, 0x6f, 0x2f, 0x74, 0x78, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x17, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x78, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x6c, 0x67, 0x6f, 0x2f, 0x74, 0x78, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, + 0x54, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x70, 0x69, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x61, 0x6e, 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x69, 0x64, 0x2d, 0x61, 0x6c, 0x67, 0x6f, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xf8, 0x01, 0x00, 0xa2, 0x02, 0x03, + 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, + 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/did/v1/agent_api.pb.gw.go b/proto/did/v1/agent_api.pb.gw.go index f9d7b8d..f77158c 100644 --- a/proto/did/v1/agent_api.pb.gw.go +++ b/proto/did/v1/agent_api.pb.gw.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. // source: did/v1/agent_api.proto -package protov1 +package didv1 import ( "context" @@ -49,11 +49,7 @@ func request_AgentAPI_Process_0(ctx context.Context, marshaler runtime.Marshaler var protoReq ProcessRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -66,11 +62,7 @@ func local_request_AgentAPI_Process_0(ctx context.Context, marshaler runtime.Mar var protoReq ProcessRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -155,11 +147,7 @@ func request_AgentAPI_AccountInformation_0(ctx context.Context, marshaler runtim var protoReq AccountInformationRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -172,11 +160,7 @@ func local_request_AgentAPI_AccountInformation_0(ctx context.Context, marshaler var protoReq AccountInformationRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -207,11 +191,7 @@ func request_AgentAPI_TxSubmit_0(ctx context.Context, marshaler runtime.Marshale var protoReq TxSubmitRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -224,11 +204,7 @@ func local_request_AgentAPI_TxSubmit_0(ctx context.Context, marshaler runtime.Ma var protoReq TxSubmitRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } diff --git a/proto/did/v1/agent_api.proto b/proto/did/v1/agent_api.proto index 4991df5..8c45deb 100644 --- a/proto/did/v1/agent_api.proto +++ b/proto/did/v1/agent_api.proto @@ -2,10 +2,10 @@ syntax = "proto3"; package did.v1; -option go_package = "did/v1;protov1"; - import "google/protobuf/empty.proto"; -import "third_party/google/api/annotations.proto"; +import "google/api/annotations.proto"; +// import "buf/validate/validate.proto"; +// import "protoc-gen-openapiv2/options/annotations.proto"; // AgentAPI defines the network protocol as detailed in the DID Method specification. service AgentAPI { @@ -109,7 +109,7 @@ message ProcessRequest { // Available mutations. enum Task { // Invalid task selected. - TASK_INVALID = 0; + TASK_UNSPECIFIED = 0; // Publish a DID document. This same operation covers publishing // a completely new identifier or updating an existing one. diff --git a/proto/did/v1/agent_api.swagger.json b/proto/did/v1/agent_api.swagger.json index a516dc4..1e20153 100644 --- a/proto/did/v1/agent_api.swagger.json +++ b/proto/did/v1/agent_api.swagger.json @@ -208,11 +208,11 @@ "ProcessRequestTask": { "type": "string", "enum": [ - "TASK_INVALID", + "TASK_UNSPECIFIED", "TASK_PUBLISH" ], - "default": "TASK_INVALID", - "description": "Available mutations.\n\n - TASK_INVALID: Invalid task selected.\n - TASK_PUBLISH: Publish a DID document. This same operation covers publishing\na completely new identifier or updating an existing one." + "default": "TASK_UNSPECIFIED", + "description": "Available mutations.\n\n - TASK_UNSPECIFIED: Invalid task selected.\n - TASK_PUBLISH: Publish a DID document. This same operation covers publishing\na completely new identifier or updating an existing one." }, "protobufAny": { "type": "object", diff --git a/proto/did/v1/agent_api_grpc.pb.go b/proto/did/v1/agent_api_grpc.pb.go index afa86c1..978799d 100644 --- a/proto/did/v1/agent_api_grpc.pb.go +++ b/proto/did/v1/agent_api_grpc.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc buf-v1.17.0 +// - protoc buf-v1.29.0 // source: did/v1/agent_api.proto -package protov1 +package didv1 import ( context "context" diff --git a/proto/did/v1/doc.go b/proto/did/v1/doc.go index 4b62b6d..0da979d 100644 --- a/proto/did/v1/doc.go +++ b/proto/did/v1/doc.go @@ -1,4 +1,4 @@ /* -Package protov1 provides the version 1.0 of the protocol buffers definitions for the project. +Package didv1 provides the version 1.0 of the protocol buffers definitions for the project. */ -package protov1 +package didv1 diff --git a/proto/did/v1/image.bin b/proto/did/v1/image.bin index 789b8c9..a316df0 100644 Binary files a/proto/did/v1/image.bin and b/proto/did/v1/image.bin differ diff --git a/proto/did/v1/ticket.go b/proto/did/v1/ticket.go index 3760387..316c397 100644 --- a/proto/did/v1/ticket.go +++ b/proto/did/v1/ticket.go @@ -1,4 +1,4 @@ -package protov1 +package didv1 import ( "bytes" diff --git a/proto/third_party/google/LICENSE.txt b/proto/third_party/google/LICENSE.txt deleted file mode 100644 index 261eeb9..0000000 --- a/proto/third_party/google/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/proto/third_party/google/README.md b/proto/third_party/google/README.md deleted file mode 100644 index 7045be2..0000000 --- a/proto/third_party/google/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Google APIs - -- Project: Google APIs -- URL: https://github.com/google/googleapis -- Revision: 3544ab16c3342d790b00764251e348705991ea4b -- License: Apache License 2.0 - - -## Imported Files - -- google/api/annotations.proto -- google/api/http.proto -- google/api/httpbody.proto - - -## Generated Files - -They are generated from the .proto files by protoc-gen-go. -- google/api/annotations.pb.go -- google/api/http.pb.go diff --git a/proto/third_party/google/api/annotations.proto b/proto/third_party/google/api/annotations.proto deleted file mode 100644 index 624fc2c..0000000 --- a/proto/third_party/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "third_party/google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/proto/third_party/google/api/http.proto b/proto/third_party/google/api/http.proto deleted file mode 100644 index 2bd3a19..0000000 --- a/proto/third_party/google/api/http.proto +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parmeters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped -// } -// message Message { -// string text = 1; // content of the resource -// } -// -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter -// } -// -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` -// -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` -// -// # Rules for HTTP mapping -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. -// -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. -message HttpRule { - // Selects methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Used for listing and getting information about resources. - string get = 2; - - // Used for updating a resource. - string put = 3; - - // Used for creating a resource. - string post = 4; - - // Used for deleting a resource. - string delete = 5; - - // Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/proto/third_party/google/api/httpbody.proto b/proto/third_party/google/api/httpbody.proto deleted file mode 100644 index 4428515..0000000 --- a/proto/third_party/google/api/httpbody.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; -option java_multiple_files = true; -option java_outer_classname = "HttpBodyProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Message that represents an arbitrary HTTP body. It should only be used for -// payload formats that can't be represented as JSON, such as raw binary or -// an HTML page. -// -// -// This message can be used both in streaming and non-streaming API methods in -// the request as well as the response. -// -// It can be used as a top-level request field, which is convenient if one -// wants to extract parameters from either the URL or HTTP template into the -// request fields and also want access to the raw HTTP body. -// -// Example: -// -// message GetResourceRequest { -// // A unique request id. -// string request_id = 1; -// -// // The raw HTTP body is bound to this field. -// google.api.HttpBody http_body = 2; -// } -// -// service ResourceService { -// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) returns -// (google.protobuf.Empty); -// } -// -// Example with streaming methods: -// -// service CaldavService { -// rpc GetCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// rpc UpdateCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// } -// -// Use of this type only changes how the request and response bodies are -// handled, all other features will continue to work unchanged. -message HttpBody { - // The HTTP Content-Type header value specifying the content type of the body. - string content_type = 1; - - // The HTTP request/response body as raw binary. - bytes data = 2; - - // Application specific response metadata. Must be set in the first response - // for streaming APIs. - repeated google.protobuf.Any extensions = 3; -} \ No newline at end of file diff --git a/proto/third_party/google/rpc/code.proto b/proto/third_party/google/rpc/code.proto deleted file mode 100644 index 8fef411..0000000 --- a/proto/third_party/google/rpc/code.proto +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -option go_package = "google.golang.org/genproto/googleapis/rpc/code;code"; -option java_multiple_files = true; -option java_outer_classname = "CodeProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - - -// The canonical error codes for Google APIs. -// -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -enum Code { - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK = 0; - - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED = 1; - - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2; - - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3; - - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4; - - // Some requested entity (e.g., file or directory) was not found. - // - // Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented whitelist, - // `NOT_FOUND` may be used. If a request is denied for some users within - // a class of users, such as user-based access control, `PERMISSION_DENIED` - // must be used. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND = 5; - - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6; - - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). This error code does not imply the - // request is valid or the requested entity exists or satisfies - // other pre-conditions. - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7; - - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16; - - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8; - - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., when a client-specified test-and-set fails, indicating the - // client should restart a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // - // HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION = 9; - - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED = 10; - - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11; - - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12; - - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL = 13; - - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14; - - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15; -} diff --git a/proto/third_party/google/rpc/error_details.proto b/proto/third_party/google/rpc/error_details.proto deleted file mode 100644 index f24ae00..0000000 --- a/proto/third_party/google/rpc/error_details.proto +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/duration.proto"; - -option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails"; -option java_multiple_files = true; -option java_outer_classname = "ErrorDetailsProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retires have been reached or a maximum retry delay cap has been -// reached. -message RetryInfo { - // Clients should wait at least this long between retrying the same request. - google.protobuf.Duration retry_delay = 1; -} - -// Describes additional debugging info. -message DebugInfo { - // The stack trace entries indicating where the error occurred. - repeated string stack_entries = 1; - - // Additional debugging information provided by the server. - string detail = 2; -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryDetail and Help types for other details about handling a -// quota failure. -message QuotaFailure { - // A message type used to describe a single quota violation. For example, a - // daily quota or a custom quota that was exceeded. - message Violation { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - string subject = 1; - - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - string description = 2; - } - - // Describes all quota violations. - repeated Violation violations = 1; -} - -// Describes what preconditions have failed. -// -// For example, if an RPC failed because it required the Terms of Service to be -// acknowledged, it could list the terms of service violation in the -// PreconditionFailure message. -message PreconditionFailure { - // A message type used to describe a single precondition failure. - message Violation { - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation types. For - // example, "TOS" for "Terms of Service violation". - string type = 1; - - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would - // indicate which terms of service is being referenced. - string subject = 2; - - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - string description = 3; - } - - // Describes all precondition violations. - repeated Violation violations = 1; -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -message BadRequest { - // A message type used to describe a single bad request field. - message FieldViolation { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "field_violations.field" would identify this field. - string field = 1; - - // A description of why the request element is bad. - string description = 2; - } - - // Describes all violations in a client request. - repeated FieldViolation field_violations = 1; -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -message RequestInfo { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - string request_id = 1; - - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - string serving_data = 2; -} - -// Describes the resource that is being accessed. -message ResourceInfo { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - string resource_type = 1; - - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - string resource_name = 2; - - // The owner of the resource (optional). - // For example, "user:" or "project:". - string owner = 3; - - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - string description = 4; -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -message Help { - // Describes a URL link. - message Link { - // Describes what the link offers. - string description = 1; - - // The URL of the link. - string url = 2; - } - - // URL(s) pointing to additional information on handling the current error. - repeated Link links = 1; -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -message LocalizedMessage { - // The locale used following the specification defined at - // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - string locale = 1; - - // The localized error message in the above locale. - string message = 2; -} diff --git a/proto/third_party/google/rpc/status.proto b/proto/third_party/google/rpc/status.proto deleted file mode 100644 index 0839ee9..0000000 --- a/proto/third_party/google/rpc/status.proto +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2017 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - - -// The `Status` type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. It is used by -// [gRPC](https://github.com/grpc). The error model is designed to be: -// -// - Simple to use and understand for most users -// - Flexible enough to meet unexpected needs -// -// # Overview -// -// The `Status` message contains three pieces of data: error code, error message, -// and error details. The error code should be an enum value of -// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The -// error message should be a developer-facing English message that helps -// developers *understand* and *resolve* the error. If a localized user-facing -// error message is needed, put the localized message in the error details or -// localize it in the client. The optional error details may contain arbitrary -// information about the error. There is a predefined set of error detail types -// in the package `google.rpc` that can be used for common error conditions. -// -// # Language mapping -// -// The `Status` message is the logical representation of the error model, but it -// is not necessarily the actual wire format. When the `Status` message is -// exposed in different client libraries and different wire protocols, it can be -// mapped differently. For example, it will likely be mapped to some exceptions -// in Java, but more likely mapped to some error codes in C. -// -// # Other uses -// -// The error model and the `Status` message can be used in a variety of -// environments, either with or without APIs, to provide a -// consistent developer experience across different environments. -// -// Example uses of this error model include: -// -// - Partial errors. If a service needs to return partial errors to the client, -// it may embed the `Status` in the normal response to indicate the partial -// errors. -// -// - Workflow errors. A typical workflow has multiple steps. Each step may -// have a `Status` message for error reporting. -// -// - Batch operations. If a client uses batch request and batch response, the -// `Status` message should be used directly inside batch response, one for -// each error sub-response. -// -// - Asynchronous operations. If an API call embeds asynchronous operation -// results in its response, the status of those operations should be -// represented directly using the `Status` message. -// -// - Logging. If some API errors are stored in logs, the message `Status` could -// be used directly after any stripping needed for security/privacy reasons. -message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -} diff --git a/resolver-config.yaml b/resolver-config.yaml new file mode 100644 index 0000000..f2cd141 --- /dev/null +++ b/resolver-config.yaml @@ -0,0 +1,8 @@ +network: + active: testnet + profiles: + # to deploy your own storage provider contract + - name: testnet + node: https://testnet-api.algonode.cloud + node_token: "" + app_id: 602746084 diff --git a/sample-config.yaml b/sample-config.yaml index c7829a1..6f31164 100644 --- a/sample-config.yaml +++ b/sample-config.yaml @@ -1,31 +1,15 @@ -# These values are the only ones required to use the application -# locally as a regular clients. Even if not provided these are -# the default values. -client: - node: algo-did.aidtech.network:443 - timeout: 5 - pow: 16 -# These values are required to run an agent node. -agent: - pow: 8 - port: 9090 - http: true - proxy_protocol: true - env: dev - storage: - kind: ephemeral - method: - - algo - tls: - enabled: false - cert: /etc/algoid/tls/tls.crt - key: /etc/algoid/tls/tls.key - system_ca: true - custom_ca: [] - network: - algod: - address: "..." - token: "..." - indexer: - address: "..." - token: "..." +home: ./tmp/store +network: + active: testnet + profiles: + # to deploy your own storage provider contract + - name: testnet + node: https://testnet-api.algonode.cloud + node_token: "" + app_id: 602746084 + # to use a storage provider 3rd party + - name: using-provider + node: https://testnet-api.algonode.cloud + node_token: "" + app_id: 591154170 + store_provider: http://localhost:3000