From 783eb690a10d3a36f98243a198b5f57397b509d0 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Tue, 12 Apr 2022 20:24:36 +0300
Subject: [PATCH 01/39] snap: update Go builder for snap
---
snap/local/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/snap/local/Makefile b/snap/local/Makefile
index ef9146652..2c3add0c1 100644
--- a/snap/local/Makefile
+++ b/snap/local/Makefile
@@ -1,4 +1,4 @@
-GO_VERSION ?=1.17.7
+GO_VERSION ?=1.18.0
SNAP_BUILDER_IMAGE := local/snap-builder:2.0.0-$(shell echo $(GO_VERSION) | tr :/ __)
From 9307fe3c04ee25fdbefa7a175b7c98c446cd8051 Mon Sep 17 00:00:00 2001
From: Anton Bystrov <83747830+anton-bystrov@users.noreply.github.com>
Date: Wed, 13 Apr 2022 11:18:42 +0300
Subject: [PATCH 02/39] Update CHANGELOG.md (#2463)
May be mispint here?
---
docs/CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 69f7f03c9..9deabea7c 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -39,7 +39,7 @@ Released at 07-04-2022
**Update notes:** this release introduces backwards-incompatible changes to communication protocol between `vmselect` and `vmstorage` nodes in cluster version of VictoriaMetrics, so `vmselect` and `vmstorage` nodes may log communication errors during the upgrade. These errors should stop after all the `vmselect` and `vmstorage` nodes are updated to new release.
* FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): add ability to verify files obtained via [native export](https://docs.victoriametrics.com/#how-to-export-data-in-native-format). See [these docs](https://docs.victoriametrics.com/vmctl.html#verifying-exported-blocks-from-victoriametrics) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2362).
-* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add pre-defined dasbhoards for per-job CPU usage, memory usage and disk IO usage. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2243) for details.
+* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add pre-defined dashboards for per-job CPU usage, memory usage and disk IO usage. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2243) for details.
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): improve compatibility with [Prometheus Alert Generator specification](https://github.com/prometheus/compliance/blob/main/alert_generator/specification.md). See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2340).
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add `-datasource.disableKeepAlive` command-line flag, which can be used for disabling [HTTP keep-alive connections](https://en.wikipedia.org/wiki/HTTP_persistent_connection) to datasources. This option can be useful for distributing load among multiple datasources behind TCP proxy such as [HAProxy](http://www.haproxy.org/).
* FEATURE: [Cluster version of VictoriaMetrics](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html): reduce memory usage by up to 50% for `vminsert` and `vmstorage` under high ingestion rate.
From 45fcaa33e85cc3bc2dcdfb715a28db568339d920 Mon Sep 17 00:00:00 2001
From: Roman Khavronenko
Date: Wed, 13 Apr 2022 10:50:26 +0200
Subject: [PATCH 03/39] vmalert: add DNS service discovery (#2465)
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2460
Signed-off-by: hagen1778
---
app/vmalert/Makefile | 2 +-
app/vmalert/README.md | 18 +++++++++++++++---
app/vmalert/notifier/config.go | 5 +++++
app/vmalert/notifier/config_test.go | 1 +
app/vmalert/notifier/config_watcher.go | 19 +++++++++++++++++++
app/vmalert/notifier/init.go | 2 ++
app/vmalert/notifier/testdata/dns.good.yaml | 12 ++++++++++++
app/vmalert/notifier/testdata/mixed.good.yaml | 12 +++++++++++-
docs/vmalert.md | 18 +++++++++++++++---
9 files changed, 81 insertions(+), 8 deletions(-)
create mode 100644 app/vmalert/notifier/testdata/dns.good.yaml
diff --git a/app/vmalert/Makefile b/app/vmalert/Makefile
index 87f08e6a6..eebac7f01 100644
--- a/app/vmalert/Makefile
+++ b/app/vmalert/Makefile
@@ -83,7 +83,7 @@ run-vmalert-sd: vmalert
./bin/vmalert -rule=app/vmalert/config/testdata/rules2-good.rules \
-datasource.url=http://localhost:8428 \
-remoteWrite.url=http://localhost:8428 \
- -notifier.config=app/vmalert/notifier/testdata/consul.good.yaml \
+ -notifier.config=app/vmalert/notifier/testdata/mixed.good.yaml \
-configCheckInterval=10s
replay-vmalert: vmalert
diff --git a/app/vmalert/README.md b/app/vmalert/README.md
index b03ef76dd..185a9d891 100644
--- a/app/vmalert/README.md
+++ b/app/vmalert/README.md
@@ -48,7 +48,7 @@ To start using `vmalert` you will need the following things:
* list of rules - PromQL/MetricsQL expressions to execute;
* datasource address - reachable MetricsQL endpoint to run queries against;
* notifier address [optional] - reachable [Alert Manager](https://github.com/prometheus/alertmanager) instance for processing,
-aggregating alerts, and sending notifications. Please note, notifier address also supports Consul Service Discovery via
+aggregating alerts, and sending notifications. Please note, notifier address also supports Consul and DNS Service Discovery via
[config file](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/notifier/config.go).
* remote write address [optional] - [remote write](https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations)
compatible storage to persist rules and alerts state info;
@@ -846,8 +846,9 @@ Notifier also supports configuration via file specified with flag `notifier.conf
-notifier.config=app/vmalert/notifier/testdata/consul.good.yaml
```
-The configuration file allows to configure static notifiers or discover notifiers via
-[Consul](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config).
+The configuration file allows to configure static notifiers, discover notifiers via
+[Consul](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config)
+and [DNS](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config):
For example:
```
@@ -860,6 +861,12 @@ consul_sd_configs:
- server: localhost:8500
services:
- alertmanager
+
+dns_sd_configs:
+ - names:
+ - my.domain.com
+ type: 'A'
+ port: 9093
```
The list of configured or discovered Notifiers can be explored via [UI](#Web).
@@ -911,6 +918,11 @@ static_configs:
consul_sd_configs:
[ - ... ]
+# List of DNS service discovery configurations.
+# See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config
+dns_sd_configs:
+ [ - ... ]
+
# List of relabel configurations for entities discovered via service discovery.
# Supports the same relabeling features as the rest of VictoriaMetrics components.
# See https://docs.victoriametrics.com/vmagent.html#relabeling
diff --git a/app/vmalert/notifier/config.go b/app/vmalert/notifier/config.go
index c6e75aef8..3eb776fbb 100644
--- a/app/vmalert/notifier/config.go
+++ b/app/vmalert/notifier/config.go
@@ -15,6 +15,7 @@ import (
"github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promrelabel"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/consul"
+ "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/dns"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils"
)
@@ -29,6 +30,10 @@ type Config struct {
// ConsulSDConfigs contains list of settings for service discovery via Consul
// see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
ConsulSDConfigs []consul.SDConfig `yaml:"consul_sd_configs,omitempty"`
+ // DNSSDConfigs ontains list of settings for service discovery via DNS.
+ // See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config
+ DNSSDConfigs []dns.SDConfig `yaml:"dns_sd_configs,omitempty"`
+
// StaticConfigs contains list of static targets
StaticConfigs []StaticConfig `yaml:"static_configs,omitempty"`
diff --git a/app/vmalert/notifier/config_test.go b/app/vmalert/notifier/config_test.go
index e3dfe6b50..442b2f3a7 100644
--- a/app/vmalert/notifier/config_test.go
+++ b/app/vmalert/notifier/config_test.go
@@ -12,6 +12,7 @@ func TestConfigParseGood(t *testing.T) {
}
f("testdata/mixed.good.yaml")
f("testdata/consul.good.yaml")
+ f("testdata/dns.good.yaml")
f("testdata/static.good.yaml")
}
diff --git a/app/vmalert/notifier/config_watcher.go b/app/vmalert/notifier/config_watcher.go
index 0fe8c53f5..1bc116229 100644
--- a/app/vmalert/notifier/config_watcher.go
+++ b/app/vmalert/notifier/config_watcher.go
@@ -7,6 +7,7 @@ import (
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/consul"
+ "github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/dns"
)
// configWatcher supports dynamic reload of Notifier objects
@@ -195,6 +196,24 @@ func (cw *configWatcher) start() error {
return fmt.Errorf("failed to start consulSD discovery: %s", err)
}
}
+
+ if len(cw.cfg.DNSSDConfigs) > 0 {
+ err := cw.add(TargetDNS, *dns.SDCheckInterval, func() ([]map[string]string, error) {
+ var labels []map[string]string
+ for i := range cw.cfg.DNSSDConfigs {
+ sdc := &cw.cfg.DNSSDConfigs[i]
+ targetLabels, err := sdc.GetLabels(cw.cfg.baseDir)
+ if err != nil {
+ return nil, fmt.Errorf("got labels err: %s", err)
+ }
+ labels = append(labels, targetLabels...)
+ }
+ return labels, nil
+ })
+ if err != nil {
+ return fmt.Errorf("failed to start DNSSD discovery: %s", err)
+ }
+ }
return nil
}
diff --git a/app/vmalert/notifier/init.go b/app/vmalert/notifier/init.go
index b00c1bcd6..99892d2b4 100644
--- a/app/vmalert/notifier/init.go
+++ b/app/vmalert/notifier/init.go
@@ -162,6 +162,8 @@ const (
TargetStatic TargetType = "static"
// TargetConsul is for targets discovered via Consul
TargetConsul TargetType = "consulSD"
+ // TargetDNS is for targets discovered via DNS
+ TargetDNS TargetType = "DNSSD"
)
// GetTargets returns list of static or discovered targets
diff --git a/app/vmalert/notifier/testdata/dns.good.yaml b/app/vmalert/notifier/testdata/dns.good.yaml
new file mode 100644
index 000000000..e7a50c472
--- /dev/null
+++ b/app/vmalert/notifier/testdata/dns.good.yaml
@@ -0,0 +1,12 @@
+dns_sd_configs:
+ - names:
+ - cloudflare.com
+ type: 'A'
+ port: 9093
+relabel_configs:
+ - source_labels: [__meta_dns_name]
+ replacement: '${1}'
+ target_label: dns_name
+alert_relabel_configs:
+ - target_label: "foo"
+ replacement: "aaa"
\ No newline at end of file
diff --git a/app/vmalert/notifier/testdata/mixed.good.yaml b/app/vmalert/notifier/testdata/mixed.good.yaml
index f6a5c5a62..906c2aa6a 100644
--- a/app/vmalert/notifier/testdata/mixed.good.yaml
+++ b/app/vmalert/notifier/testdata/mixed.good.yaml
@@ -11,8 +11,18 @@ consul_sd_configs:
- server: localhost:8500
services:
- consul
+
+dns_sd_configs:
+ - names:
+ - cloudflare.com
+ type: 'A'
+ port: 9093
+
relabel_configs:
- source_labels: [__meta_consul_tags]
regex: .*,__scheme__=([^,]+),.*
replacement: '${1}'
- target_label: __scheme__
\ No newline at end of file
+ target_label: __scheme__
+ - source_labels: [__meta_dns_name]
+ replacement: '${1}'
+ target_label: dns_name
\ No newline at end of file
diff --git a/docs/vmalert.md b/docs/vmalert.md
index 0307f4f6e..5150ae324 100644
--- a/docs/vmalert.md
+++ b/docs/vmalert.md
@@ -52,7 +52,7 @@ To start using `vmalert` you will need the following things:
* list of rules - PromQL/MetricsQL expressions to execute;
* datasource address - reachable MetricsQL endpoint to run queries against;
* notifier address [optional] - reachable [Alert Manager](https://github.com/prometheus/alertmanager) instance for processing,
-aggregating alerts, and sending notifications. Please note, notifier address also supports Consul Service Discovery via
+aggregating alerts, and sending notifications. Please note, notifier address also supports Consul and DNS Service Discovery via
[config file](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/notifier/config.go).
* remote write address [optional] - [remote write](https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations)
compatible storage to persist rules and alerts state info;
@@ -850,8 +850,9 @@ Notifier also supports configuration via file specified with flag `notifier.conf
-notifier.config=app/vmalert/notifier/testdata/consul.good.yaml
```
-The configuration file allows to configure static notifiers or discover notifiers via
-[Consul](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config).
+The configuration file allows to configure static notifiers, discover notifiers via
+[Consul](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config)
+and [DNS](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config):
For example:
```
@@ -864,6 +865,12 @@ consul_sd_configs:
- server: localhost:8500
services:
- alertmanager
+
+dns_sd_configs:
+ - names:
+ - my.domain.com
+ type: 'A'
+ port: 9093
```
The list of configured or discovered Notifiers can be explored via [UI](#Web).
@@ -915,6 +922,11 @@ static_configs:
consul_sd_configs:
[ - ... ]
+# List of DNS service discovery configurations.
+# See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config
+dns_sd_configs:
+ [ - ... ]
+
# List of relabel configurations for entities discovered via service discovery.
# Supports the same relabeling features as the rest of VictoriaMetrics components.
# See https://docs.victoriametrics.com/vmagent.html#relabeling
From f7e4c5a628e43e5ff9f2c784889a0e548578ba73 Mon Sep 17 00:00:00 2001
From: Dmytro Kozlov
Date: Wed, 13 Apr 2022 12:52:55 +0300
Subject: [PATCH 04/39] vmctl: Return non zero error code if validation or
subcommand fails (#2462)
---
app/vmctl/main.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/vmctl/main.go b/app/vmctl/main.go
index 52176ade0..abf5df6af 100644
--- a/app/vmctl/main.go
+++ b/app/vmctl/main.go
@@ -215,7 +215,7 @@ func main() {
err = app.Run(os.Args)
if err != nil {
- log.Println(err)
+ log.Fatalln(err)
}
log.Printf("Total time: %v", time.Since(start))
}
From 28f21f5f17790c648af17497cd7b1806f1fa73fd Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Wed, 13 Apr 2022 11:32:46 +0300
Subject: [PATCH 05/39] deployment/docker: update Go builder from go1.18.0 to
go1.18.1
See https://github.com/golang/go/issues?q=milestone%3AGo1.18.1+label%3ACherryPickApproved
---
deployment/docker/Makefile | 2 +-
snap/local/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/deployment/docker/Makefile b/deployment/docker/Makefile
index 6699bc81e..a4eceaa5c 100644
--- a/deployment/docker/Makefile
+++ b/deployment/docker/Makefile
@@ -4,7 +4,7 @@ DOCKER_NAMESPACE := victoriametrics
ROOT_IMAGE ?= alpine:3.15.4
CERTS_IMAGE := alpine:3.15.4
-GO_BUILDER_IMAGE := golang:1.18.0-alpine
+GO_BUILDER_IMAGE := golang:1.18.1-alpine
BUILDER_IMAGE := local/builder:2.0.0-$(shell echo $(GO_BUILDER_IMAGE) | tr :/ __)-1
BASE_IMAGE := local/base:1.1.3-$(shell echo $(ROOT_IMAGE) | tr :/ __)-$(shell echo $(CERTS_IMAGE) | tr :/ __)
diff --git a/snap/local/Makefile b/snap/local/Makefile
index 2c3add0c1..ba264a798 100644
--- a/snap/local/Makefile
+++ b/snap/local/Makefile
@@ -1,4 +1,4 @@
-GO_VERSION ?=1.18.0
+GO_VERSION ?=1.18.1
SNAP_BUILDER_IMAGE := local/snap-builder:2.0.0-$(shell echo $(GO_VERSION) | tr :/ __)
From 77ffa4e447b14e4c2bf8b765cb1474bcfb18e8b8 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Wed, 13 Apr 2022 14:09:11 +0300
Subject: [PATCH 06/39] docs/CHANGELOG.md: document
f7e4c5a628e43e5ff9f2c784889a0e548578ba73
---
docs/CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 9deabea7c..ca06fbf63 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -15,6 +15,8 @@ The following tip changes can be tested by building VictoriaMetrics components f
## tip
+* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): return non-zero exit code on error. This allows handling `vmctl` errors in shell scripts. Previously `vmctl` was returning 0 exit code on error. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2322).
+
## [v1.76.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.76.1)
From e6535a75f73c676e7138620838580286e14da68d Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Wed, 13 Apr 2022 14:12:17 +0300
Subject: [PATCH 07/39] docs/CHANGELOG.md: document
45fcaa33e85cc3bc2dcdfb715a28db568339d920
---
docs/CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index ca06fbf63..e87e7eabf 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -15,6 +15,8 @@ The following tip changes can be tested by building VictoriaMetrics components f
## tip
+* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add support for DNS-based discovery for notifiers in the same way as Prometheus does. See [these docs](https://docs.victoriametrics.com/vmalert.html#notifier-configuration-file) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2460).
+
* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): return non-zero exit code on error. This allows handling `vmctl` errors in shell scripts. Previously `vmctl` was returning 0 exit code on error. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2322).
From b11e9de38663f3ffee031c05c60cb68e0f8406e9 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Fri, 15 Apr 2022 14:26:01 +0300
Subject: [PATCH 08/39] docs/Cluster-VictoriaMetrics.md: mention about possible
issues with multi-level cluster setup
---
docs/Cluster-VictoriaMetrics.md | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 78e84b157..628a68858 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -336,7 +336,12 @@ Then [promxy](https://github.com/jacksontj/promxy) could be used for querying th
`vminsert` nodes can accept data from another `vminsert` nodes starting from [v1.60.0](https://docs.victoriametrics.com/CHANGELOG.html#v1600) if `-clusternativeListenAddr` command-line flag is set. For example, if `vminsert` is started with `-clusternativeListenAddr=:8400` command-line flag, then it can accept data from another `vminsert` nodes at TCP port 8400 in the same way as `vmstorage` nodes do. This allows chaining `vminsert` nodes and building multi-level cluster topologies with flexible configs. For example, the top level of `vminsert` nodes can replicate data among the second level of `vminsert` nodes located in distinct availability zones (AZ), while the second-level `vminsert` nodes can spread the data among `vmstorage` nodes located in the same AZ. Such setup guarantees cluster availability if some AZ becomes unavailable. The data from all the `vmstorage` nodes in all the AZs can be read via `vmselect` nodes, which are configured to query all the `vmstorage` nodes in all the availability zones (e.g. all the `vmstorage` addresses are passed via `-storageNode` command-line flag to `vmselect` nodes). Additionally, `-replicationFactor=k+1` must be passed to `vmselect` nodes, where `k` is the lowest number of `vmstorage` nodes in a single AZ. See [replication docs](#replication-and-data-safety) for more details.
-Another option is to set up [vmagent](https://docs.victoriametrics.com/vmagent.html) for replicating the data among multiple VictoriaMetrics clusters. See [these docs](https://docs.victoriametrics.com/vmagent.html#multitenancy) for details.
+The multi-level cluster setup for `vminsert` nodes has the following shortcomings because of synchronous replication and data sharding:
+
+* Data ingestion speed is limited by the slowest link to AZ.
+* The cluster stops receiving new samples as soon as at least a single AZ becomes unavailable.
+
+These issues are addressed by [vmagent](https://docs.victoriametrics.com/vmagent.html) when it runs in [multitenancy mode](https://docs.victoriametrics.com/vmagent.html#multitenancy). `vmagent` buffers data, which must be sent to a particular AZ, when this AZ is temporarily unavailable. The buffer is stored on disk. The buffered data is sent to AZ as soon as it becomes available.
## Helm
From 4169b97af98ee89ce5b7d5b22c24a7a1574130dc Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Fri, 15 Apr 2022 15:04:10 +0300
Subject: [PATCH 09/39] docs/Cluster-VictoriaMetrics.md: improve docs on
cluster setup, resizing and scalability
---
docs/Cluster-VictoriaMetrics.md | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 628a68858..c1a5088a3 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -129,8 +129,9 @@ A minimal cluster must contain the following nodes:
- a single `vminsert` node with `-storageNode=`
- a single `vmselect` node with `-storageNode=`
-It is recommended to run at least two nodes for each service
-for high availability purposes.
+It is recommended to run at least two nodes for each service for high availability purposes. In this case the cluster continues working when a single node is temporarily unavailable and the remaining nodes can handle the increased workload. The node may be temporarily unavailable when the underlying hardware breaks, during software upgrades, migration or other maintenance tasks.
+
+It is preferred to run many small `vmstorage` nodes over a few big `vmstorage` nodes, since this reduces the workload increase on the remaining `vmstorage` nodes when some of `vmstorage` nodes become temporarily unavailable.
An http load balancer such as [vmauth](https://docs.victoriametrics.com/vmauth.html) or `nginx` must be put in front of `vminsert` and `vmselect` nodes. It must contain the following routing configs according to [the url format](#url-format):
@@ -255,15 +256,18 @@ It is recommended setting up alerts in [vmalert](https://docs.victoriametrics.co
## Cluster resizing and scalability
-Cluster performance and capacity scales with adding new nodes.
+Cluster performance and capacity can be scaled up in two ways:
-- `vminsert` and `vmselect` nodes are stateless and may be added / removed at any time.
- Do not forget updating the list of these nodes on http load balancer.
- Adding more `vminsert` nodes scales data ingestion rate. See [this comment](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/175#issuecomment-536925841)
- about ingestion rate scalability.
- Adding more `vmselect` nodes scales select queries rate.
-- `vmstorage` nodes own the ingested data, so they cannot be removed without data loss.
- Adding more `vmstorage` nodes scales cluster capacity.
+- By adding more resources (CPU, RAM, disk IO, disk space, network bandwidth) to existing nodes in the cluster (aka vertical scalability).
+- By adding more nodes to the cluster (aka horizontal scalability).
+
+General recommendations for cluster scalability:
+
+- Adding more CPU and RAM to existing `vmselect` nodes improves the performance for heavy queries, which process big number of time series with big number of raw samples.
+- Adding more `vmstorage` nodes increases the number of [active time series](https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series) the cluster can handle. This also increases query performance over time series with [high churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate). The cluster stability is also improved with the number of `vmstorage` nodes, since active `vmstorage` nodes need to handle lower additional workload when some of `vmstorage` nodes become unavailable.
+- Adding more CPU and RAM to existing `vmstorage` nodes increases the number of [active time series](https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series) the cluster can handle. It is preferred to add more `vmstorage` nodes over adding more CPU and RAM to existing `vmstorage` nodes, since higher number of `vmstorage` nodes increases cluster stability and improves query performance over time series with [high churn rate](https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate).
+- Adding more `vminsert` nodes increases the maximum possible data ingestion speed, since the ingested data may be split among bigger number of `vminsert` nodes.
+- Adding more `vmselect` nodes increases the maximum possible queries rate, since the incoming concurrent requests may be split among bigger number of `vmselect` nodes.
Steps to add `vmstorage` node:
From 057c3a745f02319b49e51a236d9ba9812533d8bb Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 13:03:39 +0300
Subject: [PATCH 10/39] docs/Cluster-VictoriaMetrics.md: clarify the issue with
multi-level cluster, which may result in data gaps at some AZs
---
docs/Cluster-VictoriaMetrics.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index c1a5088a3..77187411e 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -343,7 +343,7 @@ Then [promxy](https://github.com/jacksontj/promxy) could be used for querying th
The multi-level cluster setup for `vminsert` nodes has the following shortcomings because of synchronous replication and data sharding:
* Data ingestion speed is limited by the slowest link to AZ.
-* The cluster stops receiving new samples as soon as at least a single AZ becomes unavailable.
+* `vminsert` nodes at top level re-route incoming data to the remaining AZs when some AZs are temporariliy unavailable. This results in data gaps at AZs which were temporarily unavailable.
These issues are addressed by [vmagent](https://docs.victoriametrics.com/vmagent.html) when it runs in [multitenancy mode](https://docs.victoriametrics.com/vmagent.html#multitenancy). `vmagent` buffers data, which must be sent to a particular AZ, when this AZ is temporarily unavailable. The buffer is stored on disk. The buffered data is sent to AZ as soon as it becomes available.
From 5e9afcceaac954dfa01f7156ff9c5924b43271b5 Mon Sep 17 00:00:00 2001
From: Ted Robertson <10043369+tredondo@users.noreply.github.com>
Date: Sat, 16 Apr 2022 14:19:36 +0400
Subject: [PATCH 11/39] Fix typo in bug report template (#2472)
---
.github/ISSUE_TEMPLATE/bug_report.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index ed6692c1c..63376fe90 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -33,7 +33,7 @@ of Grafana dashboards if possible:
See how to setup monitoring here:
* [monitoring for single-node VictoriaMetrics](https://docs.victoriametrics.com/#monitoring)
-* [montioring for VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#monitoring)
+* [monitoring for VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#monitoring)
**Version**
The line returned when passing `--version` command line flag to the binary. For example:
From baa1c24b368ccecf1ad243e571fe4ae5a2d15b5f Mon Sep 17 00:00:00 2001
From: Nikolay
Date: Sat, 16 Apr 2022 13:22:11 +0300
Subject: [PATCH 12/39] lib/promscrape: removes omitempty for ScrapeConfig
(#2457)
This change fixes incorrect marshalling for ScrapeConfig
it affects http endpoint and ScrapeConfig checksum.
With omitempty, custom Marshaller is not called if field is not a pointer.
Previously this issue happened at vmalert
---
lib/promscrape/config.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/promscrape/config.go b/lib/promscrape/config.go
index 15e2feef6..bca411b2f 100644
--- a/lib/promscrape/config.go
+++ b/lib/promscrape/config.go
@@ -134,8 +134,8 @@ type GlobalConfig struct {
// See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
type ScrapeConfig struct {
JobName string `yaml:"job_name"`
- ScrapeInterval promutils.Duration `yaml:"scrape_interval,omitempty"`
- ScrapeTimeout promutils.Duration `yaml:"scrape_timeout,omitempty"`
+ ScrapeInterval promutils.Duration `yaml:"scrape_interval"`
+ ScrapeTimeout promutils.Duration `yaml:"scrape_timeout"`
MetricsPath string `yaml:"metrics_path,omitempty"`
HonorLabels bool `yaml:"honor_labels,omitempty"`
HonorTimestamps *bool `yaml:"honor_timestamps,omitempty"`
@@ -168,8 +168,8 @@ type ScrapeConfig struct {
DisableCompression bool `yaml:"disable_compression,omitempty"`
DisableKeepAlive bool `yaml:"disable_keepalive,omitempty"`
StreamParse bool `yaml:"stream_parse,omitempty"`
- ScrapeAlignInterval promutils.Duration `yaml:"scrape_align_interval,omitempty"`
- ScrapeOffset promutils.Duration `yaml:"scrape_offset,omitempty"`
+ ScrapeAlignInterval promutils.Duration `yaml:"scrape_align_interval"`
+ ScrapeOffset promutils.Duration `yaml:"scrape_offset"`
SeriesLimit int `yaml:"series_limit,omitempty"`
ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
From ebaa1c7ad574526fb26cf868138b960ebc19998a Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 14:25:54 +0300
Subject: [PATCH 13/39] lib/promscrape: follow-up after
baa1c24b368ccecf1ad243e571fe4ae5a2d15b5f
---
app/vmalert/config/config.go | 20 ++++++------
app/vmalert/notifier/config.go | 2 +-
docs/CHANGELOG.md | 1 +
lib/promscrape/config.go | 42 ++++++++++++------------
lib/promscrape/config_test.go | 58 ++++++++++++++++++++++++++++++++++
lib/promutils/duration.go | 9 ++++--
6 files changed, 97 insertions(+), 35 deletions(-)
diff --git a/app/vmalert/config/config.go b/app/vmalert/config/config.go
index 81e3f0819..ec961b092 100644
--- a/app/vmalert/config/config.go
+++ b/app/vmalert/config/config.go
@@ -25,10 +25,10 @@ import (
type Group struct {
Type datasource.Type `yaml:"type,omitempty"`
File string
- Name string `yaml:"name"`
- Interval promutils.Duration `yaml:"interval"`
- Rules []Rule `yaml:"rules"`
- Concurrency int `yaml:"concurrency"`
+ Name string `yaml:"name"`
+ Interval *promutils.Duration `yaml:"interval,omitempty"`
+ Rules []Rule `yaml:"rules"`
+ Concurrency int `yaml:"concurrency"`
// ExtraFilterLabels is a list label filters applied to every rule
// request withing a group. Is compatible only with VM datasources.
// See https://docs.victoriametrics.com#prometheus-querying-api-enhancements
@@ -127,12 +127,12 @@ func (g *Group) Validate(validateAnnotations, validateExpressions bool) error {
// recording rule or alerting rule.
type Rule struct {
ID uint64
- Record string `yaml:"record,omitempty"`
- Alert string `yaml:"alert,omitempty"`
- Expr string `yaml:"expr"`
- For promutils.Duration `yaml:"for"`
- Labels map[string]string `yaml:"labels,omitempty"`
- Annotations map[string]string `yaml:"annotations,omitempty"`
+ Record string `yaml:"record,omitempty"`
+ Alert string `yaml:"alert,omitempty"`
+ Expr string `yaml:"expr"`
+ For *promutils.Duration `yaml:"for,omitempty"`
+ Labels map[string]string `yaml:"labels,omitempty"`
+ Annotations map[string]string `yaml:"annotations,omitempty"`
// Catches all undefined fields and must be empty after parsing.
XXX map[string]interface{} `yaml:",inline"`
diff --git a/app/vmalert/notifier/config.go b/app/vmalert/notifier/config.go
index 3eb776fbb..d43cced4d 100644
--- a/app/vmalert/notifier/config.go
+++ b/app/vmalert/notifier/config.go
@@ -44,7 +44,7 @@ type Config struct {
// AlertRelabelConfigs contains list of relabeling rules alert labels
AlertRelabelConfigs []promrelabel.RelabelConfig `yaml:"alert_relabel_configs,omitempty"`
// The timeout used when sending alerts.
- Timeout promutils.Duration `yaml:"timeout,omitempty"`
+ Timeout *promutils.Duration `yaml:"timeout,omitempty"`
// Checksum stores the hash of yaml definition for the config.
// May be used to detect any changes to the config file.
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index e87e7eabf..afa5d3dec 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -18,6 +18,7 @@ The following tip changes can be tested by building VictoriaMetrics components f
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add support for DNS-based discovery for notifiers in the same way as Prometheus does. See [these docs](https://docs.victoriametrics.com/vmalert.html#notifier-configuration-file) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2460).
* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): return non-zero exit code on error. This allows handling `vmctl` errors in shell scripts. Previously `vmctl` was returning 0 exit code on error. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2322).
+* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly show `scrape_timeout` and `scrape_interval` options at `http://vmagent:8429/config` page. Previously these options weren't displayed even if they were set in `-promscrape.config`.
## [v1.76.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.76.1)
diff --git a/lib/promscrape/config.go b/lib/promscrape/config.go
index bca411b2f..83ffc3c27 100644
--- a/lib/promscrape/config.go
+++ b/lib/promscrape/config.go
@@ -83,6 +83,19 @@ type Config struct {
baseDir string
}
+func (cfg *Config) unmarshal(data []byte, isStrict bool) error {
+ data = envtemplate.Replace(data)
+ var err error
+ if isStrict {
+ if err = yaml.UnmarshalStrict(data, cfg); err != nil {
+ err = fmt.Errorf("%w; pass -promscrape.config.strictParse=false command-line flag for ignoring unknown fields in yaml config", err)
+ }
+ } else {
+ err = yaml.Unmarshal(data, cfg)
+ }
+ return err
+}
+
func (cfg *Config) marshal() []byte {
data, err := yaml.Marshal(cfg)
if err != nil {
@@ -124,9 +137,9 @@ func (cfg *Config) getJobNames() []string {
//
// See https://prometheus.io/docs/prometheus/latest/configuration/configuration/
type GlobalConfig struct {
- ScrapeInterval promutils.Duration `yaml:"scrape_interval,omitempty"`
- ScrapeTimeout promutils.Duration `yaml:"scrape_timeout,omitempty"`
- ExternalLabels map[string]string `yaml:"external_labels,omitempty"`
+ ScrapeInterval *promutils.Duration `yaml:"scrape_interval,omitempty"`
+ ScrapeTimeout *promutils.Duration `yaml:"scrape_timeout,omitempty"`
+ ExternalLabels map[string]string `yaml:"external_labels,omitempty"`
}
// ScrapeConfig represents essential parts for `scrape_config` section of Prometheus config.
@@ -134,8 +147,8 @@ type GlobalConfig struct {
// See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
type ScrapeConfig struct {
JobName string `yaml:"job_name"`
- ScrapeInterval promutils.Duration `yaml:"scrape_interval"`
- ScrapeTimeout promutils.Duration `yaml:"scrape_timeout"`
+ ScrapeInterval *promutils.Duration `yaml:"scrape_interval,omitempty"`
+ ScrapeTimeout *promutils.Duration `yaml:"scrape_timeout,omitempty"`
MetricsPath string `yaml:"metrics_path,omitempty"`
HonorLabels bool `yaml:"honor_labels,omitempty"`
HonorTimestamps *bool `yaml:"honor_timestamps,omitempty"`
@@ -168,8 +181,8 @@ type ScrapeConfig struct {
DisableCompression bool `yaml:"disable_compression,omitempty"`
DisableKeepAlive bool `yaml:"disable_keepalive,omitempty"`
StreamParse bool `yaml:"stream_parse,omitempty"`
- ScrapeAlignInterval promutils.Duration `yaml:"scrape_align_interval"`
- ScrapeOffset promutils.Duration `yaml:"scrape_offset"`
+ ScrapeAlignInterval *promutils.Duration `yaml:"scrape_align_interval,omitempty"`
+ ScrapeOffset *promutils.Duration `yaml:"scrape_offset,omitempty"`
SeriesLimit int `yaml:"series_limit,omitempty"`
ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
@@ -309,7 +322,7 @@ func IsDryRun() bool {
}
func (cfg *Config) parseData(data []byte, path string) ([]byte, error) {
- if err := unmarshalMaybeStrict(data, cfg); err != nil {
+ if err := cfg.unmarshal(data, *strictParse); err != nil {
return nil, fmt.Errorf("cannot unmarshal data: %w", err)
}
absPath, err := filepath.Abs(path)
@@ -349,19 +362,6 @@ func (cfg *Config) parseData(data []byte, path string) ([]byte, error) {
return dataNew, nil
}
-func unmarshalMaybeStrict(data []byte, dst interface{}) error {
- data = envtemplate.Replace(data)
- var err error
- if *strictParse {
- if err = yaml.UnmarshalStrict(data, dst); err != nil {
- err = fmt.Errorf("%w; pass -promscrape.config.strictParse=false command-line flag for ignoring unknown fields in yaml config", err)
- }
- } else {
- err = yaml.Unmarshal(data, dst)
- }
- return err
-}
-
func getSWSByJob(sws []*ScrapeWork) map[string][]*ScrapeWork {
m := make(map[string][]*ScrapeWork)
for _, sw := range sws {
diff --git a/lib/promscrape/config_test.go b/lib/promscrape/config_test.go
index 59a0b3826..bc2147a4f 100644
--- a/lib/promscrape/config_test.go
+++ b/lib/promscrape/config_test.go
@@ -5,6 +5,7 @@ import (
"fmt"
"reflect"
"strconv"
+ "strings"
"testing"
"time"
@@ -13,6 +14,63 @@ import (
"github.com/VictoriaMetrics/VictoriaMetrics/lib/proxy"
)
+func TestScrapeConfigUnmarshalMarshal(t *testing.T) {
+ f := func(data string) {
+ t.Helper()
+ var cfg Config
+ data = strings.TrimSpace(data)
+ if err := cfg.unmarshal([]byte(data), true); err != nil {
+ t.Fatalf("parse error: %s\ndata:\n%s", err, data)
+ }
+ resultData := string(cfg.marshal())
+ result := strings.TrimSpace(resultData)
+ if result != data {
+ t.Fatalf("unexpected marshaled config:\ngot\n%s\nwant\n%s", result, data)
+ }
+ }
+ f(`
+global:
+ scrape_interval: 10s
+`)
+ f(`
+scrape_config_files:
+- foo
+- bar
+`)
+ f(`
+scrape_configs:
+- job_name: foo
+ scrape_timeout: 1.5s
+ static_configs:
+ - targets:
+ - foo
+ - bar
+ labels:
+ foo: bar
+`)
+ f(`
+scrape_configs:
+- job_name: foo
+ honor_labels: true
+ honor_timestamps: false
+ scheme: https
+ params:
+ foo:
+ - x
+ authorization:
+ type: foobar
+ relabel_configs:
+ - source_labels: [abc]
+ static_configs:
+ - targets:
+ - foo
+ relabel_debug: true
+ scrape_align_interval: 1h30m0s
+ proxy_bearer_token_file: file.txt
+`)
+
+}
+
func TestNeedSkipScrapeWork(t *testing.T) {
f := func(key string, membersCount, replicationFactor, memberNum int, needSkipExpected bool) {
t.Helper()
diff --git a/lib/promutils/duration.go b/lib/promutils/duration.go
index 382b6f53c..edfe0dd1d 100644
--- a/lib/promutils/duration.go
+++ b/lib/promutils/duration.go
@@ -12,8 +12,8 @@ type Duration struct {
}
// NewDuration returns Duration for given d.
-func NewDuration(d time.Duration) Duration {
- return Duration{
+func NewDuration(d time.Duration) *Duration {
+ return &Duration{
d: d,
}
}
@@ -38,7 +38,10 @@ func (pd *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error {
}
// Duration returns duration for pd.
-func (pd Duration) Duration() time.Duration {
+func (pd *Duration) Duration() time.Duration {
+ if pd == nil {
+ return 0
+ }
return pd.d
}
From def0032c7d6b60da6b3a343d94fc977d4e095a68 Mon Sep 17 00:00:00 2001
From: Dmytro Kozlov
Date: Sat, 16 Apr 2022 15:07:07 +0300
Subject: [PATCH 14/39] lib/httpserver: added tlsCipherSuites flag (#2468)
* lib/httpserver: added tlsCipherSuites flag
* lib/httpserver: compare lower case strings
* lib/httpserver: use EqualFold
* lib/httpserver: used flagutil.NewArray, supported only strings cipher suites
* lib/httpserver: updated flag description, added flag to documentation
* Update lib/httpserver/httpserver.go
Co-authored-by: Aliaksandr Valialkin
---
README.md | 2 +
lib/httpserver/httpserver.go | 34 ++++++++++++--
lib/httpserver/httpserver_test.go | 78 +++++++++++++++++++++++++++++++
3 files changed, 111 insertions(+), 3 deletions(-)
create mode 100644 lib/httpserver/httpserver_test.go
diff --git a/README.md b/README.md
index e3cbf9d6e..eeb767936 100644
--- a/README.md
+++ b/README.md
@@ -1923,6 +1923,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites
+ Cipher suites names for TLS encryption. For example, TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA. Used only if -tls flag is set
-version
Show VictoriaMetrics version
```
diff --git a/lib/httpserver/httpserver.go b/lib/httpserver/httpserver.go
index 18a54fd6c..f343ef724 100644
--- a/lib/httpserver/httpserver.go
+++ b/lib/httpserver/httpserver.go
@@ -30,9 +30,10 @@ import (
)
var (
- tlsEnable = flag.Bool("tls", false, "Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set")
- tlsCertFile = flag.String("tlsCertFile", "", "Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated")
- tlsKeyFile = flag.String("tlsKeyFile", "", "Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated")
+ tlsEnable = flag.Bool("tls", false, "Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set")
+ tlsCertFile = flag.String("tlsCertFile", "", "Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated")
+ tlsKeyFile = flag.String("tlsKeyFile", "", "Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated")
+ tlsCipherSuites = flagutil.NewArray("tlsCipherSuites", "Cipher suites names for TLS encryption. For example, TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA. Used only if -tls flag is set")
pathPrefix = flag.String("http.pathPrefix", "", "An optional prefix to add to all the paths handled by http server. For example, if '-http.pathPrefix=/foo/bar' is set, "+
"then all the http requests will be handled on '/foo/bar/*' paths. This may be useful for proxied requests. "+
@@ -100,10 +101,18 @@ func Serve(addr string, rh RequestHandler) {
var certLock sync.Mutex
var certDeadline uint64
var cert *tls.Certificate
+ var cipherSuites []uint16
c, err := tls.LoadX509KeyPair(*tlsCertFile, *tlsKeyFile)
if err != nil {
logger.Fatalf("cannot load TLS cert from tlsCertFile=%q, tlsKeyFile=%q: %s", *tlsCertFile, *tlsKeyFile, err)
}
+ if len(*tlsCipherSuites) != 0 {
+ collectedCipherSuites, err := collectCipherSuites(*tlsCipherSuites)
+ if err != nil {
+ logger.Fatalf("cannot use TLS cipher suites from tlsCipherSuites=%q: %s", *tlsCipherSuites, err)
+ }
+ cipherSuites = collectedCipherSuites
+ }
cert = &c
cfg := &tls.Config{
MinVersion: tls.VersionTLS12,
@@ -121,6 +130,7 @@ func Serve(addr string, rh RequestHandler) {
}
return cert, nil
},
+ CipherSuites: cipherSuites,
}
ln = tls.NewListener(ln, cfg)
}
@@ -687,3 +697,21 @@ func GetRequestURI(r *http.Request) string {
}
return requestURI + delimiter + queryArgs
}
+
+func collectCipherSuites(definedCipherSuites []string) ([]uint16, error) {
+ var cipherSuites []uint16
+
+ supportedCipherSuites := tls.CipherSuites()
+ supportedCipherSuitesMap := make(map[string]uint16, len(supportedCipherSuites))
+ for _, scf := range supportedCipherSuites {
+ supportedCipherSuitesMap[strings.ToLower(scf.Name)] = scf.ID
+ }
+ for _, gotSuite := range definedCipherSuites {
+ id, ok := supportedCipherSuitesMap[strings.ToLower(gotSuite)]
+ if !ok {
+ return nil, fmt.Errorf("got unsupported cipher suite name: %s", gotSuite)
+ }
+ cipherSuites = append(cipherSuites, id)
+ }
+ return cipherSuites, nil
+}
diff --git a/lib/httpserver/httpserver_test.go b/lib/httpserver/httpserver_test.go
new file mode 100644
index 000000000..b87ec49f1
--- /dev/null
+++ b/lib/httpserver/httpserver_test.go
@@ -0,0 +1,78 @@
+package httpserver
+
+import (
+ "reflect"
+ "testing"
+)
+
+func Test_validateCipherSuites(t *testing.T) {
+ type args struct {
+ definedCipherSuites []string
+ }
+ tests := []struct {
+ name string
+ args args
+ want []uint16
+ wantErr bool
+ }{
+ {
+ name: "empty cipher suites",
+ args: args{definedCipherSuites: []string{}},
+ want: nil,
+ },
+ {
+ name: "got wrong string",
+ args: args{definedCipherSuites: []string{"word"}},
+ want: nil,
+ wantErr: true,
+ },
+ {
+ name: "got wrong number",
+ args: args{definedCipherSuites: []string{"123"}},
+ want: nil,
+ wantErr: true,
+ },
+ {
+ name: "got correct string cipher suite",
+ args: args{definedCipherSuites: []string{"TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"}},
+ want: []uint16{0x2f, 0x35},
+ wantErr: false,
+ },
+ {
+ name: "got correct string with different cases (upper and lower) cipher suite",
+ args: args{definedCipherSuites: []string{"tls_rsa_with_aes_128_cbc_sha", "TLS_RSA_WITH_AES_256_CBC_SHA"}},
+ want: []uint16{0x2f, 0x35},
+ wantErr: false,
+ },
+ {
+ name: "got correct number cipher suite",
+ args: args{definedCipherSuites: []string{"0x2f", "0x35"}},
+ want: nil,
+ wantErr: true,
+ },
+ {
+ name: "got insecure number cipher suite",
+ args: args{definedCipherSuites: []string{"0x0005", "0x000a"}},
+ want: nil,
+ wantErr: true,
+ },
+ {
+ name: "got insecure string cipher suite",
+ args: args{definedCipherSuites: []string{"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", "TLS_ECDHE_RSA_WITH_RC4_128_SHA"}},
+ want: nil,
+ wantErr: true,
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got, err := collectCipherSuites(tt.args.definedCipherSuites)
+ if (err != nil) != tt.wantErr {
+ t.Errorf("collectCipherSuites() error = %v, wantErr %v", err, tt.wantErr)
+ return
+ }
+ if !reflect.DeepEqual(got, tt.want) {
+ t.Errorf("validateCipherSuites() got = %v, want %v", got, tt.want)
+ }
+ })
+ }
+}
From 7e4bdf31ba05864b3f306ea588795b7a935f598e Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 15:27:21 +0300
Subject: [PATCH 15/39] lib/httpserver: follow up after
def0032c7d6b60da6b3a343d94fc977d4e095a68
---
README.md | 5 ++--
docs/CHANGELOG.md | 1 +
docs/README.md | 3 +++
docs/Single-server-VictoriaMetrics.md | 3 +++
lib/httpserver/httpserver.go | 38 +++++++++++++--------------
lib/httpserver/httpserver_test.go | 6 ++---
6 files changed, 31 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md
index eeb767936..0b9632738 100644
--- a/README.md
+++ b/README.md
@@ -1923,8 +1923,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
- -tlsCipherSuites
- Cipher suites names for TLS encryption. For example, TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA. Used only if -tls flag is set
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-version
Show VictoriaMetrics version
```
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index afa5d3dec..75b36cfa4 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -16,6 +16,7 @@ The following tip changes can be tested by building VictoriaMetrics components f
## tip
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add support for DNS-based discovery for notifiers in the same way as Prometheus does. See [these docs](https://docs.victoriametrics.com/vmalert.html#notifier-configuration-file) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2460).
+* FEATURE: allow specifying TLS cipher suites for incoming https requests via `-tlsCipherSuites` command-line flag. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2404).
* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): return non-zero exit code on error. This allows handling `vmctl` errors in shell scripts. Previously `vmctl` was returning 0 exit code on error. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2322).
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly show `scrape_timeout` and `scrape_interval` options at `http://vmagent:8429/config` page. Previously these options weren't displayed even if they were set in `-promscrape.config`.
diff --git a/docs/README.md b/docs/README.md
index e3cbf9d6e..0b9632738 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1923,6 +1923,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-version
Show VictoriaMetrics version
```
diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md
index e3393b08b..936006aac 100644
--- a/docs/Single-server-VictoriaMetrics.md
+++ b/docs/Single-server-VictoriaMetrics.md
@@ -1927,6 +1927,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-version
Show VictoriaMetrics version
```
diff --git a/lib/httpserver/httpserver.go b/lib/httpserver/httpserver.go
index f343ef724..6497057e7 100644
--- a/lib/httpserver/httpserver.go
+++ b/lib/httpserver/httpserver.go
@@ -33,7 +33,7 @@ var (
tlsEnable = flag.Bool("tls", false, "Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set")
tlsCertFile = flag.String("tlsCertFile", "", "Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated")
tlsKeyFile = flag.String("tlsKeyFile", "", "Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated")
- tlsCipherSuites = flagutil.NewArray("tlsCipherSuites", "Cipher suites names for TLS encryption. For example, TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA. Used only if -tls flag is set")
+ tlsCipherSuites = flagutil.NewArray("tlsCipherSuites", "Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants")
pathPrefix = flag.String("http.pathPrefix", "", "An optional prefix to add to all the paths handled by http server. For example, if '-http.pathPrefix=/foo/bar' is set, "+
"then all the http requests will be handled on '/foo/bar/*' paths. This may be useful for proxied requests. "+
@@ -101,17 +101,13 @@ func Serve(addr string, rh RequestHandler) {
var certLock sync.Mutex
var certDeadline uint64
var cert *tls.Certificate
- var cipherSuites []uint16
c, err := tls.LoadX509KeyPair(*tlsCertFile, *tlsKeyFile)
if err != nil {
- logger.Fatalf("cannot load TLS cert from tlsCertFile=%q, tlsKeyFile=%q: %s", *tlsCertFile, *tlsKeyFile, err)
+ logger.Fatalf("cannot load TLS cert from -tlsCertFile=%q, -tlsKeyFile=%q: %s", *tlsCertFile, *tlsKeyFile, err)
}
- if len(*tlsCipherSuites) != 0 {
- collectedCipherSuites, err := collectCipherSuites(*tlsCipherSuites)
- if err != nil {
- logger.Fatalf("cannot use TLS cipher suites from tlsCipherSuites=%q: %s", *tlsCipherSuites, err)
- }
- cipherSuites = collectedCipherSuites
+ cipherSuites, err := cipherSuitesFromNames(*tlsCipherSuites)
+ if err != nil {
+ logger.Fatalf("cannot use TLS cipher suites from -tlsCipherSuites=%q: %s", *tlsCipherSuites, err)
}
cert = &c
cfg := &tls.Config{
@@ -123,7 +119,7 @@ func Serve(addr string, rh RequestHandler) {
if fasttime.UnixTimestamp() > certDeadline {
c, err = tls.LoadX509KeyPair(*tlsCertFile, *tlsKeyFile)
if err != nil {
- return nil, fmt.Errorf("cannot load TLS cert from tlsCertFile=%q, tlsKeyFile=%q: %w", *tlsCertFile, *tlsKeyFile, err)
+ return nil, fmt.Errorf("cannot load TLS cert from -tlsCertFile=%q, -tlsKeyFile=%q: %w", *tlsCertFile, *tlsKeyFile, err)
}
certDeadline = fasttime.UnixTimestamp() + 1
cert = &c
@@ -698,18 +694,20 @@ func GetRequestURI(r *http.Request) string {
return requestURI + delimiter + queryArgs
}
-func collectCipherSuites(definedCipherSuites []string) ([]uint16, error) {
- var cipherSuites []uint16
-
- supportedCipherSuites := tls.CipherSuites()
- supportedCipherSuitesMap := make(map[string]uint16, len(supportedCipherSuites))
- for _, scf := range supportedCipherSuites {
- supportedCipherSuitesMap[strings.ToLower(scf.Name)] = scf.ID
+func cipherSuitesFromNames(cipherSuiteNames []string) ([]uint16, error) {
+ if len(cipherSuiteNames) == 0 {
+ return nil, nil
}
- for _, gotSuite := range definedCipherSuites {
- id, ok := supportedCipherSuitesMap[strings.ToLower(gotSuite)]
+ css := tls.CipherSuites()
+ cssMap := make(map[string]uint16, len(css))
+ for _, cs := range css {
+ cssMap[strings.ToLower(cs.Name)] = cs.ID
+ }
+ cipherSuites := make([]uint16, 0, len(cipherSuiteNames))
+ for _, name := range cipherSuiteNames {
+ id, ok := cssMap[strings.ToLower(name)]
if !ok {
- return nil, fmt.Errorf("got unsupported cipher suite name: %s", gotSuite)
+ return nil, fmt.Errorf("unsupported TLS cipher suite name: %s", name)
}
cipherSuites = append(cipherSuites, id)
}
diff --git a/lib/httpserver/httpserver_test.go b/lib/httpserver/httpserver_test.go
index b87ec49f1..46d10cda8 100644
--- a/lib/httpserver/httpserver_test.go
+++ b/lib/httpserver/httpserver_test.go
@@ -5,7 +5,7 @@ import (
"testing"
)
-func Test_validateCipherSuites(t *testing.T) {
+func TestCipherSuitesFromNames(t *testing.T) {
type args struct {
definedCipherSuites []string
}
@@ -65,9 +65,9 @@ func Test_validateCipherSuites(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- got, err := collectCipherSuites(tt.args.definedCipherSuites)
+ got, err := cipherSuitesFromNames(tt.args.definedCipherSuites)
if (err != nil) != tt.wantErr {
- t.Errorf("collectCipherSuites() error = %v, wantErr %v", err, tt.wantErr)
+ t.Errorf("cipherSuitesFromNames() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
From 7810375c5f40de2f47d14487d2b82ad7abc9b400 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 15:51:34 +0300
Subject: [PATCH 16/39] lib/httpserver: move the code, which creates
tls.Config, into lib/netutil/tls.go
This syncs the corresponding code with cluster branch
---
lib/httpserver/httpserver.go | 61 ++------------
lib/ingestserver/graphite/server.go | 2 +-
lib/ingestserver/influx/server.go | 2 +-
lib/ingestserver/opentsdb/server.go | 2 +-
lib/ingestserver/opentsdbhttp/server.go | 2 +-
lib/netutil/tcplistener.go | 8 +-
lib/netutil/tls.go | 80 +++++++++++++++++++
.../tls_test.go} | 2 +-
8 files changed, 98 insertions(+), 61 deletions(-)
create mode 100644 lib/netutil/tls.go
rename lib/{httpserver/httpserver_test.go => netutil/tls_test.go} (99%)
diff --git a/lib/httpserver/httpserver.go b/lib/httpserver/httpserver.go
index 6497057e7..27b9d9286 100644
--- a/lib/httpserver/httpserver.go
+++ b/lib/httpserver/httpserver.go
@@ -91,44 +91,17 @@ func Serve(addr string, rh RequestHandler) {
}
logger.Infof("starting http server at %s://%s/", scheme, hostAddr)
logger.Infof("pprof handlers are exposed at %s://%s/debug/pprof/", scheme, hostAddr)
- lnTmp, err := netutil.NewTCPListener(scheme, addr)
- if err != nil {
- logger.Fatalf("cannot start http server at %s: %s", addr, err)
- }
- ln := net.Listener(lnTmp)
-
+ var tlsConfig *tls.Config
if *tlsEnable {
- var certLock sync.Mutex
- var certDeadline uint64
- var cert *tls.Certificate
- c, err := tls.LoadX509KeyPair(*tlsCertFile, *tlsKeyFile)
+ tc, err := netutil.GetServerTLSConfig("", *tlsCertFile, *tlsKeyFile, *tlsCipherSuites)
if err != nil {
logger.Fatalf("cannot load TLS cert from -tlsCertFile=%q, -tlsKeyFile=%q: %s", *tlsCertFile, *tlsKeyFile, err)
}
- cipherSuites, err := cipherSuitesFromNames(*tlsCipherSuites)
- if err != nil {
- logger.Fatalf("cannot use TLS cipher suites from -tlsCipherSuites=%q: %s", *tlsCipherSuites, err)
- }
- cert = &c
- cfg := &tls.Config{
- MinVersion: tls.VersionTLS12,
- PreferServerCipherSuites: true,
- GetCertificate: func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
- certLock.Lock()
- defer certLock.Unlock()
- if fasttime.UnixTimestamp() > certDeadline {
- c, err = tls.LoadX509KeyPair(*tlsCertFile, *tlsKeyFile)
- if err != nil {
- return nil, fmt.Errorf("cannot load TLS cert from -tlsCertFile=%q, -tlsKeyFile=%q: %w", *tlsCertFile, *tlsKeyFile, err)
- }
- certDeadline = fasttime.UnixTimestamp() + 1
- cert = &c
- }
- return cert, nil
- },
- CipherSuites: cipherSuites,
- }
- ln = tls.NewListener(ln, cfg)
+ tlsConfig = tc
+ }
+ ln, err := netutil.NewTCPListener(scheme, addr, tlsConfig)
+ if err != nil {
+ logger.Fatalf("cannot start http server at %s: %s", addr, err)
}
serveWithListener(addr, ln, rh)
}
@@ -693,23 +666,3 @@ func GetRequestURI(r *http.Request) string {
}
return requestURI + delimiter + queryArgs
}
-
-func cipherSuitesFromNames(cipherSuiteNames []string) ([]uint16, error) {
- if len(cipherSuiteNames) == 0 {
- return nil, nil
- }
- css := tls.CipherSuites()
- cssMap := make(map[string]uint16, len(css))
- for _, cs := range css {
- cssMap[strings.ToLower(cs.Name)] = cs.ID
- }
- cipherSuites := make([]uint16, 0, len(cipherSuiteNames))
- for _, name := range cipherSuiteNames {
- id, ok := cssMap[strings.ToLower(name)]
- if !ok {
- return nil, fmt.Errorf("unsupported TLS cipher suite name: %s", name)
- }
- cipherSuites = append(cipherSuites, id)
- }
- return cipherSuites, nil
-}
diff --git a/lib/ingestserver/graphite/server.go b/lib/ingestserver/graphite/server.go
index 3474200ee..4608ba635 100644
--- a/lib/ingestserver/graphite/server.go
+++ b/lib/ingestserver/graphite/server.go
@@ -40,7 +40,7 @@ type Server struct {
// MustStop must be called on the returned server when it is no longer needed.
func MustStart(addr string, insertHandler func(r io.Reader) error) *Server {
logger.Infof("starting TCP Graphite server at %q", addr)
- lnTCP, err := netutil.NewTCPListener("graphite", addr)
+ lnTCP, err := netutil.NewTCPListener("graphite", addr, nil)
if err != nil {
logger.Fatalf("cannot start TCP Graphite server at %q: %s", addr, err)
}
diff --git a/lib/ingestserver/influx/server.go b/lib/ingestserver/influx/server.go
index 9fab5cb02..bb172c68e 100644
--- a/lib/ingestserver/influx/server.go
+++ b/lib/ingestserver/influx/server.go
@@ -40,7 +40,7 @@ type Server struct {
// MustStop must be called on the returned server when it is no longer needed.
func MustStart(addr string, insertHandler func(r io.Reader) error) *Server {
logger.Infof("starting TCP InfluxDB server at %q", addr)
- lnTCP, err := netutil.NewTCPListener("influx", addr)
+ lnTCP, err := netutil.NewTCPListener("influx", addr, nil)
if err != nil {
logger.Fatalf("cannot start TCP InfluxDB server at %q: %s", addr, err)
}
diff --git a/lib/ingestserver/opentsdb/server.go b/lib/ingestserver/opentsdb/server.go
index a00a32267..46518e3f9 100644
--- a/lib/ingestserver/opentsdb/server.go
+++ b/lib/ingestserver/opentsdb/server.go
@@ -43,7 +43,7 @@ type Server struct {
// MustStop must be called on the returned server when it is no longer needed.
func MustStart(addr string, telnetInsertHandler func(r io.Reader) error, httpInsertHandler func(req *http.Request) error) *Server {
logger.Infof("starting TCP OpenTSDB collector at %q", addr)
- lnTCP, err := netutil.NewTCPListener("opentsdb", addr)
+ lnTCP, err := netutil.NewTCPListener("opentsdb", addr, nil)
if err != nil {
logger.Fatalf("cannot start TCP OpenTSDB collector at %q: %s", addr, err)
}
diff --git a/lib/ingestserver/opentsdbhttp/server.go b/lib/ingestserver/opentsdbhttp/server.go
index 6eec2f5f1..99e2e924d 100644
--- a/lib/ingestserver/opentsdbhttp/server.go
+++ b/lib/ingestserver/opentsdbhttp/server.go
@@ -30,7 +30,7 @@ type Server struct {
// MustStop must be called on the returned server when it is no longer needed.
func MustStart(addr string, insertHandler func(r *http.Request) error) *Server {
logger.Infof("starting HTTP OpenTSDB server at %q", addr)
- lnTCP, err := netutil.NewTCPListener("opentsdbhttp", addr)
+ lnTCP, err := netutil.NewTCPListener("opentsdbhttp", addr, nil)
if err != nil {
logger.Fatalf("cannot start HTTP OpenTSDB collector at %q: %s", addr, err)
}
diff --git a/lib/netutil/tcplistener.go b/lib/netutil/tcplistener.go
index fcc5ce26b..238f755ce 100644
--- a/lib/netutil/tcplistener.go
+++ b/lib/netutil/tcplistener.go
@@ -1,6 +1,7 @@
package netutil
import (
+ "crypto/tls"
"errors"
"flag"
"fmt"
@@ -13,16 +14,19 @@ import (
var enableTCP6 = flag.Bool("enableTCP6", false, "Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used")
-// NewTCPListener returns new TCP listener for the given addr.
+// NewTCPListener returns new TCP listener for the given addr and optional tlsConfig.
//
// name is used for exported metrics. Each listener in the program must have
// distinct name.
-func NewTCPListener(name, addr string) (*TCPListener, error) {
+func NewTCPListener(name, addr string, tlsConfig *tls.Config) (*TCPListener, error) {
network := GetTCPNetwork()
ln, err := net.Listen(network, addr)
if err != nil {
return nil, err
}
+ if tlsConfig != nil {
+ ln = tls.NewListener(ln, tlsConfig)
+ }
tln := &TCPListener{
Listener: ln,
diff --git a/lib/netutil/tls.go b/lib/netutil/tls.go
new file mode 100644
index 000000000..3547fbe75
--- /dev/null
+++ b/lib/netutil/tls.go
@@ -0,0 +1,80 @@
+package netutil
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "strings"
+ "sync"
+
+ "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"
+ "github.com/VictoriaMetrics/VictoriaMetrics/lib/fs"
+)
+
+// GetServerTLSConfig returns TLS config for the server with possible client verification (mTLS) if tlsCAFile isn't empty.
+func GetServerTLSConfig(tlsCAFile, tlsCertFile, tlsKeyFile string, tlsCipherSuites []string) (*tls.Config, error) {
+ var certLock sync.Mutex
+ var certDeadline uint64
+ var cert *tls.Certificate
+ c, err := tls.LoadX509KeyPair(tlsCertFile, tlsKeyFile)
+ if err != nil {
+ return nil, fmt.Errorf("cannot load TLS cert from certFile=%q, keyFile=%q: %w", tlsCertFile, tlsKeyFile, err)
+ }
+ cipherSuites, err := cipherSuitesFromNames(tlsCipherSuites)
+ if err != nil {
+ return nil, fmt.Errorf("cannot use TLS cipher suites from tlsCipherSuites=%q: %w", tlsCipherSuites, err)
+ }
+ cert = &c
+ cfg := &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ PreferServerCipherSuites: true,
+ GetCertificate: func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
+ certLock.Lock()
+ defer certLock.Unlock()
+ if fasttime.UnixTimestamp() > certDeadline {
+ c, err = tls.LoadX509KeyPair(tlsCertFile, tlsKeyFile)
+ if err != nil {
+ return nil, fmt.Errorf("cannot load TLS cert from certFile=%q, keyFile=%q: %w", tlsCertFile, tlsKeyFile, err)
+ }
+ certDeadline = fasttime.UnixTimestamp() + 1
+ cert = &c
+ }
+ return cert, nil
+ },
+ CipherSuites: cipherSuites,
+ }
+ if tlsCAFile != "" {
+ // Enable mTLS ( https://en.wikipedia.org/wiki/Mutual_authentication#mTLS )
+ cfg.ClientAuth = tls.RequireAndVerifyClientCert
+ cp := x509.NewCertPool()
+ caPEM, err := fs.ReadFileOrHTTP(tlsCAFile)
+ if err != nil {
+ return nil, fmt.Errorf("cannot read tlsCAFile=%q: %w", tlsCAFile, err)
+ }
+ if !cp.AppendCertsFromPEM(caPEM) {
+ return nil, fmt.Errorf("cannot parse data for tlsCAFile=%q: %s", tlsCAFile, caPEM)
+ }
+ cfg.ClientCAs = cp
+ }
+ return cfg, nil
+}
+
+func cipherSuitesFromNames(cipherSuiteNames []string) ([]uint16, error) {
+ if len(cipherSuiteNames) == 0 {
+ return nil, nil
+ }
+ css := tls.CipherSuites()
+ cssMap := make(map[string]uint16, len(css))
+ for _, cs := range css {
+ cssMap[strings.ToLower(cs.Name)] = cs.ID
+ }
+ cipherSuites := make([]uint16, 0, len(cipherSuiteNames))
+ for _, name := range cipherSuiteNames {
+ id, ok := cssMap[strings.ToLower(name)]
+ if !ok {
+ return nil, fmt.Errorf("unsupported TLS cipher suite name: %s", name)
+ }
+ cipherSuites = append(cipherSuites, id)
+ }
+ return cipherSuites, nil
+}
diff --git a/lib/httpserver/httpserver_test.go b/lib/netutil/tls_test.go
similarity index 99%
rename from lib/httpserver/httpserver_test.go
rename to lib/netutil/tls_test.go
index 46d10cda8..3e636a151 100644
--- a/lib/httpserver/httpserver_test.go
+++ b/lib/netutil/tls_test.go
@@ -1,4 +1,4 @@
-package httpserver
+package netutil
import (
"reflect"
From b49b8020d69b04cf8de8cb86c6e8a449fb96a016 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 15:59:45 +0300
Subject: [PATCH 17/39] docs: sync docs with the latest changes
---
README.md | 8 ++++----
app/vmagent/README.md | 7 +++++--
app/vmalert/README.md | 5 +++++
app/vmauth/README.md | 3 +++
docs/README.md | 8 ++++----
docs/Single-server-VictoriaMetrics.md | 8 ++++----
docs/vmagent.md | 7 +++++--
docs/vmalert.md | 5 +++++
docs/vmauth.md | 3 +++
9 files changed, 38 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index 0b9632738..aca396b4d 100644
--- a/README.md
+++ b/README.md
@@ -1738,8 +1738,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Auth key for /debug/pprof. It must be passed via authKey query arg. It overrides httpAuth.* settings
-precisionBits int
The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64)
- -promscrape.cluster.memberNum int
- The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster
+ -promscrape.cluster.memberNum string
+ The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster. Can be specified as pod name of Kubernetes StatefulSet - pod-name-Num, where Num is a numeric part of pod name (default "0")
-promscrape.cluster.membersCount int
The number of members in a cluster of scrapers. Each member must have an unique -promscrape.cluster.memberNum in the range 0 ... promscrape.cluster.membersCount-1 . Each member then scrapes roughly 1/N of all the targets. By default cluster scraping is disabled, i.e. a single scraper scrapes all the targets
-promscrape.cluster.replicationFactor int
@@ -1921,11 +1921,11 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
- -tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
+ -tlsKeyFile string
+ Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/app/vmagent/README.md b/app/vmagent/README.md
index d8f35c5e2..6fa673290 100644
--- a/app/vmagent/README.md
+++ b/app/vmagent/README.md
@@ -841,8 +841,8 @@ See the docs at https://docs.victoriametrics.com/vmagent.html .
Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms)
-pprofAuthKey string
Auth key for /debug/pprof. It must be passed via authKey query arg. It overrides httpAuth.* settings
- -promscrape.cluster.memberNum int
- The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster
+ -promscrape.cluster.memberNum string
+ The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster. Can be specified as pod name of Kubernetes StatefulSet - pod-name-Num, where Num is a numeric part of pod name (default "0")
-promscrape.cluster.membersCount int
The number of members in a cluster of scrapers. Each member must have an unique -promscrape.cluster.memberNum in the range 0 ... promscrape.cluster.membersCount-1 . Each member then scrapes roughly 1/N of all the targets. By default cluster scraping is disabled, i.e. a single scraper scrapes all the targets
-promscrape.cluster.replicationFactor int
@@ -1019,6 +1019,9 @@ See the docs at https://docs.victoriametrics.com/vmagent.html .
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
diff --git a/app/vmalert/README.md b/app/vmalert/README.md
index 185a9d891..3e1021b91 100644
--- a/app/vmalert/README.md
+++ b/app/vmalert/README.md
@@ -688,6 +688,8 @@ The shortlist of configuration flags is the following:
The maximum number of concurrent requests to Prometheus autodiscovery API (Consul, Kubernetes, etc.) (default 100)
-promscrape.discovery.concurrentWaitTime duration
The maximum duration for waiting to perform API requests if more than -promscrape.discovery.concurrency requests are simultaneously performed (default 1m0s)
+ -promscrape.dnsSDCheckInterval duration
+ Interval for checking for changes in dns. This works only if dns_sd_configs is configured in '-promscrape.config' file. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config for details (default 30s)
-remoteRead.basicAuth.password string
Optional basic auth password for -remoteRead.url
-remoteRead.basicAuth.passwordFile string
@@ -801,6 +803,9 @@ The shortlist of configuration flags is the following:
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
diff --git a/app/vmauth/README.md b/app/vmauth/README.md
index 861e42ac6..dfbc988a6 100644
--- a/app/vmauth/README.md
+++ b/app/vmauth/README.md
@@ -287,6 +287,9 @@ See the docs at https://docs.victoriametrics.com/vmauth.html .
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
diff --git a/docs/README.md b/docs/README.md
index 0b9632738..aca396b4d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1738,8 +1738,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Auth key for /debug/pprof. It must be passed via authKey query arg. It overrides httpAuth.* settings
-precisionBits int
The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64)
- -promscrape.cluster.memberNum int
- The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster
+ -promscrape.cluster.memberNum string
+ The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster. Can be specified as pod name of Kubernetes StatefulSet - pod-name-Num, where Num is a numeric part of pod name (default "0")
-promscrape.cluster.membersCount int
The number of members in a cluster of scrapers. Each member must have an unique -promscrape.cluster.memberNum in the range 0 ... promscrape.cluster.membersCount-1 . Each member then scrapes roughly 1/N of all the targets. By default cluster scraping is disabled, i.e. a single scraper scrapes all the targets
-promscrape.cluster.replicationFactor int
@@ -1921,11 +1921,11 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
- -tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
+ -tlsKeyFile string
+ Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md
index 936006aac..2bd20b459 100644
--- a/docs/Single-server-VictoriaMetrics.md
+++ b/docs/Single-server-VictoriaMetrics.md
@@ -1742,8 +1742,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Auth key for /debug/pprof. It must be passed via authKey query arg. It overrides httpAuth.* settings
-precisionBits int
The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64)
- -promscrape.cluster.memberNum int
- The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster
+ -promscrape.cluster.memberNum string
+ The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster. Can be specified as pod name of Kubernetes StatefulSet - pod-name-Num, where Num is a numeric part of pod name (default "0")
-promscrape.cluster.membersCount int
The number of members in a cluster of scrapers. Each member must have an unique -promscrape.cluster.memberNum in the range 0 ... promscrape.cluster.membersCount-1 . Each member then scrapes roughly 1/N of all the targets. By default cluster scraping is disabled, i.e. a single scraper scrapes all the targets
-promscrape.cluster.replicationFactor int
@@ -1925,11 +1925,11 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
- -tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
+ -tlsKeyFile string
+ Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/vmagent.md b/docs/vmagent.md
index 651b5c9d2..0b43d3f8d 100644
--- a/docs/vmagent.md
+++ b/docs/vmagent.md
@@ -845,8 +845,8 @@ See the docs at https://docs.victoriametrics.com/vmagent.html .
Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms)
-pprofAuthKey string
Auth key for /debug/pprof. It must be passed via authKey query arg. It overrides httpAuth.* settings
- -promscrape.cluster.memberNum int
- The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster
+ -promscrape.cluster.memberNum string
+ The number of number in the cluster of scrapers. It must be an unique value in the range 0 ... promscrape.cluster.membersCount-1 across scrapers in the cluster. Can be specified as pod name of Kubernetes StatefulSet - pod-name-Num, where Num is a numeric part of pod name (default "0")
-promscrape.cluster.membersCount int
The number of members in a cluster of scrapers. Each member must have an unique -promscrape.cluster.memberNum in the range 0 ... promscrape.cluster.membersCount-1 . Each member then scrapes roughly 1/N of all the targets. By default cluster scraping is disabled, i.e. a single scraper scrapes all the targets
-promscrape.cluster.replicationFactor int
@@ -1023,6 +1023,9 @@ See the docs at https://docs.victoriametrics.com/vmagent.html .
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
diff --git a/docs/vmalert.md b/docs/vmalert.md
index 5150ae324..525463e52 100644
--- a/docs/vmalert.md
+++ b/docs/vmalert.md
@@ -692,6 +692,8 @@ The shortlist of configuration flags is the following:
The maximum number of concurrent requests to Prometheus autodiscovery API (Consul, Kubernetes, etc.) (default 100)
-promscrape.discovery.concurrentWaitTime duration
The maximum duration for waiting to perform API requests if more than -promscrape.discovery.concurrency requests are simultaneously performed (default 1m0s)
+ -promscrape.dnsSDCheckInterval duration
+ Interval for checking for changes in dns. This works only if dns_sd_configs is configured in '-promscrape.config' file. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config for details (default 30s)
-remoteRead.basicAuth.password string
Optional basic auth password for -remoteRead.url
-remoteRead.basicAuth.passwordFile string
@@ -805,6 +807,9 @@ The shortlist of configuration flags is the following:
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
diff --git a/docs/vmauth.md b/docs/vmauth.md
index 74ccb7011..0d831a295 100644
--- a/docs/vmauth.md
+++ b/docs/vmauth.md
@@ -291,6 +291,9 @@ See the docs at https://docs.victoriametrics.com/vmauth.html .
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
From 54bb8c2bc6b00420e4cae3f12f5aceef2935f9d8 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 16:04:21 +0300
Subject: [PATCH 18/39] docs/Cluster-VictoriaMetrics.md: update docs after
26ae50ec26f692f39836028d88d2495b98753fe6
---
docs/Cluster-VictoriaMetrics.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 77187411e..5a35ce1c0 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -599,6 +599,9 @@ Below is the output for `/path/to/vminsert -help`:
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
@@ -745,6 +748,9 @@ Below is the output for `/path/to/vmselect -help`:
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
@@ -865,6 +871,9 @@ Below is the output for `/path/to/vmstorage -help`:
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ -tlsCipherSuites array
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
From cad488fe7ea439f108419af883cf48ff262c6685 Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 16:32:17 +0300
Subject: [PATCH 19/39] app/vmstorage: add support for mTLS cipher suites via
`-cluster.tlsCipherSuites` command-line flag
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2404
---
docs/CHANGELOG.md | 1 +
docs/Cluster-VictoriaMetrics.md | 28 ++++++++++++++++++----------
lib/httpserver/httpserver.go | 2 +-
lib/netutil/tls.go | 19 ++-----------------
4 files changed, 22 insertions(+), 28 deletions(-)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 75b36cfa4..a30bbd5df 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -17,6 +17,7 @@ The following tip changes can be tested by building VictoriaMetrics components f
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add support for DNS-based discovery for notifiers in the same way as Prometheus does. See [these docs](https://docs.victoriametrics.com/vmalert.html#notifier-configuration-file) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2460).
* FEATURE: allow specifying TLS cipher suites for incoming https requests via `-tlsCipherSuites` command-line flag. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2404).
+* FEATURE: allow specifying TLS cipher suites for mTLS connections between cluster components via `-cluster.tlsCipherSuites` command-line flag. See [these docs](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection).
* BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl.html): return non-zero exit code on error. This allows handling `vmctl` errors in shell scripts. Previously `vmctl` was returning 0 exit code on error. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2322).
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly show `scrape_timeout` and `scrape_interval` options at `http://vmagent:8429/config` page. Previously these options weren't displayed even if they were set in `-promscrape.config`.
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 5a35ce1c0..35b4331da 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -154,7 +154,12 @@ It is possible manualy setting up a toy cluster on a single host. In this case e
## mTLS protection
-By default `vminsert` and `vmselect` nodes use unencrypted connections to `vmstorage` nodes, since it is assumed that all the cluster components run in a protected environment. [Enterprise version of VictoriaMetrics](https://victoriametrics.com/products/enterprise/) provides optional support for [mTLS connections](https://en.wikipedia.org/wiki/Mutual_authentication#mTLS) between cluster components. Pass `-cluster.tls=true` command-line flag to `vminsert`, `vmselect` and `vmstorage` nodes in order to enable mTLS protection. Additionally, `vminsert`, `vmselect` and `vmstorage` must be configured with mTLS certificates via `-cluster.tlsCertFile`, `-cluster.tlsKeyFile` command-line options. These certificates are mutually verified when `vminsert` and `vmselect` dial `vmstorage`. An optional `-cluster.tlsCAFile` command-line flag can be set at `vminsert`, `vmselect` and `vmstorage` for verifying peer certificates issued with custom [certificate authority](https://en.wikipedia.org/wiki/Certificate_authority).
+By default `vminsert` and `vmselect` nodes use unencrypted connections to `vmstorage` nodes, since it is assumed that all the cluster components run in a protected environment. [Enterprise version of VictoriaMetrics](https://victoriametrics.com/products/enterprise/) provides optional support for [mTLS connections](https://en.wikipedia.org/wiki/Mutual_authentication#mTLS) between cluster components. Pass `-cluster.tls=true` command-line flag to `vminsert`, `vmselect` and `vmstorage` nodes in order to enable mTLS protection. Additionally, `vminsert`, `vmselect` and `vmstorage` must be configured with mTLS certificates via `-cluster.tlsCertFile`, `-cluster.tlsKeyFile` command-line options. These certificates are mutually verified when `vminsert` and `vmselect` dial `vmstorage`.
+
+Additionally the following optional command-line flags related to mTLS are supported:
+
+- `-cluster.tlsCAFile` can be set at `vminsert`, `vmselect` and `vmstorage` for verifying peer certificates issued with custom [certificate authority](https://en.wikipedia.org/wiki/Certificate_authority). By default system-wide certificate authority is used for peer certificate verification.
+- `-cluster.tlsCipherSuites` can be set to the list of supported TLS cipher suites at `vmstorage`. See [the list of supported TLS cipher suites](https://pkg.go.dev/crypto/tls#pkg-constants).
### Environment variables
@@ -476,11 +481,11 @@ Below is the output for `/path/to/vminsert -help`:
-cluster.tls
Whether to use TLS for connections to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsCAFile string
- Path to TLS CA file to use for verifying certificates provided by -storageNode. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to TLS CA file to use for verifying certificates provided by -storageNode if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsCertFile string
- Path to client-side TLS certificate file to use when connecting to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to client-side TLS certificate file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsKeyFile string
- Path to client-side TLS key file to use when connecting to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to client-side TLS key file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-clusternativeListenAddr string
TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 must be set. Doesn't work if empty
-csvTrimTimestamp duration
@@ -618,11 +623,11 @@ Below is the output for `/path/to/vmselect -help`:
-cluster.tls
Whether to use TLS for connections to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsCAFile string
- Path to TLS CA file to use for verifying certificates provided by -storageNode. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to TLS CA file to use for verifying certificates provided by -storageNode if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsCertFile string
- Path to client-side TLS certificate file to use when connecting to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to client-side TLS certificate file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsKeyFile string
- Path to client-side TLS key file to use when connecting to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to client-side TLS key file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-dedup.minScrapeInterval duration
Leave only the first sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details
-downsampling.period array
@@ -767,11 +772,14 @@ Below is the output for `/path/to/vmstorage -help`:
-cluster.tls
Whether to use TLS when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsCAFile string
- Path to TLS CA file to use for verifying certificates provided by vminsert and vmselect. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to TLS CA file to use for verifying certificates provided by vminsert and vmselect if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-cluster.tlsCertFile string
- Path to server-side TLS certificate file to use when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to server-side TLS certificate file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ -cluster.tlsCipherSuites array
+ Optional list of TLS cipher suites used for connections from vminsert and vmselect if -cluster.tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Supports an array of values separated by comma or specified via multiple flags.
-cluster.tlsKeyFile string
- Path to server-side TLS key file to use when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
+ Path to server-side TLS key file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection
-dedup.minScrapeInterval duration
Leave only the first sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details
-denyQueriesOutsideRetention
diff --git a/lib/httpserver/httpserver.go b/lib/httpserver/httpserver.go
index 27b9d9286..08bc9f0df 100644
--- a/lib/httpserver/httpserver.go
+++ b/lib/httpserver/httpserver.go
@@ -93,7 +93,7 @@ func Serve(addr string, rh RequestHandler) {
logger.Infof("pprof handlers are exposed at %s://%s/debug/pprof/", scheme, hostAddr)
var tlsConfig *tls.Config
if *tlsEnable {
- tc, err := netutil.GetServerTLSConfig("", *tlsCertFile, *tlsKeyFile, *tlsCipherSuites)
+ tc, err := netutil.GetServerTLSConfig(*tlsCertFile, *tlsKeyFile, *tlsCipherSuites)
if err != nil {
logger.Fatalf("cannot load TLS cert from -tlsCertFile=%q, -tlsKeyFile=%q: %s", *tlsCertFile, *tlsKeyFile, err)
}
diff --git a/lib/netutil/tls.go b/lib/netutil/tls.go
index 3547fbe75..81f14d945 100644
--- a/lib/netutil/tls.go
+++ b/lib/netutil/tls.go
@@ -2,17 +2,15 @@ package netutil
import (
"crypto/tls"
- "crypto/x509"
"fmt"
"strings"
"sync"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"
- "github.com/VictoriaMetrics/VictoriaMetrics/lib/fs"
)
-// GetServerTLSConfig returns TLS config for the server with possible client verification (mTLS) if tlsCAFile isn't empty.
-func GetServerTLSConfig(tlsCAFile, tlsCertFile, tlsKeyFile string, tlsCipherSuites []string) (*tls.Config, error) {
+// GetServerTLSConfig returns TLS config for the server.
+func GetServerTLSConfig(tlsCertFile, tlsKeyFile string, tlsCipherSuites []string) (*tls.Config, error) {
var certLock sync.Mutex
var certDeadline uint64
var cert *tls.Certificate
@@ -43,19 +41,6 @@ func GetServerTLSConfig(tlsCAFile, tlsCertFile, tlsKeyFile string, tlsCipherSuit
},
CipherSuites: cipherSuites,
}
- if tlsCAFile != "" {
- // Enable mTLS ( https://en.wikipedia.org/wiki/Mutual_authentication#mTLS )
- cfg.ClientAuth = tls.RequireAndVerifyClientCert
- cp := x509.NewCertPool()
- caPEM, err := fs.ReadFileOrHTTP(tlsCAFile)
- if err != nil {
- return nil, fmt.Errorf("cannot read tlsCAFile=%q: %w", tlsCAFile, err)
- }
- if !cp.AppendCertsFromPEM(caPEM) {
- return nil, fmt.Errorf("cannot parse data for tlsCAFile=%q: %s", tlsCAFile, caPEM)
- }
- cfg.ClientCAs = cp
- }
return cfg, nil
}
From 1097ebebe60d3e6e9323788b13af1a6cbac186ca Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 16:54:17 +0300
Subject: [PATCH 20/39] lib/httpserver: clarify that `-tls` flag enables TLS
for http requests to `-httpListenAddr`
---
README.md | 8 ++++----
app/vmagent/README.md | 8 ++++----
app/vmalert/README.md | 8 ++++----
app/vmauth/README.md | 8 ++++----
docs/README.md | 8 ++++----
docs/Single-server-VictoriaMetrics.md | 8 ++++----
docs/vmagent.md | 8 ++++----
docs/vmalert.md | 8 ++++----
docs/vmauth.md | 8 ++++----
lib/httpserver/httpserver.go | 8 ++++----
10 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/README.md b/README.md
index aca396b4d..17335623c 100644
--- a/README.md
+++ b/README.md
@@ -1918,14 +1918,14 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
-storageDataPath string
Path to storage data (default "victoria-metrics-data")
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/app/vmagent/README.md b/app/vmagent/README.md
index 6fa673290..19dedfa0b 100644
--- a/app/vmagent/README.md
+++ b/app/vmagent/README.md
@@ -1016,14 +1016,14 @@ See the docs at https://docs.victoriametrics.com/vmagent.html .
-sortLabels
Whether to sort labels for incoming samples before writing them to all the configured remote storage systems. This may be needed for reducing memory usage at remote storage when the order of labels in incoming samples is random. For example, if m{k1="v1",k2="v2"} may be sent as m{k2="v2",k1="v1"}Enabled sorting for labels can slow down ingestion performance a bit
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/app/vmalert/README.md b/app/vmalert/README.md
index 3e1021b91..556bdd847 100644
--- a/app/vmalert/README.md
+++ b/app/vmalert/README.md
@@ -800,14 +800,14 @@ The shortlist of configuration flags is the following:
-rule.validateTemplates
Whether to validate annotation and label templates (default true)
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/app/vmauth/README.md b/app/vmauth/README.md
index dfbc988a6..d14ee5551 100644
--- a/app/vmauth/README.md
+++ b/app/vmauth/README.md
@@ -284,14 +284,14 @@ See the docs at https://docs.victoriametrics.com/vmauth.html .
-reloadAuthKey string
Auth key for /-/reload http endpoint. It must be passed as authKey=...
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/README.md b/docs/README.md
index aca396b4d..17335623c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1918,14 +1918,14 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
-storageDataPath string
Path to storage data (default "victoria-metrics-data")
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md
index 2bd20b459..9417524f4 100644
--- a/docs/Single-server-VictoriaMetrics.md
+++ b/docs/Single-server-VictoriaMetrics.md
@@ -1922,14 +1922,14 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li
-storageDataPath string
Path to storage data (default "victoria-metrics-data")
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/vmagent.md b/docs/vmagent.md
index 0b43d3f8d..8058ac759 100644
--- a/docs/vmagent.md
+++ b/docs/vmagent.md
@@ -1020,14 +1020,14 @@ See the docs at https://docs.victoriametrics.com/vmagent.html .
-sortLabels
Whether to sort labels for incoming samples before writing them to all the configured remote storage systems. This may be needed for reducing memory usage at remote storage when the order of labels in incoming samples is random. For example, if m{k1="v1",k2="v2"} may be sent as m{k2="v2",k1="v1"}Enabled sorting for labels can slow down ingestion performance a bit
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/vmalert.md b/docs/vmalert.md
index 525463e52..1433856eb 100644
--- a/docs/vmalert.md
+++ b/docs/vmalert.md
@@ -804,14 +804,14 @@ The shortlist of configuration flags is the following:
-rule.validateTemplates
Whether to validate annotation and label templates (default true)
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/docs/vmauth.md b/docs/vmauth.md
index 0d831a295..aed0646c5 100644
--- a/docs/vmauth.md
+++ b/docs/vmauth.md
@@ -288,14 +288,14 @@ See the docs at https://docs.victoriametrics.com/vmauth.html .
-reloadAuthKey string
Auth key for /-/reload http endpoint. It must be passed as authKey=...
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
diff --git a/lib/httpserver/httpserver.go b/lib/httpserver/httpserver.go
index 08bc9f0df..9ef82aaa5 100644
--- a/lib/httpserver/httpserver.go
+++ b/lib/httpserver/httpserver.go
@@ -30,10 +30,10 @@ import (
)
var (
- tlsEnable = flag.Bool("tls", false, "Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set")
- tlsCertFile = flag.String("tlsCertFile", "", "Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated")
- tlsKeyFile = flag.String("tlsKeyFile", "", "Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated")
- tlsCipherSuites = flagutil.NewArray("tlsCipherSuites", "Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants")
+ tlsEnable = flag.Bool("tls", false, "Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set")
+ tlsCertFile = flag.String("tlsCertFile", "", "Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated")
+ tlsKeyFile = flag.String("tlsKeyFile", "", "Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated")
+ tlsCipherSuites = flagutil.NewArray("tlsCipherSuites", "Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants")
pathPrefix = flag.String("http.pathPrefix", "", "An optional prefix to add to all the paths handled by http server. For example, if '-http.pathPrefix=/foo/bar' is set, "+
"then all the http requests will be handled on '/foo/bar/*' paths. This may be useful for proxied requests. "+
From f62fc2f318efbed8a05b8974ac9bbc45b299404b Mon Sep 17 00:00:00 2001
From: Aliaksandr Valialkin
Date: Sat, 16 Apr 2022 16:58:34 +0300
Subject: [PATCH 21/39] docs/Cluster-VictoriaMetrics.md: sync docs
---
docs/Cluster-VictoriaMetrics.md | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md
index 35b4331da..c8c4a3164 100644
--- a/docs/Cluster-VictoriaMetrics.md
+++ b/docs/Cluster-VictoriaMetrics.md
@@ -601,14 +601,14 @@ Below is the output for `/path/to/vminsert -help`:
Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN
Supports an array of values separated by comma or specified via multiple flags.
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
@@ -750,14 +750,14 @@ Below is the output for `/path/to/vmselect -help`:
Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN
Supports an array of values separated by comma or specified via multiple flags.
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
```
@@ -876,14 +876,14 @@ Below is the output for `/path/to/vmstorage -help`:
-storageDataPath string
Path to storage data (default "vmstorage-data")
-tls
- Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
+ Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
- Path to file with TLS certificate. Used only if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS certificate if -tls is set. Prefer ECDSA certs instead of RSA certs as RSA certs are slower. The provided certificate file is automatically re-read every second, so it can be dynamically updated
-tlsCipherSuites array
- Optional list of TLS cipher suites for incoming requests over HTTPS if -tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
+ Optional list of TLS cipher suites for incoming requests over HTTPS if -tls is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants
Supports an array of values separated by comma or specified via multiple flags.
-tlsKeyFile string
- Path to file with TLS key. Used only if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
+ Path to file with TLS key if -tls is set. The provided key file is automatically re-read every second, so it can be dynamically updated
-version
Show VictoriaMetrics version
-vminsertAddr string
From 514e3660e227c51d0bc667e42bac661d87bc250a Mon Sep 17 00:00:00 2001
From: Yury Molodov
Date: Sat, 16 Apr 2022 17:15:31 +0300
Subject: [PATCH 22/39] fix: prevent graph hiding without data (#2456)
* fix: prevent graph hiding without data
* fix: add yaxis labels default
* app/vmselect: `make vmui-update`
* docs/CHANGELOG.md: document the change
Co-authored-by: Aliaksandr Valialkin
---
app/vmselect/vmui/asset-manifest.json | 4 ++--
app/vmselect/vmui/index.html | 2 +-
app/vmselect/vmui/static/js/main.1754e6b5.js | 2 ++
...c2.js.LICENSE.txt => main.1754e6b5.js.LICENSE.txt} | 0
app/vmselect/vmui/static/js/main.d940c8c2.js | 2 --
.../src/components/CustomPanel/Views/GraphView.tsx | 11 ++++-------
.../vmui/src/components/LineChart/LineChart.tsx | 5 +++--
docs/CHANGELOG.md | 1 +
8 files changed, 13 insertions(+), 14 deletions(-)
create mode 100644 app/vmselect/vmui/static/js/main.1754e6b5.js
rename app/vmselect/vmui/static/js/{main.d940c8c2.js.LICENSE.txt => main.1754e6b5.js.LICENSE.txt} (100%)
delete mode 100644 app/vmselect/vmui/static/js/main.d940c8c2.js
diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json
index 3f37ff3b2..9d0073b46 100644
--- a/app/vmselect/vmui/asset-manifest.json
+++ b/app/vmselect/vmui/asset-manifest.json
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.d8362c27.css",
- "main.js": "./static/js/main.d940c8c2.js",
+ "main.js": "./static/js/main.1754e6b5.js",
"static/js/362.1a2113d4.chunk.js": "./static/js/362.1a2113d4.chunk.js",
"static/js/27.939f971b.chunk.js": "./static/js/27.939f971b.chunk.js",
"static/media/README.md": "./static/media/README.5e5724daf3ee333540a3.md",
@@ -9,6 +9,6 @@
},
"entrypoints": [
"static/css/main.d8362c27.css",
- "static/js/main.d940c8c2.js"
+ "static/js/main.1754e6b5.js"
]
}
\ No newline at end of file
diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html
index a889ef986..8071dee12 100644
--- a/app/vmselect/vmui/index.html
+++ b/app/vmselect/vmui/index.html
@@ -1 +1 @@
-VM UI
\ No newline at end of file
+VM UI
\ No newline at end of file
diff --git a/app/vmselect/vmui/static/js/main.1754e6b5.js b/app/vmselect/vmui/static/js/main.1754e6b5.js
new file mode 100644
index 000000000..305a7b6bf
--- /dev/null
+++ b/app/vmselect/vmui/static/js/main.1754e6b5.js
@@ -0,0 +1,2 @@
+/*! For license information please see main.1754e6b5.js.LICENSE.txt */
+!function(){var e={5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},7757:function(e,t,n){e.exports=n(8937)},2575:function(e,t,n){"use strict";n.d(t,{Z:function(){return oe}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?c(x,--y):0,v--,10===b&&(v=1,m--),b}function S(){return b=y2||E(b)>3?"":" "}function T(e,t){for(;--t&&S()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return _(e,C()+(t<6&&32==D()&&32==S()))}function F(e){for(;S();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&F(b);break;case 40:41===e&&F(e);break;case 92:S()}return y}function O(e,t){for(;S()&&e+b!==57&&(e+b!==84||47!==D()););return"/*"+_(t,y-1)+"*"+i(47===e?e:S())}function B(e){for(;!E(D());)S();return _(e,y)}var I="-ms-",N="-moz-",L="-webkit-",z="comm",j="rule",W="decl",$="@keyframes";function H(e,t){for(var n="",r=p(e),o=0;o6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return s(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+N+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~l(e,"stretch")?V(s(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,f(e)-3-(~l(e,"!important")&&10))){case 107:return s(e,":",":"+L)+e;case 101:return s(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+L+(45===c(e,14)?"inline-":"")+"box$3$1"+L+"$2$3$1"+I+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return L+e+I+s(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return L+e+I+s(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return L+e+I+s(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return L+e+I+e+e}return e}function U(e){return M(q("",null,null,null,[""],e=A(e),0,[0],e))}function q(e,t,n,r,o,a,u,c,d){for(var p=0,m=0,v=u,g=0,y=0,b=0,x=1,w=1,Z=1,_=0,E="",A=o,M=a,F=r,I=E;w;)switch(b=_,_=S()){case 40:if(108!=b&&58==I.charCodeAt(v-1)){-1!=l(I+=s(P(_),"&","&\f"),"&\f")&&(Z=-1);break}case 34:case 39:case 91:I+=P(_);break;case 9:case 10:case 13:case 32:I+=R(b);break;case 92:I+=T(C()-1,7);continue;case 47:switch(D()){case 42:case 47:h(G(O(S(),C()),t,n),d);break;default:I+="/"}break;case 123*x:c[p++]=f(I)*Z;case 125*x:case 59:case 0:switch(_){case 0:case 125:w=0;case 59+m:y>0&&f(I)-v&&h(y>32?K(I+";",r,n,v-1):K(s(I," ","")+";",r,n,v-2),d);break;case 59:I+=";";default:if(h(F=X(I,t,n,p,m,o,c,E,A=[],M=[],v),a),123===_)if(0===m)q(I,t,F,F,A,a,v,c,M);else switch(g){case 100:case 109:case 115:q(e,F,F,r&&h(X(e,F,F,0,0,o,c,E,o,A=[],v),M),o,M,v,c,r?A:M);break;default:q(I,F,F,F,[""],M,0,c,M)}}p=m=y=0,x=Z=1,E=I="",v=u;break;case 58:v=1+f(I),y=b;default:if(x<1)if(123==_)--x;else if(125==_&&0==x++&&125==k())continue;switch(I+=i(_),_*x){case 38:Z=m>0?1:(I+="\f",-1);break;case 44:c[p++]=(f(I)-1)*Z,Z=1;break;case 64:45===D()&&(I+=P(S())),g=D(),m=v=f(E=I+=B(C())),_++;break;case 45:45===b&&2==f(I)&&(x=0)}}return a}function X(e,t,n,r,i,a,l,c,f,h,m){for(var v=i-1,g=0===i?a:[""],y=p(g),b=0,x=0,Z=0;b0?g[k]+" "+S:s(S,/&\f/g,g[k])))&&(f[Z++]=D);return w(e,t,n,0===i?j:c,f,h,m)}function G(e,t,n){return w(e,t,n,z,i(b),d(e,2,-2),0)}function K(e,t,n,r){return w(e,t,n,W,d(e,0,r),d(e,r+1,-1),r)}var Q=function(e,t,n){for(var r=0,o=0;r=o,o=D(),38===r&&12===o&&(t[n]=1),!E(o);)S();return _(e,y)},J=function(e,t){return M(function(e,t){var n=-1,r=44;do{switch(E(r)){case 0:38===r&&12===D()&&(t[n]=1),e[n]+=Q(y-1,t,n);break;case 2:e[n]+=P(r);break;case 4:if(44===r){e[++n]=58===D()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=S());return e}(A(e),t))},ee=new WeakMap,te=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ee.get(n))&&!r){ee.set(e,!0);for(var o=[],i=J(t,o),a=n.props,u=0,s=0;u-1&&!e.return)switch(e.type){case W:e.return=V(e.value,e.length);break;case $:return H([Z(e,{value:s(e.value,"@","@"+L)})],r);case j:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([Z(e,{props:[s(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([Z(e,{props:[s(t,/:(plac\w+)/,":-webkit-input-$1")]}),Z(e,{props:[s(t,/:(plac\w+)/,":-moz-$1")]}),Z(e,{props:[s(t,/:(plac\w+)/,I+"input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||re;var i,a,u={},s=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(3390),a=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},c=(0,i.Z)((function(e){return s(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(u,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===o[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function f(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[200],light:v[50],dark:v[400]}:{main:v[700],light:v[400],dark:v[800]}}(n),C=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(n),_=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[500],light:h[300],dark:h[700]}:{main:h[700],light:h[400],dark:h[800]}}(n),E=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[400],light:g[300],dark:g[700]}:{main:g[700],light:g[500],dark:g[900]}}(n),A=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(n),M=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(n);function P(e){return(0,c.mi)(e,w.text.primary)>=u?w.text.primary:x.text.primary}var R=function(e){var t=e.color,n=e.name,o=e.mainShade,i=void 0===o?500:o,a=e.lightShade,u=void 0===a?300:a,s=e.darkShade,c=void 0===s?700:s;if(!(t=(0,r.Z)({},t)).main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,l.Z)(11,n?" (".concat(n,")"):"",i));if("string"!==typeof t.main)throw new Error((0,l.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return Z(t,"light",u,k),Z(t,"dark",c,k),t.contrastText||(t.contrastText=P(t.main)),t},T={dark:w,light:x};return(0,i.Z)((0,r.Z)({common:d,mode:n,primary:R({color:D,name:"primary"}),secondary:R({color:C,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:R({color:_,name:"error"}),warning:R({color:M,name:"warning"}),info:R({color:E,name:"info"}),success:R({color:A,name:"success"}),grey:f,contrastThreshold:u,getContrastText:P,augmentColor:R,tonalOffset:k},T[n]),S)}var S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];var D={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function _(e,t){var n="function"===typeof t?t(e):t,a=n.fontFamily,u=void 0===a?C:a,s=n.fontSize,l=void 0===s?14:s,c=n.fontWeightLight,d=void 0===c?300:c,f=n.fontWeightRegular,p=void 0===f?400:f,h=n.fontWeightMedium,m=void 0===h?500:h,v=n.fontWeightBold,g=void 0===v?700:v,y=n.htmlFontSize,b=void 0===y?16:y,x=n.allVariants,w=n.pxToRem,Z=(0,o.Z)(n,S);var k=l/14,_=w||function(e){return"".concat(e/b*k,"rem")},E=function(e,t,n,o,i){return(0,r.Z)({fontFamily:u,fontWeight:e,fontSize:_(t),lineHeight:n},u===C?{letterSpacing:"".concat((a=o/t,Math.round(1e5*a)/1e5),"em")}:{},i,x);var a},A={h1:E(d,96,1.167,-1.5),h2:E(d,60,1.2,-.5),h3:E(p,48,1.167,0),h4:E(p,34,1.235,.25),h5:E(p,24,1.334,0),h6:E(m,20,1.6,.15),subtitle1:E(p,16,1.75,.15),subtitle2:E(m,14,1.57,.1),body1:E(p,16,1.5,.15),body2:E(p,14,1.43,.15),button:E(m,14,1.75,.4,D),caption:E(p,12,1.66,.4),overline:E(p,12,2.66,1,D)};return(0,i.Z)((0,r.Z)({htmlFontSize:b,pxToRem:_,fontFamily:u,fontSize:l,fontWeightLight:d,fontWeightRegular:p,fontWeightMedium:m,fontWeightBold:g},A),Z,{clone:!1})}function E(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var A=["none",E(0,2,1,-1,0,1,1,0,0,1,3,0),E(0,3,1,-2,0,2,2,0,0,1,5,0),E(0,3,3,-2,0,3,4,0,0,1,8,0),E(0,2,4,-1,0,4,5,0,0,1,10,0),E(0,3,5,-1,0,5,8,0,0,1,14,0),E(0,3,5,-1,0,6,10,0,0,1,18,0),E(0,4,5,-2,0,7,10,1,0,2,16,1),E(0,5,5,-3,0,8,10,1,0,3,14,2),E(0,5,6,-3,0,9,12,1,0,3,16,2),E(0,6,6,-3,0,10,14,1,0,4,18,3),E(0,6,7,-4,0,11,15,1,0,4,20,3),E(0,7,8,-4,0,12,17,2,0,5,22,4),E(0,7,8,-4,0,13,19,2,0,5,24,4),E(0,7,9,-4,0,14,21,2,0,5,26,4),E(0,8,9,-5,0,15,22,2,0,6,28,5),E(0,8,10,-5,0,16,24,2,0,6,30,5),E(0,8,11,-5,0,17,26,2,0,6,32,5),E(0,9,11,-5,0,18,28,2,0,7,34,6),E(0,9,12,-6,0,19,29,2,0,7,36,6),E(0,10,13,-6,0,20,31,3,0,8,38,7),E(0,10,13,-6,0,21,33,3,0,8,40,7),E(0,10,14,-6,0,22,35,3,0,8,42,7),E(0,11,14,-7,0,23,36,3,0,9,44,8),E(0,11,15,-7,0,24,38,3,0,9,46,8)],M=n(5829),P={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},R=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mixins,n=void 0===t?{}:t,u=e.palette,l=void 0===u?{}:u,c=e.transitions,d=void 0===c?{}:c,f=e.typography,p=void 0===f?{}:f,h=(0,o.Z)(e,R),m=k(l),v=(0,a.Z)(e),g=(0,i.Z)(v,{mixins:s(v.breakpoints,v.spacing,n),palette:m,shadows:A.slice(),typography:_(m,p),transitions:(0,M.ZP)(d),zIndex:(0,r.Z)({},P)});g=(0,i.Z)(g,h);for(var y=arguments.length,b=new Array(y>1?y-1:0),x=1;x0&&void 0!==arguments[0]?arguments[0]:["all"],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=o.duration,u=void 0===a?n.standard:a,l=o.easing,c=void 0===l?t.easeInOut:l,d=o.delay,f=void 0===d?0:d;(0,r.Z)(o,i);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof u?u:s(u)," ").concat(c," ").concat("string"===typeof f?f:s(f))})).join(",")}},e,{easing:t,duration:n})}},2248:function(e,t,n){"use strict";var r=(0,n(7458).Z)();t.Z=r},8564:function(e,t,n){"use strict";n.d(t,{ZP:function(){return _},FO:function(){return S},Dz:function(){return D}});var r=n(3433),o=n(9439),i=n(7462),a=n(3366),u=n(297),s=n(9456),l=n(114),c=["variant"];function d(e){return 0===e.length}function f(e){var t=e.variant,n=(0,a.Z)(e,c),r=t||"";return Object.keys(n).sort().forEach((function(t){r+="color"===t?d(r)?e[t]:(0,l.Z)(e[t]):"".concat(d(r)?t:(0,l.Z)(t)).concat((0,l.Z)(e[t].toString()))})),r}var p=n(3649),h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],m=["theme"],v=["theme"];function g(e){return 0===Object.keys(e).length}var y=function(e,t){return t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null},b=function(e,t){var n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);var r={};return n.forEach((function(e){var t=f(e.props);r[t]=e.style})),r},x=function(e,t,n,r){var o,i,a=e.ownerState,u=void 0===a?{}:a,s=[],l=null==n||null==(o=n.components)||null==(i=o[r])?void 0:i.variants;return l&&l.forEach((function(n){var r=!0;Object.keys(n.props).forEach((function(t){u[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&s.push(t[f(n.props)])})),s};function w(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var Z=(0,s.Z)();var k=n(2248),S=function(e){return w(e)&&"classes"!==e},D=w,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=void 0===t?Z:t,s=e.rootShouldForwardProp,l=void 0===s?w:s,c=e.slotShouldForwardProp,d=void 0===c?w:c,f=e.styleFunctionSx,k=void 0===f?p.Z:f;return function(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=s.name,f=s.slot,p=s.skipVariantsResolver,Z=s.skipSx,S=s.overridesResolver,D=(0,a.Z)(s,h),C=void 0!==p?p:f&&"Root"!==f||!1,_=Z||!1;var E=w;"Root"===f?E=l:f&&(E=d);var A=(0,u.ZP)(e,(0,i.Z)({shouldForwardProp:E,label:t},D)),M=function(e){for(var t=arguments.length,u=new Array(t>1?t-1:0),s=1;s0){var p=new Array(f).fill("");(d=[].concat((0,r.Z)(e),(0,r.Z)(p))).raw=[].concat((0,r.Z)(e.raw),(0,r.Z)(p))}else"function"===typeof e&&e.__emotion_real!==e&&(d=function(t){var r=t.theme,o=(0,a.Z)(t,v);return e((0,i.Z)({theme:g(r)?n:r},o))});var h=A.apply(void 0,[d].concat((0,r.Z)(l)));return h};return A.withConfig&&(M.withConfig=A.withConfig),M}}({defaultTheme:k.Z,rootShouldForwardProp:S}),_=C},5469:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(4290),o=n(6728);var i=n(2248);function a(e){return function(e){var t=e.props,n=e.name,i=e.defaultTheme,a=(0,o.Z)(i);return(0,r.Z)({theme:a,name:n,props:t})}({props:e.props,name:e.name,defaultTheme:i.Z})}},1615:function(e,t,n){"use strict";var r=n(114);t.Z=r.Z},4750:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(7462),o=n(4206),i=n(210),a=n(3138);function u(e,t){var n=function(n,o){return(0,a.tZ)(i.Z,(0,r.Z)({"data-testid":"".concat(t,"Icon"),ref:o},n,{children:e}))};return n.muiName=i.Z.muiName,o.memo(o.forwardRef(n))}},8706:function(e,t,n){"use strict";var r=n(4312);t.Z=r.Z},6415:function(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:function(){return o.Z},createChainedFunction:function(){return i},createSvgIcon:function(){return a.Z},debounce:function(){return u.Z},deprecatedPropType:function(){return s},isMuiElement:function(){return l.Z},ownerDocument:function(){return c.Z},ownerWindow:function(){return d.Z},requirePropFactory:function(){return f},setRef:function(){return p},unstable_ClassNameGenerator:function(){return w},unstable_useEnhancedEffect:function(){return h.Z},unstable_useId:function(){return m.Z},unsupportedProp:function(){return v},useControlled:function(){return g.Z},useEventCallback:function(){return y.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return x.Z}});var r=n(4496),o=n(1615),i=n(4246).Z,a=n(4750),u=n(8706);var s=function(e,t){return function(){return null}},l=n(7816),c=n(6106),d=n(3533);n(7462);var f=function(e,t){return function(){return null}},p=n(9265).Z,h=n(4993),m=n(7677);var v=function(e,t,n,r,o){return null},g=n(522),y=n(3236),b=n(6983),x=n(9127),w={configure:function(e){console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join("\n")),r.Z.configure(e)}}},7816:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4206);var o=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},6106:function(e,t,n){"use strict";var r=n(9081);t.Z=r.Z},3533:function(e,t,n){"use strict";var r=n(3282);t.Z=r.Z},522:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9439),o=n(4206);var i=function(e){var t=e.controlled,n=e.default,i=(e.name,e.state,o.useRef(void 0!==t).current),a=o.useState(n),u=(0,r.Z)(a,2),s=u[0],l=u[1];return[i?t:s,o.useCallback((function(e){i||l(e)}),[])]}},4993:function(e,t,n){"use strict";var r=n(2678);t.Z=r.Z},3236:function(e,t,n){"use strict";var r=n(2780);t.Z=r.Z},6983:function(e,t,n){"use strict";var r=n(7472);t.Z=r.Z},7677:function(e,t,n){"use strict";var r=n(3362);t.Z=r.Z},9127:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r,o=n(4206),i=!0,a=!1,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function l(){i=!1}function c(){"hidden"===this.visibilityState&&a&&(i=!0)}function d(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!u[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}var f=function(){var e=o.useCallback((function(e){var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",s,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("touchstart",l,!0),t.addEventListener("visibilitychange",c,!0))}),[]),t=o.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,window.clearTimeout(r),r=window.setTimeout((function(){a=!1}),100),t.current=!1,!0)},ref:e}}},5693:function(e,t,n){"use strict";var r=n(4206).createContext(null);t.Z=r},201:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4206),o=n(5693);function i(){return r.useContext(o.Z)}},297:function(e,t,n){"use strict";n.d(t,{ZP:function(){return x}});var r=n(4206),o=n(7462),i=n(3390),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,u=(0,i.Z)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),s=n(6173),l=n(4911),c=n(4544),d=u,f=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?d:f},h=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=r.useInsertionEffect?r.useInsertionEffect:function(e){e()};var v=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;(0,l.hC)(t,n,r);!function(e){m(e)}((function(){return(0,l.My)(t,n,r)}));return null},g=function e(t,n){var i,a,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(i=n.label,a=n.target);var f=h(t,n,u),m=f||p(d),g=!m("as");return function(){var y=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&b.push("label:"+i+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{0,b.push(y[0][0]);for(var x=y.length,w=1;w0&&void 0!==arguments[0]?arguments[0]:{},n=null==t||null==(e=t.keys)?void 0:e.reduce((function(e,n){return e[t.up(n)]={},e}),{});return n||{}}function u(e,t){return e.reduce((function(e,t){var n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function s(e){var t,n=e.values,r=e.breakpoints,o=e.base||function(e,t){if("object"!==typeof e)return{};var n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((function(t,r){r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.slice(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));var o,a=e.substring(t+1,e.length-1);if("color"===n){if(o=(a=a.split(" ")).shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,r.Z)(10,o))}else a=a.split(",");return{type:n,values:a=a.map((function(e){return parseFloat(e)})),colorSpace:o}}function a(e){var t=e.type,n=e.colorSpace,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function u(e){var t="hsl"===(e=i(e)).type?i(function(e){var t=(e=i(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,u=r*Math.min(o,1-o),s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-u*Math.max(Math.min(t-3,9-t,1),-1)},l="rgb",c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(l+="a",c.push(t[3])),a({type:l,values:c})}(e)).values:e.values;return t=t.map((function(t){return"color"!==e.type&&(t/=255),t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function s(e,t){var n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(e,t){return e=i(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,a(e)}function c(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function d(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(var r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return a(e)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return u(e)>.5?c(e,t):d(e,t)}},9456:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7462),o=n(3366),i=n(3019),a=n(4942),u=["values","unit","step"];function s(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:900,lg:1200,xl:1536}:t,i=e.unit,s=void 0===i?"px":i,l=e.step,c=void 0===l?5:l,d=(0,o.Z)(e,u),f=function(e){var t=Object.keys(e).map((function(t){return{key:t,val:e[t]}}))||[];return t.sort((function(e,t){return e.val-t.val})),t.reduce((function(e,t){return(0,r.Z)({},e,(0,a.Z)({},t.key,t.val))}),{})}(n),p=Object.keys(f);function h(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function m(e){var t="number"===typeof n[e]?n[e]:e;return"@media (max-width:".concat(t-c/100).concat(s,")")}function v(e,t){var r=p.indexOf(t);return"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[p[r]]?n[p[r]]:t)-c/100).concat(s,")")}return(0,r.Z)({keys:p,values:f,up:h,down:m,between:v,only:function(e){return p.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,c.hB)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,a=e.palette,u=void 0===a?{}:a,c=e.spacing,p=e.shape,h=void 0===p?{}:p,m=(0,o.Z)(e,f),v=s(n),g=d(c),y=(0,i.Z)({breakpoints:v,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},u),spacing:g,shape:(0,r.Z)({},l,h)},m),b=arguments.length,x=new Array(b>1?b-1:0),w=1;w2){if(!l[e])return[e];e=l[e]}var t=e.split(""),n=(0,r.Z)(t,2),o=n[0],i=n[1],a=u[o],c=s[i]||"";return Array.isArray(c)?c.map((function(e){return a+e})):[a+c]})),d=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],f=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],p=[].concat(d,f);function h(e,t,n,r){var o=(0,i.D)(e,t)||n;return"number"===typeof o?function(e){return"string"===typeof e?e:o*e}:Array.isArray(o)?function(e){return"string"===typeof e?e:o[e]}:"function"===typeof o?o:function(){}}function m(e){return h(e,"spacing",8)}function v(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,r){if(-1===t.indexOf(n))return null;var i=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=v(t,n),e}),{})}}(c(n),r),a=e[n];return(0,o.k9)(e,a,i)}function y(e,t){var n=m(e.theme);return Object.keys(e).map((function(r){return g(e,t,r,n)})).reduce(a.Z,{})}function b(e){return y(e,d)}function x(e){return y(e,f)}function w(e){return y(e,p)}b.propTypes={},b.filterProps=d,x.propTypes={},x.filterProps=f,w.propTypes={},w.filterProps=p;var Z=w},6428:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(4942),o=n(114),i=n(4929);function a(e,t){return t&&"string"===typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}function u(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:a(e,n)||o,t&&(r=t(r)),r}t.Z=function(e){var t=e.prop,n=e.cssProperty,s=void 0===n?e.prop:n,l=e.themeKey,c=e.transform,d=function(e){if(null==e[t])return null;var n=e[t],d=a(e.theme,l)||{};return(0,i.k9)(e,n,(function(e){var n=u(d,c,e);return e===n&&"string"===typeof e&&(n=u(d,c,"".concat(t).concat("default"===e?"":(0,o.Z)(e)),e)),!1===s?n:(0,r.Z)({},s,n)}))};return d.propTypes={},d.filterProps=[t],d}},3649:function(e,t,n){"use strict";var r=n(4942),o=n(7330),i=n(9716),a=n(4929);function u(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:i.G$,t=Object.keys(e).reduce((function(t,n){return e[n].filterProps.forEach((function(r){t[r]=e[n]})),t}),{});function n(e,n,o){var i,a=(i={},(0,r.Z)(i,e,n),(0,r.Z)(i,"theme",o),i),u=t[e];return u?u(a):(0,r.Z)({},e,n)}function l(e){var i=e||{},c=i.sx,d=i.theme,f=void 0===d?{}:d;if(!c)return null;function p(e){var i=e;if("function"===typeof e)i=e(f);else if("object"!==typeof e)return e;if(!i)return null;var c=(0,a.W8)(f.breakpoints),d=Object.keys(c),p=c;return Object.keys(i).forEach((function(e){var c=s(i[e],f);if(null!==c&&void 0!==c)if("object"===typeof c)if(t[e])p=(0,o.Z)(p,n(e,c,f));else{var d=(0,a.k9)({theme:f},c,(function(t){return(0,r.Z)({},e,t)}));u(d,c)?p[e]=l({sx:c,theme:f}):p=(0,o.Z)(p,d)}else p=(0,o.Z)(p,n(e,c,f))})),(0,a.L7)(d,p)}return Array.isArray(c)?c.map(p):p(c)}return l}();l.filterProps=["sx"],t.Z=l},6728:function(e,t,n){"use strict";var r=n(9456),o=n(4976),i=(0,r.Z)();t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return(0,o.Z)(e)}},4290:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9023);function o(e){var t=e.theme,n=e.name,o=e.props;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,o):o}},4976:function(e,t,n){"use strict";var r=n(201);function o(e){return 0===Object.keys(e).length}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=(0,r.Z)();return!t||o(t)?e:t}},114:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7219);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},4246:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a2&&void 0!==arguments[2]?arguments[2]:{clone:!0},a=n.clone?(0,r.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(o(t[r])&&r in e&&o(e[r])?a[r]=i(e[r],t[r],n):a[r]=t[r])})),a}},7219:function(e,t,n){"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n-1?o(n):n}},9962:function(e,t,n){"use strict";var r=n(1199),o=n(8476),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||r.call(a,i),s=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(f){l=null}e.exports=function(e){var t=u(r,a,arguments);if(s&&l){var n=s(t,"length");n.configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))})}return t};var d=function(){return u(r,i,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},3061:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;x[u]=t,o=u}return!r&&o&&(b=o),o||!r&&b},k=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new D(n)},S=y;S.l=Z,S.i=w,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function v(e){this.$L=Z(e.locale,null,!0),this.parse(e)}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return k(e)68?1900:2e3)},u=function(e){return function(t){this[e]=+t}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],l=function(e){var t=i[e];return t&&(t.indexOf?t:t.s.concat(t.f))},c=function(e,t){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[o,function(e){this.afternoon=c(e,!1)}],a:[o,function(e){this.afternoon=c(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[n,u("day")],Do:[o,function(e){var t=i.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,u("month")],MM:[n,u("month")],MMM:[o,function(e){var t=l("months"),n=(l("monthsShort")||t.map((function(e){return e.substr(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=l("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(e){this.year=a(e)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function f(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),u=a.length,s=0;s-1)return new Date(("X"===t?1e3:1)*e);var r=f(t)(e),o=r.year,i=r.month,a=r.day,u=r.hours,s=r.minutes,l=r.seconds,c=r.milliseconds,d=r.zone,p=new Date,h=a||(o||i?1:p.getDate()),m=o||p.getFullYear(),v=0;o&&!i||(v=i>0?i-1:p.getMonth());var g=u||0,y=s||0,b=l||0,x=c||0;return d?new Date(Date.UTC(m,v,h,g,y,b,x+60*d.offset*1e3)):n?new Date(Date.UTC(m,v,h,g,y,b,x)):new Date(m,v,h,g,y,b,x)}catch(e){return new Date("")}}(t,u,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),c&&t!=this.format(u)&&(this.$d=new Date("")),i={}}else if(u instanceof Array)for(var p=u.length,h=1;h<=p;h+=1){a[1]=u[h-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}h===p&&(this.$d=new Date(""))}else o.call(this,e)}}}()},6446:function(e){e.exports=function(){"use strict";var e,t,n=1e3,r=6e4,o=36e5,i=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,s=2592e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c={years:u,months:s,days:i,hours:o,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof y},f=function(e,t,n){return new y(e,n,t.$l)},p=function(e){return t.p(e)+"s"},h=function(e){return e<0},m=function(e){return h(e)?Math.ceil(e):Math.floor(e)},v=function(e){return Math.abs(e)},g=function(e,t){return e?h(e)?{negative:!0,format:""+v(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},y=function(){function h(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*c[p(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var o=e.match(l);if(o){var i=o.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=i[0],this.$d.months=i[1],this.$d.weeks=i[2],this.$d.days=i[3],this.$d.hours=i[4],this.$d.minutes=i[5],this.$d.seconds=i[6],this.calMilliseconds(),this}}return this}var v=h.prototype;return v.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*c[n]}),0)},v.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/u),e%=u,this.$d.months=m(e/s),e%=s,this.$d.days=m(e/i),e%=i,this.$d.hours=m(e/o),e%=o,this.$d.minutes=m(e/r),e%=r,this.$d.seconds=m(e/n),e%=n,this.$d.milliseconds=e},v.toISOString=function(){var e=g(this.$d.years,"Y"),t=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=g(n,"D"),o=g(this.$d.hours,"H"),i=g(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3);var u=g(a,"S"),s=e.negative||t.negative||r.negative||o.negative||i.negative||u.negative,l=o.format||i.format||u.format?"T":"",c=(s?"-":"")+"P"+e.format+t.format+r.format+l+o.format+i.format+u.format;return"P"===c||"-P"===c?"P0D":c},v.toJSON=function(){return this.toISOString()},v.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(a,(function(e,t){return t||String(r[e])}))},v.as=function(e){return this.$ms/c[p(e)]},v.get=function(e){var t=this.$ms,n=p(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?m(t/c[n]):this.$d[n],0===t?0:t},v.add=function(e,t,n){var r;return r=t?e*c[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},v.subtract=function(e,t){return this.add(e,t,!0)},v.locale=function(e){var t=this.clone();return t.$l=e,t},v.clone=function(){return f(this.$ms,this)},v.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},h}();return function(n,r,o){e=o,t=o().$utils(),o.duration=function(e,t){var n=o.locale();return f(e,{$l:n},t)},o.isDuration=d;var i=r.prototype.add,a=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)&&(e=e.asMilliseconds()),i.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)&&(e=e.asMilliseconds()),a.bind(this)(e,t)}}}()},8743:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var i=n(e),a=n(t),u="("===(o=o||"()")[0],s=")"===o[1];return(u?this.isAfter(i,r):!this.isBefore(i,r))&&(s?this.isBefore(a,r):!this.isAfter(a,r))||(u?this.isBefore(i,r):!this.isAfter(i,r))&&(s?this.isAfter(a,r):!this.isBefore(a,r))}}}()},3825:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var o=n.prototype,i=o.format;r.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,o){var i=o&&o.toUpperCase();return r||n[o]||e[o]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return i.call(this,r)}}}()},1635:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),u.call(this,e)};var s=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var l=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,u=this;if(o)return u.$offset=a,u.$u=0===r,u;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(u=this.local().add(a+s,e)).$offset=a,u.$x.$localOffset=s}else u=this.utc();return u};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),o=i(e).local();return f.call(r,o,t,n)}}}()},2781:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!==typeof i||r.call(i)!==o)throw new TypeError(t+i);for(var a,u=n.call(arguments,1),s=function(){if(this instanceof a){var t=i.apply(this,u.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,u.concat(n.call(arguments)))},l=Math.max(0,i.length-u.length),c=[],d=0;d1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');var n=C(e),r=n.length>0?n[0]:"",i=_("%"+r+"%",t),u=i.name,l=i.value,c=!1,d=i.alias;d&&(r=d[0],w(n,x([0,1],d)));for(var f=1,p=!0;f=n.length){var y=s(l,h);l=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:l[h]}else p=b(l,h),l=l[h];p&&!c&&(m[u]=l)}}return l}},5520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},541:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7838:function(e,t,n){"use strict";var r=n(1199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},7861:function(e,t,n){"use strict";var r=n(2535),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?a:u[e.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var u=s(t),m=s(n),v=0;v=t||n<0||d&&e-l>=i}function w(){var e=h();if(x(e))return Z(e);u=setTimeout(w,function(e){var n=t-(e-s);return d?p(n,i-(e-l)):n}(e))}function Z(e){return u=void 0,g&&r?y(e):(r=o=void 0,a)}function k(){var e=h(),n=x(e);if(r=arguments,o=this,s=e,n){if(void 0===u)return b(s);if(d)return u=setTimeout(w,t),y(s)}return void 0===u&&(u=setTimeout(w,t)),a}return t=v(t)||0,m(n)&&(c=!!n.leading,i=(d="maxWait"in n)?f(v(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==u&&clearTimeout(u),l=0,r=s=o=u=void 0},k.flush=function(){return void 0===u?a:Z(h())},k}},4007:function(e,t,n){var r="__lodash_hash_undefined__",o="[object Function]",i="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,s=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,h=f||p||Function("return this")();var m=Array.prototype,v=Function.prototype,g=Object.prototype,y=h["__core-js_shared__"],b=function(){var e=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=v.toString,w=g.hasOwnProperty,Z=g.toString,k=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=h.Symbol,D=m.splice,C=I(h,"Map"),_=I(Object,"create"),E=S?S.prototype:void 0,A=E?E.toString:void 0;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},P.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new M,map:new(C||P),string:new M}},R.prototype.delete=function(e){return B(this,e).delete(e)},R.prototype.get=function(e){return B(this,e).get(e)},R.prototype.has=function(e){return B(this,e).has(e)},R.prototype.set=function(e,t){return B(this,e).set(e,t),this};var N=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if($(e))return A?A.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(l,(function(e,t,r,o){n.push(r?o.replace(c,"$1"):t||e)})),n}));function L(e){if("string"==typeof e||$(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(z.Cache||R),n}z.Cache=R;var j=Array.isArray;function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Z.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},2061:function(e,t,n){var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=l||c||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,m=function(){return d.Date.now()};function v(e,t,n){var o,i,a,u,s,l,c=0,d=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,c=t,u=e.apply(r,n)}function x(e){return c=e,s=setTimeout(Z,t),d?b(e):u}function w(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=a}function Z(){var e=m();if(w(e))return k(e);s=setTimeout(Z,function(e){var n=t-(e-l);return f?h(n,a-(e-c)):n}(e))}function k(e){return s=void 0,v&&o?b(e):(o=i=void 0,u)}function S(){var e=m(),n=w(e);if(o=arguments,i=this,l=e,n){if(void 0===s)return x(l);if(f)return s=setTimeout(Z,t),b(l)}return void 0===s&&(s=setTimeout(Z,t)),u}return t=y(t)||0,g(n)&&(d=!!n.leading,a=(f="maxWait"in n)?p(y(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=l=i=s=void 0},S.flush=function(){return void 0===s?u:k(m())},S}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return g(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),v(e,t,{leading:o,maxWait:t,trailing:i})}},3154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"===typeof o.get?o.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=u&&s&&"function"===typeof s.get?s.get:null,c=u&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,x=String.prototype.toUpperCase,w=String.prototype.toLowerCase,Z=RegExp.prototype.test,k=Array.prototype.concat,S=Array.prototype.join,D=Array.prototype.slice,C=Math.floor,_="function"===typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"===typeof Symbol&&"object"===typeof Symbol.iterator,P="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,T=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Z.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var o=String(r),i=y.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var O=n(4654).custom,B=O&&z(O)?O:null;function I(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function N(e){return b.call(String(e),/"/g,""")}function L(e){return"[object Array]"===$(e)&&(!P||!("object"===typeof e&&P in e))}function z(e){if(M)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,o){var u=n||{};if(W(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!W(u,"customInspect")||u.customInspect;if("boolean"!==typeof s&&"symbol"!==s)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=u.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return Y(t,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var x=String(t);return m?F(t,x):x}if("bigint"===typeof t){var Z=String(t)+"n";return m?F(t,Z):Z}var C="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=C&&C>0&&"object"===typeof t)return L(t)?"[Array]":"[Object]";var E=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(u,r);if("undefined"===typeof o)o=[];else if(H(o,t)>=0)return"[Circular]";function O(t,n,i){if(n&&(o=D.call(o)).push(n),i){var a={depth:u.depth};return W(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,o)}return e(t,u,r+1,o)}if("function"===typeof t){var j=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),V=K(t,O);return"[Function"+(j?": "+j:" (anonymous)")+"]"+(V.length>0?" { "+S.call(V,", ")+" }":"")}if(z(t)){var Q=M?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(t);return"object"!==typeof t||M?Q:U(Q)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var J="<"+w.call(String(t.nodeName)),ee=t.attributes||[],te=0;te",t.childNodes&&t.childNodes.length&&(J+="..."),J+=""+w.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var ne=K(t,O);return E&&!function(e){for(var t=0;t=0)return!1;return!0}(ne)?"["+G(ne,E)+"]":"[ "+S.call(ne,", ")+" ]"}if(function(e){return"[object Error]"===$(e)&&(!P||!("object"===typeof e&&P in e))}(t)){var re=K(t,O);return"cause"in t&&!R.call(t,"cause")?"{ ["+String(t)+"] "+S.call(k.call("[cause]: "+O(t.cause),re),", ")+" }":0===re.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(re,", ")+" }"}if("object"===typeof t&&s){if(B&&"function"===typeof t[B])return t[B]();if("symbol"!==s&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!==typeof e)return!1;try{i.call(e);try{l.call(e)}catch(J){return!0}return e instanceof Map}catch(t){}return!1}(t)){var oe=[];return a.call(t,(function(e,n){oe.push(O(n,t,!0)+" => "+O(e,t))})),X("Map",i.call(t),oe,E)}if(function(e){if(!l||!e||"object"!==typeof e)return!1;try{l.call(e);try{i.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ie=[];return c.call(t,(function(e){ie.push(O(e,t))})),X("Set",l.call(t),ie,E)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(J){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return q("WeakMap");if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(J){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return q("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return q("WeakRef");if(function(e){return"[object Number]"===$(e)&&(!P||!("object"===typeof e&&P in e))}(t))return U(O(Number(t)));if(function(e){if(!e||"object"!==typeof e||!_)return!1;try{return _.call(e),!0}catch(t){}return!1}(t))return U(O(_.call(t)));if(function(e){return"[object Boolean]"===$(e)&&(!P||!("object"===typeof e&&P in e))}(t))return U(h.call(t));if(function(e){return"[object String]"===$(e)&&(!P||!("object"===typeof e&&P in e))}(t))return U(O(String(t)));if(!function(e){return"[object Date]"===$(e)&&(!P||!("object"===typeof e&&P in e))}(t)&&!function(e){return"[object RegExp]"===$(e)&&(!P||!("object"===typeof e&&P in e))}(t)){var ae=K(t,O),ue=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",le=!ue&&P&&Object(t)===t&&P in t?y.call($(t),8,-1):se?"Object":"",ce=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||se?"["+S.call(k.call([],le||[],se||[]),": ")+"] ":"");return 0===ae.length?ce+"{}":E?ce+"{"+G(ae,E)+"}":ce+"{ "+S.call(ae,", ")+" }"}return String(t)};var j=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return j.call(e,t)}function $(e){return m.call(e)}function H(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Y(y.call(e,0,t.maxStringLength),t)+r}return I(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,V),"single",t)}function V(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+x.call(t.toString(16))}function U(e){return"Object("+e+")"}function q(e){return e+" { ? }"}function X(e,t,n,r){return e+" ("+t+") {"+(r?G(n,r):S.call(n,", "))+"}"}function G(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function K(e,t){var n=L(e),r=[];if(n){r.length=e.length;for(var o=0;o=n.__.length&&n.__.push({}),n.__[e]}function m(e){return u=1,v(P,e)}function v(e,t,n){var i=h(r++,2);return i.t=e,i.__c||(i.__=[n?n(t):P(void 0,t),function(e){var t=i.t(i.__[0],e);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function g(e,t){var n=h(r++,3);!a.YM.__s&&M(n.__H,t)&&(n.__=e,n.__H=t,o.__H.__h.push(n))}function y(e,t){var n=h(r++,4);!a.YM.__s&&M(n.__H,t)&&(n.__=e,n.__H=t,o.__h.push(n))}function b(e){return u=5,w((function(){return{current:e}}),[])}function x(e,t,n){u=6,y((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function w(e,t){var n=h(r++,7);return M(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Z(e,t){return u=8,w((function(){return e}),t)}function k(e){var t=o.context[e.__c],n=h(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function S(e,t){a.YM.useDebugValue&&a.YM.useDebugValue(t?t(e):e)}function D(e){var t=h(r++,10),n=m();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function C(){for(var e;e=s.shift();)if(e.__P)try{e.__H.__h.forEach(E),e.__H.__h.forEach(A),e.__H.__h=[]}catch(o){e.__H.__h=[],a.YM.__e(o,e.__v)}}a.YM.__b=function(e){o=null,l&&l(e)},a.YM.__r=function(e){c&&c(e),r=0;var t=(o=e.__c).__H;t&&(t.__h.forEach(E),t.__h.forEach(A),t.__h=[])},a.YM.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==s.push(t)&&i===a.YM.requestAnimationFrame||((i=a.YM.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);_&&(t=requestAnimationFrame(n))})(C)),o=null},a.YM.__c=function(e,t){t.some((function(e){try{e.__h.forEach(E),e.__h=e.__h.filter((function(e){return!e.__||A(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],a.YM.__e(i,e.__v)}})),f&&f(e,t)},a.YM.unmount=function(e){p&&p(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{E(e)}catch(e){t=e}})),t&&a.YM.__e(t,n.__v))};var _="function"==typeof requestAnimationFrame;function E(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function A(e){var t=o;e.__c=e.__(),o=t}function M(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function P(e,t){return"function"==typeof t?t(e):t}function R(e,t){for(var n in t)e[n]=t[n];return e}function T(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function F(e){this.props=e}function O(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:T(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,a.az)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(F.prototype=new a.wA).isPureReactComponent=!0,F.prototype.shouldComponentUpdate=function(e,t){return T(this.props,e)||T(this.state,t)};var B=a.YM.__b;a.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),B&&B(e)};var I="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function N(e){function t(t){var n=R({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=I,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var L=function(e,t){return null==e?null:(0,a.bR)((0,a.bR)(e).map(t))},z={map:L,forEach:L,count:function(e){return e?(0,a.bR)(e).length:0},only:function(e){var t=(0,a.bR)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:a.bR},j=a.YM.__e;a.YM.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);j(e,t,n,r)};var W=a.YM.unmount;function $(){this.__u=0,this.t=null,this.__b=null}function H(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Y(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,a.az)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null}a.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),W&&W(e)},($.prototype=new a.wA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=H(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},s=!0===t.__h;r.__u++||s||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},$.prototype.componentWillUnmount=function(){this.t=[]},$.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=R({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&(0,a.az)(a.HY,null,e.fallback);return o&&(o.__h=null),[(0,a.az)(a.HY,null,t.__e?null:e.children),o]};var U=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,a.sY)((0,a.az)(q,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function G(e,t){return(0,a.az)(X,{__v:e,i:t})}(V.prototype=new a.wA).__e=function(e){var t=this,n=H(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),U(t,e,r)):o()};n?n(i):i()}},V.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,a.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){U(e,n,t)}))};var K="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Q=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J="undefined"!=typeof document,ee=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function te(e,t,n){return null==t.__k&&(t.textContent=""),(0,a.sY)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ne(e,t,n){return(0,a.ZB)(e,t),"function"==typeof n&&n(),e?e.__c:null}a.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(a.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var re=a.YM.event;function oe(){}function ie(){return this.cancelBubble}function ae(){return this.defaultPrevented}a.YM.event=function(e){return re&&(e=re(e)),e.persist=oe,e.isPropagationStopped=ie,e.isDefaultPrevented=ae,e.nativeEvent=e};var ue,se={configurable:!0,get:function(){return this.class}},le=a.YM.vnode;a.YM.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in r={},n){var u=n[i];J&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in n&&null==u||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===u?u="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!ee(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Q.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===u&&(u=void 0),r[i]=u)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,a.bR)(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=(0,a.bR)(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(se.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",se))}e.$$typeof=K,le&&le(e)};var ce=a.YM.__r;a.YM.__r=function(e){ce&&ce(e),ue=e.__c};var de={ReactCurrentDispatcher:{current:{readContext:function(e){return ue.__n[e.__c].props.value}}}},fe="17.0.2";function pe(e){return a.az.bind(null,e)}function he(e){return!!e&&e.$$typeof===K}function me(e){return he(e)?a.Tm.apply(null,arguments):e}function ve(e){return!!e.__k&&((0,a.sY)(null,e),!0)}function ge(e){return e&&(e.base||1===e.nodeType&&e)||null}var ye=function(e,t){return e(t)},be=function(e,t){return e(t)},xe=a.HY,we={useState:m,useReducer:v,useEffect:g,useLayoutEffect:y,useRef:b,useImperativeHandle:x,useMemo:w,useCallback:Z,useContext:k,useDebugValue:S,version:"17.0.2",Children:z,render:te,hydrate:ne,unmountComponentAtNode:ve,createPortal:G,createElement:a.az,createContext:a.kr,createFactory:pe,cloneElement:me,createRef:a.Vf,Fragment:a.HY,isValidElement:he,findDOMNode:ge,Component:a.wA,PureComponent:F,memo:O,forwardRef:N,flushSync:be,unstable_batchedUpdates:ye,StrictMode:a.HY,Suspense:$,SuspenseList:V,lazy:Y,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:de}},7742:function(e,t,n){n(4206),e.exports=n(7226)},3856:function(e,t,n){"use strict";n.d(t,{HY:function(){return y},Tm:function(){return z},Vf:function(){return g},YM:function(){return o},ZB:function(){return L},az:function(){return m},bR:function(){return C},kr:function(){return j},sY:function(){return N},wA:function(){return b}});var r,o,i,a,u,s,l,c={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function h(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,n){var o,i,a,u={};for(a in t)"key"==a?o=t[a]:"ref"==a?i=t[a]:u[a]=t[a];if(arguments.length>2&&(u.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return v(e,u,o,i,null)}function v(e,t,n,r,a){var u={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=o.vnode&&o.vnode(u),u}function g(){return{current:null}}function y(e){return e.children}function b(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?v(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(h=Z[f])||h&&m.key==h.key&&m.type===h.type)Z[f]=void 0;else for(p=0;p2&&(u.children=arguments.length>3?r.call(arguments,2):n),v(e.type,u,o||e.key,i||e.ref,null)}function j(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(Z)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=d.slice,o={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},i=0,b.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},n),this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Z(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Z(this))},b.prototype.render=y,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,k.__r=0,l=0},7226:function(e,t,n){"use strict";n.r(t),n.d(t,{Fragment:function(){return r.HY},jsx:function(){return i},jsxDEV:function(){return i},jsxs:function(){return i}});var r=n(3856),o=0;function i(e,t,n,i,a){var u,s,l={};for(s in t)"ref"==s?u=t[s]:l[s]=t[s];var c={type:e,props:l,key:n,ref:u,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--o,__source:a,__self:i};if("function"==typeof e&&(u=e.defaultProps))for(s in u)void 0===l[s]&&(l[s]=u[s]);return r.YM.vnode&&r.YM.vnode(c),c}},1729:function(e,t,n){"use strict";var r=n(9165);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5192:function(e,t,n){e.exports=n(1729)()},9165:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5609:function(e){"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},4776:function(e,t,n){"use strict";var r=n(2816),o=n(7668),i=n(5609);e.exports={formats:i,parse:o,stringify:r}},7668:function(e,t,n){"use strict";var r=n(9837),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},u=function(e){return e.replace(/(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=u?i.slice(0,u.index):i,c=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var d=0;n.depth>0&&null!==(u=a.exec(i))&&d=0;--i){var a,u=e[i];if("[]"===u&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&u!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=o:"__proto__"!==l&&(a[l]=o):a={0:o}}o=a}return o}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var c="string"===typeof e?function(e,t){var n,l={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=c.split(t.delimiter,d),p=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(v=i(v)?[v]:v),o.call(l,m)?l[m]=r.combine(l[m],v):l[m]=v}return l}(e,n):e,d=n.plainObjects?Object.create(null):{},f=Object.keys(c),p=0;p0?S.join(",")||null:void 0}];else if(s(f))T=f;else{var O=Object.keys(S);T=p?O.sort(p):O}for(var B=0;B0?x+b:""}},9837:function(e,t,n){"use strict";var r=n(5609),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===r.RFC1738&&(40===c||41===c)?s+=u.charAt(l):c<128?s+=a[c]:c<2048?s+=a[192|c>>6]+a[128|63&c]:c<55296||c>=57344?s+=a[224|c>>12]+a[128|c>>6&63]+a[128|63&c]:(l+=1,c=65536+((1023&c)<<10|1023&u.charCodeAt(l)),s+=a[240|c>>18]+a[128|c>>12&63]+a[128|c>>6&63]+a[128|63&c])}return s},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},3170:function(e,t,n){"use strict";var r=n(8476),o=n(4680),i=n(3154),a=r("%TypeError%"),u=r("%WeakMap%",!0),s=r("%Map%",!0),l=o("WeakMap.prototype.get",!0),c=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(u&&r&&("object"===typeof r||"function"===typeof r)){if(e)return l(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(u&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){u&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new u),c(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},4551:function(e,t,n){var r={"./README.md":[8362,1,362],"./perJobUsage":[6865,3],"./perJobUsage.json":[6865,3]};function o(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],o=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(o,16|t[1])}))}o.keys=function(){return Object.keys(r)},o.id=4551,e.exports=o},8355:function(e,t,n){var r={"./perJobUsage.json":6865};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=8355},4654:function(){},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}n.d(t,{Z:function(){return r}})},9439:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(3878);var o=n(181),i=n(5267);function a(e,t){return(0,r.Z)(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(s){u=!0,o=s}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||(0,o.Z)(e,t)||(0,i.Z)()}},3433:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(907);var o=n(9199),i=n(181);function a(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||(0,o.Z)(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);function o(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3138:function(e,t,n){"use strict";n.d(t,{BX:function(){return r.jsxs},HY:function(){return r.Fragment},tZ:function(){return r.jsx}});n(4206);var r=n(7226)},6865:function(e){"use strict";e.exports=JSON.parse('{"title":"per-job resource usage","rows":[{"panels":[{"title":"Per-job CPU usage","width":6,"expr":["sum(rate(process_cpu_seconds_total)) by (job)"]},{"title":"Per-job RSS usage","width":6,"expr":["sum(process_resident_memory_bytes) by (job)"]},{"title":"Per-job disk read","width":6,"expr":["sum(rate(process_io_storage_read_bytes_total)) by (job)"]},{"title":"Per-job disk write","width":6,"expr":["sum(rate(process_io_storage_written_bytes_total)) by (job)"]}]}]}')}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var u=2&o&&r;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(i,a),i}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{27:"939f971b",362:"1a2113d4"}[e]+".chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="vmui:";n.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var u,s;if(void 0!==i)for(var l=document.getElementsByTagName("script"),c=0;c=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var h=(0,t.createContext)(null);var m=(0,t.createContext)(null);var v=(0,t.createContext)({outlet:null,matches:[]});function g(e,t){if(!e)throw new Error(t)}function y(e,t,n){void 0===n&&(n="/");var r=C(("string"===typeof t?p(t):t).pathname||"/",n);if(null==r)return null;var o=b(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var i=null,a=0;null==i&&a0&&(!0===e.index&&g(!1),b(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Z(a,e.index),routesMeta:u})})),t}var x=/^:\w+$/,w=function(e){return"*"===e};function Z(e,t){var n=e.split("/"),r=n.length;return n.some(w)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!w(e)})).reduce((function(e,t){return e+(x.test(t)?3:""===t?1:10)}),r)}function k(e,t){for(var n=e.routesMeta,r={},o="/",i=[],a=0;a=0?t[a]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?p(e):e,r=n.pathname,o=n.search,i=void 0===o?"":o,a=n.hash,u=void 0===a?"":a,s=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:s,search:A(i),hash:M(u)}}(o,r);return i&&"/"!==i&&i.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function C(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}var _=function(e){return e.join("/").replace(/\/\/+/g,"/")},E=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},A=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},M=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};function P(e){R()||g(!1);var n=(0,t.useContext)(h),r=n.basename,o=n.navigator,i=B(e),a=i.hash,u=i.pathname,s=i.search,l=u;if("/"!==r){var c=function(e){return""===e||""===e.pathname?"/":"string"===typeof e?p(e).pathname:e.pathname}(e),d=null!=c&&c.endsWith("/");l="/"===u?r+(d?"/":""):_([r,u])}return o.createHref({pathname:l,search:s,hash:a})}function R(){return null!=(0,t.useContext)(m)}function T(){return R()||g(!1),(0,t.useContext)(m).location}function F(){R()||g(!1);var e=(0,t.useContext)(h),n=e.basename,r=e.navigator,o=(0,t.useContext)(v).matches,i=T().pathname,a=JSON.stringify(o.map((function(e){return e.pathnameBase}))),u=(0,t.useRef)(!1);(0,t.useEffect)((function(){u.current=!0}));var s=(0,t.useCallback)((function(e,t){if(void 0===t&&(t={}),u.current)if("number"!==typeof e){var o=D(e,JSON.parse(a),i);"/"!==n&&(o.pathname=_([n,o.pathname])),(t.replace?r.replace:r.push)(o,t.state)}else r.go(e)}),[n,r,a,i]);return s}var O=(0,t.createContext)(null);function B(e){var n=(0,t.useContext)(v).matches,r=T().pathname,o=JSON.stringify(n.map((function(e){return e.pathnameBase})));return(0,t.useMemo)((function(){return D(e,JSON.parse(o),r)}),[e,o,r])}function I(e,n){return void 0===n&&(n=[]),null==e?null:e.reduceRight((function(r,o,i){return(0,t.createElement)(v.Provider,{children:void 0!==o.route.element?o.route.element:r,value:{outlet:r,matches:n.concat(e.slice(0,i+1))}})}),null)}function N(e){return function(e){var n=(0,t.useContext)(v).outlet;return n?(0,t.createElement)(O.Provider,{value:e},n):n}(e.context)}function L(e){g(!1)}function z(n){var r=n.basename,o=void 0===r?"/":r,i=n.children,a=void 0===i?null:i,u=n.location,s=n.navigationType,l=void 0===s?e.Pop:s,c=n.navigator,d=n.static,f=void 0!==d&&d;R()&&g(!1);var v=E(o),y=(0,t.useMemo)((function(){return{basename:v,navigator:c,static:f}}),[v,c,f]);"string"===typeof u&&(u=p(u));var b=u,x=b.pathname,w=void 0===x?"/":x,Z=b.search,k=void 0===Z?"":Z,S=b.hash,D=void 0===S?"":S,_=b.state,A=void 0===_?null:_,M=b.key,P=void 0===M?"default":M,T=(0,t.useMemo)((function(){var e=C(w,v);return null==e?null:{pathname:e,search:k,hash:D,state:A,key:P}}),[v,w,k,D,A,P]);return null==T?null:(0,t.createElement)(h.Provider,{value:y},(0,t.createElement)(m.Provider,{children:a,value:{location:T,navigationType:l}}))}function j(e){var n=e.children,r=e.location;return function(e,n){R()||g(!1);var r,o=(0,t.useContext)(v).matches,i=o[o.length-1],a=i?i.params:{},u=(i&&i.pathname,i?i.pathnameBase:"/"),s=(i&&i.route,T());if(n){var l,c="string"===typeof n?p(n):n;"/"===u||(null==(l=c.pathname)?void 0:l.startsWith(u))||g(!1),r=c}else r=s;var d=r.pathname||"/",f=y(e,{pathname:"/"===u?d:d.slice(u.length)||"/"});return I(f&&f.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:_([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:_([u,e.pathnameBase])})})),o)}(W(n),r)}function W(e){var n=[];return t.Children.forEach(e,(function(e){if((0,t.isValidElement)(e))if(e.type!==t.Fragment){e.type!==L&&g(!1);var r={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(r.children=W(e.props.children)),n.push(r)}else n.push.apply(n,W(e.props.children))})),n}function $(){return $=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var Y=["onClick","reloadDocument","replace","state","target","to"];function V(e){var n=e.basename,o=e.children,i=e.window,a=(0,t.useRef)();null==a.current&&(a.current=s({window:i}));var u=a.current,l=(0,t.useState)({action:u.action,location:u.location}),c=(0,r.Z)(l,2),d=c[0],f=c[1];return(0,t.useLayoutEffect)((function(){return u.listen(f)}),[u]),(0,t.createElement)(z,{basename:n,children:o,location:d.location,navigationType:d.action,navigator:u})}var U=(0,t.forwardRef)((function(e,n){var r=e.onClick,o=e.reloadDocument,i=e.replace,a=void 0!==i&&i,u=e.state,s=e.target,l=e.to,c=H(e,Y),d=P(l),p=function(e,n){var r=void 0===n?{}:n,o=r.target,i=r.replace,a=r.state,u=F(),s=T(),l=B(e);return(0,t.useCallback)((function(t){if(0===t.button&&(!o||"_self"===o)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)){t.preventDefault();var n=!!i||f(s)===f(l);u(e,{replace:n,state:a})}}),[s,u,l,i,a,o,e])}(l,{replace:a,state:u,target:s});return(0,t.createElement)("a",$({},c,{href:d,onClick:function(e){r&&r(e),e.defaultPrevented||o||p(e)},ref:n,target:s}))}));var q=n(4942),X=n(3366),G=n(3061),K=n(317),Q=n(7551),J=n(8564),ee=n(5469),te=n(1615),ne=n(2131),re=n(655);function oe(e){return(0,ne.Z)("MuiPaper",e)}(0,re.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var ie=n(3138),ae=["className","component","elevation","square","variant"],ue=function(e){return((e<1?5.11916*Math.pow(e,2):4.5*Math.log(e+1)+2)/100).toFixed(2)},se=(0,J.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,o.Z)({backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat(t.palette.divider)},"elevation"===n.variant&&(0,o.Z)({boxShadow:t.shadows[n.elevation]},"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,Q.Fq)("#fff",ue(n.elevation)),", ").concat((0,Q.Fq)("#fff",ue(n.elevation)),")")}))})),le=t.forwardRef((function(e,t){var n=(0,ee.Z)({props:e,name:"MuiPaper"}),r=n.className,i=n.component,a=void 0===i?"div":i,u=n.elevation,s=void 0===u?1:u,l=n.square,c=void 0!==l&&l,d=n.variant,f=void 0===d?"elevation":d,p=(0,X.Z)(n,ae),h=(0,o.Z)({},n,{component:a,elevation:s,square:c,variant:f}),m=function(e){var t=e.square,n=e.elevation,r=e.variant,o=e.classes,i={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,K.Z)(i,oe,o)}(h);return(0,ie.tZ)(se,(0,o.Z)({as:a,ownerState:h,className:(0,G.Z)(m.root,r),ref:t},p))})),ce=le;function de(e){return(0,ne.Z)("MuiAlert",e)}var fe=(0,re.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),pe=n(6983),he=n(3236),me=n(9127),ve=n(3433);function ge(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function be(e,t){return be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},be(e,t)}function xe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,be(e,t)}var we=t.default.createContext(null);function Ze(e,n){var r=Object.create(null);return e&&t.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return n&&(0,t.isValidElement)(e)?n(e):e}(e)})),r}function ke(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Se(e,n,r){var o=Ze(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,a=void 0===i?u||t.pulsate:i,s=t.fakeElement,l=void 0!==s&&s;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var c,d,f,p=l?null:w.current,h=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(a||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(h.width/2),d=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,g=m.clientY;c=Math.round(v-h.left),d=Math.round(g-h.top)}if(a)(f=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(f+=1);else{var k=2*Math.max(Math.abs((p?p.clientWidth:0)-c),c)+2,S=2*Math.max(Math.abs((p?p.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(k,2)+Math.pow(S,2))}e.touches?null===x.current&&(x.current=function(){Z({pulsate:o,rippleX:c,rippleY:d,rippleSize:f,cb:n})},b.current=setTimeout((function(){x.current&&(x.current(),x.current=null)}),80)):Z({pulsate:o,rippleX:c,rippleY:d,rippleSize:f,cb:n})}}),[u,Z]),S=t.useCallback((function(){k({},{pulsate:!0})}),[k]),D=t.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&x.current)return x.current(),x.current=null,void(b.current=setTimeout((function(){D(e,t)})));x.current=null,m((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return t.useImperativeHandle(n,(function(){return{pulsate:S,start:k,stop:D}}),[S,k,D]),(0,ie.tZ)(Qe,(0,o.Z)({className:(0,G.Z)(l.root,Ue.root,c),ref:w},d,{children:(0,ie.tZ)(_e,{component:null,exit:!0,children:h})}))})),tt=et;function nt(e){return(0,ne.Z)("MuiButtonBase",e)}var rt,ot=(0,re.Z)("MuiButtonBase",["root","disabled","focusVisible"]),it=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],at=(0,J.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:function(e,t){return t.root}})((rt={display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"}},(0,q.Z)(rt,"&.".concat(ot.disabled),{pointerEvents:"none",cursor:"default"}),(0,q.Z)(rt,"@media print",{colorAdjust:"exact"}),rt)),ut=t.forwardRef((function(e,n){var i=(0,ee.Z)({props:e,name:"MuiButtonBase"}),a=i.action,u=i.centerRipple,s=void 0!==u&&u,l=i.children,c=i.className,d=i.component,f=void 0===d?"button":d,p=i.disabled,h=void 0!==p&&p,m=i.disableRipple,v=void 0!==m&&m,g=i.disableTouchRipple,y=void 0!==g&&g,b=i.focusRipple,x=void 0!==b&&b,w=i.LinkComponent,Z=void 0===w?"a":w,k=i.onBlur,S=i.onClick,D=i.onContextMenu,C=i.onDragLeave,_=i.onFocus,E=i.onFocusVisible,A=i.onKeyDown,M=i.onKeyUp,P=i.onMouseDown,R=i.onMouseLeave,T=i.onMouseUp,F=i.onTouchEnd,O=i.onTouchMove,B=i.onTouchStart,I=i.tabIndex,N=void 0===I?0:I,L=i.TouchRippleProps,z=i.touchRippleRef,j=i.type,W=(0,X.Z)(i,it),$=t.useRef(null),H=t.useRef(null),Y=(0,pe.Z)(H,z),V=(0,me.Z)(),U=V.isFocusVisibleRef,q=V.onFocus,Q=V.onBlur,J=V.ref,te=t.useState(!1),ne=(0,r.Z)(te,2),re=ne[0],oe=ne[1];h&&re&&oe(!1),t.useImperativeHandle(a,(function(){return{focusVisible:function(){oe(!0),$.current.focus()}}}),[]);var ae=t.useState(!1),ue=(0,r.Z)(ae,2),se=ue[0],le=ue[1];t.useEffect((function(){le(!0)}),[]);var ce=se&&!v&&!h;function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return(0,he.Z)((function(r){return t&&t(r),!n&&H.current&&H.current[e](r),!0}))}t.useEffect((function(){re&&x&&!v&&se&&H.current.pulsate()}),[v,x,re,se]);var fe=de("start",P),ve=de("stop",D),ge=de("stop",C),ye=de("stop",T),be=de("stop",(function(e){re&&e.preventDefault(),R&&R(e)})),xe=de("start",B),we=de("stop",F),Ze=de("stop",O),ke=de("stop",(function(e){Q(e),!1===U.current&&oe(!1),k&&k(e)}),!1),Se=(0,he.Z)((function(e){$.current||($.current=e.currentTarget),q(e),!0===U.current&&(oe(!0),E&&E(e)),_&&_(e)})),De=function(){var e=$.current;return f&&"button"!==f&&!("A"===e.tagName&&e.href)},Ce=t.useRef(!1),_e=(0,he.Z)((function(e){x&&!Ce.current&&re&&H.current&&" "===e.key&&(Ce.current=!0,H.current.stop(e,(function(){H.current.start(e)}))),e.target===e.currentTarget&&De()&&" "===e.key&&e.preventDefault(),A&&A(e),e.target===e.currentTarget&&De()&&"Enter"===e.key&&!h&&(e.preventDefault(),S&&S(e))})),Ee=(0,he.Z)((function(e){x&&" "===e.key&&H.current&&re&&!e.defaultPrevented&&(Ce.current=!1,H.current.stop(e,(function(){H.current.pulsate(e)}))),M&&M(e),S&&e.target===e.currentTarget&&De()&&" "===e.key&&!e.defaultPrevented&&S(e)})),Ae=f;"button"===Ae&&(W.href||W.to)&&(Ae=Z);var Me={};"button"===Ae?(Me.type=void 0===j?"button":j,Me.disabled=h):(W.href||W.to||(Me.role="button"),h&&(Me["aria-disabled"]=h));var Pe=(0,pe.Z)(J,$),Re=(0,pe.Z)(n,Pe);var Te=(0,o.Z)({},i,{centerRipple:s,component:f,disabled:h,disableRipple:v,disableTouchRipple:y,focusRipple:x,tabIndex:N,focusVisible:re}),Fe=function(e){var t=e.disabled,n=e.focusVisible,r=e.focusVisibleClassName,o=e.classes,i={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,K.Z)(i,nt,o);return n&&r&&(a.root+=" ".concat(r)),a}(Te);return(0,ie.BX)(at,(0,o.Z)({as:Ae,className:(0,G.Z)(Fe.root,c),ownerState:Te,onBlur:ke,onClick:S,onContextMenu:ve,onFocus:Se,onKeyDown:_e,onKeyUp:Ee,onMouseDown:fe,onMouseLeave:be,onMouseUp:ye,onDragLeave:ge,onTouchEnd:we,onTouchMove:Ze,onTouchStart:xe,ref:Re,tabIndex:h?-1:N,type:j},Me,W,{children:[l,ce?(0,ie.tZ)(tt,(0,o.Z)({ref:Y,center:s},L)):null]}))})),st=ut;function lt(e){return(0,ne.Z)("MuiIconButton",e)}var ct,dt=(0,re.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),ft=["edge","children","className","color","disabled","disableFocusRipple","size"],pt=(0,J.ZP)(st,{name:"MuiIconButton",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,"default"!==n.color&&t["color".concat((0,te.Z)(n.color))],n.edge&&t["edge".concat((0,te.Z)(n.edge))],t["size".concat((0,te.Z)(n.size))]]}})((function(e){var t=e.theme,n=e.ownerState;return(0,o.Z)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:(0,Q.Fq)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(function(e){var t=e.theme,n=e.ownerState;return(0,o.Z)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,o.Z)({color:t.palette[n.color].main},!n.disableRipple&&{"&:hover":{backgroundColor:(0,Q.Fq)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},(0,q.Z)({},"&.".concat(dt.disabled),{backgroundColor:"transparent",color:t.palette.action.disabled}))})),ht=t.forwardRef((function(e,t){var n=(0,ee.Z)({props:e,name:"MuiIconButton"}),r=n.edge,i=void 0!==r&&r,a=n.children,u=n.className,s=n.color,l=void 0===s?"default":s,c=n.disabled,d=void 0!==c&&c,f=n.disableFocusRipple,p=void 0!==f&&f,h=n.size,m=void 0===h?"medium":h,v=(0,X.Z)(n,ft),g=(0,o.Z)({},n,{edge:i,color:l,disabled:d,disableFocusRipple:p,size:m}),y=function(e){var t=e.classes,n=e.disabled,r=e.color,o=e.edge,i=e.size,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,te.Z)(r)),o&&"edge".concat((0,te.Z)(o)),"size".concat((0,te.Z)(i))]};return(0,K.Z)(a,lt,t)}(g);return(0,ie.tZ)(pt,(0,o.Z)({className:(0,G.Z)(y.root,u),centerRipple:!0,focusRipple:!p,disabled:d,ref:t,ownerState:g},v,{children:a}))})),mt=ht,vt=n(4750),gt=(0,vt.Z)((0,ie.tZ)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),yt=(0,vt.Z)((0,ie.tZ)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),bt=(0,vt.Z)((0,ie.tZ)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),xt=(0,vt.Z)((0,ie.tZ)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),wt=(0,vt.Z)((0,ie.tZ)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Zt=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],kt=(0,J.ZP)(ce,{name:"MuiAlert",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,te.Z)(n.color||n.severity))]]}})((function(e){var t=e.theme,n=e.ownerState,r="light"===t.palette.mode?Q._j:Q.$n,i="light"===t.palette.mode?Q.$n:Q._j,a=n.color||n.severity;return(0,o.Z)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},a&&"standard"===n.variant&&(0,q.Z)({color:r(t.palette[a].light,.6),backgroundColor:i(t.palette[a].light,.9)},"& .".concat(fe.icon),{color:"dark"===t.palette.mode?t.palette[a].main:t.palette[a].light}),a&&"outlined"===n.variant&&(0,q.Z)({color:r(t.palette[a].light,.6),border:"1px solid ".concat(t.palette[a].light)},"& .".concat(fe.icon),{color:"dark"===t.palette.mode?t.palette[a].main:t.palette[a].light}),a&&"filled"===n.variant&&{color:"#fff",fontWeight:t.typography.fontWeightMedium,backgroundColor:"dark"===t.palette.mode?t.palette[a].dark:t.palette[a].main})})),St=(0,J.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:function(e,t){return t.icon}})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Dt=(0,J.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0"}),Ct=(0,J.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),_t={success:(0,ie.tZ)(gt,{fontSize:"inherit"}),warning:(0,ie.tZ)(yt,{fontSize:"inherit"}),error:(0,ie.tZ)(bt,{fontSize:"inherit"}),info:(0,ie.tZ)(xt,{fontSize:"inherit"})},Et=t.forwardRef((function(e,t){var n=(0,ee.Z)({props:e,name:"MuiAlert"}),r=n.action,i=n.children,a=n.className,u=n.closeText,s=void 0===u?"Close":u,l=n.color,c=n.icon,d=n.iconMapping,f=void 0===d?_t:d,p=n.onClose,h=n.role,m=void 0===h?"alert":h,v=n.severity,g=void 0===v?"success":v,y=n.variant,b=void 0===y?"standard":y,x=(0,X.Z)(n,Zt),w=(0,o.Z)({},n,{color:l,severity:g,variant:b}),Z=function(e){var t=e.variant,n=e.color,r=e.severity,o=e.classes,i={root:["root","".concat(t).concat((0,te.Z)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,K.Z)(i,de,o)}(w);return(0,ie.BX)(kt,(0,o.Z)({role:m,elevation:0,ownerState:w,className:(0,G.Z)(Z.root,a),ref:t},x,{children:[!1!==c?(0,ie.tZ)(St,{ownerState:w,className:Z.icon,children:c||f[g]||_t[g]}):null,(0,ie.tZ)(Dt,{ownerState:w,className:Z.message,children:i}),null!=r?(0,ie.tZ)(Ct,{className:Z.action,children:r}):null,null==r&&p?(0,ie.tZ)(Ct,{ownerState:w,className:Z.action,children:(0,ie.tZ)(mt,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,children:ct||(ct=(0,ie.tZ)(wt,{fontSize:"small"}))})}):null]}))})),At=Et,Mt=n(7472),Pt=n(2780),Rt=n(9081);function Tt(e){return e.substring(2).toLowerCase()}var Ft=function(e){var n=e.children,r=e.disableReactTree,o=void 0!==r&&r,i=e.mouseEvent,a=void 0===i?"onClick":i,u=e.onClickAway,s=e.touchEvent,l=void 0===s?"onTouchEnd":s,c=t.useRef(!1),d=t.useRef(null),f=t.useRef(!1),p=t.useRef(!1);t.useEffect((function(){return setTimeout((function(){f.current=!0}),0),function(){f.current=!1}}),[]);var h=(0,Mt.Z)(n.ref,d),m=(0,Pt.Z)((function(e){var t=p.current;p.current=!1;var n=(0,Rt.Z)(d.current);!f.current||!d.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth-1:!n.documentElement.contains(e.target)||d.current.contains(e.target))||!o&&t||u(e))})),v=function(e){return function(t){p.current=!0;var r=n.props[e];r&&r(t)}},g={ref:h};return!1!==l&&(g[l]=v(l)),t.useEffect((function(){if(!1!==l){var e=Tt(l),t=(0,Rt.Z)(d.current),n=function(){c.current=!0};return t.addEventListener(e,m),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,m),t.removeEventListener("touchmove",n)}}}),[m,l]),!1!==a&&(g[a]=v(a)),t.useEffect((function(){if(!1!==a){var e=Tt(a),t=(0,Rt.Z)(d.current);return t.addEventListener(e,m),function(){t.removeEventListener(e,m)}}}),[m,a]),(0,ie.tZ)(t.Fragment,{children:t.cloneElement(n,g)})},Ot=n(6728),Bt=n(2248);function It(){return(0,Ot.Z)(Bt.Z)}var Nt=!1,Lt="unmounted",zt="exited",jt="entering",Wt="entered",$t="exiting",Ht=function(e){function n(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=zt,r.appearStatus=jt):o=Wt:o=t.unmountOnExit||t.mountOnEnter?Lt:zt,r.state={status:o},r.nextCallback=null,r}xe(n,e),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Lt?{status:zt}:null};var r=n.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==jt&&n!==Wt&&(t=jt):n!==jt&&n!==Wt||(t=$t)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},r.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===jt?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===zt&&this.setState({status:Lt})},r.performEnter=function(e){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:e,i=this.props.nodeRef?[o]:[t.default.findDOMNode(this),o],a=i[0],u=i[1],s=this.getTimeouts(),l=o?s.appear:s.enter;!e&&!r||Nt?this.safeSetState({status:Wt},(function(){n.props.onEntered(a)})):(this.props.onEnter(a,u),this.safeSetState({status:jt},(function(){n.props.onEntering(a,u),n.onTransitionEnd(l,(function(){n.safeSetState({status:Wt},(function(){n.props.onEntered(a,u)}))}))})))},r.performExit=function(){var e=this,n=this.props.exit,r=this.getTimeouts(),o=this.props.nodeRef?void 0:t.default.findDOMNode(this);n&&!Nt?(this.props.onExit(o),this.safeSetState({status:$t},(function(){e.props.onExiting(o),e.onTransitionEnd(r.exit,(function(){e.safeSetState({status:zt},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:zt},(function(){e.props.onExited(o)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},r.onTransitionEnd=function(e,n){this.setNextCallback(n);var r=this.props.nodeRef?this.props.nodeRef.current:t.default.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(r&&!o){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=i[0],u=i[1];this.props.addEndListener(a,u)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===Lt)return null;var n=this.props,r=n.children,o=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,(0,X.Z)(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return t.default.createElement(we.Provider,{value:null},"function"===typeof r?r(e,o):t.default.cloneElement(t.default.Children.only(r),o))},n}(t.default.Component);function Yt(){}Ht.contextType=we,Ht.propTypes={},Ht.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yt,onEntering:Yt,onEntered:Yt,onExit:Yt,onExiting:Yt,onExited:Yt},Ht.UNMOUNTED=Lt,Ht.EXITED=zt,Ht.ENTERING=jt,Ht.ENTERED=Wt,Ht.EXITING=$t;var Vt=Ht,Ut=function(e){return e.scrollTop};function qt(e,t){var n,r,o=e.timeout,i=e.easing,a=e.style,u=void 0===a?{}:a;return{duration:null!=(n=u.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=u.transitionTimingFunction)?r:"object"===typeof i?i[t.mode]:i,delay:u.transitionDelay}}var Xt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Gt(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Kt={entering:{opacity:1,transform:Gt(1)},entered:{opacity:1,transform:"none"}},Qt="undefined"!==typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&/version\/15\.[4-9]/i.test(navigator.userAgent),Jt=t.forwardRef((function(e,n){var r=e.addEndListener,i=e.appear,a=void 0===i||i,u=e.children,s=e.easing,l=e.in,c=e.onEnter,d=e.onEntered,f=e.onEntering,p=e.onExit,h=e.onExited,m=e.onExiting,v=e.style,g=e.timeout,y=void 0===g?"auto":g,b=e.TransitionComponent,x=void 0===b?Vt:b,w=(0,X.Z)(e,Xt),Z=t.useRef(),k=t.useRef(),S=It(),D=t.useRef(null),C=(0,pe.Z)(u.ref,n),_=(0,pe.Z)(D,C),E=function(e){return function(t){if(e){var n=D.current;void 0===t?e(n):e(n,t)}}},A=E(f),M=E((function(e,t){Ut(e);var n,r=qt({style:v,timeout:y,easing:s},{mode:"enter"}),o=r.duration,i=r.delay,a=r.easing;"auto"===y?(n=S.transitions.getAutoHeightDuration(e.clientHeight),k.current=n):n=o,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:i}),S.transitions.create("transform",{duration:Qt?n:.666*n,delay:i,easing:a})].join(","),c&&c(e,t)})),P=E(d),R=E(m),T=E((function(e){var t,n=qt({style:v,timeout:y,easing:s},{mode:"exit"}),r=n.duration,o=n.delay,i=n.easing;"auto"===y?(t=S.transitions.getAutoHeightDuration(e.clientHeight),k.current=t):t=r,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:o}),S.transitions.create("transform",{duration:Qt?t:.666*t,delay:Qt?o:o||.333*t,easing:i})].join(","),e.style.opacity=0,e.style.transform=Gt(.75),p&&p(e)})),F=E(h);return t.useEffect((function(){return function(){clearTimeout(Z.current)}}),[]),(0,ie.tZ)(x,(0,o.Z)({appear:a,in:l,nodeRef:D,onEnter:M,onEntered:P,onEntering:A,onExit:T,onExited:F,onExiting:R,addEndListener:function(e){"auto"===y&&(Z.current=setTimeout(e,k.current||0)),r&&r(D.current,e)},timeout:"auto"===y?null:y},w,{children:function(e,n){return t.cloneElement(u,(0,o.Z)({style:(0,o.Z)({opacity:0,transform:Gt(.75),visibility:"exited"!==e||l?void 0:"hidden"},Kt[e],v,u.props.style),ref:_},n))}}))}));Jt.muiSupportAuto=!0;var en=Jt;function tn(e){return(0,ne.Z)("MuiSnackbarContent",e)}(0,re.Z)("MuiSnackbarContent",["root","message","action"]);var nn=["action","className","message","role"],rn=(0,J.ZP)(ce,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme,n="light"===t.palette.mode?.8:.98,r=(0,Q._4)(t.palette.background.default,n);return(0,o.Z)({},t.typography.body2,(0,q.Z)({color:t.palette.getContrastText(r),backgroundColor:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:t.shape.borderRadius,flexGrow:1},t.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}))})),on=(0,J.ZP)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:function(e,t){return t.message}})({padding:"8px 0"}),an=(0,J.ZP)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:function(e,t){return t.action}})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),un=t.forwardRef((function(e,t){var n=(0,ee.Z)({props:e,name:"MuiSnackbarContent"}),r=n.action,i=n.className,a=n.message,u=n.role,s=void 0===u?"alert":u,l=(0,X.Z)(n,nn),c=n,d=function(e){var t=e.classes;return(0,K.Z)({root:["root"],action:["action"],message:["message"]},tn,t)}(c);return(0,ie.BX)(rn,(0,o.Z)({role:s,square:!0,elevation:6,className:(0,G.Z)(d.root,i),ownerState:c,ref:t},l,{children:[(0,ie.tZ)(on,{className:d.message,ownerState:c,children:a}),r?(0,ie.tZ)(an,{className:d.action,ownerState:c,children:r}):null]}))})),sn=un;function ln(e){return(0,ne.Z)("MuiSnackbar",e)}(0,re.Z)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);var cn=["onEnter","onExited"],dn=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],fn=(0,J.ZP)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,t["anchorOrigin".concat((0,te.Z)(n.anchorOrigin.vertical)).concat((0,te.Z)(n.anchorOrigin.horizontal))]]}})((function(e){var t=e.theme,n=e.ownerState,r=(0,o.Z)({},!n.isRtl&&{left:"50%",right:"auto",transform:"translateX(-50%)"},n.isRtl&&{right:"50%",left:"auto",transform:"translateX(50%)"});return(0,o.Z)({zIndex:t.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},(0,q.Z)({},t.breakpoints.up("sm"),(0,o.Z)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&r,"left"===n.anchorOrigin.horizontal&&(0,o.Z)({},!n.isRtl&&{left:24,right:"auto"},n.isRtl&&{right:24,left:"auto"}),"right"===n.anchorOrigin.horizontal&&(0,o.Z)({},!n.isRtl&&{right:24,left:"auto"},n.isRtl&&{left:24,right:"auto"}))))})),pn=t.forwardRef((function(e,n){var i=(0,ee.Z)({props:e,name:"MuiSnackbar"}),a=It(),u={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},s=i.action,l=i.anchorOrigin,c=(l=void 0===l?{vertical:"bottom",horizontal:"left"}:l).vertical,d=l.horizontal,f=i.autoHideDuration,p=void 0===f?null:f,h=i.children,m=i.className,v=i.ClickAwayListenerProps,g=i.ContentProps,y=i.disableWindowBlurListener,b=void 0!==y&&y,x=i.message,w=i.onBlur,Z=i.onClose,k=i.onFocus,S=i.onMouseEnter,D=i.onMouseLeave,C=i.open,_=i.resumeHideDuration,E=i.TransitionComponent,A=void 0===E?en:E,M=i.transitionDuration,P=void 0===M?u:M,R=i.TransitionProps,T=(R=void 0===R?{}:R).onEnter,F=R.onExited,O=(0,X.Z)(i.TransitionProps,cn),B=(0,X.Z)(i,dn),I="rtl"===a.direction,N=(0,o.Z)({},i,{anchorOrigin:{vertical:c,horizontal:d},isRtl:I}),L=function(e){var t=e.classes,n=e.anchorOrigin,r={root:["root","anchorOrigin".concat((0,te.Z)(n.vertical)).concat((0,te.Z)(n.horizontal))]};return(0,K.Z)(r,ln,t)}(N),z=t.useRef(),j=t.useState(!0),W=(0,r.Z)(j,2),$=W[0],H=W[1],Y=(0,he.Z)((function(){Z&&Z.apply(void 0,arguments)})),V=(0,he.Z)((function(e){Z&&null!=e&&(clearTimeout(z.current),z.current=setTimeout((function(){Y(null,"timeout")}),e))}));t.useEffect((function(){return C&&V(p),function(){clearTimeout(z.current)}}),[C,p,V]);var U=function(){clearTimeout(z.current)},q=t.useCallback((function(){null!=p&&V(null!=_?_:.5*p)}),[p,_,V]);return t.useEffect((function(){if(!b&&C)return window.addEventListener("focus",q),window.addEventListener("blur",U),function(){window.removeEventListener("focus",q),window.removeEventListener("blur",U)}}),[b,q,C]),t.useEffect((function(){if(C)return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||Z&&Z(e,"escapeKeyDown")}}),[$,C,Z]),!C&&$?null:(0,ie.tZ)(Ft,(0,o.Z)({onClickAway:function(e){Z&&Z(e,"clickaway")}},v,{children:(0,ie.tZ)(fn,(0,o.Z)({className:(0,G.Z)(L.root,m),onBlur:function(e){w&&w(e),q()},onFocus:function(e){k&&k(e),U()},onMouseEnter:function(e){S&&S(e),U()},onMouseLeave:function(e){D&&D(e),q()},ownerState:N,ref:n,role:"presentation"},B,{children:(0,ie.tZ)(A,(0,o.Z)({appear:!0,in:C,timeout:P,direction:"top"===c?"down":"up",onEnter:function(e,t){H(!1),T&&T(e,t)},onExited:function(e){H(!0),F&&F(e)}},O,{children:h||(0,ie.tZ)(sn,(0,o.Z)({message:x,action:s},g))}))}))}))})),hn=pn,mn=(0,t.createContext)({showInfoMessage:function(){}}),vn=function(e){var n=e.children,o=(0,t.useState)({}),i=(0,r.Z)(o,2),a=i[0],u=i[1],s=(0,t.useState)(!1),l=(0,r.Z)(s,2),c=l[0],d=l[1],f=(0,t.useState)(void 0),p=(0,r.Z)(f,2),h=p[0],m=p[1];(0,t.useEffect)((function(){h&&(u({message:h,key:(new Date).getTime()}),d(!0))}),[h]);return(0,ie.BX)(mn.Provider,{value:{showInfoMessage:m},children:[(0,ie.tZ)(hn,{open:c,autoHideDuration:4e3,onClose:function(e,t){"clickaway"!==t&&(m(void 0),d(!1))},children:(0,ie.tZ)(At,{children:a.message})},a.key),n]})};function gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=$n().parse(n,{ignoreQueryPrefix:!0});return Yn()(r,e,t||"")},Xn=qn("g0.range_input","1h"),Gn=(Dn=qn("g0.end_input",new Date(xn()().utc().format(An))),xn()(Dn).utcOffset(0,!0).local().format(An)),Kn=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t).fill(1).map((function(e,t){return qn("g".concat(t,".expr"),"")}))}(),Qn={serverUrl:window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus/"),displayType:qn("g0.tab","chart"),query:Kn,queryHistory:Kn.map((function(e){return{index:0,values:[e]}})),time:{duration:Xn,period:Tn(Xn,new Date(Gn))},queryControls:{autoRefresh:!1,autocomplete:Ln("AUTOCOMPLETE")||!1,nocache:Ln("NO_CACHE")||!1}};function Jn(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return yn(yn({},e),{},{displayType:t.payload});case"SET_SERVER":return yn(yn({},e),{},{serverUrl:t.payload});case"SET_QUERY":return yn(yn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return yn(yn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),yn(yn({},e),{},{queryHistory:e.queryHistory});case"SET_DURATION":return yn(yn({},e),{},{time:yn(yn({},e.time),{},{duration:t.payload,period:Tn(t.payload,In(e.time.period.end))})});case"SET_UNTIL":return yn(yn({},e),{},{time:yn(yn({},e.time),{},{period:Tn(e.time.duration,t.payload)})});case"SET_FROM":var n=Bn(1e3*e.time.period.end-t.payload.valueOf());return yn(yn({},e),{},{queryControls:yn(yn({},e.queryControls),{},{autoRefresh:!1}),time:yn(yn({},e.time),{},{duration:n,period:Tn(n,xn()(1e3*e.time.period.end).toDate())})});case"SET_PERIOD":var r=function(e){var t=e.to.valueOf()-e.from.valueOf();return Bn(t)}(t.payload);return yn(yn({},e),{},{queryControls:yn(yn({},e.queryControls),{},{autoRefresh:!1}),time:yn(yn({},e.time),{},{duration:r,period:Tn(r,t.payload.to)})});case"TOGGLE_AUTOREFRESH":return yn(yn({},e),{},{queryControls:yn(yn({},e.queryControls),{},{autoRefresh:!e.queryControls.autoRefresh})});case"TOGGLE_AUTOCOMPLETE":return yn(yn({},e),{},{queryControls:yn(yn({},e.queryControls),{},{autocomplete:!e.queryControls.autocomplete})});case"NO_CACHE":return yn(yn({},e),{},{queryControls:yn(yn({},e.queryControls),{},{nocache:!e.queryControls.nocache})});case"RUN_QUERY":return yn(yn({},e),{},{time:yn(yn({},e.time),{},{period:Tn(e.time.duration,In(e.time.period.end))})});case"RUN_QUERY_TO_NOW":return yn(yn({},e),{},{time:yn(yn({},e.time),{},{period:Tn(e.time.duration)})});default:throw new Error}}var er=(0,t.createContext)({}),tr=function(){return(0,t.useContext)(er).state},nr=function(){return(0,t.useContext)(er).dispatch},rr=Object.entries(Qn).reduce((function(e,t){var n=(0,r.Z)(t,2),o=n[0],i=n[1];return yn(yn({},e),{},(0,q.Z)({},o,qn(o)||i))}),{}),or=function(e){var n=e.children,o=(0,t.useReducer)(Jn,rr),i=(0,r.Z)(o,2),a=i[0],u=i[1];(0,t.useEffect)((function(){!function(e){var t=new Map(Object.entries(Vn)),n=Yn()(e,"query",""),r=[];n.forEach((function(n,o){t.forEach((function(t,n){var i=Yn()(e,n,"");if(i){var a=encodeURIComponent(i);r.push("g".concat(o,".").concat(t,"=").concat(a))}})),r.push("g".concat(o,".expr=").concat(encodeURIComponent(n)))})),Un(r.join("&"))}(a)}),[a]);var s=(0,t.useMemo)((function(){return{state:a,dispatch:u}}),[a,u]);return(0,ie.tZ)(er.Provider,{value:s,children:n})},ir={authMethod:"NO_AUTH",saveAuthLocally:!1},ar=Ln("AUTH_TYPE"),ur=Ln("BASIC_AUTH_DATA"),sr=Ln("BEARER_AUTH_DATA"),lr=yn(yn({},ir),{},{authMethod:ar||ir.authMethod,basicData:ur,bearerData:sr,saveAuthLocally:!(!ur&&!sr)}),cr=function(){zn(jn)};function dr(e,t){switch(t.type){case"SET_BASIC_AUTH":return t.payload.checkbox?Nn("BASIC_AUTH_DATA",t.payload.value):cr(),Nn("AUTH_TYPE","BASIC_AUTH"),yn(yn({},e),{},{authMethod:"BASIC_AUTH",basicData:t.payload.value});case"SET_BEARER_AUTH":return t.payload.checkbox?Nn("BEARER_AUTH_DATA",t.payload.value):cr(),Nn("AUTH_TYPE","BEARER_AUTH"),yn(yn({},e),{},{authMethod:"BEARER_AUTH",bearerData:t.payload.value});case"SET_NO_AUTH":return!t.payload.checkbox&&cr(),Nn("AUTH_TYPE","NO_AUTH"),yn(yn({},e),{},{authMethod:"NO_AUTH"});default:throw new Error}}var fr=(0,t.createContext)({}),pr=function(e){var n=e.children,o=(0,t.useReducer)(dr,lr),i=(0,r.Z)(o,2),a=i[0],u=i[1],s=(0,t.useMemo)((function(){return{state:a,dispatch:u}}),[a,u]);return(0,ie.tZ)(fr.Provider,{value:s,children:n})},hr={customStep:{enable:!1,value:1},yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function mr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return yn(yn({},e),{},{yaxis:yn(yn({},e.yaxis),{},{limits:yn(yn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"TOGGLE_CUSTOM_STEP":return yn(yn({},e),{},{customStep:yn(yn({},e.customStep),{},{enable:!e.customStep.enable})});case"SET_CUSTOM_STEP":return yn(yn({},e),{},{customStep:yn(yn({},e.customStep),{},{value:t.payload})});case"SET_YAXIS_LIMITS":return yn(yn({},e),{},{yaxis:yn(yn({},e.yaxis),{},{limits:yn(yn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var vr=(0,t.createContext)({}),gr=function(){return(0,t.useContext)(vr).state},yr=function(){return(0,t.useContext)(vr).dispatch},br=function(e){var n=e.children,o=(0,t.useReducer)(mr,hr),i=(0,r.Z)(o,2),a=i[0],u=i[1],s=(0,t.useMemo)((function(){return{state:a,dispatch:u}}),[a,u]);return(0,ie.tZ)(vr.Provider,{value:s,children:n})},xr=n(7458),wr=(0,xr.Z)({palette:{primary:{main:"#3F51B5"},secondary:{main:"#F50057"},error:{main:"#FF4141"}},components:{MuiFormHelperText:{styleOverrides:{root:{position:"absolute",top:"36px",left:"2px",margin:0}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"12px",letterSpacing:"normal",lineHeight:"1",zIndex:0}}},MuiInputBase:{styleOverrides:{root:{"&.Mui-focused fieldset":{borderWidth:"1px !important"}}}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiAccordion:{styleOverrides:{root:{boxShadow:"rgba(0, 0, 0, 0.16) 0px 1px 4px"}}},MuiPaper:{styleOverrides:{root:{boxShadow:"rgba(0, 0, 0, 0.2) 0px 3px 8px"}}},MuiButton:{styleOverrides:{contained:{boxShadow:"rgba(17, 17, 26, 0.1) 0px 0px 16px","&:hover":{boxShadow:"rgba(0, 0, 0, 0.1) 0px 4px 12px"}}}},MuiIconButton:{defaultProps:{size:"large"},styleOverrides:{sizeLarge:{borderRadius:"20%",height:"40px",width:"41px"},sizeMedium:{borderRadius:"20%"},sizeSmall:{borderRadius:"20%"}}},MuiTooltip:{styleOverrides:{tooltip:{fontSize:"10px"}}},MuiAlert:{styleOverrides:{root:{fontSize:"14px",boxShadow:"rgba(0, 0, 0, 0.08) 0px 4px 12px"}}}},typography:{fontSize:10}}),Zr=(0,Ee.Z)({key:"css",prepend:!0});function kr(e){var t=e.injectFirst,n=e.children;return t?(0,ie.tZ)(Ae.C,{value:Zr,children:n}):n}var Sr=n(5693),Dr=n(201),Cr="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";var _r=function(e){var n=e.children,r=e.theme,i=(0,Dr.Z)(),a=t.useMemo((function(){var e=null===i?r:function(e,t){return"function"===typeof t?t(e):(0,o.Z)({},e,t)}(i,r);return null!=e&&(e[Cr]=null!==i),e}),[r,i]);return(0,ie.tZ)(Sr.Z.Provider,{value:a,children:n})};function Er(e){var t=(0,Ot.Z)();return(0,ie.tZ)(Ae.T.Provider,{value:"object"===typeof t?t:{},children:e.children})}var Ar=function(e){var t=e.children,n=e.theme;return(0,ie.tZ)(_r,{theme:n,children:(0,ie.tZ)(Er,{children:t})})};function Mr(e){var t=e.styles,n=e.defaultTheme,r=void 0===n?{}:n,o="function"===typeof t?function(e){return t(void 0===(n=e)||null===n||0===Object.keys(n).length?r:e);var n}:t;return(0,ie.tZ)(Oe,{styles:o})}var Pr=function(e){return(0,ie.tZ)(Mr,(0,o.Z)({},e,{defaultTheme:Bt.Z}))},Rr=function(e,t){return(0,o.Z)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&{colorScheme:e.palette.mode})},Tr=function(e){return(0,o.Z)({color:e.palette.text.primary},e.typography.body1,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}})};var Fr=function(e){var n=(0,ee.Z)({props:e,name:"MuiCssBaseline"}),r=n.children,i=n.enableColorScheme,a=void 0!==i&&i;return(0,ie.BX)(t.Fragment,{children:[(0,ie.tZ)(Pr,{styles:function(e){return function(e){var t,n,r={html:Rr(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,o.Z)({margin:0},Tr(e),{"&::backdrop":{backgroundColor:e.palette.background.default}})},i=null==(t=e.components)||null==(n=t.MuiCssBaseline)?void 0:n.styleOverrides;return i&&(r=[r,i]),r}(e,a)}}),r]})},Or=t.createContext(null);var Br=function(e){var n=e.children,r=e.dateAdapter,o=e.dateFormats,i=e.dateLibInstance,a=e.locale,u=t.useMemo((function(){return new r({locale:a,formats:o,instance:i})}),[r,a,o,i]),s=t.useMemo((function(){return{minDate:u.date("1900-01-01T00:00:00.000"),maxDate:u.date("2099-12-31T00:00:00.000")}}),[u]),l=t.useMemo((function(){return{utils:u,defaultDates:s}}),[s,u]);return(0,ie.tZ)(Or.Provider,{value:l,children:n})},Ir=n(7798),Nr=n.n(Ir),Lr=n(3825),zr=n.n(Lr),jr=n(8743),Wr=n.n(jr);xn().extend(Nr()),xn().extend(zr()),xn().extend(Wr());var $r={normalDateWithWeekday:"ddd, MMM D",normalDate:"D MMMM",shortDate:"MMM D",monthAndDate:"MMMM D",dayOfMonth:"D",year:"YYYY",month:"MMMM",monthShort:"MMM",monthAndYear:"MMMM YYYY",weekday:"dddd",weekdayShort:"ddd",minutes:"mm",hours12h:"hh",hours24h:"HH",seconds:"ss",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDate:"ll",fullDateWithWeekday:"dddd, LL",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDate:"L",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Hr=function(e){var t=this,n=void 0===e?{}:e,r=n.locale,o=n.formats,i=n.instance;this.lib="dayjs",this.is12HourCycleInCurrentLocale=function(){var e,n;return/A|a/.test(null===(n=null===(e=t.rawDayJsInstance.Ls[t.locale||"en"])||void 0===e?void 0:e.formats)||void 0===n?void 0:n.LT)},this.getCurrentLocaleCode=function(){return t.locale||"en"},this.getFormatHelperText=function(e){return e.match(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?)|./g).map((function(e){var n,r;return"L"===e[0]&&null!==(r=null===(n=t.rawDayJsInstance.Ls[t.locale||"en"])||void 0===n?void 0:n.formats[e])&&void 0!==r?r:e})).join("").replace(/a/gi,"(a|p)m").toLocaleLowerCase()},this.parseISO=function(e){return t.dayjs(e)},this.toISO=function(e){return e.toISOString()},this.parse=function(e,n){return""===e?null:t.dayjs(e,n,t.locale)},this.date=function(e){return null===e?null:t.dayjs(e)},this.toJsDate=function(e){return e.toDate()},this.isValid=function(e){return t.dayjs(e).isValid()},this.isNull=function(e){return null===e},this.getDiff=function(e,t,n){return e.diff(t,n)},this.isAfter=function(e,t){return e.isAfter(t)},this.isBefore=function(e,t){return e.isBefore(t)},this.isAfterDay=function(e,t){return e.isAfter(t,"day")},this.isBeforeDay=function(e,t){return e.isBefore(t,"day")},this.isBeforeYear=function(e,t){return e.isBefore(t,"year")},this.isAfterYear=function(e,t){return e.isAfter(t,"year")},this.startOfDay=function(e){return e.clone().startOf("day")},this.endOfDay=function(e){return e.clone().endOf("day")},this.format=function(e,n){return t.formatByString(e,t.formats[n])},this.formatByString=function(e,n){return t.dayjs(e).format(n)},this.formatNumber=function(e){return e},this.getHours=function(e){return e.hour()},this.addSeconds=function(e,t){return t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")},this.addMinutes=function(e,t){return t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")},this.addHours=function(e,t){return t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")},this.addDays=function(e,t){return t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")},this.addWeeks=function(e,t){return t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")},this.addMonths=function(e,t){return t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")},this.setMonth=function(e,t){return e.set("month",t)},this.setHours=function(e,t){return e.set("hour",t)},this.getMinutes=function(e){return e.minute()},this.setMinutes=function(e,t){return e.clone().set("minute",t)},this.getSeconds=function(e){return e.second()},this.setSeconds=function(e,t){return e.clone().set("second",t)},this.getMonth=function(e){return e.month()},this.getDaysInMonth=function(e){return e.daysInMonth()},this.isSameDay=function(e,t){return e.isSame(t,"day")},this.isSameMonth=function(e,t){return e.isSame(t,"month")},this.isSameYear=function(e,t){return e.isSame(t,"year")},this.isSameHour=function(e,t){return e.isSame(t,"hour")},this.getMeridiemText=function(e){return"am"===e?"AM":"PM"},this.startOfMonth=function(e){return e.clone().startOf("month")},this.endOfMonth=function(e){return e.clone().endOf("month")},this.startOfWeek=function(e){return e.clone().startOf("week")},this.endOfWeek=function(e){return e.clone().endOf("week")},this.getNextMonth=function(e){return e.clone().add(1,"month")},this.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},this.getMonthArray=function(e){for(var n=[e.clone().startOf("year")];n.length<12;){var r=n[n.length-1];n.push(t.getNextMonth(r))}return n},this.getYear=function(e){return e.year()},this.setYear=function(e,t){return e.clone().set("year",t)},this.mergeDateAndTime=function(e,t){return e.hour(t.hour()).minute(t.minute()).second(t.second())},this.getWeekdays=function(){var e=t.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((function(n){return t.formatByString(e.add(n,"day"),"dd")}))},this.isEqual=function(e,n){return null===e&&null===n||t.dayjs(e).isSame(n)},this.getWeekArray=function(e){for(var n=t.dayjs(e).clone().startOf("month").startOf("week"),r=t.dayjs(e).clone().endOf("month").endOf("week"),o=0,i=n,a=[];i.isBefore(r);){var u=Math.floor(o/7);a[u]=a[u]||[],a[u].push(i),i=i.clone().add(1,"day"),o+=1}return a},this.getYearRange=function(e,n){for(var r=t.dayjs(e).startOf("year"),o=t.dayjs(n).endOf("year"),i=[],a=r;a.isBefore(o);)i.push(a),a=a.clone().add(1,"year");return i},this.isWithinRange=function(e,t){var n=t[0],r=t[1];return e.isBetween(n,r,null,"[]")},this.rawDayJsInstance=i||xn(),this.dayjs=function(e,t){return t?function(){for(var n=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=e.defaultTheme,r=e.defaultClassName,i=void 0===r?"MuiBox-root":r,a=e.generateClassName,u=e.styleFunctionSx,s=void 0===u?qr.Z:u,l=(0,Ur.ZP)("div")(s),c=t.forwardRef((function(e,t){var r=(0,Ot.Z)(n),u=Qr(e),s=u.className,c=u.component,d=void 0===c?"div":c,f=(0,X.Z)(u,Jr);return(0,ie.tZ)(l,(0,o.Z)({as:d,ref:t,className:(0,G.Z)(s,a?a(i):i),theme:r},f))}));return c}({defaultTheme:(0,xr.Z)(),defaultClassName:"MuiBox-root",generateClassName:eo.Z.generate}),no=to,ro=n(181);function oo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,ro.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function io(e,t,n,r){var o;n=n||0;for(var i=(r=r||t.length-1)<=2147483647;r-n>1;)t[o=i?n+r>>1:So((n+r)/2)]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function uo(e,t,n,r){var o=Fo,i=-Fo;if(1==r)o=e[t],i=e[n];else if(-1==r)o=e[n],i=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(o=_o(o,e[a]),i=Eo(i,e[a]));return[o,i]}function so(e,t,n){for(var r=Fo,o=-Fo,i=t;i<=n;i++)e[i]>0&&(r=_o(r,e[i]),o=Eo(o,e[i]));return[r==Fo?1:r,o==-Fo?10:o]}var lo=[0,0];function co(e,t,n,r){return lo[0]=n<0?Vo(e,-n):e,lo[1]=r<0?Vo(t,-r):t,lo}function fo(e,t,n,r){var o,i,a,u=Mo(e),s=10==n?Po:Ro;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(o=So(s(e)),i=Co(s(t)),e=(a=co(Ao(n,o),Ao(n,i),o,i))[0],t=a[1]):(o=So(s(ko(e))),i=So(s(ko(t))),e=Yo(e,(a=co(Ao(n,o),Ao(n,i),o,i))[0]),t=Ho(t,a[1])),[e,t]}function po(e,t,n,r){var o=fo(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}var ho={mode:3,pad:.1},mo={pad:0,soft:null,mode:0},vo={min:mo,max:mo};function go(e,t,n,r){return ti(n)?bo(e,t,n):(mo.pad=n,mo.soft=r?0:null,mo.mode=r?3:0,bo(e,t,vo))}function yo(e,t){return null==e?t:e}function bo(e,t,n){var r=n.min,o=n.max,i=yo(r.pad,0),a=yo(o.pad,0),u=yo(r.hard,-Fo),s=yo(o.hard,Fo),l=yo(r.soft,Fo),c=yo(o.soft,-Fo),d=yo(r.mode,0),f=yo(o.mode,0),p=t-e;p<1e-9&&(p=0,0!=e&&0!=t||(p=1e-9,2==d&&l!=Fo&&(i=0),2==f&&c!=-Fo&&(a=0)));var h=p||ko(t)||1e3,m=Po(h),v=Ao(10,So(m)),g=Vo(Yo(e-h*(0==p?0==e?.1:1:i),v/10),9),y=e>=l&&(1==d||3==d&&g<=l||2==d&&g>=l)?l:Fo,b=Eo(u,g=y?y:_o(y,g)),x=Vo(Ho(t+h*(0==p?0==t?.1:1:a),v/10),9),w=t<=c&&(1==f||3==f&&x>=c||2==f&&x<=c)?c:-Fo,Z=_o(s,x>w&&t<=w?w:Eo(w,x));return b==Z&&0==b&&(Z=100),[b,Z]}var xo=new Intl.NumberFormat(navigator.language).format,wo=Math,Zo=wo.PI,ko=wo.abs,So=wo.floor,Do=wo.round,Co=wo.ceil,_o=wo.min,Eo=wo.max,Ao=wo.pow,Mo=wo.sign,Po=wo.log10,Ro=wo.log2,To=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return wo.asinh(e/t)},Fo=1/0;function Oo(e){return 1+(0|Po((e^e>>31)-(e>>31)))}function Bo(e,t){return Do(e/t)*t}function Io(e,t,n){return _o(Eo(e,t),n)}function No(e){return"function"==typeof e?e:function(){return e}}var Lo=function(e){return e},zo=function(e,t){return t},jo=function(e){return null},Wo=function(e){return!0},$o=function(e,t){return e==t};function Ho(e,t){return Co(e/t)*t}function Yo(e,t){return So(e/t)*t}function Vo(e,t){return Do(e*(t=Math.pow(10,t)))/t}var Uo=new Map;function qo(e){return((""+e).split(".")[1]||"").length}function Xo(e,t,n,r){for(var o=[],i=r.map(qo),a=t;a=0&&a>=0?0:u)+(a>=i[l]?0:i[l]),f=Vo(c,d);o.push(f),Uo.set(f,d)}return o}var Go={},Ko=[],Qo=[null,null],Jo=Array.isArray;function ei(e){return"string"==typeof e}function ti(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function ni(e){return null!=e&&"object"==typeof e}function ri(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ti;if(Jo(e)){var r=e.find((function(e){return null!=e}));if(Jo(r)||n(r)){t=Array(e.length);for(var o=0;oi){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;rr||n>o?Ai(e,Di):Mi(e,Di))}var Bi=new WeakMap;function Ii(e,t,n){var r=t+n;r!=Bi.get(e)&&(Bi.set(e,r),e.style.background=t,e.style.borderColor=n)}var Ni=new WeakMap;function Li(e,t,n,r){var o=t+""+n;o!=Ni.get(e)&&(Ni.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}var zi={passive:!0},ji=oi({capture:!0},zi);function Wi(e,t,n,r){t.addEventListener(e,n,r?ji:zi)}function $i(e,t,n,r){t.removeEventListener(e,n,r?ji:zi)}!function e(){var t=devicePixelRatio;ai!=t&&(ai=t,ui&&$i(ki,ui,e),ui=matchMedia("(min-resolution: ".concat(ai-.001,"dppx) and (max-resolution: ").concat(ai+.001,"dppx)")),Wi(ki,ui,e),Ei.dispatchEvent(new CustomEvent(Si)))}();var Hi=["January","February","March","April","May","June","July","August","September","October","November","December"],Yi=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Vi(e){return e.slice(0,3)}var Ui=Yi.map(Vi),qi=Hi.map(Vi),Xi={MMMM:Hi,MMM:qi,WWWW:Yi,WWW:Ui};function Gi(e){return(e<10?"0":"")+e}var Ki={YYYY:function(e){return e.getFullYear()},YY:function(e){return(e.getFullYear()+"").slice(2)},MMMM:function(e,t){return t.MMMM[e.getMonth()]},MMM:function(e,t){return t.MMM[e.getMonth()]},MM:function(e){return Gi(e.getMonth()+1)},M:function(e){return e.getMonth()+1},DD:function(e){return Gi(e.getDate())},D:function(e){return e.getDate()},WWWW:function(e,t){return t.WWWW[e.getDay()]},WWW:function(e,t){return t.WWW[e.getDay()]},HH:function(e){return Gi(e.getHours())},H:function(e){return e.getHours()},h:function(e){var t=e.getHours();return 0==t?12:t>12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Gi(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Gi(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Qi(e,t){t=t||Xi;for(var n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;n=o.exec(e);)r.push("{"==n[0][0]?Ki[n[1]]:n[0]);return function(e){for(var n="",o=0;o=a,m=d>=i&&d=o?o:d,M=b+(So(l)-So(g))+Ho(g-b,A);p.push(M);for(var P=t(M),R=P.getHours()+P.getMinutes()/n+P.getSeconds()/r,T=d/r,F=f/u.axes[s]._space;!((M=Vo(M+d,1==e?0:3))>c);)if(T>1){var O=So(Vo(R+T,6))%24,B=t(M).getHours()-O;B>1&&(B=-1),R=(R+T)%24,Vo(((M-=B*r)-p[p.length-1])/d,3)*F>=.7&&p.push(M)}else p.push(M)}return p}}]}var ga=va(1),ya=(0,r.Z)(ga,3),ba=ya[0],xa=ya[1],wa=ya[2],Za=va(.001),ka=(0,r.Z)(Za,3),Sa=ka[0],Da=ka[1],Ca=ka[2];function _a(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function Ea(e,t){return function(n,r,o,i,a){var u,s,l,c,d,f,p=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),o=n.getMonth(),i=n.getDate(),a=n.getHours(),h=n.getMinutes(),m=n.getSeconds(),v=r!=u&&p[2]||o!=s&&p[3]||i!=l&&p[4]||a!=c&&p[5]||h!=d&&p[6]||m!=f&&p[7]||p[1];return u=r,s=o,l=i,c=a,d=h,f=m,v(n)}))}}function Aa(e,t,n){return new Date(e,t,n)}function Ma(e,t){return t(e)}Xo(2,-53,53,[1]);function Pa(e,t){return function(n,r){return t(e(r))}}var Ra={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};var Ta=[0,0];function Fa(e,t,n){return function(e){0==e.button&&n(e)}}function Oa(e,t,n){return n}var Ba={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return Ta[0]=t,Ta[1]=n,Ta},points:{show:function(e,t){var n=e.cursor.points,r=Ti(),o=n.size(e,t);Pi(r,li,o),Pi(r,ci,o);var i=o/-2;Pi(r,"marginLeft",i),Pi(r,"marginTop",i);var a=n.width(e,t,o);return a&&Pi(r,"borderWidth",a),r},size:function(e,t){return nu(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:Fa,mouseup:Fa,click:Fa,dblclick:Fa,mousemove:Oa,mouseleave:Oa,mouseenter:Oa},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Ia={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Na=oi({},Ia,{filter:zo}),La=oi({},Na,{size:10}),za=oi({},Ia,{show:!1}),ja='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Wa="bold "+ja,$a={show:!0,scale:"x",stroke:mi,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Wa,side:2,grid:Na,ticks:La,border:za,font:ja,rotate:0},Ha={show:!0,scale:"x",auto:!1,sorted:1,min:Fo,max:-Fo,idxs:[]};function Ya(e,t,n,r,o){return t.map((function(e){return null==e?"":xo(e)}))}function Va(e,t,n,r,o,i,a){for(var u=[],s=Uo.get(o)||0,l=n=a?n:Vo(Ho(n,o),s);l<=r;l=Vo(l+o,s))u.push(Object.is(l,-0)?0:l);return u}function Ua(e,t,n,r,o,i,a){var u=[],s=e.scales[e.axes[t].scale].log,l=So((10==s?Po:Ro)(n));o=Ao(s,l),l<0&&(o=Vo(o,-l));var c=n;do{u.push(c),(c=Vo(c+o,Uo.get(o)))>=o*s&&(o=c)}while(c<=r);return u}function qa(e,t,n,r,o,i,a){var u=e.scales[e.axes[t].scale].asinh,s=r>u?Ua(e,t,Eo(u,n),r,o):[u],l=r>=0&&n<=0?[0]:[];return(n<-u?Ua(e,t,Eo(u,-r),-n,o):[u]).reverse().map((function(e){return-e})).concat(l,s)}var Xa=/./,Ga=/[12357]/,Ka=/[125]/,Qa=/1/;function Ja(e,t,n,r,o){var i=e.axes[n],a=i.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var s=e.valToPos,l=i._space,c=s(10,a),d=s(9,a)-c>=l?Xa:s(7,a)-c>=l?Ga:s(5,a)-c>=l?Ka:Qa;return t.map((function(e){return 4==u.distr&&0==e||d.test(e)?e:null}))}function eu(e,t){return null==t?"":xo(t)}var tu={show:!0,scale:"y",stroke:mi,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Wa,side:3,grid:Na,ticks:La,border:za,font:ja,rotate:0};function nu(e,t){return Vo((3+2*(e||1))*t,3)}var ru={scale:null,auto:!0,sorted:0,min:Fo,max:-Fo},ou={show:!0,auto:!0,sorted:0,alpha:1,facets:[oi({},ru,{scale:"x"}),oi({},ru,{scale:"y"})]},iu={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,o){return o},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,o=n.idxs,i=e._data[0],a=e.valToPos(i[o[0]],r,!0),u=e.valToPos(i[o[1]],r,!0),s=ko(u-a)/(e.series[t].points.space*ai);return o[1]-o[0]<=s},filter:null},values:null,min:Fo,max:-Fo,idxs:[],path:null,clip:null};function au(e,t,n,r,o){return n/10}var uu={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},su=oi({},uu,{time:!1,ori:1}),lu={};function cu(e,t){var n=lu[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,o,i,a,u){for(var s=0;s0){a=new Path2D;for(var u=0==t?ku:Su,s=n,l=0;lc[0]){var d=c[0]-s;d>0&&u(a,s,r,d,r+i),s=c[1]}}var f=n+o-s;f>0&&u(a,s,r,f,r+i)}return a}function vu(e,t,n){var r=e[e.length-1];r&&r[0]==t?r[1]=n:e.push([t,n])}function gu(e){return 0==e?Lo:1==e?Do:function(t){return Bo(t,e)}}function yu(e){var t=0==e?bu:xu,n=0==e?function(e,t,n,r,o,i){e.arcTo(t,n,r,o,i)}:function(e,t,n,r,o,i){e.arcTo(n,t,o,r,i)},r=0==e?function(e,t,n,r,o){e.rect(t,n,r,o)}:function(e,t,n,r,o){e.rect(n,t,o,r)};return function(e,o,i,a,u){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==s?r(e,o,i,a,u):(s=_o(s,a/2,u/2),t(e,o+s,i),n(e,o+a,i,o+a,i+u,s),n(e,o+a,i+u,o,i+u,s),n(e,o,i+u,o,i,s),n(e,o,i,o+a,i,s),e.closePath())}}var bu=function(e,t,n){e.moveTo(t,n)},xu=function(e,t,n){e.moveTo(n,t)},wu=function(e,t,n){e.lineTo(t,n)},Zu=function(e,t,n){e.lineTo(n,t)},ku=yu(0),Su=yu(1),Du=function(e,t,n,r,o,i){e.arc(t,n,r,o,i)},Cu=function(e,t,n,r,o,i){e.arc(n,t,r,o,i)},_u=function(e,t,n,r,o,i,a){e.bezierCurveTo(t,n,r,o,i,a)},Eu=function(e,t,n,r,o,i,a){e.bezierCurveTo(n,t,o,r,a,i)};function Au(e){return function(e,t,n,r,o){return du(e,t,(function(t,i,a,u,s,l,c,d,f,p,h){var m,v,g=t.pxRound,y=t.points;0==u.ori?(m=bu,v=Du):(m=xu,v=Cu);var b=Vo(y.width*ai,3),x=(y.size-y.width)/2*ai,w=Vo(2*x,3),Z=new Path2D,k=new Path2D,S=e.bbox,D=S.left,C=S.top,_=S.width,E=S.height;ku(k,D-w,C-w,_+2*w,E+2*w);var A=function(e){if(null!=a[e]){var t=g(l(i[e],u,p,d)),n=g(c(a[e],s,h,f));m(Z,t+x,n),v(Z,t,n,x,0,2*Zo)}};if(o)o.forEach(A);else for(var M=n;M<=r;M++)A(M);return{stroke:b>0?Z:null,fill:Z,clip:k,flags:3}}))}}function Mu(e){return function(t,n,r,o,i,a){r!=o&&(i!=r&&a!=r&&e(t,n,r),i!=o&&a!=o&&e(t,n,o),e(t,n,a))}}var Pu=Mu(wu),Ru=Mu(Zu);function Tu(){return function(e,t,n,o){return du(e,t,(function(i,a,u,s,l,c,d,f,p,h,m){var v,g,y=i.pxRound;0==s.ori?(v=wu,g=Pu):(v=Zu,g=Ru);var b,x,w,Z,k=s.dir*(0==s.ori?1:-1),S={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},D=S.stroke,C=Fo,_=-Fo,E=[],A=y(c(a[1==k?n:o],s,h,f)),M=!1,P=!1,R=ao(u,n,o,1*k),T=ao(u,n,o,-1*k),F=y(c(a[R],s,h,f)),O=y(c(a[T],s,h,f));F>f&&vu(E,f,F);for(var B=1==k?n:o;B>=n&&B<=o;B+=k){var I=y(c(a[B],s,h,f));if(I==A)null!=u[B]?(x=y(d(u[B],l,m,p)),C==Fo&&(v(D,I,x),b=x),C=_o(x,C),_=Eo(x,_)):null===u[B]&&(M=P=!0);else{var N=!1;C!=Fo?(g(D,A,C,_,b,x),w=Z=A):M&&(N=!0,M=!1),null!=u[B]?(v(D,I,x=y(d(u[B],l,m,p))),C=_=b=x,P&&I-A>1&&(N=!0),P=!1):(C=Fo,_=-Fo,null===u[B]&&(M=!0,I-A>1&&(N=!0))),N&&vu(E,w,I),A=I}}C!=Fo&&C!=_&&Z!=A&&g(D,A,C,_,b,x),O0!==l[p]>0?s[p]=0:(s[p]=3*(d[p-1]+d[p])/((2*d[p]+d[p-1])/l[p-1]+(d[p]+2*d[p-1])/l[p]),isFinite(s[p])||(s[p]=0));s[a-1]=l[a-2];for(var h=0;h=o&&i+(s<5?Uo.get(s):0)<=17)return[s,l]}while(++u0?e:t.clamp(o,e,t.min,t.max,t.key)):4==t.distr?To(e,t.asinh):e)-t._min)/(t._max-t._min)}function u(e,t,n,r){var o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function s(e,t,n,r){var o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function l(e,t,n,r){return 0==t.ori?u(e,t,n,r):s(e,t,n,r)}o.valToPosH=u,o.valToPosV=s;var c=!1;o.status=0;var d=o.root=Ti("uplot");(null!=e.id&&(d.id=e.id),Ai(d,e.class),e.title)&&(Ti("u-title",d).textContent=e.title);var f=Ri("canvas"),p=o.ctx=f.getContext("2d"),h=Ti("u-wrap",d),m=o.under=Ti("u-under",h);h.appendChild(f);var v=o.over=Ti("u-over",h),g=+yo((e=ri(e)).pxAlign,1),y=gu(g);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(o,e)||e)}));var b,x,w=e.ms||.001,Z=o.series=1==i?Lu(e.series||[],Ha,iu,!1):(b=e.series||[null],x=ou,b.map((function(e,t){return 0==t?null:oi({},x,e)}))),k=o.axes=Lu(e.axes||[],$a,tu,!0),S=o.scales={},D=o.bands=e.bands||[];D.forEach((function(e){e.fill=No(e.fill||null),e.dir=yo(e.dir,-1)}));var C=2==i?Z[1].facets[0].scale:Z[0].scale,_={axes:function(){for(var e=function(e){var t=k[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,a=void 0,u=void 0,s=t.stroke(o,e),c=0==n||3==n?-1:1;if(t.label){var d=t.labelGap*c,f=Do((t._lpos+d)*ai);et(t.labelFont[0],s,"center",2==n?di:fi),p.save(),1==i?(a=u=0,p.translate(f,Do(me+ge/2)),p.rotate((3==n?-Zo:Zo)/2)):(a=Do(he+ve/2),u=f),p.fillText(t.label,a,u),p.restore()}var h=(0,r.Z)(t._found,2),m=h[0],v=h[1];if(0==v)return"continue";var g=S[t.scale],b=0==i?ve:ge,x=0==i?he:me,w=Do(t.gap*ai),Z=t._splits,D=2==g.distr?Z.map((function(e){return Xe[e]})):Z,C=2==g.distr?Xe[Z[1]]-Xe[Z[0]]:m,_=t.ticks,E=t.border,A=_.show?Do(_.size*ai):0,M=t._rotate*-Zo/180,P=y(t._pos*ai),R=P+(A+w)*c;u=0==i?R:0,a=1==i?R:0,et(t.font[0],s,1==t.align?pi:2==t.align?hi:M>0?pi:M<0?hi:0==i?"center":3==n?hi:pi,M||1==i?"middle":2==n?di:fi);for(var T=1.5*t.font[1],F=Z.map((function(e){return y(l(e,g,b,x))})),O=t._values,B=0;B0&&(Z.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var r=function(e){var t=Io(Ve-1,0,Te-1),n=Io(Ue+1,0,Te-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){$e!=e.alpha&&(p.globalAlpha=$e=e.alpha),nt(t,!1),e._paths&&rt(t,!1),nt(t,!0);var n=e.points.show(o,t,Ve,Ue),r=e.points.filter(o,t,n,e._paths?e._paths.gaps:null);(n||r)&&(e.points._paths=e.points.paths(o,t,Ve,Ue,r),rt(t,!0)),1!=$e&&(p.globalAlpha=$e=1),un("drawSeries",t)}})))}},E=(e.drawOrder||["axes","series"]).map((function(e){return _[e]}));function A(t){var n=S[t];if(null==n){var r=(e.scales||Go)[t]||Go;if(null!=r.from)A(r.from),S[t]=oi({},S[r.from],r,{key:t});else{(n=S[t]=oi({},t==C?uu:su,r)).key=t;var o=n.time,a=n.range,u=Jo(a);if((t!=C||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?ho:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?ho:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&ti(a))){var s=a;a=function(e,t,n){return null==t?Qo:go(t,n,s)}}n.range=No(a||(o?Wu:t==C?3==n.distr?Yu:4==n.distr?Uu:ju:3==n.distr?Hu:4==n.distr?Vu:$u)),n.auto=No(!u&&n.auto),n.clamp=No(n.clamp||au),n._min=n._max=null}}}for(var M in A("x"),A("y"),1==i&&Z.forEach((function(e){A(e.scale)})),k.forEach((function(e){A(e.scale)})),e.scales)A(M);var P,R,T=S[C],F=T.distr;0==T.ori?(Ai(d,"u-hz"),P=u,R=s):(Ai(d,"u-vt"),P=s,R=u);var O={};for(var B in S){var I=S[B];null==I.min&&null==I.max||(O[B]={min:I.min,max:I.max},I.min=I.max=null)}var N,L=e.tzDate||function(e){return new Date(Do(e/w))},z=e.fmtDate||Qi,j=1==w?wa(L):Ca(L),W=Ea(L,_a(1==w?xa:Da,z)),$=Pa(L,Ma("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",z)),H=[],Y=o.legend=oi({},Ra,e.legend),V=Y.show,U=Y.markers;Y.idxs=H,U.width=No(U.width),U.dash=No(U.dash),U.stroke=No(U.stroke),U.fill=No(U.fill);var q,X=[],G=[],K=!1,Q={};if(Y.live){var J=Z[1]?Z[1].values:null;for(var ee in q=(K=null!=J)?J(o,1,0):{_:0})Q[ee]="--"}if(V)if(N=Ri("table","u-legend",d),K){var te=Ri("tr","u-thead",N);for(var ne in Ri("th",null,te),q)Ri("th",Ci,te).textContent=ne}else Ai(N,"u-inline"),Y.live&&Ai(N,"u-live");var re={show:!0},oe={show:!1};var ie=new Map;function ae(e,t,n){var r=ie.get(t)||{},i=De.bind[e](o,t,n);i&&(Wi(e,t,r[e]=i),ie.set(t,r))}function ue(e,t,n){var r=ie.get(t)||{};for(var o in r)null!=e&&o!=e||($i(o,t,r[o]),delete r[o]);null==e&&ie.delete(t)}var se=0,le=0,ce=0,de=0,fe=0,pe=0,he=0,me=0,ve=0,ge=0;o.bbox={};var ye=!1,be=!1,xe=!1,we=!1,Ze=!1;function ke(e,t,n){(n||e!=o.width||t!=o.height)&&Se(e,t),ct(!1),xe=!0,be=!0,we=Ze=De.left>=0,St()}function Se(e,t){o.width=se=ce=e,o.height=le=de=t,fe=pe=0,function(){var e=!1,t=!1,n=!1,r=!1;k.forEach((function(o,i){if(o.show&&o._show){var a=o.side,u=a%2,s=o._size+(null!=o.label?o.labelSize:0);s>0&&(u?(ce-=s,3==a?(fe+=s,r=!0):n=!0):(de-=s,0==a?(pe+=s,e=!0):t=!0))}})),Pe[0]=e,Pe[1]=n,Pe[2]=t,Pe[3]=r,ce-=Ye[1]+Ye[3],fe+=Ye[3],de-=Ye[2]+Ye[0],pe+=Ye[0]}(),function(){var e=fe+ce,t=pe+de,n=fe,r=pe;function o(o,i){switch(o){case 1:return(e+=i)-i;case 2:return(t+=i)-i;case 3:return(n-=i)+i;case 0:return(r-=i)+i}}k.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=o(n,e._size),null!=e.label&&(e._lpos=o(n,e.labelSize))}}))}();var n=o.bbox;he=n.left=Bo(fe*ai,.5),me=n.top=Bo(pe*ai,.5),ve=n.width=Bo(ce*ai,.5),ge=n.height=Bo(de*ai,.5)}o.setSize=function(e){ke(e.width,e.height)};var De=o.cursor=oi({},Ba,{drag:{y:2==i}},e.cursor);De.idxs=H,De._lock=!1;var Ce=De.points;Ce.show=No(Ce.show),Ce.size=No(Ce.size),Ce.stroke=No(Ce.stroke),Ce.width=No(Ce.width),Ce.fill=No(Ce.fill);var _e=o.focus=oi({},e.focus||{alpha:.3},De.focus),Ee=_e.prox>=0,Ae=[null];function Me(e,t){if(1==i||t>0){var n=1==i&&S[e.scale].time,r=e.value;e.value=n?ei(r)?Pa(L,Ma(r,z)):r||$:r||eu,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Iu||jo,e.fillTo=No(e.fillTo||pu),e.pxAlign=+yo(e.pxAlign,g),e.pxRound=gu(e.pxAlign),e.stroke=No(e.stroke||null),e.fill=No(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=nu(e.width,1),u=e.points=oi({},{size:a,width:Eo(1,.2*a),stroke:e.stroke,space:2*a,paths:Nu,_stroke:null,_fill:null},e.points);u.show=No(u.show),u.filter=No(u.filter),u.fill=No(u.fill),u.stroke=No(u.stroke),u.paths=No(u.paths),u.pxAlign=e.pxAlign}if(V){var s=function(e,t){if(0==t&&(K||!Y.live||2==i))return Qo;var n=[],r=Ri("tr","u-series",N,N.childNodes[t]);Ai(r,e.class),e.show||Ai(r,Di);var a=Ri("th",null,r);if(U.show){var u=Ti("u-marker",a);if(t>0){var s=U.width(o,t);s&&(u.style.border=s+"px "+U.dash(o,t)+" "+U.stroke(o,t)),u.style.background=U.fill(o,t)}}var l=Ti(Ci,a);for(var c in l.textContent=e.label,t>0&&(U.show||(l.style.color=e.width>0?U.stroke(o,t):U.fill(o,t)),ae("click",a,(function(t){if(!De._lock){var n=Z.indexOf(e);if((t.ctrlKey||t.metaKey)!=Y.isolate){var r=Z.some((function(e,t){return t>0&&t!=n&&e.show}));Z.forEach((function(e,t){t>0&&Nt(t,r?t==n?re:oe:re,!0,sn.setSeries)}))}else Nt(n,{show:!e.show},!0,sn.setSeries)}})),Ee&&ae(xi,a,(function(t){De._lock||Nt(Z.indexOf(e),Lt,!0,sn.setSeries)}))),q){var d=Ri("td","u-value",r);d.textContent="--",n.push(d)}return[r,n]}(e,t);X.splice(t,0,s[0]),G.splice(t,0,s[1]),Y.values.push(null)}if(De.show){H.splice(t,0,null);var l=function(e,t){if(t>0){var n=De.points.show(o,t);if(n)return Ai(n,"u-cursor-pt"),Ai(n,e.class),Oi(n,-10,-10,ce,de),v.insertBefore(n,Ae[t]),n}}(e,t);l&&Ae.splice(t,0,l)}un("addSeries",t)}o.addSeries=function(e,t){e=zu(e,t=null==t?Z.length:t,Ha,iu),Z.splice(t,0,e),Me(Z[t],t)},o.delSeries=function(e){if(Z.splice(e,1),V){Y.values.splice(e,1),G.splice(e,1);var t=X.splice(e,1)[0];ue(null,t.firstChild),t.remove()}De.show&&(H.splice(e,1),Ae.length>1&&Ae.splice(e,1)[0].remove()),un("delSeries",e)};var Pe=[!1,!1,!1,!1];function Re(e,t,n,o){var i=(0,r.Z)(n,4),a=i[0],u=i[1],s=i[2],l=i[3],c=t%2,d=0;return 0==c&&(l||u)&&(d=0==t&&!a||2==t&&!s?Do($a.size/3):0),1==c&&(a||s)&&(d=1==t&&!u||3==t&&!l?Do(tu.size/2):0),d}var Te,Fe,Oe,Be,Ie,Ne,Le,ze,je,We,$e,He=o.padding=(e.padding||[Re,Re,Re,Re]).map((function(e){return No(yo(e,Re))})),Ye=o._padding=He.map((function(e,t){return e(o,t,Pe,0)})),Ve=null,Ue=null,qe=1==i?Z[0].idxs:null,Xe=null,Ge=!1;function Ke(e,n){if(2==i){Te=0;for(var r=1;r=0,Ze=!0,St()}}function Qe(){var e,n;if(Ge=!0,1==i)if(Te>0){if(Ve=qe[0]=0,Ue=qe[1]=Te-1,e=t[0][Ve],n=t[0][Ue],2==F)e=Ve,n=Ue;else if(1==Te)if(3==F){var o=fo(e,e,T.log,!1),a=(0,r.Z)(o,2);e=a[0],n=a[1]}else if(4==F){var u=po(e,e,T.log,!1),s=(0,r.Z)(u,2);e=s[0],n=s[1]}else if(T.time)n=e+Do(86400/w);else{var l=go(e,n,.1,!0),c=(0,r.Z)(l,2);e=c[0],n=c[1]}}else Ve=qe[0]=e=null,Ue=qe[1]=n=null;It(C,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vi,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ko,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:vi,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Fe&&(p.strokeStyle=Fe=e),o!=Oe&&(p.fillStyle=Oe=o),t!=Be&&(p.lineWidth=Be=t),i!=Ne&&(p.lineJoin=Ne=i),r!=Le&&(p.lineCap=Le=r),n!=Ie&&p.setLineDash(Ie=n)}function et(e,t,n,r){t!=Oe&&(p.fillStyle=Oe=t),e!=ze&&(p.font=ze=e),n!=je&&(p.textAlign=je=n),r!=We&&(p.textBaseline=We=r)}function tt(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(e.auto(o,Ge)&&(null==t||null==t.min)){var a=yo(Ve,0),u=yo(Ue,r.length-1),s=null==n.min?3==e.distr?so(r,a,u):uo(r,a,u,i):[n.min,n.max];e.min=_o(e.min,n.min=s[0]),e.max=Eo(e.max,n.max=s[1])}}function nt(e,t){var n=t?Z[e].points:Z[e];n._stroke=n.stroke(o,e),n._fill=n.fill(o,e)}function rt(e,n){var r=n?Z[e].points:Z[e],i=r._stroke,a=r._fill,u=r._paths,s=u.stroke,l=u.fill,c=u.clip,d=u.flags,f=null,h=Vo(r.width*ai,3),m=h%2/2;n&&null==a&&(a=h>0?"#fff":i);var v=1==r.pxAlign;if(v&&p.translate(m,m),!n){var g=he,y=me,b=ve,x=ge,w=h*ai/2;0==r.min&&(x+=w),0==r.max&&(y-=w,x+=w),(f=new Path2D).rect(g,y,b,x)}n?ot(i,h,r.dash,r.cap,a,s,l,d,c):function(e,n,r,i,a,u,s,l,c,d,f){var p=!1;D.forEach((function(h,m){if(h.series[0]==e){var v,g=Z[h.series[1]],y=t[h.series[1]],b=(g._paths||Go).band;Jo(b)&&(b=1==h.dir?b[0]:b[1]);var x=null;g.show&&b&&function(e,t,n){for(t=yo(t,0),n=yo(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(y,Ve,Ue)?(x=h.fill(o,m)||u,v=g._paths.clip):b=null,ot(n,r,i,a,x,s,l,c,d,f,v,b),p=!0}})),p||ot(n,r,i,a,u,s,l,c,d,f)}(e,i,h,r.dash,r.cap,a,s,l,d,f,c),v&&p.translate(-m,-m)}o.setData=Ke;function ot(e,t,n,r,o,i,a,u,s,l,c,d){Je(e,t,n,r,o),(s||l||d)&&(p.save(),s&&p.clip(s),l&&p.clip(l)),d?3==(3&u)?(p.clip(d),c&&p.clip(c),at(o,a),it(e,i,t)):2&u?(at(o,a),p.clip(d),it(e,i,t)):1&u&&(p.save(),p.clip(d),c&&p.clip(c),at(o,a),p.restore(),it(e,i,t)):(at(o,a),it(e,i,t)),(s||l||d)&&p.restore()}function it(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){p.strokeStyle=Fe=t,p.stroke(e)})):null!=t&&e&&p.stroke(t))}function at(e,t){t instanceof Map?t.forEach((function(e,t){p.fillStyle=Oe=t,p.fill(e)})):null!=t&&e&&p.fill(t)}function ut(e,t,n,r,o,i,a,u,s,l){var c=a%2/2;1==g&&p.translate(c,c),Je(u,a,s,l,u),p.beginPath();var d,f,h,m,v=o+(0==r||3==r?-i:i);0==n?(f=o,m=v):(d=o,h=v);for(var y=0;y0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var dt,ft,pt,ht,mt,vt,gt,yt,bt,xt,wt,Zt,kt=!1;function St(){kt||(si(Dt),kt=!0)}function Dt(){ye&&(!function(){var e=ri(S,ni);for(var n in e){var a=e[n],u=O[n];if(null!=u&&null!=u.min)oi(a,u),n==C&&ct(!0);else if(n!=C||2==i)if(0==Te&&null==a.from){var s=a.range(o,null,null,n);a.min=s[0],a.max=s[1]}else a.min=Fo,a.max=-Fo}if(Te>0)for(var l in Z.forEach((function(n,a){if(1==i){var u=n.scale,s=e[u],l=O[u];if(0==a){var c=s.range(o,s.min,s.max,u);s.min=c[0],s.max=c[1],Ve=io(s.min,t[0]),Ue=io(s.max,t[0]),t[0][Ve]s.max&&Ue--,n.min=Xe[Ve],n.max=Xe[Ue]}else n.show&&n.auto&&tt(s,l,n,t[a],n.sorted);n.idxs[0]=Ve,n.idxs[1]=Ue}else if(a>0&&n.show&&n.auto){var d=(0,r.Z)(n.facets,2),f=d[0],p=d[1],h=f.scale,m=p.scale,v=(0,r.Z)(t[a],2),g=v[0],y=v[1];tt(e[h],O[h],f,g,f.sorted),tt(e[m],O[m],p,y,p.sorted),n.min=p.min,n.max=p.max}})),e){var c=e[l],d=O[l];if(null==c.from&&(null==d||null==d.min)){var f=c.range(o,c.min==Fo?null:c.min,c.max==-Fo?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var p in e){var h=e[p];if(null!=h.from){var m=e[h.from];if(null==m.min)h.min=h.max=null;else{var v=h.range(o,m.min,m.max,p);h.min=v[0],h.max=v[1]}}}var g={},y=!1;for(var b in e){var x=e[b],w=S[b];if(w.min!=x.min||w.max!=x.max){w.min=x.min,w.max=x.max;var k=w.distr;w._min=3==k?Po(w.min):4==k?To(w.min,w.asinh):w.min,w._max=3==k?Po(w.max):4==k?To(w.max,w.asinh):w.max,g[b]=y=!0}}if(y){for(var D in Z.forEach((function(e,t){2==i?t>0&&g.y&&(e._paths=null):g[e.scale]&&(e._paths=null)})),g)xe=!0,un("setScale",D);De.show&&(we=Ze=De.left>=0)}for(var _ in O)O[_]=null}(),ye=!1),xe&&(!function(){for(var e=!1,t=0;!e;){var n=st(++t),r=lt(t);(e=3==t||n&&r)||(Se(o.width,o.height),be=!0)}}(),xe=!1),be&&(Pi(m,pi,fe),Pi(m,di,pe),Pi(m,li,ce),Pi(m,ci,de),Pi(v,pi,fe),Pi(v,di,pe),Pi(v,li,ce),Pi(v,ci,de),Pi(h,li,se),Pi(h,ci,le),f.width=Do(se*ai),f.height=Do(le*ai),k.forEach((function(e){var t=e._el,n=e._show,r=e._size,o=e._pos,i=e.side;if(null!=t)if(n){var a=i%2==1;Pi(t,a?"left":"top",o-(3===i||0===i?r:0)),Pi(t,a?"width":"height",r),Pi(t,a?"top":"left",a?pe:fe),Pi(t,a?"height":"width",a?de:ce),Mi(t,Di)}else Ai(t,Di)})),Fe=Oe=Be=Ne=Le=ze=je=We=Ie=null,$e=1,Xt(!1),un("setSize"),be=!1),se>0&&le>0&&(p.clearRect(0,0,f.width,f.height),un("drawClear"),E.forEach((function(e){return e()})),un("draw")),De.show&&we&&(Ut(null,!0,!1),we=!1),c||(c=!0,o.status=1,un("ready")),Ge=!1,kt=!1}function Ct(e,n){var r=S[e];if(null==r.from){if(0==Te){var i=r.range(o,n.min,n.max,e);n.min=i[0],n.max=i[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Te>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==r.distr&&Te>0&&(n.min=io(n.min,t[0]),n.max=io(n.max,t[0]),n.min==n.max&&n.max++),O[e]=n,ye=!0,St()}}o.redraw=function(e,t){xe=t||!1,!1!==e?It(C,T.min,T.max):St()},o.setScale=Ct;var _t=!1,Et=De.drag,At=Et.x,Mt=Et.y;De.show&&(De.x&&(dt=Ti("u-cursor-x",v)),De.y&&(ft=Ti("u-cursor-y",v)),0==T.ori?(pt=dt,ht=ft):(pt=ft,ht=dt),wt=De.left,Zt=De.top);var Pt,Rt,Tt,Ft=o.select=oi({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ot=Ft.show?Ti("u-select",Ft.over?v:m):null;function Bt(e,t){if(Ft.show){for(var n in e)Pi(Ot,n,Ft[n]=e[n]);!1!==t&&un("setSelect")}}function It(e,t,n){Ct(e,{min:t,max:n})}function Nt(e,t,n,r){var a=Z[e];null!=t.focus&&function(e){if(e!=Tt){var t=null==e,n=1!=_e.alpha;Z.forEach((function(r,o){var i=t||0==o||o==e;r._focus=t?null:i,n&&function(e,t){Z[e].alpha=t,De.show&&Ae[e]&&(Ae[e].style.opacity=t);V&&X[e]&&(X[e].style.opacity=t)}(o,i?1:_e.alpha)})),Tt=e,n&&St()}}(e),null!=t.show&&(a.show=t.show,function(e,t){var n=Z[e],r=V?X[e]:null;n.show?r&&Mi(r,Di):(r&&Ai(r,Di),Ae.length>1&&Oi(Ae[e],-10,-10,ce,de))}(e,t.show),It(2==i?a.facets[1].scale:a.scale,null,null),St()),!1!==n&&un("setSeries",e,t),r&&dn("setSeries",o,e,t)}o.setSelect=Bt,o.setSeries=Nt,o.addBand=function(e,t){e.fill=No(e.fill||null),e.dir=yo(e.dir,-1),t=null==t?D.length:t,D.splice(t,0,e)},o.setBand=function(e,t){oi(D[e],t)},o.delBand=function(e){null==e?D.length=0:D.splice(e,1)};var Lt={focus:!0};function zt(e,t,n){var r=S[t];n&&(e=e/ai-(1==r.ori?pe:fe));var o=ce;1==r.ori&&(e=(o=de)-e),-1==r.dir&&(e=o-e);var i=r._min,a=i+(r._max-i)*(e/o),u=r.distr;return 3==u?Ao(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return wo.sinh(e)*t}(a,r.asinh):a}function jt(e,t){Pi(Ot,pi,Ft.left=e),Pi(Ot,li,Ft.width=t)}function Wt(e,t){Pi(Ot,di,Ft.top=e),Pi(Ot,ci,Ft.height=t)}V&&Ee&&Wi(wi,N,(function(e){De._lock||null!=Tt&&Nt(null,Lt,!0,sn.setSeries)})),o.valToIdx=function(e){return io(e,t[0])},o.posToIdx=function(e,n){return io(zt(e,C,n),t[0],Ve,Ue)},o.posToVal=zt,o.valToPos=function(e,t,n){return 0==S[t].ori?u(e,S[t],n?ve:ce,n?he:0):s(e,S[t],n?ge:de,n?me:0)},o.batch=function(e){e(o),St()},o.setCursor=function(e,t,n){wt=e.left,Zt=e.top,Ut(null,t,n)};var $t=0==T.ori?jt:Wt,Ht=1==T.ori?jt:Wt;function Yt(e,t){if(null!=e){var n=e.idx;Y.idx=n,Z.forEach((function(e,t){(t>0||!K)&&Vt(t,n)}))}V&&Y.live&&function(){if(V&&Y.live)for(var e=2==i?1:0;eUe;Pt=Fo;var f=0==T.ori?ce:de,p=1==T.ori?ce:de;if(wt<0||0==Te||d){u=null;for(var h=0;h0&&Ae.length>1&&Oi(Ae[h],-10,-10,ce,de);if(Ee&&Nt(null,Lt,!0,null==e&&sn.setSeries),Y.live){H.fill(null),Ze=!0;for(var m=0;m0&&b.show){var E=null==D?-10:Ho(R(D,1==i?S[b.scale]:S[b.facets[1].scale],p,0),.5);if(E>0&&1==i){var A=ko(E-Zt);A<=Pt&&(Pt=A,Rt=y)}var M=void 0,F=void 0;if(0==T.ori?(M=_,F=E):(M=E,F=_),Ze&&Ae.length>1){Ii(Ae[y],De.points.fill(o,y),De.points.stroke(o,y));var O=void 0,B=void 0,I=void 0,N=void 0,L=!0,z=De.points.bbox;if(null!=z){L=!1;var j=z(o,y);I=j.left,N=j.top,O=j.width,B=j.height}else I=M,N=F,O=B=De.points.size(o,y);Li(Ae[y],O,B,L),Oi(Ae[y],I,N,ce,de)}}if(Y.live){if(!Ze||0==y&&K)continue;Vt(y,k)}}}if(De.idx=u,De.left=wt,De.top=Zt,Ze&&(Y.idx=u,Yt()),Ft.show&&_t)if(null!=e){var W=(0,r.Z)(sn.scales,2),$=W[0],V=W[1],U=(0,r.Z)(sn.match,2),q=U[0],X=U[1],G=(0,r.Z)(e.cursor.sync.scales,2),J=G[0],ee=G[1],te=e.cursor.drag;if(At=te._x,Mt=te._y,At||Mt){var ne,re,oe,ie,ae,ue=e.select,se=ue.left,le=ue.top,fe=ue.width,pe=ue.height,he=e.scales[$].ori,me=e.posToVal,ve=null!=$&&q($,J),ge=null!=V&&X(V,ee);ve?(0==he?(ne=se,re=fe):(ne=le,re=pe),oe=S[$],ie=P(me(ne,J),oe,f,0),ae=P(me(ne+re,J),oe,f,0),$t(_o(ie,ae),ko(ae-ie))):$t(0,f),ge?(1==he?(ne=se,re=fe):(ne=le,re=pe),oe=S[V],ie=R(me(ne,ee),oe,p,0),ae=R(me(ne+re,ee),oe,p,0),Ht(_o(ie,ae),ko(ae-ie))):Ht(0,p)}else Jt()}else{var ye=ko(bt-mt),be=ko(xt-vt);if(1==T.ori){var xe=ye;ye=be,be=xe}At=Et.x&&ye>=Et.dist,Mt=Et.y&&be>=Et.dist;var we,ke,Se=Et.uni;null!=Se?At&&Mt&&(Mt=be>=Se,(At=ye>=Se)||Mt||(be>ye?Mt=!0:At=!0)):Et.x&&Et.y&&(At||Mt)&&(At=Mt=!0),At&&(0==T.ori?(we=gt,ke=wt):(we=yt,ke=Zt),$t(_o(we,ke),ko(ke-we)),Mt||Ht(0,p)),Mt&&(1==T.ori?(we=gt,ke=wt):(we=yt,ke=Zt),Ht(_o(we,ke),ko(ke-we)),At||$t(0,f)),At||Mt||($t(0,0),Ht(0,0))}if(Et._x=At,Et._y=Mt,null==e){if(a){if(null!=ln){var Ce=(0,r.Z)(sn.scales,2),Me=Ce[0],Pe=Ce[1];sn.values[0]=null!=Me?zt(0==T.ori?wt:Zt,Me):null,sn.values[1]=null!=Pe?zt(1==T.ori?wt:Zt,Pe):null}dn(gi,o,wt,Zt,ce,de,u)}if(Ee){var Re=a&&sn.setSeries,Fe=_e.prox;null==Tt?Pt<=Fe&&Nt(Rt,Lt,!0,Re):Pt>Fe?Nt(null,Lt,!0,Re):Rt!=Tt&&Nt(Rt,Lt,!0,Re)}}c&&!1!==n&&un("setCursor")}o.setLegend=Yt;var qt=null;function Xt(e){!0===e?qt=null:un("syncRect",qt=v.getBoundingClientRect())}function Gt(e,t,n,r,o,i,a){De._lock||(Kt(e,t,n,r,o,i,a,!1,null!=e),null!=e?Ut(null,!0,!0):Ut(t,!0,!1))}function Kt(e,t,n,i,a,u,s,c,d){if(null==qt&&Xt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return wt=-10,void(Zt=-10);var f=(0,r.Z)(sn.scales,2),p=f[0],h=f[1],m=t.cursor.sync,v=(0,r.Z)(m.values,2),g=v[0],y=v[1],b=(0,r.Z)(m.scales,2),x=b[0],w=b[1],Z=(0,r.Z)(sn.match,2),k=Z[0],D=Z[1],C=t.axes[0].side%2==1,_=0==T.ori?ce:de,E=1==T.ori?ce:de,A=C?u:a,M=C?a:u,P=C?i:n,R=C?n:i;if(n=null!=x?k(p,x)?l(g,S[p],_,0):-10:_*(P/A),i=null!=w?D(h,w)?l(y,S[h],E,0):-10:E*(R/M),1==T.ori){var F=n;n=i,i=F}}if(d&&((n<=1||n>=ce-1)&&(n=Bo(n,ce)),(i<=1||i>=de-1)&&(i=Bo(i,de))),c){mt=n,vt=i;var O=De.move(o,n,i),B=(0,r.Z)(O,2);gt=B[0],yt=B[1]}else wt=n,Zt=i}var Qt={width:0,height:0};function Jt(){Bt(Qt,!1)}function en(e,t,n,r,i,a,u){_t=!0,At=Mt=Et._x=Et._y=!1,Kt(e,t,n,r,i,a,0,!0,!1),null!=e&&(ae(bi,_i,tn),dn(yi,o,gt,yt,ce,de,null))}function tn(e,t,n,r,i,a,u){_t=Et._x=Et._y=!1,Kt(e,t,n,r,i,a,0,!1,!0);var s=Ft.left,l=Ft.top,c=Ft.width,d=Ft.height,f=c>0||d>0;if(f&&Bt(Ft),Et.setScale&&f){var p=s,h=c,m=l,v=d;if(1==T.ori&&(p=l,h=d,m=s,v=c),At&&It(C,zt(p,C),zt(p+h,C)),Mt)for(var g in S){var y=S[g];g!=C&&null==y.from&&y.min!=Fo&&It(g,zt(m+v,g),zt(m,g))}Jt()}else De.lock&&(De._lock=!De._lock,De._lock||Ut(null,!0,!1));null!=e&&(ue(bi,_i),dn(bi,o,wt,Zt,ce,de,null))}function nn(e,t,n,r,i,a,u){Qe(),Jt(),null!=e&&dn(Zi,o,wt,Zt,ce,de,null)}function rn(){k.forEach(Gu),ke(o.width,o.height,!0)}Wi(Si,Ei,rn);var on={};on.mousedown=en,on.mousemove=Gt,on.mouseup=tn,on.dblclick=nn,on.setSeries=function(e,t,n,r){Nt(n,r,!0,!1)},De.show&&(ae(yi,v,en),ae(gi,v,Gt),ae(xi,v,Xt),ae(wi,v,(function(e,t,n,r,o,i,a){if(!De._lock){var u=_t;if(_t){var s,l,c=!0,d=!0;0==T.ori?(s=At,l=Mt):(s=Mt,l=At),s&&l&&(c=wt<=10||wt>=ce-10,d=Zt<=10||Zt>=de-10),s&&c&&(wt=wt=3?Ja:zo)),e.font=Xu(e.font),e.labelFont=Xu(e.labelFont),e._size=e.size(o,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Pe[t]=!0,e._el=Ti("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(d),fn()):n(o,fn):fn(),o}Ku.assign=oi,Ku.fmtNum=xo,Ku.rangeNum=go,Ku.rangeLog=fo,Ku.rangeAsinh=po,Ku.orient=du,Ku.join=function(e,t){for(var n=new Set,r=0;r=i&&E<=a;E+=Z){var A=l[E],M=y(f(s[E],c,v,h));if(null!=A){var P=y(p(A,d,g,m));S&&(vu(k,_,M),S=!1),1==t?b(w,M,D):b(w,_,P),b(w,M,P),D=P,_=M}else null===A&&(vu(k,_,M),S=!0)}var R=fu(e,o),T=(0,r.Z)(R,2),F=T[0],O=T[1];if(null!=u.fill||0!=F){var B=x.fill=new Path2D(w),I=y(p(u.fillTo(e,o,u.min,u.max,F),d,g,m));b(B,_,I),b(B,C,I)}x.gaps=k=u.gaps(e,o,i,a,k);var N=u.width*ai/2,L=n||1==t?N:-N,z=n||-1==t?-N:N;return k.forEach((function(e){e[0]+=L,e[1]+=z})),u.spanGaps||(x.clip=mu(k,c.ori,h,m,v,g)),0!=O&&(x.band=2==O?[hu(e,o,i,a,w,-1),hu(e,o,i,a,w,1)]:hu(e,o,i,a,w,O)),x}))}},Qu.bars=function(e){var t=yo((e=e||Go).size,[.6,Fo,1]),n=e.align||0,o=(e.gap||0)*ai,i=yo(e.radius,0),a=1-t[0],u=yo(t[1],Fo)*ai,s=yo(t[2],1)*ai,l=yo(e.disp,Go),c=yo(e.each,(function(e){})),d=l.fill,f=l.stroke;return function(e,t,p,h){return du(e,t,(function(m,v,g,y,b,x,w,Z,k,S,D){var C,_,E=m.pxRound,A=y.dir*(0==y.ori?1:-1),M=b.dir*(1==b.ori?1:-1),P=0==y.ori?ku:Su,R=0==y.ori?c:function(e,t,n,r,o,i,a){c(e,t,n,o,r,a,i)},T=fu(e,t),F=(0,r.Z)(T,2),O=F[0],B=F[1],I=3==b.distr?1==O?b.max:b.min:0,N=w(I,b,D,k),L=E(m.width*ai),z=!1,j=null,W=null,$=null,H=null;null==d||0!=L&&null==f||(z=!0,j=d.values(e,t,p,h),W=new Map,new Set(j).forEach((function(e){null!=e&&W.set(e,new Path2D)})),L>0&&($=f.values(e,t,p,h),H=new Map,new Set($).forEach((function(e){null!=e&&H.set(e,new Path2D)}))));var Y=l.x0,V=l.size;if(null!=Y&&null!=V){v=Y.values(e,t,p,h),2==Y.unit&&(v=v.map((function(t){return e.posToVal(Z+t*S,y.key,!0)})));var U=V.values(e,t,p,h);_=E((_=2==V.unit?U[0]*S:x(U[0],y,S,Z)-x(0,y,S,Z))-L),C=1==A?-L/2:_+L/2}else{var q=S;if(v.length>1)for(var X=null,G=0,K=1/0;G=p&&ae<=h;ae+=A){var ue=g[ae],se=x(2!=y.distr||null!=l?v[ae]:ae,y,S,Z),le=w(yo(ue,I),b,D,k);null!=ie&&null!=ue&&(N=w(ie[ae],b,D,k));var ce=E(se-C),de=E(Eo(le,N)),fe=E(_o(le,N)),pe=de-fe,he=i*_;null!=ue&&(z?(L>0&&null!=$[ae]&&P(H.get($[ae]),ce,fe+So(L/2),_,Eo(0,pe-L),he),null!=j[ae]&&P(W.get(j[ae]),ce,fe+So(L/2),_,Eo(0,pe-L),he)):P(te,ce,fe+So(L/2),_,Eo(0,pe-L),he),R(e,t,ae,ce-L/2,fe,_+L,pe)),0!=B&&(M*B==1?(de=fe,fe=J):(fe=de,de=J),P(ne,ce-L/2,fe,_+L,Eo(0,pe=de-fe),0))}return L>0&&(ee.stroke=z?H:te),ee.fill=z?W:te,ee}))}},Qu.spline=function(e){return t=Fu,function(e,n,o,i){return du(e,n,(function(a,u,s,l,c,d,f,p,h,m,v){var g,y,b,x=a.pxRound;0==l.ori?(g=bu,b=wu,y=_u):(g=xu,b=Zu,y=Eu);var w=1*l.dir*(0==l.ori?1:-1);o=ao(s,o,i,1),i=ao(s,o,i,-1);for(var Z=[],k=!1,S=x(d(u[1==w?o:i],l,m,p)),D=S,C=[],_=[],E=1==w?o:i;E>=o&&E<=i;E+=w){var A=s[E],M=d(u[E],l,m,p);null!=A?(k&&(vu(Z,D,M),k=!1),C.push(D=M),_.push(f(s[E],c,v,h))):null===A&&(vu(Z,D,M),k=!0)}var P={stroke:t(C,_,g,b,y,x),fill:null,clip:null,band:null,gaps:null,flags:1},R=P.stroke,T=fu(e,n),F=(0,r.Z)(T,2),O=F[0],B=F[1];if(null!=a.fill||0!=O){var I=P.fill=new Path2D(R),N=x(f(a.fillTo(e,n,a.min,a.max,O),c,v,h));b(I,D,N),b(I,S,N)}return P.gaps=Z=a.gaps(e,n,o,i,Z),a.spanGaps||(P.clip=mu(Z,l.ori,p,h,m,v)),0!=B&&(P.band=2==B?[hu(e,n,o,i,R,-1),hu(e,n,o,i,R,1)]:hu(e,n,o,i,R,B)),P}))};var t};var Ju,es=function(e){if(7!=e.length)return"0, 0, 0";var t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return"".concat(t,", ").concat(n,", ").concat(r)},ts={height:500,legend:{show:!1},cursor:{drag:{x:!1,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{mouseup:function(){return null},mousedown:function(){return null},click:function(){return null},dblclick:function(){return null},mouseenter:function(){return null}}}},ns=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},rs=function(e,t,n,r){var o,i=e.axes[n];if(r>1)return i._size||60;var a=6+((null===i||void 0===i||null===(o=i.ticks)||void 0===o?void 0:o.size)||0)+(i.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},os=function(e,t){return function(e){for(var t=0,n=0;n>8*o&255).toString(16)).substr(-2);return r}("".concat(e).concat(t))},is=function(e){return e<=1?[]:[4*e,1.2*e]},as=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},us=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(ns(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:yn(yn({},n),{},{side:1}):{space:80}}))},ls=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},cs=function(e){var t,n,r=e.u,o=e.tooltipIdx,i=e.metrics,a=e.series,u=e.tooltip,s=e.tooltipOffset,l=e.unit,c=void 0===l?"":l,d=o.seriesIdx,f=o.dataIdx;if(null!==d&&void 0!==f){var p=r.data[d][f],h=r.data[0][f],m=(null===(t=i[d-1])||void 0===t?void 0:t.metric)||{},v=os(Number(a[d].scale||0),a[d].label||""),g=r.over.getBoundingClientRect(),y=g.width,b=g.height,x=r.valToPos(p||0,(null===(n=a[d])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(h,"x"),Z=u.getBoundingClientRect(),k=Z.width,S=Z.height,D=w+k>=y,C=x+S>=b;u.style.display="grid",u.style.top="".concat(s.top+x+10-(C?S+10:0),"px"),u.style.left="".concat(s.left+w+10-(D?k+20:0),"px");var _=xn()(new Date(1e3*h)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),E=Object.keys(m).filter((function(e){return"__name__"!==e})).map((function(e){return"