From 5657bc6aed66e6eb78a5647db03886445f645ce1 Mon Sep 17 00:00:00 2001 From: shine_86 Date: Mon, 26 Oct 2020 10:09:57 +0300 Subject: [PATCH 1/4] templater --- main.go | 21 + template/{{.ServiceName}}/.env | 5 + .../.github/workflows/main.yml | 109 ++ template/{{.ServiceName}}/.gitignore | 28 + template/{{.ServiceName}}/.gitlab-ci.yml | 54 + .../{{.ServiceName}}/.golangci.pipeline.yaml | 62 + template/{{.ServiceName}}/.golangci.yaml | 62 + template/{{.ServiceName}}/LICENSE | 21 + template/{{.ServiceName}}/Makefile | 259 ++++ template/{{.ServiceName}}/Procfile | 1 + template/{{.ServiceName}}/README.md | 83 ++ template/{{.ServiceName}}/api/.keep | 0 template/{{.ServiceName}}/api/README.md | 8 + template/{{.ServiceName}}/api/api.proto | 50 + .../api/gen-{{.ServiceName}}/api/api.pb.go | 527 +++++++ .../api/gen-{{.ServiceName}}/api/api.pb.gw.go | 373 +++++ .../gen-{{.ServiceName}}/api/swagger.pb.go | 43 + template/{{.ServiceName}}/api/swagger.proto | 32 + template/{{.ServiceName}}/assets/.keep | 0 template/{{.ServiceName}}/assets/README.md | 3 + .../assets/swaggerui/api.swagger.json | 281 ++++ .../assets/swaggerui/favicon-16x16.png | Bin 0 -> 665 bytes .../assets/swaggerui/favicon-32x32.png | Bin 0 -> 628 bytes .../assets/swaggerui/index.html | 60 + .../assets/swaggerui/oauth2-redirect.html | 68 + .../assets/swaggerui/swagger-ui-bundle.js | 134 ++ .../assets/swaggerui/swagger-ui-bundle.js.map | 1 + .../swaggerui/swagger-ui-standalone-preset.js | 22 + .../swagger-ui-standalone-preset.js.map | 1 + .../assets/swaggerui/swagger-ui.css | 4 + .../assets/swaggerui/swagger-ui.css.map | 1 + .../assets/swaggerui/swagger-ui.js | 9 + .../assets/swaggerui/swagger-ui.js.map | 1 + template/{{.ServiceName}}/build/README.md | 11 + template/{{.ServiceName}}/build/ci/.keep | 0 template/{{.ServiceName}}/build/package/.keep | 0 .../build/package/project.dockerfile | 5 + template/{{.ServiceName}}/cmd/README.md | 18 + .../cmd/{{.ServiceName}}/.keep | 0 .../cmd/{{.ServiceName}}/config.go | 8 + .../cmd/{{.ServiceName}}/handle.go | 25 + .../cmd/{{.ServiceName}}/main.go | 162 +++ template/{{.ServiceName}}/configs/.keep | 0 template/{{.ServiceName}}/configs/README.md | 5 + template/{{.ServiceName}}/deployments/.keep | 0 .../{{.ServiceName}}/deployments/README.md | 47 + .../deployments/clickhouse-config.xml | 197 +++ .../deployments/docker-compose-kafka.yml | 87 ++ .../deployments/docker-compose.yml | 185 +++ .../deployments/elasticsearch.yml | 6 + .../deployments/enabled_plugins | 1 + .../kubernetes/grafana-values.yaml | 414 ++++++ .../deployments/kubernetes/ingress_p.yaml | 48 + .../deployments/kubernetes/jaeger-values.yaml | 274 ++++ .../deployments/kubernetes/jaeger/.helmignore | 22 + .../deployments/kubernetes/jaeger/Chart.yaml | 5 + .../kubernetes/jaeger/templates/NOTES.txt | 1 + .../kubernetes/jaeger/templates/jaeger.yaml | 161 +++ .../deployments/kubernetes/jaeger/values.yaml | 22 + .../kubernetes/prometheus-values.yaml | 1270 +++++++++++++++++ .../{{.ServiceName}}-chart/.helmignore | 21 + .../{{.ServiceName}}-chart/Chart.yaml | 4 + .../templates/NOTES.txt | 21 + .../templates/_helpers.tpl | 32 + .../templates/deployment.yaml | 74 + .../templates/ingress.yaml | 41 + .../templates/service.yaml | 23 + .../{{.ServiceName}}-chart/values.yaml | 76 + .../deployments/log4j2.properties | 9 + .../deployments/monitor/prometheus.yml | 34 + template/{{.ServiceName}}/docs/.keep | 0 template/{{.ServiceName}}/docs/README.md | 8 + template/{{.ServiceName}}/examples/.keep | 0 template/{{.ServiceName}}/examples/README.md | 10 + template/{{.ServiceName}}/githooks/.keep | 0 template/{{.ServiceName}}/githooks/README.md | 3 + template/{{.ServiceName}}/go.mod | 44 + template/{{.ServiceName}}/go.sum | 261 ++++ template/{{.ServiceName}}/init/.keep | 0 template/{{.ServiceName}}/init/README.md | 3 + template/{{.ServiceName}}/internal/README.md | 5 + .../internal/app/fastsrv/graceful.go | 40 + .../internal/app/fastsrv/handle.go | 51 + .../internal/app/fastsrv/srv.go | 57 + .../internal/app/grpc/grpc.go | 141 ++ .../{{.ServiceName}}/internal/app/serv/.keep | 0 .../internal/app/serv/graceful.go | 37 + .../internal/app/serv/handle.go | 78 + .../internal/app/serv/serv.go | 122 ++ .../app/{{.ServiceName}}/blockchain.go | 73 + .../app/{{.ServiceName}}/boilerplate.go | 38 + .../internal/pkg/clickhouse/client.go | 30 + .../internal/pkg/elastic/client.go | 27 + .../internal/pkg/logger/logger.go | 155 ++ .../internal/pkg/logger/logrus/logger.go | 254 ++++ .../internal/pkg/pubsub/pubsub.go | 17 + .../internal/pkg/pubsub/rabbitmq/client.go | 146 ++ .../{{.ServiceName}}/internal/pkg/redis/.keep | 0 .../internal/pkg/redis/client.go | 66 + .../internal/pkg/redis/dummy.go | 547 +++++++ .../internal/pkg/template/template.go | 151 ++ .../internal/pkg/tracing/tracing.go | 31 + .../internal/pkg/uaparser/uaparser.go | 48 + template/{{.ServiceName}}/pkg/README.md | 43 + .../pkg/_your_public_lib_/.keep | 0 .../{{.ServiceName}}/pkg/version/version.go | 26 + template/{{.ServiceName}}/scripts/.keep | 0 template/{{.ServiceName}}/scripts/README.md | 11 + template/{{.ServiceName}}/test/.keep | 0 template/{{.ServiceName}}/test/README.md | 9 + template/{{.ServiceName}}/third_party/.keep | 0 .../{{.ServiceName}}/third_party/README.md | 3 + template/{{.ServiceName}}/tools/.keep | 0 template/{{.ServiceName}}/tools/README.md | 8 + template/{{.ServiceName}}/tools/tools.go | 9 + .../{{.ServiceName}}/tpl/layouts/base.html | 53 + template/{{.ServiceName}}/tpl/layouts/js.html | 5 + .../{{.ServiceName}}/tpl/layouts/style.html | 4 + template/{{.ServiceName}}/tpl/main.html | 7 + .../{{.ServiceName}}/tpl/public_hundle.html | 1 + template/{{.ServiceName}}/web/README.md | 3 + template/{{.ServiceName}}/web/app/.keep | 0 template/{{.ServiceName}}/web/static/.keep | 0 template/{{.ServiceName}}/web/template/.keep | 0 template/{{.ServiceName}}/website/README.md | 8 + templater/templater.go | 100 ++ templater/utils.go | 31 + templater/utils_test.go | 29 + 128 files changed, 8425 insertions(+) create mode 100644 main.go create mode 100644 template/{{.ServiceName}}/.env create mode 100644 template/{{.ServiceName}}/.github/workflows/main.yml create mode 100644 template/{{.ServiceName}}/.gitignore create mode 100644 template/{{.ServiceName}}/.gitlab-ci.yml create mode 100644 template/{{.ServiceName}}/.golangci.pipeline.yaml create mode 100644 template/{{.ServiceName}}/.golangci.yaml create mode 100644 template/{{.ServiceName}}/LICENSE create mode 100644 template/{{.ServiceName}}/Makefile create mode 100644 template/{{.ServiceName}}/Procfile create mode 100644 template/{{.ServiceName}}/README.md create mode 100644 template/{{.ServiceName}}/api/.keep create mode 100644 template/{{.ServiceName}}/api/README.md create mode 100644 template/{{.ServiceName}}/api/api.proto create mode 100644 template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.go create mode 100644 template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.gw.go create mode 100644 template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/swagger.pb.go create mode 100644 template/{{.ServiceName}}/api/swagger.proto create mode 100644 template/{{.ServiceName}}/assets/.keep create mode 100644 template/{{.ServiceName}}/assets/README.md create mode 100644 template/{{.ServiceName}}/assets/swaggerui/api.swagger.json create mode 100644 template/{{.ServiceName}}/assets/swaggerui/favicon-16x16.png create mode 100644 template/{{.ServiceName}}/assets/swaggerui/favicon-32x32.png create mode 100644 template/{{.ServiceName}}/assets/swaggerui/index.html create mode 100644 template/{{.ServiceName}}/assets/swaggerui/oauth2-redirect.html create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui-bundle.js create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui-bundle.js.map create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui-standalone-preset.js create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui-standalone-preset.js.map create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui.css create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui.css.map create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui.js create mode 100644 template/{{.ServiceName}}/assets/swaggerui/swagger-ui.js.map create mode 100644 template/{{.ServiceName}}/build/README.md create mode 100644 template/{{.ServiceName}}/build/ci/.keep create mode 100644 template/{{.ServiceName}}/build/package/.keep create mode 100644 template/{{.ServiceName}}/build/package/project.dockerfile create mode 100644 template/{{.ServiceName}}/cmd/README.md create mode 100644 template/{{.ServiceName}}/cmd/{{.ServiceName}}/.keep create mode 100644 template/{{.ServiceName}}/cmd/{{.ServiceName}}/config.go create mode 100644 template/{{.ServiceName}}/cmd/{{.ServiceName}}/handle.go create mode 100644 template/{{.ServiceName}}/cmd/{{.ServiceName}}/main.go create mode 100644 template/{{.ServiceName}}/configs/.keep create mode 100644 template/{{.ServiceName}}/configs/README.md create mode 100644 template/{{.ServiceName}}/deployments/.keep create mode 100644 template/{{.ServiceName}}/deployments/README.md create mode 100644 template/{{.ServiceName}}/deployments/clickhouse-config.xml create mode 100644 template/{{.ServiceName}}/deployments/docker-compose-kafka.yml create mode 100644 template/{{.ServiceName}}/deployments/docker-compose.yml create mode 100644 template/{{.ServiceName}}/deployments/elasticsearch.yml create mode 100644 template/{{.ServiceName}}/deployments/enabled_plugins create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/grafana-values.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/ingress_p.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/jaeger-values.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/jaeger/.helmignore create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/jaeger/Chart.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/jaeger/templates/NOTES.txt create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/jaeger/templates/jaeger.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/jaeger/values.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/prometheus-values.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/.helmignore create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/Chart.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/templates/NOTES.txt create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/templates/_helpers.tpl create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/templates/deployment.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/templates/ingress.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/templates/service.yaml create mode 100644 template/{{.ServiceName}}/deployments/kubernetes/{{.ServiceName}}-chart/values.yaml create mode 100644 template/{{.ServiceName}}/deployments/log4j2.properties create mode 100644 template/{{.ServiceName}}/deployments/monitor/prometheus.yml create mode 100644 template/{{.ServiceName}}/docs/.keep create mode 100644 template/{{.ServiceName}}/docs/README.md create mode 100644 template/{{.ServiceName}}/examples/.keep create mode 100644 template/{{.ServiceName}}/examples/README.md create mode 100644 template/{{.ServiceName}}/githooks/.keep create mode 100644 template/{{.ServiceName}}/githooks/README.md create mode 100644 template/{{.ServiceName}}/go.mod create mode 100644 template/{{.ServiceName}}/go.sum create mode 100644 template/{{.ServiceName}}/init/.keep create mode 100644 template/{{.ServiceName}}/init/README.md create mode 100644 template/{{.ServiceName}}/internal/README.md create mode 100644 template/{{.ServiceName}}/internal/app/fastsrv/graceful.go create mode 100644 template/{{.ServiceName}}/internal/app/fastsrv/handle.go create mode 100644 template/{{.ServiceName}}/internal/app/fastsrv/srv.go create mode 100644 template/{{.ServiceName}}/internal/app/grpc/grpc.go create mode 100644 template/{{.ServiceName}}/internal/app/serv/.keep create mode 100644 template/{{.ServiceName}}/internal/app/serv/graceful.go create mode 100644 template/{{.ServiceName}}/internal/app/serv/handle.go create mode 100644 template/{{.ServiceName}}/internal/app/serv/serv.go create mode 100644 template/{{.ServiceName}}/internal/app/{{.ServiceName}}/blockchain.go create mode 100644 template/{{.ServiceName}}/internal/app/{{.ServiceName}}/boilerplate.go create mode 100644 template/{{.ServiceName}}/internal/pkg/clickhouse/client.go create mode 100644 template/{{.ServiceName}}/internal/pkg/elastic/client.go create mode 100644 template/{{.ServiceName}}/internal/pkg/logger/logger.go create mode 100644 template/{{.ServiceName}}/internal/pkg/logger/logrus/logger.go create mode 100644 template/{{.ServiceName}}/internal/pkg/pubsub/pubsub.go create mode 100644 template/{{.ServiceName}}/internal/pkg/pubsub/rabbitmq/client.go create mode 100644 template/{{.ServiceName}}/internal/pkg/redis/.keep create mode 100644 template/{{.ServiceName}}/internal/pkg/redis/client.go create mode 100644 template/{{.ServiceName}}/internal/pkg/redis/dummy.go create mode 100644 template/{{.ServiceName}}/internal/pkg/template/template.go create mode 100644 template/{{.ServiceName}}/internal/pkg/tracing/tracing.go create mode 100644 template/{{.ServiceName}}/internal/pkg/uaparser/uaparser.go create mode 100644 template/{{.ServiceName}}/pkg/README.md create mode 100644 template/{{.ServiceName}}/pkg/_your_public_lib_/.keep create mode 100644 template/{{.ServiceName}}/pkg/version/version.go create mode 100644 template/{{.ServiceName}}/scripts/.keep create mode 100644 template/{{.ServiceName}}/scripts/README.md create mode 100644 template/{{.ServiceName}}/test/.keep create mode 100644 template/{{.ServiceName}}/test/README.md create mode 100644 template/{{.ServiceName}}/third_party/.keep create mode 100644 template/{{.ServiceName}}/third_party/README.md create mode 100644 template/{{.ServiceName}}/tools/.keep create mode 100644 template/{{.ServiceName}}/tools/README.md create mode 100644 template/{{.ServiceName}}/tools/tools.go create mode 100644 template/{{.ServiceName}}/tpl/layouts/base.html create mode 100644 template/{{.ServiceName}}/tpl/layouts/js.html create mode 100644 template/{{.ServiceName}}/tpl/layouts/style.html create mode 100644 template/{{.ServiceName}}/tpl/main.html create mode 100644 template/{{.ServiceName}}/tpl/public_hundle.html create mode 100644 template/{{.ServiceName}}/web/README.md create mode 100644 template/{{.ServiceName}}/web/app/.keep create mode 100644 template/{{.ServiceName}}/web/static/.keep create mode 100644 template/{{.ServiceName}}/web/template/.keep create mode 100644 template/{{.ServiceName}}/website/README.md create mode 100644 templater/templater.go create mode 100644 templater/utils.go create mode 100644 templater/utils_test.go diff --git a/main.go b/main.go new file mode 100644 index 0000000..09544b2 --- /dev/null +++ b/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + + "github.com/temp-lib/templater" +) + +func main() { + cfg := templater.Config{ + ServiceName: "TEST", + User: "shine", + IgnorePatterns: []string{".html", ".yml", ".yaml", ".tpl", ".txt", "js.map"}, + } + templtr := templater.New(cfg) + err := templtr.BuildService(`./template/{{.ServiceName}}`, + `./`) + if err != nil { + fmt.Println(err) + } +} diff --git a/template/{{.ServiceName}}/.env b/template/{{.ServiceName}}/.env new file mode 100644 index 0000000..a33ab49 --- /dev/null +++ b/template/{{.ServiceName}}/.env @@ -0,0 +1,5 @@ +MY_ENV="Hello" +PORT=8080 +PORT_DEBUG=8888 +PORT_GRPC=8842 +LOG_LEVEL=0 \ No newline at end of file diff --git a/template/{{.ServiceName}}/.github/workflows/main.yml b/template/{{.ServiceName}}/.github/workflows/main.yml new file mode 100644 index 0000000..83e0f18 --- /dev/null +++ b/template/{{.ServiceName}}/.github/workflows/main.yml @@ -0,0 +1,109 @@ +name: Build and Test +on: + push: + branches: + - master + pull_request: + +jobs: + + lint: + name: Lint + strategy: + matrix: + go-version: [1.14.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Check out code + uses: actions/checkout@v2 + + - name: Lint Go Code + run: | + make lint + + test: + name: Test + strategy: + matrix: + go-version: [1.14.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Check out code + uses: actions/checkout@v2 + + - name: Run Unit tests. + run: make test + + slint: + name: Super Linter + strategy: + matrix: + go-version: [1.14.x] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Check out code + uses: actions/checkout@v2 + + # - name: Super-Linter + # uses: github/super-linter@v2.2.0 + # with: + # fail_ci_if_error: true + + test-coverage: + name: Test Coverage + strategy: + matrix: + go-version: [1.14.x] + platform: [ubuntu-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Check out code + uses: actions/checkout@v2 + + - name: Run tests coverage. + run: make test-coverage + + - name: Upload Coverage report to CodeCov + uses: codecov/codecov-action@v1.0.0 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage.txt + # fail_ci_if_error: true + + build: + name: Build + strategy: + matrix: + go-version: [1.14.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + needs: [lint, test] + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Check out code + uses: actions/checkout@v2 + + - name: Build + run: make build diff --git a/template/{{.ServiceName}}/.gitignore b/template/{{.ServiceName}}/.gitignore new file mode 100644 index 0000000..dcdfe75 --- /dev/null +++ b/template/{{.ServiceName}}/.gitignore @@ -0,0 +1,28 @@ +# Mac OS X files +.DS_Store + +#.env + +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +deployments/redis-persistence/* +bin/* +logs/* + +/vendor +/vendor.pb +/.idea +/.vscode diff --git a/template/{{.ServiceName}}/.gitlab-ci.yml b/template/{{.ServiceName}}/.gitlab-ci.yml new file mode 100644 index 0000000..dcdae74 --- /dev/null +++ b/template/{{.ServiceName}}/.gitlab-ci.yml @@ -0,0 +1,54 @@ +image: golang:1.14.2 + +services: + - docker:dind + +stages: +- build +- test +- lint +#- deploy + +variables: + KUBECONFIG: /etc/deploy/config + REPOSITORY: {{.User}}/{{.ServiceName}} + NAMESPACE: {{.ServiceName}} + TAG: ${CI_BUILD_REF_NAME}_${CI_BUILD_REF} + CONTAINER_IMAGE: docker.io/${REPOSITORY}:${CI_BUILD_REF_NAME}_${CI_BUILD_REF} + CONTAINER_IMAGE_LATEST: docker.io/${REPOSITORY}:latest + +build: + stage: build + script: + #- docker login -u $DOCKER_USER -p $DOCKER_PASS docker.io + - make build + +test: + stage: test + script: + - make test + +lint: + stage: lint + script: + - make lint-full + +# deploy: +# stage: deploy +# image: lwolf/helm-kubectl-docker:v193_281 +# before_script: +# - mkdir -p /etc/deploy +# - echo ${kube_config} | base64 -d > ${KUBECONFIG} +# - helm init --client-only +# script: +# - cd deployments/kubernetes/{{.ServiceName}}-chart +# - export DEPLOYS=$(helm ls | grep $NAMESPACE | wc -l) +# - > +# if [ ${DEPLOYS} -eq 0 ]; then +# helm install --name=${NAMESPACE} . --namespace=${NAMESPACE} \ +# --set replicaCount=${REPLICA_COUNT}; +# else +# helm upgrade ${NAMESPACE} . --namespace=${NAMESPACE} \ +# --set image.tag=${TAG} \ +# --set replicaCount=${REPLICA_COUNT}; +# fi \ No newline at end of file diff --git a/template/{{.ServiceName}}/.golangci.pipeline.yaml b/template/{{.ServiceName}}/.golangci.pipeline.yaml new file mode 100644 index 0000000..43734b0 --- /dev/null +++ b/template/{{.ServiceName}}/.golangci.pipeline.yaml @@ -0,0 +1,62 @@ +# More info on config here: https://github.com/golangci/golangci-lint#config-file +run: + deadline: 10m + issues-exit-code: 1 + tests: true + skip-dirs: + - bin + - vendor + - var + - tmp + skip-files: + - \.pb\.go$ + - \.pb\.goclay\.go$ + +output: + format: colored-line-number + print-issued-lines: true + print-linter-name: true + +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 2 + +linters: + disable-all: true + enable: + - golint + - govet + - errcheck + - deadcode + - structcheck + - varcheck + - ineffassign + - typecheck +# - dupl + - goconst +# - goimports + - megacheck # (staticcheck + gosimple + unused in one linter) + - gosec + +issues: + exclude-use-default: false + exclude: + # _ instead of err checks + - G104 + # for "public interface + private struct implementation" cases only! + - exported func * returns unexported type *, which can be annoying to use + # can be removed in the development phase + # - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form) + # not for the active development - can be removed in the stable phase + - should have a package comment, unless it's in another file for this package + - don't use an underscore in package name + # errcheck: Almost all programs ignore errors on these functions and in most cases it's ok + - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked + - should check returned error before deferring diff --git a/template/{{.ServiceName}}/.golangci.yaml b/template/{{.ServiceName}}/.golangci.yaml new file mode 100644 index 0000000..ab1dda4 --- /dev/null +++ b/template/{{.ServiceName}}/.golangci.yaml @@ -0,0 +1,62 @@ +# More info on config here: https://github.com/golangci/golangci-lint#config-file +run: + deadline: 10s + issues-exit-code: 1 + tests: true + skip-dirs: + - bin + - vendor + - var + - tmp + skip-files: + - \.pb\.go$ + - \.pb\.goclay\.go$ + +output: + format: colored-line-number + print-issued-lines: true + print-linter-name: true + +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 2 + +linters: + disable-all: true + enable: + - golint + - govet + - errcheck + - deadcode + - structcheck + - varcheck + - ineffassign + - typecheck +# - dupl + - goconst + - gosec + # - goimports - your IDE should do this automatically as 'On save' action anyways + # - megacheck (staticcheck + gosimple + unused in one linter) - enable before push + +issues: + exclude-use-default: false + exclude: + # _ instead of err checks + - G104 + # for "public interface + private struct implementation" cases only! + - exported func * returns unexported type *, which can be annoying to use + # can be removed in the development phase + # - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form) + # not for the active development - can be removed in the stable phase + - should have a package comment, unless it's in another file for this package + - don't use an underscore in package name + # errcheck: Almost all programs ignore errors on these functions and in most cases it's ok + - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked + - should check returned error before deferring diff --git a/template/{{.ServiceName}}/LICENSE b/template/{{.ServiceName}}/LICENSE new file mode 100644 index 0000000..5307594 --- /dev/null +++ b/template/{{.ServiceName}}/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 {{.User}} + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/template/{{.ServiceName}}/Makefile b/template/{{.ServiceName}}/Makefile new file mode 100644 index 0000000..bebde4e --- /dev/null +++ b/template/{{.ServiceName}}/Makefile @@ -0,0 +1,259 @@ +# note: call scripts from /scripts +.ServiceName={{.ServiceName}} +USER={{.User}} +VERSION=latest +REPOSITORY="$(USER)/$(.ServiceName)" +QUAYVERSION = "${REPOSITORY}:$(VERSION)" + +TAG=${CI_BUILD_REF_NAME}_${CI_BUILD_REF} +CONTAINER_IMAGE=docker.io/${REPOSITORY}:${TAG} +CONTAINER_IMAGE_LATEST=${QUAYVERSION} +RELEASE?=0.0.1 + +LOCAL_BIN:=$(CURDIR)/bin + +# Check global GOLANGCI-LINT +GOLANGCI_BIN:=$(LOCAL_BIN)/golangci-lint +GOLANGCI_TAG:=1.26.0 + +# Check local bin version +ifneq ($(wildcard $(GOLANGCI_BIN)),) +GOLANGCI_BIN_VERSION:=$(shell $(GOLANGCI_BIN) --version) +ifneq ($(GOLANGCI_BIN_VERSION),) +GOLANGCI_BIN_VERSION_SHORT:=$(shell echo "$(GOLANGCI_BIN_VERSION)"|sed -E 's/.* version (.*) built from .* on .*/\1/g') +else +GOLANGCI_BIN_VERSION_SHORT:=0 +endif +ifneq "$(GOLANGCI_TAG)" "$(word 1, $(sort $(GOLANGCI_TAG) $(GOLANGCI_BIN_VERSION_SHORT)))" +GOLANGCI_BIN:= +endif +endif + +# Check global bin version +ifneq (, $(shell which golangci-lint)) +GOLANGCI_VERSION:=$(shell golangci-lint --version 2> /dev/null ) +ifneq ($(GOLANGCI_VERSION),) +GOLANGCI_VERSION_SHORT:=$(shell echo "$(GOLANGCI_VERSION)"|sed -E 's/.* version (.*) built from .* on .*/\1/g') +else +GOLANGCI_VERSION_SHORT:=0 +endif +ifeq "$(GOLANGCI_TAG)" "$(word 1, $(sort $(GOLANGCI_TAG) $(GOLANGCI_VERSION_SHORT)))" +GOLANGCI_BIN:=$(shell which golangci-lint) +endif +endif + +export GO111MODULE=on + +SHELL=/bin/bash -o pipefail + + +APP?=$(.ServiceName) +PROJECT?=github.com/$(USER)/$(.ServiceName) + +LDFLAGS:=-X '${PROJECT}/version.Name=$(.ServiceName)'\ + -X '${PROJECT}/version.ProjectID=$(CI_PROJECT_ID)'\ + -X '${PROJECT}/version.Version=$(APP_VERSION)'\ + -X '${PROJECT}/version.GoVersion=$(GO_VERSION_SHORT)'\ + -X '${PROJECT}/version.BuildDate=$(BUILD_TS)'\ + -X '${PROJECT}/version.GitLog=$(GIT_LOG)'\ + -X '${PROJECT}/version.GitHash=$(GIT_HASH)'\ + -X '${PROJECT}/version.GitBranch=$(GIT_BRANCH)'\ + -X '${PROJECT}/version.publicPortDefault='\ + -X '${PROJECT}/version.adminPortDefault='\ + -X '${PROJECT}/version.grpcPortDefault=' + + +PKGMAP:=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/api.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,$\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/source_context.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/type.proto=github.com/gogo/protobuf/types,$\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types + + + +-include .env + +test-env: + @echo ${MY_ENV} + +BUILD_ENVPARMS:=CGO_ENABLED=0 PORT=${PORT} PORT_DEBUG=${PORT_DEBUG} PORT_GRPC=${PORT_GRPC} LOG_LEVEL=${LOG_LEVEL} +BIN?=./bin/${APP} + +CONTAINER_IMAGE?=docker.io/webdeva/${APP} + +.PHONY: .deps +.deps: + $(info #Install dependencies...) + go mod download + +# install project dependencies +.PHONY: deps +deps: .deps ## deps: Download modules + +.PHONY: .test +.test: + $(info #Running tests...) + go test ./... + +test-coverage: ## Run tests with coverage + @go test -short -coverprofile cover.out -covermode=atomic ./... + @cat cover.out >> coverage.txt + + +clean: ## Remove previous build + @rm -f ./bin + +help: ## Display this help screen + @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +# run unit tests +.PHONY: test +test: .test ## Run tests + +.PHONY: install-protoc +install-protoc: ## Install protoc + go mod tidy + GOBIN=$(LOCAL_BIN) go install \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \ + github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \ + github.com/golang/protobuf/protoc-gen-go + +gen-protoc: ## protoc generation + mkdir -p "./api/gen-${.ServiceName}" + protoc -I/usr/local/include -I. \ + -I${GOPATH}/src \ + -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ + -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway \ + --grpc-gateway_out=logtostderr=true:./api/gen-$(.ServiceName) \ + --swagger_out=allow_merge=true,merge_file_name=api:./assets/swaggerui \ + --go_out=plugins=grpc:./api/gen-$(.ServiceName) ./api/*.proto + + +.PHONY: install-lint +install-lint: ## install golangci-lint binary +ifeq ($(wildcard $(GOLANGCI_BIN)),) + $(info #Downloading golangci-lint v$(GOLANGCI_TAG)) + go get -d github.com/golangci/golangci-lint@v$(GOLANGCI_TAG) + go build -ldflags "-X 'main.version=$(GOLANGCI_TAG)' -X 'main.commit=test' -X 'main.date=test'" -o $(LOCAL_BIN)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint + +GOLANGCI_BIN:=$(LOCAL_BIN)/golangci-lint +endif + +# run diff lint like in pipeline +.PHONY: .lint +.lint: install-lint + $(GOLANGCI_BIN) run --new-from-rev=origin/master --config=.golangci.pipeline.yaml ./... + +# golangci-lint diff master +.PHONY: lint +lint: .lint ## Lint Golang files + +# run full lint like in pipeline +.PHONY: lint-full +lint-full: install-lint ## run full lint + $(GOLANGCI_BIN) run --config=.golangci.pipeline.yaml ./... + + +.PHONY: .build +.build: + $(info #Building...) + $(BUILD_ENVPARMS) go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/${APP} + +# build app +.PHONY: build +build: .build ## Build the binary file + +.PHONY: .run +.run: + $(info #Running...) + $(BUILD_ENVPARMS) go run -ldflags "$(LDFLAGS)" ./cmd/${APP} +# run app +.PHONY: run +run: .run ## Run appication + + +.PHONY: docker-kill +docker-kill: ## Docker compose kill + docker-compose -f $${DC_FILE:-deployments/docker-compose.yml} kill + docker-compose -f $${DC_FILE:-deployments/docker-compose.yml} rm -f + docker network rm network-$${CI_JOB_ID:-local} || true + +.PHONY: docker-build +docker-build: docker-kill ## Docker build + env GOBUILD=env GOOS=linux GOARCH=amd64 $(BUILD_ENVPARMS) go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/${APP} + #docker build -f docker/pg-migrations.dockerfile -t pg-migrations-$${CI_JOB_ID:-local} . + docker build --no-cache -t $(QUAYVERSION) -f build/package/project.dockerfile . + #docker build --no-cache -f docker/itest.dockerfile -t itest-$${CI_JOB_ID:-local} . + +.PHONY: docker-up +docker-up: docker-build + docker network create network-$${CI_JOB_ID:-local} + docker-compose -f $${DC_FILE:-deployments/docker-compose.yml} up --force-recreate --renew-anon-volumes -d + +.PHONY: docker-logs +docker-logs: ## Docker logs + mkdir -p ./logs || true + #docker logs postgres-$${CI_JOB_ID:-local} >& logs/postgres.log + #docker logs pg-migrations-$${CI_JOB_ID:-local} >& logs/pg-migrations.log + docker logs $${.ServiceName}-$${CI_JOB_ID:-local} >& logs/$${.ServiceName}.log + docker logs redis-$${CI_JOB_ID:-local} >& logs/redis.log + docker logs rabbitmq-$${CI_JOB_ID:-local} >& logs/rabbitmq.log + docker logs elasticsearch-$${CI_JOB_ID:-local} >& logs/elasticsearch.log + docker logs kibana-$${CI_JOB_ID:-local} >& logs/kibana.log + docker logs prometheus-$${CI_JOB_ID:-local} >& logs/prometheus.log + docker logs clickhouse-$${CI_JOB_ID:-local} >& logs/clickhouse.log + + +BEFORE_DISK_FREE=$$(df -h /) +.PHONY: docker-clean +docker-clean: + @echo Останавливаем все контейнеры + docker kill $$(docker ps -q) || true + @echo Очистка докер контейнеров + docker rm -f $$(docker ps -a -f status=exited -q) || true + @echo Очистка dangling образов + docker rmi -f $$(docker images -f "dangling=true" -q) || true + @echo Очистка $${.ServiceName} образов + docker rmi -f $$(docker images --filter=reference='$${.ServiceName}*' -q) || true + #@echo Очистка itest образов + #docker rmi -f $$(docker images --filter=reference='itest*' -q) || true + #@echo Очистка pg-migrations образов + #docker rmi -f $$(docker images --filter=reference='pg-migrations*' -q) || true + @echo Очистка volume + docker volume rm -f $$(docker volume ls -q) || true + @echo Очистка сетей + docker network prune -f || true + @echo "Занятость диска до очистки:" + @echo "${BEFORE_DISK_FREE}" + @echo "Занятость диска после очистки:" + @echo "$$(df -h /)" + +docker-push: docker-build + docker push $(QUAYVERSION) + +.PHONY: docker-push-ci +docker-push-ci: ## Build go app for docker push + env GOBUILD=env GOOS=linux GOARCH=amd64 $(BUILD_ENVPARMS) go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/${APP} + docker build --no-cache -t ${CONTAINER_IMAGE} -f build/package/project.dockerfile . + echo $(VERSION) + docker tag ${CONTAINER_IMAGE} ${CONTAINER_IMAGE_LATEST} + docker push ${CONTAINER_IMAGE} + docker push $(CONTAINER_IMAGE_LATEST) + +minikube: ## Run minikube + minikube delete + minikube start --vm-driver=hyperkit + minikube addons enable ingress + + kubectl config get-contexts + kubectl config use-context minikube + + helm init + + minikube service list diff --git a/template/{{.ServiceName}}/Procfile b/template/{{.ServiceName}}/Procfile new file mode 100644 index 0000000..0d4104c --- /dev/null +++ b/template/{{.ServiceName}}/Procfile @@ -0,0 +1 @@ +web: bin/{{.ServiceName}} diff --git a/template/{{.ServiceName}}/README.md b/template/{{.ServiceName}}/README.md new file mode 100644 index 0000000..3f7bbf1 --- /dev/null +++ b/template/{{.ServiceName}}/README.md @@ -0,0 +1,83 @@ +[![Go Report Card](https://goreportcard.com/badge/github.com/{{.User}}/{{.ServiceName}})](https://goreportcard.com/report/github.com/{{.User}}/{{.ServiceName}}) +[![codecov](https://codecov.io/gh/{{.User}}/{{.ServiceName}}/branch/master/graph/badge.svg)](https://codecov.io/gh/{{.User}}/{{.ServiceName}}) +[![Actions Status](https://github.com/{{.User}}/{{.ServiceName}}/workflows/Build%20and%20Test/badge.svg)](https://github.com/{{.User}}/{{.ServiceName}}/actions) +[![MIT License](http://img.shields.io/:license-mit-blue.svg)](LICENSE) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2F{{.User}}%2F{{.ServiceName}}.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2F{{.User}}%2F{{.ServiceName}}?ref=badge_shield) + +# Standard Go Project Layout (Boilerplate-GO) + +This is a basic layout for Go application projects. + +[Go standards project layout](https://github.com/golang-standards/project-layout) + +[Local kubernetes setup with minikube on Mac OS X](https://hackernoon.com/local-kubernetes-setup-with-minikube-on-mac-os-x-eeeb1cbdc0b) + +[Using Helm to deploy to Kubernetes](https://daemonza.github.io/2017/02/20/using-helm-to-deploy-to-kubernetes/) + +[Kubernetes NodePort vs LoadBalancer vs Ingress? When should I use what?](https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0) + +https://qiita.com/sotoiwa/items/993990edf2bb98af7c1d#grafana + +```sh +$ echo "$(minikube ip) prometheus.minikube" | sudo tee -a /etc/hosts +$ echo "$(minikube ip) alertmanager.minikube" | sudo tee -a /etc/hosts +$ echo "$(minikube ip) grafana.minikube" | sudo tee -a /etc/hosts +$ echo "$(minikube ip) jaeger.minikube" | sudo tee -a /etc/hosts +$ echo "$(minikube ip) boi.minikube" | sudo tee -a /etc/hosts +$ echo "$(minikube ip) private-boi.minikube" | sudo tee -a /etc/hosts +``` + + +```sh +helm package jaeger --debug +helm package {{.ServiceName}}-chart --debug +``` + +```sh +$ helm install --name jaeger jaeger-0.1.0.tgz + +$ helm install --name boi {{.ServiceName}}-chart-0.1.0.tgz + +$ helm install --name prometheus --namespace monitoring -f prometheus-values.yaml stable/prometheus + +$ helm install --name grafana --namespace monitoring -f grafana-values.yaml stable/grafana +``` + +```sh +$ kubectl get secret --namespace monitoring grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo +``` + +```sh +helm del --purge jaeger +helm del --purge boi +helm del --purge grafana +helm del --purge prometheus +``` + +## GRPC + +```sh +grpc_cli ls localhost:8842 -l + +grpc_cli call localhost:8842 HttpBodyExampleService.HelloWorld '' + + +grpc_cli call localhost:8842 BlockchainService.Address 'address:"Mxb9a117e772a965a3fddddf83398fd8d71bf57ff6", height:11' + +grpc_cli call localhost:8842 BlockchainService.Subscribe 'query:"testete"' + +``` + +## GRPC http proxy +```sh +curl -X GET "http://localhost:8843/helloworld" -H "accept: application/json" + +curl -X GET "http://localhost:8843/address/Mxb9a117e772a965a3fddddf83398fd8d71bf57ff6?height=1" -H "accept: application/json" +``` + + +## swagger + +```sh +http://localhost:8888/swaggerui/ +``` diff --git a/template/{{.ServiceName}}/api/.keep b/template/{{.ServiceName}}/api/.keep new file mode 100644 index 0000000..e69de29 diff --git a/template/{{.ServiceName}}/api/README.md b/template/{{.ServiceName}}/api/README.md new file mode 100644 index 0000000..c9c9f38 --- /dev/null +++ b/template/{{.ServiceName}}/api/README.md @@ -0,0 +1,8 @@ +# `/api` + +OpenAPI/Swagger specs, JSON schema files, protocol definition files. + +Examples: + +* https://github.com/kubernetes/kubernetes/tree/master/api +* https://github.com/openshift/origin/tree/master/api diff --git a/template/{{.ServiceName}}/api/api.proto b/template/{{.ServiceName}}/api/api.proto new file mode 100644 index 0000000..2a02fc7 --- /dev/null +++ b/template/{{.ServiceName}}/api/api.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package api; +import "google/api/annotations.proto"; +import "google/protobuf/struct.proto"; +import "google/api/httpbody.proto"; +import "google/protobuf/empty.proto"; + + +message AddressRequest { + string address = 1; + uint64 height = 2; +} +message AddressResponse { + map balance = 1; + string transactions_count = 2; +} +message SubscribeRequest { + string query = 1; +} +message SubscribeResponse { + string query = 1; + google.protobuf.Struct data = 2; + message Event { + string key = 1; + repeated string events = 2; + } + repeated Event events = 3; +} + + +service HttpBodyExampleService { + rpc HelloWorld(google.protobuf.Empty) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/helloworld" + }; + } +} + +service BlockchainService { + rpc Address (AddressRequest) returns (AddressResponse) { + option (google.api.http) = { + get: "/address/{address}" + }; + } + rpc Subscribe (SubscribeRequest) returns (stream SubscribeResponse) { + option (google.api.http) = { + get: "/subscribe" + }; + } +} \ No newline at end of file diff --git a/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.go b/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.go new file mode 100644 index 0000000..a41a8ba --- /dev/null +++ b/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.go @@ -0,0 +1,527 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: api/api.proto + +package api + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + empty "github.com/golang/protobuf/ptypes/empty" + _struct "github.com/golang/protobuf/ptypes/struct" + _ "google.golang.org/genproto/googleapis/api/annotations" + httpbody "google.golang.org/genproto/googleapis/api/httpbody" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type AddressRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddressRequest) Reset() { *m = AddressRequest{} } +func (m *AddressRequest) String() string { return proto.CompactTextString(m) } +func (*AddressRequest) ProtoMessage() {} +func (*AddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1b40cafcd4234784, []int{0} +} + +func (m *AddressRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddressRequest.Unmarshal(m, b) +} +func (m *AddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddressRequest.Marshal(b, m, deterministic) +} +func (m *AddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddressRequest.Merge(m, src) +} +func (m *AddressRequest) XXX_Size() int { + return xxx_messageInfo_AddressRequest.Size(m) +} +func (m *AddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AddressRequest proto.InternalMessageInfo + +func (m *AddressRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *AddressRequest) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +type AddressResponse struct { + Balance map[string]string `protobuf:"bytes,1,rep,name=balance,proto3" json:"balance,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + TransactionsCount string `protobuf:"bytes,2,opt,name=transactions_count,json=transactionsCount,proto3" json:"transactions_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddressResponse) Reset() { *m = AddressResponse{} } +func (m *AddressResponse) String() string { return proto.CompactTextString(m) } +func (*AddressResponse) ProtoMessage() {} +func (*AddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1b40cafcd4234784, []int{1} +} + +func (m *AddressResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddressResponse.Unmarshal(m, b) +} +func (m *AddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddressResponse.Marshal(b, m, deterministic) +} +func (m *AddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddressResponse.Merge(m, src) +} +func (m *AddressResponse) XXX_Size() int { + return xxx_messageInfo_AddressResponse.Size(m) +} +func (m *AddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AddressResponse proto.InternalMessageInfo + +func (m *AddressResponse) GetBalance() map[string]string { + if m != nil { + return m.Balance + } + return nil +} + +func (m *AddressResponse) GetTransactionsCount() string { + if m != nil { + return m.TransactionsCount + } + return "" +} + +type SubscribeRequest struct { + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} } +func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeRequest) ProtoMessage() {} +func (*SubscribeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1b40cafcd4234784, []int{2} +} + +func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeRequest.Unmarshal(m, b) +} +func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic) +} +func (m *SubscribeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeRequest.Merge(m, src) +} +func (m *SubscribeRequest) XXX_Size() int { + return xxx_messageInfo_SubscribeRequest.Size(m) +} +func (m *SubscribeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeRequest proto.InternalMessageInfo + +func (m *SubscribeRequest) GetQuery() string { + if m != nil { + return m.Query + } + return "" +} + +type SubscribeResponse struct { + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Data *_struct.Struct `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Events []*SubscribeResponse_Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubscribeResponse) Reset() { *m = SubscribeResponse{} } +func (m *SubscribeResponse) String() string { return proto.CompactTextString(m) } +func (*SubscribeResponse) ProtoMessage() {} +func (*SubscribeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1b40cafcd4234784, []int{3} +} + +func (m *SubscribeResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeResponse.Unmarshal(m, b) +} +func (m *SubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeResponse.Marshal(b, m, deterministic) +} +func (m *SubscribeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeResponse.Merge(m, src) +} +func (m *SubscribeResponse) XXX_Size() int { + return xxx_messageInfo_SubscribeResponse.Size(m) +} +func (m *SubscribeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeResponse proto.InternalMessageInfo + +func (m *SubscribeResponse) GetQuery() string { + if m != nil { + return m.Query + } + return "" +} + +func (m *SubscribeResponse) GetData() *_struct.Struct { + if m != nil { + return m.Data + } + return nil +} + +func (m *SubscribeResponse) GetEvents() []*SubscribeResponse_Event { + if m != nil { + return m.Events + } + return nil +} + +type SubscribeResponse_Event struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Events []string `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubscribeResponse_Event) Reset() { *m = SubscribeResponse_Event{} } +func (m *SubscribeResponse_Event) String() string { return proto.CompactTextString(m) } +func (*SubscribeResponse_Event) ProtoMessage() {} +func (*SubscribeResponse_Event) Descriptor() ([]byte, []int) { + return fileDescriptor_1b40cafcd4234784, []int{3, 0} +} + +func (m *SubscribeResponse_Event) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeResponse_Event.Unmarshal(m, b) +} +func (m *SubscribeResponse_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeResponse_Event.Marshal(b, m, deterministic) +} +func (m *SubscribeResponse_Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeResponse_Event.Merge(m, src) +} +func (m *SubscribeResponse_Event) XXX_Size() int { + return xxx_messageInfo_SubscribeResponse_Event.Size(m) +} +func (m *SubscribeResponse_Event) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeResponse_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeResponse_Event proto.InternalMessageInfo + +func (m *SubscribeResponse_Event) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *SubscribeResponse_Event) GetEvents() []string { + if m != nil { + return m.Events + } + return nil +} + +func init() { + proto.RegisterType((*AddressRequest)(nil), "api.AddressRequest") + proto.RegisterType((*AddressResponse)(nil), "api.AddressResponse") + proto.RegisterMapType((map[string]string)(nil), "api.AddressResponse.BalanceEntry") + proto.RegisterType((*SubscribeRequest)(nil), "api.SubscribeRequest") + proto.RegisterType((*SubscribeResponse)(nil), "api.SubscribeResponse") + proto.RegisterType((*SubscribeResponse_Event)(nil), "api.SubscribeResponse.Event") +} + +func init() { proto.RegisterFile("api/api.proto", fileDescriptor_1b40cafcd4234784) } + +var fileDescriptor_1b40cafcd4234784 = []byte{ + // 499 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x95, 0x93, 0x26, 0x51, 0x26, 0x2d, 0x34, 0xd3, 0x60, 0x8c, 0xe9, 0x21, 0xf8, 0x64, 0x09, + 0x61, 0x43, 0xe0, 0x80, 0xca, 0x89, 0xa0, 0x48, 0xbd, 0x51, 0x39, 0x07, 0x8e, 0x68, 0x6d, 0x2f, + 0xb1, 0x55, 0x77, 0xd7, 0xf5, 0xae, 0x03, 0x11, 0xe2, 0xc2, 0x2f, 0xf0, 0x31, 0x88, 0x13, 0x1f, + 0xc1, 0x2f, 0xf0, 0x21, 0xc8, 0xeb, 0xdd, 0x28, 0xa4, 0xb9, 0xed, 0xec, 0x7b, 0xf3, 0x66, 0xe6, + 0xcd, 0xc0, 0x09, 0x29, 0xf3, 0x90, 0x94, 0x79, 0x50, 0x56, 0x5c, 0x72, 0xec, 0x92, 0x32, 0x77, + 0xcf, 0x57, 0x9c, 0xaf, 0x0a, 0x1a, 0x2a, 0x88, 0x31, 0x2e, 0x89, 0xcc, 0x39, 0x13, 0x2d, 0x65, + 0x8b, 0xaa, 0x28, 0xae, 0x3f, 0x85, 0x42, 0x56, 0x75, 0x22, 0x35, 0xfa, 0x68, 0x27, 0x37, 0x93, + 0xb2, 0x8c, 0x79, 0xba, 0xd1, 0xd0, 0xe3, 0xfd, 0x44, 0x7a, 0x53, 0x4a, 0x0d, 0x7a, 0x73, 0xb8, + 0xf7, 0x36, 0x4d, 0x2b, 0x2a, 0x44, 0x44, 0x6f, 0x6b, 0x2a, 0x24, 0x3a, 0x30, 0x20, 0xed, 0x8f, + 0x63, 0x4d, 0x2d, 0x7f, 0x18, 0x99, 0x10, 0x6d, 0xe8, 0x67, 0x34, 0x5f, 0x65, 0xd2, 0xe9, 0x4c, + 0x2d, 0xff, 0x28, 0xd2, 0x91, 0xf7, 0xcb, 0x82, 0xfb, 0x5b, 0x11, 0x51, 0x72, 0x26, 0x28, 0xbe, + 0x81, 0x41, 0x4c, 0x0a, 0xc2, 0x12, 0xea, 0x58, 0xd3, 0xae, 0x3f, 0x9a, 0x3d, 0x09, 0x9a, 0x69, + 0xf7, 0x68, 0xc1, 0xbc, 0xe5, 0x2c, 0x98, 0xac, 0x36, 0x91, 0xc9, 0xc0, 0x67, 0x80, 0xb2, 0x22, + 0x4c, 0x90, 0x44, 0x19, 0xf0, 0x31, 0xe1, 0x35, 0x6b, 0x8b, 0x0e, 0xa3, 0xf1, 0x2e, 0xf2, 0xae, + 0x01, 0xdc, 0x0b, 0x38, 0xde, 0xd5, 0xc1, 0x53, 0xe8, 0x5e, 0xd3, 0x8d, 0xee, 0xbe, 0x79, 0xe2, + 0x04, 0x7a, 0x6b, 0x52, 0xd4, 0x54, 0x6b, 0xb4, 0xc1, 0x45, 0xe7, 0xb5, 0xe5, 0xf9, 0x70, 0xba, + 0xac, 0x63, 0x91, 0x54, 0x79, 0x4c, 0x8d, 0x03, 0x13, 0xe8, 0xdd, 0xd6, 0xb4, 0x32, 0x0a, 0x6d, + 0xe0, 0xfd, 0xb6, 0x60, 0xbc, 0x43, 0xd5, 0x73, 0x1e, 0xe4, 0xe2, 0x53, 0x38, 0x4a, 0x89, 0x24, + 0xaa, 0xdc, 0x68, 0xf6, 0x30, 0x68, 0x37, 0x10, 0x98, 0x0d, 0x04, 0x4b, 0xb5, 0xba, 0x48, 0x91, + 0xf0, 0x15, 0xf4, 0xe9, 0x9a, 0x32, 0x29, 0x9c, 0xae, 0x72, 0xea, 0x5c, 0x39, 0x75, 0xa7, 0x54, + 0xb0, 0x68, 0x48, 0x91, 0xe6, 0xba, 0x2f, 0xa0, 0xa7, 0x3e, 0x0e, 0x4c, 0x6b, 0x6f, 0x05, 0x3b, + 0xd3, 0xae, 0x3f, 0x34, 0x29, 0xb3, 0x1c, 0xec, 0x4b, 0x29, 0xcb, 0x39, 0x4f, 0x37, 0x8b, 0x2f, + 0xe4, 0xa6, 0x2c, 0xe8, 0x92, 0x56, 0xeb, 0x3c, 0xa1, 0xf8, 0x1e, 0xe0, 0x92, 0x16, 0x05, 0xff, + 0xc0, 0xab, 0x22, 0x45, 0xfb, 0x4e, 0xbf, 0x8b, 0xe6, 0x62, 0xdc, 0x89, 0xf9, 0x6f, 0xfa, 0x33, + 0x4a, 0xde, 0xd9, 0xf7, 0x3f, 0x7f, 0x7f, 0x74, 0x4e, 0x70, 0x14, 0x66, 0x8d, 0xc4, 0xe7, 0x46, + 0x62, 0xf6, 0xd3, 0x82, 0xf1, 0xbc, 0xe0, 0xc9, 0x75, 0x92, 0x91, 0x9c, 0x99, 0x32, 0x57, 0x30, + 0xd0, 0x07, 0x80, 0x67, 0xff, 0x9f, 0x83, 0x32, 0xde, 0x9d, 0x1c, 0xba, 0x11, 0xcf, 0x55, 0x05, + 0x26, 0x88, 0xa1, 0x3e, 0xc4, 0xf0, 0xab, 0x7e, 0x7c, 0xc3, 0x2b, 0x18, 0x6e, 0x8d, 0xc2, 0x07, + 0xfb, 0xc6, 0xb5, 0xaa, 0xf6, 0x61, 0x3f, 0x3d, 0x54, 0xba, 0xc7, 0x08, 0xa1, 0x30, 0xd8, 0x73, + 0x2b, 0xee, 0xab, 0xa1, 0x5f, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x26, 0x99, 0x92, 0xa1, + 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// HttpBodyExampleServiceClient is the client API for HttpBodyExampleService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HttpBodyExampleServiceClient interface { + HelloWorld(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error) +} + +type httpBodyExampleServiceClient struct { + cc *grpc.ClientConn +} + +func NewHttpBodyExampleServiceClient(cc *grpc.ClientConn) HttpBodyExampleServiceClient { + return &httpBodyExampleServiceClient{cc} +} + +func (c *httpBodyExampleServiceClient) HelloWorld(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error) { + out := new(httpbody.HttpBody) + err := c.cc.Invoke(ctx, "/api.HttpBodyExampleService/HelloWorld", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HttpBodyExampleServiceServer is the server API for HttpBodyExampleService service. +type HttpBodyExampleServiceServer interface { + HelloWorld(context.Context, *empty.Empty) (*httpbody.HttpBody, error) +} + +// UnimplementedHttpBodyExampleServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHttpBodyExampleServiceServer struct { +} + +func (*UnimplementedHttpBodyExampleServiceServer) HelloWorld(ctx context.Context, req *empty.Empty) (*httpbody.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method HelloWorld not implemented") +} + +func RegisterHttpBodyExampleServiceServer(s *grpc.Server, srv HttpBodyExampleServiceServer) { + s.RegisterService(&_HttpBodyExampleService_serviceDesc, srv) +} + +func _HttpBodyExampleService_HelloWorld_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HttpBodyExampleServiceServer).HelloWorld(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.HttpBodyExampleService/HelloWorld", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HttpBodyExampleServiceServer).HelloWorld(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _HttpBodyExampleService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.HttpBodyExampleService", + HandlerType: (*HttpBodyExampleServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HelloWorld", + Handler: _HttpBodyExampleService_HelloWorld_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/api.proto", +} + +// BlockchainServiceClient is the client API for BlockchainService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BlockchainServiceClient interface { + Address(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressResponse, error) + Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (BlockchainService_SubscribeClient, error) +} + +type blockchainServiceClient struct { + cc *grpc.ClientConn +} + +func NewBlockchainServiceClient(cc *grpc.ClientConn) BlockchainServiceClient { + return &blockchainServiceClient{cc} +} + +func (c *blockchainServiceClient) Address(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressResponse, error) { + out := new(AddressResponse) + err := c.cc.Invoke(ctx, "/api.BlockchainService/Address", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainServiceClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (BlockchainService_SubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &_BlockchainService_serviceDesc.Streams[0], "/api.BlockchainService/Subscribe", opts...) + if err != nil { + return nil, err + } + x := &blockchainServiceSubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type BlockchainService_SubscribeClient interface { + Recv() (*SubscribeResponse, error) + grpc.ClientStream +} + +type blockchainServiceSubscribeClient struct { + grpc.ClientStream +} + +func (x *blockchainServiceSubscribeClient) Recv() (*SubscribeResponse, error) { + m := new(SubscribeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// BlockchainServiceServer is the server API for BlockchainService service. +type BlockchainServiceServer interface { + Address(context.Context, *AddressRequest) (*AddressResponse, error) + Subscribe(*SubscribeRequest, BlockchainService_SubscribeServer) error +} + +// UnimplementedBlockchainServiceServer can be embedded to have forward compatible implementations. +type UnimplementedBlockchainServiceServer struct { +} + +func (*UnimplementedBlockchainServiceServer) Address(ctx context.Context, req *AddressRequest) (*AddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Address not implemented") +} +func (*UnimplementedBlockchainServiceServer) Subscribe(req *SubscribeRequest, srv BlockchainService_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} + +func RegisterBlockchainServiceServer(s *grpc.Server, srv BlockchainServiceServer) { + s.RegisterService(&_BlockchainService_serviceDesc, srv) +} + +func _BlockchainService_Address_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServiceServer).Address(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.BlockchainService/Address", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServiceServer).Address(ctx, req.(*AddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BlockchainService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(BlockchainServiceServer).Subscribe(m, &blockchainServiceSubscribeServer{stream}) +} + +type BlockchainService_SubscribeServer interface { + Send(*SubscribeResponse) error + grpc.ServerStream +} + +type blockchainServiceSubscribeServer struct { + grpc.ServerStream +} + +func (x *blockchainServiceSubscribeServer) Send(m *SubscribeResponse) error { + return x.ServerStream.SendMsg(m) +} + +var _BlockchainService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.BlockchainService", + HandlerType: (*BlockchainServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Address", + Handler: _BlockchainService_Address_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Subscribe", + Handler: _BlockchainService_Subscribe_Handler, + ServerStreams: true, + }, + }, + Metadata: "api/api.proto", +} diff --git a/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.gw.go b/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.gw.go new file mode 100644 index 0000000..1aab7d1 --- /dev/null +++ b/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/api.pb.gw.go @@ -0,0 +1,373 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: api/api.proto + +/* +Package api is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package api + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/empty" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +func request_HttpBodyExampleService_HelloWorld_0(ctx context.Context, marshaler runtime.Marshaler, client HttpBodyExampleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq empty.Empty + var metadata runtime.ServerMetadata + + msg, err := client.HelloWorld(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HttpBodyExampleService_HelloWorld_0(ctx context.Context, marshaler runtime.Marshaler, server HttpBodyExampleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq empty.Empty + var metadata runtime.ServerMetadata + + msg, err := server.HelloWorld(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BlockchainService_Address_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_BlockchainService_Address_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BlockchainService_Address_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Address(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_BlockchainService_Address_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BlockchainService_Address_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Address(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_BlockchainService_Subscribe_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_BlockchainService_Subscribe_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainServiceClient, req *http.Request, pathParams map[string]string) (BlockchainService_SubscribeClient, runtime.ServerMetadata, error) { + var protoReq SubscribeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BlockchainService_Subscribe_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.Subscribe(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +// RegisterHttpBodyExampleServiceHandlerServer registers the http handlers for service HttpBodyExampleService to "mux". +// UnaryRPC :call HttpBodyExampleServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +func RegisterHttpBodyExampleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HttpBodyExampleServiceServer) error { + + mux.Handle("GET", pattern_HttpBodyExampleService_HelloWorld_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HttpBodyExampleService_HelloWorld_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HttpBodyExampleService_HelloWorld_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterBlockchainServiceHandlerServer registers the http handlers for service BlockchainService to "mux". +// UnaryRPC :call BlockchainServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +func RegisterBlockchainServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServiceServer) error { + + mux.Handle("GET", pattern_BlockchainService_Address_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_BlockchainService_Address_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BlockchainService_Address_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BlockchainService_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + return nil +} + +// RegisterHttpBodyExampleServiceHandlerFromEndpoint is same as RegisterHttpBodyExampleServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterHttpBodyExampleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterHttpBodyExampleServiceHandler(ctx, mux, conn) +} + +// RegisterHttpBodyExampleServiceHandler registers the http handlers for service HttpBodyExampleService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterHttpBodyExampleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterHttpBodyExampleServiceHandlerClient(ctx, mux, NewHttpBodyExampleServiceClient(conn)) +} + +// RegisterHttpBodyExampleServiceHandlerClient registers the http handlers for service HttpBodyExampleService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HttpBodyExampleServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HttpBodyExampleServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "HttpBodyExampleServiceClient" to call the correct interceptors. +func RegisterHttpBodyExampleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HttpBodyExampleServiceClient) error { + + mux.Handle("GET", pattern_HttpBodyExampleService_HelloWorld_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HttpBodyExampleService_HelloWorld_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HttpBodyExampleService_HelloWorld_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_HttpBodyExampleService_HelloWorld_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"helloworld"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_HttpBodyExampleService_HelloWorld_0 = runtime.ForwardResponseMessage +) + +// RegisterBlockchainServiceHandlerFromEndpoint is same as RegisterBlockchainServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterBlockchainServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterBlockchainServiceHandler(ctx, mux, conn) +} + +// RegisterBlockchainServiceHandler registers the http handlers for service BlockchainService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBlockchainServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBlockchainServiceHandlerClient(ctx, mux, NewBlockchainServiceClient(conn)) +} + +// RegisterBlockchainServiceHandlerClient registers the http handlers for service BlockchainService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "BlockchainServiceClient" to call the correct interceptors. +func RegisterBlockchainServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainServiceClient) error { + + mux.Handle("GET", pattern_BlockchainService_Address_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BlockchainService_Address_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BlockchainService_Address_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_BlockchainService_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_BlockchainService_Subscribe_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_BlockchainService_Subscribe_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_BlockchainService_Address_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_BlockchainService_Subscribe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subscribe"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_BlockchainService_Address_0 = runtime.ForwardResponseMessage + + forward_BlockchainService_Subscribe_0 = runtime.ForwardResponseStream +) diff --git a/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/swagger.pb.go b/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/swagger.pb.go new file mode 100644 index 0000000..4db264d --- /dev/null +++ b/template/{{.ServiceName}}/api/gen-{{.ServiceName}}/api/swagger.pb.go @@ -0,0 +1,43 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: api/swagger.proto + +package api + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +func init() { proto.RegisterFile("api/swagger.proto", fileDescriptor_5f2c20cb4d8292fe) } + +var fileDescriptor_5f2c20cb4d8292fe = []byte{ + // 234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x8e, 0xb1, 0x4e, 0xc3, 0x30, + 0x14, 0x45, 0x95, 0x06, 0x8a, 0xe4, 0x01, 0x51, 0x4f, 0xa8, 0x93, 0x61, 0xac, 0x48, 0x1c, 0xda, + 0x48, 0x54, 0xe9, 0x04, 0x3b, 0x4b, 0xff, 0xc0, 0x71, 0x9e, 0x6c, 0x23, 0xe3, 0x67, 0xd9, 0x2f, + 0x2a, 0xfc, 0x06, 0x23, 0x9f, 0xc1, 0xc0, 0xf7, 0x21, 0x19, 0x36, 0xb6, 0xa3, 0x7b, 0x74, 0x75, + 0x2f, 0x5b, 0xa9, 0xe8, 0x64, 0x3e, 0x29, 0x63, 0x20, 0xb5, 0x31, 0x21, 0x21, 0xaf, 0x55, 0x74, + 0xeb, 0xbb, 0xc2, 0xba, 0x31, 0x10, 0x9a, 0x3f, 0x2d, 0x31, 0x92, 0xc3, 0x90, 0xa5, 0x0a, 0x01, + 0x49, 0x15, 0xfe, 0xad, 0x3c, 0x7d, 0x57, 0x1f, 0x8f, 0x5f, 0x15, 0x3f, 0xb0, 0xd5, 0xf3, 0xbb, + 0x18, 0xd1, 0x79, 0x48, 0xd1, 0x2b, 0x82, 0xc6, 0xe0, 0xed, 0x0d, 0x3b, 0x57, 0x61, 0xea, 0x1e, + 0xf8, 0xb5, 0x25, 0x8a, 0x79, 0x90, 0xd2, 0x38, 0xb2, 0xf3, 0xd8, 0x6a, 0x7c, 0x95, 0xc5, 0x6c, + 0xeb, 0xfb, 0xb6, 0x5b, 0x5f, 0x7a, 0xd4, 0xca, 0x5b, 0xcc, 0x34, 0xec, 0xf7, 0xfd, 0x6e, 0xb3, + 0xa8, 0x16, 0xdb, 0x2b, 0x15, 0xa3, 0x77, 0xba, 0x6c, 0xc9, 0x97, 0x8c, 0x61, 0xf8, 0x97, 0x1c, + 0x0f, 0xac, 0xee, 0xbb, 0x9e, 0xf7, 0x6c, 0x73, 0x04, 0x9a, 0x53, 0x80, 0x49, 0x9c, 0x2c, 0x04, + 0x41, 0x16, 0x44, 0x82, 0x8c, 0x73, 0xd2, 0x20, 0x26, 0x84, 0x2c, 0x02, 0x92, 0x80, 0x37, 0x97, + 0xa9, 0xe5, 0x4b, 0x76, 0xf6, 0xb9, 0xa8, 0x2e, 0xc6, 0x65, 0xf9, 0xbf, 0xfb, 0x09, 0x00, 0x00, + 0xff, 0xff, 0xcd, 0xc1, 0xa1, 0x53, 0x07, 0x01, 0x00, 0x00, +} diff --git a/template/{{.ServiceName}}/api/swagger.proto b/template/{{.ServiceName}}/api/swagger.proto new file mode 100644 index 0000000..c175612 --- /dev/null +++ b/template/{{.ServiceName}}/api/swagger.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +import "protoc-gen-swagger/options/annotations.proto"; + +package api; + +option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { + info: { + title: "My {{.ServiceName}}" + version: "1.0" + contact: { + name: "{{.User}}" + url: "https://github.com/{{.User}}" + email: "" + }; + }; + host: "localhost:8843" + schemes: [HTTP,HTTPS] + consumes: "application/json" + produces: "application/json" + responses: { + key: "404" + value: { + description: "Returned when the resource does not exist." + schema: { + json_schema: { + type: STRING + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/template/{{.ServiceName}}/assets/.keep b/template/{{.ServiceName}}/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/template/{{.ServiceName}}/assets/README.md b/template/{{.ServiceName}}/assets/README.md new file mode 100644 index 0000000..231c571 --- /dev/null +++ b/template/{{.ServiceName}}/assets/README.md @@ -0,0 +1,3 @@ +# `/assets` + +Other assets to go along with your repository (images, logos, etc). diff --git a/template/{{.ServiceName}}/assets/swaggerui/api.swagger.json b/template/{{.ServiceName}}/assets/swaggerui/api.swagger.json new file mode 100644 index 0000000..d6524ab --- /dev/null +++ b/template/{{.ServiceName}}/assets/swaggerui/api.swagger.json @@ -0,0 +1,281 @@ +{ + "swagger": "2.0", + "info": { + "title": "My {{.ServiceName}}", + "version": "1.0", + "contact": { + "name": "{{.User}}", + "url": "https://github.com/{{.User}}" + } + }, + "host": "localhost:8843", + "schemes": [ + "http", + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/address/{address}": { + "get": { + "operationId": "BlockchainService_Address", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/apiAddressResponse" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "address", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "height", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "BlockchainService" + ] + } + }, + "/helloworld": { + "get": { + "operationId": "HttpBodyExampleService_HelloWorld", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/apiHttpBody" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "tags": [ + "HttpBodyExampleService" + ] + } + }, + "/subscribe": { + "get": { + "operationId": "BlockchainService_Subscribe", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/apiSubscribeResponse" + }, + "error": { + "$ref": "#/definitions/runtimeStreamError" + } + }, + "title": "Stream result of apiSubscribeResponse" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "query", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "BlockchainService" + ] + } + } + }, + "definitions": { + "SubscribeResponseEvent": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "apiAddressResponse": { + "type": "object", + "properties": { + "balance": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "transactions_count": { + "type": "string" + } + } + }, + "apiHttpBody": { + "type": "object", + "properties": { + "content_type": { + "type": "string", + "description": "The HTTP Content-Type header value specifying the content type of the body." + }, + "data": { + "type": "string", + "format": "byte", + "description": "The HTTP request/response body as raw binary." + }, + "extensions": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + }, + "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs." + } + }, + "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns\n (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged." + }, + "apiSubscribeResponse": { + "type": "object", + "properties": { + "query": { + "type": "string" + }, + "data": { + "type": "object" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/SubscribeResponseEvent" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "protobufNullValue": { + "type": "string", + "enum": [ + "NULL_VALUE" + ], + "default": "NULL_VALUE", + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + }, + "runtimeError": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "runtimeStreamError": { + "type": "object", + "properties": { + "grpc_code": { + "type": "integer", + "format": "int32" + }, + "http_code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "http_status": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/template/{{.ServiceName}}/assets/swaggerui/favicon-16x16.png b/template/{{.ServiceName}}/assets/swaggerui/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..8b194e617af1c135e6b37939591d24ac3a5efa18 GIT binary patch literal 665 zcmV;K0%rY*P)}JKSduyL>)s!A4EhTMMEM%Q;aL6%l#xiZiF>S;#Y{N2Zz%pvTGHJduXuC6Lx-)0EGfRy*N{Tv4i8@4oJ41gw zKzThrcRe|7J~(YYIBq{SYCkn-KQm=N8$CrEK1CcqMI1dv9z#VRL_{D)L|`QmF8}}l zJ9JV`Q}p!p_4f7m_U`WQ@apR4;o;!mnU<7}iG_qr zF(e)x9~BG-3IzcG2M4an0002kNkl41`ZiN1i62V%{PM@Ry|IS_+Yc7{bb`MM~xm(7p4|kMHP&!VGuDW4kFixat zXw43VmgwEvB$hXt_u=vZ>+v4i7E}n~eG6;n4Z=zF1n?T*yg<;W6kOfxpC6nao>VR% z?fpr=asSJ&`L*wu^rLJ5Peq*PB0;alL#XazZCBxJLd&giTfw@!hW167F^`7kobi;( ze<<>qNlP|xy7S1zl@lZNIBR7#o9ybJsptO#%}P0hz~sBp00000NkvXXu0mjfUsDF? literal 0 HcmV?d00001 diff --git a/template/{{.ServiceName}}/assets/swaggerui/favicon-32x32.png b/template/{{.ServiceName}}/assets/swaggerui/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..249737fe44558e679f0b67134e274461d988fa98 GIT binary patch literal 628 zcmV-)0*n2LP)Ma*GM0}OV<074bNCP7P7GVd{iMr*I6y~TMLss@FjvgL~HxU z%Vvj33AwpD(Z4*$Mfx=HaU16axM zt2xG_rloN<$iy9j9I5 + + + + + Swagger UI + + + + + + + +
+ + + + + + diff --git a/template/{{.ServiceName}}/assets/swaggerui/oauth2-redirect.html b/template/{{.ServiceName}}/assets/swaggerui/oauth2-redirect.html new file mode 100644 index 0000000..a013fc8 --- /dev/null +++ b/template/{{.ServiceName}}/assets/swaggerui/oauth2-redirect.html @@ -0,0 +1,68 @@ + + +Swagger UI: OAuth2 Redirect + + + + diff --git a/template/{{.ServiceName}}/assets/swaggerui/swagger-ui-bundle.js b/template/{{.ServiceName}}/assets/swaggerui/swagger-ui-bundle.js new file mode 100644 index 0000000..f314352 --- /dev/null +++ b/template/{{.ServiceName}}/assets/swaggerui/swagger-ui-bundle.js @@ -0,0 +1,134 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=492)}([function(e,t,n){"use strict";e.exports=n(104)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function i(e){return a(e)&&!c(e)?e:$(e)}function a(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=i;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m=5,v=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function O(){return!0}function A(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return I(e,t,0)}function j(e,t){return I(e,t,t)}function I(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var P=0,M=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function B(e){return!!H(e)}function z(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():a(e)?e.toSeq():function(e){var t=ue(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function K(e){return null==e?ie().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():ae(e)}function Y(e){return null==e?ie():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():se(e)}function $(e){return(null==e?ie():a(e)?s(e)?e.entrySeq():e:se(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=P,U.VALUES=M,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return ce(this,e,t,!0)},J.prototype.__iterator=function(e,t){return le(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return ce(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return le(this,e,t,!1)},t($,J),$.of=function(){return $(arguments)},$.prototype.toSetSeq=function(){return this},J.isSeq=oe,J.Keyed=K,J.Set=$,J.Indexed=Y;var G,Z,X,Q="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function re(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[Q])}function ie(){return G||(G=new ee([]))}function ae(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():B(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ue(e){return W(e)?new ee(e):z(e)?new re(e):B(e)?new ne(e):void 0}function ce(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function le(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new U(function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:q(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function pe(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,Y(n).map(function(r,o){return e(t,r,o,n)})):he(n)?t.call(o,r,K(n).map(function(r,o){return e(t,r,o,n)})):n}(t,e,"",{"":e}):fe(e)}function fe(e){return Array.isArray(e)?Y(e).map(fe).toList():he(e)?K(e).map(fe).toMap():e}function he(e){return e&&(e.constructor===Object||void 0===e.constructor)}function de(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function me(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every(function(e,t){var o=r.next().value;return o&&de(o[1],e)&&(n||de(o[0],t))})&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):o?!de(t,e.get(r,y)):!de(e.get(r,y),t))return p=!1,!1});return p&&e.size===f}function ve(e,t){if(!(this instanceof ve))return new ve(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function ge(e,t){if(!e)throw new Error(t)}function ye(e,t,n){if(!(this instanceof ye))return new ye(e,t,n);if(ge(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:q(e,o,n[t?r-o++:o++])})},t(te,K),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},te.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new U(function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:q(e,a,n[a])})},te.prototype[d]=!0,t(ne,Y),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=V(this._iterable),r=0;if(z(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=V(this._iterable);if(!z(n))return new U(F);var r=0;return new U(function(){var t=n.next();return t.done?t:q(e,r++,t.value)})},t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return q(e,o,r[o++])})},t(ve,Y),ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ve.prototype.get=function(e,t){return this.has(e)?this._value:t},ve.prototype.includes=function(e){return de(this._value,e)},ve.prototype.slice=function(e,t){var n=this.size;return A(e,t,n)?this:new ve(this._value,j(t,n)-T(e,n))},ve.prototype.reverse=function(){return this},ve.prototype.indexOf=function(e){return de(this._value,e)?0:-1},ve.prototype.lastIndexOf=function(e){return de(this._value,e)?this.size:-1},ve.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:q(e,i++,a)})},ye.prototype.equals=function(e){return e instanceof ye?this._start===e._start&&this._end===e._end&&this._step===e._step:me(this,e)},t(be,n),t(_e,be),t(we,be),t(xe,be),be.Keyed=_e,be.Indexed=we,be.Set=xe;var Ee="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Ce(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>Me?function(e){var t=De[e];return void 0===t&&(t=ke(e),Re===Ne&&(Re=0,De={}),Re++,De[e]=t),t}(e):ke(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(je&&void 0!==(t=Oe.get(e)))return t;if(void 0!==(t=e[Pe]))return t;if(!Te){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Pe]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Ie,1073741824&Ie&&(Ie=0),je)Oe.set(e,t);else{if(void 0!==Ae&&!1===Ae(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Te)Object.defineProperty(e,Pe,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Pe]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Pe]=t}}return t}(e);if("function"==typeof e.toString)return ke(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ke(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return Qe(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return Qe(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var i=t===y,a=n.next();if(a.done){var s=i?r:t,u=o(s);return u===s?t:u}ge(i||t&&t.set,"invalid keyPath");var c=a.value,l=i?y:t.get(c,y),p=e(l,n,r,o);return p===l?t:p===y?t.remove(c):(i?Xe():t).set(c,p)}(this,rn(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xe()},Ue.prototype.merge=function(){return rt(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){var n=e.call(arguments,1);return rt(this,t,n)},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return rt(this,ot,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return rt(this,it(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Tt(Jt(this,e))},Ue.prototype.sortBy=function(e,t){return Tt(Jt(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new E)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new Ye(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ze(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var Fe,Be="@@__IMMUTABLE_MAP__@@",ze=Ue.prototype;function Ve(e,t){this.ownerID=e,this.entries=t}function He(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function We(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Ke(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ye(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Ge(e._root)}function $e(e,t){return q(e,t[0],t[1])}function Ge(e,t){return{node:e,index:0,__prev:t}}function Ze(e,t,n,r){var o=Object.create(ze);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Xe(){return Fe||(Fe=Ze(0))}function Qe(e,t,n){var r,o;if(e._root){var i=w(b),a=w(_);if(r=et(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===y?-1:1:0)}else{if(n===y)return e;o=1,r=new Ve(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ze(o,r):Xe()}function et(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===y?e:(x(s),x(a),new Ke(t,r,[o,i]))}function tt(e){return e.constructor===Ke||e.constructor===Je}function nt(e,t,n,r,o){if(e.keyHash===r)return new Je(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&g,s=(0===n?r:r>>>n)&g;return new He(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function ut(e,t,n,r){var o=r?e:S(e);return o[t]=n,o}ze[Be]=!0,ze.delete=ze.remove,ze.removeIn=ze.deleteIn,Ve.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i=ct)return function(e,t,n,r){e||(e=new E);for(var o=new Ke(e,Ce(n),[n,r]),i=0;i>>e)&g),i=this.bitmap;return 0==(i&o)?r:this.nodes[st(i&o-1)].get(e+m,t,n,r)},He.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var s=(0===t?n:n>>>t)&g,u=1<=lt)return function(e,t,n,r,o){for(var i=0,a=new Array(v),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new We(e,i+1,a)}(e,f,c,s,d);if(l&&!d&&2===f.length&&tt(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&tt(d))return d;var b=e&&e===this.ownerID,_=l?d?c:c^u:c|u,w=l?d?ut(f,p,d,b):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a>>e)&g,i=this.nodes[o];return i?i.get(e+m,t,n,r):r},We.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var s=(0===t?n:n>>>t)&g,u=o===y,c=this.nodes,l=c[s];if(u&&!l)return this;var p=et(l,e,t+m,n,r,o,i,a);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&r=0&&e=e.size||t<0)return e.withMutations(function(e){t<0?kt(e,t).set(0,n):kt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,o=e._root,i=w(_);return t>=At(e._capacity)?r=Et(r,e.__ownerID,0,t,n,i):o=Et(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):wt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ft.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ft.prototype.insert=function(e,t){return this.splice(e,0,t)},ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):xt()},ft.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){kt(n,0,t+e.length);for(var r=0;r>>t&g;if(r>=this.array.length)return new vt([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-m,n))===a&&i)return this}if(i&&!o)return this;var s=St(this,e);if(!i)for(var u=0;u>>t&g;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-m,n))===i&&o===this.array.length-1)return this}var a=St(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var gt,yt,bt={};function _t(e,t){var n=e._origin,r=e._capacity,o=At(r),i=e._tail;return a(e._root,e._level,0);function a(e,s,u){return 0===s?function(e,a){var s=a===o?i&&i.array:e&&e.array,u=a>n?0:n-a,c=r-a;return c>v&&(c=v),function(){if(u===c)return bt;var e=t?--c:u++;return s&&s[e]}}(e,u):function(e,o,i){var s,u=e&&e.array,c=i>n?0:n-i>>o,l=1+(r-i>>o);return l>v&&(l=v),function(){for(;;){if(s){var e=s();if(e!==bt)return e;s=null}if(c===l)return bt;var n=t?--l:c++;s=a(u&&u[n],o-m,i+(n<>>n&g,u=e&&s0){var c=e&&e.array[s],l=Et(c,t,n-m,r,o,i);return l===c?e:((a=St(e,t)).array[s]=l,a)}return u&&e.array[s]===o?e:(x(i),a=St(e,t),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function St(e,t){return t&&e&&t===e.ownerID?e:new vt(e?e.array.slice():[],t)}function Ct(e,t){if(t>=At(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&g],r-=m;return n}}function kt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new E,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new vt(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=m);l&&(a+=l,o+=l,s+=l,i+=l);for(var p=At(i),f=At(s);f>=1<p?new vt([],r):h;if(h&&f>p&&am;y-=m){var b=p>>>y&g;v=v.array[b]=St(v.array[b],r)}v.array[p>>>m&g]=h}if(s=f)a-=f,s-=f,u=m,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||f>>u&g;if(_!==f>>>u&g)break;_&&(l+=(1<o&&(c=c.removeBefore(r,u,a-l)),c&&fi&&(i=c.size),a(u)||(c=c.map(function(e){return pe(e)})),r.push(c)}return i>e.size&&(e=e.setSize(i)),at(e,t,r)}function At(e){return e>>m<=v&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):It(r,o)}function Nt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Rt(e){this._iter=e,this.size=e.size}function Dt(e){this._iter=e,this.size=e.size}function Lt(e){this._iter=e,this.size=e.size}function Ut(e){var t=en(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=tn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===N){var r=e.__iterator(t,n);return new U(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===M?P:M,n)},t}function qt(e,t,n){var r=en(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,y);return i===y?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate(function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)},o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(N,o);return new U(function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return q(r,s,t.call(n,a[1],s,e),o)})},r}function Ft(e,t){var n=en(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Ut(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=tn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Bt(e,t,n,r){var o=en(e);return r&&(o.has=function(r){var o=e.get(r,y);return o!==y&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,y);return i!==y&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate(function(e,i,u){if(t.call(n,e,i,u))return s++,o(e,r?i:s-1,a)},i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(N,i),s=0;return new U(function(){for(;;){var i=a.next();if(i.done)return i;var u=i.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return q(o,r?c:s++,l,i)}})},o}function zt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),A(t,n,o))return e;var i=T(t,o),a=j(n,o);if(i!=i||a!=a)return zt(e.toSeq().cacheResult(),t,n,r);var s,u=a-i;u==u&&(s=u<0?0:u);var c=en(e);return c.size=0===s?s:e.size&&s||void 0,!r&&oe(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&ts)return{value:void 0,done:!0};var e=o.next();return r||t===M?e:q(t,u-1,t===P?void 0:e.value[1],e)})},c}function Vt(e,t,n,r){var o=en(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,u=0;return e.__iterate(function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return u++,o(e,r?i:u-1,a)}),u},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(N,i),u=!0,c=0;return new U(function(){var e,i,l;do{if((e=s.next()).done)return r||o===M?e:q(o,c++,o===P?void 0:e.value[1],e);var p=e.value;i=p[0],l=p[1],u&&(u=t.call(n,l,i,a))}while(u);return o===N?e:q(o,i,l,e)})},o}function Ht(e,t){var n=s(e),o=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?ae(e):se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&s(i)||u(e)&&u(i))return i}var c=new ee(o);return n?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function Wt(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var i=0,s=!1;return function e(u,c){var l=this;u.__iterate(function(o,u){return(!t||c0}function $t(e,t,r){var o=en(e);return o.size=new ee(r).map(function(e){return e.size}).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map(function(e){return e=n(e),V(o?e.reverse():e)}),a=0,s=!1;return new U(function(){var n;return s||(n=i.map(function(e){return e.next()}),s=n.some(function(e){return e.done})),s?{value:void 0,done:!0}:q(e,a++,t.apply(null,n.map(function(e){return e.value})))})},o}function Gt(e,t){return oe(e)?t:e.constructor(t)}function Zt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xt(e){return Le(e.size),C(e)}function Qt(e){return s(e)?r:u(e)?o:i}function en(e){return Object.create((s(e)?K:u(e)?Y:$).prototype)}function tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function nn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):An(e,t)},En.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):An(t,n)},En.prototype.pop=function(){return this.slice(1)},En.prototype.unshift=function(){return this.push.apply(this,arguments)},En.prototype.unshiftAll=function(e){return this.pushAll(e)},En.prototype.shift=function(){return this.pop.apply(this,arguments)},En.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},En.prototype.slice=function(e,t){if(A(e,t,this.size))return this;var n=T(e,this.size);if(j(t,this.size)!==this.size)return we.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):An(r,o)},En.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},En.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},En.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new U(function(){if(r){var t=r.value;return r=r.next,q(e,n++,t)}return{value:void 0,done:!0}})},En.isStack=Sn;var Cn,kn="@@__IMMUTABLE_STACK__@@",On=En.prototype;function An(e,t,n,r){var o=Object.create(On);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return Cn||(Cn=An(0))}function jn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}On[kn]=!0,On.withMutations=ze.withMutations,On.asMutable=ze.asMutable,On.asImmutable=ze.asImmutable,On.wasAltered=ze.wasAltered,n.Iterator=U,jn(n,{toArray:function(){Le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Rt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Nt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Tt(this.toKeyedSeq())},toOrderedSet:function(){return gn(s(this)?this.valueSeq():this)},toSet:function(){return cn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Dt(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(s(this)?this.valueSeq():this)},toList:function(){return ft(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Gt(this,Ht(this,t))},includes:function(e){return this.some(function(t){return de(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Le(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1}),n},filter:function(e,t){return Gt(this,Bt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(P)},map:function(e,t){return Gt(this,qt(this,e,t))},reduce:function(e,t,n){var r,o;return Le(this.size),arguments.length<2?o=!0:r=t,this.__iterate(function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Gt(this,Ft(this,!0))},slice:function(e,t){return Gt(this,zt(this,e,t,!0))},some:function(e,t){return!this.every(Rn(e),t)},sort:function(e){return Gt(this,Jt(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Ue().asMutable();return e.__iterate(function(o,i){r.update(t.call(n,o,i,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return me(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ee(e._cache);var t=e.toSeq().map(Nn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Rn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(O)},flatMap:function(e,t){return Gt(this,function(e,t,n){var r=Qt(e);return e.toSeq().map(function(o,i){return r(t.call(n,o,i,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return Gt(this,Wt(this,e,!0))},fromEntrySeq:function(){return new Lt(this)},get:function(e,t){return this.find(function(t,n){return de(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,o=rn(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,y):y)===y)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),o=(l(e)?Tt():Ue()).asMutable();e.__iterate(function(i,a){o.update(t.call(n,i,a,e),function(e){return(e=e||[]).push(r?[a,i]:i),e})});var i=Qt(e);return o.map(function(t){return Gt(e,i(t))})}(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return de(t,e)})},keySeq:function(){return this.toSeq().map(Mn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Kt(this,e)},maxBy:function(e,t){return Kt(this,t,e)},min:function(e){return Kt(this,e?Dn(e):qn)},minBy:function(e,t){return Kt(this,t?Dn(t):qn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Gt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Gt(this,Vt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Rn(e),t)},sortBy:function(e,t){return Gt(this,Jt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Gt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Gt(this,function(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate(function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(N,o),s=!0;return new U(function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,u=o[0],c=o[1];return t.call(n,c,u,i)?r===N?e:q(r,u,c,e):(s=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Rn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return function(e,t){return t=Ee(t,3432918353),t=Ee(t<<15|t>>>-15,461845907),t=Ee(t<<13|t>>>-13,5),t=Ee((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Se((t=Ee(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+Fn(Ce(e),Ce(t))|0}:function(e,t){r=r+Fn(Ce(e),Ce(t))|0}:t?function(e){r=31*r+Ce(e)|0}:function(e){r=r+Ce(e)|0}),r)}(this))}});var In=n.prototype;In[p]=!0,In[L]=In.values,In.__toJS=In.toArray,In.__toStringMapper=Ln,In.inspect=In.toSource=function(){return this.toString()},In.chain=In.flatMap,In.contains=In.includes,jn(r,{flip:function(){return Gt(this,Ut(this))},mapEntries:function(e,t){var n=this,r=0;return Gt(this,this.toSeq().map(function(o,i){return e.call(t,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Gt(this,this.toSeq().flip().map(function(r,o){return e.call(t,r,o,n)}).flip())}});var Pn=r.prototype;function Mn(e,t){return t}function Nn(e,t){return[t,e]}function Rn(e){return function(){return!e.apply(this,arguments)}}function Dn(e){return function(){return-e.apply(this,arguments)}}function Ln(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Un(){return S(arguments)}function qn(e,t){return et?-1:0}function Fn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Pn[f]=!0,Pn[L]=In.entries,Pn.__toJS=In.toObject,Pn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Ln(e)},jn(o,{toKeyedSeq:function(){return new Nt(this,!1)},filter:function(e,t){return Gt(this,Bt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Gt(this,Ft(this,!1))},slice:function(e,t){return Gt(this,zt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return Gt(this,1===n?r:r.concat(S(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Gt(this,Wt(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e5e3)return e.textContent;return function(e){for(var n,r,o,i,a,s=e.textContent,u=0,c=s[0],l=1,p=e.innerHTML="",f=0;r=n,n=f<7&&"\\"==n?1:l;){if(l=c,c=s[++u],i=p.length>1,!l||f>8&&"\n"==l||[/\S/.test(l),1,1,!/[$\w]/.test(l),("/"==n||"\n"==n)&&i,'"'==n&&i,"'"==n&&i,s[u-4]+r+n=="--\x3e",r+n=="*/"][f])for(p&&(e.appendChild(a=t.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][f?f<3?2:f>6?4:f>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/.test(p):0]),a.appendChild(t.createTextNode(p))),o=f&&f<7?f:o,p="",f=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/.test(l),/[\])]/.test(l),/[$\w]/.test(l),"/"==l&&o<2&&"<"!=n,'"'==l,"'"==l,l+c+s[u+1]+s[u+2]=="\x3c!--",l+c=="/*",l+c=="//","#"==l][--f];);p+=l}}(e)}function Q(e){var t;if([/filename\*=[^']+'\w*'"([^"]+)";?/i,/filename\*=[^']+'\w*'([^;]+);?/i,/filename="([^;]*);?"/i,/filename=([^;]*);?/i].some(function(n){return null!==(t=n.exec(e))}),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function ee(e){return t=e.replace(/\.[^.\/]*$/,""),b()(g()(t));var t}var te=function(e,t){if(e>t)return"Value must be less than Maximum"},ne=function(e,t){if(et)return"Value must be less than MaxLength"},pe=function(e,t){if(e.length2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,i=n.bypassRequiredCheck,a=void 0!==i&&i,s=[],u=e.get("required"),c=Object(I.a)(e,{isOAS3:o}),p=c.schema,h=c.parameterContentMediaType;if(!p)return s;var m=p.get("required"),v=p.get("maximum"),g=p.get("minimum"),y=p.get("type"),b=p.get("format"),_=p.get("maxLength"),w=p.get("minLength"),x=p.get("pattern");if(y&&(u||m||t)){var E="string"===y&&t,S="array"===y&&l()(t)&&t.length,C="array"===y&&d.a.List.isList(t)&&t.count(),k="array"===y&&"string"==typeof t&&t,O="file"===y&&t instanceof A.a.File,T="boolean"===y&&(t||!1===t),j="number"===y&&(t||0===t),P="integer"===y&&(t||0===t),M="object"===y&&"object"===f()(t)&&null!==t,N="object"===y&&"string"==typeof t&&t,R=[E,S,C,k,O,T,j,P,M,N],D=R.some(function(e){return!!e});if((u||m)&&!D&&!a)return s.push("Required field is not provided"),s;if("object"===y&&"string"==typeof t&&(null===h||"application/json"===h))try{JSON.parse(t)}catch(e){return s.push("Parameter string value must be valid JSON"),s}if(x){var L=fe(t,x);L&&s.push(L)}if(_||0===_){var U=le(t,_);U&&s.push(U)}if(w){var q=pe(t,w);q&&s.push(q)}if(v||0===v){var F=te(t,v);F&&s.push(F)}if(g||0===g){var B=ne(t,g);B&&s.push(B)}if("string"===y){var z;if(!(z="date-time"===b?ue(t):"uuid"===b?ce(t):se(t)))return s;s.push(z)}else if("boolean"===y){var V=ae(t);if(!V)return s;s.push(V)}else if("number"===y){var H=re(t);if(!H)return s;s.push(H)}else if("integer"===y){var W=oe(t);if(!W)return s;s.push(W)}else if("array"===y){var J;if(!C||!t.count())return s;J=p.getIn(["items","type"]),t.forEach(function(e,t){var n;"number"===J?n=re(e):"integer"===J?n=oe(e):"string"===J&&(n=se(e)),n&&s.push({index:t,error:n})})}else if("file"===y){var K=ie(t);if(!K)return s;s.push(K)}}return s},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(/xml/.test(t)){if(!e.xml||!e.xml.name){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(k.memoizedCreateXMLExample)(e,n)}var i=Object(k.memoizedSampleFromSchema)(e,n);return"object"===f()(i)?o()(i,null,2):i},me=function(){var e={},t=A.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)n.hasOwnProperty(r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},ve=function(t){return(t instanceof e?t:new e(t.toString(),"utf-8")).toString("base64")},ge={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},ye=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},be=function(e,t,n){return!!E()(n,function(n){return C()(e[n],t[n])})};function _e(e){return"string"!=typeof e||""===e?"":Object(m.sanitizeUrl)(e)}function we(e){if(!d.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=e.find(function(e,t){return t.startsWith("2")&&u()(e.get("content")||{}).length>0}),n=e.get("default")||d.a.OrderedMap(),r=(n.get("content")||d.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var xe=function(e){return"string"==typeof e||e instanceof String?e.trim().replace(/\s/g,"%20"):""},Ee=function(e){return j()(xe(e).replace(/%20/g,"_"))},Se=function(e){return e.filter(function(e,t){return/^x-/.test(t)})},Ce=function(e){return e.filter(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)})};function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==f()(e)||l()(e)||null===e||!t)return e;var r=a()({},e);return u()(r).forEach(function(e){e===t&&n(r[e],e)?delete r[e]:r[e]=ke(r[e],t,n)}),r}function Oe(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===f()(e)&&null!==e)try{return o()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function Ae(e){return"number"==typeof e?e.toString():e}function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,i=void 0===o||o;if(!d.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var a=e.get("name"),s=e.get("in"),u=[];return e&&e.hashCode&&s&&a&&i&&u.push("".concat(s,".").concat(a,".hash-").concat(e.hashCode())),s&&a&&u.push("".concat(s,".").concat(a)),u.push(a),r?u:u[0]||""}function je(e,t){return Te(e,{returnAll:!0}).map(function(e){return t[e]}).filter(function(e){return void 0!==e})[0]}function Ie(){return Me(M()(32).toString("base64"))}function Pe(e){return Me(R()("sha256").update(e).digest("base64"))}function Me(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}}).call(this,n(64).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(54);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(t,n,arguments)||(i=e.apply(null,arguments)),n=arguments,i}})},function(e,t,n){var r=n(756),o=n(757),i=n(763);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){var r=n(599),o=n(600),i=n(603);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){e.exports=n(573)},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,s,u){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,o,i,a,s,u],p=0;(c=new Error(t.replace(/%s/g,function(){return l[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){e.exports=n(577)},function(e,t,n){e.exports=n(557)},function(e,t){e.exports=function(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;for(var t=0,n=["File","Blob","FormData"];t>",i={listOf:function(e){return c(e,"List",r.List.isList)},mapOf:function(e,t){return l(e,t,"Map",r.Map.isMap)},orderedMapOf:function(e,t){return l(e,t,"OrderedMap",r.OrderedMap.isOrderedMap)},setOf:function(e){return c(e,"Set",r.Set.isSet)},orderedSetOf:function(e){return c(e,"OrderedSet",r.OrderedSet.isOrderedSet)},stackOf:function(e){return c(e,"Stack",r.Stack.isStack)},iterableOf:function(e){return c(e,"Iterable",r.Iterable.isIterable)},recordOf:function(e){return s(function(t,n,o,i,s){for(var u=arguments.length,c=Array(u>5?u-5:0),l=5;l6?u-6:0),l=6;l5?c-5:0),p=5;p5?i-5:0),s=5;s key("+l[p]+")"].concat(a));if(h instanceof Error)return h}})).apply(void 0,i);var u})}function p(e){var t=void 0===arguments[1]?"Iterable":arguments[1],n=void 0===arguments[2]?r.Iterable.isIterable:arguments[2];return s(function(r,o,i,s,u){for(var c=arguments.length,l=Array(c>5?c-5:0),p=5;p4)}function u(e){var t=e.get("swagger");return"string"==typeof t&&t.startsWith("2.0")}function c(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?s(n.specSelectors.specJson())?a.a.createElement(e,o()({},r,n,{Ori:t})):a.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c0){var o=n.map(function(e){return console.error(e),e.line=e.fullPath?g(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",A()(e,"message",{enumerable:!0,value:e.message}),e});i.newThrownErrBatch(o)}return r.updateResolved(t)})}},_e=[],we=V()(k()(S.a.mark(function e(){var t,n,r,o,i,a,s,u,c,l,p,f,h,d,m,v,g;return S.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=_e.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,i=o.resolveSubtree,a=o.AST,s=void 0===a?{}:a,u=t.specSelectors,c=t.specActions,i){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return l=s.getLineNumberForPath?s.getLineNumberForPath:function(){},p=u.specStr(),f=t.getConfigs(),h=f.modelPropertyMacro,d=f.parameterMacro,m=f.requestInterceptor,v=f.responseInterceptor,e.prev=11,e.next=14,_e.reduce(function(){var e=k()(S.a.mark(function e(t,o){var a,s,c,f,g,y,b;return S.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return a=e.sent,s=a.resultMap,c=a.specWithCurrentSubtrees,e.next=7,i(c,o,{baseDoc:u.url(),modelPropertyMacro:h,parameterMacro:d,requestInterceptor:m,responseInterceptor:v});case 7:return f=e.sent,g=f.errors,y=f.spec,r.allErrors().size&&n.clearBy(function(e){return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!e.get("fullPath").every(function(e,t){return e===o[t]||void 0===o[t]})}),j()(g)&&g.length>0&&(b=g.map(function(e){return e.line=e.fullPath?l(p,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",A()(e,"message",{enumerable:!0,value:e.message}),e}),n.newThrownErrBatch(b)),W()(s,o,y),W()(c,o,y),e.abrupt("return",{resultMap:s,specWithCurrentSubtrees:c});case 15:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),x.a.resolve({resultMap:(u.specResolvedSubtree([])||Object(R.Map)()).toJS(),specWithCurrentSubtrees:u.specJson().toJS()}));case 14:g=e.sent,delete _e.system,_e=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:c.updateResolvedSubtree([],g.resultMap);case 23:case"end":return e.stop()}},e,null,[[11,19]])})),35),xe=function(e){return function(t){_e.map(function(e){return e.join("@@")}).indexOf(e.join("@@"))>-1||(_e.push(e),_e.system=t,we())}};function Ee(e,t,n,r,o){return{type:X,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function Se(e,t,n,r){return{type:X,payload:{path:e,param:t,value:n,isXml:r}}}var Ce=function(e,t){return{type:le,payload:{path:e,value:t}}},ke=function(){return{type:le,payload:{path:[],value:Object(R.Map)()}}},Oe=function(e,t){return{type:ee,payload:{pathMethod:e,isOAS3:t}}},Ae=function(e,t,n,r){return{type:Q,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Te(e){return{type:se,payload:{pathMethod:e}}}function je(e,t){return{type:ue,payload:{path:e,value:t,key:"consumes_value"}}}function Ie(e,t){return{type:ue,payload:{path:e,value:t,key:"produces_value"}}}var Pe=function(e,t,n){return{payload:{path:e,method:t,res:n},type:te}},Me=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ne}},Ne=function(e,t,n){return{payload:{path:e,method:t,req:n},type:re}},Re=function(e){return{payload:e,type:oe}},De=function(e){return function(t){var n=t.fn,r=t.specActions,o=t.specSelectors,i=t.getConfigs,a=t.oas3Selectors,s=e.pathName,u=e.method,c=e.operation,l=i(),p=l.requestInterceptor,f=l.responseInterceptor,h=c.toJS();if(c&&c.get("parameters")&&c.get("parameters").filter(function(e){return e&&!0===e.get("allowEmptyValue")}).forEach(function(t){if(o.parameterInclusionSettingFor([s,u],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(J.C)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}),e.contextUrl=L()(o.url()).toString(),h&&h.operationId?e.operationId=h.operationId:h&&s&&u&&(e.operationId=n.opId(h,s,u)),o.isOAS3()){var d="".concat(s,":").concat(u);e.server=a.selectedServer(d)||a.selectedServer();var m=a.serverVariables({server:e.server,namespace:d}).toJS(),g=a.serverVariables({server:e.server}).toJS();e.serverVariables=_()(m).length?m:g,e.requestContentType=a.requestContentType(s,u),e.responseContentType=a.responseContentType(s,u)||"*/*";var b=a.requestBodyValue(s,u);Object(J.t)(b)?e.requestBody=JSON.parse(b):b&&b.toJS?e.requestBody=b.toJS():e.requestBody=b}var w=y()({},e);w=n.buildRequest(w),r.setRequest(e.pathName,e.method,w);e.requestInterceptor=function(t){var n=p.apply(this,[t]),o=y()({},n);return r.setMutatedRequest(e.pathName,e.method,o),n},e.responseInterceptor=f;var x=v()();return n.execute(e).then(function(t){t.duration=v()()-x,r.setResponse(e.pathName,e.method,t)}).catch(function(t){console.error(t),r.setResponse(e.pathName,e.method,{error:!0,err:q()(t)})})}},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=d()(e,["path","method"]);return function(e){var o=e.fn.fetch,i=e.specSelectors,a=e.specActions,s=i.specJsonWithResolvedSubtrees().toJS(),u=i.operationScheme(t,n),c=i.contentTypeValues([t,n]).toJS(),l=c.requestContentType,p=c.responseContentType,f=/xml/i.test(l),h=i.parameterValues([t,n],f).toJS();return a.executeRequest(Y({},r,{fetch:o,spec:s,pathName:t,method:n,parameters:h,requestContentType:l,scheme:u,responseContentType:p}))}};function Ue(e,t){return{type:ie,payload:{path:e,method:t}}}function qe(e,t){return{type:ae,payload:{path:e,method:t}}}function Fe(e,t,n){return{type:pe,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){var r=n(32),o=n(22),i=n(63),a=n(77),s=n(75),u=function(e,t,n){var c,l,p,f=e&u.F,h=e&u.G,d=e&u.S,m=e&u.P,v=e&u.B,g=e&u.W,y=h?o:o[t]||(o[t]={}),b=y.prototype,_=h?r:d?r[t]:(r[t]||{}).prototype;for(c in h&&(n=t),n)(l=!f&&_&&void 0!==_[c])&&s(y,c)||(p=l?_[c]:n[c],y[c]=h&&"function"!=typeof _[c]?n[c]:v&&l?i(p,r):g&&_[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):m&&"function"==typeof p?i(Function.call,p):p,m&&((y.virtual||(y.virtual={}))[c]=p,e&u.R&&b&&!b[c]&&a(b,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){"use strict";var r=n(138),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(198)("wks"),o=n(200),i=n(41).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(215)("wks"),o=n(159),i=n(32).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(41),o=n(72),i=n(81),a=n(97),s=n(153),u=function(e,t,n){var c,l,p,f,h=e&u.F,d=e&u.G,m=e&u.S,v=e&u.P,g=e&u.B,y=d?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=d?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=t),n)p=((l=!h&&y&&void 0!==y[c])?y:n)[c],f=g&&l?s(p,r):v&&"function"==typeof p?s(Function.call,p):p,y&&a(y,c,p,e&u.U),b[c]!=p&&i(b,c,f),v&&_[c]!=p&&(_[c]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return!!e&&r.call(e,t)}var i=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var u=/&([a-z#][a-z0-9]{1,31});/gi,c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(467);function p(e,t){var n=0;return o(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(n):e}var f=/[&<>"]/,h=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function m(e){return d[e]}t.assign=function(e){return[].slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")},t.isValidEntityCode=a,t.fromCodePoint=s,t.replaceEntities=function(e){return e.indexOf("&")<0?e:e.replace(u,p)},t.escapeHtml=function(e){return f.test(e)?e.replace(h,m):e}},function(e,t,n){var r=n(55),o=n(772);e.exports=function(e,t){if(null==e)return{};var n,i,a=o(e,t);if(r){var s=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(35),o=n(99),i=n(73),a=/"/g,s=function(e,t,n,r){var o=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",function(){return i}),n.d(t,"NEW_THROWN_ERR_BATCH",function(){return a}),n.d(t,"NEW_SPEC_ERR",function(){return s}),n.d(t,"NEW_SPEC_ERR_BATCH",function(){return u}),n.d(t,"NEW_AUTH_ERR",function(){return c}),n.d(t,"CLEAR",function(){return l}),n.d(t,"CLEAR_BY",function(){return p}),n.d(t,"newThrownErr",function(){return f}),n.d(t,"newThrownErrBatch",function(){return h}),n.d(t,"newSpecErr",function(){return d}),n.d(t,"newSpecErrBatch",function(){return m}),n.d(t,"newAuthErr",function(){return v}),n.d(t,"clear",function(){return g}),n.d(t,"clearBy",function(){return y});var r=n(119),o=n.n(r),i="err_new_thrown_err",a="err_new_thrown_err_batch",s="err_new_spec_err",u="err_new_spec_err_batch",c="err_new_auth_err",l="err_clear",p="err_clear_by";function f(e){return{type:i,payload:o()(e)}}function h(e){return{type:a,payload:e}}function d(e){return{type:s,payload:e}}function m(e){return{type:u,payload:e}}function v(e){return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l,payload:e}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}}},function(e,t,n){var r=n(98);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(43);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(64),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r=n(46),o=n(350),i=n(219),a=Object.defineProperty;t.f=n(50)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(82)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(369),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports={debugTool:null}},function(e,t,n){e.exports=n(575)},function(e,t,n){e.exports=n(771)},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(e,t){e.exports=n(17)},function(e,t){e.exports=n(14)},function(e,t){e.exports=n(26)},function(e,t){e.exports=n(16)},function(e,t){e.exports=n(123)},function(e,t){e.exports=n(60)},function(e,t){e.exports=n(61)},function(e,t){e.exports=n(55)},function(e,t){e.exports=n(2)},function(e,t){e.exports=n(54)},function(e,t){e.exports=n(94)},function(e,t){e.exports=n(28)},function(e,t){e.exports=n(931)},function(e,t){e.exports=n(12)},function(e,t){e.exports=n(192)},function(e,t){e.exports=n(937)},function(e,t){e.exports=n(93)},function(e,t){e.exports=n(193)},function(e,t){e.exports=n(940)},function(e,t){e.exports=n(944)},function(e,t){e.exports=n(945)},function(e,t){e.exports=n(13)},function(e,t){e.exports=n(146)},function(e,t){e.exports=n(92)},function(e,t){e.exports=n(351)},function(e,t){e.exports=n(356)},function(e,t){e.exports=n(409)},function(e,t){e.exports=n(4)},function(e,t){e.exports=n(5)},function(e,t){e.exports=n(947)},function(e,t){e.exports=n(425)},function(e,t){e.exports=n(950)},function(e,t){e.exports=n(52)},function(e,t){e.exports=n(64)},function(e,t){e.exports=n(284)},function(e,t){e.exports=n(273)},function(e,t){e.exports=n(951)},function(e,t){e.exports=n(145)},function(e,t){e.exports=n(952)},function(e,t){e.exports=n(960)},function(e,t){e.exports=n(961)},function(e,t){e.exports=n(962)},function(e,t){e.exports=n(40)},function(e,t){e.exports=n(265)},function(e,t){e.exports=n(37)},function(e,t){e.exports=n(965)},function(e,t){e.exports=n(966)},function(e,t){e.exports=n(967)},function(e,t,n){e.exports=n(53)},function(e,t){e.exports=n(968)},function(e,t){e.exports=n(969)},function(e,t){e.exports=n(970)},function(e,t){e.exports=n(971)},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"path",function(){return Cn}),n.d(r,"query",function(){return kn}),n.d(r,"header",function(){return An}),n.d(r,"cookie",function(){return Tn});var o=n(9),i=n.n(o),a=n(10),s=n.n(a),u=n(5),c=n.n(u),l=n(6),p=n.n(l),f=n(7),h=n.n(f),d=n(0),m=n.n(d),v=n(8),g=n.n(v),y=(n(49),n(15)),b=n.n(y),_=n(20),w=n.n(_),x=n(12),E=n.n(x),S=n(4),C=n.n(S),k=n(21),O=n.n(k),A=n(11),T=n.n(A),j=n(2),I=n.n(j),P=n(1),M=n.n(P),N=n(17),R=n.n(N),D=(n(50),n(29)),L=n.n(D),U=n(22),q=n.n(U),F=n(34),B=n.n(F),z={serializeRes:J,mergeInQueryOrForm:Z};function V(e){return H.apply(this,arguments)}function H(){return(H=R()(C.a.mark(function e(t){var n,r,o,i,a,s=arguments;return C.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},"object"===I()(t)&&(t=(n=t).url),n.headers=n.headers||{},z.mergeInQueryOrForm(n),n.headers&&m()(n.headers).forEach(function(e){var t=n.headers[e];"string"==typeof t&&(n.headers[e]=t.replace(/\n+/g," "))}),!n.requestInterceptor){e.next=12;break}return e.next=8,n.requestInterceptor(n);case 8:if(e.t0=e.sent,e.t0){e.next=11;break}e.t0=n;case 11:n=e.t0;case 12:return r=n.headers["content-type"]||n.headers["Content-Type"],/multipart\/form-data/i.test(r)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]),e.prev=14,e.next=17,(n.userFetch||fetch)(n.url,n);case 17:return o=e.sent,e.next=20,z.serializeRes(o,t,n);case 20:if(o=e.sent,!n.responseInterceptor){e.next=28;break}return e.next=24,n.responseInterceptor(o);case 24:if(e.t1=e.sent,e.t1){e.next=27;break}e.t1=o;case 27:o=e.t1;case 28:e.next=38;break;case 30:if(e.prev=30,e.t2=e.catch(14),o){e.next=34;break}throw e.t2;case 34:throw(i=new Error(o.statusText)).statusCode=i.status=o.status,i.responseError=e.t2,i;case 38:if(o.ok){e.next=43;break}throw(a=new Error(o.statusText)).statusCode=a.status=o.status,a.response=o,a;case 43:return e.abrupt("return",o);case 44:case"end":return e.stop()}},e,null,[[14,30]])}))).apply(this,arguments)}var W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function J(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loadSpec,r=void 0!==n&&n,o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:K(e.headers)},i=o.headers["content-type"],a=r||W(i);return(a?e.text:e.blob||e.buffer).call(e).then(function(e){if(o.text=e,o.data=e,a)try{var t=function(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):q.a.safeLoad(e)}(e,i);o.body=t,o.obj=t}catch(e){o.parseError=e}return o})}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,n){void 0!==t[n]?(t[n]=M()(t[n])?t[n]:[t[n]],t[n].push(e)):t[n]=e}),t):t}function Y(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==I()(e)||"string"!=typeof e.uri):"undefined"!=typeof File?e instanceof File:null!==e&&"object"===I()(e)&&"function"==typeof e.pipe}function $(e,t){var n=e.collectionFormat,r=e.allowEmptyValue,o="object"===I()(e)?e.value:e;if(void 0===o&&r)return"";if(Y(o)||"boolean"==typeof o)return o;var i=encodeURIComponent;return t&&(i=B()(o)?function(e){return e}:function(e){return T()(e)}),"object"!==I()(o)||M()(o)?M()(o)?M()(o)&&!n?o.map(i).join(","):"multi"===n?o.map(i):o.map(i).join({csv:",",ssv:"%20",tsv:"%09",pipes:"|"}[n]):i(o):""}function G(e){var t=m()(e).reduce(function(t,n){var r,o=e[n],i=!!o.skipEncoding,a=i?n:encodeURIComponent(n),s=(r=o)&&"object"===I()(r)&&!M()(o);return t[a]=$(s?o:{value:o},i),t},{});return L.a.stringify(t,{encode:!1,indices:!1})||""}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?"":t,o=e.query,i=e.form;if(i){var a=m()(i).some(function(e){return Y(i[e].value)}),s=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(s)){var u=n(51);e.body=new u,m()(i).forEach(function(t){e.body.append(t,$(i[t],!0))})}else e.body=G(i);delete e.form}if(o){var c=r.split("?"),l=O()(c,2),p=l[0],f=l[1],h="";if(f){var d=L.a.parse(f);m()(o).forEach(function(e){return delete d[e]}),h=L.a.stringify(d,{encode:!0})}var v=function(){for(var e=arguments.length,t=new Array(e),n=0;n0){var o=t(e,n[n.length-1],n);o&&(r=r.concat(o))}if(M()(e)){var i=e.map(function(e,r){return Ie(e,t,n.concat(r))});i&&(r=r.concat(i))}else if(Re(e)){var a=m()(e).map(function(r){return Ie(e[r],t,n.concat(r))});a&&(r=r.concat(a))}return r=Me(r)}function Pe(e){return M()(e)?e:[e]}function Me(e){var t;return(t=[]).concat.apply(t,be()(e.map(function(e){return M()(e)?Me(e):e})))}function Ne(e){return e.filter(function(e){return void 0!==e})}function Re(e){return e&&"object"===I()(e)}function De(e){return e&&"function"==typeof e}function Le(e){if(Fe(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function Ue(e){return Le(e)||Fe(e)&&"mutation"===e.type}function qe(e){return Ue(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function Fe(e){return e&&"object"===I()(e)}function Be(e,t){try{return we.a.getValueByPointer(e,t)}catch(e){return console.error(e),{}}}var ze=n(38),Ve=n.n(ze),He=n(39),We=n(31),Je=n.n(We);function Ke(e,t){function n(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,n=new Array(e),r=0;r-1&&-1===Ze.indexOf(n)||Xe.indexOf(r)>-1||Qe.some(function(e){return r.indexOf(e)>-1})}function tt(e,t){var n=e.split("#"),r=O()(n,2),o=r[0],i=r[1],a=E.a.resolve(o||"",t||"");return i?"".concat(a,"#").concat(i):a}var nt="application/json, application/yaml",rt=new RegExp("^([a-z]+://|//)","i"),ot=Ke("JSONRefError",function(e,t,n){this.originalError=n,pe()(this,t||{})}),it={},at=new Ve.a,st=[function(e){return"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7]},function(e){return"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6]}],ut={key:"$ref",plugin:function(e,t,n,r){var o=r.getInstance(),i=n.slice(0,-1);if(!et(i)&&(a=i,!st.some(function(e){return e(a)}))){var a,s=r.getContext(n).baseDoc;if("string"!=typeof e)return new ot("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:s,fullPath:n});var u,c,l,p=ht(e),f=p[0],h=p[1]||"";try{u=s||f?pt(f,s):null}catch(t){return ft(t,{pointer:h,$ref:e,basePath:u,fullPath:n})}if(function(e,t,n,r){var o=at.get(r);o||(o={},at.set(r,o));var i=function(e){if(0===e.length)return"";return"/".concat(e.map(bt).join("/"))}(n),a="".concat(t||"","#").concat(e),s=i.replace(/allOf\/\d+\/?/g,""),u=r.contextTree.get([]).baseDoc;if(t==u&&wt(s,e))return!0;var c="";if(n.some(function(e){return c="".concat(c,"/").concat(bt(e)),o[c]&&o[c].some(function(e){return wt(e,a)||wt(a,e)})}))return!0;o[s]=(o[s]||[]).concat(a)}(h,u,i,r)&&!o.useCircularStructures){var d=tt(e,u);return e===d?null:ke.replace(n,d)}if(null==u?(l=gt(h),void 0===(c=r.get(l))&&(c=new ot("Could not resolve reference: ".concat(e),{pointer:h,$ref:e,baseDoc:s,fullPath:n}))):c=null!=(c=dt(u,h)).__value?c.__value:c.catch(function(t){throw ft(t,{pointer:h,$ref:e,baseDoc:s,fullPath:n})}),c instanceof Error)return[ke.remove(n),c];var v=tt(e,u),g=ke.replace(i,c,{$$ref:v});if(u&&u!==s)return[g,ke.context(i,{baseDoc:u})];try{if(!function(e,t){var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),function e(t){return ke.isObject(t)&&(n.indexOf(t)>=0||m()(t).some(function(n){return e(t[n])}))}(t.value)}(r.state,g)||o.useCircularStructures)return g}catch(e){return null}}}},ct=pe()(ut,{docCache:it,absoluteify:pt,clearCache:function(e){void 0!==e?delete it[e]:m()(it).forEach(function(e){delete it[e]})},JSONRefError:ot,wrapError:ft,getDoc:mt,split:ht,extractFromDoc:dt,fetchJSON:function(e){return Object(He.fetch)(e,{headers:{Accept:nt},loadSpec:!0}).then(function(e){return e.text()}).then(function(e){return q.a.safeLoad(e)})},extract:vt,jsonPointerToArray:gt,unescapeJsonPointerToken:yt}),lt=ct;function pt(e,t){if(!rt.test(e)){if(!t)throw new ot("Tried to resolve a relative URL, without having a basePath. path: '".concat(e,"' basePath: '").concat(t,"'"));return E.a.resolve(t,e)}return e}function ft(e,t){var n;return n=e&&e.response&&e.response.body?"".concat(e.response.body.code," ").concat(e.response.body.message):e.message,new ot("Could not resolve reference: ".concat(n),t,e)}function ht(e){return(e+"").split("#")}function dt(e,t){var n=it[e];if(n&&!ke.isPromise(n))try{var r=vt(t,n);return pe()(se.a.resolve(r),{__value:r})}catch(e){return se.a.reject(e)}return mt(e).then(function(e){return vt(t,e)})}function mt(e){var t=it[e];return t?ke.isPromise(t)?t:se.a.resolve(t):(it[e]=ct.fetchJSON(e).then(function(t){return it[e]=t,t}),it[e])}function vt(e,t){var n=gt(e);if(n.length<1)return t;var r=ke.getIn(t,n);if(void 0===r)throw new ot("Could not resolve pointer: ".concat(e," does not exist in document"),{pointer:e});return r}function gt(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a ".concat(I()(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(yt)}function yt(e){return"string"!=typeof e?e:Je.a.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function bt(e){return Je.a.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}var _t=function(e){return!e||"/"===e||"#"===e};function wt(e,t){if(_t(t))return!0;var n=e.charAt(t.length),r=t.slice(-1);return 0===e.indexOf(t)&&(!n||"/"===n||"#"===n)&&"#"!==r}var xt={key:"allOf",plugin:function(e,t,n,r,o){if(!o.meta||!o.meta.$$ref){var i=n.slice(0,-1);if(!et(i)){if(!M()(e)){var a=new TypeError("allOf must be an array");return a.fullPath=n,a}var s=!1,u=o.value;i.forEach(function(e){u&&(u=u[e])}),delete(u=pe()({},u)).allOf;var c=[];return c.push(r.replace(i,{})),e.forEach(function(e,t){if(!r.isObject(e)){if(s)return null;s=!0;var o=new TypeError("Elements in allOf must be objects");return o.fullPath=n,c.push(o)}c.push(r.mergeDeep(i,e));var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.specmap,o=n.getBaseUrlForNodePath,i=void 0===o?function(e){return r.getContext([].concat(be()(t),be()(e))).baseDoc}:o,a=n.targetKeys,s=void 0===a?["$ref","$$ref"]:a,u=[];return $e()(e).forEach(function(){if(s.indexOf(this.key)>-1){var e=this.path,n=t.concat(this.path),o=tt(this.node,i(e));u.push(r.replace(n,o))}}),u}(e,n.slice(0,-1),{getBaseUrlForNodePath:function(e){return r.getContext([].concat(be()(n),[t],be()(e))).baseDoc},specmap:r});c.push.apply(c,be()(a))}),c.push(r.mergeDeep(i,u)),u.$$ref||c.push(r.remove([].concat(i,"$$ref"))),c}}}},Et={key:"parameters",plugin:function(e,t,n,r,o){if(M()(e)&&e.length){var i=pe()([],e),a=n.slice(0,-1),s=pe()({},ke.getIn(r.spec,a));return e.forEach(function(e,t){try{i[t].default=r.parameterMacro(s,e)}catch(e){var o=new Error(e);return o.fullPath=n,o}}),ke.replace(n,i)}return ke.replace(n,e)}},St={key:"properties",plugin:function(e,t,n,r){var o=pe()({},e);for(var i in e)try{o[i].default=r.modelPropertyMacro(o[i])}catch(e){var a=new Error(e);return a.fullPath=n,a}return ke.replace(n,o)}};function Ct(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}var kt=function(){function e(t){he()(this,e),this.root=Ot(t||{})}return me()(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(n){var r=e[e.length-1],o=n.children;o[r]?At(o[r],t,n):o[r]=Ot(t,n)}else At(this.root,t,null)}},{key:"get",value:function(e){if((e=e||[]).length<1)return this.root.value;for(var t,n,r=this.root,o=0;o=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=Q()(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o1?n-1:0),o=1;o0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return se.a.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;ke.normalizeArray(e).forEach(function(e){if(e instanceof Error)n.errors.push(e);else try{if(!ke.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),ke.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(ke.isContextPatch(e))return void n.setContext(e.path,e.value);if(ke.isMutation(e))return void n.updateMutations(e)}catch(e){console.error(e),n.errors.push(e)}})}},{key:"updateMutations",value:function(e){"object"===I()(e.value)&&!M()(e.value)&&this.allowMetaPatches&&(e.value=pe()({},e.value));var t=ke.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(n){var r=pe()({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)}).catch(function(n){t.removePromisedPatch(e),t.updatePatches(n)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return ke.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse(T()(e))}},{key:"dispatch",value:function(){var e=this,t=this,n=this.nextPlugin();if(!n){var r=this.nextPromisedPatch();if(r)return r.then(function(){return e.dispatch()}).catch(function(){return e.dispatch()});var o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),se.a.resolve(o)}if(t.pluginCount=t.pluginCount||{},t.pluginCount[n]=(t.pluginCount[n]||0)+1,t.pluginCount[n]>100)return se.a.resolve({spec:t.state,errors:t.errors.concat(new Error("We've reached a hard limit of ".concat(100," plugin runs")))});if(n!==this.currentPlugin&&this.promisedPatches.length){var i=this.promisedPatches.map(function(e){return e.value});return se.a.all(i.map(function(e){return e.then(Function,Function)})).then(function(){return e.dispatch()})}return function(){t.currentPlugin=n;var e=t.getCurrentMutations(),r=t.mutations.length-1;try{if(n.isGenerator){var o,i=Tt(n(e,t.getLib()));try{for(i.s();!(o=i.n()).done;){a(o.value)}}catch(e){i.e(e)}finally{i.f()}}else{a(n(e,t.getLib()))}}catch(e){console.error(e),a([pe()(ce()(e),{plugin:n})])}finally{t.updatePluginHistory(n,{mutationIndex:r})}return t.dispatch()}();function a(e){e&&(e=ke.fullyNormalizeArray(e),t.updatePatches(e,n))}}}]),e}();var Pt={refs:lt,allOf:xt,parameters:Et,properties:St},Mt=n(32),Nt=n.n(Mt);function Rt(e){if(void 0===re.a||null==e[te.a]){if(M()(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return ie()(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=Q()(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"",r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).v2OperationIdCompatibilityMode;return e&&"object"===I()(e)?(e.operationId||"").replace(/\s/g,"").length?Ut(e.operationId):function(e,t){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).v2OperationIdCompatibilityMode){var n="".concat(t.toLowerCase(),"_").concat(e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|.\/?,\\'""-]/g,"_");return(n=n||"".concat(e.substring(1),"_").concat(t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return"".concat(Lt(t)).concat(Ut(e))}(t,n,{v2OperationIdCompatibilityMode:r}):null}function Bt(e,t){return"".concat(Lt(t),"-").concat(e)}function zt(e,t){return e&&e.paths?function(e,t){return Vt(e,t,!0)||null}(e,function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==I()(o))return!1;var i=o.operationId;return[Ft(o,n,r),Bt(n,r),i].some(function(e){return e&&e===t})}):null}function Vt(e,t,n){if(!e||"object"!==I()(e)||!e.paths||"object"!==I()(e.paths))return null;var r=e.paths;for(var o in r)for(var i in r[o])if("PARAMETERS"!==i.toUpperCase()){var a=r[o][i];if(a&&"object"===I()(a)){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:a},u=t(s);if(n&&u)return s}}}function Ht(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var o in n){var i=n[o];if(Nt()(i)){var a=i.parameters,s=function(e){var n=i[e];if(!Nt()(n))return"continue";var s=Ft(n,o,e);if(s){r[s]?r[s].push(n):r[s]=[n];var u=r[s];if(u.length>1)u.forEach(function(e,t){e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId="".concat(s).concat(t+1)});else if(void 0!==n.operationId){var c=u[0];c.__originalOperationId=c.__originalOperationId||n.operationId,c.operationId=s}}if("parameters"!==e){var l=[],p={};for(var f in t)"produces"!==f&&"consumes"!==f&&"security"!==f||(p[f]=t[f],l.push(p));if(a&&(p.parameters=a,l.push(p)),l.length){var h,d=Rt(l);try{for(d.s();!(h=d.n()).done;){var m=h.value;for(var v in m)if(n[v]){if("parameters"===v){var g,y=Rt(m[v]);try{var b=function(){var e=g.value;n[v].some(function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e})||n[v].push(e)};for(y.s();!(g=y.n()).done;)b()}catch(e){y.e(e)}finally{y.f()}}}else n[v]=m[v]}}catch(e){d.e(e)}finally{d.f()}}}};for(var u in i)s(u)}}return t.$$normalized=!0,e}function Wt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requestInterceptor,r=t.responseInterceptor,o=e.withCredentials?"include":"same-origin";return function(t){return e({url:t,loadSpec:!0,requestInterceptor:n,responseInterceptor:r,headers:{Accept:nt},credentials:o}).then(function(e){return e.body})}}function Jt(e){var t=e.fetch,n=e.spec,r=e.url,o=e.mode,i=e.allowMetaPatches,a=void 0===i||i,s=e.pathDiscriminator,u=e.modelPropertyMacro,c=e.parameterMacro,l=e.requestInterceptor,p=e.responseInterceptor,f=e.skipNormalization,h=e.useCircularStructures,d=e.http,m=e.baseDoc;return m=m||r,d=t||d||V,n?v(n):Wt(d,{requestInterceptor:l,responseInterceptor:p})(m).then(v);function v(e){m&&(Pt.refs.docCache[m]=e),Pt.refs.fetchJSON=Wt(d,{requestInterceptor:l,responseInterceptor:p});var t,n=[Pt.refs];return"function"==typeof c&&n.push(Pt.parameters),"function"==typeof u&&n.push(Pt.properties),"strict"!==o&&n.push(Pt.allOf),(t={spec:e,context:{baseDoc:m},plugins:n,allowMetaPatches:a,pathDiscriminator:s,parameterMacro:c,modelPropertyMacro:u,useCircularStructures:h},new It(t).dispatch()).then(f?function(){var e=R()(C.a.mark(function e(t){return C.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t);case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}():Ht)}}var Kt=n(16),Yt=n.n(Kt);function $t(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t2&&void 0!==m[2]?m[2]:{},o=r.returnEntireTree,i=r.baseDoc,a=r.requestInterceptor,s=r.responseInterceptor,u=r.parameterMacro,c=r.modelPropertyMacro,l=r.useCircularStructures,p={pathDiscriminator:n,baseDoc:i,requestInterceptor:a,responseInterceptor:s,parameterMacro:u,modelPropertyMacro:c,useCircularStructures:l},f=Ht({spec:t}),h=f.spec,e.next=6,Jt(Gt({},p,{spec:h,allowMetaPatches:!0,skipNormalization:!0}));case 6:return d=e.sent,!o&&M()(n)&&n.length&&(d.spec=Yt()(d.spec,n)||null),e.abrupt("return",d);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Xt=n(41),Qt=n.n(Xt);function en(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,o=t.operationId;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute(tn({spec:e.spec},Qt()(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:n,method:r,parameters:t,operationId:o},i))}}}};var an=n(42),sn=n.n(an),un=n(43),cn=n.n(un),ln=n(44),pn=n.n(ln),fn=n(19),hn=n.n(fn),dn=n(45),mn=n.n(dn),vn={body:function(e){var t=e.req,n=e.value;t.body=n},header:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)},query:function(e){var t=e.req,n=e.value,r=e.parameter;t.query=t.query||{},!1===n&&"boolean"===r.type&&(n="false");0===n&&["number","integer"].indexOf(r.type)>-1&&(n="0");if(n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue&&void 0!==n){var o=r.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}},path:function(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.split("{".concat(r.name,"}")).join(encodeURIComponent(n))},formData:function(e){var t=e.req,n=e.value,r=e.parameter;(n||r.allowEmptyValue)&&(t.form=t.form||{},t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}};n(52);var gn=n(46),yn=n.n(gn),bn=n(47),_n=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},wn=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function xn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).escape,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&t?n?JSON.parse(e):Object(bn.stringToCharArray)(e).map(function(e){return wn(e)?e:_n(e)&&"unsafe"===t?e:(yn()(e)||[]).map(function(e){return"0".concat(e.toString(16).toUpperCase()).slice(-2)}).map(function(e){return"%".concat(e)}).join("")}).join(""):e}function En(e){var t=e.value;return M()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return xn(e,{escape:i})};if("simple"===r)return n.map(function(e){return a(e)}).join(",");if("label"===r)return".".concat(n.map(function(e){return a(e)}).join("."));if("matrix"===r)return n.map(function(e){return a(e)}).reduce(function(e,n){return!e||o?"".concat(e||"",";").concat(t,"=").concat(n):"".concat(e,",").concat(n)},"");if("form"===r){var s=o?"&".concat(t,"="):",";return n.map(function(e){return a(e)}).join(s)}if("spaceDelimited"===r){var u=o?"".concat(t,"="):"";return n.map(function(e){return a(e)}).join(" ".concat(u))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return n.map(function(e){return a(e)}).join("|".concat(c))}}(e):"object"===I()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return xn(e,{escape:i})},s=m()(n);if("simple"===r)return s.reduce(function(e,t){var r=a(n[t]),i=o?"=":",",s=e?"".concat(e,","):"";return"".concat(s).concat(t).concat(i).concat(r)},"");if("label"===r)return s.reduce(function(e,t){var r=a(n[t]),i=o?"=":".",s=e?"".concat(e,"."):".";return"".concat(s).concat(t).concat(i).concat(r)},"");if("matrix"===r&&o)return s.reduce(function(e,t){var r=a(n[t]),o=e?"".concat(e,";"):";";return"".concat(o).concat(t,"=").concat(r)},"");if("matrix"===r)return s.reduce(function(e,r){var o=a(n[r]),i=e?"".concat(e,","):";".concat(t,"=");return"".concat(i).concat(r,",").concat(o)},"");if("form"===r)return s.reduce(function(e,t){var r=a(n[t]),i=e?"".concat(e).concat(o?"&":","):"",s=o?"=":",";return"".concat(i).concat(t).concat(s).concat(r)},"")}(e):function(e){var t=e.key,n=e.value,r=e.style,o=e.escape,i=function(e){return xn(e,{escape:o})};if("simple"===r)return i(n);if("label"===r)return".".concat(i(n));if("matrix"===r)return";".concat(t,"=").concat(i(n));if("form"===r)return i(n);if("deepObject"===r)return i(n)}(e)}function Sn(e,t){return t.includes("application/json")?"string"==typeof e?e:T()(e):e.toString()}function Cn(e){var t=e.req,n=e.value,r=e.parameter,o=r.name,i=r.style,a=r.explode,s=r.content;if(s){var u=m()(s)[0];t.url=t.url.split("{".concat(o,"}")).join(xn(Sn(n,u),{escape:!0}))}else{var c=En({key:r.name,value:n,style:i||"simple",explode:a||!1,escape:!0});t.url=t.url.split("{".concat(o,"}")).join(c)}}function kn(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},r.content){var o=m()(r.content)[0];t.query[r.name]=Sn(n,o)}else if(!1===n&&(n="false"),0===n&&(n="0"),n){var i=I()(n);if("deepObject"===r.style)m()(n).forEach(function(e){var o=n[e];t.query["".concat(r.name,"[").concat(e,"]")]={value:En({key:e,value:o,style:"deepObject",escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}});else if("object"!==i||M()(n)||"form"!==r.style&&r.style||!r.explode&&void 0!==r.explode){var a=encodeURIComponent(r.name);t.query[a]={value:En({key:a,value:n,style:r.style||"form",explode:void 0===r.explode||r.explode,escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}}else{m()(n).forEach(function(e){var o=n[e];t.query[e]={value:En({key:e,value:o,style:r.style||"form",escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}}else if(r.allowEmptyValue&&void 0!==n){var s=r.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}var On=["accept","authorization","content-type"];function An(e){var t=e.req,n=e.parameter,r=e.value;if(t.headers=t.headers||{},!(On.indexOf(n.name.toLowerCase())>-1))if(n.content){var o=m()(n.content)[0];t.headers[n.name]=Sn(r,o)}else void 0!==r&&(t.headers[n.name]=En({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))}function Tn(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=I()(r);if(n.content){var i=m()(n.content)[0];t.headers.Cookie="".concat(n.name,"=").concat(Sn(r,i))}else if("undefined"!==o){var a="object"===o&&!M()(r)&&n.explode?"":"".concat(n.name,"=");t.headers.Cookie=a+En({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}var jn=n(33),In=function(e,t){var n=e.operation,r=e.requestBody,o=e.securities,i=e.spec,a=e.attachContentTypeForEmptyPayload,s=e.requestContentType;t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,s=b()({},t),u=r.authorized,c=void 0===u?{}:u,l=i.security||a.security||[],p=c&&!!m()(c).length,f=Yt()(a,["components","securitySchemes"])||{};if(s.headers=s.headers||{},s.query=s.query||{},!m()(r).length||!p||!l||M()(i.security)&&!i.security.length)return t;return l.forEach(function(e,t){for(var n in e){var r=c[n],o=f[n];if(r){var i=r.value||r,a=o.type;if(r)if("apiKey"===a)"query"===o.in&&(s.query[o.name]=i),"header"===o.in&&(s.headers[o.name]=i),"cookie"===o.in&&(s.cookies[o.name]=i);else if("http"===a){if("basic"===o.scheme){var u=i.username||"",l=i.password||"",p=hn()("".concat(u,":").concat(l));s.headers.Authorization="Basic ".concat(p)}"bearer"===o.scheme&&(s.headers.Authorization="Bearer ".concat(i))}else if("oauth2"===a){var h=r.token||{},d=h[o["x-tokenName"]||"access_token"],m=h.token_type;m&&"bearer"!==m.toLowerCase()||(m="Bearer"),s.headers.Authorization="".concat(m," ").concat(d)}}}}),s}({request:t,securities:o,operation:n,spec:i});var u=n.requestBody||{},c=m()(u.content||{}),l=s&&c.indexOf(s)>-1;if(r||a){if(s&&l)t.headers["Content-Type"]=s;else if(!s){var p=c[0];p&&(t.headers["Content-Type"]=p,s=p)}}else s&&l&&(t.headers["Content-Type"]=s);return r&&(s?c.indexOf(s)>-1&&("application/x-www-form-urlencoded"===s||0===s.indexOf("multipart/")?"object"===I()(r)?(t.form={},m()(r).forEach(function(e){var n,o,i=r[e];"undefined"!=typeof File&&(o=i instanceof File),"undefined"!=typeof Blob&&(o=o||i instanceof Blob),void 0!==jn.Buffer&&(o=o||jn.Buffer.isBuffer(i)),n="object"!==I()(i)||o?i:M()(i)?i.toString():T()(i),t.form[e]={value:n}})):t.form=r:t.body=r):t.body=r),t};var Pn=function(e,t){var n=e.spec,r=e.operation,o=e.securities,i=e.requestContentType,a=e.attachContentTypeForEmptyPayload;if((t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,s=b()({},t),u=r.authorized,c=void 0===u?{}:u,l=r.specSecurity,p=void 0===l?[]:l,f=i.security||p,h=c&&!!m()(c).length,d=a.securityDefinitions;if(s.headers=s.headers||{},s.query=s.query||{},!m()(r).length||!h||!f||M()(i.security)&&!i.security.length)return t;return f.forEach(function(e,t){for(var n in e){var r=c[n];if(r){var o=r.token,i=r.value||r,a=d[n],u=a.type,l=a["x-tokenName"]||"access_token",p=o&&o[l],f=o&&o.token_type;if(r)if("apiKey"===u){var h="query"===a.in?"query":"headers";s[h]=s[h]||{},s[h][a.name]=i}else if("basic"===u)if(i.header)s.headers.authorization=i.header;else{var m=i.username||"",v=i.password||"";i.base64=hn()("".concat(m,":").concat(v)),s.headers.authorization="Basic ".concat(i.base64)}else"oauth2"===u&&p&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",s.headers.authorization="".concat(f," ").concat(p))}}}),s}({request:t,securities:o,operation:r,spec:n})).body||t.form||a)i?t.headers["Content-Type"]=i:M()(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:M()(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:r.parameters&&r.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":r.parameters&&r.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(i){var s=r.parameters&&r.parameters.filter(function(e){return"body"===e.in}).length>0,u=r.parameters&&r.parameters.filter(function(e){return"formData"===e.in}).length>0;(s||u)&&(t.headers["Content-Type"]=i)}return t};function Mn(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t1&&console.warn("Parameter '".concat(e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '").concat(e.name,"' and the passed-in parameter values did not define an 'in' value.")),null!==n){if(void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter ".concat(e.name," is not provided"));if(v&&e.schema&&"object"===e.schema.type&&"string"==typeof n)try{n=JSON.parse(n)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}r&&r({req:g,parameter:e,value:n,operation:_,spec:t})}});var C=Nn({},e,{operation:_});if((g=v?In(C,g):Pn(C,g)).cookies&&m()(g.cookies).length){var k=m()(g.cookies).reduce(function(e,t){var n=g.cookies[t];return e+(e?"&":"")+mn.a.serialize(t,n)},"");g.headers.Cookie=k}return g.cookies&&delete g.cookies,Z(g),g}var Bn=function(e){return e?e.replace(/\W/g,""):null};function zn(e){return qt(e.spec)?function(e){var t=e.spec,n=e.pathName,r=e.method,o=e.server,i=e.contextUrl,a=e.serverVariables,s=void 0===a?{}:a,u=Yt()(t,["paths",n,(r||"").toLowerCase(),"servers"])||Yt()(t,["paths",n,"servers"])||Yt()(t,["servers"]),c="",l=null;if(o&&u&&u.length){var p=u.map(function(e){return e.url});p.indexOf(o)>-1&&(c=o,l=u[p.indexOf(o)])}!c&&u&&u.length&&(c=u[0].url,l=u[0]);if(c.indexOf("{")>-1){(function(e){var t,n=[],r=/{([^}]+)}/g;for(;t=r.exec(e);)n.push(t[1]);return n})(c).forEach(function(e){if(l.variables&&l.variables[e]){var t=l.variables[e],n=s[e]||t.default,r=new RegExp("{".concat(e,"}"),"g");c=c.replace(r,n)}})}return function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=E.a.parse(t),o=E.a.parse(n),i=Bn(r.protocol)||Bn(o.protocol)||"",a=r.host||o.host,s=r.pathname||"";e=i&&a?"".concat(i,"://").concat(a+s):s;return"/"===e[e.length-1]?e.slice(0,-1):e}(c,i)}(e):function(e){var t,n=e.spec,r=e.scheme,o=e.contextUrl,i=void 0===o?"":o,a=E.a.parse(i),s=M()(n.schemes)?n.schemes[0]:null,u=r||s||Bn(a.protocol)||"http",c=n.host||a.host||"",l=n.basePath||"";t=u&&c?"".concat(u,"://").concat(c+l):l;return"/"===t[t.length-1]?t.slice(0,-1):t}(e)}function Vn(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function Hn(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof Hn))return new Hn(n);b()(this,n);var r=this.resolve().then(function(){return t.disableInterfaces||b()(t,Hn.makeApisTagOperation(t)),t});return r.client=this,r}Hn.http=V,Hn.makeHttp=function(e,t,n){return n=n||function(e){return e},t=t||function(e){return e},function(r){return"string"==typeof r&&(r={url:r}),z.mergeInQueryOrForm(r),r=t(r),n(e(r))}}.bind(null,Hn.http),Hn.resolve=Jt,Hn.resolveSubtree=function(e,t){return Zt.apply(this,arguments)},Hn.execute=function(e){var t=e.http,n=e.fetch,r=e.spec,o=e.operationId,i=e.pathName,a=e.method,s=e.parameters,u=e.securities,c=sn()(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),l=t||n||V;i&&a&&!o&&(o=Bt(i,a));var p=qn.buildRequest(Nn({spec:r,operationId:o,parameters:s,securities:u,http:l},c));return p.body&&(cn()(p.body)||pn()(p.body))&&(p.body=T()(p.body)),l(p)},Hn.serializeRes=J,Hn.serializeHeaders=K,Hn.clearCache=function(){Pt.refs.clearCache()},Hn.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=on.makeExecute(e);return{apis:on.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},Hn.buildRequest=Fn,Hn.helpers={opId:Ft},Hn.getBaseUrl=zn,Hn.prototype={http:V,execute:function(e){return this.applyDefaults(),Hn.execute(function(e){for(var t=1;t + * @license MIT + */ +var r=n(571),o=n(572),i=n(358);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){for(var p=!0,f=0;fo&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,i){return i||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(36))},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,p=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n0&&"/"!==t[0]});function oe(e,t,n){return t=t||[],te.apply(void 0,[e].concat(u()(t))).get("parameters",Object(p.List)()).reduce(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(l.B)(t,{allowHashes:!1}),r)},Object(p.fromJS)({}))}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(p.List.isList(e))return e.some(function(e){return p.Map.isMap(e)&&e.get("in")===t})}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(p.List.isList(e))return e.some(function(e){return p.Map.isMap(e)&&e.get("type")===t})}function se(e,t){t=t||[];var n=x(e).getIn(["paths"].concat(u()(t)),Object(p.fromJS)({})),r=e.getIn(["meta","paths"].concat(u()(t)),Object(p.fromJS)({})),o=ue(e,t),i=n.get("parameters")||new p.List,a=r.get("consumes_value")?r.get("consumes_value"):ae(i,"file")?"multipart/form-data":ae(i,"formData")?"application/x-www-form-urlencoded":void 0;return Object(p.fromJS)({requestContentType:a,responseContentType:o})}function ue(e,t){t=t||[];var n=x(e).getIn(["paths"].concat(u()(t)),null);if(null!==n){var r=e.getIn(["meta","paths"].concat(u()(t),["produces_value"]),null),o=n.getIn(["produces",0],null);return r||o||"application/json"}}function ce(e,t){t=t||[];var n=x(e),r=n.getIn(["paths"].concat(u()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],s=r.get("produces",null),c=n.getIn(["paths",i,"produces"],null),l=n.getIn(["produces"],null);return s||c||l}}function le(e,t){t=t||[];var n=x(e),r=n.getIn(["paths"].concat(u()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],s=r.get("consumes",null),c=n.getIn(["paths",i,"consumes"],null),l=n.getIn(["consumes"],null);return s||c||l}}var pe=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),i=o()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||i||""},fe=function(e,t,n){return["http","https"].indexOf(pe(e,t,n))>-1},he=function(e,t){t=t||[];var n=e.getIn(["meta","paths"].concat(u()(t),["parameters"]),Object(p.fromJS)([])),r=!0;return n.forEach(function(e){var t=e.get("errors");t&&t.count()&&(r=!1)}),r};function de(e){return p.Map.isMap(e)?e:new p.Map}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",function(){return d}),n.d(t,"AUTHORIZE",function(){return m}),n.d(t,"LOGOUT",function(){return v}),n.d(t,"PRE_AUTHORIZE_OAUTH2",function(){return g}),n.d(t,"AUTHORIZE_OAUTH2",function(){return y}),n.d(t,"VALIDATE",function(){return b}),n.d(t,"CONFIGURE_AUTH",function(){return _}),n.d(t,"showDefinitions",function(){return w}),n.d(t,"authorize",function(){return x}),n.d(t,"logout",function(){return E}),n.d(t,"preAuthorizeImplicit",function(){return S}),n.d(t,"authorizeOauth2",function(){return C}),n.d(t,"authorizePassword",function(){return k}),n.d(t,"authorizeApplication",function(){return O}),n.d(t,"authorizeAccessCodeWithFormParams",function(){return A}),n.d(t,"authorizeAccessCodeWithBasicAuthentication",function(){return T}),n.d(t,"authorizeRequest",function(){return j}),n.d(t,"configureAuth",function(){return I});var r=n(26),o=n.n(r),i=n(16),a=n.n(i),s=n(28),u=n.n(s),c=n(95),l=n.n(c),p=n(18),f=n.n(p),h=n(3),d="show_popup",m="authorize",v="logout",g="pre_authorize_oauth2",y="authorize_oauth2",b="validate",_="configure_auth";function w(e){return{type:d,payload:e}}function x(e){return{type:m,payload:e}}function E(e){return{type:v,payload:e}}var S=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,i=e.token,a=e.isValid,s=o.schema,c=o.name,l=s.get("flow");delete f.a.swaggerUIRedirectOauth2,"accessCode"===l||a||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),i.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:u()(i)}):n.authorizeOauth2({auth:o,token:i})}};function C(e){return{type:y,payload:e}}var k=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,i=e.username,s=e.password,u=e.passwordType,c=e.clientId,l=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:i,password:s},f={};switch(u){case"request-body":!function(e,t,n){t&&a()(e,{client_id:t});n&&a()(e,{client_secret:n})}(p,c,l);break;case"basic":f.Authorization="Basic "+Object(h.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(u," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(h.b)(p),url:r.get("tokenUrl"),name:o,headers:f,query:{},auth:e})}};var O=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,s=e.clientSecret,u={Authorization:"Basic "+Object(h.a)(a+":"+s)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(h.b)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:u})}},A=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:s,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t})}},T=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,s=t.clientSecret,u={Authorization:"Basic "+Object(h.a)(a+":"+s)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:u})}},j=function(e){return function(t){var n,r=t.fn,i=t.getConfigs,s=t.authActions,c=t.errActions,p=t.oas3Selectors,f=t.specSelectors,h=t.authSelectors,d=e.body,m=e.query,v=void 0===m?{}:m,g=e.headers,y=void 0===g?{}:g,b=e.name,_=e.url,w=e.auth,x=(h.getConfigs()||{}).additionalQueryStringParams;n=f.isOAS3()?l()(_,p.selectedServer(),!0):l()(_,f.url(),!0),"object"===o()(x)&&(n.query=a()({},n.query,x));var E=n.toString(),S=a()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:E,method:"post",headers:S,query:v,body:d,requestInterceptor:i().requestInterceptor,responseInterceptor:i().responseInterceptor}).then(function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:u()(t)}):s.authorizeOauth2({auth:w,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})}).catch(function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})})}};function I(e){return{type:_,payload:e}}},function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(127),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(212),o=n(211);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(49),o=n(133);e.exports=n(50)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",function(){return o}),n.d(t,"UPDATE_FILTER",function(){return i}),n.d(t,"UPDATE_MODE",function(){return a}),n.d(t,"SHOW",function(){return s}),n.d(t,"updateLayout",function(){return u}),n.d(t,"updateFilter",function(){return c}),n.d(t,"show",function(){return l}),n.d(t,"changeMode",function(){return p});var r=n(3),o="layout_update_layout",i="layout_update_filter",a="layout_update_mode",s="layout_show";function u(e){return{type:o,payload:e}}function c(e){return{type:i,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.w)(e),{type:s,payload:{thing:e,shown:t}}}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.w)(e),{type:a,payload:{thing:e,mode:t}}}},function(e,t,n){"use strict";(function(t){ +/*! + * @description Recursive object extending + * @author Viacheslav Lotsmanov + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2018 Viacheslav Lotsmanov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach(function(e,i){"object"==typeof e&&null!==e?Array.isArray(e)?t[i]=o(e):n(e)?t[i]=r(e):t[i]=a({},e):t[i]=e}),t}function i(e,t){return"__proto__"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,s=arguments[0],u=Array.prototype.slice.call(arguments,1);return u.forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(c){return t=i(s,c),(e=i(u,c))===s?void 0:"object"!=typeof e||null===e?void(s[c]=e):Array.isArray(e)?void(s[c]=o(e)):n(e)?void(s[c]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(s[c]=a({},e)):void(s[c]=a(t,e))})}),s}}).call(this,n(64).Buffer)},function(e,t,n){var r=n(151),o=n(337);e.exports=n(126)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(106),o=n(605),i=n(606),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(623),o=n(626);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(383),o=n(663),i=n(107);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){"use strict";var r=n(178),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=p;var i=n(137);i.inherits=n(47);var a=n(393),s=n(241);i.inherits(p,a);for(var u=o(s.prototype),c=0;c=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports={}},function(e,t,n){n(564);for(var r=n(32),o=n(77),i=n(102),a=n(34)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u1){for(var d=Array(h),m=0;m1){for(var g=Array(v),y=0;y=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){var r=n(63),o=n(410),i=n(411),a=n(46),s=n(158),u=n(226),c={},l={};(t=e.exports=function(e,t,n,p,f){var h,d,m,v,g=f?function(){return e}:u(e),y=r(n,p,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(h=s(e.length);h>b;b++)if((v=t?y(a(d=e[b])[0],d[1]):y(e[b]))===c||v===l)return v}else for(m=g.call(e);!(d=m.next()).done;)if((v=o(m,y,d.value,t))===c||v===l)return v}).BREAK=c,t.RETURN=l},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=Object(i.A)(t),a=r.type,s=r.example,u=r.properties,c=r.additionalProperties,l=r.items,p=n.includeReadOnly,f=n.includeWriteOnly;if(void 0!==s)return Object(i.e)(s,"$$ref",function(e){return"string"==typeof e&&e.indexOf("#")>-1});if(!a)if(u)a="object";else{if(!l)return;a="array"}if("object"===a){var d=Object(i.A)(u),m={};for(var v in d)d[v]&&d[v].deprecated||d[v]&&d[v].readOnly&&!p||d[v]&&d[v].writeOnly&&!f||(m[v]=e(d[v],n));if(!0===c)m.additionalProp1={};else if(c)for(var g=Object(i.A)(c),y=e(g,n),b=1;b<4;b++)m["additionalProp"+b]=y;return m}return"array"===a?o()(l.anyOf)?l.anyOf.map(function(t){return e(t,n)}):o()(l.oneOf)?l.oneOf.map(function(t){return e(t,n)}):[e(l,n)]:t.enum?t.default?t.default:Object(i.w)(t.enum)[0]:"file"!==a?h(t):void 0},m=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},v=function e(t){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=p()({},Object(i.A)(t)),u=s.type,c=s.properties,l=s.additionalProperties,f=s.items,d=s.example,m=a.includeReadOnly,v=a.includeWriteOnly,g=s.default,y={},b={},_=t.xml,w=_.name,x=_.prefix,E=_.namespace,S=s.enum;if(!u)if(c||l)u="object";else{if(!f)return;u="array"}if(n=(x?x+":":"")+(w=w||"notagname"),E){var C=x?"xmlns:"+x:"xmlns";b[C]=E}if("array"===u&&f){if(f.xml=f.xml||_||{},f.xml.name=f.xml.name||_.name,_.wrapped)return y[n]=[],o()(d)?d.forEach(function(t){f.example=t,y[n].push(e(f,a))}):o()(g)?g.forEach(function(t){f.default=t,y[n].push(e(f,a))}):y[n]=[e(f,a)],b&&y[n].push({_attr:b}),y;var k=[];return o()(d)?(d.forEach(function(t){f.example=t,k.push(e(f,a))}),k):o()(g)?(g.forEach(function(t){f.default=t,k.push(e(f,a))}),k):e(f,a)}if("object"===u){var O=Object(i.A)(c);for(var A in y[n]=[],d=d||{},O)if(O.hasOwnProperty(A)&&(!O[A].readOnly||m)&&(!O[A].writeOnly||v))if(O[A].xml=O[A].xml||{},O[A].xml.attribute){var T=o()(O[A].enum)&&O[A].enum[0],j=O[A].example,I=O[A].default;b[O[A].xml.name||A]=void 0!==j&&j||void 0!==d[A]&&d[A]||void 0!==I&&I||T||h(O[A])}else{O[A].xml.name=O[A].xml.name||A,void 0===O[A].example&&void 0!==d[A]&&(O[A].example=d[A]);var P=e(O[A]);o()(P)?y[n]=y[n].concat(P):y[n].push(P)}return!0===l?y[n].push({additionalProp:"Anything can be here"}):l&&y[n].push({additionalProp:h(l)}),b&&y[n].push({_attr:b}),y}return r=void 0!==d?d:void 0!==g?g:o()(S)?S[0]:h(t),y[n]=b?[{_attr:b},r]:r,y};function g(e,t){var n=v(e,t);if(n)return s()(n,{declaration:!0,indent:"\t"})}var y=c()(g),b=c()(d)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_CONFIGS",function(){return i}),n.d(t,"TOGGLE_CONFIGS",function(){return a}),n.d(t,"update",function(){return s}),n.d(t,"toggle",function(){return u}),n.d(t,"loaded",function(){return c});var r=n(2),o=n.n(r),i="configs_update",a="configs_toggle";function s(e,t){return{type:i,payload:o()({},e,t)}}function u(e){return{type:a,payload:e}}var c=function(){return function(){}}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),o=n.n(r),i=o.a.Set.of("type","format","items","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf");function a(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isOAS3;if(!o.a.Map.isMap(e))return{schema:o.a.Map(),parameterContentMediaType:null};if(!t)return"body"===e.get("in")?{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}:{schema:e.filter(function(e,t){return i.includes(t)}),parameterContentMediaType:null};if(e.get("content")){var n=e.get("content",o.a.Map({})).keySeq().first();return{schema:e.getIn(["content",n,"schema"],o.a.Map()),parameterContentMediaType:n}}return{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}}},function(e,t,n){e.exports=n(782)},function(e,t,n){"use strict";n.r(t);var r=n(473),o="object"==typeof self&&self&&self.Object===Object&&self,i=(r.a||o||Function("return this")()).Symbol,a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=i?i.toStringTag:void 0;var l=function(e){var t=s.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[c]=n:delete e[c]),o},p=Object.prototype.toString;var f=function(e){return p.call(e)},h="[object Null]",d="[object Undefined]",m=i?i.toStringTag:void 0;var v=function(e){return null==e?void 0===e?d:h:m&&m in Object(e)?l(e):f(e)};var g=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var y=function(e){return null!=e&&"object"==typeof e},b="[object Object]",_=Function.prototype,w=Object.prototype,x=_.toString,E=w.hasOwnProperty,S=x.call(Object);var C=function(e){if(!y(e)||v(e)!=b)return!1;var t=g(e);if(null===t)return!0;var n=E.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==S},k=n(331),O={INIT:"@@redux/INIT"};function A(e,t,n){var r;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(A)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function l(){return i}function p(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return c(),s.push(e),function(){if(t){t=!1,c();var n=s.indexOf(e);s.splice(n,1)}}}function f(e){if(!C(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,i=o(i,e)}finally{u=!1}for(var t=a=s,n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var r=!1,o={},s=0;s0?r:n)(e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(349),o=n(216);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(49).f,o=n(75),i=n(34)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(159)("meta"),o=n(43),i=n(75),a=n(49).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(82)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return c&&p.NEED&&u(e)&&!i(e,r)&&l(e),e}}},function(e,t,n){"use strict";e.exports=function(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r1&&void 0!==arguments[1]?arguments[1]:[],n={arrayBehaviour:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).arrayBehaviour||"replace"},r=t.map(function(e){return e||{}}),i=e||{},c=0;c1?t-1:0),r=1;r5&&void 0!==arguments[5]?arguments[5]:{};if("string"!=typeof r)throw new TypeError("Need a string, to fetch a component. Was given a "+o()(r));var s=n(r);return s?i?"root"===i?A(e,s,t()):A(e,M(s)):M(s):(a.failSilently||e().log.warn("Could not find component:",r),null)}},function(e,t,n){"use strict";n.r(t),n.d(t,"setHash",function(){return r});var r=function(e){return e?history.pushState(null,null,"#".concat(e)):window.location.hash=""}},function(e,t,n){var r=n(125),o=n(33)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(45),o=n(496),i=n(497),a=Object.defineProperty;t.f=n(126)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(154);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(503),o=n(73);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(150),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n(550);var r=n(97),o=n(81),i=n(99),a=n(73),s=n(33),u=n(210),c=s("species"),l=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=s(e),h=!i(function(){var t={};return t[f]=function(){return 7},7!=""[e](t)}),d=h?!i(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!t}):void 0;if(!h||!d||"replace"===e&&!l||"split"===e&&!p){var m=/./[f],v=n(a,f,""[e],function(e,t,n,r,o){return t.exec===u?h&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),g=v[0],y=v[1];r(String.prototype,e,g),o(RegExp.prototype,f,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},function(e,t,n){var r=n(213),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(46),o=n(352),i=n(216),a=n(214)("IE_PROTO"),s=function(){},u=function(){var e,t=n(218)("iframe"),r=i.length;for(t.style.display="none",n(353).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" +{{ end }} \ No newline at end of file diff --git a/template/{{.ServiceName}}/tpl/layouts/style.html b/template/{{.ServiceName}}/tpl/layouts/style.html new file mode 100644 index 0000000..a977c26 --- /dev/null +++ b/template/{{.ServiceName}}/tpl/layouts/style.html @@ -0,0 +1,4 @@ +{{define "style"}} + +{{end}} \ No newline at end of file diff --git a/template/{{.ServiceName}}/tpl/main.html b/template/{{.ServiceName}}/tpl/main.html new file mode 100644 index 0000000..289736b --- /dev/null +++ b/template/{{.ServiceName}}/tpl/main.html @@ -0,0 +1,7 @@ +{{define "title"}}main{{end}} + +{{define "content"}} + +{{.}} + +{{end}} \ No newline at end of file diff --git a/template/{{.ServiceName}}/tpl/public_hundle.html b/template/{{.ServiceName}}/tpl/public_hundle.html new file mode 100644 index 0000000..a0d5b91 --- /dev/null +++ b/template/{{.ServiceName}}/tpl/public_hundle.html @@ -0,0 +1 @@ +{{define "main" }} {{ template "base" . }} {{ end }} diff --git a/template/{{.ServiceName}}/web/README.md b/template/{{.ServiceName}}/web/README.md new file mode 100644 index 0000000..020b468 --- /dev/null +++ b/template/{{.ServiceName}}/web/README.md @@ -0,0 +1,3 @@ +# `/web` + +Web application specific components: static web assets, server side templates and SPAs. diff --git a/template/{{.ServiceName}}/web/app/.keep b/template/{{.ServiceName}}/web/app/.keep new file mode 100644 index 0000000..e69de29 diff --git a/template/{{.ServiceName}}/web/static/.keep b/template/{{.ServiceName}}/web/static/.keep new file mode 100644 index 0000000..e69de29 diff --git a/template/{{.ServiceName}}/web/template/.keep b/template/{{.ServiceName}}/web/template/.keep new file mode 100644 index 0000000..e69de29 diff --git a/template/{{.ServiceName}}/website/README.md b/template/{{.ServiceName}}/website/README.md new file mode 100644 index 0000000..2bd719d --- /dev/null +++ b/template/{{.ServiceName}}/website/README.md @@ -0,0 +1,8 @@ +# `/website` + +This is the place to put your project's website data if you are not using Github pages. + +Examples: + +* https://github.com/hashicorp/vault/tree/master/website +* https://github.com/perkeep/perkeep/tree/master/website diff --git a/templater/templater.go b/templater/templater.go new file mode 100644 index 0000000..1d4652b --- /dev/null +++ b/templater/templater.go @@ -0,0 +1,100 @@ +package templater + +import ( + "bytes" + "io/ioutil" + "log" + "os" + "path" + "text/template" +) + +// Config ... +type Config struct { + ServiceName string + User string + IgnorePatterns []string +} + +// Service ... +type Service struct { + cfg Config +} + +// Replace ... +func (s *Service) Replace(tmpl string) (string, error) { + templ, err := template.New("test").Parse(tmpl) + if err != nil { + return "", err + } + res := &bytes.Buffer{} + + err = templ.Execute(res, s.cfg) + return res.String(), err +} + +// BuildService ... +func (s *Service) BuildService(srcPath, dstPath string) error { + finfo, err := os.Stat(srcPath) + if err != nil { + return err + } + + // construct new path + srcName := path.Base(srcPath) + renderedSrcName, err := s.Replace(srcName) + if err != nil { + return err + } + renderedDestPath := path.Join(dstPath, renderedSrcName) + + // proccess file + switch finfo.IsDir() { + + // if a directory + case true: + // read all files in it + files, err := ioutil.ReadDir(srcPath) + if err != nil { + return err + } + err = mkdirIfNoExist(renderedDestPath) + if err != nil { + return err + } + for _, f := range files { + err = s.BuildService(path.Join(srcPath, f.Name()), renderedDestPath) + if err != nil { + return err + } + } + + // if a file + case false: + fdata, err := ioutil.ReadFile(srcPath) + if err != nil { + return err + } + + renderedFdata := string(fdata) + if !s.cfg.inIgnore(srcName) { + renderedFdata, err = s.Replace(string(fdata)) + if err != nil { + return err + } + } else { + log.Printf("template ignored in %s", srcName) + } + + err = ioutil.WriteFile(renderedDestPath, []byte(renderedFdata), basePrmission) + if err != nil { + return err + } + } + return nil +} + +// New ... +func New(cfg Config) *Service { + return &Service{cfg: cfg} +} diff --git a/templater/utils.go b/templater/utils.go new file mode 100644 index 0000000..8907774 --- /dev/null +++ b/templater/utils.go @@ -0,0 +1,31 @@ +package templater + +import ( + "os" +) + +const basePrmission = 511 + +func mkdirIfNoExist(pth string) error { + if _, err := os.Stat(pth); os.IsNotExist(err) { + return os.Mkdir(pth, basePrmission) + } + return nil +} + +func (c *Config) inIgnore(pth string) bool { + for _, e := range c.IgnorePatterns { + if endWith(pth, e) { + return true + } + } + return false +} + +func endWith(str, end string) bool { + i := len(str) - len(end) + if i < 0 || str[i:] != end { + return false + } + return true +} diff --git a/templater/utils_test.go b/templater/utils_test.go new file mode 100644 index 0000000..041ff5b --- /dev/null +++ b/templater/utils_test.go @@ -0,0 +1,29 @@ +package templater + +import "testing" + +const wrongAnswer = "Wrong answer" + +func TestEndWithTrue(t *testing.T) { + str := "abcde" + end := "de" + if endWith(str, end) != true { + t.Error(wrongAnswer) + } +} + +func TestEndWithFalse(t *testing.T) { + str := "abcce" + end := "de" + if endWith(str, end) != false { + t.Error(wrongAnswer) + } +} + +func TestEndWithEndBigger(t *testing.T) { + str := "abcde" + end := "asdabcde" + if endWith(str, end) != false { + t.Error(wrongAnswer) + } +} From a92bdec78d9b46b0182bf958ab069c1b33db0021 Mon Sep 17 00:00:00 2001 From: shine_86 Date: Mon, 26 Oct 2020 10:10:34 +0300 Subject: [PATCH 2/4] template replace --- LICENSE | 21 - Makefile | 259 ---- Procfile | 1 - README.md | 83 -- api/.keep | 0 api/README.md | 8 - api/api.proto | 50 - api/gen-boilerplate-go/api/api.pb.go | 527 ------- api/gen-boilerplate-go/api/api.pb.gw.go | 373 ----- api/gen-boilerplate-go/api/swagger.pb.go | 43 - api/swagger.proto | 32 - assets/.keep | 0 assets/README.md | 3 - assets/swaggerui/api.swagger.json | 281 ---- assets/swaggerui/favicon-16x16.png | Bin 665 -> 0 bytes assets/swaggerui/favicon-32x32.png | Bin 628 -> 0 bytes assets/swaggerui/index.html | 60 - assets/swaggerui/oauth2-redirect.html | 68 - assets/swaggerui/swagger-ui-bundle.js | 134 -- assets/swaggerui/swagger-ui-bundle.js.map | 1 - .../swaggerui/swagger-ui-standalone-preset.js | 22 - .../swagger-ui-standalone-preset.js.map | 1 - assets/swaggerui/swagger-ui.css | 4 - assets/swaggerui/swagger-ui.css.map | 1 - assets/swaggerui/swagger-ui.js | 9 - assets/swaggerui/swagger-ui.js.map | 1 - build/README.md | 11 - build/ci/.keep | 0 build/package/.keep | 0 build/package/project.dockerfile | 5 - cmd/README.md | 18 - cmd/boilerplate-go/.keep | 0 cmd/boilerplate-go/config.go | 8 - cmd/boilerplate-go/handle.go | 25 - cmd/boilerplate-go/main.go | 152 -- configs/.keep | 0 configs/README.md | 5 - deployments/.keep | 0 deployments/README.md | 47 - deployments/clickhouse-config.xml | 197 --- deployments/docker-compose-kafka.yml | 87 -- deployments/docker-compose.yml | 185 --- deployments/elasticsearch.yml | 6 - deployments/enabled_plugins | 1 - .../boilerplate-go-chart/.helmignore | 21 - .../boilerplate-go-chart/Chart.yaml | 4 - .../boilerplate-go-chart/templates/NOTES.txt | 21 - .../templates/_helpers.tpl | 32 - .../templates/deployment.yaml | 74 - .../templates/ingress.yaml | 41 - .../templates/service.yaml | 23 - .../boilerplate-go-chart/values.yaml | 76 - deployments/kubernetes/grafana-values.yaml | 414 ------ deployments/kubernetes/ingress_p.yaml | 48 - deployments/kubernetes/jaeger-values.yaml | 274 ---- deployments/kubernetes/jaeger/.helmignore | 22 - deployments/kubernetes/jaeger/Chart.yaml | 5 - .../kubernetes/jaeger/templates/NOTES.txt | 1 - .../kubernetes/jaeger/templates/jaeger.yaml | 161 --- deployments/kubernetes/jaeger/values.yaml | 22 - deployments/kubernetes/prometheus-values.yaml | 1270 ----------------- deployments/log4j2.properties | 9 - deployments/monitor/prometheus.yml | 34 - docs/.keep | 0 docs/README.md | 8 - examples/.keep | 0 examples/README.md | 10 - githooks/.keep | 0 githooks/README.md | 3 - go.mod | 44 - go.sum | 261 ---- init/.keep | 0 init/README.md | 3 - internal/README.md | 5 - internal/app/boilerplate/blockchain.go | 73 - internal/app/boilerplate/boilerplate.go | 38 - internal/app/fastsrv/graceful.go | 40 - internal/app/fastsrv/handle.go | 51 - internal/app/fastsrv/srv.go | 57 - internal/app/grpc/grpc.go | 141 -- internal/app/serv/.keep | 0 internal/app/serv/graceful.go | 37 - internal/app/serv/handle.go | 78 - internal/app/serv/serv.go | 122 -- internal/pkg/clickhouse/client.go | 30 - internal/pkg/elastic/client.go | 27 - internal/pkg/logger/logger.go | 155 -- internal/pkg/logger/logrus/logger.go | 254 ---- internal/pkg/pubsub/pubsub.go | 17 - internal/pkg/pubsub/rabbitmq/client.go | 146 -- internal/pkg/redis/.keep | 0 internal/pkg/redis/client.go | 66 - internal/pkg/redis/dummy.go | 547 ------- internal/pkg/template/template.go | 151 -- internal/pkg/tracing/tracing.go | 31 - internal/pkg/uaparser/uaparser.go | 48 - pkg/README.md | 43 - pkg/_your_public_lib_/.keep | 0 pkg/version/version.go | 26 - scripts/.keep | 0 scripts/README.md | 11 - test/.keep | 0 test/README.md | 9 - third_party/.keep | 0 third_party/README.md | 3 - tools/.keep | 0 tools/README.md | 8 - tools/tools.go | 9 - tpl/layouts/base.html | 53 - tpl/layouts/js.html | 5 - tpl/layouts/style.html | 4 - tpl/main.html | 7 - web/README.md | 3 - web/app/.keep | 0 web/static/.keep | 0 web/template/.keep | 0 website/README.md | 8 - 117 files changed, 7913 deletions(-) delete mode 100644 LICENSE delete mode 100644 Makefile delete mode 100644 Procfile delete mode 100644 README.md delete mode 100644 api/.keep delete mode 100644 api/README.md delete mode 100644 api/api.proto delete mode 100644 api/gen-boilerplate-go/api/api.pb.go delete mode 100644 api/gen-boilerplate-go/api/api.pb.gw.go delete mode 100644 api/gen-boilerplate-go/api/swagger.pb.go delete mode 100644 api/swagger.proto delete mode 100644 assets/.keep delete mode 100644 assets/README.md delete mode 100644 assets/swaggerui/api.swagger.json delete mode 100644 assets/swaggerui/favicon-16x16.png delete mode 100644 assets/swaggerui/favicon-32x32.png delete mode 100644 assets/swaggerui/index.html delete mode 100644 assets/swaggerui/oauth2-redirect.html delete mode 100644 assets/swaggerui/swagger-ui-bundle.js delete mode 100644 assets/swaggerui/swagger-ui-bundle.js.map delete mode 100644 assets/swaggerui/swagger-ui-standalone-preset.js delete mode 100644 assets/swaggerui/swagger-ui-standalone-preset.js.map delete mode 100644 assets/swaggerui/swagger-ui.css delete mode 100644 assets/swaggerui/swagger-ui.css.map delete mode 100644 assets/swaggerui/swagger-ui.js delete mode 100644 assets/swaggerui/swagger-ui.js.map delete mode 100644 build/README.md delete mode 100644 build/ci/.keep delete mode 100644 build/package/.keep delete mode 100644 build/package/project.dockerfile delete mode 100644 cmd/README.md delete mode 100644 cmd/boilerplate-go/.keep delete mode 100644 cmd/boilerplate-go/config.go delete mode 100644 cmd/boilerplate-go/handle.go delete mode 100644 cmd/boilerplate-go/main.go delete mode 100644 configs/.keep delete mode 100644 configs/README.md delete mode 100644 deployments/.keep delete mode 100644 deployments/README.md delete mode 100644 deployments/clickhouse-config.xml delete mode 100644 deployments/docker-compose-kafka.yml delete mode 100644 deployments/docker-compose.yml delete mode 100644 deployments/elasticsearch.yml delete mode 100644 deployments/enabled_plugins delete mode 100644 deployments/kubernetes/boilerplate-go-chart/.helmignore delete mode 100644 deployments/kubernetes/boilerplate-go-chart/Chart.yaml delete mode 100644 deployments/kubernetes/boilerplate-go-chart/templates/NOTES.txt delete mode 100644 deployments/kubernetes/boilerplate-go-chart/templates/_helpers.tpl delete mode 100644 deployments/kubernetes/boilerplate-go-chart/templates/deployment.yaml delete mode 100644 deployments/kubernetes/boilerplate-go-chart/templates/ingress.yaml delete mode 100644 deployments/kubernetes/boilerplate-go-chart/templates/service.yaml delete mode 100644 deployments/kubernetes/boilerplate-go-chart/values.yaml delete mode 100644 deployments/kubernetes/grafana-values.yaml delete mode 100644 deployments/kubernetes/ingress_p.yaml delete mode 100644 deployments/kubernetes/jaeger-values.yaml delete mode 100644 deployments/kubernetes/jaeger/.helmignore delete mode 100644 deployments/kubernetes/jaeger/Chart.yaml delete mode 100644 deployments/kubernetes/jaeger/templates/NOTES.txt delete mode 100644 deployments/kubernetes/jaeger/templates/jaeger.yaml delete mode 100644 deployments/kubernetes/jaeger/values.yaml delete mode 100644 deployments/kubernetes/prometheus-values.yaml delete mode 100644 deployments/log4j2.properties delete mode 100644 deployments/monitor/prometheus.yml delete mode 100644 docs/.keep delete mode 100644 docs/README.md delete mode 100644 examples/.keep delete mode 100644 examples/README.md delete mode 100644 githooks/.keep delete mode 100644 githooks/README.md delete mode 100644 go.mod delete mode 100644 go.sum delete mode 100644 init/.keep delete mode 100644 init/README.md delete mode 100644 internal/README.md delete mode 100644 internal/app/boilerplate/blockchain.go delete mode 100644 internal/app/boilerplate/boilerplate.go delete mode 100644 internal/app/fastsrv/graceful.go delete mode 100644 internal/app/fastsrv/handle.go delete mode 100644 internal/app/fastsrv/srv.go delete mode 100644 internal/app/grpc/grpc.go delete mode 100644 internal/app/serv/.keep delete mode 100644 internal/app/serv/graceful.go delete mode 100644 internal/app/serv/handle.go delete mode 100644 internal/app/serv/serv.go delete mode 100644 internal/pkg/clickhouse/client.go delete mode 100644 internal/pkg/elastic/client.go delete mode 100644 internal/pkg/logger/logger.go delete mode 100644 internal/pkg/logger/logrus/logger.go delete mode 100644 internal/pkg/pubsub/pubsub.go delete mode 100644 internal/pkg/pubsub/rabbitmq/client.go delete mode 100644 internal/pkg/redis/.keep delete mode 100644 internal/pkg/redis/client.go delete mode 100644 internal/pkg/redis/dummy.go delete mode 100644 internal/pkg/template/template.go delete mode 100644 internal/pkg/tracing/tracing.go delete mode 100644 internal/pkg/uaparser/uaparser.go delete mode 100644 pkg/README.md delete mode 100644 pkg/_your_public_lib_/.keep delete mode 100644 pkg/version/version.go delete mode 100644 scripts/.keep delete mode 100644 scripts/README.md delete mode 100644 test/.keep delete mode 100644 test/README.md delete mode 100644 third_party/.keep delete mode 100644 third_party/README.md delete mode 100644 tools/.keep delete mode 100644 tools/README.md delete mode 100644 tools/tools.go delete mode 100644 tpl/layouts/base.html delete mode 100644 tpl/layouts/js.html delete mode 100644 tpl/layouts/style.html delete mode 100644 tpl/main.html delete mode 100644 web/README.md delete mode 100644 web/app/.keep delete mode 100644 web/static/.keep delete mode 100644 web/template/.keep delete mode 100644 website/README.md diff --git a/LICENSE b/LICENSE deleted file mode 100644 index a5c7cc3..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 and07 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Makefile b/Makefile deleted file mode 100644 index 7fa474d..0000000 --- a/Makefile +++ /dev/null @@ -1,259 +0,0 @@ -# note: call scripts from /scripts -SERVICE_NAME=boilerplate-go -USER=and07 -VERSION=latest -REPOSITORY="$(USER)/$(SERVICE_NAME)" -QUAYVERSION = "${REPOSITORY}:$(VERSION)" - -TAG=${CI_BUILD_REF_NAME}_${CI_BUILD_REF} -CONTAINER_IMAGE=docker.io/${REPOSITORY}:${TAG} -CONTAINER_IMAGE_LATEST=${QUAYVERSION} -RELEASE?=0.0.1 - -LOCAL_BIN:=$(CURDIR)/bin - -# Check global GOLANGCI-LINT -GOLANGCI_BIN:=$(LOCAL_BIN)/golangci-lint -GOLANGCI_TAG:=1.26.0 - -# Check local bin version -ifneq ($(wildcard $(GOLANGCI_BIN)),) -GOLANGCI_BIN_VERSION:=$(shell $(GOLANGCI_BIN) --version) -ifneq ($(GOLANGCI_BIN_VERSION),) -GOLANGCI_BIN_VERSION_SHORT:=$(shell echo "$(GOLANGCI_BIN_VERSION)"|sed -E 's/.* version (.*) built from .* on .*/\1/g') -else -GOLANGCI_BIN_VERSION_SHORT:=0 -endif -ifneq "$(GOLANGCI_TAG)" "$(word 1, $(sort $(GOLANGCI_TAG) $(GOLANGCI_BIN_VERSION_SHORT)))" -GOLANGCI_BIN:= -endif -endif - -# Check global bin version -ifneq (, $(shell which golangci-lint)) -GOLANGCI_VERSION:=$(shell golangci-lint --version 2> /dev/null ) -ifneq ($(GOLANGCI_VERSION),) -GOLANGCI_VERSION_SHORT:=$(shell echo "$(GOLANGCI_VERSION)"|sed -E 's/.* version (.*) built from .* on .*/\1/g') -else -GOLANGCI_VERSION_SHORT:=0 -endif -ifeq "$(GOLANGCI_TAG)" "$(word 1, $(sort $(GOLANGCI_TAG) $(GOLANGCI_VERSION_SHORT)))" -GOLANGCI_BIN:=$(shell which golangci-lint) -endif -endif - -export GO111MODULE=on - -SHELL=/bin/bash -o pipefail - - -APP?=$(SERVICE_NAME) -PROJECT?=github.com/$(USER)/$(SERVICE_NAME) - -LDFLAGS:=-X '${PROJECT}/version.Name=$(SERVICE_NAME)'\ - -X '${PROJECT}/version.ProjectID=$(CI_PROJECT_ID)'\ - -X '${PROJECT}/version.Version=$(APP_VERSION)'\ - -X '${PROJECT}/version.GoVersion=$(GO_VERSION_SHORT)'\ - -X '${PROJECT}/version.BuildDate=$(BUILD_TS)'\ - -X '${PROJECT}/version.GitLog=$(GIT_LOG)'\ - -X '${PROJECT}/version.GitHash=$(GIT_HASH)'\ - -X '${PROJECT}/version.GitBranch=$(GIT_BRANCH)'\ - -X '${PROJECT}/version.publicPortDefault='\ - -X '${PROJECT}/version.adminPortDefault='\ - -X '${PROJECT}/version.grpcPortDefault=' - - -PKGMAP:=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/api.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,$\ - Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/source_context.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/type.proto=github.com/gogo/protobuf/types,$\ - Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types - - - --include .env - -test-env: - @echo ${MY_ENV} - -BUILD_ENVPARMS:=CGO_ENABLED=0 PORT=${PORT} PORT_DEBUG=${PORT_DEBUG} PORT_GRPC=${PORT_GRPC} LOG_LEVEL=${LOG_LEVEL} -BIN?=./bin/${APP} - -CONTAINER_IMAGE?=docker.io/webdeva/${APP} - -.PHONY: .deps -.deps: - $(info #Install dependencies...) - go mod download - -# install project dependencies -.PHONY: deps -deps: .deps ## deps: Download modules - -.PHONY: .test -.test: - $(info #Running tests...) - go test ./... - -test-coverage: ## Run tests with coverage - @go test -short -coverprofile cover.out -covermode=atomic ./... - @cat cover.out >> coverage.txt - - -clean: ## Remove previous build - @rm -f ./bin - -help: ## Display this help screen - @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' - -# run unit tests -.PHONY: test -test: .test ## Run tests - -.PHONY: install-protoc -install-protoc: ## Install protoc - go mod tidy - GOBIN=$(LOCAL_BIN) go install \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \ - github.com/golang/protobuf/protoc-gen-go - -gen-protoc: ## protoc generation - mkdir -p "./api/gen-${SERVICE_NAME}" - protoc -I/usr/local/include -I. \ - -I${GOPATH}/src \ - -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway \ - --grpc-gateway_out=logtostderr=true:./api/gen-$(SERVICE_NAME) \ - --swagger_out=allow_merge=true,merge_file_name=api:./assets/swaggerui \ - --go_out=plugins=grpc:./api/gen-$(SERVICE_NAME) ./api/*.proto - - -.PHONY: install-lint -install-lint: ## install golangci-lint binary -ifeq ($(wildcard $(GOLANGCI_BIN)),) - $(info #Downloading golangci-lint v$(GOLANGCI_TAG)) - go get -d github.com/golangci/golangci-lint@v$(GOLANGCI_TAG) - go build -ldflags "-X 'main.version=$(GOLANGCI_TAG)' -X 'main.commit=test' -X 'main.date=test'" -o $(LOCAL_BIN)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint - -GOLANGCI_BIN:=$(LOCAL_BIN)/golangci-lint -endif - -# run diff lint like in pipeline -.PHONY: .lint -.lint: install-lint - $(GOLANGCI_BIN) run --new-from-rev=origin/master --config=.golangci.pipeline.yaml ./... - -# golangci-lint diff master -.PHONY: lint -lint: .lint ## Lint Golang files - -# run full lint like in pipeline -.PHONY: lint-full -lint-full: install-lint ## run full lint - $(GOLANGCI_BIN) run --config=.golangci.pipeline.yaml ./... - - -.PHONY: .build -.build: - $(info #Building...) - $(BUILD_ENVPARMS) go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/${APP} - -# build app -.PHONY: build -build: .build ## Build the binary file - -.PHONY: .run -.run: - $(info #Running...) - $(BUILD_ENVPARMS) go run -ldflags "$(LDFLAGS)" ./cmd/${APP} -# run app -.PHONY: run -run: .run ## Run appication - - -.PHONY: docker-kill -docker-kill: ## Docker compose kill - docker-compose -f $${DC_FILE:-deployments/docker-compose.yml} kill - docker-compose -f $${DC_FILE:-deployments/docker-compose.yml} rm -f - docker network rm network-$${CI_JOB_ID:-local} || true - -.PHONY: docker-build -docker-build: docker-kill ## Docker build - env GOBUILD=env GOOS=linux GOARCH=amd64 $(BUILD_ENVPARMS) go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/${APP} - #docker build -f docker/pg-migrations.dockerfile -t pg-migrations-$${CI_JOB_ID:-local} . - docker build --no-cache -t $(QUAYVERSION) -f build/package/project.dockerfile . - #docker build --no-cache -f docker/itest.dockerfile -t itest-$${CI_JOB_ID:-local} . - -.PHONY: docker-up -docker-up: docker-build - docker network create network-$${CI_JOB_ID:-local} - docker-compose -f $${DC_FILE:-deployments/docker-compose.yml} up --force-recreate --renew-anon-volumes -d - -.PHONY: docker-logs -docker-logs: ## Docker logs - mkdir -p ./logs || true - #docker logs postgres-$${CI_JOB_ID:-local} >& logs/postgres.log - #docker logs pg-migrations-$${CI_JOB_ID:-local} >& logs/pg-migrations.log - docker logs $${SERVICE_NAME}-$${CI_JOB_ID:-local} >& logs/$${SERVICE_NAME}.log - docker logs redis-$${CI_JOB_ID:-local} >& logs/redis.log - docker logs rabbitmq-$${CI_JOB_ID:-local} >& logs/rabbitmq.log - docker logs elasticsearch-$${CI_JOB_ID:-local} >& logs/elasticsearch.log - docker logs kibana-$${CI_JOB_ID:-local} >& logs/kibana.log - docker logs prometheus-$${CI_JOB_ID:-local} >& logs/prometheus.log - docker logs clickhouse-$${CI_JOB_ID:-local} >& logs/clickhouse.log - - -BEFORE_DISK_FREE=$$(df -h /) -.PHONY: docker-clean -docker-clean: - @echo Останавливаем все контейнеры - docker kill $$(docker ps -q) || true - @echo Очистка докер контейнеров - docker rm -f $$(docker ps -a -f status=exited -q) || true - @echo Очистка dangling образов - docker rmi -f $$(docker images -f "dangling=true" -q) || true - @echo Очистка $${SERVICE_NAME} образов - docker rmi -f $$(docker images --filter=reference='$${SERVICE_NAME}*' -q) || true - #@echo Очистка itest образов - #docker rmi -f $$(docker images --filter=reference='itest*' -q) || true - #@echo Очистка pg-migrations образов - #docker rmi -f $$(docker images --filter=reference='pg-migrations*' -q) || true - @echo Очистка volume - docker volume rm -f $$(docker volume ls -q) || true - @echo Очистка сетей - docker network prune -f || true - @echo "Занятость диска до очистки:" - @echo "${BEFORE_DISK_FREE}" - @echo "Занятость диска после очистки:" - @echo "$$(df -h /)" - -docker-push: docker-build - docker push $(QUAYVERSION) - -.PHONY: docker-push-ci -docker-push-ci: ## Build go app for docker push - env GOBUILD=env GOOS=linux GOARCH=amd64 $(BUILD_ENVPARMS) go build -ldflags "$(LDFLAGS)" -o $(BIN) ./cmd/${APP} - docker build --no-cache -t ${CONTAINER_IMAGE} -f build/package/project.dockerfile . - echo $(VERSION) - docker tag ${CONTAINER_IMAGE} ${CONTAINER_IMAGE_LATEST} - docker push ${CONTAINER_IMAGE} - docker push $(CONTAINER_IMAGE_LATEST) - -minikube: ## Run minikube - minikube delete - minikube start --vm-driver=hyperkit - minikube addons enable ingress - - kubectl config get-contexts - kubectl config use-context minikube - - helm init - - minikube service list diff --git a/Procfile b/Procfile deleted file mode 100644 index 85ca4dd..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: bin/boilerplate-go diff --git a/README.md b/README.md deleted file mode 100644 index c9f297c..0000000 --- a/README.md +++ /dev/null @@ -1,83 +0,0 @@ -[![Go Report Card](https://goreportcard.com/badge/github.com/and07/boilerplate-go)](https://goreportcard.com/report/github.com/and07/boilerplate-go) -[![codecov](https://codecov.io/gh/and07/boilerplate-go/branch/master/graph/badge.svg)](https://codecov.io/gh/and07/boilerplate-go) -[![Actions Status](https://github.com/and07/boilerplate-go/workflows/Build%20and%20Test/badge.svg)](https://github.com/and07/boilerplate-go/actions) -[![MIT License](http://img.shields.io/:license-mit-blue.svg)](LICENSE) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fand07%2Fboilerplate-go.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fand07%2Fboilerplate-go?ref=badge_shield) - -# Standard Go Project Layout (Boilerplate-GO) - -This is a basic layout for Go application projects. - -[Go standards project layout](https://github.com/golang-standards/project-layout) - -[Local kubernetes setup with minikube on Mac OS X](https://hackernoon.com/local-kubernetes-setup-with-minikube-on-mac-os-x-eeeb1cbdc0b) - -[Using Helm to deploy to Kubernetes](https://daemonza.github.io/2017/02/20/using-helm-to-deploy-to-kubernetes/) - -[Kubernetes NodePort vs LoadBalancer vs Ingress? When should I use what?](https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0) - -https://qiita.com/sotoiwa/items/993990edf2bb98af7c1d#grafana - -```sh -$ echo "$(minikube ip) prometheus.minikube" | sudo tee -a /etc/hosts -$ echo "$(minikube ip) alertmanager.minikube" | sudo tee -a /etc/hosts -$ echo "$(minikube ip) grafana.minikube" | sudo tee -a /etc/hosts -$ echo "$(minikube ip) jaeger.minikube" | sudo tee -a /etc/hosts -$ echo "$(minikube ip) boi.minikube" | sudo tee -a /etc/hosts -$ echo "$(minikube ip) private-boi.minikube" | sudo tee -a /etc/hosts -``` - - -```sh -helm package jaeger --debug -helm package boilerplate-go-chart --debug -``` - -```sh -$ helm install --name jaeger jaeger-0.1.0.tgz - -$ helm install --name boi boilerplate-go-chart-0.1.0.tgz - -$ helm install --name prometheus --namespace monitoring -f prometheus-values.yaml stable/prometheus - -$ helm install --name grafana --namespace monitoring -f grafana-values.yaml stable/grafana -``` - -```sh -$ kubectl get secret --namespace monitoring grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo -``` - -```sh -helm del --purge jaeger -helm del --purge boi -helm del --purge grafana -helm del --purge prometheus -``` - -## GRPC - -```sh -grpc_cli ls localhost:8842 -l - -grpc_cli call localhost:8842 HttpBodyExampleService.HelloWorld '' - - -grpc_cli call localhost:8842 BlockchainService.Address 'address:"Mxb9a117e772a965a3fddddf83398fd8d71bf57ff6", height:11' - -grpc_cli call localhost:8842 BlockchainService.Subscribe 'query:"testete"' - -``` - -## GRPC http proxy -```sh -curl -X GET "http://localhost:8843/helloworld" -H "accept: application/json" - -curl -X GET "http://localhost:8843/address/Mxb9a117e772a965a3fddddf83398fd8d71bf57ff6?height=1" -H "accept: application/json" -``` - - -## swagger - -```sh -http://localhost:8888/swaggerui/ -``` diff --git a/api/.keep b/api/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/api/README.md b/api/README.md deleted file mode 100644 index c9c9f38..0000000 --- a/api/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# `/api` - -OpenAPI/Swagger specs, JSON schema files, protocol definition files. - -Examples: - -* https://github.com/kubernetes/kubernetes/tree/master/api -* https://github.com/openshift/origin/tree/master/api diff --git a/api/api.proto b/api/api.proto deleted file mode 100644 index 2a02fc7..0000000 --- a/api/api.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; -package api; -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; -import "google/api/httpbody.proto"; -import "google/protobuf/empty.proto"; - - -message AddressRequest { - string address = 1; - uint64 height = 2; -} -message AddressResponse { - map balance = 1; - string transactions_count = 2; -} -message SubscribeRequest { - string query = 1; -} -message SubscribeResponse { - string query = 1; - google.protobuf.Struct data = 2; - message Event { - string key = 1; - repeated string events = 2; - } - repeated Event events = 3; -} - - -service HttpBodyExampleService { - rpc HelloWorld(google.protobuf.Empty) returns (google.api.HttpBody) { - option (google.api.http) = { - get: "/helloworld" - }; - } -} - -service BlockchainService { - rpc Address (AddressRequest) returns (AddressResponse) { - option (google.api.http) = { - get: "/address/{address}" - }; - } - rpc Subscribe (SubscribeRequest) returns (stream SubscribeResponse) { - option (google.api.http) = { - get: "/subscribe" - }; - } -} \ No newline at end of file diff --git a/api/gen-boilerplate-go/api/api.pb.go b/api/gen-boilerplate-go/api/api.pb.go deleted file mode 100644 index a41a8ba..0000000 --- a/api/gen-boilerplate-go/api/api.pb.go +++ /dev/null @@ -1,527 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: api/api.proto - -package api - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - _struct "github.com/golang/protobuf/ptypes/struct" - _ "google.golang.org/genproto/googleapis/api/annotations" - httpbody "google.golang.org/genproto/googleapis/api/httpbody" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type AddressRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddressRequest) Reset() { *m = AddressRequest{} } -func (m *AddressRequest) String() string { return proto.CompactTextString(m) } -func (*AddressRequest) ProtoMessage() {} -func (*AddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1b40cafcd4234784, []int{0} -} - -func (m *AddressRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddressRequest.Unmarshal(m, b) -} -func (m *AddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddressRequest.Marshal(b, m, deterministic) -} -func (m *AddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressRequest.Merge(m, src) -} -func (m *AddressRequest) XXX_Size() int { - return xxx_messageInfo_AddressRequest.Size(m) -} -func (m *AddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressRequest proto.InternalMessageInfo - -func (m *AddressRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *AddressRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type AddressResponse struct { - Balance map[string]string `protobuf:"bytes,1,rep,name=balance,proto3" json:"balance,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - TransactionsCount string `protobuf:"bytes,2,opt,name=transactions_count,json=transactionsCount,proto3" json:"transactions_count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddressResponse) Reset() { *m = AddressResponse{} } -func (m *AddressResponse) String() string { return proto.CompactTextString(m) } -func (*AddressResponse) ProtoMessage() {} -func (*AddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1b40cafcd4234784, []int{1} -} - -func (m *AddressResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddressResponse.Unmarshal(m, b) -} -func (m *AddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddressResponse.Marshal(b, m, deterministic) -} -func (m *AddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressResponse.Merge(m, src) -} -func (m *AddressResponse) XXX_Size() int { - return xxx_messageInfo_AddressResponse.Size(m) -} -func (m *AddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressResponse proto.InternalMessageInfo - -func (m *AddressResponse) GetBalance() map[string]string { - if m != nil { - return m.Balance - } - return nil -} - -func (m *AddressResponse) GetTransactionsCount() string { - if m != nil { - return m.TransactionsCount - } - return "" -} - -type SubscribeRequest struct { - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} } -func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) } -func (*SubscribeRequest) ProtoMessage() {} -func (*SubscribeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1b40cafcd4234784, []int{2} -} - -func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubscribeRequest.Unmarshal(m, b) -} -func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic) -} -func (m *SubscribeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscribeRequest.Merge(m, src) -} -func (m *SubscribeRequest) XXX_Size() int { - return xxx_messageInfo_SubscribeRequest.Size(m) -} -func (m *SubscribeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SubscribeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SubscribeRequest proto.InternalMessageInfo - -func (m *SubscribeRequest) GetQuery() string { - if m != nil { - return m.Query - } - return "" -} - -type SubscribeResponse struct { - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - Data *_struct.Struct `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Events []*SubscribeResponse_Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubscribeResponse) Reset() { *m = SubscribeResponse{} } -func (m *SubscribeResponse) String() string { return proto.CompactTextString(m) } -func (*SubscribeResponse) ProtoMessage() {} -func (*SubscribeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1b40cafcd4234784, []int{3} -} - -func (m *SubscribeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubscribeResponse.Unmarshal(m, b) -} -func (m *SubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubscribeResponse.Marshal(b, m, deterministic) -} -func (m *SubscribeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscribeResponse.Merge(m, src) -} -func (m *SubscribeResponse) XXX_Size() int { - return xxx_messageInfo_SubscribeResponse.Size(m) -} -func (m *SubscribeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SubscribeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SubscribeResponse proto.InternalMessageInfo - -func (m *SubscribeResponse) GetQuery() string { - if m != nil { - return m.Query - } - return "" -} - -func (m *SubscribeResponse) GetData() *_struct.Struct { - if m != nil { - return m.Data - } - return nil -} - -func (m *SubscribeResponse) GetEvents() []*SubscribeResponse_Event { - if m != nil { - return m.Events - } - return nil -} - -type SubscribeResponse_Event struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Events []string `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubscribeResponse_Event) Reset() { *m = SubscribeResponse_Event{} } -func (m *SubscribeResponse_Event) String() string { return proto.CompactTextString(m) } -func (*SubscribeResponse_Event) ProtoMessage() {} -func (*SubscribeResponse_Event) Descriptor() ([]byte, []int) { - return fileDescriptor_1b40cafcd4234784, []int{3, 0} -} - -func (m *SubscribeResponse_Event) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubscribeResponse_Event.Unmarshal(m, b) -} -func (m *SubscribeResponse_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubscribeResponse_Event.Marshal(b, m, deterministic) -} -func (m *SubscribeResponse_Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscribeResponse_Event.Merge(m, src) -} -func (m *SubscribeResponse_Event) XXX_Size() int { - return xxx_messageInfo_SubscribeResponse_Event.Size(m) -} -func (m *SubscribeResponse_Event) XXX_DiscardUnknown() { - xxx_messageInfo_SubscribeResponse_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_SubscribeResponse_Event proto.InternalMessageInfo - -func (m *SubscribeResponse_Event) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *SubscribeResponse_Event) GetEvents() []string { - if m != nil { - return m.Events - } - return nil -} - -func init() { - proto.RegisterType((*AddressRequest)(nil), "api.AddressRequest") - proto.RegisterType((*AddressResponse)(nil), "api.AddressResponse") - proto.RegisterMapType((map[string]string)(nil), "api.AddressResponse.BalanceEntry") - proto.RegisterType((*SubscribeRequest)(nil), "api.SubscribeRequest") - proto.RegisterType((*SubscribeResponse)(nil), "api.SubscribeResponse") - proto.RegisterType((*SubscribeResponse_Event)(nil), "api.SubscribeResponse.Event") -} - -func init() { proto.RegisterFile("api/api.proto", fileDescriptor_1b40cafcd4234784) } - -var fileDescriptor_1b40cafcd4234784 = []byte{ - // 499 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x95, 0x93, 0x26, 0x51, 0x26, 0x2d, 0x34, 0xd3, 0x60, 0x8c, 0xe9, 0x21, 0xf8, 0x64, 0x09, - 0x61, 0x43, 0xe0, 0x80, 0xca, 0x89, 0xa0, 0x48, 0xbd, 0x51, 0x39, 0x07, 0x8e, 0x68, 0x6d, 0x2f, - 0xb1, 0x55, 0x77, 0xd7, 0xf5, 0xae, 0x03, 0x11, 0xe2, 0xc2, 0x2f, 0xf0, 0x31, 0x88, 0x13, 0x1f, - 0xc1, 0x2f, 0xf0, 0x21, 0xc8, 0xeb, 0xdd, 0x28, 0xa4, 0xb9, 0xed, 0xec, 0x7b, 0xf3, 0x66, 0xe6, - 0xcd, 0xc0, 0x09, 0x29, 0xf3, 0x90, 0x94, 0x79, 0x50, 0x56, 0x5c, 0x72, 0xec, 0x92, 0x32, 0x77, - 0xcf, 0x57, 0x9c, 0xaf, 0x0a, 0x1a, 0x2a, 0x88, 0x31, 0x2e, 0x89, 0xcc, 0x39, 0x13, 0x2d, 0x65, - 0x8b, 0xaa, 0x28, 0xae, 0x3f, 0x85, 0x42, 0x56, 0x75, 0x22, 0x35, 0xfa, 0x68, 0x27, 0x37, 0x93, - 0xb2, 0x8c, 0x79, 0xba, 0xd1, 0xd0, 0xe3, 0xfd, 0x44, 0x7a, 0x53, 0x4a, 0x0d, 0x7a, 0x73, 0xb8, - 0xf7, 0x36, 0x4d, 0x2b, 0x2a, 0x44, 0x44, 0x6f, 0x6b, 0x2a, 0x24, 0x3a, 0x30, 0x20, 0xed, 0x8f, - 0x63, 0x4d, 0x2d, 0x7f, 0x18, 0x99, 0x10, 0x6d, 0xe8, 0x67, 0x34, 0x5f, 0x65, 0xd2, 0xe9, 0x4c, - 0x2d, 0xff, 0x28, 0xd2, 0x91, 0xf7, 0xcb, 0x82, 0xfb, 0x5b, 0x11, 0x51, 0x72, 0x26, 0x28, 0xbe, - 0x81, 0x41, 0x4c, 0x0a, 0xc2, 0x12, 0xea, 0x58, 0xd3, 0xae, 0x3f, 0x9a, 0x3d, 0x09, 0x9a, 0x69, - 0xf7, 0x68, 0xc1, 0xbc, 0xe5, 0x2c, 0x98, 0xac, 0x36, 0x91, 0xc9, 0xc0, 0x67, 0x80, 0xb2, 0x22, - 0x4c, 0x90, 0x44, 0x19, 0xf0, 0x31, 0xe1, 0x35, 0x6b, 0x8b, 0x0e, 0xa3, 0xf1, 0x2e, 0xf2, 0xae, - 0x01, 0xdc, 0x0b, 0x38, 0xde, 0xd5, 0xc1, 0x53, 0xe8, 0x5e, 0xd3, 0x8d, 0xee, 0xbe, 0x79, 0xe2, - 0x04, 0x7a, 0x6b, 0x52, 0xd4, 0x54, 0x6b, 0xb4, 0xc1, 0x45, 0xe7, 0xb5, 0xe5, 0xf9, 0x70, 0xba, - 0xac, 0x63, 0x91, 0x54, 0x79, 0x4c, 0x8d, 0x03, 0x13, 0xe8, 0xdd, 0xd6, 0xb4, 0x32, 0x0a, 0x6d, - 0xe0, 0xfd, 0xb6, 0x60, 0xbc, 0x43, 0xd5, 0x73, 0x1e, 0xe4, 0xe2, 0x53, 0x38, 0x4a, 0x89, 0x24, - 0xaa, 0xdc, 0x68, 0xf6, 0x30, 0x68, 0x37, 0x10, 0x98, 0x0d, 0x04, 0x4b, 0xb5, 0xba, 0x48, 0x91, - 0xf0, 0x15, 0xf4, 0xe9, 0x9a, 0x32, 0x29, 0x9c, 0xae, 0x72, 0xea, 0x5c, 0x39, 0x75, 0xa7, 0x54, - 0xb0, 0x68, 0x48, 0x91, 0xe6, 0xba, 0x2f, 0xa0, 0xa7, 0x3e, 0x0e, 0x4c, 0x6b, 0x6f, 0x05, 0x3b, - 0xd3, 0xae, 0x3f, 0x34, 0x29, 0xb3, 0x1c, 0xec, 0x4b, 0x29, 0xcb, 0x39, 0x4f, 0x37, 0x8b, 0x2f, - 0xe4, 0xa6, 0x2c, 0xe8, 0x92, 0x56, 0xeb, 0x3c, 0xa1, 0xf8, 0x1e, 0xe0, 0x92, 0x16, 0x05, 0xff, - 0xc0, 0xab, 0x22, 0x45, 0xfb, 0x4e, 0xbf, 0x8b, 0xe6, 0x62, 0xdc, 0x89, 0xf9, 0x6f, 0xfa, 0x33, - 0x4a, 0xde, 0xd9, 0xf7, 0x3f, 0x7f, 0x7f, 0x74, 0x4e, 0x70, 0x14, 0x66, 0x8d, 0xc4, 0xe7, 0x46, - 0x62, 0xf6, 0xd3, 0x82, 0xf1, 0xbc, 0xe0, 0xc9, 0x75, 0x92, 0x91, 0x9c, 0x99, 0x32, 0x57, 0x30, - 0xd0, 0x07, 0x80, 0x67, 0xff, 0x9f, 0x83, 0x32, 0xde, 0x9d, 0x1c, 0xba, 0x11, 0xcf, 0x55, 0x05, - 0x26, 0x88, 0xa1, 0x3e, 0xc4, 0xf0, 0xab, 0x7e, 0x7c, 0xc3, 0x2b, 0x18, 0x6e, 0x8d, 0xc2, 0x07, - 0xfb, 0xc6, 0xb5, 0xaa, 0xf6, 0x61, 0x3f, 0x3d, 0x54, 0xba, 0xc7, 0x08, 0xa1, 0x30, 0xd8, 0x73, - 0x2b, 0xee, 0xab, 0xa1, 0x5f, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x26, 0x99, 0x92, 0xa1, - 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// HttpBodyExampleServiceClient is the client API for HttpBodyExampleService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HttpBodyExampleServiceClient interface { - HelloWorld(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error) -} - -type httpBodyExampleServiceClient struct { - cc *grpc.ClientConn -} - -func NewHttpBodyExampleServiceClient(cc *grpc.ClientConn) HttpBodyExampleServiceClient { - return &httpBodyExampleServiceClient{cc} -} - -func (c *httpBodyExampleServiceClient) HelloWorld(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error) { - out := new(httpbody.HttpBody) - err := c.cc.Invoke(ctx, "/api.HttpBodyExampleService/HelloWorld", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HttpBodyExampleServiceServer is the server API for HttpBodyExampleService service. -type HttpBodyExampleServiceServer interface { - HelloWorld(context.Context, *empty.Empty) (*httpbody.HttpBody, error) -} - -// UnimplementedHttpBodyExampleServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHttpBodyExampleServiceServer struct { -} - -func (*UnimplementedHttpBodyExampleServiceServer) HelloWorld(ctx context.Context, req *empty.Empty) (*httpbody.HttpBody, error) { - return nil, status.Errorf(codes.Unimplemented, "method HelloWorld not implemented") -} - -func RegisterHttpBodyExampleServiceServer(s *grpc.Server, srv HttpBodyExampleServiceServer) { - s.RegisterService(&_HttpBodyExampleService_serviceDesc, srv) -} - -func _HttpBodyExampleService_HelloWorld_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HttpBodyExampleServiceServer).HelloWorld(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.HttpBodyExampleService/HelloWorld", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HttpBodyExampleServiceServer).HelloWorld(ctx, req.(*empty.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _HttpBodyExampleService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.HttpBodyExampleService", - HandlerType: (*HttpBodyExampleServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "HelloWorld", - Handler: _HttpBodyExampleService_HelloWorld_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/api.proto", -} - -// BlockchainServiceClient is the client API for BlockchainService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type BlockchainServiceClient interface { - Address(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressResponse, error) - Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (BlockchainService_SubscribeClient, error) -} - -type blockchainServiceClient struct { - cc *grpc.ClientConn -} - -func NewBlockchainServiceClient(cc *grpc.ClientConn) BlockchainServiceClient { - return &blockchainServiceClient{cc} -} - -func (c *blockchainServiceClient) Address(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressResponse, error) { - out := new(AddressResponse) - err := c.cc.Invoke(ctx, "/api.BlockchainService/Address", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainServiceClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (BlockchainService_SubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &_BlockchainService_serviceDesc.Streams[0], "/api.BlockchainService/Subscribe", opts...) - if err != nil { - return nil, err - } - x := &blockchainServiceSubscribeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type BlockchainService_SubscribeClient interface { - Recv() (*SubscribeResponse, error) - grpc.ClientStream -} - -type blockchainServiceSubscribeClient struct { - grpc.ClientStream -} - -func (x *blockchainServiceSubscribeClient) Recv() (*SubscribeResponse, error) { - m := new(SubscribeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// BlockchainServiceServer is the server API for BlockchainService service. -type BlockchainServiceServer interface { - Address(context.Context, *AddressRequest) (*AddressResponse, error) - Subscribe(*SubscribeRequest, BlockchainService_SubscribeServer) error -} - -// UnimplementedBlockchainServiceServer can be embedded to have forward compatible implementations. -type UnimplementedBlockchainServiceServer struct { -} - -func (*UnimplementedBlockchainServiceServer) Address(ctx context.Context, req *AddressRequest) (*AddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Address not implemented") -} -func (*UnimplementedBlockchainServiceServer) Subscribe(req *SubscribeRequest, srv BlockchainService_SubscribeServer) error { - return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") -} - -func RegisterBlockchainServiceServer(s *grpc.Server, srv BlockchainServiceServer) { - s.RegisterService(&_BlockchainService_serviceDesc, srv) -} - -func _BlockchainService_Address_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServiceServer).Address(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.BlockchainService/Address", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServiceServer).Address(ctx, req.(*AddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BlockchainService_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SubscribeRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(BlockchainServiceServer).Subscribe(m, &blockchainServiceSubscribeServer{stream}) -} - -type BlockchainService_SubscribeServer interface { - Send(*SubscribeResponse) error - grpc.ServerStream -} - -type blockchainServiceSubscribeServer struct { - grpc.ServerStream -} - -func (x *blockchainServiceSubscribeServer) Send(m *SubscribeResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _BlockchainService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.BlockchainService", - HandlerType: (*BlockchainServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Address", - Handler: _BlockchainService_Address_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Subscribe", - Handler: _BlockchainService_Subscribe_Handler, - ServerStreams: true, - }, - }, - Metadata: "api/api.proto", -} diff --git a/api/gen-boilerplate-go/api/api.pb.gw.go b/api/gen-boilerplate-go/api/api.pb.gw.go deleted file mode 100644 index 1aab7d1..0000000 --- a/api/gen-boilerplate-go/api/api.pb.gw.go +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: api/api.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_HttpBodyExampleService_HelloWorld_0(ctx context.Context, marshaler runtime.Marshaler, client HttpBodyExampleServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty - var metadata runtime.ServerMetadata - - msg, err := client.HelloWorld(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_HttpBodyExampleService_HelloWorld_0(ctx context.Context, marshaler runtime.Marshaler, server HttpBodyExampleServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty - var metadata runtime.ServerMetadata - - msg, err := server.HelloWorld(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_BlockchainService_Address_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_BlockchainService_Address_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BlockchainService_Address_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Address(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_BlockchainService_Address_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BlockchainService_Address_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Address(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_BlockchainService_Subscribe_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_BlockchainService_Subscribe_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainServiceClient, req *http.Request, pathParams map[string]string) (BlockchainService_SubscribeClient, runtime.ServerMetadata, error) { - var protoReq SubscribeRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BlockchainService_Subscribe_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - stream, err := client.Subscribe(ctx, &protoReq) - if err != nil { - return nil, metadata, err - } - header, err := stream.Header() - if err != nil { - return nil, metadata, err - } - metadata.HeaderMD = header - return stream, metadata, nil - -} - -// RegisterHttpBodyExampleServiceHandlerServer registers the http handlers for service HttpBodyExampleService to "mux". -// UnaryRPC :call HttpBodyExampleServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterHttpBodyExampleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HttpBodyExampleServiceServer) error { - - mux.Handle("GET", pattern_HttpBodyExampleService_HelloWorld_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_HttpBodyExampleService_HelloWorld_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_HttpBodyExampleService_HelloWorld_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterBlockchainServiceHandlerServer registers the http handlers for service BlockchainService to "mux". -// UnaryRPC :call BlockchainServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterBlockchainServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServiceServer) error { - - mux.Handle("GET", pattern_BlockchainService_Address_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_BlockchainService_Address_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BlockchainService_Address_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_BlockchainService_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") - _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - }) - - return nil -} - -// RegisterHttpBodyExampleServiceHandlerFromEndpoint is same as RegisterHttpBodyExampleServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterHttpBodyExampleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterHttpBodyExampleServiceHandler(ctx, mux, conn) -} - -// RegisterHttpBodyExampleServiceHandler registers the http handlers for service HttpBodyExampleService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterHttpBodyExampleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterHttpBodyExampleServiceHandlerClient(ctx, mux, NewHttpBodyExampleServiceClient(conn)) -} - -// RegisterHttpBodyExampleServiceHandlerClient registers the http handlers for service HttpBodyExampleService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HttpBodyExampleServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HttpBodyExampleServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "HttpBodyExampleServiceClient" to call the correct interceptors. -func RegisterHttpBodyExampleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HttpBodyExampleServiceClient) error { - - mux.Handle("GET", pattern_HttpBodyExampleService_HelloWorld_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_HttpBodyExampleService_HelloWorld_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_HttpBodyExampleService_HelloWorld_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_HttpBodyExampleService_HelloWorld_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"helloworld"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_HttpBodyExampleService_HelloWorld_0 = runtime.ForwardResponseMessage -) - -// RegisterBlockchainServiceHandlerFromEndpoint is same as RegisterBlockchainServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterBlockchainServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterBlockchainServiceHandler(ctx, mux, conn) -} - -// RegisterBlockchainServiceHandler registers the http handlers for service BlockchainService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterBlockchainServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterBlockchainServiceHandlerClient(ctx, mux, NewBlockchainServiceClient(conn)) -} - -// RegisterBlockchainServiceHandlerClient registers the http handlers for service BlockchainService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "BlockchainServiceClient" to call the correct interceptors. -func RegisterBlockchainServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainServiceClient) error { - - mux.Handle("GET", pattern_BlockchainService_Address_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_BlockchainService_Address_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BlockchainService_Address_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_BlockchainService_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_BlockchainService_Subscribe_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_BlockchainService_Subscribe_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_BlockchainService_Address_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"address"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_BlockchainService_Subscribe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subscribe"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_BlockchainService_Address_0 = runtime.ForwardResponseMessage - - forward_BlockchainService_Subscribe_0 = runtime.ForwardResponseStream -) diff --git a/api/gen-boilerplate-go/api/swagger.pb.go b/api/gen-boilerplate-go/api/swagger.pb.go deleted file mode 100644 index 4db264d..0000000 --- a/api/gen-boilerplate-go/api/swagger.pb.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: api/swagger.proto - -package api - -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("api/swagger.proto", fileDescriptor_5f2c20cb4d8292fe) } - -var fileDescriptor_5f2c20cb4d8292fe = []byte{ - // 234 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x8e, 0xb1, 0x4e, 0xc3, 0x30, - 0x14, 0x45, 0x95, 0x06, 0x8a, 0xe4, 0x01, 0x51, 0x4f, 0xa8, 0x93, 0x61, 0xac, 0x48, 0x1c, 0xda, - 0x48, 0x54, 0xe9, 0x04, 0x3b, 0x4b, 0xff, 0xc0, 0x71, 0x9e, 0x6c, 0x23, 0xe3, 0x67, 0xd9, 0x2f, - 0x2a, 0xfc, 0x06, 0x23, 0x9f, 0xc1, 0xc0, 0xf7, 0x21, 0x19, 0x36, 0xb6, 0xa3, 0x7b, 0x74, 0x75, - 0x2f, 0x5b, 0xa9, 0xe8, 0x64, 0x3e, 0x29, 0x63, 0x20, 0xb5, 0x31, 0x21, 0x21, 0xaf, 0x55, 0x74, - 0xeb, 0xbb, 0xc2, 0xba, 0x31, 0x10, 0x9a, 0x3f, 0x2d, 0x31, 0x92, 0xc3, 0x90, 0xa5, 0x0a, 0x01, - 0x49, 0x15, 0xfe, 0xad, 0x3c, 0x7d, 0x57, 0x1f, 0x8f, 0x5f, 0x15, 0x3f, 0xb0, 0xd5, 0xf3, 0xbb, - 0x18, 0xd1, 0x79, 0x48, 0xd1, 0x2b, 0x82, 0xc6, 0xe0, 0xed, 0x0d, 0x3b, 0x57, 0x61, 0xea, 0x1e, - 0xf8, 0xb5, 0x25, 0x8a, 0x79, 0x90, 0xd2, 0x38, 0xb2, 0xf3, 0xd8, 0x6a, 0x7c, 0x95, 0xc5, 0x6c, - 0xeb, 0xfb, 0xb6, 0x5b, 0x5f, 0x7a, 0xd4, 0xca, 0x5b, 0xcc, 0x34, 0xec, 0xf7, 0xfd, 0x6e, 0xb3, - 0xa8, 0x16, 0xdb, 0x2b, 0x15, 0xa3, 0x77, 0xba, 0x6c, 0xc9, 0x97, 0x8c, 0x61, 0xf8, 0x97, 0x1c, - 0x0f, 0xac, 0xee, 0xbb, 0x9e, 0xf7, 0x6c, 0x73, 0x04, 0x9a, 0x53, 0x80, 0x49, 0x9c, 0x2c, 0x04, - 0x41, 0x16, 0x44, 0x82, 0x8c, 0x73, 0xd2, 0x20, 0x26, 0x84, 0x2c, 0x02, 0x92, 0x80, 0x37, 0x97, - 0xa9, 0xe5, 0x4b, 0x76, 0xf6, 0xb9, 0xa8, 0x2e, 0xc6, 0x65, 0xf9, 0xbf, 0xfb, 0x09, 0x00, 0x00, - 0xff, 0xff, 0xcd, 0xc1, 0xa1, 0x53, 0x07, 0x01, 0x00, 0x00, -} diff --git a/api/swagger.proto b/api/swagger.proto deleted file mode 100644 index 8e5bd6f..0000000 --- a/api/swagger.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -import "protoc-gen-swagger/options/annotations.proto"; - -package api; - -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { - info: { - title: "My boilerplate-go" - version: "1.0" - contact: { - name: "and07" - url: "https://github.com/and07" - email: "" - }; - }; - host: "localhost:8843" - schemes: [HTTP,HTTPS] - consumes: "application/json" - produces: "application/json" - responses: { - key: "404" - value: { - description: "Returned when the resource does not exist." - schema: { - json_schema: { - type: STRING - }; - }; - }; - }; -}; \ No newline at end of file diff --git a/assets/.keep b/assets/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/assets/README.md b/assets/README.md deleted file mode 100644 index 231c571..0000000 --- a/assets/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `/assets` - -Other assets to go along with your repository (images, logos, etc). diff --git a/assets/swaggerui/api.swagger.json b/assets/swaggerui/api.swagger.json deleted file mode 100644 index f1959c3..0000000 --- a/assets/swaggerui/api.swagger.json +++ /dev/null @@ -1,281 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "My boilerplate-go", - "version": "1.0", - "contact": { - "name": "and07", - "url": "https://github.com/and07" - } - }, - "host": "localhost:8843", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/address/{address}": { - "get": { - "operationId": "BlockchainService_Address", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiAddressResponse" - } - }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "type": "string", - "format": "string" - } - }, - "default": { - "description": "An unexpected error response", - "schema": { - "$ref": "#/definitions/runtimeError" - } - } - }, - "parameters": [ - { - "name": "address", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "height", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "BlockchainService" - ] - } - }, - "/helloworld": { - "get": { - "operationId": "HttpBodyExampleService_HelloWorld", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiHttpBody" - } - }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "type": "string", - "format": "string" - } - }, - "default": { - "description": "An unexpected error response", - "schema": { - "$ref": "#/definitions/runtimeError" - } - } - }, - "tags": [ - "HttpBodyExampleService" - ] - } - }, - "/subscribe": { - "get": { - "operationId": "BlockchainService_Subscribe", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/apiSubscribeResponse" - }, - "error": { - "$ref": "#/definitions/runtimeStreamError" - } - }, - "title": "Stream result of apiSubscribeResponse" - } - }, - "404": { - "description": "Returned when the resource does not exist.", - "schema": { - "type": "string", - "format": "string" - } - }, - "default": { - "description": "An unexpected error response", - "schema": { - "$ref": "#/definitions/runtimeError" - } - } - }, - "parameters": [ - { - "name": "query", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "BlockchainService" - ] - } - } - }, - "definitions": { - "SubscribeResponseEvent": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "events": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "apiAddressResponse": { - "type": "object", - "properties": { - "balance": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "transactions_count": { - "type": "string" - } - } - }, - "apiHttpBody": { - "type": "object", - "properties": { - "content_type": { - "type": "string", - "description": "The HTTP Content-Type header value specifying the content type of the body." - }, - "data": { - "type": "string", - "format": "byte", - "description": "The HTTP request/response body as raw binary." - }, - "extensions": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - }, - "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs." - } - }, - "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody) returns\n (google.protobuf.Empty);\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged." - }, - "apiSubscribeResponse": { - "type": "object", - "properties": { - "query": { - "type": "string" - }, - "data": { - "type": "object" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/SubscribeResponseEvent" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "runtimeStreamError": { - "type": "object", - "properties": { - "grpc_code": { - "type": "integer", - "format": "int32" - }, - "http_code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "http_status": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/assets/swaggerui/favicon-16x16.png b/assets/swaggerui/favicon-16x16.png deleted file mode 100644 index 8b194e617af1c135e6b37939591d24ac3a5efa18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 665 zcmV;K0%rY*P)}JKSduyL>)s!A4EhTMMEM%Q;aL6%l#xiZiF>S;#Y{N2Zz%pvTGHJduXuC6Lx-)0EGfRy*N{Tv4i8@4oJ41gw zKzThrcRe|7J~(YYIBq{SYCkn-KQm=N8$CrEK1CcqMI1dv9z#VRL_{D)L|`QmF8}}l zJ9JV`Q}p!p_4f7m_U`WQ@apR4;o;!mnU<7}iG_qr zF(e)x9~BG-3IzcG2M4an0002kNkl41`ZiN1i62V%{PM@Ry|IS_+Yc7{bb`MM~xm(7p4|kMHP&!VGuDW4kFixat zXw43VmgwEvB$hXt_u=vZ>+v4i7E}n~eG6;n4Z=zF1n?T*yg<;W6kOfxpC6nao>VR% z?fpr=asSJ&`L*wu^rLJ5Peq*PB0;alL#XazZCBxJLd&giTfw@!hW167F^`7kobi;( ze<<>qNlP|xy7S1zl@lZNIBR7#o9ybJsptO#%}P0hz~sBp00000NkvXXu0mjfUsDF? diff --git a/assets/swaggerui/favicon-32x32.png b/assets/swaggerui/favicon-32x32.png deleted file mode 100644 index 249737fe44558e679f0b67134e274461d988fa98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 628 zcmV-)0*n2LP)Ma*GM0}OV<074bNCP7P7GVd{iMr*I6y~TMLss@FjvgL~HxU z%Vvj33AwpD(Z4*$Mfx=HaU16axM zt2xG_rloN<$iy9j9I5 - - - - - Swagger UI - - - - - - - -
- - - - - - diff --git a/assets/swaggerui/oauth2-redirect.html b/assets/swaggerui/oauth2-redirect.html deleted file mode 100644 index a013fc8..0000000 --- a/assets/swaggerui/oauth2-redirect.html +++ /dev/null @@ -1,68 +0,0 @@ - - -Swagger UI: OAuth2 Redirect - - - - diff --git a/assets/swaggerui/swagger-ui-bundle.js b/assets/swaggerui/swagger-ui-bundle.js deleted file mode 100644 index f314352..0000000 --- a/assets/swaggerui/swagger-ui-bundle.js +++ /dev/null @@ -1,134 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(window,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=492)}([function(e,t,n){"use strict";e.exports=n(104)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function i(e){return a(e)&&!c(e)?e:$(e)}function a(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=i;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m=5,v=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function O(){return!0}function A(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return I(e,t,0)}function j(e,t){return I(e,t,t)}function I(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var P=0,M=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function B(e){return!!H(e)}function z(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():a(e)?e.toSeq():function(e){var t=ue(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function K(e){return null==e?ie().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():ae(e)}function Y(e){return null==e?ie():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():se(e)}function $(e){return(null==e?ie():a(e)?s(e)?e.entrySeq():e:se(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=P,U.VALUES=M,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return ce(this,e,t,!0)},J.prototype.__iterator=function(e,t){return le(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return ce(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return le(this,e,t,!1)},t($,J),$.of=function(){return $(arguments)},$.prototype.toSetSeq=function(){return this},J.isSeq=oe,J.Keyed=K,J.Set=$,J.Indexed=Y;var G,Z,X,Q="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function re(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[Q])}function ie(){return G||(G=new ee([]))}function ae(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():B(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function se(e){var t=ue(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ue(e){return W(e)?new ee(e):z(e)?new re(e):B(e)?new ne(e):void 0}function ce(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var s=o[n?i-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function le(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new U(function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:q(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function pe(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,Y(n).map(function(r,o){return e(t,r,o,n)})):he(n)?t.call(o,r,K(n).map(function(r,o){return e(t,r,o,n)})):n}(t,e,"",{"":e}):fe(e)}function fe(e){return Array.isArray(e)?Y(e).map(fe).toList():he(e)?K(e).map(fe).toMap():e}function he(e){return e&&(e.constructor===Object||void 0===e.constructor)}function de(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function me(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every(function(e,t){var o=r.next().value;return o&&de(o[1],e)&&(n||de(o[0],t))})&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):o?!de(t,e.get(r,y)):!de(e.get(r,y),t))return p=!1,!1});return p&&e.size===f}function ve(e,t){if(!(this instanceof ve))return new ve(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function ge(e,t){if(!e)throw new Error(t)}function ye(e,t,n){if(!(this instanceof ye))return new ye(e,t,n);if(ge(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:q(e,o,n[t?r-o++:o++])})},t(te,K),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},te.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new U(function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:q(e,a,n[a])})},te.prototype[d]=!0,t(ne,Y),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=V(this._iterable),r=0;if(z(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=V(this._iterable);if(!z(n))return new U(F);var r=0;return new U(function(){var t=n.next();return t.done?t:q(e,r++,t.value)})},t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return q(e,o,r[o++])})},t(ve,Y),ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ve.prototype.get=function(e,t){return this.has(e)?this._value:t},ve.prototype.includes=function(e){return de(this._value,e)},ve.prototype.slice=function(e,t){var n=this.size;return A(e,t,n)?this:new ve(this._value,j(t,n)-T(e,n))},ve.prototype.reverse=function(){return this},ve.prototype.indexOf=function(e){return de(this._value,e)?0:-1},ve.prototype.lastIndexOf=function(e){return de(this._value,e)?this.size:-1},ve.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:q(e,i++,a)})},ye.prototype.equals=function(e){return e instanceof ye?this._start===e._start&&this._end===e._end&&this._step===e._step:me(this,e)},t(be,n),t(_e,be),t(we,be),t(xe,be),be.Keyed=_e,be.Indexed=we,be.Set=xe;var Ee="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Ce(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>Me?function(e){var t=De[e];return void 0===t&&(t=ke(e),Re===Ne&&(Re=0,De={}),Re++,De[e]=t),t}(e):ke(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(je&&void 0!==(t=Oe.get(e)))return t;if(void 0!==(t=e[Pe]))return t;if(!Te){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Pe]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Ie,1073741824&Ie&&(Ie=0),je)Oe.set(e,t);else{if(void 0!==Ae&&!1===Ae(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Te)Object.defineProperty(e,Pe,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Pe]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Pe]=t}}return t}(e);if("function"==typeof e.toString)return ke(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ke(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return Qe(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return Qe(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var i=t===y,a=n.next();if(a.done){var s=i?r:t,u=o(s);return u===s?t:u}ge(i||t&&t.set,"invalid keyPath");var c=a.value,l=i?y:t.get(c,y),p=e(l,n,r,o);return p===l?t:p===y?t.remove(c):(i?Xe():t).set(c,p)}(this,rn(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xe()},Ue.prototype.merge=function(){return rt(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){var n=e.call(arguments,1);return rt(this,t,n)},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return rt(this,ot,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return rt(this,it(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Tt(Jt(this,e))},Ue.prototype.sortBy=function(e,t){return Tt(Jt(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new E)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new Ye(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ze(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var Fe,Be="@@__IMMUTABLE_MAP__@@",ze=Ue.prototype;function Ve(e,t){this.ownerID=e,this.entries=t}function He(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function We(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Ke(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ye(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Ge(e._root)}function $e(e,t){return q(e,t[0],t[1])}function Ge(e,t){return{node:e,index:0,__prev:t}}function Ze(e,t,n,r){var o=Object.create(ze);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Xe(){return Fe||(Fe=Ze(0))}function Qe(e,t,n){var r,o;if(e._root){var i=w(b),a=w(_);if(r=et(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===y?-1:1:0)}else{if(n===y)return e;o=1,r=new Ve(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ze(o,r):Xe()}function et(e,t,n,r,o,i,a,s){return e?e.update(t,n,r,o,i,a,s):i===y?e:(x(s),x(a),new Ke(t,r,[o,i]))}function tt(e){return e.constructor===Ke||e.constructor===Je}function nt(e,t,n,r,o){if(e.keyHash===r)return new Je(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&g,s=(0===n?r:r>>>n)&g;return new He(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function ut(e,t,n,r){var o=r?e:S(e);return o[t]=n,o}ze[Be]=!0,ze.delete=ze.remove,ze.removeIn=ze.deleteIn,Ve.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i=ct)return function(e,t,n,r){e||(e=new E);for(var o=new Ke(e,Ce(n),[n,r]),i=0;i>>e)&g),i=this.bitmap;return 0==(i&o)?r:this.nodes[st(i&o-1)].get(e+m,t,n,r)},He.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var s=(0===t?n:n>>>t)&g,u=1<=lt)return function(e,t,n,r,o){for(var i=0,a=new Array(v),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[i++]:void 0;return a[r]=o,new We(e,i+1,a)}(e,f,c,s,d);if(l&&!d&&2===f.length&&tt(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&tt(d))return d;var b=e&&e===this.ownerID,_=l?d?c:c^u:c|u,w=l?d?ut(f,p,d,b):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a>>e)&g,i=this.nodes[o];return i?i.get(e+m,t,n,r):r},We.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var s=(0===t?n:n>>>t)&g,u=o===y,c=this.nodes,l=c[s];if(u&&!l)return this;var p=et(l,e,t+m,n,r,o,i,a);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&r=0&&e=e.size||t<0)return e.withMutations(function(e){t<0?kt(e,t).set(0,n):kt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,o=e._root,i=w(_);return t>=At(e._capacity)?r=Et(r,e.__ownerID,0,t,n,i):o=Et(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):wt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ft.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ft.prototype.insert=function(e,t){return this.splice(e,0,t)},ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):xt()},ft.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){kt(n,0,t+e.length);for(var r=0;r>>t&g;if(r>=this.array.length)return new vt([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-m,n))===a&&i)return this}if(i&&!o)return this;var s=St(this,e);if(!i)for(var u=0;u>>t&g;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-m,n))===i&&o===this.array.length-1)return this}var a=St(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var gt,yt,bt={};function _t(e,t){var n=e._origin,r=e._capacity,o=At(r),i=e._tail;return a(e._root,e._level,0);function a(e,s,u){return 0===s?function(e,a){var s=a===o?i&&i.array:e&&e.array,u=a>n?0:n-a,c=r-a;return c>v&&(c=v),function(){if(u===c)return bt;var e=t?--c:u++;return s&&s[e]}}(e,u):function(e,o,i){var s,u=e&&e.array,c=i>n?0:n-i>>o,l=1+(r-i>>o);return l>v&&(l=v),function(){for(;;){if(s){var e=s();if(e!==bt)return e;s=null}if(c===l)return bt;var n=t?--l:c++;s=a(u&&u[n],o-m,i+(n<>>n&g,u=e&&s0){var c=e&&e.array[s],l=Et(c,t,n-m,r,o,i);return l===c?e:((a=St(e,t)).array[s]=l,a)}return u&&e.array[s]===o?e:(x(i),a=St(e,t),void 0===o&&s===a.array.length-1?a.array.pop():a.array[s]=o,a)}function St(e,t){return t&&e&&t===e.ownerID?e:new vt(e?e.array.slice():[],t)}function Ct(e,t){if(t>=At(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&g],r-=m;return n}}function kt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new E,o=e._origin,i=e._capacity,a=o+t,s=void 0===n?i:n<0?i+n:o+n;if(a===o&&s===i)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new vt(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=m);l&&(a+=l,o+=l,s+=l,i+=l);for(var p=At(i),f=At(s);f>=1<p?new vt([],r):h;if(h&&f>p&&am;y-=m){var b=p>>>y&g;v=v.array[b]=St(v.array[b],r)}v.array[p>>>m&g]=h}if(s=f)a-=f,s-=f,u=m,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||f>>u&g;if(_!==f>>>u&g)break;_&&(l+=(1<o&&(c=c.removeBefore(r,u,a-l)),c&&fi&&(i=c.size),a(u)||(c=c.map(function(e){return pe(e)})),r.push(c)}return i>e.size&&(e=e.setSize(i)),at(e,t,r)}function At(e){return e>>m<=v&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&s!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=i,o=a.set(s,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):It(r,o)}function Nt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Rt(e){this._iter=e,this.size=e.size}function Dt(e){this._iter=e,this.size=e.size}function Lt(e){this._iter=e,this.size=e.size}function Ut(e){var t=en(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=tn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===N){var r=e.__iterator(t,n);return new U(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===M?P:M,n)},t}function qt(e,t,n){var r=en(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,y);return i===y?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate(function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)},o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(N,o);return new U(function(){var o=i.next();if(o.done)return o;var a=o.value,s=a[0];return q(r,s,t.call(n,a[1],s,e),o)})},r}function Ft(e,t){var n=en(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Ut(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=tn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Bt(e,t,n,r){var o=en(e);return r&&(o.has=function(r){var o=e.get(r,y);return o!==y&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,y);return i!==y&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,s=0;return e.__iterate(function(e,i,u){if(t.call(n,e,i,u))return s++,o(e,r?i:s-1,a)},i),s},o.__iteratorUncached=function(o,i){var a=e.__iterator(N,i),s=0;return new U(function(){for(;;){var i=a.next();if(i.done)return i;var u=i.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return q(o,r?c:s++,l,i)}})},o}function zt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),A(t,n,o))return e;var i=T(t,o),a=j(n,o);if(i!=i||a!=a)return zt(e.toSeq().cacheResult(),t,n,r);var s,u=a-i;u==u&&(s=u<0?0:u);var c=en(e);return c.size=0===s?s:e.size&&s||void 0,!r&&oe(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&ts)return{value:void 0,done:!0};var e=o.next();return r||t===M?e:q(t,u-1,t===P?void 0:e.value[1],e)})},c}function Vt(e,t,n,r){var o=en(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var s=!0,u=0;return e.__iterate(function(e,i,c){if(!s||!(s=t.call(n,e,i,c)))return u++,o(e,r?i:u-1,a)}),u},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var s=e.__iterator(N,i),u=!0,c=0;return new U(function(){var e,i,l;do{if((e=s.next()).done)return r||o===M?e:q(o,c++,o===P?void 0:e.value[1],e);var p=e.value;i=p[0],l=p[1],u&&(u=t.call(n,l,i,a))}while(u);return o===N?e:q(o,i,l,e)})},o}function Ht(e,t){var n=s(e),o=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?ae(e):se(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&s(i)||u(e)&&u(i))return i}var c=new ee(o);return n?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function Wt(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var i=0,s=!1;return function e(u,c){var l=this;u.__iterate(function(o,u){return(!t||c0}function $t(e,t,r){var o=en(e);return o.size=new ee(r).map(function(e){return e.size}).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map(function(e){return e=n(e),V(o?e.reverse():e)}),a=0,s=!1;return new U(function(){var n;return s||(n=i.map(function(e){return e.next()}),s=n.some(function(e){return e.done})),s?{value:void 0,done:!0}:q(e,a++,t.apply(null,n.map(function(e){return e.value})))})},o}function Gt(e,t){return oe(e)?t:e.constructor(t)}function Zt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xt(e){return Le(e.size),C(e)}function Qt(e){return s(e)?r:u(e)?o:i}function en(e){return Object.create((s(e)?K:u(e)?Y:$).prototype)}function tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function nn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):An(e,t)},En.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):An(t,n)},En.prototype.pop=function(){return this.slice(1)},En.prototype.unshift=function(){return this.push.apply(this,arguments)},En.prototype.unshiftAll=function(e){return this.pushAll(e)},En.prototype.shift=function(){return this.pop.apply(this,arguments)},En.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Tn()},En.prototype.slice=function(e,t){if(A(e,t,this.size))return this;var n=T(e,this.size);if(j(t,this.size)!==this.size)return we.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):An(r,o)},En.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},En.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},En.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new U(function(){if(r){var t=r.value;return r=r.next,q(e,n++,t)}return{value:void 0,done:!0}})},En.isStack=Sn;var Cn,kn="@@__IMMUTABLE_STACK__@@",On=En.prototype;function An(e,t,n,r){var o=Object.create(On);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Tn(){return Cn||(Cn=An(0))}function jn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}On[kn]=!0,On.withMutations=ze.withMutations,On.asMutable=ze.asMutable,On.asImmutable=ze.asImmutable,On.wasAltered=ze.wasAltered,n.Iterator=U,jn(n,{toArray:function(){Le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Rt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Nt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Tt(this.toKeyedSeq())},toOrderedSet:function(){return gn(s(this)?this.valueSeq():this)},toSet:function(){return cn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Dt(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(s(this)?this.valueSeq():this)},toList:function(){return ft(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return Gt(this,Ht(this,t))},includes:function(e){return this.some(function(t){return de(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Le(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1}),n},filter:function(e,t){return Gt(this,Bt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(P)},map:function(e,t){return Gt(this,qt(this,e,t))},reduce:function(e,t,n){var r,o;return Le(this.size),arguments.length<2?o=!0:r=t,this.__iterate(function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Gt(this,Ft(this,!0))},slice:function(e,t){return Gt(this,zt(this,e,t,!0))},some:function(e,t){return!this.every(Rn(e),t)},sort:function(e){return Gt(this,Jt(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Ue().asMutable();return e.__iterate(function(o,i){r.update(t.call(n,o,i,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return me(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ee(e._cache);var t=e.toSeq().map(Nn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Rn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(O)},flatMap:function(e,t){return Gt(this,function(e,t,n){var r=Qt(e);return e.toSeq().map(function(o,i){return r(t.call(n,o,i,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return Gt(this,Wt(this,e,!0))},fromEntrySeq:function(){return new Lt(this)},get:function(e,t){return this.find(function(t,n){return de(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,o=rn(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,y):y)===y)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),o=(l(e)?Tt():Ue()).asMutable();e.__iterate(function(i,a){o.update(t.call(n,i,a,e),function(e){return(e=e||[]).push(r?[a,i]:i),e})});var i=Qt(e);return o.map(function(t){return Gt(e,i(t))})}(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return de(t,e)})},keySeq:function(){return this.toSeq().map(Mn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Kt(this,e)},maxBy:function(e,t){return Kt(this,t,e)},min:function(e){return Kt(this,e?Dn(e):qn)},minBy:function(e,t){return Kt(this,t?Dn(t):qn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Gt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Gt(this,Vt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Rn(e),t)},sortBy:function(e,t){return Gt(this,Jt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Gt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Gt(this,function(e,t,n){var r=en(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate(function(e,o,s){return t.call(n,e,o,s)&&++a&&r(e,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(N,o),s=!0;return new U(function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,u=o[0],c=o[1];return t.call(n,c,u,i)?r===N?e:q(r,u,c,e):(s=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Rn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return function(e,t){return t=Ee(t,3432918353),t=Ee(t<<15|t>>>-15,461845907),t=Ee(t<<13|t>>>-13,5),t=Ee((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Se((t=Ee(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+Fn(Ce(e),Ce(t))|0}:function(e,t){r=r+Fn(Ce(e),Ce(t))|0}:t?function(e){r=31*r+Ce(e)|0}:function(e){r=r+Ce(e)|0}),r)}(this))}});var In=n.prototype;In[p]=!0,In[L]=In.values,In.__toJS=In.toArray,In.__toStringMapper=Ln,In.inspect=In.toSource=function(){return this.toString()},In.chain=In.flatMap,In.contains=In.includes,jn(r,{flip:function(){return Gt(this,Ut(this))},mapEntries:function(e,t){var n=this,r=0;return Gt(this,this.toSeq().map(function(o,i){return e.call(t,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Gt(this,this.toSeq().flip().map(function(r,o){return e.call(t,r,o,n)}).flip())}});var Pn=r.prototype;function Mn(e,t){return t}function Nn(e,t){return[t,e]}function Rn(e){return function(){return!e.apply(this,arguments)}}function Dn(e){return function(){return-e.apply(this,arguments)}}function Ln(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Un(){return S(arguments)}function qn(e,t){return et?-1:0}function Fn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Pn[f]=!0,Pn[L]=In.entries,Pn.__toJS=In.toObject,Pn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Ln(e)},jn(o,{toKeyedSeq:function(){return new Nt(this,!1)},filter:function(e,t){return Gt(this,Bt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Gt(this,Ft(this,!1))},slice:function(e,t){return Gt(this,zt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return Gt(this,1===n?r:r.concat(S(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Gt(this,Wt(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e5e3)return e.textContent;return function(e){for(var n,r,o,i,a,s=e.textContent,u=0,c=s[0],l=1,p=e.innerHTML="",f=0;r=n,n=f<7&&"\\"==n?1:l;){if(l=c,c=s[++u],i=p.length>1,!l||f>8&&"\n"==l||[/\S/.test(l),1,1,!/[$\w]/.test(l),("/"==n||"\n"==n)&&i,'"'==n&&i,"'"==n&&i,s[u-4]+r+n=="--\x3e",r+n=="*/"][f])for(p&&(e.appendChild(a=t.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][f?f<3?2:f>6?4:f>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/.test(p):0]),a.appendChild(t.createTextNode(p))),o=f&&f<7?f:o,p="",f=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/.test(l),/[\])]/.test(l),/[$\w]/.test(l),"/"==l&&o<2&&"<"!=n,'"'==l,"'"==l,l+c+s[u+1]+s[u+2]=="\x3c!--",l+c=="/*",l+c=="//","#"==l][--f];);p+=l}}(e)}function Q(e){var t;if([/filename\*=[^']+'\w*'"([^"]+)";?/i,/filename\*=[^']+'\w*'([^;]+);?/i,/filename="([^;]*);?"/i,/filename=([^;]*);?/i].some(function(n){return null!==(t=n.exec(e))}),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function ee(e){return t=e.replace(/\.[^.\/]*$/,""),b()(g()(t));var t}var te=function(e,t){if(e>t)return"Value must be less than Maximum"},ne=function(e,t){if(et)return"Value must be less than MaxLength"},pe=function(e,t){if(e.length2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,i=n.bypassRequiredCheck,a=void 0!==i&&i,s=[],u=e.get("required"),c=Object(I.a)(e,{isOAS3:o}),p=c.schema,h=c.parameterContentMediaType;if(!p)return s;var m=p.get("required"),v=p.get("maximum"),g=p.get("minimum"),y=p.get("type"),b=p.get("format"),_=p.get("maxLength"),w=p.get("minLength"),x=p.get("pattern");if(y&&(u||m||t)){var E="string"===y&&t,S="array"===y&&l()(t)&&t.length,C="array"===y&&d.a.List.isList(t)&&t.count(),k="array"===y&&"string"==typeof t&&t,O="file"===y&&t instanceof A.a.File,T="boolean"===y&&(t||!1===t),j="number"===y&&(t||0===t),P="integer"===y&&(t||0===t),M="object"===y&&"object"===f()(t)&&null!==t,N="object"===y&&"string"==typeof t&&t,R=[E,S,C,k,O,T,j,P,M,N],D=R.some(function(e){return!!e});if((u||m)&&!D&&!a)return s.push("Required field is not provided"),s;if("object"===y&&"string"==typeof t&&(null===h||"application/json"===h))try{JSON.parse(t)}catch(e){return s.push("Parameter string value must be valid JSON"),s}if(x){var L=fe(t,x);L&&s.push(L)}if(_||0===_){var U=le(t,_);U&&s.push(U)}if(w){var q=pe(t,w);q&&s.push(q)}if(v||0===v){var F=te(t,v);F&&s.push(F)}if(g||0===g){var B=ne(t,g);B&&s.push(B)}if("string"===y){var z;if(!(z="date-time"===b?ue(t):"uuid"===b?ce(t):se(t)))return s;s.push(z)}else if("boolean"===y){var V=ae(t);if(!V)return s;s.push(V)}else if("number"===y){var H=re(t);if(!H)return s;s.push(H)}else if("integer"===y){var W=oe(t);if(!W)return s;s.push(W)}else if("array"===y){var J;if(!C||!t.count())return s;J=p.getIn(["items","type"]),t.forEach(function(e,t){var n;"number"===J?n=re(e):"integer"===J?n=oe(e):"string"===J&&(n=se(e)),n&&s.push({index:t,error:n})})}else if("file"===y){var K=ie(t);if(!K)return s;s.push(K)}}return s},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(/xml/.test(t)){if(!e.xml||!e.xml.name){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(k.memoizedCreateXMLExample)(e,n)}var i=Object(k.memoizedSampleFromSchema)(e,n);return"object"===f()(i)?o()(i,null,2):i},me=function(){var e={},t=A.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)n.hasOwnProperty(r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},ve=function(t){return(t instanceof e?t:new e(t.toString(),"utf-8")).toString("base64")},ge={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},ye=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},be=function(e,t,n){return!!E()(n,function(n){return C()(e[n],t[n])})};function _e(e){return"string"!=typeof e||""===e?"":Object(m.sanitizeUrl)(e)}function we(e){if(!d.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=e.find(function(e,t){return t.startsWith("2")&&u()(e.get("content")||{}).length>0}),n=e.get("default")||d.a.OrderedMap(),r=(n.get("content")||d.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var xe=function(e){return"string"==typeof e||e instanceof String?e.trim().replace(/\s/g,"%20"):""},Ee=function(e){return j()(xe(e).replace(/%20/g,"_"))},Se=function(e){return e.filter(function(e,t){return/^x-/.test(t)})},Ce=function(e){return e.filter(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)})};function ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==f()(e)||l()(e)||null===e||!t)return e;var r=a()({},e);return u()(r).forEach(function(e){e===t&&n(r[e],e)?delete r[e]:r[e]=ke(r[e],t,n)}),r}function Oe(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===f()(e)&&null!==e)try{return o()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function Ae(e){return"number"==typeof e?e.toString():e}function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,i=void 0===o||o;if(!d.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var a=e.get("name"),s=e.get("in"),u=[];return e&&e.hashCode&&s&&a&&i&&u.push("".concat(s,".").concat(a,".hash-").concat(e.hashCode())),s&&a&&u.push("".concat(s,".").concat(a)),u.push(a),r?u:u[0]||""}function je(e,t){return Te(e,{returnAll:!0}).map(function(e){return t[e]}).filter(function(e){return void 0!==e})[0]}function Ie(){return Me(M()(32).toString("base64"))}function Pe(e){return Me(R()("sha256").update(e).digest("base64"))}function Me(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}}).call(this,n(64).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(54);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,i=null;return function(){return o(t,n,arguments)||(i=e.apply(null,arguments)),n=arguments,i}})},function(e,t,n){var r=n(756),o=n(757),i=n(763);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){var r=n(599),o=n(600),i=n(603);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){e.exports=n(573)},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,s,u){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,o,i,a,s,u],p=0;(c=new Error(t.replace(/%s/g,function(){return l[p++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){e.exports=n(577)},function(e,t,n){e.exports=n(557)},function(e,t){e.exports=function(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;for(var t=0,n=["File","Blob","FormData"];t>",i={listOf:function(e){return c(e,"List",r.List.isList)},mapOf:function(e,t){return l(e,t,"Map",r.Map.isMap)},orderedMapOf:function(e,t){return l(e,t,"OrderedMap",r.OrderedMap.isOrderedMap)},setOf:function(e){return c(e,"Set",r.Set.isSet)},orderedSetOf:function(e){return c(e,"OrderedSet",r.OrderedSet.isOrderedSet)},stackOf:function(e){return c(e,"Stack",r.Stack.isStack)},iterableOf:function(e){return c(e,"Iterable",r.Iterable.isIterable)},recordOf:function(e){return s(function(t,n,o,i,s){for(var u=arguments.length,c=Array(u>5?u-5:0),l=5;l6?u-6:0),l=6;l5?c-5:0),p=5;p5?i-5:0),s=5;s key("+l[p]+")"].concat(a));if(h instanceof Error)return h}})).apply(void 0,i);var u})}function p(e){var t=void 0===arguments[1]?"Iterable":arguments[1],n=void 0===arguments[2]?r.Iterable.isIterable:arguments[2];return s(function(r,o,i,s,u){for(var c=arguments.length,l=Array(c>5?c-5:0),p=5;p4)}function u(e){var t=e.get("swagger");return"string"==typeof t&&t.startsWith("2.0")}function c(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?s(n.specSelectors.specJson())?a.a.createElement(e,o()({},r,n,{Ori:t})):a.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){"use strict"; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c0){var o=n.map(function(e){return console.error(e),e.line=e.fullPath?g(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",A()(e,"message",{enumerable:!0,value:e.message}),e});i.newThrownErrBatch(o)}return r.updateResolved(t)})}},_e=[],we=V()(k()(S.a.mark(function e(){var t,n,r,o,i,a,s,u,c,l,p,f,h,d,m,v,g;return S.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=_e.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,i=o.resolveSubtree,a=o.AST,s=void 0===a?{}:a,u=t.specSelectors,c=t.specActions,i){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return l=s.getLineNumberForPath?s.getLineNumberForPath:function(){},p=u.specStr(),f=t.getConfigs(),h=f.modelPropertyMacro,d=f.parameterMacro,m=f.requestInterceptor,v=f.responseInterceptor,e.prev=11,e.next=14,_e.reduce(function(){var e=k()(S.a.mark(function e(t,o){var a,s,c,f,g,y,b;return S.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return a=e.sent,s=a.resultMap,c=a.specWithCurrentSubtrees,e.next=7,i(c,o,{baseDoc:u.url(),modelPropertyMacro:h,parameterMacro:d,requestInterceptor:m,responseInterceptor:v});case 7:return f=e.sent,g=f.errors,y=f.spec,r.allErrors().size&&n.clearBy(function(e){return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!e.get("fullPath").every(function(e,t){return e===o[t]||void 0===o[t]})}),j()(g)&&g.length>0&&(b=g.map(function(e){return e.line=e.fullPath?l(p,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",A()(e,"message",{enumerable:!0,value:e.message}),e}),n.newThrownErrBatch(b)),W()(s,o,y),W()(c,o,y),e.abrupt("return",{resultMap:s,specWithCurrentSubtrees:c});case 15:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),x.a.resolve({resultMap:(u.specResolvedSubtree([])||Object(R.Map)()).toJS(),specWithCurrentSubtrees:u.specJson().toJS()}));case 14:g=e.sent,delete _e.system,_e=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:c.updateResolvedSubtree([],g.resultMap);case 23:case"end":return e.stop()}},e,null,[[11,19]])})),35),xe=function(e){return function(t){_e.map(function(e){return e.join("@@")}).indexOf(e.join("@@"))>-1||(_e.push(e),_e.system=t,we())}};function Ee(e,t,n,r,o){return{type:X,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function Se(e,t,n,r){return{type:X,payload:{path:e,param:t,value:n,isXml:r}}}var Ce=function(e,t){return{type:le,payload:{path:e,value:t}}},ke=function(){return{type:le,payload:{path:[],value:Object(R.Map)()}}},Oe=function(e,t){return{type:ee,payload:{pathMethod:e,isOAS3:t}}},Ae=function(e,t,n,r){return{type:Q,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Te(e){return{type:se,payload:{pathMethod:e}}}function je(e,t){return{type:ue,payload:{path:e,value:t,key:"consumes_value"}}}function Ie(e,t){return{type:ue,payload:{path:e,value:t,key:"produces_value"}}}var Pe=function(e,t,n){return{payload:{path:e,method:t,res:n},type:te}},Me=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ne}},Ne=function(e,t,n){return{payload:{path:e,method:t,req:n},type:re}},Re=function(e){return{payload:e,type:oe}},De=function(e){return function(t){var n=t.fn,r=t.specActions,o=t.specSelectors,i=t.getConfigs,a=t.oas3Selectors,s=e.pathName,u=e.method,c=e.operation,l=i(),p=l.requestInterceptor,f=l.responseInterceptor,h=c.toJS();if(c&&c.get("parameters")&&c.get("parameters").filter(function(e){return e&&!0===e.get("allowEmptyValue")}).forEach(function(t){if(o.parameterInclusionSettingFor([s,u],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(J.C)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}),e.contextUrl=L()(o.url()).toString(),h&&h.operationId?e.operationId=h.operationId:h&&s&&u&&(e.operationId=n.opId(h,s,u)),o.isOAS3()){var d="".concat(s,":").concat(u);e.server=a.selectedServer(d)||a.selectedServer();var m=a.serverVariables({server:e.server,namespace:d}).toJS(),g=a.serverVariables({server:e.server}).toJS();e.serverVariables=_()(m).length?m:g,e.requestContentType=a.requestContentType(s,u),e.responseContentType=a.responseContentType(s,u)||"*/*";var b=a.requestBodyValue(s,u);Object(J.t)(b)?e.requestBody=JSON.parse(b):b&&b.toJS?e.requestBody=b.toJS():e.requestBody=b}var w=y()({},e);w=n.buildRequest(w),r.setRequest(e.pathName,e.method,w);e.requestInterceptor=function(t){var n=p.apply(this,[t]),o=y()({},n);return r.setMutatedRequest(e.pathName,e.method,o),n},e.responseInterceptor=f;var x=v()();return n.execute(e).then(function(t){t.duration=v()()-x,r.setResponse(e.pathName,e.method,t)}).catch(function(t){console.error(t),r.setResponse(e.pathName,e.method,{error:!0,err:q()(t)})})}},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=d()(e,["path","method"]);return function(e){var o=e.fn.fetch,i=e.specSelectors,a=e.specActions,s=i.specJsonWithResolvedSubtrees().toJS(),u=i.operationScheme(t,n),c=i.contentTypeValues([t,n]).toJS(),l=c.requestContentType,p=c.responseContentType,f=/xml/i.test(l),h=i.parameterValues([t,n],f).toJS();return a.executeRequest(Y({},r,{fetch:o,spec:s,pathName:t,method:n,parameters:h,requestContentType:l,scheme:u,responseContentType:p}))}};function Ue(e,t){return{type:ie,payload:{path:e,method:t}}}function qe(e,t){return{type:ae,payload:{path:e,method:t}}}function Fe(e,t,n){return{type:pe,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){var r=n(32),o=n(22),i=n(63),a=n(77),s=n(75),u=function(e,t,n){var c,l,p,f=e&u.F,h=e&u.G,d=e&u.S,m=e&u.P,v=e&u.B,g=e&u.W,y=h?o:o[t]||(o[t]={}),b=y.prototype,_=h?r:d?r[t]:(r[t]||{}).prototype;for(c in h&&(n=t),n)(l=!f&&_&&void 0!==_[c])&&s(y,c)||(p=l?_[c]:n[c],y[c]=h&&"function"!=typeof _[c]?n[c]:v&&l?i(p,r):g&&_[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):m&&"function"==typeof p?i(Function.call,p):p,m&&((y.virtual||(y.virtual={}))[c]=p,e&u.R&&b&&!b[c]&&a(b,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){"use strict";var r=n(138),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(198)("wks"),o=n(200),i=n(41).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(215)("wks"),o=n(159),i=n(32).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(41),o=n(72),i=n(81),a=n(97),s=n(153),u=function(e,t,n){var c,l,p,f,h=e&u.F,d=e&u.G,m=e&u.S,v=e&u.P,g=e&u.B,y=d?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=d?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=t),n)p=((l=!h&&y&&void 0!==y[c])?y:n)[c],f=g&&l?s(p,r):v&&"function"==typeof p?s(Function.call,p):p,y&&a(y,c,p,e&u.U),b[c]!=p&&i(b,c,f),v&&_[c]!=p&&(_[c]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return!!e&&r.call(e,t)}var i=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function s(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var u=/&([a-z#][a-z0-9]{1,31});/gi,c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(467);function p(e,t){var n=0;return o(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?s(n):e}var f=/[&<>"]/,h=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function m(e){return d[e]}t.assign=function(e){return[].slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")},t.isValidEntityCode=a,t.fromCodePoint=s,t.replaceEntities=function(e){return e.indexOf("&")<0?e:e.replace(u,p)},t.escapeHtml=function(e){return f.test(e)?e.replace(h,m):e}},function(e,t,n){var r=n(55),o=n(772);e.exports=function(e,t){if(null==e)return{};var n,i,a=o(e,t);if(r){var s=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(35),o=n(99),i=n(73),a=/"/g,s=function(e,t,n,r){var o=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+o+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",function(){return i}),n.d(t,"NEW_THROWN_ERR_BATCH",function(){return a}),n.d(t,"NEW_SPEC_ERR",function(){return s}),n.d(t,"NEW_SPEC_ERR_BATCH",function(){return u}),n.d(t,"NEW_AUTH_ERR",function(){return c}),n.d(t,"CLEAR",function(){return l}),n.d(t,"CLEAR_BY",function(){return p}),n.d(t,"newThrownErr",function(){return f}),n.d(t,"newThrownErrBatch",function(){return h}),n.d(t,"newSpecErr",function(){return d}),n.d(t,"newSpecErrBatch",function(){return m}),n.d(t,"newAuthErr",function(){return v}),n.d(t,"clear",function(){return g}),n.d(t,"clearBy",function(){return y});var r=n(119),o=n.n(r),i="err_new_thrown_err",a="err_new_thrown_err_batch",s="err_new_spec_err",u="err_new_spec_err_batch",c="err_new_auth_err",l="err_clear",p="err_clear_by";function f(e){return{type:i,payload:o()(e)}}function h(e){return{type:a,payload:e}}function d(e){return{type:s,payload:e}}function m(e){return{type:u,payload:e}}function v(e){return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l,payload:e}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}}},function(e,t,n){var r=n(98);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(43);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(64),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r=n(46),o=n(350),i=n(219),a=Object.defineProperty;t.f=n(50)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(82)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(369),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports={debugTool:null}},function(e,t,n){e.exports=n(575)},function(e,t,n){e.exports=n(771)},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(e,t){e.exports=n(17)},function(e,t){e.exports=n(14)},function(e,t){e.exports=n(26)},function(e,t){e.exports=n(16)},function(e,t){e.exports=n(123)},function(e,t){e.exports=n(60)},function(e,t){e.exports=n(61)},function(e,t){e.exports=n(55)},function(e,t){e.exports=n(2)},function(e,t){e.exports=n(54)},function(e,t){e.exports=n(94)},function(e,t){e.exports=n(28)},function(e,t){e.exports=n(931)},function(e,t){e.exports=n(12)},function(e,t){e.exports=n(192)},function(e,t){e.exports=n(937)},function(e,t){e.exports=n(93)},function(e,t){e.exports=n(193)},function(e,t){e.exports=n(940)},function(e,t){e.exports=n(944)},function(e,t){e.exports=n(945)},function(e,t){e.exports=n(13)},function(e,t){e.exports=n(146)},function(e,t){e.exports=n(92)},function(e,t){e.exports=n(351)},function(e,t){e.exports=n(356)},function(e,t){e.exports=n(409)},function(e,t){e.exports=n(4)},function(e,t){e.exports=n(5)},function(e,t){e.exports=n(947)},function(e,t){e.exports=n(425)},function(e,t){e.exports=n(950)},function(e,t){e.exports=n(52)},function(e,t){e.exports=n(64)},function(e,t){e.exports=n(284)},function(e,t){e.exports=n(273)},function(e,t){e.exports=n(951)},function(e,t){e.exports=n(145)},function(e,t){e.exports=n(952)},function(e,t){e.exports=n(960)},function(e,t){e.exports=n(961)},function(e,t){e.exports=n(962)},function(e,t){e.exports=n(40)},function(e,t){e.exports=n(265)},function(e,t){e.exports=n(37)},function(e,t){e.exports=n(965)},function(e,t){e.exports=n(966)},function(e,t){e.exports=n(967)},function(e,t,n){e.exports=n(53)},function(e,t){e.exports=n(968)},function(e,t){e.exports=n(969)},function(e,t){e.exports=n(970)},function(e,t){e.exports=n(971)},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"path",function(){return Cn}),n.d(r,"query",function(){return kn}),n.d(r,"header",function(){return An}),n.d(r,"cookie",function(){return Tn});var o=n(9),i=n.n(o),a=n(10),s=n.n(a),u=n(5),c=n.n(u),l=n(6),p=n.n(l),f=n(7),h=n.n(f),d=n(0),m=n.n(d),v=n(8),g=n.n(v),y=(n(49),n(15)),b=n.n(y),_=n(20),w=n.n(_),x=n(12),E=n.n(x),S=n(4),C=n.n(S),k=n(21),O=n.n(k),A=n(11),T=n.n(A),j=n(2),I=n.n(j),P=n(1),M=n.n(P),N=n(17),R=n.n(N),D=(n(50),n(29)),L=n.n(D),U=n(22),q=n.n(U),F=n(34),B=n.n(F),z={serializeRes:J,mergeInQueryOrForm:Z};function V(e){return H.apply(this,arguments)}function H(){return(H=R()(C.a.mark(function e(t){var n,r,o,i,a,s=arguments;return C.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},"object"===I()(t)&&(t=(n=t).url),n.headers=n.headers||{},z.mergeInQueryOrForm(n),n.headers&&m()(n.headers).forEach(function(e){var t=n.headers[e];"string"==typeof t&&(n.headers[e]=t.replace(/\n+/g," "))}),!n.requestInterceptor){e.next=12;break}return e.next=8,n.requestInterceptor(n);case 8:if(e.t0=e.sent,e.t0){e.next=11;break}e.t0=n;case 11:n=e.t0;case 12:return r=n.headers["content-type"]||n.headers["Content-Type"],/multipart\/form-data/i.test(r)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]),e.prev=14,e.next=17,(n.userFetch||fetch)(n.url,n);case 17:return o=e.sent,e.next=20,z.serializeRes(o,t,n);case 20:if(o=e.sent,!n.responseInterceptor){e.next=28;break}return e.next=24,n.responseInterceptor(o);case 24:if(e.t1=e.sent,e.t1){e.next=27;break}e.t1=o;case 27:o=e.t1;case 28:e.next=38;break;case 30:if(e.prev=30,e.t2=e.catch(14),o){e.next=34;break}throw e.t2;case 34:throw(i=new Error(o.statusText)).statusCode=i.status=o.status,i.responseError=e.t2,i;case 38:if(o.ok){e.next=43;break}throw(a=new Error(o.statusText)).statusCode=a.status=o.status,a.response=o,a;case 43:return e.abrupt("return",o);case 44:case"end":return e.stop()}},e,null,[[14,30]])}))).apply(this,arguments)}var W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function J(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loadSpec,r=void 0!==n&&n,o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:K(e.headers)},i=o.headers["content-type"],a=r||W(i);return(a?e.text:e.blob||e.buffer).call(e).then(function(e){if(o.text=e,o.data=e,a)try{var t=function(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):q.a.safeLoad(e)}(e,i);o.body=t,o.obj=t}catch(e){o.parseError=e}return o})}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,n){void 0!==t[n]?(t[n]=M()(t[n])?t[n]:[t[n]],t[n].push(e)):t[n]=e}),t):t}function Y(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==I()(e)||"string"!=typeof e.uri):"undefined"!=typeof File?e instanceof File:null!==e&&"object"===I()(e)&&"function"==typeof e.pipe}function $(e,t){var n=e.collectionFormat,r=e.allowEmptyValue,o="object"===I()(e)?e.value:e;if(void 0===o&&r)return"";if(Y(o)||"boolean"==typeof o)return o;var i=encodeURIComponent;return t&&(i=B()(o)?function(e){return e}:function(e){return T()(e)}),"object"!==I()(o)||M()(o)?M()(o)?M()(o)&&!n?o.map(i).join(","):"multi"===n?o.map(i):o.map(i).join({csv:",",ssv:"%20",tsv:"%09",pipes:"|"}[n]):i(o):""}function G(e){var t=m()(e).reduce(function(t,n){var r,o=e[n],i=!!o.skipEncoding,a=i?n:encodeURIComponent(n),s=(r=o)&&"object"===I()(r)&&!M()(o);return t[a]=$(s?o:{value:o},i),t},{});return L.a.stringify(t,{encode:!1,indices:!1})||""}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?"":t,o=e.query,i=e.form;if(i){var a=m()(i).some(function(e){return Y(i[e].value)}),s=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(s)){var u=n(51);e.body=new u,m()(i).forEach(function(t){e.body.append(t,$(i[t],!0))})}else e.body=G(i);delete e.form}if(o){var c=r.split("?"),l=O()(c,2),p=l[0],f=l[1],h="";if(f){var d=L.a.parse(f);m()(o).forEach(function(e){return delete d[e]}),h=L.a.stringify(d,{encode:!0})}var v=function(){for(var e=arguments.length,t=new Array(e),n=0;n0){var o=t(e,n[n.length-1],n);o&&(r=r.concat(o))}if(M()(e)){var i=e.map(function(e,r){return Ie(e,t,n.concat(r))});i&&(r=r.concat(i))}else if(Re(e)){var a=m()(e).map(function(r){return Ie(e[r],t,n.concat(r))});a&&(r=r.concat(a))}return r=Me(r)}function Pe(e){return M()(e)?e:[e]}function Me(e){var t;return(t=[]).concat.apply(t,be()(e.map(function(e){return M()(e)?Me(e):e})))}function Ne(e){return e.filter(function(e){return void 0!==e})}function Re(e){return e&&"object"===I()(e)}function De(e){return e&&"function"==typeof e}function Le(e){if(Fe(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function Ue(e){return Le(e)||Fe(e)&&"mutation"===e.type}function qe(e){return Ue(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function Fe(e){return e&&"object"===I()(e)}function Be(e,t){try{return we.a.getValueByPointer(e,t)}catch(e){return console.error(e),{}}}var ze=n(38),Ve=n.n(ze),He=n(39),We=n(31),Je=n.n(We);function Ke(e,t){function n(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,n=new Array(e),r=0;r-1&&-1===Ze.indexOf(n)||Xe.indexOf(r)>-1||Qe.some(function(e){return r.indexOf(e)>-1})}function tt(e,t){var n=e.split("#"),r=O()(n,2),o=r[0],i=r[1],a=E.a.resolve(o||"",t||"");return i?"".concat(a,"#").concat(i):a}var nt="application/json, application/yaml",rt=new RegExp("^([a-z]+://|//)","i"),ot=Ke("JSONRefError",function(e,t,n){this.originalError=n,pe()(this,t||{})}),it={},at=new Ve.a,st=[function(e){return"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7]},function(e){return"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6]}],ut={key:"$ref",plugin:function(e,t,n,r){var o=r.getInstance(),i=n.slice(0,-1);if(!et(i)&&(a=i,!st.some(function(e){return e(a)}))){var a,s=r.getContext(n).baseDoc;if("string"!=typeof e)return new ot("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:s,fullPath:n});var u,c,l,p=ht(e),f=p[0],h=p[1]||"";try{u=s||f?pt(f,s):null}catch(t){return ft(t,{pointer:h,$ref:e,basePath:u,fullPath:n})}if(function(e,t,n,r){var o=at.get(r);o||(o={},at.set(r,o));var i=function(e){if(0===e.length)return"";return"/".concat(e.map(bt).join("/"))}(n),a="".concat(t||"","#").concat(e),s=i.replace(/allOf\/\d+\/?/g,""),u=r.contextTree.get([]).baseDoc;if(t==u&&wt(s,e))return!0;var c="";if(n.some(function(e){return c="".concat(c,"/").concat(bt(e)),o[c]&&o[c].some(function(e){return wt(e,a)||wt(a,e)})}))return!0;o[s]=(o[s]||[]).concat(a)}(h,u,i,r)&&!o.useCircularStructures){var d=tt(e,u);return e===d?null:ke.replace(n,d)}if(null==u?(l=gt(h),void 0===(c=r.get(l))&&(c=new ot("Could not resolve reference: ".concat(e),{pointer:h,$ref:e,baseDoc:s,fullPath:n}))):c=null!=(c=dt(u,h)).__value?c.__value:c.catch(function(t){throw ft(t,{pointer:h,$ref:e,baseDoc:s,fullPath:n})}),c instanceof Error)return[ke.remove(n),c];var v=tt(e,u),g=ke.replace(i,c,{$$ref:v});if(u&&u!==s)return[g,ke.context(i,{baseDoc:u})];try{if(!function(e,t){var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),function e(t){return ke.isObject(t)&&(n.indexOf(t)>=0||m()(t).some(function(n){return e(t[n])}))}(t.value)}(r.state,g)||o.useCircularStructures)return g}catch(e){return null}}}},ct=pe()(ut,{docCache:it,absoluteify:pt,clearCache:function(e){void 0!==e?delete it[e]:m()(it).forEach(function(e){delete it[e]})},JSONRefError:ot,wrapError:ft,getDoc:mt,split:ht,extractFromDoc:dt,fetchJSON:function(e){return Object(He.fetch)(e,{headers:{Accept:nt},loadSpec:!0}).then(function(e){return e.text()}).then(function(e){return q.a.safeLoad(e)})},extract:vt,jsonPointerToArray:gt,unescapeJsonPointerToken:yt}),lt=ct;function pt(e,t){if(!rt.test(e)){if(!t)throw new ot("Tried to resolve a relative URL, without having a basePath. path: '".concat(e,"' basePath: '").concat(t,"'"));return E.a.resolve(t,e)}return e}function ft(e,t){var n;return n=e&&e.response&&e.response.body?"".concat(e.response.body.code," ").concat(e.response.body.message):e.message,new ot("Could not resolve reference: ".concat(n),t,e)}function ht(e){return(e+"").split("#")}function dt(e,t){var n=it[e];if(n&&!ke.isPromise(n))try{var r=vt(t,n);return pe()(se.a.resolve(r),{__value:r})}catch(e){return se.a.reject(e)}return mt(e).then(function(e){return vt(t,e)})}function mt(e){var t=it[e];return t?ke.isPromise(t)?t:se.a.resolve(t):(it[e]=ct.fetchJSON(e).then(function(t){return it[e]=t,t}),it[e])}function vt(e,t){var n=gt(e);if(n.length<1)return t;var r=ke.getIn(t,n);if(void 0===r)throw new ot("Could not resolve pointer: ".concat(e," does not exist in document"),{pointer:e});return r}function gt(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a ".concat(I()(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(yt)}function yt(e){return"string"!=typeof e?e:Je.a.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function bt(e){return Je.a.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}var _t=function(e){return!e||"/"===e||"#"===e};function wt(e,t){if(_t(t))return!0;var n=e.charAt(t.length),r=t.slice(-1);return 0===e.indexOf(t)&&(!n||"/"===n||"#"===n)&&"#"!==r}var xt={key:"allOf",plugin:function(e,t,n,r,o){if(!o.meta||!o.meta.$$ref){var i=n.slice(0,-1);if(!et(i)){if(!M()(e)){var a=new TypeError("allOf must be an array");return a.fullPath=n,a}var s=!1,u=o.value;i.forEach(function(e){u&&(u=u[e])}),delete(u=pe()({},u)).allOf;var c=[];return c.push(r.replace(i,{})),e.forEach(function(e,t){if(!r.isObject(e)){if(s)return null;s=!0;var o=new TypeError("Elements in allOf must be objects");return o.fullPath=n,c.push(o)}c.push(r.mergeDeep(i,e));var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.specmap,o=n.getBaseUrlForNodePath,i=void 0===o?function(e){return r.getContext([].concat(be()(t),be()(e))).baseDoc}:o,a=n.targetKeys,s=void 0===a?["$ref","$$ref"]:a,u=[];return $e()(e).forEach(function(){if(s.indexOf(this.key)>-1){var e=this.path,n=t.concat(this.path),o=tt(this.node,i(e));u.push(r.replace(n,o))}}),u}(e,n.slice(0,-1),{getBaseUrlForNodePath:function(e){return r.getContext([].concat(be()(n),[t],be()(e))).baseDoc},specmap:r});c.push.apply(c,be()(a))}),c.push(r.mergeDeep(i,u)),u.$$ref||c.push(r.remove([].concat(i,"$$ref"))),c}}}},Et={key:"parameters",plugin:function(e,t,n,r,o){if(M()(e)&&e.length){var i=pe()([],e),a=n.slice(0,-1),s=pe()({},ke.getIn(r.spec,a));return e.forEach(function(e,t){try{i[t].default=r.parameterMacro(s,e)}catch(e){var o=new Error(e);return o.fullPath=n,o}}),ke.replace(n,i)}return ke.replace(n,e)}},St={key:"properties",plugin:function(e,t,n,r){var o=pe()({},e);for(var i in e)try{o[i].default=r.modelPropertyMacro(o[i])}catch(e){var a=new Error(e);return a.fullPath=n,a}return ke.replace(n,o)}};function Ct(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}var kt=function(){function e(t){he()(this,e),this.root=Ot(t||{})}return me()(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(n){var r=e[e.length-1],o=n.children;o[r]?At(o[r],t,n):o[r]=Ot(t,n)}else At(this.root,t,null)}},{key:"get",value:function(e){if((e=e||[]).length<1)return this.root.value;for(var t,n,r=this.root,o=0;o=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=Q()(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o1?n-1:0),o=1;o0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return se.a.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;ke.normalizeArray(e).forEach(function(e){if(e instanceof Error)n.errors.push(e);else try{if(!ke.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),ke.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(ke.isContextPatch(e))return void n.setContext(e.path,e.value);if(ke.isMutation(e))return void n.updateMutations(e)}catch(e){console.error(e),n.errors.push(e)}})}},{key:"updateMutations",value:function(e){"object"===I()(e.value)&&!M()(e.value)&&this.allowMetaPatches&&(e.value=pe()({},e.value));var t=ke.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(n){var r=pe()({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)}).catch(function(n){t.removePromisedPatch(e),t.updatePatches(n)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return ke.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse(T()(e))}},{key:"dispatch",value:function(){var e=this,t=this,n=this.nextPlugin();if(!n){var r=this.nextPromisedPatch();if(r)return r.then(function(){return e.dispatch()}).catch(function(){return e.dispatch()});var o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),se.a.resolve(o)}if(t.pluginCount=t.pluginCount||{},t.pluginCount[n]=(t.pluginCount[n]||0)+1,t.pluginCount[n]>100)return se.a.resolve({spec:t.state,errors:t.errors.concat(new Error("We've reached a hard limit of ".concat(100," plugin runs")))});if(n!==this.currentPlugin&&this.promisedPatches.length){var i=this.promisedPatches.map(function(e){return e.value});return se.a.all(i.map(function(e){return e.then(Function,Function)})).then(function(){return e.dispatch()})}return function(){t.currentPlugin=n;var e=t.getCurrentMutations(),r=t.mutations.length-1;try{if(n.isGenerator){var o,i=Tt(n(e,t.getLib()));try{for(i.s();!(o=i.n()).done;){a(o.value)}}catch(e){i.e(e)}finally{i.f()}}else{a(n(e,t.getLib()))}}catch(e){console.error(e),a([pe()(ce()(e),{plugin:n})])}finally{t.updatePluginHistory(n,{mutationIndex:r})}return t.dispatch()}();function a(e){e&&(e=ke.fullyNormalizeArray(e),t.updatePatches(e,n))}}}]),e}();var Pt={refs:lt,allOf:xt,parameters:Et,properties:St},Mt=n(32),Nt=n.n(Mt);function Rt(e){if(void 0===re.a||null==e[te.a]){if(M()(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return ie()(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=Q()(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"",r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).v2OperationIdCompatibilityMode;return e&&"object"===I()(e)?(e.operationId||"").replace(/\s/g,"").length?Ut(e.operationId):function(e,t){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).v2OperationIdCompatibilityMode){var n="".concat(t.toLowerCase(),"_").concat(e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|.\/?,\\'""-]/g,"_");return(n=n||"".concat(e.substring(1),"_").concat(t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return"".concat(Lt(t)).concat(Ut(e))}(t,n,{v2OperationIdCompatibilityMode:r}):null}function Bt(e,t){return"".concat(Lt(t),"-").concat(e)}function zt(e,t){return e&&e.paths?function(e,t){return Vt(e,t,!0)||null}(e,function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==I()(o))return!1;var i=o.operationId;return[Ft(o,n,r),Bt(n,r),i].some(function(e){return e&&e===t})}):null}function Vt(e,t,n){if(!e||"object"!==I()(e)||!e.paths||"object"!==I()(e.paths))return null;var r=e.paths;for(var o in r)for(var i in r[o])if("PARAMETERS"!==i.toUpperCase()){var a=r[o][i];if(a&&"object"===I()(a)){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:a},u=t(s);if(n&&u)return s}}}function Ht(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var o in n){var i=n[o];if(Nt()(i)){var a=i.parameters,s=function(e){var n=i[e];if(!Nt()(n))return"continue";var s=Ft(n,o,e);if(s){r[s]?r[s].push(n):r[s]=[n];var u=r[s];if(u.length>1)u.forEach(function(e,t){e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId="".concat(s).concat(t+1)});else if(void 0!==n.operationId){var c=u[0];c.__originalOperationId=c.__originalOperationId||n.operationId,c.operationId=s}}if("parameters"!==e){var l=[],p={};for(var f in t)"produces"!==f&&"consumes"!==f&&"security"!==f||(p[f]=t[f],l.push(p));if(a&&(p.parameters=a,l.push(p)),l.length){var h,d=Rt(l);try{for(d.s();!(h=d.n()).done;){var m=h.value;for(var v in m)if(n[v]){if("parameters"===v){var g,y=Rt(m[v]);try{var b=function(){var e=g.value;n[v].some(function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e})||n[v].push(e)};for(y.s();!(g=y.n()).done;)b()}catch(e){y.e(e)}finally{y.f()}}}else n[v]=m[v]}}catch(e){d.e(e)}finally{d.f()}}}};for(var u in i)s(u)}}return t.$$normalized=!0,e}function Wt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requestInterceptor,r=t.responseInterceptor,o=e.withCredentials?"include":"same-origin";return function(t){return e({url:t,loadSpec:!0,requestInterceptor:n,responseInterceptor:r,headers:{Accept:nt},credentials:o}).then(function(e){return e.body})}}function Jt(e){var t=e.fetch,n=e.spec,r=e.url,o=e.mode,i=e.allowMetaPatches,a=void 0===i||i,s=e.pathDiscriminator,u=e.modelPropertyMacro,c=e.parameterMacro,l=e.requestInterceptor,p=e.responseInterceptor,f=e.skipNormalization,h=e.useCircularStructures,d=e.http,m=e.baseDoc;return m=m||r,d=t||d||V,n?v(n):Wt(d,{requestInterceptor:l,responseInterceptor:p})(m).then(v);function v(e){m&&(Pt.refs.docCache[m]=e),Pt.refs.fetchJSON=Wt(d,{requestInterceptor:l,responseInterceptor:p});var t,n=[Pt.refs];return"function"==typeof c&&n.push(Pt.parameters),"function"==typeof u&&n.push(Pt.properties),"strict"!==o&&n.push(Pt.allOf),(t={spec:e,context:{baseDoc:m},plugins:n,allowMetaPatches:a,pathDiscriminator:s,parameterMacro:c,modelPropertyMacro:u,useCircularStructures:h},new It(t).dispatch()).then(f?function(){var e=R()(C.a.mark(function e(t){return C.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t);case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}():Ht)}}var Kt=n(16),Yt=n.n(Kt);function $t(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t2&&void 0!==m[2]?m[2]:{},o=r.returnEntireTree,i=r.baseDoc,a=r.requestInterceptor,s=r.responseInterceptor,u=r.parameterMacro,c=r.modelPropertyMacro,l=r.useCircularStructures,p={pathDiscriminator:n,baseDoc:i,requestInterceptor:a,responseInterceptor:s,parameterMacro:u,modelPropertyMacro:c,useCircularStructures:l},f=Ht({spec:t}),h=f.spec,e.next=6,Jt(Gt({},p,{spec:h,allowMetaPatches:!0,skipNormalization:!0}));case 6:return d=e.sent,!o&&M()(n)&&n.length&&(d.spec=Yt()(d.spec,n)||null),e.abrupt("return",d);case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Xt=n(41),Qt=n.n(Xt);function en(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,o=t.operationId;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute(tn({spec:e.spec},Qt()(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:n,method:r,parameters:t,operationId:o},i))}}}};var an=n(42),sn=n.n(an),un=n(43),cn=n.n(un),ln=n(44),pn=n.n(ln),fn=n(19),hn=n.n(fn),dn=n(45),mn=n.n(dn),vn={body:function(e){var t=e.req,n=e.value;t.body=n},header:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)},query:function(e){var t=e.req,n=e.value,r=e.parameter;t.query=t.query||{},!1===n&&"boolean"===r.type&&(n="false");0===n&&["number","integer"].indexOf(r.type)>-1&&(n="0");if(n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue&&void 0!==n){var o=r.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}},path:function(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.split("{".concat(r.name,"}")).join(encodeURIComponent(n))},formData:function(e){var t=e.req,n=e.value,r=e.parameter;(n||r.allowEmptyValue)&&(t.form=t.form||{},t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}};n(52);var gn=n(46),yn=n.n(gn),bn=n(47),_n=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},wn=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function xn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).escape,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&t?n?JSON.parse(e):Object(bn.stringToCharArray)(e).map(function(e){return wn(e)?e:_n(e)&&"unsafe"===t?e:(yn()(e)||[]).map(function(e){return"0".concat(e.toString(16).toUpperCase()).slice(-2)}).map(function(e){return"%".concat(e)}).join("")}).join(""):e}function En(e){var t=e.value;return M()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return xn(e,{escape:i})};if("simple"===r)return n.map(function(e){return a(e)}).join(",");if("label"===r)return".".concat(n.map(function(e){return a(e)}).join("."));if("matrix"===r)return n.map(function(e){return a(e)}).reduce(function(e,n){return!e||o?"".concat(e||"",";").concat(t,"=").concat(n):"".concat(e,",").concat(n)},"");if("form"===r){var s=o?"&".concat(t,"="):",";return n.map(function(e){return a(e)}).join(s)}if("spaceDelimited"===r){var u=o?"".concat(t,"="):"";return n.map(function(e){return a(e)}).join(" ".concat(u))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return n.map(function(e){return a(e)}).join("|".concat(c))}}(e):"object"===I()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return xn(e,{escape:i})},s=m()(n);if("simple"===r)return s.reduce(function(e,t){var r=a(n[t]),i=o?"=":",",s=e?"".concat(e,","):"";return"".concat(s).concat(t).concat(i).concat(r)},"");if("label"===r)return s.reduce(function(e,t){var r=a(n[t]),i=o?"=":".",s=e?"".concat(e,"."):".";return"".concat(s).concat(t).concat(i).concat(r)},"");if("matrix"===r&&o)return s.reduce(function(e,t){var r=a(n[t]),o=e?"".concat(e,";"):";";return"".concat(o).concat(t,"=").concat(r)},"");if("matrix"===r)return s.reduce(function(e,r){var o=a(n[r]),i=e?"".concat(e,","):";".concat(t,"=");return"".concat(i).concat(r,",").concat(o)},"");if("form"===r)return s.reduce(function(e,t){var r=a(n[t]),i=e?"".concat(e).concat(o?"&":","):"",s=o?"=":",";return"".concat(i).concat(t).concat(s).concat(r)},"")}(e):function(e){var t=e.key,n=e.value,r=e.style,o=e.escape,i=function(e){return xn(e,{escape:o})};if("simple"===r)return i(n);if("label"===r)return".".concat(i(n));if("matrix"===r)return";".concat(t,"=").concat(i(n));if("form"===r)return i(n);if("deepObject"===r)return i(n)}(e)}function Sn(e,t){return t.includes("application/json")?"string"==typeof e?e:T()(e):e.toString()}function Cn(e){var t=e.req,n=e.value,r=e.parameter,o=r.name,i=r.style,a=r.explode,s=r.content;if(s){var u=m()(s)[0];t.url=t.url.split("{".concat(o,"}")).join(xn(Sn(n,u),{escape:!0}))}else{var c=En({key:r.name,value:n,style:i||"simple",explode:a||!1,escape:!0});t.url=t.url.split("{".concat(o,"}")).join(c)}}function kn(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},r.content){var o=m()(r.content)[0];t.query[r.name]=Sn(n,o)}else if(!1===n&&(n="false"),0===n&&(n="0"),n){var i=I()(n);if("deepObject"===r.style)m()(n).forEach(function(e){var o=n[e];t.query["".concat(r.name,"[").concat(e,"]")]={value:En({key:e,value:o,style:"deepObject",escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}});else if("object"!==i||M()(n)||"form"!==r.style&&r.style||!r.explode&&void 0!==r.explode){var a=encodeURIComponent(r.name);t.query[a]={value:En({key:a,value:n,style:r.style||"form",explode:void 0===r.explode||r.explode,escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}}else{m()(n).forEach(function(e){var o=n[e];t.query[e]={value:En({key:e,value:o,style:r.style||"form",escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}}else if(r.allowEmptyValue&&void 0!==n){var s=r.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}var On=["accept","authorization","content-type"];function An(e){var t=e.req,n=e.parameter,r=e.value;if(t.headers=t.headers||{},!(On.indexOf(n.name.toLowerCase())>-1))if(n.content){var o=m()(n.content)[0];t.headers[n.name]=Sn(r,o)}else void 0!==r&&(t.headers[n.name]=En({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))}function Tn(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=I()(r);if(n.content){var i=m()(n.content)[0];t.headers.Cookie="".concat(n.name,"=").concat(Sn(r,i))}else if("undefined"!==o){var a="object"===o&&!M()(r)&&n.explode?"":"".concat(n.name,"=");t.headers.Cookie=a+En({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}var jn=n(33),In=function(e,t){var n=e.operation,r=e.requestBody,o=e.securities,i=e.spec,a=e.attachContentTypeForEmptyPayload,s=e.requestContentType;t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,s=b()({},t),u=r.authorized,c=void 0===u?{}:u,l=i.security||a.security||[],p=c&&!!m()(c).length,f=Yt()(a,["components","securitySchemes"])||{};if(s.headers=s.headers||{},s.query=s.query||{},!m()(r).length||!p||!l||M()(i.security)&&!i.security.length)return t;return l.forEach(function(e,t){for(var n in e){var r=c[n],o=f[n];if(r){var i=r.value||r,a=o.type;if(r)if("apiKey"===a)"query"===o.in&&(s.query[o.name]=i),"header"===o.in&&(s.headers[o.name]=i),"cookie"===o.in&&(s.cookies[o.name]=i);else if("http"===a){if("basic"===o.scheme){var u=i.username||"",l=i.password||"",p=hn()("".concat(u,":").concat(l));s.headers.Authorization="Basic ".concat(p)}"bearer"===o.scheme&&(s.headers.Authorization="Bearer ".concat(i))}else if("oauth2"===a){var h=r.token||{},d=h[o["x-tokenName"]||"access_token"],m=h.token_type;m&&"bearer"!==m.toLowerCase()||(m="Bearer"),s.headers.Authorization="".concat(m," ").concat(d)}}}}),s}({request:t,securities:o,operation:n,spec:i});var u=n.requestBody||{},c=m()(u.content||{}),l=s&&c.indexOf(s)>-1;if(r||a){if(s&&l)t.headers["Content-Type"]=s;else if(!s){var p=c[0];p&&(t.headers["Content-Type"]=p,s=p)}}else s&&l&&(t.headers["Content-Type"]=s);return r&&(s?c.indexOf(s)>-1&&("application/x-www-form-urlencoded"===s||0===s.indexOf("multipart/")?"object"===I()(r)?(t.form={},m()(r).forEach(function(e){var n,o,i=r[e];"undefined"!=typeof File&&(o=i instanceof File),"undefined"!=typeof Blob&&(o=o||i instanceof Blob),void 0!==jn.Buffer&&(o=o||jn.Buffer.isBuffer(i)),n="object"!==I()(i)||o?i:M()(i)?i.toString():T()(i),t.form[e]={value:n}})):t.form=r:t.body=r):t.body=r),t};var Pn=function(e,t){var n=e.spec,r=e.operation,o=e.securities,i=e.requestContentType,a=e.attachContentTypeForEmptyPayload;if((t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,s=b()({},t),u=r.authorized,c=void 0===u?{}:u,l=r.specSecurity,p=void 0===l?[]:l,f=i.security||p,h=c&&!!m()(c).length,d=a.securityDefinitions;if(s.headers=s.headers||{},s.query=s.query||{},!m()(r).length||!h||!f||M()(i.security)&&!i.security.length)return t;return f.forEach(function(e,t){for(var n in e){var r=c[n];if(r){var o=r.token,i=r.value||r,a=d[n],u=a.type,l=a["x-tokenName"]||"access_token",p=o&&o[l],f=o&&o.token_type;if(r)if("apiKey"===u){var h="query"===a.in?"query":"headers";s[h]=s[h]||{},s[h][a.name]=i}else if("basic"===u)if(i.header)s.headers.authorization=i.header;else{var m=i.username||"",v=i.password||"";i.base64=hn()("".concat(m,":").concat(v)),s.headers.authorization="Basic ".concat(i.base64)}else"oauth2"===u&&p&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",s.headers.authorization="".concat(f," ").concat(p))}}}),s}({request:t,securities:o,operation:r,spec:n})).body||t.form||a)i?t.headers["Content-Type"]=i:M()(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:M()(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:r.parameters&&r.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":r.parameters&&r.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(i){var s=r.parameters&&r.parameters.filter(function(e){return"body"===e.in}).length>0,u=r.parameters&&r.parameters.filter(function(e){return"formData"===e.in}).length>0;(s||u)&&(t.headers["Content-Type"]=i)}return t};function Mn(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t1&&console.warn("Parameter '".concat(e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '").concat(e.name,"' and the passed-in parameter values did not define an 'in' value.")),null!==n){if(void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter ".concat(e.name," is not provided"));if(v&&e.schema&&"object"===e.schema.type&&"string"==typeof n)try{n=JSON.parse(n)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}r&&r({req:g,parameter:e,value:n,operation:_,spec:t})}});var C=Nn({},e,{operation:_});if((g=v?In(C,g):Pn(C,g)).cookies&&m()(g.cookies).length){var k=m()(g.cookies).reduce(function(e,t){var n=g.cookies[t];return e+(e?"&":"")+mn.a.serialize(t,n)},"");g.headers.Cookie=k}return g.cookies&&delete g.cookies,Z(g),g}var Bn=function(e){return e?e.replace(/\W/g,""):null};function zn(e){return qt(e.spec)?function(e){var t=e.spec,n=e.pathName,r=e.method,o=e.server,i=e.contextUrl,a=e.serverVariables,s=void 0===a?{}:a,u=Yt()(t,["paths",n,(r||"").toLowerCase(),"servers"])||Yt()(t,["paths",n,"servers"])||Yt()(t,["servers"]),c="",l=null;if(o&&u&&u.length){var p=u.map(function(e){return e.url});p.indexOf(o)>-1&&(c=o,l=u[p.indexOf(o)])}!c&&u&&u.length&&(c=u[0].url,l=u[0]);if(c.indexOf("{")>-1){(function(e){var t,n=[],r=/{([^}]+)}/g;for(;t=r.exec(e);)n.push(t[1]);return n})(c).forEach(function(e){if(l.variables&&l.variables[e]){var t=l.variables[e],n=s[e]||t.default,r=new RegExp("{".concat(e,"}"),"g");c=c.replace(r,n)}})}return function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=E.a.parse(t),o=E.a.parse(n),i=Bn(r.protocol)||Bn(o.protocol)||"",a=r.host||o.host,s=r.pathname||"";e=i&&a?"".concat(i,"://").concat(a+s):s;return"/"===e[e.length-1]?e.slice(0,-1):e}(c,i)}(e):function(e){var t,n=e.spec,r=e.scheme,o=e.contextUrl,i=void 0===o?"":o,a=E.a.parse(i),s=M()(n.schemes)?n.schemes[0]:null,u=r||s||Bn(a.protocol)||"http",c=n.host||a.host||"",l=n.basePath||"";t=u&&c?"".concat(u,"://").concat(c+l):l;return"/"===t[t.length-1]?t.slice(0,-1):t}(e)}function Vn(e,t){var n=m()(e);if(h.a){var r=h()(e);t&&(r=r.filter(function(t){return p()(e,t).enumerable})),n.push.apply(n,r)}return n}function Hn(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof Hn))return new Hn(n);b()(this,n);var r=this.resolve().then(function(){return t.disableInterfaces||b()(t,Hn.makeApisTagOperation(t)),t});return r.client=this,r}Hn.http=V,Hn.makeHttp=function(e,t,n){return n=n||function(e){return e},t=t||function(e){return e},function(r){return"string"==typeof r&&(r={url:r}),z.mergeInQueryOrForm(r),r=t(r),n(e(r))}}.bind(null,Hn.http),Hn.resolve=Jt,Hn.resolveSubtree=function(e,t){return Zt.apply(this,arguments)},Hn.execute=function(e){var t=e.http,n=e.fetch,r=e.spec,o=e.operationId,i=e.pathName,a=e.method,s=e.parameters,u=e.securities,c=sn()(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),l=t||n||V;i&&a&&!o&&(o=Bt(i,a));var p=qn.buildRequest(Nn({spec:r,operationId:o,parameters:s,securities:u,http:l},c));return p.body&&(cn()(p.body)||pn()(p.body))&&(p.body=T()(p.body)),l(p)},Hn.serializeRes=J,Hn.serializeHeaders=K,Hn.clearCache=function(){Pt.refs.clearCache()},Hn.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=on.makeExecute(e);return{apis:on.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},Hn.buildRequest=Fn,Hn.helpers={opId:Ft},Hn.getBaseUrl=zn,Hn.prototype={http:V,execute:function(e){return this.applyDefaults(),Hn.execute(function(e){for(var t=1;t - * @license MIT - */ -var r=n(571),o=n(572),i=n(358);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){for(var p=!0,f=0;fo&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,i){return i||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);M(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(36))},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,p=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n0&&"/"!==t[0]});function oe(e,t,n){return t=t||[],te.apply(void 0,[e].concat(u()(t))).get("parameters",Object(p.List)()).reduce(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(l.B)(t,{allowHashes:!1}),r)},Object(p.fromJS)({}))}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(p.List.isList(e))return e.some(function(e){return p.Map.isMap(e)&&e.get("in")===t})}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(p.List.isList(e))return e.some(function(e){return p.Map.isMap(e)&&e.get("type")===t})}function se(e,t){t=t||[];var n=x(e).getIn(["paths"].concat(u()(t)),Object(p.fromJS)({})),r=e.getIn(["meta","paths"].concat(u()(t)),Object(p.fromJS)({})),o=ue(e,t),i=n.get("parameters")||new p.List,a=r.get("consumes_value")?r.get("consumes_value"):ae(i,"file")?"multipart/form-data":ae(i,"formData")?"application/x-www-form-urlencoded":void 0;return Object(p.fromJS)({requestContentType:a,responseContentType:o})}function ue(e,t){t=t||[];var n=x(e).getIn(["paths"].concat(u()(t)),null);if(null!==n){var r=e.getIn(["meta","paths"].concat(u()(t),["produces_value"]),null),o=n.getIn(["produces",0],null);return r||o||"application/json"}}function ce(e,t){t=t||[];var n=x(e),r=n.getIn(["paths"].concat(u()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],s=r.get("produces",null),c=n.getIn(["paths",i,"produces"],null),l=n.getIn(["produces"],null);return s||c||l}}function le(e,t){t=t||[];var n=x(e),r=n.getIn(["paths"].concat(u()(t)),null);if(null!==r){var o=t,i=a()(o,1)[0],s=r.get("consumes",null),c=n.getIn(["paths",i,"consumes"],null),l=n.getIn(["consumes"],null);return s||c||l}}var pe=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),i=o()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||i||""},fe=function(e,t,n){return["http","https"].indexOf(pe(e,t,n))>-1},he=function(e,t){t=t||[];var n=e.getIn(["meta","paths"].concat(u()(t),["parameters"]),Object(p.fromJS)([])),r=!0;return n.forEach(function(e){var t=e.get("errors");t&&t.count()&&(r=!1)}),r};function de(e){return p.Map.isMap(e)?e:new p.Map}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",function(){return d}),n.d(t,"AUTHORIZE",function(){return m}),n.d(t,"LOGOUT",function(){return v}),n.d(t,"PRE_AUTHORIZE_OAUTH2",function(){return g}),n.d(t,"AUTHORIZE_OAUTH2",function(){return y}),n.d(t,"VALIDATE",function(){return b}),n.d(t,"CONFIGURE_AUTH",function(){return _}),n.d(t,"showDefinitions",function(){return w}),n.d(t,"authorize",function(){return x}),n.d(t,"logout",function(){return E}),n.d(t,"preAuthorizeImplicit",function(){return S}),n.d(t,"authorizeOauth2",function(){return C}),n.d(t,"authorizePassword",function(){return k}),n.d(t,"authorizeApplication",function(){return O}),n.d(t,"authorizeAccessCodeWithFormParams",function(){return A}),n.d(t,"authorizeAccessCodeWithBasicAuthentication",function(){return T}),n.d(t,"authorizeRequest",function(){return j}),n.d(t,"configureAuth",function(){return I});var r=n(26),o=n.n(r),i=n(16),a=n.n(i),s=n(28),u=n.n(s),c=n(95),l=n.n(c),p=n(18),f=n.n(p),h=n(3),d="show_popup",m="authorize",v="logout",g="pre_authorize_oauth2",y="authorize_oauth2",b="validate",_="configure_auth";function w(e){return{type:d,payload:e}}function x(e){return{type:m,payload:e}}function E(e){return{type:v,payload:e}}var S=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,i=e.token,a=e.isValid,s=o.schema,c=o.name,l=s.get("flow");delete f.a.swaggerUIRedirectOauth2,"accessCode"===l||a||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),i.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:u()(i)}):n.authorizeOauth2({auth:o,token:i})}};function C(e){return{type:y,payload:e}}var k=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,i=e.username,s=e.password,u=e.passwordType,c=e.clientId,l=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:i,password:s},f={};switch(u){case"request-body":!function(e,t,n){t&&a()(e,{client_id:t});n&&a()(e,{client_secret:n})}(p,c,l);break;case"basic":f.Authorization="Basic "+Object(h.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(u," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(h.b)(p),url:r.get("tokenUrl"),name:o,headers:f,query:{},auth:e})}};var O=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,s=e.clientSecret,u={Authorization:"Basic "+Object(h.a)(a+":"+s)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(h.b)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:u})}},A=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:s,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t})}},T=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,s=t.clientSecret,u={Authorization:"Basic "+Object(h.a)(a+":"+s)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:Object(h.b)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:u})}},j=function(e){return function(t){var n,r=t.fn,i=t.getConfigs,s=t.authActions,c=t.errActions,p=t.oas3Selectors,f=t.specSelectors,h=t.authSelectors,d=e.body,m=e.query,v=void 0===m?{}:m,g=e.headers,y=void 0===g?{}:g,b=e.name,_=e.url,w=e.auth,x=(h.getConfigs()||{}).additionalQueryStringParams;n=f.isOAS3()?l()(_,p.selectedServer(),!0):l()(_,f.url(),!0),"object"===o()(x)&&(n.query=a()({},n.query,x));var E=n.toString(),S=a()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:E,method:"post",headers:S,query:v,body:d,requestInterceptor:i().requestInterceptor,responseInterceptor:i().responseInterceptor}).then(function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:u()(t)}):s.authorizeOauth2({auth:w,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})}).catch(function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})})}};function I(e){return{type:_,payload:e}}},function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(127),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(212),o=n(211);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(49),o=n(133);e.exports=n(50)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",function(){return o}),n.d(t,"UPDATE_FILTER",function(){return i}),n.d(t,"UPDATE_MODE",function(){return a}),n.d(t,"SHOW",function(){return s}),n.d(t,"updateLayout",function(){return u}),n.d(t,"updateFilter",function(){return c}),n.d(t,"show",function(){return l}),n.d(t,"changeMode",function(){return p});var r=n(3),o="layout_update_layout",i="layout_update_filter",a="layout_update_mode",s="layout_show";function u(e){return{type:o,payload:e}}function c(e){return{type:i,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.w)(e),{type:s,payload:{thing:e,shown:t}}}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.w)(e),{type:a,payload:{thing:e,mode:t}}}},function(e,t,n){"use strict";(function(t){ -/*! - * @description Recursive object extending - * @author Viacheslav Lotsmanov - * @license MIT - * - * The MIT License (MIT) - * - * Copyright (c) 2013-2018 Viacheslav Lotsmanov - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach(function(e,i){"object"==typeof e&&null!==e?Array.isArray(e)?t[i]=o(e):n(e)?t[i]=r(e):t[i]=a({},e):t[i]=e}),t}function i(e,t){return"__proto__"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,s=arguments[0],u=Array.prototype.slice.call(arguments,1);return u.forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(c){return t=i(s,c),(e=i(u,c))===s?void 0:"object"!=typeof e||null===e?void(s[c]=e):Array.isArray(e)?void(s[c]=o(e)):n(e)?void(s[c]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(s[c]=a({},e)):void(s[c]=a(t,e))})}),s}}).call(this,n(64).Buffer)},function(e,t,n){var r=n(151),o=n(337);e.exports=n(126)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(106),o=n(605),i=n(606),a="[object Null]",s="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:a:u&&u in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(623),o=n(626);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(383),o=n(663),i=n(107);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){"use strict";var r=n(178),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=p;var i=n(137);i.inherits=n(47);var a=n(393),s=n(241);i.inherits(p,a);for(var u=o(s.prototype),c=0;c=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){e.exports={}},function(e,t,n){n(564);for(var r=n(32),o=n(77),i=n(102),a=n(34)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u1){for(var d=Array(h),m=0;m1){for(var g=Array(v),y=0;y=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){var r=n(63),o=n(410),i=n(411),a=n(46),s=n(158),u=n(226),c={},l={};(t=e.exports=function(e,t,n,p,f){var h,d,m,v,g=f?function(){return e}:u(e),y=r(n,p,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(h=s(e.length);h>b;b++)if((v=t?y(a(d=e[b])[0],d[1]):y(e[b]))===c||v===l)return v}else for(m=g.call(e);!(d=m.next()).done;)if((v=o(m,y,d.value,t))===c||v===l)return v}).BREAK=c,t.RETURN=l},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=Object(i.A)(t),a=r.type,s=r.example,u=r.properties,c=r.additionalProperties,l=r.items,p=n.includeReadOnly,f=n.includeWriteOnly;if(void 0!==s)return Object(i.e)(s,"$$ref",function(e){return"string"==typeof e&&e.indexOf("#")>-1});if(!a)if(u)a="object";else{if(!l)return;a="array"}if("object"===a){var d=Object(i.A)(u),m={};for(var v in d)d[v]&&d[v].deprecated||d[v]&&d[v].readOnly&&!p||d[v]&&d[v].writeOnly&&!f||(m[v]=e(d[v],n));if(!0===c)m.additionalProp1={};else if(c)for(var g=Object(i.A)(c),y=e(g,n),b=1;b<4;b++)m["additionalProp"+b]=y;return m}return"array"===a?o()(l.anyOf)?l.anyOf.map(function(t){return e(t,n)}):o()(l.oneOf)?l.oneOf.map(function(t){return e(t,n)}):[e(l,n)]:t.enum?t.default?t.default:Object(i.w)(t.enum)[0]:"file"!==a?h(t):void 0},m=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},v=function e(t){var n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=p()({},Object(i.A)(t)),u=s.type,c=s.properties,l=s.additionalProperties,f=s.items,d=s.example,m=a.includeReadOnly,v=a.includeWriteOnly,g=s.default,y={},b={},_=t.xml,w=_.name,x=_.prefix,E=_.namespace,S=s.enum;if(!u)if(c||l)u="object";else{if(!f)return;u="array"}if(n=(x?x+":":"")+(w=w||"notagname"),E){var C=x?"xmlns:"+x:"xmlns";b[C]=E}if("array"===u&&f){if(f.xml=f.xml||_||{},f.xml.name=f.xml.name||_.name,_.wrapped)return y[n]=[],o()(d)?d.forEach(function(t){f.example=t,y[n].push(e(f,a))}):o()(g)?g.forEach(function(t){f.default=t,y[n].push(e(f,a))}):y[n]=[e(f,a)],b&&y[n].push({_attr:b}),y;var k=[];return o()(d)?(d.forEach(function(t){f.example=t,k.push(e(f,a))}),k):o()(g)?(g.forEach(function(t){f.default=t,k.push(e(f,a))}),k):e(f,a)}if("object"===u){var O=Object(i.A)(c);for(var A in y[n]=[],d=d||{},O)if(O.hasOwnProperty(A)&&(!O[A].readOnly||m)&&(!O[A].writeOnly||v))if(O[A].xml=O[A].xml||{},O[A].xml.attribute){var T=o()(O[A].enum)&&O[A].enum[0],j=O[A].example,I=O[A].default;b[O[A].xml.name||A]=void 0!==j&&j||void 0!==d[A]&&d[A]||void 0!==I&&I||T||h(O[A])}else{O[A].xml.name=O[A].xml.name||A,void 0===O[A].example&&void 0!==d[A]&&(O[A].example=d[A]);var P=e(O[A]);o()(P)?y[n]=y[n].concat(P):y[n].push(P)}return!0===l?y[n].push({additionalProp:"Anything can be here"}):l&&y[n].push({additionalProp:h(l)}),b&&y[n].push({_attr:b}),y}return r=void 0!==d?d:void 0!==g?g:o()(S)?S[0]:h(t),y[n]=b?[{_attr:b},r]:r,y};function g(e,t){var n=v(e,t);if(n)return s()(n,{declaration:!0,indent:"\t"})}var y=c()(g),b=c()(d)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_CONFIGS",function(){return i}),n.d(t,"TOGGLE_CONFIGS",function(){return a}),n.d(t,"update",function(){return s}),n.d(t,"toggle",function(){return u}),n.d(t,"loaded",function(){return c});var r=n(2),o=n.n(r),i="configs_update",a="configs_toggle";function s(e,t){return{type:i,payload:o()({},e,t)}}function u(e){return{type:a,payload:e}}var c=function(){return function(){}}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),o=n.n(r),i=o.a.Set.of("type","format","items","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf");function a(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isOAS3;if(!o.a.Map.isMap(e))return{schema:o.a.Map(),parameterContentMediaType:null};if(!t)return"body"===e.get("in")?{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}:{schema:e.filter(function(e,t){return i.includes(t)}),parameterContentMediaType:null};if(e.get("content")){var n=e.get("content",o.a.Map({})).keySeq().first();return{schema:e.getIn(["content",n,"schema"],o.a.Map()),parameterContentMediaType:n}}return{schema:e.get("schema",o.a.Map()),parameterContentMediaType:null}}},function(e,t,n){e.exports=n(782)},function(e,t,n){"use strict";n.r(t);var r=n(473),o="object"==typeof self&&self&&self.Object===Object&&self,i=(r.a||o||Function("return this")()).Symbol,a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=i?i.toStringTag:void 0;var l=function(e){var t=s.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[c]=n:delete e[c]),o},p=Object.prototype.toString;var f=function(e){return p.call(e)},h="[object Null]",d="[object Undefined]",m=i?i.toStringTag:void 0;var v=function(e){return null==e?void 0===e?d:h:m&&m in Object(e)?l(e):f(e)};var g=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var y=function(e){return null!=e&&"object"==typeof e},b="[object Object]",_=Function.prototype,w=Object.prototype,x=_.toString,E=w.hasOwnProperty,S=x.call(Object);var C=function(e){if(!y(e)||v(e)!=b)return!1;var t=g(e);if(null===t)return!0;var n=E.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==S},k=n(331),O={INIT:"@@redux/INIT"};function A(e,t,n){var r;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(A)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function l(){return i}function p(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return c(),s.push(e),function(){if(t){t=!1,c();var n=s.indexOf(e);s.splice(n,1)}}}function f(e){if(!C(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,i=o(i,e)}finally{u=!1}for(var t=a=s,n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var r=!1,o={},s=0;s0?r:n)(e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(349),o=n(216);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(49).f,o=n(75),i=n(34)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(159)("meta"),o=n(43),i=n(75),a=n(49).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(82)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return c&&p.NEED&&u(e)&&!i(e,r)&&l(e),e}}},function(e,t,n){"use strict";e.exports=function(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r1&&void 0!==arguments[1]?arguments[1]:[],n={arrayBehaviour:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).arrayBehaviour||"replace"},r=t.map(function(e){return e||{}}),i=e||{},c=0;c1?t-1:0),r=1;r5&&void 0!==arguments[5]?arguments[5]:{};if("string"!=typeof r)throw new TypeError("Need a string, to fetch a component. Was given a "+o()(r));var s=n(r);return s?i?"root"===i?A(e,s,t()):A(e,M(s)):M(s):(a.failSilently||e().log.warn("Could not find component:",r),null)}},function(e,t,n){"use strict";n.r(t),n.d(t,"setHash",function(){return r});var r=function(e){return e?history.pushState(null,null,"#".concat(e)):window.location.hash=""}},function(e,t,n){var r=n(125),o=n(33)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(45),o=n(496),i=n(497),a=Object.defineProperty;t.f=n(126)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(154);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(503),o=n(73);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(150),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n(550);var r=n(97),o=n(81),i=n(99),a=n(73),s=n(33),u=n(210),c=s("species"),l=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$
")}),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=s(e),h=!i(function(){var t={};return t[f]=function(){return 7},7!=""[e](t)}),d=h?!i(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!t}):void 0;if(!h||!d||"replace"===e&&!l||"split"===e&&!p){var m=/./[f],v=n(a,f,""[e],function(e,t,n,r,o){return t.exec===u?h&&!o?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),g=v[0],y=v[1];r(String.prototype,e,g),o(RegExp.prototype,f,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},function(e,t,n){var r=n(213),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(46),o=n(352),i=n(216),a=n(214)("IE_PROTO"),s=function(){},u=function(){var e,t=n(218)("iframe"),r=i.length;for(t.style.display="none",n(353).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" -{{ end }} \ No newline at end of file diff --git a/tpl/layouts/style.html b/tpl/layouts/style.html deleted file mode 100644 index a977c26..0000000 --- a/tpl/layouts/style.html +++ /dev/null @@ -1,4 +0,0 @@ -{{define "style"}} - -{{end}} \ No newline at end of file diff --git a/tpl/main.html b/tpl/main.html deleted file mode 100644 index 289736b..0000000 --- a/tpl/main.html +++ /dev/null @@ -1,7 +0,0 @@ -{{define "title"}}main{{end}} - -{{define "content"}} - -{{.}} - -{{end}} \ No newline at end of file diff --git a/web/README.md b/web/README.md deleted file mode 100644 index 020b468..0000000 --- a/web/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `/web` - -Web application specific components: static web assets, server side templates and SPAs. diff --git a/web/app/.keep b/web/app/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/web/static/.keep b/web/static/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/web/template/.keep b/web/template/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/website/README.md b/website/README.md deleted file mode 100644 index 2bd719d..0000000 --- a/website/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# `/website` - -This is the place to put your project's website data if you are not using Github pages. - -Examples: - -* https://github.com/hashicorp/vault/tree/master/website -* https://github.com/perkeep/perkeep/tree/master/website From 25fa76013642aa361c4efb7d7ed0e625fb2fd420 Mon Sep 17 00:00:00 2001 From: shine_86 Date: Mon, 26 Oct 2020 10:22:35 +0300 Subject: [PATCH 3/4] command line args --- main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 09544b2..3961d99 100644 --- a/main.go +++ b/main.go @@ -2,14 +2,19 @@ package main import ( "fmt" + "os" "github.com/temp-lib/templater" ) func main() { + if len(os.Args) != 3 { + fmt.Println("usage : app serviceName user") + return + } cfg := templater.Config{ - ServiceName: "TEST", - User: "shine", + ServiceName: os.Args[1], + User: os.Args[2], IgnorePatterns: []string{".html", ".yml", ".yaml", ".tpl", ".txt", "js.map"}, } templtr := templater.New(cfg) From 64620b0dc79aedab1fe0cda6fc4b1d11d7f49abd Mon Sep 17 00:00:00 2001 From: shine_86 Date: Mon, 26 Oct 2020 10:25:08 +0300 Subject: [PATCH 4/4] cleaning --- .env | 5 ---- .gitlab-ci.yml | 54 ----------------------------------- .golangci.pipeline.yaml | 62 ----------------------------------------- .golangci.yaml | 62 ----------------------------------------- 4 files changed, 183 deletions(-) delete mode 100644 .env delete mode 100644 .gitlab-ci.yml delete mode 100644 .golangci.pipeline.yaml delete mode 100644 .golangci.yaml diff --git a/.env b/.env deleted file mode 100644 index a33ab49..0000000 --- a/.env +++ /dev/null @@ -1,5 +0,0 @@ -MY_ENV="Hello" -PORT=8080 -PORT_DEBUG=8888 -PORT_GRPC=8842 -LOG_LEVEL=0 \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 6790431..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,54 +0,0 @@ -image: golang:1.14.2 - -services: - - docker:dind - -stages: -- build -- test -- lint -#- deploy - -variables: - KUBECONFIG: /etc/deploy/config - REPOSITORY: and07/boilerplate-go - NAMESPACE: boilerplate-go - TAG: ${CI_BUILD_REF_NAME}_${CI_BUILD_REF} - CONTAINER_IMAGE: docker.io/${REPOSITORY}:${CI_BUILD_REF_NAME}_${CI_BUILD_REF} - CONTAINER_IMAGE_LATEST: docker.io/${REPOSITORY}:latest - -build: - stage: build - script: - #- docker login -u $DOCKER_USER -p $DOCKER_PASS docker.io - - make build - -test: - stage: test - script: - - make test - -lint: - stage: lint - script: - - make lint-full - -# deploy: -# stage: deploy -# image: lwolf/helm-kubectl-docker:v193_281 -# before_script: -# - mkdir -p /etc/deploy -# - echo ${kube_config} | base64 -d > ${KUBECONFIG} -# - helm init --client-only -# script: -# - cd deployments/kubernetes/boilerplate-go-chart -# - export DEPLOYS=$(helm ls | grep $NAMESPACE | wc -l) -# - > -# if [ ${DEPLOYS} -eq 0 ]; then -# helm install --name=${NAMESPACE} . --namespace=${NAMESPACE} \ -# --set replicaCount=${REPLICA_COUNT}; -# else -# helm upgrade ${NAMESPACE} . --namespace=${NAMESPACE} \ -# --set image.tag=${TAG} \ -# --set replicaCount=${REPLICA_COUNT}; -# fi \ No newline at end of file diff --git a/.golangci.pipeline.yaml b/.golangci.pipeline.yaml deleted file mode 100644 index 43734b0..0000000 --- a/.golangci.pipeline.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# More info on config here: https://github.com/golangci/golangci-lint#config-file -run: - deadline: 10m - issues-exit-code: 1 - tests: true - skip-dirs: - - bin - - vendor - - var - - tmp - skip-files: - - \.pb\.go$ - - \.pb\.goclay\.go$ - -output: - format: colored-line-number - print-issued-lines: true - print-linter-name: true - -linters-settings: - govet: - check-shadowing: true - golint: - min-confidence: 0 - dupl: - threshold: 100 - goconst: - min-len: 2 - min-occurrences: 2 - -linters: - disable-all: true - enable: - - golint - - govet - - errcheck - - deadcode - - structcheck - - varcheck - - ineffassign - - typecheck -# - dupl - - goconst -# - goimports - - megacheck # (staticcheck + gosimple + unused in one linter) - - gosec - -issues: - exclude-use-default: false - exclude: - # _ instead of err checks - - G104 - # for "public interface + private struct implementation" cases only! - - exported func * returns unexported type *, which can be annoying to use - # can be removed in the development phase - # - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form) - # not for the active development - can be removed in the stable phase - - should have a package comment, unless it's in another file for this package - - don't use an underscore in package name - # errcheck: Almost all programs ignore errors on these functions and in most cases it's ok - - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked - - should check returned error before deferring diff --git a/.golangci.yaml b/.golangci.yaml deleted file mode 100644 index ab1dda4..0000000 --- a/.golangci.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# More info on config here: https://github.com/golangci/golangci-lint#config-file -run: - deadline: 10s - issues-exit-code: 1 - tests: true - skip-dirs: - - bin - - vendor - - var - - tmp - skip-files: - - \.pb\.go$ - - \.pb\.goclay\.go$ - -output: - format: colored-line-number - print-issued-lines: true - print-linter-name: true - -linters-settings: - govet: - check-shadowing: true - golint: - min-confidence: 0 - dupl: - threshold: 100 - goconst: - min-len: 2 - min-occurrences: 2 - -linters: - disable-all: true - enable: - - golint - - govet - - errcheck - - deadcode - - structcheck - - varcheck - - ineffassign - - typecheck -# - dupl - - goconst - - gosec - # - goimports - your IDE should do this automatically as 'On save' action anyways - # - megacheck (staticcheck + gosimple + unused in one linter) - enable before push - -issues: - exclude-use-default: false - exclude: - # _ instead of err checks - - G104 - # for "public interface + private struct implementation" cases only! - - exported func * returns unexported type *, which can be annoying to use - # can be removed in the development phase - # - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form) - # not for the active development - can be removed in the stable phase - - should have a package comment, unless it's in another file for this package - - don't use an underscore in package name - # errcheck: Almost all programs ignore errors on these functions and in most cases it's ok - - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked - - should check returned error before deferring